[mythtv-commits] [MythTV/mythtv] b5dada: OpenGLVideo: Add NV12 kernel deinterlacer shader

Mark Kendall noreply at github.com
Mon May 20 19:26:22 UTC 2019


  Branch: refs/heads/devel/2019-render
  Home:   https://github.com/MythTV/mythtv
  Commit: b5dadaa0af8a1f531396b804782e20f344b504b4
      https://github.com/MythTV/mythtv/commit/b5dadaa0af8a1f531396b804782e20f344b504b4
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-15 (Wed, 15 May 2019)

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

  Log Message:
  -----------
  OpenGLVideo: Add NV12 kernel deinterlacer shader


  Commit: bcc72b92ba42be2de3875c72993ab127f9d9036e
      https://github.com/MythTV/mythtv/commit/bcc72b92ba42be2de3875c72993ab127f9d9036e
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-15 (Wed, 15 May 2019)

  Changed paths:
    M mythtv/libs/libmythtv/DetectLetterbox.cpp

  Log Message:
  -----------
  DetectLetterbox: Minor optimisation


  Commit: ba868397623562a2cb643168b5538f1ee6d8ba4e
      https://github.com/MythTV/mythtv/commit/ba868397623562a2cb643168b5538f1ee6d8ba4e
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-15 (Wed, 15 May 2019)

  Changed paths:
    M mythtv/libs/libmythtv/mythvideotexture.cpp

  Log Message:
  -----------
  MythVideoTexture: Fix NV12 texture uploads for higher bit depths


  Commit: 6bb4375fe4109fac74346232f2fd46fa5c0affa2
      https://github.com/MythTV/mythtv/commit/6bb4375fe4109fac74346232f2fd46fa5c0affa2
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-15 (Wed, 15 May 2019)

  Changed paths:
    M mythtv/libs/libmythtv/mythnvdeccontext.cpp

  Log Message:
  -----------
  MythNVDECContext: Fix buffer overrun


  Commit: 29dceaf0259f7533a17da559fcf817bb944cb411
      https://github.com/MythTV/mythtv/commit/29dceaf0259f7533a17da559fcf817bb944cb411
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-20 (Mon, 20 May 2019)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
    M mythtv/libs/libmythtv/decoders/avformatdecoder.h
    M mythtv/libs/libmythtv/libmythtv.pro
    M mythtv/libs/libmythtv/mythavutil.cpp
    M mythtv/libs/libmythtv/mythavutil.h
    M mythtv/libs/libmythtv/mythcodecid.h
    A mythtv/libs/libmythtv/mythdeinterlacer.cpp
    A mythtv/libs/libmythtv/mythdeinterlacer.h
    M mythtv/libs/libmythtv/mythframe.cpp
    M mythtv/libs/libmythtv/mythframe.h
    M mythtv/libs/libmythtv/mythplayer.cpp
    M mythtv/libs/libmythtv/mythplayer.h
    M mythtv/libs/libmythtv/mythvaapiinterop.cpp
    M mythtv/libs/libmythtv/mythvaapiinterop.h
    M mythtv/libs/libmythtv/mythvdpauhelper.cpp
    M mythtv/libs/libmythtv/mythvdpauhelper.h
    M mythtv/libs/libmythtv/mythvdpauinterop.cpp
    M mythtv/libs/libmythtv/mythvdpauinterop.h
    M mythtv/libs/libmythtv/openglvideo.cpp
    M mythtv/libs/libmythtv/openglvideo.h
    M mythtv/libs/libmythtv/tv_play.cpp
    M mythtv/libs/libmythtv/videobuffers.cpp
    M mythtv/libs/libmythtv/videobuffers.h
    M mythtv/libs/libmythtv/videoout_d3d.cpp
    M mythtv/libs/libmythtv/videoout_d3d.h
    M mythtv/libs/libmythtv/videoout_null.cpp
    M mythtv/libs/libmythtv/videoout_null.h
    M mythtv/libs/libmythtv/videoout_omx.cpp
    M mythtv/libs/libmythtv/videoout_omx.h
    M mythtv/libs/libmythtv/videoout_opengl.cpp
    M mythtv/libs/libmythtv/videoout_opengl.h
    M mythtv/libs/libmythtv/videooutbase.cpp
    M mythtv/libs/libmythtv/videooutbase.h
    M mythtv/programs/mythavtest/main.cpp

  Log Message:
  -----------
  New deinterlacer code - Phase 1

THIS IS A WORK IN PROGRESS
THERE IS LOT STILL MISSING AND THERE WILL BE BREAKAGES
SUBJECT TO CHANGE...

N.B.
- there is NO UI to select deinterlacer preferences yet
- preferences are hard coded to best single and double rate
- there is no support yet for decoder based deinterlacing (VAAPI and
NVDec) - MediaCodec should still do its own thing though
- basic software deinterlacing is terrible and may change from onefield/
bob to linearblend. May just be an error in the one field code.
- there is no support for advanced VAAPI deinterlacers (VPP) as I do not
have the hardware to test but basic deinterlacing will be used with GLX
based interops
- there is no deinterlacing support yet for VAAPI with DRM/zero copy
interop as there will be complexities around using VPP and I need to
differentiate between interop methods that support shader deinterlacers
and those that do not (DRM returns raw frames that can be deinterlaced
with shaders)
- VideoToolBox is untested so far
- multiple reference frames are currently unhandled for VDPAU advanced
deinterlacers and the driver will silently fall back to basic
deinterlacing
- similarily, for kernel, shader deinterlacing of nvdec and VideoToolBox
hardware decoded frames the appropriate reference frames are not handled
- but it looks OK anyway:)

Summary of changes so far:-

- add a deint enum to VideoFrame to flag preferences for single and
double rate deinterlacers (not yet display profile driven)
- a further flag tracks what is allowed/available for the given frame
format
- a call to enable/disable deinterlacing simply sets these flags in
VideoBuffers
- at each stage of the video processing chain, the code checks whether
deinterlacing is required
- for software deinterlacing, this happens in VideoOutput
- for shader based deinterlacing, this happens in OpenGLVideo
- for driver based deinterlacing, this happens in the various
interopability classes (VDPAU, VAAPI etc)
- for the FFmpeg/software decoder, frames are deinterlaced by default in
software unless shaders are preferred.
- the same applies to decode only decoders where the frame is passed
back into software.
- for hardware decoding and direct rendering of VDPAU and VAAPI, driver
based deinterlacers will always be used if ANY deinterlacer is selected
(i.e. the user will noy have to select 'Prefer driver based
deinterlacers')
- shaders are used for NVDec and VideoToolBox direct rendering as the
decoders return NV12 frame formats
- for decode only using NVDec and VideoToolBox returning NV12 frame
formats, shaders are used to deinterlace as there is no libavfilter
support for deinterlacing NV12 (or the 10/12/16bit equivalents)
- for decode only hardware decoders, the code now checks for direct
render support of the decoder's preferred software format and re-
allocates the software frame if necessary. This allows us to copy
directly to the software frame in most cases without conversion. This
applies to VAAPI, NVDec, VDPAU and VideoToolBox decoders which all
prefer NV12.
- sundry other changes...


  Commit: ef3298284c5dd7bbb1e336fdf892879f14f73f1d
      https://github.com/MythTV/mythtv/commit/ef3298284c5dd7bbb1e336fdf892879f14f73f1d
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-20 (Mon, 20 May 2019)

  Changed paths:
    M mythtv/libs/libmythtv/mythnvdeccontext.cpp

  Log Message:
  -----------
  NVDec: Disallow NVDec decoder if video frame format is not 420p


  Commit: 541f83c556d779f361563f670a309ea4568eff06
      https://github.com/MythTV/mythtv/commit/541f83c556d779f361563f670a309ea4568eff06
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-20 (Mon, 20 May 2019)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
    M mythtv/libs/libmythtv/mythnvdeccontext.cpp
    M mythtv/libs/libmythtv/nvdeccontext.cpp
    M mythtv/libs/libmythtv/nvdeccontext.h

  Log Message:
  -----------
  NVDec: De-duplication of decoder support check code


  Commit: d6beac4c2548a112399d3f74051f76d00fa590ef
      https://github.com/MythTV/mythtv/commit/d6beac4c2548a112399d3f74051f76d00fa590ef
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-20 (Mon, 20 May 2019)

  Changed paths:
    M mythtv/libs/libmythtv/mythvdpaucontext.cpp

  Log Message:
  -----------
  VDPAU: Enforce 8bit 4:2:0 chroma restriction for decoding


  Commit: 1a40b07b8c5b167f78f626c38a5339eb0317b81b
      https://github.com/MythTV/mythtv/commit/1a40b07b8c5b167f78f626c38a5339eb0317b81b
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-20 (Mon, 20 May 2019)

  Changed paths:
    M mythtv/libs/libmythtv/mythopenglinterop.cpp
    M mythtv/libs/libmythtv/mythopenglinterop.h
    M mythtv/libs/libmythtv/mythvdpauinterop.cpp
    M mythtv/libs/libmythtv/mythvdpauinterop.h

  Log Message:
  -----------
  VDPAU: Better handling of chroma/size changes


  Commit: 0c754406ae80e913335d97d9a587a3a2dec212bd
      https://github.com/MythTV/mythtv/commit/0c754406ae80e913335d97d9a587a3a2dec212bd
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2019-05-20 (Mon, 20 May 2019)

  Changed paths:
    M mythtv/libs/libmythtv/mythvdpaucontext.cpp
    M mythtv/libs/libmythtv/mythvdpauinterop.cpp
    M mythtv/libs/libmythtv/mythvdpauinterop.h

  Log Message:
  -----------
  VDPAU: Workaround a driver bug when rendering HEVC/H.265

- driver hangs if VdpVideoMixerRender is called with anything other than
VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME for HEVC


Compare: https://github.com/MythTV/mythtv/compare/ead8718de629...0c754406ae80


More information about the mythtv-commits mailing list