Commit adc274ab authored by emerit's avatar emerit
Browse files

bugs corrections, warnings removal

parent 0fd7baab
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -1213,11 +1213,7 @@ ivas_error ivas_init_decoder(
    /*-----------------------------------------------------------------*
     * LFE handles for rendering after rendering to adjust LFE delay to binaural filter delay
     *-----------------------------------------------------------------*/
#ifdef FIX_FIX_I59
    if ( ( st_ivas->mc_mode == MC_MODE_MCT ) || ( st_ivas->mc_mode == MC_MODE_PARAMMC ) )
#else  
    if ( st_ivas->mc_mode == MC_MODE_MCT )
#endif
    {
#ifdef FIX_I59_LFE_TD_DELAY
        binauralization_delay_ns = st_ivas->binaural_latency_ns;
+33 −4
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ file_name_7_1_root = 'test_8ch_'
file_name_7_1_4_root = 'dirac_12ch_'

sampleRates = ['48', '16', '32']
# sampleRates = ['48']

for sr in sampleRates:
    file_name_7_1_4 = inpath + file_name_7_1_4_root + sr + 'k'
@@ -56,7 +57,7 @@ for sr in sampleRates:
    subprocess.call(cmd, shell=False)

    # encode 7.1 64kb PARAMMC
    cmd = [ivas_cod_exe, '-MC', '7_1', '-max_band', 'FB', '128000', sr,
    cmd = [ivas_cod_exe, '-MC', '7_1', '-max_band', 'FB', '64000', sr,
           file_name_7_1 + '.wav',   file_name_7_1 + '_64kb.ptk']

    print(' '.join(cmd))
@@ -76,6 +77,21 @@ for sr in sampleRates:
    print(' '.join(cmd))
    subprocess.call(cmd, shell=False)

# -render_config testv/config_renderer.cfg
#     # decode binaural crend 7.1.4
#     cmd = [ivas_dec_exe, '-render_config', 'script/testv/config_renderer_fastconv.cfg', 'BINAURAL', sr,  file_name_7_1_4 +
#            '_512kb.ptk',   file_name_7_1_4 + '-hrir.wav']

#     print(' '.join(cmd))
#     subprocess.call(cmd, shell=False)

#     # decode binaural room crend 7.1.4
#     cmd = [ivas_dec_exe, 'BINAURAL_ROOM', sr,
#            file_name_7_1_4 + '_128kb.ptk',  file_name_7_1_4 + '-parammc_brir.wav']

#     print(' '.join(cmd))
#     subprocess.call(cmd, shell=False)

    # decode binaural crend 7.1.4
    cmd = [ivas_dec_exe, 'BINAURAL', sr,  file_name_7_1_4 +
           '_512kb.ptk',   file_name_7_1_4 + '-hrir.wav']
@@ -85,11 +101,24 @@ for sr in sampleRates:

    # decode binaural room crend 7.1.4
    cmd = [ivas_dec_exe, 'BINAURAL_ROOM', sr,
           file_name_7_1_4 + '_512kb.ptk',  file_name_7_1_4 + '-brir.wav']
           file_name_7_1_4 + '_128kb.ptk',  file_name_7_1_4 + '-parammc_brir.wav']

    print(' '.join(cmd))
    subprocess.call(cmd, shell=False)

    # decode binaural crend 7.1.4
    cmd = [ivas_dec_exe, 'BINAURAL', sr,  file_name_7_1_4 +
           '_128kb.ptk',   file_name_7_1_4 + '-parammc_hrir.wav']

    print(' '.join(cmd))
    subprocess.call(cmd, shell=False)

    # decode binaural room crend 7.1.4
    cmd = [ivas_dec_exe, 'BINAURAL_ROOM', sr,
           file_name_7_1_4 + '_512kb.ptk',  file_name_7_1_4 + '-brir.wav']

    print(' '.join(cmd))
    subprocess.call(cmd, shell=False)
    # decode binaural crend 7.1
    cmd = [ivas_dec_exe, 'BINAURAL', sr,  file_name_7_1 +
           '_512kb.ptk',  file_name_7_1 + '-hrir.wav']
@@ -106,14 +135,14 @@ for sr in sampleRates:

    # decode binaural fastconv 7.1
    cmd = [ivas_dec_exe, 'BINAURAL', sr,  file_name_7_1 +
           '_64kb.ptk',  file_name_7_1 + '-fastconv-hrir.wav']
           '_64kb.ptk',  file_name_7_1 + '-parammc-hrir.wav']

    print(' '.join(cmd))
    subprocess.call(cmd, shell=False)

    # decode binaural room fastconv 7.1
    cmd = [ivas_dec_exe, 'BINAURAL_ROOM', sr,  file_name_7_1 +
           '_64kb.ptk',  file_name_7_1 + '-fastconv-brir.wav']
           '_64kb.ptk',  file_name_7_1 + '-parammc-brir.wav']

    print(' '.join(cmd))
    subprocess.call(cmd, shell=False)
