Fix further loop filtering issues #149
Merged
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.
From #148 a few images were still failing to match the libwebp output precisely so investigated and found 2 further issues:
Note carefully that loop filtering must be skipped entirely if loop_filter_level at either the frame header level or macroblock override level is 0. In no case should the loop filter be run with a value of 0; it should instead be skipped.
We are currently only checking if the final loop filter value is set to 0 then we skip loop filtering but if the frame has loop filter level set to 0 we should skip altogether. Therefore just return early if we detect that.
edit: checked the spec's implementation and now it makes sense, we only use the first value since it matches the first frame of the vp8
After these changes, those images that were not matching now do in my local tests, so change the decoder tests to match exactly.