MythTV  master
mythvaapiinterop.cpp
Go to the documentation of this file.
1 // MythTV
2 #include "libmyth/mythavframe.h"
3 
4 #ifdef USING_DRM_VIDEO
6 #endif
7 
8 #include "mythvideoout.h"
9 #include "mythplayerui.h"
10 #include "mythvideocolourspace.h"
11 #include "fourcc.h"
12 #include "mythvaapiinterop.h"
13 #include "mythvaapidrminterop.h"
14 #include "mythvaapiglxinterop.h"
15 
16 extern "C" {
17 #include "libavfilter/buffersrc.h"
18 #include "libavfilter/buffersink.h"
19 #include "libavutil/hwcontext_vaapi.h"
20 }
21 
22 #define LOC QString("VAAPIInterop: ")
23 
41 {
42  if (!Context)
43  return;
44 
45  OpenGLLocker locker(Context);
46  bool egl = Context->IsEGL();
47  bool opengles = Context->isOpenGLES();
48  bool wayland = qgetenv("XDG_SESSION_TYPE").contains("wayland");
49 
50  // best first
52 
53 #ifdef USING_DRM_VIDEO
55  vaapitypes.emplace_back(DRM_DRMPRIME);
56 #endif
57 
58 #ifdef USING_EGL
59  // zero copy
60  if (egl && MythVAAPIInteropDRM::IsSupported(Context))
61  vaapitypes.emplace_back(GL_VAAPIEGLDRM);
62 #endif
63  // 1x copy
64  if (!egl && !wayland && MythVAAPIInteropGLXPixmap::IsSupported(Context))
65  vaapitypes.emplace_back(GL_VAAPIGLXPIX);
66  // 2x copy
67  if (!egl && !opengles && !wayland)
68  vaapitypes.emplace_back(GL_VAAPIGLXCOPY);
69 
70  if (!vaapitypes.empty())
71  Types[FMT_VAAPI] = vaapitypes;
72 }
73 
75 {
76  if (!(Player && Context))
77  return nullptr;
78 
79  const auto & types = Player->GetInteropTypes();
80  if (const auto & vaapi = types.find(FMT_VAAPI); vaapi != types.cend())
81  {
82  for (auto type : vaapi->second)
83  {
84 #ifdef USING_EGL
85  if ((type == GL_VAAPIEGLDRM) || (type == DRM_DRMPRIME))
86  return new MythVAAPIInteropDRM(Player, Context, type);
87 #endif
88  if (type == GL_VAAPIGLXPIX)
89  return new MythVAAPIInteropGLXPixmap(Player, Context);
90  if (type == GL_VAAPIGLXCOPY)
91  return new MythVAAPIInteropGLXCopy(Player, Context);
92  }
93  }
94  return nullptr;
95 }
96 
105  : MythOpenGLInterop(Context, Type, Player)
106 {
107 }
108 
110 {
112  if (m_vaDisplay)
113  if (vaTerminate(m_vaDisplay) != VA_STATUS_SUCCESS)
114  LOG(VB_GENERAL, LOG_WARNING, LOC + "Error closing VAAPI display");
115 }
116 
118 {
119  return m_vaDisplay;
120 }
121 
123 {
124  return m_vaVendor;
125 }
126 
128 {
129  if (!m_vaDisplay)
130  return;
131  int major = 0;
132  int minor = 0;
133  if (vaInitialize(m_vaDisplay, &major, &minor) != VA_STATUS_SUCCESS)
134  {
135  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to initialise VAAPI display");
136  vaTerminate(m_vaDisplay);
137  m_vaDisplay = nullptr;
138  }
139  else
140  {
141  m_vaVendor = vaQueryVendorString(m_vaDisplay);
142  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Created VAAPI %1.%2 display for %3 (%4)")
143  .arg(major).arg(minor).arg(TypeToString(m_type), m_vaVendor));
144  }
145 }
146 
148 {
149  if (m_filterGraph)
150  LOG(VB_GENERAL, LOG_INFO, LOC + "Destroying VAAPI deinterlacer");
151  avfilter_graph_free(&m_filterGraph);
152  m_filterGraph = nullptr;
153  m_filterSink = nullptr;
154  m_filterSource = nullptr;
156  m_deinterlacer2x = false;
157  m_firstField = true;
160  av_buffer_unref(&m_vppFramesContext);
161 }
162 
164 {
165  VASurfaceID result = 0;
166  if (!Frame)
167  return result;
168 
169  if ((Frame->m_pixFmt != AV_PIX_FMT_VAAPI) || (Frame->m_type != FMT_VAAPI) ||
170  !Frame->m_buffer || !Frame->m_priv[1])
171  return result;
172 
173  // Sanity check the context
174  if (m_openglContext != Context)
175  {
176  LOG(VB_GENERAL, LOG_ERR, LOC + "Mismatched OpenGL contexts!");
177  return result;
178  }
179 
180  // Check size
181  QSize surfacesize(Frame->m_width, Frame->m_height);
182  if (m_textureSize != surfacesize)
183  {
184  if (!m_textureSize.isEmpty())
185  LOG(VB_GENERAL, LOG_WARNING, LOC + "Video texture size changed!");
186  m_textureSize = surfacesize;
187  }
188 
189  // Retrieve surface
190  auto id = static_cast<VASurfaceID>(reinterpret_cast<uintptr_t>(Frame->m_buffer));
191  if (id)
192  result = id;
193  return result;
194 }
195 
196 bool MythVAAPIInterop::SetupDeinterlacer(MythDeintType Deinterlacer, bool DoubleRate,
197  AVBufferRef *FramesContext,
198  int Width, int Height,
199  // Outputs
200  AVFilterGraph *&Graph,
201  AVFilterContext *&Source,
202  AVFilterContext *&Sink)
203 {
204  if (!FramesContext)
205  {
206  LOG(VB_GENERAL, LOG_ERR, LOC + "No hardware frames context");
207  return false;
208  }
209 
210  int ret = 0;
211  QString args;
212  QString deinterlacer = "bob";
213  if (DEINT_MEDIUM == Deinterlacer)
214  deinterlacer = "motion_adaptive";
215  else if (DEINT_HIGH == Deinterlacer)
216  deinterlacer = "motion_compensated";
217 
218  // N.B. set auto to 0 otherwise we confuse playback if VAAPI does not deinterlace
219  QString filters = QString("deinterlace_vaapi=mode=%1:rate=%2:auto=0")
220  .arg(deinterlacer, DoubleRate ? "field" : "frame");
221  const AVFilter *buffersrc = avfilter_get_by_name("buffer");
222  const AVFilter *buffersink = avfilter_get_by_name("buffersink");
223  AVFilterInOut *outputs = avfilter_inout_alloc();
224  AVFilterInOut *inputs = avfilter_inout_alloc();
225  AVBufferSrcParameters* params = nullptr;
226 
227  Graph = avfilter_graph_alloc();
228  if (!outputs || !inputs || !Graph)
229  {
230  ret = AVERROR(ENOMEM);
231  goto end;
232  }
233 
234  /* buffer video source: the decoded frames from the decoder will be inserted here. */
235  args = QString("video_size=%1x%2:pix_fmt=%3:time_base=1/1")
236  .arg(Width).arg(Height).arg(AV_PIX_FMT_VAAPI);
237 
238  ret = avfilter_graph_create_filter(&Source, buffersrc, "in",
239  args.toLocal8Bit().constData(), nullptr, Graph);
240  if (ret < 0)
241  {
242  LOG(VB_GENERAL, LOG_ERR, LOC + "avfilter_graph_create_filter failed for buffer source");
243  goto end;
244  }
245 
246  params = av_buffersrc_parameters_alloc();
247  params->hw_frames_ctx = FramesContext;
248  ret = av_buffersrc_parameters_set(Source, params);
249 
250  if (ret < 0)
251  {
252  LOG(VB_GENERAL, LOG_ERR, LOC + "av_buffersrc_parameters_set failed");
253  goto end;
254  }
255  av_freep(reinterpret_cast<void*>(&params));
256 
257  /* buffer video sink: to terminate the filter chain. */
258  ret = avfilter_graph_create_filter(&Sink, buffersink, "out",
259  nullptr, nullptr, Graph);
260  if (ret < 0)
261  {
262  LOG(VB_GENERAL, LOG_ERR, LOC + "avfilter_graph_create_filter failed for buffer sink");
263  goto end;
264  }
265 
266  /*
267  * Set the endpoints for the filter graph. The filter_graph will
268  * be linked to the graph described by filters_descr.
269  */
270 
271  /*
272  * The buffer source output must be connected to the input pad of
273  * the first filter described by filters_descr; since the first
274  * filter input label is not specified, it is set to "in" by
275  * default.
276  */
277  outputs->name = av_strdup("in");
278  outputs->filter_ctx = Source;
279  outputs->pad_idx = 0;
280  outputs->next = nullptr;
281 
282  /*
283  * The buffer sink input must be connected to the output pad of
284  * the last filter described by filters_descr; since the last
285  * filter output label is not specified, it is set to "out" by
286  * default.
287  */
288  inputs->name = av_strdup("out");
289  inputs->filter_ctx = Sink;
290  inputs->pad_idx = 0;
291  inputs->next = nullptr;
292 
293  ret = avfilter_graph_parse_ptr(Graph, filters.toLocal8Bit(),
294  &inputs, &outputs, nullptr);
295  if (ret < 0)
296  {
297  LOG(VB_GENERAL, LOG_ERR, LOC + QString("avfilter_graph_parse_ptr failed for %1")
298  .arg(filters));
299  goto end;
300  }
301 
302  ret = avfilter_graph_config(Graph, nullptr);
303  if (ret < 0)
304  {
305  LOG(VB_GENERAL, LOG_ERR, LOC +
306  QString("VAAPI deinterlacer config failed - '%1' unsupported?").arg(deinterlacer));
307  goto end;
308  }
309 
310  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Created deinterlacer '%1'")
311  .arg(MythVideoFrame::DeinterlacerName(Deinterlacer | DEINT_DRIVER, DoubleRate, FMT_VAAPI)));
312 
313 end:
314  if (ret < 0)
315  {
316  avfilter_graph_free(&Graph);
317  Graph = nullptr;
318  }
319  avfilter_inout_free(&inputs);
320  avfilter_inout_free(&outputs);
321  return ret >= 0;
322 }
323 
324 VASurfaceID MythVAAPIInterop::Deinterlace(MythVideoFrame *Frame, VASurfaceID Current, FrameScanType Scan)
325 {
326  VASurfaceID result = Current;
327  if (!Frame)
328  return result;
329 
330  while (!m_filterError && is_interlaced(Scan))
331  {
332  // N.B. for DRM the use of a shader deint is checked before we get here
333  MythDeintType deinterlacer = DEINT_NONE;
334  bool doublerate = true;
335  // no CPU or GLSL deinterlacing so pick up these options as well
336  // N.B. Override deinterlacer_allowed to pick up any preference
337  MythDeintType doublepref = Frame->GetDoubleRateOption(DEINT_DRIVER | DEINT_SHADER | DEINT_CPU, DEINT_ALL);
338  MythDeintType singlepref = Frame->GetSingleRateOption(DEINT_DRIVER | DEINT_SHADER | DEINT_CPU, DEINT_ALL);
339 
340  if (doublepref)
341  {
342  deinterlacer = doublepref;
343  }
344  else if (singlepref)
345  {
346  deinterlacer = singlepref;
347  doublerate = false;
348  }
349 
350  if ((m_deinterlacer == deinterlacer) && (m_deinterlacer2x == doublerate))
351  break;
352 
354 
355  if (deinterlacer != DEINT_NONE)
356  {
357  auto* frames = reinterpret_cast<AVBufferRef*>(Frame->m_priv[1]);
358  if (!frames)
359  break;
360 
361  AVBufferRef* hwdeviceref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_VAAPI);
362  if (!hwdeviceref)
363  break;
364 
365  auto* hwdevicecontext = reinterpret_cast<AVHWDeviceContext*>(hwdeviceref->data);
366  hwdevicecontext->free = [](AVHWDeviceContext* /*unused*/) { LOG(VB_PLAYBACK, LOG_INFO, LOC + "VAAPI VPP device context finished"); };
367 
368  auto *vaapidevicectx = reinterpret_cast<AVVAAPIDeviceContext*>(hwdevicecontext->hwctx);
369  vaapidevicectx->display = m_vaDisplay; // re-use the existing display
370 
371  if (av_hwdevice_ctx_init(hwdeviceref) < 0)
372  {
373  av_buffer_unref(&hwdeviceref);
374  m_filterError = true;
375  break;
376  }
377 
378  AVBufferRef *newframes = av_hwframe_ctx_alloc(hwdeviceref);
379  if (!newframes)
380  {
381  m_filterError = true;
382  av_buffer_unref(&hwdeviceref);
383  break;
384  }
385 
386  auto* dstframes = reinterpret_cast<AVHWFramesContext*>(newframes->data);
387  auto* srcframes = reinterpret_cast<AVHWFramesContext*>(frames->data);
388 
389  m_filterWidth = srcframes->width;
390  m_filterHeight = srcframes->height;
391  static constexpr int kVppPoolSize = 2; // seems to be enough
392  dstframes->sw_format = srcframes->sw_format;
393  dstframes->width = m_filterWidth;
394  dstframes->height = m_filterHeight;
395  dstframes->initial_pool_size = kVppPoolSize;
396  dstframes->format = AV_PIX_FMT_VAAPI;
397  dstframes->free = [](AVHWFramesContext* /*unused*/) { LOG(VB_PLAYBACK, LOG_INFO, LOC + "VAAPI VPP frames context finished"); };
398 
399  if (av_hwframe_ctx_init(newframes) < 0)
400  {
401  m_filterError = true;
402  av_buffer_unref(&hwdeviceref);
403  av_buffer_unref(&newframes);
404  break;
405  }
406 
407  m_vppFramesContext = newframes;
408  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("New VAAPI frame pool with %1 %2x%3 surfaces")
409  .arg(kVppPoolSize).arg(m_filterWidth).arg(m_filterHeight));
410  av_buffer_unref(&hwdeviceref);
411 
412  if (!MythVAAPIInterop::SetupDeinterlacer(deinterlacer, doublerate, m_vppFramesContext,
415  {
416  LOG(VB_GENERAL, LOG_ERR, LOC + QString("Failed to create VAAPI deinterlacer %1 - disabling")
417  .arg(MythVideoFrame::DeinterlacerName(deinterlacer | DEINT_DRIVER, doublerate, FMT_VAAPI)));
419  m_filterError = true;
420  }
421  else
422  {
423  m_deinterlacer = deinterlacer;
424  m_deinterlacer2x = doublerate;
426  break;
427  }
428  }
429  break;
430  }
431 
432  if (!is_interlaced(Scan) && m_deinterlacer)
434 
435  if (m_deinterlacer)
436  {
437  // deinterlacing the pause frame repeatedly is unnecessary and, due to the
438  // buffering in the VAAPI frames context, causes the image to 'jiggle' when using
439  // double rate deinterlacing. If we are confident this is a pause frame we have seen,
440  // return the last deinterlaced frame.
441  if (Frame->m_pauseFrame && m_lastFilteredFrame && (m_lastFilteredFrameCount == Frame->m_frameCounter))
442  return m_lastFilteredFrame;
443 
444  Frame->m_deinterlaceInuse = m_deinterlacer | DEINT_DRIVER;
445  Frame->m_deinterlaceInuse2x = m_deinterlacer2x;
446 
447  // 'pump' the filter with frames until it starts returning usefull output.
448  // This minimises discontinuities at start up (where we would otherwise
449  // show a couple of progressive frames first) and memory consumption for the DRM
450  // interop as we only cache OpenGL textures for the deinterlacer's frame
451  // pool.
452  int retries = 3;
453  while ((result == Current) && retries--)
454  {
455  while (true)
456  {
457  int ret = 0;
458  MythAVFrame sinkframe;
459  sinkframe->format = AV_PIX_FMT_VAAPI;
460 
461  // only ask for a frame if we are expecting another
463  {
464  ret = av_buffersink_get_frame(m_filterSink, sinkframe);
465  if (ret >= 0)
466  {
467  // we have a filtered frame
468  result = m_lastFilteredFrame = static_cast<VASurfaceID>(reinterpret_cast<uintptr_t>(sinkframe->data[3]));
469  m_lastFilteredFrameCount = Frame->m_frameCounter;
470  m_firstField = true;
471  break;
472  }
473  if (ret != AVERROR(EAGAIN))
474  break;
475  }
476 
477  // add another frame
478  MythAVFrame sourceframe;
479  sourceframe->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST;
480  if (Frame->m_interlacedReverse ^ Frame->m_topFieldFirst)
481  {
482  sourceframe->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
483  }
484  sourceframe->flags |= AV_FRAME_FLAG_INTERLACED;
485  sourceframe->data[3] = Frame->m_buffer;
486  auto* buffer = reinterpret_cast<AVBufferRef*>(Frame->m_priv[0]);
487  sourceframe->buf[0] = buffer ? av_buffer_ref(buffer) : nullptr;
488  sourceframe->width = m_filterWidth;
489  sourceframe->height = m_filterHeight;
490  sourceframe->format = AV_PIX_FMT_VAAPI;
491  // N.B. This is required after changes in FFmpeg. Using the vpp
492  // frames context doesn't seem correct - but using the 'master'
493  // context does not work
494  sourceframe->hw_frames_ctx = av_buffer_ref(m_vppFramesContext);
495  ret = av_buffersrc_add_frame(m_filterSource, sourceframe);
496  sourceframe->data[3] = nullptr;
497  sourceframe->buf[0] = nullptr;
498  if (ret < 0)
499  break;
500 
501  // try again
502  ret = av_buffersink_get_frame(m_filterSink, sinkframe);
503  if (ret >= 0)
504  {
505  // we have a filtered frame
506  result = m_lastFilteredFrame = static_cast<VASurfaceID>(reinterpret_cast<uintptr_t>(sinkframe->data[3]));
507  m_lastFilteredFrameCount = Frame->m_frameCounter;
508  m_firstField = false;
509  break;
510  }
511  break;
512  }
513  }
514  }
515  return result;
516 }
MythVAAPIInterop::m_vppFramesContext
AVBufferRef * m_vppFramesContext
Definition: mythvaapiinterop.h:79
MythVAAPIInterop::m_lastFilteredFrame
VASurfaceID m_lastFilteredFrame
Definition: mythvaapiinterop.h:86
MythVAAPIInterop::m_vaVendor
QString m_vaVendor
Definition: mythvaapiinterop.h:74
Source
static QString Source(const QNetworkRequest &request)
Definition: netstream.cpp:139
build_compdb.args
args
Definition: build_compdb.py:11
MythVAAPIInterop::m_filterSource
AVFilterContext * m_filterSource
Definition: mythvaapiinterop.h:81
mythvaapiinterop.h
MythVAAPIInterop::m_deinterlacer
MythDeintType m_deinterlacer
Definition: mythvaapiinterop.h:76
mythvideoout.h
MythInteropGPU::m_type
InteropType m_type
Definition: mythinteropgpu.h:67
mythplayerui.h
MythVAAPIInterop::GetVAAPITypes
static void GetVAAPITypes(MythRenderOpenGL *Context, MythInteropGPU::InteropMap &Types)
Return a list of interops that are supported by the current render device.
Definition: mythvaapiinterop.cpp:40
MythVAAPIInterop::MythVAAPIInterop
MythVAAPIInterop(MythPlayerUI *Player, MythRenderOpenGL *Context, InteropType Type)
Definition: mythvaapiinterop.cpp:104
MythVAAPIInterop::m_lastFilteredFrameCount
uint64_t m_lastFilteredFrameCount
Definition: mythvaapiinterop.h:87
Frame
Definition: zmdefines.h:102
MythAVFrame
MythAVFrame little utility class that act as a safe way to allocate an AVFrame which can then be allo...
Definition: mythavframe.h:26
MythVAAPIInterop::m_filterHeight
int m_filterHeight
Definition: mythvaapiinterop.h:85
types
static const struct wl_interface * types[]
Definition: idle_inhibit_unstable_v1.c:39
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
mythavframe.h
MythVAAPIInterop::SetupDeinterlacer
static bool SetupDeinterlacer(MythDeintType Deinterlacer, bool DoubleRate, AVBufferRef *FramesContext, int Width, int Height, AVFilterGraph *&Graph, AVFilterContext *&Source, AVFilterContext *&Sink)
Definition: mythvaapiinterop.cpp:196
MythVAAPIInterop::InitaliseDisplay
void InitaliseDisplay(void)
Definition: mythvaapiinterop.cpp:127
MythInteropGPU::TypeToString
static QString TypeToString(InteropType Type)
Definition: mythinteropgpu.cpp:22
MythVAAPIInterop::DestroyDeinterlacer
virtual void DestroyDeinterlacer(void)
Definition: mythvaapiinterop.cpp:147
MythDeintType
MythDeintType
Definition: mythframe.h:66
MythInteropGPU::InteropMap
std::map< VideoFrameType, InteropTypes > InteropMap
Definition: mythinteropgpu.h:44
MythVAAPIInterop
Definition: mythvaapiinterop.h:48
MythPlayerUI
Definition: mythplayerui.h:12
MythInteropGPU::GL_VAAPIEGLDRM
@ GL_VAAPIEGLDRM
Definition: mythinteropgpu.h:30
MythVAAPIInteropGLXCopy
Definition: mythvaapiglxinterop.h:29
mythvaapiglxinterop.h
MythInteropGPU::DRM_DRMPRIME
@ DRM_DRMPRIME
Definition: mythinteropgpu.h:38
mythvideocolourspace.h
MythVAAPIInterop::m_firstField
bool m_firstField
Definition: mythvaapiinterop.h:78
FMT_VAAPI
@ FMT_VAAPI
Definition: mythframe.h:57
minor
#define minor(X)
Definition: compat.h:78
MythOpenGLInterop
Definition: mythopenglinterop.h:17
MythVAAPIInterop::GetDisplay
VADisplay GetDisplay(void)
Definition: mythvaapiinterop.cpp:117
Source
Definition: channelsettings.cpp:93
MythOpenGLInterop::m_openglContext
MythRenderOpenGL * m_openglContext
Definition: mythopenglinterop.h:41
MythInteropGPU::InteropType
InteropType
Definition: mythinteropgpu.h:25
DEINT_ALL
@ DEINT_ALL
Definition: mythframe.h:75
mythdisplaydrm.h
DEINT_DRIVER
@ DEINT_DRIVER
Definition: mythframe.h:74
MythVAAPIInterop::CreateVAAPI
static MythVAAPIInterop * CreateVAAPI(MythPlayerUI *Player, MythRenderOpenGL *Context)
Definition: mythvaapiinterop.cpp:74
DEINT_SHADER
@ DEINT_SHADER
Definition: mythframe.h:73
MythVAAPIInterop::~MythVAAPIInterop
~MythVAAPIInterop() override
Definition: mythvaapiinterop.cpp:109
LOC
#define LOC
Definition: mythvaapiinterop.cpp:22
MythEGL::IsEGL
bool IsEGL(void)
Definition: mythegl.cpp:29
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:68
DEINT_HIGH
@ DEINT_HIGH
Definition: mythframe.h:71
DEINT_CPU
@ DEINT_CPU
Definition: mythframe.h:72
mythvaapidrminterop.h
MythVAAPIInterop::VerifySurface
VASurfaceID VerifySurface(MythRenderOpenGL *Context, MythVideoFrame *Frame)
Definition: mythvaapiinterop.cpp:163
MythVAAPIInterop::m_filterError
bool m_filterError
Definition: mythvaapiinterop.h:83
MythVAAPIInterop::m_deinterlacer2x
bool m_deinterlacer2x
Definition: mythvaapiinterop.h:77
MythVAAPIInterop::PostInitDeinterlacer
virtual void PostInitDeinterlacer(void)
Definition: mythvaapiinterop.h:70
DEINT_MEDIUM
@ DEINT_MEDIUM
Definition: mythframe.h:70
MythVAAPIInterop::m_filterGraph
AVFilterGraph * m_filterGraph
Definition: mythvaapiinterop.h:82
MythRenderOpenGL
Definition: mythrenderopengl.h:96
MythVAAPIInterop::m_filterSink
AVFilterContext * m_filterSink
Definition: mythvaapiinterop.h:80
MythVAAPIInteropGLXPixmap
Definition: mythvaapiglxinterop.h:49
MythDisplayDRM::DirectRenderingAvailable
static bool DirectRenderingAvailable()
Definition: mythdisplaydrm.cpp:17
MythVAAPIInteropDRM::IsSupported
static bool IsSupported(MythRenderOpenGL *Context)
Definition: mythvaapidrminterop.cpp:374
MythVAAPIInterop::GetVendor
QString GetVendor(void)
Definition: mythvaapiinterop.cpp:122
MythInteropGPU::GL_VAAPIGLXPIX
@ GL_VAAPIGLXPIX
Definition: mythinteropgpu.h:29
MythVAAPIInteropGLXPixmap::IsSupported
static bool IsSupported(MythRenderOpenGL *Context)
Definition: mythvaapiglxinterop.cpp:481
MythVideoFrame::DeinterlacerName
static QString DeinterlacerName(MythDeintType Deint, bool DoubleRate, VideoFrameType Format=FMT_NONE)
Definition: mythframe.cpp:462
MythVAAPIInterop::m_filterWidth
int m_filterWidth
Definition: mythvaapiinterop.h:84
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
MythVAAPIInterop::Deinterlace
VASurfaceID Deinterlace(MythVideoFrame *Frame, VASurfaceID Current, FrameScanType Scan)
Definition: mythvaapiinterop.cpp:324
Player
Definition: zmliveplayer.h:34
MythVideoFrame
Definition: mythframe.h:87
MythInteropGPU::GL_VAAPIGLXCOPY
@ GL_VAAPIGLXCOPY
Definition: mythinteropgpu.h:28
MythInteropGPU::m_textureSize
QSize m_textureSize
Definition: mythinteropgpu.h:62
is_interlaced
bool is_interlaced(FrameScanType Scan)
Definition: videoouttypes.h:188
MythVAAPIInterop::m_vaDisplay
VADisplay m_vaDisplay
Definition: mythvaapiinterop.h:73
MythVAAPIInteropDRM
Definition: mythvaapidrminterop.h:15
MythInteropGPU::InteropTypes
std::vector< InteropType > InteropTypes
Definition: mythinteropgpu.h:43
fourcc.h
OpenGLLocker
Definition: mythrenderopengl.h:255