quiet warnings when building without libmv
authorCampbell Barton <ideasman42@gmail.com>
Mon, 7 Nov 2011 16:26:23 +0000 (16:26 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 7 Nov 2011 16:26:23 +0000 (16:26 +0000)
build_files/cmake/config/blender_lite.cmake
source/blender/blenkernel/intern/tracking.c

index 6791028a888eca3b3b37f2c0b851c252d5845202..0da28a943ebc3ed30fe71b16c0c274dbc7e89527 100644 (file)
@@ -13,6 +13,7 @@ set(WITH_BULLET              OFF CACHE FORCE BOOL)
 set(WITH_CODEC_FFMPEG        OFF CACHE FORCE BOOL)
 set(WITH_CODEC_SNDFILE       OFF CACHE FORCE BOOL)
 set(WITH_FFTW3               OFF CACHE FORCE BOOL)
+set(WITH_LIBMV               OFF CACHE FORCE BOOL)
 set(WITH_GAMEENGINE          OFF CACHE FORCE BOOL)
 set(WITH_IK_ITASC            OFF CACHE FORCE BOOL)
 set(WITH_IMAGE_CINEON        OFF CACHE FORCE BOOL)
index 06a985e7d722a8701bb30767fffb50bfd6d6c702..a834628641a9f5c69bbb1b8273308cd663895877 100644 (file)
@@ -58,7 +58,9 @@
 #include "IMB_imbuf.h"
 
 #ifdef WITH_LIBMV
-#include "libmv-capi.h"
+#  include "libmv-capi.h"
+#else
+struct libmv_Features;
 #endif
 
 typedef struct MovieDistortion {
@@ -1379,6 +1381,12 @@ float BKE_tracking_solve_reconstruction(MovieTracking *tracking, int width, int
 
                return error;
        }
+#else
+       (void)tracking;
+       (void)width;
+       (void)height;
+
+       return -1.0f;
 #endif
 }
 
@@ -1581,6 +1589,10 @@ void BKE_tracking_apply_intrinsics(MovieTracking *tracking, float co[2], float n
        /* result is in image coords already */
        nco[0]= x;
        nco[1]= y;
+#else
+       (void)camera;
+       (void)co;
+       (void)nco;
 #endif
 }
 
@@ -1597,9 +1609,14 @@ void BKE_tracking_invert_intrinsics(MovieTracking *tracking, float co[2], float
 
        nco[0]= x * camera->focal + camera->principal[0];
        nco[1]= y * camera->focal + camera->principal[1] * aspy;
+#else
+       (void)camera;
+       (void)co;
+       (void)nco;
 #endif
 }
 
+#ifdef WITH_LIBMV
 static int point_in_stroke(bGPDstroke *stroke, float x, float y)
 {
        int i, prev;
@@ -1643,7 +1660,6 @@ static int point_in_layer(bGPDlayer *layer, float x, float y)
 static void retrieve_libmv_features(MovieTracking *tracking, struct libmv_Features *features,
                        int framenr, int width, int height, bGPDlayer *layer, int place_outside_layer)
 {
-#ifdef WITH_LIBMV
        int a;
 
        a= libmv_countFeatures(features);
@@ -1668,8 +1684,8 @@ static void retrieve_libmv_features(MovieTracking *tracking, struct libmv_Featur
                        track->search_flag|= SELECT;
                }
        }
-#endif
 }
+#endif
 
 void BKE_tracking_detect_fast(MovieTracking *tracking, ImBuf *ibuf,
                        int framenr, int margin, int min_trackness, int min_distance, bGPDlayer *layer,
@@ -1686,6 +1702,15 @@ void BKE_tracking_detect_fast(MovieTracking *tracking, ImBuf *ibuf,
        retrieve_libmv_features(tracking, features, framenr, ibuf->x, ibuf->y, layer, place_outside_layer);
 
        libmv_destroyFeatures(features);
+#else
+       (void)tracking;
+       (void)ibuf;
+       (void)framenr;
+       (void)margin;
+       (void)min_trackness;
+       (void)min_distance;
+       (void)layer;
+       (void)place_outside_layer;
 #endif
 }
 
@@ -2048,6 +2073,8 @@ MovieDistortion *BKE_tracking_distortion_copy(MovieDistortion *distortion)
 
 #ifdef WITH_LIBMV
        new_distortion->intrinsics= libmv_CameraIntrinsicsCopy(distortion->intrinsics);
+#else
+       (void)distortion;
 #endif
 
        return new_distortion;
@@ -2068,6 +2095,12 @@ void BKE_tracking_distortion_update(MovieDistortion *distortion, MovieTracking *
                                camera->principal[0], camera->principal[1] * aspy,
                                camera->k1, camera->k2, camera->k3, width, height * aspy);
        }
+#else
+       (void)distortion;
+       (void)width;
+       (void)height;
+       (void)camera;
+       (void)aspy;
 #endif
 }
 
@@ -2108,6 +2141,11 @@ ImBuf *BKE_tracking_distortion_exec(MovieDistortion *distortion, MovieTracking *
 #endif
        }
 
+#ifndef WITH_LIBMV
+       (void)overscan;
+       (void)undistort;
+#endif
+
        return resibuf;
 }