[FFmpeg-devel] [RFC] Channel layouts

Michael Niedermayer michaelni
Tue Nov 4 13:45:46 CET 2008


On Tue, Nov 04, 2008 at 05:23:12PM +1100, Peter Ross wrote:
> On Sun, Nov 02, 2008 at 12:07:18AM +0100, Michael Niedermayer wrote:
> > 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
> 
> Fair enough. I have remvoed the MS API fixup from the patch.

patch ok

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

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- 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/20081104/ea8bdab2/attachment.pgp>



More information about the ffmpeg-devel mailing list