[MPlayer-dev-eng] [PATCH] channel reordering for 6ch audio

Alexander 'Lazy Ranma' Ponyatikh ranma at 274.ru
Sat Jul 29 18:39:44 CEST 2006


Mplayer's support for 6 ch sound is crappy. The only thing that works
correctly is AC3 audio (at least with -ao dsound). Every codec
produces or requests channels in its own order, and mplayer almost
never reorders them. As result channels are often mixed up.

I made some research on channel ordering of various codecs and
drivers, and made some patches to make them correctly reorder channels
to/from mplayer default order. I took L R SL SR C LFE sequence as
mplayer default, since it's used by ad_liba52.c, af_hrtf.c,
ao_dsound.c.

ao_dsound.c
Native order:   L R C  LFE SL SR (windows default)
Expected input: L R SL SR  C LFE (mplayer default)
Driver correctly reorders channels

ao_pcm.c
Native order: L R C LFE SL SR (windows default)
Expected input: native
Reordering required

ad_faad.c
Native order: C L R  SL SR LFE
Output order: native
Reordering required

ad_liba52.c
Native order: L R SL SR C LFE converted from planar LFE L C R SL SR
(using MMX)
Output order: L R SL SR C LFE (mplayer default)
Codec correctly reoders channels

ad_libvorbis.c
Native order: unknown
Output order: native
I didn't find any standards for Vorbis, b/c many codecs differently
reorder channels. Even files encoded/decoded by the same tools got
their channel order completely mixed up.

ad_pcm.c
Native order: L R C LFE SL SR (windows default)
Output order: native
Reordering required

ae_lavc.c
Native order: L C R  SL SR LFE
Expected input: native
Reordering required

ae_pcm.c
Native order: L R C LFE SL SR (windows default)
Output order: native
Reordering required
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ao_pcm.c.diff
Type: application/octet-stream
Size: 740 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060729/b3aca1e5/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ae_lavc.c.diff
Type: application/octet-stream
Size: 779 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060729/b3aca1e5/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ae_pcm.c.diff
Type: application/octet-stream
Size: 950 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060729/b3aca1e5/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ad_faad.c.diff
Type: application/octet-stream
Size: 1287 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060729/b3aca1e5/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ad_pcm.c.diff
Type: application/octet-stream
Size: 1487 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060729/b3aca1e5/attachment-0004.obj>


More information about the MPlayer-dev-eng mailing list