[FFmpeg-devel] [PATCH]Make CH_LAYOUT_5POINTx_BACK the normal case

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Aug 25 11:20:08 CEST 2011


Stefano Sabatini <stefano.sabatini-lala <at> poste.it> writes:

> > AV_CH_LAYOUT_5POINTx_BACK is what every other application expects for
> > 5.0/5.1 when reading a wav file which is where FFmpeg's channel layout comes
> > from, so this should be the "normal" case, and AV_CH_LAYOUT_5POINTx the
> > exception.
> 
> How is this relared to the channel_layout_map array?

How is it not related to it?
You suggested that we should not call two different channel layouts (one of them
very common - most common after stereo, I suppose - one them invalid, to use a
hard word) with the same name ("5.x"). You send a patch and I agreed before
reading the source again.
We should not give the "invalid" layout the short name, but the common layout
that other applications (including the relevant one for wav) expect.

...

> > -    { "5.0",         5,  AV_CH_LAYOUT_5POINT0 },
> > -    { "5.0(back)",   5,  AV_CH_LAYOUT_5POINT0_BACK },
> > -    { "5.1",         6,  AV_CH_LAYOUT_5POINT1 },
> > -    { "5.1(back)",   6,  AV_CH_LAYOUT_5POINT1_BACK },
> 
> > +    { "5.0(side)",   5,  AV_CH_LAYOUT_5POINT0 },
> > +    { "5.0",         5,  AV_CH_LAYOUT_5POINT0_BACK },
> 
> now this is totally confusing,

Why is "5.x"/"5.x(side)" (with "5.x" being what users want) more confusing than
"5.x"/"5.x(back)" (with "5.x(back)" being the intended case). Sorry, but I
honestly don't understand.

> what about:
> 
> { "5.0(side)",   5,  AV_CH_LAYOUT_5POINT0_SIDE },
> { "5.0(back)",   5,  AV_CH_LAYOUT_5POINT0_BACK },

How do users know which is the one they want?

> you can add a new macro AV_CH_LAYOUT_5POINT0_SIDE in place of 
> AV_CH_LAYOUT_5POINT0 (you can keep the old one and remove it at the
> next bump).

I don't disagree but this is completely unrelated (we had the not completely
intuitive API for long, and I am in principle against changing API if not
needed, so I believe we can leave it, but we should not introduce an UI that
misleads the user that is why the posted patch is important.)

Carl Eugen



More information about the ffmpeg-devel mailing list