Avoid full-frame VP8 macroblock allocation for subsampled WebP reads#1265
Open
foryourever wants to merge 2 commits intoharaldk:masterfrom
Open
Avoid full-frame VP8 macroblock allocation for subsampled WebP reads#1265foryourever wants to merge 2 commits intoharaldk:masterfrom
foryourever wants to merge 2 commits intoharaldk:masterfrom
Conversation
Author
|
收到
|
Owner
|
Thanks for the PR! Looks good, but I'll review in detail when I find some spare time. In the mean time, can you please look at the comments/suggestions from Sonar Cloud? At least 3 out of 4 should be quick fixes. |
|
Author
|
Thank you for the feedback! I've addressed the 3 SonarCloud suggestions and pushed the fixes. Please let me know if anything else needs adjustment. I really appreciate your time and look forward to your detailed review!
azhe
***@***.***
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What is fixed
Fixes excessive memory use when reading very large lossy WebP images with source subsampling, which could result in
OutOfMemoryError.Why is this change proposed
The VP8 decoder allocated macroblock state for the full frame up front, even when only a subsampled result was
requested. For large images this caused unnecessary memory pressure and could make the read fail before the reduced
output was produced.
What is changed
VP8Frameto decode with a bounded row-window working set instead of a full-frame macroblock allocationalpha_filter.webpsample