fill in dummy values when using movie clip distort node but compiled without libmv.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 31 Jul 2012 22:01:44 +0000 (22:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 31 Jul 2012 22:01:44 +0000 (22:01 +0000)
source/blender/blenkernel/BKE_tracking.h
source/blender/blenkernel/intern/tracking.c

index ea6034bd91b9e101bc050aabf5bfc1290c2c56dd..c14476a3b59298aa1bbeccddb47b9f061d79f4ef 100644 (file)
@@ -148,8 +148,8 @@ struct ImBuf *BKE_tracking_distortion_exec(struct MovieDistortion *distortion, s
                                            struct ImBuf *ibuf, int width, int height, float overscan, int undistort);
 void BKE_tracking_distortion_free(struct MovieDistortion *distortion);
 
-void BKE_tracking_distort_v2(struct MovieTracking *tracking, float co[2], float nco[2]);
-void BKE_tracking_undistort_v2(struct MovieTracking *tracking, float co[2], float nco[2]);
+void BKE_tracking_distort_v2(struct MovieTracking *tracking, const float co[2], float r_co[2]);
+void BKE_tracking_undistort_v2(struct MovieTracking *tracking, const float co[2], float r_co[2]);
 
 struct ImBuf *BKE_tracking_undistort_frame(struct MovieTracking *tracking, struct ImBuf *ibuf,
                                            int calibration_width, int calibration_height, float overscan);
index 5d50e8c491efa98fb9241c88bcb3085bf5ebad23..693f6fc1057ed9ad10ebe3c422a30c60a1155cd2 100644 (file)
@@ -1535,7 +1535,7 @@ void BKE_tracking_distortion_free(MovieDistortion *distortion)
        MEM_freeN(distortion);
 }
 
-void BKE_tracking_distort_v2(MovieTracking *tracking, float co[2], float nco[2])
+void BKE_tracking_distort_v2(MovieTracking *tracking, const float co[2], float r_co[2])
 {
        MovieTrackingCamera *camera = &tracking->camera;
 
@@ -1551,16 +1551,16 @@ void BKE_tracking_distort_v2(MovieTracking *tracking, float co[2], float nco[2])
                                    camera->k1, camera->k2, camera->k3, x, y, &x, &y);
 
        /* result is in image coords already */
-       nco[0] = x;
-       nco[1] = y;
+       r_co[0] = x;
+       r_co[1] = y;
 #else
        (void) camera;
        (void) co;
-       (void) nco;
+       zero_v2(r_co);
 #endif
 }
 
-void BKE_tracking_undistort_v2(MovieTracking *tracking, float co[2], float nco[2])
+void BKE_tracking_undistort_v2(MovieTracking *tracking, const float co[2], float r_co[2])
 {
        MovieTrackingCamera *camera = &tracking->camera;
 
@@ -1571,12 +1571,12 @@ void BKE_tracking_undistort_v2(MovieTracking *tracking, float co[2], float nco[2
        libmv_InvertIntrinsics(camera->focal, camera->principal[0], camera->principal[1] * aspy,
                               camera->k1, camera->k2, camera->k3, x, y, &x, &y);
 
-       nco[0] = x * camera->focal + camera->principal[0];
-       nco[1] = y * camera->focal + camera->principal[1] * aspy;
+       r_co[0] = x * camera->focal + camera->principal[0];
+       r_co[1] = y * camera->focal + camera->principal[1] * aspy;
 #else
        (void) camera;
        (void) co;
-       (void) nco;
+       zero_v2(r_co);
 #endif
 }