Commit 3ea17c23 authored by Arthur Tritthart's avatar Arthur Tritthart
Browse files

added rounding (L_shr_r) for coeff calculation (was L_shr)

parent 081fdd3c
Loading
Loading
Loading
Loading
Loading

lib_com/ivas_spar_com.c

100644 → 100755
+4 −0
Original line number Diff line number Diff line
@@ -3832,7 +3832,11 @@ void ivas_compute_spar_params_fx(
            }
            ELSE
            {
#ifdef FIX_11_1_IVAS_SPAR_DEC_UPMIXER_SF_RND_COEFFS
                hSparMd->band_coeffs[b + ( i_ts * IVAS_MAX_NUM_BANDS )].pred_re_fx[i] = L_shr_r( hSparMd->band_coeffs[b + ( i_ts * IVAS_MAX_NUM_BANDS )].pred_re_fx[i], sub( tmp, 22 ) ); // q22
#else
                hSparMd->band_coeffs[b + ( i_ts * IVAS_MAX_NUM_BANDS )].pred_re_fx[i] = L_shr( hSparMd->band_coeffs[b + ( i_ts * IVAS_MAX_NUM_BANDS )].pred_re_fx[i], sub( tmp, 22 ) ); // q22
#endif
                move32();
            }
        }

lib_com/options.h

100644 → 100755
+1 −0
Original line number Diff line number Diff line
@@ -107,4 +107,5 @@
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_SATURATE_WEIGHTS      /* FhG: BUGFIX: Saturate weight parameters during reformatting, fixes overflow in extract_l */
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_HQ_CONSTANTS          /* FhG: IMPROVE PRECISION: Uses 1/6 and 1/20 in full-precise Q31 constants instead of Q15 */
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_USE_UNIQUE_SHL        /* FhG: Uses unique shift amount in each loop iteration */
#define FIX_11_1_IVAS_SPAR_DEC_UPMIXER_SF_RND_COEFFS            /* FhG  ivas_spar_com.c: Zeroes very small negative coeffs via L_shr_r (was L_shr) */
#endif