Repository navigation
Conversation
calc_wt_matrix() truncated 1024 / iwt, while every predefined forward weight is that value rounded, so a user-defined copy of a predefined QM quantized differently from it (1342 of 3840 luma and chroma weights at 8x8, 8x4 and 4x8 came out one lower). Round instead; the decoder only uses iwt.
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.
Currently calc_wt_matrix() truncates 1024 / iwt, while every predefined forward weight is that value rounded, so a user-defined copy of a predefined QM quantizes differently from it: 1342 of 3840 luma and chroma weights at 8x8, 8x4 and 4x8 come out one lower. Found while sending the predefined matrices back through a user-defined QM in an encoder experiment; #5586 covers the 4x4 side of that.
This rounds instead. The decoder only uses iwt, so decoded output stays conformant, and encodes without user-defined QMs don't change.
QmTest.UserDefinedCopyOfPredefinedHasSameWeights fails without the change (weight 26 against 27 at level 0) and passes with it, and the rest of QmTest passes. The QMTest cases that encode with user-defined QMs (QM5 to QM11) pass at speed 6; I didn't run speed 5. av2-enc has the same line; happy to send it there too if that's preferred.
Red-green output
AI-assisted. Recon, red-green check, and PR text by houseguest.