Commit 8eb2eb26 authored by multrus's avatar multrus
Browse files

[cleanup] accept SBA_CLEANING

parent bea7b87c
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1298,11 +1298,7 @@ typedef enum
#define IVAS_LFE_NUM_COEFFS_IN_SUBGRP           2
#define IVAS_LFE_MAX_NUM_DCT_PASS_BINS          8
#define IVAS_LFE_MAX_NUM_DCT_COEFFS             (IVAS_LFE_MAX_NUM_DCT_PASS_BINS * IVAS_LFE_NUM_COEFFS_IN_SUBGRP)
#ifdef SBA_CLEANING
#define IVAS_LFE_FADE_NS                        8000000L    /* 8.0 ms */
#else
#define IVAS_LFE_FADE_LEN_SEC_FLOAT             ((float)0.008)
#endif
#define IVAS_MAX_NUM_QUANT_STRATS               2
#define IVAS_MAX_NUM_DCT_COEF_GROUPS            4
#define IVAS_LFE_SHIFT_BITS                     5
+0 −14
Original line number Diff line number Diff line
@@ -53,9 +53,6 @@
#define IVAS_MDCT_SCALING_GAIN_48k 1.9699011974118126e-06f
#define IVAS_MDCT_SCALING_GAIN_32k 2.9548517961177197e-06f
#define IVAS_MDCT_SCALING_GAIN_16k 5.909703592235439e-06f
#ifndef SBA_CLEANING
#define IVAS_MDCT_SCALING_GAIN_8k 0.000011819f
#endif

#define IVAS_FLT_EPS ( 1e-10F )
#define IVAS_DBL_EPS ( (double) 1e-20 )
@@ -159,13 +156,6 @@ float ivas_get_mdct_scaling_gain(
            result = IVAS_MDCT_SCALING_GAIN_16k;
            break;
        }
#ifndef SBA_CLEANING
        case L_FRAME8k >> 2:
        {
            result = IVAS_MDCT_SCALING_GAIN_8k;
            break;
        }
#endif
        default:
        {
            assert( !"Unsupported frame length!" );
@@ -297,11 +287,7 @@ void lfe_window_init(
    hLFEWindow->dct_len = frame_len >> 1;

    /* 8ms of latency */
#ifdef SBA_CLEANING
    hLFEWindow->fade_len = NS2SA( sampling_rate, IVAS_LFE_FADE_NS );
#else
    hLFEWindow->fade_len = (int16_t) ( sampling_rate * IVAS_LFE_FADE_LEN_SEC_FLOAT );
#endif
    hLFEWindow->zero_pad_len = (int16_t) ( IVAS_ZERO_PAD_LEN_MULT_FAC * ( hLFEWindow->dct_len - hLFEWindow->fade_len ) );
    hLFEWindow->full_len = hLFEWindow->zero_pad_len + hLFEWindow->fade_len + hLFEWindow->dct_len;

+0 −1
Original line number Diff line number Diff line
@@ -146,7 +146,6 @@
/*#define FIX_IVAS_185_MDCT_ST_PLC_FADEOUT*/            /* IVAS-185 fix bug in TCX-PLC fadeout for MDCT-Stereo and improve fadeout by fading to background noise instead of white noise */
/*#define FIX_I1_113*/                                  /* under review : MCT bit distribution optimization for SBA high bitrates*/

#define SBA_CLEANING                                    /* SBA maintenance related to ticket #45 */ 

#define DIRAC_DRCT_GAIN_TUNING                          /* issue 64: tuning of DirAC energy-compensation gains */
#define FIX_34                                          /* Nokia: Fix bug in MASA format EXT output spherical indexing */
+0 −8
Original line number Diff line number Diff line
@@ -379,11 +379,7 @@ ivas_error ivas_create_lfe_dec(
    hLFE->cum_freq_models[1][3] = &ivas_str_lfe_freq_models.entropy_coder_model_coarse_sg4;

    /* delay calculation */
#ifdef SBA_CLEANING
    hLFE->lfe_block_delay_s = ( IVAS_LFE_FADE_NS / 1000000000.f ) + ivas_lfe_lpf_delay[IVAS_FILTER_ORDER_4 - 3];
#else
    hLFE->lfe_block_delay_s = IVAS_LFE_FADE_LEN_SEC_FLOAT + ivas_lfe_lpf_delay[IVAS_FILTER_ORDER_4 - 3];
#endif

    block_offset_s = BLOCK_OFFSET_MS * 0.001f;

@@ -415,11 +411,7 @@ ivas_error ivas_create_lfe_dec(
    }

    hLFE->lfe_block_delay_s = hLFE->lfe_block_delay_s + low_pass_delay_dec_out;
#ifdef SBA_CLEANING
    hLFE->lfe_prior_buf_len = NS2SA( output_Fs, IVAS_LFE_FADE_NS );
#else
    hLFE->lfe_prior_buf_len = (int16_t) ( IVAS_LFE_FADE_LEN_SEC_FLOAT * output_Fs );
#endif

    hLFE->bfi_count = 0;

+0 −20
Original line number Diff line number Diff line
@@ -118,10 +118,8 @@ ivas_error ivas_spar_dec_open(
    }

    /* PCA handle */
#ifdef SBA_CLEANING
    hSpar->hPCA = NULL;
    if ( st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order_internal == 1 )
#endif
    {
        if ( ( hSpar->hPCA = (PCA_DEC_STATE *) count_malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL )
        {
@@ -655,20 +653,10 @@ static void ivas_spar_dec_MD(
         * read PCA bits
         *---------------------------------------------------------------------*/

#ifdef SBA_CLEANING
        if ( hSpar->hPCA != NULL )
#else
        if ( hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order == 1 )
#endif
        {
            ivas_pca_read_bits( st0, hSpar->hPCA );
        }
#ifndef SBA_CLEANING
        else
        {
            hSpar->hPCA->pca_bypass = PCA_MODE_INACTIVE;
        }
#endif

        /*---------------------------------------------------------------------*
         * Read AGC bits
@@ -981,9 +969,7 @@ void ivas_spar_dec_upmixer(
    pState->pca_ingest_channels = num_in_ingest;
#endif

#ifdef SBA_CLEANING
    if ( hSpar->hPCA != NULL )
#endif
    {
        ivas_pca_dec( hSpar->hPCA, output_frame, num_in_ingest, hDecoderConfig->ivas_total_brate, hDecoderConfig->last_ivas_total_brate, st_ivas->bfi, output );
#ifdef DEBUG_SBA_AUDIO_DUMP
@@ -1130,13 +1116,7 @@ void ivas_spar_dec_upmixer(

        if ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_FOA )
        {
#ifdef SBA_CLEANING
            ivas_dirac_dec( st_ivas, output, nchan_internal, cldfb_in_ts_re, cldfb_in_ts_im, i_sf );
#else
            nchan_transport = ivas_sba_get_nchan_metadata( st_ivas->sba_order ); // VE: == nchan_internal that is already set correctly

            ivas_dirac_dec( st_ivas, output, nchan_transport, cldfb_in_ts_re, cldfb_in_ts_im, i_sf );
#endif
        }

        if ( st_ivas->hDirAC != NULL )
Loading