Showing results for 
Search instead for 
Did you mean: 
New Contributor I

Accessing per-macroblock (QP) Quantizer Parameter in H.264/MPEG2 decode

I am hoping somebody at Intel can answer a few questions on a video research application.
The following questions are in regards to QuickSync H.264 and MPEG2 decoding on the Sandy Bridge Gen2 processors.
1. I currently use a software based H.264 and MPEG2 video decoder which allows me to extract the stored per-macro block QP values. I have not found a way to do this using the Media SDK.
Any suggestions on how I might use the Media SDK to do this?
2. In the Media SDK decoders, where does the bitstream parsing where QP first becomes available happen?
On some GPU architectures decode bitstream parsing appears to mostly occur mostly on the host processor, so,
in fact per-macroblock QP values first becomes available on the host-CPU, not actually in the GPU.
Is this how Sandy-Bridge accelerated decoding works? Does the host CPU do the bitstream parsing to the point where per-macroblock QP is decoded?
3. Is there released source code for either H.264 or MPEG2 Quick Sync decoding using SB that would allow me to retrieve the per-macroblock QP values?
I have been experimenting with the SDK on Sandy Bridge, and love the performance.
Thank you for any answers to these questions.
0 Kudos
2 Replies

Hi Cameron,

The Media SDK API provides elementary stream decoding at a frame level, so it does not expose an API for macroblock-level parsing. When it is used on products that supportQuick Syncvideo hardware acceleration, the processing the graphics processor handles this sub-task, leaving the host-CPU free for other tasks.

If you have an application (use-case) that requires access to lower-level details of video decoding, The Microsoft DXVA interfaces may be used, however we feel this should not been required as the Media SDK providesa higher-level (simpler) API and optimized implementation for decoding H.264 and MPEG2 elementary streams.

New Contributor I

Thanks for your answer. Do you know if the per-macroblock QP values are available from the Sandy BridgeDXVA drivers?
(it seems Sandy Bridgedoes support full bitstream decode, so can the appropriate DXVA interfaces be used to getthe per-macroblock QP values)
Thank you,