diff options
author | Martin Storsjo <martin@martin.st> | 2014-11-07 09:32:48 +0200 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2014-11-07 09:32:48 +0200 |
commit | 6ccecbc4b0dfca00f13999aa41b2c56f6b55a72f (patch) | |
tree | da3cf1b27c50bd6d81be8b0183f494d15539027a /libMpegTPEnc | |
parent | ce1863444a9e1d825c53bb3929f0b8fe664a6464 (diff) | |
parent | d149516e1a3a63549d2c654b1398544d5de46a3e (diff) | |
download | fdk-aac-6ccecbc4b0dfca00f13999aa41b2c56f6b55a72f.tar.gz fdk-aac-6ccecbc4b0dfca00f13999aa41b2c56f6b55a72f.tar.bz2 fdk-aac-6ccecbc4b0dfca00f13999aa41b2c56f6b55a72f.zip |
Merge remote-tracking branch 'aosp/master'
Diffstat (limited to 'libMpegTPEnc')
-rw-r--r-- | libMpegTPEnc/include/tp_data.h | 20 | ||||
-rw-r--r-- | libMpegTPEnc/src/version | 2 |
2 files changed, 16 insertions, 6 deletions
diff --git a/libMpegTPEnc/include/tp_data.h b/libMpegTPEnc/include/tp_data.h index 5269858..c6e89b5 100644 --- a/libMpegTPEnc/include/tp_data.h +++ b/libMpegTPEnc/include/tp_data.h @@ -146,12 +146,15 @@ typedef struct UCHAR FrontElementIsCpe[PC_FSB_CHANNELS_MAX]; UCHAR FrontElementTagSelect[PC_FSB_CHANNELS_MAX]; + UCHAR FrontElementHeightInfo[PC_FSB_CHANNELS_MAX]; UCHAR SideElementIsCpe[PC_FSB_CHANNELS_MAX]; UCHAR SideElementTagSelect[PC_FSB_CHANNELS_MAX]; + UCHAR SideElementHeightInfo[PC_FSB_CHANNELS_MAX]; UCHAR BackElementIsCpe[PC_FSB_CHANNELS_MAX]; UCHAR BackElementTagSelect[PC_FSB_CHANNELS_MAX]; + UCHAR BackElementHeightInfo[PC_FSB_CHANNELS_MAX]; UCHAR LfeElementTagSelect[PC_LFE_CHANNELS_MAX]; @@ -324,16 +327,23 @@ int getSamplingRateIndex( UINT samplingRate ) */ static inline int getNumberOfTotalChannels(int channelConfig) { - if (channelConfig > 0 && channelConfig < 8) - return (channelConfig == 7)?8:channelConfig; - else + switch (channelConfig) { + case 1: case 2: case 3: + case 4: case 5: case 6: + return channelConfig; + case 7: case 12: case 14: + return 8; + case 11: + return 7; + default: return 0; + } } static inline int getNumberOfEffectiveChannels(const int channelConfig) -{ - const int n[] = {0,1,2,3,4,5,5,7}; +{ /* index: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 */ + const int n[] = {0,1,2,3,4,5,5,7,0,0, 0, 6, 7, 0, 7, 0}; return n[channelConfig]; } diff --git a/libMpegTPEnc/src/version b/libMpegTPEnc/src/version index 2803347..cda01c8 100644 --- a/libMpegTPEnc/src/version +++ b/libMpegTPEnc/src/version @@ -2,7 +2,7 @@ /* library info */ #define TP_LIB_VL0 2 #define TP_LIB_VL1 3 -#define TP_LIB_VL2 3 +#define TP_LIB_VL2 4 #define TP_LIB_TITLE "MPEG Transport" #define TP_LIB_BUILD_DATE __DATE__ #define TP_LIB_BUILD_TIME __TIME__ |