New open source jpeg 2000 codec

678 views
Skip to first unread message

Aaron Boxer

unread,
Sep 12, 2014, 11:55:39 PM9/12/14
to digital-...@googlegroups.com
Greetings!

I have been working for the past 6 months on a new open source jpeg 2000 codec. The codec will use
graphics card acceleration to encode and decode at high frame rates: my target is 10 FPS 8 mega pixel lossy encoding,
on recent AMD video cards.

I've discovered some interesting discussions here on jpeg 2000 adoption in the curation community. Perhaps my project, when
it is completed (hopefully alpha release by spring 2015) will help. For those who are curious, you can find it here:  https://github.com/CodecCentral/roger

Also, regarding discussion of web support for jpeg 2000, there is an interesting Mozilla initiative, pdf.js,(http://mozilla.github.io/pdf.js/
to add pdf support in browsers using plain old javascript. As pdf supports embedding jpeg 2000 images, this project could easily be adapted
to provide a jpeg 2000 viewer plugin for Firefox/Chrome.

Cheers,
Aaron





Chris Adams

unread,
Sep 14, 2014, 5:30:57 PM9/14/14
to digital-...@googlegroups.com
On Fri, Sep 12, 2014 at 11:55 PM, Aaron Boxer <box...@gmail.com> wrote:
I've discovered some interesting discussions here on jpeg 2000 adoption in the curation community. Perhaps my project, when
it is completed (hopefully alpha release by spring 2015) will help. For those who are curious, you can find it here:  https://github.com/CodecCentral/roger

This is interesting - it'd be particularly nice to compare with the test suites being developed by OpenJPEG and other projects for coverage for the various edge cases in the spec.
 
Also, regarding discussion of web support for jpeg 2000, there is an interesting Mozilla initiative, pdf.js,(http://mozilla.github.io/pdf.js/
to add pdf support in browsers using plain old javascript. As pdf supports embedding jpeg 2000 images, this project could easily be adapted
to provide a jpeg 2000 viewer plugin for Firefox/Chrome.

It'd definitely be good to see how well https://github.com/mozilla/pdf.js/blob/master/src/core/jpx.js covers the full spec. The other idea I've wanted to find time for would be a port of OpenJPEG compiled using Emscripten so it'd be possible to work on a browser extension without having to assume all of the testing and support overhead for the actual codec. https://github.com/kripken/j2k.js exists but needs to be updated for OpenJPEG 2.

Chris

Aaron Boxer

unread,
Sep 15, 2014, 12:35:02 AM9/15/14
to digital-...@googlegroups.com
Hi Chris,

On Sun, Sep 14, 2014 at 5:30 PM, Chris Adams <ch...@improbable.org> wrote:
On Fri, Sep 12, 2014 at 11:55 PM, Aaron Boxer <box...@gmail.com> wrote:
I've discovered some interesting discussions here on jpeg 2000 adoption in the curation community. Perhaps my project, when
it is completed (hopefully alpha release by spring 2015) will help. For those who are curious, you can find it here:  https://github.com/CodecCentral/roger

This is interesting - it'd be particularly nice to compare with the test suites being developed by OpenJPEG and other projects for coverage for the various edge cases in the spec.

Yes, I agree. I was hoping to take the OpenJPEG test suite and make it generic: define an encode/decode interface, wrap any codec in this interface, and have then be able to run the test suite against any codec. We would then have nice, repeatable metrics on standard compliance for all codecs.  Add a little timing code and we would be able to compare performance as well. 
 
 
Also, regarding discussion of web support for jpeg 2000, there is an interesting Mozilla initiative, pdf.js,(http://mozilla.github.io/pdf.js/
to add pdf support in browsers using plain old javascript. As pdf supports embedding jpeg 2000 images, this project could easily be adapted
to provide a jpeg 2000 viewer plugin for Firefox/Chrome.

It'd definitely be good to see how well https://github.com/mozilla/pdf.js/blob/master/src/core/jpx.js covers the full spec.

Yes, the code seems a bit too short to have full coverage, although it only needs to worry about decoding. 

 
The other idea I've wanted to find time for would be a port of OpenJPEG compiled using Emscripten so it'd be possible to work on a browser extension without having to assume all of the testing and support overhead for the actual codec. https://github.com/kripken/j2k.js exists but needs to be updated for OpenJPEG 2.

Another good idea. As OpenJPEG is about to become a reference implementation for the standard, this would create an instantly acceptable web solution. Although I fear it would be dog-slow. 

 Cheers,
Aaron

Chris Adams

unread,
Sep 15, 2014, 10:33:52 AM9/15/14
to digital-...@googlegroups.com


On Sun, Sep 14, 2014 at 11:00 PM, Aaron Boxer <box...@gmail.com> wrote:
The other idea I've wanted to find time for would be a port of OpenJPEG compiled using Emscripten so it'd be possible to work on a browser extension without having to assume all of the testing and support overhead for the actual codec. https://github.com/kripken/j2k.js exists but needs to be updated for OpenJPEG 2.

Another good idea. As OpenJPEG is about to become a reference implementation for the standard, this would create an instantly acceptable web solution. Although I fear it would be dog-slow. 

Definitely – I'd assume it'd slow, although perhaps a good test case for the Firefox developers working to improve asm.js performance, but I was thinking it might still be acceptable for the common library use-case of e.g. one or small numbers of images on an item detail page where you could ship a polyfill which would e.g. look for images which errored and where the server returned a mime type or filename indicating JP2, replace them with <canvas> and render the image into it.

Chris

Aaron Boxer

unread,
Sep 15, 2014, 4:27:18 PM9/15/14
to digital-...@googlegroups.com
Yes, this would be a neat solution.  

Chris Adams

unread,
Oct 1, 2014, 1:48:46 PM10/1/14
to digital-...@googlegroups.com
Since I mentioned this last month, I worked on a quick demo which displays JPEG 2000 in browsers Chrome and Firefox using j2k.js:


It's still running OpenJPEG 1.4 compiled in debug mode so I'm hoping to get some significant performance improvements once I finish adapting the OpenJPEG 2 compile chain to Emscripten but this might be of interest to anyone else who has been lamenting the lack of cross-browser support for any image format newer than JPEG + PNG.

Chris

On Sun, Sep 14, 2014 at 5:30 PM, Chris Adams <ch...@improbable.org> wrote:

Aaron Boxer

unread,
Oct 1, 2014, 5:11:04 PM10/1/14
to digital-...@googlegroups.com
Nice! If you need help with this, count me in.

Aaron

--
You received this message because you are subscribed to the Google Groups "Digital Curation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to digital-curati...@googlegroups.com.
To post to this group, send email to digital-...@googlegroups.com.
Visit this group at http://groups.google.com/group/digital-curation.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages