forked from bartvdbraak/blender
22 lines
896 B
Diff
22 lines
896 B
Diff
|
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;
|
||
|
+ }
|
||
|
}
|
||
|
}
|
||
|
}
|