MythTV
master
|
#include <libmythtv/opengl/mythopenglvideo.h>
Public Types | |
enum | VideoShaderType : std::uint8_t { Default = 0, Progressive = 1, InterlacedTop = 2, InterlacedBot = 3, BicubicUpsize = 4, ShaderCount = 5 } |
Public Types inherited from MythVideoGPU | |
enum | VideoResize : std::uint8_t { None = 0x000, Deinterlacer = 0x001, Sampling = 0x002, Performance = 0x004, Framebuffer = 0x008, ToneMap = 0x010, Bicubic = 0x020 } |
Public Slots | |
void | UpdateShaderParameters () |
Public Slots inherited from MythVideoGPU | |
void | UpdateColourSpace (bool PrimariesChanged) |
void | SetVideoDimensions (QSize VideoDim, QSize VideoDispDim) |
void | SetVideoRects (QRect DisplayVideoRect, QRect VideoRect) |
void | SetViewportRect (QRect DisplayVisibleRect) |
void | UpscalerChanged (const QString &Upscaler) |
Public Member Functions | |
MythOpenGLVideo (MythRenderOpenGL *Render, MythVideoColourSpace *ColourSpace, MythVideoBounds *Bounds, const MythVideoProfilePtr &VideoProfile, const QString &Profile) | |
~MythOpenGLVideo () override | |
void | StartFrame () override |
void | PrepareFrame (MythVideoFrame *Frame, FrameScanType Scan=kScan_Progressive) override |
Update the current input texture using the data from the given video frame. More... | |
void | RenderFrame (MythVideoFrame *Frame, bool TopFieldFirst, FrameScanType Scan, StereoscopicMode StereoOverride, bool DrawBorder=false) override |
void | EndFrame () override |
QString | GetProfile () const override |
void | ResetFrameFormat () override |
void | ResetTextures () override |
Clear reference frames after a seek as they will contain old images. More... | |
Public Member Functions inherited from MythVideoGPU | |
~MythVideoGPU () override | |
bool | IsValid () const |
void | SetProfile (const QString &Profile) |
void | SetMasterViewport (QSize Size) |
QSize | GetVideoDim () const |
Static Public Member Functions | |
static QString | TypeToProfile (VideoFrameType Type) |
Static Public Member Functions inherited from MythVideoGPU | |
static QString | VideoResizeToString (VideoResizing Resize) |
Protected Member Functions | |
void | ColourSpaceUpdate (bool PrimariesChanged) override |
Protected Member Functions inherited from MythVideoGPU | |
MythVideoGPU (MythRender *Render, MythVideoColourSpace *ColourSpace, MythVideoBounds *Bounds, const MythVideoProfilePtr &VideoProfile, QString Profile) | |
Private Member Functions | |
bool | SetupFrameFormat (VideoFrameType InputType, VideoFrameType OutputType, QSize Size, GLenum TextureTarget) |
bool | CreateVideoShader (VideoShaderType Type, MythDeintType Deint=DEINT_NONE) |
Create the appropriate shader for the operation Type. More... | |
void | BindTextures (bool Deinterlacing, std::vector< MythVideoTextureOpenGL * > &Current, std::vector< MythGLTexture * > &Textures) |
bool | AddDeinterlacer (const MythVideoFrame *Frame, FrameScanType Scan, MythDeintType Filter=DEINT_SHADER, bool CreateReferences=true) |
void | CleanupDeinterlacers () |
void | SetupBicubic (VideoResizing &Resize) |
Private Attributes | |
MythRenderOpenGL * | m_openglRender { nullptr } |
int | m_gles { 0 } |
MythDeintType | m_fallbackDeinterlacer { MythDeintType::DEINT_NONE } |
std::array< QOpenGLShaderProgram *, ShaderCount > | m_shaders { nullptr } |
std::array< int, ShaderCount > | m_shaderCost { 1 } |
std::vector< MythVideoTextureOpenGL * > | m_inputTextures |
std::vector< MythVideoTextureOpenGL * > | m_prevTextures |
std::vector< MythVideoTextureOpenGL * > | m_nextTextures |
QOpenGLFramebufferObject * | m_frameBuffer { nullptr } |
MythVideoTextureOpenGL * | m_frameBufferTexture { nullptr } |
QOpenGLFunctions::OpenGLFeatures | m_features |
int | m_extraFeatures { 0 } |
GLenum | m_textureTarget { QOpenGLTexture::Target2D } |
bool | m_chromaUpsamplingFilter { false } |
MythOpenGLTonemap * | m_toneMap { nullptr } |
Additional Inherited Members | |
Signals inherited from MythVideoGPU | |
void | OutputChanged (QSize VideoDim, QSize VideoDispDim, float) |
Protected Attributes inherited from MythVideoGPU | |
MythRender * | m_render { nullptr } |
uint64_t | m_discontinuityCounter { 0 } |
QString | m_profile |
VideoFrameType | m_inputType { FMT_NONE } |
VideoFrameType | m_outputType { FMT_NONE } |
QSize | m_videoDispDim |
QSize | m_videoDim |
QSize | m_masterViewportSize |
QRect | m_displayVideoRect |
QRect | m_videoRect |
MythVideoColourSpace * | m_videoColourSpace { nullptr } |
QSize | m_inputTextureSize |
VideoResizing | m_resizing { None } |
int | m_lastRotation { 0 } |
MythDeintType | m_deinterlacer { MythDeintType::DEINT_NONE } |
bool | m_deinterlacer2x { false } |
bool | m_valid { false } |
bool | m_viewportControl { true } |
uint | m_lastStereo { 0 } |
StereoscopicMode | m_stereoMode { kStereoscopicModeSideBySideDiscard } |
bool | m_bicubicUpsize { false } |
MythOpenGLVideo is responsible for displaying video frames on screen using OpenGL. Frames may be sourced from main or graphics memory and MythOpenGLVideo must handle colourspace conversion, deinterlacing and scaling as required.
Definition at line 22 of file mythopenglvideo.h.
enum MythOpenGLVideo::VideoShaderType : std::uint8_t |
Enumerator | |
---|---|
Default | |
Progressive | |
InterlacedTop | |
InterlacedBot | |
BicubicUpsize | |
ShaderCount |
Definition at line 27 of file mythopenglvideo.h.
MythOpenGLVideo::MythOpenGLVideo | ( | MythRenderOpenGL * | Render, |
MythVideoColourSpace * | ColourSpace, | ||
MythVideoBounds * | Bounds, | ||
const MythVideoProfilePtr & | VideoProfile, | ||
const QString & | Profile | ||
) |
Definition at line 34 of file mythopenglvideo.cpp.
|
override |
Definition at line 59 of file mythopenglvideo.cpp.
|
static |
Definition at line 1066 of file mythopenglvideo.cpp.
Referenced by GetProfile().
|
inlineoverridevirtual |
Implements MythVideoGPU.
Definition at line 43 of file mythopenglvideo.h.
|
overridevirtual |
Update the current input texture using the data from the given video frame.
Implements MythVideoGPU.
Definition at line 560 of file mythopenglvideo.cpp.
|
overridevirtual |
Implements MythVideoGPU.
Definition at line 659 of file mythopenglvideo.cpp.
|
inlineoverridevirtual |
Implements MythVideoGPU.
Definition at line 47 of file mythopenglvideo.h.
|
overridevirtual |
Reimplemented from MythVideoGPU.
Definition at line 128 of file mythopenglvideo.cpp.
Referenced by SetupFrameFormat().
|
overridevirtual |
Reimplemented from MythVideoGPU.
Definition at line 539 of file mythopenglvideo.cpp.
Referenced by PrepareFrame(), SetupFrameFormat(), and ~MythOpenGLVideo().
|
overridevirtual |
Clear reference frames after a seek as they will contain old images.
Implements MythVideoGPU.
Definition at line 1029 of file mythopenglvideo.cpp.
Referenced by PrepareFrame().
|
slot |
Definition at line 96 of file mythopenglvideo.cpp.
Referenced by AddDeinterlacer(), SetupBicubic(), and SetupFrameFormat().
|
overrideprotectedvirtual |
Implements MythVideoGPU.
Definition at line 70 of file mythopenglvideo.cpp.
|
private |
Definition at line 470 of file mythopenglvideo.cpp.
Referenced by CleanupDeinterlacers(), ColourSpaceUpdate(), PrepareFrame(), and RenderFrame().
|
private |
Create the appropriate shader for the operation Type.
Definition at line 298 of file mythopenglvideo.cpp.
Referenced by AddDeinterlacer(), SetupBicubic(), and SetupFrameFormat().
|
private |
Definition at line 1039 of file mythopenglvideo.cpp.
Referenced by RenderFrame().
|
private |
Definition at line 157 of file mythopenglvideo.cpp.
Referenced by PrepareFrame(), and RenderFrame().
|
private |
Definition at line 135 of file mythopenglvideo.cpp.
Referenced by AddDeinterlacer().
|
private |
Definition at line 1081 of file mythopenglvideo.cpp.
Referenced by RenderFrame().
|
private |
Definition at line 69 of file mythopenglvideo.h.
Referenced by AddDeinterlacer(), ColourSpaceUpdate(), CreateVideoShader(), MythOpenGLVideo(), PrepareFrame(), RenderFrame(), ResetFrameFormat(), SetupFrameFormat(), UpdateShaderParameters(), and ~MythOpenGLVideo().
|
private |
Definition at line 70 of file mythopenglvideo.h.
Referenced by CreateVideoShader(), MythOpenGLVideo(), and RenderFrame().
|
private |
Definition at line 71 of file mythopenglvideo.h.
Referenced by AddDeinterlacer(), CleanupDeinterlacers(), and ResetFrameFormat().
|
private |
Definition at line 72 of file mythopenglvideo.h.
Referenced by ColourSpaceUpdate(), CreateVideoShader(), RenderFrame(), ResetFrameFormat(), SetupBicubic(), and UpdateShaderParameters().
|
private |
Definition at line 73 of file mythopenglvideo.h.
Referenced by CreateVideoShader(), RenderFrame(), and ResetFrameFormat().
|
private |
Definition at line 74 of file mythopenglvideo.h.
Referenced by AddDeinterlacer(), PrepareFrame(), RenderFrame(), ResetFrameFormat(), ResetTextures(), and SetupFrameFormat().
|
private |
Definition at line 75 of file mythopenglvideo.h.
Referenced by AddDeinterlacer(), BindTextures(), PrepareFrame(), RenderFrame(), ResetFrameFormat(), and ResetTextures().
|
private |
Definition at line 76 of file mythopenglvideo.h.
Referenced by AddDeinterlacer(), BindTextures(), PrepareFrame(), RenderFrame(), ResetFrameFormat(), and ResetTextures().
|
private |
Definition at line 77 of file mythopenglvideo.h.
Referenced by RenderFrame(), and ResetFrameFormat().
|
private |
Definition at line 78 of file mythopenglvideo.h.
Referenced by RenderFrame(), and ResetFrameFormat().
|
private |
Definition at line 79 of file mythopenglvideo.h.
Referenced by CreateVideoShader(), and MythOpenGLVideo().
|
private |
Definition at line 80 of file mythopenglvideo.h.
Referenced by MythOpenGLVideo(), and RenderFrame().
|
private |
Definition at line 81 of file mythopenglvideo.h.
Referenced by CleanupDeinterlacers(), ColourSpaceUpdate(), CreateVideoShader(), RenderFrame(), ResetFrameFormat(), SetupFrameFormat(), and UpdateShaderParameters().
Definition at line 82 of file mythopenglvideo.h.
Referenced by CreateVideoShader(), and MythOpenGLVideo().
|
private |
Definition at line 83 of file mythopenglvideo.h.
Referenced by RenderFrame(), and ~MythOpenGLVideo().