Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/libmv/patches/high_distortion_crash_fix.patch')
-rw-r--r--extern/libmv/patches/high_distortion_crash_fix.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/extern/libmv/patches/high_distortion_crash_fix.patch b/extern/libmv/patches/high_distortion_crash_fix.patch
new file mode 100644
index 00000000000..54ab66fa27c
--- /dev/null
+++ b/extern/libmv/patches/high_distortion_crash_fix.patch
@@ -0,0 +1,21 @@
+diff --git a/src/libmv/simple_pipeline/camera_intrinsics.cc b/src/libmv/simple_pipeline/camera_intrinsics.cc
+index 4e88e1f..f9888ff 100644
+--- a/src/libmv/simple_pipeline/camera_intrinsics.cc
++++ b/src/libmv/simple_pipeline/camera_intrinsics.cc
+@@ -160,9 +160,13 @@ void CameraIntrinsics::ComputeLookupGrid(Offset* grid, int width, int height) {
+ if( iy < 0 ) { iy = 0, fy = 0; }
+ if( ix >= width-2 ) ix = width-2;
+ if( iy >= height-2 ) iy = height-2;
+- //assert( ix-x > -128 && ix-x < 128 && iy-y > -128 && iy-y < 128 );
+- Offset offset = { ix-x, iy-y, fx, fy };
+- grid[y*width+x] = offset;
++ if ( ix-x > -128 && ix-x < 128 && iy-y > -128 && iy-y < 128 ) {
++ Offset offset = { ix-x, iy-y, fx, fy };
++ grid[y*width+x] = offset;
++ } else {
++ Offset offset = { 0, 0, 0, 0 };
++ grid[y*width+x] = offset;
++ }
+ }
+ }
+ }