Opened 8 years ago

Closed 7 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:1 by ctreleaven, 8 years ago

What does this mean for the macOS port?

Version 0, edited 8 years ago by ctreleaven (next)

comment:2 by Mark Kendall, 8 years ago

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:3 by Mark Kendall <mark.kendall@…>, 8 years ago

In 2b783da11/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:4 by Mark Kendall <mark.kendall@…>, 8 years ago

In f738ae10dc/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:5 by Mark Kendall <mark.kendall@…>, 8 years ago

In 4cb41f24fc/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:6 by Mark Kendall <mark.kendall@…>, 8 years ago

In 35d2b4fde/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:7 by Mark Kendall <mark.kendall@…>, 8 years ago

In e17b0d3dff/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:8 by Mark Kendall <mark.kendall@…>, 8 years ago

In 2b783da11/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:9 by Mark Kendall <mark.kendall@…>, 8 years ago

In f738ae10dc/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:10 by Mark Kendall <mark.kendall@…>, 8 years ago

In 4cb41f24fc/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:11 by Mark Kendall <mark.kendall@…>, 8 years ago

In 35d2b4fde/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:12 by Mark Kendall <mark.kendall@…>, 8 years ago

In e17b0d3dff/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:13 by Mark Kendall <mark.kendall@…>, 8 years ago

In 2b783da11/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:14 by Mark Kendall <mark.kendall@…>, 8 years ago

In f738ae10dc/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:15 by Mark Kendall <mark.kendall@…>, 8 years ago

In 4cb41f24fc/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:16 by Mark Kendall <mark.kendall@…>, 8 years ago

In 35d2b4fde/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:17 by Mark Kendall <mark.kendall@…>, 8 years ago

In e17b0d3dff/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

in reply to:  2 comment:18 by Gary Buhrmaster, 8 years ago

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:20 by Mark Kendall, 8 years ago

d4434fbf3cd00dbf6c4ebf5561db3eefbbf2466b

Convert MythRenderOpenGL to use QOpenGLFunctions

comment:21 by Mark Kendall, 8 years ago

cb31439dd0a41f3c03d1e0ea080380958abc1369

MythRenderOpenGL: Use QOpenGLShaderProgram for ... shader programs

comment:22 by Mark Kendall, 8 years ago

fba17a396c186e706eb15abcaf89206d62bd7400

Fix VideoOutputOpenGLVAAPI for recent changes to OpenGL code

comment:23 by Mark Kendall, 8 years ago

13e6b85b90cc3506040dbec16d53d8bdd132d275

Explicitly define precision in all shaders

comment:24 by Mark Kendall, 8 years ago

c4bab190b8baa58398820ce3e5885bc441a1439c

MythMainWindow: Cleanup properly if OpenGL init fails

comment:25 by Mark Kendall, 8 years ago

4ed4f84d4c640cde51bba51db06cb73ef449c197

OpenGLVideo: Default to standard samplers and textures in GLSL

comment:26 by Mark Kendall, 8 years ago

62e586da5f9c11132ff4058120907391806f48f2

OpenGLVideo: Move video shaders into a seperate file

comment:27 by Mark Kendall, 8 years ago

a39c8a9165e7e463391d2a90a59def7ec07e8b81 MythRenderOpenGL: Move shaders into a seperate file

comment:28 by Mark Kendall, 8 years ago

71901de33b32434eb6e657ec85e5325457421fb0 OpenGLVideo: Cleanup shader customisation

comment:29 by Mark Kendall, 8 years ago

2577dbbf31167771cb4f6ac4c95250f389252a3c OpenGLVideo: Minor simplification

comment:30 by Mark Kendall, 8 years ago

ec22d9b9236368436e672bcd0fde88e3487d679c OpenGLVideo: Try and improve shader precision

comment:31 by Mark Kendall, 8 years ago

247f77faae883db7dd7a9a70389ac3121c40aa24 VideoOutputOpenGL: Drop support for software bob deinterlacer

comment:32 by Mark Kendall, 8 years ago

8d6ef36799f518b30d54550029c848bc569b92c5 OpenGL: Clean up buffer mapping

comment:33 by Mark Kendall, 8 years ago

13ada7235f4dea16db4d5eb72d3de6d19c4ee473 MythRenderOpenGL: Use QOpenGLFramebufferObject for ... Framebuffer objects

comment:34 by Mark Kendall, 8 years ago

c9514dc713c755b2b3917dec0ef6c6518afdac3e Add OpenGL debug logging

comment:35 by Mark Kendall, 8 years ago

660b88d2b442bbea65ea9a316f3c0d7c5fef079c MythRenderOpenGL: Cleanup glCheck

comment:36 by Mark Kendall, 8 years ago

c656076d0cc5b126de43a02fa3b9ab3ae5729196 Remove some unneeded OpenGL defines

comment:37 by Mark Kendall, 8 years ago

b07e39a3c3334a6c107be7f4e20ece1702f2b9c7 Ensure consistent framebuffer targets in MythOpenGLPainter

comment:38 by Mark Kendall, 8 years ago

