[FFmpeg-devel] Strange issue debugging AAC

Alex Converse alex.converse
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
>> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aac-scale-cast.diff
Type: text/x-diff
Size: 469 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080918/3e4f6640/attachment.diff>



More information about the ffmpeg-devel mailing list