Lines Matching refs:dxva_cxt
223 h265d_dxva2_picture_context_t *dxva_cxt = (h265d_dxva2_picture_context_t*)dxva; in hal_h265d_v382_output_pps_packet() local
226 if (NULL == reg_ctx || dxva_cxt == NULL) { in hal_h265d_v382_output_pps_packet()
232 if (dxva_cxt->pp.ps_update_flag) { in hal_h265d_v382_output_pps_packet()
244 mpp_put_bits(&bp, dxva_cxt->pp.vps_id , 4); in hal_h265d_v382_output_pps_packet()
245 mpp_put_bits(&bp, dxva_cxt->pp.sps_id , 4); in hal_h265d_v382_output_pps_packet()
246 mpp_put_bits(&bp, dxva_cxt->pp.chroma_format_idc , 2); in hal_h265d_v382_output_pps_packet()
248 log2_min_cb_size = dxva_cxt->pp.log2_min_luma_coding_block_size_minus3 + 3; in hal_h265d_v382_output_pps_packet()
249 width = (dxva_cxt->pp.PicWidthInMinCbsY << log2_min_cb_size); in hal_h265d_v382_output_pps_packet()
250 height = (dxva_cxt->pp.PicHeightInMinCbsY << log2_min_cb_size); in hal_h265d_v382_output_pps_packet()
254 mpp_put_bits(&bp, dxva_cxt->pp.bit_depth_luma_minus8 + 8 , 4); in hal_h265d_v382_output_pps_packet()
255 mpp_put_bits(&bp, dxva_cxt->pp.bit_depth_chroma_minus8 + 8 , 4); in hal_h265d_v382_output_pps_packet()
256 mpp_put_bits(&bp, dxva_cxt->pp.log2_max_pic_order_cnt_lsb_minus4 + 4 , 5); in hal_h265d_v382_output_pps_packet()
257 …mpp_put_bits(&bp, dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size , 2); //log2_maxa_coding… in hal_h265d_v382_output_pps_packet()
258 mpp_put_bits(&bp, dxva_cxt->pp.log2_min_luma_coding_block_size_minus3 + 3 , 3); in hal_h265d_v382_output_pps_packet()
259 mpp_put_bits(&bp, dxva_cxt->pp.log2_min_transform_block_size_minus2 + 2 , 3); in hal_h265d_v382_output_pps_packet()
261 mpp_put_bits(&bp, dxva_cxt->pp.log2_diff_max_min_transform_block_size , 2); in hal_h265d_v382_output_pps_packet()
262 mpp_put_bits(&bp, dxva_cxt->pp.max_transform_hierarchy_depth_inter , 3); in hal_h265d_v382_output_pps_packet()
263 mpp_put_bits(&bp, dxva_cxt->pp.max_transform_hierarchy_depth_intra , 3); in hal_h265d_v382_output_pps_packet()
264 mpp_put_bits(&bp, dxva_cxt->pp.scaling_list_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
265 mpp_put_bits(&bp, dxva_cxt->pp.amp_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
266 mpp_put_bits(&bp, dxva_cxt->pp.sample_adaptive_offset_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
268 mpp_put_bits(&bp, dxva_cxt->pp.pcm_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
269 …mpp_put_bits(&bp, dxva_cxt->pp.pcm_enabled_flag ? (dxva_cxt->pp.pcm_sample_bit_depth_luma_minus1 +… in hal_h265d_v382_output_pps_packet()
270 …mpp_put_bits(&bp, dxva_cxt->pp.pcm_enabled_flag ? (dxva_cxt->pp.pcm_sample_bit_depth_chroma_minus1… in hal_h265d_v382_output_pps_packet()
271 …mpp_put_bits(&bp, dxva_cxt->pp.pcm_loop_filter_disabled_flag … in hal_h265d_v382_output_pps_packet()
272 …mpp_put_bits(&bp, dxva_cxt->pp.log2_diff_max_min_pcm_luma_coding_block_size … in hal_h265d_v382_output_pps_packet()
273 …mpp_put_bits(&bp, dxva_cxt->pp.pcm_enabled_flag ? (dxva_cxt->pp.log2_min_pcm_luma_coding_block_siz… in hal_h265d_v382_output_pps_packet()
275 mpp_put_bits(&bp, dxva_cxt->pp.num_short_term_ref_pic_sets , 7); in hal_h265d_v382_output_pps_packet()
276 mpp_put_bits(&bp, dxva_cxt->pp.long_term_ref_pics_present_flag , 1); in hal_h265d_v382_output_pps_packet()
277 mpp_put_bits(&bp, dxva_cxt->pp.num_long_term_ref_pics_sps , 6); in hal_h265d_v382_output_pps_packet()
278 mpp_put_bits(&bp, dxva_cxt->pp.sps_temporal_mvp_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
279 mpp_put_bits(&bp, dxva_cxt->pp.strong_intra_smoothing_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
284 mpp_put_bits(&bp, dxva_cxt->pp.sps_max_dec_pic_buffering_minus1, 4); in hal_h265d_v382_output_pps_packet()
288 mpp_put_bits(&bp, dxva_cxt->pp.pps_id , 6 ); in hal_h265d_v382_output_pps_packet()
289 mpp_put_bits(&bp, dxva_cxt->pp.sps_id , 4 ); in hal_h265d_v382_output_pps_packet()
290 mpp_put_bits(&bp, dxva_cxt->pp.dependent_slice_segments_enabled_flag , 1 ); in hal_h265d_v382_output_pps_packet()
291 mpp_put_bits(&bp, dxva_cxt->pp.output_flag_present_flag , 1 ); in hal_h265d_v382_output_pps_packet()
292 mpp_put_bits(&bp, dxva_cxt->pp.num_extra_slice_header_bits , 13); in hal_h265d_v382_output_pps_packet()
293 mpp_put_bits(&bp, dxva_cxt->pp.sign_data_hiding_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
294 mpp_put_bits(&bp, dxva_cxt->pp.cabac_init_present_flag , 1); in hal_h265d_v382_output_pps_packet()
295 mpp_put_bits(&bp, dxva_cxt->pp.num_ref_idx_l0_default_active_minus1 + 1 , 4);//31 bits in hal_h265d_v382_output_pps_packet()
296 mpp_put_bits(&bp, dxva_cxt->pp.num_ref_idx_l1_default_active_minus1 + 1 , 4); in hal_h265d_v382_output_pps_packet()
297 mpp_put_bits(&bp, dxva_cxt->pp.init_qp_minus26 , 7); in hal_h265d_v382_output_pps_packet()
298 mpp_put_bits(&bp, dxva_cxt->pp.constrained_intra_pred_flag , 1); in hal_h265d_v382_output_pps_packet()
299 mpp_put_bits(&bp, dxva_cxt->pp.transform_skip_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
300 mpp_put_bits(&bp, dxva_cxt->pp.cu_qp_delta_enabled_flag , 1); //164 in hal_h265d_v382_output_pps_packet()
302 dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size - in hal_h265d_v382_output_pps_packet()
303 dxva_cxt->pp.diff_cu_qp_delta_depth , 3); in hal_h265d_v382_output_pps_packet()
306 … dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size, dxva_cxt->pp.diff_cu_qp_delta_depth ); in hal_h265d_v382_output_pps_packet()
308 mpp_put_bits(&bp, dxva_cxt->pp.pps_cb_qp_offset , 5); in hal_h265d_v382_output_pps_packet()
309 mpp_put_bits(&bp, dxva_cxt->pp.pps_cr_qp_offset , 5); in hal_h265d_v382_output_pps_packet()
310 mpp_put_bits(&bp, dxva_cxt->pp.pps_slice_chroma_qp_offsets_present_flag , 1); in hal_h265d_v382_output_pps_packet()
311 mpp_put_bits(&bp, dxva_cxt->pp.weighted_pred_flag , 1); in hal_h265d_v382_output_pps_packet()
312 mpp_put_bits(&bp, dxva_cxt->pp.weighted_bipred_flag , 1); in hal_h265d_v382_output_pps_packet()
313 mpp_put_bits(&bp, dxva_cxt->pp.transquant_bypass_enabled_flag , 1 ); in hal_h265d_v382_output_pps_packet()
314 mpp_put_bits(&bp, dxva_cxt->pp.tiles_enabled_flag , 1 ); in hal_h265d_v382_output_pps_packet()
315 mpp_put_bits(&bp, dxva_cxt->pp.entropy_coding_sync_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
316 mpp_put_bits(&bp, dxva_cxt->pp.pps_loop_filter_across_slices_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
317 mpp_put_bits(&bp, dxva_cxt->pp.loop_filter_across_tiles_enabled_flag , 1); //185 in hal_h265d_v382_output_pps_packet()
318 mpp_put_bits(&bp, dxva_cxt->pp.deblocking_filter_override_enabled_flag , 1); in hal_h265d_v382_output_pps_packet()
319 mpp_put_bits(&bp, dxva_cxt->pp.pps_deblocking_filter_disabled_flag , 1); in hal_h265d_v382_output_pps_packet()
320 mpp_put_bits(&bp, dxva_cxt->pp.pps_beta_offset_div2 , 4); in hal_h265d_v382_output_pps_packet()
321 mpp_put_bits(&bp, dxva_cxt->pp.pps_tc_offset_div2 , 4); in hal_h265d_v382_output_pps_packet()
322 mpp_put_bits(&bp, dxva_cxt->pp.lists_modification_present_flag , 1); in hal_h265d_v382_output_pps_packet()
323 mpp_put_bits(&bp, dxva_cxt->pp.log2_parallel_merge_level_minus2 + 2 , 3); in hal_h265d_v382_output_pps_packet()
324 mpp_put_bits(&bp, dxva_cxt->pp.slice_segment_header_extension_present_flag , 1); in hal_h265d_v382_output_pps_packet()
326 …mpp_put_bits(&bp, dxva_cxt->pp.tiles_enabled_flag ? dxva_cxt->pp.num_tile_columns_minus1 + 1 : 0, … in hal_h265d_v382_output_pps_packet()
327 …mpp_put_bits(&bp, dxva_cxt->pp.tiles_enabled_flag ? dxva_cxt->pp.num_tile_rows_minus1 + 1 : 0 , 5 … in hal_h265d_v382_output_pps_packet()
338 if (dxva_cxt->pp.tiles_enabled_flag) { in hal_h265d_v382_output_pps_packet()
340 if (dxva_cxt->pp.uniform_spacing_flag == 0) { in hal_h265d_v382_output_pps_packet()
341 … RK_S32 maxcuwidth = dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size + log2_min_cb_size; in hal_h265d_v382_output_pps_packet()
347 for (i = 0; i < dxva_cxt->pp.num_tile_columns_minus1; i++) { in hal_h265d_v382_output_pps_packet()
348 column_width[i] = dxva_cxt->pp.column_width_minus1[i] + 1; in hal_h265d_v382_output_pps_packet()
354 for (i = 0; i < dxva_cxt->pp.num_tile_rows_minus1; i++) { in hal_h265d_v382_output_pps_packet()
355 row_height[i] = dxva_cxt->pp.row_height_minus1[i] + 1; in hal_h265d_v382_output_pps_packet()
364 … dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size)) - 1) in hal_h265d_v382_output_pps_packet()
366 … dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size)); in hal_h265d_v382_output_pps_packet()
369 … dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size)) - 1) in hal_h265d_v382_output_pps_packet()
371 … dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size)); in hal_h265d_v382_output_pps_packet()
373 for (i = 0; i < dxva_cxt->pp.num_tile_columns_minus1 + 1; i++) in hal_h265d_v382_output_pps_packet()
374 … column_width[i] = ((i + 1) * pic_in_cts_width) / (dxva_cxt->pp.num_tile_columns_minus1 + 1) - in hal_h265d_v382_output_pps_packet()
375 … (i * pic_in_cts_width) / (dxva_cxt->pp.num_tile_columns_minus1 + 1); in hal_h265d_v382_output_pps_packet()
377 for (i = 0; i < dxva_cxt->pp.num_tile_rows_minus1 + 1; i++) in hal_h265d_v382_output_pps_packet()
378 … row_height[i] = ((i + 1) * pic_in_cts_height) / (dxva_cxt->pp.num_tile_rows_minus1 + 1) - in hal_h265d_v382_output_pps_packet()
379 … (i * pic_in_cts_height) / (dxva_cxt->pp.num_tile_rows_minus1 + 1); in hal_h265d_v382_output_pps_packet()
383 …RK_S32 MaxCUWidth = (1 << (dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size + log2_min_cb_siz… in hal_h265d_v382_output_pps_packet()
406 if (dxva_cxt->pp.scaling_list_enabled_flag) { in hal_h265d_v382_output_pps_packet()
409 if (dxva_cxt->pp.scaling_list_data_present_flag) { in hal_h265d_v382_output_pps_packet()
410 addr = (dxva_cxt->pp.pps_id + 16) * 1360; in hal_h265d_v382_output_pps_packet()
411 } else if (dxva_cxt->pp.scaling_list_enabled_flag) { in hal_h265d_v382_output_pps_packet()
412 addr = dxva_cxt->pp.sps_id * 1360; in hal_h265d_v382_output_pps_packet()
443 h265d_dxva2_picture_context_t *dxva_cxt = (h265d_dxva2_picture_context_t*)dxva; in h265d_refine_rcb_size() local
444 DXVA_PicParams_HEVC *pp = &dxva_cxt->pp; in h265d_refine_rcb_size()
546 h265d_dxva2_picture_context_t *dxva_cxt = (h265d_dxva2_picture_context_t*)dxva; in hal_h265d_rcb_info_update() local
547 DXVA_PicParams_HEVC *pp = &dxva_cxt->pp; in hal_h265d_rcb_info_update()
563 h265d_refine_rcb_size((Vdpu382RcbInfo*)reg_ctx->rcb_info, hw_regs, width, height, dxva_cxt); in hal_h265d_rcb_info_update()
612 h265d_dxva2_picture_context_t *dxva_cxt = (h265d_dxva2_picture_context_t *)syn->dec.syntax.data; in hal_h265d_vdpu382_setup_colmv_buf() local
613 DXVA_PicParams_HEVC *pp = &dxva_cxt->pp; in hal_h265d_vdpu382_setup_colmv_buf()
616 RK_U32 log2_min_cb_size = dxva_cxt->pp.log2_min_luma_coding_block_size_minus3 + 3; in hal_h265d_vdpu382_setup_colmv_buf()
618 RK_U32 width = (dxva_cxt->pp.PicWidthInMinCbsY << log2_min_cb_size); in hal_h265d_vdpu382_setup_colmv_buf()
619 RK_U32 height = (dxva_cxt->pp.PicHeightInMinCbsY << log2_min_cb_size); in hal_h265d_vdpu382_setup_colmv_buf()
663 h265d_dxva2_picture_context_t *dxva_cxt = in hal_h265d_vdpu382_gen_regs() local
718 log2_min_cb_size = dxva_cxt->pp.log2_min_luma_coding_block_size_minus3 + 3; in hal_h265d_vdpu382_gen_regs()
720 width = (dxva_cxt->pp.PicWidthInMinCbsY << log2_min_cb_size); in hal_h265d_vdpu382_gen_regs()
721 height = (dxva_cxt->pp.PicHeightInMinCbsY << log2_min_cb_size); in hal_h265d_vdpu382_gen_regs()
730 mpp_buf_slot_get_prop(reg_ctx->slots, dxva_cxt->pp.CurrPic.Index7Bits, in hal_h265d_vdpu382_gen_regs()
741 hw_regs->common.reg017.slice_num = dxva_cxt->slice_count; in hal_h265d_vdpu382_gen_regs()
761 mpp_buf_slot_get_prop(reg_ctx->slots, dxva_cxt->pp.CurrPic.Index7Bits, in hal_h265d_vdpu382_gen_regs()
772 mv_buf = hal_bufs_get_buf(reg_ctx->cmv_bufs, dxva_cxt->pp.CurrPic.Index7Bits); in hal_h265d_vdpu382_gen_regs()
775 hw_regs->h265d_param.reg65.cur_top_poc = dxva_cxt->pp.CurrPicOrderCntVal; in hal_h265d_vdpu382_gen_regs()
779 if ( dxva_cxt->bitstream == NULL) { in hal_h265d_vdpu382_gen_regs()
780 dxva_cxt->bitstream = mpp_buffer_get_ptr(streambuf); in hal_h265d_vdpu382_gen_regs()
799 hw_regs->common.reg016_str_len = ((dxva_cxt->bitstream_size + 15) in hal_h265d_vdpu382_gen_regs()
804 aglin_offset = hw_regs->common.reg016_str_len - dxva_cxt->bitstream_size; in hal_h265d_vdpu382_gen_regs()
806 memset((void *)(dxva_cxt->bitstream + dxva_cxt->bitstream_size), 0, in hal_h265d_vdpu382_gen_regs()
835 reg_ctx->error_index[syn->dec.reg_index] = dxva_cxt->pp.CurrPic.Index7Bits; in hal_h265d_vdpu382_gen_regs()
840 for (i = 0; i < (RK_S32)MPP_ARRAY_ELEMS(dxva_cxt->pp.RefPicList); i++) { in hal_h265d_vdpu382_gen_regs()
841 if (dxva_cxt->pp.RefPicList[i].bPicEntry != 0xff && in hal_h265d_vdpu382_gen_regs()
842 dxva_cxt->pp.RefPicList[i].bPicEntry != 0x7f) { in hal_h265d_vdpu382_gen_regs()
845 hw_regs->h265d_param.reg67_82_ref_poc[i] = dxva_cxt->pp.PicOrderCntValList[i]; in hal_h265d_vdpu382_gen_regs()
847 dxva_cxt->pp.RefPicList[i].Index7Bits, in hal_h265d_vdpu382_gen_regs()
849 mpp_buf_slot_get_prop(reg_ctx->slots, dxva_cxt->pp.RefPicList[i].Index7Bits, in hal_h265d_vdpu382_gen_regs()
855 … if ((pocdistance(dxva_cxt->pp.PicOrderCntValList[i], dxva_cxt->pp.current_poc) < distance) in hal_h265d_vdpu382_gen_regs()
857 … distance = pocdistance(dxva_cxt->pp.PicOrderCntValList[i], dxva_cxt->pp.current_poc); in hal_h265d_vdpu382_gen_regs()
859 … reg_ctx->error_index[syn->dec.reg_index] = dxva_cxt->pp.RefPicList[i].Index7Bits; in hal_h265d_vdpu382_gen_regs()
867 mv_buf = hal_bufs_get_buf(reg_ctx->cmv_bufs, dxva_cxt->pp.RefPicList[i].Index7Bits); in hal_h265d_vdpu382_gen_regs()
874 if ((reg_ctx->error_index[syn->dec.reg_index] == dxva_cxt->pp.CurrPic.Index7Bits) && in hal_h265d_vdpu382_gen_regs()
875 !dxva_cxt->pp.IntraPicFlag) { in hal_h265d_vdpu382_gen_regs()
881 for (i = 0; i < (RK_S32)MPP_ARRAY_ELEMS(dxva_cxt->pp.RefPicList); i++) { in hal_h265d_vdpu382_gen_regs()
883 if (dxva_cxt->pp.RefPicList[i].bPicEntry != 0xff && in hal_h265d_vdpu382_gen_regs()
884 dxva_cxt->pp.RefPicList[i].bPicEntry != 0x7f) { in hal_h265d_vdpu382_gen_regs()
888 dxva_cxt->pp.RefPicList[i].Index7Bits, in hal_h265d_vdpu382_gen_regs()
891 mpp_buf_slot_get_prop(reg_ctx->slots, dxva_cxt->pp.RefPicList[i].Index7Bits, in hal_h265d_vdpu382_gen_regs()
904 if (reg_ctx->error_index[syn->dec.reg_index] == dxva_cxt->pp.CurrPic.Index7Bits) in hal_h265d_vdpu382_gen_regs()
914 hw_regs->common.reg013.cur_pic_is_idr = dxva_cxt->pp.IdrPicFlag;//p_hal->slice_long->idr_flag; in hal_h265d_vdpu382_gen_regs()
918 hal_h265d_rcb_info_update(hal, dxva_cxt, hw_regs, width, height); in hal_h265d_vdpu382_gen_regs()
925 mpp_buf_slot_get_prop(reg_ctx->slots, dxva_cxt->pp.CurrPic.Index7Bits, in hal_h265d_vdpu382_gen_regs()