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

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Oct 10 05:51:05 UTC 2018


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

--- Comment #17 from Fei <fei.w.wang at intel.com> ---
(In reply to Víctor Manuel Jáquez Leal from comment #16)
> Review of attachment 373867 [details] [review]:
> 
> ::: 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 */
> ...

Will apply this.Thanks.

-- 
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