mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-06-05 22:39:13 +02:00
Prevent negation of INT_MIN in pcmLimiter_Apply().
Bug: 145668877 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I734f839818f7130615a4438b8831ac664206cc34
This commit is contained in:
committed by
Jean-Michel Trivi
parent
801b45ffab
commit
3700d4ff8f
@ -1,7 +1,7 @@
|
|||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
Software License for The Fraunhofer FDK AAC Codec Library for Android
|
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.
|
Forschung e.V. All rights reserved.
|
||||||
|
|
||||||
1. INTRODUCTION
|
1. INTRODUCTION
|
||||||
@ -239,8 +239,8 @@ TDLIMITER_ERROR pcmLimiter_Apply(TDLimiterPtr limiter, PCM_LIM* samplesIn,
|
|||||||
tmp1 = (FIXP_DBL)0;
|
tmp1 = (FIXP_DBL)0;
|
||||||
for (j = 0; j < channels; j++) {
|
for (j = 0; j < channels; j++) {
|
||||||
tmp2 = PCM_LIM2FIXP_DBL(samplesIn[j]);
|
tmp2 = PCM_LIM2FIXP_DBL(samplesIn[j]);
|
||||||
tmp2 = fAbs(tmp2);
|
tmp2 =
|
||||||
tmp2 = FIXP_DBL(INT(tmp2) ^ INT((tmp2 >> (SAMPLE_BITS_LIM - 1))));
|
(tmp2 == (FIXP_DBL)MINVAL_DBL) ? (FIXP_DBL)MAXVAL_DBL : fAbs(tmp2);
|
||||||
tmp1 = fMax(tmp1, tmp2);
|
tmp1 = fMax(tmp1, tmp2);
|
||||||
}
|
}
|
||||||
tmp = fMult(tmp1, additionalGain);
|
tmp = fMult(tmp1, additionalGain);
|
||||||
|
Reference in New Issue
Block a user