Commit efadca61 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into...

Merge remote-tracking branch 'remotes/origin/main' into ARITH_HUFF_CODER_CHANGES_formal_improvements
parents c60d747c 64f3259c
Loading
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@
IVAS_cod
IVAS_dec
IVAS_rend
IVAS_crend_unit_test
obj/
*.a
*.o
@@ -17,7 +16,6 @@ build*/**/*
IVAS_cod.exe
IVAS_dec.exe
IVAS_rend.exe
IVAS_crend_unit_test.exe
*.user
.vs/
Debug_*/
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -690,7 +690,7 @@ clang-format-check:
# ---------------------------------------------------------------

# 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:
+1 −63
Original line number Diff line number Diff line
@@ -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
{
@@ -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;

@@ -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;
@@ -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
     *------------------------------------------------------------------------------------------*/
@@ -430,7 +409,6 @@ int main(
    }
#endif
#endif
#endif

#ifdef DEBUGGING
    /*-----------------------------------------------------------------*
@@ -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
@@ -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
@@ -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 )
        {
@@ -1115,7 +1079,6 @@ static bool parseCmdlIVAS_dec(
            }
        }
#endif
#endif
#endif /* #ifdef DEBUGGING */

        else if ( strcmp( argv_to_upper, "-MIME" ) == 0 )
@@ -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" );
@@ -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;


@@ -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 )
@@ -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,
@@ -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 )
            {
@@ -2449,7 +2392,6 @@ static ivas_error decodeVoIP(
                    }
                }
            }
#endif
        }

        if ( !arg.quietModeEnabled )
@@ -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();
+276 −44

File changed.

Preview size limit exceeded, changes collapsed.

+9 −8
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ fi
cfg=./scripts/config/ci_linux.json
dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat
ism_md_cmd="--metadata_files /usr/local/ltv/ltvISM1.csv /usr/local/ltv/ltvISM2.csv /usr/local/ltv/ltvISM3.csv /usr/local/ltv/ltvISM4.csv"
duration_arg="-U 1:2"

if [ $BUILD -eq 1 ];then
	# Enable memory macros to find unbalanced memory allocations/deallocations
@@ -79,20 +80,20 @@ fi
ism_modes=$(./scripts/runIvasCodec.py -l | grep ISM)
non_ism_modes=$(./scripts/runIvasCodec.py -l | grep -v ISM)
echo "\n======================= 1. non-ism modes no FEC =======================\n\n"
./scripts/runIvasCodec.py -m $non_ism_modes -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt
./scripts/runIvasCodec.py -m $non_ism_modes -p $cfg $duration_arg $WORKERS | tee smoke_test_output.txt
echo "\n======================= 2. ism modes no FEC =======================\n\n"
./scripts/runIvasCodec.py -m $ism_modes -p $cfg -U 1 $WORKERS $ism_md_cmd | tee smoke_test_output.txt
./scripts/runIvasCodec.py -m $ism_modes -p $cfg $duration_arg $WORKERS $ism_md_cmd | tee smoke_test_output.txt
# run the decoding again, but with 15% frame loss
echo "\n======================= 3. all modes with FEC =======================\n\n"
./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt
./scripts/runIvasCodec.py -p $cfg $duration_arg $WORKERS -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt

# run JBM modes - EXT is excluded as not supported yet
modes_with_no_ext_out=$(./scripts/runIvasCodec.py -l | grep -v MASA | grep -v ISM)
modes_with_ext_out=$(./scripts/runIvasCodec.py -l | grep 'MASA\|ISM' | grep -v ISM+)
echo "\n======================= 4. JBM, modes with no EXT =======================\n\n"
./scripts/runIvasCodec.py -m $modes_with_no_ext_out -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile | tee smoke_test_output_jbm_noEXT.txt
./scripts/runIvasCodec.py -m $modes_with_no_ext_out -p $cfg $duration_arg $WORKERS --decoder_only --jbm_file $dly_profile | tee smoke_test_output_jbm_noEXT.txt
echo "\n======================= 5. JBM, modes with EXT =======================\n\n"
./scripts/runIvasCodec.py -m $modes_with_ext_out -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM mono stereo FOA HOA3 5_1 7_1_4 | tee -a smoke_test_output_jbm_noEXT.txt
./scripts/runIvasCodec.py -m $modes_with_ext_out -p $cfg $duration_arg $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM mono stereo FOA HOA3 5_1 7_1_4 | tee -a smoke_test_output_jbm_noEXT.txt

# run all modes with binaural output using external files
modes_with_bin_out="SBA PlanarSBA MASA MC ISM1 ISM2 ISM3 ISM4"
@@ -101,14 +102,14 @@ bin_out_modes="BINAURAL BINAURAL_ROOM"
echo "\n======================= 6. binaural out with HRTF files - WB =======================\n\n"
wb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _wb_)
hrtf_wb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin"
./scripts/runIvasCodec.py -p $cfg -m $wb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_wb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt
./scripts/runIvasCodec.py -p $cfg -m $wb_modes $duration_arg $WORKERS -D="-hrtf ${hrtf_wb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt

echo "\n======================= 7. binaural out with HRTF files - SWB =======================\n\n"
swb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _swb_)
hrtf_swb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin"
./scripts/runIvasCodec.py -p $cfg -m $swb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_swb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt
./scripts/runIvasCodec.py -p $cfg -m $swb_modes $duration_arg $WORKERS -D="-hrtf ${hrtf_swb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt

echo "\n======================= 8. binaural out with HRTF files - FB =======================\n\n"
fb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _fb_)
hrtf_fb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin"
./scripts/runIvasCodec.py -p $cfg -m $fb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_fb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt
./scripts/runIvasCodec.py -p $cfg -m $fb_modes $duration_arg $WORKERS -D="-hrtf ${hrtf_fb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt
Loading