dropbox / lepton

Lepton is a tool and file format for losslessly compressing JPEGs by an average of 22%.
https://blogs.dropbox.com/tech/2016/07/lepton-image-compression-saving-22-losslessly-from-images-at-15mbs/
Apache License 2.0
5.01k stars 355 forks source link

Lepton on mobile phones #71

Closed alstroemeria closed 7 years ago

alstroemeria commented 7 years ago

I'm hoping to experiment with use Lepton on mobile clients Android (+iOS). I know there are previous and ongoing threads about this.

question about used in mobile devices (android) Compilation fails on Linux/armhf

From these discussions It looks like lepton is currently not compatible on ARM chipsets. So the question is what it would involve in-order to make lepton something that can run on mobile devices? Ideally I would want to incorporate this as a c++ library into a Android project through Android NDK. As it is, lepton looks to be in its early phases and offers CLI only, I would likely need to propose a solution to Lepton as a shared library to make it into a library.

This question comes from someone who is unfamiliar with the complexities involved, but is willing to spend the time to learn and contribute towards these improvements.

danielrh commented 7 years ago

actually with the recent change to allow a scalar lepton, it should work fine in mobile, albeit without some of the 10-20% performance optimizations that come with using SSE.

There was an effort to use SSE2Neon, but it hasn't completed yet

but as it is, I've seen lepton flawlessly decompress on android with just some tweaks to the makefile

as for coming up with a library form of lepton: that would be an excellent idea!

it would need to start with putting all the global state as items in a context struct---that would allow it to do more than one compression or decompression at once.

an alternative would be to simply have the library operate much as the validation mode works right now, where the main program fork()'s and starts running a one-off compression, and then terminates. That would allow the SECCOMP jailing mode to proceed


From: Jacky Mok notifications@github.com Sent: Friday, September 30, 2016 2:27 PM To: dropbox/lepton Subject: [dropbox/lepton] Lepton on mobile phones (#71)

I'm hoping to experiment with use Lepton on mobile clients Android (+iOS). I know there are previous and ongoing threads about this.

https://github.com/dropbox/lepton/issues/29<question%20about%20used%20in%20mobile%20devices%20(android)> https://github.com/dropbox/lepton/issues/13<Compilation%20fails%20on%20Linux/armhf>

From these discussions It looks like lepton is currently not compatible on ARM chipsets. So the question is what it would involve in-order to make lepton something that can run on mobile devices? Ideally I would want to incorporate this as a c++ library into a Android project through Android NDK. As it is, lepton looks to be in its early phases and offers CLI only, I would likely need to propose a solution to https://github.com/dropbox/lepton/issues/35<Lepton%20as%20a%20shared%20library> to make it into a library.

This question comes from someone who is unfamiliar with the complexities involved, but is willing to spend the time to learn and contribute towards these improvements.

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/dropbox/lepton/issues/71, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAC4kXHk8iEKoaJZkOQYtL8vYzZme3BLks5qvX7MgaJpZM4KLhvp.

danielrh commented 7 years ago

it should work now if you pass ./configure --disable-vectorization I think the compiler may be smart enough to add the arm specific vectorization

StainlessStlRat commented 4 years ago

Any updates on possible wrappers for mobile? Golang too! I would love to use this library across the board (mobile, web, desktop, etc...)