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