[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39503] branches/soc-2011-tomato/extern/ libmv: Camera tracking integration
Sergey Sharybin
g.ulairi at gmail.com
Wed Aug 17 20:37:25 CEST 2011
Revision: 39503
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39503
Author: nazgul
Date: 2011-08-17 18:37:25 +0000 (Wed, 17 Aug 2011)
Log Message:
-----------
Camera tracking integration
===========================
Just another fix for MSVC.
Modified Paths:
--------------
branches/soc-2011-tomato/extern/libmv/ChangeLog
branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.cc
branches/soc-2011-tomato/extern/libmv/libmv/tracking/sad.cc
Modified: branches/soc-2011-tomato/extern/libmv/ChangeLog
===================================================================
--- branches/soc-2011-tomato/extern/libmv/ChangeLog 2011-08-17 18:29:01 UTC (rev 39502)
+++ branches/soc-2011-tomato/extern/libmv/ChangeLog 2011-08-17 18:37:25 UTC (rev 39503)
@@ -1,3 +1,16 @@
+commit a4876d8c40dcde615b44009c38c49e9a1b1d4698
+Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
+Date: Wed Aug 17 20:26:01 2011 +0200
+
+ Hack to make sad.cc compile with MSVC on system without support for the SSE instruction set.
+
+commit 0de723dfce5bbe44dbd19be8cd6dd6e9b03b7924
+Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
+Date: Wed Aug 17 20:10:46 2011 +0200
+
+ Fix slow path (for computers without SSE2).
+ Heap allocate scores in detect.cc
+
commit 65a9d496f81e8b37eae39a4063957b8be9a4e6f0
Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
Date: Wed Aug 17 19:25:17 2011 +0200
Modified: branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.cc
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.cc 2011-08-17 18:29:01 UTC (rev 39502)
+++ branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/detect.cc 2011-08-17 18:37:25 UTC (rev 39503)
@@ -23,6 +23,7 @@
****************************************************************************/
#include "libmv/simple_pipeline/detect.h"
+#include <stdlib.h>
#include <string.h>
namespace libmv {
@@ -54,7 +55,7 @@
void Detect(ubyte* image, int stride, int width, int height, Feature* detected, int* count, int distance, ubyte* pattern) {
unsigned short histogram[256];
memset(histogram,0,sizeof(histogram));
- ubyte scores[width*height];
+ ubyte* scores = new ubyte[width*height];
memset(scores,0,sizeof(scores));
const int r = 1; //radius for self similarity comparison
for(int y=distance; y<height-distance; y++) {
@@ -103,6 +104,7 @@
}
}
*count = i;
+ free(scores);
}
}
Modified: branches/soc-2011-tomato/extern/libmv/libmv/tracking/sad.cc
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/tracking/sad.cc 2011-08-17 18:29:01 UTC (rev 39502)
+++ branches/soc-2011-tomato/extern/libmv/libmv/tracking/sad.cc 2011-08-17 18:37:25 UTC (rev 39503)
@@ -57,6 +57,8 @@
//MSVC apparently doesn't support any float rounding.
int fx = _mm_cvtss_si32(_mm_set_ss(p.x*k));
int fy = _mm_cvtss_si32(_mm_set_ss(p.y*k));
+#elif defined(_MSC_VER)
+ int fx = int(p.x*k+0.5), fy = int(p.y*k+0.5);
#else
int fx = lround(p.x*k), fy = lround(p.y*k);
#endif
More information about the Bf-blender-cvs
mailing list