mattdesl / mp4-h264

[project suspended] MP4 + H264 encoding for the browser with WASM
MIT License
223 stars 12 forks source link

Multithreading #5

Open mattdesl opened 3 years ago

mattdesl commented 3 years ago

One of the reasons minih264 is so fast when running from C/C++ is because of multithreading support, which is disabled in the WASM builds. In browsers with SharedArrayBuffer, it should be possible to enable multithreading. As far as I'm aware, I'll need yet another WASM build target for this, so .shared.wasm and .shared.simd.wasm ... But maybe there is another approach.

Something I'm not sure about is the future/status of SharedArrayBuffer, as there was some concerns it might get removed or changed due to security reasons.