[FFmpeg-devel] [PATCH 2/3] lavfi: EBU R.128 channel weights
Clément Bœsch
ubitux at gmail.com
Fri Feb 15 16:40:07 CET 2013
On Fri, Feb 15, 2013 at 03:14:38PM +0000, Kieran Kunhya wrote:
> On Sat, Feb 2, 2013 at 12:02 PM, Clément Bœsch <ubitux at gmail.com> wrote:
> > On Sat, Jan 19, 2013 at 08:24:53PM +0000, David A. Sedacca wrote:
> >> Correct the recognition of channel layouts for good channel weight
> >> in the loudness computation.
> >> This suggested patch is 2 of 3 for Ticket #2144 "libavfilter ebur128
> >> loudness inaccuracy, irregular time interval, LFE interference".
> >>
> >> Signed-off-by: David A. Sedacca" <sedacca at comcast.net>
> >>
> >> ---
> >>
> >> This updated patch submission updates the style of the 'if' block
> >> per Clément's suggestion as clarified by Carl Eugen. It also
> >> reverts to the original pre-patch behavior to not allocate integrator
> >> cache memory for zero-weighted channels.
> >>
> >> libavfilter/f_ebur128.c | 24 +++++++++++++++++++-----
> >> 1 file changed, 19 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
> >> index 85fddad..0265767 100644
> >> --- a/libavfilter/f_ebur128.c
> >> +++ b/libavfilter/f_ebur128.c
> >> @@ -314,12 +314,15 @@ static int config_video_output(AVFilterLink *outlink)
> >> static int config_audio_output(AVFilterLink *outlink)
> >> {
> >> int i;
> >> + int idx_bitposn = 0;
> >> AVFilterContext *ctx = outlink->src;
> >> EBUR128Context *ebur128 = ctx->priv;
> >> const int nb_channels = av_get_channel_layout_nb_channels(outlink->channel_layout);
> >>
> >> #define BACK_MASK (AV_CH_BACK_LEFT |AV_CH_BACK_CENTER |AV_CH_BACK_RIGHT| \
> >> - AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_BACK_RIGHT)
> >> + AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_BACK_RIGHT| \
> >> + AV_CH_SIDE_LEFT |AV_CH_SIDE_RIGHT| \
> >
> >> + AV_CH_SURROUND_DIRECT_LEFT |AV_CH_SURROUND_DIRECT_RIGHT)
> >
> > What is the meaning of this "direct" left/right? It sounds like a "front"
> > speaker to me, but I may be wrong.
>
> They are part of a 13.1 channel map and as far as I can tell they are
> surround speakers. Anyway 13.1 is well-beyond the scope
> of R.128. I think this patch should get committed if it fixes the test vectors.
OK.
Applied as is, it's clearly an improvement. Thanks, and sorry for the
delay.
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130215/6ab0d8aa/attachment.asc>
More information about the ffmpeg-devel
mailing list