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

James Almer jamrial at gmail.com
Sat Nov 16 16:39:29 EET 2024


On 11/16/2024 4:50 AM, Rémi Denis-Courmont wrote:
> 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.

So is the C version broken, or this test's randomized values?

> 
> 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241116/abdb9d8e/attachment.sig>


More information about the ffmpeg-devel mailing list