Properly disable uneven 4-way partitions for > 270p at speed 1 - #5403
Merged
yeqing-wu merged 1 commit intoSep 13, 2026
Merged
Conversation
This was attempted originally in AOMediaCodec#5305, but it was not working as intended, because seq_params.enable_uneven_4way_partitions was set before any change to sf->part_sf.disable_uneven_4way_partitions was made. We fix this as follows: Update seq_params.enable_uneven_4way_partitions based on sf->part_sf.disable_uneven_4way_partitions in av2_set_speed_features_framesize_dependent() before seq_params_locked. At speed 1, this properly disables uneven 4-way partitions only when resolution is larger than 270p, while keeping them enabled for <= 270p. There is no behavior change for speed 0 (enabled for all resolutions) or speed >= 2 (disabled for all resolutions in framesize_independent). Also, keep uneven 4-way partitions enabled for screen content at speed 1, as the loss / speed-up ratio is not good enough. CTC RA 33 frames (Anchor: 4a8df58 + PR AOMediaCodec#5393): ``` +---------+--------+-------------+ | Summary | YUV | Enc-time | +---------+--------+-------------+ | A1 | 0.09% | 96.48% | | A2 | 0.03% | 92.85% | |Avg wo B2| 0.10% | 92.18% | +---------+--------+-------------+ ``` STATS_CHANGED for speed 1
urvangjoshi
requested review from
chengchen-google,
leolzhao,
yeqing-wu and
yunqingwang1
September 12, 2026 17:51
yeqing-wu
approved these changes
Sep 13, 2026
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.
This was attempted originally in
#5305, but it was not working as intended, because seq_params.enable_uneven_4way_partitions was set before any change to sf->part_sf.disable_uneven_4way_partitions was made.
We fix this as follows:
Update seq_params.enable_uneven_4way_partitions based on sf->part_sf.disable_uneven_4way_partitions in
av2_set_speed_features_framesize_dependent() before seq_params_locked.
At speed 1, this properly disables uneven 4-way partitions only when resolution is larger than 270p, while keeping them enabled for <= 270p. There is no behavior change for speed 0 (enabled for all resolutions) or speed >= 2 (disabled for all resolutions in framesize_independent).
Also, keep uneven 4-way partitions enabled for screen content at speed 1, as the loss / speed-up ratio is not good enough.
CTC RA 33 frames (Anchor: 4a8df58 + PR #5393):
STATS_CHANGED for speed 1