mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
va: vpp: fix a wrong caps logic in vpp_transform_caps().
The current gst_va_vpp_transform_caps return such as: video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive, format=(string) { NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw, width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive, format=(string){ VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, I420, P010_10LE }; video/x-raw(memory:VAMemory), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], interlace-mode=(string)progressive; video/x-raw(memory:DMABuf), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], interlace-mode=(string)progressive; video/x-raw, width=(int) [ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], interlace-mode=(string)progressive Which is not correct. It mixes the template caps and the input query caps together. The correct way should be: clip the template caps with the input caps(remove format and rangify size). The correct answer should be: video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace -mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw, width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive, format=(string){ VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, I420, P010_10LE } Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2045>
This commit is contained in:
parent
b9cc83ccf8
commit
f7eb93e22b
1 changed files with 4 additions and 2 deletions
|
@ -1278,7 +1278,7 @@ gst_va_vpp_transform_caps (GstBaseTransform * trans, GstPadDirection direction,
|
|||
"Transforming caps %" GST_PTR_FORMAT " in direction %s", caps,
|
||||
(direction == GST_PAD_SINK) ? "sink" : "src");
|
||||
|
||||
ret = gst_va_vpp_caps_remove_format_and_rangify_size_info (caps);
|
||||
caps = gst_va_vpp_caps_remove_format_and_rangify_size_info (caps);
|
||||
|
||||
if (direction == GST_PAD_SINK) {
|
||||
tmpl_caps =
|
||||
|
@ -1287,7 +1287,9 @@ gst_va_vpp_transform_caps (GstBaseTransform * trans, GstPadDirection direction,
|
|||
tmpl_caps =
|
||||
gst_pad_get_pad_template_caps (GST_BASE_TRANSFORM_SINK_PAD (trans));
|
||||
}
|
||||
gst_caps_append (ret, tmpl_caps);
|
||||
|
||||
ret = gst_caps_intersect_full (tmpl_caps, caps, GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (tmpl_caps);
|
||||
|
||||
if (filter) {
|
||||
GstCaps *intersection;
|
||||
|
|
Loading…
Reference in a new issue