MythTV master
mythframe.cpp
Go to the documentation of this file.
1// C++ headers
2#include <algorithm>
3
4// MythTV
6#include "mythframe.h"
7
8#include "mythvideoprofile.h"
9
10// FFmpeg - for av_malloc/av_free
11extern "C" {
12#include "libavcodec/avcodec.h"
13}
14
15#define LOC QString("VideoFrame: ")
16
27{
29 LOG(VB_GENERAL, LOG_ERR, LOC + "Frame still contains a hardware buffer!");
30 else if (m_buffer)
31 av_freep(reinterpret_cast<void*>(&m_buffer));
32}
33
34MythVideoFrame::MythVideoFrame(VideoFrameType Type, int Width, int Height, const VideoFrameTypes* RenderFormats)
35{
36 Init(Type, Width, Height, (RenderFormats == nullptr) ? &kDefaultRenderFormats : RenderFormats);
37}
38
39MythVideoFrame::MythVideoFrame(VideoFrameType Type, uint8_t* Buffer, size_t BufferSize,
40 int Width, int Height, const VideoFrameTypes* RenderFormats, int Alignment)
41{
42 const VideoFrameTypes* formats = (RenderFormats == nullptr) ? &kDefaultRenderFormats : RenderFormats;
43 Init(Type, Buffer, BufferSize, Width, Height, formats, Alignment);
44}
45
46void MythVideoFrame::Init(VideoFrameType Type, int Width, int Height, const VideoFrameTypes* RenderFormats)
47{
48 size_t newsize = 0;
49 uint8_t* newbuffer = nullptr;
50 if ((Width > 0 && Height > 0) && (Type != FMT_NONE) && !HardwareFormat(Type))
51 {
52 newsize = GetBufferSize(Type, Width, Height);
53 bool reallocate = (Width != m_width) || (Height != m_height) || (newsize != m_bufferSize) || (Type != m_type);
54 newbuffer = reallocate ? GetAlignedBuffer(newsize) : m_buffer;
55 newsize = reallocate ? newsize : m_bufferSize;
56 }
57 Init(Type, newbuffer, newsize, Width, Height, (RenderFormats == nullptr) ? &kDefaultRenderFormats : RenderFormats);
58}
59
60void MythVideoFrame::Init(VideoFrameType Type, uint8_t *Buffer, size_t BufferSize,
61 int Width, int Height, const VideoFrameTypes* RenderFormats, int Alignment)
62{
64 {
65 LOG(VB_GENERAL, LOG_ERR, LOC + "Trying to reinitialise a hardware frame. Ignoring");
66 return;
67 }
68
69 if (std::ranges::any_of(std::as_const(m_priv), [](const uint8_t* P) { return P != nullptr; }))
70 {
71 LOG(VB_GENERAL, LOG_ERR, LOC + "Priv buffers are set (hardware frame?). Ignoring Init");
72 return;
73 }
74
75 if ((Buffer && !BufferSize) || (!Buffer && BufferSize))
76 {
77 LOG(VB_GENERAL, LOG_ERR, LOC + "Inconsistent frame buffer data");
78 return;
79 }
80
81 if (m_buffer && (m_buffer != Buffer))
82 {
83 LOG(VB_GENERAL, LOG_DEBUG, LOC + "Deleting old frame buffer");
84 av_freep(reinterpret_cast<void*>(&m_buffer));
85 }
86
87 m_type = Type;
90 m_bufferSize = BufferSize;
91 m_width = Width;
92 m_height = Height;
93 m_renderFormats = (RenderFormats == nullptr) ? &kDefaultRenderFormats : RenderFormats;
94
96
98 return;
99
100 int alignedwidth = Alignment > 0 ? (m_width + Alignment - 1) & ~(Alignment - 1) : m_width;
101 int alignedheight = (m_height + MYTH_HEIGHT_ALIGNMENT - 1) & ~(MYTH_HEIGHT_ALIGNMENT -1);
102
103 for (uint i = 0; i < 3; ++i)
104 m_pitches[i] = GetPitchForPlane(m_type, alignedwidth, i);
105
106 m_offsets[0] = 0;
107 if (FMT_YV12 == m_type)
108 {
109 m_offsets[1] = alignedwidth * alignedheight;
110 m_offsets[2] = m_offsets[1] + (((alignedwidth + 1) >> 1) * ((alignedheight+1) >> 1));
111 }
112 else if (FormatIs420(m_type))
113 {
114 m_offsets[1] = (alignedwidth << 1) * alignedheight;
115 m_offsets[2] = m_offsets[1] + (alignedwidth * (alignedheight >> 1));
116 }
117 else if (FMT_YUV422P == m_type)
118 {
119 m_offsets[1] = alignedwidth * alignedheight;
120 m_offsets[2] = m_offsets[1] + (((alignedwidth + 1) >> 1) * alignedheight);
121 }
122 else if (FormatIs422(m_type))
123 {
124 m_offsets[1] = (alignedwidth << 1) * alignedheight;
125 m_offsets[2] = m_offsets[1] + (alignedwidth * alignedheight);
126 }
127 else if (FMT_YUV444P == m_type)
128 {
129 m_offsets[1] = alignedwidth * alignedheight;
130 m_offsets[2] = m_offsets[1] + (alignedwidth * alignedheight);
131 }
132 else if (FormatIs444(m_type))
133 {
134 m_offsets[1] = (alignedwidth << 1) * alignedheight;
135 m_offsets[2] = m_offsets[1] + ((alignedwidth << 1) * alignedheight);
136 }
137 else if (FMT_NV12 == m_type)
138 {
139 m_offsets[1] = alignedwidth * alignedheight;
140 m_offsets[2] = 0;
141 }
142 else if (FormatIsNV12(m_type))
143 {
144 m_offsets[1] = (alignedwidth << 1) * alignedheight;
145 m_offsets[2] = 0;
146 }
147 else
148 {
149 m_offsets[1] = m_offsets[2] = 0;
150 }
151}
152
154{
155 m_aspect = -1.0F;
156 m_frameRate = -1.0 ;
157 m_frameNumber = 0;
158 m_frameCounter = 0;
159 m_timecode = 0ms;
160 m_displayTimecode = 0ms;
161 m_priv = { nullptr };
162 m_interlaced = false;
163 m_topFieldFirst = true;
164 m_interlacedReverse = false;
165 m_newGOP = false;
166 m_repeatPic = false;
167 m_forceKey = false;
168 m_dummy = false;
169 m_pauseFrame = false;
170 m_pitches = { 0 };
171 m_offsets = { 0 };
172 m_pixFmt = 0;
173 m_swPixFmt = 0;
174 m_directRendering = true;
175 m_colorspace = 1;
176 m_colorrange = 1;
178 m_colortransfer = 1;
180 m_colorshifted = false;
181 m_alreadyDeinterlaced = false;
182 m_rotation = 0;
183 m_stereo3D = 0;
184 m_hdrMetadata = nullptr;
189 m_deinterlaceInuse2x = false;
190}
191
192void MythVideoFrame::CopyPlane(uint8_t *To, int ToPitch, const uint8_t *From, int FromPitch,
193 int PlaneWidth, int PlaneHeight)
194{
195 if ((ToPitch == PlaneWidth) && (FromPitch == PlaneWidth))
196 {
197 memcpy(To, From, static_cast<size_t>(PlaneWidth) * PlaneHeight);
198 return;
199 }
200
201 for (int y = 0; y < PlaneHeight; y++)
202 {
203 memcpy(To, From, static_cast<size_t>(PlaneWidth));
204 From += FromPitch;
205 To += ToPitch;
206 }
207}
208
210{
211 if (!m_buffer)
212 return;
213
215 {
216 LOG(VB_GENERAL, LOG_ERR, LOC + "Cannot clear a hardware frame");
217 return;
218 }
219
220 // luma (or RGBA)
221 int uv_height = GetHeightForPlane(m_type, m_height, 1);
222 int uv = (1 << (ColorDepth(m_type) - 1)) - 1;
224 {
225 memset(m_buffer + m_offsets[0], 0, static_cast<size_t>(m_pitches[0]) * m_height);
226 memset(m_buffer + m_offsets[1], uv & 0xff, static_cast<size_t>(m_pitches[1]) * uv_height);
227 memset(m_buffer + m_offsets[2], uv & 0xff, static_cast<size_t>(m_pitches[2]) * uv_height);
228 }
230 (m_pitches[1] == m_pitches[2]))
231 {
232 memset(m_buffer + m_offsets[0], 0, static_cast<size_t>(m_pitches[0]) * m_height);
233 unsigned char uv1 = (uv & 0xff00) >> 8;
234 unsigned char uv2 = (uv & 0x00ff);
235 unsigned char* buf1 = m_buffer + m_offsets[1];
236 unsigned char* buf2 = m_buffer + m_offsets[2];
237 for (int row = 0; row < uv_height; ++row)
238 {
239 for (int col = 0; col < m_pitches[1]; col += 2)
240 {
241 buf1[col] = buf2[col] = uv1;
242 buf1[col + 1] = buf2[col + 1] = uv2;
243 }
244 buf1 += m_pitches[1];
245 buf2 += m_pitches[2];
246 }
247 }
248 else if (FMT_NV12 == m_type)
249 {
250 memset(m_buffer + m_offsets[0], 0, static_cast<size_t>(m_pitches[0]) * m_height);
251 memset(m_buffer + m_offsets[1], uv & 0xff, static_cast<size_t>(m_pitches[1]) * uv_height);
252 }
253 else if (FormatIsNV12(m_type))
254 {
255 memset(m_buffer + m_offsets[0], 0, static_cast<size_t>(m_pitches[0]) * m_height);
256 unsigned char uv1 = (uv & 0xff00) >> 8;
257 unsigned char uv2 = (uv & 0x00ff);
258 unsigned char* buf3 = m_buffer + m_offsets[1];
259 for (int row = 0; row < uv_height; ++row)
260 {
261 for (int col = 0; col < m_pitches[1]; col += 4)
262 {
263 buf3[col] = buf3[col + 2] = uv1;
264 buf3[col + 1] = buf3[col + 3] = uv2;
265 }
266 buf3 += m_pitches[1];
267 }
268 }
269 else if (PackedFormat(m_type))
270 {
271 // TODO
272 }
273 else
274 {
275 memset(m_buffer, 0, m_bufferSize);
276 }
277}
278
280{
281 // Sanity checks
282 if (!From || (this == From))
283 return false;
284
285 if (m_type != From->m_type)
286 {
287 LOG(VB_GENERAL, LOG_ERR, "Cannot copy frames of differing types");
288 return false;
289 }
290
291 if (From->m_type == FMT_NONE || HardwareFormat(From->m_type))
292 {
293 LOG(VB_GENERAL, LOG_ERR, "Invalid frame format");
294 return false;
295 }
296
297 if ((m_width <= 0) || (m_height <= 0) ||
298 (m_width != From->m_width) || (m_height != From->m_height))
299 {
300 LOG(VB_GENERAL, LOG_ERR, "Invalid frame sizes");
301 return false;
302 }
303
304 if (!m_buffer || !From->m_buffer || (m_buffer == From->m_buffer))
305 {
306 LOG(VB_GENERAL, LOG_ERR, "Invalid frames for copying");
307 return false;
308 }
309
310 // N.B. Minimum based on zero width alignment but will apply height alignment
311 size_t minsize = GetBufferSize(m_type, m_width, m_height, 0);
312 if ((m_bufferSize < minsize) || (From->m_bufferSize < minsize))
313 {
314 LOG(VB_GENERAL, LOG_ERR, "Invalid buffer size");
315 return false;
316 }
317
318 // We have 2 frames of the same valid size and format, they are not hardware frames
319 // and both have buffers reported to satisfy a minimal size.
320
321 // Copy data
322 uint count = GetNumPlanes(From->m_type);
323 for (uint plane = 0; plane < count; plane++)
324 {
325 CopyPlane(m_buffer + m_offsets[plane], m_pitches[plane],
326 From->m_buffer + From->m_offsets[plane], From->m_pitches[plane],
327 GetPitchForPlane(From->m_type, From->m_width, plane),
328 GetHeightForPlane(From->m_type, From->m_height, plane));
329 }
330
331 // Copy metadata
332 // Not copied: codec, width, height - should already be the same
333 // Not copied: buf, size, pitches, offsets - should/could be different
334 // Not copied: priv - hardware frames only
335 m_aspect = From->m_aspect;
336 m_frameRate = From->m_frameRate;
340 m_timecode = From->m_timecode;
345 m_newGOP = From->m_newGOP;
346 m_repeatPic = From->m_repeatPic;
347 m_forceKey = From->m_forceKey;
348 m_dummy = From->m_dummy;
350 m_pixFmt = From->m_pixFmt;
351 m_swPixFmt = From->m_swPixFmt;
360 m_rotation = From->m_rotation;
361 m_stereo3D = From->m_stereo3D;
368
369 return true;
370}
371
373{
374 switch (Type)
375 {
376 case FMT_NONE: return "None";
377 case FMT_RGB24: return "RGB24";
378 case FMT_YV12: return "YUV420P";
379 case FMT_RGB32: return "RGB32";
380 case FMT_ARGB32: return "ARGB32";
381 case FMT_RGBA32: return "RGBA32";
382 case FMT_YUV422P: return "YUV422P";
383 case FMT_BGRA: return "BGRA";
384 case FMT_YUY2: return "YUY2";
385 case FMT_NV12: return "NV12";
386 case FMT_P010: return "P010";
387 case FMT_P016: return "P016";
388 case FMT_YUV420P9: return "YUV420P9";
389 case FMT_YUV420P10: return "YUV420P10";
390 case FMT_YUV420P12: return "YUV420P12";
391 case FMT_YUV420P14: return "YUV420P14";
392 case FMT_YUV420P16: return "YUV420P16";
393 case FMT_YUV422P9: return "YUV422P9";
394 case FMT_YUV422P10: return "YUV422P10";
395 case FMT_YUV422P12: return "YUV422P12";
396 case FMT_YUV422P14: return "YUV422P14";
397 case FMT_YUV422P16: return "YUV422P16";
398 case FMT_YUV444P: return "YUV444P";
399 case FMT_YUV444P9: return "YUV444P9";
400 case FMT_YUV444P10: return "YUV444P10";
401 case FMT_YUV444P12: return "YUV444P12";
402 case FMT_YUV444P14: return "YUV444P14";
403 case FMT_YUV444P16: return "YUV444P16";
404 case FMT_VDPAU: return "VDPAU";
405 case FMT_VAAPI: return "VAAPI";
406 case FMT_DXVA2: return "DXVA2";
407 case FMT_MMAL: return "MMAL";
408 case FMT_MEDIACODEC: return "MediaCodec";
409 case FMT_VTB: return "VideoToolBox";
410 case FMT_NVDEC: return "NVDec";
411 case FMT_DRMPRIME: return "DRM-PRIME";
412 }
413 return "?";
414}
415
416size_t MythVideoFrame::GetBufferSize(VideoFrameType Type, int Width, int Height, int Aligned)
417{
418 // bits per pixel div common factor
419 int bpp = BitsPerPixel(Type) / 4;
420 // bits per byte div common factor
421 int bpb = 8 / 4;
422
423 // Align height and width. We always align height to 16 rows and the *default*
424 // width alignment is 64bytes, which allows SIMD operations on subsampled
425 // planes (i.e. 32byte alignment)
426 int adj_w = Aligned ? ((Width + Aligned - 1) & ~(Aligned - 1)) : Width;
427 int adj_h = (Height + MYTH_HEIGHT_ALIGNMENT - 1) & ~(MYTH_HEIGHT_ALIGNMENT - 1);
428
429 // Calculate rounding as necessary.
430 int remainder = (adj_w * adj_h * bpp) % bpb;
431 return static_cast<uint>(((adj_w * adj_h * bpp) / bpb) + (remainder ? 1 : 0));
432}
433
435{
436 return static_cast<uint8_t*>(av_malloc(Size + 64));
437}
438
439uint8_t *MythVideoFrame::CreateBuffer(VideoFrameType Type, int Width, int Height)
440{
441 size_t size = GetBufferSize(Type, Width, Height);
442 return GetAlignedBuffer(size);
443}
444
446{
448 if (options & Type)
449 return GetDeinterlacer(options);
450 return DEINT_NONE;
451}
452
454{
456 if (options & Type)
457 return GetDeinterlacer(options);
458 return DEINT_NONE;
459}
460
462{
463 return Option & (DEINT_BASIC | DEINT_MEDIUM | DEINT_HIGH);
464}
465
467{
468 MythDeintType deint = GetDeinterlacer(Deint);
469 QString result = DoubleRate ? "2x " : "";
470 if (Deint & DEINT_CPU)
471 {
472 result += "CPU ";
473 switch (deint)
474 {
475 case DEINT_HIGH: return result + "Yadif";
476 case DEINT_MEDIUM: return result + "Linearblend";
477 case DEINT_BASIC: return result + "Onefield";
478 default: break;
479 }
480 }
481 else if (Deint & DEINT_SHADER)
482 {
483 result += "GLSL ";
484 switch (deint)
485 {
486 case DEINT_HIGH: return result + "Kernel";
487 case DEINT_MEDIUM: return result + "Linearblend";
488 case DEINT_BASIC: return result + "Onefield";
489 default: break;
490 }
491 }
492 else if (Deint & DEINT_DRIVER)
493 {
494 switch (Format)
495 {
496 case FMT_MEDIACODEC: return "MediaCodec";
497 case FMT_DRMPRIME: return result + "EGL Onefield";
498 case FMT_VDPAU:
499 result += "VDPAU ";
500 switch (deint)
501 {
502 case DEINT_HIGH: return result + "Advanced";
503 case DEINT_MEDIUM: return result + "Temporal";
504 case DEINT_BASIC: return result + "Basic";
505 default: break;
506 }
507 break;
508 case FMT_NVDEC:
509 result += "NVDec ";
510 switch (deint)
511 {
512 case DEINT_HIGH:
513 case DEINT_MEDIUM: return result + "Adaptive";
514 case DEINT_BASIC: return result + "Basic";
515 default: break;
516 }
517 break;
518 case FMT_VAAPI:
519 result += "VAAPI ";
520 switch (deint)
521 {
522 case DEINT_HIGH: return result + "Compensated";
523 case DEINT_MEDIUM: return result + "Adaptive";
524 case DEINT_BASIC: return result + "Basic";
525 default: break;
526 }
527 break;
528 default: break;
529 }
530 }
531 return "None";
532}
533
535{
536 if (DEINT_NONE == Deint)
537 return {"None"};
538 QString result;
539 if (Deint & DEINT_BASIC) result = "Basic";
540 else if (Deint & DEINT_MEDIUM) result = "Medium";
541 else if (Deint & DEINT_HIGH) result = "High";
542 if (Deint & DEINT_CPU) result += "|CPU";
543 if (Deint & DEINT_SHADER) result += "|GLSL";
544 if (Deint & DEINT_DRIVER) result += "|DRIVER";
545 return result;
546}
547
549{
550 MythDeintType result = DEINT_NONE;
551
552 if (Deinterlacer.contains(DEINT_QUALITY_HIGH))
553 result = DEINT_HIGH;
554 else if (Deinterlacer.contains(DEINT_QUALITY_MEDIUM))
555 result = DEINT_MEDIUM;
556 else if (Deinterlacer.contains(DEINT_QUALITY_LOW))
557 result = DEINT_BASIC;
558
559 if (result != DEINT_NONE)
560 {
561 result = result | DEINT_CPU; // NB always assumed
562 if (Deinterlacer.contains(DEINT_QUALITY_SHADER))
563 result = result | DEINT_SHADER;
564 if (Deinterlacer.contains(DEINT_QUALITY_DRIVER))
565 result = result | DEINT_DRIVER;
566 }
567
568 return result;
569}
static const std::array< const std::string, 8 > formats
long long m_frameNumber
Definition: mythframe.h:128
static bool PackedFormat(VideoFrameType Type)
Definition: mythframe.h:460
std::chrono::milliseconds m_displayTimecode
Definition: mythframe.h:131
VideoFrameType m_type
Definition: mythframe.h:118
int m_chromalocation
Definition: mythframe.h:151
bool m_colorshifted
Definition: mythframe.h:152
static size_t GetBufferSize(VideoFrameType Type, int Width, int Height, int Aligned=MYTH_WIDTH_ALIGNMENT)
Definition: mythframe.cpp:416
static bool FormatIs422(VideoFrameType Type)
Definition: mythframe.h:443
static uint GetNumPlanes(VideoFrameType Type)
Definition: mythframe.h:213
MythVideoFrame()=default
static int GetPitchForPlane(VideoFrameType Type, int Width, uint Plane)
Definition: mythframe.h:303
bool m_interlaced
Definition: mythframe.h:133
bool m_interlacedReverse
Definition: mythframe.h:135
bool CopyFrame(MythVideoFrame *From)
Definition: mythframe.cpp:279
static QString DeinterlacerName(MythDeintType Deint, bool DoubleRate, VideoFrameType Format=FMT_NONE)
Definition: mythframe.cpp:466
static bool FormatIsNV12(VideoFrameType Type)
Definition: mythframe.h:455
MythDeintType GetDoubleRateOption(MythDeintType Type, MythDeintType Override=DEINT_NONE) const
Definition: mythframe.cpp:453
int m_colorprimaries
Definition: mythframe.h:149
static QString FormatDescription(VideoFrameType Type)
Definition: mythframe.cpp:372
static uint8_t * CreateBuffer(VideoFrameType Type, int Width, int Height)
Definition: mythframe.cpp:439
void ClearMetadata()
Definition: mythframe.cpp:153
size_t m_bufferSize
Definition: mythframe.h:123
MythDeintType m_deinterlaceAllowed
Definition: mythframe.h:159
bool m_deinterlaceInuse2x
Definition: mythframe.h:161
static bool FormatIs444(VideoFrameType Type)
Definition: mythframe.h:449
static bool FormatIs420(VideoFrameType Type)
Definition: mythframe.h:437
MythHDRVideoPtr m_hdrMetadata
Definition: mythframe.h:156
const VideoFrameTypes * m_renderFormats
Definition: mythframe.h:146
static QString DeinterlacerPref(MythDeintType Deint)
Definition: mythframe.cpp:534
static int GetHeightForPlane(VideoFrameType Type, int Height, uint Plane)
Definition: mythframe.h:257
int m_colortransfer
Definition: mythframe.h:150
bool m_pauseFrame
Definition: mythframe.h:140
int m_bitsPerPixel
Definition: mythframe.h:122
void Init(VideoFrameType Type, int Width, int Height, const VideoFrameTypes *RenderFormats=nullptr)
Definition: mythframe.cpp:46
bool m_directRendering
Definition: mythframe.h:145
static const VideoFrameTypes kDefaultRenderFormats
Definition: mythframe.h:90
uint64_t m_frameCounter
Definition: mythframe.h:129
static MythDeintType ParseDeinterlacer(const QString &Deinterlacer)
Definition: mythframe.cpp:548
MythDeintType GetSingleRateOption(MythDeintType Type, MythDeintType Override=DEINT_NONE) const
Definition: mythframe.cpp:445
std::chrono::milliseconds m_timecode
Definition: mythframe.h:130
FramePitches m_pitches
Definition: mythframe.h:141
uint8_t * m_buffer
Definition: mythframe.h:119
static MythDeintType GetDeinterlacer(MythDeintType Option)
Definition: mythframe.cpp:461
std::array< uint8_t *, 4 > m_priv
Definition: mythframe.h:132
bool m_topFieldFirst
Definition: mythframe.h:134
MythDeintType m_deinterlaceSingle
Definition: mythframe.h:157
static uint8_t * GetAlignedBuffer(size_t Size)
Definition: mythframe.cpp:434
bool m_alreadyDeinterlaced
Definition: mythframe.h:153
float m_aspect
Definition: mythframe.h:126
static void CopyPlane(uint8_t *To, int ToPitch, const uint8_t *From, int FromPitch, int PlaneWidth, int PlaneHeight)
Definition: mythframe.cpp:192
MythDeintType m_deinterlaceDouble
Definition: mythframe.h:158
MythDeintType m_deinterlaceInuse
Definition: mythframe.h:160
static int ColorDepth(int Format)
Definition: mythframe.h:398
static bool HardwareFormat(VideoFrameType Type)
Definition: mythframe.h:424
void ClearBufferToBlank()
Definition: mythframe.cpp:209
double m_frameRate
Definition: mythframe.h:127
static int BitsPerPixel(VideoFrameType Type)
Definition: mythframe.h:169
bool m_repeatPic
Definition: mythframe.h:137
FrameOffsets m_offsets
Definition: mythframe.h:142
unsigned int uint
Definition: compat.h:60
#define LOC
Definition: mythframe.cpp:15
MythDeintType
Definition: mythframe.h:67
@ DEINT_HIGH
Definition: mythframe.h:71
@ DEINT_DRIVER
Definition: mythframe.h:74
@ DEINT_MEDIUM
Definition: mythframe.h:70
@ DEINT_BASIC
Definition: mythframe.h:69
@ DEINT_NONE
Definition: mythframe.h:68
@ DEINT_SHADER
Definition: mythframe.h:73
@ DEINT_CPU
Definition: mythframe.h:72
std::vector< VideoFrameType > VideoFrameTypes
Definition: mythframe.h:82
VideoFrameType
Definition: mythframe.h:20
@ FMT_RGB32
endian dependent format, ARGB or BGRA
Definition: mythframe.h:32
@ FMT_YUV420P9
Definition: mythframe.h:24
@ FMT_RGBA32
Definition: mythframe.h:34
@ FMT_YUV444P
Definition: mythframe.h:43
@ FMT_YUV420P14
Definition: mythframe.h:27
@ FMT_VAAPI
Definition: mythframe.h:57
@ FMT_YUV420P12
Definition: mythframe.h:26
@ FMT_VTB
Definition: mythframe.h:61
@ FMT_YUV422P10
Definition: mythframe.h:38
@ FMT_YUV444P16
Definition: mythframe.h:48
@ FMT_YUV422P9
Definition: mythframe.h:37
@ FMT_YUV422P14
Definition: mythframe.h:40
@ FMT_ARGB32
Definition: mythframe.h:33
@ FMT_YV12
Definition: mythframe.h:23
@ FMT_P016
Definition: mythframe.h:54
@ FMT_DRMPRIME
Definition: mythframe.h:63
@ FMT_RGB24
Definition: mythframe.h:30
@ FMT_VDPAU
Definition: mythframe.h:56
@ FMT_YUV444P12
Definition: mythframe.h:46
@ FMT_YUV444P9
Definition: mythframe.h:44
@ FMT_NONE
Definition: mythframe.h:21
@ FMT_YUV444P10
Definition: mythframe.h:45
@ FMT_NVDEC
Definition: mythframe.h:62
@ FMT_YUV422P
Definition: mythframe.h:36
@ FMT_YUV422P16
Definition: mythframe.h:41
@ FMT_YUV420P10
Definition: mythframe.h:25
@ FMT_YUV420P16
Definition: mythframe.h:28
@ FMT_P010
Definition: mythframe.h:53
@ FMT_NV12
Definition: mythframe.h:52
@ FMT_MMAL
Definition: mythframe.h:59
@ FMT_DXVA2
Definition: mythframe.h:58
@ FMT_YUY2
Definition: mythframe.h:50
@ FMT_YUV444P14
Definition: mythframe.h:47
@ FMT_BGRA
Definition: mythframe.h:31
@ FMT_YUV422P12
Definition: mythframe.h:39
@ FMT_MEDIACODEC
Definition: mythframe.h:60
static constexpr uint8_t MYTH_HEIGHT_ALIGNMENT
Definition: mythframe.h:17
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
static constexpr const char * DEINT_QUALITY_MEDIUM
static constexpr const char * DEINT_QUALITY_HIGH
static constexpr const char * DEINT_QUALITY_SHADER
static constexpr const char * DEINT_QUALITY_LOW
static constexpr const char * DEINT_QUALITY_DRIVER