[FFmpeg-soc] [PATCH 9/9] cosmetics: pretty printing

Justin Ruggles justin.ruggles at gmail.com
Tue Nov 16 00:04:04 CET 2010


Hi,


>> @@ -361,16 +359,16 @@ static int encode_exp(uint8_t encoded_exp[AC3_MAX_COEFS],
>>
>>      /* Decrease the delta between each groups to within 2
>>       * so that they can be differentially encoded */
>> -    for (i=1;i<=nb_groups;i++)
>> +    for (i = 1; i <= nb_groups; i++)
>>          exp1[i] = FFMIN(exp1[i], exp1[i-1] + 2);
>> -    for (i=nb_groups-1;i>=0;i--)
>> +    for (i = nb_groups-1; i >= 0; i--)
>>          exp1[i] = FFMIN(exp1[i], exp1[i+1] + 2);
> 
> while (--i >= 0) ...
> 
> (Note: I wonder if gcc is smart enough to figure this out on its own,
> feel free to test and if gcc is smart, then ignore me.)

That's not quite functionally equivalent.  It's close though.  It would
be equivalent if you put an i-- in-between the 2 loops.  I'll still
check gcc though.

Thanks,
Justin


More information about the FFmpeg-soc mailing list