webp export: lossless encoding is now truely lossless (bug #12061)#1866
webp export: lossless encoding is now truely lossless (bug #12061)#1866edgomez wants to merge 1 commit into
Conversation
…org#12061) - do not go through RGB->YUV420 conversion when lossless is set - be a bit paranoid and set alpha encoding to "exact" - reorder the code a bit to make it clearer Though the encoding is now lossless, the command used to fingerprint the RGB data in https://redmine.darktable.org/issues/12061 still doesn't match :-( But if one goes through: $ convert foo.webp webp.rgb $ convert foo.tif tif.rgb $ diff -b tif.rgb webp.rgb && echo they do match they do match So i don't understand what IM does differently in identify and convert that are both part of IM programs.
3d3953c to
1f49555
Compare
|
I did some test and found that the lossless mode is now probably 20x slower. I took a RAW, exported lossless, 95%. It took 10s or so with previous version and more than 3 minutes with this version. Could this be because of the alpha encoding to "exact"? Is that even necessary for pictures? |
It probably comes from the fact that the old code used YUV encoding and was going through the usual video encoding pipeline of VP8 codec w/ very low quantization parameter, or quantization disabled altogether. The new code uses a newer encoding mode that got designed when WEBP team realized they were missing true RGB lossless encoder. And I guess that lossless encoder didn't receive much optmization love as the video one. But it's just a wild guess, I didn't follow WEBP/VP8 encoders' dev much. |
|
Ok, thanks. Merged to master. |
|
This is so fun, pr is closed, yet it is actually merged, and the commit has no mention of the PR :) |
|
Roman, nothing fun to me. This has been rebase and merged manually to allow merging into the darktable-2.6.x release branch if needed. And in this case GitHub do not detect that the PR is merged. Also, it is not broken. I do test every commit :) It is broken in one platform and probably because the webp library is too old here. I'll comment out the exact field for now. |
Looks like it, |
|
Right, just check this. So I'll remove this field. I'm currently testing this works ok with recent webp. |
Though the encoding is now lossless, the command used to fingerprint
the RGB data in https://redmine.darktable.org/issues/12061 still doesn't
match :-(
But if one goes through:
$ convert foo.webp webp.rgb
$ convert foo.tif tif.rgb
$ diff -b tif.rgb webp.rgb && echo they do match
they do match
So i don't understand what IM does differently in identify and convert
that are both part of IM programs.