Lines Matching full:ps_me_ctxt
75 * @param[in] ps_me_ctxt
90 void ime_diamond_search_16x16(me_ctxt_t *ps_me_ctxt, WORD32 i4_reflist)
93 mb_part_ctxt *ps_mb_part = &ps_me_ctxt->as_mb_part[i4_reflist];
96 UWORD32 u4_lambda_motion = ps_me_ctxt->u4_lambda_motion;
99 WORD32 i4_srch_range_n = ps_me_ctxt->i4_srch_range_n;
100 WORD32 i4_srch_range_s = ps_me_ctxt->i4_srch_range_s;
101 WORD32 i4_srch_range_e = ps_me_ctxt->i4_srch_range_e;
102 WORD32 i4_srch_range_w = ps_me_ctxt->i4_srch_range_w;
105 // UWORD32 u4_enable_fast_sad = ps_me_ctxt->u4_enable_fast_sad;
108 UWORD8 *pu1_curr_mb = ps_me_ctxt->pu1_src_buf_luma;
109 UWORD8 *pu1_ref_mb = ps_me_ctxt->apu1_ref_buf_luma[i4_reflist];
112 WORD32 i4_src_strd = ps_me_ctxt->i4_src_strd;
113 WORD32 i4_ref_strd = ps_me_ctxt->i4_rec_strd;
125 UWORD8 *pu1_mv_bits = ps_me_ctxt->pu1_mv_bits;
134 UWORD32 u4_num_layers = ps_me_ctxt->u4_num_layers;
166 ps_me_ctxt->pf_ime_compute_sad4_diamond(pu1_ref,
277 me_ctxt_t *ps_me_ctxt,
281 UWORD32 u4_lambda_motion = ps_me_ctxt->u4_lambda_motion;
284 UWORD32 u4_num_candidates = ps_me_ctxt->u4_num_candidates[i4_reflist];
287 ime_mv_t *ps_mv_list = ps_me_ctxt->as_mv_init_search[i4_reflist];
290 UWORD8 *pu1_curr_mb = ps_me_ctxt->pu1_src_buf_luma;
291 UWORD8 *pu1_ref_mb = ps_me_ctxt->apu1_ref_buf_luma[i4_reflist];
294 WORD32 i4_src_strd = ps_me_ctxt->i4_src_strd;
295 WORD32 i4_ref_strd = ps_me_ctxt->i4_rec_strd;
298 UWORD32 u4_enable_fast_sad = ps_me_ctxt->u4_enable_fast_sad;
307 mb_part_ctxt *ps_mb_part = &(ps_me_ctxt->as_mb_part[i4_reflist]);
310 UWORD8 *pu1_mv_bits = ps_me_ctxt->pu1_mv_bits;
339 ps_me_ctxt->pf_ime_compute_sad_16x16[u4_enable_fast_sad](pu1_curr_mb, pu1_ref, i4_src_strd, i4_ref_strd, i4_mb_cost_least, &i4_mb_distortion);
382 * @param[in] ps_me_ctxt
393 me_ctxt_t *ps_me_ctxt,
398 mb_part_ctxt *ps_mb_part = &ps_me_ctxt->as_mb_part[i4_ref_list];
407 ps_me_ctxt->i4_srch_range_w = MAX(ps_me_ctxt->i4_srch_range_w,
408 -ps_me_ctxt->ai2_srch_boundaries[0] + ps_mb_part->s_mv_curr.i2_mvx);
409 ps_me_ctxt->i4_srch_range_e = MIN(ps_me_ctxt->i4_srch_range_e,
410 ps_me_ctxt->ai2_srch_boundaries[0] + ps_mb_part->s_mv_curr.i2_mvx);
411 ps_me_ctxt->i4_srch_range_n = MAX(ps_me_ctxt->i4_srch_range_n,
412 -ps_me_ctxt->ai2_srch_boundaries[1] + ps_mb_part->s_mv_curr.i2_mvy);
413 ps_me_ctxt->i4_srch_range_s = MIN(ps_me_ctxt->i4_srch_range_s,
414 ps_me_ctxt->ai2_srch_boundaries[1] + ps_mb_part->s_mv_curr.i2_mvy);
420 switch (ps_me_ctxt->u4_me_speed_preset)
423 ime_diamond_search_16x16(ps_me_ctxt, i4_ref_list);
446 * @param[in] ps_me_ctxt
457 me_ctxt_t *ps_me_ctxt,
462 UWORD8 *pu1_curr_mb = ps_me_ctxt->pu1_src_buf_luma;
475 WORD32 i4_src_strd = ps_me_ctxt->i4_src_strd;
477 WORD32 i4_ref_strd = ps_me_ctxt->u4_subpel_buf_strd;
480 mb_part_ctxt *ps_mb_part = &ps_me_ctxt->as_mb_part[i4_reflist];
494 UWORD8 *pu1_mv_bits = ps_me_ctxt->pu1_mv_bits;
500 UWORD32 u4_lambda_motion = ps_me_ctxt->u4_lambda_motion;
532 /* ps_me_ctxt->pu1_half_x points to the half pel pixel on the */
534 /* ps_me_ctxt->pu1_half_y points to the half pel pixel on the */
536 /* ps_me_ctxt->pu1_half_xy points to the half pel pixel */
540 /* ps_me_ctxt->pu1_half_x = right halp_pel */
541 /* ps_me_ctxt->pu1_half_y = bottom halp_pel */
542 /* ps_me_ctxt->pu1_half_xy = bottom right halp_pel */
546 pu1_ref_mb_half_x_temp = pu1_ref_mb_half_x = ps_me_ctxt->apu1_subpel_buffs[0] + 1;
547 pu1_ref_mb_half_y_temp = pu1_ref_mb_half_y = ps_me_ctxt->apu1_subpel_buffs[1] + 1 + i4_ref_strd;
548 pu1_ref_mb_half_xy_temp = pu1_ref_mb_half_xy = ps_me_ctxt->apu1_subpel_buffs[2] + 1 + i4_ref_strd;
550 ps_me_ctxt->pf_ime_sub_pel_compute_sad_16x16(pu1_curr_mb, pu1_ref_mb_half_x,
581 ps_me_ctxt->apu1_subpel_buffs[0] = pu1_ref_mb_half_x_temp - i;
615 ps_me_ctxt->apu1_subpel_buffs[1] = pu1_ref_mb_half_y_temp - i*(i4_ref_strd);
652 ps_me_ctxt->apu1_subpel_buffs[2] = pu1_ref_mb_half_xy_temp - j*(i4_ref_strd) - i;
680 * @param[in] ps_me_ctxt
695 me_ctxt_t *ps_me_ctxt,
723 s_clip_skip_mv.i2_mvx = CLIP3(ps_me_ctxt->i4_srch_range_w, ps_me_ctxt->i4_srch_range_e, s_skip_mv.i2_mvx);
724 s_clip_skip_mv.i2_mvy = CLIP3(ps_me_ctxt->i4_srch_range_n, ps_me_ctxt->i4_srch_range_s, s_skip_mv.i2_mvy);
737 pu1_ref = ps_me_ctxt->apu1_ref_buf_luma[i4_reflist] + s_skip_mv.i2_mvx
738 + (s_skip_mv.i2_mvy * ps_me_ctxt->i4_rec_strd);
744 ps_me_ctxt->pf_ime_compute_sad_stat_luma_16x16(
745 ps_me_ctxt->pu1_src_buf_luma, pu1_ref, ps_me_ctxt->i4_src_strd,
746 ps_me_ctxt->i4_rec_strd, ps_me_ctxt->pu2_sad_thrsh,
749 if (u4_is_nonzero == 0 || i4_mb_distortion <= ps_me_ctxt->i4_min_sad)
751 ps_me_ctxt->u4_min_sad_reached = 1; /* found min sad */
752 ps_me_ctxt->i4_min_sad = (u4_is_nonzero == 0) ? 0 : i4_mb_distortion;
757 ps_me_ctxt->pf_ime_compute_sad_16x16[ps_me_ctxt->u4_enable_fast_sad](
758 ps_me_ctxt->pu1_src_buf_luma, pu1_ref, ps_me_ctxt->i4_src_strd,
759 ps_me_ctxt->i4_rec_strd, INT_MAX, &i4_mb_distortion);
761 if(i4_mb_distortion <= ps_me_ctxt->i4_min_sad)
763 ps_me_ctxt->i4_min_sad = i4_mb_distortion;
764 ps_me_ctxt->u4_min_sad_reached = 1; /* found min sad */
774 i4_mb_cost = i4_mb_distortion - (ps_me_ctxt->u4_lambda_motion * (ps_me_ctxt->i4_skip_bias[0] + ps_me_ctxt->i4_skip_bias[1] * i4_is_slice_type_b));