Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

How to share the OpenGL texture from MSDK output buffer? #2990

Open
dyang23 opened this issue Oct 27, 2022 · 1 comment
Open

How to share the OpenGL texture from MSDK output buffer? #2990

dyang23 opened this issue Oct 27, 2022 · 1 comment

Comments

@dyang23
Copy link

dyang23 commented Oct 27, 2022

System information

  • GPU platform enabling for new feature: ADL/TGL
  • Host machine if it's discrete card: No
  • libva/libva-utils/gmmlib/media-driver/Media SDK version you are using? OneVPL/MSDK
  • Are you willing to contribute it?(Yes/No) Yes

Feature Information

Describe the feature and expected behavior

I am working on a windows project, which will use OpenGL as renderer, I will call MSDK to decode video streams, by default the MSDK output DXVA output surface, I need copy it to system buffer, then load to OpenGL texture, it take times, so I am wondering how to make the MSDK output to the OpenGL texture directly? It can save more source if we can make it.

Customer usage and impact for this feature

Android Customers.

Additional context
Add any other context or screenshots about the feature request here.

@dmitryermilov
Copy link
Contributor

Hi Dong,
Long time no see:)
I can advise a direction how to implement this on application side. Please look at https://github.com/Microsoft/angle/wiki/Interop-with-other-DirectX-code . Generally the idea is we need to create d3d11 texture with "shared" attributes, extract a native handle from it, create OGL surfaces from the native handle. In MSDK surfaces creattion is done on app side, so it's in app control with which flags surfaces are created. Please also note that OGL renderer most likely operates with RGB but decoders usually (except jpeg) outputs NV12/P010 etc. So after decoder you'll need a VPP to make color conversion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants