Skip to content

Unrestricted partitioning depth for H partitions at speed 1 - #5393

Open
urvangjoshi wants to merge 1 commit into
AOMediaCodec:av2-encfrom
urvangjoshi:mg__extpart_recur_full
Open

Unrestricted partitioning depth for H partitions at speed 1#5393
urvangjoshi wants to merge 1 commit into
AOMediaCodec:av2-encfrom
urvangjoshi:mg__extpart_recur_full

Conversation

@urvangjoshi

@urvangjoshi urvangjoshi commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Keep ext_recur_depth_level = 0, to allow unrestricted partitioning for H partitions.
Only affects speed 1 because H partitions are disabled at speed >= 2.

Speed 1 CTC 33 frames RA:
(Anchor: 4a8df58)

+---------+--------+-------------+
| Summary |  YUV   |   Enc-time  |
+---------+--------+-------------+
|   A1    | -0.15% |   103.8%   |
|   A2    | -0.22% |   107.0%   |
|Avg wo B2| -0.27% |   108.0%   |
+---------+--------+-------------+

STATS_CHANGED for speed 1

yeqing-wu pushed a commit that referenced this pull request Sep 13, 2026
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):

```
+---------+--------+-------------+
| 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

Copy link
Copy Markdown
Contributor Author

Pls review. I have checked that tradeoff is good matching the expected ratio for speed 1

Keep ext_recur_depth_level = 0, to allow unrestricted partitioning for H
partitions.
Only affects speed 1 because H partitions are disabled at speed >= 2.

Speed 1 CTC 33 frames RA:

```
+---------+--------+-------------+
| Summary |  YUV   |   Enc-time  |
+---------+--------+-------------+
|   A1    | -0.15% |   103.8%   |
|   A2    | -0.22% |   107.0%   |
|Avg wo B2| -0.27% |   108.0%   |
+---------+--------+-------------+
```

STATS_CHANGED for speed 1
@urvangjoshi
urvangjoshi force-pushed the mg__extpart_recur_full branch from 6a96599 to 6dffcba Compare September 13, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants