Commit 1bde096f authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'ivas-float-update-core_coder_in_debug' into 'ivas-float-update'

IVAS downmix dumping debug code (float ref)

See merge request !840
parents 311956f3 d14ae710
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -201,6 +201,9 @@ ivas_error pre_proc_front_ivas(
    const IVAS_FORMAT ivas_format,                              /* i  : IVAS format                                */
    const int16_t MCT_flag, /* i  : hMCT handle allocated (1) or not (0)    */
    const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                         */
#ifdef DEBUG_MODE_INFO
	, const int16_t ch_idx
#endif
);

ivas_error pre_proc_ivas(
+18 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@
#include "ivas_prot.h"
#include "wmc_auto.h"
#include <math.h>
#ifdef DEBUG_MODE_INFO
#include "string.h"
#endif


/*---------------------------------------------------------------*
@@ -110,6 +113,10 @@ ivas_error pre_proc_front_ivas(
    const IVAS_FORMAT ivas_format,                             /* i  : IVAS format                              */
    const int16_t MCT_flag,                                    /* i  : hMCT handle allocated (1) or not (0)    */
    const int32_t ivas_total_brate                             /* i  : IVAS total bitrate - for setting the DTX */
#ifdef DEBUG_MODE_INFO
    ,
    const int16_t ch_idx
#endif
)
{
    float *inp_12k8, *new_inp_12k8;        /* pointers to current frame and new data       */
@@ -219,6 +226,17 @@ ivas_error pre_proc_front_ivas(
        }
    }

#ifdef DEBUG_MODE_INFO
    {
        int16_t tmp_dmx_in[L_FRAME48k];
        for ( int16_t isample = 0; isample < input_frame; isample++ )
        {
            tmp_dmx_in[isample] = (int16_t) signal_in[isample - NS2SA( st->input_Fs, ACELP_LOOK_NS )];
        }
        dbgwrite( tmp_dmx_in, sizeof( int16_t ), input_frame, 1, strcat( fname( debug_dir, "ivas_input_dmx", 0, ch_idx + 1, ENC ), ".pcm" ) );
    }
#endif

    lMemRecalc_12k8 = 0;
    lMemRecalc = 0;
    if ( element_mode == IVAS_CPE_TD || element_mode == IVAS_CPE_MDCT )
+6 −5
Original line number Diff line number Diff line
@@ -458,10 +458,6 @@ ivas_error ivas_cpe_enc(
    }

#ifdef DEBUG_MODE_INFO
    for ( n = 0; n < n_CoreChannels; n++ )
    {
        dbgwrite( sts[0]->input - NS2SA( sts[0]->input_Fs, ACELP_LOOK_NS ), sizeof( float ), input_frame, 1, fname( debug_dir, "input_DMX", n, sts[n]->id_element, ENC ) );
    }
    dbgwrite( &hCPE->element_mode, sizeof( int16_t ), 1, input_frame, fname( debug_dir, "element_mode", 0, sts[0]->id_element, ENC ) );
#endif

@@ -474,7 +470,12 @@ ivas_error ivas_cpe_enc(
        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_format, st_ivas->hMCT != NULL, ivas_total_brate );
                                     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_format, st_ivas->hMCT != NULL, ivas_total_brate
#ifdef DEBUG_MODE_INFO
                                     ,
                                     ( st_ivas->nSCE + ( cpe_id * CPE_CHANNELS ) + n )
#endif
        );
        if ( error != IVAS_ERR_OK )
        {
            return error;
+6 −1
Original line number Diff line number Diff line
@@ -175,7 +175,12 @@ ivas_error ivas_ism_enc(
        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, ISM_FORMAT, 0, st_ivas->hEncoderConfig->ivas_total_brate );
                                     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, ISM_FORMAT, 0, st_ivas->hEncoderConfig->ivas_total_brate
#ifdef DEBUG_MODE_INFO
                                     ,
                                     st->id_element
#endif
        );
        if ( error != IVAS_ERR_OK )
        {
            return error;
+6 −2
Original line number Diff line number Diff line
@@ -172,7 +172,6 @@ ivas_error ivas_sce_enc(
    }

#ifdef DEBUG_MODE_INFO
    dbgwrite( st->input - NS2SA( st->input_Fs, ACELP_LOOK_NS ), sizeof( float ), input_frame, 1, "res/input_DMX" );
    dbgwrite( &st->element_mode, sizeof( int16_t ), 1, input_frame, fname( debug_dir, "element_mode", 0, st->id_element, ENC ) );
#endif

@@ -184,7 +183,12 @@ ivas_error ivas_sce_enc(
                                 &ener[0], &relE[0], A[0], Aw[0], epsP[0], lsp_new[0], lsp_mid[0], &vad_hover_flag[0], &attack_flag[0],
                                 realBuffer[0], imagBuffer[0], old_wsp[0], pitch_fr[0], voicing_fr[0], &loc_harm[0], &cor_map_sum[0], &vad_flag_dtx[0], enerBuffer[0],
                                 fft_buff[0], A[0], lsp_new[0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, flag_16k_smc,
                                 st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->force_front_vad : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_dtx_flag : 0, ivas_format, 0, st_ivas->hEncoderConfig->ivas_total_brate );
                                 st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->force_front_vad : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_dtx_flag : 0, ivas_format, 0, st_ivas->hEncoderConfig->ivas_total_brate
#ifdef DEBUG_MODE_INFO
                                 ,
                                 st->id_element
#endif
    );
    if ( error != IVAS_ERR_OK )
    {
        return error;
+1 −1

File changed.

Contains only whitespace changes.

Loading