diff --git a/lib_com/options.h b/lib_com/options.h index ba42ad211feac9a9bfc48977882e5bf6be87049f..0f3cd8cbeee7ac8d4341fbb5ebb8a299330d39bf 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -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 ######################### */ diff --git a/lib_dec/ivas_qmetadata_dec.c b/lib_dec/ivas_qmetadata_dec.c index e4c69cd288a01bdc124ae7e289fe2befc6eb75b0..453e27b320d6e7fce444c7dd9068f51a0f959eb6 100644 --- a/lib_dec/ivas_qmetadata_dec.c +++ b/lib_dec/ivas_qmetadata_dec.c @@ -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; diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index c61effd67359f2e1873e7230e1ddda0e154b4b38..ec363399e417f67e34c6dbd4ac969b04317976ed 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -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() * diff --git a/lib_enc/ivas_qmetadata_enc.c b/lib_enc/ivas_qmetadata_enc.c index 7cf68d677dd3939231d2cd2680cc1bde6285eaa7..591b37fdbbc7f64103644654813ee057fb84f04b 100644 --- a/lib_enc/ivas_qmetadata_enc.c +++ b/lib_enc/ivas_qmetadata_enc.c @@ -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;