summaryrefslogtreecommitdiffstats
path: root/jni
diff options
context:
space:
mode:
authorLikai Ding <likaid@codeaurora.org>2015-02-25 14:44:07 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-03-22 18:58:30 -0700
commit45e416fcc3feff470419aae4ed9360ddfacce94d (patch)
tree44763b4ef55092c1274a6d5e6f8baf2f70be87b3 /jni
parent401ee1b3bb27ddb1dbc09e2a0d3b49d43f194457 (diff)
downloadandroid_packages_apps_Snap-45e416fcc3feff470419aae4ed9360ddfacce94d.tar.gz
android_packages_apps_Snap-45e416fcc3feff470419aae4ed9360ddfacce94d.tar.bz2
android_packages_apps_Snap-45e416fcc3feff470419aae4ed9360ddfacce94d.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 ef983ff67..27d8d92a1 100644
--- a/jni/feature_mos/src/mosaic/Blend.cpp
+++ b/jni/feature_mos/src/mosaic/Blend.cpp
@@ -874,7 +874,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;
}