[FFmpeg-devel] [RFC] Channel layouts
Justin Ruggles
justin.ruggles
Sun Sep 7 16:26:36 CEST 2008
M?ns Rullg?rd wrote:
> Peter Ross <pross at xvid.org> writes:
>
>> On Fri, Aug 29, 2008 at 10:21:28PM -0400, Justin Ruggles wrote:
>>> Peter Ross wrote:
>>>> On Fri, Aug 29, 2008 at 04:28:00PM +1000, Peter Ross wrote:
>>>>> Hi.
>>>>>
>>>>> This patch adds the notion of channel layouts to libavcodec.
>>>> [...]
>>> I think your solution works well for now. I am not 100% clear about how
>>> the encoders/decoders should handle unsupported or undefined layouts.
>>> Firstly, is the channel layout is guessed by default? If so, that would
>> At this stage, the guess function is used only for display purposes.
>[...]
>>>> +int64_t avcodec_guess_channel_layout(int nb_channels)
>>>> +{
>>>> + switch(nb_channels) {
>>>> + case 1: return CHANNEL_LAYOUT_MONO;
>>>> + case 2: return CHANNEL_LAYOUT_STEREO;
>>>> + case 4: return CHANNEL_LAYOUT_QUAD;
>>>> + case 6: return CHANNEL_LAYOUT_5POINT1;
>>>> + case 8: return CHANNEL_LAYOUT_7POINT1;
>>>> + default: return 0;
>>>> + }
>>>> +}
>>> Why not add 3 and 5 to the list? My vote would be for left/right/center
>>> and 5.0.
>
> 2.1 and 4.1 are equally, if not more, likely. I have such DVDs, but
> none with x.0 where x > 2.
Well, if it's only used for displaying the layout name, why not use
generic names if the layout is unspecified, like "3-channel" and
"5-channel"?
-Justin
More information about the ffmpeg-devel
mailing list