Skip to content

Commit

Permalink
yet another tail prepadding condition fix, fix #57
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Feb 23, 2020
1 parent 1450ec6 commit 4b626f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/waifu2x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ int Waifu2x::process(const ncnn::Mat& inimage, ncnn::Mat& outimage) const
for (int yi = 0; yi < ytiles; yi++)
{
int in_tile_y0 = std::max(yi * TILE_SIZE_Y - prepadding, 0);
int in_tile_y1 = std::min((yi + 1) * TILE_SIZE_Y + prepadding_bottom, h);
int in_tile_y1 = std::min((yi + 1) * TILE_SIZE_Y + (yi == ytiles - 1 ? prepadding_bottom : prepadding), h);

ncnn::Mat in;
if (net.opt.use_fp16_storage && net.opt.use_int8_storage)
Expand Down

0 comments on commit 4b626f8

Please sign in to comment.