29d14f0e274f1e89f5320c5e754fd1106eab21cc OpenGLVideo: Fix texture filtering

comment:39 by Mark Kendall, 8 years ago

378de555d8ff56007bc93db185079984ddd4eac6 VideoOutputOpenGL: Remove redundant frame cropping

comment:40 by Mark Kendall, 8 years ago

a45098681d57cec9179352f94d433544f9624396 MythRenderOpenGL: Improve GPU debug output

comment:41 by Mark Kendall, 8 years ago

22e6f31de1597e2673d48425242d23ff9e004db3 Fixes for MythRenderEGL (Pi)

comment:42 by Mark Kendall, 8 years ago

1ad06e5b1abedef9d34c696c5858b77b5ce351a1 mythavtest: Extend functionality

comment:43 by Mark Kendall, 8 years ago

741eeb435c367394201ff5509213d330228c4377 MythRenderOpenGL: Add initial support for framebuffer discards

comment:44 by Mark Kendall, 8 years ago

27248e5b8356cbbdd75df73c6024661ab8831b05 MythRenderOpenGL: Fix discard define for GL ES

comment:45 by Mark Kendall, 8 years ago

77d58cfaea5f4187e83f7f59bd9384c884b4eac0 VideoOutputOpenGL: Minor cleanup of gpu debug

comment:46 by Mark Kendall, 8 years ago

f4ac9f71b6c96f78761200b1b78d53574d27a6e4 OpenGLVideo: Cleanup YV12 shaders

comment:47 by Mark Kendall, 8 years ago

2daa11ea5afb7ccd7e691283b8d9d3b6c1a2f37f OpenGLVideo: Fix shader clamping

comment:48 by Mark Kendall, 8 years ago

ee45569748d4407bc89fe86de48b5d2d6be67876 MythRenderOpenGL: Convert to using QOpenGLBuffer for Pixel Buffers

comment:49 by Mark Kendall, 8 years ago

016a14f6a41dbdf1d3121c91a1e24561b4de15dc Remove QOpenGLWidget use

comment:50 by Mark Kendall, 8 years ago

87aacc72d33776a3841fd61a4e2303cdeb369723 MythRenderOpenGL: Use QOpenGLBuffer for Vertex Buffer objects

comment:51 by Mark Kendall, 8 years ago

c4d6ba3f6b9ff737b576f4b427aac1b74b4d9bba MythRenderOpenGL: Save some VBO memory

comment:52 by Mark Kendall, 8 years ago

54ed51ca8f861a237ce4259143cf785dceda8c5b Mythplugins: Disable gallery plugin

comment:53 by Mark Kendall, 8 years ago

f677902d302d4c0dafcc7ad5e29bf8f8c8fb3f08 OpenGLVideo: Add discard framebuffer setting on GLES

comment:54 by Mark Kendall, 8 years ago

comment:55 by Mark Kendall, 8 years ago

ead954b4d978e1e1a28e14e26c438250a4613bb8 MythRenderOpenGL: Use QOpenGLTexture

comment:56 by Mark Kendall, 8 years ago

dd57fb3f18df0a9ebd8f37792bdd6fd5aa9ed1e1 MythRenderOpenGL: Remove GLhalf usage

comment:57 by Mark Kendall, 8 years ago

b40cb1d18c36f8d71ff3a81b6d0f85d6885a50d4 MythRenderOpenGL: Minor refactor to help with breakpoints

comment:58 by Mark Kendall, 8 years ago

dfd6a13b9ad3bcdd9fa069cf80b1bcd50e7c2cf9 Remove QtOpenGL requirement

comment:59 by Mark Kendall, 8 years ago

a7e979bb65f096d8c9049195e9aee7bbc51d449d Bump the minimum Qt version to 5.5

comment:60 by Mark Kendall <mark.kendall@…>, 8 years ago

In e785b3f96/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:61 by Mark Kendall <mark.kendall@…>, 8 years ago

In 8419dac97/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:62 by Mark Kendall <mark.kendall@…>, 8 years ago

In 44a096388/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:63 by Mark Kendall <mark.kendall@…>, 8 years ago

In 8cdaab886/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:64 by Mark Kendall <mark.kendall@…>, 8 years ago

In 73d700047/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:65 by Mark Kendall <mark.kendall@…>, 8 years ago

In a273edf08/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:66 by Mark Kendall <mark.kendall@…>, 8 years ago

In d843e1b544/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:67 by Mark Kendall <mark.kendall@…>, 8 years ago

In 55ad2e347/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:68 by Mark Kendall <mark.kendall@…>, 8 years ago

In 1d39f1a8da/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:69 by Mark Kendall, 7 years ago

Owner: set to Mark Kendall
Status: newassigned

comment:70 by Mark Kendall, 7 years ago

Resolution: Fixed
Status: assignedclosed

Sorry - forgot to keep this ticket updated a long time ago. All changes now merged back into master in 4fbabd9038e7e494029e94d25aceb6f3a1302b79

Note: See TracTickets for help on using tickets.