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.

Windows Debug LIBs

smith__rob
Beginner
1,145 Views

Hi,

Is there any way Windows debug LIB files could be included in the Media SDK in the future?  Currently using 2018 R2 (and have used R1) and not having debug builds is a real pain with the linker kicking out errors unless I build everything as release.

 

0 Kudos
15 Replies
Mark_L_Intel1
Moderator
1,145 Views

Hi Rob,

I don't think we can build debug library in Windows but we can do it in Linux, is it OK to debug on Linux?

For access to our open source project, go to https://github.com/Intel-Media-SDK/MediaSDK and here is the document for build:

https://github.com/Intel-Media-SDK/MediaSDK/wiki/Build-Media-SDK-on-Ubuntu

https://software.intel.com/en-us/articles/build-and-debug-open-source-media-stack

Does this works for you?

I am also check the dev team if they have this path planned.

Mark

0 Kudos
smith__rob
Beginner
1,145 Views

Hi, as I am developing Windows applications then no, I can’t debug on Linux. Just to clarify, I’m talking about the .LIb files, NOT dll libraries

there shouldn’t be any technical reasons why you can’t provide them as every other SDK I have used includes them.

Could someone have another look into this?

im currently finding implementing MediaSDK incredibly frustrating at the minute, spending lots of time with the API returning MFX_ERR_UNDEFINED_BEHAVIOR when the documentation doesn’t specify that it should so having to guess as to why.

0 Kudos
Mark_L_Intel1
Moderator
1,145 Views

Hi Rob,

Yes, that was the expectation of Media SDK.

Before the open source project, we only release binaries, so the normal way to debug in this scenario is to reproduce it in MSDK sample code, this path has been working since the first release, could I work with you to reproduce your issue?

The open source project started the possibility which user could build the debug library and debug based on the full stack, since the open source code is shared between Windows and Linux, that's why I was suggesting if you can do the debug Linux debugging first. If this doesn't work for you, could we try to reproduce your issue?

Mark

0 Kudos
smith__rob
Beginner
1,145 Views

Hi

With the best of respect I don't think you understand the issue.

The .LIB files which we link against are built using the MSVC Runtime Option of "Multi-Threadded"

I'm asking for you to also create these LIB files with "Multi-Threadded Debug"

While I am debugging my applications, they are setup as "Multi-Threadded Debug" and you are not allowed to mix the two in the same executable.  So, I have to "debug" using the "Multi-Threadded" (non debug) version which is unhelpful.

I'm not asking for source code, I don't need the source code.  I just need debug .LIB files that I can link with a debug application build.

Just to clarify, this resource might be helpful: https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library

The LIB files you supply are compiled as /MT, we also need them compiled as /MTd

0 Kudos
Mark_L_Intel1
Moderator
1,145 Views

Hi Rob,

If you are asking about "libmfx.lib" and "libmfx_2015.lib" built with flag "Multi-Threadded Debug", then I don't think I misunderstood your request.

I am checking dev team to see if they have a path that allow you or me to do this but normally I don't have this capability. As I said, if we can't do it, we have go to the normal debug path to reproduce the issue in sample code first.

Let me know if my understanding is still wrong.

Mark

0 Kudos
smith__rob
Beginner
1,145 Views

Hi

Yes your understanding is correct.  I have actually got Media SDK doing everything I need it to right now (mostly) - but its part of a larger application, which sadly has to also be compiled like this to enable Media SDK support.

0 Kudos
Mark_L_Intel1
Moderator
1,145 Views

Hi Rob,

Sorry for the delay to understand your question. I got it now.

I check our release code, we have the source code for dispatcher in our release: you can find it at C:\Program Files\Intel\Intel(R) Media SDK xxxxxx\Software Development Kit\opensource\mfx_dispatch.

Could you use this code to build libmfx.lib?

Mark

0 Kudos
smith__rob
Beginner
1,145 Views

Hi

 

Tried using this,and whilst it builds I cannot get it to work.

 

It seems to be looking in the registry for the MEdia SDK at Software\\Intel\\MediaSDK\\Dispatch

 

But there is no Dispatch key in local machine, current user or any of the 64/32 bit redirections.  Is it possible that the version included in the MediaSDK is out of date?

0 Kudos
Mark_L_Intel1
Moderator
1,145 Views

Thanks Rob,

I don't think the code is out of date since you have the latest, both 2018R1 and 2018R2 should work; let me contact with dev team to see if they can help you.

If you have time, could you describe the steps you did and error message? These could help us to response quicker.

Mark

0 Kudos
smith__rob
Beginner
1,145 Views

Hi

If I step over the code as it goes into mfxStatus MFXInitEx(mfxInitParam par, mfxSession *session)

Once in there it looks in the registry both in HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER for Software\Intel\MediaSDK\Dispatch

Despite having the Media SDK installed, these keys do not work.  The code then continues and looks in the folder the application is running from and fails to find the required .dll files.  However, if I compile using the LIB files this works, even though the DLLs arent present in my applications folder.  I don't know if I need a DEFINE somewhere that isn't set in the default config that will make this work.

The issue is some-what irrelevant anyway, as while compiling in debug it looks for libfmxsw32_d.dll or libfmxsw64_d.dll which you don't include in the media sdk anyway!

Also, if I want to use this on another system, do I need to install the Media SDK, or are the required DLLs included in the graphics driver installer?  Or is there a redistributables installer that just installs the required DLLs and not all the examples etc?

0 Kudos
Mark_L_Intel1
Moderator
1,145 Views

Hi Rob,

Did you try to rename libfmxsw32_d.dll or libfmxsw64_d.dll by removing "_d"?

I learned from dev team: If there are no reg keys then debug dispatcher will try to find HW msdk in system32 (64-bit dlls) or sysWOW64 (32-bit dlls) as well as release dispatcher. The name it looking is libfmxsw32.dll, etc.

Let me know if this works for you.

Mark

0 Kudos
smith__rob
Beginner
1,145 Views

Hi Mark

Its great that it will try to find them there, however the code im looking at puts the applications path on the front of the dll files which means its impossible for it to look anywhere else.

Surely i shouldn't need to be modifying the dispatcher?

0 Kudos
Nikita_P_Intel1
Employee
1,145 Views

Hi Rob,

Sorry for the delay with response.

Here is a brief description of possible MediaSDK dlls locations and loading for desktop applications:

Hardware MSDK dlls are distributed through the driver, so you just need to install the driver to get them. If you use DCH driver (6444 and newer) then hardware MSDK dlls will be located in system32 and sysWOW64 folders. If you use non-DCH driver then there will be a registry key "\SOFTWARE\Intel\MediaSDK\Dispatch" where will be specified dlls location which is "C:\Program Files\Intel\Media SDK". Software MSDK dlls are distributed through MediaSDK releases and placed at "C:\Program Files (x86)\IntelSWTools\Intel(R) Media SDK 2018 R2\Software Development Kit\bin".

To find and load dll dispatcher checks "Dispatch" reg key, application folder, paths from "Path" environment variable (where system32 and bin folder of installed MediaSDK are).

Were you able to build and link debug dispatcher to your application and use MediaSDK by renaming release dll?

Nikita

0 Kudos
smith__rob
Beginner
1,145 Views

Hi

Yes (although it was easier to alter the dispatcher to always use the non _d versions)

It works *ok* but it seems a little unstable.  In release works perfectly.  Not entirely sure why, but at least I can test with it.

0 Kudos
Mark_L_Intel1
Moderator
1,145 Views

Hi Rob,

Looks like there are still some issues, let us know the details if you want to chase it.

Mark

0 Kudos
Reply