Skip to content

Skip chroma RD evaluation of interpolation filter search - #5420

Merged
leolzhao merged 1 commit into
AOMediaCodec:av2-encfrom
dikshasingh-sys:interp_filter_av1
Sep 22, 2026
Merged

leolzhao merged 1 commit into
AOMediaCodec:av2-encfrom
dikshasingh-sys:interp_filter_av1

Conversation

@dikshasingh-sys

Copy link
Copy Markdown

This patch introduces the speed feature 'skip_model_rd_uv' to skip the RD evaluation of chroma planes during the interpolation filter search. The chroma predictors are built later using the best interpolation filter selected by the luma RD. This speed feature is enabled for speed >= 1.

This optimization has been taken from AV1:
https://aomedia-review.googlesource.com/c/aom/+/210801

Results for RA CTC, A1 17 frames, A2 33 frames, speed 1: (Anchor: [12c553a])

+-----+------+-------+------+-------+---------------+
|Class|  Y   |  U    |   V  |  YUV  |EncInstCount(%)|
+-----+------+-------+------+-------+---------------+
| A1  | 0.01 | -0.11 |-0.21 |  0.00 | 99.3          |
| A2  | 0.00 |  0.23 | 0.40 |  0.03 | 98.6          |
+-----+------+-------+------+-------+---------------+

STATS_CHANGED for speed >= 1

@dikshasingh-sys

Copy link
Copy Markdown
Author

@leolzhao leolzhao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@yeqing-wu yeqing-wu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yeqing-wu
yeqing-wu enabled auto-merge (rebase) September 21, 2026 18:20
@urvangjoshi

Copy link
Copy Markdown
Contributor

@dikshasingh-sys : PSNR U/V do seem to have losses for A2 set, although YUV looks ok.
What is the U/V loss in other testsets?

Was similar loss seen in AV1? I see that speed feature in AV1 is enabled for speed >= 3 only.

@dikshasingh-sys

Copy link
Copy Markdown
Author

@dikshasingh-sys : PSNR U/V do seem to have losses for A2 set, although YUV looks ok. What is the U/V loss in other testsets?

Was similar loss seen in AV1? I see that speed feature in AV1 is enabled for speed >= 3 only.

Please find the BD-Rate impact for the other test sets, tested on commit 12c553a using 33 frames at speed=1:

+-----+------+-------+------+-------+---------------+
|Class|  Y   |   U   |  V   |  YUV  |EncInstCount(%)|
+-----+------+-------+------+-------+---------------+
| A5  | 0.01 |  0.55 | -0.24|  0.02 |          98.6 |
| A4  |-0.01 |  0.28 |  0.43|  0.02 |          98.7 |
| A3  | 0.01 |  0.01 | -0.11|  0.01 |          99.2 |
+-----+------+-------+------+-------+---------------+

The runs for the B1 and B2 test sets are currently in progress. We will update the results once they are completed.

For reference, the speed feature was extended to speed >= 1 in AV1 in 212381 and below are the results for speed 1:

+-------------+-------------------+---------+---------+---------+
| Resolution  | Instruction Count |    Y    |    U    |    V    |
|             | Reduction (%)     |         |         |         |
+-------------+-------------------+---------+---------+---------+
| LOWRES2     |             1.233 |  0.0136 |  0.0122 |  0.0405 |
| MIDRES2     |             0.905 |  0.0024 |  0.1666 |  0.1526 |
| SHORTS608P  |             0.421 | -0.0506 |  0.0243 | -0.0750 |
| SHORTS720P  |             0.227 | -0.0742 | -0.0219 |  0.0442 |
| SHORTS1080P |             0.203 | -0.0628 |  0.0205 |  0.0071 |
| HDRES2      |             0.790 |  0.0007 |  0.2404 |  0.1360 |
| Average     |             0.597 | -0.0319 |  0.0661 |  0.0447 |
+-------------+-------------------+---------+---------+---------+

