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/adj_thr.cpp | |
parent | 9f455bea1c38f7275a65ab79be2d41a34428fb8b (diff) | |
download | ODR-AudioEnc-fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e.tar.gz ODR-AudioEnc-fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e.tar.bz2 ODR-AudioEnc-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/adj_thr.cpp')
-rw-r--r-- | libAACenc/src/adj_thr.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/libAACenc/src/adj_thr.cpp b/libAACenc/src/adj_thr.cpp index 0bd5827..6433633 100644 --- a/libAACenc/src/adj_thr.cpp +++ b/libAACenc/src/adj_thr.cpp @@ -1137,12 +1137,12 @@ the difference can be distributed among the scale factor bands. New thresholds can be derived from this pe-difference *****************************************************************************/ static void FDKaacEnc_correctThresh(CHANNEL_MAPPING* cm, - QC_OUT_ELEMENT* qcElement[(6)], - PSY_OUT_ELEMENT* psyOutElement[(6)], - UCHAR ahFlag[(6)][(2)][MAX_GROUPED_SFB], - FIXP_DBL thrExp[(6)][(2)][MAX_GROUPED_SFB], - const FIXP_DBL redVal[(6)], - const SCHAR redValScaling[(6)], + QC_OUT_ELEMENT* qcElement[(8)], + PSY_OUT_ELEMENT* psyOutElement[(8)], + UCHAR ahFlag[(8)][(2)][MAX_GROUPED_SFB], + FIXP_DBL thrExp[(8)][(2)][MAX_GROUPED_SFB], + const FIXP_DBL redVal[(8)], + const SCHAR redValScaling[(8)], const INT deltaPe, const INT processElements, const INT elementOffset) @@ -1153,8 +1153,8 @@ static void FDKaacEnc_correctThresh(CHANNEL_MAPPING* cm, PE_CHANNEL_DATA *peChanData; FIXP_DBL thrFactorLdData; FIXP_DBL sfbEnLdData, sfbThrLdData, sfbThrReducedLdData; - FIXP_DBL *sfbPeFactorsLdData[(6)][(2)]; - FIXP_DBL sfbNActiveLinesLdData[(6)][(2)][MAX_GROUPED_SFB]; + FIXP_DBL *sfbPeFactorsLdData[(8)][(2)]; + FIXP_DBL sfbNActiveLinesLdData[(8)][(2)][MAX_GROUPED_SFB]; INT normFactorInt; FIXP_DBL normFactorLdData; @@ -1308,9 +1308,9 @@ static void FDKaacEnc_correctThresh(CHANNEL_MAPPING* cm, reducing minSnr *****************************************************************************/ void FDKaacEnc_reduceMinSnr(CHANNEL_MAPPING* cm, - QC_OUT_ELEMENT* qcElement[(6)], - PSY_OUT_ELEMENT* psyOutElement[(6)], - UCHAR ahFlag[(6)][(2)][MAX_GROUPED_SFB], + QC_OUT_ELEMENT* qcElement[(8)], + PSY_OUT_ELEMENT* psyOutElement[(8)], + UCHAR ahFlag[(8)][(2)][MAX_GROUPED_SFB], const INT desiredPe, INT* redPeGlobal, const INT processElements, @@ -1410,10 +1410,10 @@ bail: bands have to be quantized to zero *****************************************************************************/ static void FDKaacEnc_allowMoreHoles(CHANNEL_MAPPING* cm, - QC_OUT_ELEMENT* qcElement[(6)], - PSY_OUT_ELEMENT* psyOutElement[(6)], - ATS_ELEMENT* AdjThrStateElement[(6)], - UCHAR ahFlag[(6)][(2)][MAX_GROUPED_SFB], + QC_OUT_ELEMENT* qcElement[(8)], + PSY_OUT_ELEMENT* psyOutElement[(8)], + ATS_ELEMENT* AdjThrStateElement[(8)], + UCHAR ahFlag[(8)][(2)][MAX_GROUPED_SFB], const INT desiredPe, const INT currentPe, const int processElements, @@ -1645,17 +1645,17 @@ functionname: FDKaacEnc_adaptThresholdsToPe description: two guesses for the reduction value and one final correction of the thresholds *****************************************************************************/ static void FDKaacEnc_adaptThresholdsToPe(CHANNEL_MAPPING* cm, - ATS_ELEMENT* AdjThrStateElement[(6)], - QC_OUT_ELEMENT* qcElement[(6)], - PSY_OUT_ELEMENT* psyOutElement[(6)], + ATS_ELEMENT* AdjThrStateElement[(8)], + QC_OUT_ELEMENT* qcElement[(8)], + PSY_OUT_ELEMENT* psyOutElement[(8)], const INT desiredPe, const INT processElements, const INT elementOffset) { - FIXP_DBL redValue[(6)]; - SCHAR redValScaling[(6)]; - UCHAR pAhFlag[(6)][(2)][MAX_GROUPED_SFB]; - FIXP_DBL pThrExp[(6)][(2)][MAX_GROUPED_SFB]; + FIXP_DBL redValue[(8)]; + SCHAR redValScaling[(8)]; + UCHAR pAhFlag[(8)][(2)][MAX_GROUPED_SFB]; + FIXP_DBL pThrExp[(8)][(2)][MAX_GROUPED_SFB]; int iter; INT constPartGlobal, noRedPeGlobal, nActiveLinesGlobal, redPeGlobal; @@ -2219,7 +2219,7 @@ description: initialize ADJ_THR_STATE void FDKaacEnc_AdjThrInit( ADJ_THR_STATE *hAdjThr, const INT meanPe, - ELEMENT_BITS *elBits[(6)], + ELEMENT_BITS *elBits[(8)], INT invQuant, INT nElements, INT nChannelsEff, @@ -2540,10 +2540,10 @@ void FDKaacEnc_DistributeBits(ADJ_THR_STATE *adjThrState, functionname: FDKaacEnc_AdjustThresholds description: adjust thresholds *****************************************************************************/ -void FDKaacEnc_AdjustThresholds(ATS_ELEMENT* AdjThrStateElement[(6)], - QC_OUT_ELEMENT* qcElement[(6)], +void FDKaacEnc_AdjustThresholds(ATS_ELEMENT* AdjThrStateElement[(8)], + QC_OUT_ELEMENT* qcElement[(8)], QC_OUT* qcOut, - PSY_OUT_ELEMENT* psyOutElement[(6)], + PSY_OUT_ELEMENT* psyOutElement[(8)], INT CBRbitrateMode, CHANNEL_MAPPING* cm) { @@ -2620,7 +2620,7 @@ void FDKaacEnc_AdjThrClose(ADJ_THR_STATE** phAdjThr) ADJ_THR_STATE* hAdjThr = *phAdjThr; if (hAdjThr!=NULL) { - for (i=0; i<(6); i++) { + for (i=0; i<(8); i++) { if (hAdjThr->adjThrStateElem[i]!=NULL) { FreeRam_aacEnc_AdjThrStateElement(&hAdjThr->adjThrStateElem[i]); } |