MythTV  master
mythvdpauinterop.cpp
Go to the documentation of this file.
1 // MythTV
3 
4 #include "mythvideocolourspace.h"
7 
8 #define LOC QString("VDPAUInterop: ")
9 
11  MythRenderOpenGL* Context,
12  MythCodecID CodecId)
13 {
14  if (!(Context && Player))
15  return nullptr;
16 
18  GetVDPAUTypes(Context, types);
19  if (auto vdpau = types.find(FMT_VDPAU); vdpau != types.end())
20  if (std::any_of(vdpau->second.cbegin(), vdpau->second.cend(), [](auto Type) { return Type == GL_VDPAU; }))
21  return new MythVDPAUInterop(Player, Context, CodecId);
22 
23  return nullptr;
24 }
25 
27 {
29  return;
30  if (Render->hasExtension("GL_NV_vdpau_interop"))
31  {
32  Types[FMT_VDPAU] = { GL_VDPAU };
33  return;
34  }
35  LOG(VB_GENERAL, LOG_WARNING, LOC + "GL_NV_vdpau_interop is not available");
36 }
37 
39  : MythOpenGLInterop(Context, GL_VDPAU, Player),
40  m_codec(CodecId)
41 {
42 }
43 
45 {
46  if (!m_openglContext)
47  return;
48 
49  if (m_colourSpace)
51 
54  Cleanup();
55  delete m_helper;
56 }
57 
59 {
61 
62  // per the spec, this should automatically release any registered
63  // and mapped surfaces
64  if (m_finiNV)
65  m_finiNV();
66 
67  if (m_helper && !m_preempted)
68  {
71  }
72 
73  m_mixer = 0;
74  m_outputSurface = 0;
77  m_mixerSize = QSize();
78  m_mixerChroma = VDP_CHROMA_TYPE_420;
79  m_mapped = false;
81 }
82 
84 {
85  while (!m_referenceFrames.isEmpty())
86  {
87  AVBufferRef* ref = m_referenceFrames.takeLast();
88  av_buffer_unref(&ref);
89  }
90 }
91 
93 {
94  if (!Buffer)
95  return;
96 
97  // don't retain twice for double rate
98  if (!m_referenceFrames.empty() &&
99  (static_cast<VdpVideoSurface>(reinterpret_cast<uintptr_t>(m_referenceFrames[0]->data)) ==
100  static_cast<VdpVideoSurface>(reinterpret_cast<uintptr_t>(Buffer->data))))
101  {
102  return;
103  }
104 
105  m_referenceFrames.push_front(av_buffer_ref(Buffer));
106 
107  // release old frames
108  while (m_referenceFrames.size() > 3)
109  {
110  AVBufferRef* ref = m_referenceFrames.takeLast();
111  av_buffer_unref(&ref);
112  }
113 }
114 
115 bool MythVDPAUInterop::InitNV(AVVDPAUDeviceContext* DeviceContext)
116 {
117  if (!DeviceContext || !m_openglContext)
118  return false;
119 
121  m_helper && m_helper->IsValid())
122  return true;
123 
125  m_initNV = reinterpret_cast<MYTH_VDPAUINITNV>(m_openglContext->GetProcAddress("glVDPAUInitNV"));
126  m_finiNV = reinterpret_cast<MYTH_VDPAUFININV>(m_openglContext->GetProcAddress("glVDPAUFiniNV"));
127  m_registerNV = reinterpret_cast<MYTH_VDPAUREGOUTSURFNV>(m_openglContext->GetProcAddress("glVDPAURegisterOutputSurfaceNV"));
128  m_accessNV = reinterpret_cast<MYTH_VDPAUSURFACCESSNV>(m_openglContext->GetProcAddress("glVDPAUSurfaceAccessNV"));
129  m_mapNV = reinterpret_cast<MYTH_VDPAUMAPSURFNV>(m_openglContext->GetProcAddress("glVDPAUMapSurfacesNV"));
130  m_unmapNV = reinterpret_cast<MYTH_VDPAUMAPSURFNV>(m_openglContext->GetProcAddress("glVDPAUUnmapSurfacesNV"));
131 
132  delete m_helper;
133  m_helper = nullptr;
134 
136  {
137  m_helper = new MythVDPAUHelper(DeviceContext);
138  if (m_helper->IsValid())
139  {
140  connect(m_helper, &MythVDPAUHelper::DisplayPreempted, this, &MythVDPAUInterop::DisplayPreempted, Qt::DirectConnection);
141  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Ready");
142  return true;
143  }
144  delete m_helper;
145  m_helper = nullptr;
146  }
147 
148  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to retrieve procs");
149  return false;
150 }
151 
152 bool MythVDPAUInterop::InitVDPAU(AVVDPAUDeviceContext* DeviceContext, VdpVideoSurface Surface,
153  MythDeintType Deint, bool DoubleRate)
154 {
155  if (!m_helper || !m_openglContext || !Surface || !DeviceContext)
156  return false;
157 
158  VdpChromaType chroma = VDP_CHROMA_TYPE_420;
159  QSize size = m_helper->GetSurfaceParameters(Surface, chroma);
160 
161  if (m_mixer && (chroma != m_mixerChroma || size != m_mixerSize || Deint != m_deinterlacer))
162  Cleanup();
163 
164  if (!m_mixer)
165  {
166  m_mixer = m_helper->CreateMixer(size, chroma, Deint);
167  m_deinterlacer = Deint;
168  m_mixerChroma = chroma;
169  m_mixerSize = size;
170  if (DEINT_NONE != m_deinterlacer)
171  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Setup deinterlacer '%1'")
173  }
174 
175  if (!m_outputSurface)
176  {
178  if (m_outputSurface)
179  {
180  std::vector<QSize> sizes;
181  sizes.push_back(size);
182  std::vector<MythVideoTextureOpenGL*> textures =
184  if (textures.empty())
185  return false;
186  m_openglTextures.insert(DUMMY_INTEROP_ID, textures);
187  }
188  }
189 
190  if (m_mixer && m_outputSurface)
191  {
192  if (!m_outputSurfaceReg && !m_openglTextures.empty())
193  {
194  // This may fail if another interop is registered (but should not happen if
195  // decoder creation is working properly). Subsequent surface
196  // registration will then fail and we will try again on the next pass
197  m_initNV(reinterpret_cast<void*>(static_cast<uintptr_t>(DeviceContext->device)),
198  reinterpret_cast<const void*>(DeviceContext->get_proc_address));
199  GLuint texid = m_openglTextures[DUMMY_INTEROP_ID][0]->m_textureId;
200  m_outputSurfaceReg = m_registerNV(reinterpret_cast<void*>(static_cast<uintptr_t>(m_outputSurface)),
201  QOpenGLTexture::Target2D, 1, &texid);
202  // this happens if there is another interop registered to this OpenGL context
203  if (!m_outputSurfaceReg)
204  {
205  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to register VdpOutputSurface. Will retry.");
206  }
207  else
208  {
209  m_accessNV(m_outputSurfaceReg, QOpenGLBuffer::ReadOnly);
210  }
211  }
212  return true;
213  }
214 
215  return (m_mixer != 0U) && (m_outputSurface != 0U);
216 }
217 
225 std::vector<MythVideoTextureOpenGL*>
227  MythVideoColourSpace* ColourSpace,
229  FrameScanType Scan)
230 {
231  std::vector<MythVideoTextureOpenGL*> result;
232  if (!Frame)
233  return result;
234 
235  if (m_preempted)
236  {
237  // Don't spam the logs with this warning
238  if (!m_preemptedWarning)
239  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Display preempted. Decoder needs to be reset");
240  m_preemptedWarning = true;
241  return result;
242  }
243 
244  if (Context && (Context != m_openglContext))
245  LOG(VB_GENERAL, LOG_WARNING, LOC + "Mismatched OpenGL contexts");
246 
247  // Check size
248  QSize surfacesize(Frame->m_width, Frame->m_height);
249  if (m_textureSize != surfacesize)
250  {
251  if (!m_textureSize.isEmpty())
252  LOG(VB_GENERAL, LOG_WARNING, LOC + "Video texture size changed!");
253  m_textureSize = surfacesize;
254  }
255 
256  // Lock
258 
259  // Retrieve hardware frames context and AVVDPAUDeviceContext
260  if ((Frame->m_pixFmt != AV_PIX_FMT_VDPAU) || (Frame->m_type != FMT_VDPAU) ||
261  !Frame->m_buffer || !Frame->m_priv[1])
262  return result;
263 
264  auto* buffer = reinterpret_cast<AVBufferRef*>(Frame->m_priv[1]);
265  if (!buffer || !buffer->data)
266  return result;
267  auto* frames = reinterpret_cast<AVHWFramesContext*>(buffer->data);
268  if (!frames || !frames->device_ctx)
269  return result;
270  auto *devicecontext = reinterpret_cast<AVVDPAUDeviceContext*>(frames->device_ctx->hwctx);
271  if (!devicecontext)
272  return result;
273 
274  // Initialise
275  if (!InitNV(devicecontext))
276  return result;
277 
278  // Retrieve surface - we need its size to create the mixer and output surface
279  auto surface = static_cast<VdpVideoSurface>(reinterpret_cast<uintptr_t>(Frame->m_buffer));
280  if (!surface)
281  return result;
282 
283  // Workaround HEVC interlaced bug
284  // VDPAU driver hangs if we try to render progressive HEVC as interlaced (tested with version 418.56)
285  // FFmpeg clearly currently has issues with interlaced HEVC (https://trac.ffmpeg.org/ticket/4141).
286  // Streams are always return with the field height.
287  // Deinterlacing does work with (some?) HEVC material flagged as interlaced.
288  if ((kCodec_HEVC_VDPAU == m_codec) && is_interlaced(Scan) && !Frame->m_interlaced)
289  {
290  // This should only be logged a couple of times before the scan is detected as progressive
291  LOG(VB_GENERAL, LOG_INFO, LOC + "Ignoring scan for non-interlaced HEVC frame");
292  Scan = kScan_Progressive;
293  }
294 
295  // Check for deinterlacing - VDPAU deinterlacers trump all others as we can only
296  // deinterlace VDPAU frames here. So accept any deinterlacer.
297  // N.B. basic deinterlacing requires no additional setup and is managed with
298  // the field/frame parameter
299  bool doublerate = true;
300  MythDeintType deinterlacer = DEINT_BASIC;
301  if (is_interlaced(Scan))
302  {
303  MythDeintType driverdeint = Frame->GetDoubleRateOption(DEINT_DRIVER | DEINT_CPU | DEINT_SHADER,
304  DEINT_ALL);
305  if (!driverdeint)
306  {
307  doublerate = false;
308  driverdeint = Frame->GetSingleRateOption(DEINT_DRIVER | DEINT_CPU | DEINT_SHADER, DEINT_ALL);
309  }
310 
311  if (driverdeint)
312  {
313  Frame->m_deinterlaceInuse = driverdeint | DEINT_DRIVER;
314  Frame->m_deinterlaceInuse2x = doublerate;
315  deinterlacer = driverdeint;
316  }
317  }
318 
319  if ((deinterlacer == DEINT_HIGH) || (deinterlacer == DEINT_MEDIUM))
320  {
321  if (qAbs(Frame->m_frameCounter - m_discontinuityCounter) > 1)
323  RotateReferenceFrames(reinterpret_cast<AVBufferRef*>(Frame->m_priv[0]));
324  }
325  else
326  {
328  }
329  m_discontinuityCounter = Frame->m_frameCounter;
330 
331  // We need a mixer, an output surface and mapped texture
332  if (!InitVDPAU(devicecontext, surface, deinterlacer, doublerate))
333  return result;
334 
335  // Update colourspace and initialise on first frame - after mixer is created
336  if (ColourSpace)
337  {
338  if (!m_colourSpace)
339  {
340  if (m_helper->IsAttributeAvailable(VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX))
341  {
344  }
345  else
346  {
347  // N.B. CSC matrix support should always be available so there is no fallback.
349  LOG(VB_GENERAL, LOG_WARNING, LOC + "No VDPAU CSC matrix support");
350  }
351 
352  ColourSpace->IncrRef();
353  m_colourSpace = ColourSpace;
354  }
355  ColourSpace->UpdateColourSpace(Frame);
356  }
357 
358  // Render surface
359  if (m_mapped)
361  m_helper->MixerRender(m_mixer, surface, m_outputSurface, Scan,
362  static_cast<int>(Frame->m_interlacedReverse ? !Frame->m_topFieldFirst :
363  Frame->m_topFieldFirst), m_referenceFrames);
365  m_mapped = true;
367 }
368 
369 void MythVDPAUInterop::UpdateColourSpace(bool /*PrimariesChanged*/)
370 {
372  return;
373 
376 }
377 
379 {
380  // N.B. Pre-emption is irrecoverable here. We ensure the error state is recorded
381  // and when AvFormatDecoder/MythCodecContext hit a problem, IsPreempted is checked.
382  // The decoder context is then released, along with the associated interop
383  // class (i.e. this) and a new interop is created.
384  LOG(VB_GENERAL, LOG_INFO, LOC + "VDPAU display preempted");
385  m_preempted = true;
386 }
387 
389 {
390  return m_preempted;
391 }
DUMMY_INTEROP_ID
static constexpr uint64_t DUMMY_INTEROP_ID
Definition: mythinteropgpu.h:18
FMT_VDPAU
@ FMT_VDPAU
Definition: mythframe.h:56
MythVDPAUInterop::m_mixerSize
QSize m_mixerSize
Definition: mythvdpauinterop.h:59
ReferenceCounter::DecrRef
virtual int DecrRef(void)
Decrements reference count and deletes on 0.
Definition: referencecounter.cpp:124
MythVDPAUInterop::RotateReferenceFrames
void RotateReferenceFrames(AVBufferRef *Buffer)
Definition: mythvdpauinterop.cpp:92
mythvdpauinterop.h
MythVDPAUHelper::SetCSCMatrix
void SetCSCMatrix(VdpVideoMixer Mixer, MythVideoColourSpace *ColourSpace)
Definition: mythvdpauhelper.cpp:551
MythCodecID
MythCodecID
Definition: mythcodecid.h:11
MythVDPAUInterop::m_initNV
MYTH_VDPAUINITNV m_initNV
Definition: mythvdpauinterop.h:62
MYTH_VDPAUREGOUTSURFNV
MythVDPAUSurfaceNV(APIENTRY *)(const void *, GLenum, GLsizei, const GLuint *) MYTH_VDPAUREGOUTSURFNV
Definition: mythvdpauinterop.h:21
MYTH_VDPAUMAPSURFNV
void(APIENTRY *)(GLsizei, MythVDPAUSurfaceNV *) MYTH_VDPAUMAPSURFNV
Definition: mythvdpauinterop.h:23
MythVDPAUInterop::m_mapped
bool m_mapped
Definition: mythvdpauinterop.h:71
LOC
#define LOC
Definition: mythvdpauinterop.cpp:8
kScan_Progressive
@ kScan_Progressive
Definition: videoouttypes.h:100
MythInteropGPU::GL_VDPAU
@ GL_VDPAU
Definition: mythinteropgpu.h:34
MythVDPAUInterop::m_colourSpace
MythVideoColourSpace * m_colourSpace
Definition: mythvdpauinterop.h:53
Frame
Definition: zmdefines.h:102
MythVDPAUInterop::CreateVDPAU
static MythVDPAUInterop * CreateVDPAU(MythPlayerUI *Player, MythRenderOpenGL *Context, MythCodecID CodecId)
Definition: mythvdpauinterop.cpp:10
MythRenderOpenGL::GetProcAddress
QFunctionPointer GetProcAddress(const QString &Proc) const
Definition: mythrenderopengl.cpp:1086
MythVideoColourSpace::UpdateColourSpace
bool UpdateColourSpace(const MythVideoFrame *Frame)
Set the current colourspace to use.
Definition: mythvideocolourspace.cpp:337
MythVDPAUInterop::~MythVDPAUInterop
~MythVDPAUInterop() override
Definition: mythvdpauinterop.cpp:44
Surface
Definition: surface.h:4
MythVDPAUHelper::HaveVDPAU
static bool HaveVDPAU(bool Reinit=false)
Definition: mythvdpauhelper.cpp:55
types
static const struct wl_interface * types[]
Definition: idle_inhibit_unstable_v1.c:39
MythVDPAUInterop::InitNV
bool InitNV(AVVDPAUDeviceContext *DeviceContext)
Definition: mythvdpauinterop.cpp:115
MythVideoColourSpace::SetSupportedAttributes
void SetSupportedAttributes(PictureAttributeSupported Supported)
Enable the given set of picture attributes.
Definition: mythvideocolourspace.cpp:111
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythVDPAUInterop::m_helper
MythVDPAUHelper * m_helper
Definition: mythvdpauinterop.h:54
MythVDPAUHelper::IsAttributeAvailable
bool IsAttributeAvailable(uint Attribute)
Definition: mythvdpauhelper.cpp:576
MythVDPAUHelper::CreateOutputSurface
VdpOutputSurface CreateOutputSurface(QSize Size)
Definition: mythvdpauhelper.cpp:406
MythVDPAUInterop::Cleanup
void Cleanup(void)
Definition: mythvdpauinterop.cpp:58
MythDeintType
MythDeintType
Definition: mythframe.h:66
MYTH_VDPAUFININV
void(APIENTRY *)(void) MYTH_VDPAUFININV
Definition: mythvdpauinterop.h:20
MythInteropGPU::InteropMap
std::map< VideoFrameType, InteropTypes > InteropMap
Definition: mythinteropgpu.h:44
MythVDPAUHelper::DeleteOutputSurface
void DeleteOutputSurface(VdpOutputSurface Surface)
Definition: mythvdpauhelper.cpp:420
MythVDPAUInterop::m_deinterlacer
MythDeintType m_deinterlacer
Definition: mythvdpauinterop.h:60
MythVDPAUInterop::Acquire
std::vector< MythVideoTextureOpenGL * > Acquire(MythRenderOpenGL *Context, MythVideoColourSpace *ColourSpace, MythVideoFrame *Frame, FrameScanType Scan) override
Map VDPAU video surfaces to an OpenGL texture.
Definition: mythvdpauinterop.cpp:226
MythPlayerUI
Definition: mythplayerui.h:12
mythvideocolourspace.h
mythlogging.h
MythVDPAUInterop::m_preemptedWarning
bool m_preemptedWarning
Definition: mythvdpauinterop.h:70
MythOpenGLInterop
Definition: mythopenglinterop.h:17
MythVDPAUInterop::m_outputSurface
VdpOutputSurface m_outputSurface
Definition: mythvdpauinterop.h:55
mythvdpauhelper.h
MythOpenGLInterop::m_openglContext
MythRenderOpenGL * m_openglContext
Definition: mythopenglinterop.h:41
DEINT_ALL
@ DEINT_ALL
Definition: mythframe.h:75
MythVDPAUHelper::DisplayPreempted
void DisplayPreempted(void)
DEINT_DRIVER
@ DEINT_DRIVER
Definition: mythframe.h:74
DEINT_SHADER
@ DEINT_SHADER
Definition: mythframe.h:73
MythVDPAUHelper
A simple wrapper around VDPAU functionality.
Definition: mythvdpauhelper.h:52
DEINT_BASIC
@ DEINT_BASIC
Definition: mythframe.h:69
MythVDPAUHelper::DeleteMixer
void DeleteMixer(VdpVideoMixer Mixer)
Definition: mythvdpauhelper.cpp:541
MythVDPAUInterop
Definition: mythvdpauinterop.h:25
kCodec_HEVC_VDPAU
@ kCodec_HEVC_VDPAU
Definition: mythcodecid.h:47
FMT_RGBA32
@ FMT_RGBA32
Definition: mythframe.h:34
MythVDPAUHelper::GetSurfaceParameters
QSize GetSurfaceParameters(VdpVideoSurface Surface, VdpChromaType &Chroma)
Definition: mythvdpauhelper.cpp:588
MythVDPAUInterop::m_accessNV
MYTH_VDPAUSURFACCESSNV m_accessNV
Definition: mythvdpauinterop.h:65
MythVDPAUHelper::IsValid
bool IsValid(void) const
Definition: mythvdpauhelper.cpp:317
MythVDPAUInterop::m_codec
MythCodecID m_codec
Definition: mythvdpauinterop.h:68
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:68
DEINT_HIGH
@ DEINT_HIGH
Definition: mythframe.h:71
DEINT_CPU
@ DEINT_CPU
Definition: mythframe.h:72
MythVDPAUHelper::CreateMixer
VdpVideoMixer CreateMixer(QSize Size, VdpChromaType ChromaType=VDP_CHROMA_TYPE_420, MythDeintType Deinterlacer=DEINT_BASIC)
Definition: mythvdpauhelper.cpp:430
MYTH_VDPAUINITNV
void(APIENTRY *)(const void *, const void *) MYTH_VDPAUINITNV
Definition: mythvdpauinterop.h:19
ALL_PICTURE_ATTRIBUTES
#define ALL_PICTURE_ATTRIBUTES
Definition: videoouttypes.h:127
MythVDPAUInterop::CleanupDeinterlacer
void CleanupDeinterlacer(void)
Definition: mythvdpauinterop.cpp:83
MythOpenGLInterop::m_openglTextures
QHash< unsigned long long, std::vector< MythVideoTextureOpenGL * > > m_openglTextures
Definition: mythopenglinterop.h:42
MythVDPAUInterop::m_referenceFrames
QVector< AVBufferRef * > m_referenceFrames
Definition: mythvdpauinterop.h:61
DEINT_MEDIUM
@ DEINT_MEDIUM
Definition: mythframe.h:70
MythRenderOpenGL
Definition: mythrenderopengl.h:95
kPictureAttributeSupported_None
@ kPictureAttributeSupported_None
Definition: videoouttypes.h:118
Buffer
Definition: MythExternControl.h:36
MythVideoColourSpace::Updated
void Updated(bool PrimariesChanged)
MythVDPAUInterop::m_mixerChroma
VdpChromaType m_mixerChroma
Definition: mythvdpauinterop.h:58
MythOpenGLInterop::DeleteTextures
virtual void DeleteTextures()
Definition: mythopenglinterop.cpp:138
MythVideoFrame::DeinterlacerName
static QString DeinterlacerName(MythDeintType Deint, bool DoubleRate, VideoFrameType Format=FMT_NONE)
Definition: mythframe.cpp:462
MythVDPAUInterop::MythVDPAUInterop
MythVDPAUInterop(MythPlayerUI *Player, MythRenderOpenGL *Context, MythCodecID CodecID)
Definition: mythvdpauinterop.cpp:38
MYTH_VDPAUSURFACCESSNV
void(APIENTRY *)(MythVDPAUSurfaceNV, GLenum) MYTH_VDPAUSURFACCESSNV
Definition: mythvdpauinterop.h:22
MythInteropGPU::m_discontinuityCounter
uint64_t m_discontinuityCounter
Definition: mythinteropgpu.h:63
MythVDPAUInterop::m_mixer
VdpVideoMixer m_mixer
Definition: mythvdpauinterop.h:57
MythVDPAUInterop::IsPreempted
bool IsPreempted(void) const
Definition: mythvdpauinterop.cpp:388
MythVDPAUHelper::MixerRender
void MixerRender(VdpVideoMixer Mixer, VdpVideoSurface Source, VdpOutputSurface Dest, FrameScanType Scan, int TopFieldFirst, QVector< AVBufferRef * > &Frames)
Definition: mythvdpauhelper.cpp:485
MythVDPAUInterop::UpdateColourSpace
void UpdateColourSpace(bool PrimariesChanged)
Definition: mythvdpauinterop.cpp:369
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
Player
Definition: zmliveplayer.h:34
MythVideoFrame
Definition: mythframe.h:87
MythVDPAUInterop::m_preempted
bool m_preempted
Definition: mythvdpauinterop.h:69
MythVDPAUInterop::m_finiNV
MYTH_VDPAUFININV m_finiNV
Definition: mythvdpauinterop.h:63
MythVDPAUInterop::m_unmapNV
MYTH_VDPAUMAPSURFNV m_unmapNV
Definition: mythvdpauinterop.h:67
MythVDPAUInterop::m_outputSurfaceReg
MythVDPAUSurfaceNV m_outputSurfaceReg
Definition: mythvdpauinterop.h:56
ReferenceCounter::IncrRef
virtual int IncrRef(void)
Increments reference count.
Definition: referencecounter.cpp:100
MythVDPAUInterop::m_registerNV
MYTH_VDPAUREGOUTSURFNV m_registerNV
Definition: mythvdpauinterop.h:64
MythInteropGPU::m_textureSize
QSize m_textureSize
Definition: mythinteropgpu.h:62
is_interlaced
bool is_interlaced(FrameScanType Scan)
Definition: videoouttypes.h:188
MythVDPAUInterop::DisplayPreempted
void DisplayPreempted(void)
Definition: mythvdpauinterop.cpp:378
MythVideoColourSpace
MythVideoColourSpace contains a QMatrix4x4 that can convert YCbCr data to RGB.
Definition: mythvideocolourspace.h:18
MythVideoTextureOpenGL::CreateTextures
static std::vector< MythVideoTextureOpenGL * > CreateTextures(MythRenderOpenGL *Context, VideoFrameType Type, VideoFrameType Format, std::vector< QSize > Sizes, GLenum Target=QOpenGLTexture::Target2D)
Create a set of textures suitable for the given Type and Format.
Definition: mythvideotextureopengl.cpp:57
MythVDPAUInterop::m_mapNV
MYTH_VDPAUMAPSURFNV m_mapNV
Definition: mythvdpauinterop.h:66
MythVDPAUInterop::GetVDPAUTypes
static void GetVDPAUTypes(MythRenderOpenGL *Render, MythInteropGPU::InteropMap &Types)
Definition: mythvdpauinterop.cpp:26
OpenGLLocker
Definition: mythrenderopengl.h:254
MythVDPAUInterop::InitVDPAU
bool InitVDPAU(AVVDPAUDeviceContext *DeviceContext, VdpVideoSurface Surface, MythDeintType Deint, bool DoubleRate)
Definition: mythvdpauinterop.cpp:152