[FFmpeg-devel] [PATCH] lavfi: add ff_all_channel_layouts internal symbol

Michael Niedermayer michaelni at gmx.at
Wed Sep 7 20:18:19 CEST 2011


On Wed, Sep 07, 2011 at 05:35:16PM +0200, Stefano Sabatini wrote:
> On date Wednesday 2011-08-31 20:12:11 +0200, Michael Niedermayer encoded:
> > On Wed, Aug 31, 2011 at 07:22:08PM +0200, Stefano Sabatini wrote:
> > > On date Friday 2011-08-26 14:22:03 +0200, Michael Niedermayer encoded:
> > > > On Thu, Aug 25, 2011 at 01:38:52AM +0200, Stefano Sabatini wrote:
> > > > > On date Wednesday 2011-08-24 05:48:55 +0200, Michael Niedermayer encoded:
> > > > > > On Tue, Aug 23, 2011 at 03:31:35PM +0200, Stefano Sabatini wrote:
> > > > > [...]
> > > > > > > +const int64_t avfilter_all_channel_layouts_list[] = {
> > > > > > > +    AV_CH_LAYOUT_MONO,
> > > > > > > +    AV_CH_LAYOUT_STEREO,
> > > > > > > +    AV_CH_LAYOUT_4POINT0,
> > > > > > > +    AV_CH_LAYOUT_QUAD,
> > > > > > > +    AV_CH_LAYOUT_5POINT0,
> > > > > > > +    AV_CH_LAYOUT_5POINT0_BACK,
> > > > > > > +    AV_CH_LAYOUT_5POINT1,
> > > > > > > +    AV_CH_LAYOUT_5POINT1_BACK,
> > > > > > > +    AV_CH_LAYOUT_5POINT1|AV_CH_LAYOUT_STEREO_DOWNMIX,
> > > > > > > +    AV_CH_LAYOUT_7POINT1,
> > > > > > > +    AV_CH_LAYOUT_7POINT1_WIDE,
> > > > > > > +    AV_CH_LAYOUT_7POINT1|AV_CH_LAYOUT_STEREO_DOWNMIX,
> > > > > > > +    -1
> > > > > > > +};
> > > > > > 
> > > > > > There are more possible layouts than can easily be listed i think
> > > > > 
> > > > > Yes, this should be meant as the "default channel layouts which are
> > > > > automatically selected when choosing 'all channels' in audio filters".
> > > > > 
> > > > > So maybe it should be better named
> > > > > avfilter_default_all_channel_layouts_list.
> > > > > 
> > > > > If you don't like it please suggest alternatives.
> > > > 
> > > > assume the front and rear can be 0,1,2,3 speakers, side 0 or 2
> > > > and wide 0 or 2 and there can be a LFE channel and there can be stereo
> > > > downmix channels
> > > > you get 256 combinations
> > > > IMHO they all should be in the list at least
> > > 
> > > In other words you're asking for a non statically defined list of
> > > formats, right?
> > 
> > i dont really mind if its statically defined, my concern was more on
> > "all" not really being "all"
> > 
> > it should not be hard to create such static list in 6 lines of code
> > with a few #define
> 
> Not that easy for me. Proof-of-concept attached, the resulting formats
> are:

your list is missing the front right center channel entirely
it also looks quite odd
anyway, the 6 line case i meant:

int array[]={
#define A(x) (x), (x)|AV_CH_LOW_FREQUENCY
#define B(x) A(x|AV_CH_FRONT_CENTER), A(x|AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT), A(x|AV_CH_FRONT_CENTER|AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
#define C(x) B(x), B(x|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT), B(x|AV_CH_BACK_CENTER)
#define D(x) C(x), C(x|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
D(0), D(AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)};

[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110907/b891aee6/attachment.asc>


More information about the ffmpeg-devel mailing list