Camera tracking: fixed incorrect auto-scale calculation for 2d stabilization
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 17 Feb 2012 08:17:46 +0000 (08:17 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 17 Feb 2012 08:17:46 +0000 (08:17 +0000)
--
svn merge -r44146:44147 ^/branches/soc-2011-tomato

source/blender/blenkernel/intern/tracking.c

index 695ea1dc07a2f2f2c57fd633a1b82847b2c0b4d9..f089aae578bef972d2c59a139571866b384c4b32 100644 (file)
@@ -2445,8 +2445,8 @@ static void calculate_stabdata(MovieTracking *tracking, int framenr, float width
        *scale= (stab->scale-1.0f)*stab->scaleinf+1.0f;
        *angle= 0.0f;
 
-       loc[0]= (firstmedian[0]-median[0])*width*(*scale);
-       loc[1]= (firstmedian[1]-median[1])*height*(*scale);
+       loc[0]= (firstmedian[0]-median[0])*width;
+       loc[1]= (firstmedian[1]-median[1])*height;
 
        mul_v2_fl(loc, stab->locinf);
 
@@ -2725,7 +2725,7 @@ void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float sc
        invert_m4_m4(icmat, cmat);
 
        size_to_mat4(smat, svec);               /* scale matrix */
-       add_v2_v2(lmat[3], loc);                /* tranlation matrix */
+       add_v2_v2(lmat[3], loc);                /* translation matrix */
        rotate_m4(rmat, 'Z', angle);    /* rotation matrix */
 
        /* compose transformation matrix */