Commit 143d7745 authored by vaillancour's avatar vaillancour
Browse files

addition of FORCE_GENERIC

parent 8f315089
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -79,6 +79,8 @@
#define HARM_ENC_INIT
//#define HARM_SCE_INIT

#define FORCE_GENERIC

#if 0        // diminish MLD by ~1 on NO_S

#define TRY_SHIFT_ACELP         // Adding similar mecanism as shift for EVS, allows to use only 1 bit headroom instead of 2
+6 −2
Original line number Diff line number Diff line
@@ -568,7 +568,9 @@ Word16 find_uv_fx( /* o : coding type */
    move32(); /*Q6*/
    st_fx->old_dE1_fx = dE1;
    move32(); /*Q13*/

#ifdef FORCE_GENERIC
    coder_type = GENERIC;
#endif
    /* save the raw coder_type for various modules later in the codec (the reason is that e.g. UNVOICED is lost at higher rates) */
    st_fx->coder_type_raw = coder_type;
    move16();
@@ -1107,7 +1109,9 @@ Word16 find_uv_ivas_fx( /* o : coding typ
    move32(); /*Q6*/
    st_fx->old_dE1_fx = dE1;
    move32(); /*Q13*/

#ifdef FORCE_GENERIC
    coder_type = GENERIC;
#endif
    /* save the raw coder_type for various modules later in the codec (the reason is that e.g. UNVOICED is lost at higher rates) */
    st_fx->coder_type_raw = coder_type; /* Q0 */
    move16();
+2 −0
Original line number Diff line number Diff line
@@ -284,7 +284,9 @@ void ivas_decision_matrix_enc_fx(
        /* 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 && !( LT_32( element_brate, IVAS_24k4 ) && EQ_16( st->coder_type, TRANSITION ) && EQ_16( st->element_mode, IVAS_CPE_TD ) ) )
        {
#ifndef FORCE_GENERIC
            st->coder_type = AUDIO;
#endif
            move16();
        }
        st->sp_aud_decision2 = 0;
+2 −0
Original line number Diff line number Diff line
@@ -304,7 +304,9 @@ void select_TC_fx(
            ELSE
            {
                /* frame after onset/transition frame is coded by TC coder type */
#ifndef FORCE_GENERIC
                *coder_type = TRANSITION;
#endif
                move16();
            }
        }
+4 −1
Original line number Diff line number Diff line
@@ -582,7 +582,9 @@ void speech_music_classif_fx(
        IF( EQ_16( st->codec_mode, MODE1 ) && ( st->sp_aud_decision2 || st->GSC_noisy_speech ) )
#endif
        {
#ifndef FORCE_GENERIC
            st->coder_type = AUDIO;
#endif
            move16();
            hGSCEnc->noise_lev = NOISE_LEVEL_SP0;
            move16();
@@ -3167,6 +3169,7 @@ void ivas_smc_mode_selection_fx(
    }

    /* set coder_type to AUDIO when GSC is selected (st->core will be set later in the decision matrix) */
#ifndef FORCE_GENERIC
    test();
    test();
    IF( ( EQ_16( st->sp_aud_decision1, 1 ) && st->sp_aud_decision2 == 0 ) || st->GSC_noisy_speech )
@@ -3180,7 +3183,7 @@ void ivas_smc_mode_selection_fx(
            move16();
        }
    }

#endif
    return;
}