From 5eea93c6e7079dda69d7a0ce9c1106ff5e641143 Mon Sep 17 00:00:00 2001 From: TNTwise <77559100+TNTwise@users.noreply.github.com> Date: Sun, 12 Jan 2025 21:43:36 +0000 Subject: [PATCH] Update rife.cpp --- src/rife.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rife.cpp b/src/rife.cpp index db9f285..31ae2cd 100644 --- a/src/rife.cpp +++ b/src/rife.cpp @@ -2500,7 +2500,7 @@ int RIFE::process_v4(const ncnn::Mat& in0image, const ncnn::Mat& in1image, float int w_padded, h_padded; w_padded = (w + padding - 1) / padding * padding; - h_padded = (h + padding) / padding * padding; + h_padded = (h + padding - 1) / padding * padding; const size_t in_out_tile_elemsize = opt.use_fp16_storage ? 2u : 4u; @@ -3231,7 +3231,7 @@ int RIFE::process_v4_cpu(const ncnn::Mat& in0image, const ncnn::Mat& in1image, f // pad to 32n int w_padded, h_padded; w_padded = (w + padding - 1) / padding * padding; - h_padded = (h + padding) / padding * padding; + h_padded = (h + padding - 1) / padding * padding; ncnn::Mat in0; ncnn::Mat in1;