Commit 6e90c39b authored by vaclav's avatar vaclav
Browse files

harmonize init_decoder()

parent cbf9e004
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -6683,11 +6683,7 @@ void gsc_dec_fx(
    Word16 *exc_wo_nf,         /* o  : excitation (in f domain) without noisefill            Q_exc*/
    Word16 *Q_exc );
void GSC_dec_init(
    GSC_DEC_HANDLE hGSCDec /* i/o: GSC data handle  */
);
void GSC_dec_init_ivas_fx(
void GSC_dec_init_fx(
    GSC_DEC_HANDLE hGSCDec /* i/o: GSC data handle  */
);
+0 −2
Original line number Diff line number Diff line
@@ -871,8 +871,6 @@ void dec_acelp_fast_fx(
    move16();
    set16_fx( code, 0, L_subfr );

    st->total_num_bits = extract_l( st->total_brate / FRAMES_PER_SEC );

    IF( EQ_16( L_subfr, L_SUBFR ) )
    {
        config = PulseConfTable[cdk_index];
+4 −31
Original line number Diff line number Diff line
@@ -867,7 +867,7 @@ void gsc_dec_fx(
 * Initialize GSC decoder state structure
 *-------------------------------------------------------------------*/

void GSC_dec_init(
void GSC_dec_init_fx(
    GSC_DEC_HANDLE hGSCDec /* i/o: GSC data handle  */
)
{
@@ -881,43 +881,16 @@ void GSC_dec_init(
    move16();
    move16();

    set16_fx( hGSCDec->Last_GSC_spectrum_fx, 0, L_FRAME );
    set16_fx( hGSCDec->last_exc_dct_in_fx, 0, L_FRAME );
    set16_fx( hGSCDec->old_y_gain_fx, 0, MBANDS_GN );
    set16_fx( hGSCDec->lt_ener_per_band_fx, 4096, MBANDS_GN ); /*Q12*/

    hGSCDec->last_ener_fx = 0;
    move16();
    set16_fx( hGSCDec->last_bitallocation_band, 0, 6 );

    hGSCDec->Last_frame_ener_fx = MAX_32;
    move32();
    return;
}

void GSC_dec_init_ivas_fx(
    GSC_DEC_HANDLE hGSCDec /* i/o: GSC data handle  */
)
{
    hGSCDec->seed_tcx = 15687; /* Q0 */
    move16();
    hGSCDec->cor_strong_limit = 1;
    move16();
    set16_fx( hGSCDec->old_y_gain_fx, 0, MBANDS_GN );
    hGSCDec->noise_lev = NOISE_LEVEL_SP0;
    move16();
    set16_fx( hGSCDec->Last_GSC_spectrum_fx, 0, L_FRAME16k );
    hGSCDec->Last_GSC_pit_band_idx = 0;
    move16();

    set16_fx( hGSCDec->lt_ener_per_band_fx, 4096, MBANDS_GN16k ); /*Q12*/
    set16_fx( hGSCDec->last_exc_dct_in_fx, 0, L_FRAME16k );
    set16_fx( hGSCDec->old_y_gain_fx, 0, MBANDS_GN16k );
    set16_fx( hGSCDec->lt_ener_per_band_fx, 4096, MBANDS_GN16k ); /*Q12*/

    hGSCDec->last_ener_fx = 0;
    move16();
    set16_fx( hGSCDec->last_bitallocation_band, 0, 6 );

    hGSCDec->Last_frame_ener_fx = MAX_32;
    move32();

    return;
}
+70 −844

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -1320,7 +1320,7 @@ ivas_error create_cpe_dec(
        st->is_ism_format = 0;
        move16();

        IF( NE_32( ( error = init_decoder_ivas_fx( st, n, st_ivas->mc_mode ) ), IVAS_ERR_OK ) )
        IF( NE_32( ( error = init_decoder_fx( st, n, st_ivas->mc_mode ) ), IVAS_ERR_OK ) )
        {
            return error;
        }
Loading