[Bug 797222] vaapijpegdec: [regression] allocated surfaces have incorrect chroma

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Oct 9 10:01:53 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=797222

Víctor Manuel Jáquez Leal <vjaquez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #373867|none                        |needs-work
             status|                            |

--- Comment #16 from Víctor Manuel Jáquez Leal <vjaquez at igalia.com> ---
Review of attachment 373867:
 --> (https://bugzilla.gnome.org/review?bug=797222&attachment=373867)

::: gst-libs/gst/vaapi/gstvaapisurface.c
@@ +325,3 @@
+ * @formats: the limited format list
+ *
+ * Creates a new #GstVaapiSurface by using the appropriate format in #formats

If I understand correctly I would rephrase this line as:

"Creates a new #GstVaapiSurface with a @chroma_type valid for any format in
@formats; if there aren't any, the returned surface is created forcing the
passed @chroma_type."

@@ +340,3 @@
+    GstVideoFormat format = g_array_index (formats, GstVideoFormat, i);
+    if (format == gst_vaapi_video_format_from_chroma (chroma_type))
+      ensure_format = TRUE;

I guess you will need a 'break' instruction here to avoid keep evaluating the
format list.

Also you can do this

if (format == gst_vaapi_video_format_from_chroma (chroma_type))
  return gst_vaapi_surface_new (display, chroma_type, width, height);
}

/* Fallback: if there's no format valid for the chroma type let's just used the
passed chroma */
...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list