Commit e38ad83b authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into...

Merge remote-tracking branch 'remotes/origin/main' into 945-wrong-return-value-in-ivas_dec_getnumorientationsubframes
parents d1e5fd1c 8009f2af
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2624,9 +2624,11 @@ ivas_error preview_indices(
            case SID_ISM:
                st_ivas->ivas_format = ISM_FORMAT;
                break;
#ifndef FIX_1209_SID_SIGNALING
            case SID_MULTICHANNEL:
                st_ivas->ivas_format = MC_FORMAT;
                break;
#endif
            case SID_SBA_1TC:
                st_ivas->ivas_format = SBA_FORMAT;
                st_ivas->element_mode_init = IVAS_SCE;
@@ -2651,7 +2653,9 @@ ivas_error preview_indices(
                }
                break;
            default:
#ifndef FIX_1209_SID_SIGNALING
                /* This should actually be impossible, since only 3 bits are read, so if this happens something is broken */
#endif
                return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Invalid value %c found in SID format field.", st_ivas->sid_format );
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -174,11 +174,11 @@

#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_FIX_1212_TONAL_MDCT_CONCEALMENT           /* FhG: Fix issue 1212, zero IGF spec also in 1st concealed frame */
#define NONBE_FIX_1204_MDCT_STEREO_NOISE_EST_SCALING    /* FhG: fixes for decoder-side noise level estimation in MDCT-Stereo to prevent noise bursts in stereo switching */
#define NONBE_1200_ISM_JBM_BRATE_SW_FLUSH               /* VA: issue 1200: fix bug in renderer flush in ISM JBM bitrate switching */
#define NONBE_FIX_1205_TD_STEREO_MOD_CT                 /* VA: fix mismatch of coder_type (mod_ct) btw. TD stereo encoder and decoder */
#define NONBE_1203_MDCT2DFT_SWITCHING                   /* VA: issue 1203: fix severe artifacts during MDCT to DFT stereo switching when MDCT ITD is not used */


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

/* ################## End DEVELOPMENT switches ######################### */
+24 −0
Original line number Diff line number Diff line
@@ -620,24 +620,48 @@ static void run_min_stats(
               computed only once (for ch == 0) and not again in the second run sive the outcome will be the same anyway */
            if ( ( will_estimate_noise_on_channel[0] == will_estimate_noise_on_channel[1] ) || ch == 0 )
            {
#ifdef NONBE_FIX_1204_MDCT_STEREO_NOISE_EST_SCALING
                float power_spec_scale_fac;

                /* calculate power spectrum from MDCT coefficients and estimated MDST coeffs */
                power_spec_scale_fac = 1.f / (float) ( L_FRAME16k * L_FRAME16k );
                power_spec[0] = spec_in[0] * spec_in[0] * power_spec_scale_fac;
                power_spec[L_FRAME16k - 1] = spec_in[L_FRAME16k - 1] * spec_in[L_FRAME16k - 1] * power_spec_scale_fac;
#else
                /* calculate power spectrum from MDCT coefficients and estimated MDST coeffs */
                power_spec[0] = spec_in[0] * spec_in[0];
                power_spec[L_FRAME16k - 1] = spec_in[L_FRAME16k - 1] * spec_in[L_FRAME16k - 1];
#endif
                for ( int16_t i = 1; i < L_FRAME16k - 1; i++ )
                {
                    float mdst;
                    mdst = spec_in[i + 1] - spec_in[i - 1];
#ifdef NONBE_FIX_1204_MDCT_STEREO_NOISE_EST_SCALING
                    power_spec[i] = power_spec_scale_fac * ( spec_in[i] * spec_in[i] + mdst * mdst );
#else
                    power_spec[i] = spec_in[i] * spec_in[i] + mdst * mdst;
#endif
                }
            }
#ifndef NONBE_FIX_1204_MDCT_STEREO_NOISE_EST_SCALING

            noisy_speech_detection( st->hFdCngDec, st->VAD && st->m_frame_type == ACTIVE_FRAME, power_spec );

            st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = 0.99f * st->hFdCngDec->hFdCngCom->likelihood_noisy_speech + 0.01f * (float) st->hFdCngDec->hFdCngCom->flag_noisy_speech;

            st->lp_noise = st->hFdCngDec->lp_noise;
#endif
        }

#ifdef NONBE_FIX_1204_MDCT_STEREO_NOISE_EST_SCALING
        if ( st->core == TCX_20_CORE )
        {
            noisy_speech_detection( st->hFdCngDec, save_VAD[ch] && st->m_frame_type == ACTIVE_FRAME, x[ch][0] );
            st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = 0.99f * st->hFdCngDec->hFdCngCom->likelihood_noisy_speech + 0.01f * (float) st->hFdCngDec->hFdCngCom->flag_noisy_speech;
            st->lp_noise = st->hFdCngDec->lp_noise;
        }
#endif

        if ( will_estimate_noise_on_channel[0] || will_estimate_noise_on_channel[1] || st->bfi )
        {
            ApplyFdCng( NULL, st->bfi ? NULL : power_spec, NULL, NULL, st, st->bfi, 0 );
+1 −1
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ void ivas_decision_matrix_enc(
#ifdef NONBE_FIX_1205_TD_STEREO_MOD_CT
        /* In TD stereo below 24.4 kbps we cannot overwrite the `coder_type` when it is set to TRANSITION, */
        /* as it is used for TD stereo bit allocation. To ensure consistent bit allocation, it must remain unchanged on the decoder side. */
        if ( st->idchan == 0 && !( element_brate <= IVAS_16k4 && st->coder_type == TRANSITION && st->element_mode == IVAS_CPE_TD ) )
        if ( st->idchan == 0 && !( element_brate < IVAS_24k4 && st->coder_type == TRANSITION && st->element_mode == IVAS_CPE_TD ) )
        {
            st->coder_type = AUDIO;
        }
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ IVAS_CATEGORIES = {
EVS_CATEGORIES = {
    "Normal operation": r".*",
    "DTX": r"DTX",
    "PLC": r"b10|f06",
    "PLC": r"b10|f06|EPF",
    "Bitrate switching": r"sw",
    "JBM": r"JBM",
}
Loading