MythTV
master
|
Handles software based deinterlacing of video frames. More...
#include <libmythtv/mythdeinterlacer.h>
Public Member Functions | |
MythDeinterlacer ()=default | |
~MythDeinterlacer () | |
void | Filter (MythVideoFrame *Frame, FrameScanType Scan, MythVideoProfile *Profile, bool Force=false) |
Deinterlace Frame if needed. More... | |
Private Member Functions | |
bool | Initialise (MythVideoFrame *Frame, MythDeintType Deinterlacer, bool DoubleRate, bool TopFieldFirst, MythVideoProfile *Profile) |
Initialise deinterlacing using the given MythDeintType. More... | |
void | Cleanup () |
void | OneField (MythVideoFrame *Frame, FrameScanType Scan) |
void | Blend (MythVideoFrame *Frame, FrameScanType Scan) |
bool | SetUpCache (MythVideoFrame *Frame) |
Private Attributes | |
VideoFrameType | m_inputType { FMT_NONE } |
AVPixelFormat | m_inputFmt { AV_PIX_FMT_NONE } |
int | m_width { 0 } |
int | m_height { 0 } |
MythDeintType | m_deintType { DEINT_NONE } |
bool | m_doubleRate { false } |
bool | m_topFirst { true } |
MythAVFrame | m_frame |
AVFilterGraph * | m_graph { nullptr } |
AVFilterContext * | m_source { nullptr } |
AVFilterContext * | m_sink { nullptr } |
MythVideoFrame * | m_bobFrame { nullptr } |
SwsContext * | m_swsContext { nullptr } |
uint64_t | m_discontinuityCounter { 0 } |
bool | m_autoFieldOrder { false } |
uint64_t | m_lastFieldChange { 0 } |
Handles software based deinterlacing of video frames.
Based upon the deinterlacing preferences passed in through the video frame, MythDeinterlacer will deinterlace the given frame using the appropriate quality and using single or double frame rate.
The following deinterlacers are used: Basic - onefield/bob using libswcale Medium - linearblend with custom code (SSE2 and Neon assisted where available) High - libavfilter's yadif (with multithreading)
Definition at line 15 of file mythdeinterlacer.h.
|
default |
MythDeinterlacer::~MythDeinterlacer | ( | ) |
Definition at line 47 of file mythdeinterlacer.cpp.
void MythDeinterlacer::Filter | ( | MythVideoFrame * | Frame, |
FrameScanType | Scan, | ||
MythVideoProfile * | Profile, | ||
bool | Force = false |
||
) |
Deinterlace Frame if needed.
Software deinterlacing is the choice of last resort i.e. shader or driver based deinterlacers are always preferred if available.
If using double rate deinterlacing, the frame must be presented in the correct order i.e. kScan_Interlaced followed by kScan_Intr2ndField.
The appropriate field to deinterlace is determined by the scan type and the flags for interlaced_reverse and top_field_first in VideoFrame.
libavilter's must be recreated if any parameter is changed as there is no method to select the field 'on the fly'.
Force | Set to true to ensure a deinterlaced frame is always returned. Used for preview images. |
Definition at line 69 of file mythdeinterlacer.cpp.
Referenced by MythAVUtil::DeinterlaceAVFrame(), MythPreviewPlayer::GetScreenGrabAtFrame(), MythVideoOutputNull::PrepareFrame(), MythVideoOutputGPU::PrepareFrame(), and MythVideoOutputGPU::UpdatePauseFrame().
|
private |
Initialise deinterlacing using the given MythDeintType.
Definition at line 296 of file mythdeinterlacer.cpp.
Referenced by Filter().
|
inlineprivate |
Definition at line 273 of file mythdeinterlacer.cpp.
Referenced by Filter(), Initialise(), and ~MythDeinterlacer().
|
private |
Definition at line 415 of file mythdeinterlacer.cpp.
Referenced by Filter().
|
private |
Definition at line 631 of file mythdeinterlacer.cpp.
Referenced by Filter().
|
private |
Definition at line 393 of file mythdeinterlacer.cpp.
Referenced by Blend(), and OneField().
|
private |
Definition at line 34 of file mythdeinterlacer.h.
Referenced by Filter(), Initialise(), and OneField().
|
private |
Definition at line 35 of file mythdeinterlacer.h.
Referenced by Filter(), Initialise(), and OneField().
|
private |
Definition at line 36 of file mythdeinterlacer.h.
Referenced by Filter(), and Initialise().
|
private |
Definition at line 37 of file mythdeinterlacer.h.
Referenced by Filter(), and Initialise().
|
private |
Definition at line 38 of file mythdeinterlacer.h.
Referenced by Cleanup(), Filter(), and Initialise().
Definition at line 39 of file mythdeinterlacer.h.
Referenced by Blend(), Filter(), and Initialise().
Definition at line 40 of file mythdeinterlacer.h.
Referenced by Blend(), Filter(), Initialise(), and OneField().
|
private |
Definition at line 41 of file mythdeinterlacer.h.
Referenced by Filter(), and OneField().
|
private |
Definition at line 42 of file mythdeinterlacer.h.
Referenced by Cleanup(), Filter(), and Initialise().
|
private |
Definition at line 43 of file mythdeinterlacer.h.
Referenced by Filter(), and Initialise().
|
private |
Definition at line 44 of file mythdeinterlacer.h.
Referenced by Filter(), and Initialise().
|
private |
Definition at line 45 of file mythdeinterlacer.h.
Referenced by Blend(), Cleanup(), OneField(), and SetUpCache().
|
private |
Definition at line 46 of file mythdeinterlacer.h.
Referenced by Cleanup(), Initialise(), and OneField().
|
private |
Definition at line 47 of file mythdeinterlacer.h.
Definition at line 48 of file mythdeinterlacer.h.
Referenced by Cleanup(), Filter(), and Initialise().
|
private |
Definition at line 49 of file mythdeinterlacer.h.
Referenced by Cleanup(), Filter(), and Initialise().