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