@urvangjoshi

Copy link
Copy Markdown
Contributor

@dikshasingh-sys : PSNR U/V do seem to have losses for A2 set, although YUV looks ok. What is the U/V loss in other testsets?
Was similar loss seen in AV1? I see that speed feature in AV1 is enabled for speed >= 3 only.

Please find the BD-Rate impact for the other test sets, tested on commit 12c553a using 33 frames at speed=1:

+-----+------+-------+------+-------+---------------+
|Class|  Y   |   U   |  V   |  YUV  |EncInstCount(%)|
+-----+------+-------+------+-------+---------------+
| A5  | 0.01 |  0.55 | -0.24|  0.02 |          98.6 |
| A4  |-0.01 |  0.28 |  0.43|  0.02 |          98.7 |
| A3  | 0.01 |  0.01 | -0.11|  0.01 |          99.2 |
+-----+------+-------+------+-------+---------------+

The runs for the B1 and B2 test sets are currently in progress. We will update the results once they are completed.

For reference, the speed feature was extended to speed >= 1 in AV1 in 212381 and below are the results for speed 1:

+-------------+-------------------+---------+---------+---------+
| Resolution  | Instruction Count |    Y    |    U    |    V    |
|             | Reduction (%)     |         |         |         |
+-------------+-------------------+---------+---------+---------+
| LOWRES2     |             1.233 |  0.0136 |  0.0122 |  0.0405 |
| MIDRES2     |             0.905 |  0.0024 |  0.1666 |  0.1526 |
| SHORTS608P  |             0.421 | -0.0506 |  0.0243 | -0.0750 |
| SHORTS720P  |             0.227 | -0.0742 | -0.0219 |  0.0442 |
| SHORTS1080P |             0.203 | -0.0628 |  0.0205 |  0.0071 |
| HDRES2      |             0.790 |  0.0007 |  0.2404 |  0.1360 |
| Average     |             0.597 | -0.0319 |  0.0661 |  0.0447 |
+-------------+-------------------+---------+---------+---------+

Thanks @dikshasingh-sys for that info.

So, looks like we see more chroma losses in AV2 (e.g. A2, A4 and A5 sets) than what's seen in AV1 -- with 1% to 1.5% encoder speed-up.

I'm unclear about the trade-off, as we haven't decided the critera for chroma.
So, I'll leave it up to @yunqingwang1 @yeqing-wu @leolzhao to decide.

@yunqingwang1

Copy link
Copy Markdown
Contributor

Based on AV2's YUV weights, this sounds okay to me.

@leolzhao

Copy link
Copy Markdown
Contributor

Based on AV2's YUV weights, this sounds okay to me.

The U and V loss look acceptable to me as well.

This patch introduces the speed feature 'skip_model_rd_uv' to skip the
RD evaluation of chroma planes during the interpolation filter search.
The chroma predictors are built later using the best interpolation
filter selected by the luma RD. This speed feature is enabled for speed
>= 1.

This optimization has been taken from AV1:
https://aomedia-review.googlesource.com/c/aom/+/210801

Results for RA CTC, A1 17 frames, A2 33 frames, speed 1: (Anchor:
[12c553a]
(AOMediaCodec@12c553a))

```
+-----+------+-------+------+-------+---------------+
|Class|  Y   |  U    |   V  |  YUV  |EncInstCount(%)|
+-----+------+-------+------+-------+---------------+
| A1  | 0.01 | -0.11 |-0.21 |  0.00 | 99.3          |
| A2  | 0.00 |  0.23 | 0.40 |  0.03 | 98.6          |
+-----+------+-------+------+-------+---------------+
```

STATS_CHANGED for speed >= 1

Change-Id: I0b791230d5a5cf3228653635dd0332ad401e91bc
@leolzhao
leolzhao merged commit a0c9579 into AOMediaCodec:av2-enc Sep 22, 2026
1 check passed
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.

6 participants