From 07f578b12bfba3eccb5e9143eda7c073a8292fe5 Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Wed, 24 Apr 2024 13:56:02 -0400 Subject: [PATCH] proposed fix for 725, saturation vlpc_2st_dec --- lib_com/options.h | 1 + lib_dec/vlpc_2st_dec_fx.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 4dfb7d8e4..1b2c564d7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -118,6 +118,7 @@ /* ##################### End NON-BE switches ########################### */ #define FIX_740_HQ_CORE_OVA // Proposed fix to solve overlap and add issue for HQ_CORE #define FIX_746 // proposed fix to solve low bit-rate frame boundaries issues +#define FIX_SATURATION_725 // Propose fix for saturation in AVQ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/vlpc_2st_dec_fx.c b/lib_dec/vlpc_2st_dec_fx.c index ae35bc31a..1a86fdb91 100644 --- a/lib_dec/vlpc_2st_dec_fx.c +++ b/lib_dec/vlpc_2st_dec_fx.c @@ -7,6 +7,9 @@ #include "options.h" #include "prot_fx1.h" #include "prot_fx2.h" +//#ifdef DEBUGGING to be removed +#include +//#endif void vlpc_2st_dec( Word16 *lsfq, /* i/o: i:1st stage o:1st+2nd stage */ @@ -32,7 +35,16 @@ void vlpc_2st_dec( FOR (i=0; i 32 for IVAS, we might need a different loop implementation */ + //#endif + lsfq[i] = add( lsfq[i], shl( mult_r( w[i], shl_sat( xq[i], 10 ) ), 2 ) ); /*14Q1*1.28*/ + move16(); +#else + lsfq[i] = add( lsfq[i], shl( mult_r( w[i], shl( xq[i], 10 ) ), 2 ) ); /*14Q1*1.28*/ + move16(); +#endif } /* reorder */ -- GitLab