Log in

View Full Version : Suitable for quality coding -- aq-mode on the chroma plane


A1
7th November 2022, 10:01
The usual way to solve the over-quantization of the chroma plane is to use the negative values ​​of the two parameters --cbqpoffs --crqpoffs,

However, this often uses an excessively large offset, which leads to a waste of code rate. To accurately set the value, you need to do a lot of tests manually. In addition, the compression speed of x265 is very slow, which is not suitable for multiple tests on computers with ordinary performance.

Therefore, there should be an aq-mode that automatically calculates the appropriate offset value and reasonably reduces the qp value of the chroma plane to ensure that the chroma plane is not over-quantized.

The inconsistency of the clarity of the luma plane and the chroma plane of different film sources is the root of the problem.

The clarity of the luma plane and the chroma plane of some film sources are similar, so it is suitable to use similar quantization values.

For some other sources, the clarity of the luma plane and the chroma plane is very different. When compressing with the same quantization value, the luma plane is still clear, but the chroma plane is blurred enough to be detected by the naked eye.

These differences can also be different in different time periods of the same source. The clarity of the luma plane and the chroma plane in the X time period is close, and the clarity of the luma plane and the chroma plane in the Y time period is very different.

It is not reasonable to use the same chromaqp offset in this case.

The best solution is to develop aq-mode that shifts the qp value of the chroma plane, using a smaller qp value for those time periods and regions where the chroma is very blurred relative to the luma plane.

I think if there is such aq-mode, it will be of great help for quality-oriented encoding.

rwill
7th November 2022, 13:39
I think x265 is still in "Patches Welcome" mode. Go ahead.

benwaggoner
8th November 2022, 00:02
Another potential approach would be to use a less coarse lambda table for chroma. It's been years since the last lambda table update.

A1
8th November 2022, 14:02
Another potential approach would be to use a less coarse lambda table for chroma. It's been years since the last lambda table update.

Regarding the question of how reasonable the chromaticity plane is to be quantified, different people think that the answer is different, and it is difficult to come up with a standard answer.
It is better to make a parameter similar to --qcomp or --aq-strength, and let the user adjust the strength by himself.

benwaggoner
8th November 2022, 21:52
Regarding the question of how reasonable the chromaticity plane is to be quantified, different people think that the answer is different, and it is difficult to come up with a standard answer.
It is better to make a parameter similar to --qcomp or --aq-strength, and let the user adjust the strength by himself.
Or simply add a better --aq-mode implementation for chroma. Adaptive Quantization is exactly supposed to adapt internal parameters to those optimal for the content. Better if x265 itself would reduce chroma QP when psychovisually appropriate, and save the bits otherwise.

A1
10th November 2022, 15:01
Or simply add a better --aq-mode implementation for chroma. Adaptive Quantization is exactly supposed to adapt internal parameters to those optimal for the content.

If you want to add aq-mode about the chroma plane, then consider the problem of using multiple aq-modes at the same time.
The cost of using aq-mode that enhances the chroma plane cannot be the loss of other aq-mode benefits.

benwaggoner
10th November 2022, 22:15
If you want to add aq-mode about the chroma plane, then consider the problem of using multiple aq-modes at the same time.
The cost of using aq-mode that enhances the chroma plane cannot be the loss of other aq-mode benefits.
Right. Chroma and luma adaptive quantization really ought to be implemented as a single tool picking optimal mode for each plane. Sometimes the chroma planes themselves can benefit from different qp offsets or other tuning.

BlueSwordM
14th December 2022, 07:09
What you essentially want is the rav1e approach.
Essentially, with a proper study, you can find what's the best chroma offset for a certain colorspace in a certain setting.

A1
22nd December 2022, 09:24
What you essentially want is the rav1e approach.
Essentially, with a proper study, you can find what's the best chroma offset for a certain colorspace in a certain setting.


Does "rav1e" mean "universal"?
I was looking for a "generic" approach,
Because I found that the time to study x265 is many times longer than the time to run it.