Commit ca00d3da authored by vaclav's avatar vaclav
Browse files

align init_encoder() interface

parent 9635c6b2
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -2250,8 +2250,6 @@ ivas_error init_encoder(
    Encoder_State *st,           /* i/o: state structure                        */
    Encoder_Struct *st_ivas,     /* i/o: encoder state structure                */
    const int16_t idchan,        /* i  : channel ID                             */
    const int16_t var_SID_rate_flag, /* i  : flag for variable SID update rate      */
    const int16_t interval_SID,      /* i  : interval for SID update                */
    const int16_t vad_only_flag, /* i  : flag to indicate front-VAD structure   */
    const ISM_MODE ism_mode,     /* i  : ISM mode                               */
    const int32_t element_brate  /* element bitrate                             */
+7 −9
Original line number Diff line number Diff line
@@ -57,8 +57,6 @@ ivas_error init_encoder(
    Encoder_State *st,           /* i/o: state structure                      */
    Encoder_Struct *st_ivas,     /* i/o: encoder state structure              */
    const int16_t idchan,        /* i  : channel ID                           */
    const int16_t var_SID_rate_flag, /* i  : flag for variable SID update rate    */
    const int16_t interval_SID,      /* i  : interval for SID update              */
    const int16_t vad_only_flag, /* i  : flag to indicate front-VAD structure */
    const ISM_MODE ism_mode,     /* i  : ISM mode                             */
    const int32_t element_brate  /* i  : element bitrate                      */
@@ -438,7 +436,7 @@ ivas_error init_encoder(
        {
            return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DTX variables\n" ) );
        }
        dtx_enc_init( st, var_SID_rate_flag, interval_SID );
        dtx_enc_init( st, st_ivas->hEncoderConfig->var_SID_rate_flag, st_ivas->hEncoderConfig->interval_SID );
    }
    else
    {
+1 −1
Original line number Diff line number Diff line
@@ -925,7 +925,7 @@ ivas_error create_cpe_enc(
        st->total_brate = hCPE->element_brate / ( st_ivas->nCPE > 1 ? 1 : CPE_CHANNELS ); /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */
        st->mct_chan_mode = MCT_CHAN_MODE_REGULAR;

        if ( ( error = init_encoder( st, st_ivas, n, hEncoderConfig->var_SID_rate_flag, hEncoderConfig->interval_SID, 0, ISM_MODE_NONE, hCPE->element_brate ) ) != IVAS_ERR_OK )
        if ( ( error = init_encoder( st, st_ivas, n, 0, ISM_MODE_NONE, hCPE->element_brate ) ) != IVAS_ERR_OK )
        {
            return error;
        }
+1 −1
Original line number Diff line number Diff line
@@ -367,7 +367,7 @@ ivas_error create_sce_enc(
    st->total_brate = hSCE->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */
    st->mct_chan_mode = MCT_CHAN_MODE_REGULAR;

    if ( ( error = init_encoder( st, st_ivas, 0, st_ivas->hEncoderConfig->var_SID_rate_flag, st_ivas->hEncoderConfig->interval_SID, 0, st_ivas->ism_mode, hSCE->element_brate ) ) != IVAS_ERR_OK )
    if ( ( error = init_encoder( st, st_ivas, 0, 0, st_ivas->ism_mode, hSCE->element_brate ) ) != IVAS_ERR_OK )
    {
        return error;
    }
+1 −1
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ ivas_error ivas_spar_enc_open(
            hSpar->hCoreCoderVAD->total_brate = hEncoderConfig->ivas_total_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */
            hSpar->hCoreCoderVAD->mct_chan_mode = MCT_CHAN_MODE_IGNORE;

            if ( ( error = init_encoder( hSpar->hCoreCoderVAD, st_ivas, 0, hEncoderConfig->var_SID_rate_flag, hEncoderConfig->interval_SID, 1, st_ivas->ism_mode, hSpar->hCoreCoderVAD->total_brate ) ) != IVAS_ERR_OK )
            if ( ( error = init_encoder( hSpar->hCoreCoderVAD, st_ivas, 0, 1, st_ivas->ism_mode, hSpar->hCoreCoderVAD->total_brate ) ) != IVAS_ERR_OK )
            {
                return error;
            }