ellen34
26th May 2010, 10:31
Hello, I am tracing the source code of XviD for my research, and I focus on the parts of mode decision in each MB.
Now I already know it uses cost function to decide the mode.
In P frame, each block has three modes: INTER, INTRA, INTER4V, and the corresponding function is findRD_inter, findRD_inter4v, and findRD_intra. Those functions also call functions which are CheckCandidateRD16 and CheckCandidateRD8. Finally, the bits of each block produces come from Block_CalcBits and Block_CalcBitsIntra(for INTRA mode)
Now my question is, the above functions return the value which is bits + (lambda*distortion)/quant_sq, I don't know why the distortion needs to be divide the square of quant? and the meaning of quant is the quantizer?
I hope someone could answer me:) THX
Now I already know it uses cost function to decide the mode.
In P frame, each block has three modes: INTER, INTRA, INTER4V, and the corresponding function is findRD_inter, findRD_inter4v, and findRD_intra. Those functions also call functions which are CheckCandidateRD16 and CheckCandidateRD8. Finally, the bits of each block produces come from Block_CalcBits and Block_CalcBitsIntra(for INTRA mode)
Now my question is, the above functions return the value which is bits + (lambda*distortion)/quant_sq, I don't know why the distortion needs to be divide the square of quant? and the meaning of quant is the quantizer?
I hope someone could answer me:) THX