[FFmpeg-devel] [RFC] Channel layouts

Michael Niedermayer michaelni
Tue Oct 21 20:23:02 CEST 2008


On Tue, Sep 23, 2008 at 10:43:22PM +1000, Peter Ross wrote:
> On Sun, Sep 07, 2008 at 08:58:28PM +1000, Peter Ross wrote:
> > On Sat, Aug 30, 2008 at 11:05:43AM +1000, 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.
> > > 
> > > Patch updated. Thanks for the feedback.
> > 
> > Patch updated.
> 
> Patch updated.
[...]
> +/**
> + * Guess the channel layout
> + */
> +int64_t avcodec_guess_channel_layout(int nb_channels);

This should also take a codec_id and or container id/name/whatever

[...]
> +/* Audio channel convenience macros */
> +#define CHANNEL_LAYOUT_MONO              (CHANNEL_FRONT_CENTER)
> +#define CHANNEL_LAYOUT_STEREO            (CHANNEL_FRONT_LEFT|CHANNEL_FRONT_RIGHT)
> +#define CHANNEL_LAYOUT_SURROUND          (CHANNEL_FRONT_LEFT|CHANNEL_FRONT_RIGHT|\
> +                                          CHANNEL_FRONT_CENTER)
> +#define CHANNEL_LAYOUT_QUAD              (CHANNEL_FRONT_LEFT|CHANNEL_FRONT_RIGHT|\
> +                                          CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT)
> +#define CHANNEL_LAYOUT_5POINT0           (CHANNEL_FRONT_LEFT|CHANNEL_FRONT_RIGHT|\
> +                                          CHANNEL_FRONT_CENTER|\
> +                                          CHANNEL_SIDE_LEFT|CHANNEL_SIDE_RIGHT)
> +#define CHANNEL_LAYOUT_5POINT1           (CHANNEL_FRONT_LEFT|CHANNEL_FRONT_RIGHT|\
> +                                          CHANNEL_FRONT_CENTER|CHANNEL_LOW_FREQUENCY|\
> +                                          CHANNEL_SIDE_LEFT|CHANNEL_SIDE_RIGHT)
> +#define CHANNEL_LAYOUT_7POINT1           (CHANNEL_FRONT_LEFT|CHANNEL_FRONT_RIGHT|\
> +                                          CHANNEL_FRONT_CENTER|CHANNEL_LOW_FREQUENCY|\
> +                                          CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|\
> +                                          CHANNEL_SIDE_LEFT|CHANNEL_SIDE_RIGHT)
> +#define CHANNEL_LAYOUT_7POINT1_WIDE      (CHANNEL_FRONT_LEFT|CHANNEL_FRONT_RIGHT|\
> +                                          CHANNEL_FRONT_CENTER|CHANNEL_LOW_FREQUENCY|\
> +                                          CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|\
> +                                          CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER)
> +#define CHANNEL_LAYOUT_STEREO_DOWNMIX    (CHANNEL_STEREO_LEFT|CHANNEL_STEREO_RIGHT)

each of these could use the previous ones to simplify its define


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- 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/20081021/3cba0874/attachment.pgp>



More information about the ffmpeg-devel mailing list