Loading apps/decoder.c +25 −23 Original line number Diff line number Diff line Loading @@ -2547,11 +2547,8 @@ static ivas_error decodeG192( fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_CREND_SIMPLIFY_CODE /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { #ifdef FIX_CREND_SIMPLIFY_CODE /* Read main parameters from the bitstream to set-up the decoder */ hHrtfBinary->binaural_renderer_old = hHrtfBinary->binaural_renderer; hHrtfBinary->binaural_renderer_sec_old = hHrtfBinary->binaural_renderer_sec; Loading @@ -2563,6 +2560,9 @@ static ivas_error decodeG192( /* Placeholder for memory reallocation */ /* ... */ /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { if ( ( error = load_hrtf_from_file( hHrtfBinary, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -3127,6 +3127,7 @@ static ivas_error decodeVoIP( #ifdef FIX_CREND_SIMPLIFY_CODE bool bitstreamReadDone = false; #endif vec_pos_update = 0; if ( ( error = IVAS_DEC_GetRenderFramesizeMs( hIvasDec, &systemTimeInc_ms ) ) != IVAS_ERR_OK ) { Loading Loading @@ -3424,11 +3425,9 @@ static ivas_error decodeVoIP( fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_CREND_SIMPLIFY_CODE if ( bitstreamReadDone == true ) { /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { /* Read main parameters from the bitstream to set-up the decoder */ hHrtf->binaural_renderer_old = hHrtf->binaural_renderer; Loading @@ -3441,6 +3440,9 @@ static ivas_error decodeVoIP( /* Placeholder for memory reallocation */ /* ... */ /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { if ( ( error = load_hrtf_from_file( hHrtf, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -3731,7 +3733,6 @@ cleanup: return error; } #ifdef DEBUGGING /*---------------------------------------------------------------------* Loading @@ -3754,6 +3755,7 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( return IVAS_DEC_FORCE_REND_UNDEFINED; } #endif #ifdef FIX_CREND_SIMPLIFY_CODE Loading apps/renderer.c +8 −0 Original line number Diff line number Diff line Loading @@ -617,7 +617,11 @@ static int16_t get_cldfb_in_flag( int16_t cldfb_in_flag; cldfb_in_flag = 0; #ifdef FIX_HRTF_LOAD if ( renderConfig->split_rend_config.rendererSelection == IVAS_BIN_RENDERER_TYPE_FASTCONV ) #else if ( renderConfig->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) #endif { #ifdef DEBUGGING cldfb_in_flag = 1; Loading Loading @@ -1015,7 +1019,11 @@ int main( } #ifdef FIX_CREND_SIMPLIFY_CODE #ifdef FIX_HRTF_LOAD if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, 0, IVAS_AUDIO_CONFIG_INVALID, hrtfFileReader ) ) != IVAS_ERR_OK ) #else if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, args.outConfig.audioConfig, args.inConfig.ambisonicsBuses->audioConfig, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif #else if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif Loading lib_com/common_api_types.h +6 −1 Original line number Diff line number Diff line Loading @@ -259,6 +259,7 @@ typedef enum } ISAR_SPLIT_REND_CODEC; #ifndef FIX_HRTF_LOAD typedef enum { ISAR_SPLIT_REND_RENDERER_SELECTION_CREND, Loading @@ -268,7 +269,7 @@ typedef enum ISAR_SPLIT_REND_RENDERER_SELECTION_DEFAULT, } ISAR_SPLIT_REND_RENDERER_SELECTION; #endif typedef struct _ISAR_SPLIT_REND_BITS_DATA { uint8_t *bits_buf; Loading Loading @@ -299,7 +300,11 @@ typedef struct _ISAR_SPLIT_REND_CONFIG int16_t codec_frame_size_ms; /* Codec frame size in milliseconds, only relevant with LC3plus */ ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode; ISAR_SPLIT_REND_CODEC codec; #ifdef FIX_HRTF_LOAD IVAS_BIN_RENDERER_TYPE rendererSelection; #else ISAR_SPLIT_REND_RENDERER_SELECTION rendererSelection; #endif int16_t lc3plus_highres; } ISAR_SPLIT_REND_CONFIG_DATA, *ISAR_SPLIT_REND_CONFIG_HANDLE; Loading lib_com/ivas_prot.h +24 −6 Original line number Diff line number Diff line Loading @@ -337,10 +337,13 @@ ivas_error ivas_dec_get_format( ); ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); ivas_error create_sce_dec( Loading Loading @@ -685,10 +688,13 @@ ivas_error ivas_mc_enc_config( ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx, /* i : LS config. index */ const int16_t idx /* i : LS config. index */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); /*! r: MC format mode (MCT, McMASA, ParamMC) */ Loading Loading @@ -1115,10 +1121,13 @@ ivas_error ivas_ism_enc_config( ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const ISM_MODE last_ism_mode, /* i/o: last ISM mode */ const ISM_MODE last_ism_mode /* i/o: last ISM mode */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : number of samples flushed on renderer change*/ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); ivas_error ivas_param_ism_dec_open( Loading Loading @@ -3497,10 +3506,13 @@ void ivas_sba_set_cna_cng_flag( ); ivas_error ivas_sba_dec_reconfigure( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesFlushed, /* o : number of samples flushed */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); ivas_error ivas_sba_digest_tc( Loading Loading @@ -4953,10 +4965,13 @@ void ivas_masa_enc_reconfigure( ); ivas_error ivas_masa_dec_reconfigure( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); ivas_error ivas_masa_encode( Loading Loading @@ -5658,10 +5673,13 @@ ivas_error ivas_omasa_enc_config( ); ivas_error ivas_omasa_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); void ivas_omasa_set_config( Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,7 @@ #ifdef FIX_CREND_SIMPLIFY_CODE #define CHECK_BE_USING_OLD_ROM_TABLES_ONLY #define FIX_989_TD_REND_ROM /* Eri: Clean-up for TD renderer and completion of ROM generation tool */ #define FIX_HRTF_LOAD /* VA: issue 1187: fix memory issue when HRTFs are loaded from a binary file */ #ifdef CHECK_BE_USING_OLD_ROM_TABLES_ONLY #define USE_NEW_CREND_ROM_TABLE #ifdef USE_NEW_CREND_ROM_TABLE Loading Loading
apps/decoder.c +25 −23 Original line number Diff line number Diff line Loading @@ -2547,11 +2547,8 @@ static ivas_error decodeG192( fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_CREND_SIMPLIFY_CODE /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { #ifdef FIX_CREND_SIMPLIFY_CODE /* Read main parameters from the bitstream to set-up the decoder */ hHrtfBinary->binaural_renderer_old = hHrtfBinary->binaural_renderer; hHrtfBinary->binaural_renderer_sec_old = hHrtfBinary->binaural_renderer_sec; Loading @@ -2563,6 +2560,9 @@ static ivas_error decodeG192( /* Placeholder for memory reallocation */ /* ... */ /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { if ( ( error = load_hrtf_from_file( hHrtfBinary, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -3127,6 +3127,7 @@ static ivas_error decodeVoIP( #ifdef FIX_CREND_SIMPLIFY_CODE bool bitstreamReadDone = false; #endif vec_pos_update = 0; if ( ( error = IVAS_DEC_GetRenderFramesizeMs( hIvasDec, &systemTimeInc_ms ) ) != IVAS_ERR_OK ) { Loading Loading @@ -3424,11 +3425,9 @@ static ivas_error decodeVoIP( fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_CREND_SIMPLIFY_CODE if ( bitstreamReadDone == true ) { /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { /* Read main parameters from the bitstream to set-up the decoder */ hHrtf->binaural_renderer_old = hHrtf->binaural_renderer; Loading @@ -3441,6 +3440,9 @@ static ivas_error decodeVoIP( /* Placeholder for memory reallocation */ /* ... */ /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { if ( ( error = load_hrtf_from_file( hHrtf, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -3731,7 +3733,6 @@ cleanup: return error; } #ifdef DEBUGGING /*---------------------------------------------------------------------* Loading @@ -3754,6 +3755,7 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( return IVAS_DEC_FORCE_REND_UNDEFINED; } #endif #ifdef FIX_CREND_SIMPLIFY_CODE Loading
apps/renderer.c +8 −0 Original line number Diff line number Diff line Loading @@ -617,7 +617,11 @@ static int16_t get_cldfb_in_flag( int16_t cldfb_in_flag; cldfb_in_flag = 0; #ifdef FIX_HRTF_LOAD if ( renderConfig->split_rend_config.rendererSelection == IVAS_BIN_RENDERER_TYPE_FASTCONV ) #else if ( renderConfig->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) #endif { #ifdef DEBUGGING cldfb_in_flag = 1; Loading Loading @@ -1015,7 +1019,11 @@ int main( } #ifdef FIX_CREND_SIMPLIFY_CODE #ifdef FIX_HRTF_LOAD if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, 0, IVAS_AUDIO_CONFIG_INVALID, hrtfFileReader ) ) != IVAS_ERR_OK ) #else if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, args.outConfig.audioConfig, args.inConfig.ambisonicsBuses->audioConfig, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif #else if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif Loading
lib_com/common_api_types.h +6 −1 Original line number Diff line number Diff line Loading @@ -259,6 +259,7 @@ typedef enum } ISAR_SPLIT_REND_CODEC; #ifndef FIX_HRTF_LOAD typedef enum { ISAR_SPLIT_REND_RENDERER_SELECTION_CREND, Loading @@ -268,7 +269,7 @@ typedef enum ISAR_SPLIT_REND_RENDERER_SELECTION_DEFAULT, } ISAR_SPLIT_REND_RENDERER_SELECTION; #endif typedef struct _ISAR_SPLIT_REND_BITS_DATA { uint8_t *bits_buf; Loading Loading @@ -299,7 +300,11 @@ typedef struct _ISAR_SPLIT_REND_CONFIG int16_t codec_frame_size_ms; /* Codec frame size in milliseconds, only relevant with LC3plus */ ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode; ISAR_SPLIT_REND_CODEC codec; #ifdef FIX_HRTF_LOAD IVAS_BIN_RENDERER_TYPE rendererSelection; #else ISAR_SPLIT_REND_RENDERER_SELECTION rendererSelection; #endif int16_t lc3plus_highres; } ISAR_SPLIT_REND_CONFIG_DATA, *ISAR_SPLIT_REND_CONFIG_HANDLE; Loading
lib_com/ivas_prot.h +24 −6 Original line number Diff line number Diff line Loading @@ -337,10 +337,13 @@ ivas_error ivas_dec_get_format( ); ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); ivas_error create_sce_dec( Loading Loading @@ -685,10 +688,13 @@ ivas_error ivas_mc_enc_config( ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx, /* i : LS config. index */ const int16_t idx /* i : LS config. index */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); /*! r: MC format mode (MCT, McMASA, ParamMC) */ Loading Loading @@ -1115,10 +1121,13 @@ ivas_error ivas_ism_enc_config( ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const ISM_MODE last_ism_mode, /* i/o: last ISM mode */ const ISM_MODE last_ism_mode /* i/o: last ISM mode */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : number of samples flushed on renderer change*/ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); ivas_error ivas_param_ism_dec_open( Loading Loading @@ -3497,10 +3506,13 @@ void ivas_sba_set_cna_cng_flag( ); ivas_error ivas_sba_dec_reconfigure( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesFlushed, /* o : number of samples flushed */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); ivas_error ivas_sba_digest_tc( Loading Loading @@ -4953,10 +4965,13 @@ void ivas_masa_enc_reconfigure( ); ivas_error ivas_masa_dec_reconfigure( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); ivas_error ivas_masa_encode( Loading Loading @@ -5658,10 +5673,13 @@ ivas_error ivas_omasa_enc_config( ); ivas_error ivas_omasa_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef FIX_HRTF_LOAD , uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #endif ); void ivas_omasa_set_config( Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,7 @@ #ifdef FIX_CREND_SIMPLIFY_CODE #define CHECK_BE_USING_OLD_ROM_TABLES_ONLY #define FIX_989_TD_REND_ROM /* Eri: Clean-up for TD renderer and completion of ROM generation tool */ #define FIX_HRTF_LOAD /* VA: issue 1187: fix memory issue when HRTFs are loaded from a binary file */ #ifdef CHECK_BE_USING_OLD_ROM_TABLES_ONLY #define USE_NEW_CREND_ROM_TABLE #ifdef USE_NEW_CREND_ROM_TABLE Loading