Commit 56ef5e09 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_1101_CLEANING_JBM_CALL

parent 1fb34b20
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -212,9 +212,6 @@ typedef enum

typedef enum
{
#ifndef FIX_1101_CLEANING_JBM_CALL
    TC_BUFFER_MODE_NONE = 0,
#endif
    TC_BUFFER_MODE_RENDERER,
    TC_BUFFER_MODE_BUFFER
} TC_BUFFER_MODE;
+0 −1
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@

#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define NONBE_1360_LFE_DELAY                            /* Dlb: LFE delay alignment when rendering in CLDFB domain*/
#define FIX_1101_CLEANING_JBM_CALL                      /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */
#define FIX_VOIP_FUNCTIONS                              /* VA: fix data type mismatch in IVAS_DEC_VoIP_SetScale() + add sanity checks to API functions */
#define FIX_1298_MEMORY_OPT_IVAS_CORE_ENC               /* VA: issue 1298: Memory saving in ivas_core_enc() */
#define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */
+0 −10
Original line number Diff line number Diff line
@@ -2960,16 +2960,6 @@ ivas_error ivas_init_decoder_fx(
        }
    }

#ifndef FIX_1101_CLEANING_JBM_CALL
    IF( st_ivas->hTcBuffer == NULL )
    {
        /* we need the handle anyway, but without the buffer*/
        IF( NE_32( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, TC_BUFFER_MODE_NONE, 0, 0, 0, 1 ) ), IVAS_ERR_OK ) )
        {
            return error;
        }
    }
#endif
    test();
    test();
    IF( ( EQ_32( st_ivas->ivas_format, MASA_FORMAT ) || EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) && st_ivas->hDecoderConfig->Opt_tsm )
+0 −49
Original line number Diff line number Diff line
@@ -122,18 +122,6 @@ ivas_error ivas_jbm_dec_tc_fx(
        }
    }

#ifndef FIX_1101_CLEANING_JBM_CALL
    IF( st_ivas->hDecoderConfig->Opt_tsm == 0 )
    {
        FOR( n = 0; n < ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ )
        {
            set_zero_fx( st_ivas->p_output_fx[n], L_FRAME48k );
            st_ivas->hTcBuffer->tc_fx[n] = st_ivas->p_output_fx[n];
        }
        st_ivas->hTcBuffer->no_channels = ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
        move16();
    }
#endif
    /*----------------------------------------------------------------*
     * Decoding + pre-rendering
     *----------------------------------------------------------------*/
@@ -1574,7 +1562,6 @@ void ivas_jbm_dec_feed_tc_to_renderer_fx(
        p_data_f_fx[n] = &data_f_fx[n][0];
    }

#ifdef FIX_1101_CLEANING_JBM_CALL
    IF( st_ivas->hDecoderConfig->Opt_tsm == 0 )
    {
        FOR( n = 0; n < ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ )
@@ -1583,7 +1570,6 @@ void ivas_jbm_dec_feed_tc_to_renderer_fx(
        }
    }

#endif
    IF( st_ivas->hDecoderConfig->Opt_tsm )
    {
        ivas_jbm_dec_copy_tc( st_ivas, nSamplesForRendering, nSamplesResidual, data_fx, p_data_f_fx, 11 );
@@ -3594,18 +3580,6 @@ ivas_error ivas_jbm_dec_tc_buffer_open_fx(
    set16_fx( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS );
    set16_fx( hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, MAX_PARAM_SPATIAL_SUBFRAMES );

#ifndef FIX_1101_CLEANING_JBM_CALL
    IF( EQ_16( hTcBuffer->tc_buffer_mode, TC_BUFFER_MODE_NONE ) )
    {
        hTcBuffer->tc_buffer_fx = NULL;

        FOR( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ )
        {
            hTcBuffer->tc_fx[ch_idx] = NULL;
        }
    }
    ELSE
#endif
    {
        Word16 n_samp_full, n_samp_residual;
        Word32 offset;
@@ -4075,9 +4049,6 @@ void ivas_jbm_dec_copy_tc_no_tsm_fx(
)
{
    Word16 Q_tc;
#ifndef FIX_1101_CLEANING_JBM_CALL
    Word16 n_ch_full_copy;
#endif
    Word16 n_ch_cldfb;
    Word16 ch_idx;
    DECODER_TC_BUFFER_HANDLE hTcBuffer;
@@ -4087,29 +4058,13 @@ void ivas_jbm_dec_copy_tc_no_tsm_fx(
    hTcBuffer->n_samples_available = hTcBuffer->n_samples_buffered;
    move16();
    move16();
#ifndef FIX_1101_CLEANING_JBM_CALL
    n_ch_full_copy = s_min( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full );
#endif
    n_ch_cldfb = sub( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full );

    Q_tc = 11; /*tc buffer is at Q11*/
    move16();

#ifdef FIX_1101_CLEANING_JBM_CALL
#ifdef DEBUGGING
    assert( st_ivas->hDecoderConfig->Opt_tsm == 0 );
#endif
#else
    /* copy full tcs*/
    IF( st_ivas->hDecoderConfig->Opt_tsm )
    {
        FOR( ch_idx = 0; ch_idx < n_ch_full_copy; ch_idx++ )
        {
            Copy32( tc_fx[ch_idx], st_ivas->hTcBuffer->tc_fx[ch_idx], hTcBuffer->n_samples_buffered ); // keeping tc_fx in Q11
        }
    }
    ch_idx = 0;
    move16();
#endif
    /* CLDFB ana for ParamMC/ParamISM */
    IF( n_ch_cldfb > 0 )
@@ -4143,11 +4098,7 @@ void ivas_jbm_dec_copy_tc_no_tsm_fx(
        }

        /* CLDFB Analysis*/
#ifdef FIX_1101_CLEANING_JBM_CALL
        FOR( ( ch_idx = 0, cldfb_ch = 0 ); cldfb_ch < n_ch_cldfb; ( cldfb_ch++, ch_idx++ ) )
#else
        FOR( cldfb_ch = 0; cldfb_ch < n_ch_cldfb; ( cldfb_ch++, ch_idx++ ) )
#endif
        {
            FOR( slot_idx = 0; slot_idx < DEFAULT_JBM_CLDFB_TIMESLOTS; slot_idx++ )
            {