summaryrefslogtreecommitdiff
path: root/moorefield_hdmi/ips
diff options
context:
space:
mode:
authorJia, Lin A <lin.a.jia@intel.com>2015-05-29 14:13:12 +0800
committerPatrick Tjin <pattjin@google.com>2015-06-08 10:25:19 -0700
commitfa7f14775d01e854f4261e32fb2efdfb8b84e9c4 (patch)
tree17e5d1ba4a880e9f4414d43b9cffe2c06e69e675 /moorefield_hdmi/ips
parent3540d325335005c6761c3557679201ae29f7c1d0 (diff)
downloadhwcomposer-fa7f14775d01e854f4261e32fb2efdfb8b84e9c4.tar.gz
Detect scale rate for interlace stream
Fall back to GLES if interlace stream exceed to the limitation to avoid video display quality issue. Bug: 20933701 Change-Id: I653440d9403869d045c1627041facb8f47cd6ae3 Signed-off-by: Jia, Lin A <lin.a.jia@intel.com>
Diffstat (limited to 'moorefield_hdmi/ips')
-rwxr-xr-xmoorefield_hdmi/ips/anniedale/AnnOverlayPlane.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/moorefield_hdmi/ips/anniedale/AnnOverlayPlane.cpp b/moorefield_hdmi/ips/anniedale/AnnOverlayPlane.cpp
index 11a4a97..eca4d1e 100755
--- a/moorefield_hdmi/ips/anniedale/AnnOverlayPlane.cpp
+++ b/moorefield_hdmi/ips/anniedale/AnnOverlayPlane.cpp
@@ -419,6 +419,14 @@ bool AnnOverlayPlane::scalingSetup(BufferMapper& mapper)
dstWidth, dstHeight,
mTransform);
+ if (mBobDeinterlace) {
+ float scaleY = (float)(srcHeight >> 1) / dstHeight;
+ if (scaleY > 4 || scaleY < 0.25) {
+ VLOGTRACE("Exceed scale limit for interlace, return false");
+ return false;
+ }
+ }
+
// switch destination width/height for scale factor calculation
// for 90/270 transformation
if (mUseOverlayRotation && ((mTransform == HWC_TRANSFORM_ROT_90) ||