Lines Matching refs:h

53 static void fill_picture_parameters(const HEVCContext *h,  in fill_picture_parameters()  argument
56 const HEVCFrame *current_picture = h->ref; in fill_picture_parameters()
57 const HEVCPPS *pps = (HEVCPPS *)h->pps_list[h->sh.pps_id]; in fill_picture_parameters()
58 const HEVCSPS *sps = (HEVCSPS *)h->sps_list[pps->sps_id]; in fill_picture_parameters()
61 const ShortTermRPS *cur_src_rps = h->sh.short_term_rps; in fill_picture_parameters()
72 pp->pps_id = h->sh.pps_id; in fill_picture_parameters()
101 if (h->sh.short_term_ref_pic_set_sps_flag == 0 && h->sh.short_term_rps) { in fill_picture_parameters()
102 pp->ucNumDeltaPocsOfRefRpsIdx = h->sh.short_term_rps->rps_idx_num_delta_pocs; in fill_picture_parameters()
103 pp->wNumBitsForShortTermRPSInSlice = h->sh.short_term_ref_pic_set_size; in fill_picture_parameters()
143 pp->IdrPicFlag = (h->first_nal_type == 19 || h->first_nal_type == 20); in fill_picture_parameters()
144 pp->IrapPicFlag = (h->first_nal_type >= 16 && h->first_nal_type <= 23); in fill_picture_parameters()
145 …pp->IntraPicFlag = (h->first_nal_type >= 16 && h->first_nal_type <= 23) || h->sh.slice_type == I_… in fill_picture_parameters()
166 pp->CurrPicOrderCntVal = h->poc; in fill_picture_parameters()
167 pp->ps_update_flag = h->ps_need_upate; in fill_picture_parameters()
168 pp->rps_update_flag = h->rps_need_upate || h->ps_need_upate; in fill_picture_parameters()
177 RK_U32 n_pics = h->sh.short_term_rps->num_negative_pics; in fill_picture_parameters()
211 for (j = 0; j < (RK_U32)h->rps[i].nb_refs; j++) { in fill_picture_parameters()
215 rps_used[nb_rps_used++] = h->rps[i].list[j]; in fill_picture_parameters()
224 while (!frame && j < MPP_ARRAY_ELEMS(h->DPB)) { in fill_picture_parameters()
225 if (&h->DPB[j] != current_picture && in fill_picture_parameters()
226 (h->DPB[j].flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) { in fill_picture_parameters()
229 if (rps_used[k] == (RK_U32)h->DPB[j].poc) { in fill_picture_parameters()
230 frame = &h->DPB[j]; in fill_picture_parameters()
240 mpp_buf_slot_set_flag(h->slots, frame->slot_index, SLOT_HAL_INPUT); in fill_picture_parameters()
241 h->task->refer[i] = frame->slot_index; in fill_picture_parameters()
246 h->task->refer[i] = -1; in fill_picture_parameters()
251 const RefPicList *rpl = &h->rps[ref_idx]; \ in fill_picture_parameters()
299 static void fill_scaling_lists(const HEVCContext *h, DXVA_Qmatrix_HEVC *qm) in fill_scaling_lists() argument
302 const HEVCPPS *pps = (HEVCPPS *)h->pps_list[h->sh.pps_id]; in fill_scaling_lists()
303 const HEVCSPS *sps = (HEVCSPS *)h->sps_list[pps->sps_id]; in fill_scaling_lists()
350 const HEVCContext *h = (const HEVCContext *)h265dctx->priv_data; in h265d_parser2_syntax() local
352 h265d_dxva2_picture_context_t *ctx_pic = (h265d_dxva2_picture_context_t *)h->hal_pic_private; in h265d_parser2_syntax()
355 fill_picture_parameters(h, &ctx_pic->pp); in h265d_parser2_syntax()
358 fill_scaling_lists(h, &ctx_pic->qm); in h265d_parser2_syntax()
366 const HEVCContext *h = (const HEVCContext *)h265dctx->priv_data; in h265d_syntax_fill_slice() local
367 h265d_dxva2_picture_context_t *ctx_pic = (h265d_dxva2_picture_context_t *)h->hal_pic_private; in h265d_syntax_fill_slice()
376 mpp_buf_slot_get_prop(h->packet_slots, input_index, SLOT_BUFFER, &streambuf); in h265d_syntax_fill_slice()
383 current = (RK_U8 *)mpp_packet_get_data(h->input_packet); in h265d_syntax_fill_slice()
384 size = (RK_U32)mpp_packet_get_size(h->input_packet); in h265d_syntax_fill_slice()
385 for (i = 0; i < h->nb_nals; i++) { in h265d_syntax_fill_slice()
386 length += h->nals[i].size + 4; in h265d_syntax_fill_slice()
393 mpp_packet_set_data(h->input_packet, (void*)current); in h265d_syntax_fill_slice()
394 mpp_packet_set_size(h->input_packet, buff_size); in h265d_syntax_fill_slice()
397 if (ctx_pic->max_slice_num < h->nb_nals) { in h265d_syntax_fill_slice()
401 … ctx_pic->slice_short = (DXVA_Slice_HEVC_Short *)mpp_malloc(DXVA_Slice_HEVC_Short, h->nb_nals); in h265d_syntax_fill_slice()
407 …->slice_cut_param = (DXVA_Slice_HEVC_Cut_Param *)mpp_malloc(DXVA_Slice_HEVC_Cut_Param, h->nb_nals); in h265d_syntax_fill_slice()
411 ctx_pic->max_slice_num = h->nb_nals; in h265d_syntax_fill_slice()
413 for (i = 0; i < h->nb_nals; i++) { in h265d_syntax_fill_slice()
420 mpp_set_bitread_ctx(&gb_cxt, (RK_U8 *)h->nals[i].data, in h265d_syntax_fill_slice()
421 h->nals[i].size); in h265d_syntax_fill_slice()
436 memcpy(current, h->nals[i].data, h->nals[i].size); in h265d_syntax_fill_slice()
438 fill_slice_short(&ctx_pic->slice_short[count], position, h->nals[i].size); in h265d_syntax_fill_slice()
440 current += h->nals[i].size; in h265d_syntax_fill_slice()
441 position += h->nals[i].size; in h265d_syntax_fill_slice()
449 mpp_buf_slot_set_flag(h->packet_slots, input_index, SLOT_CODEC_READY); in h265d_syntax_fill_slice()
450 mpp_buf_slot_set_flag(h->packet_slots, input_index, SLOT_HAL_INPUT); in h265d_syntax_fill_slice()
453 mpp_packet_set_length(h->input_packet, position); in h265d_syntax_fill_slice()