[FFmpeg-devel] Strange issue debugging AAC
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
> 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;
scale = pow(2., pow(2., get_bits(gb, 2) - 3));
+ scale_bits = get_bits(gb, 2);
+ scale = pow(2., pow(2., scale_bits - 3));
+ 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.
More information about the ffmpeg-devel