[FFmpeg-devel] [PATCH 2/2] checkasm/aacencdsp: initialize AAC tables

Rémi Denis-Courmont remi at remlab.net
Sat Nov 16 09:50:48 EET 2024


Le perjantaina 15. marraskuuta 2024, 22.41.20 EET James Almer a écrit :
> Without this, the tables will be zero and the tests completely useless.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  tests/checkasm/aacencdsp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/checkasm/aacencdsp.c b/tests/checkasm/aacencdsp.c
> index 5308a2ac03..d53a04c532 100644
> --- a/tests/checkasm/aacencdsp.c
> +++ b/tests/checkasm/aacencdsp.c
> @@ -101,6 +101,7 @@ void checkasm_check_aacencdsp(void)
>  {
>      AACEncDSPContext s = { 0 };
>      ff_aacenc_dsp_init(&s);
> +    ff_aac_float_common_init();
> 
>      test_abs_pow34(&s);
>      test_quant_bands(&s);

This a large proportion of values to underflow or overflow out of the int range. 
The C version then triggers Undefined Behaviour in that case by negating 
INT_MIN, so I don't suppose that that's correct.

Also that breaks RISC-V which does the sign injection in float rather than 
integer, so values larger than INT_MAX are clipped to INT_MAX rather than 
INT_MIN.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the ffmpeg-devel mailing list