Commit f19d4f12 authored by multrus's avatar multrus
Browse files

Merge branch 'FIX-279-code-coverage-ivas_get_band_idx_from_differential' into 'main'

Cleaned up unused function and some TODO comments:issue #279

See merge request !867
parents 586af962 4c0ba6cf
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@
#define FIX_615_UBSAN_SPAR_TO_DIRAC                     /*Dlb : Fix for UBSAN issue 615*/
#define FIX_626_VARIABLE_TYPE_MDCT_CONC                 /* FhG: trivial fix to fix USAN error */
#define FIX_616_DIV_ZERO_MCT                            /*FhG : Fix UBSAN division by zero error of issue 616*/

#define FIX_279_CODE_COVERAGE                           /*Dlb : issue 279 , clean up unused function*/
/* ################## End BE DEVELOPMENT switches ######################### */


+1 −1
Original line number Diff line number Diff line
@@ -1455,7 +1455,7 @@ int16_t ivas_qmetadata_dec_sid_decode(
            }
        }
    }
    /* TODO: temporary hack to keep BE */

    if ( ivas_format != SBA_FORMAT )
    {
        metadata_sid_bits = ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
+22 −6
Original line number Diff line number Diff line
@@ -72,15 +72,20 @@ static void ivas_decode_huffman_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_St
static void ivas_fill_band_coeffs_idx( ivas_band_coeffs_ind_t *pBands_idx, const int16_t nB, int16_t *pSymbol_re, ivas_cell_dim_t *pCell_dims, ivas_coeffs_type_t coeff_type, const int16_t planarCP );

#else
#ifndef FIX_279_CODE_COVERAGE
static void ivas_decode_arith_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, const uint16_t qsi, const int16_t nB, const int16_t bands_bw, int16_t *pDo_diff, const int16_t freq_diff, const int16_t strat, const int32_t ivas_total_brate );
#else
static void ivas_decode_arith_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, const uint16_t qsi, const int16_t nB, const int16_t bands_bw, int16_t *pDo_diff, const int16_t strat, const int32_t ivas_total_brate );

#endif
static void ivas_decode_huffman_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, const uint16_t qsi, const int16_t nB, const int16_t bands_bw );

static void ivas_fill_band_coeffs_idx( ivas_band_coeffs_ind_t *pBands_idx, const int16_t nB, int16_t *pSymbol_re, ivas_cell_dim_t *pCell_dims, ivas_coeffs_type_t coeff_type );

#endif
#ifndef FIX_279_CODE_COVERAGE
static void ivas_get_band_idx_from_differential( ivas_spar_md_t *pSpar_md, const int16_t q_levels[2], const int16_t one_sided, const int16_t nB, const ivas_coeffs_type_t coeff_type );

#endif
static void ivas_mat_col_rearrange( float in_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], const int16_t order[IVAS_SPAR_MAX_CH], const int16_t i_ts, float ***mixer_mat, const int16_t bands, const int16_t num_ch );

static void ivas_spar_dec_compute_ramp_down_post_matrix( ivas_spar_md_dec_state_t *hMdDec, const int16_t num_bands, const int16_t bfi, const int16_t num_md_sub_frames );
@@ -1799,7 +1804,11 @@ static void ivas_spar_dec_parse_md_bs(
    int16_t ii, jj, ndec, ndm, b, idx;
    uint16_t qsi;
    ivas_quant_strat_t qs;
#ifndef FIX_279_CODE_COVERAGE
    int16_t strat, freq_diff, no_ec;
#else
    int16_t strat, no_ec;
#endif
    int16_t do_diff[IVAS_MAX_NUM_BANDS];
#ifndef FIX_280_PLANAR_CP
    int16_t planarCP;
@@ -1931,7 +1940,9 @@ static void ivas_spar_dec_parse_md_bs(
#ifdef SPAR_HOA_DBG
    /*fprintf(stdout, "\n\n no_ec = %d, strat = %d\n", no_ec, strat);*/
#endif
#ifndef FIX_279_CODE_COVERAGE
    freq_diff = 0;
#endif
    no_ec = 0;

    if ( strat < 2 )
@@ -1986,7 +1997,10 @@ static void ivas_spar_dec_parse_md_bs(

    if ( no_ec == 0 )
    {
        ivas_decode_arith_bs( hMdDec, st0, qsi, *nB, *bands_bw, do_diff, freq_diff,
        ivas_decode_arith_bs( hMdDec, st0, qsi, *nB, *bands_bw, do_diff,
#ifndef FIX_279_CODE_COVERAGE
                              freq_diff,
#endif
#ifndef FIX_280_PLANAR_CP
                              planarCP,
#endif
@@ -2141,7 +2155,9 @@ static void ivas_decode_arith_bs(
    const int16_t nB,
    const int16_t bands_bw,
    int16_t *pDo_diff,
#ifndef FIX_279_CODE_COVERAGE
    const int16_t freq_diff,
#endif
#ifndef FIX_280_PLANAR_CP
    const int16_t planarCP,
#endif
@@ -2331,7 +2347,7 @@ static void ivas_decode_arith_bs(
                               planarCP
#endif
    );

#ifndef FIX_279_CODE_COVERAGE
    if ( freq_diff == 1 )
    {
#ifdef SPAR_HOA_DBG
@@ -2342,11 +2358,11 @@ static void ivas_decode_arith_bs(
        ivas_get_band_idx_from_differential( &hMdDec->spar_md, hMdDec->spar_md_cfg.quant_strat->P_r.q_levels, 1, nB, DECD_COEFF );
        ivas_get_band_idx_from_differential( &hMdDec->spar_md, hMdDec->spar_md_cfg.quant_strat->P_c.q_levels, 0, nB, DECX_COEFF );
    }

#endif
    return;
}


#ifndef FIX_279_CODE_COVERAGE
/*-----------------------------------------------------------------------------------------*
 * Function ivas_get_band_idx_from_differential()
 *
@@ -2430,7 +2446,7 @@ static void ivas_get_band_idx_from_differential(
    return;
}


#endif
/*-----------------------------------------------------------------------------------------*
 * Function ivas_fill_band_coeffs_idx()
 *
+1 −2
Original line number Diff line number Diff line
@@ -988,7 +988,7 @@ void ivas_qmetadata_enc_sid_encode(
    else
    {
#ifdef FIX_QMETA_SID_5k2
        /* TODO: still use old sid frame size to keep bitexactness */

        metadata_sid_bits = ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
#else
        metadata_sid_bits = ( 4400 /*IVAS_SID_5k2*/ - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
@@ -1231,7 +1231,6 @@ void ivas_qmetadata_enc_sid_encode(
    }
#endif

    /* TODO: temporary to keep BE */
    if ( ivas_format != SBA_FORMAT )
    {
        metadata_sid_bits = ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;