Skip to content

Commit

Permalink
[mmalrenderer] Use half rate deinterlace when playing video in backgr…
Browse files Browse the repository at this point in the history
…ound
  • Loading branch information
popcornmix committed Aug 17, 2015
1 parent b9d16ff commit 3d187ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp
Expand Up @@ -822,9 +822,17 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
{
EDEINTERLACEMODE deinterlace_request = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
EINTERLACEMETHOD interlace_method = g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod);

bool deinterlace = m_interlace_mode != MMAL_InterlaceProgressive;

// we don't keep up when running at 60fps in the background so switch to half rate
if (!g_graphicsContext.IsFullScreenVideo())
{
if (interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED)
interlace_method = VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF;
if (interlace_method == VS_INTERLACEMETHOD_MMAL_BOB)
interlace_method = VS_INTERLACEMETHOD_MMAL_BOB_HALF;
}

if (m_hints.stills || deinterlace_request == VS_DEINTERLACEMODE_OFF || interlace_method == VS_INTERLACEMETHOD_NONE)
deinterlace = false;
else if (deinterlace_request == VS_DEINTERLACEMODE_FORCE)
Expand Down

0 comments on commit 3d187ba

Please sign in to comment.