Loading .gitlab-ci.yml +58 −8 Original line number Diff line number Diff line Loading @@ -49,6 +49,13 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" date | xargs echo "System time is" .print-common-info-windows: &print-common-info-windows - | echo "Printing common information for build job." echo "Current job is run on commit $CI_COMMIT_SHA" echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression .get-previous-merge-commit-sha: &get-previous-merge-commit-sha - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) Loading Loading @@ -156,6 +163,11 @@ stages: tags: - ivas-linux .build-job-windows: stage: build timeout: "4 minutes" tags: - ivas-windows # template for test jobs on linux that need the TESTV_DIR .test-job-linux-needs-testv-dir: Loading @@ -172,6 +184,12 @@ stages: exit_codes: - 123 .build-job-windows-with-check-for-warnings: extends: .build-job-windows stage: build allow_failure: exit_codes: - 123 # --------------------------------------------------------------- Loading Loading @@ -262,6 +280,31 @@ build-codec-sanitizers-linux: - *print-common-info - bash ci/build_codec_sanitizers_linux.sh build-codec-windows-cmake: extends: - .build-job-windows-with-check-for-warnings - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - cmake -G "Visual Studio 15 2017" . -Bbuild - cmake --build build -j | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression build-codec-windows-msbuild: extends: - .build-job-windows-with-check-for-warnings - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression # --------------------------------------------------------------- # Test jobs for merge requests # --------------------------------------------------------------- Loading Loading @@ -740,13 +783,13 @@ codec-comparison-on-main-push: .sanitizer-test-schedule-A: extends: - .sanitizer-test-template timeout: 2 hours 30 minutes sanitizer-test-mono: extends: .sanitizer-test-schedule-A rules: - if: $SANITIZER_SCHEDULE_A timeout: 2 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS Loading @@ -756,7 +799,8 @@ sanitizer-test-stereo: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 2 hours 30 minutes start_in: 2 hour timeout: 2 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED --tests $SANITIZER_TESTS Loading @@ -766,7 +810,8 @@ sanitizer-test-stereodmxevs: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 5 hours start_in: 4 hours timeout: 2 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS Loading @@ -776,7 +821,8 @@ sanitizer-test-ism1: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 7 hours 30 minutes start_in: 6 hours timeout: 2 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading @@ -786,7 +832,8 @@ sanitizer-test-ism2: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 10 hours start_in: 8 hours timeout: 3 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading @@ -796,7 +843,8 @@ sanitizer-test-ism3: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 12 hours 30 minutes start_in: 11 hours timeout: 3 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading @@ -806,7 +854,8 @@ sanitizer-test-ism4: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 15 hours start_in: 14 hours timeout: 4 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading @@ -816,7 +865,8 @@ sanitizer-test-masa: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 17 hours 30 minutes start_in: 18 hours timeout: 3 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading apps/decoder.c +51 −202 File changed.Preview size limit exceeded, changes collapsed. Show changes apps/encoder.c +0 −15 Original line number Diff line number Diff line Loading @@ -126,9 +126,7 @@ typedef struct #endif #endif bool pca; #ifdef TD5 bool ism_extended_metadata; #endif } EncArguments; Loading Loading @@ -381,11 +379,7 @@ int main( } break; case IVAS_ENC_INPUT_ISM: #ifdef TD5 if ( ( error = IVAS_ENC_ConfigureForObjects( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.ism.numObjects, arg.ism_extended_metadata ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForObjects( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.ism.numObjects ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_ENC_ConfigureForObjects failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -883,9 +877,7 @@ static void initArgStruct( EncArguments *arg ) arg->caConfig = IVAS_ENC_GetDefaultChannelAwareConfig(); arg->ca_config_file = NULL; arg->mimeOutput = false; #ifdef TD5 arg->ism_extended_metadata = false; #endif #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; Loading Loading @@ -1273,13 +1265,11 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { #ifdef TD5 if ( argv[i][0] == '+' ) { argv[i]++; arg->ism_extended_metadata = true; } #endif if ( !is_digits_only( argv[i] ) ) { fprintf( stderr, "Error: Number of ISM channels must be an integer number!\n\n" ); Loading Loading @@ -1660,14 +1650,9 @@ static void usage_enc( void ) fprintf( stdout, "EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -masa, -mc\n" ); fprintf( stdout, "-stereo [Mode] : Stereo format, default is unified stereo \n" ); fprintf( stdout, " optional for Mode: 1: DFT Stereo, 2: TD Stereo, 3: MDCT Stereo\n" ); #ifdef TD5 fprintf( stdout, "-ism (+)Ch Files : ISM format \n" ); fprintf( stdout, " where Ch specifies the number of ISMs (1-4)\n" ); fprintf( stdout, " where positive (+) means extended metadata format is used (including orientation and radius) \n" ); #else fprintf( stdout, "-ism Channels Files : ISM format \n" ); fprintf( stdout, " where Channels specifies the number of ISMs (1-4)\n" ); #endif fprintf( stdout, " and Files specify input files containing metadata, one file per object\n" ); fprintf( stdout, " (use NULL for no input metadata)\n" ); fprintf( stdout, "-sba +/-Order : Scene Based Audio input format (Ambisonics ACN/SN3D),\n" ); Loading apps/renderer.c +12 −137 Original line number Diff line number Diff line Loading @@ -42,9 +42,7 @@ #include "cmdl_tools.h" #include "cmdln_parser.h" #include "head_rotation_file_reader.h" #ifdef OTR_REFERENCE_VECTOR_TRACKING #include "vector3_pair_file_reader.h" #endif /* OTR_REFERENCE_VECTOR_TRACKING */ #include "hrtf_file_reader.h" #include "ism_file_reader.h" #include "ls_custom_file_reader.h" Loading Loading @@ -133,12 +131,8 @@ typedef struct char inMetadataFilePaths[RENDERER_MAX_ISM_INPUTS][RENDERER_MAX_CLI_ARG_LENGTH]; int16_t numInMetadataFiles; char headRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING char referenceVectorFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; #endif /* OTR_REFERENCE_VECTOR_TRACKING */ char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; #endif char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; int8_t orientationTracking; Loading Loading @@ -175,9 +169,7 @@ typedef enum CmdLnOptionId_inputMetadata, CmdLnOptionId_listFormats, CmdLnOptionId_inputGain, #ifdef OTR_REFERENCE_VECTOR_TRACKING CmdLnOptionId_referenceVectorFile, #endif /* OTR_REFERENCE_VECTOR_TRACKING */ } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { Loading Loading @@ -251,15 +243,7 @@ static const CmdLnParser_Option cliOptions[] = { .id = CmdLnOptionId_orientationTracking, .match = "tracking_type", .matchShort = "otr", #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING .description = "Head orientation tracking type: 'none', 'ref', 'avg' or `ref_vec` or `ref_vec_lev` (only for BINAURAL and BINAURAL_ROOM)", #else .description = "Head orientation tracking type: 'none', 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM)", #endif /* OTR_REFERENCE_VECTOR_TRACKING */ #else .description = "Head orientation tracking type: 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM)", #endif }, { .id = CmdlnOptionId_lfePosition, Loading Loading @@ -295,14 +279,12 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "l", .description = "List supported audio formats", }, #ifdef OTR_REFERENCE_VECTOR_TRACKING { .id = CmdLnOptionId_referenceVectorFile, .match = "reference_vector_file", .matchShort = "rvf", .description = "Reference vector trajectory file for simulation of head tracking (only for BINAURAL and BINAURAL_ROOM outputs)", }, #endif /* OTR_REFERENCE_VECTOR_TRACKING */ }; Loading Loading @@ -529,12 +511,8 @@ int main( { IVAS_REND_HANDLE hIvasRend; HeadRotFileReader *headRotReader = NULL; #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING Vector3PairFileReader *referenceVectorReader = NULL; #endif /* OTR_REFERENCE_VECTOR_TRACKING */ HeadRotFileReader *referenceRotReader = NULL; #endif hrtfFileReader *hrtfFileReader = NULL; IsmPositionProvider *positionProvider; RenderConfigReader *renderConfigReader = NULL; Loading @@ -558,7 +536,9 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; #ifdef TD5 #ifdef FIX_406_IVAS_POSITION IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #else IVAS_POSITION Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif Loading @@ -579,20 +559,9 @@ int main( convert_backslash( args.inputFilePath ); convert_backslash( args.outputFilePath ); #ifndef FIX_I109_ORIENTATION_TRACKING /* disable 'refrotequal' test cases */ if ( strstr( args.headRotationFilePath, "azi_plus_2-ele_plus_2-every-100-frames.csv" ) != NULL ) { memset( args.headRotationFilePath, '\0', sizeof( args.headRotationFilePath ) ); } #endif convert_backslash( args.headRotationFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING convert_backslash( args.referenceVectorFilePath ); #endif /* OTR_REFERENCE_VECTOR_TRACKING */ convert_backslash( args.referenceRotationFilePath ); #endif convert_backslash( args.inLfePanningMatrixFile ); if ( !isEmptyString( args.headRotationFilePath ) ) Loading @@ -604,7 +573,6 @@ int main( } } #ifdef FIX_I109_ORIENTATION_TRACKING if ( !isEmptyString( args.referenceRotationFilePath ) ) { if ( HeadRotationFileReader_open( args.referenceRotationFilePath, &referenceRotReader ) != IVAS_ERR_OK ) Loading @@ -613,7 +581,6 @@ int main( exit( -1 ); } } #ifdef OTR_REFERENCE_VECTOR_TRACKING if ( !isEmptyString( args.referenceVectorFilePath ) ) { if ( Vector3PairFileReader_open( args.referenceVectorFilePath, &referenceVectorReader ) != IVAS_ERR_OK ) Loading @@ -622,8 +589,6 @@ int main( exit( -1 ); } } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif if ( !isEmptyString( args.customHrtfFilePath ) ) { Loading Loading @@ -684,7 +649,9 @@ int main( fprintf( stderr, "Sampling rate must be specified on command line when using raw PCM input\n" ); exit( -1 ); } #ifndef FIX_389_EXT_REND_PCM_SR args.sampleRate = inFileSampleRate; #endif break; default: fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -712,10 +679,10 @@ int main( } /* === Configure === */ #ifdef TD5 if ( ( error = IVAS_REND_InitConfig( hIvasRend, ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) || ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) ) != IVAS_ERR_OK ) #ifdef FIX_392_LATE_REVERB if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_InitConfig( hIvasRend, strlen( args.renderConfigFilePath ) != 0 ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_InitConfig( hIvasRend, ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) || ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error in Renderer Config Init\n" ); Loading @@ -727,17 +694,9 @@ int main( IVAS_RENDER_CONFIG_DATA renderConfig; /* sanity check */ #ifdef TD5 if ( ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) && ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) #else if ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) #endif { #ifdef TD5 fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL or BINAURAL_ROOM is used as output. Exiting. \n" ); #else fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL_ROOM is used as output. Exiting. \n" ); #endif exit( -1 ); } Loading @@ -760,12 +719,10 @@ int main( } } #ifdef FIX_I109_ORIENTATION_TRACKING if ( ( error = IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientationTracking ) ) != IVAS_ERR_OK ) { return error; } #endif /* Set up output custom layout configuration */ if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) Loading Loading @@ -966,8 +923,6 @@ int main( ObjectPositionBuffer mtdBuffer; IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING if ( referenceVectorReader != NULL ) { IVAS_VECTOR3 listenerPos, refPos; Loading @@ -982,16 +937,11 @@ int main( exit( -1 ); } } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ /* Read from reference rotation trajectory file if specified */ if ( referenceRotReader != NULL ) { IVAS_QUATERNION quaternion; #ifdef TD5 if ( ( error = HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) #else if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading @@ -1003,38 +953,21 @@ int main( exit( -1 ); } } #endif /* Read from head rotation trajectory file if specified */ if ( headRotReader != NULL ) { IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; #ifdef FIX_I109_ORIENTATION_TRACKING for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { #ifdef TD5 if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) #else if ( HeadRotationFileReading( headRotReader, &quatBuffer[i] ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } #else #ifdef TD5 HeadRotationFileReading( headRotReader, quatBuffer, Pos ); #else HeadRotationFileReading( headRotReader, quatBuffer, frame ); #endif #endif #ifdef TD5 if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer, Pos ) ) != IVAS_ERR_OK ) #else if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading @@ -1042,10 +975,11 @@ int main( } else { #ifdef TD5 if ( ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #ifdef FIX_379_EXT_METADATA error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ); if ( ( error != IVAS_ERR_OK ) && ( error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #else if ( ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) if ( ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #endif { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -1226,12 +1160,8 @@ int main( AudioFileReader_close( &audioReader ); AudioFileWriter_close( &audioWriter ); HeadRotationFileReader_close( &headRotReader ); #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING Vector3PairFileReader_close( &referenceVectorReader ); #endif /* OTR_REFERENCE_VECTOR_TRACKING */ HeadRotationFileReader_close( &referenceRotReader ); #endif hrtfFileReader_close( &hrtfFileReader ); IVAS_REND_Close( &hIvasRend ); IsmPositionProvider_close( positionProvider ); Loading Loading @@ -1457,15 +1387,11 @@ static bool parseOrientationTracking( to_upper( value ); #ifdef FIX_I109_ORIENTATION_TRACKING if ( strcmp( value, "NONE" ) == 0 ) { *tracking_type = IVAS_ORIENT_TRK_NONE; } else if ( strcmp( value, "REF" ) == 0 ) #else if ( strcmp( value, "REF" ) == 0 ) #endif { *tracking_type = IVAS_ORIENT_TRK_REF; } Loading @@ -1473,8 +1399,6 @@ static bool parseOrientationTracking( { *tracking_type = IVAS_ORIENT_TRK_AVG; } #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING else if ( strcmp( value, "REF_VEC" ) == 0 ) { *tracking_type = IVAS_ORIENT_TRK_REF_VEC; Loading @@ -1483,8 +1407,6 @@ static bool parseOrientationTracking( { *tracking_type = IVAS_ORIENT_TRK_REF_VEC_LEV; } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif else { fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", value ); Loading Loading @@ -1702,20 +1624,12 @@ static CmdlnArgs defaultArgs( args.numInMetadataFiles = 0; clearString( args.headRotationFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING clearString( args.referenceVectorFilePath ); #endif /* OTR_REFERENCE_VECTOR_TRACKING */ clearString( args.referenceRotationFilePath ); #endif clearString( args.customHrtfFilePath ); clearString( args.renderConfigFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING args.orientationTracking = IVAS_ORIENT_TRK_NONE; #else args.orientationTracking = IVAS_ORIENT_TRK_REF; #endif args.noDiegeticPan = 0.0f; args.delayCompensationEnabled = true; Loading Loading @@ -1790,18 +1704,14 @@ static void parseOption( assert( numOptionValues == 1 ); strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING case CmdLnOptionId_referenceVectorFile: assert( numOptionValues == 1 ); strncpy( args->referenceVectorFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; #endif /* OTR_REFERENCE_VECTOR_TRACKING */ case CmdLnOptionId_refRotFile: assert( numOptionValues == 1 ); strncpy( args->referenceRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; #endif case CmdLnOptionId_customHrtfFile: assert( numOptionValues == 1 ); strncpy( args->customHrtfFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); Loading Loading @@ -1924,11 +1834,9 @@ void getMetadataFromFileReader( objectMetadataBuffer->positions[objIdx].azimuth = ismMetadata.azimuth; objectMetadataBuffer->positions[objIdx].elevation = ismMetadata.elevation; #ifdef TD5 objectMetadataBuffer->positions[objIdx].radius = ismMetadata.radius; objectMetadataBuffer->positions[objIdx].yaw = ismMetadata.yaw; objectMetadataBuffer->positions[objIdx].pitch = ismMetadata.pitch; #endif return; } Loading Loading @@ -1983,11 +1891,9 @@ static void IsmPositionProvider_getNextFrame( { objectMetadataBuffer->positions[objIdx].azimuth = 0.0f; objectMetadataBuffer->positions[objIdx].elevation = 0.0f; #ifdef TD5 objectMetadataBuffer->positions[objIdx].radius = 1.0f; objectMetadataBuffer->positions[objIdx].yaw = 0.0f; objectMetadataBuffer->positions[objIdx].pitch = 0.0f; #endif } /* Wrap azimuth to lie within (-180, 180] range */ Loading @@ -2002,7 +1908,6 @@ static void IsmPositionProvider_getNextFrame( /* Clamp elevation to lie within [-90, 90] range (can't be wrapped easily) */ objectMetadataBuffer->positions[objIdx].elevation = min( max( objectMetadataBuffer->positions[objIdx].elevation, -90 ), 90 ); #ifdef TD5 /* Wrap yaw to lie within (-180, 180] range */ while ( objectMetadataBuffer->positions[objIdx].yaw < 0.0f ) { Loading @@ -2015,7 +1920,6 @@ static void IsmPositionProvider_getNextFrame( /* Clamp pitch to lie within [-90, 90] range (can't be wrapped easily) */ objectMetadataBuffer->positions[objIdx].pitch = min( max( objectMetadataBuffer->positions[objIdx].pitch, -90 ), 90 ); #endif } ++positionProvider->frameCounter; Loading Loading @@ -2250,7 +2154,6 @@ static void parseObjectPosition( uint16_t *positionDuration ) { char *endptr; #ifdef TD5 int16_t read_values; float meta_prm[7] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f }; Loading @@ -2271,34 +2174,6 @@ static void parseObjectPosition( position->radius = meta_prm[2]; position->yaw = meta_prm[5]; position->pitch = meta_prm[6]; #else readNextMetadataChunk( line, "," ); *positionDuration = (uint16_t) strtol( line, &endptr, 10 ); if ( *endptr != '\0' ) { fprintf( stderr, "Error reading metadata\n" ); exit( -1 ); } readNextMetadataChunk( line, "," ); position->azimuth = strtof( line, &endptr ); if ( *endptr != '\0' ) { fprintf( stderr, "Error reading metadata\n" ); exit( -1 ); } readNextMetadataChunk( line, "\n" ); position->elevation = strtof( line, &endptr ); if ( *endptr != '\0' ) { fprintf( stderr, "Error reading metadata\n" ); exit( -1 ); } #endif return; } Loading lib_com/bitstream.c +2 −1 Original line number Diff line number Diff line Loading @@ -833,12 +833,13 @@ static ivas_error write_indices_element( /* restore previous pointer position */ pt_stream_loc = pt_stream_backup; } #ifndef ISSUE_24_CLEANUP_MCT_LFE /* TODO implemented only for MCT for now */ if ( ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && ( element_id * CPE_CHANNELS + n == LFE_CHANNEL ) ) { continue; } #endif #ifdef ENABLE_BITRATE_VERIFICATION total_nb_bits = #endif Loading Loading
.gitlab-ci.yml +58 −8 Original line number Diff line number Diff line Loading @@ -49,6 +49,13 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" date | xargs echo "System time is" .print-common-info-windows: &print-common-info-windows - | echo "Printing common information for build job." echo "Current job is run on commit $CI_COMMIT_SHA" echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression .get-previous-merge-commit-sha: &get-previous-merge-commit-sha - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) Loading Loading @@ -156,6 +163,11 @@ stages: tags: - ivas-linux .build-job-windows: stage: build timeout: "4 minutes" tags: - ivas-windows # template for test jobs on linux that need the TESTV_DIR .test-job-linux-needs-testv-dir: Loading @@ -172,6 +184,12 @@ stages: exit_codes: - 123 .build-job-windows-with-check-for-warnings: extends: .build-job-windows stage: build allow_failure: exit_codes: - 123 # --------------------------------------------------------------- Loading Loading @@ -262,6 +280,31 @@ build-codec-sanitizers-linux: - *print-common-info - bash ci/build_codec_sanitizers_linux.sh build-codec-windows-cmake: extends: - .build-job-windows-with-check-for-warnings - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - cmake -G "Visual Studio 15 2017" . -Bbuild - cmake --build build -j | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression build-codec-windows-msbuild: extends: - .build-job-windows-with-check-for-warnings - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression # --------------------------------------------------------------- # Test jobs for merge requests # --------------------------------------------------------------- Loading Loading @@ -740,13 +783,13 @@ codec-comparison-on-main-push: .sanitizer-test-schedule-A: extends: - .sanitizer-test-template timeout: 2 hours 30 minutes sanitizer-test-mono: extends: .sanitizer-test-schedule-A rules: - if: $SANITIZER_SCHEDULE_A timeout: 2 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS Loading @@ -756,7 +799,8 @@ sanitizer-test-stereo: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 2 hours 30 minutes start_in: 2 hour timeout: 2 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED --tests $SANITIZER_TESTS Loading @@ -766,7 +810,8 @@ sanitizer-test-stereodmxevs: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 5 hours start_in: 4 hours timeout: 2 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS Loading @@ -776,7 +821,8 @@ sanitizer-test-ism1: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 7 hours 30 minutes start_in: 6 hours timeout: 2 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading @@ -786,7 +832,8 @@ sanitizer-test-ism2: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 10 hours start_in: 8 hours timeout: 3 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading @@ -796,7 +843,8 @@ sanitizer-test-ism3: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 12 hours 30 minutes start_in: 11 hours timeout: 3 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading @@ -806,7 +854,8 @@ sanitizer-test-ism4: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 15 hours start_in: 14 hours timeout: 4 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading @@ -816,7 +865,8 @@ sanitizer-test-masa: rules: - if: $SANITIZER_SCHEDULE_A when: delayed start_in: 17 hours 30 minutes start_in: 18 hours timeout: 3 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS Loading
apps/encoder.c +0 −15 Original line number Diff line number Diff line Loading @@ -126,9 +126,7 @@ typedef struct #endif #endif bool pca; #ifdef TD5 bool ism_extended_metadata; #endif } EncArguments; Loading Loading @@ -381,11 +379,7 @@ int main( } break; case IVAS_ENC_INPUT_ISM: #ifdef TD5 if ( ( error = IVAS_ENC_ConfigureForObjects( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.ism.numObjects, arg.ism_extended_metadata ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForObjects( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.ism.numObjects ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_ENC_ConfigureForObjects failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -883,9 +877,7 @@ static void initArgStruct( EncArguments *arg ) arg->caConfig = IVAS_ENC_GetDefaultChannelAwareConfig(); arg->ca_config_file = NULL; arg->mimeOutput = false; #ifdef TD5 arg->ism_extended_metadata = false; #endif #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; Loading Loading @@ -1273,13 +1265,11 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { #ifdef TD5 if ( argv[i][0] == '+' ) { argv[i]++; arg->ism_extended_metadata = true; } #endif if ( !is_digits_only( argv[i] ) ) { fprintf( stderr, "Error: Number of ISM channels must be an integer number!\n\n" ); Loading Loading @@ -1660,14 +1650,9 @@ static void usage_enc( void ) fprintf( stdout, "EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -masa, -mc\n" ); fprintf( stdout, "-stereo [Mode] : Stereo format, default is unified stereo \n" ); fprintf( stdout, " optional for Mode: 1: DFT Stereo, 2: TD Stereo, 3: MDCT Stereo\n" ); #ifdef TD5 fprintf( stdout, "-ism (+)Ch Files : ISM format \n" ); fprintf( stdout, " where Ch specifies the number of ISMs (1-4)\n" ); fprintf( stdout, " where positive (+) means extended metadata format is used (including orientation and radius) \n" ); #else fprintf( stdout, "-ism Channels Files : ISM format \n" ); fprintf( stdout, " where Channels specifies the number of ISMs (1-4)\n" ); #endif fprintf( stdout, " and Files specify input files containing metadata, one file per object\n" ); fprintf( stdout, " (use NULL for no input metadata)\n" ); fprintf( stdout, "-sba +/-Order : Scene Based Audio input format (Ambisonics ACN/SN3D),\n" ); Loading
apps/renderer.c +12 −137 Original line number Diff line number Diff line Loading @@ -42,9 +42,7 @@ #include "cmdl_tools.h" #include "cmdln_parser.h" #include "head_rotation_file_reader.h" #ifdef OTR_REFERENCE_VECTOR_TRACKING #include "vector3_pair_file_reader.h" #endif /* OTR_REFERENCE_VECTOR_TRACKING */ #include "hrtf_file_reader.h" #include "ism_file_reader.h" #include "ls_custom_file_reader.h" Loading Loading @@ -133,12 +131,8 @@ typedef struct char inMetadataFilePaths[RENDERER_MAX_ISM_INPUTS][RENDERER_MAX_CLI_ARG_LENGTH]; int16_t numInMetadataFiles; char headRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING char referenceVectorFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; #endif /* OTR_REFERENCE_VECTOR_TRACKING */ char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; #endif char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; int8_t orientationTracking; Loading Loading @@ -175,9 +169,7 @@ typedef enum CmdLnOptionId_inputMetadata, CmdLnOptionId_listFormats, CmdLnOptionId_inputGain, #ifdef OTR_REFERENCE_VECTOR_TRACKING CmdLnOptionId_referenceVectorFile, #endif /* OTR_REFERENCE_VECTOR_TRACKING */ } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { Loading Loading @@ -251,15 +243,7 @@ static const CmdLnParser_Option cliOptions[] = { .id = CmdLnOptionId_orientationTracking, .match = "tracking_type", .matchShort = "otr", #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING .description = "Head orientation tracking type: 'none', 'ref', 'avg' or `ref_vec` or `ref_vec_lev` (only for BINAURAL and BINAURAL_ROOM)", #else .description = "Head orientation tracking type: 'none', 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM)", #endif /* OTR_REFERENCE_VECTOR_TRACKING */ #else .description = "Head orientation tracking type: 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM)", #endif }, { .id = CmdlnOptionId_lfePosition, Loading Loading @@ -295,14 +279,12 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "l", .description = "List supported audio formats", }, #ifdef OTR_REFERENCE_VECTOR_TRACKING { .id = CmdLnOptionId_referenceVectorFile, .match = "reference_vector_file", .matchShort = "rvf", .description = "Reference vector trajectory file for simulation of head tracking (only for BINAURAL and BINAURAL_ROOM outputs)", }, #endif /* OTR_REFERENCE_VECTOR_TRACKING */ }; Loading Loading @@ -529,12 +511,8 @@ int main( { IVAS_REND_HANDLE hIvasRend; HeadRotFileReader *headRotReader = NULL; #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING Vector3PairFileReader *referenceVectorReader = NULL; #endif /* OTR_REFERENCE_VECTOR_TRACKING */ HeadRotFileReader *referenceRotReader = NULL; #endif hrtfFileReader *hrtfFileReader = NULL; IsmPositionProvider *positionProvider; RenderConfigReader *renderConfigReader = NULL; Loading @@ -558,7 +536,9 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; #ifdef TD5 #ifdef FIX_406_IVAS_POSITION IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #else IVAS_POSITION Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif Loading @@ -579,20 +559,9 @@ int main( convert_backslash( args.inputFilePath ); convert_backslash( args.outputFilePath ); #ifndef FIX_I109_ORIENTATION_TRACKING /* disable 'refrotequal' test cases */ if ( strstr( args.headRotationFilePath, "azi_plus_2-ele_plus_2-every-100-frames.csv" ) != NULL ) { memset( args.headRotationFilePath, '\0', sizeof( args.headRotationFilePath ) ); } #endif convert_backslash( args.headRotationFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING convert_backslash( args.referenceVectorFilePath ); #endif /* OTR_REFERENCE_VECTOR_TRACKING */ convert_backslash( args.referenceRotationFilePath ); #endif convert_backslash( args.inLfePanningMatrixFile ); if ( !isEmptyString( args.headRotationFilePath ) ) Loading @@ -604,7 +573,6 @@ int main( } } #ifdef FIX_I109_ORIENTATION_TRACKING if ( !isEmptyString( args.referenceRotationFilePath ) ) { if ( HeadRotationFileReader_open( args.referenceRotationFilePath, &referenceRotReader ) != IVAS_ERR_OK ) Loading @@ -613,7 +581,6 @@ int main( exit( -1 ); } } #ifdef OTR_REFERENCE_VECTOR_TRACKING if ( !isEmptyString( args.referenceVectorFilePath ) ) { if ( Vector3PairFileReader_open( args.referenceVectorFilePath, &referenceVectorReader ) != IVAS_ERR_OK ) Loading @@ -622,8 +589,6 @@ int main( exit( -1 ); } } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif if ( !isEmptyString( args.customHrtfFilePath ) ) { Loading Loading @@ -684,7 +649,9 @@ int main( fprintf( stderr, "Sampling rate must be specified on command line when using raw PCM input\n" ); exit( -1 ); } #ifndef FIX_389_EXT_REND_PCM_SR args.sampleRate = inFileSampleRate; #endif break; default: fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -712,10 +679,10 @@ int main( } /* === Configure === */ #ifdef TD5 if ( ( error = IVAS_REND_InitConfig( hIvasRend, ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) || ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) ) != IVAS_ERR_OK ) #ifdef FIX_392_LATE_REVERB if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_InitConfig( hIvasRend, strlen( args.renderConfigFilePath ) != 0 ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_InitConfig( hIvasRend, ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) || ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error in Renderer Config Init\n" ); Loading @@ -727,17 +694,9 @@ int main( IVAS_RENDER_CONFIG_DATA renderConfig; /* sanity check */ #ifdef TD5 if ( ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) && ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) #else if ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) #endif { #ifdef TD5 fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL or BINAURAL_ROOM is used as output. Exiting. \n" ); #else fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL_ROOM is used as output. Exiting. \n" ); #endif exit( -1 ); } Loading @@ -760,12 +719,10 @@ int main( } } #ifdef FIX_I109_ORIENTATION_TRACKING if ( ( error = IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientationTracking ) ) != IVAS_ERR_OK ) { return error; } #endif /* Set up output custom layout configuration */ if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) Loading Loading @@ -966,8 +923,6 @@ int main( ObjectPositionBuffer mtdBuffer; IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING if ( referenceVectorReader != NULL ) { IVAS_VECTOR3 listenerPos, refPos; Loading @@ -982,16 +937,11 @@ int main( exit( -1 ); } } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ /* Read from reference rotation trajectory file if specified */ if ( referenceRotReader != NULL ) { IVAS_QUATERNION quaternion; #ifdef TD5 if ( ( error = HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) #else if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading @@ -1003,38 +953,21 @@ int main( exit( -1 ); } } #endif /* Read from head rotation trajectory file if specified */ if ( headRotReader != NULL ) { IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; #ifdef FIX_I109_ORIENTATION_TRACKING for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { #ifdef TD5 if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) #else if ( HeadRotationFileReading( headRotReader, &quatBuffer[i] ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } #else #ifdef TD5 HeadRotationFileReading( headRotReader, quatBuffer, Pos ); #else HeadRotationFileReading( headRotReader, quatBuffer, frame ); #endif #endif #ifdef TD5 if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer, Pos ) ) != IVAS_ERR_OK ) #else if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading @@ -1042,10 +975,11 @@ int main( } else { #ifdef TD5 if ( ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #ifdef FIX_379_EXT_METADATA error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ); if ( ( error != IVAS_ERR_OK ) && ( error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #else if ( ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) if ( ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #endif { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -1226,12 +1160,8 @@ int main( AudioFileReader_close( &audioReader ); AudioFileWriter_close( &audioWriter ); HeadRotationFileReader_close( &headRotReader ); #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING Vector3PairFileReader_close( &referenceVectorReader ); #endif /* OTR_REFERENCE_VECTOR_TRACKING */ HeadRotationFileReader_close( &referenceRotReader ); #endif hrtfFileReader_close( &hrtfFileReader ); IVAS_REND_Close( &hIvasRend ); IsmPositionProvider_close( positionProvider ); Loading Loading @@ -1457,15 +1387,11 @@ static bool parseOrientationTracking( to_upper( value ); #ifdef FIX_I109_ORIENTATION_TRACKING if ( strcmp( value, "NONE" ) == 0 ) { *tracking_type = IVAS_ORIENT_TRK_NONE; } else if ( strcmp( value, "REF" ) == 0 ) #else if ( strcmp( value, "REF" ) == 0 ) #endif { *tracking_type = IVAS_ORIENT_TRK_REF; } Loading @@ -1473,8 +1399,6 @@ static bool parseOrientationTracking( { *tracking_type = IVAS_ORIENT_TRK_AVG; } #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING else if ( strcmp( value, "REF_VEC" ) == 0 ) { *tracking_type = IVAS_ORIENT_TRK_REF_VEC; Loading @@ -1483,8 +1407,6 @@ static bool parseOrientationTracking( { *tracking_type = IVAS_ORIENT_TRK_REF_VEC_LEV; } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif else { fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", value ); Loading Loading @@ -1702,20 +1624,12 @@ static CmdlnArgs defaultArgs( args.numInMetadataFiles = 0; clearString( args.headRotationFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING clearString( args.referenceVectorFilePath ); #endif /* OTR_REFERENCE_VECTOR_TRACKING */ clearString( args.referenceRotationFilePath ); #endif clearString( args.customHrtfFilePath ); clearString( args.renderConfigFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING args.orientationTracking = IVAS_ORIENT_TRK_NONE; #else args.orientationTracking = IVAS_ORIENT_TRK_REF; #endif args.noDiegeticPan = 0.0f; args.delayCompensationEnabled = true; Loading Loading @@ -1790,18 +1704,14 @@ static void parseOption( assert( numOptionValues == 1 ); strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; #ifdef FIX_I109_ORIENTATION_TRACKING #ifdef OTR_REFERENCE_VECTOR_TRACKING case CmdLnOptionId_referenceVectorFile: assert( numOptionValues == 1 ); strncpy( args->referenceVectorFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; #endif /* OTR_REFERENCE_VECTOR_TRACKING */ case CmdLnOptionId_refRotFile: assert( numOptionValues == 1 ); strncpy( args->referenceRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; #endif case CmdLnOptionId_customHrtfFile: assert( numOptionValues == 1 ); strncpy( args->customHrtfFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); Loading Loading @@ -1924,11 +1834,9 @@ void getMetadataFromFileReader( objectMetadataBuffer->positions[objIdx].azimuth = ismMetadata.azimuth; objectMetadataBuffer->positions[objIdx].elevation = ismMetadata.elevation; #ifdef TD5 objectMetadataBuffer->positions[objIdx].radius = ismMetadata.radius; objectMetadataBuffer->positions[objIdx].yaw = ismMetadata.yaw; objectMetadataBuffer->positions[objIdx].pitch = ismMetadata.pitch; #endif return; } Loading Loading @@ -1983,11 +1891,9 @@ static void IsmPositionProvider_getNextFrame( { objectMetadataBuffer->positions[objIdx].azimuth = 0.0f; objectMetadataBuffer->positions[objIdx].elevation = 0.0f; #ifdef TD5 objectMetadataBuffer->positions[objIdx].radius = 1.0f; objectMetadataBuffer->positions[objIdx].yaw = 0.0f; objectMetadataBuffer->positions[objIdx].pitch = 0.0f; #endif } /* Wrap azimuth to lie within (-180, 180] range */ Loading @@ -2002,7 +1908,6 @@ static void IsmPositionProvider_getNextFrame( /* Clamp elevation to lie within [-90, 90] range (can't be wrapped easily) */ objectMetadataBuffer->positions[objIdx].elevation = min( max( objectMetadataBuffer->positions[objIdx].elevation, -90 ), 90 ); #ifdef TD5 /* Wrap yaw to lie within (-180, 180] range */ while ( objectMetadataBuffer->positions[objIdx].yaw < 0.0f ) { Loading @@ -2015,7 +1920,6 @@ static void IsmPositionProvider_getNextFrame( /* Clamp pitch to lie within [-90, 90] range (can't be wrapped easily) */ objectMetadataBuffer->positions[objIdx].pitch = min( max( objectMetadataBuffer->positions[objIdx].pitch, -90 ), 90 ); #endif } ++positionProvider->frameCounter; Loading Loading @@ -2250,7 +2154,6 @@ static void parseObjectPosition( uint16_t *positionDuration ) { char *endptr; #ifdef TD5 int16_t read_values; float meta_prm[7] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f }; Loading @@ -2271,34 +2174,6 @@ static void parseObjectPosition( position->radius = meta_prm[2]; position->yaw = meta_prm[5]; position->pitch = meta_prm[6]; #else readNextMetadataChunk( line, "," ); *positionDuration = (uint16_t) strtol( line, &endptr, 10 ); if ( *endptr != '\0' ) { fprintf( stderr, "Error reading metadata\n" ); exit( -1 ); } readNextMetadataChunk( line, "," ); position->azimuth = strtof( line, &endptr ); if ( *endptr != '\0' ) { fprintf( stderr, "Error reading metadata\n" ); exit( -1 ); } readNextMetadataChunk( line, "\n" ); position->elevation = strtof( line, &endptr ); if ( *endptr != '\0' ) { fprintf( stderr, "Error reading metadata\n" ); exit( -1 ); } #endif return; } Loading
lib_com/bitstream.c +2 −1 Original line number Diff line number Diff line Loading @@ -833,12 +833,13 @@ static ivas_error write_indices_element( /* restore previous pointer position */ pt_stream_loc = pt_stream_backup; } #ifndef ISSUE_24_CLEANUP_MCT_LFE /* TODO implemented only for MCT for now */ if ( ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && ( element_id * CPE_CHANNELS + n == LFE_CHANNEL ) ) { continue; } #endif #ifdef ENABLE_BITRATE_VERIFICATION total_nb_bits = #endif Loading