-
Notifications
You must be signed in to change notification settings - Fork 586
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
AVIF encoder changes. #1838
AVIF encoder changes. #1838
Conversation
If I understand things correctly, the failure(s) here are due to an external issue, namely cross-rs/cross#1177. I hadn't bothered with figuring that out until now, because we're still in a part of the year where fairly little happens. :) |
This moves a buffer used for temporary storage off of the struct and into the function where it's used. No change to public APIs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I added a few comments suggesting style changes
I made an additional change, which is that the encoder now declares that it implements the |
|
||
impl<W: Write> ImageEncoder for AvifEncoder<W> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good catch!
For some reason, AvifEncoder previously did not declare an implementation of the ImageEncoder trait. This commit also includes a couple of style suggestions.
As noted in #1760, AVIF encoding is very slow. In looking at why, I noticed that the default encoder settings are very different from what the
cavif
CLI provided by upstream uses - in particular, upstream documentation suggests that a quality setting of 100 is not a useful configuration.The majority of the changes here are to upgrade the
ravif
dependency. The images I was using for testing appear to compress significantly better using the new version.The project requests this statement to be made:
I would like to add that I do not believe the changes in question to be significant enough to warrant copyright.