Commit e56a4002 authored by vaclav's avatar vaclav
Browse files

Merge branch...

Merge branch '74-stereo-13-2kbps-command-line-limited-bw-differs-from-bitrate-limited-bw-rev1' into 'main'

FIX_I74_BW_LIMITATION_ALT: extend temporary fix to keep EVS bit-exactness

See merge request !145
parents 5d992e38 9f295383
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -494,7 +494,6 @@ void bw_detect(
        st->input_bwidth = st->max_bwidth;
    }


    if ( st->element_mode == EVS_MONO )
    {
        set_bw( -1, -1, st, st->codec_mode );
+1 −0
Original line number Diff line number Diff line
@@ -233,6 +233,7 @@ void copy_encoder_config(
    st->force = st_ivas->hEncoderConfig->force;
#endif
    st->element_mode = st_ivas->hEncoderConfig->element_mode_init;

    return;
}

+3 −1
Original line number Diff line number Diff line
@@ -1905,12 +1905,14 @@ static void updateBandwidthFromFs(
}
#endif


#ifdef FIX_I74_BW_LIMITATION_ALT
/*---------------------------------------------------------------------*
 * sanitizeBandwidth()
 *
 *
 *---------------------------------------------------------------------*/

static ivas_error sanitizeBandwidth(
    const IVAS_ENC_HANDLE hIvasEnc )
{ 
@@ -1967,7 +1969,6 @@ static ivas_error sanitizeBandwidth(
        {
            max_bwidth_tmp = WB;
        }
#endif

        /* in case of 8kHz input sampling or "-max_band NB", require the total bitrate to be below 24.40 kbps */
        if ( ( max_bwidth_tmp == NB || hEncoderConfig->input_Fs == 8000 ) && hEncoderConfig->ivas_total_brate > ACELP_24k40 )
@@ -1981,6 +1982,7 @@ static ivas_error sanitizeBandwidth(
                return IVAS_ERR_INVALID_BITRATE;
            }
        }
#endif
    }
    else
    {