diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-10-29 13:46:53 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-10-29 13:46:53 +0400 |
commit | a19b0d358af8348a8e544e18f6234ee392ca9a0a (patch) | |
tree | f6dab3bfb099fa094dbc2f27f87c208e35cef701 | |
parent | 9d2caba92ebed06de4dc66feaddd012c9d44961e (diff) |
Camera tracing integration
==========================
Fix for SAD tracking sliding marker.
-rw-r--r-- | extern/libmv/CMakeLists.txt | 3 | ||||
-rw-r--r-- | extern/libmv/SConscript | 2 | ||||
-rwxr-xr-x | extern/libmv/bundle.sh | 5 | ||||
-rw-r--r-- | extern/libmv/libmv-capi.cpp | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 10 |
5 files changed, 12 insertions, 10 deletions
diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt index aaef378e7f8..35d04c64e14 100644 --- a/extern/libmv/CMakeLists.txt +++ b/extern/libmv/CMakeLists.txt @@ -31,7 +31,8 @@ set(INC ) set(INC_SYS - + ${PNG_INCLUDE_DIR} + ${ZLIB_INCLUDE_DIRS} ) set(SRC diff --git a/extern/libmv/SConscript b/extern/libmv/SConscript index 52e2da56a0d..1ffc6233c1d 100644 --- a/extern/libmv/SConscript +++ b/extern/libmv/SConscript @@ -26,6 +26,8 @@ src += env.Glob('third_party/ssba/Geometry/*.cpp') src += env.Glob('third_party/ssba/Math/*.cpp') incs = '. ../Eigen3' +incs += ' ' + env['BF_PNG_INC'] +incs += ' ' + env['BF_ZLIB_INC'] if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog ./third_party/msinttypes' diff --git a/extern/libmv/bundle.sh b/extern/libmv/bundle.sh index ff84c5ddc52..c8df8ae7341 100755 --- a/extern/libmv/bundle.sh +++ b/extern/libmv/bundle.sh @@ -123,7 +123,8 @@ set(INC ) set(INC_SYS - + ${PNG_INCLUDE_DIR} + ${ZLIB_INCLUDE_DIRS} ) set(SRC @@ -214,6 +215,8 @@ src = env.Glob("*.cpp") $src incs = '. ../Eigen3' +incs += ' ' + env['BF_PNG_INC'] +incs += ' ' + env['BF_ZLIB_INC'] if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog ./third_party/msinttypes' diff --git a/extern/libmv/libmv-capi.cpp b/extern/libmv/libmv-capi.cpp index d454f97799d..f1672581819 100644 --- a/extern/libmv/libmv-capi.cpp +++ b/extern/libmv/libmv-capi.cpp @@ -25,7 +25,7 @@ */ /* define this to generate PNG images with content of search areas - tracking between which failed */ + tracking between which failed */ #undef DUMP_FAILURE #include "libmv-capi.h" diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 2c58df2ae9e..d5e6ac14100 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -759,7 +759,7 @@ static unsigned char *get_ucharbuf(ImBuf *ibuf) *cp= FTOCHAR(0.2126f*rrgbf[0] + 0.7152f*rrgbf[1] + 0.0722f*rrgbf[2]); } else { - char *rrgb= (char*)ibuf->rect + pixel*4; + unsigned char *rrgb= (unsigned char*)ibuf->rect + pixel*4; *cp= 0.2126f*rrgb[0] + 0.7152f*rrgb[1] + 0.0722f*rrgb[2]; } @@ -776,16 +776,12 @@ static unsigned char *get_search_bytebuf(ImBuf *ibuf, MovieTrackingTrack *track, { ImBuf *tmpibuf; unsigned char *pixels; - int width, height; - - width= (track->search_max[0]-track->search_min[0])*ibuf->x; - height= (track->search_max[1]-track->search_min[1])*ibuf->y; tmpibuf= BKE_tracking_get_search_imbuf(ibuf, track, marker, 0, 0, pos, origin); disable_imbuf_channels(tmpibuf, track); - *width_r= width; - *height_r= height; + *width_r= tmpibuf->x; + *height_r= tmpibuf->y; pixels= get_ucharbuf(tmpibuf); |