Permalink
Browse files

MMALRender: Allow advanced deinterlace with software decode

Uses YUV420 directly which improves performance.
Requires updated firmware
  • Loading branch information...
popcornmix committed Dec 1, 2016
1 parent e36ac2a commit 20fc1c7ecc94cfeba3367ff1ef4e5609398fb0e9
Showing with 2 additions and 6 deletions.
  1. +2 −6 xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp
@@ -553,12 +553,8 @@ void CMMALRenderer::Run()
EINTERLACEMETHOD last_interlace_method = m_interlace_method;
EINTERLACEMETHOD interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod;
if (interlace_method == VS_INTERLACEMETHOD_AUTO)
{
interlace_method = VS_INTERLACEMETHOD_MMAL_ADVANCED;
// avoid advanced deinterlace when using software decode and HD resolution
if (omvb->m_state == MMALStateFFDec && omvb->m_width * omvb->m_height > 720*576)
interlace_method = VS_INTERLACEMETHOD_MMAL_BOB;
}
bool interlace = (omvb->mmal_buffer->flags & MMAL_BUFFER_HEADER_VIDEO_FLAG_INTERLACED) ? true:false;
// advanced deinterlace requires 3 frames of context so disable when showing stills
@@ -1370,7 +1366,7 @@ bool CMMALRenderer::CheckConfigurationDeint(uint32_t width, uint32_t height, uin
m_deint_output->format->es->video.crop.height = height;
m_deint_output->format->es->video.width = ALIGN_UP(width, 32);
m_deint_output->format->es->video.height = ALIGN_UP(height, 16);
m_deint_output->format->encoding = advanced_deinterlace ? MMAL_ENCODING_YUVUV128 : MMAL_ENCODING_I420;
m_deint_output->format->encoding = advanced_deinterlace && encoding == MMAL_ENCODING_OPAQUE ? MMAL_ENCODING_YUVUV128 : MMAL_ENCODING_I420;
status = mmal_port_format_commit(m_deint_output);
if (status != MMAL_SUCCESS)

0 comments on commit 20fc1c7

Please sign in to comment.