Commit d86d7699 authored by multrus's avatar multrus
Browse files

[cleanup] accept LOW_RATE_TRANS_CORE_CODER

parent c1eb8dbb
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -202,12 +202,7 @@ ivas_error pre_proc_front_ivas(
    const int16_t front_vad_flag,                               /* i  : front-VAD flag to overwrite VAD decision   */
    const int16_t force_front_vad,                              /* i  : flag to force VAD decision                 */
    const int16_t front_vad_dtx_flag,                           /* i  : front-VAD DTX flag to overwrite VAD decision*/
#ifdef LOW_RATE_TRANS_CORE_CODER
    const int32_t ivas_total_brate                             /* i  : IVAS total bitrate                         */
#else
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                         */
    const int16_t ivas_format                                   /* i  : IVAS format                                */
#endif
);

ivas_error pre_proc_ivas(
+0 −1
Original line number Diff line number Diff line
@@ -141,7 +141,6 @@
#define DISABLE_ADAP_RES_COD_TMP                        /* temporary fix for IVAS-403, disables adaptive residual coding */
/*#define ITD_WINNER_GAIN_MODIFY */                     /* ITD optimization - WORK IN PROGRESS */
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define LOW_RATE_TRANS_CORE_CODER                       /* Eri: Activate low-rate-encoding-of-transients contribution for core coder, affects MC, MASA and SBA */
#define FIX_197_CREND_INTERFACE
#define FIX_329_ENABLE_TD_RENDERER_REVERB_MC            /* Eri: Enable reverb for TD renderer for 5.1 and 7.1 with headtracking enabled for IVAS_dec */
#define FIX_330_ENABLE_TD_RENDERER_REVERB_REND          /* Eri: Enable reverb for TD renderer for ISM, 5.1 and 7.1 with headtracking enabled for IVAS_rend */
+0 −9
Original line number Diff line number Diff line
@@ -107,12 +107,7 @@ ivas_error pre_proc_front_ivas(
    const int16_t front_vad_flag,                              /* i  : front-VAD flag to overwrite VAD decision */
    const int16_t force_front_vad,                             /* i  : flag to force VAD decision               */
    const int16_t front_vad_dtx_flag,                          /* i  : front-VAD DTX flag to overwrite VAD decision*/
#ifdef LOW_RATE_TRANS_CORE_CODER
    const int32_t ivas_total_brate /* i  : IVAS total bitrate - for setting the DTX */
#else
    const int32_t ivas_total_brate, /* i  : IVAS total bitrate - for setting the DTX */
    const int16_t ivas_format       /* i  : IVAS format                              */
#endif

)
{
@@ -811,11 +806,7 @@ ivas_error pre_proc_front_ivas(
            }
        }
        /* Switch to ACELP for non-harmonic transient signals */
#ifdef LOW_RATE_TRANS_CORE_CODER
        else if ( ( ( element_mode >= IVAS_CPE_DFT && element_brate <= IVAS_16k4 ) || ( element_mode == IVAS_SCE && element_brate < SCE_SMC_THR ) ) && ( loc_harm[0] != 1 ) && smc_dec == MUSIC )
#else
        else if ( ( ( ivas_format == STEREO_FORMAT && element_brate <= IVAS_16k4 ) || ( ivas_format == ISM_FORMAT && element_brate < SCE_SMC_THR ) ) && ( loc_harm[0] != 1 ) && smc_dec == MUSIC )
#endif
        {
            if ( element_mode == IVAS_SCE )
            {
+0 −8
Original line number Diff line number Diff line
@@ -429,19 +429,11 @@ ivas_error ivas_cpe_enc(

    for ( n = 0; n < n_CoreChannels; n++ )
    {
#ifdef LOW_RATE_TRANS_CORE_CODER
        error = pre_proc_front_ivas( NULL, hCPE, hCPE->element_brate, nb_bits_metadata, input_frame, n, old_inp_12k8[n], old_inp_16k[n],
                                     &ener[n], &relE[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n],
                                     &vad_hover_flag[n], &attack_flag[n], realBuffer[n], imagBuffer[n], old_wsp[n], pitch_fr[n], voicing_fr[n], &loc_harm[n], &cor_map_sum[n], &vad_flag_dtx[n], enerBuffer[n],
                                     fft_buff[n], A[0], lsp_new[0], currFlatness[n], tdm_ratio_idx, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, band_energies_LR, 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, 0, 0,
                                     ivas_total_brate );
#else
        error = pre_proc_front_ivas( NULL, hCPE, hCPE->element_brate, nb_bits_metadata, input_frame, n, old_inp_12k8[n], old_inp_16k[n],
                                     &ener[n], &relE[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n],
                                     &vad_hover_flag[n], &attack_flag[n], realBuffer[n], imagBuffer[n], old_wsp[n], pitch_fr[n], voicing_fr[n], &loc_harm[n], &cor_map_sum[n], &vad_flag_dtx[n], enerBuffer[n],
                                     fft_buff[n], A[0], lsp_new[0], currFlatness[n], tdm_ratio_idx, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, band_energies_LR, 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, 0, 0,
                                     ivas_total_brate, st_ivas->hEncoderConfig->ivas_format );
#endif
        if ( error != IVAS_ERR_OK )
        {
            return error;
+0 −8
Original line number Diff line number Diff line
@@ -158,19 +158,11 @@ ivas_error ivas_ism_enc(
         * Front Pre-processing
         *----------------------------------------------------------------*/

#ifdef LOW_RATE_TRANS_CORE_CODER
        error = pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata[sce_id], input_frame, 0, old_inp_12k8[sce_id][0], old_inp_16k[sce_id][0],
                                     &ener[sce_id][0], &relE[sce_id][0], A[sce_id][0], Aw[sce_id][0], epsP[sce_id][0], lsp_new[sce_id][0], lsp_mid[sce_id][0],
                                     &vad_hover_flag[sce_id][0], &attack_flag[sce_id][0], realBuffer[sce_id][0], imagBuffer[sce_id][0], old_wsp[sce_id][0], pitch_fr[sce_id][0], voicing_fr[sce_id][0], &loc_harm[sce_id][0], &cor_map_sum[sce_id][0], &vad_flag_dtx[sce_id][0], enerBuffer[sce_id][0],
                                     fft_buff[sce_id][0], A[sce_id][0], lsp_new[sce_id][0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, 0, 0, 0, 0,
                                     st_ivas->hEncoderConfig->ivas_total_brate );
#else
        error = pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata[sce_id], input_frame, 0, old_inp_12k8[sce_id][0], old_inp_16k[sce_id][0],
                                     &ener[sce_id][0], &relE[sce_id][0], A[sce_id][0], Aw[sce_id][0], epsP[sce_id][0], lsp_new[sce_id][0], lsp_mid[sce_id][0],
                                     &vad_hover_flag[sce_id][0], &attack_flag[sce_id][0], realBuffer[sce_id][0], imagBuffer[sce_id][0], old_wsp[sce_id][0], pitch_fr[sce_id][0], voicing_fr[sce_id][0], &loc_harm[sce_id][0], &cor_map_sum[sce_id][0], &vad_flag_dtx[sce_id][0], enerBuffer[sce_id][0],
                                     fft_buff[sce_id][0], A[sce_id][0], lsp_new[sce_id][0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, 0, 0, 0, 0,
                                     st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->hEncoderConfig->ivas_format );
#endif
        if ( error != IVAS_ERR_OK )
        {
            return error;
Loading