Commit 78280da0 authored by vaclav's avatar vaclav
Browse files

Merge branch '565-noise-bursts-in-sba-at-32-kbps-with-fer' into 'main'

[non-BE] Resolve "Noise Bursts in SBA at 32 kbps with FER"

See merge request !769
parents 3b566a13 a71d1f91
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@
#define FIX_558_PLC_DISCONT                             /* FhG: issue 558: fix discontinuities in DFT Stereo when switching from TCX concealment to ACELP */
#define FIX_564                                         /* Nokia: Issue 564: Fix gains in JBM path for SBA with parametric binaural renderer */
#define FIX_566_2DIR_MASA_384K                          /* Nokia: Issued 566:  Bugfix in 384k MASA metadata encoding of second direction */
#define FIX_565_SBA_BURST_IN_FEC                        /* VA: Issue 565: Fix noise burst during FEC, due to wrong total_brate initialization */

#define FIX_562_ISM2_64KBPS                             /* VA: issue 562: fix ISM2 at 64kbps issue */

+8 −2
Original line number Diff line number Diff line
@@ -331,8 +331,11 @@ void FEC_exc_estim(
    /*-----------------------------------------------------------------*
     * Replicate the last spectrum in case the last good frame was coded by GSC
     *-----------------------------------------------------------------*/

#ifndef FIX_565_SBA_BURST_IN_FEC
    if ( ( st->last_coder_type == AUDIO || st->last_good == INACTIVE_CLAS ) && st->total_brate <= ACELP_24k40 && !st->Opt_AMR_WB )
#else
    if ( ( st->last_coder_type == AUDIO || st->last_good == INACTIVE_CLAS ) && st->total_brate <= MAX_GSC_INACTIVE_BRATE && !st->Opt_AMR_WB )
#endif
    {
        /* Replication of the last spectrum, with a slight downscaling of its dynamic */
        st->GSC_noisy_speech = st->Last_GSC_noisy_speech_flag;
@@ -404,8 +407,11 @@ void FEC_exc_estim(
    /*-----------------------------------------------------------------*
     * Total excitation
     *-----------------------------------------------------------------*/

#ifndef FIX_565_SBA_BURST_IN_FEC
    if ( ( st->last_coder_type == AUDIO || st->last_good == INACTIVE_CLAS ) && st->total_brate <= ACELP_24k40 && !st->Opt_AMR_WB )
#else
    if ( ( st->last_coder_type == AUDIO || st->last_good == INACTIVE_CLAS ) && st->total_brate <= MAX_GSC_INACTIVE_BRATE && !st->Opt_AMR_WB )
#endif
    {
        /* For GSC - the excitation is already computed */
        mvr2r( exc, exc2, st->L_frame );
+7 −1
Original line number Diff line number Diff line
@@ -189,11 +189,17 @@ ivas_error ivas_sce_dec(
    {
        st->total_brate = ivas_total_brate;
    }
#ifndef FIX_565_SBA_BURST_IN_FEC
    else if ( st_ivas->ivas_format != ISM_FORMAT ) /* note: in ISMs, total_brate[] is set in ivas_ism_config() */
    {
        st->total_brate = hSCE->element_brate - nb_bits_metadata * FRAMES_PER_SEC;
    }

#else
    else if ( !st_ivas->bfi && st_ivas->ivas_format != ISM_FORMAT ) /* note: in ISMs, total_brate[] is set in ivas_ism_config() */
    {
        st->total_brate = hSCE->element_brate - nb_bits_metadata * FRAMES_PER_SEC;
    }
#endif
    /*----------------------------------------------------------------*
     * Core codec configuration
     *----------------------------------------------------------------*/
+6 −2
Original line number Diff line number Diff line
@@ -340,8 +340,12 @@ ivas_error ivas_spar_dec(
    st0->bit_stream = bstr_meta;
    st0->next_bit_pos = 0;
    st0->bits_frame = min( MAX_BITS_METADATA, last_bit_pos + 1 );
#ifdef FIX_565_SBA_BURST_IN_FEC
    if ( !st0->bfi )
#endif
    {
        st0->total_brate = hDecoderConfig->ivas_total_brate; /* to avoid BER detect */

    }
    ivas_spar_dec_MD( st_ivas, st0 );

    *nb_bits_read = st0->next_bit_pos + nb_bits_read_orig;