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

Stefano Sabatini stefano.sabatini-lala at poste.it
Thu Aug 25 02:10:29 CEST 2011


On date Wednesday 2011-08-24 23:35:48 +0200, Carl Eugen Hoyos encoded:
> Hi!
> 
> Sorry for this late patch.
> 

> 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?

> I will apply if nobody objects, Carl Eugen

> diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c
> index 6e8649d..61dd6f3 100644
> --- a/libavutil/audioconvert.c
> +++ b/libavutil/audioconvert.c
> @@ -51,10 +51,10 @@ static const struct {
>      { "stereo",      2,  AV_CH_LAYOUT_STEREO },
>      { "4.0",         4,  AV_CH_LAYOUT_4POINT0 },
>      { "quad",        4,  AV_CH_LAYOUT_QUAD },
> -    { "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, what about:

{ "5.0(side)",   5,  AV_CH_LAYOUT_5POINT0_SIDE },
{ "5.0(back)",   5,  AV_CH_LAYOUT_5POINT0_BACK },
...

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).
-- 
FFmpeg = Fundamental Fast Marvellous Philosophical Enigmatic Gem


More information about the ffmpeg-devel mailing list