Loading apps/decoder.c +54 −11 Original line number Diff line number Diff line Loading @@ -2232,7 +2232,7 @@ static ivas_error decodeG192( fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) #if 0 // defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; Loading Loading @@ -2274,7 +2274,7 @@ static ivas_error decodeG192( goto cleanup; } #if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) #if 0 // defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; Loading Loading @@ -2348,12 +2348,13 @@ static ivas_error decodeG192( } } #ifdef SPLIT_REND_WITH_HEAD_ROT #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &splitRendBits, nSamplesToRender, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; Loading Loading @@ -2434,6 +2435,45 @@ static ivas_error decodeG192( { goto cleanup; } #if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); /* we assumed 5ms but are really 20ms, we need to throw away some head and ext positions */ if ( !enable5ms && arg.enable5ms ) { /* Skip over 3 following entries in file - they are given on 5ms grid */ if ( arg.enableExternalOrientation ) { IVAS_QUATERNION Quaternion; int8_t enableHeadRotation; int8_t enableExternalOrientation; int8_t enableRotationInterpolation; int16_t numFramesToTargetOrientation; for ( i = 0; i < 3; ++i ) { if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternion, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } } if ( arg.enableHeadRotation ) { IVAS_QUATERNION Quaternion; /* Skip over 3 following head positions - they are given on 5ms grid */ for ( i = 0; i < 3; ++i ) { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } } } arg.enable5ms = enable5ms; #endif } else { Loading @@ -2446,6 +2486,8 @@ static ivas_error decodeG192( { #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED ) ) { if ( splitRendBits.bits_written > 0 ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, splitRendBits.codec, splitRendBits.pose_correction Loading @@ -2459,6 +2501,7 @@ static ivas_error decodeG192( goto cleanup; } } } else { if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) ) Loading apps/renderer.c +4 −2 Original line number Diff line number Diff line Loading @@ -812,7 +812,7 @@ int main( #ifndef API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif #ifdef API_5MS #if defined( API_5MS ) && defined( SPLIT_REND_WITH_HEAD_ROT ) bool splitBinNeedsNewAudioFrame = true; bool splitBinNeedsNewBitstreamFrame = true; #endif Loading Loading @@ -1499,6 +1499,7 @@ int main( #ifdef API_5MS const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) ) { if ( args.inConfig.binBuses[0].audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) Loading @@ -1512,6 +1513,7 @@ int main( } } #endif #endif #ifdef SPLIT_REND_WITH_HEAD_ROT numSamplesRead = 0; Loading Loading @@ -1557,7 +1559,7 @@ int main( #endif if ( numSamplesRead == 0 #ifdef API_5MS #if defined( API_5MS ) && defined( SPLIT_REND_WITH_HEAD_ROT ) && splitBinNeedsNewAudioFrame #endif ) Loading lib_com/common_api_types.h +3 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,9 @@ #define IVAS_CLDFB_NO_CHANNELS_MAX ( 60 ) #define IVAS_MAX_INPUT_LFE_CHANNELS 4 #ifdef API_5MS #define RENDERER_SUBFRAMES_PER_FRAME 4 #endif #ifndef API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 #endif Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,7 @@ #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK #define FIX_CQMFPREDDEC_FREE /* FhG: avoid double free / free of NULL in DeletePredictionDecoder() */ #define FIX_PLANAR_SBA_JBM_RS #define FIX_RENDMC_LOCAL_ORIENTATION /* ### API_5MS switches ### */ Loading lib_dec/ivas_init_dec.c +5 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,10 @@ ivas_error ivas_dec_init_split_rend( { st_ivas->hDecoderConfig->Opt_5ms = true; } else { st_ivas->hDecoderConfig->Opt_5ms = false; } #else ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, ( cldfb_in == 0 ), pcm_out ); #endif Loading Loading @@ -2534,6 +2538,7 @@ void ivas_initialize_handles_dec( #ifdef API_5MS st_ivas->splitBinRend.tdDataOut = NULL; st_ivas->splitBinRend.numTdSamplesPerChannelCached = 0; st_ivas->splitBinRend.numSamplesCollected = 0; #endif ivas_init_split_rend_handles( &st_ivas->splitBinRend.splitrend ); #endif Loading Loading
apps/decoder.c +54 −11 Original line number Diff line number Diff line Loading @@ -2232,7 +2232,7 @@ static ivas_error decodeG192( fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) #if 0 // defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; Loading Loading @@ -2274,7 +2274,7 @@ static ivas_error decodeG192( goto cleanup; } #if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) #if 0 // defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; Loading Loading @@ -2348,12 +2348,13 @@ static ivas_error decodeG192( } } #ifdef SPLIT_REND_WITH_HEAD_ROT #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &splitRendBits, nSamplesToRender, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; Loading Loading @@ -2434,6 +2435,45 @@ static ivas_error decodeG192( { goto cleanup; } #if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); /* we assumed 5ms but are really 20ms, we need to throw away some head and ext positions */ if ( !enable5ms && arg.enable5ms ) { /* Skip over 3 following entries in file - they are given on 5ms grid */ if ( arg.enableExternalOrientation ) { IVAS_QUATERNION Quaternion; int8_t enableHeadRotation; int8_t enableExternalOrientation; int8_t enableRotationInterpolation; int16_t numFramesToTargetOrientation; for ( i = 0; i < 3; ++i ) { if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternion, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } } if ( arg.enableHeadRotation ) { IVAS_QUATERNION Quaternion; /* Skip over 3 following head positions - they are given on 5ms grid */ for ( i = 0; i < 3; ++i ) { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } } } arg.enable5ms = enable5ms; #endif } else { Loading @@ -2446,6 +2486,8 @@ static ivas_error decodeG192( { #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED ) ) { if ( splitRendBits.bits_written > 0 ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, splitRendBits.codec, splitRendBits.pose_correction Loading @@ -2459,6 +2501,7 @@ static ivas_error decodeG192( goto cleanup; } } } else { if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) ) Loading
apps/renderer.c +4 −2 Original line number Diff line number Diff line Loading @@ -812,7 +812,7 @@ int main( #ifndef API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif #ifdef API_5MS #if defined( API_5MS ) && defined( SPLIT_REND_WITH_HEAD_ROT ) bool splitBinNeedsNewAudioFrame = true; bool splitBinNeedsNewBitstreamFrame = true; #endif Loading Loading @@ -1499,6 +1499,7 @@ int main( #ifdef API_5MS const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) ) { if ( args.inConfig.binBuses[0].audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) Loading @@ -1512,6 +1513,7 @@ int main( } } #endif #endif #ifdef SPLIT_REND_WITH_HEAD_ROT numSamplesRead = 0; Loading Loading @@ -1557,7 +1559,7 @@ int main( #endif if ( numSamplesRead == 0 #ifdef API_5MS #if defined( API_5MS ) && defined( SPLIT_REND_WITH_HEAD_ROT ) && splitBinNeedsNewAudioFrame #endif ) Loading
lib_com/common_api_types.h +3 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,9 @@ #define IVAS_CLDFB_NO_CHANNELS_MAX ( 60 ) #define IVAS_MAX_INPUT_LFE_CHANNELS 4 #ifdef API_5MS #define RENDERER_SUBFRAMES_PER_FRAME 4 #endif #ifndef API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 #endif Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,7 @@ #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK #define FIX_CQMFPREDDEC_FREE /* FhG: avoid double free / free of NULL in DeletePredictionDecoder() */ #define FIX_PLANAR_SBA_JBM_RS #define FIX_RENDMC_LOCAL_ORIENTATION /* ### API_5MS switches ### */ Loading
lib_dec/ivas_init_dec.c +5 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,10 @@ ivas_error ivas_dec_init_split_rend( { st_ivas->hDecoderConfig->Opt_5ms = true; } else { st_ivas->hDecoderConfig->Opt_5ms = false; } #else ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, ( cldfb_in == 0 ), pcm_out ); #endif Loading Loading @@ -2534,6 +2538,7 @@ void ivas_initialize_handles_dec( #ifdef API_5MS st_ivas->splitBinRend.tdDataOut = NULL; st_ivas->splitBinRend.numTdSamplesPerChannelCached = 0; st_ivas->splitBinRend.numSamplesCollected = 0; #endif ivas_init_split_rend_handles( &st_ivas->splitBinRend.splitrend ); #endif Loading