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.

Issues with How to run Media SDK samples on Skylake post

AaronL
Beginner
588 Views

So, I tried to follow the steps described in the "How to run Media SDK samples on Skylake" post at https://software.intel.com/en-us/forums/intel-media-sdk/topic/593838 .  The encoding steps worked for me, but the decoding steps do not.  The post says to use the following command-line for decoding: sample_decode h265 -i <inputfile> -o <outputfile> -hw .

This definitely does not work.  For the encoding command-line, it says to use -p 6fadc791a0c2eb479ab6dcd5ea9da347 to load the Skylake HEVC plug-in, but this isn't done for the decoding command-line.  As a result, it uses the default for HEVC, the MFX_PLUGINID_HEVCD_SW plug-in, and this doesn't work, since the plug-in cannot be loaded.  The call to MFXVideoUSER_Load() fails with MFX_ERR_NOT_FOUND.  I don't know what is needed to install this plug-in, but it is definitely not provided by the latest Intel graphics driver package.  Note that I'm using all the prerequisites as described in the post on a Windows 10 Skylake system.  Plus, based on the name of the #define, it would seem that this GUID is associated with a SW HEVC plug-in, and I wouldn't want to use that anyway.

If instead, I use -p 6fadc791a0c2eb479ab6dcd5ea9da347 , it still doesn't work, unfortunately.  It is able to load the plug-in just fine, but it fails when it calls m_pmfxDEC->DecodeHeader() with MFX_ERR_UNSUPPORTED.  As an input file, I used the output file of HEVC encoding using sample_encode.exe, so I would expect that the input file is good.  I also tried it with the test_stream.h265 file included with the samples in the _bin/content directory, and it failed the same way.  I tried with -d3d and also with -d3d11, which didn't make any difference, and those wouldn't really make any difference for the DecodeHeader() call anyway.

Also, if anyone copies the command-line from the post exactly, it won't actually work.  That's because in some cases (such as with -p), it uses a "long dash", and that results in a syntax error with the sample, which expects a '-' character as the option separator.

So, what is needed to get HEVC decoding working on Skylake?

0 Kudos
6 Replies
Surbhi_M_Intel
Employee
588 Views

Hi Aaron, 

Thanks for the proof reading the content on SKL note and pointing out the word copy/paste error. - "Also, if anyone copies the command-line from the post exactly, it won't actually work.  That's because in some cases (such as with -p), it uses a "long dash", and that results in a syntax error with the sample, which expects a '-' character as the option separator." I have corrected the article.

Can you tell us your system details - Processor , Graphics device, graphic driver version?
Which version of media sdk you have installed on your system? Are you using Media Server Studio, only Media Server Studio has HEVC SW plugin and it doesn't support 6th generation. 

Last time I tested on SKL system following these pre-requisites I didn't see any issue - 

Pre-requisites:
[Sample version]: Intel Media Samples 6.0.0.68
[INDE]: Intel® Integrated Native Developer Experience 2015 Update 2
[MediaSDK]: media_sdk_6.0.0.388 (update through ISM comes with Intel INDE)
[Graphic Driver]: 15.40.7.4279

System Information (we have tested on):

[CPU]: SKL Core Platforms and SKL Core M Platforms
[OS]: Windows 7, Windows 8/8.1 and Windows 10

 

Thanks,
Surbhi

0 Kudos
AaronL
Beginner
588 Views

Surbhi,

As I stated in my first post:  "Note that I'm using all the prerequisites as described in the post on a Windows 10 Skylake system."  "The post" refers to your post.  This is on a 64-bit Windows 10 system with an i5-6600K.  The issue occurs when I use either a 32-bit or 64-bit build of sample_decode.  If this is working for you, on your system, that implies that you have the MFX_PLUGINID_HEVCD_SW plug-in installed on it, unless you modified the sample code more than you described in your post.  I suspect that the MFX_PLUGINID_HEVCD_SW plug-in, with GUID 15dd936825ad475ea34e35f3f54217a6, comes with the Intel Media Server Studio SDK.  It most definitely is not included as part of the 15.40.7.4279 driver install.  I shouldn't need the Intel Media Server Studio SDK installed in order to use HEVC decoding, and besides, the HEVC decoder that is provided by the Intel Media Server Studio SDK is not the one I would want to use anyway.

Regardless, it should be easy for you to reproduce this.  You can retry the sample_decode command-line and try it with the Skylake HW HEVC plugin, that is, with -p 6fadc791a0c2eb479ab6dcd5ea9da347 .  It should fail in the way that I describe.

Thanks,

Aaron Levinson

0 Kudos
Surbhi_M_Intel
Employee
588 Views

Hi Aaron, 

You earlier post didn't tell me what your system configuration is, results could vary depending upon the underlying platform/graphic device. Thanks for confirming the system configuration. I see your point, to use HEVC fully hw accelerated decode, you can modify the sample to use HEVC HW decode plugin instead of SW, please check plugin_utils.cpp.

  else if (impl |= MFX_IMPL_HARDWARE)
    {
        switch(type)
        {
        case MSDK_VDECODE:
            switch(uCodecid)
            {
            case MFX_CODEC_HEVC:
                return MFX_PLUGINID_HEVCD_SW; //change it to HW decode plugin
            }
            break;

In case, you still see the issue after making the change, then please send us a tracer logs and I will try to test on the system configuration you have provided and get back to you soon. 

Thanks,
Surbhi

0 Kudos
AaronL
Beginner
588 Views

Surbhi,

Given the recent activity in the "Issues with using system memory,,," post at https://software.intel.com/en-us/forums/intel-media-sdk/topic/596385 , I wonder if the behavior I'm seeing is also associated with using version 4279 of the driver, which is the latest currently available.  Changing the code as you describe won't matter, since I'm already forcing it to use the Skylake HW HEVC plug-in by using -p 6fadc791a0c2eb479ab6dcd5ea9da347 .  The change you describe just makes that the default.

Before getting tracer logs, could you confirm that this will actually work with 4279?  Based on the log you posted to the system memory thread for your invocation of sample_encode, it would seem that you ran sample_encode on a system with a newer driver than 4279.

Thanks,

Aaron Levinson

0 Kudos
AaronL
Beginner
588 Views

I've been in contact with Surbhi privately, and HW HEVC decoding does work on Skylake on 4279, but a different plug-in is used for HEVC decoding compared to encoding.  I'm not aware of this ever having been documented publicly before.  So, the plug-in with GUID 6fadc791a0c2eb479ab6dcd5ea9da347 is used for HW HEVC encoding.  And the plug-in with GUID 33a61c0b4c27454ca8d85dde757c6f8e is used for HW HEVC decoding.  These correspond to the MFX_PLUGINID_HEVCE_HW and MFX_PLUGINID_HEVCD_HW defines, respectively.  'E' is apparently for encoding and 'D' for decoding.

Also, the software HEVC plug-ins follow a similar GUID define naming convention:  MFX_PLUGINID_HEVCE_SW and MFX_PLUGINID_HEVCD_SW .  However, these are only available if Media Server Studio Professional is installed.

Anyway, this means that it is possible to use both HEVC encoding and decoding with the latest driver, at least if video memory is used.

0 Kudos
Surbhi_M_Intel
Employee
588 Views

Thanks for explaining the complete instructions here, since we got this issue resolved. I am closing this one and lets continue with system memory issue on the separate thread (https://software.intel.com/en-us/forums/intel-media-sdk/topic/596385)

-Surbhi

0 Kudos
Reply