Skip to content
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

Re-use best sample when encoding images #100

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Pyroglyph
Copy link
Contributor

Fixes #62

This PR saves users from wasting time re-encoding the same image when an image with the best CRF has already been encoded.

I'm not entirely sure how the sample encode cache works, but I assume it doesn't store the samples themselves, so if the best CRF is read from the cache instead of being searched for then we still have to encode it again.

I'm leaving this as a draft for now because I'm not confident that output_path_with_best_crf (at auto_encode.rs:106) is done correctly. It works, but if the sample naming convention ever changes then this will break.

This saves re-encoding the same image when an acceptable CRF has been found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimise image auto-encode by using the succesful crf-search "sample"
1 participant