After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767850 - jpeg2000parse: parsed mono jpc image gets color space set to RGB
jpeg2000parse: parsed mono jpc image gets color space set to RGB
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-20 03:09 UTC by Aaron Boxer
Modified: 2016-08-16 20:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Force sampling and colorspace to grayscale for single component image (1.61 KB, patch)
2016-07-01 17:35 UTC, Aaron Boxer
reviewed Details | Review

Description Aaron Boxer 2016-06-20 03:09:29 UTC
Single channel image should get sampling and color space set to GRAYSCALE/GRAY.
Comment 1 Aaron Boxer 2016-06-20 03:11:37 UTC
The following pipeline

gst-launch-1.0 -v multifilesrc location=~/a1_mono.j2c  num-buffers=1 caps="image/x-jpc" ! jpeg2000parse  ! openjpegdec ! imagefreeze ! videoconvert ! ximagesink

fails negotiation
Comment 2 Aaron Boxer 2016-07-01 17:35:19 UTC
Created attachment 330740 [details] [review]
Force sampling and colorspace to grayscale for single component image
Comment 3 Aaron Boxer 2016-07-10 23:11:31 UTC
I think this should be a fairly uncontroversial change :)
Comment 4 Aaron Boxer 2016-07-10 23:21:33 UTC
Note: test file is a monochrome j2c file
Comment 5 Aaron Boxer 2016-07-23 15:08:41 UTC
So, now that the dust has settled on the latest release, can we please merge this fix into master ? It is quite straightforward: for monochrome images, we can force sampling and colorspace to grayscale.  Thanks :)
Comment 6 Sebastian Dröge (slomo) 2016-07-25 06:45:45 UTC
Comment on attachment 330740 [details] [review]
Force sampling and colorspace to grayscale for single component image

Does this make sense? I could imagine a use case where someone passes around separate images for e.g. R, G and B.

Maybe only do this if there's no useful info in the caps?
Comment 7 Aaron Boxer 2016-07-25 14:26:35 UTC
(In reply to Sebastian Dröge (slomo) from comment #6)
> Comment on attachment 330740 [details] [review] [review]
> Force sampling and colorspace to grayscale for single component image
> 
> Does this make sense? I could imagine a use case where someone passes around
> separate images for e.g. R, G and B.
> 
> Maybe only do this if there's no useful info in the caps?

Thanks, that is a good point. This is really edge case, I guess, but I will
add a few lines to handle this.
Comment 8 Aaron Boxer 2016-08-16 20:25:31 UTC
(In reply to Sebastian Dröge (slomo) from comment #6)
> Comment on attachment 330740 [details] [review] [review]
> Force sampling and colorspace to grayscale for single component image
> 
> Does this make sense? I could imagine a use case where someone passes around
> separate images for e.g. R, G and B.
> 
> Maybe only do this if there's no useful info in the caps?

I believe the parser already does this if caps have no useful info.

So, I am going to close this, not really a bug IMHO. User can always
explicitly set sampling to GRAYSCALE.