summaryrefslogtreecommitdiffstats
path: root/fdk-aac/libFDK/src/FDK_qmf_domain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fdk-aac/libFDK/src/FDK_qmf_domain.cpp')
-rw-r--r--fdk-aac/libFDK/src/FDK_qmf_domain.cpp49
1 files changed, 22 insertions, 27 deletions
diff --git a/fdk-aac/libFDK/src/FDK_qmf_domain.cpp b/fdk-aac/libFDK/src/FDK_qmf_domain.cpp
index 3245deb..77c5ca2 100644
--- a/fdk-aac/libFDK/src/FDK_qmf_domain.cpp
+++ b/fdk-aac/libFDK/src/FDK_qmf_domain.cpp
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten
+© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@@ -106,35 +106,31 @@ amm-info@iis.fraunhofer.de
#include "common_fix.h"
#define WORKBUFFER1_TAG 0
-#define WORKBUFFER2_TAG 1
-
#define WORKBUFFER3_TAG 4
#define WORKBUFFER4_TAG 5
-#define WORKBUFFER5_TAG 6
#define WORKBUFFER6_TAG 7
+#define WORKBUFFER7_TAG 8
C_ALLOC_MEM_OVERLAY(QmfWorkBufferCore1, FIXP_DBL, QMF_WB_SECTION_SIZE,
SECT_DATA_L1, WORKBUFFER1_TAG)
-C_ALLOC_MEM_OVERLAY(QmfWorkBufferCore2, FIXP_DBL, QMF_WB_SECTION_SIZE,
- SECT_DATA_L2, WORKBUFFER2_TAG)
C_ALLOC_MEM_OVERLAY(QmfWorkBufferCore3, FIXP_DBL, QMF_WB_SECTION_SIZE,
SECT_DATA_L2, WORKBUFFER3_TAG)
C_ALLOC_MEM_OVERLAY(QmfWorkBufferCore4, FIXP_DBL, QMF_WB_SECTION_SIZE,
SECT_DATA_L2, WORKBUFFER4_TAG)
-C_ALLOC_MEM_OVERLAY(QmfWorkBufferCore5, FIXP_DBL, QMF_WB_SECTION_SIZE,
- SECT_DATA_L2, WORKBUFFER5_TAG)
C_ALLOC_MEM_OVERLAY(QmfWorkBufferCore6, FIXP_DBL, QMF_WB_SECTION_SIZE,
SECT_DATA_L2, WORKBUFFER6_TAG)
+C_ALLOC_MEM_OVERLAY(QmfWorkBufferCore7, FIXP_DBL, QMF_WB_SECTION_SIZE,
+ SECT_DATA_L2, WORKBUFFER7_TAG)
/*! Analysis states buffer. <br>
Dimension: #((8) + (1)) */
-C_ALLOC_MEM2(AnaQmfStates, FIXP_QAS, 10 * QMF_DOMAIN_MAX_ANALYSIS_QMF_BANDS,
- ((8) + (1)))
+C_AALLOC_MEM2(AnaQmfStates, FIXP_DBL, 10 * QMF_DOMAIN_MAX_ANALYSIS_QMF_BANDS,
+ ((8) + (1)))
/*! Synthesis states buffer. <br>
Dimension: #((8) + (1)) */
-C_ALLOC_MEM2(SynQmfStates, FIXP_QSS, 9 * QMF_DOMAIN_MAX_SYNTHESIS_QMF_BANDS,
- ((8) + (1)))
+C_AALLOC_MEM2(SynQmfStates, FIXP_QSS, 9 * QMF_DOMAIN_MAX_SYNTHESIS_QMF_BANDS,
+ ((8) + (1)))
/*! Pointer to real qmf data for each time slot. <br>
Dimension: #((8) + (1)) */
@@ -156,18 +152,17 @@ C_AALLOC_MEM2(QmfOverlapBuffer, FIXP_DBL,
/*! Analysis states buffer. <br>
Dimension: #((8) + (1)) */
-C_ALLOC_MEM2(AnaQmfStates16, FIXP_QAS, 10 * QMF_DOMAIN_ANALYSIS_QMF_BANDS_16,
- ((8) + (1)))
-
+C_AALLOC_MEM2(AnaQmfStates16, FIXP_DBL, 10 * QMF_DOMAIN_ANALYSIS_QMF_BANDS_16,
+ ((8) + (1)))
/*! Analysis states buffer. <br>
Dimension: #((8) + (1)) */
-C_ALLOC_MEM2(AnaQmfStates24, FIXP_QAS, 10 * QMF_DOMAIN_ANALYSIS_QMF_BANDS_24,
- ((8) + (1)))
+C_AALLOC_MEM2(AnaQmfStates24, FIXP_DBL, 10 * QMF_DOMAIN_ANALYSIS_QMF_BANDS_24,
+ ((8) + (1)))
/*! Analysis states buffer. <br>
Dimension: #((8) + (1)) */
-C_ALLOC_MEM2(AnaQmfStates32, FIXP_QAS, 10 * QMF_DOMAIN_ANALYSIS_QMF_BANDS_32,
- ((8) + (1)))
+C_AALLOC_MEM2(AnaQmfStates32, FIXP_DBL, 10 * QMF_DOMAIN_ANALYSIS_QMF_BANDS_32,
+ ((8) + (1)))
/*! Pointer to real qmf data for each time slot. <br>
Dimension: #((8) + (1)) */
@@ -642,10 +637,10 @@ void FDK_QmfDomain_GetSlot(const HANDLE_FDK_QMF_DOMAIN_IN qd_ch, const int ts,
if (pQmfOutImag == NULL) {
for (; b < fMin(lsb, stop_band); b++) {
- pQmfOutReal[b] = scaleValue(real[b], lb_sf);
+ pQmfOutReal[b] = scaleValueSaturate(real[b], lb_sf);
}
for (; b < fMin(usb, stop_band); b++) {
- pQmfOutReal[b] = scaleValue(real[b], hb_sf);
+ pQmfOutReal[b] = scaleValueSaturate(real[b], hb_sf);
}
for (; b < stop_band; b++) {
pQmfOutReal[b] = (FIXP_DBL)0;
@@ -653,12 +648,12 @@ void FDK_QmfDomain_GetSlot(const HANDLE_FDK_QMF_DOMAIN_IN qd_ch, const int ts,
} else {
FDK_ASSERT(imag != NULL);
for (; b < fMin(lsb, stop_band); b++) {
- pQmfOutReal[b] = scaleValue(real[b], lb_sf);
- pQmfOutImag[b] = scaleValue(imag[b], lb_sf);
+ pQmfOutReal[b] = scaleValueSaturate(real[b], lb_sf);
+ pQmfOutImag[b] = scaleValueSaturate(imag[b], lb_sf);
}
for (; b < fMin(usb, stop_band); b++) {
- pQmfOutReal[b] = scaleValue(real[b], hb_sf);
- pQmfOutImag[b] = scaleValue(imag[b], hb_sf);
+ pQmfOutReal[b] = scaleValueSaturate(real[b], hb_sf);
+ pQmfOutImag[b] = scaleValueSaturate(imag[b], hb_sf);
}
for (; b < stop_band; b++) {
pQmfOutReal[b] = (FIXP_DBL)0;
@@ -950,7 +945,7 @@ QMF_DOMAIN_ERROR FDK_QmfDomain_Configure(HANDLE_FDK_QMF_DOMAIN hqd) {
if ((size > 4 * QMF_WB_SECTION_SIZE) && (pWorkBuffer[4] == NULL)) {
/* get work buffer of size QMF_WB_SECTION_SIZE */
- pWorkBuffer[4] = GetQmfWorkBufferCore5();
+ pWorkBuffer[4] = GetQmfWorkBufferCore7();
}
/* 8. distribute workbuffer over processing channels */
@@ -996,7 +991,7 @@ static void FDK_QmfDomain_FreeWorkBuffer(HANDLE_FDK_QMF_DOMAIN hqd) {
if (pWorkBuffer[1]) FreeQmfWorkBufferCore1(&pWorkBuffer[1]);
if (pWorkBuffer[2]) FreeQmfWorkBufferCore3(&pWorkBuffer[2]);
if (pWorkBuffer[3]) FreeQmfWorkBufferCore4(&pWorkBuffer[3]);
- if (pWorkBuffer[4]) FreeQmfWorkBufferCore5(&pWorkBuffer[4]);
+ if (pWorkBuffer[4]) FreeQmfWorkBufferCore7(&pWorkBuffer[4]);
}
void FDK_QmfDomain_FreeMem(HANDLE_FDK_QMF_DOMAIN hqd) {