Lines Matching refs:ps_ctxt
152 ihevce_ipe_cu_tree_t *ps_cu_node, ihevce_ed_blk_t *ps_ed_blk_l1, ihevce_ipe_ctxt_t *ps_ctxt)
166 ps_ctxt->au1_ctb_mode_map[row][col] = ps_cu_node->best_mode;
335 ihevce_ipe_ctxt_t *ps_ctxt,
345 WORD16 *pi2_trans_tmp = ps_ctxt->pi2_trans_tmp;
346 WORD16 *pi2_trans_out = ps_ctxt->pi2_trans_out;
347 UWORD8 u1_use_satd = ps_ctxt->u1_use_satd;
348 UWORD8 u1_level_1_refine_on = ps_ctxt->u1_level_1_refine_on;
370 &ps_ctxt->s_ipe_optimised_function_list;
507 * \param[in] ps_ctxt : pointer to IPE context struct
520 ihevce_ipe_ctxt_t *ps_ctxt,
544 ps_ctxt->ps_func_selector->ihevc_intra_pred_luma_ref_substitution_fptr;
558 ps_ctxt->pu1_ctb_nbr_map,
559 ps_ctxt->i4_nbr_map_strd,
569 left_intra_mode = ps_ctxt->au1_ctb_mode_map[yA][xA];
570 top_intra_mode = ps_ctxt->au1_ctb_mode_map[yB][xB];
578 &ps_ctxt->au2_mode_bits_cost_8x8pu[i * 2 + j][0],
579 &ps_ctxt->au2_mode_bits_8x8_pu[0],
580 ps_ctxt->i4_ol_sad_lambda,
591 &ps_ctxt->au1_ref_8x8pu[i * 2 + j][0],
595 ps_ctxt,
599 &ps_ctxt->au1_ref_8x8pu[i * 2 + j][0],
600 &ps_ctxt->au2_mode_bits_cost_8x8pu[i * 2 + j][0],
609 ps_ctxt->pu1_ctb_nbr_map,
610 ps_ctxt->i4_nbr_map_strd,
618 ps_ctxt->au1_ctb_mode_map[yA][xA] = ps_cu_node->ps_sub_cu[i * 2 + j]->best_mode;
620 ps_ctxt->au2_mode_bits_8x8_pu[ps_cu_node->ps_sub_cu[i * 2 + j]->best_mode];
634 * \param[in] ps_ctxt : pointer to IPE context struct
652 ihevce_ipe_ctxt_t *ps_ctxt,
694 WORD32 i4_quality_preset = ps_ctxt->i4_quality_preset;
717 if(1 == ps_ctxt->u1_disable_child_cu_decide)
720 ps_cu_node->ps_parent = ps_ctxt->ps_ipe_cu_tree;
723 ps_cu_node->ps_sub_cu[i] = ps_ctxt->ps_ipe_cu_tree + 1 + i;
756 i4_mod_factor_num = ps_ctxt->ai4_mod_factor_derived_by_variance[1]; //16;
758 f_strength = ps_ctxt->f_strength;
923 if((i4_quality_preset == IHEVCE_QUALITY_P6) && (ps_ctxt->i4_slice_type != ISLICE))
951 ihevce_update_cand_list(ps_cu_node->ps_parent, ps_ed_blk_l1, ps_ctxt);
961 if(4 == i4_skip_intra_eval_32x32_l1 && (ps_ctxt->i4_slice_type != ISLICE))
986 ihevce_update_cand_list(ps_cu_node->ps_parent, ps_ed_blk_l1, ps_ctxt);
1067 ps_ctxt->pu1_ctb_nbr_map,
1068 ps_ctxt->i4_nbr_map_strd,
1090 ps_ctxt->u4_num_16x16_skips_at_L0_IPE += 4;
1095 //memcpy(ps_ctxt->ai1_ctb_mode_map_temp, ps_ctxt->ai1_ctb_mode_map, sizeof(ps_ctxt->ai1_ctb_mode_map));
1097 if((ps_ctxt->i4_quality_preset == IHEVCE_QUALITY_P6) &&
1098 (ps_ctxt->i4_slice_type == PSLICE))
1100 ps_ctxt->u1_disable_child_cu_decide = 1;
1105 if(0 == ps_ctxt->u1_disable_child_cu_decide)
1125 ps_ctxt,
1138 ps_ctxt,
1191 ps_ctxt->au1_ctb_mode_map[row][col] =
1271 ps_ctxt->pu1_ctb_nbr_map,
1272 ps_ctxt->i4_nbr_map_strd,
1322 //memcpy(ps_ctxt->ai1_ctb_mode_map_temp, ps_ctxt->ai1_ctb_mode_map, sizeof(ps_ctxt->ai1_ctb_mode_map));
1329 ps_ctxt,
1343 ps_ctxt,
1367 ps_ctxt->u1_disable_child_cu_decide = 0;
1415 child_cost_least + (ps_ctxt->i4_ol_satd_lambda * CHILD_BIAS >>
1424 ihevce_update_cand_list(ps_cu_node->ps_parent, ps_ed_blk_l1, ps_ctxt);
1464 ps_ctxt->i4_qscale,
1466 ps_ctxt->ld_curr_frame_16x16_log_avg[0],
1470 ps_ctxt->ps_rc_quant_ctxt);
1508 ps_cu_node->ps_sub_cu[j], ps_ed_blk_l1, ps_ctxt);
1518 ps_ctxt->i4_qscale,
1520 ps_ctxt->ld_curr_frame_8x8_log_avg[0],
1524 ps_ctxt->ps_rc_quant_ctxt);
1565 ihevce_update_cand_list(ps_cu_node->ps_parent, ps_ed_blk_l1, ps_ctxt);
1575 if(ps_ed_blk_l1->intra_or_inter == 2 && (ps_ctxt->i4_slice_type != ISLICE))
1606 ihevce_update_cand_list(ps_cu_node->ps_parent, ps_ed_blk_l1, ps_ctxt);
1655 ps_ctxt->pu1_ctb_nbr_map,
1656 ps_ctxt->i4_nbr_map_strd,
1667 ps_ctxt->i4_qscale,
1669 ps_ctxt->ld_curr_frame_8x8_log_avg[0],
1673 ps_ctxt->ps_rc_quant_ctxt);
1693 ps_ctxt->u4_num_16x16_skips_at_L0_IPE += 1;
1707 if((ps_ctxt->i4_quality_preset == IHEVCE_QUALITY_P6) &&
1708 (ps_ctxt->i4_slice_type == PSLICE))
1710 ps_ctxt->u1_disable_child_cu_decide = 1;
1713 //memcpy(ps_ctxt->ai1_ctb_mode_map_temp, ps_ctxt->ai1_ctb_mode_map, sizeof(ps_ctxt->ai1_ctb_mode_map));
1715 if(0 == ps_ctxt->u1_disable_child_cu_decide)
1737 ps_ctxt,
1750 ps_ctxt,
1801 ps_ctxt->au1_ctb_mode_map[row][col] =
1844 ps_ctxt->pu1_ctb_nbr_map,
1845 ps_ctxt->i4_nbr_map_strd,
1881 //memcpy(ps_ctxt->ai1_ctb_mode_map_temp, ps_ctxt->ai1_ctb_mode_map, sizeof(ps_ctxt->ai1_ctb_mode_map));
1887 ps_ctxt,
1901 ps_ctxt,
1924 ps_ctxt->u1_disable_child_cu_decide = 0;
1981 child_cost_least + (ps_ctxt->i4_ol_satd_lambda * CHILD_BIAS >>
1989 ihevce_update_cand_list(ps_cu_node->ps_parent, ps_ed_blk_l1, ps_ctxt);
1999 ps_ctxt->i4_qscale,
2001 ps_ctxt->ld_curr_frame_8x8_log_avg[0],
2005 ps_ctxt->ps_rc_quant_ctxt);
2036 ps_ctxt->i4_qscale,
2038 ps_ctxt->ld_curr_frame_8x8_log_avg[1],
2042 ps_ctxt->ps_rc_quant_ctxt);
2050 ps_cu_node->ps_sub_cu[j], ps_ed_blk_l1, ps_ctxt);
2110 ihevce_update_cand_list(ps_cu_node->ps_parent, ps_ed_blk_l1, ps_ctxt);
2119 if(ps_ed_blk_l1->intra_or_inter == 2 && (ps_ctxt->i4_slice_type != ISLICE))
2184 ps_cu_node->ps_parent, ps_ed_blk_l1, ps_ctxt);
2210 ps_ctxt->i4_qscale,
2212 ps_ctxt->ld_curr_frame_8x8_log_avg[1],
2216 ps_ctxt->ps_rc_quant_ctxt);
2220 ps_ctxt->pu1_ctb_nbr_map,
2221 ps_ctxt->i4_nbr_map_strd,
2243 ps_ctxt->i4_qscale,
2245 ps_ctxt->ld_curr_frame_8x8_log_avg[1],
2249 ps_ctxt->ps_rc_quant_ctxt);
2290 //memcpy(ps_ctxt->ai1_ctb_mode_map_temp, ps_ctxt->ai1_ctb_mode_map, sizeof(ps_ctxt->ai1_ctb_mode_map));
2294 ps_curr_src, ps_ctxt, ps_cu_node, ps_ctxt->ps_func_selector);
2302 if(0 == ps_ctxt->u1_disable_child_cu_decide)
2305 ps_ctxt->pu1_ctb_nbr_map,
2306 ps_ctxt->i4_nbr_map_strd,
2312 //memcpy(ps_ctxt->ai1_ctb_mode_map_temp, ps_ctxt->ai1_ctb_mode_map, sizeof(ps_ctxt->ai1_ctb_mode_map));
2318 ps_ctxt,
2332 ps_ctxt,
2403 (ps_ctxt->i4_ol_satd_lambda * CHILD_BIAS >> LAMBDA_Q_SHIFT))
2407 ps_cu_node->ps_parent, ps_ed_blk_l1, ps_ctxt);
2507 ps_ctxt->au1_ctb_mode_map[y][x] =
2509 ps_ctxt->au1_ctb_mode_map[y][x + 1] =
2511 ps_ctxt->au1_ctb_mode_map[y + 1][x] =
2513 ps_ctxt->au1_ctb_mode_map[y + 1][x + 1] =
2620 ps_ctxt->pu1_ctb_nbr_map,
2621 ps_ctxt->i4_nbr_map_strd,
2630 ps_ctxt,
2752 ps_ctxt->au1_ctb_mode_map[row][col] = best_mode;
2757 ps_ctxt->pu1_ctb_nbr_map,
2758 ps_ctxt->i4_nbr_map_strd,
2769 ps_ctxt->i4_qscale,
2771 ps_ctxt->ld_curr_frame_32x32_log_avg[0],
2775 ps_ctxt->ps_rc_quant_ctxt);
2797 i4_mod_factor_num = ps_ctxt->ai4_mod_factor_derived_by_variance[i4_j];
2798 f_strength = ps_ctxt->f_strength;
2815 ps_ctxt->i4_qscale,
2817 ps_ctxt->ld_curr_frame_32x32_log_avg[0],
2821 ps_ctxt->ps_rc_quant_ctxt);
2824 ps_ctxt->i4_qscale,
2826 ps_ctxt->ld_curr_frame_32x32_log_avg[1],
2830 ps_ctxt->ps_rc_quant_ctxt);
2832 ps_ctxt->i4_qscale,
2834 ps_ctxt->ld_curr_frame_32x32_log_avg[2],
2838 ps_ctxt->ps_rc_quant_ctxt);
2841 ps_ctxt->i4_qscale,
2843 2.0 + ps_ctxt->ld_curr_frame_16x16_log_avg[0],
2847 ps_ctxt->ps_rc_quant_ctxt);
2878 ps_ctxt->i4_qscale,
2880 ps_ctxt->ld_curr_frame_16x16_log_avg[0],
2884 ps_ctxt->ps_rc_quant_ctxt);
2886 ps_ctxt->i4_qscale,
2888 ps_ctxt->ld_curr_frame_16x16_log_avg[1],
2892 ps_ctxt->ps_rc_quant_ctxt);
2894 ps_ctxt->i4_qscale,
2896 ps_ctxt->ld_curr_frame_16x16_log_avg[2],
2900 ps_ctxt->ps_rc_quant_ctxt);
2928 ps_ctxt->i4_qscale,
2930 ps_ctxt->ld_curr_frame_8x8_log_avg[0],
2934 ps_ctxt->ps_rc_quant_ctxt);
2936 ps_ctxt->i4_qscale,
2938 ps_ctxt->ld_curr_frame_8x8_log_avg[1],
2942 ps_ctxt->ps_rc_quant_ctxt);
2955 ps_ctxt->i8_frame_acc_satd_cost += i8_frame_acc_satd_cost;
2956 ps_ctxt->i8_frame_acc_satd_by_modqp_q10 += i8_frame_acc_satd_by_modqp_q10;
2958 ps_ctxt->i8_frame_acc_mode_bits_cost += i8_frame_acc_mode_bits_cost;
2964 ps_ctxt->i8_frame_acc_satd += i4_ctb_acc_satd;
2985 ps_ctxt->i8_frame_acc_act_factor += ps_l0_ipe_out_ctb->ai4_8x8_act_factor[ctr_8x8];
3023 * \param[in] ps_ctxt : pointer to IPE context struct
3044 ihevce_ipe_ctxt_t *ps_ctxt,
3074 UWORD8 *pu1_ref_orig = &ps_ctxt->au1_ref_samples[0];
3075 UWORD8 *pu1_ref_filt = &ps_ctxt->au1_filt_ref_samples[0];
3086 ps_ctxt->ps_func_selector->ihevc_intra_pred_luma_ref_substitution_fptr;
3088 apf_resd_trns_had[0] = ps_ctxt->s_cmn_opt_func.pf_HAD_4x4_8bit;
3089 apf_resd_trns_had[1] = ps_ctxt->s_cmn_opt_func.pf_HAD_8x8_8bit;
3090 apf_resd_trns_had[2] = ps_ctxt->s_cmn_opt_func.pf_HAD_16x16_8bit;
3091 apf_resd_trns_had[3] = ps_ctxt->s_cmn_opt_func.pf_HAD_32x32_8bit;
3094 memset(&ps_ctxt->au1_modes_to_eval, 0, MAX_NUM_IP_MODES);
3109 ps_ctxt->pu1_ctb_nbr_map,
3110 ps_ctxt->i4_nbr_map_strd,
3121 left_intra_mode = ps_ctxt->au1_ctb_mode_map[yA][xA];
3122 top_intra_mode = ps_ctxt->au1_ctb_mode_map[yB][xB];
3131 &ps_ctxt->au2_mode_bits_satd_cost[0],
3132 &ps_ctxt->au2_mode_bits_satd[0],
3133 ps_ctxt->i4_ol_satd_lambda,
3143 ps_ctxt->pu1_ctb_nbr_map,
3144 ps_ctxt->i4_nbr_map_strd,
3166 ps_ctxt->pu1_ctb_nbr_map,
3167 ps_ctxt->i4_nbr_map_strd,
3194 if(ps_ctxt->i4_quality_preset <= IHEVCE_QUALITY_P3)
3197 ps_ctxt->au1_modes_to_eval_temp[i++] = best_amode - 2;
3200 ps_ctxt->au1_modes_to_eval_temp[i++] = best_amode;
3202 if(ps_ctxt->i4_quality_preset <= IHEVCE_QUALITY_P3)
3205 ps_ctxt->au1_modes_to_eval_temp[i++] = best_amode + 2;
3210 ps_ctxt->au1_modes_to_eval_temp[i++] = ps_child_cu_node->ps_sub_cu[0]->best_mode;
3211 ps_ctxt->au1_modes_to_eval_temp[i++] = ps_child_cu_node->ps_sub_cu[1]->best_mode;
3212 ps_ctxt->au1_modes_to_eval_temp[i++] = ps_child_cu_node->ps_sub_cu[2]->best_mode;
3213 ps_ctxt->au1_modes_to_eval_temp[i++] = ps_child_cu_node->ps_sub_cu[3]->best_mode;
3218 ps_ctxt->au1_modes_to_eval_temp[i++] = cand_mode_satd_list[0];
3219 ps_ctxt->au1_modes_to_eval_temp[i++] = cand_mode_satd_list[1];
3229 ps_ctxt->au1_modes_to_eval_temp[j] == ps_ctxt->au1_modes_to_eval[k])
3232 if((k == count) && (ps_ctxt->au1_modes_to_eval_temp[j] > 1))
3234 ps_ctxt->au1_modes_to_eval[count] = ps_ctxt->au1_modes_to_eval_temp[j];
3241 ps_ctxt->au1_modes_to_eval[0] = 26;
3247 pu1_ref_orig = &ps_ctxt->au1_ref_samples[0];
3248 pu1_ref_filt = &ps_ctxt->au1_filt_ref_samples[0];
3250 mode = ps_ctxt->au1_modes_to_eval[i];
3252 cost_amode_step2[i] = ps_ctxt->au2_mode_bits_satd_cost[mode];
3267 pu1_ref, 0, &ps_ctxt->au1_pred_samples[0], trans_size, trans_size, mode);
3269 if(ps_ctxt->u1_use_satd)
3274 &ps_ctxt->au1_pred_samples[0],
3283 sad = ps_ctxt->s_ipe_optimised_function_list.pf_nxn_sad_computer(
3286 &ps_ctxt->au1_pred_samples[0],
3298 best_amode = ps_ctxt->au1_modes_to_eval[0];
3308 if(best_amode > ps_ctxt->au1_modes_to_eval[z])
3309 best_amode = ps_ctxt->au1_modes_to_eval[z];
3313 best_amode = ps_ctxt->au1_modes_to_eval[z];
3329 ps_ctxt->au1_modes_to_eval[i_end++] = 0;
3330 ps_ctxt->au1_modes_to_eval[i_end++] = 1;
3333 ps_ctxt->au1_modes_to_eval[i_end++] = best_amode - 1;
3335 ps_ctxt->au1_modes_to_eval[i_end++] = best_amode;
3338 ps_ctxt->au1_modes_to_eval[i_end++] = best_amode + 1;
3343 //ps_ctxt->au1_modes_to_eval[i_end] = best_amode; //Bugfix: HSAD compared with SAD
3356 pu1_ref_orig = &ps_ctxt->au1_ref_samples[0];
3357 pu1_ref_filt = &ps_ctxt->au1_filt_ref_samples[0];
3360 mode = ps_ctxt->au1_modes_to_eval[i];
3361 cost_amode_step2[i] = ps_ctxt->au2_mode_bits_satd_cost[mode];
3376 pu1_ref, 0, &ps_ctxt->au1_pred_samples[0], trans_size, trans_size, mode);
3383 &ps_ctxt->au1_pred_samples[0],
3420 best_amode = ps_ctxt->au1_modes_to_eval[modes_4x4[0]];
3422 ps_cu_node->best_satd = cost_ang_mode - ps_ctxt->au2_mode_bits_satd_cost[best_amode];
3424 ps_cu_node->best_mode = ps_ctxt->au1_modes_to_eval[modes_4x4[0]];
3426 ps_cu_node->best_cost - ps_ctxt->au2_mode_bits_satd_cost[ps_cu_node->best_mode];
3429 ps_cu_node->u2_mode_bits_cost = ps_ctxt->au2_mode_bits_satd[ps_cu_node->best_mode];
3435 best_modes_4x4[i] = ps_ctxt->au1_modes_to_eval[modes_4x4[i]];