signature_mismatch causing runtime exceptions in wasm
There are signature mismatches in svt_aom_ssim_calculations and rtime_alloc_palette_tokens causing compile time warning (in emscripten)
wasm-ld: warning: function signature mismatch: svt_aom_ssim_calculations
>>> defined as (i32, i32, i32) -> void in //ffmpeg-wasm/build/lib/libSvtAv1Enc.a(EbPacketizationProcess.c.o)
>>> defined as (i32, i32, i32) -> i32 in //ffmpeg-wasm/build/lib/libSvtAv1Enc.a(EbEncDecProcess.c.o)
wasm-ld: warning: function signature mismatch: rtime_alloc_palette_tokens
>>> defined as (i32, i32) -> void in //ffmpeg-wasm/build/lib/libSvtAv1Enc.a(EbPictureManagerProcess.c.o)
>>> defined as (i32, i32) -> i32 in //ffmpeg-wasm/build/lib/libSvtAv1Enc.a(EbPictureControlSet.c.o)
and runtime exception signature_mismatch
.
Updating svt_aom_ssim_calculations() signature in EbPacketizationProcess.c and rtime_alloc_palette_tokens() signature in EbPictureManagerProcess.c fixes both the warning and the exception. It is a very easy fix https://github.com/wide-video/svtav1/commit/87a4e7258d6c98192b10b4e0a0790d225b0ff94e
This seems to be mentioned in other ticket #2108