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  std::vector<QSize> sizes;
180  sizes.push_back(size);
181  std::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 std::vector<MythVideoTextureOpenGL*>
226  MythVideoColourSpace* ColourSpace,
228  FrameScanType Scan)
229 {
230  std::vector<MythVideoTextureOpenGL*> result;
231  if (!Frame)
232  return result;
233 
234  if (m_preempted)
235  {
236  // Don't spam the logs with this warning
237  if (!m_preemptedWarning)
238  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Display preempted. Decoder needs to be reset");
239  m_preemptedWarning = true;
240  return result;
241  }
242 
243  if (Context && (Context != m_openglContext))
244  LOG(VB_GENERAL, LOG_WARNING, LOC + "Mismatched OpenGL contexts");
245 
246  // Check size
247  QSize surfacesize(Frame->m_width, Frame->m_height);
248  if (m_textureSize != surfacesize)
249  {
250  if (!m_textureSize.isEmpty())
251  LOG(VB_GENERAL, LOG_WARNING, LOC + "Video texture size changed!");
252  m_textureSize = surfacesize;
253  }
254 
255  // Lock
257 
258  // Retrieve hardware frames context and AVVDPAUDeviceContext
259  if ((Frame->m_pixFmt != AV_PIX_FMT_VDPAU) || (Frame->m_type != FMT_VDPAU) ||
260  !Frame->m_buffer || !Frame->m_priv[1])
261  return result;
262 
263  auto* buffer = reinterpret_cast<AVBufferRef*>(Frame->m_priv[1]);
264  if (!buffer || !buffer->data)
265  return result;
266  auto* frames = reinterpret_cast<AVHWFramesContext*>(buffer->data);
267  if (!frames || !frames->device_ctx)
268  return result;
269  auto *devicecontext = reinterpret_cast<AVVDPAUDeviceContext*>(frames->device_ctx->hwctx);
270  if (!devicecontext)
271  return result;
272 
273  // Initialise
274  if (!InitNV(devicecontext))
275  return result;
276 
277  // Retrieve surface - we need its size to create the mixer and output surface
278  auto surface = static_cast<VdpVideoSurface>(reinterpret_cast<uintptr_t>(Frame->m_buffer));
279  if (!surface)
280  return result;
281 
282  // Workaround HEVC interlaced bug
283  // VDPAU driver hangs if we try to render progressive HEVC as interlaced (tested with version 418.56)
284  // FFmpeg clearly currently has issues with interlaced HEVC (https://trac.ffmpeg.org/ticket/4141).
285  // Streams are always return with the field height.
286  // Deinterlacing does work with (some?) HEVC material flagged as interlaced.
287  if ((kCodec_HEVC_VDPAU == m_codec) && is_interlaced(Scan) && !Frame->m_interlaced)
288  {
289  // This should only be logged a couple of times before the scan is detected as progressive
290  LOG(VB_GENERAL, LOG_INFO, LOC + "Ignoring scan for non-interlaced HEVC frame");
291  Scan = kScan_Progressive;
292  }
293 
294  // Check for deinterlacing - VDPAU deinterlacers trump all others as we can only
295  // deinterlace VDPAU frames here. So accept any deinterlacer.
296  // N.B. basic deinterlacing requires no additional setup and is managed with
297  // the field/frame parameter
298  bool doublerate = true;
299  MythDeintType deinterlacer = DEINT_BASIC;
300  if (is_interlaced(Scan))
301  {
302  MythDeintType driverdeint = Frame->GetDoubleRateOption(DEINT_DRIVER | DEINT_CPU | DEINT_SHADER,
303  DEINT_ALL);
304  if (!driverdeint)
305  {
306  doublerate = false;
307  driverdeint = Frame->GetSingleRateOption(DEINT_DRIVER | DEINT_CPU | DEINT_SHADER, DEINT_ALL);
308  }
309 
310  if (driverdeint)
311  {
312  Frame->m_deinterlaceInuse = driverdeint | DEINT_DRIVER;
313  Frame->m_deinterlaceInuse2x = doublerate;
314  deinterlacer = driverdeint;
315  }
316  }
317 
318  if ((deinterlacer == DEINT_HIGH) || (deinterlacer == DEINT_MEDIUM))
319  {
320  if (qAbs(Frame->m_frameCounter - m_discontinuityCounter) > 1)
322  RotateReferenceFrames(reinterpret_cast<AVBufferRef*>(Frame->m_priv[0]));
323  }
324  else
325  {
327  }
328  m_discontinuityCounter = Frame->m_frameCounter;
329 
330  // We need a mixer, an output surface and mapped texture
331  if (!InitVDPAU(devicecontext, surface, deinterlacer, doublerate))
332  return result;
333 
334  // Update colourspace and initialise on first frame - after mixer is created
335  if (ColourSpace)
336  {
337  if (!m_colourSpace)
338  {
339  if (m_helper->IsAttributeAvailable(VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX))
340  {
343  }
344  else
345  {
346  // N.B. CSC matrix support should always be available so there is no fallback.
348  LOG(VB_GENERAL, LOG_WARNING, LOC + "No VDPAU CSC matrix support");
349  }
350 
351  ColourSpace->IncrRef();
352  m_colourSpace = ColourSpace;
353  }
354  ColourSpace->UpdateColourSpace(Frame);
355  }
356 
357  // Render surface
358  if (m_mapped)
360  m_helper->MixerRender(m_mixer, surface, m_outputSurface, Scan,
361  static_cast<int>(Frame->m_interlacedReverse ? !Frame->m_topFieldFirst :
362  Frame->m_topFieldFirst), m_referenceFrames);
364  m_mapped = true;
366 }
367 
368 void MythVDPAUInterop::UpdateColourSpace(bool /*PrimariesChanged*/)
369 {
371  return;
372 
375 }
376 
378 {
379  // N.B. Pre-emption is irrecoverable here. We ensure the error state is recorded
380  // and when AvFormatDecoder/MythCodecContext hit a problem, IsPreempted is checked.
381  // The decoder context is then released, along with the associated interop
382  // class (i.e. this) and a new interop is created.
383  LOG(VB_GENERAL, LOG_INFO, LOC + "VDPAU display preempted");
384  m_preempted = true;
385 }
386 
388 {
389  return m_preempted;
390 }
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:59
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: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:7
MythVDPAUInterop::m_colourSpace
MythVideoColourSpace * m_colourSpace
Definition: mythvdpauinterop.h:53
Frame
Definition: zmdefines.h:93
MythInteropGPU::GL_VDPAU
@ GL_VDPAU
Definition: mythinteropgpu.h:34
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:1081
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:54
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:44
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:60
MythCodecID
MythCodecID
Definition: mythcodecid.h:10
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:225
MythPlayerUI
Definition: mythplayerui.h:10
mythvideocolourspace.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
kScan_Progressive
@ kScan_Progressive
Definition: videoouttypes.h:100
DUMMY_INTEROP_ID
#define DUMMY_INTEROP_ID
Definition: mythinteropgpu.h:18
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:65
MythVDPAUHelper::IsValid
bool IsValid(void) const
Definition: mythvdpauhelper.cpp:317
MythVDPAUInterop::m_codec
MythCodecID m_codec
Definition: mythvdpauinterop.h:68
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
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
MythRenderOpenGL
Definition: mythrenderopengl.h:100
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:58
MythOpenGLInterop::DeleteTextures
virtual void DeleteTextures()
Definition: mythopenglinterop.cpp:137
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::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:63
MythVDPAUInterop::m_mixer
VdpVideoMixer m_mixer
Definition: mythvdpauinterop.h:57
MythVDPAUInterop::IsPreempted
bool IsPreempted(void) const
Definition: mythvdpauinterop.cpp:387
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:368
Player
Definition: zmliveplayer.h:34
MythVideoFrame
Definition: mythframe.h:88
MythVDPAUInterop::m_preempted
bool m_preempted
Definition: mythvdpauinterop.h:69
DEINT_BASIC
@ DEINT_BASIC
Definition: mythframe.h:70
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:101
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:377
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:25
FMT_RGBA32
@ FMT_RGBA32
Definition: mythframe.h:35
OpenGLLocker
Definition: mythrenderopengl.h:263
MythVDPAUInterop::InitVDPAU
bool InitVDPAU(AVVDPAUDeviceContext *DeviceContext, VdpVideoSurface Surface, MythDeintType Deint, bool DoubleRate)
Definition: mythvdpauinterop.cpp:151