Commit c35709f7 authored by vaillancour's avatar vaillancour
Browse files

add supplementary condition in case transition of overwritten

parent 92416844
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -454,8 +454,14 @@ void tdm_configure_enc(
    {
        mod_ct = AUDIO;
        /* 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]->coder_type == TRANSITION ||
             ( ( ( 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 &&*/ ) )
        /* Enforce GC coder type on inactive signal (this can be later overwritten to INACTIVE) */
        if ( !( sts[0]->localVAD == 0 && sts[0]->coder_type == TRANSITION ) && 
            ( sts[0]->coder_type == TRANSITION ||
             ( ( ( 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 ) ) )
        {
            mod_ct = TRANSITION;
        }