Commit 183c1f13 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch...

Merge branch '871-fix-point-stereo-decoder-path-different-from-floating-point-for-some-fec-cases-leading-to-a' into 'main'

[allow regression] Propose fix to 871 that solves incorrect frame classification of the secondary...

See merge request !581
parents 8c3df3d0 5e7e2958
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@

#define FIX_869_WRONG_UVGAIN_STEP               /* VA: Fix wrong decoding of uv gain quantizer for td-stereo*/


#define FIX_871_REMOVE_UNNECESSARY_CONDITION    /* VA: remove a condition that is not needed and prevented correct frame classification of the secondary channel of the TD stereo */
/* ################## End DEVELOPMENT switches ######################### */

/* clang-format on */
+5 −3
Original line number Diff line number Diff line
@@ -7610,8 +7610,10 @@ void FEC_clas_estim_fx(
    /* i/o: long-term total energy variation               */ /*A*/
    Word16 *amr_io_class,
/* i/o: classification for AMR-WB IO mode       */ /*A*/
#ifndef FIX_871_REMOVE_UNNECESSARY_CONDITION
    const Word32 bitrate,
/* i  : Decoded bitrate                         */ /*A*/
#endif
    Word16 Q_syn, /* i  : Synthesis scaling                       */
    Word16 *class_para,
    /* o  : classification para. fmerit1            */ /*A*/
+9 −3
Original line number Diff line number Diff line
@@ -72,8 +72,10 @@ void FEC_clas_estim_fx(
    /* i/o: long-term total energy variation        */ /*A*/
    Word16 *amr_io_class,
/* i/o: classification for AMR-WB IO mode       */ /*A*/
#ifndef FIX_871_REMOVE_UNNECESSARY_CONDITION
    const Word32 bitrate,
/* i  : Decoded bitrate                         */ /*A*/
#endif
    Word16 Q_syn, /* i  : Synthesis scaling                       */
    Word16 *class_para,
    /* o  : classification para. fmerit1            */ /*A*/
@@ -471,9 +473,13 @@ void FEC_clas_estim_fx(
            /*------------------------------------------------------------------------*
             * frame classification
             *------------------------------------------------------------------------*/
#ifndef FIX_871_REMOVE_UNNECESSARY_CONDITION
            test();
            test();
            IF( ( NE_16( coder_type, VOICED ) && LT_32( bitrate, ACELP_11k60 ) ) || Opt_AMR_WB )
#else
            IF( NE_16( coder_type, VOICED ) )
#endif
            {
                Word16 result = UNVOICED_CLAS;
                move16();
+8 −1
Original line number Diff line number Diff line
@@ -1126,12 +1126,19 @@ ivas_error acelp_core_dec_fx(
             * FEC - Estimate the classification information
             *------------------------------------------------------------*/

#ifndef FIX_871_REMOVE_UNNECESSARY_CONDITION
            FEC_clas_estim_fx( st_fx, st_fx->Opt_AMR_WB, st_fx->L_frame, &st_fx->clas_dec, st_fx->coder_type, pitch_buf_fx,
                               syn_fx, &st_fx->lp_ener_FER_fx, &st_fx->decision_hyst,
                               NULL, NULL, NULL, NULL, 0, NULL, st_fx->core_brate, st_fx->Q_syn, temp_buf_fx,
                               st_fx->mem_syn_clas_estim_fx, &st_fx->classifier_Q_mem_syn,
                               0, 0, 0, st_fx->last_core_brate, st_fx->acelp_cfg.FEC_mode );

#else
            FEC_clas_estim_fx( st_fx, st_fx->Opt_AMR_WB, st_fx->L_frame, &st_fx->clas_dec, st_fx->coder_type, pitch_buf_fx,
                               syn_fx, &st_fx->lp_ener_FER_fx, &st_fx->decision_hyst,
                               NULL, NULL, NULL, NULL, 0, NULL, st_fx->Q_syn, temp_buf_fx,
                               st_fx->mem_syn_clas_estim_fx, &st_fx->classifier_Q_mem_syn,
                               0, 0, 0, st_fx->last_core_brate, st_fx->acelp_cfg.FEC_mode );
#endif
            /*------------------------------------------------------------*
             * FEC - Estimate pitch
             *------------------------------------------------------------*/
+8 −0
Original line number Diff line number Diff line
@@ -1227,11 +1227,19 @@ ivas_error acelp_core_dec_ivas_fx(
             * FEC - Estimate the classification information
             *------------------------------------------------------------*/

#ifndef FIX_871_REMOVE_UNNECESSARY_CONDITION
            FEC_clas_estim_fx( st, st->Opt_AMR_WB, st->L_frame, &st->clas_dec, st->coder_type, pitch_buf_fx,
                               psyn_fx, &st->lp_ener_FER_fx, &st->decision_hyst,
                               NULL, NULL, NULL, NULL, 0, NULL, st->core_brate, st->Q_syn, temp_buf_fx,
                               st->mem_syn_clas_estim_fx, &st->classifier_Q_mem_syn,
                               0, 0, 0, st->last_core_brate, st->acelp_cfg.FEC_mode );
#else
            FEC_clas_estim_fx( st, st->Opt_AMR_WB, st->L_frame, &st->clas_dec, st->coder_type, pitch_buf_fx,
                               psyn_fx, &st->lp_ener_FER_fx, &st->decision_hyst,
                               NULL, NULL, NULL, NULL, 0, NULL, st->Q_syn, temp_buf_fx,
                               st->mem_syn_clas_estim_fx, &st->classifier_Q_mem_syn,
                               0, 0, 0, st->last_core_brate, st->acelp_cfg.FEC_mode );
#endif
            /*------------------------------------------------------------*
             * FEC - Estimate pitch
             *------------------------------------------------------------*/
Loading