Lines Matching refs:ps_hle_ctxt
176 IV_API_CALL_STATUS_T ihevce_hle_interface_create(ihevce_hle_ctxt_t *ps_hle_ctxt) in ihevce_hle_interface_create() argument
182 WORD32 i4_num_resolutions = ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_num_res_layers; in ihevce_hle_interface_create()
185 ihevce_sys_api_t *ps_sys_api = &ps_hle_ctxt->ps_static_cfg_prms->s_sys_api; in ihevce_hle_interface_create()
192 status = ihevce_osal_init((void *)ps_hle_ctxt); in ihevce_hle_interface_create()
204 ps_hle_ctxt->i4_error_code = 0; in ihevce_hle_interface_create()
207 ps_hle_ctxt->i4_error_code = ihevce_hle_validate_static_params(ps_hle_ctxt->ps_static_cfg_prms); in ihevce_hle_interface_create()
216 ps_hle_ctxt->ihevce_mem_alloc( in ihevce_hle_interface_create()
217 ps_hle_ctxt->pv_mem_mgr_hdl, &ps_hle_ctxt->ps_static_cfg_prms->s_sys_api, &s_memtab); in ihevce_hle_interface_create()
225 ps_hle_ctxt->ps_static_cfg_prms, in ihevce_hle_interface_create()
234 ps_hle_ctxt->i4_error_code = IHEVCE_INVALID_MEM_CTRL_FLAG; in ihevce_hle_interface_create()
264 if(0 != ps_hle_ctxt->i4_error_code) in ihevce_hle_interface_create()
266 ps_hle_ctxt->ihevce_mem_free(ps_hle_ctxt->pv_mem_mgr_hdl, &s_memtab); in ihevce_hle_interface_create()
269 ps_hle_ctxt->ai4_num_core_per_res[0] = i4_total_cores; in ihevce_hle_interface_create()
279 ps_hle_ctxt->ihevce_mem_alloc( in ihevce_hle_interface_create()
280 ps_hle_ctxt->pv_mem_mgr_hdl, &ps_enc_static_cfg_params->s_sys_api, &s_memtab); in ihevce_hle_interface_create()
299 ps_hle_ctxt->ihevce_mem_alloc( in ihevce_hle_interface_create()
300 ps_hle_ctxt->pv_mem_mgr_hdl, &ps_enc_static_cfg_params->s_sys_api, &s_memtab); in ihevce_hle_interface_create()
353 ps_hle_ctxt->ai4_num_core_per_res[ctr]; in ihevce_hle_interface_create()
357 ps_hle_ctxt->ai4_num_core_per_res[ctr]; in ihevce_hle_interface_create()
367 ps_enc_ctxt->pv_hle_ctxt = (void *)ps_hle_ctxt; in ihevce_hle_interface_create()
405 ihevce_mem_manager_init(ps_enc_ctxt, ps_hle_ctxt); in ihevce_hle_interface_create()
407 if(0 != ps_hle_ctxt->i4_error_code) in ihevce_hle_interface_create()
413 ps_enc_ctxt->pv_rc_mutex_lock_hdl = osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_create()
421 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_create()
428 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_create()
438 ps_hle_ctxt->apv_enc_hdl[ctr] = ps_enc_ctxt; in ihevce_hle_interface_create()
441 PROFILE_INIT(&ps_hle_ctxt->profile_hle); in ihevce_hle_interface_create()
446 PROFILE_INIT(&ps_hle_ctxt->profile_pre_enc[ctr]); in ihevce_hle_interface_create()
449 PROFILE_INIT(&ps_hle_ctxt->profile_enc[ctr][i4_br_id]); in ihevce_hle_interface_create()
450 PROFILE_INIT(&ps_hle_ctxt->profile_entropy[ctr][i4_br_id]); in ihevce_hle_interface_create()
479 ihevce_hle_ctxt_t *ps_hle_ctxt, in ihevce_query_io_buf_req() argument
491 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[i4_resolution_id]; in ihevce_query_io_buf_req()
492 ps_src_prms = &ps_hle_ctxt->ps_static_cfg_prms->s_src_prms; in ihevce_query_io_buf_req()
493 i4_num_resolutions = ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_num_res_layers; in ihevce_query_io_buf_req()
495 ps_hle_ctxt->i4_error_code = 0; in ihevce_query_io_buf_req()
541 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[i4_resolution_id_ctr]; in ihevce_query_io_buf_req()
565 if((ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_internal_bit_depth == 12) || in ihevce_query_io_buf_req()
566 ((ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_internal_bit_depth > 8) && in ihevce_query_io_buf_req()
573 if((ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_internal_bit_depth == 10) && in ihevce_query_io_buf_req()
603 ((ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_internal_bit_depth > 8) in ihevce_query_io_buf_req()
648 ihevce_hle_ctxt_t *ps_hle_ctxt, in ihevce_create_ports() argument
657 i4_num_resolutions = ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_num_res_layers; in ihevce_create_ports()
661 ps_hle_ctxt->i4_error_code = 0; in ihevce_create_ports()
665 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_create_ports()
671 ps_hle_ctxt, in ihevce_create_ports()
685 ps_enc_ctxt->s_enc_ques.pv_q_mutex_hdl = osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_create_ports()
725 ihevce_hle_ctxt_t *ps_hle_ctxt; in ihevce_hle_interface_thrd() local
764 ps_hle_ctxt = (ihevce_hle_ctxt_t *)pv_proc_intf_ctxt; in ihevce_hle_interface_thrd()
765 ps_enc_ctxt_base = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[0]; in ihevce_hle_interface_thrd()
767 PROFILE_START(&ps_hle_ctxt->profile_hle); in ihevce_hle_interface_thrd()
794 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
811 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
818 pv_lap_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
830 pv_enc_frame_process_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
837 pv_pre_enc_frame_process_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
846 pv_inp_data_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
859 pv_lap_inp_data_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
866 pv_preenc_inp_data_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
875 pv_inp_ctrl_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
887 pv_out_ctrl_sts_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
901 pv_ent_common_mres_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
908 pv_out_common_mres_sem_hdl = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
923 apv_ent_coding_sem_hdl[i] = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
930 apv_out_stream_sem_hdl[i] = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
937 apv_out_recon_sem_hdl[i] = osal_sem_create(ps_hle_ctxt->pv_osal_handle, &attr); in ihevce_hle_interface_thrd()
968 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
972 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
980 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
990 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
997 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1007 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1014 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1023 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1026 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1029 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1032 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1035 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1038 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1041 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1044 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1047 osal_mutex_create(ps_hle_ctxt->pv_osal_handle); in ihevce_hle_interface_thrd()
1069 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
1070 ps_enc_ctxt_base = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[0]; in ihevce_hle_interface_thrd()
1201 ps_hle_ctxt->ihevce_mem_alloc( in ihevce_hle_interface_thrd()
1202 ps_hle_ctxt->pv_mem_mgr_hdl, &ps_enc_ctxt_base->ps_stat_prms->s_sys_api, &s_memtab); in ihevce_hle_interface_thrd()
1211 ps_lap_interface_ctxt->pv_hle_ctxt = ps_hle_ctxt; in ihevce_hle_interface_thrd()
1212 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[0]; in ihevce_hle_interface_thrd()
1233 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
1245 ps_hle_ctxt->ihevce_mem_alloc( in ihevce_hle_interface_thrd()
1246 ps_hle_ctxt->pv_mem_mgr_hdl, &ps_enc_ctxt_base->ps_stat_prms->s_sys_api, &s_memtab); in ihevce_hle_interface_thrd()
1256 aps_entropy_thrd_ctxt[res_ctr][ctr]->ps_hle_ctxt = ps_hle_ctxt; in ihevce_hle_interface_thrd()
1275 ps_hle_ctxt->ps_static_cfg_prms->s_multi_thrd_prms.i4_num_proc_groups - 1; in ihevce_hle_interface_thrd()
1284 osal_thread_create(ps_hle_ctxt->pv_osal_handle, &s_thread_attr); in ihevce_hle_interface_thrd()
1300 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
1307 enc_ctr += ps_hle_ctxt->ai4_num_core_per_res[i4_loop_count]; in ihevce_hle_interface_thrd()
1337 ps_hle_ctxt->ihevce_mem_alloc( in ihevce_hle_interface_thrd()
1338 ps_hle_ctxt->pv_mem_mgr_hdl, &ps_enc_ctxt_base->ps_stat_prms->s_sys_api, &s_memtab); in ihevce_hle_interface_thrd()
1349 aps_enc_frm_proc_thrd_ctxt[res_ctr][ctr]->ps_hle_ctxt = ps_hle_ctxt; in ihevce_hle_interface_thrd()
1351 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
1397 osal_thread_create(ps_hle_ctxt->pv_osal_handle, &s_thread_attr); in ihevce_hle_interface_thrd()
1414 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
1419 pre_enc_ctr += ps_hle_ctxt->ai4_num_core_per_res[i4_loop_count]; in ihevce_hle_interface_thrd()
1455 ps_hle_ctxt->ihevce_mem_alloc( in ihevce_hle_interface_thrd()
1456 ps_hle_ctxt->pv_mem_mgr_hdl, &ps_enc_ctxt_base->ps_stat_prms->s_sys_api, &s_memtab); in ihevce_hle_interface_thrd()
1467 aps_pre_enc_frm_proc_thrd_ctxt[res_ctr][ctr]->ps_hle_ctxt = ps_hle_ctxt; in ihevce_hle_interface_thrd()
1468 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
1519 osal_thread_create(ps_hle_ctxt->pv_osal_handle, &s_thread_attr); in ihevce_hle_interface_thrd()
1529 ps_hle_ctxt->i4_hle_init_done = 1; in ihevce_hle_interface_thrd()
1540 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
1555 ps_hle_ctxt->ihevce_mem_free(ps_hle_ctxt->pv_mem_mgr_hdl, &s_memtab); in ihevce_hle_interface_thrd()
1564 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_thrd()
1579 ps_hle_ctxt->ihevce_mem_free(ps_hle_ctxt->pv_mem_mgr_hdl, &s_memtab); in ihevce_hle_interface_thrd()
1607 ps_hle_ctxt->ihevce_mem_free(ps_hle_ctxt->pv_mem_mgr_hdl, &s_memtab); in ihevce_hle_interface_thrd()
1614 ps_hle_ctxt->ihevce_mem_free(ps_hle_ctxt->pv_mem_mgr_hdl, &s_memtab); in ihevce_hle_interface_thrd()
1616 PROFILE_STOP(&ps_hle_ctxt->profile_hle, NULL); in ihevce_hle_interface_thrd()
1640 ihevce_hle_ctxt_t *ps_hle_ctxt, WORD32 *pi4_buff_id, WORD32 i4_blocking_mode) in ihevce_q_get_free_inp_data_buff() argument
1646 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[i4_resolution_id]; in ihevce_q_get_free_inp_data_buff()
1653 ps_hle_ctxt->apv_enc_hdl[0], IHEVCE_INPUT_DATA_CTRL_Q, pi4_buff_id, i4_blocking_mode); in ihevce_q_get_free_inp_data_buff()
1678 ihevce_hle_ctxt_t *ps_hle_ctxt, WORD32 *pi4_buff_id, WORD32 i4_blocking_mode) in ihevce_q_get_free_inp_ctrl_buff() argument
1684 ps_hle_ctxt->apv_enc_hdl[0], IHEVCE_INPUT_ASYNCH_CTRL_Q, pi4_buff_id, i4_blocking_mode); in ihevce_q_get_free_inp_ctrl_buff()
1709 ihevce_hle_ctxt_t *ps_hle_ctxt, in ihevce_q_get_free_out_strm_buff() argument
1718 ps_hle_ctxt->apv_enc_hdl[i4_res_instance], in ihevce_q_get_free_out_strm_buff()
1745 ihevce_hle_ctxt_t *ps_hle_ctxt, in ihevce_q_get_free_out_recon_buff() argument
1754 ps_hle_ctxt->apv_enc_hdl[i4_res_instance], in ihevce_q_get_free_out_recon_buff()
1780 ihevce_q_set_inp_data_buff_prod(ihevce_hle_ctxt_t *ps_hle_ctxt, WORD32 i4_buff_id) in ihevce_q_set_inp_data_buff_prod() argument
1785 ihevce_q_set_buff_prod(ps_hle_ctxt->apv_enc_hdl[0], IHEVCE_INPUT_DATA_CTRL_Q, i4_buff_id); in ihevce_q_set_inp_data_buff_prod()
1809 ihevce_q_set_inp_ctrl_buff_prod(ihevce_hle_ctxt_t *ps_hle_ctxt, WORD32 i4_buff_id) in ihevce_q_set_inp_ctrl_buff_prod() argument
1815 ihevce_q_set_buff_prod(ps_hle_ctxt->apv_enc_hdl[0], IHEVCE_INPUT_ASYNCH_CTRL_Q, i4_buff_id); in ihevce_q_set_inp_ctrl_buff_prod()
1839 ihevce_hle_ctxt_t *ps_hle_ctxt, in ihevce_q_set_out_strm_buff_prod() argument
1847 ps_hle_ctxt->apv_enc_hdl[i4_resolution_id], in ihevce_q_set_out_strm_buff_prod()
1873 ihevce_hle_ctxt_t *ps_hle_ctxt, in ihevce_q_set_out_recon_buff_prod() argument
1881 ps_hle_ctxt->apv_enc_hdl[i4_resolution_id], in ihevce_q_set_out_recon_buff_prod()
1909 ihevce_hle_ctxt_t *ps_hle_ctxt, in ihevce_q_get_filled_recon_buff() argument
1918 ps_hle_ctxt->apv_enc_hdl[i4_resolution_id], in ihevce_q_get_filled_recon_buff()
1946 ihevce_hle_ctxt_t *ps_hle_ctxt, WORD32 *pi4_buff_id, WORD32 i4_blocking_mode) in ihevce_q_get_filled_ctrl_sts_buff() argument
1950 ps_hle_ctxt->apv_enc_hdl[0], IHEVCE_OUTPUT_STATUS_Q, pi4_buff_id, i4_blocking_mode); in ihevce_q_get_filled_ctrl_sts_buff()
1975 ihevce_hle_ctxt_t *ps_hle_ctxt, in ihevce_q_rel_recon_buf() argument
1983 ps_hle_ctxt->apv_enc_hdl[i4_resolution_id], in ihevce_q_rel_recon_buf()
2008 IV_API_CALL_STATUS_T ihevce_q_rel_ctrl_sts_buf(ihevce_hle_ctxt_t *ps_hle_ctxt, WORD32 i4_buff_id) in ihevce_q_rel_ctrl_sts_buf() argument
2012 ret_status = ihevce_q_rel_buf(ps_hle_ctxt->apv_enc_hdl[0], IHEVCE_OUTPUT_STATUS_Q, i4_buff_id); in ihevce_q_rel_ctrl_sts_buf()
2034 IV_API_CALL_STATUS_T ihevce_hle_interface_delete(ihevce_hle_ctxt_t *ps_hle_ctxt) in ihevce_hle_interface_delete() argument
2042 i4_num_resolutions = ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_num_res_layers; in ihevce_hle_interface_delete()
2046 ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.as_tgt_params[ctr] in ihevce_hle_interface_delete()
2050 for(res_ctr = 0; res_ctr < i4_num_resolutions && ps_hle_ctxt->apv_enc_hdl[res_ctr]; res_ctr++) in ihevce_hle_interface_delete()
2052 ps_enc_ctxt = (enc_ctxt_t *)ps_hle_ctxt->apv_enc_hdl[res_ctr]; in ihevce_hle_interface_delete()
2059 if(1 == ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_mres_single_out) in ihevce_hle_interface_delete()
2074 for(i = 0; i < ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.as_tgt_params[res_ctr] in ihevce_hle_interface_delete()
2126 ps_hle_ctxt->ps_static_cfg_prms, in ihevce_hle_interface_delete()
2213 ihevce_mem_manager_free(ps_enc_ctxt, ps_hle_ctxt); in ihevce_hle_interface_delete()
2214 if((1 == ps_hle_ctxt->ps_static_cfg_prms->s_tgt_lyr_prms.i4_mres_single_out) && in ihevce_hle_interface_delete()
2223 ps_hle_ctxt->ihevce_mem_free(ps_hle_ctxt->pv_mem_mgr_hdl, &s_memtab); in ihevce_hle_interface_delete()
2234 ps_hle_ctxt->ihevce_mem_free(ps_hle_ctxt->pv_mem_mgr_hdl, &s_memtab); in ihevce_hle_interface_delete()
2243 ps_hle_ctxt->ihevce_mem_free(ps_hle_ctxt->pv_mem_mgr_hdl, &s_memtab); in ihevce_hle_interface_delete()
2246 ps_hle_ctxt->apv_enc_hdl[res_ctr] = NULL; in ihevce_hle_interface_delete()
2249 PROFILE_END(&ps_hle_ctxt->profile_hle, "hle interface thread active time"); in ihevce_hle_interface_delete()
2254 PROFILE_END(&ps_hle_ctxt->profile_pre_enc[res_ctr], "pre enc process"); in ihevce_hle_interface_delete()
2257 PROFILE_END(&ps_hle_ctxt->profile_enc[res_ctr][i4_br_id], "enc process"); in ihevce_hle_interface_delete()
2258 PROFILE_END(&ps_hle_ctxt->profile_entropy[res_ctr][i4_br_id], "entropy process"); in ihevce_hle_interface_delete()
2263 ihevce_osal_delete((void *)ps_hle_ctxt); in ihevce_hle_interface_delete()