[FFmpeg-devel] [PATCH 3/3] lavfi: EBU R.128 advance pointer to samples

Kieran Kunhya kierank at ob-encoder.com
Fri Feb 15 16:13:08 CET 2013


On Sat, Jan 19, 2013 at 12:36 AM, Clément Bœsch <ubitux at gmail.com> wrote:
> On Fri, Jan 18, 2013 at 05:14:01AM +0000, sedacca at comcast.net wrote:
>> Correct the advancement of a pointer to skip over LFE samples as
>> intended in the loudness computation.
>>
>> This suggested patch is 3 of 3 for Ticket #2144 "libavfilter ebur128
>> loudness inaccuracy, irregular time interval, LFE interference".
>> This suggested patch supersedes the contribution of January 15, 2013
>> in the thread “[PATCH] lavfi: EBU R.128 irreg time, ch weights, skip
>> LFE” which combined multiple fixes in one batch.
>>
>> ---
>>  libavfilter/f_ebur128.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
>> index 3e0cabc..dedaa5d 100644
>> --- a/libavfilter/f_ebur128.c
>> +++ b/libavfilter/f_ebur128.c
>> @@ -470,6 +470,8 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *insamples)
>>          for (ch = 0; ch < nb_channels; ch++) {
>>              double bin;
>>
>> +            ebur128->x[ch * 3] = *samples++; // set X[i]
>> +
>>              if (!ebur128->ch_weighting[ch])
>>                  continue;
>>
>> @@ -483,8 +485,6 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *insamples)
>>                                        - dst[1]*name##_A1 - dst[2]*name##_A2;    \
>>  } while (0)
>>
>> -            ebur128->x[ch * 3] = *samples++; // set X[i]
>> -
>>              // TODO: merge both filters in one?
>>              FILTER(y, x, PRE);  // apply pre-filter
>>              ebur128->x[ch * 3 + 2] = ebur128->x[ch * 3 + 1];
>
> Ah, looks better, thanks. LGTM.
>
> --
> Clément B.
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Can somebody commit this?


More information about the ffmpeg-devel mailing list