MythTV
master
|
#include <libmythtv/opengl/mythvaapiinterop.h>
Public Member Functions | |
VASurfaceID | VerifySurface (MythRenderOpenGL *Context, MythVideoFrame *Frame) |
VADisplay | GetDisplay (void) |
QString | GetVendor (void) |
Public Member Functions inherited from MythOpenGLInterop | |
~MythOpenGLInterop () override | |
virtual std::vector< MythVideoTextureOpenGL * > | Acquire (MythRenderOpenGL *Context, MythVideoColourSpace *ColourSpace, MythVideoFrame *Frame, FrameScanType Scan) |
Public Member Functions inherited from MythInteropGPU | |
MythInteropGPU (MythRender *Context, InteropType Type, MythPlayerUI *Player=nullptr) | |
~MythInteropGPU () override | |
InteropType | GetType () |
MythPlayerUI * | GetPlayer () |
void | SetDefaultFree (FreeAVHWDeviceContext FreeContext) |
void | SetDefaultUserOpaque (void *UserOpaque) |
FreeAVHWDeviceContext | GetDefaultFree () |
void * | GetDefaultUserOpaque () |
Public Member Functions inherited from ReferenceCounter | |
ReferenceCounter (const QString &debugName, bool logDebug=true) | |
Creates reference counter with an initial value of 1. More... | |
virtual int | IncrRef (void) |
Increments reference count. More... | |
virtual int | DecrRef (void) |
Decrements reference count and deletes on 0. More... | |
Static Public Member Functions | |
static void | GetVAAPITypes (MythRenderOpenGL *Context, MythInteropGPU::InteropMap &Types) |
Return a list of interops that are supported by the current render device. More... | |
static MythVAAPIInterop * | CreateVAAPI (MythPlayerUI *Player, MythRenderOpenGL *Context) |
static bool | SetupDeinterlacer (MythDeintType Deinterlacer, bool DoubleRate, AVBufferRef *FramesContext, int Width, int Height, AVFilterGraph *&Graph, AVFilterContext *&Source, AVFilterContext *&Sink) |
Static Public Member Functions inherited from MythOpenGLInterop | |
static void | GetTypes (MythRender *Render, MythInteropGPU::InteropMap &Types) |
static std::vector< MythVideoTextureOpenGL * > | Retrieve (MythRenderOpenGL *Context, MythVideoColourSpace *ColourSpace, MythVideoFrame *Frame, FrameScanType Scan) |
Static Public Member Functions inherited from MythInteropGPU | |
static InteropMap | GetTypes (MythRender *Render) |
static QString | TypeToString (InteropType Type) |
static QString | TypesToString (const InteropMap &Types) |
static MythInteropGPU * | CreateDummy () |
Static Public Member Functions inherited from ReferenceCounter | |
static void | PrintDebug (void) |
Print out any leaks if that level of debugging is enabled. More... | |
Protected Member Functions | |
MythVAAPIInterop (MythPlayerUI *Player, MythRenderOpenGL *Context, InteropType Type) | |
~MythVAAPIInterop () override | |
void | InitaliseDisplay (void) |
VASurfaceID | Deinterlace (MythVideoFrame *Frame, VASurfaceID Current, FrameScanType Scan) |
virtual void | DestroyDeinterlacer (void) |
virtual void | PostInitDeinterlacer (void) |
Protected Member Functions inherited from MythOpenGLInterop | |
MythOpenGLInterop (MythRenderOpenGL *Context, InteropType Type, MythPlayerUI *Player=nullptr) | |
virtual void | DeleteTextures () |
Protected Member Functions inherited from ReferenceCounter | |
virtual | ~ReferenceCounter (void) |
Called on destruction, will warn if object deleted with references in place. More... | |
Protected Attributes | |
VADisplay | m_vaDisplay { nullptr } |
QString | m_vaVendor |
MythDeintType | m_deinterlacer { DEINT_NONE } |
bool | m_deinterlacer2x { false } |
bool | m_firstField { true } |
AVBufferRef * | m_vppFramesContext { nullptr } |
AVFilterContext * | m_filterSink { nullptr } |
AVFilterContext * | m_filterSource { nullptr } |
AVFilterGraph * | m_filterGraph { nullptr } |
bool | m_filterError { false } |
int | m_filterWidth { 0 } |
int | m_filterHeight { 0 } |
VASurfaceID | m_lastFilteredFrame { 0 } |
uint64_t | m_lastFilteredFrameCount { 0 } |
Protected Attributes inherited from MythOpenGLInterop | |
MythRenderOpenGL * | m_openglContext { nullptr } |
QHash< unsigned long long, std::vector< MythVideoTextureOpenGL * > > | m_openglTextures |
Protected Attributes inherited from MythInteropGPU | |
MythRender * | m_context { nullptr } |
QSize | m_textureSize |
uint64_t | m_discontinuityCounter { 0 } |
FreeAVHWDeviceContext | m_defaultFree { nullptr } |
void * | m_defaultUserOpaque { nullptr } |
MythPlayerUI * | m_player { nullptr } |
InteropType | m_type { Unsupported } |
Protected Attributes inherited from ReferenceCounter | |
bool | m_logDebug |
This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More... | |
QAtomicInt | m_referenceCount {1} |
Additional Inherited Members | |
Public Types inherited from MythInteropGPU | |
enum | InteropType : std::uint8_t { Unsupported = 0, GL_VAAPIGLXCOPY, GL_VAAPIGLXPIX, GL_VAAPIEGLDRM, GL_VTB, GL_VTBSURFACE, GL_MEDIACODEC, GL_VDPAU, GL_NVDEC, GL_MMAL, GL_DRMPRIME, DRM_DRMPRIME, DUMMY } |
using | InteropTypes = std::vector< InteropType > |
using | InteropMap = std::map< VideoFrameType, InteropTypes > |
Fix pause frame deinterlacing
Deinterlacing 'breaks' after certain stream changes (e.g. aspect ratio)
Scaling of some 1080 H.264 material (garbage line at bottom - presumably scaling from 1088 to 1080 - but only some files). Same effect on all VAAPI interop types.
Definition at line 48 of file mythvaapiinterop.h.
|
protected |
Definition at line 102 of file mythvaapiinterop.cpp.
|
overrideprotected |
Definition at line 107 of file mythvaapiinterop.cpp.
|
static |
Return a list of interops that are supported by the current render device.
DRM interop is the preferred option as it is copy free but requires EGL. DRM returns raw YUV frames which gives us full colourspace and deinterlacing control.
GLX Pixmap interop will copy the frame to an RGBA texture. VAAPI functionality is used for colourspace conversion and deinterlacing. It is not supported when EGL and/or Wayland are running.
GLX Copy is only available when GLX is running (no OpenGLES or Wayland) and, under the hood, performs the same Pixmap copy as GLXPixmap support plus an additional render to texture via a FramebufferObject. As it is less performant and less widely available than GLX Pixmap, it may be removed in the future.
Definition at line 38 of file mythvaapiinterop.cpp.
Referenced by MythOpenGLInterop::GetTypes().
|
static |
Definition at line 72 of file mythvaapiinterop.cpp.
Referenced by MythVAAPIContext::InitialiseContext().
VASurfaceID MythVAAPIInterop::VerifySurface | ( | MythRenderOpenGL * | Context, |
MythVideoFrame * | Frame | ||
) |
Definition at line 161 of file mythvaapiinterop.cpp.
Referenced by MythVAAPIInteropDRM::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), and MythVAAPIInteropGLXPixmap::Acquire().
VADisplay MythVAAPIInterop::GetDisplay | ( | void | ) |
Definition at line 115 of file mythvaapiinterop.cpp.
Referenced by MythVAAPIContext::InitialiseContext().
QString MythVAAPIInterop::GetVendor | ( | void | ) |
Definition at line 120 of file mythvaapiinterop.cpp.
Referenced by MythVAAPIContext::InitialiseContext().
|
static |
Definition at line 194 of file mythvaapiinterop.cpp.
Referenced by Deinterlace(), and MythVAAPIContext::PostProcessFrame().
|
protected |
Definition at line 125 of file mythvaapiinterop.cpp.
Referenced by MythVAAPIInteropDRM::MythVAAPIInteropDRM(), MythVAAPIInteropGLXCopy::MythVAAPIInteropGLXCopy(), and MythVAAPIInteropGLXPixmap::MythVAAPIInteropGLXPixmap().
|
protected |
Definition at line 322 of file mythvaapiinterop.cpp.
Referenced by MythVAAPIInteropDRM::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), and MythVAAPIInteropGLXPixmap::Acquire().
|
protectedvirtual |
Reimplemented in MythVAAPIInteropDRM.
Definition at line 145 of file mythvaapiinterop.cpp.
Referenced by Deinterlace(), MythVAAPIInteropDRM::DestroyDeinterlacer(), and ~MythVAAPIInterop().
|
inlineprotectedvirtual |
Reimplemented in MythVAAPIInteropDRM.
Definition at line 70 of file mythvaapiinterop.h.
Referenced by Deinterlace().
|
protected |
Definition at line 73 of file mythvaapiinterop.h.
Referenced by MythVAAPIInteropDRM::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), MythVAAPIInteropGLXPixmap::Acquire(), MythVAAPIInteropDRM::AcquireVAAPI(), Deinterlace(), GetDisplay(), MythVAAPIInteropDRM::GetDRMFrameDescriptor(), InitaliseDisplay(), MythVAAPIInteropGLX::InitPictureAttributes(), MythVAAPIInteropDRM::MythVAAPIInteropDRM(), MythVAAPIInteropGLXCopy::MythVAAPIInteropGLXCopy(), MythVAAPIInteropGLXPixmap::MythVAAPIInteropGLXPixmap(), MythVAAPIInteropGLX::SetPictureAttribute(), MythVAAPIInteropDRM::TestPrimeInterop(), ~MythVAAPIInterop(), and MythVAAPIInteropGLXCopy::~MythVAAPIInteropGLXCopy().
|
protected |
Definition at line 74 of file mythvaapiinterop.h.
Referenced by GetVendor(), and InitaliseDisplay().
|
protected |
Definition at line 76 of file mythvaapiinterop.h.
Referenced by MythVAAPIInteropDRM::Acquire(), Deinterlace(), DestroyDeinterlacer(), and MythVAAPIInteropGLX::GetFlagsForFrame().
Definition at line 77 of file mythvaapiinterop.h.
Referenced by Deinterlace(), and DestroyDeinterlacer().
Definition at line 78 of file mythvaapiinterop.h.
Referenced by Deinterlace(), and DestroyDeinterlacer().
|
protected |
Definition at line 79 of file mythvaapiinterop.h.
Referenced by Deinterlace(), and DestroyDeinterlacer().
|
protected |
Definition at line 80 of file mythvaapiinterop.h.
Referenced by Deinterlace(), and DestroyDeinterlacer().
|
protected |
Definition at line 81 of file mythvaapiinterop.h.
Referenced by Deinterlace(), and DestroyDeinterlacer().
|
protected |
Definition at line 82 of file mythvaapiinterop.h.
Referenced by Deinterlace(), MythVAAPIInteropDRM::DestroyDeinterlacer(), and DestroyDeinterlacer().
Definition at line 83 of file mythvaapiinterop.h.
Referenced by MythVAAPIInteropDRM::Acquire(), and Deinterlace().
|
protected |
Definition at line 84 of file mythvaapiinterop.h.
Referenced by Deinterlace().
|
protected |
Definition at line 85 of file mythvaapiinterop.h.
Referenced by Deinterlace().
|
protected |
Definition at line 86 of file mythvaapiinterop.h.
Referenced by Deinterlace(), and DestroyDeinterlacer().
|
protected |
Definition at line 87 of file mythvaapiinterop.h.
Referenced by Deinterlace(), and DestroyDeinterlacer().