Loading Workspace_msvc/lib_dec.vcxproj +0 −1 Original line number Diff line number Diff line Loading @@ -209,7 +209,6 @@ <ClCompile Include="..\lib_dec\init_dec_fx.c" /> <ClCompile Include="..\lib_dec\inov_dec_fx.c" /> <ClCompile Include="..\lib_dec\ivas_agc_dec_fx.c" /> <ClCompile Include="..\lib_dec\ivas_binRenderer_internal_fx.c" /> <ClCompile Include="..\lib_dec\ivas_corecoder_dec_reconfig_fx.c" /> <ClCompile Include="..\lib_dec\ivas_core_dec_fx.c" /> <ClCompile Include="..\lib_dec\ivas_cpe_dec_fx.c" /> Loading Workspace_msvc/lib_isar.vcxproj +0 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,6 @@ <ClCompile Include="..\lib_isar\isar_lc3plus_enc.c" /> <ClCompile Include="..\lib_isar\isar_lc3plus_payload.c" /> <ClCompile Include="..\lib_isar\isar_MSPred.c" /> <ClCompile Include="..\lib_isar\isar_NoiseGen.c" /> <ClCompile Include="..\lib_isar\isar_PerceptualModel.c" /> <ClCompile Include="..\lib_isar\isar_PredDecoder.c" /> <ClCompile Include="..\lib_isar\isar_PredEncoder.c" /> Loading Workspace_msvc/lib_rend.vcxproj +1 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ </Lib> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\lib_rend\ivas_binRenderer_internal_fx.c" /> <ClCompile Include="..\lib_rend\ivas_cldfb_ring_buffer.c" /> <ClCompile Include="..\lib_rend\ivas_dirac_decorr_dec_fx.c" /> <ClCompile Include="..\lib_rend\ivas_dirac_dec_binaural_functions_fx.c" /> Loading apps/decoder.c +68 −82 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ typedef struct char *outputMdFilename; IVAS_DEC_COMPLEXITY_LEVEL complexityLevel; bool tsmEnabled; IVAS_RENDER_FRAMESIZE renderFramesize; IVAS_RENDER_NUM_SUBFR render_num_subframes; AcousticEnvironmentSequence aeSequence; bool dpidEnabled; uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; Loading @@ -142,9 +142,6 @@ typedef struct hrtfFileReader *hrtfReader; char *hrtfFileName; IVAS_DEC_HRTF_TD_HANDLE *hHrtfTD; IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics; IVAS_BIN_RENDERER_TYPE binaural_renderer; IVAS_BIN_RENDERER_TYPE binaural_renderer_old; Loading Loading @@ -196,7 +193,7 @@ int main( Vector3PairFileReader *referenceVectorReader = NULL; RenderConfigReader *renderConfigReader = NULL; int16_t *pcmBuf = NULL; IVAS_RENDER_FRAMESIZE asked_frame_size; IVAS_RENDER_NUM_SUBFR asked_num_subframes; IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary; ObjectEditFileReader *objectEditFileReader = NULL; IVAS_ROOM_ACOUSTICS_CONFIG_DATA **pAE = NULL; Loading @@ -207,8 +204,6 @@ int main( reset_mem( USE_BYTES ); #endif hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */ splitRendBits.bits_buf = splitRendBitsBuf; Loading Loading @@ -411,11 +406,11 @@ int main( * Configure the decoder *------------------------------------------------------------------------------------------*/ asked_frame_size = arg.renderFramesize; asked_num_subframes = arg.render_num_subframes; uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : IVAS_DEFAULT_AEID; arg.enableHeadRotation = arg.enableHeadRotation || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM; if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.render_num_subframes, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.roomSize, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain_fx, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) { Loading @@ -423,13 +418,13 @@ int main( goto cleanup; } if ( ( error = IVAS_DEC_GetRenderFramesize( hIvasDec, &arg.renderFramesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg.render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( arg.renderFramesize != asked_frame_size ) if ( arg.render_num_subframes != asked_num_subframes ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for decoding to EXT!\n" ); } Loading @@ -438,7 +433,7 @@ int main( * Configure Split rendering *------------------------------------------------------------------------------------------*/ asked_frame_size = arg.renderFramesize; asked_num_subframes = arg.render_num_subframes; if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) Loading @@ -447,11 +442,18 @@ int main( goto cleanup; } if ( ( error = IVAS_DEC_GetRenderFramesize( hIvasDec, &arg.renderFramesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg.render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR if ( !arg.renderConfigEnabled && ( arg.render_num_subframes != asked_num_subframes ) ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for non-0dof split rendering!\n" ); } #endif } /*------------------------------------------------------------------------------------------* Loading Loading @@ -563,24 +565,24 @@ int main( if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { if ( asked_frame_size != IVAS_RENDER_FRAMESIZE_20MS && if ( asked_num_subframes != IVAS_RENDER_NUM_SUBFR_20MS && ( renderConfig.split_rend_config.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE || renderConfig.split_rend_config.dof == 0 ) ) { arg.renderFramesize = asked_frame_size; arg.render_num_subframes = asked_num_subframes; } else { arg.renderFramesize = IVAS_RENDER_FRAMESIZE_20MS; arg.render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; } if ( ( error = IVAS_DEC_SetRenderFramesize( hIvasDec, arg.renderFramesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_SetRenderNumSubfr( hIvasDec, arg.render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_SetRenderFramesize failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_SetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( arg.renderFramesize != asked_frame_size ) if ( arg.render_num_subframes != asked_num_subframes ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for non-0dof split rendering!\n" ); } Loading @@ -605,7 +607,7 @@ int main( /* ISAR frame size is set from command line, not renderer config file. * This will be ignored if output format is not split rendering. */ renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) arg.renderFramesize /* given in number of 5ms subframes */ * 5; renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) arg.render_num_subframes * 5; if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, renderConfig ) ) != IVAS_ERR_OK ) { Loading Loading @@ -730,19 +732,6 @@ cleanup: free( arg.aeSequence.pValidity ); } if ( arg.hrtfReaderEnabled ) { destroy_td_hrtf( hHrtfBinary.hHrtfTD ); destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics ); } #ifdef FIX_1990_SANITIZER_IN_REVERB_LOAD // TODO: /* This free differs from float version. This is needed as HRTF statistics from ROM are currently converted from Word16 values to scaled Word32 values. */ IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL; IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ); destroy_hrtf_statistics( hHrtfStatistics ); #endif IVAS_DEC_Close( &hIvasDec ); CustomLsReader_close( &hLsCustomReader ); hrtfFileReader_close( &hrtfReader ); Loading Loading @@ -925,7 +914,7 @@ static bool parseCmdlIVAS_dec( arg->non_diegetic_pan_enabled = false; arg->non_diegetic_pan_gain = 0.f; arg->tsmEnabled = false; arg->renderFramesize = IVAS_RENDER_FRAMESIZE_20MS; arg->render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; arg->aeSequence.count = 0; arg->aeSequence.pID = NULL; arg->aeSequence.pValidity = NULL; Loading Loading @@ -1092,13 +1081,13 @@ static bool parseCmdlIVAS_dec( switch ( (int16_t) tmp ) { case 5: arg->renderFramesize = IVAS_RENDER_FRAMESIZE_5MS; arg->render_num_subframes = IVAS_RENDER_NUM_SUBFR_5MS; break; case 10: arg->renderFramesize = IVAS_RENDER_FRAMESIZE_10MS; arg->render_num_subframes = IVAS_RENDER_NUM_SUBFR_10MS; break; case 20: arg->renderFramesize = IVAS_RENDER_FRAMESIZE_20MS; arg->render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; break; default: fprintf( stderr, "Error: Invalid render frame size %d \n\n", tmp ); Loading Loading @@ -2148,10 +2137,10 @@ static ivas_error decodeG192( } } int16_t num_subframes; if ( ( error = IVAS_DEC_GetNumOrientationSubframes( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK ) IVAS_RENDER_NUM_SUBFR num_subframes; if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetNumOrientationSubframes failed: \n" ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading @@ -2162,7 +2151,7 @@ static ivas_error decodeG192( if ( headRotReader == NULL ) { for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { Quaternions[i].w_fx = -12582912; Quaternions[i].x_fx = 0; Loading @@ -2177,7 +2166,7 @@ static ivas_error decodeG192( } else { for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) { Loading @@ -2187,7 +2176,7 @@ static ivas_error decodeG192( } } for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) { Loading @@ -2205,7 +2194,7 @@ static ivas_error decodeG192( int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK ) { Loading @@ -2213,7 +2202,7 @@ static ivas_error decodeG192( goto cleanup; } } for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternions[i], enableHeadRotation[i], enableExternalOrientation[i], enableRotationInterpolation[i], numFramesToTargetOrientation[i], i ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2979,10 +2968,10 @@ static ivas_error decodeVoIP( } } int16_t num_subframes; if ( ( error = IVAS_DEC_GetNumOrientationSubframes( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK ) IVAS_RENDER_NUM_SUBFR num_subframes; if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetNumOrientationSubframes failed: \n" ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading @@ -2993,7 +2982,7 @@ static ivas_error decodeVoIP( if ( headRotReader == NULL ) { for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { Quaternions[i].w_fx = -12582912; Quaternions[i].x_fx = 0; Loading @@ -3008,7 +2997,7 @@ static ivas_error decodeVoIP( } else { for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) { Loading @@ -3018,7 +3007,7 @@ static ivas_error decodeVoIP( } } for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) { Loading @@ -3036,7 +3025,7 @@ static ivas_error decodeVoIP( int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK ) Loading @@ -3046,7 +3035,7 @@ static ivas_error decodeVoIP( goto cleanup; } } for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternions[i], enableHeadRotation[i], enableExternalOrientation[i], enableRotationInterpolation[i], numFramesToTargetOrientation[i], i ) ) != IVAS_ERR_OK ) { Loading Loading @@ -3756,12 +3745,6 @@ static ivas_error load_hrtf_from_file( /*------------------------------------------------------------------------------------------* * Release HRTF binary data *------------------------------------------------------------------------------------------*/ if ( !( binaural_renderer == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) && binaural_renderer_sec != IVAS_BIN_RENDERER_TYPE_TDREND && hHrtfBinary->hHrtfTD != NULL ) { destroy_td_hrtf( hHrtfBinary->hHrtfTD ); } if ( ( error = IVAS_DEC_HRTF_binary_close( hIvasDec, hHrtfBinary->binaural_renderer_old ) ) != IVAS_ERR_OK ) { return error; Loading @@ -3783,13 +3766,15 @@ static ivas_error load_hrtf_from_file( if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer_sec == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) { if ( ( error = IVAS_DEC_GetHrtfTDrendHandle( hIvasDec, &hHrtfBinary->hHrtfTD ) ) != IVAS_ERR_OK ) IVAS_DEC_HRTF_TD_HANDLE *hHrtfTD = NULL; if ( ( error = IVAS_DEC_GetHrtfTDrendHandle( hIvasDec, &hHrtfTD ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfTDrendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } if ( ( error = load_TDrend_HRTF_binary( *hHrtfBinary->hHrtfTD, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_TDrend_HRTF_binary( *hHrtfTD, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -3798,7 +3783,7 @@ static ivas_error load_hrtf_from_file( } else { destroy_td_hrtf( hHrtfBinary->hHrtfTD ); destroy_td_hrtf( hHrtfTD ); } } } Loading Loading @@ -3871,17 +3856,17 @@ static ivas_error load_hrtf_from_file( } } } } if ( hHrtfBinary->hHrtfStatistics == NULL && ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_FASTCONV || binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND ) && OutputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if ( ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_FASTCONV || binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND ) && OutputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfBinary->hHrtfStatistics ) ) != IVAS_ERR_OK ) IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL; if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfStatisticsHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } if ( ( error = load_reverb_binary( *hHrtfBinary->hHrtfStatistics, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_HrtfStatistics_from_binary( *hHrtfStatistics, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -3890,7 +3875,8 @@ static ivas_error load_hrtf_from_file( } else { destroy_hrtf_statistics( hHrtfBinary->hHrtfStatistics ); destroy_hrtf_statistics( hHrtfStatistics ); } } } } Loading Loading @@ -3939,7 +3925,7 @@ static ivas_error restartDecoder( IVAS_AUDIO_CONFIG outputConfig = ( decMode == IVAS_DEC_MODE_IVAS ) ? arg->outputConfig : IVAS_AUDIO_CONFIG_MONO; if ( ( error = IVAS_DEC_Configure( hIvasDec, arg->output_Fs, outputConfig, arg->renderFramesize, arg->customLsOutputEnabled, arg->hrtfReaderEnabled, if ( ( error = IVAS_DEC_Configure( hIvasDec, arg->output_Fs, outputConfig, arg->render_num_subframes, arg->customLsOutputEnabled, arg->hrtfReaderEnabled, arg->enableHeadRotation, arg->enableExternalOrientation, arg->orientation_tracking, arg->renderConfigEnabled, arg->roomSize, arg->non_diegetic_pan_enabled, arg->non_diegetic_pan_gain_fx, arg->dpidEnabled, aeID, arg->objEditEnabled, arg->delayCompensationEnabled ) ) != IVAS_ERR_OK ) { Loading @@ -3947,9 +3933,9 @@ static ivas_error restartDecoder( goto cleanup; } if ( ( error = IVAS_DEC_GetRenderFramesize( hIvasDec, &arg->renderFramesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg->render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading @@ -3972,7 +3958,7 @@ static ivas_error restartDecoder( * This will be ignored if output format is not split rendering. */ if ( renderConfig != NULL ) { renderConfig->split_rend_config.isar_frame_size_ms = (int16_t) arg->renderFramesize /* given in number of 5ms subframes */ * 5; renderConfig->split_rend_config.isar_frame_size_ms = (int16_t) arg->render_num_subframes * 5; } if ( arg->renderConfigEnabled && renderConfig != NULL ) Loading apps/isar_post_rend.c +13 −13 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ typedef struct bool delayCompensationEnabled; bool quietModeEnabled; bool sceneDescriptionInput; IVAS_RENDER_FRAMESIZE render_framesize; IVAS_RENDER_NUM_SUBFR render_num_subframes; } CmdlnArgs; typedef enum Loading Loading @@ -340,13 +340,13 @@ static bool parseInConfig( } static bool parseRenderFramesize( static bool parseRenderNumSubfr( char *value, IVAS_RENDER_FRAMESIZE *render_framesize ) IVAS_RENDER_NUM_SUBFR *render_num_subframes ) { int32_t tmp; *render_framesize = IVAS_RENDER_FRAMESIZE_UNKNOWN; *render_num_subframes = IVAS_RENDER_NUM_SUBFR_UNKNOWN; if ( !is_digits_only( value ) ) { return false; Loading @@ -355,13 +355,13 @@ static bool parseRenderFramesize( switch ( (int16_t) tmp ) { case 5: *render_framesize = IVAS_RENDER_FRAMESIZE_5MS; *render_num_subframes = IVAS_RENDER_NUM_SUBFR_5MS; break; case 10: *render_framesize = IVAS_RENDER_FRAMESIZE_10MS; *render_num_subframes = IVAS_RENDER_NUM_SUBFR_10MS; break; case 20: *render_framesize = IVAS_RENDER_FRAMESIZE_20MS; *render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; break; default: return false; Loading Loading @@ -476,7 +476,7 @@ static CmdlnArgs defaultArgs( args.quietModeEnabled = false; args.sceneDescriptionInput = false; args.render_framesize = IVAS_RENDER_FRAMESIZE_20MS; args.render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; return args; } Loading Loading @@ -559,7 +559,7 @@ static void parseOption( break; case CmdLnOptionId_framing: assert( numOptionValues == 1 ); if ( !parseRenderFramesize( optionValues[0], &args->render_framesize ) ) if ( !parseRenderNumSubfr( optionValues[0], &args->render_num_subframes ) ) { fprintf( stderr, "Unknown or invalid option for frame size: %s\n", optionValues[0] ); exit( -1 ); Loading Loading @@ -951,7 +951,7 @@ int main( audioReader = NULL; /* Force owerwrite of command line provided rendersize to align with codec frame size */ args.render_framesize = bitsBuffer.config.isar_frame_size_ms / 5; args.render_num_subframes = bitsBuffer.config.isar_frame_size_ms / 5; } /*if split renderer is running in post renderer mode*/ else if ( ( args.inConfig.numBinBuses > 0 ) && ( args.inConfig.binBuses[0].audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) Loading Loading @@ -1023,9 +1023,9 @@ int main( * Open ISAR handle *------------------------------------------------------------------------------------------*/ const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); const int16_t frameSize_smpls = (int16_t) ( ( args.render_num_subframes ) * args.sampleRate * 5 / ( 1000 ) ); args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_BINAURAL; if ( ( error = ISAR_POST_REND_open( &hIsarPostRend, args.sampleRate, args.outConfig.audioConfig, true, 0, 0, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) if ( ( error = ISAR_POST_REND_open( &hIsarPostRend, args.sampleRate, args.outConfig.audioConfig, true, 0, 0, (int16_t) args.render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError opening renderer handle: %s\n", ivas_error_to_string( error ) ); goto cleanup; Loading Loading @@ -1243,7 +1243,7 @@ int main( convertInputBuffer( inpInt16Buffer, numSamplesRead, inBuffer.config.numSamplesPerChannel, num_in_channels, inFloatBuffer_fx ); *inBuffer.pq_fact = 0; int16_t num_subframes, sf_idx; num_subframes = (int16_t) args.render_framesize; num_subframes = (int16_t) args.render_num_subframes; /* Read from head rotation trajectory file if specified */ if ( headRotReader != NULL ) Loading Loading
Workspace_msvc/lib_dec.vcxproj +0 −1 Original line number Diff line number Diff line Loading @@ -209,7 +209,6 @@ <ClCompile Include="..\lib_dec\init_dec_fx.c" /> <ClCompile Include="..\lib_dec\inov_dec_fx.c" /> <ClCompile Include="..\lib_dec\ivas_agc_dec_fx.c" /> <ClCompile Include="..\lib_dec\ivas_binRenderer_internal_fx.c" /> <ClCompile Include="..\lib_dec\ivas_corecoder_dec_reconfig_fx.c" /> <ClCompile Include="..\lib_dec\ivas_core_dec_fx.c" /> <ClCompile Include="..\lib_dec\ivas_cpe_dec_fx.c" /> Loading
Workspace_msvc/lib_isar.vcxproj +0 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,6 @@ <ClCompile Include="..\lib_isar\isar_lc3plus_enc.c" /> <ClCompile Include="..\lib_isar\isar_lc3plus_payload.c" /> <ClCompile Include="..\lib_isar\isar_MSPred.c" /> <ClCompile Include="..\lib_isar\isar_NoiseGen.c" /> <ClCompile Include="..\lib_isar\isar_PerceptualModel.c" /> <ClCompile Include="..\lib_isar\isar_PredDecoder.c" /> <ClCompile Include="..\lib_isar\isar_PredEncoder.c" /> Loading
Workspace_msvc/lib_rend.vcxproj +1 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ </Lib> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\lib_rend\ivas_binRenderer_internal_fx.c" /> <ClCompile Include="..\lib_rend\ivas_cldfb_ring_buffer.c" /> <ClCompile Include="..\lib_rend\ivas_dirac_decorr_dec_fx.c" /> <ClCompile Include="..\lib_rend\ivas_dirac_dec_binaural_functions_fx.c" /> Loading
apps/decoder.c +68 −82 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ typedef struct char *outputMdFilename; IVAS_DEC_COMPLEXITY_LEVEL complexityLevel; bool tsmEnabled; IVAS_RENDER_FRAMESIZE renderFramesize; IVAS_RENDER_NUM_SUBFR render_num_subframes; AcousticEnvironmentSequence aeSequence; bool dpidEnabled; uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; Loading @@ -142,9 +142,6 @@ typedef struct hrtfFileReader *hrtfReader; char *hrtfFileName; IVAS_DEC_HRTF_TD_HANDLE *hHrtfTD; IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics; IVAS_BIN_RENDERER_TYPE binaural_renderer; IVAS_BIN_RENDERER_TYPE binaural_renderer_old; Loading Loading @@ -196,7 +193,7 @@ int main( Vector3PairFileReader *referenceVectorReader = NULL; RenderConfigReader *renderConfigReader = NULL; int16_t *pcmBuf = NULL; IVAS_RENDER_FRAMESIZE asked_frame_size; IVAS_RENDER_NUM_SUBFR asked_num_subframes; IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary; ObjectEditFileReader *objectEditFileReader = NULL; IVAS_ROOM_ACOUSTICS_CONFIG_DATA **pAE = NULL; Loading @@ -207,8 +204,6 @@ int main( reset_mem( USE_BYTES ); #endif hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */ splitRendBits.bits_buf = splitRendBitsBuf; Loading Loading @@ -411,11 +406,11 @@ int main( * Configure the decoder *------------------------------------------------------------------------------------------*/ asked_frame_size = arg.renderFramesize; asked_num_subframes = arg.render_num_subframes; uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : IVAS_DEFAULT_AEID; arg.enableHeadRotation = arg.enableHeadRotation || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM; if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.render_num_subframes, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.roomSize, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain_fx, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) { Loading @@ -423,13 +418,13 @@ int main( goto cleanup; } if ( ( error = IVAS_DEC_GetRenderFramesize( hIvasDec, &arg.renderFramesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg.render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( arg.renderFramesize != asked_frame_size ) if ( arg.render_num_subframes != asked_num_subframes ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for decoding to EXT!\n" ); } Loading @@ -438,7 +433,7 @@ int main( * Configure Split rendering *------------------------------------------------------------------------------------------*/ asked_frame_size = arg.renderFramesize; asked_num_subframes = arg.render_num_subframes; if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) Loading @@ -447,11 +442,18 @@ int main( goto cleanup; } if ( ( error = IVAS_DEC_GetRenderFramesize( hIvasDec, &arg.renderFramesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg.render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR if ( !arg.renderConfigEnabled && ( arg.render_num_subframes != asked_num_subframes ) ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for non-0dof split rendering!\n" ); } #endif } /*------------------------------------------------------------------------------------------* Loading Loading @@ -563,24 +565,24 @@ int main( if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { if ( asked_frame_size != IVAS_RENDER_FRAMESIZE_20MS && if ( asked_num_subframes != IVAS_RENDER_NUM_SUBFR_20MS && ( renderConfig.split_rend_config.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE || renderConfig.split_rend_config.dof == 0 ) ) { arg.renderFramesize = asked_frame_size; arg.render_num_subframes = asked_num_subframes; } else { arg.renderFramesize = IVAS_RENDER_FRAMESIZE_20MS; arg.render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; } if ( ( error = IVAS_DEC_SetRenderFramesize( hIvasDec, arg.renderFramesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_SetRenderNumSubfr( hIvasDec, arg.render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_SetRenderFramesize failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_SetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( arg.renderFramesize != asked_frame_size ) if ( arg.render_num_subframes != asked_num_subframes ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for non-0dof split rendering!\n" ); } Loading @@ -605,7 +607,7 @@ int main( /* ISAR frame size is set from command line, not renderer config file. * This will be ignored if output format is not split rendering. */ renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) arg.renderFramesize /* given in number of 5ms subframes */ * 5; renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) arg.render_num_subframes * 5; if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, renderConfig ) ) != IVAS_ERR_OK ) { Loading Loading @@ -730,19 +732,6 @@ cleanup: free( arg.aeSequence.pValidity ); } if ( arg.hrtfReaderEnabled ) { destroy_td_hrtf( hHrtfBinary.hHrtfTD ); destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics ); } #ifdef FIX_1990_SANITIZER_IN_REVERB_LOAD // TODO: /* This free differs from float version. This is needed as HRTF statistics from ROM are currently converted from Word16 values to scaled Word32 values. */ IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL; IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ); destroy_hrtf_statistics( hHrtfStatistics ); #endif IVAS_DEC_Close( &hIvasDec ); CustomLsReader_close( &hLsCustomReader ); hrtfFileReader_close( &hrtfReader ); Loading Loading @@ -925,7 +914,7 @@ static bool parseCmdlIVAS_dec( arg->non_diegetic_pan_enabled = false; arg->non_diegetic_pan_gain = 0.f; arg->tsmEnabled = false; arg->renderFramesize = IVAS_RENDER_FRAMESIZE_20MS; arg->render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; arg->aeSequence.count = 0; arg->aeSequence.pID = NULL; arg->aeSequence.pValidity = NULL; Loading Loading @@ -1092,13 +1081,13 @@ static bool parseCmdlIVAS_dec( switch ( (int16_t) tmp ) { case 5: arg->renderFramesize = IVAS_RENDER_FRAMESIZE_5MS; arg->render_num_subframes = IVAS_RENDER_NUM_SUBFR_5MS; break; case 10: arg->renderFramesize = IVAS_RENDER_FRAMESIZE_10MS; arg->render_num_subframes = IVAS_RENDER_NUM_SUBFR_10MS; break; case 20: arg->renderFramesize = IVAS_RENDER_FRAMESIZE_20MS; arg->render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; break; default: fprintf( stderr, "Error: Invalid render frame size %d \n\n", tmp ); Loading Loading @@ -2148,10 +2137,10 @@ static ivas_error decodeG192( } } int16_t num_subframes; if ( ( error = IVAS_DEC_GetNumOrientationSubframes( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK ) IVAS_RENDER_NUM_SUBFR num_subframes; if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetNumOrientationSubframes failed: \n" ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading @@ -2162,7 +2151,7 @@ static ivas_error decodeG192( if ( headRotReader == NULL ) { for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { Quaternions[i].w_fx = -12582912; Quaternions[i].x_fx = 0; Loading @@ -2177,7 +2166,7 @@ static ivas_error decodeG192( } else { for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) { Loading @@ -2187,7 +2176,7 @@ static ivas_error decodeG192( } } for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) { Loading @@ -2205,7 +2194,7 @@ static ivas_error decodeG192( int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK ) { Loading @@ -2213,7 +2202,7 @@ static ivas_error decodeG192( goto cleanup; } } for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternions[i], enableHeadRotation[i], enableExternalOrientation[i], enableRotationInterpolation[i], numFramesToTargetOrientation[i], i ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2979,10 +2968,10 @@ static ivas_error decodeVoIP( } } int16_t num_subframes; if ( ( error = IVAS_DEC_GetNumOrientationSubframes( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK ) IVAS_RENDER_NUM_SUBFR num_subframes; if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetNumOrientationSubframes failed: \n" ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading @@ -2993,7 +2982,7 @@ static ivas_error decodeVoIP( if ( headRotReader == NULL ) { for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { Quaternions[i].w_fx = -12582912; Quaternions[i].x_fx = 0; Loading @@ -3008,7 +2997,7 @@ static ivas_error decodeVoIP( } else { for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) { Loading @@ -3018,7 +3007,7 @@ static ivas_error decodeVoIP( } } for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) { Loading @@ -3036,7 +3025,7 @@ static ivas_error decodeVoIP( int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK ) Loading @@ -3046,7 +3035,7 @@ static ivas_error decodeVoIP( goto cleanup; } } for ( i = 0; i < num_subframes; i++ ) for ( i = 0; i < (int16_t) num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternions[i], enableHeadRotation[i], enableExternalOrientation[i], enableRotationInterpolation[i], numFramesToTargetOrientation[i], i ) ) != IVAS_ERR_OK ) { Loading Loading @@ -3756,12 +3745,6 @@ static ivas_error load_hrtf_from_file( /*------------------------------------------------------------------------------------------* * Release HRTF binary data *------------------------------------------------------------------------------------------*/ if ( !( binaural_renderer == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) && binaural_renderer_sec != IVAS_BIN_RENDERER_TYPE_TDREND && hHrtfBinary->hHrtfTD != NULL ) { destroy_td_hrtf( hHrtfBinary->hHrtfTD ); } if ( ( error = IVAS_DEC_HRTF_binary_close( hIvasDec, hHrtfBinary->binaural_renderer_old ) ) != IVAS_ERR_OK ) { return error; Loading @@ -3783,13 +3766,15 @@ static ivas_error load_hrtf_from_file( if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer_sec == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) { if ( ( error = IVAS_DEC_GetHrtfTDrendHandle( hIvasDec, &hHrtfBinary->hHrtfTD ) ) != IVAS_ERR_OK ) IVAS_DEC_HRTF_TD_HANDLE *hHrtfTD = NULL; if ( ( error = IVAS_DEC_GetHrtfTDrendHandle( hIvasDec, &hHrtfTD ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfTDrendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } if ( ( error = load_TDrend_HRTF_binary( *hHrtfBinary->hHrtfTD, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_TDrend_HRTF_binary( *hHrtfTD, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -3798,7 +3783,7 @@ static ivas_error load_hrtf_from_file( } else { destroy_td_hrtf( hHrtfBinary->hHrtfTD ); destroy_td_hrtf( hHrtfTD ); } } } Loading Loading @@ -3871,17 +3856,17 @@ static ivas_error load_hrtf_from_file( } } } } if ( hHrtfBinary->hHrtfStatistics == NULL && ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_FASTCONV || binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND ) && OutputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if ( ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_FASTCONV || binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND ) && OutputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfBinary->hHrtfStatistics ) ) != IVAS_ERR_OK ) IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL; if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfStatisticsHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } if ( ( error = load_reverb_binary( *hHrtfBinary->hHrtfStatistics, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_HrtfStatistics_from_binary( *hHrtfStatistics, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -3890,7 +3875,8 @@ static ivas_error load_hrtf_from_file( } else { destroy_hrtf_statistics( hHrtfBinary->hHrtfStatistics ); destroy_hrtf_statistics( hHrtfStatistics ); } } } } Loading Loading @@ -3939,7 +3925,7 @@ static ivas_error restartDecoder( IVAS_AUDIO_CONFIG outputConfig = ( decMode == IVAS_DEC_MODE_IVAS ) ? arg->outputConfig : IVAS_AUDIO_CONFIG_MONO; if ( ( error = IVAS_DEC_Configure( hIvasDec, arg->output_Fs, outputConfig, arg->renderFramesize, arg->customLsOutputEnabled, arg->hrtfReaderEnabled, if ( ( error = IVAS_DEC_Configure( hIvasDec, arg->output_Fs, outputConfig, arg->render_num_subframes, arg->customLsOutputEnabled, arg->hrtfReaderEnabled, arg->enableHeadRotation, arg->enableExternalOrientation, arg->orientation_tracking, arg->renderConfigEnabled, arg->roomSize, arg->non_diegetic_pan_enabled, arg->non_diegetic_pan_gain_fx, arg->dpidEnabled, aeID, arg->objEditEnabled, arg->delayCompensationEnabled ) ) != IVAS_ERR_OK ) { Loading @@ -3947,9 +3933,9 @@ static ivas_error restartDecoder( goto cleanup; } if ( ( error = IVAS_DEC_GetRenderFramesize( hIvasDec, &arg->renderFramesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg->render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading @@ -3972,7 +3958,7 @@ static ivas_error restartDecoder( * This will be ignored if output format is not split rendering. */ if ( renderConfig != NULL ) { renderConfig->split_rend_config.isar_frame_size_ms = (int16_t) arg->renderFramesize /* given in number of 5ms subframes */ * 5; renderConfig->split_rend_config.isar_frame_size_ms = (int16_t) arg->render_num_subframes * 5; } if ( arg->renderConfigEnabled && renderConfig != NULL ) Loading
apps/isar_post_rend.c +13 −13 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ typedef struct bool delayCompensationEnabled; bool quietModeEnabled; bool sceneDescriptionInput; IVAS_RENDER_FRAMESIZE render_framesize; IVAS_RENDER_NUM_SUBFR render_num_subframes; } CmdlnArgs; typedef enum Loading Loading @@ -340,13 +340,13 @@ static bool parseInConfig( } static bool parseRenderFramesize( static bool parseRenderNumSubfr( char *value, IVAS_RENDER_FRAMESIZE *render_framesize ) IVAS_RENDER_NUM_SUBFR *render_num_subframes ) { int32_t tmp; *render_framesize = IVAS_RENDER_FRAMESIZE_UNKNOWN; *render_num_subframes = IVAS_RENDER_NUM_SUBFR_UNKNOWN; if ( !is_digits_only( value ) ) { return false; Loading @@ -355,13 +355,13 @@ static bool parseRenderFramesize( switch ( (int16_t) tmp ) { case 5: *render_framesize = IVAS_RENDER_FRAMESIZE_5MS; *render_num_subframes = IVAS_RENDER_NUM_SUBFR_5MS; break; case 10: *render_framesize = IVAS_RENDER_FRAMESIZE_10MS; *render_num_subframes = IVAS_RENDER_NUM_SUBFR_10MS; break; case 20: *render_framesize = IVAS_RENDER_FRAMESIZE_20MS; *render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; break; default: return false; Loading Loading @@ -476,7 +476,7 @@ static CmdlnArgs defaultArgs( args.quietModeEnabled = false; args.sceneDescriptionInput = false; args.render_framesize = IVAS_RENDER_FRAMESIZE_20MS; args.render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; return args; } Loading Loading @@ -559,7 +559,7 @@ static void parseOption( break; case CmdLnOptionId_framing: assert( numOptionValues == 1 ); if ( !parseRenderFramesize( optionValues[0], &args->render_framesize ) ) if ( !parseRenderNumSubfr( optionValues[0], &args->render_num_subframes ) ) { fprintf( stderr, "Unknown or invalid option for frame size: %s\n", optionValues[0] ); exit( -1 ); Loading Loading @@ -951,7 +951,7 @@ int main( audioReader = NULL; /* Force owerwrite of command line provided rendersize to align with codec frame size */ args.render_framesize = bitsBuffer.config.isar_frame_size_ms / 5; args.render_num_subframes = bitsBuffer.config.isar_frame_size_ms / 5; } /*if split renderer is running in post renderer mode*/ else if ( ( args.inConfig.numBinBuses > 0 ) && ( args.inConfig.binBuses[0].audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) Loading Loading @@ -1023,9 +1023,9 @@ int main( * Open ISAR handle *------------------------------------------------------------------------------------------*/ const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); const int16_t frameSize_smpls = (int16_t) ( ( args.render_num_subframes ) * args.sampleRate * 5 / ( 1000 ) ); args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_BINAURAL; if ( ( error = ISAR_POST_REND_open( &hIsarPostRend, args.sampleRate, args.outConfig.audioConfig, true, 0, 0, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) if ( ( error = ISAR_POST_REND_open( &hIsarPostRend, args.sampleRate, args.outConfig.audioConfig, true, 0, 0, (int16_t) args.render_num_subframes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError opening renderer handle: %s\n", ivas_error_to_string( error ) ); goto cleanup; Loading Loading @@ -1243,7 +1243,7 @@ int main( convertInputBuffer( inpInt16Buffer, numSamplesRead, inBuffer.config.numSamplesPerChannel, num_in_channels, inFloatBuffer_fx ); *inBuffer.pq_fact = 0; int16_t num_subframes, sf_idx; num_subframes = (int16_t) args.render_framesize; num_subframes = (int16_t) args.render_num_subframes; /* Read from head rotation trajectory file if specified */ if ( headRotReader != NULL ) Loading