Commit e0e156c9 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_1205_TD_STEREO_MOD_CT

parent 0260823d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -170,7 +170,6 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR       /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */
#define NONBE_FIX_1205_TD_STEREO_MOD_CT                 /* VA: fix mismatch of coder_type (mod_ct) btw. TD stereo encoder and decoder */
#define NONBE_1203_MDCT2DFT_SWITCHING                   /* VA: issue 1203: fix severe artifacts during MDCT to DFT stereo switching when MDCT ITD is not used */
#define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH             /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */

+0 −19
Original line number Diff line number Diff line
@@ -216,16 +216,12 @@ void ivas_decision_matrix_enc(
    {
        st->core = ACELP_CORE;

#ifdef NONBE_FIX_1205_TD_STEREO_MOD_CT
        /* In TD stereo below 24.4 kbps we cannot overwrite the `coder_type` when it is set to TRANSITION, */
        /* as it is used for TD stereo bit allocation. To ensure consistent bit allocation, it must remain unchanged on the decoder side. */
        if ( st->idchan == 0 && !( element_brate < IVAS_24k4 && st->coder_type == TRANSITION && st->element_mode == IVAS_CPE_TD ) )
        {
            st->coder_type = AUDIO;
        }
#else
        st->coder_type = AUDIO;
#endif

        st->sp_aud_decision2 = 0;

@@ -476,7 +472,6 @@ void ivas_signaling_enc(

                if ( st->core == ACELP_CORE )
                {
#ifdef NONBE_FIX_1205_TD_STEREO_MOD_CT
                    /* write coder type */
                    push_indice( hBstr, IND_ACELP_SIGNALLING, st->coder_type, 3 );

@@ -485,20 +480,6 @@ void ivas_signaling_enc(
                        /* write sharpening flag */
                        push_indice( hBstr, IND_SHARP_FLAG, st->sharpFlag, 1 );
                    }
#else
                    if ( element_brate < FRMT_SHP_MIN_BRATE_IVAS )
                    {
                        push_indice( hBstr, IND_ACELP_SIGNALLING, st->coder_type, 3 );
                    }
                    else
                    {
                        /* write coder type */
                        push_indice( hBstr, IND_ACELP_SIGNALLING, st->coder_type, 3 );

                        /* write sharpening flag */
                        push_indice( hBstr, IND_SHARP_FLAG, st->sharpFlag, 1 );
                    }
#endif

                    /* write extension layer flag to distinguish between TBE (0) and BWE (1) */
                    if ( st->extl_brate > 0 )
+0 −16
Original line number Diff line number Diff line
@@ -449,7 +449,6 @@ void tdm_configure_enc(
    }

    mod_ct = AUDIO;
#ifdef NONBE_FIX_1205_TD_STEREO_MOD_CT
    if ( hCPE->element_brate < IVAS_24k4 )
    {
        /* In TD stereo, the TRANSITION mode has a specific bit allocation. All other formats share the same bit allocation. For these other formats, `mod_ct` is set to AUDIO to aid in debugging, though it does not have any functional impact. */
@@ -464,21 +463,6 @@ void tdm_configure_enc(
            mod_ct = TRANSITION;
        }
    }
#else
    if ( hCPE->element_brate < IVAS_24k4 )
    {
        mod_ct = sts[0]->coder_type;
        /* Only sure TRANSITION coding modes are important for bit allocation, otherwise mod_ct is set to AUDIO only to easy debugging if needed */
        if ( ( ( sts[0]->last_L_frame >= L_FRAME16k && sts[0]->flag_ACELP16k == 0 ) || ( sts[0]->last_L_frame == L_FRAME && sts[0]->flag_ACELP16k == 1 ) ) && sts[0]->last_core_brate != FRAME_NO_DATA && sts[0]->last_core_brate != SID_2k40 && sts[0]->coder_type_raw != VOICED /*in case of CNG, this code is not reached sts[0]->core_brate != FRAME_NO_DATA && sts[0]->core_brate != SID_2k40 &&*/ )
        {
            mod_ct = TRANSITION;
        }
        else if ( sts[0]->sp_aud_decision1 == 1 || sts[0]->sp_aud_decision2 == 1 || mod_ct != TRANSITION )
        {
            mod_ct = AUDIO;
        }
    }
#endif

    /* Correction of tdm_inst_ratio_idx in case of TC in the seecondary channel */
    if ( hStereoTD->flag_skip_DMX == 0 && hStereoTD->tdm_LRTD_flag == 1 && sts[1]->tc_cnt > 1 /*&& abs(hStereoTD->tdm_inst_ratio_idx-LRTD_STEREO_MID_IS_PRIM) > 5*/ )