Hi,

On Thu, Dec 29, 2011 at 4:58 AM, Christophe Gisquet
<[email protected]> wrote:
> 2011/12/19 Justin Ruggles <[email protected]>:
>> -    for (i = 0; i < 32; i++) {
>> +    for (i = 0; i < 32 * channels; i += channels) {
>>         s0 = wav[i];
>>         d = ((s0 << COEFF_BITS) - c->coeff[0] * s1 - c->coeff[1] * s2) >> 
>> COEFF_BITS;
>> -        data[i] = d;
>> +        data[i / channels] = d;
>
> Ignoring any other change you posted that may improve this particular point:
> instead of adding an integer division to the main loop, what about
> maintaining a separate loop counter (let's call it j), like:
> for (i = 0, j = 0; i < 32 * channels; i += channels, j++) {
> [...]
>  data[j] = d;

+1 for this, I was wondering about the inner loop division also.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to