Log in

View Full Version : Need help about reference software JM


magic_yunjiao
10th August 2010, 08:48
Hi experts,
I'm a newcomer to study H.264/AVC,use JM as the reference
software.
Now,I come across some problems,do you anybody can help me explain them?
1.in the JM, input->rdopt=0 //RDO OFF
input->rdopt=1 //RDO ON
input->rdopt=2 //RDO with loss
I want to know the third "input->rdopt=2,//RDO with loss",what is kind of the situation?
2.MabffFrameFlag=0,1.....
I often meet "MbaffFrameFlag",but I'm puzzled ,not very clear about "MBAFF","PAFF","FRAME","FIELD"...
What does it mean ,"MbaffFrameFlag=0" and "MbaffFrameFlag=1"?
Thanks in advance.

simonhorlick
10th August 2010, 15:31
2.MabffFrameFlag=0,1.....
I often meet "MbaffFrameFlag",but I'm puzzled ,not very clear about "MBAFF","PAFF","FRAME","FIELD"...
What does it mean ,"MbaffFrameFlag=0" and "MbaffFrameFlag=1"?
Thanks in advance.

First off, the frame and field business relates to the use of interlacing. I'll assume you either know about this or can look it up easily. H264 can use the following methods for coding interlaced frames:
(1) code the fields separately
(2) combine the two fields and code as one frame
(3) combine the two fields and code as one frame, but code vertical pairs of macroblocks together (a 16x32 luma region) and choose whether to code this pair of macroblocks as a field pair or a frame pair.

Picture adaptive frame-field interlacing is the process of choosing between (1) and (2) on a per frame basis.

Macroblock adaptive frame-field interlacing is the process of choosing for each macroblock pair, whether it should be coded as a frame pair or a field pair. In the case of a field pair, the top field is stored in the top macroblock of the pair and the bottom field in the bottom macroblock. This method is generally the most efficient.

I don't know if I've fully answered your question or not, but MbaffFrameFlag=1 means that the current frame uses method (3), i.e. macroblocks are encoded and decoded in pairs using all the fancy features that come with MBAFF.

References:
http://ip.hhi.de/imagecom_G1/assets/pdfs/csvt_overview_0305.pdf

magic_yunjiao
11th August 2010, 02:06
First off, the frame and field business relates to the use of interlacing. I'll assume you either know about this or can look it up easily. H264 can use the following methods for coding interlaced frames:
(1) code the fields separately
(2) combine the two fields and code as one frame
(3) combine the two fields and code as one frame, but code vertical pairs of macroblocks together (a 16x32 luma region) and choose whether to code this pair of macroblocks as a field pair or a frame pair.

Picture adaptive frame-field interlacing is the process of choosing between (1) and (2) on a per frame basis.

Macroblock adaptive frame-field interlacing is the process of choosing for each macroblock pair, whether it should be coded as a frame pair or a field pair. In the case of a field pair, the top field is stored in the top macroblock of the pair and the bottom field in the bottom macroblock. This method is generally the most efficient.

I don't know if I've fully answered your question or not, but MbaffFrameFlag=1 means that the current frame uses method (3), i.e. macroblocks are encoded and decoded in pairs using all the fancy features that come with MBAFF.

References:
http://ip.hhi.de/imagecom_G1/assets/pdfs/csvt_overview_0305.pdf


Thanks for your reply!
I have read the article you provide...
Also I read <The H.264 Advanced Vido Compression Standard>(Second Editon)...and find the relevant details:
5.3.4 Frame and field coding
5.3.4.1 coding pictures in frame or field mode
5.3.4.2 coding macroblocks in frame or field mode
Figure5.10 Frame with macroblcok pairs
Figure5.11 MB pair coded using MAFF