Commit 2e8d572f authored by vaclav's avatar vaclav
Browse files

alternative fix NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ_ALT

parent abee896c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -182,8 +182,8 @@
#define NONBE_FIX_ISM_DTX_INFINITE_CNG_ON_TRAILING_SILENCE    /* FhG: fix for cng in ISM DTX on sudden silence periods - JBM addon (issue 552) */
#define NONBE_FIX_738_SBA_BR_SW_ASAN                       /* FhG: issue 738: fixes bug when switching to an MCT bitrate and previous frame was ACELP */
#define NONBE_CR_FIX_735_SBA_HP20_BRATE_SWITCHING       /* VA: Issue 735: Resolve "HP20 filtering bug in SBA/OSBA bitrate switching" */

#define NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ                  /* Nokia: issue 797: fix crash when the separated object is inactive and the MASA metadata is using very few bits */ 
/*#define NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ*/              /* Nokia: issue 797: fix crash when the separated object is inactive and the MASA metadata is using very few bits */
#define NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ_ALT              /* VA: issue 797: alternative fix of crash when the separated object is inactive and the MASA metadata is using very few bits */

/* ##################### End NON-BE switches ########################### */

+4 −0
Original line number Diff line number Diff line
@@ -803,7 +803,11 @@ ivas_error acelp_core_dec(
            {
                decod_tran( st, st->L_frame, tc_subfr, Aq, Es_pred, pitch_buf, voice_factors, exc, exc2, bwe_exc, unbits, sharpFlag, gain_buf );
            }
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ_ALT
            else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && ( st->core_brate + st->extl_brate < MAX_GSC_INACTIVE_BRATE ) ) )
#else
            else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->total_brate <= MAX_GSC_INACTIVE_BRATE ) )
#endif
            {
                /* AUDIO and INACTIVE frames (coded by GSC technology) */
                decod_audio( st, dct_exc_tmp, Aq, &tmp_noise, pitch_buf, voice_factors, exc, exc2, bwe_exc, lsf_new, gain_buf, tdm_lp_reuse_flag, tdm_low_rate_mode, tdm_Pitch_reuse_flag, p_tdm_Pri_pitch_buf );
+4 −0
Original line number Diff line number Diff line
@@ -563,7 +563,11 @@ ivas_error acelp_core_enc(
                encod_gen_voic( st, inp, Aw, Aq, Es_pred, res, syn, exc, exc2, pitch_buf, voice_factors, bwe_exc, unbits, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf );
            }
        }
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ_ALT
        else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && ( st->core_brate + st->extl_brate < MAX_GSC_INACTIVE_BRATE ) ) )
#else
        else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->total_brate <= MAX_GSC_INACTIVE_BRATE ) )
#endif
        {
            /* AUDIO and INACTIVE frames (coded by GSC technology) */
            encod_audio( st, inp, Aw, Aq, res, syn, exc, pitch_buf, voice_factors, bwe_exc, attack_flag, lsf_new, &tmp_noise, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf );