Skip to content

Promote the uneven-4-way partition disable to speed 1 - #5305

Merged
urvangjoshi merged 1 commit into
AOMediaCodec:av2-encfrom
chengchen-google:experiment/patch_0021
Aug 25, 2026
Merged

Promote the uneven-4-way partition disable to speed 1#5305
urvangjoshi merged 1 commit into
AOMediaCodec:av2-encfrom
chengchen-google:experiment/patch_0021

Conversation

@chengchen-google

@chengchen-google chengchen-google commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

The speed feature was enabled at speed 2.
It turns out that its performance at speeed 1 is also good.

On speed 1, RA, the tradeoff is:

Testset PSNR-Y PSNR-U PSNR-V PSNR-YUV EncTime Ratio
A1 (17 frames) 0.02% 0.30% -0.05% 0.03% 93.77% 207.7
A2 (33 frames) 0.07% -0.30% 0.30% 0.06% 93.30% 111.7
A3 (33 frames) 0.16% 0.07% -0.47% 0.14% 89.52% 74.9
A4 (33 frames) 0.08% -1.66% -2.73% -0.09% 89.29% -----
A5 (33 frames) 0.47% -0.88% -0.75% 0.32% 85.27% 46.0

The speed feature is disabled for resolutions <= 270p.

STATS_CHANGED

@urvangjoshi

Copy link
Copy Markdown
Contributor

What is the anchor @chengchen-google for these results?
I saw a bigger loss on commit 2abcfff:

  • 0.13% average loss w/o B2
  • 0.06% on A1
  • 0.08% on A2
  • 0.19% on B1
  • 0.19% on A3
  • 0.34% on A4
  • Neutralish on A5 but most clips have a loss

If you see something similar, I'd suggest disabling based on resolution (1080+) and also keeping it on for screen content perhaps?

@chengchen-google

Copy link
Copy Markdown
Contributor Author

What is the anchor @chengchen-google for these results? I saw a bigger loss on commit 2abcfff:

  • 0.13% average loss w/o B2
  • 0.06% on A1
  • 0.08% on A2
  • 0.19% on B1
  • 0.19% on A3
  • 0.34% on A4
  • Neutralish on A5 but most clips have a loss

If you see something similar, I'd suggest disabling based on resolution (1080+) and also keeping it on for screen content perhaps?

The anchor is 5d628d8.
I haven't tested for other resolutions. I do have an impression that the performance change on lower resolutions is larger. Do you think we need the full information to make a decision? If other resolution shows larger loss, perhaps we can make this speed feature dependent on resolution?

@urvangjoshi

Copy link
Copy Markdown
Contributor

What is the anchor @chengchen-google for these results? I saw a bigger loss on commit 2abcfff:

  • 0.13% average loss w/o B2
  • 0.06% on A1
  • 0.08% on A2
  • 0.19% on B1
  • 0.19% on A3
  • 0.34% on A4
  • Neutralish on A5 but most clips have a loss

If you see something similar, I'd suggest disabling based on resolution (1080+) and also keeping it on for screen content perhaps?

The anchor is 5d628d8. I haven't tested for other resolutions. I do have an impression that the performance change on lower resolutions is larger. Do you think we need the full information to make a decision? If other resolution shows larger loss, perhaps we can make this speed feature dependent on resolution?

Yes, pls run other resolutions (RA 33 frames) and let's make a decision based on the result -- resolution dependent was indeed my suggestion.

@chengchen-google

Copy link
Copy Markdown
Contributor Author

What is the anchor @chengchen-google for these results? I saw a bigger loss on commit 2abcfff:

  • 0.13% average loss w/o B2
  • 0.06% on A1
  • 0.08% on A2
  • 0.19% on B1
  • 0.19% on A3
  • 0.34% on A4
  • Neutralish on A5 but most clips have a loss

If you see something similar, I'd suggest disabling based on resolution (1080+) and also keeping it on for screen content perhaps?

The anchor is 5d628d8. I haven't tested for other resolutions. I do have an impression that the performance change on lower resolutions is larger. Do you think we need the full information to make a decision? If other resolution shows larger loss, perhaps we can make this speed feature dependent on resolution?

Yes, pls run other resolutions (RA 33 frames) and let's make a decision based on the result -- resolution dependent was indeed my suggestion.

Hi Urvang, I tested on A3-A5. The loss is higher on A5, but the tradeoff is still good. Please see the full results here:

Testset PSNR-Y PSNR-U PSNR-V PSNR-YUV EncTime Ratio
A1 (17 frames) 0.02% 0.30% -0.05% 0.03% 93.77% 207.7
A2 (33 frames) 0.07% -0.30% 0.30% 0.06% 93.30% 111.7
A3 (33 frames) 0.16% 0.07% -0.47% 0.14% 89.52% 74.9
A4 (33 frames) 0.08% -1.66% -2.73% -0.09% 89.29% -----
A5 (33 frames) 0.47% -0.88% -0.75% 0.32% 85.27% 46.0

It seems good to apply it for all resolutions. Do you agree?

@urvangjoshi

Copy link
Copy Markdown
Contributor

Hi Urvang, I tested on A3-A5. The loss is higher on A5, but the tradeoff is still good. Please see the full results here:

Testset PSNR-Y PSNR-U PSNR-V PSNR-YUV EncTime Ratio A1 (17 frames) 0.02% 0.30% -0.05% 0.03% 93.77% 207.7 A2 (33 frames) 0.07% -0.30% 0.30% 0.06% 93.30% 111.7 A3 (33 frames) 0.16% 0.07% -0.47% 0.14% 89.52% 74.9 A4 (33 frames) 0.08% -1.66% -2.73% -0.09% 89.29% ----- A5 (33 frames) 0.47% -0.88% -0.75% 0.32% 85.27% 46.0

It seems good to apply it for all resolutions. Do you agree?

Thanks for testing!

I feel like PSNR-Y for A5 is still borderline ratio. Perhaps just keep it on for <= 270p?

@chengchen-google
chengchen-google force-pushed the experiment/patch_0021 branch 2 times, most recently from 93c75a4 to 2ad86d1 Compare August 25, 2026 16:19
@chengchen-google

Copy link
Copy Markdown
Contributor Author

Hi Urvang, I tested on A3-A5. The loss is higher on A5, but the tradeoff is still good. Please see the full results here:
Testset PSNR-Y PSNR-U PSNR-V PSNR-YUV EncTime Ratio A1 (17 frames) 0.02% 0.30% -0.05% 0.03% 93.77% 207.7 A2 (33 frames) 0.07% -0.30% 0.30% 0.06% 93.30% 111.7 A3 (33 frames) 0.16% 0.07% -0.47% 0.14% 89.52% 74.9 A4 (33 frames) 0.08% -1.66% -2.73% -0.09% 89.29% ----- A5 (33 frames) 0.47% -0.88% -0.75% 0.32% 85.27% 46.0
It seems good to apply it for all resolutions. Do you agree?

Thanks for testing!

I feel like PSNR-Y for A5 is still borderline ratio. Perhaps just keep it on for <= 270p?

Done.

Comment thread av2/encoder/speed_features.c
For resolutions >= 270p (A1-A4).

The speed feature was enabled at speed 2.
It turns out that its performance at speeed 1 is also good.

On speed 1, RA, the tradeoff is:

Testset 	PSNR-Y	PSNR-U	PSNR-V	PSNR-YUV EncTime  Ratio
A1 (17 frames) 	0.02% 	0.30%  	-0.05% 	0.03% 	 93.77%   207.7
A2 (33 frames) 	0.07% 	-0.30% 	0.30%  	0.06% 	 93.30%   111.7
A3 (33 frames) 	0.16% 	0.07%  	-0.47% 	0.14% 	 89.52%   74.9
A4 (33 frames) 	0.08% 	-1.66% 	-2.73% 	-0.09%	 89.29%   -----
A5 (33 frames) 	0.47% 	-0.88% 	-0.75% 	0.32% 	 85.27%   46.0

STATS_CHANGED

Change-Id: I10706c1ed77881e8d185f80e2a7a04b456eb6474
@urvangjoshi
urvangjoshi force-pushed the experiment/patch_0021 branch from 2ad86d1 to ea0aea8 Compare August 25, 2026 17:27
@urvangjoshi
urvangjoshi merged commit cc53250 into AOMediaCodec:av2-enc Aug 25, 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.

3 participants