[vlc-commits] [Git][videolan/vlc][master] 2 commits: faad/mpeg4audio: fix channels according to specs
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sun Oct 6 11:09:55 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
877d0593 by François Cartegnie at 2024-10-06T10:55:08+00:00
faad/mpeg4audio: fix channels according to specs
702b20b0e8802e73fe93ed5f8d27eb60d3cc410f has put 'sensible' defaults
into a 'guessed' table for FAAD2.
According to the spec, lots of channels ordering are wrong and the 8th
values does not exists.
- - - - -
bea0af00 by François Cartegnie at 2024-10-06T10:55:08+00:00
packetizer: mpeg4audio: rework channels definitions
- - - - -
1 changed file:
- modules/packetizer/mpeg4audio.h
Changes:
=====================================
modules/packetizer/mpeg4audio.h
=====================================
@@ -78,29 +78,36 @@ enum
AAC_PROFILE_MPEG2_HE = AAC_PROFILE_HE + 128,
};
-#define MPEG4_ASC_MAX_INDEXEDPOS 9
-
-static const uint32_t mpeg4_asc_channelsbyindex[MPEG4_ASC_MAX_INDEXEDPOS] =
+static const uint32_t mpeg4_asc_channelsbyindex[] =
{
- 0, /* Set later */
+ [0] = 0, /* Set later */
+
+ [1] = AOUT_CHAN_CENTER, // Mono
- AOUT_CHAN_CENTER, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
+ [2] = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT, // Stereo
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_LFE,
+ [3] = AOUT_CHAN_CENTER | AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT, // 2.1ch 3.0
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT,
+ [4] = AOUT_CHAN_CENTER | // 4ch 3.1
+ AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
+ AOUT_CHAN_REARCENTER,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT |
- AOUT_CHAN_CENTER,
+ [5] = AOUT_CHAN_CENTER | // 5ch 3.2
+ AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
+ AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT |
- AOUT_CHAN_CENTER | AOUT_CHAN_LFE,
+ [6] = AOUT_CHAN_CENTER | // 5.1ch 3.2.1
+ AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
+ AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT |
+ AOUT_CHAN_LFE,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_MIDDLELEFT |
- AOUT_CHAN_MIDDLERIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT |
- AOUT_CHAN_CENTER,
+ [7] = AOUT_CHAN_CENTER | // 7.1ch 5.2.1
+ AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
+ AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT |
+ AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT |
+ AOUT_CHAN_LFE,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_MIDDLELEFT |
- AOUT_CHAN_MIDDLERIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT |
- AOUT_CHAN_CENTER | AOUT_CHAN_LFE
+ [8] = 0,
};
+
+#define MPEG4_ASC_MAX_INDEXEDPOS ARRAY_SIZE(mpeg4_asc_channelsbyindex)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/103dc02a012b55e382207d8cdbd9a8d478c58d89...bea0af00e8029fa3bd4bcc8a767ceced871e6fc0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/103dc02a012b55e382207d8cdbd9a8d478c58d89...bea0af00e8029fa3bd4bcc8a767ceced871e6fc0
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list