[FFmpeg-soc] [soc]: r4678 - amr/amr-ffmpeg.diff
Vitor Sessak
vitor1001 at gmail.com
Sun Jul 12 18:08:27 CEST 2009
Colin McQuillan wrote:
> 2009/7/12 Vitor Sessak <vitor1001 at gmail.com>:
>> cmcq wrote:
>>> Author: cmcq
>>> Date: Sun Jul 12 13:19:21 2009
>>> New Revision: 4678
>>>
>>> Log:
>>> Remove incorrect comment. An FIR filter doesn't need previous output.
>>>
>>> Modified:
>>> amr/amr-ffmpeg.diff
>>>
>>> Modified: amr/amr-ffmpeg.diff
>>>
>>> ==============================================================================
>>> --- amr/amr-ffmpeg.diff Sun Jul 12 13:10:09 2009 (r4677)
>>> +++ amr/amr-ffmpeg.diff Sun Jul 12 13:19:21 2009 (r4678)
>>> @@ -113,3 +113,13 @@ Index: libavcodec/celp_filters.h
>>> * LP synthesis filter.
>>> * @param out [out] pointer to output buffer
>>> * - the array out[-filter_length, -1] must
>>> +@@ -101,9 +118,6 @@
>>> + * @param buffer_length amount of data to process
>>> + * @param filter_length filter length (10 for 10th order LP filter)
>>> + *
>>> +- * @note Output buffer must contain filter_length samples of past
>>> +- * speech data before pointer.
>>> +- *
>>> + * Routine applies A(z) filter to given speech data.
>>> + */
>>> + void ff_celp_lp_zero_synthesis_filterf(
>>> int i,n;
>>>
>>> // Avoids a +1 in the inner loop.
>>> filter_length++;
>>>
>>> for(n=0; n<buffer_length; n++)
>>> {
>>> out[n] = in[n];
>>> for(i=1; i<filter_length; i++)
>>> out[n] -= filter_coeffs[i-1] * out[n-i];
>> When n==0 and i==filter_length-1, one have
>>
>> out[0] -= filter_coeffs[filter_length-2] * out[-filter_length+1];
>>
>> So I'd say one really need some past data in *out buffer...
>>
>> -Vitor
>
> The snippet is ff_celp_lp_synthesis_filterf. The comment is for
> ff_celp_lp_zero_synthesis_filterf.
Indeed, 100l.
-Vitor
More information about the FFmpeg-soc
mailing list