Loading .gitlab-ci.yml +10 −8 Original line number Diff line number Diff line Loading @@ -860,7 +860,7 @@ uninterruptible: branch-is-up-to-date-with-target-pre: extends: - .rules-merge-request - .rules-merge-request-to-float-pc stage: prevalidate needs: [] tags: Loading @@ -876,7 +876,7 @@ branch-is-up-to-date-with-target-pre: branch-is-up-to-date-with-target-post: extends: - .rules-merge-request - .rules-merge-request-to-float-pc stage: postvalidate tags: - ivas-linux Loading Loading @@ -1048,6 +1048,7 @@ build-codec-linux-make: - .build-job-linux tags: - ivas-linux timeout: "10 minutes" script: - *print-common-info - *activate-Werror-linux Loading @@ -1064,7 +1065,7 @@ build-codec-linux-instrumented-make: when: never extends: - .build-job-linux timeout: "7 minutes" timeout: "10 minutes" tags: - ivas-linux script: Loading @@ -1080,6 +1081,7 @@ build-codec-sanitizers-linux: - .rules-basis tags: - ivas-linux timeout: "10 minutes" script: - *update-scripts-repo - *print-common-info Loading @@ -1096,7 +1098,7 @@ build-codec-windows-msbuild: when: never extends: - .build-job-windows timeout: "7 minutes" timeout: "10 minutes" tags: - ivas-windows script: Loading @@ -1111,7 +1113,7 @@ build-codec-windows-msbuild: split-rendering-smoke-test: extends: - .test-job-linux - .rules-merge-request - .rules-merge-request-to-float-pc needs: ["build-codec-linux-make"] stage: test script: Loading @@ -1135,7 +1137,7 @@ split-rendering-smoke-test: lc3-wrapper-unit-test: extends: - .test-job-linux - .rules-merge-request - .rules-merge-request-to-float-pc needs: ["build-codec-linux-make"] stage: test script: Loading @@ -1147,10 +1149,10 @@ lc3-wrapper-unit-test: - scripts/split_rendering/lc3plus_float/ivas_lc3plus_unit_test # compare split-rendering bitexactness between target and source branch .split-rendering-pytest-on-merge-request: split-rendering-pytest-on-merge-request: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request - .rules-merge-request-to-float-pc needs: ["build-codec-linux-make"] # TODO: set reasonable timeout, will most likely take less timeout: "30 minutes" Loading apps/decoder.c +110 −21 Original line number Diff line number Diff line Loading @@ -197,6 +197,8 @@ int main( RenderConfigReader *renderConfigReader = NULL; int16_t *pcmBuf = NULL; IVAS_RENDER_FRAMESIZE asked_frame_size; IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; #ifdef DEBUGGING int32_t noClipping; int32_t cnt_frames_limited; Loading Loading @@ -724,58 +726,141 @@ int main( if ( arg.hrtfReaderEnabled ) { IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL; if ( ( error = IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_HRTF_binary( hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { #ifdef FIX_OLD_BINARY_FORMAT hrtfFileReader_close( &hrtfReader ); strcat( arg.hrtfFileName, "new" ); if ( hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_td_hrtf( hHrtfTD ); } } #else fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; #endif } else { destroy_td_hrtf( hHrtfTD ); } } IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL; #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES if ( ( *hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } } #endif if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) { #ifdef FIX_OLD_BINARY_FORMAT cleanup_SetOfHRTF( hSetOfHRTF ); hrtfFileReader_close( &hrtfReader ); strcat( arg.hrtfFileName, "new" ); if ( hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } } #else if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfFileName ); fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } #endif } IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv = NULL; IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; if ( ( error = IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfFastConvHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_fastconv_HRTF_from_binary( hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s for FastConv \n\n", arg.hrtfFileName ); fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_fastconv_hrtf( hHrtfFastConv ); } } IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin = NULL; IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; if ( ( error = IVAS_DEC_GetHrtfParamBinHandle( hIvasDec, &hHrtfParambin ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfParamBinHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_parambin_HRTF_from_binary( hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s for parametric binauralizer \n\n", arg.hrtfFileName ); fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_parambin_hrtf( hHrtfParambin ); } } } /*------------------------------------------------------------------------------------------* Loading Loading @@ -852,13 +937,17 @@ cleanup: #endif if ( arg.hrtfReaderEnabled ) { IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL; IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); dealloc_HRTF_binary( hHrtfTD ); IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL; if ( hHrtfTD != NULL ) { destroy_td_hrtf( hHrtfTD ); } IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); if ( hSetOfHRTF != NULL ) { destroy_SetOfHRTF( hSetOfHRTF ); } } IVAS_DEC_Close( &hIvasDec ); CustomLsReader_close( &hLsCustomReader ); Loading apps/renderer.c +162 −12 Original line number Diff line number Diff line Loading @@ -613,7 +613,6 @@ static float dBToLin( return powf( 10.0f, gain_dB / 20.0f ); } #ifdef SPLIT_REND_WITH_HEAD_ROT static int16_t get_cldfb_in_flag( const IVAS_AUDIO_CONFIG audioConfig, Loading Loading @@ -673,6 +672,10 @@ int main( #endif Vector3PairFileReader *referenceVectorReader = NULL; hrtfFileReader *hrtfFileReader = NULL; IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; IsmPositionProvider *positionProvider; LfeRoutingConfig *lfeRoutingConfigs[RENDERER_MAX_MC_INPUTS]; RenderConfigReader *renderConfigReader = NULL; Loading Loading @@ -814,14 +817,6 @@ int main( } } if ( !isEmptyString( args.customHrtfFilePath ) ) { if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening file: %s\n", args.customHrtfFilePath ); exit( -1 ); } } if ( !isEmptyString( args.renderConfigFilePath ) ) { Loading Loading @@ -908,12 +903,159 @@ int main( const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } if ( !isEmptyString( args.customHrtfFilePath ) ) { if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening file: %s\n", args.customHrtfFilePath ); exit( -1 ); } if ( hrtfFileReader != NULL ) { if ( ( error = IVAS_REND_GetHrtfHandle( hIvasRend, &hHrtfTD ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_GetHrtfHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { #ifdef FIX_OLD_BINARY_FORMAT hrtfFileReader_close( &hrtfFileReader ); strcat( args.customHrtfFilePath, "new" ); if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_td_hrtf( hHrtfTD ); } } #else fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; #endif } else { destroy_td_hrtf( hHrtfTD ); } } #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } } #endif if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_Rend_GetHrtfCRendHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) { #ifdef FIX_OLD_BINARY_FORMAT cleanup_SetOfHRTF( hSetOfHRTF ); hrtfFileReader_close( &hrtfFileReader ); strcat( args.customHrtfFilePath, "new" ); if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s:%s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } } #else if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s:%s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } #endif } if ( ( error = IVAS_REND_GetHrtfFastConvHandle( hIvasRend, &hHrtfFastConv ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_GetHrtfFastConvHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s:%s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_fastconv_hrtf( hHrtfFastConv ); } } if ( ( error = IVAS_REND_GetHrtfParamBinHandle( hIvasRend, &hHrtfParambin ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfParamBinHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_parambin_hrtf( hHrtfParambin ); } } } hrtfFileReader_close( &hrtfFileReader ); } fprintf( stdout, "Input audio file: %s\n", args.inputFilePath ); fprintf( stdout, "Output audio file: %s\n\n", args.outputFilePath ); Loading Loading @@ -959,7 +1101,7 @@ int main( /* === Configure === */ if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Renderer Config Init\n" ); fprintf( stderr, "Error in Renderer Config Init: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } Loading Loading @@ -1954,6 +2096,7 @@ int main( free( outInt16Buffer ); free( outFloatBuffer ); cleanup: #ifdef SPLIT_REND_WITH_HEAD_ROT if ( bitsBufferData != NULL ) Loading Loading @@ -1988,7 +2131,14 @@ int main( RotationFileReader_close( &referenceRotReader ); Vector3PairFileReader_close( &referenceVectorReader ); hrtfFileReader_close( &hrtfFileReader ); if ( hSetOfHRTF != NULL && *hSetOfHRTF != NULL ) { destroy_SetOfHRTF( hSetOfHRTF ); } if ( hHrtfTD != NULL && *hHrtfTD != NULL ) { destroy_td_hrtf( hHrtfTD ); } IVAS_REND_Close( &hIvasRend ); IsmPositionProvider_close( positionProvider ); RenderConfigReader_close( &renderConfigReader ); Loading lib_com/ari_hm.c +4 −0 Original line number Diff line number Diff line Loading @@ -272,7 +272,11 @@ void tcx_hm_modify_envelope( const int16_t L_frame /* i : number of spectral lines */ ) { #ifdef FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI int32_t k, h, x; #else int16_t k, h, x; #endif Word16 inv_shape[2 * kTcxHmParabolaHalfWidth + 1]; /* Q15 */ if ( gain == 0 ) Loading lib_com/ivas_cnst.h +10 −1 Original line number Diff line number Diff line Loading @@ -1216,6 +1216,9 @@ enum #define MASA_BIT_REDUCT_PARAM 10 #define MASA_MAXIMUM_TWO_DIR_BANDS 24 #define NBITS_HR_COH 4 #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS #define OMASA_TDREND_MATCHING_GAIN 0.7943f #endif #define MASA_JBM_RINGBUFFER_FRAMES 3 Loading Loading @@ -1536,7 +1539,6 @@ typedef enum #define MAX_ANGULAR_STEP_INV ( 1.0f / MAX_ANGULAR_STEP ) #define MAX_INTERPOLATION_STEPS 12 #define LR_IAC_LENGTH_NR_FC ( RV_LENGTH_NR_FC ) /* ----- Enums - TD Renderer ----- */ Loading Loading @@ -1590,8 +1592,15 @@ typedef enum #define RV_FILTER_MAX_HISTORY ( 512 - 160 ) /* for longest history */ #define RV_LENGTH_NR_FC ( RV_FILTER_MAX_FFT_SIZE / 2 ) + 1 #ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB #define RV_LENGTH_NR_FC_16KHZ ( RV_FILTER_MAX_FFT_SIZE / 4 ) + 1 #endif #define IVAS_REVERB_DEFAULT_N_BANDS 31 #define LR_IAC_LENGTH_NR_FC ( RV_LENGTH_NR_FC ) #ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB #define LR_IAC_LENGTH_NR_FC_16KHZ ( RV_LENGTH_NR_FC_16KHZ ) #endif /*----------------------------------------------------------------------------------* * FB mixer constants Loading Loading
.gitlab-ci.yml +10 −8 Original line number Diff line number Diff line Loading @@ -860,7 +860,7 @@ uninterruptible: branch-is-up-to-date-with-target-pre: extends: - .rules-merge-request - .rules-merge-request-to-float-pc stage: prevalidate needs: [] tags: Loading @@ -876,7 +876,7 @@ branch-is-up-to-date-with-target-pre: branch-is-up-to-date-with-target-post: extends: - .rules-merge-request - .rules-merge-request-to-float-pc stage: postvalidate tags: - ivas-linux Loading Loading @@ -1048,6 +1048,7 @@ build-codec-linux-make: - .build-job-linux tags: - ivas-linux timeout: "10 minutes" script: - *print-common-info - *activate-Werror-linux Loading @@ -1064,7 +1065,7 @@ build-codec-linux-instrumented-make: when: never extends: - .build-job-linux timeout: "7 minutes" timeout: "10 minutes" tags: - ivas-linux script: Loading @@ -1080,6 +1081,7 @@ build-codec-sanitizers-linux: - .rules-basis tags: - ivas-linux timeout: "10 minutes" script: - *update-scripts-repo - *print-common-info Loading @@ -1096,7 +1098,7 @@ build-codec-windows-msbuild: when: never extends: - .build-job-windows timeout: "7 minutes" timeout: "10 minutes" tags: - ivas-windows script: Loading @@ -1111,7 +1113,7 @@ build-codec-windows-msbuild: split-rendering-smoke-test: extends: - .test-job-linux - .rules-merge-request - .rules-merge-request-to-float-pc needs: ["build-codec-linux-make"] stage: test script: Loading @@ -1135,7 +1137,7 @@ split-rendering-smoke-test: lc3-wrapper-unit-test: extends: - .test-job-linux - .rules-merge-request - .rules-merge-request-to-float-pc needs: ["build-codec-linux-make"] stage: test script: Loading @@ -1147,10 +1149,10 @@ lc3-wrapper-unit-test: - scripts/split_rendering/lc3plus_float/ivas_lc3plus_unit_test # compare split-rendering bitexactness between target and source branch .split-rendering-pytest-on-merge-request: split-rendering-pytest-on-merge-request: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request - .rules-merge-request-to-float-pc needs: ["build-codec-linux-make"] # TODO: set reasonable timeout, will most likely take less timeout: "30 minutes" Loading
apps/decoder.c +110 −21 Original line number Diff line number Diff line Loading @@ -197,6 +197,8 @@ int main( RenderConfigReader *renderConfigReader = NULL; int16_t *pcmBuf = NULL; IVAS_RENDER_FRAMESIZE asked_frame_size; IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; #ifdef DEBUGGING int32_t noClipping; int32_t cnt_frames_limited; Loading Loading @@ -724,58 +726,141 @@ int main( if ( arg.hrtfReaderEnabled ) { IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL; if ( ( error = IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_HRTF_binary( hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { #ifdef FIX_OLD_BINARY_FORMAT hrtfFileReader_close( &hrtfReader ); strcat( arg.hrtfFileName, "new" ); if ( hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_td_hrtf( hHrtfTD ); } } #else fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; #endif } else { destroy_td_hrtf( hHrtfTD ); } } IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL; #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES if ( ( *hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } } #endif if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) { #ifdef FIX_OLD_BINARY_FORMAT cleanup_SetOfHRTF( hSetOfHRTF ); hrtfFileReader_close( &hrtfReader ); strcat( arg.hrtfFileName, "new" ); if ( hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } } #else if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfFileName ); fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } #endif } IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv = NULL; IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; if ( ( error = IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfFastConvHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_fastconv_HRTF_from_binary( hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s for FastConv \n\n", arg.hrtfFileName ); fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_fastconv_hrtf( hHrtfFastConv ); } } IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin = NULL; IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; if ( ( error = IVAS_DEC_GetHrtfParamBinHandle( hIvasDec, &hHrtfParambin ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfParamBinHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_parambin_HRTF_from_binary( hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK ) if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s for parametric binauralizer \n\n", arg.hrtfFileName ); fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_parambin_hrtf( hHrtfParambin ); } } } /*------------------------------------------------------------------------------------------* Loading Loading @@ -852,13 +937,17 @@ cleanup: #endif if ( arg.hrtfReaderEnabled ) { IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL; IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); dealloc_HRTF_binary( hHrtfTD ); IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL; if ( hHrtfTD != NULL ) { destroy_td_hrtf( hHrtfTD ); } IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); if ( hSetOfHRTF != NULL ) { destroy_SetOfHRTF( hSetOfHRTF ); } } IVAS_DEC_Close( &hIvasDec ); CustomLsReader_close( &hLsCustomReader ); Loading
apps/renderer.c +162 −12 Original line number Diff line number Diff line Loading @@ -613,7 +613,6 @@ static float dBToLin( return powf( 10.0f, gain_dB / 20.0f ); } #ifdef SPLIT_REND_WITH_HEAD_ROT static int16_t get_cldfb_in_flag( const IVAS_AUDIO_CONFIG audioConfig, Loading Loading @@ -673,6 +672,10 @@ int main( #endif Vector3PairFileReader *referenceVectorReader = NULL; hrtfFileReader *hrtfFileReader = NULL; IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; IsmPositionProvider *positionProvider; LfeRoutingConfig *lfeRoutingConfigs[RENDERER_MAX_MC_INPUTS]; RenderConfigReader *renderConfigReader = NULL; Loading Loading @@ -814,14 +817,6 @@ int main( } } if ( !isEmptyString( args.customHrtfFilePath ) ) { if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening file: %s\n", args.customHrtfFilePath ); exit( -1 ); } } if ( !isEmptyString( args.renderConfigFilePath ) ) { Loading Loading @@ -908,12 +903,159 @@ int main( const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } if ( !isEmptyString( args.customHrtfFilePath ) ) { if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening file: %s\n", args.customHrtfFilePath ); exit( -1 ); } if ( hrtfFileReader != NULL ) { if ( ( error = IVAS_REND_GetHrtfHandle( hIvasRend, &hHrtfTD ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_GetHrtfHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { #ifdef FIX_OLD_BINARY_FORMAT hrtfFileReader_close( &hrtfFileReader ); strcat( args.customHrtfFilePath, "new" ); if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_td_hrtf( hHrtfTD ); } } #else fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; #endif } else { destroy_td_hrtf( hHrtfTD ); } } #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } } #endif if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_Rend_GetHrtfCRendHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) { #ifdef FIX_OLD_BINARY_FORMAT cleanup_SetOfHRTF( hSetOfHRTF ); hrtfFileReader_close( &hrtfFileReader ); strcat( args.customHrtfFilePath, "new" ); if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s:%s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } } #else if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s:%s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_SetOfHRTF( hSetOfHRTF ); } #endif } if ( ( error = IVAS_REND_GetHrtfFastConvHandle( hIvasRend, &hHrtfFastConv ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_GetHrtfFastConvHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s:%s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_fastconv_hrtf( hHrtfFastConv ); } } if ( ( error = IVAS_REND_GetHrtfParamBinHandle( hIvasRend, &hHrtfParambin ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfParamBinHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; } else { destroy_parambin_hrtf( hHrtfParambin ); } } } hrtfFileReader_close( &hrtfFileReader ); } fprintf( stdout, "Input audio file: %s\n", args.inputFilePath ); fprintf( stdout, "Output audio file: %s\n\n", args.outputFilePath ); Loading Loading @@ -959,7 +1101,7 @@ int main( /* === Configure === */ if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Renderer Config Init\n" ); fprintf( stderr, "Error in Renderer Config Init: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } Loading Loading @@ -1954,6 +2096,7 @@ int main( free( outInt16Buffer ); free( outFloatBuffer ); cleanup: #ifdef SPLIT_REND_WITH_HEAD_ROT if ( bitsBufferData != NULL ) Loading Loading @@ -1988,7 +2131,14 @@ int main( RotationFileReader_close( &referenceRotReader ); Vector3PairFileReader_close( &referenceVectorReader ); hrtfFileReader_close( &hrtfFileReader ); if ( hSetOfHRTF != NULL && *hSetOfHRTF != NULL ) { destroy_SetOfHRTF( hSetOfHRTF ); } if ( hHrtfTD != NULL && *hHrtfTD != NULL ) { destroy_td_hrtf( hHrtfTD ); } IVAS_REND_Close( &hIvasRend ); IsmPositionProvider_close( positionProvider ); RenderConfigReader_close( &renderConfigReader ); Loading
lib_com/ari_hm.c +4 −0 Original line number Diff line number Diff line Loading @@ -272,7 +272,11 @@ void tcx_hm_modify_envelope( const int16_t L_frame /* i : number of spectral lines */ ) { #ifdef FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI int32_t k, h, x; #else int16_t k, h, x; #endif Word16 inv_shape[2 * kTcxHmParabolaHalfWidth + 1]; /* Q15 */ if ( gain == 0 ) Loading
lib_com/ivas_cnst.h +10 −1 Original line number Diff line number Diff line Loading @@ -1216,6 +1216,9 @@ enum #define MASA_BIT_REDUCT_PARAM 10 #define MASA_MAXIMUM_TWO_DIR_BANDS 24 #define NBITS_HR_COH 4 #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS #define OMASA_TDREND_MATCHING_GAIN 0.7943f #endif #define MASA_JBM_RINGBUFFER_FRAMES 3 Loading Loading @@ -1536,7 +1539,6 @@ typedef enum #define MAX_ANGULAR_STEP_INV ( 1.0f / MAX_ANGULAR_STEP ) #define MAX_INTERPOLATION_STEPS 12 #define LR_IAC_LENGTH_NR_FC ( RV_LENGTH_NR_FC ) /* ----- Enums - TD Renderer ----- */ Loading Loading @@ -1590,8 +1592,15 @@ typedef enum #define RV_FILTER_MAX_HISTORY ( 512 - 160 ) /* for longest history */ #define RV_LENGTH_NR_FC ( RV_FILTER_MAX_FFT_SIZE / 2 ) + 1 #ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB #define RV_LENGTH_NR_FC_16KHZ ( RV_FILTER_MAX_FFT_SIZE / 4 ) + 1 #endif #define IVAS_REVERB_DEFAULT_N_BANDS 31 #define LR_IAC_LENGTH_NR_FC ( RV_LENGTH_NR_FC ) #ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB #define LR_IAC_LENGTH_NR_FC_16KHZ ( RV_LENGTH_NR_FC_16KHZ ) #endif /*----------------------------------------------------------------------------------* * FB mixer constants Loading