From 3aec97e388e29a1d03f0197b27b893bc6aaf8ac3 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Thu, 29 Aug 2013 12:24:04 -0700 Subject: Encoder downsampled SBR * AAC-Encoder - Introduce optional AACENC_SBR_RATIO encoder API parameter to configure dualrate or downsampled SBR explicitely. ELD makes use of downsampled SBR in default configuration. Modified file(s): documentation\aacEncoder.pdf libAACenc\include\aacenc_lib.h libAACenc\src\aacenc.h libAACenc\src\aacenc_lib.cpp * SBR-Encoder - Implement downsampled SBR feature. - Revise sbr tuning parameter selection. Modified file(s): libSBRenc\include\sbr_encoder.h libSBRenc\src\bit_sbr.h libSBRenc\src\env_est.cpp libSBRenc\src\mh_det.cpp libSBRenc\src\nf_est.cpp libSBRenc\src\ps_main.cpp libSBRenc\src\sbr.h libSBRenc\src\sbr_def.h libSBRenc\src\sbr_encoder.cpp libSBRenc\src\sbr_rom.cpp libSBRenc\src\sbr_rom.h libSBRenc\src\sbrenc_freq_sca.cpp libSBRenc\src\sbrenc_freq_sca.h libSBRenc\src\ton_corr.cpp Bug 9428126 Change-Id: I731720a10829272acaaf70b84525df00a09ff3d2 --- libSBRenc/src/ps_main.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libSBRenc/src/ps_main.cpp') diff --git a/libSBRenc/src/ps_main.cpp b/libSBRenc/src/ps_main.cpp index 76b759a..ab183e2 100644 --- a/libSBRenc/src/ps_main.cpp +++ b/libSBRenc/src/ps_main.cpp @@ -315,7 +315,7 @@ static FDK_PSENC_ERROR DownmixPSQmfData( } else { int n, k; - C_ALLOC_SCRATCH_START(pWorkBuffer, FIXP_QMF, QMF_CHANNELS*2); + C_AALLOC_SCRATCH_START(pWorkBuffer, FIXP_QMF, 2*QMF_CHANNELS) /* define scalings */ int dynQmfScale = fixMax(0, hParametricStereo->dmxScale-1); /* scale one bit more for addition of left and right */ @@ -400,8 +400,7 @@ static FDK_PSENC_ERROR DownmixPSQmfData( *qmfScale = -downmixScale + 7; - C_ALLOC_SCRATCH_END(pWorkBuffer, FIXP_QMF, QMF_CHANNELS*2); - + C_AALLOC_SCRATCH_END(pWorkBuffer, FIXP_QMF, 2*QMF_CHANNELS) { const INT noQmfSlots2 = hParametricStereo->noQmfSlots>>1; @@ -475,10 +474,9 @@ FDK_PSENC_ERROR FDKsbrEnc_PSEnc_ParametricStereoProcessing( ) { FDK_PSENC_ERROR error = PSENC_OK; - INT noQmfBands = hParametricStereo->noQmfBands; INT psQmfScale[MAX_PS_CHANNELS] = {0}; int psCh, i; - C_ALLOC_SCRATCH_START(pWorkBuffer, FIXP_DBL, QMF_CHANNELS*4); + C_AALLOC_SCRATCH_START(pWorkBuffer, FIXP_QMF, 4*QMF_CHANNELS) for (psCh = 0; psCh