Commit 633407f3 authored by malenov's avatar malenov
Browse files

Merge main to va/wmc_tool

parents 28c4242a ef53cb31
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -287,6 +287,7 @@ msan-on-merge-request-linux:
  needs: ["build-codec-sanitizers-linux"]
  script:
    - *print-common-info
    - python3 ci/disable_ram_counting.py
    - make clean
    - make -j CLANG=1
    - python3 scripts/self_test.py --create | tee test_output.txt
@@ -308,6 +309,7 @@ asan-on-merge-request-linux:
  needs: ["build-codec-sanitizers-linux"]
  script:
    - *print-common-info
    - python3 ci/disable_ram_counting.py
    - make clean
    - make -j CLANG=2
    - python3 scripts/self_test.py --create | tee test_output.txt
+48 −3
Original line number Diff line number Diff line
@@ -1216,8 +1216,21 @@ static bool parseCmdlIVAS_enc(
            arg->inputFormat = IVAS_ENC_INPUT_ISM;
            i++;

#ifdef IMPROVE_CMDLINE_ROBUSTNESS
            if ( i < argc - 4 )
#else
            if ( i < argc - 5 )
#endif
            {
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                if ( !is_digits_only( argv[i] ) )
                {
                    fprintf( stderr, "Error: Number of ISM channels must be an integer number!\n\n" );
                    usage_enc();
                    return false;
                }
#endif

                if ( sscanf( argv[i], "%d", &tmp ) > 0 )
                {
                    i++;
@@ -1229,6 +1242,14 @@ static bool parseCmdlIVAS_enc(
                    usage_enc();
                    return false;
                }
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                else if ( tmp > IVAS_MAX_NUM_OBJECTS )
                {
                    fprintf( stderr, "Error: Too high number of ISM channels specified!\n\n" );
                    usage_enc();
                    return false;
                }
#endif
                else
                {
                    arg->inputFormatConfig.ism.numObjects = (int16_t) tmp;
@@ -1260,7 +1281,11 @@ static bool parseCmdlIVAS_enc(
                }
                else
                {
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                    fprintf( stderr, "Error: not enough metadata arguments specified!\n\n" );
#else
                    fprintf( stderr, "Error: not enough arguments\n\n" );
#endif
                    usage_enc();
                    return false;
                }
@@ -1272,17 +1297,25 @@ static bool parseCmdlIVAS_enc(
            arg->inputFormat = IVAS_ENC_INPUT_SBA;

            /* SBA configuration */
            if ( i < argc - 4 )
            if ( i < argc - 4
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                 && is_number( argv[i] ) && sscanf( argv[i], "%d", &tmp ) > 0
#endif
            )
            {
#ifndef IMPROVE_CMDLINE_ROBUSTNESS
                if ( sscanf( argv[i], "%d", &tmp ) > 0 )
                {
#endif
                    i++;
#ifndef IMPROVE_CMDLINE_ROBUSTNESS
                }
#endif
            }
            else
            {
                tmp = -1; /* this is to avoid a compilation warning */
                fprintf( stderr, "Error: SBA order not specified!\n\n" );
                fprintf( stderr, "Error: SBA order must be specified, expecting a number!\n\n" );
                usage_enc();
                return false;
            }
@@ -1314,6 +1347,15 @@ static bool parseCmdlIVAS_enc(

            if ( i < argc - 4 )
            {
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                if ( !is_digits_only( argv[i] ) )
                {
                    fprintf( stderr, "Error: Number of MASA channels must be an integer number!\n\n" );
                    usage_enc();
                    return false;
                }
#endif

                if ( sscanf( argv[i], "%d", &tmp ) > 0 )
                {
                    i++;
@@ -1328,7 +1370,11 @@ static bool parseCmdlIVAS_enc(
                        arg->inputFormatConfig.masaVariant = IVAS_ENC_MASA_2CH;
                        break;
                    default:
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                        fprintf( stderr, "Error: MASA channels must be 1 or 2.\n\n" );
#else
                        fprintf( stderr, "Error: MASA channels must for the moment be 1 or 2.\n\n" );
#endif
                        usage_enc();
                        return false;
                }
@@ -1353,7 +1399,6 @@ static bool parseCmdlIVAS_enc(

            if ( i < argc - 4 )
            {

                if ( strcmp( to_upper( argv[i] ), "5_1" ) == 0 )
                {
                    arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1;
+2 −0
Original line number Diff line number Diff line
@@ -150,6 +150,8 @@
#define FIX_ITD_CNG                                     /* Eri Contribution 11: Fix for CNG ITD */
#define FIX_VBR_COMPLEXITY                              /* Issue 234: fix extremely high complexity numbers for IVAS EVS mode */
#define FIX_ISM_INACTIVE_BITS                           /* Issue 230: fix bitbudget distribution in inactive frames in ISM format */
#define IMPROVE_CMDLINE_ROBUSTNESS                      /* Issue 233: Improve robustness of command-line parameters */


/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

lib_dec/dec_tcx.c

100755 → 100644
+7 −0
Original line number Diff line number Diff line
@@ -334,6 +334,13 @@ void IMDCT(
    /* number of zero for ALDO windows*/
    nz = NS2SA( st->output_Fs, N_ZERO_MDCT_NS ) * L_frame / L_frameTCX;

#ifdef FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS
    if ( st->element_mode != EVS_MONO && frame_cnt == 0 && !bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) && !hTcxCfg->last_aldo )
    {
        v_multc( old_syn_overl, hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, old_syn_overl, overlap );
    }
#endif

    if ( ( L_frameTCX == hTcxDec->L_frameTCX >> 1 || st->mct_chan_mode == MCT_CHAN_MODE_LFE ) && ( st->tcxonly ) )
    {
        /* Mode decision in PLC
+2 −11
Original line number Diff line number Diff line
@@ -184,17 +184,8 @@ ivas_error ivas_core_dec(
#ifdef FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS
        if ( !st->bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) && st->hTcxDec != NULL )
        {
            float gain;

            gain = st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph;
            v_multc( st->hHQ_core->old_out, gain, st->hHQ_core->old_out, st->hTcxDec->L_frameTCX );
            v_multc( st->hHQ_core->old_outLB, gain, st->hHQ_core->old_outLB, st->L_frame );

            if ( !st->hTcxCfg->last_aldo )
            {
                v_multc( st->hTcxDec->syn_OverlFB, gain, st->hTcxDec->syn_OverlFB, st->hTcxCfg->tcx_mdct_window_lengthFB );
                v_multc( st->hTcxDec->syn_Overl, gain, st->hTcxDec->syn_Overl, st->hTcxCfg->tcx_mdct_window_length );
            }
            v_multc( st->hHQ_core->old_out, st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, st->hHQ_core->old_out, st->hTcxDec->L_frameTCX );
            v_multc( st->hHQ_core->old_outLB, st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, st->hHQ_core->old_outLB, st->L_frame );
        }
#else
        /* PLC: [TCX: Fade-out-recovery] - overlapping part needs to be attenuated for first good frame */
Loading