Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

how to get the spspps?who can help me!

Jin_Shuyang
Beginner
828 Views

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;

MSDK_ZERO_MEMORY(out);

mfxExtCodingOptionSPSPPS sps;

MSDK_ZERO_MEMORY(sps);

std::vector extps;

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

out.ExtParam=&extps[0];

out.NumExtParam=1;

sts=m_pmfxENC->GetVideoParam(&out);



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



mfxVideoParam out;

MSDK_ZERO_MEMORY(out);

sts=m_pmfxENC->GetVideoParam(&out);



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


0 Kudos
1 Solution
Eric_S_Intel
Employee
828 Views

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.

Eric

View solution in original post

0 Kudos
4 Replies
Eric_S_Intel
Employee
828 Views
Hi Jin,

You need to be using API 1.3 (MSDK 2012). Try this:
[bash]mfxVideoParam par;
    MSDK_ZERO_MEMORY(par);

    mfxExtCodingOptionSPSPPS opt;
    MSDK_ZERO_MEMORY(opt);
    opt.Header.BufferId = MFX_EXTBUFF_CODING_OPTION_SPSPPS;
    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);
    MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);

[/bash]

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

-Eric
0 Kudos
Jin_Shuyang
Beginner
828 Views
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 8.15.10.2622 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 8.15.10.2622 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]

0 Kudos
Jin_Shuyang
Beginner
828 Views

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?

0 Kudos
Eric_S_Intel
Employee
829 Views

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.

Eric

0 Kudos
Reply