From 6aa16d7fe7e6dbe95bdca8069a16d2aa415adf37 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 3 Feb 2015 17:58:19 +0100
Subject: [PATCH 16/17] Disable deinterlacing for HD content while video is
 being played in a window to prevent screen blinking in 1080p50/60hz display
 modes

---
 xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
index 2fad224..74804de 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
@@ -2261,6 +2261,11 @@ void CAMLCodec::SetVideoRect(const CRect &SrcRect, const CRect &DestRect)
   CLog::Log(LOGDEBUG, "CAMLCodec::SetVideoRect:m_stereo_view(%d)", m_stereo_view);
 #endif
 
+  if (dst_rect.Width() < display.Width() || dst_rect.Height() < display.Height())
+    SysfsUtils::SetInt("/sys/module/di/parameters/bypass_hd", 1);
+  else
+    SysfsUtils::SetInt("/sys/module/di/parameters/bypass_hd", 0);
+
   // goofy 0/1 based difference in aml axis coordinates.
   // fix them.
   dst_rect.x2--;
-- 
2.1.4

