MythTV  master
mythdeinterlacer.h
Go to the documentation of this file.
1 #ifndef MYTHDEINTERLACER_H
2 #define MYTHDEINTERLACER_H
3 
4 // MythTV
5 #include "videoouttypes.h"
6 #include "mythavutil.h"
7 
8 extern "C" {
9 #include "libavfilter/avfilter.h"
10 #include "libswscale/swscale.h"
11 }
12 
13 class MythVideoProfile;
14 
16 {
17  public:
18  MythDeinterlacer() = default;
20 
22  MythVideoProfile *Profile, bool Force = false);
23 
24  private:
25  Q_DISABLE_COPY(MythDeinterlacer)
26  bool Initialise (MythVideoFrame *Frame, MythDeintType Deinterlacer,
27  bool DoubleRate, bool TopFieldFirst,
28  MythVideoProfile *Profile);
29  inline void Cleanup ();
33 
35  AVPixelFormat m_inputFmt { AV_PIX_FMT_NONE };
36  int m_width { 0 };
37  int m_height { 0 };
39  bool m_doubleRate { false };
40  bool m_topFirst { true };
42  AVFilterGraph* m_graph { nullptr };
43  AVFilterContext* m_source { nullptr };
44  AVFilterContext* m_sink { nullptr };
45  MythVideoFrame* m_bobFrame { nullptr };
46  SwsContext* m_swsContext { nullptr };
47  uint64_t m_discontinuityCounter { 0 };
48  bool m_autoFieldOrder { false };
49  uint64_t m_lastFieldChange { 0 };
50  static bool s_haveSIMD;
51 };
52 
53 #endif
MythDeinterlacer::m_frame
MythAVFrame m_frame
Definition: mythdeinterlacer.h:41
MythDeinterlacer::m_swsContext
SwsContext * m_swsContext
Definition: mythdeinterlacer.h:46
MythDeinterlacer::m_discontinuityCounter
uint64_t m_discontinuityCounter
Definition: mythdeinterlacer.h:47
MythDeinterlacer::m_graph
AVFilterGraph * m_graph
Definition: mythdeinterlacer.h:42
MythDeinterlacer::m_width
int m_width
Definition: mythdeinterlacer.h:36
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
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:69
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
MythDeinterlacer::m_deintType
MythDeintType m_deintType
Definition: mythdeinterlacer.h:38
MythDeinterlacer::SetUpCache
bool SetUpCache(MythVideoFrame *Frame)
Definition: mythdeinterlacer.cpp:391
MythVideoProfile
Definition: mythvideoprofile.h:87
FMT_NONE
@ FMT_NONE
Definition: mythframe.h:22
MythDeinterlacer::OneField
void OneField(MythVideoFrame *Frame, FrameScanType Scan)
Definition: mythdeinterlacer.cpp:413
MythDeinterlacer::m_inputFmt
AVPixelFormat m_inputFmt
Definition: mythdeinterlacer.h:35
videoouttypes.h
MythDeinterlacer::m_autoFieldOrder
bool m_autoFieldOrder
Definition: mythdeinterlacer.h:48
MythDeinterlacer::m_height
int m_height
Definition: mythdeinterlacer.h:37
MythDeinterlacer::MythDeinterlacer
MythDeinterlacer()=default
MythDeinterlacer::Filter
void Filter(MythVideoFrame *Frame, FrameScanType Scan, MythVideoProfile *Profile, bool Force=false)
Deinterlace Frame if needed.
Definition: mythdeinterlacer.cpp:70
MythDeinterlacer
Handles software based deinterlacing of video frames.
Definition: mythdeinterlacer.h:15
MythDeinterlacer::Initialise
bool Initialise(MythVideoFrame *Frame, MythDeintType Deinterlacer, bool DoubleRate, bool TopFieldFirst, MythVideoProfile *Profile)
Initialise deinterlacing using the given MythDeintType.
Definition: mythdeinterlacer.cpp:297
MythDeinterlacer::Cleanup
void Cleanup()
Definition: mythdeinterlacer.cpp:274
MythDeinterlacer::m_inputType
VideoFrameType m_inputType
Definition: mythdeinterlacer.h:34
MythDeintType
MythDeintType
Definition: mythframe.h:67
MythDeinterlacer::Blend
void Blend(MythVideoFrame *Frame, FrameScanType Scan)
Definition: mythdeinterlacer.cpp:629
mythavutil.h
MythDeinterlacer::s_haveSIMD
static bool s_haveSIMD
Definition: mythdeinterlacer.h:50
MythDeinterlacer::m_lastFieldChange
uint64_t m_lastFieldChange
Definition: mythdeinterlacer.h:49
MythDeinterlacer::m_bobFrame
MythVideoFrame * m_bobFrame
Definition: mythdeinterlacer.h:45
MythDeinterlacer::~MythDeinterlacer
~MythDeinterlacer()
Definition: mythdeinterlacer.cpp:48
VideoFrameType
VideoFrameType
Definition: mythframe.h:20
MythDeinterlacer::m_source
AVFilterContext * m_source
Definition: mythdeinterlacer.h:43
MythVideoFrame
Definition: mythframe.h:88
MythDeinterlacer::m_topFirst
bool m_topFirst
Definition: mythdeinterlacer.h:40
MythDeinterlacer::m_sink
AVFilterContext * m_sink
Definition: mythdeinterlacer.h:44
MythDeinterlacer::m_doubleRate
bool m_doubleRate
Definition: mythdeinterlacer.h:39