diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2013-12-27 16:13:22 -0800 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2013-12-30 09:40:08 -0800 |
commit | 47c680c62246594107da0a8995c953dfb8040bce (patch) | |
tree | 9d9b3691d83d8f99de0c066cb271d41977c13457 /libMpegTPDec/include | |
parent | fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e (diff) | |
download | fdk-aac-dabplus-47c680c62246594107da0a8995c953dfb8040bce.tar.gz fdk-aac-dabplus-47c680c62246594107da0a8995c953dfb8040bce.tar.bz2 fdk-aac-dabplus-47c680c62246594107da0a8995c953dfb8040bce.zip |
AAC Decoder: support 6.1/7.1 decoded as 5.1
- Add 6.1 and 7.1 channel support including downmixer. Per default the
decoder creates a 5.1 channel output for all streams with more than six
encoded channels.
Modified file(s):
libPCMutils/include/pcmutils_lib.h
libPCMutils/src/pcmutils_lib.cpp
libAACdec/include/aacdecoder_lib.h
libAACdec/src/aac_rom.h
libAACdec/src/aacdecoder.cpp
libAACdec/src/aac_ram.cpp
libAACdec/src/aacdec_drc.cpp
libAACdec/src/aacdecoder_lib.cpp
libAACdec/src/aac_rom.cpp
libAACdec/src/aacdecoder.h
libSBRdec/include/sbrdecoder.h
libSBRdec/src/sbrdec_drc.h
libSBRdec/src/sbrdecoder.cpp
libSBRdec/src/sbr_ram.cpp
libSBRdec/src/sbr_ram.h
libMpegTPDec/include/tp_data.h
libMpegTPDec/include/tpdec_lib.h
libMpegTPDec/src/version
libMpegTPDec/src/tpdec_asc.cpp
libMpegTPEnc/include/tp_data.h
libMpegTPEnc/src/version
libSYS/include/FDK_audio.h
libSYS/src/genericStds.cpp
- Fix error concealment modules fade-out/in mechanism.
Modified file(s):
libAACdec/src/conceal.cpp
Bug 9428126
Change-Id: I3230bd2072314b730911cd7ec1740e290cb1d254
Diffstat (limited to 'libMpegTPDec/include')
-rw-r--r-- | libMpegTPDec/include/tp_data.h | 20 | ||||
-rw-r--r-- | libMpegTPDec/include/tpdec_lib.h | 17 |
2 files changed, 27 insertions, 10 deletions
diff --git a/libMpegTPDec/include/tp_data.h b/libMpegTPDec/include/tp_data.h index 5269858..c6e89b5 100644 --- a/libMpegTPDec/include/tp_data.h +++ b/libMpegTPDec/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/libMpegTPDec/include/tpdec_lib.h b/libMpegTPDec/include/tpdec_lib.h index fb4c41d..2ad397d 100644 --- a/libMpegTPDec/include/tpdec_lib.h +++ b/libMpegTPDec/include/tpdec_lib.h @@ -151,6 +151,7 @@ typedef enum { #define PC_ASSOCDATA_MAX 8 #define PC_CCEL_MAX 16 /* CC elements */ #define PC_COMMENTLENGTH 256 +#define PC_NUM_HEIGHT_LAYER 3 /*! @@ -239,14 +240,20 @@ int CProgramConfig_LookupElement( ); /** - * \brief Get table of elements in canonical order. - * \param pPce A valid program config structure. - * \param table An array where the element IDs are stored. - * \return Total element count including all SCE, CPE and LFE. + * \brief Get table of elements in canonical order from a + * give program config field. + * \param pPce A valid program config structure. + * \param table An array where the element IDs are stored. + * \param elListSize The length of the table array. + * \param pChMapIdx Pointer to a field receiving the corresponding + * implicit channel configuration index of the given + * PCE. If none can be found it receives the value 0. + * \return Total element count including all SCE, CPE and LFE. */ int CProgramConfig_GetElementTable( const CProgramConfig *pPce, MP4_ELEMENT_ID table[], - const INT elListSize ); + const INT elListSize, + UCHAR *pChMapIdx ); /** * \brief Initialize a given AudioSpecificConfig structure. |