Lines Matching refs:ps_ctxt

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