[FFmpeg-cvslog] r21799 - in trunk/libavcodec: Makefile alsdec.c bgmc.c bgmc.h
Måns Rullgård
mans
Fri Feb 19 00:23:37 CET 2010
Thilo Borgmann <thilo.borgmann at googlemail.com> writes:
> Am 15.02.10 06:28, schrieb Mike Melanson:
>> Thilo Borgmann wrote:
>>> And the decoder currently supports 00-05 files.
>>
>> I have staged tests for these 6 16-bit files. Linux / x86_64 / icc 11.1
>> produces different results for all files. Possibly a compiler bug. I'll
>> alert my Intel compiler contact.
>>
>> Apart from that, here are some other curiosities:
>>
>> For file als_02/als_02_2ch48k16b.mp4, most configs agree, but these 9
>> configurations create 9 different CRCs:
>>
>> (command: 'ffmpeg -i als_02_2ch48k16b.mp4 -f crc -')
>>
>> Linux / x86_32 / icc 11.0
>> Linux / x86_64 / icc 11.0
>> Linux / x86_32 / llvm-svn
>> Linux / x86_64 / icc 10.1
>> Linux / x86_64 / icc 11.1
>> Linux / x86_32 / icc 11.1
>> Linux / x86_32 / gcc 3.4.6
>> Linux / x86_32 / icc 10.1
>> Linux / x86_64 / llvm-svn
>
> Please check these again with the patch attached. It fixes this at least
> for the Linux / x86_32 / gcc 3.4.6 case here.
>
> -Thilo
>
> Index: libavcodec/alsdec.c
> ===================================================================
> --- libavcodec/alsdec.c (Revision 21872)
> +++ libavcodec/alsdec.c (Arbeitskopie)
> @@ -703,10 +703,14 @@
> *bd->use_ltp = get_bits1(gb);
>
> if (*bd->use_ltp) {
> + int r, c;
> +
> bd->ltp_gain[0] = decode_rice(gb, 1) << 3;
> bd->ltp_gain[1] = decode_rice(gb, 2) << 3;
>
> - bd->ltp_gain[2] = ltp_gain_values[get_unary(gb, 0, 4)][get_bits(gb, 2)];
> + r = get_unary(gb, 0, 4);
> + c = get_bits(gb, 2);
> + bd->ltp_gain[2] = ltp_gain_values[r][c];
>
> bd->ltp_gain[3] = decode_rice(gb, 2) << 3;
> bd->ltp_gain[4] = decode_rice(gb, 1) << 3;
This fixes gcc 3.4.6 on x86_64 as well, and the change is correct
regardless. The order of evaluation of expressions in array indexing
is unspecified. Please apply.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-cvslog
mailing list