[FFmpeg-devel] [PATCH] TwinVQ decoder

Reimar Döffinger Reimar.Doeffinger
Sun Aug 2 18:57:25 CEST 2009

On Sun, Aug 02, 2009 at 06:25:16PM +0200, Vitor Sessak wrote:
>>>     for (i=step; i <= size - 2*step; i += step) {
>> Missing spaces.
> where?

In all for loops you don't put spaces before and after the =
of the initialization but you do for all other assignments.
Also for some for loops near the bottom of the code you also
don't have spaces around the "<" of the condition.

>>>             interpolate(out + i-step + 1, out[i], out[i-step], step - 1);
>>>             interpolate(out+i-step  +1, out[i-step/2], out[i-step  ], step/2-1);
>>>             interpolate(out+i-step/2+1, out[i       ], out[i-step/2], step/2-1);
>>>     interpolate(out +size - 2*step+1, out[size-step], out[size-2*step], step-1);
>> You don't place spaces particularly consistently...
> I hate breaking lines more than I like consistent spaces :(

You could leave the lines over-long then. A handful of 100 char or so lines is a
non-issue IMO.
I just think that anything that makes it easier to find out which call processes
which part of the data is a real win. Though a helpfully hinting comment might
do as well for that.

More information about the ffmpeg-devel mailing list