takeern / x264-simd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repo is an attempt to port some of the SIMD code written in assembly to C intrinsics, to be used with WebAssembly.

build

git clone --depth 1 https://github.com/AlexVestin/x264-wasm x264
mkdir build
make wasm-libx264-simd

Needs nasm (there's a target for this in the Makefile) for native builds with assembly, and emsdk for wasm builds.

Results

Substituting only the SAD, and SATD 8x8 function (the 4x4 is already very optimized) with SIMD code there was around a 1.6x speedup running a very hastily made benchmark.

Generally

https://software.intel.com/sites/landingpage/IntrinsicsGuide/#techs=SSE2,SSE3,SSSE3,SSE4_1,AVX

emscripten/wasm generally only supports SSE1 & SSE2 instructionss (https://emscripten.org/docs/porting/simd.html#compiling-simd-code-targeting-x86-sse-instruction-set), and some emulated instructions up to AVX

profile

build with -pg and --enable-gprof for x264 (maybe -no-pie/-fno-pie)

links

About

License:GNU General Public License v2.0


Languages

Language:Assembly 79.9%Language:Shell 12.1%Language:C 7.8%Language:Makefile 0.2%Language:JavaScript 0.0%