提交 aa8fbc26 编写于 作者: M Marina Kolpakova

fix for down rounded output sizes

上级 5a41c650
......@@ -1272,11 +1272,14 @@ static void resizeArea_( const Mat& src, Mat& dst, const DecimateAlpha* xofs, in
WT beta1 = 1 - beta;
T* D = (T*)(dst.data + dst.step*cur_dy);
if( fabs(beta) < 1e-3 )
{
if(cur_dy >= dsize.height) return;
for( dx = 0; dx < dsize.width; dx++ )
{
D[dx] = saturate_cast<T>((sum[dx] + buf[dx]) / min(scale_y, src.cols - cur_dy * scale_y));
sum[dx] = buf[dx] = 0;
}
}
else
for( dx = 0; dx < dsize.width; dx++ )
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册