Lines Matching refs:ps_codec
138 IH264E_ERROR_T ih264e_generate_sps_pps(codec_t *ps_codec) in ih264e_generate_sps_pps() argument
141 WORD32 ctxt_sel = ps_codec->i4_encode_api_call_cnt % MAX_CTXT_SETS; in ih264e_generate_sps_pps()
144 entropy_ctxt_t *ps_entropy = &ps_codec->as_process[ctxt_sel * MAX_PROCESS_THREADS].s_entropy; in ih264e_generate_sps_pps()
156 out_buf_t *ps_out_buf = &ps_codec->as_out_buf[ctxt_sel]; in ih264e_generate_sps_pps()
168 ps_codec->i4_pps_id %= MAX_PPS_CNT; in ih264e_generate_sps_pps()
171 ps_codec->i4_sps_id %= MAX_SPS_CNT; in ih264e_generate_sps_pps()
174 ps_sps = ps_codec->ps_sps_base + ps_codec->i4_sps_id; in ih264e_generate_sps_pps()
175 ih264e_populate_sps(ps_codec, ps_sps); in ih264e_generate_sps_pps()
178 ps_pps = ps_codec->ps_pps_base + ps_codec->i4_pps_id; in ih264e_generate_sps_pps()
179 ih264e_populate_pps(ps_codec, ps_pps); in ih264e_generate_sps_pps()
185 &ps_codec->s_cfg.s_vui); in ih264e_generate_sps_pps()
219 codec_t *ps_codec = ps_proc->ps_codec; in ih264e_init_entropy_ctxt() local
244 ps_entropy->i4_mb_y * ps_codec->u4_size_coeff_data; in ih264e_init_entropy_ctxt()
248 ps_entropy->i4_mb_y * ps_codec->u4_size_header_data; in ih264e_init_entropy_ctxt()
279 codec_t *ps_codec = ps_proc->ps_codec; in ih264e_entropy() local
355 s_out_buf = ps_codec->as_out_buf[ctxt_sel]; in ih264e_entropy()
376 &ps_codec->s_cfg.s_vui); in ih264e_entropy()
414 ps_entropy->i4_mb_y * ps_codec->u4_size_coeff_data; in ih264e_entropy()
418 ps_entropy->i4_mb_y * ps_codec->u4_size_header_data; in ih264e_entropy()
448 …ps_entropy->i4_error_code |= ps_codec->pf_write_mb_syntax_layer[ps_entropy->u1_entropy_coding_mode… in ih264e_entropy()
469 if (ps_codec->s_cfg.e_slice_mode == IVE_SLICE_MODE_BLOCKS) in ih264e_entropy()
550 && ps_codec->s_cfg.e_slice_mode in ih264e_entropy()
586 ps_codec, ctxt_sel, in ih264e_entropy()
587 (ps_proc->ps_codec->i4_poc == 0)); in ih264e_entropy()
590 if (ps_codec->s_rate_control.post_encode_skip[ctxt_sel]) in ih264e_entropy()
606 if (!ps_codec->s_rate_control.post_encode_skip[ctxt_sel] in ih264e_entropy()
607 && ps_codec->u4_is_curr_frm_ref) in ih264e_entropy()
609 ps_codec->i4_frame_num++; in ih264e_entropy()
614 ps_codec->as_out_buf[ctxt_sel].s_bits_buf.u4_bytes = in ih264e_entropy()
621 ps_codec->au4_entropy_thread_active[ctxt_sel] = 0; in ih264e_entropy()
889 codec_t *ps_codec = ps_proc->ps_codec; in ih264e_update_proc_ctxt() local
977 …ps_codec->pf_mem_cpy_mul8(ps_proc->au1_left_mb_intra_modes, ps_proc->au1_intra_luma_mb_4x4_modes, … in ih264e_update_proc_ctxt()
978 … ps_codec->pf_mem_cpy_mul8(pu1_top_mb_intra_modes, ps_proc->au1_intra_luma_mb_4x4_modes, 16); in ih264e_update_proc_ctxt()
1039 s_job.i2_mb_cnt = ps_codec->s_cfg.i4_wd_mbs; in ih264e_update_proc_ctxt()
1048 …s_job.i2_proc_base_idx = (ps_codec->i4_encode_api_call_cnt % MAX_CTXT_SETS) ? (MAX_PROCESS_CTXT / … in ih264e_update_proc_ctxt()
1054 ih264_list_terminate(ps_codec->pv_entropy_jobq); in ih264e_update_proc_ctxt()
1151 codec_t *ps_codec = ps_proc->ps_codec; in ih264e_init_proc_ctxt() local
1180 UWORD32 u4_pad_right_sz = ps_codec->s_cfg.u4_wd - ps_codec->s_cfg.u4_disp_wd; in ih264e_init_proc_ctxt()
1181 UWORD32 u4_pad_bottom_sz = ps_codec->s_cfg.u4_ht - ps_codec->s_cfg.u4_disp_ht; in ih264e_init_proc_ctxt()
1199 ps_codec->s_cfg.e_inp_color_fmt == IV_YUV_422ILE) in ih264e_init_proc_ctxt()
1203 ps_proc->pu1_src_buf_luma_base = ps_codec->pu1_y_csc_buf_base; in ih264e_init_proc_ctxt()
1204 i4_src_strd = ps_proc->i4_src_strd = ps_codec->s_cfg.u4_max_wd; in ih264e_init_proc_ctxt()
1205 …ps_proc->pu1_src_buf_luma = ps_proc->pu1_src_buf_luma_base + (i4_mb_x * MB_SIZE) + ps_codec->s_cfg… in ih264e_init_proc_ctxt()
1215 if (ps_codec->s_cfg.e_inp_color_fmt == IV_YUV_422ILE || in ih264e_init_proc_ctxt()
1216 ps_codec->s_cfg.e_inp_color_fmt == IV_YUV_420P || in ih264e_init_proc_ctxt()
1220 if ((ps_codec->s_cfg.e_inp_color_fmt == IV_YUV_420SP_UV) || in ih264e_init_proc_ctxt()
1221 (ps_codec->s_cfg.e_inp_color_fmt == IV_YUV_420SP_VU)) in ih264e_init_proc_ctxt()
1222 ps_proc->pu1_src_buf_chroma_base = ps_codec->pu1_uv_csc_buf_base; in ih264e_init_proc_ctxt()
1224 …c_buf_chroma = ps_proc->pu1_src_buf_chroma_base + (i4_mb_x * MB_SIZE) + ps_codec->s_cfg.u4_max_wd … in ih264e_init_proc_ctxt()
1225 i4_src_chroma_strd = ps_proc->i4_src_chroma_strd = ps_codec->s_cfg.u4_max_wd; in ih264e_init_proc_ctxt()
1246 switch (ps_codec->s_cfg.e_inp_color_fmt) in ih264e_init_proc_ctxt()
1270 memcpy(pu1_dst, pu1_src, ps_codec->s_cfg.u4_wd); in ih264e_init_proc_ctxt()
1283 num_rows = (ps_codec->s_cfg.u4_disp_ht >> 1) - (ps_proc->i4_mb_y * BLK8x8SIZE); in ih264e_init_proc_ctxt()
1288 memcpy(pu1_dst, pu1_src, ps_codec->s_cfg.u4_wd); in ih264e_init_proc_ctxt()
1306 ps_codec->pf_ih264e_conv_420p_to_420sp( in ih264e_init_proc_ctxt()
1310 ps_codec->s_cfg.u4_disp_wd, in ih264e_init_proc_ctxt()
1322 ps_codec->pf_ih264e_fmt_conv_422i_to_420sp( in ih264e_init_proc_ctxt()
1326 ps_codec->s_cfg.u4_disp_wd, u2_num_rows, in ih264e_init_proc_ctxt()
1339 u4_pad_wd = (UWORD32)(ps_proc->i4_src_strd - ps_codec->s_cfg.u4_disp_wd); in ih264e_init_proc_ctxt()
1346 ps_proc->pu1_src_buf_luma + ps_codec->s_cfg.u4_disp_wd, in ih264e_init_proc_ctxt()
1350 ps_proc->pu1_src_buf_chroma + ps_codec->s_cfg.u4_disp_wd, in ih264e_init_proc_ctxt()
1366 …ps_proc->pv_mb_coeff_data = ((UWORD8 *)ps_proc->pv_pic_mb_coeff_data) + i4_mb_y * ps_codec->u4_siz… in ih264e_init_proc_ctxt()
1369 …ps_proc->pv_mb_header_data = ((UWORD8 *)ps_proc->pv_pic_mb_header_data) + i4_mb_y * ps_codec->u4_s… in ih264e_init_proc_ctxt()
1493 codec_t *ps_codec = ps_proc->ps_codec; in ih264e_pad_recon_buffer() local
1501 ps_codec->pf_pad_left_luma(pu1_curr_pic_luma, i4_rec_strd, i4_pad_ht, PAD_LEFT); in ih264e_pad_recon_buffer()
1504 ps_codec->pf_pad_left_chroma(pu1_curr_pic_chroma, i4_rec_strd, i4_pad_ht >> 1, PAD_LEFT); in ih264e_pad_recon_buffer()
1509 ps_codec->pf_pad_right_luma(pu1_curr_pic_luma + MB_SIZE, i4_rec_strd, i4_pad_ht, PAD_RIGHT); in ih264e_pad_recon_buffer()
1512 …ps_codec->pf_pad_right_chroma(pu1_curr_pic_chroma + MB_SIZE, i4_rec_strd, i4_pad_ht >> 1, PAD_RIGH… in ih264e_pad_recon_buffer()
1520 ps_codec->pf_pad_bottom(pu1_rec_luma, i4_rec_strd, i4_rec_strd, PAD_BOT); in ih264e_pad_recon_buffer()
1523 ps_codec->pf_pad_bottom(pu1_rec_chroma, i4_rec_strd, i4_rec_strd, (PAD_BOT >> 1)); in ih264e_pad_recon_buffer()
1546 ps_codec->pf_pad_top(pu1_rec_luma, i4_rec_strd, wd, PAD_TOP); in ih264e_pad_recon_buffer()
1549 ps_codec->pf_pad_top(pu1_rec_chroma, i4_rec_strd, wd, (PAD_TOP >> 1)); in ih264e_pad_recon_buffer()
1594 codec_t *ps_codec = ps_proc->ps_codec; in ih264e_dblk_pad_hpel_processing_n_mbs() local
1639 ps_codec->pf_pad_left_luma(pu1_curr_pic_luma, i4_rec_strd, MB_SIZE, PAD_LEFT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1642 ps_codec->pf_pad_left_chroma(pu1_curr_pic_chroma, i4_rec_strd, MB_SIZE >> 1, PAD_LEFT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1648 … ps_codec->pf_pad_right_luma(pu1_curr_pic_luma + MB_SIZE, i4_rec_strd, MB_SIZE, PAD_RIGHT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1651 …ps_codec->pf_pad_right_chroma(pu1_curr_pic_chroma + MB_SIZE, i4_rec_strd, MB_SIZE >> 1, PAD_RIGHT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1701 …ps_codec->pf_pad_left_luma(ps_deblk->pu1_cur_pic_luma - i4_rec_strd * MB_SIZE, i4_rec_strd, MB_SIZ… in ih264e_dblk_pad_hpel_processing_n_mbs()
1704 …ps_codec->pf_pad_left_chroma(ps_deblk->pu1_cur_pic_chroma - i4_rec_strd * BLK8x8SIZE, i4_rec_strd,… in ih264e_dblk_pad_hpel_processing_n_mbs()
1710 …ps_codec->pf_pad_right_luma(ps_deblk->pu1_cur_pic_luma - i4_rec_strd * MB_SIZE + MB_SIZE, i4_rec_s… in ih264e_dblk_pad_hpel_processing_n_mbs()
1713 …ps_codec->pf_pad_right_chroma(ps_deblk->pu1_cur_pic_chroma - i4_rec_strd * BLK8x8SIZE + MB_SIZE, i… in ih264e_dblk_pad_hpel_processing_n_mbs()
1748 …ps_codec->pf_pad_top(ps_proc->pu1_rec_buf_luma_base + u4_pad_top, i4_rec_strd, u4_pad_wd, PAD_TOP); in ih264e_dblk_pad_hpel_processing_n_mbs()
1751 …ps_codec->pf_pad_top(ps_proc->pu1_rec_buf_chroma_base + u4_pad_top, i4_rec_strd, u4_pad_wd, (PAD_T… in ih264e_dblk_pad_hpel_processing_n_mbs()
1811 … ps_codec->pf_pad_left_luma(pu1_pad_src_luma, i4_rec_strd, MB_SIZE, PAD_LEFT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1814 … ps_codec->pf_pad_left_chroma(pu1_pad_src_chroma, i4_rec_strd, BLK8x8SIZE, PAD_LEFT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1820 … ps_codec->pf_pad_left_luma(pu1_pad_src_luma, i4_rec_strd, MB_SIZE, PAD_LEFT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1823 … ps_codec->pf_pad_left_chroma(pu1_pad_src_chroma, i4_rec_strd, BLK8x8SIZE, PAD_LEFT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1830 … ps_codec->pf_pad_right_luma(pu1_pad_src_luma, i4_rec_strd, MB_SIZE, PAD_RIGHT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1833 … ps_codec->pf_pad_right_chroma(pu1_pad_src_chroma, i4_rec_strd, BLK8x8SIZE, PAD_RIGHT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1839 … ps_codec->pf_pad_right_luma(pu1_pad_src_luma, i4_rec_strd, MB_SIZE, PAD_RIGHT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1842 … ps_codec->pf_pad_right_chroma(pu1_pad_src_chroma, i4_rec_strd, BLK8x8SIZE, PAD_RIGHT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1852 ps_codec->pf_pad_top(pu1_pad_top_src, i4_rec_strd, i4_rec_strd, PAD_TOP); in ih264e_dblk_pad_hpel_processing_n_mbs()
1856 … ps_codec->pf_pad_top(pu1_pad_top_src, i4_rec_strd, i4_rec_strd, (PAD_TOP >> 1)); in ih264e_dblk_pad_hpel_processing_n_mbs()
1861 ps_codec->pf_pad_bottom(pu1_pad_bottom_src, i4_rec_strd, i4_rec_strd, PAD_BOT); in ih264e_dblk_pad_hpel_processing_n_mbs()
1865 … ps_codec->pf_pad_bottom(pu1_pad_bottom_src, i4_rec_strd, i4_rec_strd, (PAD_BOT >> 1)); in ih264e_dblk_pad_hpel_processing_n_mbs()
1904 codec_t *ps_codec = ps_proc->ps_codec; in ih264e_process() local
1941 u4_valid_modes |= ps_codec->s_cfg.u4_enable_intra_16x16 ? (1 << I16x16) : 0; in ih264e_process()
1944 u4_valid_modes |= ps_codec->s_cfg.u4_enable_intra_8x8 ? (1 << I8x8) : 0; in ih264e_process()
1948 u4_valid_modes |= ps_codec->s_cfg.u4_enable_intra_4x4 ? (1 << I4x4) : 0; in ih264e_process()
1957 u4_valid_modes |= ps_codec->s_cfg.u4_enable_intra_16x16 ? (1 << I16x16) : 0; in ih264e_process()
1961 if (ps_codec->s_cfg.u4_enc_speed_preset == IVE_SLOWEST) in ih264e_process()
1963 u4_valid_modes |= ps_codec->s_cfg.u4_enable_intra_4x4 ? (1 << I4x4) : 0; in ih264e_process()
1975 u4_valid_modes |= ps_codec->s_cfg.u4_enable_intra_16x16 ? (1 << I16x16) : 0; in ih264e_process()
1979 if (ps_codec->s_cfg.u4_enc_speed_preset == IVE_SLOWEST) in ih264e_process()
1981 u4_valid_modes |= ps_codec->s_cfg.u4_enable_intra_4x4 ? (1 << I4x4) : 0; in ih264e_process()
1999 ps_proc->u4_compute_recon = ps_codec->u4_is_curr_frm_ref || in ih264e_process()
2000 ps_codec->s_cfg.u4_enable_recon; in ih264e_process()
2009 ps_proc->u4_min_sad = ps_codec->s_cfg.i4_min_sad; in ih264e_process()
2018 WORD32 i4_air_enable_inter = (ps_codec->s_cfg.e_air_mode == IVE_AIR_MODE_NONE) || in ih264e_process()
2019 (ps_codec->pu2_intr_rfrsh_map[i4_mb_id] != ps_codec->i4_air_pic_cnt); in ih264e_process()
2092 idx = MIN(idx, ((WORD32)ps_codec->s_cfg.i4_wd_mbs - 1)); in ih264e_process()
2101 … if (ps_proc->u4_min_sad_reached == 0 || ps_codec->s_cfg.u4_enc_speed_preset != IVE_FASTEST) in ih264e_process()
2105 … if (i4_air_enable_inter && ps_proc->i4_slice_type != ISLICE && ps_codec->u4_inter_gate) in ih264e_process()
2129 if (ps_codec->s_cfg.u4_enc_speed_preset == IVE_SLOWEST) in ih264e_process()
2183 u4_cbp_l = (ps_codec->luma_energy_compaction)[luma_idx](ps_proc); in ih264e_process()
2186 u4_cbp_c = (ps_codec->chroma_energy_compaction)[chroma_idx](ps_proc); in ih264e_process()
2276 …error_status |= ih264_buf_mgr_release(ps_codec->pv_mv_buf_mgr, ps_cur_mv_buf->i4_buf_id , BUF_MGR_… in ih264e_process()
2278 …error_status |= ih264_buf_mgr_release(ps_codec->pv_ref_buf_mgr, ps_cur_pic->i4_buf_id , BUF_MGR_CO… in ih264e_process()
2280 if (ps_codec->s_cfg.u4_enable_recon) in ih264e_process()
2283 ps_codec->as_rec_buf[ctxt_sel].i4_pic_cnt = ps_proc->i4_pic_cnt; in ih264e_process()
2286 ps_codec->as_rec_buf[ctxt_sel].s_pic_buf = *ps_proc->ps_cur_pic; in ih264e_process()
2289 ps_codec->as_rec_buf[ctxt_sel].u4_is_last = ps_proc->s_entropy.u4_is_last; in ih264e_process()
2292 … ps_codec->as_rec_buf[ctxt_sel].u4_timestamp_high = ps_proc->s_entropy.u4_timestamp_high; in ih264e_process()
2293 … ps_codec->as_rec_buf[ctxt_sel].u4_timestamp_low = ps_proc->s_entropy.u4_timestamp_low; in ih264e_process()
2299 DEBUG_HISTOGRAM_DUMP(ps_codec->s_cfg.i4_ht_mbs == ps_proc->i4_mb_y); in ih264e_process()
2332 WORD32 ih264e_update_rc_post_enc(codec_t *ps_codec, WORD32 ctxt_sel, WORD32 i4_is_first_frm) in ih264e_update_rc_post_enc() argument
2338 process_ctxt_t *ps_proc = &ps_codec->as_process[i4_proc_ctxt_sel_base]; in ih264e_update_rc_post_enc()
2341 UWORD8 u1_frame_qp = ps_codec->u4_frame_qp; in ih264e_update_rc_post_enc()
2361 for (i = 0; i < (WORD32)ps_codec->s_cfg.u4_num_cores; i++) in ih264e_update_rc_post_enc()
2388 switch (ps_codec->pic_type) in ih264e_update_rc_post_enc()
2406 i4_stuffing_byte = ih264e_rc_post_enc(ps_codec->s_rate_control.pps_rate_control_api, in ih264e_update_rc_post_enc()
2408 ps_codec->s_rate_control.pps_pd_frm_rate, in ih264e_update_rc_post_enc()
2409 ps_codec->s_rate_control.pps_time_stamp, in ih264e_update_rc_post_enc()
2410 ps_codec->s_rate_control.pps_frame_time, in ih264e_update_rc_post_enc()
2414 &ps_codec->s_rate_control.post_encode_skip[ctxt_sel], in ih264e_update_rc_post_enc()
2416 &ps_codec->s_rate_control.num_intra_in_prev_frame, in ih264e_update_rc_post_enc()
2417 &ps_codec->s_rate_control.i4_avg_activity); in ih264e_update_rc_post_enc()
2450 codec_t *ps_codec = ps_proc->ps_codec; in ih264e_process_thread() local
2466 int error = ithread_mutex_lock(ps_codec->pv_entropy_mutex); in ih264e_process_thread()
2469 WORD32 ctxt_sel = ps_codec->i4_encode_api_call_cnt % MAX_CTXT_SETS; in ih264e_process_thread()
2471 volatile UWORD32 *pu4_buf = &ps_codec->au4_entropy_thread_active[ctxt_sel]; in ih264e_process_thread()
2483 ithread_mutex_unlock(ps_codec->pv_entropy_mutex); in ih264e_process_thread()
2488 ithread_mutex_unlock(ps_codec->pv_entropy_mutex); in ih264e_process_thread()
2492 ithread_mutex_unlock(ps_codec->pv_entropy_mutex); in ih264e_process_thread()
2511 ps_proc = &ps_codec->as_process[ps_proc->i4_id + s_job.i2_proc_base_idx]; in ih264e_process_thread()