Commit 888a10a0 authored by multrus's avatar multrus
Browse files

[fix] discard bw detector for MDCT stereo and MCT

parent 830ab066
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -238,6 +238,8 @@

#define BINAURAL_AUDIO_CMDLINE

#define BWD_HIGH_BR                                     /* FhG: BW to max_bwidth at bitrates using an MDCT core only */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

+10 −0
Original line number Diff line number Diff line
@@ -634,6 +634,7 @@ void set_bw_stereo(
{
    Encoder_State **sts = hCPE->hCoreCoder;

#ifndef BWD_HIGH_BR
    if ( hCPE->element_mode == IVAS_CPE_MDCT )
    {
        /* ensure that both CPE channels have the same audio band-width */
@@ -651,6 +652,10 @@ void set_bw_stereo(

    sts[0]->bwidth = max( sts[0]->bwidth, WB );
    sts[1]->bwidth = max( sts[1]->bwidth, WB );
#else
    sts[0]->bwidth = max( sts[0]->max_bwidth, WB );
    sts[1]->bwidth = max( sts[1]->max_bwidth, WB );
#endif

    return;
}
@@ -685,7 +690,12 @@ int16_t set_bw_mct(
                continue;
            }

#ifndef BWD_HIGH_BR
            mct_bwidth = max( mct_bwidth, st->input_bwidth );
#else
            mct_bwidth = max( mct_bwidth, st->max_bwidth );
#endif

        }
    }