Commit d1afa0e3 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3234 from vpisarev:fixed_photo_test_failure

parents 1578dd10 aa6ba149
...@@ -341,12 +341,9 @@ pyrUp_( const Mat& _src, Mat& _dst, int) ...@@ -341,12 +341,9 @@ pyrUp_( const Mat& _src, Mat& _dst, int)
for( int y = 0; y < ssize.height; y++ ) for( int y = 0; y < ssize.height; y++ )
{ {
T* dst0 = _dst.ptr<T>(y*2); T* dst0 = _dst.ptr<T>(y*2);
T* dst1 = _dst.ptr<T>(y*2+1); T* dst1 = _dst.ptr<T>(std::min(y*2+1, dsize.height-1));
WT *row0, *row1, *row2; WT *row0, *row1, *row2;
if( y*2+1 >= dsize.height )
dst1 = dst0;
// fill the ring buffer (horizontal convolution and decimation) // fill the ring buffer (horizontal convolution and decimation)
for( ; sy <= y + 1; sy++ ) for( ; sy <= y + 1; sy++ )
{ {
......
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