Loading .gitlab-ci.yml +47 −1 Original line number Diff line number Diff line Loading @@ -12,6 +12,13 @@ variables: EXIT_CODE_FAIL: 1 PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." value: 'default' options: - 'default' - 'test-be-release' default: interruptible: true # Make all jobs by default interruptible Loading Loading @@ -143,6 +150,8 @@ stages: when: never - if: $CI_PIPELINE_SOURCE == 'trigger' # Don't run triggered pipeline by default when: never - if: $MANUAL_PIPELINE_TYPE == 'test-be-release' # Skip all the normal jobs when testing manually against release codec when: never - when: on_success .rules-merge-request: Loading Loading @@ -329,6 +338,8 @@ codec-smoke-test: needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - *print-common-info # LTV update needed as ltv ISM metadata files are used - *update-ltv-repo - bash ci/smoke_test.sh ### analyze for failures - if ! [ -s smoke_test_output.txt ] || ! [ -s smoke_test_output_plc.txt ] || ! [ -s smoke_test_output_jbm_noEXT.txt ] || ! [ -s smoke_test_output_hrtf.txt ]; then echo "Error in smoke test"; exit 1; fi Loading Loading @@ -1037,6 +1048,40 @@ codec-comparison-on-main-push: reports: junit: report-junit.xml # --------------------------------------------------------------- # Manual jobs # --------------------------------------------------------------- test-be-to-release: stage: test tags: - ivas-windows resource_group: ivas-be-to-release-test-resource timeout: "20 minutes" rules: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-be-release' script: - echo "$CI_COMMIT_BRANCH" - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug /p:Platform=win32 /m | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression # path to release candidate refs defined in config.toml - echo "Placeholder for BE test to release script" - mkdir logs artifacts: name: "test-be-to-release--sha-$CI_COMMIT_SHORT_SHA--results" when: always expire_in: 1 week paths: - logs/ expose_as: "test-be-to-release results" # --------------------------------------------------------------- # Scheduled jobs on main # --------------------------------------------------------------- Loading Loading @@ -1291,6 +1336,7 @@ coverage-test-on-main-scheduled: timeout: 2 hours script: - *print-common-info - *update-ltv-repo - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script - python3 tests/create_short_testvectors.py Loading apps/decoder.c +402 −1597 File changed.Preview size limit exceeded, changes collapsed. Show changes apps/renderer.c +16 −135 Original line number Diff line number Diff line Loading @@ -777,12 +777,7 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; #ifndef API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif #ifdef API_5MS bool splitBinNeedsNewFrame = true; #endif #ifdef WMOPS reset_wmops(); Loading Loading @@ -1001,13 +996,7 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT } #endif const int16_t frameSize_smpls = (int16_t) ( #ifdef API_5MS ( args.framing_5ms ? 5 : 20 ) #else 20 #endif * args.sampleRate / 1000 ); const int16_t frameSize_smpls = (int16_t) ( ( args.framing_5ms ? 5 : 20 ) * args.sampleRate / 1000 ); IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 }; IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 }; Loading @@ -1017,12 +1006,8 @@ int main( IVAS_REND_InputId splitBinIds[RENDERER_MAX_BIN_INPUTS] = { 0 }; #endif if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain #ifdef API_5MS , ( args.framing_5ms ) ? 1 : 4 #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, ( args.framing_5ms ) ? 1 : 4 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading Loading @@ -1426,9 +1411,7 @@ int main( bitsBuffer.config.bufLenInBytes = bitsBufferSize; bitsBuffer.config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; bitsBuffer.config.poseCorrection = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; #ifdef API_5MS bitsBuffer.config.codec_frame_size_ms = 20; #endif #else inFloatBuffer = malloc( inBufferSize * sizeof( float ) ); outInt16Buffer = malloc( outBufferSize * sizeof( int16_t ) ); Loading Loading @@ -1458,35 +1441,23 @@ int main( fprintf( stdout, "\n\n-- Start the renderer (quiet mode) --\n\n" ); } #ifdef API_5MS ObjectPositionBuffer mtdBuffer; #endif while ( 1 ) { int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; #ifdef API_5MS const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; #endif #ifdef SPLIT_REND_WITH_HEAD_ROT numSamplesRead = 0; if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) #ifdef API_5MS && splitBinNeedsNewFrame #endif ) if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) && splitBinNeedsNewFrame ) { ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection #ifdef API_5MS , &bitsBuffer.config.codec_frame_size_ms #endif ); &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection, &bitsBuffer.config.codec_frame_size_ms ); if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -1514,11 +1485,7 @@ int main( } #endif if ( numSamplesRead == 0 #ifdef API_5MS && splitBinNeedsNewFrame #endif ) if ( numSamplesRead == 0 && splitBinNeedsNewFrame ) { /* end of input data */ break; Loading @@ -1533,18 +1500,10 @@ int main( ); int16_t num_subframes, sf_idx; #ifdef API_5MS num_subframes = ( args.framing_5ms ) ? 1 : IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; #else num_subframes = IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; #endif #ifdef API_5MS if ( isCurrentFrameMultipleOf20ms ) { #else ObjectPositionBuffer mtdBuffer; #endif IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); if ( referenceVectorReader != NULL ) Loading Loading @@ -1580,14 +1539,11 @@ int main( } } } #ifdef API_5MS } #endif /* Read from head rotation trajectory file if specified */ if ( headRotReader != NULL ) { #ifdef API_5MS for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) { IVAS_QUATERNION headRot; Loading @@ -1603,70 +1559,26 @@ int main( , DEFAULT_AXIS #endif #ifdef API_5MS , sf_idx #endif ) ) != IVAS_ERR_OK ) sf_idx ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } #else IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer, Pos #ifdef SPLIT_REND_WITH_HEAD_ROT , DEFAULT_AXIS #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } else { #ifdef API_5MS if ( ( error = IVAS_REND_DisableHeadRotation( hIvasRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error disabling head rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #else /* API_5MS */ error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL #ifdef SPLIT_REND_WITH_HEAD_ROT , DEFAULT_AXIS #endif ); if ( error != IVAS_ERR_OK && error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif /* API_5MS */ } #ifdef SPLIT_REND_WITH_HEAD_ROT /* Read from split renderer bfi file if specified */ if ( splitRendBFIReader != NULL #ifdef API_5MS && splitBinNeedsNewFrame #endif ) if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame ) { int16_t bfi; SplitRendBFIFileReading( splitRendBFIReader, &bfi ); Loading @@ -1682,11 +1594,7 @@ int main( int8_t enableExternalOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; #ifdef API_5MS for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) #else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) #endif { if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quatBuffer[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK ) { Loading @@ -1694,27 +1602,15 @@ int main( exit( -1 ); } } #ifdef API_5MS for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) { if ( ( error = IVAS_REND_SetExternalOrientation( hIvasRend, &quatBuffer[sf_idx], enableHeadRotation[sf_idx], enableExternalOrientation[sf_idx], enableRotationInterpolation[sf_idx], numFramesToTargetOrientation[sf_idx] #ifdef API_5MS , sf_idx #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_SetExternalOrientation( hIvasRend, &quatBuffer[sf_idx], enableHeadRotation[sf_idx], enableExternalOrientation[sf_idx], enableRotationInterpolation[sf_idx], numFramesToTargetOrientation[sf_idx], sf_idx ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } #else if ( ( error = IVAS_REND_SetExternalOrientation( hIvasRend, quatBuffer, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } /* Combine external orientations and head rotation */ Loading Loading @@ -1828,10 +1724,8 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { #ifdef API_5MS if ( splitBinNeedsNewFrame ) { #endif if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); Loading @@ -1850,13 +1744,11 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #ifdef API_5MS } #endif } #endif #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT #if defined SPLIT_REND_WITH_HEAD_ROT if ( args.inConfig.numBinBuses != 0 ) { if ( ( error = IVAS_REND_GetSplitBinauralSamples( hIvasRend, outBuffer, &splitBinNeedsNewFrame ) ) != IVAS_ERR_OK ) Loading @@ -1877,14 +1769,7 @@ int main( else { #endif if ( ( error = IVAS_REND_GetSamples( hIvasRend, outBuffer #ifndef API_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT , &bitsBuffer #endif #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_GetSamples( hIvasRend, outBuffer ) ) != IVAS_ERR_OK ) { #ifdef SPLIT_REND_WITH_HEAD_ROT fprintf( stderr, "Error %s\n", ivas_error_to_string( error ) ); Loading @@ -1893,7 +1778,7 @@ int main( #endif exit( -1 ); } #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT #if defined SPLIT_REND_WITH_HEAD_ROT } #endif Loading Loading @@ -1944,12 +1829,8 @@ int main( if ( ( hSplitRendFileReadWrite != NULL ) && is_split_pre_rend_mode( &args ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, bitsBuffer.config.codec, bitsBuffer.config.poseCorrection #ifdef API_5MS , bitsBuffer.config.codec_frame_size_ms #endif ) != IVAS_ERR_OK ) bitsBuffer.config.codec, bitsBuffer.config.poseCorrection, bitsBuffer.config.codec_frame_size_ms ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); exit( -1 ); Loading lib_com/common_api_types.h +10 −17 Original line number Diff line number Diff line Loading @@ -57,9 +57,6 @@ #define IVAS_MAX_PARAM_SPATIAL_SUBFRAMES 4 #ifndef API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 // ToDo: should it be harmonized with IVAS_MAX_PARAM_SPATIAL_SUBFRAMES? #endif #define QC_ABS_COEFF 6 #ifdef SPLIT_REND_WITH_HEAD_ROT Loading Loading @@ -181,9 +178,7 @@ typedef struct ivas_split_rend_bits_t int32_t buf_len; /*size of bits_buf in bytes. This field should be set by allocator of bits_buf*/ int32_t bits_written; int32_t bits_read; #ifdef API_5MS int16_t codec_frame_size_ms; #endif IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_POSE_CORRECTION_MODE pose_correction; } ivas_split_rend_bits_t, IVAS_SPLIT_REND_BITS_DATA, *IVAS_SPLIT_REND_BITS_HANDLE; Loading Loading @@ -266,9 +261,7 @@ typedef struct _IVAS_SPLIT_REND_CONFIG 3 - (3dof correction. By default YAW, PITCH and ROLL correction) */ int16_t codec_delay_ms; /*PLACEHOLDER (currently being ignored) : look ahead delay of the codec that is used to code BIN signal output of pre-renderer*/ #ifdef API_5MS int16_t codec_frame_size_ms; /*Codec frame size in milliseconds, only relevant with LC3plus */ #endif IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode; IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_RENDERER_SELECTION rendererSelection; Loading lib_com/ivas_cnst.h +1 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ typedef enum } ivas_renderTypeOverride; #endif #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT #if defined SPLIT_REND_WITH_HEAD_ROT typedef enum { PCM_INT16, Loading Loading
.gitlab-ci.yml +47 −1 Original line number Diff line number Diff line Loading @@ -12,6 +12,13 @@ variables: EXIT_CODE_FAIL: 1 PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." value: 'default' options: - 'default' - 'test-be-release' default: interruptible: true # Make all jobs by default interruptible Loading Loading @@ -143,6 +150,8 @@ stages: when: never - if: $CI_PIPELINE_SOURCE == 'trigger' # Don't run triggered pipeline by default when: never - if: $MANUAL_PIPELINE_TYPE == 'test-be-release' # Skip all the normal jobs when testing manually against release codec when: never - when: on_success .rules-merge-request: Loading Loading @@ -329,6 +338,8 @@ codec-smoke-test: needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - *print-common-info # LTV update needed as ltv ISM metadata files are used - *update-ltv-repo - bash ci/smoke_test.sh ### analyze for failures - if ! [ -s smoke_test_output.txt ] || ! [ -s smoke_test_output_plc.txt ] || ! [ -s smoke_test_output_jbm_noEXT.txt ] || ! [ -s smoke_test_output_hrtf.txt ]; then echo "Error in smoke test"; exit 1; fi Loading Loading @@ -1037,6 +1048,40 @@ codec-comparison-on-main-push: reports: junit: report-junit.xml # --------------------------------------------------------------- # Manual jobs # --------------------------------------------------------------- test-be-to-release: stage: test tags: - ivas-windows resource_group: ivas-be-to-release-test-resource timeout: "20 minutes" rules: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-be-release' script: - echo "$CI_COMMIT_BRANCH" - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug /p:Platform=win32 /m | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression # path to release candidate refs defined in config.toml - echo "Placeholder for BE test to release script" - mkdir logs artifacts: name: "test-be-to-release--sha-$CI_COMMIT_SHORT_SHA--results" when: always expire_in: 1 week paths: - logs/ expose_as: "test-be-to-release results" # --------------------------------------------------------------- # Scheduled jobs on main # --------------------------------------------------------------- Loading Loading @@ -1291,6 +1336,7 @@ coverage-test-on-main-scheduled: timeout: 2 hours script: - *print-common-info - *update-ltv-repo - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script - python3 tests/create_short_testvectors.py Loading
apps/renderer.c +16 −135 Original line number Diff line number Diff line Loading @@ -777,12 +777,7 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; #ifndef API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif #ifdef API_5MS bool splitBinNeedsNewFrame = true; #endif #ifdef WMOPS reset_wmops(); Loading Loading @@ -1001,13 +996,7 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT } #endif const int16_t frameSize_smpls = (int16_t) ( #ifdef API_5MS ( args.framing_5ms ? 5 : 20 ) #else 20 #endif * args.sampleRate / 1000 ); const int16_t frameSize_smpls = (int16_t) ( ( args.framing_5ms ? 5 : 20 ) * args.sampleRate / 1000 ); IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 }; IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 }; Loading @@ -1017,12 +1006,8 @@ int main( IVAS_REND_InputId splitBinIds[RENDERER_MAX_BIN_INPUTS] = { 0 }; #endif if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain #ifdef API_5MS , ( args.framing_5ms ) ? 1 : 4 #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, ( args.framing_5ms ) ? 1 : 4 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading Loading @@ -1426,9 +1411,7 @@ int main( bitsBuffer.config.bufLenInBytes = bitsBufferSize; bitsBuffer.config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; bitsBuffer.config.poseCorrection = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; #ifdef API_5MS bitsBuffer.config.codec_frame_size_ms = 20; #endif #else inFloatBuffer = malloc( inBufferSize * sizeof( float ) ); outInt16Buffer = malloc( outBufferSize * sizeof( int16_t ) ); Loading Loading @@ -1458,35 +1441,23 @@ int main( fprintf( stdout, "\n\n-- Start the renderer (quiet mode) --\n\n" ); } #ifdef API_5MS ObjectPositionBuffer mtdBuffer; #endif while ( 1 ) { int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; #ifdef API_5MS const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; #endif #ifdef SPLIT_REND_WITH_HEAD_ROT numSamplesRead = 0; if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) #ifdef API_5MS && splitBinNeedsNewFrame #endif ) if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) && splitBinNeedsNewFrame ) { ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection #ifdef API_5MS , &bitsBuffer.config.codec_frame_size_ms #endif ); &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection, &bitsBuffer.config.codec_frame_size_ms ); if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -1514,11 +1485,7 @@ int main( } #endif if ( numSamplesRead == 0 #ifdef API_5MS && splitBinNeedsNewFrame #endif ) if ( numSamplesRead == 0 && splitBinNeedsNewFrame ) { /* end of input data */ break; Loading @@ -1533,18 +1500,10 @@ int main( ); int16_t num_subframes, sf_idx; #ifdef API_5MS num_subframes = ( args.framing_5ms ) ? 1 : IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; #else num_subframes = IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; #endif #ifdef API_5MS if ( isCurrentFrameMultipleOf20ms ) { #else ObjectPositionBuffer mtdBuffer; #endif IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); if ( referenceVectorReader != NULL ) Loading Loading @@ -1580,14 +1539,11 @@ int main( } } } #ifdef API_5MS } #endif /* Read from head rotation trajectory file if specified */ if ( headRotReader != NULL ) { #ifdef API_5MS for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) { IVAS_QUATERNION headRot; Loading @@ -1603,70 +1559,26 @@ int main( , DEFAULT_AXIS #endif #ifdef API_5MS , sf_idx #endif ) ) != IVAS_ERR_OK ) sf_idx ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } #else IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer, Pos #ifdef SPLIT_REND_WITH_HEAD_ROT , DEFAULT_AXIS #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } else { #ifdef API_5MS if ( ( error = IVAS_REND_DisableHeadRotation( hIvasRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error disabling head rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #else /* API_5MS */ error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL #ifdef SPLIT_REND_WITH_HEAD_ROT , DEFAULT_AXIS #endif ); if ( error != IVAS_ERR_OK && error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif /* API_5MS */ } #ifdef SPLIT_REND_WITH_HEAD_ROT /* Read from split renderer bfi file if specified */ if ( splitRendBFIReader != NULL #ifdef API_5MS && splitBinNeedsNewFrame #endif ) if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame ) { int16_t bfi; SplitRendBFIFileReading( splitRendBFIReader, &bfi ); Loading @@ -1682,11 +1594,7 @@ int main( int8_t enableExternalOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; #ifdef API_5MS for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) #else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) #endif { if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quatBuffer[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK ) { Loading @@ -1694,27 +1602,15 @@ int main( exit( -1 ); } } #ifdef API_5MS for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) { if ( ( error = IVAS_REND_SetExternalOrientation( hIvasRend, &quatBuffer[sf_idx], enableHeadRotation[sf_idx], enableExternalOrientation[sf_idx], enableRotationInterpolation[sf_idx], numFramesToTargetOrientation[sf_idx] #ifdef API_5MS , sf_idx #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_SetExternalOrientation( hIvasRend, &quatBuffer[sf_idx], enableHeadRotation[sf_idx], enableExternalOrientation[sf_idx], enableRotationInterpolation[sf_idx], numFramesToTargetOrientation[sf_idx], sf_idx ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } #else if ( ( error = IVAS_REND_SetExternalOrientation( hIvasRend, quatBuffer, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } /* Combine external orientations and head rotation */ Loading Loading @@ -1828,10 +1724,8 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { #ifdef API_5MS if ( splitBinNeedsNewFrame ) { #endif if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); Loading @@ -1850,13 +1744,11 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #ifdef API_5MS } #endif } #endif #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT #if defined SPLIT_REND_WITH_HEAD_ROT if ( args.inConfig.numBinBuses != 0 ) { if ( ( error = IVAS_REND_GetSplitBinauralSamples( hIvasRend, outBuffer, &splitBinNeedsNewFrame ) ) != IVAS_ERR_OK ) Loading @@ -1877,14 +1769,7 @@ int main( else { #endif if ( ( error = IVAS_REND_GetSamples( hIvasRend, outBuffer #ifndef API_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT , &bitsBuffer #endif #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_GetSamples( hIvasRend, outBuffer ) ) != IVAS_ERR_OK ) { #ifdef SPLIT_REND_WITH_HEAD_ROT fprintf( stderr, "Error %s\n", ivas_error_to_string( error ) ); Loading @@ -1893,7 +1778,7 @@ int main( #endif exit( -1 ); } #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT #if defined SPLIT_REND_WITH_HEAD_ROT } #endif Loading Loading @@ -1944,12 +1829,8 @@ int main( if ( ( hSplitRendFileReadWrite != NULL ) && is_split_pre_rend_mode( &args ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, bitsBuffer.config.codec, bitsBuffer.config.poseCorrection #ifdef API_5MS , bitsBuffer.config.codec_frame_size_ms #endif ) != IVAS_ERR_OK ) bitsBuffer.config.codec, bitsBuffer.config.poseCorrection, bitsBuffer.config.codec_frame_size_ms ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); exit( -1 ); Loading
lib_com/common_api_types.h +10 −17 Original line number Diff line number Diff line Loading @@ -57,9 +57,6 @@ #define IVAS_MAX_PARAM_SPATIAL_SUBFRAMES 4 #ifndef API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 // ToDo: should it be harmonized with IVAS_MAX_PARAM_SPATIAL_SUBFRAMES? #endif #define QC_ABS_COEFF 6 #ifdef SPLIT_REND_WITH_HEAD_ROT Loading Loading @@ -181,9 +178,7 @@ typedef struct ivas_split_rend_bits_t int32_t buf_len; /*size of bits_buf in bytes. This field should be set by allocator of bits_buf*/ int32_t bits_written; int32_t bits_read; #ifdef API_5MS int16_t codec_frame_size_ms; #endif IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_POSE_CORRECTION_MODE pose_correction; } ivas_split_rend_bits_t, IVAS_SPLIT_REND_BITS_DATA, *IVAS_SPLIT_REND_BITS_HANDLE; Loading Loading @@ -266,9 +261,7 @@ typedef struct _IVAS_SPLIT_REND_CONFIG 3 - (3dof correction. By default YAW, PITCH and ROLL correction) */ int16_t codec_delay_ms; /*PLACEHOLDER (currently being ignored) : look ahead delay of the codec that is used to code BIN signal output of pre-renderer*/ #ifdef API_5MS int16_t codec_frame_size_ms; /*Codec frame size in milliseconds, only relevant with LC3plus */ #endif IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode; IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_RENDERER_SELECTION rendererSelection; Loading
lib_com/ivas_cnst.h +1 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ typedef enum } ivas_renderTypeOverride; #endif #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT #if defined SPLIT_REND_WITH_HEAD_ROT typedef enum { PCM_INT16, Loading