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 638578 - Add support for 12 bit sRGB JPEG-2000 images
Add support for 12 bit sRGB JPEG-2000 images
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.20
Other Linux
: Normal normal
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 643115 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-01-03 15:45 UTC by Florian Agez
Modified: 2012-12-16 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Debug log for the pipeline specified above (370.24 KB, application/x-gzip)
2011-01-03 15:45 UTC, Florian Agez
  Details
jp2k: support for decoding 12 bit components (5.01 KB, patch)
2011-11-01 22:07 UTC, Vincent Penquerc'h
rejected Details | Review

Description Florian Agez 2011-01-03 15:45:45 UTC
Created attachment 177412 [details]
Debug log for the pipeline specified above

I've been trying to play the mxf file using the following pipeline:

filesrc location="path/to/foo.mxf" ! mxfdemux name=d d. ! jp2kdec ! ffmpegcolorspace ! videoscale ! autovideosink

It fails before the pipeline can be set to PLAYING state, with this error message:

ERROR : element /GstPipeline:pipeline0/GstMXFDemux:d : Internal data stream error.
Additional debug info:
mxfdemux.c(2797): gst_mxf_demux_loop (): /GstPipeline:pipeline0/GstMXFDemux:d:
stream stopped, reason not-negotiated


The complete debug log is attached.


An example of a failing MXF file can be found here:
http://rapidshare.com/files/440575455/lenna.mxf


Tested with gst-core 0.10.30, and gst-plugins-bad 0.10.20, on Ubuntu 10.10.
Comment 1 Sebastian Dröge (slomo) 2011-01-11 16:58:13 UTC
Problem in jp2kdec, it doesn't support 12 bit sRGB images yet.

0:00:01.199506070 16069      0x10c59a0 LOG                  jp2kdec gstjasperdec.c:272:gst_jasper_dec_negotiate:<jp2kdec0> 2048 x 1080, 3 components
0:00:01.199538546 16069      0x10c59a0 DEBUG                jp2kdec gstjasperdec.c:279:gst_jasper_dec_negotiate:<jp2kdec0> forcing container supplied colour space 1025
0:00:01.199549092 16069      0x10c59a0 LOG                  jp2kdec gstjasperdec.c:303:gst_jasper_dec_negotiate:<jp2kdec0> image component 0, 2048x1080, depth 12, sgnd 0
0:00:01.199559149 16069      0x10c59a0 DEBUG                jp2kdec gstjasperdec.c:438:gst_jasper_dec_negotiate:<jp2kdec0> Decoded image has unsupported colour space.
Comment 2 Sebastian Dröge (slomo) 2011-02-24 11:15:17 UTC
*** Bug 643115 has been marked as a duplicate of this bug. ***
Comment 3 Andrew Hunter 2011-02-24 15:16:05 UTC
Here is another example of a DCP compliant MXF file. 

DCP j2k is encoded in the CIE1931 XYZ colorspace.

http://files.aehunter.net/Sintel/Sintel-j2k-12bit-4k-test.mxf
Comment 4 Vincent Penquerc'h 2011-11-01 22:07:33 UTC
Created attachment 200462 [details] [review]
jp2k: support for decoding 12 bit components

Since we don't have a 12 bit depth format in GStreamer,
I chose to convert to r210 (10 bit depth), as the next
possible format is ARGB with 16 bit depth, and we don't
really need an alpha channel here. This is arbitrary,
and others might prefer using the 64 bit format anyway,
this is changeable easily enough if desired.
Comment 5 Vincent Penquerc'h 2011-11-01 22:23:14 UTC
Tested with the Sintel sample, the first one appears to have gone.
Comment 6 Sebastian Dröge (slomo) 2011-11-24 09:59:18 UTC
Would be better to add the 12bpp format instead of converting inside jp2kdec.
Comment 7 Vincent Penquerc'h 2011-11-24 14:50:08 UTC
12 bits means more than 32 bits per pixel though. So probably 64, doubling the size required. And needing to add support to colorspace converters too, or the output would be unusable. But yes, it'd be better. So I guess this waits till converters get support for 12 bit forat (or just 16) ?
Comment 8 Sebastian Dröge (slomo) 2011-11-25 09:14:01 UTC
I think we should add support for the 12 bit format that is generated by jp2kdec to libgstvideo, ffmpegcolorspace and colorspace/videoconvert. I assume this format is also used elsewhere.
Comment 9 Sebastian Dröge (slomo) 2012-12-15 09:55:52 UTC
I have new elements for 1.0 using openjpeg that support 12 bit RGB and many other new color formats. Will clean them up and push soon.
Comment 10 Sebastian Dröge (slomo) 2012-12-16 19:55:33 UTC
commit e1416c11a452c11e07a5072bff1c5bbe0b053479
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Fri Dec 14 14:38:45 2012 +0000

    openjpeg: Add OpenJPEG based JPEG2000 decoder