interleave: interleave samples following the Default Channel Ordering
authorAntonio Ospite <ao2@ao2.it>
Tue, 23 Sep 2014 08:48:09 +0000 (10:48 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 2 Oct 2014 07:21:26 +0000 (10:21 +0300)
commit7ae7f657fae542f06ba4c22d65a2084f5a4a3a5d
treeab19ebd96ae62998aa1fbe83b3c8a308c56240d6
parent7729f4ce81580df72e03e509966651eebb092d81
interleave: interleave samples following the Default Channel Ordering

In order to have a full mapping between channel positions in the audio
stream and loudspeaker positions, the channel-mask alone is not enough:
the channels must be interleaved following some Default Channel Ordering
as mentioned in the WAVEFORMATEXTENSIBLE[1] specification.

As a Default Channel Ordering use the one implied by
GstAudioChannelPosition which follows the ordering defined in SMPTE
2036-2-2008[2].

NOTE that the relative order in the Top Layer is not exactly the same as
the one from the WAVEFORMATEXTENSIBLE[1] specification; let's hope users
using so may channels are already aware of such discrepancies.

[1] http://msdn.microsoft.com/en-us/library/windows/hardware/dn653308%28v=vs.85%29.aspx
[2] http://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BS.2159-2-2011-PDF-E.pdf

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=737127
gst/interleave/interleave.c
gst/interleave/interleave.h