[FFmpeg-devel] [PATCH 2/3] lavfi: EBU R.128 channel weights
David A. Sedacca
sedacca at comcast.net
Sat Jan 19 05:33:00 CET 2013
> > #define BACK_MASK (AV_CH_BACK_LEFT [...] | AV_CH_SURROUND_DIRECT_RIGHT)
>
> Assuming this extended mask indeed still focus on "back" outputs, ok.
Yes, still focused on "back". In the local scope of
f_ebur128.c, I understood BACK_MASK as a way to classify a
channel as "not a front channel" and "not a low frequency
effects channel".
> > for (i = 0; i < nb_channels; i++) {
> >
> > + /* find the next bit that is set starting from the right */
> > + while ((outlink->channel_layout & 1ULL<<idx_bitposn) == 0 &&
> > idx_bitposn < 63)
> > + idx_bitposn++;
> > +
> > /* channel weighting */
> > + ebur128->ch_weighting[i] = 1.0;
> > + if (1ULL<<idx_bitposn & AV_CH_LOW_FREQUENCY )
> > ebur128->ch_weighting[i] = 0;
> > + if (1ULL<<idx_bitposn & AV_CH_LOW_FREQUENCY_2)
> > ebur128->ch_weighting[i] = 0;
> > + if (1ULL<<idx_bitposn & BACK_MASK ) ebur128->ch_weighting[i] =
> > 1.41;
>
> else if ?
>
> > + idx_bitposn++;
Clément,
For the "else if" case, the weighting is left as "1.0", matching
your description "the rest is unchanged (ch weight = 1)".
I think if future patches add new non-front, non-LFE channel
positions to libavutil/channel_layout.h, they will get weight 1.0
instead of 1.41 until BACK_MASK is updated in f_ebur128.c too.
Maybe channel_layout.h could eventually be where BACK_MASK is
defined, like for "@defgroup channel_mask_c Audio channel
convenience macros".
Thank you (and all the contributors) for creating this system.
-- David A. Sedacca
More information about the ffmpeg-devel
mailing list