[FFmpeg-devel] [RFC] Channel layouts

Peter Ross pross
Fri Aug 29 08:28:00 CEST 2008


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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layout-r1.diff
Type: text/x-diff
Size: 8386 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080829/0e369df0/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layout-riff.diff
Type: text/x-diff
Size: 615 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080829/0e369df0/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080829/0e369df0/attachment.pgp>



More information about the ffmpeg-devel mailing list