Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd August 2018, 10:48   #1  |  Link
iAvoe
Registered User
 
Join Date: Sep 2017
Posts: 8
In HEVC, only QP=4 is truly lossless quantization... what about 0~3?

This is definitly very hard to answer, the document source: x265.readthedocs.io/en/default/lossless.html

Updated - Aug.16:
Quantization is the process of dividing the DCT coefficients by another matrix that is sorted by quantizer, when specifed QP=0, x265 skips dividing and gives output. When QP=4, x265 gives a lossless output that is same as x264's QP=0.

Since value 0~3 are available, and 0 disables quantization, it appears the --qp option has 4 states:
0 disable, 1~3 unknown, 4 lossless and 5~51 x264Setting+4

I thought this could be an error in the doc, but they also says the highest RDO optmization is --qp 4, which it's lossless.
Since 4 is --qp 0 in x264, it looks like we need to give a +-4 to switch encoders, but it won't make sense when the maximum of --qp is 51.

Last edited by iAvoe; 16th August 2018 at 05:24. Reason: make my sentences readable
iAvoe is offline   Reply With Quote
Old 2nd August 2018, 11:09   #2  |  Link
iAvoe
Registered User
 
Join Date: Sep 2017
Posts: 8
Quote:
Originally Posted by iAvoe View Post
I'm trying to understand this means, the original URL is: x265.readthedocs.io/en/default/lossless.html

I think they're saying about when parameter --qp is set to 4, and it will do the same as --qp 0 in x264... and this makes confusion to me
In x264 screen recording, I prefer using --qp 0 instead of CRF mode to save processing power and make the output as sharp as possible to make editing easy (and other encoding elements doesn't affect the video much to me), if one day x265 screen record is available, then this setting is became weird you know
iAvoe is offline   Reply With Quote
Old 2nd August 2018, 12:31   #3  |  Link
iAvoe
Registered User
 
Join Date: Sep 2017
Posts: 8
and with further study, I feel it is more like for instructing DCT transformation better, because in very low CRF mode, you want the output to be as sharp as possible, so they have increased the "--qp 0" gap where if the decision lands among 0~3, the DCT transformation is disabled because it's worth to output that detail untouched, but when it's 4, the divisor for DCT matrix became 1, so this is equivalent as "--qp 1" in x264, am I right?

Last edited by iAvoe; 2nd August 2018 at 12:35.
iAvoe is offline   Reply With Quote
Old 2nd August 2018, 19:32   #4  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,928
It's worth noting that HEVC can do both transform skip (--tskip) which is lossy encoding but without the initial frequency domain transform for a CU and Lossless CU (--cu-lossless) which is true lossless encoding of a CU. Both can be used on a per CU basis, and both can be used in the same frame.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 3rd August 2018, 00:23   #5  |  Link
iAvoe
Registered User
 
Join Date: Sep 2017
Posts: 8
Thanks for reply! Actually that's why this is confusing to me, if we are already able to skip DCT transform then what are they thinking about it, and it seems that DCT transform it what I only know about quantization, is there some thing that I'm missing?
iAvoe is offline   Reply With Quote
Old 3rd August 2018, 09:16   #6  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 3,630
Quantization is dividing the coefficients from the DCT transform, not the transform itself.

Note the use of both a quantizer scale code and a quantization matrix, you can vary the strength of the quantization by varying the scale code. I believe this is what we usually think of as the quantizer (qp) but the quantization matrix can still do something even if it is one. You can also simply keep the DCT coefficient matrix untouched, do the DCT transform but not use the quantization matrix at all.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Reply

Tags
--qp, lossless encoding, parameter, x265

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:48.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.