-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Progressive Decoding vs Lossy Encoding give different subjective quality #334
Comments
Lossy encoding does some transforms to make the image encode to a smaller file. See https://github.com/FLIF-hub/FLIF/blob/master/src/flif-enc.cpp#L375 . |
So that answer to
is yes? 😢 |
You can always get the best quality/size ratio by doing something lossy (as opposed to using a progressive preview of a lossless file). However, you might get slightly better results if you avoid |
@bjorn3 @jonsneyers Thank you for taking the time to answer!
I see that now, thank you. So it tried This leads me to believe that 2 factors may contribute to the fact that predownscaling results in better quality than using flif alone.
On a side note is there a possibility of using pipes or stdin as an input for |
Progressive previews of a FLIF file are downsampled versions of the original, not downscaled (though luma will have higher resolution than chroma). So you get aliasing artifacts. These become especially noticeable if there's a big difference between the full resolution and the decode resolution. You can use stdin/stdout by using the special filename |
Thanks for that explanation, that make sense. I tried to pipe using stdin and stdout but am receiving an error. Am I using it correctly? $ cat highRes.flif | flif -e - - | tee out.flif
Input file does not exist: - I also tried $ cat highRes.flif | flif -d - out.png
Input file does not exist: - Appending |
Are you using the most recent version of FLIF? This was only added recently
iirc.
…On Sat, Jan 7, 2017 at 10:54 PM, Ayrton Sparling ***@***.***> wrote:
Thanks for that explanation, that make sense.
I tried to pipe using stdin and stdout but am receiving an error. Am I
using it correctly?
$ cat highRes.flif | flif -e - - | tee out.flif
Input file does not exist: -
I also tried
$ cat highRes.flif | flif -d - out.png
Input file does not exist: -
Appending -vvv did not provide any additional info.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#334 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AOUJFPUn51BVGvhrpUF-V6xi66B_h2sbks5rQAmzgaJpZM4LcSvJ>
.
|
|
You'll need version 0.3 from git for stdin/stdout. |
Internally FLIF uses final pixel values, it is a downsample, not a downscale (as jonsneyers said). |
If it is possible I would love to see a feature that would allow progressive decoding with results similar to predownscaled encoding. |
#209 is related to that. It would not be for the current FLIF bitstream (FLIF16), but in a next-gen FLIF format (I'm calling it FLIF18 for now, because it is unlikely to be ready in 2017), we should have a feature like that. It would have many advantages, it's just a bit hard to do in a lossless way without hurting compression. |
@jonsneyers @DarkZeros |
Description
Regression downscaling decoding does not give results anywhere near downscaling lossy encoding.
Use Case
I would like to only serve the full resolution, lossless flif files so that people only need to do a partial request of ~7.3kB or so for 300x171 image. However, using regression decoding of, for example, ~7.3kB does not yield the same results as delivering a predownscaled ~7.3kB flif.
Test Case
Below I have included a test case I have made.
Original File
Setup
Regression Downscaling + Decoding
Lossy decoding straight from a highres flif returns very poor results.
Downscaling + Lossy Encoding
However, if you downscale the original, then encode, and finally decode the encoded flif you get good quality.
Followup
As you can see the quality between
decoded.png
anddownscaled-encoded-decoded.png
are very different. Is this a limitation of engine? (If I want to achieve the quality of predownscaled flif, will I will need a separate flif?)Let me know if you have any questions.
The text was updated successfully, but these errors were encountered: