Commit 0e5b6d6c authored by vaclav's avatar vaclav
Browse files

fix issue 531; under FIX_531_BWS_ISM_BFI

parent d9d21b15
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -1776,6 +1776,8 @@ static ivas_error decodeG192(
                goto cleanup;
            }
        }

        if ( frame > 3200 )
            /* Run decoder for one frame (get rendered output) */
            if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK )
            {
+2 −0
Original line number Diff line number Diff line
@@ -243,6 +243,8 @@
#define BINAURAL_AUDIO_CMDLINE
#define FIX_570_TCX_LPC_WRITE                           /* FhG: fix issue 570: LPC bitstream writer in TCX */
#define FIX_506                                         /* FhG: Compiler warnings */
#define FIX_531_BWS_ISM_BFI                             /* VA: issue 531: fix MemorySanitizer: use-of-uninitialized-value in ISM2 rate switching with frame errors */


/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+1 −0
Original line number Diff line number Diff line
@@ -309,6 +309,7 @@ void calc_tilt_bwe(
    }

    *tilt = (float) ( r1 / sqrt( r0 ) );
    dbgwrite( &sp[0], 4, 1, 960, "res/aa" );

    return;
}
+4 −0
Original line number Diff line number Diff line
@@ -504,7 +504,11 @@ ivas_error ivas_core_dec(
         * SWB(FB) BWE decoding
         *---------------------------------------------------------------------*/

#ifdef FIX_531_BWS_ISM_BFI
        if ( st->extl == SWB_TBE || st->extl == FB_TBE || ( st->coder_type != AUDIO && st->coder_type != INACTIVE && st->core_brate >= SID_2k40 && st->core == ACELP_CORE && !st->con_tcx && output_Fs >= 32000 && st->bwidth > NB && st->bws_cnt > 0 ) )
#else
        if ( st->extl == SWB_TBE || st->extl == FB_TBE || ( st->coder_type != AUDIO && st->coder_type != INACTIVE && st->core_brate >= SID_2k40 && st->core == ACELP_CORE && output_Fs >= 32000 && st->bwidth > NB && st->bws_cnt > 0 ) )
#endif
        {
            /* SWB TBE decoder */
            swb_tbe_dec( st, hStereoICBWE, bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], tmp_buffer /*fb_exc*/, hb_synth[n], pitch_buf[n] );