Skip to content

Commit

Permalink
MythFrame: Rename decoder_deinterlaced to already_deinterlaced
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Feb 16, 2020
1 parent 15712df commit 32e2db2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
Expand Up @@ -3687,7 +3687,7 @@ bool AvFormatDecoder::ProcessVideoFrame(AVStream *Stream, AVFrame *AvFrame)
oldframe->aspect = m_currentAspect;
oldframe->deinterlace_inuse = DEINT_NONE;
oldframe->deinterlace_inuse2x = 0;
oldframe->decoder_deinterlaced = 0;
oldframe->already_deinterlaced = 0;
oldframe->rotation = m_videoRotation;
m_parent->DiscardVideoFrame(oldframe);
}
Expand Down Expand Up @@ -3775,7 +3775,7 @@ bool AvFormatDecoder::ProcessVideoFrame(AVStream *Stream, AVFrame *AvFrame)
frame->pix_fmt = AvFrame->format;
frame->deinterlace_inuse = DEINT_NONE;
frame->deinterlace_inuse2x = 0;
frame->decoder_deinterlaced = 0;
frame->already_deinterlaced = 0;
frame->rotation = m_videoRotation;
m_parent->ReleaseNextVideoFrame(frame, temppts);
m_mythCodecCtx->PostProcessFrame(context, frame);
Expand Down Expand Up @@ -5204,7 +5204,7 @@ bool AvFormatDecoder::GenerateDummyVideoFrames(void)
frame->chromalocation = AVCHROMA_LOC_LEFT;
frame->deinterlace_inuse = DEINT_NONE;
frame->deinterlace_inuse2x = 0;
frame->decoder_deinterlaced = 0;
frame->already_deinterlaced = 0;
frame->rotation = 0;

m_decodedVideoFrame = frame;
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/decoders/mythmediacodeccontext.cpp
Expand Up @@ -328,6 +328,7 @@ void MythMediaCodecContext::PostProcessFrame(AVCodecContext*, VideoFrame* Frame)
Frame->interlaced_reversed = 0;
Frame->top_field_first = 0;
Frame->deinterlace_allowed = DEINT_NONE;
Frame->already_deinterlaced = 1;
}

/*! /brief Say yes
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/mythvaapicontext.cpp
Expand Up @@ -758,7 +758,7 @@ void MythVAAPIContext::PostProcessFrame(AVCodecContext* Context, VideoFrame *Fra
Frame->top_field_first = m_lastTopFieldFirst;
Frame->deinterlace_inuse = m_deinterlacer | DEINT_DRIVER;
Frame->deinterlace_inuse2x = m_deinterlacer2x;
Frame->decoder_deinterlaced = 1;
Frame->already_deinterlaced = 1;
}

// N.B. this picks up the scan tracking in MythPlayer. So we can
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mythframe.h
Expand Up @@ -167,7 +167,7 @@ struct VideoFrame
int colortransfer;
int chromalocation;
int colorshifted; ///< 0 for software decoded 10/12/16bit frames. 1 for hardware decoders.
int decoder_deinterlaced; ///< temporary? TODO move scan detection/tracking into decoder
int already_deinterlaced; ///< temporary? TODO move scan detection/tracking into decoder
int rotation;
MythDeintType deinterlace_single;
MythDeintType deinterlace_double;
Expand Down Expand Up @@ -259,7 +259,7 @@ static inline void init(VideoFrame *vf, VideoFrameType _codec,
vf->colortransfer = 1; // BT.709
vf->chromalocation = 1; // default 4:2:0
vf->colorshifted = 0;
vf->decoder_deinterlaced = 0;
vf->already_deinterlaced = 0;
vf->rotation = 0;
vf->deinterlace_single = DEINT_NONE;
vf->deinterlace_double = DEINT_NONE;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -1680,7 +1680,7 @@ void MythPlayer::AVSync(VideoFrame *buffer)
m_outputJmeter && m_outputJmeter->RecordCycleTime();
m_avsyncAvg = static_cast<int>(m_lastFix * 1000 / s_av_control_gain);

bool decoderdeint = buffer && buffer->decoder_deinterlaced;
bool decoderdeint = buffer && buffer->already_deinterlaced;
FrameScanType ps = m_scan;
if (kScan_Detect == m_scan || kScan_Ignore == m_scan || decoderdeint)
{
Expand Down

0 comments on commit 32e2db2

Please sign in to comment.