summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2016-07-26 18:52:15 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-07-26 18:52:15 +0000
commit4b2c9d6005e95627dc32ec257e28b28a4e0df0fd (patch)
tree23e5ea182783b5db03eccaa543d7dbe7f0046020
parent323cb09f8965758e2ad4d4c0f7196d4307d2f953 (diff)
parent529b5485970f23f52513a9a13c1ec96acd34aa58 (diff)
downloadpackages_apps_LegacyCamera-4b2c9d6005e95627dc32ec257e28b28a4e0df0fd.zip
packages_apps_LegacyCamera-4b2c9d6005e95627dc32ec257e28b28a4e0df0fd.tar.gz
packages_apps_LegacyCamera-4b2c9d6005e95627dc32ec257e28b28a4e0df0fd.tar.bz2
Merge \\"Fix misc-macro-parentheses warnings in LegacyCamera.\\" am: 02301db045
am: 529b548597 Change-Id: Ifb6fabf15f1e74fecfafe1f7854553083c544375
-rw-r--r--jni/feature_stab/db_vlvm/db_utilities_constants.h2
-rw-r--r--jni/feature_stab/src/dbreg/vp_motionmodel.h34
2 files changed, 18 insertions, 18 deletions
diff --git a/jni/feature_stab/db_vlvm/db_utilities_constants.h b/jni/feature_stab/db_vlvm/db_utilities_constants.h
index 07565ef..612fc78 100644
--- a/jni/feature_stab/db_vlvm/db_utilities_constants.h
+++ b/jni/feature_stab/db_vlvm/db_utilities_constants.h
@@ -64,7 +64,7 @@
#define DB_DEFAULT_ABS_CORNER_THRESHOLD 50000000.0
#define DB_DEFAULT_REL_CORNER_THRESHOLD 0.00005
#define DB_DEFAULT_MAX_DISPARITY 0.1
-#define DB_DEFAULT_NO_DISPARITY -1.0
+#define DB_DEFAULT_NO_DISPARITY (-1.0)
#define DB_DEFAULT_MAX_TRACK_LENGTH 300
#define DB_DEFAULT_MAX_NR_CAMERAS 1000
diff --git a/jni/feature_stab/src/dbreg/vp_motionmodel.h b/jni/feature_stab/src/dbreg/vp_motionmodel.h
index a63ac00..71a7f7e 100644
--- a/jni/feature_stab/src/dbreg/vp_motionmodel.h
+++ b/jni/feature_stab/src/dbreg/vp_motionmodel.h
@@ -120,7 +120,7 @@ enum VP_MOTION_MODEL {
VP_VFE_AFFINE=120
};
-#define VP_REFID -1 /* Default ID used for reference frame */
+#define VP_REFID (-1) /* Default ID used for reference frame */
typedef struct {
VP_TRS par; /* Contains the motion paramerers.
@@ -205,16 +205,16 @@ typedef struct {
/* Warp a 2d point (assuming the z component is zero) */
#define VP_WARP_POINT_2D(inx,iny,m,outx,outy) do {\
VP_PAR vpTmpWarpPnt___= MWX(m)*(inx)+MWY(m)*(iny)+MWW(m); \
- outx = (MXX(m)*((VP_PAR)inx)+MXY(m)*((VP_PAR)iny)+MXW(m))/vpTmpWarpPnt___; \
- outy = (MYX(m)*((VP_PAR)inx)+MYY(m)*((VP_PAR)iny)+MYW(m))/vpTmpWarpPnt___; } while (0)
+ (outx) = (MXX(m)*((VP_PAR)(inx))+MXY(m)*((VP_PAR)(iny))+MXW(m))/vpTmpWarpPnt___; \
+ (outy) = (MYX(m)*((VP_PAR)(inx))+MYY(m)*((VP_PAR)(iny))+MYW(m))/vpTmpWarpPnt___; } while (0)
/* Warp a 3d point */
#define VP_WARP_POINT_3D(inx,iny,inz,m,outx,outy,outz) do {\
- VP_PAR vpTmpWarpPnt___= MWX(m)*(inx)+MWY(m)*(iny)+MWZ(m)*((VP_PAR)inz)+MWW(m); \
- outx = (MXX(m)*((VP_PAR)inx)+MXY(m)*((VP_PAR)iny)+MXZ(m)*((VP_PAR)inz)+MXW(m))/vpTmpWarpPnt___; \
- outy = (MYX(m)*((VP_PAR)inx)+MYY(m)*((VP_PAR)iny)+MYZ(m)*((VP_PAR)inz)+MYW(m))/vpTmpWarpPnt___; \
- outz = MZX(m)*((VP_PAR)inx)+MZY(m)*((VP_PAR)iny)+MZZ(m)*((VP_PAR)inz)+MZW(m); \
- if ((m).type==VP_MOTION_PROJ_3D) outz/=vpTmpWarpPnt___; } while (0)
+ VP_PAR vpTmpWarpPnt___= MWX(m)*(inx)+MWY(m)*(iny)+MWZ(m)*((VP_PAR)(inz))+MWW(m); \
+ (outx) = (MXX(m)*((VP_PAR)(inx))+MXY(m)*((VP_PAR)(iny))+MXZ(m)*((VP_PAR)(inz))+MXW(m))/vpTmpWarpPnt___; \
+ (outy) = (MYX(m)*((VP_PAR)(inx))+MYY(m)*((VP_PAR)(iny))+MYZ(m)*((VP_PAR)(inz))+MYW(m))/vpTmpWarpPnt___; \
+ (outz) = MZX(m)*((VP_PAR)(inx))+MZY(m)*((VP_PAR)(iny))+MZZ(m)*((VP_PAR)(inz))+MZW(m); \
+ if ((m).type==VP_MOTION_PROJ_3D) (outz)/=vpTmpWarpPnt___; } while (0)
/* Projections of each component */
#define VP_PROJW_3D(m,x,y,z,f) ( MWX(m)*(x)+MWY(m)*(y)+MWZ(m)*(z)+MWW(m) )
@@ -224,15 +224,15 @@ typedef struct {
/* Scale Down a matrix by Sfactor */
#define VP_SCALEDOWN(m,Sfactor) do { \
- MXW(m) /= (VP_PAR)Sfactor; MWX(m) *= (VP_PAR)Sfactor; \
- MYW(m) /= (VP_PAR)Sfactor; MWY(m) *= (VP_PAR)Sfactor; \
- MZW(m) /= (VP_PAR)Sfactor; MWZ(m) *= (VP_PAR)Sfactor; } while (0)
+ MXW(m) /= (VP_PAR)(Sfactor); MWX(m) *= (VP_PAR)(Sfactor); \
+ MYW(m) /= (VP_PAR)(Sfactor); MWY(m) *= (VP_PAR)(Sfactor); \
+ MZW(m) /= (VP_PAR)(Sfactor); MWZ(m) *= (VP_PAR)(Sfactor); } while (0)
/* Scale Up a matrix by Sfactor */
#define VP_SCALEUP(m,Sfactor) do { \
- MXW(m) *= (VP_PAR)Sfactor; MWX(m) /= (VP_PAR)Sfactor; \
- MYW(m) *= (VP_PAR)Sfactor; MWY(m) /= (VP_PAR)Sfactor; \
- MZW(m) *= (VP_PAR)Sfactor; MWZ(m) /= (VP_PAR)Sfactor; } while (0)
+ MXW(m) *= (VP_PAR)(Sfactor); MWX(m) /= (VP_PAR)(Sfactor); \
+ MYW(m) *= (VP_PAR)(Sfactor); MWY(m) /= (VP_PAR)(Sfactor); \
+ MZW(m) *= (VP_PAR)(Sfactor); MWZ(m) /= (VP_PAR)(Sfactor); } while (0)
/* Normalize the transformation matrix so that MWW is 1 */
#define VP_NORMALIZE(m) if (MWW(m)!=(VP_PAR)0.0) do { \
@@ -253,15 +253,15 @@ typedef struct {
/* w' projection given a point x,y,0,f */
#define VP_PROJZ(m,x,y,f) ( \
- MWX(m)*((VP_PAR)x)+MWY(m)*((VP_PAR)y)+MWW(m)*((VP_PAR)f))
+ MWX(m)*((VP_PAR)(x))+MWY(m)*((VP_PAR)(y))+MWW(m)*((VP_PAR)(f)))
/* X Projection given a point x,y,0,f and w' */
#define VP_PROJX(m,x,y,w,f) (\
- (MXX(m)*((VP_PAR)x)+MXY(m)*((VP_PAR)y)+MXW(m)*((VP_PAR)f))/((VP_PAR)w))
+ (MXX(m)*((VP_PAR)(x))+MXY(m)*((VP_PAR)(y))+MXW(m)*((VP_PAR)(f)))/((VP_PAR)(w)))
/* Y Projection given a point x,y,0,f and the w' */
#define VP_PROJY(m,x,y,w,f) (\
- (MYX(m)*((VP_PAR)x)+MYY(m)*((VP_PAR)y)+MYW(m)*((VP_PAR)f))/((VP_PAR)w))
+ (MYX(m)*((VP_PAR)(x))+MYY(m)*((VP_PAR)(y))+MYW(m)*((VP_PAR)(f)))/((VP_PAR)(w)))
/* Set the reference id for a motion */
#define VP_SET_REFID(m,id) do { (m).refid=id; } while (0)