| 97 | } |
| 98 | |
| 99 | static 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 | |
| 124 | static int vaapi_hevc_start_frame(AVCodecContext *avctx, |
| 125 | av_unused const AVBufferRef *buffer_ref, |
no test coverage detected