MythTV master
mythdeinterlacer.h
Go to the documentation of this file.
1#ifndef MYTHDEINTERLACER_H
2#define MYTHDEINTERLACER_H
3
4// MythTV
6
7#include "videoouttypes.h"
8#include "mythavutil.h"
9
10extern "C" {
11#include "libavfilter/avfilter.h"
12#include "libswscale/swscale.h"
13}
14
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 };
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
MythAVFrame little utility class that act as a safe way to allocate an AVFrame which can then be allo...
Definition: mythavframe.h:27
Handles software based deinterlacing of video frames.
void OneField(MythVideoFrame *Frame, FrameScanType Scan)
bool Initialise(MythVideoFrame *Frame, MythDeintType Deinterlacer, bool DoubleRate, bool TopFieldFirst, MythVideoProfile *Profile)
Initialise deinterlacing using the given MythDeintType.
AVPixelFormat m_inputFmt
void Filter(MythVideoFrame *Frame, FrameScanType Scan, MythVideoProfile *Profile, bool Force=false)
Deinterlace Frame if needed.
VideoFrameType m_inputType
AVFilterGraph * m_graph
MythDeintType m_deintType
uint64_t m_lastFieldChange
AVFilterContext * m_sink
MythDeinterlacer()=default
void Blend(MythVideoFrame *Frame, FrameScanType Scan)
uint64_t m_discontinuityCounter
AVFilterContext * m_source
MythVideoFrame * m_bobFrame
bool SetUpCache(MythVideoFrame *Frame)
SwsContext * m_swsContext
MythAVFrame m_frame
MythDeintType
Definition: mythframe.h:67
@ DEINT_NONE
Definition: mythframe.h:68
VideoFrameType
Definition: mythframe.h:20
@ FMT_NONE
Definition: mythframe.h:21
FrameScanType
Definition: videoouttypes.h:95