Commit abbe5fa9 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Revert few issue changes in +10dB and -10dB scaled inputs.

parent 54e13e5c
Loading
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@
 *
 * Bitbudget distribution between Primary and Secondary channel in TD stereo
 *-------------------------------------------------------------------*/
#ifndef IVAS_FLOAT_FIXED
#ifndef IVAS_FLOAT_FIXED_
void tdm_bit_alloc(
    const int16_t ivas_format,           /* i  : IVAS format                         */
    const int16_t ism_mode,              /* i  : ISM mode in combined format         */
@@ -508,20 +508,22 @@ void tdm_bit_alloc(
            /* further adjustment in function of the energy/correlation ratio */
            IF( coder_type == INACTIVE )
            {
                Word32 res_fix = 0;
                res_fix = Mpy_32_32( 6442450, ( element_brate_wo_meta - 500 ) );
                res_fix = res_fix * 100;
                //*total_brate_sec = max( *total_brate_sec, (Word16) ( 0.3f * ( element_brate_wo_meta - 500 ) / 100 ) * 100 );
                *total_brate_sec = max( *total_brate_sec, (Word16) res_fix );
                //Word32 res_fix = 0;
                //res_fix = Mpy_32_32( 6442450, ( element_brate_wo_meta - 500 ) );
                //res_fix = res_fix * 100;
                //*total_brate_sec = max( *total_brate_sec, (Word16) res_fix );

                *total_brate_sec = max(*total_brate_sec, (int16_t)(0.3f * (element_brate_wo_meta - 500) / 100) * 100);
                tmp_bits = (Word16) ( -abs( tdm_inst_ratio_idx - 16 ) * 200 * idx );
            }
            ELSE
            {
                Word32 res_fix = 0;
                res_fix = Mpy_32_32( 10737418, ( element_brate_wo_meta - 500 ) );
                res_fix = res_fix * 100;
                //*total_brate_sec = max( *total_brate_sec, (Word16) ( 0.5f * ( element_brate_wo_meta - 500 ) / 100 ) * 100 );
                *total_brate_sec = max( *total_brate_sec, res_fix );
                //Word32 res_fix = 0;
                //res_fix = Mpy_32_32( 10737418, ( element_brate_wo_meta - 500 ) );
                //res_fix = res_fix * 100;
                //*total_brate_sec = max( *total_brate_sec, res_fix );

                *total_brate_sec = max(*total_brate_sec, (int16_t)(0.5f * (element_brate_wo_meta - 500) / 100) * 100);
                /* tmp_bits = -abs(tdm_inst_ratio_idx-16)*200*idx; */
                tmp_bits = (Word16) ( -abs( tdm_inst_ratio_idx - 16 ) * 100 * idx );
            }