MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / fill_vaapi_reference_frames

Function fill_vaapi_reference_frames

libavcodec/vaapi_hevc.c:99–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99static void fill_vaapi_reference_frames(const HEVCContext *h, const HEVCLayerContext *l,
100 VAPictureParameterBufferHEVC *pp)
101{
102 const HEVCFrame *current_picture = h->cur_frame;
103 int i, j, rps_type;
104
105 for (i = 0, j = 0; i < FF_ARRAY_ELEMS(pp->ReferenceFrames); i++) {
106 const HEVCFrame *frame = NULL;
107
108 while (!frame && j < FF_ARRAY_ELEMS(l->DPB)) {
109 if ((&l->DPB[j] != current_picture || h->pps->pps_curr_pic_ref_enabled_flag) &&
110 (l->DPB[j].flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF)))
111 frame = &l->DPB[j];
112 j++;
113 }
114
115 init_vaapi_pic(&pp->ReferenceFrames[i]);
116
117 if (frame) {
118 rps_type = find_frame_rps_type(h, frame);
119 fill_vaapi_pic(&pp->ReferenceFrames[i], frame, rps_type);
120 }
121 }
122}
123
124static int vaapi_hevc_start_frame(AVCodecContext *avctx,
125 av_unused const AVBufferRef *buffer_ref,

Callers 1

vaapi_hevc_start_frameFunction · 0.70

Calls 3

find_frame_rps_typeFunction · 0.85
init_vaapi_picFunction · 0.70
fill_vaapi_picFunction · 0.70

Tested by

no test coverage detected