summaryrefslogtreecommitdiffstats
path: root/libFDK/include/fixpoint_math.h
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2014-07-28 12:07:59 +0300
committerMartin Storsjo <martin@martin.st>2014-07-29 15:00:56 +0300
commit6522e87ad6a10ed1786bda310c27a37129a517a6 (patch)
tree432c4e4e0d2d34949562ef42e410717a6fe8b11a /libFDK/include/fixpoint_math.h
parentf82510410d6025a0577a593de6feeaf1c256c81c (diff)
downloadfdk-aac-6522e87ad6a10ed1786bda310c27a37129a517a6.tar.gz
fdk-aac-6522e87ad6a10ed1786bda310c27a37129a517a6.tar.bz2
fdk-aac-6522e87ad6a10ed1786bda310c27a37129a517a6.zip
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.
Diffstat (limited to 'libFDK/include/fixpoint_math.h')
-rw-r--r--libFDK/include/fixpoint_math.h8
1 files changed, 4 insertions, 4 deletions
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];
}