summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2021-09-18 11:03:16 +0200
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-09-19 20:44:58 +0000
commit64c4eb2def3dc9081d4674625842998b7b464527 (patch)
treece27c1cb4ced50c84cd29ff5bb56bb7da1391875 /sys
parent397b0cc492f4b9d2ed53f7f662214109b3f6398f (diff)
va: caps: Don't use image formats for decoded frames.
Initially we tried to use the internal color conversion used in i965 and Gallium drivers when decoding. But this approach has showed limitations and problems. This patch removes completely the possible color conversion at decoding, since it show problems with deinterlacing, for example: gst-launch-1.0 filesrc location=interlaced.mpg2 ! parsebin ! vampeg2dec ! vadeinterlace ! xvimagesink Allowing only the surface formats when decoding is more stable. For color conversion is better to do it explicitly with vapostproc. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2531>
Diffstat (limited to 'sys')
-rw-r--r--sys/va/gstvacaps.c56
1 files changed, 2 insertions, 54 deletions
diff --git a/sys/va/gstvacaps.c b/sys/va/gstvacaps.c
index bf6a2a242..14724e986 100644
--- a/sys/va/gstvacaps.c
+++ b/sys/va/gstvacaps.c
@@ -220,61 +220,9 @@ gst_va_create_raw_caps_from_config (GstVaDisplay * display, VAConfigID config)
gst_caps_set_features_simple (feature_caps, features);
caps = gst_caps_merge (caps, feature_caps);
}
- /* raw caps */
- /* XXX(victor): assumption -- drivers can only download to image
- * formats with same chroma of surface's format.
- *
- * This assumption is only valid for i965 and Gallium (so far).
- * iHD's color space conversor, in decoders, has some problems or
- * outputs wrong MD5 in tests.
- */
- {
- GstCaps *raw_caps;
- GArray *image_formats = NULL;
-
- if (!gst_va_display_is_implementation (display,
- GST_VA_IMPLEMENTATION_INTEL_IHD))
- image_formats = gst_va_display_get_image_formats (display);
-
- if (!image_formats) {
- raw_caps = gst_caps_copy (base_caps);
- } else {
- GArray *raw_formats = g_array_new (FALSE, FALSE, sizeof (GstVideoFormat));
- guint j, surface_chroma, image_chroma;
- GstVideoFormat image_format;
-
- raw_caps =
- gst_caps_new_simple ("video/x-raw", "width", GST_TYPE_INT_RANGE,
- min_width, max_width, "height", GST_TYPE_INT_RANGE, min_height,
- max_height, NULL);
-
- for (i = 0; i < formats->len; i++) {
- format = g_array_index (formats, GstVideoFormat, i);
- surface_chroma = gst_va_chroma_from_video_format (format);
- if (surface_chroma == 0)
- continue;
-
- g_array_append_val (raw_formats, format);
-
- for (j = 0; j < image_formats->len; j++) {
- image_format = g_array_index (image_formats, GstVideoFormat, j);
- image_chroma = gst_va_chroma_from_video_format (image_format);
- if (image_format != format && surface_chroma == image_chroma)
- g_array_append_val (raw_formats, image_format);
- }
- }
- if (!gst_caps_set_format_array (raw_caps, raw_formats)) {
- gst_caps_unref (raw_caps);
- raw_caps = gst_caps_copy (base_caps);
- }
-
- g_array_unref (raw_formats);
- g_array_unref (image_formats);
- }
-
- caps = gst_caps_merge (caps, raw_caps);
- }
+ /* raw caps */
+ caps = gst_caps_merge (caps, gst_caps_copy (base_caps));
gst_caps_unref (base_caps);