aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec/src/FDK_delay.cpp
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2019-12-19 17:28:15 +0100
committerJean-Michel Trivi <jmtrivi@google.com>2020-02-14 10:53:51 -0800
commite016635f0d3a5c7532b00711ce461f97a13f7bc2 (patch)
tree44d6676c2975eec965bb3e6c2562e1632eaf4385 /libAACdec/src/FDK_delay.cpp
parent57c9355de0269afb462ad4a8aa8814f6a6486ff1 (diff)
downloadfdk-aac-e016635f0d3a5c7532b00711ce461f97a13f7bc2.tar.gz
fdk-aac-e016635f0d3a5c7532b00711ce461f97a13f7bc2.tar.bz2
fdk-aac-e016635f0d3a5c7532b00711ce461f97a13f7bc2.zip
Avoid decoder internal clipping by converting the whole audio sample data path from 16 to 32 bit data width (FDKdec v3.2.0).
Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I8a504ab709e42e27a61fe29840212953742283a5
Diffstat (limited to 'libAACdec/src/FDK_delay.cpp')
-rw-r--r--libAACdec/src/FDK_delay.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/libAACdec/src/FDK_delay.cpp b/libAACdec/src/FDK_delay.cpp
index 0ab1a66..0cc869c 100644
--- a/libAACdec/src/FDK_delay.cpp
+++ b/libAACdec/src/FDK_delay.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
@@ -113,7 +113,7 @@ INT FDK_Delay_Create(FDK_SignalDelay* data, const USHORT delay,
if (delay > 0) {
data->delay_line =
- (INT_PCM*)FDKcalloc(num_channels * delay, sizeof(INT_PCM));
+ (PCM_DEC*)FDKcalloc(num_channels * delay, sizeof(PCM_DEC));
if (data->delay_line == NULL) {
return -1;
}
@@ -126,36 +126,36 @@ INT FDK_Delay_Create(FDK_SignalDelay* data, const USHORT delay,
return 0;
}
-void FDK_Delay_Apply(FDK_SignalDelay* data, FIXP_PCM* time_buffer,
+void FDK_Delay_Apply(FDK_SignalDelay* data, PCM_DEC* time_buffer,
const UINT frame_length, const UCHAR channel) {
FDK_ASSERT(data != NULL);
if (data->delay > 0) {
- C_ALLOC_SCRATCH_START(tmp, FIXP_PCM, MAX_FRAME_LENGTH)
+ C_ALLOC_SCRATCH_START(tmp, PCM_DEC, MAX_FRAME_LENGTH)
FDK_ASSERT(frame_length <= MAX_FRAME_LENGTH);
FDK_ASSERT(channel < data->num_channels);
FDK_ASSERT(time_buffer != NULL);
if (frame_length >= data->delay) {
FDKmemcpy(tmp, &time_buffer[frame_length - data->delay],
- data->delay * sizeof(FIXP_PCM));
+ data->delay * sizeof(PCM_DEC));
FDKmemmove(&time_buffer[data->delay], &time_buffer[0],
- (frame_length - data->delay) * sizeof(FIXP_PCM));
+ (frame_length - data->delay) * sizeof(PCM_DEC));
FDKmemcpy(&time_buffer[0], &data->delay_line[channel * data->delay],
- data->delay * sizeof(FIXP_PCM));
+ data->delay * sizeof(PCM_DEC));
FDKmemcpy(&data->delay_line[channel * data->delay], tmp,
- data->delay * sizeof(FIXP_PCM));
+ data->delay * sizeof(PCM_DEC));
} else {
- FDKmemcpy(tmp, &time_buffer[0], frame_length * sizeof(FIXP_PCM));
+ FDKmemcpy(tmp, &time_buffer[0], frame_length * sizeof(PCM_DEC));
FDKmemcpy(&time_buffer[0], &data->delay_line[channel * data->delay],
- frame_length * sizeof(FIXP_PCM));
+ frame_length * sizeof(PCM_DEC));
FDKmemcpy(&data->delay_line[channel * data->delay],
&data->delay_line[channel * data->delay + frame_length],
- (data->delay - frame_length) * sizeof(FIXP_PCM));
+ (data->delay - frame_length) * sizeof(PCM_DEC));
FDKmemcpy(&data->delay_line[channel * data->delay +
(data->delay - frame_length)],
- tmp, frame_length * sizeof(FIXP_PCM));
+ tmp, frame_length * sizeof(PCM_DEC));
}
- C_ALLOC_SCRATCH_END(tmp, FIXP_PCM, MAX_FRAME_LENGTH)
+ C_ALLOC_SCRATCH_END(tmp, PCM_DEC, MAX_FRAME_LENGTH)
}
return;