[FFmpeg-devel] [RFC] Channel layouts

Andreas Öman andreas
Fri Aug 29 10:08:33 CEST 2008


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.

>> ------------------------------------------------------------------------
>>
>> +#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.





More information about the ffmpeg-devel mailing list