summaryrefslogtreecommitdiffstats
path: root/libSBRenc/src/ps_main.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2013-11-01 10:46:40 +0200
committerMartin Storsjo <martin@martin.st>2013-11-01 10:46:40 +0200
commit321233ee92e138f44294c7bb9a375eadad9d24fa (patch)
tree1de928ad26325302f64c56603157f50095dcf2b1 /libSBRenc/src/ps_main.cpp
parentfcb5f1b692cb8343de35e69f9084328c652cf690 (diff)
parentfa3eba16446cc8f2f5e2dfc20d86a49dbd37299e (diff)
downloadfdk-aac-dabplus-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.gz
fdk-aac-dabplus-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.bz2
fdk-aac-dabplus-321233ee92e138f44294c7bb9a375eadad9d24fa.zip
Merge remote-tracking branch 'aosp/kitkat-release' into kitkat-merge
Conflicts: libAACenc/src/quantize.cpp
Diffstat (limited to 'libSBRenc/src/ps_main.cpp')
-rw-r--r--libSBRenc/src/ps_main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libSBRenc/src/ps_main.cpp b/libSBRenc/src/ps_main.cpp
index bbab25a..ab183e2 100644
--- a/libSBRenc/src/ps_main.cpp
+++ b/libSBRenc/src/ps_main.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
@@ -227,6 +227,8 @@ FDK_PSENC_ERROR PSEnc_Init(
/* clear bs buffer */
FDKmemclear(hParametricStereo->psOut, sizeof(hParametricStereo->psOut));
+ hParametricStereo->psOut[0].enablePSHeader = 1; /* write ps header in first frame */
+
/* clear scaling buffer */
FDKmemclear(hParametricStereo->dynBandScale, sizeof(UCHAR)*PS_MAX_BANDS);
FDKmemclear(hParametricStereo->maxBandValue, sizeof(FIXP_QMF)*PS_MAX_BANDS);
@@ -313,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 */
@@ -398,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;
@@ -473,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<MAX_PS_CHANNELS; psCh ++) {
@@ -505,7 +505,7 @@ FDK_PSENC_ERROR FDKsbrEnc_PSEnc_ParametricStereoProcessing(
} /* for psCh */
- C_ALLOC_SCRATCH_END(pWorkBuffer, FIXP_DBL, QMF_CHANNELS*4);
+ C_AALLOC_SCRATCH_END(pWorkBuffer, FIXP_QMF, 4*QMF_CHANNELS)
/* find best scaling in new QMF and Hybrid data */
psFindBestScaling( hParametricStereo,