Commit ccb4b561 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'fxd_changes_for_ivas_1102' into 'main'

[3GPP-Issue #1102] Address sanity bug causes crash on linux runners with ivas-float-update and newly added .prm file for encoder tests

See merge request !1108
parents b8499d44 f309031e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -154,4 +154,5 @@
#define FIX_ISSUE_1245                          /* Ittiam: Fix for issue 1245: Basop Encoder: Audible noise for silent Stereo input DTX on @24.4 kbps, @32 kbps*/
#define FIX_MINOR_SVD_WMOPS_MR1010X             /* FhG: Minor WMOPS tuning, bit-exact to previous version, saves about 8.2 WMOPS for MR1010 */
#define SVD_WMOPS_OPT                           /* Ittiam : SVD related optimizations */
#define NONBE_FIX_1087_OOB_SBA_DTX_RS                   /* VA: issue 1087: Extend the length of the buffer for MCT decoding to avoid out-of-bound writing in SBA SID bitrate switching decoding */
#endif
+28 −0
Original line number Diff line number Diff line
@@ -86,6 +86,10 @@ ivas_error ivas_mct_dec_fx(
    set16_fx( x_len[0], 0, NB_DIV );
    set16_fx( x_len[1], 0, NB_DIV );
    Decoder_State **sts;
#ifdef NONBE_FIX_1087_OOB_SBA_DTX_RS
    Word32 *p_output_orig_fx[2];
    Word32 synth_32_fx[CPE_CHANNELS][L_FRAME_PLUS];
#endif
    Word16 synth_fx[CPE_CHANNELS][L_FRAME_PLUS]; //(Q_synth)
    Word32 ivas_total_brate;
    ivas_error error;
@@ -162,6 +166,18 @@ ivas_error ivas_mct_dec_fx(
    /* MCT side bits decoder */
    ivas_mct_side_bits_fx( hMCT, st_ivas->hCPE, nCPE, st_ivas->hCPE[0]->hCoreCoder[0], st_ivas->bfi, st_ivas->hCPE[0]->hCoreCoder[0]->bit_stream, ivas_total_brate, nb_bits_metadata );

#ifdef NONBE_FIX_1087_OOB_SBA_DTX_RS
    /* in case of switching from an SID frame (with ACELP core) to MCT, buffer of L_FRAME_PLUS samples is needed -> use synth[] as a temporary buffer */
    IF( st_ivas->hCPE[0]->hCoreCoder[0]->last_core == ACELP_CORE )
    {
        FOR( n = 0; n < CPE_CHANNELS; n++ )
        {
            p_output_orig_fx[n] = output_fx[n];
            output_fx[n] = synth_32_fx[n];
        }
    }
#endif

    FOR( cpe_id = 0; cpe_id < nCPE; cpe_id++ )
    {
        st_ivas->hCPE[cpe_id]->hCoreCoder[0]->BER_detect = s_or( st_ivas->hCPE[cpe_id]->hCoreCoder[0]->BER_detect, st_ivas->BER_detect );
@@ -371,6 +387,18 @@ ivas_error ivas_mct_dec_fx(
            }
        }

#ifdef NONBE_FIX_1087_OOB_SBA_DTX_RS
        /* set pointers back */
        test();
        IF( cpe_id == 0 && st_ivas->hCPE[0]->hCoreCoder[0]->last_core == ACELP_CORE )
        {
            FOR( n = 0; n < CPE_CHANNELS; n++ )
            {
                output_fx[n] = p_output_orig_fx[n];
            }
        }

#endif

        /*----------------------------------------------------------------*
         * CoreCoder Post-processing and updates