goto finish;
ret = ff_vaapi_render_picture(vactx,
- ff_vaapi_get_surface_id(s->current_picture_ptr));
+ ff_vaapi_get_surface_id(&s->current_picture_ptr->f));
if (ret < 0)
goto finish;
pic_structure = pic->reference;
pic_structure &= PICT_FRAME; /* PICT_TOP_FIELD|PICT_BOTTOM_FIELD */
- va_pic->picture_id = ff_vaapi_get_surface_id(pic);
+ va_pic->picture_id = ff_vaapi_get_surface_id(&pic->f);
va_pic->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num;
va_pic->flags = 0;
for (i = 0; i < dpb->size; i++) {
VAPictureH264 * const va_pic = &dpb->va_pics[i];
- if (va_pic->picture_id == ff_vaapi_get_surface_id(pic)) {
+ if (va_pic->picture_id == ff_vaapi_get_surface_id(&pic->f)) {
VAPictureH264 temp_va_pic;
fill_vaapi_pic(&temp_va_pic, pic, 0);
if (ret < 0)
goto finish;
- ret = ff_vaapi_render_picture(vactx, ff_vaapi_get_surface_id(h->cur_pic_ptr));
+ ret = ff_vaapi_render_picture(vactx, ff_vaapi_get_surface_id(&h->cur_pic_ptr->f));
if (ret < 0)
goto finish;
* @{
*/
-/** Extract VASurfaceID from a Picture */
-static inline VASurfaceID ff_vaapi_get_surface_id(Picture *pic)
+/** Extract VASurfaceID from an AVFrame */
+static inline VASurfaceID ff_vaapi_get_surface_id(AVFrame *pic)
{
- return (uintptr_t)pic->f.data[3];
+ return (uintptr_t)pic->data[3];
}
/** Common AVHWAccel.end_frame() implementation */
switch (s->pict_type) {
case AV_PICTURE_TYPE_B:
- pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
+ pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture.f);
// fall-through
case AV_PICTURE_TYPE_P:
- pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
+ pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture.f);
break;
}
pic_param->TRD = s->pp_time;
if (s->pict_type == AV_PICTURE_TYPE_B)
- pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
+ pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture.f);
if (s->pict_type != AV_PICTURE_TYPE_I)
- pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
+ pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture.f);
/* Fill in VAIQMatrixBufferMPEG4 */
/* Only the first inverse quantisation method uses the weighting matrices */
switch (s->pict_type) {
case AV_PICTURE_TYPE_B:
- pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
+ pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture.f);
// fall-through
case AV_PICTURE_TYPE_P:
- pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
+ pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture.f);
break;
}