1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-02-28 08:27:43 +01:00

Ensure that QC_OUT_CHANNEL struct in encoder always uses aligned memory

Bug: 149489652
Test: atest android.media.cts.EncoderTest#testAACEncoders
Change-Id: Ifc513ef20639f04c7252ade5519cc8e8c2fdbd50
This commit is contained in:
Fraunhofer IIS FDK 2019-12-19 17:23:40 +01:00 committed by Jean-Michel Trivi
parent 925092e8fc
commit 7b5389e63f
2 changed files with 4 additions and 4 deletions

View File

@ -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
@ -204,5 +204,5 @@ QC_OUT_CHANNEL *GetRam_aacEnc_QCchannel(int n, UCHAR *dynamic_RAM) {
* (dynamic_RAM + P_BUF_0 + n*sizeof(QC_OUT_CHANNEL)) is sufficiently aligned,
* so the cast is safe */
return reinterpret_cast<QC_OUT_CHANNEL *>(reinterpret_cast<void *>(
dynamic_RAM + P_BUF_0 + n * sizeof(QC_OUT_CHANNEL)));
dynamic_RAM + P_BUF_0 + n * ALIGN_SIZE(sizeof(QC_OUT_CHANNEL))));
}

View File

@ -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
@ -198,7 +198,7 @@ struct AAC_ENC {
+++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
#define BUF_SIZE_0 (ALIGN_SIZE(sizeof(QC_OUT_CHANNEL) * (8)))
#define BUF_SIZE_0 (ALIGN_SIZE(sizeof(QC_OUT_CHANNEL)) * (8))
#define BUF_SIZE_1 \
(ALIGN_SIZE(maxSize(maxSize(sizeof(PSY_DYNAMIC), \
(BIT_LOOK_UP_SIZE + MERGE_GAIN_LOOK_UP_SIZE)), \