Commit 11e4592e authored by Vidhya V P's avatar Vidhya V P
Browse files

Merge branch 'main' into Fix-368-review-bitrate-range-for-dtx

parents e41c3fb1 69755e01
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -321,7 +321,6 @@ codec-smoke-test:
    - *print-common-info
    - bash ci/smoke_test.sh
    ### analyze for failures
    - cat out/logs/stv1MASA2TC48c_MASA_2TC_1DIR_b96_fb_cbr.enc.txt
    - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without PLC failed"; exit 1; fi
    - if cat smoke_test_output_plc.txt | grep -c "failed"; then echo "Smoke test with PLC failed"; exit 1; fi
    - if cat smoke_test_output_jbm_noEXT.txt | grep -c "failed"; then echo "Smoke test JBM part failed"; exit 1; fi
+4 −0
Original line number Diff line number Diff line
@@ -1801,7 +1801,11 @@ ivas_error preview_indices(
                if ( bit_stream[2] == 0 )
                {
                    st_ivas->ivas_format = SBA_FORMAT;
#ifndef LBR_SBA
                    st_ivas->sba_mode = ivas_sba_mode_select( total_brate );
#else
                    st_ivas->sba_mode = ivas_sba_mode_select();
#endif
                }
                else
                {
+7 −0
Original line number Diff line number Diff line
@@ -986,6 +986,9 @@ typedef enum
/* Common SPAR metadata constants */
#define IVAS_ACTIVEW_DM_F_SCALE                 0.5f
#define IVAS_ACTIVEW_DM_F_SCALE_DTX             0.25f
#ifdef LBR_SBA
#define IVAS_ACTIVEW_DM_F_SCALE_VLBR            0.25f
#endif
#define IVAS_SPAR_FOA_DFLT_FREQ_PER_CHAN        24000

#define MAX_QUANT_STRATS                        3
@@ -1018,7 +1021,11 @@ typedef enum
    DECX_COEFF
} ivas_coeffs_type_t;

#ifdef LBR_SBA
#define IVAS_SPAR_BR_TABLE_LEN                  20
#else
#define IVAS_SPAR_BR_TABLE_LEN                  18
#endif

/* TD decorr */ // VE: not all 16CH are currently supported -> t be revisited later
enum
+54 −3
Original line number Diff line number Diff line
@@ -52,10 +52,54 @@ static void ivas_set_up_cov_smoothing(
    const float max_update_rate,
    const int16_t min_pool_size,
    const int16_t nchan_inp /* i  : number of input channels       */
#ifdef LBR_SBA_EXTRA_COV_SMOOTH
    ,
    const int32_t ivas_total_brate
#endif
)
{
    int16_t j, k;
#ifdef LBR_SBA_DM_COV_FIX
    if ( ivas_total_brate < IVAS_24k4 )
    {
        for ( j = 0; j < pFb->filterbank_num_bands; j++ )
        {
            float update_factor;
            float *p_bin_to_band;
            update_factor = 0.0f;
            p_bin_to_band = pFb->fb_bin_to_band.pp_short_stride_bin_to_band[j];
            int16_t active_bins;
            active_bins = pFb->fb_bin_to_band.p_short_stride_num_bins_per_band[j];

            for ( k = 0; k < active_bins; k++ )
            {
                update_factor += p_bin_to_band[k];
            }

            hCovState->pSmoothing_factor[j] = update_factor / min_pool_size;
#ifdef LBR_SBA_EXTRA_COV_SMOOTH
            float smooth_fact;
            if ( ivas_total_brate < IVAS_24k4 )
            {
                smooth_fact = 0.5f;
            }
            else
            {
                smooth_fact = 0.75;
            }
            hCovState->pSmoothing_factor[j] *= ( j + 1 ) * smooth_fact;
#else
            hCovState->pSmoothing_factor[j] *= ( j + 1 ) * 0.75f;
#endif

            if ( hCovState->pSmoothing_factor[j] > max_update_rate )
            {
                hCovState->pSmoothing_factor[j] = max_update_rate;
            }
        }
    }
    else
#endif
        if ( nchan_inp <= FOA_CHANNELS )
    {
        for ( j = 0; j < pFb->filterbank_num_bands; j++ )
@@ -115,6 +159,10 @@ ivas_error ivas_spar_covar_smooth_enc_open(
    const ivas_cov_smooth_cfg_t *cov_smooth_cfg, /* i  : SPAR config. handle            */
    ivas_filterbank_t *pFb,                      /* i/o: FB handle                      */
    const int16_t nchan_inp                      /* i  : number of input channels       */
#ifdef LBR_SBA_EXTRA_COV_SMOOTH
    ,
    const int32_t ivas_total_brate /* i  : IVAS total bitrate             */
#endif
)
{
    ivas_cov_smooth_state_t *hCovState;
@@ -142,8 +190,11 @@ ivas_error ivas_spar_covar_smooth_enc_open(
        }
    }

    ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size,
                               nchan_inp );
#ifdef LBR_SBA_EXTRA_COV_SMOOTH
    ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size, nchan_inp, ivas_total_brate );
#else
    ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size, nchan_inp );
#endif

    *hCovState_out = hCovState;

+8 −0
Original line number Diff line number Diff line
@@ -259,10 +259,18 @@ void ivas_dirac_config_bands(
                {
                    band_grouping[reduced_band] = max_band;
                }
#ifdef LBR_SBA
                for ( band = enc_param_start_band + ( DIRAC_MAX_NBANDS - enc_param_start_band ) / 2 - 1, reduced_band = DIRAC_MAX_NBANDS - 1; band >= enc_param_start_band; band--, reduced_band -= step )
                {
                    dirac_to_spar_md_bands[reduced_band] = dirac_to_spar_md_bands[band];
                    dirac_to_spar_md_bands[reduced_band - 1] = dirac_to_spar_md_bands[band];
                }
#else
                for ( band = enc_param_start_band + 1; band < DIRAC_MAX_NBANDS; band++ )
                {
                    dirac_to_spar_md_bands[band] = dirac_to_spar_md_bands[band - 1];
                }
#endif
            }
            else
            {
Loading