GNOME Bugzilla – Bug 767546
jpeg2000parse: Add support for conversion between J2C/JP2/JPC
Last modified: 2017-07-17 14:29:19 UTC
Currently, only jpc is supported.
Alternatively, conversion could be implemented in jpeg2000parse (like the stream-format conversion for h264/h265/aac/etc)
(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.
Let's do that then :)
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.
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.
a shout out to repo mergers :) this very simple patch allows parser to handle JP2 images. Tested and working correctly in my work flow.
Review of attachment 353581 [details] [review]: Makes sense but does not apply to latest GIT master unfortunately
Thanks for the review - will wait for the other two patches to be merged before fix this one up :)
The others are merged now :)
Created attachment 355251 [details] [review] initial support for JP2 format rebase with master
Thank. Should apply now :)
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?
Sample pipeline: gst-launch-1.0 -v filesrc location=some.jp2 ! typefind ! openjpegdec ! imagefreeze ! autovideosink
Created attachment 355323 [details] [review] initial support for JP2 format added jp2 to sink caps. Parser now treats jp2 as j2c format.
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
(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!