Lines Matching refs:ps_ctxt
1135 me_ctxt_t *ps_ctxt;
1233 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1237 ps_frm_ctxt = ps_ctxt->aps_me_frm_prms[i];
1248 memcpy(ps_ctxt->a_wd, a_wd, sizeof(S32)*n_tot_layers);
1249 memcpy(ps_ctxt->a_ht, a_ht, sizeof(S32)*n_tot_layers);
1369 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1370 ps_ctxt->as_ref_descr[i].aps_layers[j] = ps_layer;
1394 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1398 ps_frm_ctxt = ps_ctxt->aps_me_frm_prms[i];
1438 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1442 ps_frm_ctxt = ps_ctxt->aps_me_frm_prms[i];
1482 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1484 ps_ctxt->aps_me_frm_prms[j]->aps_mv_hist[i] = ps_mv_hist;
1512 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1523 &ps_ctxt->aps_me_frm_prms[j]->as_search_results_16x16[i];
1528 &ps_ctxt->aps_me_frm_prms[j]->as_search_results_32x32[i - 16];
1530 &ps_ctxt->aps_me_frm_prms[j]->as_cu32x32_results[i - 16];
1534 ps_search_results = &ps_ctxt->aps_me_frm_prms[j]->s_search_results_64x64;
1536 &ps_ctxt->aps_me_frm_prms[j]->s_cu64x64_results;
1567 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1571 ps_ctxt->aps_me_frm_prms[j]->s_wt_pred.apu1_wt_inp_buf_array[i] = pu1_mem;
1594 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1598 ps_frm_ctxt = ps_ctxt->aps_me_frm_prms[i];
1624 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1626 ps_ctxt->aps_me_frm_prms[i]->ps_blk_16x16 = (cluster_16x16_blk_t *)pu1_mem;
1629 ps_ctxt->aps_me_frm_prms[i]->ps_blk_32x32 = (cluster_32x32_blk_t *)pu1_mem;
1632 ps_ctxt->aps_me_frm_prms[i]->ps_blk_64x64 = (cluster_64x64_blk_t *)pu1_mem;
1635 ps_ctxt->aps_me_frm_prms[i]->ps_ctb_cluster_info =
1659 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1661 ps_ctxt->aps_me_frm_prms[i]->ps_blk_16x16 = NULL;
1663 ps_ctxt->aps_me_frm_prms[i]->ps_blk_32x32 = NULL;
1665 ps_ctxt->aps_me_frm_prms[i]->ps_blk_64x64 = NULL;
1667 ps_ctxt->aps_me_frm_prms[i]->ps_ctb_cluster_info = NULL;
1686 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1688 ps_ctxt->aps_me_frm_prms[i]->ps_fullpel_refine_ctxt =
1743 coarse_me_ctxt_t *ps_ctxt;
1817 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1818 memset(ps_ctxt->u1_encode, 0, n_tot_layers);
1821 ps_ctxt->num_layers = n_tot_layers;
1823 memcpy(ps_ctxt->a_wd, a_wd, sizeof(S32) * n_tot_layers);
1824 memcpy(ps_ctxt->a_ht, a_ht, sizeof(S32) * n_tot_layers);
1826 ps_ctxt->num_layers_explicit_search = num_layers_explicit_search;
1827 ps_ctxt->max_num_results = ps_prms->max_num_results;
1828 ps_ctxt->max_num_results_coarse = ps_prms->max_num_results_coarse;
1829 ps_ctxt->max_num_ref = ps_prms->max_num_ref;
1964 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
1965 ps_ctxt->as_ref_descr[i].aps_layers[j] = ps_layer;
2004 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
2005 ps_ctxt->api2_sads_4x4_n_rows[i] = (S16 *)ps_memtabs[count].pu1_mem;
2028 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
2029 ps_ctxt->aps_best_search_nodes_8x4_n_rows[i] =
2052 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
2053 ps_ctxt->aps_best_search_nodes_4x8_n_rows[i] =
2079 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
2080 ps_ctxt->aps_mv_hist[i] = ps_mv_hist;
2100 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
2105 ps_search_results = &ps_ctxt->s_search_results_8x8;
2126 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
2130 ps_ctxt->s_wt_pred.apu1_wt_inp_buf_array[i] = pu1_mem;
2148 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
2150 ps_ctxt->ps_hme_frm_prms = &ps_master_ctxt->s_frm_prms;
2151 ps_ctxt->ps_hme_ref_map = &ps_master_ctxt->s_ref_map;
2436 coarse_me_ctxt_t *ps_ctxt = ps_me_ctxt->aps_me_ctxt[0];
2439 for(i = 1; i < ps_ctxt->num_layers; i++)
2614 coarse_me_ctxt_t *ps_ctxt;
2620 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
2623 ps_ctxt->s_init_prms = *ps_prms;
2626 ps_ctxt->i4_prev_poc = -1;
2628 ps_ctxt->num_b_frms = ps_prms->num_b_frms;
2630 ps_ctxt->apu1_ref_bits_tlu_lc[0] = &ps_ctxt->au1_ref_bits_tlu_lc[0][0];
2631 ps_ctxt->apu1_ref_bits_tlu_lc[1] = &ps_ctxt->au1_ref_bits_tlu_lc[1][0];
2634 ps_ctxt->i4_num_row_bufs = ps_prms->i4_num_proc_thrds + 1;
2635 num_rows_coarse = ps_ctxt->i4_num_row_bufs;
2638 ps_ctxt->ai4_row_index[i] = (i % num_rows_coarse);
2644 ps_ctxt = ps_master_ctxt->aps_me_ctxt[0];
2647 for(i = 0; i < ps_ctxt->max_num_ref + 1 + NUM_BUFS_DECOMP_HME; i++)
2649 for(j = 1; j < ps_ctxt->num_layers; j++)
2652 ps_layer = ps_ctxt->as_ref_descr[i].aps_layers[j];
2654 ps_layer->ppu1_list_inp = &ps_ctxt->apu1_list_inp[j][0];
2656 ps_layer->s_global_mv, 0, sizeof(hme_mv_t) * ps_ctxt->max_num_ref * NUM_GMV_LOBES);
2678 me_ctxt_t *ps_ctxt;
2684 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
2686 ps_ctxt->pv_tile_params_base = ps_master_ctxt->pv_tile_params_base;
2690 ps_frm_ctxt = ps_ctxt->aps_me_frm_prms[i];
2693 ps_ctxt->s_init_prms = *ps_prms;
2723 ps_ctxt = ps_master_ctxt->aps_me_ctxt[0];
2725 ps_frm_ctxt = ps_ctxt->aps_me_frm_prms[0];
2734 ps_layer = ps_ctxt->as_ref_descr[i].aps_layers[j];
2775 me_master_ctxt_t *ps_ctxt = (me_master_ctxt_t *)pv_ctxt;
2790 memcpy(ps_ctxt->as_memtabs, ps_memtabs, sizeof(hme_memtab_t) * tot);
2793 hme_enc_init_ctxt(ps_ctxt, ps_prms, ps_rc_quant_ctxt);
2815 coarse_me_master_ctxt_t *ps_ctxt = (coarse_me_master_ctxt_t *)pv_ctxt;
2830 memcpy(ps_ctxt->as_memtabs, ps_memtabs, sizeof(hme_memtab_t) * tot);
2833 hme_coarse_init_ctxt(ps_ctxt, ps_prms);
2863 me_frm_ctxt_t *ps_ctxt;
2872 ps_ctxt = ps_thrd_ctxt->aps_me_frm_prms[me_frm_id];
2884 ps_ctxt->num_layers_explicit_search = num_layers_explicit_search;
2885 memset(ps_ctxt->u1_encode, 0, n_tot_layers);
2886 memset(ps_ctxt->u1_encode, 1, n_enc_layers);
2889 ps_ctxt->num_layers = n_tot_layers;
2891 ps_ctxt->i4_wd = a_wd[0];
2892 ps_ctxt->i4_ht = a_ht[0];
2895 for(i = 0; i < ps_ctxt->max_num_ref + 1; i++)
2901 U08 u1_enc = ps_ctxt->u1_encode[j];
2934 coarse_me_ctxt_t *ps_ctxt;
2940 ps_ctxt = (coarse_me_ctxt_t *)pv_me_ctxt;
2946 num_layers_explicit_search = ps_ctxt->s_init_prms.num_layers_explicit_search;
2951 ps_ctxt->num_layers_explicit_search = num_layers_explicit_search;
2952 memset(ps_ctxt->u1_encode, 0, n_tot_layers);
2953 memset(ps_ctxt->u1_encode, 1, n_enc_layers);
2956 ps_ctxt->num_layers = n_tot_layers;
2958 memcpy(ps_ctxt->a_wd, a_wd, sizeof(S32) * n_tot_layers);
2959 memcpy(ps_ctxt->a_ht, a_ht, sizeof(S32) * n_tot_layers);
2962 for(i = 0; i < ps_ctxt->max_num_ref + 1 + NUM_BUFS_DECOMP_HME; i++)
2968 U08 u1_enc = ps_ctxt->u1_encode[j];
2971 ps_layer = ps_ctxt->as_ref_descr[i].aps_layers[j];
2977 S32 hme_find_descr_idx(me_ctxt_t *ps_ctxt, S32 i4_poc, S32 i4_idr_gop_num, S32 i4_num_me_frm_pllel)
2981 for(i = 0; i < (ps_ctxt->aps_me_frm_prms[0]->max_num_ref * i4_num_me_frm_pllel) + 1; i++)
2983 if(ps_ctxt->as_ref_descr[i].aps_layers[0]->i4_poc == i4_poc &&
2984 ps_ctxt->as_ref_descr[i].aps_layers[0]->i4_idr_gop_num == i4_idr_gop_num)
2992 S32 hme_coarse_find_descr_idx(coarse_me_ctxt_t *ps_ctxt, S32 i4_poc)
2996 for(i = 0; i < ps_ctxt->max_num_ref + 1 + NUM_BUFS_DECOMP_HME; i++)
2998 if(ps_ctxt->as_ref_descr[i].aps_layers[1]->i4_poc == i4_poc)
3006 S32 hme_find_free_descr_idx(me_ctxt_t *ps_ctxt, S32 i4_num_me_frm_pllel)
3010 for(i = 0; i < (ps_ctxt->aps_me_frm_prms[0]->max_num_ref * i4_num_me_frm_pllel) + 1; i++)
3012 if(ps_ctxt->as_ref_descr[i].aps_layers[0]->i4_is_free == 1)
3014 ps_ctxt->as_ref_descr[i].aps_layers[0]->i4_is_free = 0;
3027 coarse_me_ctxt_t *ps_ctxt = (coarse_me_ctxt_t *)pv_ctxt;
3029 for(i = 0; i < ps_ctxt->max_num_ref + 1 + NUM_BUFS_DECOMP_HME; i++)
3031 if(ps_ctxt->as_ref_descr[i].aps_layers[1]->i4_poc == -1)
3042 me_ctxt_t *ps_ctxt = (me_ctxt_t *)pv_me_ctxt;
3051 ps_ctxt, p_pocs_to_remove[count], i4_idr_gop_num, i4_num_me_frm_pllel);
3052 ps_descr = &ps_ctxt->as_ref_descr[idx];
3067 coarse_me_ctxt_t *ps_ctxt = (coarse_me_ctxt_t *)pv_me_ctxt;
3074 idx = hme_coarse_find_descr_idx(ps_ctxt, p_pocs_to_remove[count]);
3075 ps_descr = &ps_ctxt->as_ref_descr[idx];
3080 for(i = 1; i < ps_ctxt->num_layers; i++)
3134 me_frm_ctxt_t *ps_ctxt;
3146 ps_ctxt = ps_thrd_ctxt->aps_me_frm_prms[me_frm_id];
3195 if(ps_ctxt->u1_encode[i])
3209 wd = ps_ctxt->i4_wd;
3225 coarse_me_ctxt_t *ps_ctxt;
3232 ps_ctxt = ps_master_ctxt->aps_me_ctxt[0];
3234 ps_desc = &ps_ctxt->as_ref_descr[i4_curr_idx];
3239 ps_ctxt = ps_master_ctxt->aps_me_ctxt[num_thrds];
3240 ps_ctxt->ps_curr_descr = &ps_ctxt->as_ref_descr[i4_curr_idx];
3244 ps_ctxt->i4_prev_poc = ps_ctxt->i4_curr_poc;
3245 ps_ctxt->i4_curr_poc = i4_poc;
3250 ps_ctxt = ps_master_ctxt->aps_me_ctxt[0];
3253 for(i = 1; i < ps_ctxt->num_layers; i++)
3260 if(ps_ctxt->u1_encode[i])
3276 wd = ps_ctxt->a_wd[i - 1];
3958 me_frm_ctxt_t *ps_ctxt = (me_frm_ctxt_t *)ps_thrd_ctxt->aps_me_frm_prms[i4_me_frm_id];
3964 ps_ctxt->frm_qstep = ps_frm_prms->qstep;
3965 ps_ctxt->qstep_ls8 = ps_frm_prms->qstep_ls8;
3968 ps_ctxt->s_frm_prms = *ps_frm_prms;
3984 ps_ctxt->num_ref_past = 0;
3985 ps_ctxt->num_ref_future = 0;
4002 1, //ps_ctxt->num_layers,
4003 ps_ctxt->ps_curr_descr);
4006 ps_ctxt->ps_curr_descr->aps_layers[0]->ppu1_list_inp = &ps_ctxt->apu1_list_inp[0][0];
4007 ps_ctxt->ps_curr_descr->aps_layers[0]->ppu1_list_rec_fxfy =
4008 &ps_ctxt->apu1_list_rec_fxfy[0][0];
4009 ps_ctxt->ps_curr_descr->aps_layers[0]->ppu1_list_rec_hxfy =
4010 &ps_ctxt->apu1_list_rec_hxfy[0][0];
4011 ps_ctxt->ps_curr_descr->aps_layers[0]->ppu1_list_rec_fxhy =
4012 &ps_ctxt->apu1_list_rec_fxhy[0][0];
4013 ps_ctxt->ps_curr_descr->aps_layers[0]->ppu1_list_rec_hxhy =
4014 &ps_ctxt->apu1_list_rec_hxhy[0][0];
4015 ps_ctxt->ps_curr_descr->aps_layers[0]->ppv_dep_mngr_recon =
4016 &ps_ctxt->apv_list_dep_mngr[0][0];
4019 ps_ctxt->a_ref_to_descr_id[ps_ref_desc->i1_ref_id_lc] = idx;
4022 ps_ctxt->ai4_ref_idx_to_poc_lc[ref_id_lc] = ps_ref_desc->i4_poc;
4026 ps_ctxt->a_ref_idx_lc_to_l0[ref_id_lc] = ps_ref_desc->i1_ref_id_l0;
4027 ps_ctxt->a_ref_idx_lc_to_l1[ref_id_lc] = ps_ref_desc->i1_ref_id_l1;
4028 if((ps_ctxt->i4_curr_poc > ps_ref_desc->i4_poc) || ps_ctxt->i4_curr_poc == 0)
4030 ps_ctxt->au1_is_past[ref_id_lc] = 1;
4031 ps_ctxt->ai1_past_list[ps_ctxt->num_ref_past] = ref_id_lc;
4032 ps_ctxt->num_ref_past++;
4036 ps_ctxt->au1_is_past[ref_id_lc] = 0;
4037 ps_ctxt->ai1_future_list[ps_ctxt->num_ref_future] = ref_id_lc;
4038 ps_ctxt->num_ref_future++;
4041 if(1 == ps_ctxt->i4_wt_pred_enable_flag)
4044 ps_ctxt->s_wt_pred.a_wpred_wt[ref_id_lc] = ps_ref_desc->i2_weight;
4047 ps_ctxt->s_wt_pred.a_inv_wpred_wt[ref_id_lc] =
4049 ps_ctxt->s_wt_pred.a_wpred_off[ref_id_lc] = ps_ref_desc->i2_offset;
4054 ps_ctxt->s_wt_pred.a_wpred_wt[ref_id_lc] = WGHT_DEFAULT;
4057 ps_ctxt->s_wt_pred.a_inv_wpred_wt[ref_id_lc] =
4060 ps_ctxt->s_wt_pred.a_wpred_off[ref_id_lc] = 0;
4064 ps_ctxt->ai1_future_list[ps_ctxt->num_ref_future] = -1;
4065 ps_ctxt->ai1_past_list[ps_ctxt->num_ref_past] = -1;
4074 ps_ctxt->au1_ref_bits_tlu_lc[0][i] = 0;
4075 ps_ctxt->au1_ref_bits_tlu_lc[1][i] = 0;
4080 ps_ctxt->au1_ref_bits_tlu_lc[0][0] = 1;
4081 ps_ctxt->au1_ref_bits_tlu_lc[1][0] = 1;
4082 ps_ctxt->au1_ref_bits_tlu_lc[0][1] = 1;
4083 ps_ctxt->au1_ref_bits_tlu_lc[1][1] = 1;
4090 l0 = ps_ctxt->a_ref_idx_lc_to_l0[i];
4091 l1 = ps_ctxt->a_ref_idx_lc_to_l1[i];
4092 ps_ctxt->au1_ref_bits_tlu_lc[0][i] = gau1_ref_bits[l0];
4093 ps_ctxt->au1_ref_bits_tlu_lc[1][i] = gau1_ref_bits[l1];
4109 poc_from = ps_ctxt->ai4_ref_idx_to_poc_lc[j];
4110 poc_to = ps_ctxt->ai4_ref_idx_to_poc_lc[i];
4112 i2_scf_q8 = hme_scale_for_ref_idx(ps_ctxt->i4_curr_poc, poc_from, poc_to);
4113 ps_ctxt->ai2_ref_scf[j + i * MAX_NUM_REF] = i2_scf_q8;
4126 layer_ctxt_t *ps_layer_ctxt = ps_ctxt->ps_curr_descr->aps_layers[i];
4128 ppvlist_dep_mngr = &ps_ctxt->apv_list_dep_mngr[i][0];
4129 ppu1_rec_fxfy = &ps_ctxt->apu1_list_rec_fxfy[i][0];
4130 ppu1_rec_hxfy = &ps_ctxt->apu1_list_rec_hxfy[i][0];
4131 ppu1_rec_fxhy = &ps_ctxt->apu1_list_rec_fxhy[i][0];
4132 ppu1_rec_hxhy = &ps_ctxt->apu1_list_rec_hxhy[i][0];
4133 ppu1_inp = &ps_ctxt->apu1_list_inp[i][0];
4145 desc_idx = ps_ctxt->a_ref_to_descr_id[ref_id_lc];
4178 i2_max_x = (S16)FLOOR8(((i2_max_x * ps_ctxt->i4_wd) / ps_ctxt->i4_wd));
4179 i2_max_y = (S16)FLOOR8(((i2_max_y * ps_ctxt->i4_ht) / ps_ctxt->i4_ht));
4181 ps_layer_ctxt = ps_ctxt->ps_curr_descr->aps_layers[i];
4192 memset(ps_layer_ctxt->ai4_ref_id_to_poc_lc, -1, sizeof(S32) * ps_ctxt->max_num_ref);
4197 ps_ctxt->ai4_ref_idx_to_poc_lc,
4223 coarse_me_ctxt_t *ps_ctxt = (coarse_me_ctxt_t *)pv_me_ctxt;
4228 ps_ctxt->frm_qstep = ps_frm_prms->qstep;
4231 ps_ctxt->s_frm_prms = *ps_frm_prms;
4247 ps_ctxt->num_ref_past = 0;
4248 ps_ctxt->num_ref_future = 0;
4257 idx = hme_coarse_find_descr_idx(ps_ctxt, ps_ref_desc->i4_poc);
4261 &ps_ctxt->as_ref_descr[idx],
4264 ps_ctxt->num_layers - 1,
4265 ps_ctxt->ps_curr_descr);
4268 ps_ctxt->a_ref_to_descr_id[ps_ref_desc->i1_ref_id_lc] = idx;
4271 ps_ctxt->ai4_ref_idx_to_poc_lc[ref_id_lc] = ps_ref_desc->i4_poc;
4274 ps_ctxt->ai4_ref_idx_to_disp_num[ref_id_lc] = ps_ref_desc->i4_display_num;
4278 ps_ctxt->a_ref_idx_lc_to_l0[ref_id_lc] = ps_ref_desc->i1_ref_id_l0;
4279 ps_ctxt->a_ref_idx_lc_to_l1[ref_id_lc] = ps_ref_desc->i1_ref_id_l1;
4280 if((ps_ctxt->i4_curr_poc > ps_ref_desc->i4_poc) || ps_ctxt->i4_curr_poc == 0)
4282 ps_ctxt->au1_is_past[ref_id_lc] = 1;
4283 ps_ctxt->ai1_past_list[ps_ctxt->num_ref_past] = ref_id_lc;
4284 ps_ctxt->num_ref_past++;
4288 ps_ctxt->au1_is_past[ref_id_lc] = 0;
4289 ps_ctxt->ai1_future_list[ps_ctxt->num_ref_future] = ref_id_lc;
4290 ps_ctxt->num_ref_future++;
4292 if(1 == ps_ctxt->i4_wt_pred_enable_flag)
4295 ps_ctxt->s_wt_pred.a_wpred_wt[ref_id_lc] = ps_ref_desc->i2_weight;
4298 ps_ctxt->s_wt_pred.a_inv_wpred_wt[ref_id_lc] =
4301 ps_ctxt->s_wt_pred.a_wpred_off[ref_id_lc] = ps_ref_desc->i2_offset;
4306 ps_ctxt->s_wt_pred.a_wpred_wt[ref_id_lc] = WGHT_DEFAULT;
4309 ps_ctxt->s_wt_pred.a_inv_wpred_wt[ref_id_lc] =
4312 ps_ctxt->s_wt_pred.a_wpred_off[ref_id_lc] = 0;
4316 ps_ctxt->ai1_future_list[ps_ctxt->num_ref_future] = -1;
4317 ps_ctxt->ai1_past_list[ps_ctxt->num_ref_past] = -1;
4326 ps_ctxt->au1_ref_bits_tlu_lc[0][i] = 0;
4327 ps_ctxt->au1_ref_bits_tlu_lc[1][i] = 0;
4332 ps_ctxt->au1_ref_bits_tlu_lc[0][0] = 1;
4333 ps_ctxt->au1_ref_bits_tlu_lc[1][0] = 1;
4334 ps_ctxt->au1_ref_bits_tlu_lc[0][1] = 1;
4335 ps_ctxt->au1_ref_bits_tlu_lc[1][1] = 1;
4342 l0 = ps_ctxt->a_ref_idx_lc_to_l0[i];
4343 l1 = ps_ctxt->a_ref_idx_lc_to_l1[i];
4344 ps_ctxt->au1_ref_bits_tlu_lc[0][i] = gau1_ref_bits[l0];
4345 ps_ctxt->au1_ref_bits_tlu_lc[1][i] = gau1_ref_bits[l1];
4361 poc_from = ps_ctxt->ai4_ref_idx_to_poc_lc[j];
4362 poc_to = ps_ctxt->ai4_ref_idx_to_poc_lc[i];
4364 i2_scf_q8 = hme_scale_for_ref_idx(ps_ctxt->i4_curr_poc, poc_from, poc_to);
4365 ps_ctxt->ai2_ref_scf[j + i * MAX_NUM_REF] = i2_scf_q8;
4373 for(i = 1; i < ps_ctxt->num_layers; i++)
4377 ppu1_inp = &ps_ctxt->apu1_list_inp[i][0];
4389 desc_idx = ps_ctxt->a_ref_to_descr_id[ref_id_lc];
4390 ps_layer = ps_ctxt->as_ref_descr[desc_idx].aps_layers[i];
4405 for(i = 1; i < ps_ctxt->num_layers; i++)
4410 i2_max_x = (S16)FLOOR8(((i2_max_x * ps_ctxt->a_wd[i]) / ps_ctxt->a_wd[i - 1]));
4411 i2_max_y = (S16)FLOOR8(((i2_max_y * ps_ctxt->a_ht[i]) / ps_ctxt->a_ht[i - 1]));
4413 ps_layer_ctxt = ps_ctxt->ps_curr_descr->aps_layers[i];
4424 ps_ctxt->max_num_ref);
4429 ps_ctxt->ai4_ref_idx_to_poc_lc,
4433 ps_ctxt->ai4_ref_idx_to_disp_num,
4480 me_frm_ctxt_t *ps_ctxt = ps_thrd_ctxt->aps_me_frm_prms[i4_me_frm_id];
4494 hme_set_ctb_attrs(ps_ctxt->as_ctb_bound_attrs, ps_ctxt->i4_wd, ps_ctxt->i4_ht);
4498 ps_ctxt->u1_encode[0],
4501 ps_ctxt->num_layers,
4502 ps_ctxt->num_layers_explicit_search,
4522 ps_ctxt->i4_is_prev_frame_reference = 0;
4526 ps_ctxt->i4_is_prev_frame_reference =
4565 coarse_me_ctxt_t *ps_ctxt = (coarse_me_ctxt_t *)pv_me_ctxt;
4573 layer_id = ps_ctxt->num_layers - 1;
4574 i2_max = ps_ctxt->ps_curr_descr->aps_layers[layer_id]->i2_max_mv_x;
4575 i2_max = MAX(i2_max, ps_ctxt->ps_curr_descr->aps_layers[layer_id]->i2_max_mv_y);
4580 if(ME_MEDIUM_SPEED > ps_ctxt->s_init_prms.s_me_coding_tools.e_me_quality_presets)
4597 if(ps_ctxt->s_init_prms.s_me_coding_tools.e_me_quality_presets < ME_MEDIUM_SPEED)
4599 else if(ps_ctxt->s_init_prms.s_me_coding_tools.e_me_quality_presets >= ME_MEDIUM_SPEED)
4602 s_coarse_prms.num_results = ps_ctxt->max_num_results_coarse;
4609 hme_coarsest(ps_ctxt, &s_coarse_prms, ps_multi_thrd_ctxt, i4_ping_pong, ppv_dep_mngr_hme_sync);
4622 ps_ctxt->u1_encode[layer_id],
4625 ps_ctxt->num_layers,
4626 ps_ctxt->num_layers_explicit_search,
4627 ps_ctxt->s_init_prms.use_4x4,
4630 &ps_ctxt->s_init_prms.s_me_coding_tools);
4633 ps_ctxt,
4689 me_ctxt_t *ps_ctxt = (me_ctxt_t *)pv_me_ctxt;
4692 for(i = 0; i < (ps_ctxt->aps_me_frm_prms[0]->max_num_ref * i4_num_me_frm_pllel) + 1; i++)
4694 S32 poc = ps_ctxt->as_ref_descr[i].aps_layers[0]->i4_poc;
4695 S32 i4_is_free = ps_ctxt->as_ref_descr[i].aps_layers[0]->i4_is_free;
4702 if(count == (ps_ctxt->aps_me_frm_prms[0]->max_num_ref * i4_num_me_frm_pllel) + 1)
4729 coarse_me_ctxt_t *ps_ctxt = (coarse_me_ctxt_t *)pv_me_ctxt;
4732 for(i = 0; i < ps_ctxt->max_num_ref + 1 + NUM_BUFS_DECOMP_HME; i++)
4734 S32 poc = ps_ctxt->as_ref_descr[i].aps_layers[1]->i4_poc;