Loading apps/decoder.c +42 −42 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 Loading @@ -198,7 +198,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 Loading @@ -415,11 +415,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 @@ -427,13 +427,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 @@ -442,7 +442,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 @@ -451,14 +451,14 @@ 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.renderFramesize != asked_frame_size ) ) 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" ); } Loading Loading @@ -574,24 +574,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 @@ -616,7 +616,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 @@ -938,7 +938,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 @@ -1105,13 +1105,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 @@ -2161,10 +2161,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 @@ -2175,7 +2175,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 @@ -2190,7 +2190,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 @@ -2200,7 +2200,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 @@ -2218,7 +2218,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 @@ -2226,7 +2226,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 @@ -2992,10 +2992,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 @@ -3006,7 +3006,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 @@ -3021,7 +3021,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 @@ -3031,7 +3031,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 @@ -3049,7 +3049,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 @@ -3059,7 +3059,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 @@ -3988,7 +3988,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 @@ -3996,9 +3996,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 @@ -4021,7 +4021,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 apps/renderer.c +14 −14 Original line number Diff line number Diff line Loading @@ -197,7 +197,7 @@ typedef struct bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; int16_t syncMdDelay; IVAS_RENDER_FRAMESIZE render_framesize; IVAS_RENDER_NUM_SUBFR render_num_subframes; uint16_t directivityPatternId[RENDERER_MAX_ISM_INPUTS]; AcousticEnvironmentSequence aeSequence; IVAS_ROOM_SIZE_T reverbRoomSize; Loading Loading @@ -1002,12 +1002,12 @@ int main( goto cleanup; } 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 * BINAURAL_RENDERING_FRAME_SIZE_MS / ( 1000 ) ); Word32 nonDiegeticPanGain_fx = ( args.nonDiegeticPanGain == 1.0f ) ? ONE_IN_Q31 : ( args.nonDiegeticPanGain == -1.0f ) ? L_negate( ONE_IN_Q31 ) : (Word32) ( args.nonDiegeticPanGain * ( 1LL << Q31 ) ); IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, nonDiegeticPanGain_fx, args.Opt_Headrotation, args.Opt_ExternalOrientation, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, nonDiegeticPanGain_fx, args.Opt_Headrotation, args.Opt_ExternalOrientation, (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 @@ -1235,7 +1235,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) args.render_framesize /* given in number of 5ms subframes */ * 5; renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) args.render_num_subframes * BINAURAL_RENDERING_FRAME_SIZE_MS; if ( ( error = IVAS_REND_FeedRenderConfig( hIvasRend, renderConfig ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1663,7 +1663,7 @@ int main( { int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; const bool isCurrentFrameMultipleOf20ms = frame % ( 4 / args.render_framesize ) == 0; const bool isCurrentFrameMultipleOf20ms = frame % ( IVAS_RENDER_NUM_SUBFR_20MS / args.render_num_subframes ) == 0; if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && renderConfigReader != NULL && args.aeSequence.count > 0 && args.aeSequence.pValidity[args.aeSequence.selected] != 0 ) Loading Loading @@ -1727,7 +1727,7 @@ int main( } int16_t num_subframes, sf_idx; num_subframes = (int16_t) args.render_framesize; num_subframes = (int16_t) args.render_num_subframes; if ( isCurrentFrameMultipleOf20ms && !flushRendererLastFrame ) { Loading Loading @@ -2436,13 +2436,13 @@ static bool parseDiegeticPan( } 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 @@ -2451,13 +2451,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 @@ -2826,7 +2826,7 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); args.render_framesize = IVAS_RENDER_FRAMESIZE_20MS; args.render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; args.syncMdDelay = 0; for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) { Loading Loading @@ -2997,7 +2997,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 lib_com/common_api_types.h +6 −5 Original line number Diff line number Diff line Loading @@ -173,12 +173,12 @@ typedef enum typedef enum { IVAS_RENDER_FRAMESIZE_UNKNOWN = 0, IVAS_RENDER_FRAMESIZE_5MS = 1, IVAS_RENDER_FRAMESIZE_10MS = 2, IVAS_RENDER_FRAMESIZE_20MS = 4 IVAS_RENDER_NUM_SUBFR_UNKNOWN = 0, IVAS_RENDER_NUM_SUBFR_5MS = 1, IVAS_RENDER_NUM_SUBFR_10MS = 2, IVAS_RENDER_NUM_SUBFR_20MS = 4 } IVAS_RENDER_FRAMESIZE; } IVAS_RENDER_NUM_SUBFR; typedef enum { Loading @@ -186,6 +186,7 @@ typedef enum IVAS_ROOM_SIZE_SMALL, IVAS_ROOM_SIZE_MEDIUM, IVAS_ROOM_SIZE_LARGE } IVAS_ROOM_SIZE_T; typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; Loading lib_dec/ivas_init_dec_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -1557,7 +1557,7 @@ ivas_error ivas_init_decoder_front( IF( st_ivas->hDecoderConfig->Opt_ExternalOrientation ) { IF( NE_32( ( error = ivas_external_orientation_open_fx( &( st_ivas->hExtOrientationData ), st_ivas->hDecoderConfig->render_framesize ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_external_orientation_open_fx( &( st_ivas->hExtOrientationData ), st_ivas->hDecoderConfig->render_num_subframes ) ), IVAS_ERR_OK ) ) { return error; } Loading @@ -1570,7 +1570,7 @@ ivas_error ivas_init_decoder_front( test(); IF( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) { IF( NE_32( ( error = ivas_combined_orientation_open_fx( &( st_ivas->hCombinedOrientationData ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hDecoderConfig->render_framesize ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_combined_orientation_open_fx( &( st_ivas->hCombinedOrientationData ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hDecoderConfig->render_num_subframes ) ), IVAS_ERR_OK ) ) { return error; } Loading Loading
apps/decoder.c +42 −42 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 Loading @@ -198,7 +198,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 Loading @@ -415,11 +415,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 @@ -427,13 +427,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 @@ -442,7 +442,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 @@ -451,14 +451,14 @@ 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.renderFramesize != asked_frame_size ) ) 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" ); } Loading Loading @@ -574,24 +574,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 @@ -616,7 +616,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 @@ -938,7 +938,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 @@ -1105,13 +1105,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 @@ -2161,10 +2161,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 @@ -2175,7 +2175,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 @@ -2190,7 +2190,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 @@ -2200,7 +2200,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 @@ -2218,7 +2218,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 @@ -2226,7 +2226,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 @@ -2992,10 +2992,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 @@ -3006,7 +3006,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 @@ -3021,7 +3021,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 @@ -3031,7 +3031,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 @@ -3049,7 +3049,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 @@ -3059,7 +3059,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 @@ -3988,7 +3988,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 @@ -3996,9 +3996,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 @@ -4021,7 +4021,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
apps/renderer.c +14 −14 Original line number Diff line number Diff line Loading @@ -197,7 +197,7 @@ typedef struct bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; int16_t syncMdDelay; IVAS_RENDER_FRAMESIZE render_framesize; IVAS_RENDER_NUM_SUBFR render_num_subframes; uint16_t directivityPatternId[RENDERER_MAX_ISM_INPUTS]; AcousticEnvironmentSequence aeSequence; IVAS_ROOM_SIZE_T reverbRoomSize; Loading Loading @@ -1002,12 +1002,12 @@ int main( goto cleanup; } 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 * BINAURAL_RENDERING_FRAME_SIZE_MS / ( 1000 ) ); Word32 nonDiegeticPanGain_fx = ( args.nonDiegeticPanGain == 1.0f ) ? ONE_IN_Q31 : ( args.nonDiegeticPanGain == -1.0f ) ? L_negate( ONE_IN_Q31 ) : (Word32) ( args.nonDiegeticPanGain * ( 1LL << Q31 ) ); IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, nonDiegeticPanGain_fx, args.Opt_Headrotation, args.Opt_ExternalOrientation, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, nonDiegeticPanGain_fx, args.Opt_Headrotation, args.Opt_ExternalOrientation, (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 @@ -1235,7 +1235,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) args.render_framesize /* given in number of 5ms subframes */ * 5; renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) args.render_num_subframes * BINAURAL_RENDERING_FRAME_SIZE_MS; if ( ( error = IVAS_REND_FeedRenderConfig( hIvasRend, renderConfig ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1663,7 +1663,7 @@ int main( { int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; const bool isCurrentFrameMultipleOf20ms = frame % ( 4 / args.render_framesize ) == 0; const bool isCurrentFrameMultipleOf20ms = frame % ( IVAS_RENDER_NUM_SUBFR_20MS / args.render_num_subframes ) == 0; if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && renderConfigReader != NULL && args.aeSequence.count > 0 && args.aeSequence.pValidity[args.aeSequence.selected] != 0 ) Loading Loading @@ -1727,7 +1727,7 @@ int main( } int16_t num_subframes, sf_idx; num_subframes = (int16_t) args.render_framesize; num_subframes = (int16_t) args.render_num_subframes; if ( isCurrentFrameMultipleOf20ms && !flushRendererLastFrame ) { Loading Loading @@ -2436,13 +2436,13 @@ static bool parseDiegeticPan( } 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 @@ -2451,13 +2451,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 @@ -2826,7 +2826,7 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); args.render_framesize = IVAS_RENDER_FRAMESIZE_20MS; args.render_num_subframes = IVAS_RENDER_NUM_SUBFR_20MS; args.syncMdDelay = 0; for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) { Loading Loading @@ -2997,7 +2997,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
lib_com/common_api_types.h +6 −5 Original line number Diff line number Diff line Loading @@ -173,12 +173,12 @@ typedef enum typedef enum { IVAS_RENDER_FRAMESIZE_UNKNOWN = 0, IVAS_RENDER_FRAMESIZE_5MS = 1, IVAS_RENDER_FRAMESIZE_10MS = 2, IVAS_RENDER_FRAMESIZE_20MS = 4 IVAS_RENDER_NUM_SUBFR_UNKNOWN = 0, IVAS_RENDER_NUM_SUBFR_5MS = 1, IVAS_RENDER_NUM_SUBFR_10MS = 2, IVAS_RENDER_NUM_SUBFR_20MS = 4 } IVAS_RENDER_FRAMESIZE; } IVAS_RENDER_NUM_SUBFR; typedef enum { Loading @@ -186,6 +186,7 @@ typedef enum IVAS_ROOM_SIZE_SMALL, IVAS_ROOM_SIZE_MEDIUM, IVAS_ROOM_SIZE_LARGE } IVAS_ROOM_SIZE_T; typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; Loading
lib_dec/ivas_init_dec_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -1557,7 +1557,7 @@ ivas_error ivas_init_decoder_front( IF( st_ivas->hDecoderConfig->Opt_ExternalOrientation ) { IF( NE_32( ( error = ivas_external_orientation_open_fx( &( st_ivas->hExtOrientationData ), st_ivas->hDecoderConfig->render_framesize ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_external_orientation_open_fx( &( st_ivas->hExtOrientationData ), st_ivas->hDecoderConfig->render_num_subframes ) ), IVAS_ERR_OK ) ) { return error; } Loading @@ -1570,7 +1570,7 @@ ivas_error ivas_init_decoder_front( test(); IF( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) { IF( NE_32( ( error = ivas_combined_orientation_open_fx( &( st_ivas->hCombinedOrientationData ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hDecoderConfig->render_framesize ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_combined_orientation_open_fx( &( st_ivas->hCombinedOrientationData ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hDecoderConfig->render_num_subframes ) ), IVAS_ERR_OK ) ) { return error; } Loading