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 767546 - jpeg2000parse: Add support for conversion between J2C/JP2/JPC
jpeg2000parse: Add support for conversion between J2C/JP2/JPC
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-12 01:31 UTC by Aaron Boxer
Modified: 2017-07-17 14:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initial support for JP2 format (1.43 KB, patch)
2017-06-11 20:36 UTC, Aaron Boxer
none Details | Review
initial support for JP2 format (1.50 KB, patch)
2017-07-10 10:15 UTC, Aaron Boxer
none Details | Review
initial support for JP2 format (2.12 KB, patch)
2017-07-11 11:53 UTC, Aaron Boxer
committed Details | Review

Description Aaron Boxer 2016-06-12 01:31:54 UTC
Currently, only jpc is supported.
Comment 1 Sebastian Dröge (slomo) 2016-06-12 06:58:11 UTC
Alternatively, conversion could be implemented in jpeg2000parse (like the stream-format conversion for h264/h265/aac/etc)
Comment 2 Aaron Boxer 2016-06-12 14:12:03 UTC
(In reply to Sebastian Dröge (slomo) from comment #1)
> Alternatively, conversion could be implemented in jpeg2000parse (like the
> stream-format conversion for h264/h265/aac/etc)

I actually like that approach better than re-implementing jp2 parsing in both places.
Comment 3 Sebastian Dröge (slomo) 2016-06-13 06:32:34 UTC
Let's do that then :)
Comment 4 Aaron Boxer 2017-06-11 20:36:04 UTC
Created attachment 353581 [details] [review]
initial support for JP2 format

We treat JP2 as JPC, with extraneous bytes at the beginning. 
So, JP2 gets translated into JPC.
Comment 5 Aaron Boxer 2017-06-20 11:48:52 UTC
This is a simple change, but it does allow us to parse JP2 files. So, could be merged. Still need to add code to parse JP2 header, in future.
Comment 6 Aaron Boxer 2017-07-05 11:46:09 UTC
a shout out to repo mergers :) this very simple patch allows parser to handle JP2 images. Tested and working correctly in my work flow.
Comment 7 Sebastian Dröge (slomo) 2017-07-06 06:59:53 UTC
Review of attachment 353581 [details] [review]:

Makes sense but does not apply to latest GIT master unfortunately
Comment 8 Aaron Boxer 2017-07-06 18:51:08 UTC
Thanks for the review - will wait for the other two patches to be merged before fix this one up :)
Comment 9 Sebastian Dröge (slomo) 2017-07-10 07:16:03 UTC
The others are merged now :)
Comment 10 Aaron Boxer 2017-07-10 10:15:32 UTC
Created attachment 355251 [details] [review]
initial support for JP2 format

rebase with master
Comment 11 Aaron Boxer 2017-07-10 10:16:08 UTC
Thank. Should apply now :)
Comment 12 Sebastian Dröge (slomo) 2017-07-11 06:34:38 UTC
Review of attachment 355251 [details] [review]:

::: gst/videoparsers/gstjpeg2000parse.c
@@ +109,3 @@
     GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK,
     GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("image/x-jpc;image/x-j2c"));

You should probably add JP2 to the caps here and handle those caps?
Comment 13 Aaron Boxer 2017-07-11 11:29:59 UTC
Sample pipeline: 

gst-launch-1.0 -v filesrc location=some.jp2 ! typefind ! openjpegdec ! imagefreeze ! autovideosink
Comment 14 Aaron Boxer 2017-07-11 11:53:38 UTC
Created attachment 355323 [details] [review]
initial support for JP2 format

added jp2 to sink caps. Parser now treats jp2 as j2c format.
Comment 15 Sebastian Dröge (slomo) 2017-07-17 12:51:55 UTC
Next step: actually parsing the JP2 header and making use of that information
for the caps :)

commit e10276a6164578b7e19e5b15f56e403876e45a3b (HEAD -> master)
Author: Aaron Boxer <boxerab@gmail.com>
Date:   Sat Jun 24 11:18:06 2017 -0400

    jpeg2000parse: initial support for JP2 format
    
    This is a simple way of supporting JP2 : we treat is as JPC, and throw
    away header info.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767546
Comment 16 Aaron Boxer 2017-07-17 14:29:19 UTC
(In reply to Sebastian Dröge (slomo) from comment #15)
> Next step: actually parsing the JP2 header and making use of that information
> for the caps :)

Yes!