[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56770] branches/soc-2011-tomato: Merging r56752 through r56769 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Mon May 13 16:53:37 CEST 2013


Revision: 56770
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56770
Author:   nazgul
Date:     2013-05-13 14:53:37 +0000 (Mon, 13 May 2013)
Log Message:
-----------
Merging r56752 through r56769 from trunk into soc-2011-tomato

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56752
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56769

Modified Paths:
--------------
    branches/soc-2011-tomato/extern/libmv/ChangeLog
    branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/camera_intrinsics.h
    branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.cc
    branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.h
    branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/reconstruction_scale.cc
    branches/soc-2011-tomato/extern/libmv/libmv-capi.cc
    branches/soc-2011-tomato/extern/libmv/libmv-capi.h
    branches/soc-2011-tomato/release/scripts/startup/nodeitems_builtins.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_tracking.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_iterators.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_iterators.h
    branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_bridge.c
    branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_edgesplit.c
    branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_mirror.c
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_ZCombineNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_BlurBaseOperation.h
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_ZCombineOperation.cpp
    branches/soc-2011-tomato/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-tomato/source/blender/editors/object/object_transform.c
    branches/soc-2011-tomato/source/blender/editors/screen/area.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_stroke.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/sculpt.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c
    branches/soc-2011-tomato/source/blender/windowmanager/WM_api.h
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_draw.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_event_system.c
    branches/soc-2011-tomato/source/blenderplayer/bad_level_call_stubs/stubs.c
    branches/soc-2011-tomato/source/gameengine/Ketsji/BL_Action.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/BL_Action.h

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-56751
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-56769

Modified: branches/soc-2011-tomato/extern/libmv/ChangeLog
===================================================================
--- branches/soc-2011-tomato/extern/libmv/ChangeLog	2013-05-13 14:39:06 UTC (rev 56769)
+++ branches/soc-2011-tomato/extern/libmv/ChangeLog	2013-05-13 14:53:37 UTC (rev 56770)
@@ -1,3 +1,19 @@
+commit 61ac890908a397860cabc60207500039876532cc
+Author: Sergey Sharybin <sergey.vfx at gmail.com>
+Date:   Mon May 13 04:44:14 2013 +0600
+
+    Pass ApplyRadialDistortionCameraIntrinsics input arguments by reference
+    
+    This shall save some CPU time on calling copy constructor and give
+    some boost of bundle adjuster (where jet could take some time to
+    be passed by value).
+
+commit 4d005ff0771e0e28159be25f8da69d983641384f
+Author: Sergey Sharybin <sergey.vfx at gmail.com>
+Date:   Mon May 13 04:22:05 2013 +0600
+
+    Minor code style cleanup.
+
 commit f003b9e3031db4592c2d91b1ea2538c73b7e767d
 Author: Sergey Sharybin <sergey.vfx at gmail.com>
 Date:   Sun May 12 22:34:54 2013 +0600
@@ -618,26 +634,3 @@
     This information is useful, but in cases when you, say,
     working on a bundler it's annoying to scroll all the
     information up.
-
-commit ac252bb1250b3028b9c94736b644e7ab4e7b14b8
-Author: Sergey Sharybin <sergey.vfx at gmail.com>
-Date:   Fri Mar 1 17:36:19 2013 +0600
-
-    Move radial distortion code to own templated function
-    
-    This shall not lead to any functional changes, just
-    avoids radial distortion code duplicated in camera
-    intrinsics and bundling code.
-    
-    For fancier bundle adjustment support of  different
-    distortion models this is not actually enough and
-    would need to make some bigger changes, but this
-    changes makes code a bit easier to maintain already.
-
-commit c253b794612dd529e1d3a9bd7a7c41c32c9a9abb
-Author: Sergey Sharybin <sergey.vfx at gmail.com>
-Date:   Fri Mar 1 17:33:27 2013 +0600
-
-    Use threaded cost function, jacobian and linear solver
-    computation, so bundling is as fast as it could be with
-    current parameter block structure.

Modified: branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/camera_intrinsics.h
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/camera_intrinsics.h	2013-05-13 14:39:06 UTC (rev 56769)
+++ branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/camera_intrinsics.h	2013-05-13 14:53:37 UTC (rev 56770)
@@ -172,14 +172,17 @@
 // camera coordinates (i.e. the principal point is at (0, 0)) to get image
 // coordinates in pixels. Templated for use with autodifferentiation.
 template <typename T>
