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.

MFX_ERR_UNDEFINED_BEHAVIOR returned by MFXVideoDECODE_DecodeFrameAsync function.

shashwat_D_
Beginner
744 Views

Hi,

I've converted transcode_VM(D3D) sample from C++ to C language calling the C level APIs. I've used same session to save context of Encoder and Decoder. In the Transcoding loop, first call to the function MFXVideoDECODE_DecodeFrameAsync returns MFX_ERR_UNDEFINED_BEHAVIOR.

I'm using Windows 7 with D3D9 device acceleration. Can someone help me with the error code.

Regards,

Shashwat

0 Kudos
3 Replies
Surbhi_M_Intel
Employee
744 Views

Hi Shashwat,

This error - MFX_ERR_UNDEFINED_BEHAVIOR could be because of various issues. Can you please send us a reproducer and also can you tell us if the original sample worked for you. Please see this to include the necessary details for this query.   

Thanks,
-Surbhi

0 Kudos
shashwat_D_
Beginner
744 Views

Hi surabhi,

Original sample worked like a charm. I figured out my malloc function for allocating video memory had issues.

Can you please guide me how i should be allocating video memory. Because i noticed apart from explicit call to mfxAllocator.Alloc, alloc function is called multiple times implicitly (by libmfx) during decoder and encoder init.

 

0 Kudos
Surbhi_M_Intel
Employee
744 Views

Hi Shashwat, 

Libmfx is a dispatcher which is linked to your application statically, use for detecting and linking the implementation library according to the machine. This is basically used in the start up to find which implementation(SW or HW accelerated) can be chosen, if you are choosing HW mode and cannot complete the operation with requested params, so it would fall back to SW. You can check the dev guide for more info or check this C:\Program Files\Intel\Intel(R) Media Server Studio 2015 R3\Software Development Kit\opensource\mfx_dispatch location for the opensource code.
 
You can read in depth about memory allocation / mfxFrameAllocator on MediaSDK Manual Pg26. Also, looking our simple tutorials should also help understanding the memory Allocations. 
Hope this helps!

Thanks,
-Surbhi

0 Kudos
Reply