Skip to content
Permalink
Browse files

rbp: drop deinterlace mode

  • Loading branch information...
popcornmix committed Jul 22, 2016
1 parent 4402163 commit 97b4caceabeed3a87e86c6241c4cd01279fa8066
@@ -545,7 +545,6 @@ void CMMALRenderer::Run()
{
if (buffer->length > 0)
{
EDEINTERLACEMODE deinterlace_request = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode;
EINTERLACEMETHOD interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod;
if (interlace_method == VS_INTERLACEMETHOD_AUTO)
interlace_method = AutoInterlaceMethod();
@@ -559,12 +558,12 @@ void CMMALRenderer::Run()
interlace_method = VS_INTERLACEMETHOD_MMAL_BOB_HALF;
}

if (deinterlace_request == VS_DEINTERLACEMODE_OFF || interlace_method == VS_INTERLACEMETHOD_NONE)
if (interlace_method == VS_INTERLACEMETHOD_NONE)
{
if (m_deint_input)
DestroyDeinterlace();
}
else if (m_deint_input || deinterlace_request == VS_DEINTERLACEMODE_FORCE || (deinterlace_request == VS_DEINTERLACEMODE_AUTO && interlace))
else if (m_deint_input || interlace)
CheckConfigurationDeint(omvb->m_width, omvb->m_height, omvb->m_aligned_width, omvb->m_aligned_height, omvb->m_encoding, interlace_method);

if (m_deint_input)
@@ -964,16 +963,6 @@ bool CMMALRenderer::RenderCapture(CRenderCapture* capture)
// YV12 Texture creation, deletion, copying + clearing
//********************************************************************************************************

bool CMMALRenderer::Supports(EDEINTERLACEMODE mode)
{
if(mode == VS_DEINTERLACEMODE_OFF
|| mode == VS_DEINTERLACEMODE_AUTO
|| mode == VS_DEINTERLACEMODE_FORCE)
return true;

return false;
}

bool CMMALRenderer::Supports(EINTERLACEMETHOD method)
{
if (method == VS_INTERLACEMETHOD_AUTO)
@@ -105,7 +105,6 @@ class CMMALRenderer : public CBaseRenderer, public CThread, public IRunnable

virtual bool SupportsMultiPassRendering() { return false; };
virtual bool Supports(ERENDERFEATURE feature);
virtual bool Supports(EDEINTERLACEMODE mode);
virtual bool Supports(EINTERLACEMETHOD method);
virtual bool Supports(ESCALINGMETHOD method);

@@ -141,15 +141,11 @@ bool OMXDoProcessing(struct SOmxPlayerState &m_OmxPlayerState, int m_playSpeed,
m_OmxPlayerState.interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod;

// if deinterlace setting has changed, we should close and open video
if (m_OmxPlayerState.current_deinterlace != CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode ||
(m_OmxPlayerState.current_deinterlace != VS_DEINTERLACEMODE_OFF &&
m_OmxPlayerState.interlace_method != CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod))
if (m_OmxPlayerState.interlace_method != CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod)
{
CLog::Log(LOGNOTICE, "%s - Reopen stream due to interlace change (%d,%d,%d,%d)", __FUNCTION__,
m_OmxPlayerState.current_deinterlace, CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode,
CLog::Log(LOGNOTICE, "%s - Reopen stream due to interlace change (%d,%d)", __FUNCTION__,
m_OmxPlayerState.interlace_method, CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod);

m_OmxPlayerState.current_deinterlace = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode;
m_OmxPlayerState.interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod;
reopen_stream = true;
}
@@ -533,7 +533,7 @@ bool OMXPlayerVideo::OpenDecoder()
else
m_fForcedAspectRatio = 0.0;

bool bVideoDecoderOpen = m_omxVideo.Open(m_hints, m_av_clock, CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode, m_hdmi_clock_sync);
bool bVideoDecoderOpen = m_omxVideo.Open(m_hints, m_av_clock, m_hdmi_clock_sync);
m_omxVideo.RegisterResolutionUpdateCallBack((void *)this, ResolutionUpdateCallBack);

if(!bVideoDecoderOpen)
@@ -73,7 +73,6 @@ COMXVideo::COMXVideo(CRenderManager& renderManager, CProcessInfo &processInfo) :
m_extradata = NULL;
m_extrasize = 0;
m_deinterlace = false;
m_deinterlace_request = VS_DEINTERLACEMODE_OFF;
m_hdmi_clock_sync = false;
m_drop_state = false;
m_decoded_width = 0;
@@ -175,14 +174,9 @@ bool COMXVideo::PortSettingsChanged(ResolutionUpdateInfo &resinfo)
interlace.nPortIndex = m_omx_decoder.GetOutputPort();
omx_err = m_omx_decoder.GetConfig(OMX_IndexConfigCommonInterlace, &interlace);

if(m_deinterlace_request == VS_DEINTERLACEMODE_FORCE)
m_deinterlace = true;
else if(m_deinterlace_request == VS_DEINTERLACEMODE_OFF)
m_deinterlace = false;
else
m_deinterlace = interlace.eMode != OMX_InterlaceProgressive;
m_deinterlace = interlace.eMode != OMX_InterlaceProgressive;

CLog::Log(LOGDEBUG, "%s::%s - %dx%d@%.2f interlace:%d deinterlace:%d", CLASSNAME, __func__,
CLog::Log(LOGDEBUG, "%s::%s - %dx%d@%.2f interlace:%d deinterlace:%d", CLASSNAME, __func__,
port_image.format.video.nFrameWidth, port_image.format.video.nFrameHeight,
port_image.format.video.xFramerate / (float)(1<<16), interlace.eMode, m_deinterlace);

@@ -240,12 +234,12 @@ bool COMXVideo::PortSettingsChanged(ResolutionUpdateInfo &resinfo)
}
}

if(m_deinterlace)
{
EINTERLACEMETHOD interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod;
if (interlace_method == VS_INTERLACEMETHOD_AUTO)
interlace_method = VS_INTERLACEMETHOD_MMAL_ADVANCED;
EINTERLACEMETHOD interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod;
if (interlace_method == VS_INTERLACEMETHOD_AUTO)
interlace_method = VS_INTERLACEMETHOD_MMAL_ADVANCED;

if (m_deinterlace && interlace_method != VS_INTERLACEMETHOD_NONE)
{
bool advanced_deinterlace = interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED || interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF;
bool half_framerate = interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF || interlace_method == VS_INTERLACEMETHOD_MMAL_BOB_HALF;

@@ -371,7 +365,7 @@ bool COMXVideo::PortSettingsChanged(ResolutionUpdateInfo &resinfo)
return true;
}

bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE deinterlace, bool hdmi_clock_sync)
bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool hdmi_clock_sync)
{
CSingleLock lock (m_critSection);
bool vflip = false;
@@ -519,7 +513,6 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE de
return false;
break;
}
m_deinterlace_request = deinterlace;

if(!m_omx_decoder.Initialize(decoder_name, OMX_IndexParamVideoInit))
return false;
@@ -683,9 +676,9 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE de
return false;

CLog::Log(LOGDEBUG,
"%s::%s - decoder_component(0x%p), input_port(0x%x), output_port(0x%x) deinterlace %d hdmiclocksync %d\n",
"%s::%s - decoder_component(0x%p), input_port(0x%x), output_port(0x%x) hdmiclocksync %d\n",
CLASSNAME, __func__, m_omx_decoder.GetComponent(), m_omx_decoder.GetInputPort(), m_omx_decoder.GetOutputPort(),
m_deinterlace_request, m_hdmi_clock_sync);
m_hdmi_clock_sync);

return true;
}
@@ -59,7 +59,7 @@ class COMXVideo

// Required overrides
bool SendDecoderConfig();
bool Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE deinterlace = VS_DEINTERLACEMODE_OFF, bool hdmi_clock_sync = false);
bool Open(CDVDStreamInfo &hints, OMXClock *clock, bool hdmi_clock_sync = false);
bool PortSettingsChanged(ResolutionUpdateInfo &resinfo);
void RegisterResolutionUpdateCallBack(void *ctx, ResolutionUpdateCallBackFn callback) { m_res_ctx = ctx; m_res_callback = callback; }
void Close(void);
@@ -104,7 +104,6 @@ class COMXVideo
std::string m_video_codec_name;

bool m_deinterlace;
EDEINTERLACEMODE m_deinterlace_request;
bool m_hdmi_clock_sync;
ResolutionUpdateCallBackFn m_res_callback;
void *m_res_ctx;

0 comments on commit 97b4cac

Please sign in to comment.
You can’t perform that action at this time.