From 6522e87ad6a10ed1786bda310c27a37129a517a6 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Mon, 28 Jul 2014 12:07:59 +0300 Subject: Extend GetInvInt to support values up to 54 For sample rates >= 64 kHz with short blocks, the largest sfb width is 36, which after grouping can be multiplied with 3, ending up as 108. GetInvInt needs to be able to support the largest grouped sfb width, divided by two (3 * 36 / 2 = 54). This fixes VBR encoding with sample rates >= 64 kHz. --- libFDK/include/fixpoint_math.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libFDK/include/fixpoint_math.h') diff --git a/libFDK/include/fixpoint_math.h b/libFDK/include/fixpoint_math.h index df141d3..af14f99 100644 --- a/libFDK/include/fixpoint_math.h +++ b/libFDK/include/fixpoint_math.h @@ -438,11 +438,11 @@ inline FIXP_DBL fAddSaturate(const FIXP_DBL a, const FIXP_DBL b) /***************************************************************************** - array for 1/n, n=1..50 + array for 1/n, n=1..55 ****************************************************************************/ - extern const FIXP_DBL invCount[50]; + extern const FIXP_DBL invCount[55]; LNK_SECTION_INITCODE inline void InitInvInt(void) {} @@ -456,8 +456,8 @@ inline FIXP_DBL fAddSaturate(const FIXP_DBL a, const FIXP_DBL b) */ inline FIXP_DBL GetInvInt(int intValue) { - FDK_ASSERT((intValue > 0) && (intValue < 50)); - FDK_ASSERT(intValue<50); + FDK_ASSERT((intValue > 0) && (intValue < 55)); + FDK_ASSERT(intValue<55); return invCount[intValue]; } -- cgit v1.2.3