-inline void ApplyRadialDistortionCameraIntrinsics(T focal_length_x,
-                                                  T focal_length_y,
-                                                  T principal_point_x,
-                                                  T principal_point_y,
-                                                  T k1, T k2, T k3,
-                                                  T p1, T p2,
-                                                  T normalized_x,
-                                                  T normalized_y,
+inline void ApplyRadialDistortionCameraIntrinsics(const T &focal_length_x,
+                                                  const T &focal_length_y,
+                                                  const T &principal_point_x,
+                                                  const T &principal_point_y,
+                                                  const T &k1,
+                                                  const T &k2,
+                                                  const T &k3,
+                                                  const T &p1,
+                                                  const T &p2,
+                                                  const T &normalized_x,
+                                                  const T &normalized_y,
                                                   T *image_x,
                                                   T *image_y) {
   T x = normalized_x;

Modified: branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.cc
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.cc	2013-05-13 14:39:06 UTC (rev 56769)
+++ branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.cc	2013-05-13 14:53:37 UTC (rev 56770)
@@ -132,7 +132,7 @@
 }
 #endif
 
-void DetectMORAVEC(ubyte* image,
+void DetectMORAVEC(const ubyte* image,
                    int stride, int width, int height,
                    Feature* detected, int* count,
                    int distance,
@@ -144,7 +144,7 @@
   const int r = 1;  // radius for self similarity comparison
   for (int y = distance; y < height-distance; y++) {
     for (int x = distance; x < width-distance; x++) {
-      ubyte* s = &image[y*stride+x];
+      const ubyte* s = &image[y*stride+x];
       int score =  // low self-similarity with overlapping patterns
                    // OPTI: load pattern once
           SAD(s, s-r*stride-r, stride, stride)+SAD(s, s-r*stride, stride, stride)+SAD(s, s-r*stride+r, stride, stride)+

Modified: branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.h
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.h	2013-05-13 14:39:06 UTC (rev 56769)
+++ branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.h	2013-05-13 14:53:37 UTC (rev 56770)
@@ -88,7 +88,7 @@
     \note \a You can crop the image (to avoid detecting markers near the borders) without copying:
              image += marginY*stride+marginX, width -= 2*marginX, height -= 2*marginY;
 */
-void DetectMORAVEC(ubyte* image, int stride, int width, int height,
+void DetectMORAVEC(const ubyte* image, int stride, int width, int height,
                    Feature* detected, int* count, int distance /*=32*/,
                    ubyte* pattern /*=0*/);
 

Modified: branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/reconstruction_scale.cc
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/reconstruction_scale.cc	2013-05-13 14:39:06 UTC (rev 56769)
+++ branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/reconstruction_scale.cc	2013-05-13 14:53:37 UTC (rev 56770)
@@ -38,8 +38,9 @@
   double max_distance = 0.0;
   for (int i = 0; i < all_cameras.size(); ++i) {
     double distance = (all_cameras[i].t - cameras_mass_center).squaredNorm();
-    if (distance > max_distance)
+    if (distance > max_distance) {
       max_distance = distance;
+    }
   }
 
   if (max_distance == 0.0) {

Modified: branches/soc-2011-tomato/extern/libmv/libmv-capi.cc
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv-capi.cc	2013-05-13 14:39:06 UTC (rev 56769)
+++ branches/soc-2011-tomato/extern/libmv/libmv-capi.cc	2013-05-13 14:53:37 UTC (rev 56770)
@@ -36,6 +36,13 @@
 
 #include "libmv-capi.h"
 
+#include <cstdlib>
+#include <cassert>
+
+#if defined(DUMP_FAILURE) || defined (DUMP_ALWAYS)
+#  include <png.h>
+#endif
+
 #include "libmv/logging/logging.h"
 
 #include "libmv/tracking/track_region.h"
@@ -51,13 +58,6 @@
 #include "libmv/simple_pipeline/reconstruction_scale.h"
 #include "libmv/simple_pipeline/keyframe_selection.h"
 
-#include <stdlib.h>
-#include <assert.h>
-
-#if defined(DUMP_FAILURE) || defined (DUMP_ALWAYS)
-#  include <png.h>
-#endif
-
 #ifdef _MSC_VER
 #  define snprintf _snprintf
 #endif
@@ -140,7 +140,8 @@
 }
 
 #if defined(DUMP_FAILURE) || defined (DUMP_ALWAYS)
-static void savePNGImage(png_bytep *row_pointers, int width, int height, int depth, int color_type, char *file_name)
+static void savePNGImage(png_bytep *row_pointers, int width, int height, int depth, int color_type,
+                         const char *file_name)
 {
 	png_infop info_ptr;
 	png_structp png_ptr;
@@ -422,10 +423,13 @@
 	void *callback_customdata_;
 };
 
-static void libmv_solveRefineIntrinsics(libmv::Tracks *tracks, libmv::CameraIntrinsics *intrinsics,
-			libmv::EuclideanReconstruction *reconstruction, int refine_intrinsics,
-			reconstruct_progress_update_cb progress_update_callback, void *callback_customdata,
-			int bundle_constraints = libmv::BUNDLE_NO_CONSTRAINTS)
+static void libmv_solveRefineIntrinsics(const libmv::Tracks &tracks,
+                                        const int refine_intrinsics,
+                                        const int bundle_constraints,
+                                        reconstruct_progress_update_cb progress_update_callback,
+                                        void *callback_customdata,
+                                        libmv::EuclideanReconstruction *reconstruction,
+                                        libmv::CameraIntrinsics *intrinsics)
 {
 	/* only a few combinations are supported but trust the caller */
 	int bundle_intrinsics = 0;
@@ -445,15 +449,15 @@
 
 	progress_update_callback(callback_customdata, 1.0, "Refining solution");
 
-	libmv::EuclideanBundleCommonIntrinsics(*(libmv::Tracks *)tracks,
+	libmv::EuclideanBundleCommonIntrinsics(tracks,
 	                                       bundle_intrinsics,
 	                                       bundle_constraints,
 	                                       reconstruction,

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list