saschanaz / libflif.js

Another trial to get FLIF to the web platform
ISC License
41 stars 2 forks source link

libflif vs. poly-flif #19

Closed arasouli91 closed 6 years ago

arasouli91 commented 6 years ago

I am trying to understand how I can help with getting FLIF on the web viable quicker. But, I am not sure why there is two projects trying to do the same. What's the difference? I've been tasked to make progress on this so I am trying to gauge which repo is further along so that I can focus my efforts there.

Here's the differences I know of: Poly-flif is using asm.js. I think I'll be able to get it to build with wasm. Poly-flif has TOTAL_MEMORY is set at 100663296 , and here ALLOW_MEMORY_GROWTH is on instead. This is just a performance trade off. Seems like certain applications may prefer one over the other.

I've noticed some issues in libflif that seem to indicate partial functionality: saschanaz/libflif.js#6 saschanaz/libflif.js#14 I am not sure if poly-flif has this working, I posted this same question in that repo too. It isn't being actively maintained, and I'm not sure if I'll get a reply on that.

I'd appreciate any information I can get here, thanks!

saschanaz commented 6 years ago

Poly-FLIF didn't support progressive decoding at the time when libflif.js was first released, and that was the key reason I made this.

Still some differences:

  1. As you said, the TOTAL_MEMORY thing in Poly-FLIF preallocates all the memory space whereas libflif.js dynamically does.
  2. Poly-FLIF copies and slightly modifies the original FLIF tool, whereas libflif.js uses git submodule and does not modify it. (Not related to users, anyway.)
arasouli91 commented 6 years ago

Ok thanks for the info, I am pretty sure I want to work on your repo. I am trying to dig in and understand what's going on so that perhaps I can fix #6 and #14. Any guidance would be great.

saschanaz commented 6 years ago

I added some info on #6, although I don't currently know what API should be used for #14.

saschanaz commented 6 years ago

BTW, as far as I know ALLOW_MEMORY_GROWTH does not cause a performance trade-off in WASM mode.

arasouli91 commented 6 years ago

There is a little debate about ALLOW_MEMORY_GROWTH performance here. https://github.com/kripken/emscripten/issues/5925