PDA

View Full Version : difference between methods of rate control.


Tox|k
7th September 2005, 07:23
I have two questions here, didn't want to make two seperate threads, and since they're related i'll just post them here.

First, I was wondering what the difference between all the different methods of rate control are (excuse my terminology, if it's wrong). To be more specific, I'm talking about (they seem to come in pairs) ratetol/qcomp, cplxblur/qblur and vbv_maxrate/vbv_bufsize switches. I've looked around abit, the Mencoder docs seemed to have the best descriptions, but it was very little to work with.

I can understand most of what they do, but there are still holes left in my understanding.

I think i have an understanding of ratetol and qcomp, but i'd like to be certain. Say for qcomp=1.0, when the stream flux's at a rate that violates the ratetol, the encoder will then adjust the QP so that it is within the parameters of ratetol?

What is the difference between cplxblur and qblur; as in, what is the difference between reducing fluxuations in QP before and after curve compression? Why does cplxblur (according to mencoder docs) have a range of 0-999 and qblur a range of only 0-99?

Mostly what I really want to know here is what are the advantages and disadvantages of using one rate control method over the other? What situtations do each work best in?

The second question i have is more specific. For example, say i have some video that is one scene (ie. no cuts) and first has a lot of motion but then rather suddenly the camera stops moving and focus' on one spot. Sometimes what happens, is that the high motion part will have high QPs, but then when the still part starts, a few seconds in a keyframe is inserted and you can see the QPs kind of 'snap' into place and the quality of the picture suddenly changes. The quality getting better i have no problem with... the fact that it does it so abruptly is displeasing to the eye and i was wondering what methods might be used to fix it? Yes, i know adjusting min and max keyframe lengths should work, but are there any other tweaks?

That's about it for now, i hope i got it all down.

chen
7th September 2005, 15:25
I have been studying the ratecontrol algorithm of the encoder x264 for more than a month, so i can anwser part of your questions:
Mostly what I really want to know here is what are the advantages and disadvantages of using one rate control method over the other? What situtations do each work best in?No big differences between different methods. Most of the papers focusing on ratecontrol are quite similar, based on a common principle: frames of higher complexity deserves more bits than those of lower complexity. Another thing always true is that there is a tradeoff between bitrate constancy and video quality. However, there may be quite a few differences, when it comes to the details, but it's not easy to describe the differences in a few words.


the encoder will then adjust the QP so that it is within the parameters of ratetol?Yes.


The second question is even more difficult to answer, because i don't know how you set the parameters. If you expect a constant bitrate, then the problem you encounter is normal: with the same number of bits, the frame of higher complexity has for sure a lower quality. Otherwise, you can try to regulate the parameters, such as ratetol, qcomp and so on, and change the parameter that decides whether a keyframe is inserted. Moreover, have you tried a 2pass ratecontrol? It must provide a much better quality.

akupenguin
7th September 2005, 16:38
The quality getting better i have no problem with... the fact that it does it so abruptly is displeasing to the eye and i was wondering what methods might be used to fix it? Yes, i know adjusting min and max keyframe lengths should work, but are there any other tweaks?
Reducing cplxblur or ipratio might help. I also have some ideas on how to fix that in the algorithm, but no promises. (Basically, it would involve distinguishing between I-frames due to scenecuts and I-frames due to keyint.)