hellgauss
11th January 2024, 18:30
I'm doing some tests in x264 8bit, -veryslow presets to encode anime at low bitrates. As known, the most annoyng issue is the poor gradient encode, especially in dark areas. This post is to share results and accept eventually critique and comments from experienced users.
Together with the aq-mode 3, which seems to give a (very) little help at same bitrate, it seems to me that the option -chroma_qp_offset 1 gives some further help, to the point that I think I will use it as a "default" option for my encodes.
Default value for chroma_qp_offset is -2 (-3 if the second psy-rd parameter is not zero). As I understood, it is a sort of offset for the quantizer of chroma channels with respect to luma, i.e. more bitrate given to chroma if <0 . With the option -chroma_qp_offset 1 this value becomes -1. The result is a smaller file size at constant -crf, which can be used to lower the bitrate or to decrease the -crf. Higher values still lower the bitrate, but to a lesser extent, so I do not go further than 1.
Considering that
1) One of the major point of video encode is to degrade the chrominance e.g. it is stored at half the resolution. Even some filters, such as sws bicublin resize, is tuned to keep details in the luma channel. I never heard of a bilincubic resize.
2) It seems to me that most of the annoying block/band in dark gradients are in the luma channel. I think it is a psychovisual effect, or perhaps in dark zones the chrominance does not matter too much.
My questions are
What is the rationale of a default negative chroma_qp_offset? Why give higher bitrate to chroma? Do you use the option -chroma_qp_offset 1 in your encodes? Is my interpretation correct?
Thanks for replies
HG
Together with the aq-mode 3, which seems to give a (very) little help at same bitrate, it seems to me that the option -chroma_qp_offset 1 gives some further help, to the point that I think I will use it as a "default" option for my encodes.
Default value for chroma_qp_offset is -2 (-3 if the second psy-rd parameter is not zero). As I understood, it is a sort of offset for the quantizer of chroma channels with respect to luma, i.e. more bitrate given to chroma if <0 . With the option -chroma_qp_offset 1 this value becomes -1. The result is a smaller file size at constant -crf, which can be used to lower the bitrate or to decrease the -crf. Higher values still lower the bitrate, but to a lesser extent, so I do not go further than 1.
Considering that
1) One of the major point of video encode is to degrade the chrominance e.g. it is stored at half the resolution. Even some filters, such as sws bicublin resize, is tuned to keep details in the luma channel. I never heard of a bilincubic resize.
2) It seems to me that most of the annoying block/band in dark gradients are in the luma channel. I think it is a psychovisual effect, or perhaps in dark zones the chrominance does not matter too much.
My questions are
What is the rationale of a default negative chroma_qp_offset? Why give higher bitrate to chroma? Do you use the option -chroma_qp_offset 1 in your encodes? Is my interpretation correct?
Thanks for replies
HG