Hi
I am experimenting with VDPAU/OpenGL interoperability in order to perform some simple video processing using textures and frame buffer objects. However my attempts so far have failed.
I suspect there might be a problem with OpenGL context. Can anyone suggest how I might be able to create a context local to the processing code where there is no need for a window or how I might share the existing context used for the VDPAU output to screen?
Thanks
OpenGL context
Stu-e
Member Posts: 85 Joined: Jan 2010 Reputation: 1 |
2012-05-06 19:31
Post: #1
|
| find quote |
Stu-e
Member Posts: 85 Joined: Jan 2010 Reputation: 1 |
2012-05-07 22:37
Post: #2
Yup glGenTextures is returning zeroes so it's probably because there is no GL context.
Can anybody suggest how I can get access to a GL context from within CVDPAU::Decode()? Thanks |
| find quote |
Stu-e
Member Posts: 85 Joined: Jan 2010 Reputation: 1 |
2012-05-09 00:28
Post: #3
Burnt my head a bit but I managed to generate a GLX pixel buffer and attach an OpenGL context to that, local to the code concerned.
I can now access OpenGL functions OK. |
| find quote |
bobo1on1
cheapass Team-XBMC Developer Joined: Dec 2008 Reputation: 21 |
2012-05-09 01:21
Post: #4
GL contexts are always attached to a single thread, if you want to do any image processing using OpenGL, I suggest doing it from the render thread.
|
| find quote |
Stu-e
Member Posts: 85 Joined: Jan 2010 Reputation: 1 |
2012-05-09 10:33
Post: #5
That's tricky because I need to access VDPAU video surfaces before they go into the VDPAU video mixer.
I think that is on a different thread. What parts of the code are covered by the render thread? Although I did manage to create another OpenGL context for processing VDPAU video surfaces, it's very slow for some reason, dropping frames all over the place. I'm guessing there is no hardware acceleration but I don't know why. |
| find quote |
FernetMenta
Team-XBMC Member Posts: 1,714 Joined: Jul 2010 Reputation: 37 Location: Munich |
2012-05-09 20:23
Post: #6
I have redesigned vdpau and implemented vdpau/opengl interop (NV_vdpau_interop). For initialization vdpau creates its own gl context which shares textures with the main thread. This way vdpau is much less dependent on the render thread. https://github.com/xbmc/xbmc/pull/870
|
| find quote |
Stu-e
Member Posts: 85 Joined: Jan 2010 Reputation: 1 |
2012-05-09 22:06
Post: #7
OK so you have clearly been down this road. Thanks for bringing your repo to my attention.
Should I download a copy of your master branch to test my video processing on? |
| find quote |

Search
Help