[FFmpeg-devel] Strange issue debugging AAC

Robert Swain robert.swain
Thu Sep 18 18:09:06 CEST 2008


2008/9/18 Alex Converse <alex.converse at gmail.com>:
> On Thu, Sep 18, 2008 at 11:03 AM, Robert Swain <robert.swain at gmail.com> wrote:
>> 2008/9/18 Alex Converse <alex.converse at gmail.com>:
>>> 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
>>>>> 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.
>>>>
>>>
>>> Thanks. Trivial patch attached.
>>
>> Did you intend this to be applied? I'll apply the cast, of course, but
>> the av_log() is undesirable for normal use. :)
>>
>
> Whoops, I didn't intend for the av_log to stay in there. Sorry, about that.

Applied without the av_log().

Thanks,
Rob




More information about the ffmpeg-devel mailing list