summaryrefslogtreecommitdiffstats
path: root/jni
diff options
context:
space:
mode:
authorLikai Ding <likaid@codeaurora.org>2016-01-07 21:19:20 +0100
committerDaniel Hillenbrand <codeworkx@cyanogenmod.org>2016-01-07 12:57:21 -0800
commit9ef1c8ae8458a7ae9e6f80b65ecd958408927c5b (patch)
tree97ac255ff09333b1b9507159360427aa85a73e7a /jni
parent707bdfd17f5e056fbea8fd3e0f4f15cd8fb39960 (diff)
downloadandroid_packages_apps_Snap-9ef1c8ae8458a7ae9e6f80b65ecd958408927c5b.tar.gz
android_packages_apps_Snap-9ef1c8ae8458a7ae9e6f80b65ecd958408927c5b.tar.bz2
android_packages_apps_Snap-9ef1c8ae8458a7ae9e6f80b65ecd958408927c5b.zip
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
Diffstat (limited to 'jni')
-rw-r--r--jni/feature_mos/src/mosaic/Blend.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}