[FFmpeg-devel] [RFC] Channel layouts

Robert Swain robert.swain
Mon Sep 8 10:13:44 CEST 2008


2008/9/8 Robert Swain <robert.swain at gmail.com>:
> 2008/9/7 M?ns Rullg?rd <mans at mansr.com>:
>> Peter Ross <pross at xvid.org> writes:
>>
>>> On Fri, Aug 29, 2008 at 10:21:28PM -0400, Justin Ruggles wrote:
>>>> Peter Ross wrote:
>>>> > +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.
>
> I agree with M?ns on this one. 2.1 and 4.1 would be better choices in
> my opinion.

Actually, now I'm not so sure. I was thinking in terms of end user
speaker configurations rather than channel layouts in codecs. Justin's
point about just giving them generic names based on the numbers of
channels (as this is all they are...) would make more sense as there
is the ambiguity of 4.1 versus 5.0 for example.

Rob



More information about the ffmpeg-devel mailing list