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.
3056 Discussions

Issue of Render video with directX11(Hardware decode by intel media sdk)

yoe
Beginner
3,899 Views

Our product development uses Intel mediasdk to decode and display the video in hardware. We find that there is an abnormal picture when we display the video in some computers. 

The following is my test: 1) using hardware decoding + DirectX 11 display, the picture will be abnormal; 2) using hardware decoding + DirectX 9 display, it is normal.

 

Library version:1.33

OS info and version:win10(windows家庭中文版64位),内部版本19041

CPU model: Core (TM) i5-1135G7

Intel Graphics driver version:27.20.100.8738

Visual Studio 2015

Step:

1)complie decode sample of media sdk.

2) run cmd "./sample_decode.exe h264 -i MediaSDKInterop_video_720p.h264 -hw -r -d3d11 -f 25"

3)then this is the problem.

0 Kudos
1 Solution
Mark_L_Intel1
Moderator
3,684 Views

Thanks for the quick response,


Dev team said they have fix the issue with the following patch, can you try it?

https://github.com/Intel-Media-SDK/MediaSDK/pull/2659


This is a PR to the GitHub which is for Linux release, but the fix is for sample code which apply to both Linux and Windows.


Let me know if this fixed your problem.


Mark


View solution in original post

0 Kudos
16 Replies
yoe
Beginner
3,873 Views

Do there some one can help me...

0 Kudos
AthiraM_Intel
Moderator
3,863 Views

Hi,


Thanks for giving all the information. We will investigating on it and let you know the updates soon.


Thanks


0 Kudos
yoe
Beginner
3,837 Views

hello.  can you follow it, and result?

0 Kudos
AthiraM_Intel
Moderator
3,822 Views

Hi,


Sorry for the delay.


Could you please try the below suggestions and share the observations with us.


  1. Try disabling the rendering and write it to an output, check whether the issue still exist?
  2. If issue can be reproduced by the file output, try to update the graphic driver greater than 27.20.100.9166. https://downloadcenter.intel.com


If the issue can still be reproduced by the latest driver, please let us know.


Thanks


0 Kudos
yoe
Beginner
3,813 Views
  1. Try disabling the rendering and write it to an output, check whether the issue still exist?----yes, the yuv file is ok,  please see the attachment.
  2. If issue can be reproduced by the file output, try to update the graphic driver greater than 27.20.100.9166.  ----Because it is the customer's computer, there is no way to update the SDK. 27.20.100.8783 is installed on customer's computer. Can you check this issue on this version.
  3. I think it is the problem of Dx11, because I use this version to decode + DX9 display, there is no problem.
0 Kudos
AthiraM_Intel
Moderator
3,783 Views

Hi,


Thanks for the response. We will check on it and let you know the updates soon.


Thanks.


0 Kudos
yoe
Beginner
3,769 Views

I found a computer with driver in version"27.20.100.9168 ", its the newest version, also has this problem.

The system version is same.

0 Kudos
yoe
Beginner
3,735 Views

I did an experiment. Before IDXGISwapChain1::Present1 and after IDXGISwapChain1::Present1, I wrote the data in the backbuffer to a file and found that the texture data was normal.

@AthiraM_Intel 

0 Kudos
Mark_L_Intel1
Moderator
3,716 Views

Hi Yoe,


Thanks for helping us to investigation.


It seems like dev team already knew this issue and they are investigating on it. I will keep you updated.


By the way, dev team doubt the issue only happens when memory compression is enabled, could you do a quick check?


Mark


0 Kudos
yoe
Beginner
3,709 Views

I've turned off memory compression, and there's the same problem.

---------------

PS C:\Windows\system32> get-mmagent


ApplicationLaunchPrefetching : True
ApplicationPreLaunch : True
MaxOperationAPIFiles : 256
MemoryCompression : False
OperationAPI : True
PageCombining : True
PSComputerName :

0 Kudos
Mark_L_Intel1
Moderator
3,685 Views

Thanks for the quick response,


Dev team said they have fix the issue with the following patch, can you try it?

https://github.com/Intel-Media-SDK/MediaSDK/pull/2659


This is a PR to the GitHub which is for Linux release, but the fix is for sample code which apply to both Linux and Windows.


Let me know if this fixed your problem.


Mark


0 Kudos
yoe
Beginner
3,668 Views
0 Kudos
yoe
Beginner
3,594 Views

I have encountered some problems. When I use the flip model, this hWnd will no longer be able to use Direct3D9 to render. However, there is a scenario on my side, which may lead to the problem of first using the scheme you provided above, and then using DX9 to render on the same hWnd.

Is there any other solution to solve the problem mentioned in this post without using flip model?

0 Kudos
Mark_L_Intel1
Moderator
3,654 Views

Nice! Good to know it works.


Thanks.


Mark


0 Kudos
yoe
Beginner
3,571 Views

But!

Do you know the root cause of the problem? Is there any other way to solve it?

 

I have another problem. When I use flipped models, this hWnd will no longer be able to render with Direct3D9. However, there is a scene on my side that may lead to using the scheme provided above first, and then switching to using DX9 to render on the same hWnd.
At this point, DX9 rendering fails
Is there any other solution to the problem mentioned in this article without using the flipped model?

0 Kudos
yoe
Beginner
3,558 Views

And when I write a sample to play YUV directly, and use the non flip model, I don't think it's the problem of Intel driver.

if need,i can give you my sample code.

bool CD3Dx11::FillSCD1(DXGI_SWAP_CHAIN_DESC1& scd1) {
    scd1.Width = 0;                                     // Use automatic sizing.
    scd1.Height = 0;
    scd1.Width = m_rcShowVideo.right - m_rcShowVideo.left;
    scd1.Height = m_rcShowVideo.bottom - m_rcShowVideo.top;
    scd1.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
    scd1.Stereo = FALSE;
    scd1.SampleDesc.Count = 1;                          // Don't use multi-sampling.
    scd1.SampleDesc.Quality = 0;
    scd1.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
    scd1.BufferCount = 2;                               // Use double buffering to minimize latency.
    scd1.Scaling = DXGI_SCALING_STRETCH;
    scd1.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
    scd1.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;

    return true;
}
0 Kudos
Reply