x264 Debug window parameters

1

I am using x264 to encode a video. The debug window shows the message : x264 [debug]: frame=1928 QP=35.00 NAL=2 Slice:P Poc:72 I:0 P:32 SKIP:67 size=62 bytes PSNR Y:36.84 U:39.56 V:41.84

I understand that frame refers to frame number, slice refers to the particular way it gets encoded i.e. in this case a P-frame. I want to know what NAL, Poc, I, P, SKIP mean.

user226480

Posted 2013-05-24T04:18:13.040

Reputation:

Answers

1

The NAL is the Network Abstraction Layer in H.264. It allows the bitstream to be transported over a network, through means of NAL units, which contain the data. A set of NAL units is grouped into an access unit, and each access unit starts with a primary coded picture. The debug number is the NAL priority, depending on what kind of pictures the NAL contains:

NAL_PRIORITY_DISPOSABLE = 0
NAL_PRIORITY_LOW        = 1
NAL_PRIORITY_HIGH       = 2
NAL_PRIORITY_HIGHEST    = 3 

An IDR picture will always get the highest priority. I and P pictures get the "high" priority. B reference pictures get "low" priority, and B pictures get the disposable flag.

The POC is the picture order count. This feature exists because some pictures need to be transmitted before others – even if their presentation timestamp is later – so the decoder can correctly resolve the references. I can't tell you exactly how to interpret the value of the field, but looking at the frame types and the field during an actual encode should give you some clues. Basically you need to reorder the frames according to their POC and transmit them this way.

I and P simply give you the number of I and P macroblocks in the current frame. SKIP gives you the number of skip macroblocks. A skip macroblock simply encodes "nothing" and tells the decoder to use the prediction as-is. This saves the most bits and should be used for areas with few changes or slow global motion.

You can read more about H.264 in:

Wiegand, Thomas, et al. "Overview of the H. 264/AVC video coding standard." Circuits and Systems for Video Technology, IEEE Transactions on 13.7 (2003): 560-576. (PDF)

slhck

Posted 2013-05-24T04:18:13.040

Reputation: 182 472