Community
cancel
Showing results for 
Search instead for 
Did you mean: 
yoe
Beginner
507 Views

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

Jump to solution

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
282 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

16 Replies
yoe
Beginner
481 Views

Do there some one can help me...

AthiraM_Intel
Moderator
471 Views

Hi,


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


Thanks


yoe
Beginner
435 Views

hello.  can you follow it, and result?

AthiraM_Intel
Moderator
420 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


yoe
Beginner
411 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.
AthiraM_Intel
Moderator
381 Views

Hi,


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


Thanks.


yoe
Beginner
367 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.

yoe
Beginner
333 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 

Mark_L_Intel1
Moderator
314 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


yoe
Beginner
307 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 :

Mark_L_Intel1
Moderator
283 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

yoe
Beginner
266 Views
yoe
Beginner
192 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?

Mark_L_Intel1
Moderator
252 Views

Nice! Good to know it works.


Thanks.


Mark


yoe
Beginner
169 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?

yoe
Beginner
156 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;
}
Reply