Commit a206e121 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #7876 from mshabunin:fix-sgbm-memory

parents 75eeb25c bfde5cdd
...@@ -366,7 +366,7 @@ static void computeDisparitySGBM( const Mat& img1, const Mat& img2, ...@@ -366,7 +366,7 @@ static void computeDisparitySGBM( const Mat& img1, const Mat& img2,
PixType* tempBuf = (PixType*)(disp2ptr + width); PixType* tempBuf = (PixType*)(disp2ptr + width);
// add P2 to every C(x,y). it saves a few operations in the inner loops // add P2 to every C(x,y). it saves a few operations in the inner loops
for( k = 0; k < width1*D; k++ ) for(k = 0; k < (int)CSBufSize; k++ )
Cbuf[k] = (CostType)P2; Cbuf[k] = (CostType)P2;
for( int pass = 1; pass <= npasses; pass++ ) for( int pass = 1; pass <= npasses; pass++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment