Lines Matching refs:frame
37 void mpp_hevc_unref_frame(HEVCContext *s, HEVCFrame *frame, int flags) in mpp_hevc_unref_frame() argument
40 if (!frame->frame || (frame->slot_index == 0xff)) in mpp_hevc_unref_frame()
43 frame->flags &= ~flags; in mpp_hevc_unref_frame()
44 if (!frame->flags) { in mpp_hevc_unref_frame()
45 frame->refPicList = NULL; in mpp_hevc_unref_frame()
46 frame->collocated_ref = NULL; in mpp_hevc_unref_frame()
47 if (frame->slot_index <= 0x7f) { in mpp_hevc_unref_frame()
48 h265d_dbg(H265D_DBG_REF, "poc %d clr ref index %d", frame->poc, frame->slot_index); in mpp_hevc_unref_frame()
49 mpp_buf_slot_clr_flag(s->slots, frame->slot_index, SLOT_CODEC_USE); in mpp_hevc_unref_frame()
51 …h265d_dbg(H265D_DBG_REF, "unref_frame poc %d frame->slot_index %d \n", frame->poc, frame->slot_ind… in mpp_hevc_unref_frame()
52 frame->poc = INT_MAX; in mpp_hevc_unref_frame()
53 frame->slot_index = 0xff; in mpp_hevc_unref_frame()
54 frame->error_flag = 0; in mpp_hevc_unref_frame()
89 HEVCFrame *frame = &s->DPB[i]; in alloc_frame() local
90 if (frame->slot_index != 0xff) { in alloc_frame()
95 mpp_frame_set_width(frame->frame, s->h265dctx->width); in alloc_frame()
96 mpp_frame_set_height(frame->frame, s->h265dctx->height); in alloc_frame()
97 mpp_frame_set_hor_stride(frame->frame, in alloc_frame()
99 mpp_frame_set_ver_stride(frame->frame, s->h265dctx->coded_height); in alloc_frame()
105 mpp_frame_set_fmt(frame->frame, s->h265dctx->pix_fmt); in alloc_frame()
111 mpp_frame_set_offset_x(frame->frame, 0); in alloc_frame()
112 mpp_frame_set_offset_y(frame->frame, 4); in alloc_frame()
115 mpp_frame_set_ver_stride(frame->frame, s->h265dctx->coded_height + 16); in alloc_frame()
120 mpp_frame_set_fbc_hdr_stride(frame->frame, fbc_hdr_stride); in alloc_frame()
126 mpp_frame_set_mode(frame->frame, MPP_FRAME_FLAG_DEINTERLACED); in alloc_frame()
130 mpp_frame_set_thumbnail_en(frame->frame, s->h265dctx->cfg->base.enable_thumbnail); in alloc_frame()
132 mpp_frame_set_thumbnail_en(frame->frame, 0); in alloc_frame()
134 mpp_frame_set_errinfo(frame->frame, 0); in alloc_frame()
135 mpp_frame_set_discard(frame->frame, 0); in alloc_frame()
136 mpp_frame_set_pts(frame->frame, s->pts); in alloc_frame()
137 mpp_frame_set_dts(frame->frame, s->dts); in alloc_frame()
138 mpp_frame_set_poc(frame->frame, s->poc); in alloc_frame()
139 mpp_frame_set_color_range(frame->frame, s->h265dctx->color_range); in alloc_frame()
140 mpp_frame_set_color_primaries(frame->frame, s->sps->vui.colour_primaries); in alloc_frame()
142 mpp_frame_set_color_trc(frame->frame, in alloc_frame()
145 mpp_frame_set_color_trc(frame->frame, s->sps->vui.transfer_characteristic); in alloc_frame()
146 mpp_frame_set_colorspace(frame->frame, s->h265dctx->colorspace); in alloc_frame()
147 mpp_frame_set_mastering_display(frame->frame, s->mastering_display); in alloc_frame()
148 mpp_frame_set_content_light(frame->frame, s->content_light); in alloc_frame()
152 ret = mpp_buf_slot_get_unused(s->slots, &frame->slot_index); in alloc_frame()
154 return frame; in alloc_frame()
168 HEVCFrame *frame = &s->DPB[i]; in mpp_hevc_set_new_ref() local
170 if ((frame->slot_index != 0xff) && frame->sequence == s->seq_decode && in mpp_hevc_set_new_ref()
171 frame->poc == poc && !s->nuh_layer_id) { in mpp_hevc_set_new_ref()
185 mpp_frame_set_hdr_dynamic_meta(ref->frame, s->hdr_dynamic_meta); in mpp_hevc_set_new_ref()
189 *mframe = ref->frame; in mpp_hevc_set_new_ref()
227 static void mark_ref(HEVCFrame *frame, int flag) in mark_ref() argument
229 frame->flags &= ~(HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF); in mark_ref()
230 frame->flags |= flag; in mark_ref()
235 HEVCFrame *frame; in generate_missing_ref() local
237 frame = alloc_frame(s); in generate_missing_ref()
238 if (!frame) in generate_missing_ref()
240 frame->poc = poc; in generate_missing_ref()
242 mpp_frame_set_errinfo(frame->frame, 1); in generate_missing_ref()
243 mpp_buf_slot_set_prop(s->slots, frame->slot_index, SLOT_FRAME, frame->frame); in generate_missing_ref()
244 mpp_buf_slot_set_flag(s->slots, frame->slot_index, SLOT_CODEC_READY); in generate_missing_ref()
245 mpp_buf_slot_set_flag(s->slots, frame->slot_index, SLOT_CODEC_USE); in generate_missing_ref()
246 mpp_frame_set_poc(frame->frame, poc); in generate_missing_ref()
247 …h265d_dbg(H265D_DBG_REF, "generate_missing_ref frame poc %d slot_index %d", poc, frame->slot_index… in generate_missing_ref()
248 frame->sequence = s->seq_decode; in generate_missing_ref()
249 frame->flags = 0; in generate_missing_ref()
250 return frame; in generate_missing_ref()
297 HEVCFrame *frame = &s->DPB[i]; in mpp_hevc_frame_rps() local
298 mark_ref(frame, 0); in mpp_hevc_frame_rps()