[FFmpeg-devel] Strange issue debugging AAC
Thu Sep 18 16:41:12 CEST 2008
On Thu, Sep 18, 2008 at 3:02 AM, Siarhei Siamashka
<siarhei.siamashka at gmail.com> wrote:
> 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;
> +#if 1
> 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.
Thanks. Trivial patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 469 bytes
Desc: not available
More information about the ffmpeg-devel