On 12/29/2011 05:06 PM, Ronald S. Bultje wrote:

> 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.


yeah i suppose i was being lazy. i'll fix it.

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

Reply via email to