Loading lib_com/ivas_stereo_td_bit_alloc.c +13 −11 Original line number Diff line number Diff line Loading @@ -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 */ Loading Loading @@ -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 ); } Loading Loading
lib_com/ivas_stereo_td_bit_alloc.c +13 −11 Original line number Diff line number Diff line Loading @@ -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 */ Loading Loading @@ -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 ); } Loading