Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ #define FIX_2015_PREMPH_SAT_ALT_PART2 /* VA: Add missing scaling factor to be passed to AVQ_cod() */ #define FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH /* VA: Fix Issue 2253 where the encoder and decoder could get out of sync */ #define NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES /* Dolby: Fix basop issue 1967 */ #define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */ /* ##################### End NON-BE switches ########################### */ Loading lib_rend/ivas_crend_fx.c +9 −1 Original line number Diff line number Diff line Loading @@ -94,6 +94,11 @@ ivas_error ivas_Crend_hrtf_init_fx( hHrtf->pIndex_frequency_max[i][j] = NULL; hHrtf->pOut_to_bin_re_fx[i][j] = NULL; hHrtf->pOut_to_bin_im_fx[i][j] = NULL; #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND hHrtf->pOut_to_bin_re_dyn_fx[i][j] = NULL; hHrtf->pOut_to_bin_im_dyn_fx[i][j] = NULL; hHrtf->pIndex_frequency_max_dyn_fx[i][j] = NULL; #endif } } Loading @@ -102,9 +107,12 @@ ivas_error ivas_Crend_hrtf_init_fx( hHrtf->num_iterations_diffuse[j] = 0; move16(); hHrtf->pIndex_frequency_max_diffuse[j] = NULL; hHrtf->pOut_to_bin_diffuse_re_fx[j] = NULL; hHrtf->pOut_to_bin_diffuse_im_fx[j] = NULL; #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND hHrtf->pOut_to_bin_diffuse_re_dyn_fx[j] = NULL; hHrtf->pOut_to_bin_diffuse_im_dyn_fx[j] = NULL; #endif } hHrtf->init_from_rom = 1; Loading lib_util/hrtf_file_reader.c +61 −1 Original line number Diff line number Diff line Loading @@ -179,8 +179,13 @@ static ivas_error read_and_check_hrtf_binary_file_header( static ivas_error check_hrtf_binary_header( ivas_hrtfs_header_t *hrtf_header ) { #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND if ( hrtf_header == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif /* Check the renderer type */ if ( ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_PARAMETRIC ) && Loading Loading @@ -787,7 +792,11 @@ static ivas_error load_reverb_from_binary( if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } } } Loading Loading @@ -954,7 +963,11 @@ static ivas_error TDREND_MIX_LoadHRTF( if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } } } Loading Loading @@ -1723,7 +1736,11 @@ ivas_error load_fastconv_HRTF_from_binary( if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) Loading Loading @@ -1823,7 +1840,11 @@ ivas_error load_parambin_HRTF_from_binary( if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) Loading Loading @@ -1943,7 +1964,11 @@ ivas_error load_Crend_HRTF_from_binary( if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) Loading Loading @@ -2035,6 +2060,7 @@ void destroy_crend_hrtf( } #ifndef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * Loading Loading @@ -2065,6 +2091,7 @@ void destroy_hrtf_statistics( return; } #endif /*---------------------------------------------------------------------* * destroy_fastconv_hrtf() Loading Loading @@ -2100,3 +2127,36 @@ void destroy_parambin_hrtf( return; } #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * * Destroy the HRTF statistics set. *---------------------------------------------------------------------*/ void destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ) { if ( ( hHrtfStatistics != NULL ) && ( *hHrtfStatistics != NULL ) && ( ( *hHrtfStatistics )->fromROM == FALSE ) ) { if ( ( *hHrtfStatistics )->average_energy_l_dyn != NULL ) { free( ( *hHrtfStatistics )->average_energy_l_dyn ); } if ( ( *hHrtfStatistics )->average_energy_r_dyn != NULL ) { free( ( *hHrtfStatistics )->average_energy_r_dyn ); } if ( ( *hHrtfStatistics )->inter_aural_coherence_dyn != NULL ) { free( ( *hHrtfStatistics )->inter_aural_coherence_dyn ); } } ivas_HRTF_statistics_close_fx( hHrtfStatistics ); return; } #endif lib_util/hrtf_file_reader.h +27 −7 Original line number Diff line number Diff line Loading @@ -118,13 +118,17 @@ ivas_error load_reverb_binary( ); /*---------------------------------------------------------------------* * create_SetOfHRTF_from_binary() * load_Crend_HRTF_from_binary() * * Create the HRTF data set from the binary file * Create the Crend HRTF data set from the binary file *---------------------------------------------------------------------*/ ivas_error load_Crend_HRTF_from_binary( #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND IVAS_DEC_HRTF_CREND_HANDLE hHrtfCrend, /* i/o: HRTF CRend handle */ #else IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF, /* i/o: Set of HRTF CRend handle */ #endif const hrtfFileReader *hrtfReader, /* i : pointer to hrtfFileReader handle */ const IVAS_AUDIO_CONFIG OutputConfig, /* i : output audio configuration */ const IVAS_AUDIO_CONFIG hrtf_set_audio_cfg, /* i : HRTF set audio config. */ Loading @@ -134,11 +138,15 @@ ivas_error load_Crend_HRTF_from_binary( /*---------------------------------------------------------------------* * destroy_crend_hrtf() * * Destroy the HRTF data set. * Destroy the Crend HRTF data set *---------------------------------------------------------------------*/ void destroy_crend_hrtf( #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend /* i/o: Crend HRTF handle */ #else IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */ #endif ); /*---------------------------------------------------------------------* Loading Loading @@ -174,7 +182,7 @@ ivas_error load_parambin_HRTF_from_binary( IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin, /* i/o: Parambin HRTF handle */ const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ ); #ifndef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * Loading @@ -184,7 +192,7 @@ ivas_error load_parambin_HRTF_from_binary( void destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ); #endif /*---------------------------------------------------------------------* * destroy_parambin_hrtf() * Loading @@ -205,4 +213,16 @@ void destroy_td_hrtf( IVAS_DEC_HRTF_TD_HANDLE *hHRTF /* i/o: TD rend. HRTF handle */ ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * * free memory allocated for HRTF statistics binary data *---------------------------------------------------------------------*/ void destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ); #endif #endif /* IVAS_HRTF_FILE_READER_H */ Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ #define FIX_2015_PREMPH_SAT_ALT_PART2 /* VA: Add missing scaling factor to be passed to AVQ_cod() */ #define FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH /* VA: Fix Issue 2253 where the encoder and decoder could get out of sync */ #define NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES /* Dolby: Fix basop issue 1967 */ #define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */ /* ##################### End NON-BE switches ########################### */ Loading
lib_rend/ivas_crend_fx.c +9 −1 Original line number Diff line number Diff line Loading @@ -94,6 +94,11 @@ ivas_error ivas_Crend_hrtf_init_fx( hHrtf->pIndex_frequency_max[i][j] = NULL; hHrtf->pOut_to_bin_re_fx[i][j] = NULL; hHrtf->pOut_to_bin_im_fx[i][j] = NULL; #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND hHrtf->pOut_to_bin_re_dyn_fx[i][j] = NULL; hHrtf->pOut_to_bin_im_dyn_fx[i][j] = NULL; hHrtf->pIndex_frequency_max_dyn_fx[i][j] = NULL; #endif } } Loading @@ -102,9 +107,12 @@ ivas_error ivas_Crend_hrtf_init_fx( hHrtf->num_iterations_diffuse[j] = 0; move16(); hHrtf->pIndex_frequency_max_diffuse[j] = NULL; hHrtf->pOut_to_bin_diffuse_re_fx[j] = NULL; hHrtf->pOut_to_bin_diffuse_im_fx[j] = NULL; #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND hHrtf->pOut_to_bin_diffuse_re_dyn_fx[j] = NULL; hHrtf->pOut_to_bin_diffuse_im_dyn_fx[j] = NULL; #endif } hHrtf->init_from_rom = 1; Loading
lib_util/hrtf_file_reader.c +61 −1 Original line number Diff line number Diff line Loading @@ -179,8 +179,13 @@ static ivas_error read_and_check_hrtf_binary_file_header( static ivas_error check_hrtf_binary_header( ivas_hrtfs_header_t *hrtf_header ) { #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND if ( hrtf_header == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif /* Check the renderer type */ if ( ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_PARAMETRIC ) && Loading Loading @@ -787,7 +792,11 @@ static ivas_error load_reverb_from_binary( if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } } } Loading Loading @@ -954,7 +963,11 @@ static ivas_error TDREND_MIX_LoadHRTF( if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } } } Loading Loading @@ -1723,7 +1736,11 @@ ivas_error load_fastconv_HRTF_from_binary( if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) Loading Loading @@ -1823,7 +1840,11 @@ ivas_error load_parambin_HRTF_from_binary( if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) Loading Loading @@ -1943,7 +1964,11 @@ ivas_error load_Crend_HRTF_from_binary( if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; #else return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); #endif } if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) Loading Loading @@ -2035,6 +2060,7 @@ void destroy_crend_hrtf( } #ifndef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * Loading Loading @@ -2065,6 +2091,7 @@ void destroy_hrtf_statistics( return; } #endif /*---------------------------------------------------------------------* * destroy_fastconv_hrtf() Loading Loading @@ -2100,3 +2127,36 @@ void destroy_parambin_hrtf( return; } #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * * Destroy the HRTF statistics set. *---------------------------------------------------------------------*/ void destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ) { if ( ( hHrtfStatistics != NULL ) && ( *hHrtfStatistics != NULL ) && ( ( *hHrtfStatistics )->fromROM == FALSE ) ) { if ( ( *hHrtfStatistics )->average_energy_l_dyn != NULL ) { free( ( *hHrtfStatistics )->average_energy_l_dyn ); } if ( ( *hHrtfStatistics )->average_energy_r_dyn != NULL ) { free( ( *hHrtfStatistics )->average_energy_r_dyn ); } if ( ( *hHrtfStatistics )->inter_aural_coherence_dyn != NULL ) { free( ( *hHrtfStatistics )->inter_aural_coherence_dyn ); } } ivas_HRTF_statistics_close_fx( hHrtfStatistics ); return; } #endif
lib_util/hrtf_file_reader.h +27 −7 Original line number Diff line number Diff line Loading @@ -118,13 +118,17 @@ ivas_error load_reverb_binary( ); /*---------------------------------------------------------------------* * create_SetOfHRTF_from_binary() * load_Crend_HRTF_from_binary() * * Create the HRTF data set from the binary file * Create the Crend HRTF data set from the binary file *---------------------------------------------------------------------*/ ivas_error load_Crend_HRTF_from_binary( #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND IVAS_DEC_HRTF_CREND_HANDLE hHrtfCrend, /* i/o: HRTF CRend handle */ #else IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF, /* i/o: Set of HRTF CRend handle */ #endif const hrtfFileReader *hrtfReader, /* i : pointer to hrtfFileReader handle */ const IVAS_AUDIO_CONFIG OutputConfig, /* i : output audio configuration */ const IVAS_AUDIO_CONFIG hrtf_set_audio_cfg, /* i : HRTF set audio config. */ Loading @@ -134,11 +138,15 @@ ivas_error load_Crend_HRTF_from_binary( /*---------------------------------------------------------------------* * destroy_crend_hrtf() * * Destroy the HRTF data set. * Destroy the Crend HRTF data set *---------------------------------------------------------------------*/ void destroy_crend_hrtf( #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend /* i/o: Crend HRTF handle */ #else IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */ #endif ); /*---------------------------------------------------------------------* Loading Loading @@ -174,7 +182,7 @@ ivas_error load_parambin_HRTF_from_binary( IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin, /* i/o: Parambin HRTF handle */ const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ ); #ifndef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * Loading @@ -184,7 +192,7 @@ ivas_error load_parambin_HRTF_from_binary( void destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ); #endif /*---------------------------------------------------------------------* * destroy_parambin_hrtf() * Loading @@ -205,4 +213,16 @@ void destroy_td_hrtf( IVAS_DEC_HRTF_TD_HANDLE *hHRTF /* i/o: TD rend. HRTF handle */ ); #ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * * free memory allocated for HRTF statistics binary data *---------------------------------------------------------------------*/ void destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ); #endif #endif /* IVAS_HRTF_FILE_READER_H */