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.

mfxDECODE QueryIOSurf returns MFX_ERR_UNKNOWN = -1

ikspe
Beginner
475 Views

Hi,

from a few months, I'm using Intel Quick Sync for my job.
Here is what I do :

- in an application, I vpp + encode some video stream and store in to files
- in another application, I read this file, look for a keyframe and start : decode + vpp the stream and display it

Environment :
- pc1 : Windows 10 / 64 bits / i7-6950X / driver = (nvidia)
- pc2 : Windows 10 / 64 bits / i7-5600U / driver = intel graphics HD 520 v 20.19.15.4483
- pc3 : Windows 7 / 64 bits / i7-5600U / driver = intel graphics HD 5500 v20.19.15.4501

I'm sure my encoded stream is valid since I can decode almost evrywhere (pc1 with impl = auto = software / pc2 with both implementations software and auto=hardware / pc3 with implementation = software). But I can't decode it on the pc3 with implementation = auto = hardware.

The error I get happens when calling MFXVideoDECODE::QueryIOSurf()

	mfxInitParam initParam = { 0 };
	initParam.Version.Major = 1;
	initParam.Version.Minor = 0;
	initParam.Implementation = myImplParam; //I control it and can have AUTO/SOFTWARE/HARDWARE
	
	mfxStatus sts;
	
	MFXVideoSession hSession;
	sts = hSession.InitEx(initParam);
	if (MFX_ERR_NONE != sts)
	//treat error and exit

       PrintSessionAndImpl(hSession);
	
	MFXVideoDECODE* phDecode = new MFXVideoDECODE(hSession);
	sts = phDecode->DecodeHeader(&hBitstream, &hVideoParamDecode);
	if (MFX_WRN_PARTIAL_ACCELERATION == sts)
	//ignore
	if (MFX_ERR_NONE > sts)
	//treat error and exit
	
	PrintDecodeParam(hVideoParamDecode);
	
	mfxFrameAllocRequest hFrameAllocRequestDecode;
	memset(&hFrameAllocRequestDecode, 0, sizeof(hFrameAllocRequestDecode));
	sts = phDecode->QueryIOSurf(&hVideoParamDecode, &hFrameAllocRequestDecode);
	
	PrintFrameAllocRequest(hFrameAllocRequestDecode);
	if (MFX_WRN_PARTIAL_ACCELERATION == sts)
	//ignore
	
	if (MFX_ERR_NONE != sts)
	//treat error and exit

 

My printing functions give me the following results :

session.QueryIMPL() succeeded : impl = 0x302 = HARDWARE | VIA_D3D11
session.QueryVersion() succeeded : version = 1.19
videoParamDecode.mfx.CodecId = AVC
videoParamDecode.mfx.CodecLevel = 22
videoParamDecode.mfx.CodecProfile = 0x64 = 100
videoParamDecode.mfx.DecodedOrder = 0
videoParamDecode.mfx.ExtendedPicStruct = 0
videoParamDecode.mfx.TimeStampCalc = 0
videoParamDecode.mfx.SliceGroupsPresent = 0
videoParamDecode.mfx.MaxDecFrameBuffering = 2
videoParamDecode.mfx.EnableReallocRequest = 0
videoParamDecode.mfx.BRCParamMultiplier = 0
videoParamDecode.mfx.FrameInfo.FourCC = NV12
videoParamDecode.mfx.FrameInfo.AspectRatioW = 1
videoParamDecode.mfx.FrameInfo.AspectRatioH = 1
videoParamDecode.mfx.FrameInfo.ChromaFormat = 1
videoParamDecode.mfx.FrameInfo.PicStruct = 1
videoParamDecode.mfx.FrameInfo.FrameRateExtN = 10
videoParamDecode.mfx.FrameInfo.FrameRateExtD = 2
videoParamDecode.mfx.FrameInfo.CropX = 0
videoParamDecode.mfx.FrameInfo.CropY = 0
videoParamDecode.mfx.FrameInfo.CropW = 640
videoParamDecode.mfx.FrameInfo.CropH = 480
videoParamDecode.mfx.FrameInfo.Width = 640
videoParamDecode.mfx.FrameInfo.Height = 480
videoParamDecode.AsyncDepth = 4
videoParamDecode.IOPattern = 0x20
frameAllocRequestDecode.AllocId = 0
frameAllocRequestDecode.Info.FourCC =     
frameAllocRequestDecode.Info.AspectRatioW = 0
frameAllocRequestDecode.Info.AspectRatioH = 0
frameAllocRequestDecode.Info.ChromaFormat = 0
frameAllocRequestDecode.Info.PicStruct = 0
frameAllocRequestDecode.Info.FrameRateExtN = 0
frameAllocRequestDecode.Info.FrameRateExtD = 0
frameAllocRequestDecode.Info.CropX = 0
frameAllocRequestDecode.Info.CropY = 0
frameAllocRequestDecode.Info.CropW = 0
frameAllocRequestDecode.Info.CropH = 0
frameAllocRequestDecode.Info.Width = 0
frameAllocRequestDecode.Info.Height = 0
frameAllocRequestDecode.Type = 0x0 =
frameAllocRequestDecode.NumFrameMin = 0
frameAllocRequestDecode.NumFrameSuggested = 0
dec.QueryIOSurf() FAILED with sts = 0xffffffff = -1

 

Since it works on almost every use case, I wonder if this is a bug coming form using Hardware + Windows 7...

Anyone has an idea ?

 

Cheers,

0 Kudos
3 Replies
ikspe
Beginner
475 Views

i also forgot to mention than I have run the tool mediasdk_system_analyzer_64.exe

It gave me the entiere list supported, both hw and sw, dec and enc :

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X       X
        1.0     SW      Yes             X       X
................(all the same)
        1.19    HW      Yes             X       X
        1.19    SW      Yes             X       X

 

0 Kudos
ikspe
Beginner
475 Views

After a while, I stopped investigating on this problem.
Then, I got another bug :
https://software.intel.com/en-us/forums/intel-media-sdk/topic/735733

I solved my bug by recompiling mfx_dispatch in Visual Studio 2015 in /MT mode and _ALLOW_RUNTIME_LIBRARY_MISMATCH
(So I can mix my application, which needs to be in /MD and /Mdd).

Doing so, it solved the bug from this thread : it now works on Windows 7 as on Windows 10.

(but I still consider the other one as being a bug : there should not have differences between mfx_dispatch /MD and /MT !)

0 Kudos
Stav_S_Intel
Employee
475 Views

Hi,

We apologize for the slow response- i am happy you solved your issue and will report the other issue to the development group. 

 

Thanks,

Stav

0 Kudos
Reply