[FFmpeg-cvslog] r14068 - trunk/libavcodec/ra288.c

Vitor Sessak vitor1001
Wed Jul 9 07:43:47 CEST 2008


Benoit Fouet wrote:
> M?ns Rullg?rd wrote:
>> Benoit Fouet wrote:
>>   
>>> vitor wrote:
>>>     
>>>> Log:
>>>> Write for loops in a more standard way. In my opinion, they are much more
>>>> readable now.
>>>>
>>>> Modified: trunk/libavcodec/ra288.c
>>>> ==============================================================================
>>>> --- trunk/libavcodec/ra288.c	(original)
>>>> +++ trunk/libavcodec/ra288.c	Fri Jul  4 21:55:58 2008
>>>> @@ -40,22 +40,27 @@ typedef struct {
>>>>  /* Decode and produce output */
>>>>  static void decode(Real288_internal *glob, float gain, int cb_coef)
>>>>  {
>>>> -    unsigned int x, y;
>>>> +    int x, y;
>>>>      double sum, sumsum;
>>>>      float buffer[5];
>>>>
>>>> -    for (x=36; x--; glob->sb[x+5] = glob->sb[x]);
>>>> +    for (x=35; x >= 0; x--)
>>>> +        glob->sb[x+5] = glob->sb[x];
>>>>
>>>> -    for (x=5; x--;) {
>>>> +    for (x=4; x >= 0; x--) {
>>>>          float *p1 = glob->sb+x;
>>>>          float *p2 = glob->pr1;
>>>>
>>>>       
>>> as x is used in the loops, I don't think the new loops are equivalent to
>>> the old ones...
>>>     
>> They look equivalent to me.  Notice that the initial value has been changed.
>>
>>   
> 
> Yes indeed, I guess I'm too tired :)

It probably also means that I'm not the only one who find the original 
loops confusing =)

-Vitor




More information about the ffmpeg-cvslog mailing list