Lines Matching refs:ps_ctxt
147 ihevce_enc_loop_ctxt_t *ps_ctxt = (ihevce_enc_loop_ctxt_t *)pv_ctxt;
153 WORD32 i4_frm_id = ps_ctxt->i4_enc_frm_id;
154 WORD32 i4_br_id = ps_ctxt->i4_bitrate_instance_num;
155 WORD32 i4_thrd_id = ps_ctxt->thrd_id;
157 WORD32 i4_is_intra_pic = (ISLICE == ps_ctxt->i1_slice_type);
180 ps_ctxt->u4_total_cu_bits;
182 ps_ctxt->u4_total_cu_bits;
184 ps_ctxt->u4_total_cu_bits_mul_qs;
186 ps_ctxt->u4_total_cu_hdr_bits;
189 ps_ctxt->u4_total_cu_bits = 0;
190 ps_ctxt->u4_total_cu_hdr_bits = 0;
191 ps_ctxt->u4_total_cu_bits_mul_qs = 0;
201 ps_ctxt->i4_num_ctb_for_out_scale)
220 for(i4_temp_thrd_id = 0; i4_temp_thrd_id < ps_ctxt->i4_num_proc_thrds; i4_temp_thrd_id++)
264 i8_frame_l1_ipe_sad = ps_ctxt->i8_frame_l1_ipe_sad;
265 i8_frame_l0_ipe_satd = ps_ctxt->i8_frame_l0_ipe_satd;
266 i8_frame_l1_me_sad = ps_ctxt->i8_frame_l1_me_sad;
267 i8_frame_l1_activity_fact = ps_ctxt->i8_frame_l1_activity_fact;
268 i8_frame_bits_estimated = ps_ctxt->ai4_frame_bits_estimated[i4_frm_id][i4_br_id];
271 if(0 == ps_ctxt->i4_qp_mod)
276 ASSERT(ps_ctxt->ai4_frame_bits_estimated[i4_frm_id][i4_br_id] != 0);
316 (ps_ctxt->i4_is_model_valid == 0 ||
323 (ps_ctxt->ps_rc_quant_ctxt->pi4_qp_to_qscale
324 [ps_ctxt->i4_frame_qp + ps_ctxt->ps_rc_quant_ctxt->i1_qp_offset]);
325 WORD32 i4_prev_qp = ps_ctxt->i4_frame_mod_qp;
374 ps_ctxt->i4_frame_mod_qp;
411 ihevce_enc_loop_ctxt_t *ps_ctxt = (ihevce_enc_loop_ctxt_t *)pv_ctxt;
420 (ps_ctxt->ps_rc_quant_ctxt
421 ->pi4_qp_to_qscale[ps_ctxt->i4_frame_qp + ps_ctxt->ps_rc_quant_ctxt->i1_qp_offset]);
424 ->ai4_prev_chunk_qp[ps_ctxt->i4_enc_frm_id][ps_ctxt->i4_bitrate_instance_num];
426 (ps_ctxt->ps_rc_quant_ctxt
427 ->pi4_qp_to_qscale[i4_previous_chunk_qp + ps_ctxt->ps_rc_quant_ctxt->i1_qp_offset]);
431 ps_ctxt->ps_rc_quant_ctxt->i2_max_qscale * (1 << QP_LEVEL_MOD_ACT_FACTOR);
435 ps_ctxt->ps_rc_quant_ctxt->i2_min_qscale * (1 << QP_LEVEL_MOD_ACT_FACTOR);
441 ps_ctxt->i4_cu_qp_sub_pic_rc =
443 ->ai4_curr_qp_estimated[ps_ctxt->i4_enc_frm_id][ps_ctxt->i4_bitrate_instance_num];
445 if(ps_ctxt->i4_cu_qp_sub_pic_rc > i4_qp_delata_max_limit)
447 ps_ctxt->i4_cu_qp_sub_pic_rc = i4_qp_delata_max_limit;
449 else if(ps_ctxt->i4_cu_qp_sub_pic_rc < i4_qp_delata_min_limit)
451 ps_ctxt->i4_cu_qp_sub_pic_rc = i4_qp_delata_min_limit;
455 ->ai4_curr_qp_estimated[ps_ctxt->i4_enc_frm_id][ps_ctxt->i4_bitrate_instance_num] =
456 ps_ctxt->i4_cu_qp_sub_pic_rc;
464 ((i4_mod_qp * ps_ctxt->i4_cu_qp_sub_pic_rc) + (1 << (QP_LEVEL_MOD_ACT_FACTOR - 1))) >>
468 if(i4_mod_cur_qp > ps_ctxt->ps_rc_quant_ctxt->i2_max_qscale)
470 i4_mod_cur_qp = ps_ctxt->ps_rc_quant_ctxt->i2_max_qscale;
473 else if(i4_mod_cur_qp < ps_ctxt->ps_rc_quant_ctxt->i2_min_qscale)
475 i4_mod_cur_qp = ps_ctxt->ps_rc_quant_ctxt->i2_min_qscale;
479 i4_mod_cur_qp = ps_ctxt->ps_rc_quant_ctxt->pi4_qscale_to_qp[i4_mod_cur_qp];
481 if(i4_prev_qs > ps_ctxt->ps_rc_quant_ctxt->i2_max_qscale)
483 i4_prev_qs = ps_ctxt->ps_rc_quant_ctxt->i2_max_qscale;
485 else if(i4_prev_qs < ps_ctxt->ps_rc_quant_ctxt->i2_min_qscale)
487 i4_prev_qs = ps_ctxt->ps_rc_quant_ctxt->i2_min_qscale;
490 i4_mod_prev_qp = ps_ctxt->ps_rc_quant_ctxt->pi4_qscale_to_qp[i4_prev_qs];
496 if(i4_mod_cur_qp < (ps_ctxt->i4_frame_qp - 6))
498 i4_mod_cur_qp = (ps_ctxt->i4_frame_qp - 6);
510 if(i4_mod_cur_qp > ps_ctxt->ps_rc_quant_ctxt->i2_max_qp)
511 i4_mod_cur_qp = ps_ctxt->ps_rc_quant_ctxt->i2_max_qp;
512 else if(i4_mod_cur_qp < ps_ctxt->ps_rc_quant_ctxt->i2_min_qp)
513 i4_mod_cur_qp = ps_ctxt->ps_rc_quant_ctxt->i2_min_qp;
516 ps_ctxt->i4_frame_mod_qp = i4_mod_cur_qp;
517 ps_ctxt->i4_is_first_query = 0;
518 if(ps_ctxt->i4_frame_mod_qp != ps_ctxt->i4_frame_qp)
520 ps_ctxt->i4_is_ctb_qp_modified = 1;
524 ps_multi_thrd_ctxt->ai4_curr_qp_acc[ps_ctxt->i4_enc_frm_id][ps_ctxt->i4_bitrate_instance_num] +=
525 ps_ctxt->i4_frame_mod_qp;