Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 1.71 KB

README.md

File metadata and controls

37 lines (23 loc) · 1.71 KB

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