Commit 6b9dde26 authored by vaillancour's avatar vaillancour Committed by Manuel Jander
Browse files

fix when erasing indices

parent 3891a518
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2460,8 +2460,12 @@ static void shb_CNG_encod_fx(

        push_indice( hBstr, IND_SHB_CNG_GAIN, idx_ener_fx, 4 );
        push_indice( hBstr, IND_SID_BW, 1, 1 );
#ifdef HARM_PUSH_BIT 
        delete_indice( hBstr, IND_CNG_ENV1 );
#else
        hBstr->nb_bits_tot = sub( hBstr->nb_bits_tot, hBstr->ind_list[IND_CNG_ENV1].nb_bits );
        hBstr->ind_list[IND_CNG_ENV1].nb_bits = -1;
#endif
        move16();
        move16();

+11 −0
Original line number Diff line number Diff line
@@ -378,6 +378,16 @@ Word16 Pit_exc_contribution_len_fx( /* o : bin where pit
        move16();

        set16_fx( pitch_buf, shl( L_SUBFR, 6 ), NB_SUBFR16k );

#ifdef HARM_PUSH_BIT
        /* pitch contribution useless - delete all previously written indices belonging to pitch contribution */
        for ( i = TAG_ACELP_SUBFR_LOOP_START; i < TAG_ACELP_SUBFR_LOOP_END; i++ )
        {
            delete_indice( hBstr, i );
        }

        delete_indice( hBstr, IND_ES_PRED );
#else
        /* pitch contribution useless - delete all previously written indices belonging to pitch contribution */
        FOR( i = TAG_ACELP_SUBFR_LOOP_START; i < TAG_ACELP_SUBFR_LOOP_END; i++ )
        {
@@ -396,6 +406,7 @@ Word16 Pit_exc_contribution_len_fx( /* o : bin where pit
            hBstr->ind_list[IND_ES_PRED].nb_bits = -1;
            move16();
        }
#endif
    }
    IF( LT_32( st_fx->core_brate, CFREQ_BITRATE ) )
    {