aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2019-12-19 17:27:40 +0100
committerJean-Michel Trivi <jmtrivi@google.com>2020-02-14 10:44:10 -0800
commit90c29e0808d2221ae747bad7385036c20b5662b0 (patch)
treed178b4944104787e25e81e88a9109b02ce8da683
parent548244319396da7ed6a5601e6cfed0fcd946413a (diff)
downloadfdk-aac-90c29e0808d2221ae747bad7385036c20b5662b0.tar.gz
fdk-aac-90c29e0808d2221ae747bad7385036c20b5662b0.tar.bz2
fdk-aac-90c29e0808d2221ae747bad7385036c20b5662b0.zip
Revise memory overlay usage and remove deprecated buffers and overlay tags.
Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I7aea2898a3c49e06209fae89d734939c100e1184
-rw-r--r--libAACdec/src/aac_ram.cpp10
-rw-r--r--libAACdec/src/aac_ram.h7
-rw-r--r--libFDK/include/FDK_qmf_domain.h3
-rw-r--r--libFDK/src/FDK_qmf_domain.cpp14
-rw-r--r--libSBRdec/src/sbr_ram.cpp5
5 files changed, 9 insertions, 30 deletions
diff --git a/libAACdec/src/aac_ram.cpp b/libAACdec/src/aac_ram.cpp
index e13167d..aa8f6a6 100644
--- a/libAACdec/src/aac_ram.cpp
+++ b/libAACdec/src/aac_ram.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
@@ -105,12 +105,7 @@ amm-info@iis.fraunhofer.de
#define WORKBUFFER1_TAG 0
#define WORKBUFFER2_TAG 1
-
-#define WORKBUFFER3_TAG 4
-#define WORKBUFFER4_TAG 5
-
#define WORKBUFFER5_TAG 6
-
#define WORKBUFFER6_TAG 7
/*! The structure AAC_DECODER_INSTANCE is the top level structure holding all
@@ -169,9 +164,6 @@ C_ALLOC_MEM2(TimeDataFlush, INT_PCM, TIME_DATA_FLUSH_SIZE, (8))
C_ALLOC_MEM_OVERLAY(WorkBufferCore2, FIXP_DBL, ((8) * 1024), SECT_DATA_L2,
WORKBUFFER2_TAG)
-C_ALLOC_MEM_OVERLAY(WorkBufferCore3, FIXP_DBL, WB_SECTION_SIZE, SECT_DATA_L2,
- WORKBUFFER3_TAG)
-C_AALLOC_MEM(WorkBufferCore4, FIXP_DBL, WB_SECTION_SIZE)
C_ALLOC_MEM_OVERLAY(WorkBufferCore6, SCHAR,
fMax((INT)(sizeof(FIXP_DBL) * WB_SECTION_SIZE),
(INT)sizeof(CAacDecoderCommonData)),
diff --git a/libAACdec/src/aac_ram.h b/libAACdec/src/aac_ram.h
index a861e25..b9b95b7 100644
--- a/libAACdec/src/aac_ram.h
+++ b/libAACdec/src/aac_ram.h
@@ -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
@@ -136,12 +136,7 @@ H_ALLOC_MEM(TimeDataFlush, INT_PCM)
H_ALLOC_MEM_OVERLAY(WorkBufferCore1, CWorkBufferCore1)
H_ALLOC_MEM_OVERLAY(WorkBufferCore2, FIXP_DBL)
-
-H_ALLOC_MEM_OVERLAY(WorkBufferCore3, FIXP_DBL)
-H_ALLOC_MEM(WorkBufferCore4, FIXP_DBL)
-
H_ALLOC_MEM_OVERLAY(WorkBufferCore5, PCM_DEC)
-
H_ALLOC_MEM_OVERLAY(WorkBufferCore6, SCHAR)
#endif /* #ifndef AAC_RAM_H */
diff --git a/libFDK/include/FDK_qmf_domain.h b/libFDK/include/FDK_qmf_domain.h
index d8bc8ce..aa247e9 100644
--- a/libFDK/include/FDK_qmf_domain.h
+++ b/libFDK/include/FDK_qmf_domain.h
@@ -123,11 +123,10 @@ typedef enum {
#define QMF_WB_SECTION_SIZE (1024 * 2)
H_ALLOC_MEM_OVERLAY(QmfWorkBufferCore1, FIXP_DBL)
-H_ALLOC_MEM_OVERLAY(QmfWorkBufferCore2, FIXP_DBL)
H_ALLOC_MEM_OVERLAY(QmfWorkBufferCore3, FIXP_DBL)
H_ALLOC_MEM_OVERLAY(QmfWorkBufferCore4, FIXP_DBL)
-H_ALLOC_MEM_OVERLAY(QmfWorkBufferCore5, FIXP_DBL)
H_ALLOC_MEM_OVERLAY(QmfWorkBufferCore6, FIXP_DBL)
+H_ALLOC_MEM_OVERLAY(QmfWorkBufferCore7, FIXP_DBL)
#define QMF_DOMAIN_MAX_ANALYSIS_QMF_BANDS (64)
#define QMF_DOMAIN_MAX_SYNTHESIS_QMF_BANDS (QMF_MAX_SYNTHESIS_BANDS)
diff --git a/libFDK/src/FDK_qmf_domain.cpp b/libFDK/src/FDK_qmf_domain.cpp
index 5e1d35f..71e2ef5 100644
--- a/libFDK/src/FDK_qmf_domain.cpp
+++ b/libFDK/src/FDK_qmf_domain.cpp
@@ -106,25 +106,21 @@ 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)) */
@@ -949,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 */
@@ -995,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) {
diff --git a/libSBRdec/src/sbr_ram.cpp b/libSBRdec/src/sbr_ram.cpp
index 8b35fd2..a759d71 100644
--- a/libSBRdec/src/sbr_ram.cpp
+++ b/libSBRdec/src/sbr_ram.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
@@ -109,9 +109,6 @@ amm-info@iis.fraunhofer.de
#include "sbr_ram.h"
-#define WORKBUFFER1_TAG 2
-#define WORKBUFFER2_TAG 3
-
/*!
\name StaticSbrData