Lines Matching refs:ps_codec

119 void ih264e_join_threads(codec_t *ps_codec)  in ih264e_join_threads()  argument
126 while (i < ps_codec->i4_proc_thread_cnt) in ih264e_join_threads()
128 if (ps_codec->ai4_process_thread_created[i]) in ih264e_join_threads()
130 ret = ithread_join(ps_codec->apv_proc_thread_handle[i], NULL); in ih264e_join_threads()
136 ps_codec->ai4_process_thread_created[i] = 0; in ih264e_join_threads()
141 ps_codec->i4_proc_thread_cnt = 0; in ih264e_join_threads()
205 codec_t *ps_codec = (codec_t *)ps_codec_obj->pv_codec_handle; in ih264e_encode() local
246 ps_codec->i4_encode_api_call_cnt += 1; in ih264e_encode()
249 ctxt_sel = ps_codec->i4_encode_api_call_cnt % MAX_CTXT_SETS; in ih264e_encode()
252 ps_codec->ai4_pic_cnt[ctxt_sel] = -1; in ih264e_encode()
253 ps_codec->s_rate_control.post_encode_skip[ctxt_sel] = 0; in ih264e_encode()
254 ps_codec->s_rate_control.pre_encode_skip[ctxt_sel] = 0; in ih264e_encode()
257 ps_codec->as_out_buf[ctxt_sel] = s_out_buf; in ih264e_encode()
260 if (ps_codec->i4_encode_api_call_cnt == 0) in ih264e_encode()
262 ih264e_codec_init(ps_codec); in ih264e_encode()
268 cfg_params_t *ps_cfg = &ps_codec->as_cfg[i]; in ih264e_encode()
277 error_status |= ih264e_codec_update_config(ps_codec, ps_cfg); in ih264e_encode()
293 ps_codec->i4_header_mode != 1) in ih264e_encode()
301 ps_codec->s_cfg.e_inp_color_fmt, in ih264e_encode()
302 ps_codec->s_cfg.u4_disp_wd, in ih264e_encode()
303 ps_codec->s_cfg.u4_disp_ht); in ih264e_encode()
308 if (ps_codec->s_cfg.u4_enable_alt_ref || ps_codec->s_cfg.u4_num_bframes) in ih264e_encode()
310 ps_codec->i4_non_ref_frames_in_stream = 1; in ih264e_encode()
313 if (ps_codec->i4_encode_api_call_cnt == 0) in ih264e_encode()
324 error_status |= ih264e_mv_buf_mgr_add_bufs(ps_codec); in ih264e_encode()
331 error_status |= ih264e_pic_buf_mgr_add_bufs(ps_codec); in ih264e_encode()
338 if (ps_codec->i4_header_mode == 0 && in ih264e_encode()
339 ps_codec->u4_header_generated == 0) in ih264e_encode()
341 ps_codec->i4_gen_header = 1; in ih264e_encode()
346 if (ps_codec->i4_header_mode == 1) in ih264e_encode()
351 ps_codec->force_curr_frame_type = IV_IDR_FRAME; in ih264e_encode()
354 error_status |= ih264e_generate_sps_pps(ps_codec); in ih264e_encode()
357 ps_codec->i4_encode_api_call_cnt --; in ih264e_encode()
360 ps_codec->i4_header_mode = 0; in ih264e_encode()
361 ps_codec->i4_gen_header = 0; in ih264e_encode()
373 ps_video_encode_op->s_ive_op.s_out_buf = ps_codec->as_out_buf[ctxt_sel].s_bits_buf; in ih264e_encode()
382 ps_codec->u4_header_generated = 1; in ih264e_encode()
388 ps_codec->i4_pic_cnt += 1; in ih264e_encode()
392 ps_codec, &ps_video_encode_ip->s_ive_ip, &s_inp_buf); in ih264e_encode()
404 process_ctxt_t *ps_proc = &ps_codec->as_process[proc_ctxt_select]; in ih264e_encode()
409 WORD32 num_thread_cnt = ps_codec->s_cfg.u4_num_cores - 1; in ih264e_encode()
412 ps_codec->ai4_pic_cnt[ctxt_sel] = ps_codec->i4_pic_cnt; in ih264e_encode()
415 error_status |= ih264e_pic_init(ps_codec, &s_inp_buf); in ih264e_encode()
423 ret = ithread_create(ps_codec->apv_proc_thread_handle[i], in ih264e_encode()
426 &ps_codec->as_process[i + 1]); in ih264e_encode()
433 ps_codec->ai4_process_thread_created[i] = 1; in ih264e_encode()
435 ps_codec->i4_proc_thread_cnt++; in ih264e_encode()
443 ih264e_join_threads(ps_codec); in ih264e_encode()
445 ih264_list_reset(ps_codec->pv_proc_jobq); in ih264e_encode()
447 ih264_list_reset(ps_codec->pv_entropy_jobq); in ih264e_encode()
476 if (ps_codec->s_cfg.u4_enable_recon && (ps_codec->i4_frame_num > 1 || s_inp_buf.u4_is_last) in ih264e_encode()
485 if (ps_codec->s_rate_control.post_encode_skip[ctxt_sel] in ih264e_encode()
496 for (i = 0; i < ps_codec->i4_ref_buf_cnt; i++) in ih264e_encode()
498 if (ps_codec->as_ref_set[i].i4_pic_cnt == -1) in ih264e_encode()
502 ps_codec->pv_ref_buf_mgr, in ih264e_encode()
503 ps_codec->as_ref_set[i].ps_pic_buf->i4_buf_id); in ih264e_encode()
506 && (ps_codec->as_ref_set[i].i4_poc < i4_curr_poc)) in ih264e_encode()
508 ps_pic_buf = ps_codec->as_ref_set[i].ps_pic_buf; in ih264e_encode()
509 i4_curr_poc = ps_codec->as_ref_set[i].i4_poc; in ih264e_encode()
529 ih264e_fmt_conv(ps_codec, in ih264e_encode()
536 0, ps_codec->s_cfg.u4_disp_ht); in ih264e_encode()
540 ret = ih264_buf_mgr_release(ps_codec->pv_ref_buf_mgr, in ih264e_encode()
561 if (ps_codec->s_rate_control.post_encode_skip[ctxt_sel]) in ih264e_encode()
573 ps_codec->i4_poc--; in ih264e_encode()
578 for (i = 0; i < ps_codec->i4_ref_buf_cnt; i++) in ih264e_encode()
580 if (ps_codec->i4_pic_cnt == ps_codec->as_ref_set[i].i4_pic_cnt) in ih264e_encode()
583 ps_cur_pic = ps_codec->as_ref_set[i].ps_pic_buf; in ih264e_encode()
585 ps_cur_mv_buf = ps_codec->as_ref_set[i].ps_mv_buf; in ih264e_encode()
588 … ret = ih264_buf_mgr_release(ps_codec->pv_mv_buf_mgr, ps_cur_mv_buf->i4_buf_id , BUF_MGR_REF); in ih264e_encode()
589 … ret |= ih264_buf_mgr_release(ps_codec->pv_mv_buf_mgr, ps_cur_mv_buf->i4_buf_id , BUF_MGR_IO); in ih264e_encode()
595 … ret = ih264_buf_mgr_release(ps_codec->pv_ref_buf_mgr, ps_cur_pic->i4_buf_id , BUF_MGR_REF); in ih264e_encode()
596 … ret |= ih264_buf_mgr_release(ps_codec->pv_ref_buf_mgr, ps_cur_pic->i4_buf_id , BUF_MGR_IO); in ih264e_encode()
612 if (ps_codec->s_cfg.u4_enable_recon) in ih264e_encode()
616 for (i = 0; i < ps_codec->i4_ref_buf_cnt; i++) in ih264e_encode()
618 if (ps_codec->as_ref_set[i].i4_pic_cnt == -1) in ih264e_encode()
622 ps_codec->pv_ref_buf_mgr, in ih264e_encode()
623 ps_codec->as_ref_set[i].ps_pic_buf->i4_buf_id); in ih264e_encode()
647 && !ps_codec->s_rate_control.post_encode_skip[ctxt_sel] in ih264e_encode()
652 s_out_buf = ps_codec->as_out_buf[ctxt_sel]; in ih264e_encode()
663 switch (ps_codec->pic_type) in ih264e_encode()
686 for (i = 0; i < (WORD32)ps_codec->s_cfg.u4_num_cores; i++) in ih264e_encode()
688 error_status |= ps_codec->as_process[ctxt_sel + i].i4_error_code; in ih264e_encode()
701 process_ctxt_t *ps_proc = &ps_codec->as_process[proc_ctxt_select]; in ih264e_encode()
704 s_out_buf = ps_codec->as_out_buf[ctxt_sel]; in ih264e_encode()