Loading apps/decoder.c +0 −166 Original line number Diff line number Diff line Loading @@ -156,7 +156,6 @@ typedef struct } DecArguments; #ifdef FIX_HRTF_LOAD typedef struct { hrtfFileReader *hrtfReader; Loading @@ -176,7 +175,6 @@ typedef struct } IVAS_DEC_HRTF_BINARY_WRAPPER; #endif /*------------------------------------------------------------------------------------------* * Local functions prototypes Loading @@ -184,14 +182,9 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); #ifdef FIX_HRTF_LOAD static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec ); static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const int32_t output_Fs ); #else static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec ); #endif #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); Loading Loading @@ -228,13 +221,7 @@ int main( RenderConfigReader *renderConfigReader = NULL; int16_t *pcmBuf = NULL; IVAS_RENDER_FRAMESIZE asked_frame_size; #ifdef FIX_HRTF_LOAD IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary; #else IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL; #endif #ifdef DEBUGGING int32_t noClipping; int32_t cnt_frames_limited; Loading @@ -251,11 +238,9 @@ int main( reset_mem( USE_BYTES ); #endif #ifdef FIX_HRTF_LOAD hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ hHrtfBinary.hSetOfHRTF = NULL; /* just to avoid compilation warning */ hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */ #endif splitRendBits.bits_buf = splitRendBitsBuf; Loading Loading @@ -739,111 +724,12 @@ int main( if ( arg.hrtfReaderEnabled ) { #ifdef FIX_HRTF_LOAD hHrtfBinary.hrtfReader = hrtfReader; hHrtfBinary.hrtfFileName = arg.hrtfFileName; hHrtfBinary.binaural_renderer = IVAS_BIN_RENDERER_TYPE_NONE; hHrtfBinary.binaural_renderer_sec = IVAS_BIN_RENDERER_TYPE_NONE; hHrtfBinary.room_reverb_flag = 0; hHrtfBinary.intern_audio_config = IVAS_AUDIO_CONFIG_INVALID; #else if ( ( error = IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_td_hrtf( hHrtfTD ); } } if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } } IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; if ( ( error = IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfFastConvHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_fastconv_hrtf( hHrtfFastConv ); } } IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; if ( ( error = IVAS_DEC_GetHrtfParamBinHandle( hIvasDec, &hHrtfParambin ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfParamBinHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_parambin_hrtf( hHrtfParambin ); } } if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_reverb_binary( *hHrtfStatistics, arg.output_Fs, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_hrtf_statistics( hHrtfStatistics ); } } #endif } /*------------------------------------------------------------------------------------------* Loading @@ -865,19 +751,11 @@ int main( if ( arg.voipMode ) { #ifdef FIX_HRTF_LOAD error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec ); #else error = decodeVoIP( arg, hBsReader, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec ); #endif } else { #ifdef FIX_HRTF_LOAD error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf ); #else error = decodeG192( arg, hBsReader, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf ); #endif } if ( error == IVAS_ERR_OK || error == IVAS_ERR_END_OF_FILE ) Loading @@ -893,11 +771,7 @@ int main( } else { #ifdef FIX_HRTF_LOAD fprintf( stderr, "\nDecoding finished prematurely: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); #else fprintf( stdout, "Decoding finished prematurely\n\n" ); #endif goto cleanup; } Loading Loading @@ -933,20 +807,9 @@ cleanup: #endif if ( arg.hrtfReaderEnabled ) { #ifdef FIX_HRTF_LOAD destroy_td_hrtf( hHrtfBinary.hHrtfTD ); destroy_SetOfHRTF( hHrtfBinary.hSetOfHRTF ); destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics ); #else IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); destroy_td_hrtf( hHrtfTD ); IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); destroy_SetOfHRTF( hSetOfHRTF ); IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ); destroy_hrtf_statistics( hHrtfStatistics ); #endif } IVAS_DEC_Close( &hIvasDec ); Loading Loading @@ -2137,9 +2000,7 @@ static ivas_error initOnFirstGoodFrame( static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, #ifdef FIX_HRTF_LOAD IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, #endif RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Loading Loading @@ -2495,23 +2356,13 @@ static ivas_error decodeG192( } } #endif #ifdef FIX_HRTF_LOAD /* Feed into decoder and decode transport channels */ if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) #else /* Feed into decoder */ if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi , isSplitRend, splitRendBits ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_HRTF_LOAD /* 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 Loading @@ -2539,7 +2390,6 @@ static ivas_error decodeG192( return error; } #endif /* Object metadata editing */ if ( arg.objEditEnabled ) { Loading Loading @@ -3071,9 +2921,7 @@ static ivas_error writeJbmTraceFileFrameWrapper( const void *data, void *writer static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, #ifdef FIX_HRTF_LOAD IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, #endif RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Loading Loading @@ -3124,9 +2972,7 @@ static ivas_error decodeVoIP( int16_t vec_pos_update, vec_pos_len; int16_t nOutSamples = 0; #ifdef FIX_HRTF_LOAD bool bitstreamReadDone = false; #endif bool parameterAvailableForEditing = false; uint16_t nSamplesRendered = 0; Loading Loading @@ -3413,23 +3259,14 @@ static ivas_error decodeVoIP( while ( nSamplesRendered < nOutSamples ) { #ifdef SUPPORT_JBM_TRACEFILE #ifdef FIX_HRTF_LOAD if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &nSamplesRendered, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #endif #else #ifdef FIX_HRTF_LOAD if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, &nSamplesRendered, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, &nSamplesRendered, ¶meterAvailableForEditing ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_HRTF_LOAD if ( bitstreamReadDone == true ) { Loading @@ -3455,7 +3292,6 @@ static ivas_error decodeVoIP( } } #endif /* Object metadata editing */ if ( arg.objEditEnabled && parameterAvailableForEditing == true ) { Loading Loading @@ -3838,7 +3674,6 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( } #endif #ifdef FIX_HRTF_LOAD /*---------------------------------------------------------------------* * IVAS_DEC_LoadHrtfFromFile() Loading Loading @@ -4014,6 +3849,5 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( return IVAS_ERR_OK; } #endif #undef WMC_TOOL_SKIP apps/renderer.c +0 −8 Original line number Diff line number Diff line Loading @@ -615,11 +615,7 @@ 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 @@ -949,11 +945,7 @@ int main( goto cleanup; } #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, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading lib_com/common_api_types.h +0 −17 Original line number Diff line number Diff line Loading @@ -210,7 +210,6 @@ typedef struct _IVAS_JBM_TRACE_DATA } IVAS_JBM_TRACE_DATA; #ifdef FIX_HRTF_LOAD typedef enum _ivas_binaural_renderer_type { IVAS_BIN_RENDERER_TYPE_NONE, Loading @@ -221,7 +220,6 @@ typedef enum _ivas_binaural_renderer_type IVAS_BIN_RENDERER_TYPE_DEFAULT, } IVAS_BIN_RENDERER_TYPE; #endif /*----------------------------------------------------------------------------------* * Split rendering API constants, structures, and enums Loading Loading @@ -260,17 +258,6 @@ typedef enum } ISAR_SPLIT_REND_CODEC; #ifndef FIX_HRTF_LOAD typedef enum { ISAR_SPLIT_REND_RENDERER_SELECTION_CREND, ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV, ISAR_SPLIT_REND_RENDERER_SELECTION_PARAMBIN, ISAR_SPLIT_REND_RENDERER_SELECTION_TDREND, ISAR_SPLIT_REND_RENDERER_SELECTION_DEFAULT, } ISAR_SPLIT_REND_RENDERER_SELECTION; #endif typedef struct _ISAR_SPLIT_REND_BITS_DATA { Loading Loading @@ -302,11 +289,7 @@ 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 +0 −38 Original line number Diff line number Diff line Loading @@ -318,20 +318,12 @@ ivas_error ivas_dec( int16_t *data /* o : output synthesis signal */ ); #ifdef FIX_HRTF_LOAD ivas_error ivas_dec_get_format( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif ivas_error ivas_dec_setup( 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 @@ -670,12 +662,6 @@ 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 */ #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 @@ -1083,12 +1069,6 @@ 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 */ #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 @@ -3478,12 +3458,6 @@ void ivas_sba_set_cna_cng_flag( ivas_error ivas_sba_dec_reconfigure( 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 @@ -4937,12 +4911,6 @@ void ivas_masa_enc_reconfigure( ivas_error ivas_masa_dec_reconfigure( 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 @@ -5657,12 +5625,6 @@ ivas_error ivas_omasa_enc_config( ivas_error ivas_omasa_dec_config( 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 +0 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,6 @@ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_HRTF_LOAD /* VA: issue 1187: fix memory issue when HRTFs are loaded from a binary file */ #define FIX_1209_SID_SIGNALING /* VA: issue 1209: remove dead code in IVAS SID signaling */ Loading Loading
apps/decoder.c +0 −166 Original line number Diff line number Diff line Loading @@ -156,7 +156,6 @@ typedef struct } DecArguments; #ifdef FIX_HRTF_LOAD typedef struct { hrtfFileReader *hrtfReader; Loading @@ -176,7 +175,6 @@ typedef struct } IVAS_DEC_HRTF_BINARY_WRAPPER; #endif /*------------------------------------------------------------------------------------------* * Local functions prototypes Loading @@ -184,14 +182,9 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); #ifdef FIX_HRTF_LOAD static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec ); static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const int32_t output_Fs ); #else static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec ); #endif #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); Loading Loading @@ -228,13 +221,7 @@ int main( RenderConfigReader *renderConfigReader = NULL; int16_t *pcmBuf = NULL; IVAS_RENDER_FRAMESIZE asked_frame_size; #ifdef FIX_HRTF_LOAD IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary; #else IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL; #endif #ifdef DEBUGGING int32_t noClipping; int32_t cnt_frames_limited; Loading @@ -251,11 +238,9 @@ int main( reset_mem( USE_BYTES ); #endif #ifdef FIX_HRTF_LOAD hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ hHrtfBinary.hSetOfHRTF = NULL; /* just to avoid compilation warning */ hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */ #endif splitRendBits.bits_buf = splitRendBitsBuf; Loading Loading @@ -739,111 +724,12 @@ int main( if ( arg.hrtfReaderEnabled ) { #ifdef FIX_HRTF_LOAD hHrtfBinary.hrtfReader = hrtfReader; hHrtfBinary.hrtfFileName = arg.hrtfFileName; hHrtfBinary.binaural_renderer = IVAS_BIN_RENDERER_TYPE_NONE; hHrtfBinary.binaural_renderer_sec = IVAS_BIN_RENDERER_TYPE_NONE; hHrtfBinary.room_reverb_flag = 0; hHrtfBinary.intern_audio_config = IVAS_AUDIO_CONFIG_INVALID; #else if ( ( error = IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_td_hrtf( hHrtfTD ); } } if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } } IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; if ( ( error = IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfFastConvHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_fastconv_hrtf( hHrtfFastConv ); } } IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; if ( ( error = IVAS_DEC_GetHrtfParamBinHandle( hIvasDec, &hHrtfParambin ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfParamBinHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_parambin_hrtf( hHrtfParambin ); } } if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_reverb_binary( *hHrtfStatistics, arg.output_Fs, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_hrtf_statistics( hHrtfStatistics ); } } #endif } /*------------------------------------------------------------------------------------------* Loading @@ -865,19 +751,11 @@ int main( if ( arg.voipMode ) { #ifdef FIX_HRTF_LOAD error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec ); #else error = decodeVoIP( arg, hBsReader, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec ); #endif } else { #ifdef FIX_HRTF_LOAD error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf ); #else error = decodeG192( arg, hBsReader, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf ); #endif } if ( error == IVAS_ERR_OK || error == IVAS_ERR_END_OF_FILE ) Loading @@ -893,11 +771,7 @@ int main( } else { #ifdef FIX_HRTF_LOAD fprintf( stderr, "\nDecoding finished prematurely: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); #else fprintf( stdout, "Decoding finished prematurely\n\n" ); #endif goto cleanup; } Loading Loading @@ -933,20 +807,9 @@ cleanup: #endif if ( arg.hrtfReaderEnabled ) { #ifdef FIX_HRTF_LOAD destroy_td_hrtf( hHrtfBinary.hHrtfTD ); destroy_SetOfHRTF( hHrtfBinary.hSetOfHRTF ); destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics ); #else IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); destroy_td_hrtf( hHrtfTD ); IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); destroy_SetOfHRTF( hSetOfHRTF ); IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ); destroy_hrtf_statistics( hHrtfStatistics ); #endif } IVAS_DEC_Close( &hIvasDec ); Loading Loading @@ -2137,9 +2000,7 @@ static ivas_error initOnFirstGoodFrame( static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, #ifdef FIX_HRTF_LOAD IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, #endif RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Loading Loading @@ -2495,23 +2356,13 @@ static ivas_error decodeG192( } } #endif #ifdef FIX_HRTF_LOAD /* Feed into decoder and decode transport channels */ if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) #else /* Feed into decoder */ if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi , isSplitRend, splitRendBits ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_HRTF_LOAD /* 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 Loading @@ -2539,7 +2390,6 @@ static ivas_error decodeG192( return error; } #endif /* Object metadata editing */ if ( arg.objEditEnabled ) { Loading Loading @@ -3071,9 +2921,7 @@ static ivas_error writeJbmTraceFileFrameWrapper( const void *data, void *writer static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, #ifdef FIX_HRTF_LOAD IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, #endif RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Loading Loading @@ -3124,9 +2972,7 @@ static ivas_error decodeVoIP( int16_t vec_pos_update, vec_pos_len; int16_t nOutSamples = 0; #ifdef FIX_HRTF_LOAD bool bitstreamReadDone = false; #endif bool parameterAvailableForEditing = false; uint16_t nSamplesRendered = 0; Loading Loading @@ -3413,23 +3259,14 @@ static ivas_error decodeVoIP( while ( nSamplesRendered < nOutSamples ) { #ifdef SUPPORT_JBM_TRACEFILE #ifdef FIX_HRTF_LOAD if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &nSamplesRendered, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #endif #else #ifdef FIX_HRTF_LOAD if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, &nSamplesRendered, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, &nSamplesRendered, ¶meterAvailableForEditing ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_HRTF_LOAD if ( bitstreamReadDone == true ) { Loading @@ -3455,7 +3292,6 @@ static ivas_error decodeVoIP( } } #endif /* Object metadata editing */ if ( arg.objEditEnabled && parameterAvailableForEditing == true ) { Loading Loading @@ -3838,7 +3674,6 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( } #endif #ifdef FIX_HRTF_LOAD /*---------------------------------------------------------------------* * IVAS_DEC_LoadHrtfFromFile() Loading Loading @@ -4014,6 +3849,5 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( return IVAS_ERR_OK; } #endif #undef WMC_TOOL_SKIP
apps/renderer.c +0 −8 Original line number Diff line number Diff line Loading @@ -615,11 +615,7 @@ 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 @@ -949,11 +945,7 @@ int main( goto cleanup; } #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, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading
lib_com/common_api_types.h +0 −17 Original line number Diff line number Diff line Loading @@ -210,7 +210,6 @@ typedef struct _IVAS_JBM_TRACE_DATA } IVAS_JBM_TRACE_DATA; #ifdef FIX_HRTF_LOAD typedef enum _ivas_binaural_renderer_type { IVAS_BIN_RENDERER_TYPE_NONE, Loading @@ -221,7 +220,6 @@ typedef enum _ivas_binaural_renderer_type IVAS_BIN_RENDERER_TYPE_DEFAULT, } IVAS_BIN_RENDERER_TYPE; #endif /*----------------------------------------------------------------------------------* * Split rendering API constants, structures, and enums Loading Loading @@ -260,17 +258,6 @@ typedef enum } ISAR_SPLIT_REND_CODEC; #ifndef FIX_HRTF_LOAD typedef enum { ISAR_SPLIT_REND_RENDERER_SELECTION_CREND, ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV, ISAR_SPLIT_REND_RENDERER_SELECTION_PARAMBIN, ISAR_SPLIT_REND_RENDERER_SELECTION_TDREND, ISAR_SPLIT_REND_RENDERER_SELECTION_DEFAULT, } ISAR_SPLIT_REND_RENDERER_SELECTION; #endif typedef struct _ISAR_SPLIT_REND_BITS_DATA { Loading Loading @@ -302,11 +289,7 @@ 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 +0 −38 Original line number Diff line number Diff line Loading @@ -318,20 +318,12 @@ ivas_error ivas_dec( int16_t *data /* o : output synthesis signal */ ); #ifdef FIX_HRTF_LOAD ivas_error ivas_dec_get_format( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif ivas_error ivas_dec_setup( 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 @@ -670,12 +662,6 @@ 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 */ #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 @@ -1083,12 +1069,6 @@ 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 */ #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 @@ -3478,12 +3458,6 @@ void ivas_sba_set_cna_cng_flag( ivas_error ivas_sba_dec_reconfigure( 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 @@ -4937,12 +4911,6 @@ void ivas_masa_enc_reconfigure( ivas_error ivas_masa_dec_reconfigure( 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 @@ -5657,12 +5625,6 @@ ivas_error ivas_omasa_enc_config( ivas_error ivas_omasa_dec_config( 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 +0 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,6 @@ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_HRTF_LOAD /* VA: issue 1187: fix memory issue when HRTFs are loaded from a binary file */ #define FIX_1209_SID_SIGNALING /* VA: issue 1209: remove dead code in IVAS SID signaling */ Loading