Commit 3268acbf authored by vaillancour's avatar vaillancour
Browse files

complement fix NONBE_FIX_874_OMASA_BRSW_2TD

parent 546ab869
Loading
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ void tdm_bit_alloc(
    else
    {
        *total_brate_sec = min( *total_brate_sec, element_brate_wo_meta - ( 5900 + BWE_brate ) );

#ifndef NONBE_FIX_874_OMASA_BRSW_2TD
        if ( coder_type == INACTIVE )
        {
            *total_brate_sec = max( *total_brate_sec, tdm_bit_allc_tbl[0][0] ); /* sanity check to ensure the secondary channel always gets the minimal bitrate it needs */
@@ -316,8 +316,18 @@ void tdm_bit_alloc(
        {
            *total_brate_sec = max( *total_brate_sec, 3500 ); /* sanity check to ensure the secondary channel always gets the minimal bitrate it needs */
        }
#endif
    }

#ifdef NONBE_FIX_874_OMASA_BRSW_2TD
    if ( coder_type == INACTIVE )
    {
        *total_brate_sec = max( *total_brate_sec, tdm_bit_allc_tbl[0][0] ); /* sanity check to ensure the secondary channel always gets the minimal bitrate it needs */
    }
    else
    {
        *total_brate_sec = max( *total_brate_sec, 3500 ); /* sanity check to ensure the secondary channel always gets the minimal bitrate it needs */
    }
#endif
    /* Secondary channel bitrate adjusment                                                      */
    /* First, adjust the bitrate depending of what is transmitted                               */
    /* Second, choose the number of subframe for ACELP core depending of the targetted bitratre */