[FFmpeg-devel] Strange issue debugging AAC

Siarhei Siamashka siarhei.siamashka
Thu Sep 18 09:02:06 CEST 2008


On Thursday 18 September 2008, Alex Converse wrote:
> Hey all,
>
> I'm running into a weird issue with get_bits() in the aac decoder that
> I was hoping some one could help me with so that I can continue
> hunting down bugs.
>
> Consider the attached patch:
>
> and the test stream at
> http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_IEC_14496-4_20
>04_Conformance_Testing/audio_conformance/mpeg4audio-conformance/compressedMp
>4/al07_44.mp4
>
> I'm getting different results from the #if and #else sections of the
> code, and it's boggling my mind. Any assistance would be greatly
> appreciated. I've tried both gcc-3.4 and gcc-4.3.

+    int scale_bits;
...
+#if 1
     scale = pow(2., pow(2., get_bits(gb, 2) - 3));
+#else
+    scale_bits = get_bits(gb, 2);
+    scale = pow(2., pow(2., scale_bits - 3));
+#endif
+    av_log(ac->avccontext, AV_LOG_ERROR, "scale = %f\n", scale);


get_bits returns unsigned int, so "(double)(get_bits(gb, 2) - 3)" and 
"(double)((int)get_bits(gb, 2) - 3)" are not identical.

-- 
Best regards,
Siarhei Siamashka




More information about the ffmpeg-devel mailing list