gst/vaapi: keep precedence for NV12 over I420

Use NV12 as default "assumption" format all over.
NV12 is the default high priority format used my most of the
vaapi-drivers.
This commit is contained in:
Sreerenj Balachandran 2016-03-29 15:02:46 +03:00
parent 75a20deab4
commit fd04a7c046
5 changed files with 6 additions and 6 deletions

View file

@ -105,7 +105,7 @@ static const char gst_vaapidecode_sink_caps_str[] =
static const char gst_vaapidecode_src_caps_str[] =
GST_VAAPI_MAKE_SURFACE_CAPS ";"
GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS ";"
GST_VIDEO_CAPS_MAKE("{ I420, YV12, NV12, P010_10LE }");
GST_VIDEO_CAPS_MAKE("{ NV12, I420, YV12, P010_10LE }");
static GstStaticPadTemplate gst_vaapidecode_src_factory =
GST_STATIC_PAD_TEMPLATE(
@ -216,7 +216,7 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode)
GstVaapiCapsFeature feature;
GstCapsFeatures *features = NULL;
GstVideoInfo *vi, *decoded_info;
GstVideoFormat format = GST_VIDEO_FORMAT_I420;
GstVideoFormat format = GST_VIDEO_FORMAT_NV12;
GstClockTime latency;
gint fps_d, fps_n;
guint width, height;

View file

@ -673,7 +673,7 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
gst_video_info_from_caps (&vi, caps);
if (GST_VIDEO_INFO_FORMAT (&vi) == GST_VIDEO_FORMAT_ENCODED)
gst_video_info_set_format (&vi, GST_VIDEO_FORMAT_I420,
gst_video_info_set_format (&vi, GST_VIDEO_FORMAT_NV12,
GST_VIDEO_INFO_WIDTH (&vi), GST_VIDEO_INFO_HEIGHT (&vi));
if (gst_query_get_n_allocation_pools (query) > 0) {

View file

@ -461,7 +461,7 @@ gst_vaapi_find_preferred_caps_feature (GstPad * pad, GstVideoFormat format,
}
out_format = format == GST_VIDEO_FORMAT_ENCODED ?
GST_VIDEO_FORMAT_I420 : format;
GST_VIDEO_FORMAT_NV12 : format;
gl_texture_upload_caps = new_gl_texture_upload_meta_caps ();
if (!gl_texture_upload_caps)

View file

@ -104,7 +104,7 @@ gst_vaapi_caps_feature_contains (const GstCaps * caps,
#define GST_VAAPI_MAKE_SURFACE_CAPS \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, "{ ENCODED, I420, YV12, NV12, P010_10LE }")
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, "{ ENCODED, NV12, I420, YV12, P010_10LE }")
#define GST_VAAPI_MAKE_ENC_SURFACE_CAPS \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \

View file

@ -716,7 +716,7 @@ allocator_configure_image_info (GstVaapiDisplay * display,
vinfo = &allocator->video_info;
if (GST_VIDEO_INFO_FORMAT (vinfo) == GST_VIDEO_FORMAT_ENCODED)
gst_video_info_set_format (&allocator->image_info, GST_VIDEO_FORMAT_I420,
gst_video_info_set_format (&allocator->image_info, GST_VIDEO_FORMAT_NV12,
GST_VIDEO_INFO_WIDTH (vinfo), GST_VIDEO_INFO_HEIGHT (vinfo));
else
allocator->image_info = *vinfo;