Fills in VA API reference frames array. */
| 119 | |
| 120 | /** Fills in VA API reference frames array. */ |
| 121 | static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param, |
| 122 | H264Context *h) |
| 123 | { |
| 124 | DPB dpb; |
| 125 | int i; |
| 126 | |
| 127 | dpb.size = 0; |
| 128 | dpb.max_size = FF_ARRAY_ELEMS(pic_param->ReferenceFrames); |
| 129 | dpb.va_pics = pic_param->ReferenceFrames; |
| 130 | for (i = 0; i < dpb.max_size; i++) |
| 131 | init_vaapi_pic(&dpb.va_pics[i]); |
| 132 | |
| 133 | for (i = 0; i < h->short_ref_count; i++) { |
| 134 | Picture * const pic = h->short_ref[i]; |
| 135 | if (pic && pic->reference && dpb_add(&dpb, pic) < 0) |
| 136 | return -1; |
| 137 | } |
| 138 | |
| 139 | for (i = 0; i < 16; i++) { |
| 140 | Picture * const pic = h->long_ref[i]; |
| 141 | if (pic && pic->reference && dpb_add(&dpb, pic) < 0) |
| 142 | return -1; |
| 143 | } |
| 144 | return 0; |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * Fills in VA API reference picture lists from the FFmpeg reference |
no test coverage detected