-
-
Notifications
You must be signed in to change notification settings - Fork 692
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
jxlsave
produces broken images with libjxl 0.7rc
#2987
Comments
Confirmed, I see failure on ubuntu as well. There are a 8 deprecation warnings during libvips build, and a series of errors on jxl decompress and recompress. Shall I have a stab at updating libvips for libjxl.07, Kleis? Or do you have this in hand? |
I won't be able to look at this until next weekend, so feel free to investigate/fix this earlier than that. |
Actually, I found a very simple fix, I'm working on a PR now. |
It's required to close the input, otherwise the encoder can't know what the last frame is, resulting in an improper codestream. Resolves: libvips#2987.
It's required to close the input, otherwise the encoder can't know what the last frame is, resulting in an improper codestream. Resolves: libvips#2987.
Oh nice! Do you think we should still support 0.6? I support 8.13 ought to not change dependencies too radically during its lifetime, so maybe we should only remove 0.6 support in 8.14. |
Encode and decode now work, but I still see:
I expect you saw. The first one looks like a simple fix, but the second one is a bit puzzling to me. |
I think it's fine to remove support for libjxl <= 0.6 in libvips 8.14, assuming that libjxl 0.7 will be shortly released. |
The highway warning should be fixed with commit google/highway@9b6b473, which didn't make it into the 1.0.0 release, see: google/highway#882 (comment) I'm not sure about that first warning (or is it an error?), I haven't encountered that. Did you build libjxl in release mode? |
No, debug mode. |
It's here:
So this line: https://github.com/libvips/libvips/blob/8.13/libvips/foreign/jxlload.c#L629 When it rewinds the input after a header read. |
... looks like the obvious: /* We have to reset the reader ... we can't reply onb the read point
* being left just after the header.
*/
if( vips_source_rewind( jxl->source ) )
return( -1 );
size_t bytes_remaining = JxlDecoderReleaseInput( jxl->decoder );
if( vips_foreign_load_jxl_fill_input( jxl, bytes_remaining ) )
return( -1 );
JxlDecoderSetInput( jxl->decoder,
jxl->input_buffer, jxl->bytes_in_buffer ); Fixes it. |
Ah, it looks like that it came from: The Which explains why I didn't saw that, since |
Ah! Makes sense. Shall I patch 8.13? |
Feel free to patch 8.13! |
It was a bit more complex than I'd hoped :( I ported to master and removed support for old libjxl as well. |
PR #3170 should simplify that a bit. :) |
Reproducer:
Here's an simple Dockerfile to reproduce this:
Dockerfile
The text was updated successfully, but these errors were encountered: