[Bug 783591] openjpegdec: doesn't support grayscale with alpha

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jun 15 07:36:08 UTC 2017


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

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

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

--- Comment #13 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 353729:
 --> (https://bugzilla.gnome.org/review?bug=783591&attachment=353729)

::: ext/openjpeg/gstopenjpegdec.c
@@ +425,3 @@
+      tmp[1] = off[0] + (*data_in[0] << shift[0]);
+      tmp[2] = tmp[1];
+      tmp[3] = tmp[1];

Why are you generating something like RAGB here, i.e. alpha on the second
component and all other components the same value?

@@ +888,2 @@
       if (image->numcomps == 4) {
+        /* alpha:  0 == colour channel, 1 == non-pre-multiplied alpha, 2 ==
pre-multiplied alpha */

This comment seems wrong for numcomps==4, and also above

@@ +903,3 @@
+          return GST_FLOW_NOT_NEGOTIATED;
+        }
+        if (alpha_channel != 3) {

If it's elsewhere, that seems to require only a minimal change to the
conversion function or using e.g. BGRA instead of ABGR.

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