how to get the spspps?who can help me!

how to get the spspps?who can help me!

In sdk man ,it said "The application can retrieve a copy of the bitstream header, by attaching the mfxExtCodingOptionSPSPPS structure to the mfxVideoParam structure."
my code like this ,but return is -3 and i can't get the sps:

mfxVideoParam out;


mfxExtCodingOptionSPSPPS sps;


std::vector extps;

extps.push_back((mfxExtBuffer *)&sps);




but ,remove sps like this,the function return 0:

mfxVideoParam out;



why? who can help me and give me a demo ?

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Jin,

You need to be using API 1.3 (MSDK 2012). Try this:

mfxVideoParam par;

    mfxExtCodingOptionSPSPPS opt;
    opt.Header.BufferSz = sizeof(mfxExtCodingOptionSPSPPS);
    par.mfx.CodecId = MFX_CODEC_AVC;
    par.ExtParam = new mfxExtBuffer *[1];
    par.ExtParam[0] = (mfxExtBuffer*)&opt;
    par.NumExtParam = 1;
    opt.SPSBuffer = new mfxU8 [100];
    opt.PPSBuffer = new mfxU8 [100];
    opt.PPSBufSize = 100;
    opt.SPSBufSize = 100;

    sts = m_pmfxENC->GetVideoParam(&par);

The SPS/PPS buffer will point to the Nal_Unit() preceeding the SPS or PPS data. Hope this helps


thanks Eric ,
i also have some questions,

1.API 1.3 (MSDK 2012). I only can run on sw mode ,my cpu is i7 2600k video driver ver is OS is win7 u,i check the folder Media SDK 2012\bin\win32 only one filelibmfxsw32.dll exsit . API1.3 (MSDK 2012) only support sw mode? if i use the hwlib applicationloadthe libmfxhw32-s1.dll

2.I try get the spsppsuse api1.0,api1.1 on hw mode ,but failed. On sw mode can returnopt.PPSBufSize =8 and opt.SPSBufSize =37 ,but thevalue of opt.SPSBuffer and ppsbuffer looks like not correct. the value is 0.
To get the spspps use functiongetVideoParam only on sw mode ?

i run thesys_analyzer.exe get some infomation :

The following versions of Media SDK API are supported by platform/driver:

Version Target Supported Dec Enc

1.0 HW Yes X X

1.0 SW Yes X X

1.1 HW Yes X X

1.1 SW Yes X X

1.3 HW No

1.3 SW Yes X X

1.3 AUTO SW (max API version of installed SDK)

Graphics Devices:

Name Version State

Intel HD Graphics Family Active

System info:

CPU: Intel Core i7-2600K CPU @ 3.40GHz

OS: Microsoft Windows 7

Installed Media SDK packages (be patient...processing takes some time):

Analysis complete... [press ENTER]

make one correction ,the question 2 the value of opt.SPSBuffer and ppsbuffer is correct but it still run on the sw mode. why? howlet the functiongetVideoParam run on the hw mode?

Best Reply

Hi Jin,

The Intel Media SDK 2012 (API 1.3) is designed for the next generation Intel CPUs. The 2012 developer package thats posted contains only a software implementation. When the actual platform is launched, the graphics driver for those parts will contain the hardware library. You cant run SPS/PPS extraction in HW because 1) its a new feature of API 1.3 and 2) the hardware is not released yet.

The goal of posting the development package early is to allow people to create their apps for future platforms before the actual release of the hardware. If you structure your sessions with MFX_IMPL_AUTO, you will get the HW accelerated benefits when the platform is launched.

Hope this clears up the confusion.


Leave a Comment

Please sign in to add a comment. Not a member? Join today