I am trying to use VPP to convert YUY2 data in system memory into RGB data in video memory.
I have most things setup, however I cannot get the YUY2 data moved from the system memory into the input mfxFrameSurface1, so it can be processed by MFXVideoVPP_RunFrameVPPAsync.
I have tried using both In System Memory and In Video Memory flags (and correspondingly tried to set YUV pointers, or memId reference). However I cannot get either to work. Any suggestions on how to copy the YUY2 data into video memory for processing?
Windows 10 operating system, using the Intel Media SDK.
There is quite a bit of code around the entire process. We basically have a decoding workflow working in which we take a mfxBitstream, then use MFXVideoDECODE_DecodeFrameAsync, which gives us an mfxFrameSurface1, which we can feed to the MFXVideoVPP_RunFrameVPPAsync for processing. This works for videos that need decoded.
In this case we have raw video YUY2 that does not need decoded. So how do we get mfxBitstream data (from system memory) into an mfxFrameSurface1 that we can send through MFXVideoVPP_RunFrameVPPAsync?
We would like the resulting output from the VPP process to be in video memory, and run the process on the GPU through hardware acceleration. In the documentation this pretty well relates to the
function in the pseudo code in the documentation here: https://spec.oneapi.io/versions/1.0-rev-3/elements/oneVPL/source/programming_guide/VPL_prg_vpp.html#...
I’ve confirmed that VPL VPP can support YUY2 input.
This test case is reading YUY2 file, copy YUY2 from system memory to video memory, then call MFXVideoVPP_RunFrameVPPAsync, and output the output to a file.
I think the key thing is if the surface is lockable or not? If it can be lockable, it should work