Opened 5 years ago
Closed 4 years ago
#13376 closed Developer Task (Fixed)
Refresh of video and UI rendering code and hardware video acceleration
Reported by: | Mark Kendall | Owned by: | Mark Kendall |
---|---|---|---|
Priority: | major | Milestone: | 31.0 |
Component: | MythTV - General | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Key tasks:-
- remove deprecated libmythui classes
- migrate to using the QOpenGLxx classes (QGL classes are deprecated)
- minimise LOC by using new QOpenGL functionality where possible
- remove OpenGL1 support
- remove legacy private hardware decoders - VDA and CrystalHD (subject to agreement)
- convert existing use of FFmpeg hardware accelerations to new API and utilise FFmpeg code where possible (VAAPI and VDPAU)
- add support for currently unsupported hardware accelerations - CUDA, D3D11
- optimise AND simplify rendering paths for all hardware accelerations
- remove VideOutputNullVAAPI and VideoOutputNullVDPAU - equivalent functionality is now available in AVFormatDecoder
- add OpenMax? EGL render path
- support higher bit depth video formats - decoder and render. Render with simple downsampling, dithered downsampling and lossless where available.
- enforce compatible and consistent render methods between the UI and video
- OpenGL end to end
- D3D end to end
- Qt/Xlib? end to end as fallback/legacy
Change History (70)
comment:2 follow-up: 18 Changed 5 years ago by
re macOS port
This doesn't really change anything - although I forgot to add adding support for VideoToolBox? - which is the replacement for VDA.
As you say, OpenGL will be around for a while. In the meantime, we will hopefully get some Vulkan support alongside OpenGL (Qt 5.12 started adding Vulkan code) and then make use of something like MoltenVK - which is a Vulkan wrapper around Metal. Without Qt support for Metal, I can't see how we can use it directly atm - or it would be a big ask of someone to write code from the ground up.
comment:18 Changed 5 years ago by
Replying to mark-kendall:
As you say, OpenGL will be around for a while.
With Apple, there is no way to know if OpenGL/OpenCL will be removed in 10.15 (and iOS 13) or not until 10.25. Every WWDC will have some people listening intently to see if this is the year.
Without Qt support for Metal
In addition to some of the experimental MoltenVK support in Qt 5.12, there was some initial Vulkan support in Qt 5.10. There is also a mesa based project to support OpenGL on Vulkan (called Zink), so one possible path forward might be OpenGL via Zink using MoltenVK on Metal. Most of that code is in various stages of a work in progress rather than considered production ready, but it does seem that there may be a way.
comment:19 Changed 5 years ago by
In https://code.mythtv.org/trac/changeset/5a0d0c0f9b3b75770422fbdb5ab0130b0e3ab7f8/mythtv:
Remove OpenGL1 support
refs #13376
comment:20 Changed 5 years ago by
d4434fbf3cd00dbf6c4ebf5561db3eefbbf2466b
Convert MythRenderOpenGL to use QOpenGLFunctions
comment:21 Changed 5 years ago by
cb31439dd0a41f3c03d1e0ea080380958abc1369
MythRenderOpenGL: Use QOpenGLShaderProgram for ... shader programs
comment:22 Changed 5 years ago by
fba17a396c186e706eb15abcaf89206d62bd7400
Fix VideoOutputOpenGLVAAPI for recent changes to OpenGL code
comment:23 Changed 5 years ago by
13e6b85b90cc3506040dbec16d53d8bdd132d275
Explicitly define precision in all shaders
comment:24 Changed 5 years ago by
c4bab190b8baa58398820ce3e5885bc441a1439c
MythMainWindow?: Cleanup properly if OpenGL init fails
comment:25 Changed 5 years ago by
4ed4f84d4c640cde51bba51db06cb73ef449c197
OpenGLVideo: Default to standard samplers and textures in GLSL
comment:26 Changed 5 years ago by
62e586da5f9c11132ff4058120907391806f48f2
OpenGLVideo: Move video shaders into a seperate file
comment:27 Changed 5 years ago by
a39c8a9165e7e463391d2a90a59def7ec07e8b81 MythRenderOpenGL: Move shaders into a seperate file
comment:28 Changed 5 years ago by
71901de33b32434eb6e657ec85e5325457421fb0 OpenGLVideo: Cleanup shader customisation
comment:29 Changed 5 years ago by
2577dbbf31167771cb4f6ac4c95250f389252a3c OpenGLVideo: Minor simplification
comment:30 Changed 5 years ago by
ec22d9b9236368436e672bcd0fde88e3487d679c OpenGLVideo: Try and improve shader precision
comment:31 Changed 5 years ago by
247f77faae883db7dd7a9a70389ac3121c40aa24 VideoOutputOpenGL: Drop support for software bob deinterlacer
comment:32 Changed 5 years ago by
8d6ef36799f518b30d54550029c848bc569b92c5 OpenGL: Clean up buffer mapping
comment:33 Changed 5 years ago by
13ada7235f4dea16db4d5eb72d3de6d19c4ee473 MythRenderOpenGL: Use QOpenGLFramebufferObject for ... Framebuffer objects
comment:35 Changed 5 years ago by
660b88d2b442bbea65ea9a316f3c0d7c5fef079c MythRenderOpenGL: Cleanup glCheck
comment:36 Changed 5 years ago by
c656076d0cc5b126de43a02fa3b9ab3ae5729196 Remove some unneeded OpenGL defines
comment:37 Changed 5 years ago by
b07e39a3c3334a6c107be7f4e20ece1702f2b9c7 Ensure consistent framebuffer targets in MythOpenGLPainter
comment:38 Changed 5 years ago by
29d14f0e274f1e89f5320c5e754fd1106eab21cc OpenGLVideo: Fix texture filtering
comment:39 Changed 5 years ago by
378de555d8ff56007bc93db185079984ddd4eac6 VideoOutputOpenGL: Remove redundant frame cropping
comment:40 Changed 5 years ago by
a45098681d57cec9179352f94d433544f9624396 MythRenderOpenGL: Improve GPU debug output
comment:41 Changed 5 years ago by
22e6f31de1597e2673d48425242d23ff9e004db3 Fixes for MythRenderEGL (Pi)
comment:42 Changed 5 years ago by
1ad06e5b1abedef9d34c696c5858b77b5ce351a1 mythavtest: Extend functionality
comment:43 Changed 5 years ago by
741eeb435c367394201ff5509213d330228c4377 MythRenderOpenGL: Add initial support for framebuffer discards
comment:44 Changed 5 years ago by
27248e5b8356cbbdd75df73c6024661ab8831b05 MythRenderOpenGL: Fix discard define for GL ES
comment:45 Changed 5 years ago by
77d58cfaea5f4187e83f7f59bd9384c884b4eac0 VideoOutputOpenGL: Minor cleanup of gpu debug
comment:46 Changed 5 years ago by
f4ac9f71b6c96f78761200b1b78d53574d27a6e4 OpenGLVideo: Cleanup YV12 shaders
comment:47 Changed 5 years ago by
2daa11ea5afb7ccd7e691283b8d9d3b6c1a2f37f OpenGLVideo: Fix shader clamping
comment:48 Changed 5 years ago by
ee45569748d4407bc89fe86de48b5d2d6be67876 MythRenderOpenGL: Convert to using QOpenGLBuffer for Pixel Buffers
comment:50 Changed 5 years ago by
87aacc72d33776a3841fd61a4e2303cdeb369723 MythRenderOpenGL: Use QOpenGLBuffer for Vertex Buffer objects
comment:51 Changed 5 years ago by
c4d6ba3f6b9ff737b576f4b427aac1b74b4d9bba MythRenderOpenGL: Save some VBO memory
comment:52 Changed 5 years ago by
54ed51ca8f861a237ce4259143cf785dceda8c5b Mythplugins: Disable gallery plugin
comment:53 Changed 5 years ago by
f677902d302d4c0dafcc7ad5e29bf8f8c8fb3f08 OpenGLVideo: Add discard framebuffer setting on GLES
comment:54 Changed 5 years ago by
58856845d13085d64f1da7619d3a01d6ae73e978 MythRenderOpenGL: Add DeleteFence? method
comment:55 Changed 5 years ago by
ead954b4d978e1e1a28e14e26c438250a4613bb8 MythRenderOpenGL: Use QOpenGLTexture
comment:56 Changed 5 years ago by
dd57fb3f18df0a9ebd8f37792bdd6fd5aa9ed1e1 MythRenderOpenGL: Remove GLhalf usage
comment:57 Changed 5 years ago by
b40cb1d18c36f8d71ff3a81b6d0f85d6885a50d4 MythRenderOpenGL: Minor refactor to help with breakpoints
comment:58 Changed 5 years ago by
dfd6a13b9ad3bcdd9fa069cf80b1bcd50e7c2cf9 Remove QtOpenGL requirement
comment:59 Changed 5 years ago by
a7e979bb65f096d8c9049195e9aee7bbc51d449d Bump the minimum Qt version to 5.5
comment:69 Changed 4 years ago by
Owner: | set to Mark Kendall |
---|---|
Status: | new → assigned |
comment:70 Changed 4 years ago by
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
Sorry - forgot to keep this ticket updated a long time ago. All changes now merged back into master in 4fbabd9038e7e494029e94d25aceb6f3a1302b79
What does this mean for the macOS port? OpenGL is now deprecated although it will probably be a long time before it is actually removed:
https://developer.apple.com/macos/whats-new/
https://appleinsider.com/articles/18/06/04/opengl-opencl-deprecated-in-favor-of-metal-2-in-macos-1014-mojave