Commit 292c5cf4 authored by emerit's avatar emerit
Browse files

fix missing switches

parent 4ca28c70
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -237,8 +237,10 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
            return "Acoustic environment not supported";
        case IVAS_ERR_INVALID_HRTF:
            return "Unsupported HRTF filter set";
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
        case IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA:
            return "Renderer data missing in HRTF binary file";
#endif
        case IVAS_ERR_INVALID_INPUT_FORMAT:
            return "Invalid input format";
        case IVAS_ERR_INVALID_INDEX:
+27 −23
Original line number Diff line number Diff line
@@ -2244,7 +2244,7 @@ static ivas_error ivas_rend_initCrend(
#endif
                        for ( j = 0; j < BINAURAL_CHANNELS; j++ )
                        {
#ifndef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
                            hHrtf->inv_diffuse_weight[j][i] = CRendBin_HOA2_HRIR_inv_diffuse_weight_48kHz[j][i];
#endif
                            hHrtf->num_iterations[i][j] = CRendBin_HOA2_HRIR_num_iterations_48kHz[i][j];
@@ -2610,7 +2610,9 @@ static ivas_error ivas_rend_initCrend(
#endif
                    for ( j = 0; j < BINAURAL_CHANNELS; j++ )
                    {
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
                        hHrtf->inv_diffuse_weight[j][i] = hSetOfHRTF->hHRTF_hrir_hoa2->inv_diffuse_weight[j][i];
#endif
                        hHrtf->num_iterations[i][j] = hSetOfHRTF->hHRTF_hrir_hoa2->num_iterations[i][j];
                        hHrtf->pIndex_frequency_max[i][j] = hSetOfHRTF->hHRTF_hrir_hoa2->pIndex_frequency_max[i][j];
                        hHrtf->pOut_to_bin_re[i][j] = hSetOfHRTF->hHRTF_hrir_hoa2->pOut_to_bin_re[i][j];
@@ -4335,11 +4337,11 @@ static ivas_error ivas_rend_crendConvolver(
        pIn = &pcm_in[idx_in][i_ts * subframe_length];
        if ( idx_in != lfe_idx_in )
        {
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
            if ( pCrend->hHrtfCrend->num_iterations_diffuse[0] > 0 )
            {
                if ( pCrend->hHrtfCrend->same_inv_diffuse_weight )
                {
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
                    pFreq_filt_re = &hCrend->freq_buffer_re_fx[i][offset];
                    pFreq_filt_im = &hCrend->freq_buffer_im_fx[i][offset];
                    for ( k = 0; k < pCrend->hHrtfCrend->index_frequency_max_diffuse; k++ )
@@ -4366,6 +4368,8 @@ static ivas_error ivas_rend_crendConvolver(
            pFreq_filt_im = &hCrend->freq_buffer_im_fx[i][offset];

            ivas_mdft_fx( pIn, pFreq_filt_re, pFreq_filt_im, subframe_length, subframe_length );
            i++;
        }
#else
            if ( pCrend->hHrtfCrend->num_iterations_diffuse[0] > 0 )
            {
@@ -4384,13 +4388,13 @@ static ivas_error ivas_rend_crendConvolver(

            ivas_mdft_fx( pIn, pFreq_buf_re, pFreq_buf_im, subframe_length, subframe_length );

#endif
#ifdef DEBUGGING
            dbgwrite_txt( pFreq_buf_re, subframe_length, "Fixed_pFreq_buf_re_mdft.txt", NULL );
            dbgwrite_txt( pFreq_buf_im, subframe_length, "Fixed_pFreq_buf_im_mdft.txt", NULL );
#endif
            i++;
        }
#endif
    }

#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
+2 −1
Original line number Diff line number Diff line
@@ -232,6 +232,7 @@ ivas_error ivas_dirac_dec_init_binaural_data(
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
            if ( ( error = ivas_binaural_reverb_init( &hDiracDecBin->hReverb, st_ivas->hHrtfStatistics, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, &( st_ivas->hRenderConfig->roomAcoustics ), output_Fs, ( *phHrtfParambin )->parametricReverberationTimes, ( *phHrtfParambin )->parametricReverberationEneCorrections ) ) != IVAS_ERR_OK )
#else
                /* Todo Philips: Room acoustics should be passed here once the underlying part works. Probably enough to pick it from st_ivas but you know best. */
                if ( ( error = ivas_binaural_reverb_open_parambin( &hDiracDecBin->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, output_Fs, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
#endif
            {
+9 −0
Original line number Diff line number Diff line
@@ -1378,7 +1378,16 @@ ivas_error ivas_binaural_reverb_open_fastconv(
    REVERB_STRUCT_HANDLE *hReverbPr,                            /* i/o: binaural reverb handle                  */
    const int16_t numBins,                                      /* i  : number of CLDFB bins                    */
    const int16_t numCldfbSlotsPerFrame,                        /* i  : number of CLDFB slots per frame         */
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics,             /* i/o: room acoustics parameters               */
    const AUDIO_CONFIG internal_config,                         /* i  : internal audio config for FastConv      */
    const int32_t sampling_rate,                                /* i  : sampling rate                           */
    const HRTFS_FASTCONV_HANDLE hHrtfFastConv                   /* i  : FastConv HRTF handle                    */
);

ivas_error ivas_binaural_reverb_open_parambin(
    REVERB_STRUCT_HANDLE *hReverbPr,                            /* i/o: binaural reverb handle                  */
    const int16_t numBins,                                      /* i  : number of CLDFB bins                    */
    const int16_t numCldfbSlotsPerFrame,                        /* i  : number of CLDFB slots per frame         */
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics,             /* i/o: room acoustics parameters               */
    const int32_t sampling_rate,                                /* i  : sampling rate                           */
    const HRTFS_PARAMBIN_HANDLE hHrtfParambin                   /* i  : Parametric binauralizer HRTF handle     */
+163 −63

File changed.

Preview size limit exceeded, changes collapsed.

Loading