From 063d5f30864c6293855da6f7b8dd482d7c408158 Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Wed, 13 Nov 2019 16:05:58 +0100 Subject: Revise scaling for USAC combined with phase coding in SpatialDecApplyM2() to prevent signed integer overflow. Bug: 146937759 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: If7c484b2e1bee82747f5c6dc0ee7ad1f282c0189 --- libSACdec/src/sac_calcM1andM2.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libSACdec/src/sac_calcM1andM2.h') diff --git a/libSACdec/src/sac_calcM1andM2.h b/libSACdec/src/sac_calcM1andM2.h index 996238d..cefc4bb 100644 --- a/libSACdec/src/sac_calcM1andM2.h +++ b/libSACdec/src/sac_calcM1andM2.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 @@ -117,6 +117,9 @@ amm-info@iis.fraunhofer.de /* Scaling of spectral data after applying M2 matrix, but only for binaural upmix type Scaling is compensated later in synthesis qmf filterbank */ #define SCALE_DATA_APPLY_M2 (1) +/* Applying M2 parameter in combination with phase coding needs 2 bits headroom + * because up to a maximum of 4 spectral values can be added for USAC */ +#define SCALE_DATA_APPLY_M2_PC (2) SACDEC_ERROR initM1andM2(spatialDec* self, int initStatesFlag, int configChanged); -- cgit v1.2.3