[FFmpeg-devel] [RFC] Channel layouts

Peter Ross pross
Fri Aug 29 10:31:23 CEST 2008


On Fri, Aug 29, 2008 at 10:08:33AM +0200, Andreas ?man wrote:
> Benjamin Larsson wrote:
> > Peter Ross wrote:
> >> * Encoders will indicate their supported channel layouts in AVCodec, in the
> >>   same way we do for pixel and sample formats.
> >>   
> > Will this solve the channel order also ? So that transcode from 5.1 dca 
> > to ac3 will work ?
> 
> No, rather, the decoders have to be fixed to output/receive the channels
> in this fixed order.

The proposed approach avoids the complexity, but at the expense of having
to change existing codecs. This needs to be debated ;-)

> >> ------------------------------------------------------------------------
> >>
> >> +#define CHANNEL_LAYOUT_MONO     (1<<CHANNEL_FRONT_CENTER)
> >> +#define CHANNEL_LAYOUT_STEREO   ((1<<CHANNEL_FRONT_LEFT)|(1<<CHANNEL_FRONT_RIGHT))
> >> +#define CHANNEL_LAYOUT_QUAD     ((1<<CHANNEL_FRONT_LEFT)|(1<<CHANNEL_FRONT_RIGHT)| \
> >> +                                 (1<<CHANNEL_BACK_LEFT)|(1<<CHANNEL_BACK_RIGHT))
> >> +#define CHANNEL_LAYOUT_5POINT1  ((1<<CHANNEL_FRONT_LEFT)|(1<<CHANNEL_FRONT_RIGHT)| \
> >> +                                 (1<<CHANNEL_FRONT_CENTER)|(1<<CHANNEL_LOW_FREQUENCY)| \
> >> +                                 (1<<CHANNEL_BACK_LEFT)|(1<<CHANNEL_BACK_RIGHT))
> >>   
> > 
> > We will need alot more defines to cover all the cases available. DCA has 
> > alot of layouts. Anyway I think the codec should have the definitions 
> > for all possible layouts.
> 
> I believe these CHANNEL_LAYOUT_ -defines are just there for convenience.
> Codecs can assemble the bitmask any way they want to.

Yes.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- 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/19a4aa60/attachment.pgp>



More information about the ffmpeg-devel mailing list