diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2013-08-29 16:05:22 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2013-09-03 14:19:38 -0700 |
commit | fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e (patch) | |
tree | 287cfbd64295aa61b5e6534d5e28797c0a04ccd8 /libAACenc/src/aacenc_lib.cpp | |
parent | 9f455bea1c38f7275a65ab79be2d41a34428fb8b (diff) | |
download | fdk-aac-fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e.tar.gz fdk-aac-fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e.tar.bz2 fdk-aac-fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e.zip |
Encoder 7.1 support
* AAC-Encoder
- Add 7.1 rear surround and 7.1 front center support to supported encoder
channel modes. Change max channels from 6 to 8 and add 7.1 configuration
to bandwidth and channel mapping functions.
Modified file(s):
libAACenc\include\aacenc_lib.h
libAACenc\src\aacEnc_ram.cpp
libAACenc\src\aacEnc_ram.h
libAACenc\src\aacenc.cpp
libAACenc\src\aacenc.h
libAACenc\src\aacenc_lib.cpp
libAACenc\src\adj_thr.cpp
libAACenc\src\adj_thr.h
libAACenc\src\adj_thr_data.h
libAACenc\src\bandwidth.cpp
libAACenc\src\bitenc.cpp
libAACenc\src\channel_map.cpp
libAACenc\src\interface.h
libAACenc\src\metadata_compressor.cpp
libAACenc\src\psy_main.cpp
libAACenc\src\psy_main.h
libAACenc\src\qc_data.h
libAACenc\src\qc_main.cpp
libAACenc\src\qc_main.h
* SBR-Encoder
- Support up to 7.1 audio channels. Changed max channels from 6 to 8.
Modified file(s):
libSBRenc\include\sbr_encoder.h
libSBRenc\src\sbr.h
libSBRenc\src\sbr_encoder.cpp
libSBRenc\src\sbr_ram.cpp
* Transport-Encoder
- Add 7.1 channel configuration to audio specific config writer in
transport encoder library.
Modified file(s):
libMpegTPEnc\src\tpenc_asc.cpp
libMpegTPEnc\src\version
* SYS-Library
- Add 7.1 channel modes to CHANNEL_MODE description.
Modified file(s):
libSYS\include\FDK_audio.h
libSYS\src\genericStds.cpp
Bug 9428126
Change-Id: Ide53583aa8e03df4537b98db80740dfe0e7a9e0f
Diffstat (limited to 'libAACenc/src/aacenc_lib.cpp')
-rw-r--r-- | libAACenc/src/aacenc_lib.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp index 056958b..49f8225 100644 --- a/libAACenc/src/aacenc_lib.cpp +++ b/libAACenc/src/aacenc_lib.cpp @@ -98,7 +98,7 @@ amm-info@iis.fraunhofer.de /* Encoder library info */ #define AACENCODER_LIB_VL0 3 #define AACENCODER_LIB_VL1 4 -#define AACENCODER_LIB_VL2 11 +#define AACENCODER_LIB_VL2 12 #define AACENCODER_LIB_TITLE "AAC Encoder" #define AACENCODER_LIB_BUILD_DATE __DATE__ #define AACENCODER_LIB_BUILD_TIME __TIME__ @@ -215,8 +215,8 @@ struct AACENCODER AACENC_EXT_PAYLOAD extPayload [MAX_TOTAL_EXT_PAYLOADS]; /* Extension payload */ - UCHAR extPayloadData [(1)][(6)][MAX_PAYLOAD_SIZE]; - UINT extPayloadSize [(1)][(6)]; /* payload sizes in bits */ + UCHAR extPayloadData [(1)][(8)][MAX_PAYLOAD_SIZE]; + UINT extPayloadSize [(1)][(8)]; /* payload sizes in bits */ ULONG InitFlags; /* internal status to treggier re-initialization */ @@ -699,8 +699,8 @@ INT aacEncoder_LimitBitrate( /* Find total bitrate which provides valid configuration for each SBR element. */ do { int e; - SBR_ELEMENT_INFO sbrElInfo[(6)]; - FDK_ASSERT(cm.nElements <= (6)); + SBR_ELEMENT_INFO sbrElInfo[(8)]; + FDK_ASSERT(cm.nElements <= (8)); initialBitrate = adjustedBitrate; @@ -1061,7 +1061,7 @@ static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, ((InitFlags & AACENC_INIT_CONFIG) || (InitFlags & AACENC_INIT_STATES)) ) { INT sbrError; - SBR_ELEMENT_INFO sbrElInfo[(6)]; + SBR_ELEMENT_INFO sbrElInfo[(8)]; CHANNEL_MAPPING channelMapping; if ( FDKaacEnc_InitChannelMapping(hAacConfig->channelMode, @@ -1072,7 +1072,7 @@ static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, } /* Check return value and if the SBR encoder can handle enough elements */ - if (channelMapping.nElements > (6)) { + if (channelMapping.nElements > (8)) { return AACENC_INIT_ERROR; } @@ -1249,8 +1249,8 @@ AACENC_ERROR aacEncOpen( /* Determine max channel configuration. */ if (maxChannels==0) { - hAacEncoder->nMaxAacChannels = (6); - hAacEncoder->nMaxSbrChannels = (6); + hAacEncoder->nMaxAacChannels = (8); + hAacEncoder->nMaxSbrChannels = (8); } else { hAacEncoder->nMaxAacChannels = (maxChannels&0x00FF); @@ -1258,15 +1258,15 @@ AACENC_ERROR aacEncOpen( hAacEncoder->nMaxSbrChannels = (maxChannels&0xFF00) ? (maxChannels>>8) : hAacEncoder->nMaxAacChannels; } - if ( (hAacEncoder->nMaxAacChannels>(6)) || (hAacEncoder->nMaxSbrChannels>(6)) ) { + if ( (hAacEncoder->nMaxAacChannels>(8)) || (hAacEncoder->nMaxSbrChannels>(8)) ) { err = AACENC_INVALID_CONFIG; goto bail; } } /* maxChannels==0 */ /* Max number of elements could be tuned any more. */ - hAacEncoder->nMaxAacElements = fixMin((6), hAacEncoder->nMaxAacChannels); - hAacEncoder->nMaxSbrElements = fixMin((6), hAacEncoder->nMaxSbrChannels); + hAacEncoder->nMaxAacElements = fixMin((8), hAacEncoder->nMaxAacChannels); + hAacEncoder->nMaxSbrElements = fixMin((8), hAacEncoder->nMaxSbrChannels); hAacEncoder->nMaxSubFrames = (1); @@ -1595,7 +1595,7 @@ AACENC_ERROR aacEncEncode( } else { /* Add SBR extension payload */ - for (i = 0; i < (6); i++) { + for (i = 0; i < (8); i++) { if (hAacEncoder->extPayloadSize[nPayload][i] > 0) { hAacEncoder->extPayload[nExtensions].pData = hAacEncoder->extPayloadData[nPayload][i]; { @@ -1850,7 +1850,7 @@ AACENC_ERROR aacEncoder_SetParam( } if ( (pConfig->nElements > hAacEncoder->nMaxAacElements) || (pConfig->nChannelsEff > hAacEncoder->nMaxAacChannels) - || !((value>=1) && (value<=6)) + || !(((value>=1) && (value<=7))||((value>=33) && (value<=34))) ) { err = AACENC_INVALID_CONFIG; |