Bound the two-pass wet-pass mode search with the dry pass's rd - #5304
Open
yeqing-wu wants to merge 1 commit into
Open
Bound the two-pass wet-pass mode search with the dry pass's rd#5304yeqing-wu wants to merge 1 commit into
yeqing-wu wants to merge 1 commit into
Conversation
The wet pass starts mode search from an unbounded rd limit, so its pruning cannot bite until it finds a good candidate on its own. Start it instead from the dry pass's rd for the same block and size, plus a margin. The two passes see different contexts, so the bound can be violated. A block left with no valid mode is re-searched once with the original limit. Anchor: commit c77f169 Speed 4 (cpu-used=4): FG16 CTC (33 frames, class A1 and A2, RA) ``` +------------+-------+-------+-------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+-------+-------+-------+-------+------+------+ | A1 | -0.30 | -0.29 | -0.38 | -0.30 | 100 | 100 | | A2 | -0.17 | 0.07 | 0.31 | -0.15 | 101 | 100 | | Avg w/o B2 | -0.21 | -0.04 | 0.11 | -0.19 | 100 | 100 | +------------+-------+-------+-------+-------+------+------+ ``` STATS_CHANGED
yeqing-wu
requested review from
jingninghan,
leolzhao,
urvangjoshi and
yunqingwang1
August 21, 2026 21:27
Contributor
Author
|
@urvangjoshi, Update on reusing the MV from the dry pass as the starting MV of the wet pass: the gain has dropped from -0.13% to -0.03%. Part of the reason is that the anchor itself increased an additional -2% gain compared to before. Meanwhile, there have also been a lot of recent commits (several for MV search and DRL), so I'm still going through them to check whether anything was missed, and to see if I can push the gain further. Just let you know. |
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.
The wet pass starts mode search from an unbounded rd limit, so its pruning cannot bite until it finds a good candidate on its own. Start it instead from the dry pass's rd for the same block and size, plus a margin.
The two passes see different contexts, so the bound can be violated. A block left with no valid mode is re-searched once with the original limit.
Anchor: commit c77f169
Speed 4 (cpu-used=4): FG16 CTC (33 frames, class A1 and A2, RA)
STATS_CHANGED