Commit bb6ee91a authored by multrus's avatar multrus
Browse files

Merge branch '20240701_cleanup' into 'main'

[cleanup] accept FIX_1101_CLEANING_JBM_CALL,...

See merge request !1664
parents 13604332 a4559d8e
Loading
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -179,9 +179,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 −3
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@
//#define FIX_CREND_FIX_POINT_HRTF_FILE_FORMAT          /* Orange issue 1031 : new fix point hrtf binary file format */
//#define FIX_CREND_SIMPLIFY_CODE                         /* Ora : simplify line code in crend */
#define FLOAT_FIX_POINT_HRTF_FILE_FORMAT                /* allows reading floation or fix point hrtf binary file format */
#define FIX_1101_CLEANING_JBM_CALL                      /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */
#define FIX_1053_AEID_FILE_TEST                         /* Philips: Tests for the -aeid file and fix for memory error */
#define FIX_1121_MASA_DESCRIPTOR                        /* VA: issue 1121: Define 'ivasmasaFormatDescriptor' at one common place */
#define FIX_1113_CLDFB_REND_IN_ISAR                     /* issue 1113: fix the use of CLDFB renderer in split-rendering at the external renderer */
@@ -174,8 +173,6 @@
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING             /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */
#define NONBE_1131_ACELP_OOB                                  /* VA: issue 1131: fix division-by-zero in acelp gain decoding caused by wrong length of buffer update when switching from HQ core to ACELP core */
#define NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER                  /* FhG: issue 1128: set output ambisonics order to input order for EXT output */
#define NONBE_FIX_1052_SBA_EXT_FIX                            /* VA: SBA external output support fix - do not overwrite "output_config" parameter */

+0 −8
Original line number Diff line number Diff line
@@ -231,11 +231,7 @@ ivas_error acelp_core_dec(
        st->hGSCDec->Last_frame_ener = (float) MAX_32;
    }

#ifdef NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING
    if ( st->hFdCngDec != NULL && ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) && ( st->last_core_brate == SID_2k40 || st->last_core_brate == FRAME_NO_DATA ) )
#else
    if ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) && ( st->last_core_brate == SID_2k40 || st->last_core_brate == FRAME_NO_DATA ) )
#endif
    {
        set_zero( st->hFdCngDec->hFdCngCom->olapBufferSynth2, FFTLEN );
        set_zero( hStereoCng->olapBufferSynth22, FFTLEN );
@@ -703,11 +699,7 @@ ivas_error acelp_core_dec(
                old_exc_s = st->old_exc + L_EXC_MEM_DEC - st->L_frame;
                tmpF = *old_exc_s;
                st->mem_deemph = old_exc_s[st->L_frame - 1];
#ifdef NONBE_1131_ACELP_OOB
                preemph( old_exc_s, st->preemph_fac, st->L_frame, &tmpF );
#else
                preemph( old_exc_s, st->preemph_fac, L_FRAME16k, &tmpF );
#endif
                mvr2r( old_exc_s + st->L_frame - M, st->mem_syn2, M );
                residu( Aq, M, old_exc_s, old_exc + L_EXC_MEM_DEC - st->L_frame, st->L_frame );
            }
+0 −11
Original line number Diff line number Diff line
@@ -2126,17 +2126,6 @@ ivas_error ivas_init_decoder(
        }
    }

#ifndef FIX_1101_CLEANING_JBM_CALL
    if ( st_ivas->hTcBuffer == NULL )
    {
        /* we need the handle anyway, but without the buffer*/
        if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_NONE, 0, 0, 0, 1 ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }

#endif
    if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->Opt_tsm )
    {
        if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
+0 −46
Original line number Diff line number Diff line
@@ -103,15 +103,6 @@ ivas_error ivas_jbm_dec_tc(
        }
    }

#ifndef FIX_1101_CLEANING_JBM_CALL
    if ( !st_ivas->hDecoderConfig->Opt_tsm )
    {
        for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ )
        {
            st_ivas->hTcBuffer->tc[n] = st_ivas->p_output_f[n];
        }
    }
#endif
    /*----------------------------------------------------------------*
     * Decoding + pre-rendering
     *----------------------------------------------------------------*/
@@ -801,7 +792,6 @@ void ivas_jbm_dec_feed_tc_to_renderer(
        p_data_f[n] = &data_f[n][0];
    }

#ifdef FIX_1101_CLEANING_JBM_CALL
    if ( !st_ivas->hDecoderConfig->Opt_tsm )
    {
        for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ )
@@ -810,7 +800,6 @@ void ivas_jbm_dec_feed_tc_to_renderer(
        }
    }

#endif
    if ( st_ivas->hDecoderConfig->Opt_tsm )
    {
        ivas_jbm_dec_copy_tc( st_ivas, nSamplesForRendering, nSamplesResidual, data, p_data_f );
@@ -2291,18 +2280,6 @@ ivas_error ivas_jbm_dec_tc_buffer_open(
    set_s( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS );
    set_s( hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, MAX_PARAM_SPATIAL_SUBFRAMES );

#ifndef FIX_1101_CLEANING_JBM_CALL
    if ( hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_NONE )
    {
        hTcBuffer->tc_buffer = NULL;

        for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ )
        {
            hTcBuffer->tc[ch_idx] = NULL;
        }
    }
    else
#endif
    {
        int16_t n_samp_full, n_samp_residual;
        int32_t offset;
@@ -2729,9 +2706,6 @@ void ivas_jbm_dec_copy_tc_no_tsm(
    const int16_t output_frame /* i  : output frame size        */
)
{
#ifndef FIX_1101_CLEANING_JBM_CALL
    int16_t n_ch_full_copy;
#endif
    int16_t n_ch_cldfb;
    int16_t ch_idx;
    DECODER_TC_BUFFER_HANDLE hTcBuffer;
@@ -2739,26 +2713,10 @@ void ivas_jbm_dec_copy_tc_no_tsm(
    hTcBuffer = st_ivas->hTcBuffer;
    hTcBuffer->n_samples_buffered = output_frame;
    hTcBuffer->n_samples_available = hTcBuffer->n_samples_buffered;
#ifndef FIX_1101_CLEANING_JBM_CALL
    n_ch_full_copy = min( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full );
#endif
    n_ch_cldfb = hTcBuffer->nchan_transport_jbm - hTcBuffer->nchan_buffer_full;

#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++ )
        {
            mvr2r( tc[ch_idx], st_ivas->hTcBuffer->tc[ch_idx], hTcBuffer->n_samples_buffered );
        }
    }
    ch_idx = 0;

#endif
    /* CLDFB ana for ParamMC/ParamISM */
    if ( n_ch_cldfb > 0 )
@@ -2792,11 +2750,7 @@ void ivas_jbm_dec_copy_tc_no_tsm(
#endif

        /* 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++ )
            {
Loading