[FFmpeg-devel] [RFC] Channel layouts

Michael Niedermayer michaelni
Sun Nov 2 00:07:18 CET 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.
> 
> -- Peter
> (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)

[...]

> Index: libavformat/riff.c
> ===================================================================
> --- libavformat/riff.c	(revision 15391)
> +++ libavformat/riff.c	(working copy)
> @@ -213,6 +213,10 @@
>      { 0, 0 },
>  };
>  
> +#define RIFF_SPEAKER_5POINT1_INCORRECT  (CHANNEL_FRONT_LEFT|CHANNEL_FRONT_RIGHT|\
> +                                         CHANNEL_FRONT_CENTER|CHANNEL_LOW_FREQUENCY|\
> +                                         CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT)
> +
>  #ifdef CONFIG_MUXERS
>  offset_t start_tag(ByteIOContext *pb, const char *tag)
>  {
> @@ -373,7 +377,11 @@
>          cbSize = FFMIN(size, cbSize);
>          if (cbSize >= 22 && id == 0xfffe) { /* WAVEFORMATEXTENSIBLE */
>              codec->bits_per_coded_sample = get_le16(pb);
> -            get_le32(pb); /* dwChannelMask */
> +            codec->channel_layout = get_le32(pb); /* dwChannelMask */
> +            /* Compensate for incorrect 5.1 configurations.
> +               See: http://msdn.microsoft.com/en-us/library/aa474707.aspx */
> +            if (codec->channel_layout == RIFF_SPEAKER_5POINT1_INCORRECT)
> +                codec->channel_layout = CHANNEL_LAYOUT_5POINT1;

the text linked seems to be about MS APIs, these may be related to RIFF but
then this is not clear ...
Besides this would make storing 5p1 with back channels impossible

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

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- 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/20081102/1ac0f178/attachment.pgp>



More information about the ffmpeg-devel mailing list