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