Commit 92ac3b06 authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/ivas-float-update' into 1923-ref-PortFlpMr1928

parents 0c5ecd6e cec8a4fd
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -183,7 +183,9 @@ 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;
+4 −0
Original line number Diff line number Diff line
@@ -3085,7 +3085,11 @@ void mctStereoIGF_enc(
    MCT_ENC_HANDLE hMCT,                                        /* i/o: MCT encoder structure                   */
    Encoder_State **sts,                                        /* i/o: encoder state structure                 */
    float *orig_spectrum[MCT_MAX_CHANNELS][NB_DIV],             /* i  : MDCT spectrum for ITF                   */
#ifdef NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC
    float *powerSpec[MCT_MAX_CHANNELS],                         /* i/o: MDCT^2 + MDST^2 spectrum,or estimate    */
#else
    float powerSpec[MCT_MAX_CHANNELS][L_FRAME48k],              /* i/o: MDCT^2 + MDST^2 spectrum,or estimate    */
#endif
    float *powerSpecMsInv[MCT_MAX_CHANNELS][NB_DIV],            /* i  : same as above but for inverse spect.    */
    float *inv_spectrum[MCT_MAX_CHANNELS][NB_DIV],              /* i  : inverse spectrum                        */
    const int16_t sp_aud_decision0[MCT_MAX_CHANNELS]            /* i  : speech audio decision                   */
+2 −0
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@
#define FIX_1138_SBA_EXT_ERROR_PRINTOUT                 /* VA: issue 1138: Fix SBA EXT output call of audioCfg2channels() */
#define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART             /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */
#define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR            /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */
#define NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC      /* FhG: fix out-of-bound errors when switching from SID frame to active frame*/
#define NONBE_FIX_1052_SBA_EXT_FIX                      /* VA: SBA external output support fix - do not overwrite "output_config" parameter */
#define FIX_1113_CLDFB_REND_IN_ISAR                     /* issue 1113: fix the use of CLDFB renderer in split-rendering at the external renderer */
#define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING       /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */
@@ -197,6 +198,7 @@
#define FIX_1158_FASTCONV_REVERB_HRTF                   /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */
#define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR       /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */
#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 FIX_1101_CLEANING_JBM_CALL                      /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */
#define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX          /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */

/* #################### End BASOP porting switches ############################ */
+2 −1
Original line number Diff line number Diff line
@@ -2221,7 +2221,6 @@ ivas_error ivas_init_decoder(
     *-----------------------------------------------------------------*/

    if ( st_ivas->hTcBuffer == NULL )

    {
        /* no module has yet open the TC buffer, open a default one */
        n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas );
@@ -2232,6 +2231,7 @@ 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*/
@@ -2241,6 +2241,7 @@ ivas_error ivas_init_decoder(
        }
    }

#endif
#ifdef FIX_1099_JBM_MD_HANDLE_ALLOC
    if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->Opt_tsm )
#else
+27 −3
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ 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++ )
@@ -110,7 +111,7 @@ ivas_error ivas_jbm_dec_tc(
            st_ivas->hTcBuffer->tc[n] = st_ivas->p_output_f[n];
        }
    }

#endif
    /*----------------------------------------------------------------*
     * Decoding + pre-rendering
     *----------------------------------------------------------------*/
@@ -814,7 +815,16 @@ 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++ )
        {
            st_ivas->hTcBuffer->tc[n] = st_ivas->p_output_f[n]; /* note: buffers needed in the TD decorellator */
        }
    }

#endif
    if ( st_ivas->hDecoderConfig->Opt_tsm )
    {
        ivas_jbm_dec_copy_tc( st_ivas, nSamplesForRendering, nSamplesResidual, data, p_data_f );
@@ -2320,6 +2330,7 @@ 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;
@@ -2330,6 +2341,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open(
        }
    }
    else
#endif
    {
        int16_t n_samp_full, n_samp_residual;
        int32_t offset;
@@ -2758,7 +2770,9 @@ 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;
@@ -2766,9 +2780,16 @@ 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 )
    {
@@ -2778,7 +2799,7 @@ void ivas_jbm_dec_copy_tc_no_tsm(
        }
    }
    ch_idx = 0;

#endif
    /* CLDFB ana for ParamMC/ParamISM */
    if ( n_ch_cldfb > 0 )
    {
@@ -2810,8 +2831,11 @@ 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