Commit 7d9e801b authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for 3GPP issue 987: Stereo decoding 16 kHz input, energy loss in drum onset

Computing values instead of using table as index computed is not accurate

link #987
parent b8017bff
Loading
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -75,7 +75,16 @@ void ivas_fine_gain_pred_fx(
                L_tmp = L_shl( xx, exp ); /*2*(15-shift)+exp */
                exp = sub( 31, add( exp, sub( 30, shl( shift, 1 ) ) ) );
                L_tmp = Isqrt_lc( L_tmp, &exp ); /*31 - exp */
#ifndef FIX_ISSUE_987
                Mpy_32_16_ss( L_tmp, ivas_fine_gain_pred_sqrt_bw[bw_idx], &L_tmp, &lsb ); /*31-exp+11-15=27-exp */
#else
                Word16 norm = norm_s( bw );
                Word16 tmp1, tmp_exp = sub( 15, norm );
                tmp1 = Sqrt16( shl( bw, norm ), &tmp_exp );
                tmp1 = shr( tmp1, sub( sub( 15, tmp_exp ), Q11 ) );
                Mpy_32_16_ss( L_tmp, tmp1, &L_tmp, &lsb );      /*31-exp+11-15=27-exp */
#endif

#ifdef BASOP_NOGLOB
                gp = round_fx_o( L_shl_o( L_tmp, add( 1, exp ), &Overflow ), &Overflow ); /*27-exp+1+exp-16=12 */
#else
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@
#define NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS /* DLB: adjust prerendering and mixing gain in OSBA encoder. This is fix to float codes*/
#define NONBE_1233_HQ_CLASSIFIER_DIV_BY_ZERO            /* Eri: issue 1233: Address possible division by zero in hf_spectrum_sparseness() */
#define FIX_ISSUE_1062_AND_1068_TON_ENE_EST_FX
#define FIX_ISSUE_987
#define FIX_1054_IF_ELSE_CMPLX                          /* VA: Fix 1054 incorrect counting of complexity when ELSE-IF sequence is encoutered in two functions */
#define FIX_1052_COPY_CMPLX_DISCREPANCY       /* VA: modify IF-ELSE statements used in Copy*() functions to avoid dependency on x[] and y[] in RAM */
#define FIX_1049_SHR_RO_COMPLEXITY              /* VA: fix for issue 1049: incorrect counting of complexity in the shr_ro() function */