Loading .gitignore +0 −8 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ IVAS_cod IVAS_dec IVAS_rend IVAS_crend_unit_test obj/ *.a *.o Loading @@ -17,7 +16,6 @@ build*/**/* IVAS_cod.exe IVAS_dec.exe IVAS_rend.exe IVAS_crend_unit_test.exe *.user .vs/ Debug_*/ Loading @@ -25,12 +23,6 @@ Release_*/ *.obj *.pdb # Unittests scripts/ivas_pytests/tests/unit_tests/crend/IVAS_crend_unit_test scripts/ivas_pytests/tests/unit_tests/crend/IVAS_crend_unit_test.exe scripts/ivas_pytests/tests/unit_tests/crend/Debug_*/ scripts/ivas_pytests/tests/unit_tests/crend/Release_*/ # Standalone TD object renderer scripts/td_object_renderer/object_renderer_standalone/renderer_standalone scripts/td_object_renderer/object_renderer_standalone/renderer_standalone.exe Loading .gitlab-ci.yml +28 −1 Original line number Diff line number Diff line Loading @@ -266,6 +266,7 @@ build-codec-instrumented-linux: extends: - .build-job-linux - .rules-basis timeout: "6 minutes" script: - *print-common-info - bash ci/build_codec_instrumented_linux.sh Loading Loading @@ -658,12 +659,38 @@ clang-format-check: name: "$ARTIFACT_BASE_NAME" expose_as: 'formatting patch' # check for crashes if first received frame on decoder side is an SID .check-first-frame-is-sid: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request tags: - ivas-linux stage: test needs: ["build-codec-linux-cmake"] script: - *print-common-info - *update-ltv-repo - cmake . - make -j # TODO: for some MASA modes, we currently do not have testvectors that actually trigger DTX - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -v MASA) - echo $modes - scripts/runIvasCodec.py -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 500 artifacts: paths: - out/logs when: on_failure name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--sidstart" expose_as: "logs-sidstart" # --------------------------------------------------------------- # Test jobs for main branch # --------------------------------------------------------------- # check bitexactness to EVS windows binaries be-2-evs-windows: .be-2-evs-windows: # Temporarily disabled -- Ericsson Windows runner used for HL activities which the reduces capacity for this job. To be resumed after selection extends: - .rules-main-push tags: Loading apps/decoder.c +1 −63 Original line number Diff line number Diff line Loading @@ -82,9 +82,7 @@ static #ifdef VARIABLE_SPEED_DECODING #define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 #endif #ifdef JBM_TSM_ON_TCS #define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 #endif typedef struct { Loading Loading @@ -136,12 +134,10 @@ typedef struct char *tsmScaleFileName; uint16_t tsmScale; #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION uint16_t frontendFetchSizeMs; #endif #endif #endif } DecArguments; Loading Loading @@ -218,11 +214,7 @@ int main( * Open decoder handle *------------------------------------------------------------------------------------------*/ #ifdef FIX_439_OTR_PARAMS if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Open failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -386,26 +378,13 @@ int main( /*------------------------------------------------------------------------------------------* * Configure the decoder *------------------------------------------------------------------------------------------*/ #ifdef FIX_356_ISM_METADATA_SYNC #ifdef FIX_439_OTR_PARAMS if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #endif #else #ifdef FIX_439_OTR_PARAMS if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef JBM_TSM_ON_TCS /*------------------------------------------------------------------------------------------* * Configure VoIP mode *------------------------------------------------------------------------------------------*/ Loading @@ -430,7 +409,6 @@ int main( } #endif #endif #endif #ifdef DEBUGGING /*-----------------------------------------------------------------* Loading Loading @@ -658,17 +636,6 @@ int main( if ( arg.voipMode ) { #ifndef JBM_TSM_ON_TCS #ifdef VARIABLE_SPEED_DECODING if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #endif error = decodeVoIP( arg, hBsReader, hIvasDec ); } #ifdef VARIABLE_SPEED_DECODING Loading Loading @@ -921,11 +888,9 @@ static bool parseCmdlIVAS_dec( arg->tsmScaleFileEnabled = false; arg->tsmScaleFileName = NULL; #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION arg->frontendFetchSizeMs = JBM_FRONTEND_FETCH_FRAMESIZE_MS; #endif #endif #ifdef DEBUG_JBM_CMD_OPTION arg->noBadFrameDelay = false; #endif Loading Loading @@ -1094,7 +1059,6 @@ static bool parseCmdlIVAS_dec( } } #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION else if ( strcmp( argv_to_upper, "-VOIP_FRAMESIZE" ) == 0 ) { Loading @@ -1115,7 +1079,6 @@ static bool parseCmdlIVAS_dec( } } #endif #endif #endif /* #ifdef DEBUGGING */ else if ( strcmp( argv_to_upper, "-MIME" ) == 0 ) Loading Loading @@ -1404,11 +1367,9 @@ static void usage_dec( void ) fprintf( stdout, "-VS fac : Variable Speed mode: change speed of playout fac as integer in percent.\n" ); fprintf( stdout, " 50 <= fac <= 150; fac<100 faster, fac>100 slower\n" ); #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION fprintf( stdout, "-VOIP_framesize : VoIP mode: acoustic frontend fetch frame size (must be multiples of 5!)\n" ); #endif #endif #endif fprintf( stdout, "-fec_cfg_file : Optimal channel aware configuration computed by the JBM \n" ); fprintf( stdout, " as described in Section 6.3.1 of TS26.448. The output is \n" ); Loading Loading @@ -2093,10 +2054,8 @@ static ivas_error decodeVoIP( uint32_t nextPacketRcvTime_ms = 0; uint32_t systemTime_ms = 0; #ifdef JBM_TSM_ON_TCS uint32_t systemTimeInc_ms = (uint32_t) JBM_FRONTEND_FETCH_FRAMESIZE_MS; int32_t nFramesWritten = 0; #endif int32_t nFramesFed = 0; Loading Loading @@ -2232,26 +2191,18 @@ static ivas_error decodeVoIP( * Main receiving/decoding loop *------------------------------------------------------------------------------------------*/ #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION systemTimeInc_ms = arg.frontendFetchSizeMs; #endif #endif while ( 1 ) { int16_t nOutSamples = 0; #if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) uint16_t nSamplesAvailableNext = 0; #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION nOutSamples = (int16_t) ( arg.output_Fs / 1000 * arg.frontendFetchSizeMs ); #else nOutSamples = (int16_t) ( arg.output_Fs / 1000 * JBM_FRONTEND_FETCH_FRAMESIZE_MS ); #endif #else nOutSamples = (int16_t) ( arg.output_Fs / 50 ); #endif /* read all packets with a receive time smaller than the system time */ while ( nextPacketRcvTime_ms <= systemTime_ms ) Loading Loading @@ -2296,23 +2247,16 @@ static ivas_error decodeVoIP( /* we are finished when all packets have been received and jitter buffer is empty */ /* also stop when the input file contains less than two frames, because JBM cannot calculate a delay value and won't start decoding */ #ifdef JBM_TSM_ON_TCS /* last clause should make sure that for BE tests we end up with the same number of samples...*/ if ( nextPacketRcvTime_ms == (uint32_t) ( -1 ) && ( IVAS_DEC_VoIP_IsEmpty( hIvasDec, nOutSamples ) || nFramesFed < 2 ) ) #else if ( nextPacketRcvTime_ms == (uint32_t) ( -1 ) && ( IVAS_DEC_VoIP_IsEmpty( hIvasDec ) || nFramesFed < 2 ) ) #endif { break; } /* decode and get samples */ if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms #if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) , if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms, &nSamplesAvailableNext #endif #ifdef SUPPORT_JBM_TRACEFILE , writeJbmTraceFileFrameWrapper, Loading Loading @@ -2402,7 +2346,6 @@ static ivas_error decodeVoIP( delayNumSamples -= nOutSamples; } #ifdef JBM_TSM_ON_TCS /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) { Loading Loading @@ -2449,7 +2392,6 @@ static ivas_error decodeVoIP( } } } #endif } if ( !arg.quietModeEnabled ) Loading @@ -2458,12 +2400,8 @@ static ivas_error decodeVoIP( } frame++; #ifdef JBM_TSM_ON_TCS systemTime_ms += systemTimeInc_ms; nFramesWritten++; #else systemTime_ms += 20; #endif #ifdef WMOPS update_mem(); Loading apps/encoder.c +33 −1 Original line number Diff line number Diff line Loading @@ -98,6 +98,9 @@ typedef struct char *outputBitstreamFilename; int32_t inputFs; IVAS_ENC_INPUT_FORMAT inputFormat; #ifdef BINAURAL_AUDIO_CMDLINE bool is_binaural; #endif EncInputFormatConfig inputFormatConfig; bool max_bwidth_user; IVAS_ENC_BANDWIDTH maxBandwidth; Loading Loading @@ -362,17 +365,29 @@ int main( switch ( arg.inputFormat ) { case IVAS_ENC_INPUT_MONO: #ifdef BINAURAL_AUDIO_CMDLINE if ( ( error = IVAS_ENC_ConfigureForMono( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, caConfig, arg.inputFormatConfig.stereoToMonoDownmix, arg.is_binaural ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForMono( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, caConfig, arg.inputFormatConfig.stereoToMonoDownmix ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_ENC_ConfigureForMono failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; } break; case IVAS_ENC_INPUT_STEREO: #ifdef BINAURAL_AUDIO_CMDLINE #ifdef DEBUGGING if ( ( error = IVAS_ENC_ConfigureForStereo( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.is_binaural, arg.inputFormatConfig.stereoMode ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForStereo( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.is_binaural ) ) != IVAS_ERR_OK ) #endif #else #ifdef DEBUGGING if ( ( error = IVAS_ENC_ConfigureForStereo( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.stereoMode ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForStereo( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "\nIVAS_ENC_ConfigureForStereo failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); Loading Loading @@ -865,6 +880,9 @@ static void initArgStruct( EncArguments *arg ) arg->outputBitstreamFilename = NULL; arg->inputFs = 0; arg->inputFormat = IVAS_ENC_INPUT_MONO; #ifdef BINAURAL_AUDIO_CMDLINE arg->is_binaural = false; #endif arg->inputFormatConfig.stereoToMonoDownmix = false; arg->max_bwidth_user = false; arg->maxBandwidth = IVAS_ENC_BANDWIDTH_UNDEFINED; Loading Loading @@ -1207,6 +1225,16 @@ static bool parseCmdlIVAS_enc( * IVAS Formats *-----------------------------------------------------------------*/ #ifdef BINAURAL_AUDIO_CMDLINE else if ( strcmp( argv_to_upper, "-BINAURAL" ) == 0 ) { i++; if ( strcmp( argv_to_upper, "-BINAURAL" ) == 0 ) { arg->is_binaural = true; } } #endif else if ( strcmp( argv_to_upper, "-STEREO" ) == 0 ) { i++; Loading Loading @@ -1487,9 +1515,10 @@ static bool parseCmdlIVAS_enc( { arg->inputFormat = IVAS_ENC_INPUT_MONO; arg->inputFormatConfig.stereoToMonoDownmix = true; i++; } else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // VE: should be renamed to "-pca" else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // TODO: should be renamed to "-pca" { i++; if ( i < argc - 4 ) Loading Loading @@ -1674,6 +1703,9 @@ static void usage_enc( void ) fprintf( stdout, "Options:\n" ); fprintf( stdout, "--------\n" ); fprintf( stdout, "EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -masa, -mc\n" ); #ifdef BINAURAL_AUDIO_CMDLINE fprintf( stdout, "-binaural : Optional indication that input is binaural audio (to be used with -stereo or -stereo_dmx_evs)\n" ); #endif fprintf( stdout, "-stereo : Stereo format \n" ); fprintf( stdout, "-ism (+)Ch Files : ISM format \n" ); fprintf( stdout, " where Ch specifies the number of ISMs (1-4)\n" ); Loading apps/renderer.c +281 −45 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
.gitignore +0 −8 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ IVAS_cod IVAS_dec IVAS_rend IVAS_crend_unit_test obj/ *.a *.o Loading @@ -17,7 +16,6 @@ build*/**/* IVAS_cod.exe IVAS_dec.exe IVAS_rend.exe IVAS_crend_unit_test.exe *.user .vs/ Debug_*/ Loading @@ -25,12 +23,6 @@ Release_*/ *.obj *.pdb # Unittests scripts/ivas_pytests/tests/unit_tests/crend/IVAS_crend_unit_test scripts/ivas_pytests/tests/unit_tests/crend/IVAS_crend_unit_test.exe scripts/ivas_pytests/tests/unit_tests/crend/Debug_*/ scripts/ivas_pytests/tests/unit_tests/crend/Release_*/ # Standalone TD object renderer scripts/td_object_renderer/object_renderer_standalone/renderer_standalone scripts/td_object_renderer/object_renderer_standalone/renderer_standalone.exe Loading
.gitlab-ci.yml +28 −1 Original line number Diff line number Diff line Loading @@ -266,6 +266,7 @@ build-codec-instrumented-linux: extends: - .build-job-linux - .rules-basis timeout: "6 minutes" script: - *print-common-info - bash ci/build_codec_instrumented_linux.sh Loading Loading @@ -658,12 +659,38 @@ clang-format-check: name: "$ARTIFACT_BASE_NAME" expose_as: 'formatting patch' # check for crashes if first received frame on decoder side is an SID .check-first-frame-is-sid: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request tags: - ivas-linux stage: test needs: ["build-codec-linux-cmake"] script: - *print-common-info - *update-ltv-repo - cmake . - make -j # TODO: for some MASA modes, we currently do not have testvectors that actually trigger DTX - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -v MASA) - echo $modes - scripts/runIvasCodec.py -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 500 artifacts: paths: - out/logs when: on_failure name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--sidstart" expose_as: "logs-sidstart" # --------------------------------------------------------------- # Test jobs for main branch # --------------------------------------------------------------- # check bitexactness to EVS windows binaries be-2-evs-windows: .be-2-evs-windows: # Temporarily disabled -- Ericsson Windows runner used for HL activities which the reduces capacity for this job. To be resumed after selection extends: - .rules-main-push tags: Loading
apps/decoder.c +1 −63 Original line number Diff line number Diff line Loading @@ -82,9 +82,7 @@ static #ifdef VARIABLE_SPEED_DECODING #define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 #endif #ifdef JBM_TSM_ON_TCS #define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 #endif typedef struct { Loading Loading @@ -136,12 +134,10 @@ typedef struct char *tsmScaleFileName; uint16_t tsmScale; #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION uint16_t frontendFetchSizeMs; #endif #endif #endif } DecArguments; Loading Loading @@ -218,11 +214,7 @@ int main( * Open decoder handle *------------------------------------------------------------------------------------------*/ #ifdef FIX_439_OTR_PARAMS if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Open failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -386,26 +378,13 @@ int main( /*------------------------------------------------------------------------------------------* * Configure the decoder *------------------------------------------------------------------------------------------*/ #ifdef FIX_356_ISM_METADATA_SYNC #ifdef FIX_439_OTR_PARAMS if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #endif #else #ifdef FIX_439_OTR_PARAMS if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef JBM_TSM_ON_TCS /*------------------------------------------------------------------------------------------* * Configure VoIP mode *------------------------------------------------------------------------------------------*/ Loading @@ -430,7 +409,6 @@ int main( } #endif #endif #endif #ifdef DEBUGGING /*-----------------------------------------------------------------* Loading Loading @@ -658,17 +636,6 @@ int main( if ( arg.voipMode ) { #ifndef JBM_TSM_ON_TCS #ifdef VARIABLE_SPEED_DECODING if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #endif error = decodeVoIP( arg, hBsReader, hIvasDec ); } #ifdef VARIABLE_SPEED_DECODING Loading Loading @@ -921,11 +888,9 @@ static bool parseCmdlIVAS_dec( arg->tsmScaleFileEnabled = false; arg->tsmScaleFileName = NULL; #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION arg->frontendFetchSizeMs = JBM_FRONTEND_FETCH_FRAMESIZE_MS; #endif #endif #ifdef DEBUG_JBM_CMD_OPTION arg->noBadFrameDelay = false; #endif Loading Loading @@ -1094,7 +1059,6 @@ static bool parseCmdlIVAS_dec( } } #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION else if ( strcmp( argv_to_upper, "-VOIP_FRAMESIZE" ) == 0 ) { Loading @@ -1115,7 +1079,6 @@ static bool parseCmdlIVAS_dec( } } #endif #endif #endif /* #ifdef DEBUGGING */ else if ( strcmp( argv_to_upper, "-MIME" ) == 0 ) Loading Loading @@ -1404,11 +1367,9 @@ static void usage_dec( void ) fprintf( stdout, "-VS fac : Variable Speed mode: change speed of playout fac as integer in percent.\n" ); fprintf( stdout, " 50 <= fac <= 150; fac<100 faster, fac>100 slower\n" ); #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION fprintf( stdout, "-VOIP_framesize : VoIP mode: acoustic frontend fetch frame size (must be multiples of 5!)\n" ); #endif #endif #endif fprintf( stdout, "-fec_cfg_file : Optimal channel aware configuration computed by the JBM \n" ); fprintf( stdout, " as described in Section 6.3.1 of TS26.448. The output is \n" ); Loading Loading @@ -2093,10 +2054,8 @@ static ivas_error decodeVoIP( uint32_t nextPacketRcvTime_ms = 0; uint32_t systemTime_ms = 0; #ifdef JBM_TSM_ON_TCS uint32_t systemTimeInc_ms = (uint32_t) JBM_FRONTEND_FETCH_FRAMESIZE_MS; int32_t nFramesWritten = 0; #endif int32_t nFramesFed = 0; Loading Loading @@ -2232,26 +2191,18 @@ static ivas_error decodeVoIP( * Main receiving/decoding loop *------------------------------------------------------------------------------------------*/ #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION systemTimeInc_ms = arg.frontendFetchSizeMs; #endif #endif while ( 1 ) { int16_t nOutSamples = 0; #if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) uint16_t nSamplesAvailableNext = 0; #endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION nOutSamples = (int16_t) ( arg.output_Fs / 1000 * arg.frontendFetchSizeMs ); #else nOutSamples = (int16_t) ( arg.output_Fs / 1000 * JBM_FRONTEND_FETCH_FRAMESIZE_MS ); #endif #else nOutSamples = (int16_t) ( arg.output_Fs / 50 ); #endif /* read all packets with a receive time smaller than the system time */ while ( nextPacketRcvTime_ms <= systemTime_ms ) Loading Loading @@ -2296,23 +2247,16 @@ static ivas_error decodeVoIP( /* we are finished when all packets have been received and jitter buffer is empty */ /* also stop when the input file contains less than two frames, because JBM cannot calculate a delay value and won't start decoding */ #ifdef JBM_TSM_ON_TCS /* last clause should make sure that for BE tests we end up with the same number of samples...*/ if ( nextPacketRcvTime_ms == (uint32_t) ( -1 ) && ( IVAS_DEC_VoIP_IsEmpty( hIvasDec, nOutSamples ) || nFramesFed < 2 ) ) #else if ( nextPacketRcvTime_ms == (uint32_t) ( -1 ) && ( IVAS_DEC_VoIP_IsEmpty( hIvasDec ) || nFramesFed < 2 ) ) #endif { break; } /* decode and get samples */ if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms #if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) , if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms, &nSamplesAvailableNext #endif #ifdef SUPPORT_JBM_TRACEFILE , writeJbmTraceFileFrameWrapper, Loading Loading @@ -2402,7 +2346,6 @@ static ivas_error decodeVoIP( delayNumSamples -= nOutSamples; } #ifdef JBM_TSM_ON_TCS /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) { Loading Loading @@ -2449,7 +2392,6 @@ static ivas_error decodeVoIP( } } } #endif } if ( !arg.quietModeEnabled ) Loading @@ -2458,12 +2400,8 @@ static ivas_error decodeVoIP( } frame++; #ifdef JBM_TSM_ON_TCS systemTime_ms += systemTimeInc_ms; nFramesWritten++; #else systemTime_ms += 20; #endif #ifdef WMOPS update_mem(); Loading
apps/encoder.c +33 −1 Original line number Diff line number Diff line Loading @@ -98,6 +98,9 @@ typedef struct char *outputBitstreamFilename; int32_t inputFs; IVAS_ENC_INPUT_FORMAT inputFormat; #ifdef BINAURAL_AUDIO_CMDLINE bool is_binaural; #endif EncInputFormatConfig inputFormatConfig; bool max_bwidth_user; IVAS_ENC_BANDWIDTH maxBandwidth; Loading Loading @@ -362,17 +365,29 @@ int main( switch ( arg.inputFormat ) { case IVAS_ENC_INPUT_MONO: #ifdef BINAURAL_AUDIO_CMDLINE if ( ( error = IVAS_ENC_ConfigureForMono( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, caConfig, arg.inputFormatConfig.stereoToMonoDownmix, arg.is_binaural ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForMono( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, caConfig, arg.inputFormatConfig.stereoToMonoDownmix ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_ENC_ConfigureForMono failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; } break; case IVAS_ENC_INPUT_STEREO: #ifdef BINAURAL_AUDIO_CMDLINE #ifdef DEBUGGING if ( ( error = IVAS_ENC_ConfigureForStereo( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.is_binaural, arg.inputFormatConfig.stereoMode ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForStereo( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.is_binaural ) ) != IVAS_ERR_OK ) #endif #else #ifdef DEBUGGING if ( ( error = IVAS_ENC_ConfigureForStereo( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.stereoMode ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForStereo( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "\nIVAS_ENC_ConfigureForStereo failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); Loading Loading @@ -865,6 +880,9 @@ static void initArgStruct( EncArguments *arg ) arg->outputBitstreamFilename = NULL; arg->inputFs = 0; arg->inputFormat = IVAS_ENC_INPUT_MONO; #ifdef BINAURAL_AUDIO_CMDLINE arg->is_binaural = false; #endif arg->inputFormatConfig.stereoToMonoDownmix = false; arg->max_bwidth_user = false; arg->maxBandwidth = IVAS_ENC_BANDWIDTH_UNDEFINED; Loading Loading @@ -1207,6 +1225,16 @@ static bool parseCmdlIVAS_enc( * IVAS Formats *-----------------------------------------------------------------*/ #ifdef BINAURAL_AUDIO_CMDLINE else if ( strcmp( argv_to_upper, "-BINAURAL" ) == 0 ) { i++; if ( strcmp( argv_to_upper, "-BINAURAL" ) == 0 ) { arg->is_binaural = true; } } #endif else if ( strcmp( argv_to_upper, "-STEREO" ) == 0 ) { i++; Loading Loading @@ -1487,9 +1515,10 @@ static bool parseCmdlIVAS_enc( { arg->inputFormat = IVAS_ENC_INPUT_MONO; arg->inputFormatConfig.stereoToMonoDownmix = true; i++; } else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // VE: should be renamed to "-pca" else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // TODO: should be renamed to "-pca" { i++; if ( i < argc - 4 ) Loading Loading @@ -1674,6 +1703,9 @@ static void usage_enc( void ) fprintf( stdout, "Options:\n" ); fprintf( stdout, "--------\n" ); fprintf( stdout, "EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -masa, -mc\n" ); #ifdef BINAURAL_AUDIO_CMDLINE fprintf( stdout, "-binaural : Optional indication that input is binaural audio (to be used with -stereo or -stereo_dmx_evs)\n" ); #endif fprintf( stdout, "-stereo : Stereo format \n" ); fprintf( stdout, "-ism (+)Ch Files : ISM format \n" ); fprintf( stdout, " where Ch specifies the number of ISMs (1-4)\n" ); Loading