Commit c8552cca authored by advasila's avatar advasila
Browse files

fix 874

parent d2b2dba7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1927,6 +1927,10 @@ int16_t select_stereo_mode(
    CPE_ENC_HANDLE hCPE,                                        /* i/o: CPE encoder structure                           */
    const IVAS_FORMAT ivas_format,                              /* i  : IVAS format                                     */
    const int32_t ivas_total_brate                              /* i  : IVAS total brate                                */
#if 1
    ,
    const int32_t cpe_brate                                     /* i   : bitrate for CPE in combined format             */
#endif
);

void stereo_classifier_init(
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@
#define NONBE_FIX_861_MASA_CRASH_STEREO_SWITCHING             /* VA: issue 861: fix MASA 2TC crash when switching from MDCT stereo to TD/DFT stereo */
#define BE_FIX_867_PARAMC_RECONFIG                            /* FhG: issue #867: fix ParamMC CLDFB buffer dealloc when reconfiguring */
#define NONBE_FIX_850_MASA_HBR_META_RATIO_DECODING            /* Nokia: issue #850: Fixes rare non-valid diffuseness and energy ratio values in 2dir MASA. */

#define NONBE_FIX_874_OMASA_BRSW_2TD                          /* Nokia: issue 874: Fixes the crashes with the long test vectors that prompted switching to TD*/

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

+6 −0
Original line number Diff line number Diff line
@@ -200,6 +200,12 @@ ivas_error ivas_jbm_dec_tc(
    {
        set_s( nb_bits_metadata, 0, MAX_SCE );

#ifdef NONBE_FIX_874_OMASA_BRSW_2TD
        if ( st_ivas->nCPE > 0 )
        {
            st_ivas->hCPE[0]->brate_surplus = 0;
        }
#endif
        /* read parameters from the bitstream */
        if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->hQMetaData != NULL )
        {
+12 −0
Original line number Diff line number Diff line
@@ -176,7 +176,19 @@ ivas_error ivas_cpe_enc(

    if ( sts[0]->ini_frame > 0 && st_ivas->hMCT == NULL )
    {
#ifdef NONBE_FIX_874_OMASA_BRSW_2TD
        if ( ivas_format == MASA_ISM_FORMAT )
        {
            cpe_brate = calculate_cpe_brate_MASA_ISM( st_ivas->ism_mode, ivas_total_brate, st_ivas->hEncoderConfig->nchan_ism );
        }
        else
        {
            cpe_brate = ivas_total_brate;
        }
        hCPE->element_mode = select_stereo_mode( hCPE, ivas_format, ivas_total_brate, cpe_brate );
#else
        hCPE->element_mode = select_stereo_mode( hCPE, ivas_format, ivas_total_brate );
#endif
    }

    stereo_mode_combined_format_enc( st_ivas, hCPE );
+6 −0
Original line number Diff line number Diff line
@@ -291,6 +291,12 @@ ivas_error ivas_omasa_enc_config(
        else
        {
            hEncoderConfig->element_mode_init = IVAS_CPE_DFT;
#ifdef NONBE_FIX_874_OMASA_BRSW_2TD
            if ( ivas_total_brate - ism_total_brate < MASA_STEREO_MIN_BITRATE  )
            {
                st_ivas->hCPE[0]->element_mode = IVAS_CPE_DFT;
            }
#endif
        }
    }

Loading