From 9ef1c8ae8458a7ae9e6f80b65ecd958408927c5b Mon Sep 17 00:00:00 2001 From: Likai Ding Date: Thu, 7 Jan 2016 21:19:20 +0100 Subject: SnapdragonCamera: fix messy photo in Panorama mode If camera is kept still in panorama mode, the result looks messy. The root cause is that, when calculating and comparing distance in Blend::ComputeMask, double numbers are compared directly. Comparing them against a small negative number fixes the problem. Change-Id: I713f59b4e21c508e20eb4dabc5edb1652b3ddb1a CRs-Fixed: 794974 --- jni/feature_mos/src/mosaic/Blend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jni') diff --git a/jni/feature_mos/src/mosaic/Blend.cpp b/jni/feature_mos/src/mosaic/Blend.cpp index 4bd6cba1f..7e2d7f966 100644 --- a/jni/feature_mos/src/mosaic/Blend.cpp +++ b/jni/feature_mos/src/mosaic/Blend.cpp @@ -878,7 +878,7 @@ void Blend::ComputeMask(CSite *csite, BlendRect &vcrect, BlendRect &brect, Mosai { double d1 = hypotSq(m_AllSites[ce->second].getVCenter().x - si, m_AllSites[ce->second].getVCenter().y - sj); - if (d1 < dself) + if (d1 - dself < -1e-5) { break; } -- cgit v1.2.3