Commit 718ad002 authored by multrus's avatar multrus
Browse files

merge from main

parents 0098b227 cd05f6d1
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -385,7 +385,11 @@ void ivas_get_dirac_sba_max_md_bits(
        *bits_frame_nominal = (int16_t) ( sba_total_brate / FRAMES_PER_SEC );
        *metadata_max_bits = MAX16B; /* no limit */
    }
#ifdef FIX_629_UBSAN_MD_MAX_BITS
    *metadata_max_bits = (int16_t) min( (float) MAX16B, ceilf( (float) *metadata_max_bits * nbands / 5 ) );
#else
    *metadata_max_bits = (int16_t) ceilf( (float) *metadata_max_bits * nbands / 5 );
#endif
    *qmetadata_max_bit_req = QMETADATA_MAXBIT_REQ_SBA >> 1;

    return;
+5 −12
Original line number Diff line number Diff line
@@ -159,10 +159,6 @@
#define FIX_571_REVERB_NOT_ACTIVATED_ISM                /* Philips: Issue 571: Reverb not activated for discrete and parametric ISM */
#define FIX_QMETA_SID_5k2                               /* Nokia: Issue 137: enable using full 5.2k bitrate in MASA SID */

#define FIX_578_PARAMMC_ILD_BS                          /* FhG: Issue 578: transmitt also center ILD in band 0 when LFE is active in 3TC ParamMC */
#define FIX_UNCLR_ISSUE                                 /* VoiceAge: issue 574: Fix UNCLR mis-classifications in noisy speech stereo */
#define FIX_TCX_LOWRATE_LIMITATION                      /* VA: issue 577: TCX bitrate limitation only when DEBUGGING is active */
#define FIX_575_LOW_OVERLAP_PLC_RECOVERY                /* FhG: Issue 575 fix for PLC and transistion to TCX5*/

#define FIX_488_SYNC_DELAY                             /* Eri: Issue 488: Waveform and MD desynchronized in external renderer */

@@ -170,14 +166,6 @@
#define FIX_550_FIRST_FRAME_ACCESS_ALT                  /* Eri: Issue 550: Should be merged with FIX_550_FIRST_FRAME_ACCESS above, or accepted at the same time */
#define FIX_569_TD_FILTER_LENGTH                        /* Eri: Issue 569: If an HRTF binary file exceeds the SFX_SPAT_BIN_MAX_FILTER_LENGTH the decoder crashes. This truncates the filter when generated from the model.  */

#define ISM_FB_16k4                                     /* VA: Issue: 579: change BW from SWB to FB in NxISM conditions to match the EVS codec */

#define FIX_580_PARAMMC_ENER_BURSTS                     /* FhG: issue 580: energy bursts due to ILD holding when energy relations change too much */

#define FIX_550_FIRST_FRAME_ACCESS                      /* Eri: Issue 550: TD Object renderer: first frame accesses wrong transport channel offsets */
#define FIX_550_FIRST_FRAME_ACCESS_ALT                  /* Eri: Issue 550: Should be merged with FIX_550_FIRST_FRAME_ACCESS above, or accepted at the same time */
#define FIX_569_TD_FILTER_LENGTH                        /* Eri: Issue 569: If an HRTF binary file exceeds the SFX_SPAT_BIN_MAX_FILTER_LENGTH the decoder crashes. This truncates the filter when generated from the model.  */

#define FIX_595_SHL_NOGLOB                              /* FhG: Issue 595: compilation with BASOP_NOGLOB disabled */
#define UPDATE_FASTCONV_SBA_FILTER                      /* Dlb: Issue 584: Update SBA CLDFB-Domain HRTFs */
#define FIX_570_SF_EXT_ORIENTATION
@@ -207,11 +195,16 @@
#define FIX_622_SILENCE_USAN_WARNING                    /* FhG: silenceusan warning in ifft code */

#define FIX_615_UBSAN_SPAR_TO_DIRAC                     /*Dlb : Fix for UBSAN issue 615*/

#define FIX_624_PLANAR_SBA_WB                           /*Dlb : Fix for unintialised value issue 624 */
#define FIX_629_UBSAN_MD_MAX_BITS                       /*Dlb : Fix for UBSAN issue 629 for MD MAX bits calculation*/

#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 FIX617_UBSAN_DIVBYZERO_STEREOCNG                /* Eri: Issue 617: Decoder UBSAN: division by zero in stereo cng when inut is 16kHz and output is 32kHz */
#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;
Loading