Quantcast
Channel: Intel® Software - Media
Viewing all articles
Browse latest Browse all 2185

Getting MFX_ERR_DEVICE_FAILED on h264 decode

$
0
0

I've followed the Quicksync sample_decode project and simple_decode tutorial available online. I can't seem to get those to compile (might take a look at getting those to work tomorrow), and the binaries made available for sample_decode outright do not work on my machine. I am able to compile and utilize the library with my program though; I had to make a build from the source made available in the Media SDK 2018 R2 installation, since I needed a library built with /MD (Code Generation) enabled.

I have an i7-8700K with iGPU enabled, and set as the primary adapter. I do have a secondary NVIDIA card, and I've been playing with arrangements just to try to get this to work.

Before I get into that, I've also tried testing to see if my machine would work with Quicksync on other verified applications. I have a build of FFMPEG that I know -used- to work with h264_qsv prior to some windows updates / intel driver updates, but today I get an error of (-3) unsupported. I also have a build of OBS that doesn't seem to work with QSV. The most recent stable version of OBS also doesn't seem to work encoding with QSV.

That might be it's own rat's nest in itself, so let me jump into the problem I've been having on the code side.
 

    mfxSyncPoint syncp;
	mfxFrameSurface1* mfxOutSurface = NULL;
	std::shared_ptr<mfxFrameSurface1> workingSurface = NULL;

	if(MFX_ERR_MORE_SURFACE == sts || MFX_ERR_NONE == sts) {
		workingSurface = GetFreeSurface(mfxFrameSurfaces); // Find free frame surface

		if(workingSurface == NULL) {
			gConsole->error("No free surfaces to work on");
			return;
		}
	}

	// Decode a frame asynchronously
	sts = mfxVideoDecode->DecodeFrameAsync(&mfxBts, workingSurface.get(), &mfxOutSurface, &syncp);

	// Ignore warnings if output is available,
	if(MFX_ERR_NONE < sts && syncp) {
		sts = MFX_ERR_NONE;
	}

	MFX_ERROR_CHECK_NORET(sts, "Failed to decode frame");

	if(sts == MFX_ERR_NONE) {
		// Synchronize. Wait until decoded frame is ready
		sts = mfxVideoSession.SyncOperation(syncp, 60000);

Here's a snippet of where I'm having problems. The MFXVideoSession seems to have initialized fine, the version is 1.27, codec is MFX_CODEC_AVC, IOPattern is set to MFX_IOPATTERN_IN_SYSTEM_MEMORY | MFX_IOPATTERN_OUT_SYSTEM_MEMORY, AsyncDepth is set to 1 (although this doesn't really matter).

DecodeHeader seems to work fine, it gets me mfxVideoParams that are appropriate to what I'm expecting out of the video. DecodeFrameAsync gets me an MFX_ERR_NONE, which I'm expecting - but when I get to SyncOperation, I get an MFX_ERR_DEVICE_FAILED.

Can anyone provide some insight on the problem I'm having?


Viewing all articles
Browse latest Browse all 2185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>