Greetings, I am having problems to get my code to work using the opaque memory. My code works with either the system memory or the video memory.
The setup is like this:
Decoder + VPP + Encoder
where the Decoder decodes a 1920x1088 H.264 bit-stream, VPP resizes the raw video into 640x480 resolution, and the Encoder encodes the raw video into another H.264 bit-stream.
in the system memory mode, all the frame surfaces are allocated in the system memory, using the default frame allocator. Likewise, in the video memory mode, all the frame surfaces are allocated in the video memory, using the frame allocator provided by VA API. In both cases, each allocated frame surface is managed by an mfxFrameSurface1, which is allocated separately. My code works OK in both the system memory and video memory modes.
However, it does not work at all in the opaque memory mode, in which case I don't allocate any frame surfaces at all. I create two separate arrays of mfxFrameSurface1 pointers. Assign the starting address of the 1st array to the decoder's mfxExtOpaqueSurfaceAlloc, and assign the starting address of the 2nd array to the encoder's mfxExtOpaqueSurfaceAlloc.
Then I set the decoder's ExtParam to point to its mfxExtOpaqueSurfaceAlloc, and the encoder's to its own.
I can't think of anything else I need to configure, but the call to MFXVideoDECODE_Init() always returns error -8 (MFX_ERR_NOT_INITIALIZED). I've attached the MFX tracer log file. Could some MSDK experts review it, and tell me what is missing?
Thanks!
Robby