rtc: Reuse pc_tree in non-RD partition search - #5284
Merged
Conversation
yeqing-wu
reviewed
Aug 19, 2026
jianj-g
force-pushed
the
rtc-reuse-pc-tree
branch
2 times, most recently
from
August 19, 2026 19:40
0283c08 to
2dd3567
Compare
yeqing-wu
reviewed
Aug 19, 2026
jianj-g
force-pushed
the
rtc-reuse-pc-tree
branch
from
August 19, 2026 19:58
2dd3567 to
706fb93
Compare
yeqing-wu
approved these changes
Aug 19, 2026
marpan-max
approved these changes
Aug 19, 2026
yeqing-wu
enabled auto-merge (squash)
August 19, 2026 21:04
Pre-allocate and reuse the partition context tree (pc_root / PC_TREE) per thread in real-time non-RD partition search instead of allocating and freeing nodes for every superblock. - Add pc_root to ThreadData and pre-allocate once per thread/frame. - Add av2_reset_pmc to reset PICK_MODE_CONTEXT state on node reuse. - In av2_nonrd_use_partition, lazily allocate child pc_tree nodes and reset existing PMC nodes across superblocks. This does not change the bitstream for RTC.
jianj-g
force-pushed
the
rtc-reuse-pc-tree
branch
from
August 20, 2026 15:19
706fb93 to
9a7d6f8
Compare
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.
Pre-allocate and reuse the partition context tree (pc_root / PC_TREE) per thread in real-time non-RD partition search instead of allocating and freeing nodes for every superblock.
This change is bitexact for RTC with 2.5% speed up for QVGA and 1.5% speed up for VGA and HD on speed 6.