From 9a3234055adb1e18f80571925779503c8dec5251 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Fri, 1 Aug 2014 10:31:53 +0300 Subject: Extend the GetInvInt table to 80 elements This is a bug fix patch from Fraunhofer, amending/replacing/extending the previous commit which only extended the table to 55 elements. (In my previous fix, 55 seemed to be enough for the issue at hand at least. A few of the coefficients had slightly different rounding than what Fraunhofer had used though). This will show up in AOSP in the next code drop as well. --- libFDK/include/fixpoint_math.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libFDK/include') diff --git a/libFDK/include/fixpoint_math.h b/libFDK/include/fixpoint_math.h index af14f99..fcc6b5a 100644 --- a/libFDK/include/fixpoint_math.h +++ b/libFDK/include/fixpoint_math.h @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2014 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -438,11 +438,11 @@ inline FIXP_DBL fAddSaturate(const FIXP_DBL a, const FIXP_DBL b) /***************************************************************************** - array for 1/n, n=1..55 + array for 1/n, n=1..80 ****************************************************************************/ - extern const FIXP_DBL invCount[55]; + extern const FIXP_DBL invCount[80]; LNK_SECTION_INITCODE inline void InitInvInt(void) {} @@ -450,14 +450,14 @@ inline FIXP_DBL fAddSaturate(const FIXP_DBL a, const FIXP_DBL b) /** * \brief Calculate the value of 1/i where i is a integer value. It supports - * input values from 1 upto 50. + * input values from 1 upto 80. * \param intValue Integer input value. * \param FIXP_DBL representation of 1/intValue */ inline FIXP_DBL GetInvInt(int intValue) { - FDK_ASSERT((intValue > 0) && (intValue < 55)); - FDK_ASSERT(intValue<55); + FDK_ASSERT((intValue > 0) && (intValue < 80)); + FDK_ASSERT(intValue<80); return invCount[intValue]; } -- cgit v1.2.3