fixed top-right and bottom-right corners filtering in the case of constant border (ticket #1058)

This commit is contained in:
Vadim Pisarevsky 2011-05-19 12:19:48 +00:00
parent 613a69abe8
commit d40320090b

View File

@ -222,16 +222,8 @@ int FilterEngine::start(Size _wholeSize, Rect _roi, int _maxBufRows)
constBorderRow.resize(getElemSize(bufType)*(maxWidth + ksize.width - 1 + VEC_ALIGN)); constBorderRow.resize(getElemSize(bufType)*(maxWidth + ksize.width - 1 + VEC_ALIGN));
uchar *dst = alignPtr(&constBorderRow[0], VEC_ALIGN), *tdst; uchar *dst = alignPtr(&constBorderRow[0], VEC_ALIGN), *tdst;
int n = (int)constBorderValue.size(), N; int n = (int)constBorderValue.size(), N;
if( isSeparable() )
{
tdst = &srcRow[0];
N = (maxWidth + ksize.width - 1)*esz; N = (maxWidth + ksize.width - 1)*esz;
} tdst = isSeparable() ? &srcRow[0] : dst;
else
{
tdst = dst;
N = maxWidth*esz;
}
for( i = 0; i < N; i += n ) for( i = 0; i < N; i += n )
{ {