diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index c8bbc03389..9730e124ab 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -2932,10 +2932,15 @@ init_picture( base_picture->structure = GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD; break; case GST_H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP: + GST_VAAPI_PICTURE_FLAG_SET(picture, GST_VAAPI_PICTURE_FLAG_RFF); + // fall-through case GST_H264_SEI_PIC_STRUCT_TOP_BOTTOM: if (GST_VAAPI_PICTURE_IS_FIRST_FIELD(picture)) GST_VAAPI_PICTURE_FLAG_SET(picture, GST_VAAPI_PICTURE_FLAG_TFF); break; + case GST_H264_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM: + GST_VAAPI_PICTURE_FLAG_SET(picture, GST_VAAPI_PICTURE_FLAG_RFF); + break; } picture->structure = base_picture->structure; diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c index 516ff69cb0..c8cbfbe31a 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c @@ -114,7 +114,7 @@ gst_vaapi_picture_create (GstVaapiPicture * picture, GST_VAAPI_PICTURE_FLAG_REFERENCE | GST_VAAPI_PICTURE_FLAG_INTERLACED | GST_VAAPI_PICTURE_FLAG_FF | GST_VAAPI_PICTURE_FLAG_TFF | - GST_VAAPI_PICTURE_FLAG_MVC)); + GST_VAAPI_PICTURE_FLAG_RFF | GST_VAAPI_PICTURE_FLAG_MVC)); picture->structure = parent_picture->structure; if ((args->flags & GST_VAAPI_CREATE_PICTURE_FLAG_FIELD) && @@ -342,6 +342,8 @@ do_output (GstVaapiPicture * picture) flags |= GST_VAAPI_SURFACE_PROXY_FLAG_INTERLACED; if (GST_VAAPI_PICTURE_IS_TFF (picture)) flags |= GST_VAAPI_SURFACE_PROXY_FLAG_TFF; + if (GST_VAAPI_PICTURE_IS_RFF (picture)) + flags |= GST_VAAPI_SURFACE_PROXY_FLAG_RFF; if (GST_VAAPI_PICTURE_IS_ONEFIELD (picture)) flags |= GST_VAAPI_SURFACE_PROXY_FLAG_ONEFIELD; } diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h index 6499574891..9edb449634 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h @@ -67,6 +67,7 @@ typedef enum * @GST_VAAPI_PICTURE_FLAG_TFF: top-field-first * @GST_VAAPI_PICTURE_FLAG_ONEFIELD: only one field is valid * @GST_VAAPI_PICTURE_FLAG_MVC: multiview component + * @GST_VAAPI_PICTURE_FLAG_RFF: repeat-first-field * @GST_VAAPI_PICTURE_FLAG_LAST: first flag that can be used by subclasses * * Enum values used for #GstVaapiPicture flags. @@ -81,7 +82,8 @@ typedef enum GST_VAAPI_PICTURE_FLAG_TFF = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 5), GST_VAAPI_PICTURE_FLAG_ONEFIELD = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 6), GST_VAAPI_PICTURE_FLAG_MVC = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 7), - GST_VAAPI_PICTURE_FLAG_LAST = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 8), + GST_VAAPI_PICTURE_FLAG_RFF = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 8), + GST_VAAPI_PICTURE_FLAG_LAST = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 9), } GstVaapiPictureFlags; #define GST_VAAPI_PICTURE_FLAGS GST_VAAPI_MINI_OBJECT_FLAGS @@ -107,6 +109,9 @@ typedef enum #define GST_VAAPI_PICTURE_IS_TFF(picture) \ GST_VAAPI_PICTURE_FLAG_IS_SET (picture, GST_VAAPI_PICTURE_FLAG_TFF) +#define GST_VAAPI_PICTURE_IS_RFF(picture) \ + GST_VAAPI_PICTURE_FLAG_IS_SET (picture, GST_VAAPI_PICTURE_FLAG_RFF) + #define GST_VAAPI_PICTURE_IS_ONEFIELD(picture) \ GST_VAAPI_PICTURE_FLAG_IS_SET (picture, GST_VAAPI_PICTURE_FLAG_ONEFIELD) diff --git a/gst-libs/gst/vaapi/gstvaapisurfaceproxy.h b/gst-libs/gst/vaapi/gstvaapisurfaceproxy.h index b36be5db43..e0e358f64a 100644 --- a/gst-libs/gst/vaapi/gstvaapisurfaceproxy.h +++ b/gst-libs/gst/vaapi/gstvaapisurfaceproxy.h @@ -34,7 +34,7 @@ G_BEGIN_DECLS * GstVaapiSurfaceProxyFlags: * @GST_VAAPI_SURFACE_PROXY_FLAG_INTERLACED: interlaced frame * @GST_VAAPI_SURFACE_PROXY_FLAG_TFF: top-field-first - * @GST_VAAPI_SURFACE_PROXY_FLAG_RFF: repeat-field-first + * @GST_VAAPI_SURFACE_PROXY_FLAG_RFF: repeat-first-field * @GST_VAAPI_SURFACE_PROXY_FLAG_ONEFIELD: only one field is available * @GST_VAAPI_SURFACE_PROXY_FLAG_FFB: first frame in bundle, e.g. the first * view component of a MultiView Coded (MVC) frame