FLIF icon indicating copy to clipboard operation
FLIF copied to clipboard

Write out the detailed FLIF stream specification

Open jonsneyers opened this issue 8 years ago • 12 comments

... so others can independently implement FLIF. This can obviously only be completed once #85 is completed.

jonsneyers avatar Nov 17 '15 09:11 jonsneyers

@jonsneyers Any timeline on this?

nbraud avatar Nov 25 '16 22:11 nbraud

Not really. Is anyone interested in doing an independent implementation? Or to get the format formally standardized? It's basically a matter of converting the source code to precise plaintext, which is not a particularly fun activity, so to be honest, I don't really feel like doing it unless there is some indication that it's going to be useful...

jonsneyers avatar Nov 27 '16 13:11 jonsneyers

I think a Rust or pure JS implementation will be fun for me but unfortunately at least not in this year.

saschanaz avatar Nov 27 '16 13:11 saschanaz

I've actually started building an implementation in Rust, so I might as well write a spec while I'm at it.

panicbit avatar Dec 02 '16 04:12 panicbit

Cool! I suggest we put the spec in https://github.com/FLIF-hub/FLIF-doc – it doesn't really make sense to put it in the repository of a specific implementation.

https://github.com/panicbit/flif-rs/blob/master/spec.md is a good start; the main challenge will however be to describe the encoding of the actual pixel data. Also, there are all the transformations, and most of them also encode some data, so it'll be quite some work to describe all that.

@hrj might also be interested in doing some spec writing.

@panicbit : OK for you if we move the spec to the FLIF-doc repository? I'll give you push rights there if you want, or if you prefer to use pull requests (which I can review before merging) that's of course also OK.

jonsneyers avatar Dec 02 '16 08:12 jonsneyers

Moving the spec to FLIF-doc sounds fine. I'd prefer PRs since having a review of the spec doesn't hurt.

panicbit avatar Dec 02 '16 09:12 panicbit

@jonsneyers @panicbit Sounds good!

Created an issue https://github.com/FLIF-hub/FLIF-doc/issues/2 (in case we have more noisy discussions).

hrj avatar Dec 02 '16 09:12 hrj

@jonsneyers I was asking because I was interested in making a Rust implementation of it.

nbraud avatar Dec 04 '16 15:12 nbraud

@nbraud for the Rust implementation you might want to collaborate with @panicbit. As for the spec itself: the work-in-progress document is here: https://github.com/FLIF-hub/FLIF-doc/tree/master/spec

It's very incomplete at the moment, but it's a start. At the moment, the C++ source code of the reference implementation is still the only full 'spec'.

I'm planning to focus on the overall structure of the spec, and trying to explain the design rationale. I'll also focus on part 4 (MANIAC encoding, actual pixel encoding), since that's the most complicated part and the core of the algorithm.

Part 3 requires the most work I think, because for each transformation (and there are 10 of them), you need to describe what the transformation does (or at least how to do the decode-time reverse transform), how it affects the ranges, and how its information is encoded.

jonsneyers avatar Dec 04 '16 16:12 jonsneyers

@jonsneyers Yep, saw both, started reading through :-)

Thanks for the work, I'm very excited by what FLIF makes possible.

nbraud avatar Dec 04 '16 16:12 nbraud

@jonsneyers Thanks for the work on this so far! It's been helpful in trying to work through the decoder code. There's just so much in there that I can see why writing the spec felt daunting. How much farther do you think the spec needs to go before someone could potentially write say another full implementation of the decoder? I see @dgriffen has an active project around that with partial non-interlaced support at the moment but I'm not sure if more needs to be documented to take it all the way.

jessetrana avatar Jan 22 '18 04:01 jessetrana

@jessetrana The primary missing pieces are RAC documentation and the rest of the transformations. everything else, while a bit difficult to grasp at times is pretty much all there. There are a few inaccuracies though which I have done my best to report issues for on the FLIF-doc repo.

ZoeyR avatar Jan 22 '18 16:01 ZoeyR