[FFmpeg-devel] [RFC] Channel layouts

Benjamin Larsson banan
Fri Aug 29 16:13:42 CEST 2008


Peter Ross wrote:
> Hi.
>
> This patch adds the notion of channel layouts to libavcodec.
>
> Summary of new concepts:
>
> * Channel IDs: We give each speaker a notional bit index.
>   e.g. CHANNEL_FRONT_LEFT=0, CHANNEL_FRONT_RIGHT=1, CHANNEL_BACK_CENTER=9
>
> * Channel Layout: An ORing together of Channel IDs.
>   e.g. ((1<<CHANNEL_FRONT_LEFT)|(1<<CHANNEL_FRONT_RIGHT))
>   The resulting layout is identical to the dwChannelMask value found in
>   WAVEFORMATEXTENSIBLE. A channel layout of zero implies 'no statement'.
>
> * Chanels are stored with the FFmpeg 'samples' array according to ID order
>   e.g. left comes before right.
>
> * Encoders will indicate their supported channel layouts in AVCodec, in the
>   same way we do for pixel and sample formats.
>
> -- Peter
> (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
>   

We also need to add a parameter to request the decoded channelmask. For 
example dca have 2 4 channel layouts. Without a requested channelmask it 
would only be possible to get 1 layout.

MvH
Benjamin Larsson






More information about the ffmpeg-devel mailing list