- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Robby,
From the trace log. You are using Linux, right ? Are you using CentOS 7.1 ?
Have you referred simple_5_transcode_opaque in MSDK tutorials ? It's a sample for transcode with Opaque Memory.
For error code -8 (MFX_ERR_NOT_INITIALIZED), Maybe function vaInitialize is not called in your applications. can you check this ?
The function vaInitialize is called in function CreateVAEnvDRM in mediasdk-tutorials-0.0.3/common/common_vaapi.cpp
Help this can help.
Best Regards,
Zachary
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Robby,
From the trace log. You are using Linux, right ? Are you using CentOS 7.1 ?
Have you referred simple_5_transcode_opaque in MSDK tutorials ? It's a sample for transcode with Opaque Memory.
For error code -8 (MFX_ERR_NOT_INITIALIZED), Maybe function vaInitialize is not called in your applications. can you check this ?
The function vaInitialize is called in function CreateVAEnvDRM in mediasdk-tutorials-0.0.3/common/common_vaapi.cpp
Help this can help.
Best Regards,
Zachary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Jiandong. It was indeed an issue with the initialization of the session's MFX_HANDLE_VA_DISPLAY handle. Now the opaque memory is working.
-Robby
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Robby,
Great to know the opaque memory worked for you. I am closing this threads.
You can do a new post if you have other questions.
Thanks,
Zachary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm also having a problem with MFXVideoDECODE_Init returning MFX_ERR_NOT_INITIALIZED.
According to the documentation this shouldn't be a possible return value https://software.intel.com/en-us/node/628433#MFXVideoDECODE_Init1
Why would MFX_ERR_NOT_INITIALIZED be returned?
I'm porting a Media SDK application to Linux that ran fine on Windows. Using 2016 SDK on Ubuntu 14.10
Our encode code works fine.
Thanks
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page