+10 −6
Original line number Diff line number Diff line
@@ -110,10 +110,14 @@ typedef struct ivas_crend_io_params_t
    char out_path[IVAS_MAX_PATH_LEN];
    char prox_path[IVAS_MAX_PATH_LEN];
    char csv_path[IVAS_MAX_PATH_LEN];
#ifdef FIX_FIX_I59
    int32_t latency_ns;
#else
    float latency_s;
    int32_t use_brir;
    int32_t lfe_lp_enable;
    int32_t limiter_enable;
#endif
    int16_t use_brir;
    int16_t lfe_lp_enable;
    int16_t limiter_enable;
    ivas_crend_sanity_test_inp_t sanity_test;
    float no_diegetic_pan;
    float tol;
+5 −5
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ int16_t ivas_get_num_channels( const int16_t ch_format );

ivas_result_t ivas_crend_copy_hrtf_data( HRTFS_DATA *hHrtf, HRTFS_DATA *pCrend_hrtfs );

int32_t ivas_wrapper_get_frame_len( int32_t sample_rate );
int16_t ivas_wrapper_get_frame_len( int32_t sample_rate );

ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, float *mixer );

+55 −48
Original line number Diff line number Diff line
@@ -348,7 +348,7 @@ static ivas_result_t ivas_crend_proximity_test( ivas_crend_io_params_t *pIo_para
                printf( "Ref file finished\n" );
                goto DONE;
            }
            acc_0f = (float) ( ref ) * ( 1.0 / PCM16_TO_FLT_FAC );
            acc_0f = (float) ( ref ) * ( 1.0f / PCM16_TO_FLT_FAC );

            /* compare to output from object mixer-renderer call above */
            if ( ( AudioFileReader_read( fOut, &out, 1, &numRead ) != IVAS_ERR_OK ) || ( numRead == 0 ) )
@@ -356,7 +356,7 @@ static ivas_result_t ivas_crend_proximity_test( ivas_crend_io_params_t *pIo_para
                printf( "Output file finished\n" );
                goto DONE;
            }
            out_0f = (float) ( out ) * ( 1.0 / PCM16_TO_FLT_FAC );
            out_0f = (float) ( out ) * ( 1.0f / PCM16_TO_FLT_FAC );

            /* check if much different.. */
            if ( fabs( out_0f - acc_0f ) > TC_TOL )
@@ -369,7 +369,6 @@ static ivas_result_t ivas_crend_proximity_test( ivas_crend_io_params_t *pIo_para
    }



#endif
DONE:
    if ( test == PASS )
@@ -445,7 +444,11 @@ static ivas_result_t ivas_crend_binaural_test( ivas_crend_io_params_t *pIo_param
    if ( pIo_params->fRef )
    {
        ivas_wav_header_skip( pIo_params->fRef );
#ifdef FIX_FIX_I59
        skip_samples = NS2SA( pIo_params->sample_rate, (float) Io_params->latency_ns + 0.5f );
#else
        skip_samples = (int32_t) ( pIo_params->latency_s * pIo_params->sample_rate );
#endif
        if ( pIo_params->no_delay_cmp == 0 )
        {
            skip_bytes = skip_samples * ivas_get_num_channels( BIN_2 ) * sizeof( int16_t );
@@ -499,7 +502,11 @@ static ivas_result_t ivas_crend_binaural_test( ivas_crend_io_params_t *pIo_param
        AudioFileReader_open( &fOut, pIo_params->out_path, pIo_params->sample_rate );
        AudioFileReader_open( &fRef, pIo_params->ref_path, pIo_params->sample_rate );

#ifdef FIX_FIX_I59
        skip_samples = NS2SA( pIo_params->sample_rate, (float) pIo_params->latency_ns + 0.5f );
#else
        skip_samples = (int32_t) ( pIo_params->latency_s * pIo_params->sample_rate );
#endif
        /* skip intial samples based on latency */
        int16_t tail = 0;
        int32_t tail_zeros = 0;
@@ -635,11 +642,11 @@ static ivas_result_t ivas_crend_no_diegetic_test( ivas_crend_io_params_t *pIo_pa
        {
            if ( ( AudioFileReader_read( fRef, &ref, 1, &numRead ) != IVAS_ERR_OK ) || ( numRead == 0 ) )
                goto DONE;
            ref_f = (float) ( ref ) * ( 1.0 / PCM16_TO_FLT_FAC );
            ref_f = (float) ( ref ) * ( 1.0f / PCM16_TO_FLT_FAC );

            if ( ( AudioFileReader_read( fOut, &out, 1, &numRead ) != IVAS_ERR_OK ) || ( numRead == 0 ) )
                goto DONE;
            out_f = (float) ( out ) * ( 1.0 / PCM16_TO_FLT_FAC );
            out_f = (float) ( out ) * ( 1.0f / PCM16_TO_FLT_FAC );

            if ( fabs( out_f - ref_f ) > TC_TOL )
                test = FAIL;
Loading