Commit 6647a093 authored by multrus's avatar multrus
Browse files

Merge branch 'main' into 20260304_cleanup

parents 17d536b1 908ec9ad
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@
#define FIX_2458_USAN_NULLPTR_WITH_ZERO_OFFSET          /* FhG: basop issue 2458: avoid indexing into null pointer */
#define HARM_2456_APPLY_SCALE                           /* FhG basop issue 2456: Harmonize apply_scale_ind(), apply_scale_ivas_fx() */
#define HARM_2454_TCX_RES_Q_SPEC                        /* FhG: harmonization of tcx_res_Q_spec_fx() and tcx_res_Q_spec_ivas_fx() */
#define FIX_FLOAT_1535_ARI_RES_Q_CLEANUP                /* FhG: remove dead code from tcx_ari_res_Q_spec() */

/* #################### End BE switches ################################## */

+4 −0
Original line number Diff line number Diff line
@@ -3570,7 +3570,11 @@ void QuantizeTCXSpectrum_fx(

            prm_resq = sqQ + sub( sqTargetBits, resQTargetBits );

#ifdef FIX_FLOAT_1535_ARI_RES_Q_CLEANUP
            resQBits = tcx_ari_res_Q_spec_fx( x_orig_fx, x_orig_e, hm_cfg->indexBuffer, spectrum_fx, *spectrum_e, L_spec, *gain_tcx_fx, *gain_tcx_e, prm_resq, resQTargetBits, resQBits, st->hTcxCfg->sq_rounding, lf_deemph_fact_fx );
#else
            resQBits = tcx_ari_res_Q_spec_ivas_fx( x_orig_fx, x_orig_e, hm_cfg->indexBuffer, spectrum_fx, *spectrum_e, L_spec, *gain_tcx_fx, *gain_tcx_e, prm_resq, resQTargetBits, resQBits, st->hTcxCfg->sq_rounding, lf_deemph_fact_fx );
#endif

            /* Transmit zeros when there bits remain after RESQ */
            FOR( i = resQBits; i < resQTargetBits; ++i )
+2 −1
Original line number Diff line number Diff line
@@ -1267,6 +1267,7 @@ Word16 tcx_ari_res_Q_spec_fx(
    const Word16 x_fac[]   /* i  : spectrum post-quantization factors  Q14 */
);

#ifndef FIX_FLOAT_1535_ARI_RES_Q_CLEANUP
Word16 tcx_ari_res_Q_spec_ivas_fx(
    const Word32 x_orig[], /* i  : original spectrum                   Q31-e */
    Word16 x_orig_e,       /* i  : original spectrum exponent          Q0 */
@@ -1282,7 +1283,7 @@ Word16 tcx_ari_res_Q_spec_ivas_fx(
    Word16 deadzone,       /* i  : quantizer deadzone                  Q15 */
    const Word16 x_fac[]   /* i  : spectrum post-quantization factors  Q14 */
);

#endif
Word16 tcx_res_Q_gain_fx(
    Word16 sqGain,
    Word16 sqGain_e,
+6 −2
Original line number Diff line number Diff line
@@ -2996,6 +2996,10 @@ Word16 tcx_ari_res_Q_spec_fx(
    num_zeros = 0;
    move16();

#ifdef FIX_FLOAT_1535_ARI_RES_Q_CLEANUP
    assert( x_fac != NULL );
#endif

    s = sub( add( gain_e, x_Q_e ), x_orig_e );
    FOR( i = 0; i < L_frame; i++ )
    {
@@ -3097,7 +3101,7 @@ Word16 tcx_ari_res_Q_spec_fx(
    return bits;
}


#ifndef FIX_FLOAT_1535_ARI_RES_Q_CLEANUP
Word16 tcx_ari_res_Q_spec_ivas_fx(
    const Word32 x_orig[], /* i  : original spectrum                   Q31-e */
    Word16 x_orig_e,       /* i  : original spectrum exponent          Q0 */
@@ -3328,7 +3332,7 @@ Word16 tcx_ari_res_Q_spec_ivas_fx(

    return bits;
}

#endif

#define kMaxEstimatorOvershoot  5
#define kMaxEstimatorUndershoot 0