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)
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st February 2014, 03:05   #1  |  Link
xkfz007
Registered User
 
Join Date: Sep 2013
Posts: 38
What is the RDOQ algorithm in HM?

I have learned something about the RDOQ. And I have read the RDOQ source codes in X264. However, I find the RDOQ algorithm in HM differs a lot. Do anyone have some materials about the RDOQ? Are there any proposals on RDOQ in JCT-VC?
xkfz007 is offline   Reply With Quote
Old 21st February 2014, 03:32   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
RDO = Rate Distortion Optimization

Basically RDO means that if the encoder has a number of choices, it will not simply pick the one that results in the smallest distortion (i.e. smallest difference between original and encoded frame), like a non-RDO optimizer would do. Instead, it also takes into account how many bits each possible choice will cost in the end. In other words, RDO picks the choice that gives the "best" compromise between distortion and bit cost (the "rate"). For example, it may be reasonable to pick a choice that causes a somewhat stronger distortion, when that choice saves many bits. At the same time, the choice that would give the smallest distortion might be overly expensive, in terms of bits. Of course implementation details of RDO can differ a lot.

Expressed as a formula, RDO tries to minimize D + λ*R, where D is the distortion (e.g. as Mean Squared Error), R is the rate (e.g. cost in bits) and λ is some weighting factor.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 21st February 2014 at 03:46.
LoRd_MuldeR is offline   Reply With Quote
Old 21st February 2014, 05:40   #3  |  Link
xkfz007
Registered User
 
Join Date: Sep 2013
Posts: 38
Quote:
Originally Posted by LoRd_MuldeR View Post
RDO = Rate Distortion Optimization

Basically RDO means that if the encoder has a number of choices, it will not simply pick the one that results in the smallest distortion (i.e. smallest difference between original and encoded frame), like a non-RDO optimizer would do. Instead, it also takes into account how many bits each possible choice will cost in the end. In other words, RDO picks the choice that gives the "best" compromise between distortion and bit cost (the "rate"). For example, it may be reasonable to pick a choice that causes a somewhat stronger distortion, when that choice saves many bits. At the same time, the choice that would give the smallest distortion might be overly expensive, in terms of bits. Of course implementation details of RDO can differ a lot.

Expressed as a formula, RDO tries to minimize D + λ*R, where D is the distortion (e.g. as Mean Squared Error), R is the rate (e.g. cost in bits) and λ is some weighting factor.
RDO is used to decide the prediction mode. But RDOQ is used to quantize the transform coefficients. I know the RDO process and knows a little about RDOQ.
xkfz007 is offline   Reply With Quote
Old 21st February 2014, 13:29   #4  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by xkfz007 View Post
RDO is used to decide the prediction mode. But RDOQ is used to quantize the transform coefficients. I know the RDO process and knows a little about RDOQ.
I would rather say that RDO is a general approach, which can be applied on various optimization problems - may it be selecting the prediction mode or selecting the quantized transform coefficients or something else

Now, in the quantization step, we can choose (at least) between rounding down the coefficient, round up the coefficient and forcing the coefficient to zero.

And again the idea of RDO can help to decide which of these choices would give the best "distortion vs. bit cost" compromise - rather than using "dead zones" or just selecting the one that would minimize the distortion (regardless of bit cost).

Actually, I think that is exactly what Trellis quantization does in x264
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 21st February 2014 at 14:15.
LoRd_MuldeR is offline   Reply With Quote
Old 24th February 2014, 06:40   #5  |  Link
xkfz007
Registered User
 
Join Date: Sep 2013
Posts: 38
Quote:
Originally Posted by LoRd_MuldeR View Post
I would rather say that RDO is a general approach, which can be applied on various optimization problems - may it be selecting the prediction mode or selecting the quantized transform coefficients or something else

Now, in the quantization step, we can choose (at least) between rounding down the coefficient, round up the coefficient and forcing the coefficient to zero.

And again the idea of RDO can help to decide which of these choices would give the best "distortion vs. bit cost" compromise - rather than using "dead zones" or just selecting the one that would minimize the distortion (regardless of bit cost).

Actually, I think that is exactly what Trellis quantization does in x264
Thanks!
After a couple days of study of HM RDOQ, I have known the main process of the algorithm. The HM RDOQ is different from the Trellis RDOQ in X264. However, as you said, the main principle is based on the RDO idea. And RDO is used to calculate the cost of the residual syntax elements.
xkfz007 is offline   Reply With Quote
Reply

Tags
hevc, rdoq


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 20:22.


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