[mythtv-commits] [MythTV/mythtv] 7783b8: OpenGLVideo: Add some NV12 shaders

Mark Kendall noreply at github.com
Fri Feb 15 18:43:28 UTC 2019

  Branch: refs/heads/devel/2019-render
  Home:   https://github.com/MythTV/mythtv
  Commit: 7783b81fcc1b4423e7687591d1904e804f913d89
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M mythtv/libs/libmythtv/openglvideoshaders.h

  Log Message:
  OpenGLVideo: Add some NV12 shaders

- only the progressive version has been tested.
- used by the upcoming VAAPI DRM interop - which passes in raw frames
and, on Intel at least, really prefers NV12.
- no kernel yet - not least because more work will be needed to hold
frames as references.

  Commit: 180e98f4462d0790950f41877268472a04b004dd
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M mythtv/libs/libmythui/mythrender_opengl.cpp
    M mythtv/libs/libmythui/mythrender_opengl.h

  Log Message:
  MythRenderOpenGL: A few extensions

- extend the EGL check
- add an environment variable to request OpenGL ES
- no need to force OpenGL ES if the platform is EGL - Qt will take care
of it.
- add CreateExternalTexture to work around Qt's use of immutable texture
storage - which doesn't work with VAAPI DRM interop.

  Commit: 38006850f34b002868225f695c4654a0185f1722
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M mythtv/libs/libmythtv/avformatdecoder.cpp
    M mythtv/libs/libmythtv/libmythtv.pro
    M mythtv/libs/libmythtv/mythavutil.cpp
    M mythtv/libs/libmythtv/mythopenglinterop.cpp
    M mythtv/libs/libmythtv/mythopenglinterop.h
    A mythtv/libs/libmythtv/mythvaapiinterop.cpp
    A mythtv/libs/libmythtv/mythvaapiinterop.h
    M mythtv/libs/libmythtv/openglvideo.cpp
    M mythtv/libs/libmythtv/openglvideo.h
    M mythtv/libs/libmythtv/vaapicontext.cpp
    M mythtv/libs/libmythtv/vaapicontext.h
    M mythtv/libs/libmythtv/videoout_opengl.cpp
    M mythtv/libs/libmythtv/videoout_opengl.h

  Log Message:
  VAAPI: Extend and refactor VAAPI/OpenGL interop

- there are now 3 different methods for displaying VAAPI frames
-- the old but improved GLX copy which works with GLX but not with
-- the new GLX Pixmap support which works with GLX and OpenGLES
-- the new and performant DRM/DMA interop - which maps VAAPI surfaces
directly to textures and hence is zero copy but is only available when
using EGL.

- both GLX routes use VAAPI internals for colourspace conversion and
deinterlacing (still only basic at the moment)
- EGL/DRM returns raw I420 or NV12 frames that can be passed into the
OpenGL shaders - or when implemented, through the VAAPI post processing
functionality first.

- MythOpenGLInterop and its new VAAPI subclasses have finally found their
home embedded in the FFmpeg hardware frames context
- the OpenGL video output classes are now entirely codec agnostic and we
avoid any references to the hardware context by having GLX interops use
QObject signalling to pick up picture attribute changes.

- workaround MPEG2 seek errors by increasing the packet error count in
AvFormatDecoder - that code probably needs to go.

- pause frame for interop is broken - we retain no reference to old
frames and the frames are cleared (for reference counting purposes) when
we have finished displaying them. Just need to retain old frames in the
same way that VDPAU does.
- full deinterlacing support for EGL/DRM needs more work, as does the
OpenGLVideo integration generally.
- there are new driver/hardware specific workarounds in VAAPIContext.
- they will probably need extending for other intel chipsets
- there is an intermittent error with certain H.264 EGL/DRM streams.
Something in OpenGLVideo state management I think.
- the buildbots will probably fall over in 5 minutes...

Compare: https://github.com/MythTV/mythtv/compare/1b639408f5f4...38006850f34b

More information about the mythtv-commits mailing list