Loading Workspace_msvc/isar_post_rend.vcxproj +0 −2 Original line number Diff line number Diff line Loading @@ -148,8 +148,6 @@ </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\apps\isar_post_rend.c" /> <ClCompile Include="..\lib_com\enh64.c" /> <ClCompile Include="..\lib_com\enhUL32.c" /> </ItemGroup> <ItemGroup> <ProjectReference Include="lib_debug.vcxproj"> Loading Workspace_msvc/lib_com.vcxproj +0 −1 Original line number Diff line number Diff line Loading @@ -132,7 +132,6 @@ <ClCompile Include="..\lib_com\basop_util.c" /> <ClCompile Include="..\lib_com\bitallocsum_fx.c" /> <ClCompile Include="..\lib_com\bitalloc_fx.c" /> <ClCompile Include="..\lib_com\bitstream.c" /> <ClCompile Include="..\lib_com\bitstream_fx.c" /> <ClCompile Include="..\lib_com\bits_alloc_fx.c" /> <ClCompile Include="..\lib_com\cb_shape_fx.c" /> Loading Workspace_msvc/lib_com.vcxproj.filters +295 −293 File changed.Preview size limit exceeded, changes collapsed. Show changes apps/decoder.c +68 −52 Original line number Diff line number Diff line Loading @@ -377,6 +377,7 @@ int main( } } #ifndef FIX_1158_FASTCONV_REVERB_HRTF /*------------------------------------------------------------------------------------------* * Open renderer configuration reader file *------------------------------------------------------------------------------------------*/ Loading @@ -397,6 +398,7 @@ int main( goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Configure the decoder Loading Loading @@ -435,7 +437,7 @@ int main( { if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nSplit rendering configure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading @@ -461,7 +463,19 @@ int main( } } #ifdef FIX_VOIP_FUNCTIONS /*-----------------------------------------------------------------* * Print config information *-----------------------------------------------------------------*/ if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #else IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif /*-------------------------------------------------------------------* * Load renderer configuration from file Loading @@ -486,6 +500,14 @@ int main( goto cleanup; } #ifdef FIX_1158_FASTCONV_REVERB_HRTF if ( ( error = RenderConfigReader_open( arg.renderConfigFilename, &renderConfigReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open Renderer configuration file %s \n\n", arg.renderConfigFilename ); goto cleanup; } #endif if ( RenderConfigReader_read( renderConfigReader, arg.renderConfigFilename, &renderConfig ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); Loading Loading @@ -516,8 +538,7 @@ int main( goto cleanup; } #endif if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) 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 && ( renderConfig.split_rend_config.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE || Loading @@ -532,7 +553,7 @@ int main( if ( ( error = IVAS_DEC_SetRenderFramesize( hIvasDec, arg.renderFramesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_SetRenderFramesize failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading Loading @@ -565,8 +586,11 @@ int main( #endif goto cleanup; } #ifndef FIX_587_DEFAULT_REVERB renderConfig.roomAcoustics.override = true; #endif } /* 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; Loading Loading @@ -1211,7 +1235,7 @@ static bool parseCmdlIVAS_dec( arg->outputMdFilename = argv[i + 1]; if ( arg->outputMdFilename[0] == '\0' ) { fprintf( stderr, "Error: output metadata file path not specified\n\n" ); fprintf( stderr, "Error: Split rendering output metadata file path not specified\n\n" ); usage_dec(); return false; } Loading Loading @@ -1636,6 +1660,7 @@ static ivas_error initOnFirstGoodFrame( uint16_t *pNumObj, /* o : */ SplitFileReadWrite **splitRendWriter ) { int16_t isSplitRend, isSplitCoded; ivas_error error = IVAS_ERR_UNKNOWN; /* Now delay, number of output channels and frame size are known */ Loading @@ -1645,7 +1670,19 @@ static ivas_error initOnFirstGoodFrame( return error; } if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_enabled, code: %d\n", error ); return error; } if ( ( error = IVAS_DEC_is_split_rendering_coded_out( hIvasDec, &isSplitCoded ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_coded_out, code: %d\n", error ); return error; } if ( isSplitRend ) { pFullDelayNumSamples[0] = 0; } Loading @@ -1670,7 +1707,7 @@ static ivas_error initOnFirstGoodFrame( return error; } if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) if ( isSplitRend ) { /* Open split rendering metadata writer */ int16_t delayNumSamples_temp[3]; Loading @@ -1687,29 +1724,15 @@ static ivas_error initOnFirstGoodFrame( return error; } if ( ( error = IVAS_DEC_GetSplitRendBitstreamHeader( hIvasDec, &splitRendCodec, &poseCorrection, &splitRendIsarFrameSizeMs, &splitRendCodecFrameSizeMs, &lc3plusHighRes ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetSplitRendBitstreamHeader( hIvasDec, &splitRendCodec, &poseCorrection, &splitRendIsarFrameSizeMs, &splitRendCodecFrameSizeMs, &lc3plusHighRes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get split renderer bitstream header: %s\n", ivas_error_to_string( error ) ); return error; } if ( IVAS_DEC_is_split_rendering_coded_out( hIvasDec ) ) if ( isSplitCoded ) { if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputWavFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputWavFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename ); return error; Loading @@ -1723,16 +1746,7 @@ static ivas_error initOnFirstGoodFrame( return IVAS_ERR_INVALID_SPLIT_REND_CONFIG; } if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputMdFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputMdFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename ); return error; Loading @@ -1740,7 +1754,7 @@ static ivas_error initOnFirstGoodFrame( } } if ( IVAS_DEC_is_split_rendering_coded_out( hIvasDec ) == 0 ) if ( !isSplitCoded ) { /* Open audio writer and write all previously skipped bad frames now that frame size is known */ if ( ( error = AudioFileWriter_open( ppAfWriter, arg.outputWavFilename, arg.output_Fs, *pNumOutChannels ) ) != IVAS_ERR_OK ) Loading Loading @@ -1775,7 +1789,6 @@ static ivas_error initOnFirstGoodFrame( } else { if ( *pRemainingDelayNumSamples < *numOutSamples ) { if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, *numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) Loading Loading @@ -1945,11 +1958,23 @@ static ivas_error decodeG192( IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } }; int16_t vec_pos_update, vec_pos_len; SplitFileReadWrite *splitRendWriter = NULL; int16_t isSplitRend, isSplitCoded; #ifdef FIX_1053_REVERB_RECONFIGURATION IVAS_RENDER_CONFIG_DATA renderConfig; RenderConfigReader *renderConfigReader = NULL; if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_enabled, code: %d\n", error ); return error; } if ( ( error = IVAS_DEC_is_split_rendering_coded_out( hIvasDec, &isSplitCoded ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_coded_out, code: %d\n", error ); return error; } if ( arg.renderConfigEnabled ) { if ( ( error = RenderConfigReader_open( arg.renderConfigFilename, &renderConfigReader ) ) != IVAS_ERR_OK ) Loading Loading @@ -1980,7 +2005,6 @@ static ivas_error decodeG192( /* we always start with needing a new frame */ needNewFrame = true; if ( !arg.quietModeEnabled ) { fprintf( stdout, "\n------ Running the decoder ------\n\n" ); Loading Loading @@ -2012,13 +2036,13 @@ static ivas_error decodeG192( return error; } /*------------------------------------------------------------------------------------------* * Loop for every packet (frame) of bitstream data * - Read the bitstream packet * - Run the decoder * - Write the synthesized signal into output file *------------------------------------------------------------------------------------------*/ while ( 1 ) { /* Read next frame if not enough samples availble */ Loading Loading @@ -2188,7 +2212,7 @@ static ivas_error decodeG192( } } if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) if ( isSplitRend ) { if ( ( error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (Word16 *) ( pcmBuf + nOutChannels * nSamplesRendered ), splitRendBits, &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2253,7 +2277,7 @@ static ivas_error decodeG192( /* Write current frame */ if ( decodedGoodFrame ) { if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) if ( isSplitRend ) { if ( split_rend_write_bitstream_to_file( splitRendWriter, splitRendBits->bits_buf, &splitRendBits->bits_read, &splitRendBits->bits_written ) != IVAS_ERR_OK ) { Loading @@ -2262,7 +2286,7 @@ static ivas_error decodeG192( } } if ( IVAS_DEC_is_split_rendering_coded_out( hIvasDec ) == 0 ) if ( !isSplitCoded ) { if ( delayNumSamples < nOutSamples ) { Loading Loading @@ -2829,8 +2853,7 @@ static ivas_error decodeVoIP( { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } } Loading @@ -2838,8 +2861,7 @@ static ivas_error decodeVoIP( for ( i = 0; i < num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -3066,14 +3088,10 @@ static ivas_error decodeVoIP( } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; } #else systemTime_ms += systemTimeInc_ms; #endif #ifdef WMOPS update_mem(); Loading @@ -3082,7 +3100,6 @@ static ivas_error decodeVoIP( } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesFlushed = 0; /* decode and get samples */ Loading Loading @@ -3162,7 +3179,6 @@ static ivas_error decodeVoIP( } } } #endif /*------------------------------------------------------------------------------------------* Loading apps/encoder.c +10 −1 Original line number Diff line number Diff line Loading @@ -1486,6 +1486,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Too low number of ISM channels specified!\n\n" ); usage_enc(); return false; } else { Loading @@ -1497,6 +1498,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Too high number of ISM channels!\n\n" ); usage_enc(); return false; } } } Loading @@ -1504,6 +1506,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Number of ISM channels not specified!\n\n" ); usage_enc(); return false; } if ( i < argc - 4 ) { Loading @@ -1523,7 +1526,7 @@ static bool parseCmdlIVAS_enc( default: fprintf( stderr, "Error: MASA channels must be 1 or 2.\n\n" ); usage_enc(); break; return false; } } Loading @@ -1548,6 +1551,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: not enough arguments\n\n" ); usage_enc(); return false; } } Loading @@ -1560,6 +1564,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: not enough MASA arguments\n\n" ); usage_enc(); return false; } } else if ( strcmp( to_upper( argv[i] ), "-ISM_SBA" ) == 0 ) Loading @@ -1578,6 +1583,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Too low number of ISM channels specified!\n\n" ); usage_enc(); return false; } else { Loading @@ -1589,6 +1595,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Too high number of ISM channels!\n\n" ); usage_enc(); return false; } } } Loading @@ -1596,6 +1603,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Number of ISM channels not specified!\n\n" ); usage_enc(); return false; } if ( i < argc - 4 ) Loading Loading @@ -1647,6 +1655,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: not enough arguments\n\n" ); usage_enc(); return false; } } } Loading Loading
Workspace_msvc/isar_post_rend.vcxproj +0 −2 Original line number Diff line number Diff line Loading @@ -148,8 +148,6 @@ </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\apps\isar_post_rend.c" /> <ClCompile Include="..\lib_com\enh64.c" /> <ClCompile Include="..\lib_com\enhUL32.c" /> </ItemGroup> <ItemGroup> <ProjectReference Include="lib_debug.vcxproj"> Loading
Workspace_msvc/lib_com.vcxproj +0 −1 Original line number Diff line number Diff line Loading @@ -132,7 +132,6 @@ <ClCompile Include="..\lib_com\basop_util.c" /> <ClCompile Include="..\lib_com\bitallocsum_fx.c" /> <ClCompile Include="..\lib_com\bitalloc_fx.c" /> <ClCompile Include="..\lib_com\bitstream.c" /> <ClCompile Include="..\lib_com\bitstream_fx.c" /> <ClCompile Include="..\lib_com\bits_alloc_fx.c" /> <ClCompile Include="..\lib_com\cb_shape_fx.c" /> Loading
Workspace_msvc/lib_com.vcxproj.filters +295 −293 File changed.Preview size limit exceeded, changes collapsed. Show changes
apps/decoder.c +68 −52 Original line number Diff line number Diff line Loading @@ -377,6 +377,7 @@ int main( } } #ifndef FIX_1158_FASTCONV_REVERB_HRTF /*------------------------------------------------------------------------------------------* * Open renderer configuration reader file *------------------------------------------------------------------------------------------*/ Loading @@ -397,6 +398,7 @@ int main( goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Configure the decoder Loading Loading @@ -435,7 +437,7 @@ int main( { if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nSplit rendering configure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading @@ -461,7 +463,19 @@ int main( } } #ifdef FIX_VOIP_FUNCTIONS /*-----------------------------------------------------------------* * Print config information *-----------------------------------------------------------------*/ if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #else IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif /*-------------------------------------------------------------------* * Load renderer configuration from file Loading @@ -486,6 +500,14 @@ int main( goto cleanup; } #ifdef FIX_1158_FASTCONV_REVERB_HRTF if ( ( error = RenderConfigReader_open( arg.renderConfigFilename, &renderConfigReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open Renderer configuration file %s \n\n", arg.renderConfigFilename ); goto cleanup; } #endif if ( RenderConfigReader_read( renderConfigReader, arg.renderConfigFilename, &renderConfig ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); Loading Loading @@ -516,8 +538,7 @@ int main( goto cleanup; } #endif if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) 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 && ( renderConfig.split_rend_config.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE || Loading @@ -532,7 +553,7 @@ int main( if ( ( error = IVAS_DEC_SetRenderFramesize( hIvasDec, arg.renderFramesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_SetRenderFramesize failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading Loading @@ -565,8 +586,11 @@ int main( #endif goto cleanup; } #ifndef FIX_587_DEFAULT_REVERB renderConfig.roomAcoustics.override = true; #endif } /* 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; Loading Loading @@ -1211,7 +1235,7 @@ static bool parseCmdlIVAS_dec( arg->outputMdFilename = argv[i + 1]; if ( arg->outputMdFilename[0] == '\0' ) { fprintf( stderr, "Error: output metadata file path not specified\n\n" ); fprintf( stderr, "Error: Split rendering output metadata file path not specified\n\n" ); usage_dec(); return false; } Loading Loading @@ -1636,6 +1660,7 @@ static ivas_error initOnFirstGoodFrame( uint16_t *pNumObj, /* o : */ SplitFileReadWrite **splitRendWriter ) { int16_t isSplitRend, isSplitCoded; ivas_error error = IVAS_ERR_UNKNOWN; /* Now delay, number of output channels and frame size are known */ Loading @@ -1645,7 +1670,19 @@ static ivas_error initOnFirstGoodFrame( return error; } if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_enabled, code: %d\n", error ); return error; } if ( ( error = IVAS_DEC_is_split_rendering_coded_out( hIvasDec, &isSplitCoded ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_coded_out, code: %d\n", error ); return error; } if ( isSplitRend ) { pFullDelayNumSamples[0] = 0; } Loading @@ -1670,7 +1707,7 @@ static ivas_error initOnFirstGoodFrame( return error; } if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) if ( isSplitRend ) { /* Open split rendering metadata writer */ int16_t delayNumSamples_temp[3]; Loading @@ -1687,29 +1724,15 @@ static ivas_error initOnFirstGoodFrame( return error; } if ( ( error = IVAS_DEC_GetSplitRendBitstreamHeader( hIvasDec, &splitRendCodec, &poseCorrection, &splitRendIsarFrameSizeMs, &splitRendCodecFrameSizeMs, &lc3plusHighRes ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetSplitRendBitstreamHeader( hIvasDec, &splitRendCodec, &poseCorrection, &splitRendIsarFrameSizeMs, &splitRendCodecFrameSizeMs, &lc3plusHighRes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get split renderer bitstream header: %s\n", ivas_error_to_string( error ) ); return error; } if ( IVAS_DEC_is_split_rendering_coded_out( hIvasDec ) ) if ( isSplitCoded ) { if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputWavFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputWavFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename ); return error; Loading @@ -1723,16 +1746,7 @@ static ivas_error initOnFirstGoodFrame( return IVAS_ERR_INVALID_SPLIT_REND_CONFIG; } if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputMdFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputMdFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename ); return error; Loading @@ -1740,7 +1754,7 @@ static ivas_error initOnFirstGoodFrame( } } if ( IVAS_DEC_is_split_rendering_coded_out( hIvasDec ) == 0 ) if ( !isSplitCoded ) { /* Open audio writer and write all previously skipped bad frames now that frame size is known */ if ( ( error = AudioFileWriter_open( ppAfWriter, arg.outputWavFilename, arg.output_Fs, *pNumOutChannels ) ) != IVAS_ERR_OK ) Loading Loading @@ -1775,7 +1789,6 @@ static ivas_error initOnFirstGoodFrame( } else { if ( *pRemainingDelayNumSamples < *numOutSamples ) { if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, *numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) Loading Loading @@ -1945,11 +1958,23 @@ static ivas_error decodeG192( IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } }; int16_t vec_pos_update, vec_pos_len; SplitFileReadWrite *splitRendWriter = NULL; int16_t isSplitRend, isSplitCoded; #ifdef FIX_1053_REVERB_RECONFIGURATION IVAS_RENDER_CONFIG_DATA renderConfig; RenderConfigReader *renderConfigReader = NULL; if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_enabled, code: %d\n", error ); return error; } if ( ( error = IVAS_DEC_is_split_rendering_coded_out( hIvasDec, &isSplitCoded ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_coded_out, code: %d\n", error ); return error; } if ( arg.renderConfigEnabled ) { if ( ( error = RenderConfigReader_open( arg.renderConfigFilename, &renderConfigReader ) ) != IVAS_ERR_OK ) Loading Loading @@ -1980,7 +2005,6 @@ static ivas_error decodeG192( /* we always start with needing a new frame */ needNewFrame = true; if ( !arg.quietModeEnabled ) { fprintf( stdout, "\n------ Running the decoder ------\n\n" ); Loading Loading @@ -2012,13 +2036,13 @@ static ivas_error decodeG192( return error; } /*------------------------------------------------------------------------------------------* * Loop for every packet (frame) of bitstream data * - Read the bitstream packet * - Run the decoder * - Write the synthesized signal into output file *------------------------------------------------------------------------------------------*/ while ( 1 ) { /* Read next frame if not enough samples availble */ Loading Loading @@ -2188,7 +2212,7 @@ static ivas_error decodeG192( } } if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) if ( isSplitRend ) { if ( ( error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (Word16 *) ( pcmBuf + nOutChannels * nSamplesRendered ), splitRendBits, &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2253,7 +2277,7 @@ static ivas_error decodeG192( /* Write current frame */ if ( decodedGoodFrame ) { if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) if ( isSplitRend ) { if ( split_rend_write_bitstream_to_file( splitRendWriter, splitRendBits->bits_buf, &splitRendBits->bits_read, &splitRendBits->bits_written ) != IVAS_ERR_OK ) { Loading @@ -2262,7 +2286,7 @@ static ivas_error decodeG192( } } if ( IVAS_DEC_is_split_rendering_coded_out( hIvasDec ) == 0 ) if ( !isSplitCoded ) { if ( delayNumSamples < nOutSamples ) { Loading Loading @@ -2829,8 +2853,7 @@ static ivas_error decodeVoIP( { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } } Loading @@ -2838,8 +2861,7 @@ static ivas_error decodeVoIP( for ( i = 0; i < num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -3066,14 +3088,10 @@ static ivas_error decodeVoIP( } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; } #else systemTime_ms += systemTimeInc_ms; #endif #ifdef WMOPS update_mem(); Loading @@ -3082,7 +3100,6 @@ static ivas_error decodeVoIP( } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesFlushed = 0; /* decode and get samples */ Loading Loading @@ -3162,7 +3179,6 @@ static ivas_error decodeVoIP( } } } #endif /*------------------------------------------------------------------------------------------* Loading
apps/encoder.c +10 −1 Original line number Diff line number Diff line Loading @@ -1486,6 +1486,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Too low number of ISM channels specified!\n\n" ); usage_enc(); return false; } else { Loading @@ -1497,6 +1498,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Too high number of ISM channels!\n\n" ); usage_enc(); return false; } } } Loading @@ -1504,6 +1506,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Number of ISM channels not specified!\n\n" ); usage_enc(); return false; } if ( i < argc - 4 ) { Loading @@ -1523,7 +1526,7 @@ static bool parseCmdlIVAS_enc( default: fprintf( stderr, "Error: MASA channels must be 1 or 2.\n\n" ); usage_enc(); break; return false; } } Loading @@ -1548,6 +1551,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: not enough arguments\n\n" ); usage_enc(); return false; } } Loading @@ -1560,6 +1564,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: not enough MASA arguments\n\n" ); usage_enc(); return false; } } else if ( strcmp( to_upper( argv[i] ), "-ISM_SBA" ) == 0 ) Loading @@ -1578,6 +1583,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Too low number of ISM channels specified!\n\n" ); usage_enc(); return false; } else { Loading @@ -1589,6 +1595,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Too high number of ISM channels!\n\n" ); usage_enc(); return false; } } } Loading @@ -1596,6 +1603,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: Number of ISM channels not specified!\n\n" ); usage_enc(); return false; } if ( i < argc - 4 ) Loading Loading @@ -1647,6 +1655,7 @@ static bool parseCmdlIVAS_enc( { fprintf( stderr, "Error: not enough arguments\n\n" ); usage_enc(); return false; } } } Loading