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 #include "videodisplayprofile.h"
8 
9 extern "C" {
10 #include "libavfilter/avfilter.h"
11 #include "libswscale/swscale.h"
12 }
13 
15 {
16  public:
17  MythDeinterlacer() = default;
19 
21  VideoDisplayProfile *Profile, bool Force = false);
22 
23  private:
24  bool Initialise (MythVideoFrame *Frame, MythDeintType Deinterlacer,
25  bool DoubleRate, bool TopFieldFirst,
26  VideoDisplayProfile *Profile);
27  inline void Cleanup (void);
31 
32  private:
33  Q_DISABLE_COPY(MythDeinterlacer)
34 
36  AVPixelFormat m_inputFmt { AV_PIX_FMT_NONE };
37  int m_width { 0 };
38  int m_height { 0 };
40  bool m_doubleRate { false };
41  bool m_topFirst { true };
43  AVFilterGraph* m_graph { nullptr };
44  AVFilterContext* m_source { nullptr };
45  AVFilterContext* m_sink { nullptr };
46  MythVideoFrame* m_bobFrame { nullptr };
47  SwsContext* m_swsContext { nullptr };
48  uint64_t m_discontinuityCounter { 0 };
49  bool m_autoFieldOrder { false };
50  uint64_t m_lastFieldChange { 0 };
51  static bool s_haveSIMD;
52 };
53 
54 #endif // MYTHDEINTERLACER_H
MythDeinterlacer::m_frame
MythAVFrame m_frame
Definition: mythdeinterlacer.h:42
MythDeinterlacer::m_swsContext
SwsContext * m_swsContext
Definition: mythdeinterlacer.h:47
MythDeinterlacer::m_discontinuityCounter
uint64_t m_discontinuityCounter
Definition: mythdeinterlacer.h:48
MythDeinterlacer::m_graph
AVFilterGraph * m_graph
Definition: mythdeinterlacer.h:43
MythDeinterlacer::m_width
int m_width
Definition: mythdeinterlacer.h:37
Frame
Definition: zmdefines.h:94
MythAVFrame
MythAVFrame little utility class that act as a safe way to allocate an AVFrame which can then be allo...
Definition: mythaverror.h:53
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:64
FrameScanType
FrameScanType
Definition: videoouttypes.h:61
MythDeinterlacer::m_deintType
MythDeintType m_deintType
Definition: mythdeinterlacer.h:39
MythDeinterlacer::SetUpCache
bool SetUpCache(MythVideoFrame *Frame)
Definition: mythdeinterlacer.cpp:391
FMT_NONE
@ FMT_NONE
Definition: mythframe.h:17
videodisplayprofile.h
MythDeinterlacer::OneField
void OneField(MythVideoFrame *Frame, FrameScanType Scan)
Definition: mythdeinterlacer.cpp:413
MythDeinterlacer::m_inputFmt
AVPixelFormat m_inputFmt
Definition: mythdeinterlacer.h:36
videoouttypes.h
MythDeinterlacer::m_autoFieldOrder
bool m_autoFieldOrder
Definition: mythdeinterlacer.h:49
MythDeinterlacer::Filter
void Filter(MythVideoFrame *Frame, FrameScanType Scan, VideoDisplayProfile *Profile, bool Force=false)
Deinterlace Frame if needed.
Definition: mythdeinterlacer.cpp:69
MythDeinterlacer::m_height
int m_height
Definition: mythdeinterlacer.h:38
MythDeinterlacer::MythDeinterlacer
MythDeinterlacer()=default
MythDeinterlacer
Handles software based deinterlacing of video frames.
Definition: mythdeinterlacer.h:15
MythDeinterlacer::Initialise
bool Initialise(MythVideoFrame *Frame, MythDeintType Deinterlacer, bool DoubleRate, bool TopFieldFirst, VideoDisplayProfile *Profile)
Initialise deinterlacing using the given MythDeintType.
Definition: mythdeinterlacer.cpp:297
MythDeinterlacer::Cleanup
void Cleanup(void)
Definition: mythdeinterlacer.cpp:274
MythDeinterlacer::m_inputType
VideoFrameType m_inputType
Definition: mythdeinterlacer.h:35
VideoDisplayProfile
Definition: videodisplayprofile.h:69
MythDeintType
MythDeintType
Definition: mythframe.h:63
MythDeinterlacer::Blend
void Blend(MythVideoFrame *Frame, FrameScanType Scan)
Definition: mythdeinterlacer.cpp:629
mythavutil.h
MythDeinterlacer::s_haveSIMD
static bool s_haveSIMD
Definition: mythdeinterlacer.h:51
MythDeinterlacer::m_lastFieldChange
uint64_t m_lastFieldChange
Definition: mythdeinterlacer.h:50
MythDeinterlacer::m_bobFrame
MythVideoFrame * m_bobFrame
Definition: mythdeinterlacer.h:46
MythDeinterlacer::~MythDeinterlacer
~MythDeinterlacer()
Definition: mythdeinterlacer.cpp:47
VideoFrameType
VideoFrameType
Definition: mythframe.h:16
MythDeinterlacer::m_source
AVFilterContext * m_source
Definition: mythdeinterlacer.h:44
MythVideoFrame
Definition: mythframe.h:83
MythDeinterlacer::m_topFirst
bool m_topFirst
Definition: mythdeinterlacer.h:41
MythDeinterlacer::m_sink
AVFilterContext * m_sink
Definition: mythdeinterlacer.h:45
MythDeinterlacer::m_doubleRate
bool m_doubleRate
Definition: mythdeinterlacer.h:40