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.

How to run Media SDK samples on Skylake

Surbhi_M_Intel
Employee
403 Views

In the last few days, we have seen lot of concern for using Intel® Media 2016 on 6th generation Intel® Core™ processors (codename Skylake) from the customers. We wanted to explain how one can still install the latest Media SDK 2016 package and use it on 6th generation Intel Core processor and below are the steps which shows how one can run basic encode/decode test to start with -

Pre-requisites:
[Sample version]: Intel Media Samples 6.0.0.68
[MediaSDK]: Intel Media SDK 2016
[Graphic Drivers]: Latest drivers from https://downloadcenter.intel.com/

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

For HEVC HW encoding -

Change the width and height alignment to 32 pixels in InitMfxEncParams function in pipeline_encode.cpp and recompile the sample and run the below cmd line to use HEVC HW encoder. 

if(pInParams->CodecId==MFX_CODEC_HEVC && !memcmp(pInParams->pluginParams.pluginGuid.Data,MFX_PLUGINID_HEVCE_HW.Data,sizeof(MFX_PLUGINID_HEVCE_HW.Data)))
    {
        m_mfxEncParams.mfx.FrameInfo.Width  = MSDK_ALIGN32(pInParams->nDstWidth);
        m_mfxEncParams.mfx.FrameInfo.Height = MSDK_ALIGN32(pInParams->nDstHeight);
    }
    else
    {
        // width must be a multiple of 16
        // height must be a multiple of 16 in case of frame picture and a multiple of 32 in case of field picture
        m_mfxEncParams.mfx.FrameInfo.Width  = MSDK_ALIGN16(pInParams->nDstWidth);
        m_mfxEncParams.mfx.FrameInfo.Height = (MFX_PICSTRUCT_PROGRESSIVE == m_mfxEncParams.mfx.FrameInfo.PicStruct)?
            MSDK_ALIGN16(pInParams->nDstHeight) : MSDK_ALIGN32(pInParams->nDstHeight);
    }

 

Cmd linesample_encode h265 -i <Inputfile> -o <outputfile> -hw -d3d -w <width> -h <height> -b <bitrate> -f <framerate> -p 6fadc791a0c2eb479ab6dcd5ea9da347

6fadc791a0c2eb479ab6dcd5ea9da347is the plugin GUID for HEVC HW encoding

-p is the input arguement for GUID string (32-character hexadecimal string)
There are different GUID depending upon the implementation you would like to use like HEVC hw encode, HEVC hw decode, HEVC sw encode and HEVC hw Decode (sw implementation only available through Media Server Studio Professional Edition). Please check mfxplugin.h(present at installed directory) to find the HEVC related plugin guids. 

For HEVC HW Decoding-

Simply compile the sample and run this cmd line : sample_decode h265 -i <inputfile> -o <outputfile> -hw -p 33a61c0b4c27454ca8d85dde757c6f8e
33a61c0b4c27454ca8d85dde757c6f8e is the  plugin id for HEVC hw decode. 

For processors below 6th generation, this plugin id will call the GPU acceleration i.e. hybrid mode using partial core and graphics. For 6th generation, it will call fully hw accelerated mode. We have seen some variations in using plugin id for HEVC hw decode through sample decode, on few SKUs plugin guid is not required this will be fixed in future release. 
 

There are few other limitations we have found in the sample package to use it on Skylake system. We are actively working on developing and validating the samples for Skylake, which we are hoping to release in few weeks. Until then, if you do come across any issue, feel free to start a new post and we will be happy to help and receive your valuable feedback. 

0 Kudos
0 Replies
Reply