aboutsummaryrefslogtreecommitdiffstats
path: root/libFDK
diff options
context:
space:
mode:
Diffstat (limited to 'libFDK')
-rw-r--r--libFDK/include/FDK_qmf_domain.h5
-rw-r--r--libFDK/include/mdct.h14
-rw-r--r--libFDK/src/FDK_core.cpp4
-rw-r--r--libFDK/src/FDK_qmf_domain.cpp12
4 files changed, 14 insertions, 21 deletions
diff --git a/libFDK/include/FDK_qmf_domain.h b/libFDK/include/FDK_qmf_domain.h
index aa247e9..0e83da3 100644
--- a/libFDK/include/FDK_qmf_domain.h
+++ b/libFDK/include/FDK_qmf_domain.h
@@ -160,8 +160,6 @@ H_ALLOC_MEM(QmfSlotsImag32, FIXP_DBL *)
H_ALLOC_MEM(QmfOverlapBuffer16, FIXP_DBL)
H_ALLOC_MEM(QmfOverlapBuffer32, FIXP_DBL)
-#define QDOM_PCM INT_PCM
-
/**
* Structure to hold the configuration data which is global whithin a QMF domain
* instance.
@@ -181,9 +179,6 @@ typedef struct {
park a channel if only one processing channel is
available. */
UCHAR parkChannel_requested;
- QDOM_PCM
- *TDinput; /*!< Pointer to time domain data used as input for the QMF
- analysis. */
FIXP_DBL *
pWorkBuffer[QMF_MAX_WB_SECTIONS]; /*!< Pointerarray to volatile memory. */
UINT flags; /*!< Flags to be set on all QMF analysis/synthesis filter
diff --git a/libFDK/include/mdct.h b/libFDK/include/mdct.h
index 1382374..e7cf3ad 100644
--- a/libFDK/include/mdct.h
+++ b/libFDK/include/mdct.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
@@ -106,18 +106,16 @@ amm-info@iis.fraunhofer.de
#include "common_fix.h"
#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
-#define PCM_OUT_BITS SAMPLE_BITS
+
+#define PCM_OUT_BITS DFRACT_BITS
#define PCM_OUT_HEADROOM 8 /* Must have the same values as DMXH_HEADROOM */
-#define MDCT_OUTPUT_SCALE (-MDCT_OUT_HEADROOM + (DFRACT_BITS - SAMPLE_BITS))
+#define MDCT_OUTPUT_SCALE (-MDCT_OUT_HEADROOM + (DFRACT_BITS - PCM_OUT_BITS))
/* Refer to "Output word length" in ISO/IEC 14496-3:2008(E) 23.2.3.6 */
#define MDCT_OUTPUT_GAIN 16
-#if (MDCT_OUTPUT_SCALE >= 0)
-#define IMDCT_SCALE(x) SATURATE_RIGHT_SHIFT(x, MDCT_OUTPUT_SCALE, PCM_OUT_BITS)
-#else
-#define IMDCT_SCALE(x) SATURATE_LEFT_SHIFT(x, -MDCT_OUTPUT_SCALE, PCM_OUT_BITS)
-#endif
+#define IMDCT_SCALE(x, s) \
+ SATURATE_RIGHT_SHIFT((x), ((s) + MDCT_OUTPUT_SCALE), PCM_OUT_BITS)
#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
diff --git a/libFDK/src/FDK_core.cpp b/libFDK/src/FDK_core.cpp
index 75ea8a2..2f77179 100644
--- a/libFDK/src/FDK_core.cpp
+++ b/libFDK/src/FDK_core.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
@@ -104,7 +104,7 @@ amm-info@iis.fraunhofer.de
/* FDK tools library info */
#define FDK_TOOLS_LIB_VL0 3
-#define FDK_TOOLS_LIB_VL1 0
+#define FDK_TOOLS_LIB_VL1 1
#define FDK_TOOLS_LIB_VL2 0
#define FDK_TOOLS_LIB_TITLE "FDK Tools"
#ifdef __ANDROID__
diff --git a/libFDK/src/FDK_qmf_domain.cpp b/libFDK/src/FDK_qmf_domain.cpp
index 71e2ef5..77c5ca2 100644
--- a/libFDK/src/FDK_qmf_domain.cpp
+++ b/libFDK/src/FDK_qmf_domain.cpp
@@ -637,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;
@@ -648,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;