Add superblock source SAD speed feature for RTC partitioning - #5367
Draft
jianj-g wants to merge 1 commit into
Draft
Add superblock source SAD speed feature for RTC partitioning#5367jianj-g wants to merge 1 commit into
jianj-g wants to merge 1 commit into
Conversation
…ioning
Computes superblock source SAD (between current source and collocated
previous source block) and incorporates it into variance-based
partitioning (VBP) for real-time (RTC) encoding mode (speed >= 6).
Key changes:
1. Superblock source SAD metrics:
- Added SOURCE_SAD classification enum (kZeroSad, kVeryLowSad,
kLowSad, kMedSad, kHighSad) and tracking fields in MACROBLOCK.
- Gated under sf->rt_sf.source_metrics_sb (enabled at speed >= 6).
- Computed per-SB source SAD in encode_rd_sb via cpi->fn_ptr[sb_size].sdf
and normalized to 64x64 scale.
2. Variance-based partition tuning:
- Early exit fast path for static superblocks (source_sad == 0 && y_sad == 0),
directly selecting the whole superblock size without evaluating sub-block
variance quadtrees.
- Scaled partition split thresholds (thresholds[1]..thresholds[4]) for
low-motion superblocks (source_sad_level <= kLowSad) to favor larger blocks.
- Adjusted low-resolution QP transition bounds in
tune_thresh_based_on_resolution when source_sad_level <= kLowSad.
- Guarded 16x16 and 32x32 variance-difference forced splits with
(source_sad_level > kLowSad).
STATS_CHANGED for RTC mode
TAG=agy
CONV=9425edb0-f25c-4ea7-b0c5-9c5c7ed895c0
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.
Computes superblock source SAD (between current source and collocated previous source block) and incorporates it into variance-based partitioning (VBP) for real-time (RTC) encoding mode (speed >= 6).
Key changes:
Superblock source SAD metrics:
Variance-based partition tuning:
STATS_CHANGED for RTC mode
TAG=agy
CONV=9425edb0-f25c-4ea7-b0c5-9c5c7ed895c0