MythTV  master
mythvaapiglxinterop.cpp
Go to the documentation of this file.
1 // MythTV
2 #include "mythvideoout.h"
3 #include "mythvaapiglxinterop.h"
4 
5 #define LOC QString("VAAPIGLX: ")
6 
8  : MythVAAPIInterop(Context, InteropType)
9 {
10 }
11 
13 {
14  delete [] m_vaapiPictureAttributes;
15 }
16 
18 {
19  uint flags = VA_FRAME_PICTURE;
20  if (!Frame)
21  return flags;
22 
23  // Set deinterlacing flags if VPP is not available
24  if (m_deinterlacer)
25  {
26  flags = VA_FRAME_PICTURE;
27  }
28  else if (is_interlaced(Scan))
29  {
30  // As for VDPAU, only VAAPI can deinterlace these frames - so accept any deinterlacer
31  bool doublerate = true;
32  MythDeintType driverdeint = Frame->GetDoubleRateOption(DEINT_DRIVER | DEINT_CPU | DEINT_SHADER);
33  if (!driverdeint)
34  {
35  doublerate = false;
36  driverdeint = Frame->GetSingleRateOption(DEINT_DRIVER | DEINT_CPU | DEINT_SHADER);
37  }
38 
39  if (driverdeint)
40  {
41  driverdeint = DEINT_BASIC;
42  if (m_basicDeinterlacer != driverdeint)
43  {
44  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Enabled deinterlacer '%1'")
45  .arg(MythVideoFrame::DeinterlacerName(driverdeint | DEINT_DRIVER, doublerate, FMT_VAAPI)));
46  }
47 
48  bool top = Frame->m_interlacedReverse ? !Frame->m_topFieldFirst : Frame->m_topFieldFirst;
49  if (Scan == kScan_Interlaced)
50  {
51  Frame->m_deinterlaceInuse = driverdeint | DEINT_DRIVER;
52  Frame->m_deinterlaceInuse2x = doublerate;
53  flags = top ? VA_TOP_FIELD : VA_BOTTOM_FIELD;
54  }
55  else if (Scan == kScan_Intr2ndField)
56  {
57  Frame->m_deinterlaceInuse = driverdeint | DEINT_DRIVER;
58  Frame->m_deinterlaceInuse2x = doublerate;
59  flags = top ? VA_BOTTOM_FIELD : VA_TOP_FIELD;
60  }
61  m_basicDeinterlacer = driverdeint;
62  }
63  else if (m_basicDeinterlacer)
64  {
65  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Disabled basic VAAPI deinterlacer");
67  }
68  }
69 
70  // Update colourspace
71  if (!m_vaapiColourSpace)
72  {
73  switch (Frame->m_colorspace)
74  {
75  case AVCOL_SPC_BT709: m_vaapiColourSpace = VA_SRC_BT709; break;
76  case AVCOL_SPC_SMPTE170M:
77  case AVCOL_SPC_BT470BG: m_vaapiColourSpace = VA_SRC_BT601; break;
78  case AVCOL_SPC_SMPTE240M: m_vaapiColourSpace = VA_SRC_SMPTE_240; break;
79  default:
80  m_vaapiColourSpace = ((Frame->m_width < 1280) ? VA_SRC_BT601 : VA_SRC_BT709); break;
81  }
82  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Using '%1' VAAPI colourspace")
83  .arg((m_vaapiColourSpace == VA_SRC_BT709) ? "bt709" : ((m_vaapiColourSpace == VA_SRC_BT601) ? "bt601" : "smpte240")));
84  }
85  flags |= m_vaapiColourSpace;
86  return flags;
87 }
88 
90 {
92  if (!ColourSpace || !m_vaDisplay)
93  return;
94 
95  OpenGLLocker locker(m_context);
96 
97  delete [] m_vaapiPictureAttributes;
99  int supported_controls = kPictureAttributeSupported_None;
100  QVector<VADisplayAttribute> supported;
101  int num = vaMaxNumDisplayAttributes(m_vaDisplay);
102  auto* attribs = new VADisplayAttribute[static_cast<unsigned int>(num)];
103 
104  int actual = 0;
105  INIT_ST;
106  va_status = vaQueryDisplayAttributes(m_vaDisplay, attribs, &actual);
107  CHECK_ST;
108 
109  for (int i = 0; i < actual; i++)
110  {
111  int type = attribs[i].type;
112  if ((attribs[i].flags & VA_DISPLAY_ATTRIB_SETTABLE) &&
113  (type == VADisplayAttribBrightness ||
114  type == VADisplayAttribContrast ||
115  type == VADisplayAttribHue ||
116  type == VADisplayAttribSaturation ||
117  type == VADisplayAttribCSCMatrix))
118  {
119  supported.push_back(attribs[i]);
120  if (type == VADisplayAttribBrightness)
121  supported_controls += kPictureAttributeSupported_Brightness;
122  if (type == VADisplayAttribHue)
123  supported_controls += kPictureAttributeSupported_Hue;
124  if (type == VADisplayAttribContrast)
125  supported_controls += kPictureAttributeSupported_Contrast;
126  if (type == VADisplayAttribSaturation)
127  supported_controls += kPictureAttributeSupported_Colour;
128  }
129  }
130 
131  // Set the supported attributes
132  ColourSpace->SetSupportedAttributes(static_cast<PictureAttributeSupported>(supported_controls));
133  // and listen for changes
135 
136  // create
137  delete [] attribs;
138 
139  if (supported.isEmpty())
140  return;
141 
142  m_vaapiPictureAttributeCount = supported.size();
143  m_vaapiPictureAttributes = new VADisplayAttribute[static_cast<unsigned int>(m_vaapiPictureAttributeCount)];
144  for (int i = 0; i < m_vaapiPictureAttributeCount; i++)
145  m_vaapiPictureAttributes[i] = supported.at(i);
146 
147  if (supported_controls & kPictureAttributeSupported_Brightness)
149  if (supported_controls & kPictureAttributeSupported_Hue)
151  if (supported_controls & kPictureAttributeSupported_Contrast)
153  if (supported_controls & kPictureAttributeSupported_Colour)
155 }
156 
158 {
159  if (!m_vaDisplay)
160  return -1;
161 
162  int adjustment = 0;
163  VADisplayAttribType attrib = VADisplayAttribBrightness;
164  switch (Attribute)
165  {
167  attrib = VADisplayAttribBrightness;
168  break;
170  attrib = VADisplayAttribContrast;
171  break;
173  attrib = VADisplayAttribHue;
174  adjustment = 50;
175  break;
177  attrib = VADisplayAttribSaturation;
178  break;
179  default:
180  return -1;
181  }
182 
183  bool found = false;
184  for (int i = 0; i < m_vaapiPictureAttributeCount; i++)
185  {
186  if (m_vaapiPictureAttributes[i].type == attrib)
187  {
188  Value = std::min(std::max(Value, 0), 100);
189  int newval = Value + adjustment;
190  if (newval > 100) newval -= 100;
191  qreal range = (m_vaapiPictureAttributes[i].max_value - m_vaapiPictureAttributes[i].min_value) / 100.0;
192  int val = m_vaapiPictureAttributes[i].min_value + qRound(newval * range);
193  m_vaapiPictureAttributes[i].value = val;
194  found = true;
195  break;
196  }
197  }
198 
199 
200  if (found)
201  {
203  INIT_ST;
204  va_status = vaSetDisplayAttributes(m_vaDisplay,
207  CHECK_ST;
209  return Value;
210  }
211  return -1;
212 }
213 
215  : MythVAAPIInteropGLX(Context, VAAPIGLXCOPY)
216 {
217  Display *display = glXGetCurrentDisplay();
218  if (!display)
219  {
220  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to open GLX display");
221  return;
222  }
223 
224  m_vaDisplay = vaGetDisplayGLX(display);
225  if (!m_vaDisplay)
226  {
227  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to create GLX VADisplay");
228  return;
229  }
231 }
232 
234 {
235  if (m_glxSurface && m_vaDisplay)
236  {
237  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Deleting GLX surface");
238  OpenGLLocker locker(m_context);
239  INIT_ST;
240  va_status = vaDestroySurfaceGLX(m_vaDisplay, m_glxSurface);
241  CHECK_ST;
242  }
243 }
244 
246  MythVideoColourSpace *ColourSpace,
248  FrameScanType Scan)
249 {
250  std::vector<MythVideoTexture*> result;
251  if (!Frame)
252  return result;
253 
254  // Retrieve the VASurface
255  VASurfaceID id = VerifySurface(Context, Frame);
256  if (!id || !m_vaDisplay)
257  return result;
258 
259  // Initialise colourspace on first frame
260  if (ColourSpace && m_openglTextures.isEmpty())
261  InitPictureAttributes(ColourSpace);
262 
263  // Lock
264  OpenGLLocker locker(m_context);
265 
266  // we only ever use one glx surface which is updated on each call
267  if (m_openglTextures.isEmpty())
268  {
269  // create a texture
270  // N.B. No apparent 10/12/16bit support here. Can't encourage vaCreateSurfaceGLX
271  // to work with a 16bit texture
273  if (!texture)
274  return result;
275 
276  texture->m_plane = 0;
277  texture->m_planeCount = 1;
278  texture->m_frameType = FMT_VAAPI;
279  texture->m_frameFormat = FMT_RGBA32;
280 
281  // create an associated GLX surface
282  INIT_ST;
283  va_status = vaCreateSurfaceGLX(m_vaDisplay, texture->m_texture->target(),
284  texture->m_texture->textureId(), &m_glxSurface);
285  CHECK_ST;
286  if (!m_glxSurface)
287  {
288  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to create GLX surface.");
290  return result;
291  }
292 
293  result.push_back(texture);
294  m_openglTextures.insert(DUMMY_INTEROP_ID, result);
295  }
296 
297  if (m_openglTextures.isEmpty() || !m_glxSurface)
298  return result;
300 
301  // VPP deinterlacing
302  id = Deinterlace(Frame, id, Scan);
303 
304  // Copy surface to texture
305  INIT_ST;
306  va_status = vaCopySurfaceGLX(m_vaDisplay, m_glxSurface, id, GetFlagsForFrame(Frame, Scan));
307  CHECK_ST;
308  return result;
309 }
310 
312  : MythVAAPIInteropGLX(Context, VAAPIGLXPIX)
313 {
314  m_vaDisplay = vaGetDisplay(glXGetCurrentDisplay());
315  if (!m_vaDisplay)
316  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to create X11 VADisplay");
317  else
319  InitPixmaps();
320 }
321 
323 {
324  OpenGLLocker locker(m_context);
325  Display* display = glXGetCurrentDisplay();
326  if (!InitPixmaps() || !display)
327  return;
328 
329  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Deleting GLX Pixmaps");
330  if (m_glxPixmap)
331  {
332  m_glxReleaseTexImageEXT(display, m_glxPixmap, GLX_FRONT_EXT);
333  XSync(display, False);
334  glXDestroyPixmap(display, m_glxPixmap);
335  }
336 
337  if (m_pixmap)
338  XFreePixmap(display, m_pixmap);
339 }
340 
342  MythVideoColourSpace *ColourSpace,
344  FrameScanType Scan)
345 {
346  std::vector<MythVideoTexture*> result;
347  if (!Frame)
348  return result;
349 
350  // Retrieve the VASurface
351  VASurfaceID id = VerifySurface(Context, Frame);
352  if (!id || !m_vaDisplay)
353  return result;
354 
355  // Initialise colourspace on first frame
356  if (ColourSpace && m_openglTextures.isEmpty())
357  InitPictureAttributes(ColourSpace);
358 
359  // Lock
360  OpenGLLocker locker(m_context);
361  if (!InitPixmaps())
362  return result;
363 
364  // we only ever use one pixmap which is updated on each call
365  if (m_openglTextures.isEmpty())
366  {
367  // Get display
368  Display* display = glXGetCurrentDisplay();
369  if (!display)
370  return result;
371 
372  // Get a framebuffer config
373  const std::array<const int,23> fbattribs {
374  GLX_RENDER_TYPE, GLX_RGBA_BIT,
375  GLX_X_RENDERABLE, True,
376  GLX_BIND_TO_TEXTURE_RGBA_EXT, True,
377  GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT,
378  GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT,
379  GLX_Y_INVERTED_EXT, True,
380  GLX_DOUBLEBUFFER, False,
381  GLX_RED_SIZE, 8,
382  GLX_GREEN_SIZE, 8,
383  GLX_BLUE_SIZE, 8,
384  GLX_ALPHA_SIZE, 8,
385  None };
386  int fbcount = 0;
387  GLXFBConfig *fbs = glXChooseFBConfig(display, DefaultScreen(display), fbattribs.data(), &fbcount);
388  if (!fbcount)
389  {
390  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to retrieve GLX framebuffer config");
391  return result;
392  }
393 
394  GLXFBConfig fbconfig = fbs[0];
395  XFree(fbs);
396 
397  // create pixmaps
398  uint width = static_cast<uint>(m_openglTextureSize.width());
399  uint height = static_cast<uint>(m_openglTextureSize.height());
400  XWindowAttributes xwattribs;
401  XGetWindowAttributes(display, DefaultRootWindow(display), &xwattribs);
402  m_pixmap = XCreatePixmap(display, DefaultRootWindow(display),
403  width, height, static_cast<uint>(xwattribs.depth));
404  if (!m_pixmap)
405  {
406  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to create Pixmap");
407  return result;
408  }
409 
410  const std::array<const int,7> attribs {
411  GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
412  GLX_TEXTURE_FORMAT_EXT, xwattribs.depth == 32 ? GLX_TEXTURE_FORMAT_RGBA_EXT : GLX_TEXTURE_FORMAT_RGB_EXT,
413  GLX_MIPMAP_TEXTURE_EXT, False, None};
414 
415  m_glxPixmap = glXCreatePixmap(display, fbconfig, m_pixmap, attribs.data());
416  if (!m_glxPixmap)
417  {
418  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to create GLXPixmap");
419  return result;
420  }
421 
422  // Create a texture
423  // N.B. as for GLX Copy there is no obvious 10/12/16bit support here.
424  // too many unknowns in this pipeline
425  std::vector<QSize> size;
426  size.push_back(m_openglTextureSize);
427  std::vector<MythVideoTexture*> textures = MythVideoTexture::CreateTextures(m_context, FMT_VAAPI, FMT_RGBA32, size);
428  if (textures.empty())
429  return result;
430  result.push_back(textures[0]);
431  m_openglTextures.insert(DUMMY_INTEROP_ID, result);
432  }
433 
434  if (m_openglTextures.isEmpty() || !m_glxPixmap || !m_pixmap)
435  return result;
437 
438  // VPP deinterlacing
439  id = Deinterlace(Frame, id, Scan);
440 
441  // Copy the surface to the texture
442  INIT_ST;
443  va_status = vaSyncSurface(m_vaDisplay, id);
444  CHECK_ST;
445  auto width = static_cast<unsigned short>(m_openglTextureSize.width());
446  auto height = static_cast<unsigned short>(m_openglTextureSize.height());
447  va_status = vaPutSurface(m_vaDisplay, id, m_pixmap,
448  0, 0, width, height, 0, 0, width, height,
449  nullptr, 0, GetFlagsForFrame(Frame, Scan));
450  CHECK_ST;
451 
452  Display* glxdisplay = glXGetCurrentDisplay();
453  if (glxdisplay)
454  {
455  XSync(glxdisplay, False);
456  m_context->glBindTexture(QOpenGLTexture::Target2D, result[0]->m_textureId);
457  m_glxBindTexImageEXT(glxdisplay, m_glxPixmap, GLX_FRONT_EXT, nullptr);
458  m_context->glBindTexture(QOpenGLTexture::Target2D, 0);
459  }
460  return result;
461 }
462 
464 {
466  return true;
467 
468  OpenGLLocker locker(m_context);
469  m_glxBindTexImageEXT = reinterpret_cast<MYTH_GLXBINDTEXIMAGEEXT>(glXGetProcAddressARB(reinterpret_cast<const GLubyte*>("glXBindTexImageEXT")));
470  m_glxReleaseTexImageEXT = reinterpret_cast<MYTH_GLXRELEASETEXIMAGEEXT>(glXGetProcAddressARB(reinterpret_cast<const GLubyte*>("glXReleaseTexImageEXT")));
472  {
473  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to resolve 'texture_from_pixmap' functions");
474  return false;
475  }
476  return true;
477 }
478 
480 {
481  if (!Context)
482  return false;
483 
484  OpenGLLocker locker(Context);
485  Display* display = glXGetCurrentDisplay();
486  if (!display)
487  return false;
488  int screen = DefaultScreen(display);
489  QByteArray extensions(glXQueryExtensionsString(display, screen));
490  return extensions.contains("GLX_EXT_texture_from_pixmap");
491 }
DEINT_DRIVER
@ DEINT_DRIVER
Definition: mythframe.h:70
INIT_ST
#define INIT_ST
Definition: mythvdpauhelper.cpp:12
MythVideoColourSpace::PictureAttributeChanged
void PictureAttributeChanged(PictureAttribute Attribute, int Value)
PictureAttributeSupported
PictureAttributeSupported
Definition: videoouttypes.h:117
MythVAAPIInterop::m_deinterlacer
MythDeintType m_deinterlacer
Definition: mythvaapiinterop.h:66
mythvideoout.h
MythGLTexture::m_texture
QOpenGLTexture * m_texture
Definition: mythrenderopengl.h:66
kPictureAttributeSupported_Colour
@ kPictureAttributeSupported_Colour
Definition: videoouttypes.h:121
MythVideoTexture::CreateTextures
static std::vector< MythVideoTexture * > 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: mythvideotexture.cpp:57
MythVideoTexture::m_frameType
VideoFrameType m_frameType
Definition: mythvideotexture.h:48
MythVAAPIInteropGLXCopy::MythVAAPIInteropGLXCopy
MythVAAPIInteropGLXCopy(MythRenderOpenGL *Context)
Definition: mythvaapiglxinterop.cpp:214
MythVideoTexture::DeleteTexture
static void DeleteTexture(MythRenderOpenGL *Context, MythVideoTexture *Texture)
Definition: mythvideotexture.cpp:17
DEINT_SHADER
@ DEINT_SHADER
Definition: mythframe.h:69
MythVAAPIInteropGLXPixmap::m_pixmap
Pixmap m_pixmap
Definition: mythvaapiglxinterop.h:61
MYTH_GLXRELEASETEXIMAGEEXT
void(*)(Display *, GLXDrawable, int) MYTH_GLXRELEASETEXIMAGEEXT
Definition: mythvaapiglxinterop.h:45
MYTH_GLXBINDTEXIMAGEEXT
void(*)(Display *, GLXDrawable, int, int *) MYTH_GLXBINDTEXIMAGEEXT
Definition: mythvaapiglxinterop.h:44
Frame
Definition: zmdefines.h:94
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:64
MythVAAPIInteropGLXPixmap::Acquire
vector< MythVideoTexture * > Acquire(MythRenderOpenGL *Context, MythVideoColourSpace *ColourSpace, MythVideoFrame *Frame, FrameScanType Scan) override
Definition: mythvaapiglxinterop.cpp:341
arg
arg(title).arg(filename).arg(doDelete))
kPictureAttribute_Contrast
@ kPictureAttribute_Contrast
Definition: videoouttypes.h:108
FrameScanType
FrameScanType
Definition: videoouttypes.h:95
Context
QHash< QString, Action * > Context
Definition: action.h:77
MythVideoColourSpace::SetSupportedAttributes
void SetSupportedAttributes(PictureAttributeSupported Supported)
Enable the given set of picture attributes.
Definition: mythvideocolourspace.cpp:122
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
DUMMY_INTEROP_ID
#define DUMMY_INTEROP_ID
Definition: mythopenglinterop.h:21
MythVAAPIInterop::InitaliseDisplay
void InitaliseDisplay(void)
Definition: mythvaapiinterop.cpp:101
kPictureAttributeSupported_None
@ kPictureAttributeSupported_None
Definition: videoouttypes.h:118
MythVAAPIInteropGLXPixmap::m_glxPixmap
GLXPixmap m_glxPixmap
Definition: mythvaapiglxinterop.h:62
kPictureAttributeSupported_Brightness
@ kPictureAttributeSupported_Brightness
Definition: videoouttypes.h:119
DEINT_CPU
@ DEINT_CPU
Definition: mythframe.h:68
MythVAAPIInterop
Definition: mythvaapiinterop.h:37
MythVAAPIInteropGLXPixmap::m_glxReleaseTexImageEXT
MYTH_GLXRELEASETEXIMAGEEXT m_glxReleaseTexImageEXT
Definition: mythvaapiglxinterop.h:64
kPictureAttributeSupported_Contrast
@ kPictureAttributeSupported_Contrast
Definition: videoouttypes.h:120
mythvaapiglxinterop.h
MythVideoColourSpace::GetPictureAttribute
int GetPictureAttribute(PictureAttribute Attribute)
Definition: mythvideocolourspace.cpp:128
kScan_Intr2ndField
@ kScan_Intr2ndField
Definition: videoouttypes.h:99
CHECK_ST
#define CHECK_ST
Definition: mythvdpauhelper.cpp:16
LOC
#define LOC
Definition: mythvaapiglxinterop.cpp:5
MythVAAPIInteropGLX::m_vaapiPictureAttributeCount
int m_vaapiPictureAttributeCount
Definition: mythvaapiglxinterop.h:24
MythVAAPIInteropGLX::~MythVAAPIInteropGLX
~MythVAAPIInteropGLX() override
Definition: mythvaapiglxinterop.cpp:12
MythVAAPIInteropGLX::m_vaapiColourSpace
uint m_vaapiColourSpace
Definition: mythvaapiglxinterop.h:25
MythRenderOpenGL::makeCurrent
void makeCurrent()
Definition: mythrenderopengl.cpp:564
MythVAAPIInteropGLXPixmap::m_glxBindTexImageEXT
MYTH_GLXBINDTEXIMAGEEXT m_glxBindTexImageEXT
Definition: mythvaapiglxinterop.h:63
kPictureAttribute_Brightness
@ kPictureAttribute_Brightness
Definition: videoouttypes.h:107
MythVAAPIInteropGLX::m_vaapiPictureAttributes
VADisplayAttribute * m_vaapiPictureAttributes
Definition: mythvaapiglxinterop.h:23
uint
unsigned int uint
Definition: compat.h:141
MythOpenGLInterop::m_context
MythRenderOpenGL * m_context
Definition: mythopenglinterop.h:73
MythVAAPIInteropGLX::InitPictureAttributes
void InitPictureAttributes(MythVideoColourSpace *ColourSpace)
Definition: mythvaapiglxinterop.cpp:89
MythVideoTexture::CreateTexture
static MythVideoTexture * CreateTexture(MythRenderOpenGL *Context, QSize Size, GLenum Target=QOpenGLTexture::Target2D, QOpenGLTexture::PixelType PixelType=QOpenGLTexture::UInt8, QOpenGLTexture::PixelFormat PixelFormat=QOpenGLTexture::RGBA, QOpenGLTexture::TextureFormat Format=QOpenGLTexture::NoFormat, QOpenGLTexture::Filter Filter=QOpenGLTexture::Linear, QOpenGLTexture::WrapMode Wrap=QOpenGLTexture::ClampToEdge)
Create and initialise a MythVideoTexture that is backed by a QOpenGLTexture.
Definition: mythvideotexture.cpp:432
MythOpenGLInterop::Type
Type
Definition: mythopenglinterop.h:30
MythVAAPIInterop::VerifySurface
VASurfaceID VerifySurface(MythRenderOpenGL *Context, MythVideoFrame *Frame)
Definition: mythvaapiinterop.cpp:137
PictureAttribute
PictureAttribute
Definition: videoouttypes.h:104
MythVAAPIInteropGLXCopy::m_glxSurface
void * m_glxSurface
Definition: mythvaapiglxinterop.h:39
MythRenderOpenGL::doneCurrent
void doneCurrent()
Definition: mythrenderopengl.cpp:572
MythVAAPIInteropGLX::MythVAAPIInteropGLX
MythVAAPIInteropGLX(MythRenderOpenGL *Context, Type InteropType)
Definition: mythvaapiglxinterop.cpp:7
MythRenderOpenGL
Definition: mythrenderopengl.h:99
MythVAAPIInteropGLXPixmap::~MythVAAPIInteropGLXPixmap
~MythVAAPIInteropGLXPixmap() override
Definition: mythvaapiglxinterop.cpp:322
MythDeintType
MythDeintType
Definition: mythframe.h:63
MythVideoTexture::m_frameFormat
VideoFrameType m_frameFormat
Definition: mythvideotexture.h:49
MythVAAPIInteropGLX::GetFlagsForFrame
uint GetFlagsForFrame(MythVideoFrame *Frame, FrameScanType Scan)
Definition: mythvaapiglxinterop.cpp:17
kScan_Interlaced
@ kScan_Interlaced
Definition: videoouttypes.h:98
MythVAAPIInteropGLXPixmap::InitPixmaps
bool InitPixmaps(void)
Definition: mythvaapiglxinterop.cpp:463
MythVAAPIInteropGLXPixmap::IsSupported
static bool IsSupported(MythRenderOpenGL *Context)
Definition: mythvaapiglxinterop.cpp:479
MythVideoFrame::DeinterlacerName
static QString DeinterlacerName(MythDeintType Deint, bool DoubleRate, VideoFrameType Format=FMT_NONE)
Definition: mythframe.cpp:457
MythVideoTexture::m_plane
uint m_plane
Definition: mythvideotexture.h:50
kPictureAttributeSupported_Hue
@ kPictureAttributeSupported_Hue
Definition: videoouttypes.h:122
FMT_VAAPI
@ FMT_VAAPI
Definition: mythframe.h:53
MythVideoTexture::m_planeCount
uint m_planeCount
Definition: mythvideotexture.h:51
MythVAAPIInterop::Deinterlace
VASurfaceID Deinterlace(MythVideoFrame *Frame, VASurfaceID Current, FrameScanType Scan)
Definition: mythvaapiinterop.cpp:296
MythVAAPIInteropGLX::SetPictureAttribute
int SetPictureAttribute(PictureAttribute Attribute, int Value)
Definition: mythvaapiglxinterop.cpp:157
MythVideoFrame
Definition: mythframe.h:83
DEINT_BASIC
@ DEINT_BASIC
Definition: mythframe.h:65
MythOpenGLInterop::m_openglTextures
QHash< unsigned long long, vector< MythVideoTexture * > > m_openglTextures
Definition: mythopenglinterop.h:75
MythVideoTexture
Definition: mythvideotexture.h:20
MythVAAPIInteropGLXCopy::Acquire
vector< MythVideoTexture * > Acquire(MythRenderOpenGL *Context, MythVideoColourSpace *ColourSpace, MythVideoFrame *Frame, FrameScanType Scan) override
Definition: mythvaapiglxinterop.cpp:245
MythVAAPIInteropGLX
Definition: mythvaapiglxinterop.h:8
is_interlaced
bool is_interlaced(FrameScanType Scan)
Definition: videoouttypes.h:188
MythVAAPIInteropGLXPixmap::MythVAAPIInteropGLXPixmap
MythVAAPIInteropGLXPixmap(MythRenderOpenGL *Context)
Definition: mythvaapiglxinterop.cpp:311
MythOpenGLInterop::m_openglTextureSize
QSize m_openglTextureSize
Definition: mythopenglinterop.h:76
MythVAAPIInteropGLXCopy::~MythVAAPIInteropGLXCopy
~MythVAAPIInteropGLXCopy() override
Definition: mythvaapiglxinterop.cpp:233
kPictureAttribute_Hue
@ kPictureAttribute_Hue
Definition: videoouttypes.h:110
MythVideoColourSpace
MythVideoColourSpace contains a QMatrix4x4 that can convert YCbCr data to RGB.
Definition: mythvideocolourspace.h:21
MythVAAPIInterop::m_vaDisplay
VADisplay m_vaDisplay
Definition: mythvaapiinterop.h:63
MythVAAPIInteropGLX::m_basicDeinterlacer
MythDeintType m_basicDeinterlacer
Definition: mythvaapiglxinterop.h:26
FMT_RGBA32
@ FMT_RGBA32
Definition: mythframe.h:30
kPictureAttribute_Colour
@ kPictureAttribute_Colour
Definition: videoouttypes.h:109
OpenGLLocker
Definition: mythrenderopengl.h:255