summaryrefslogtreecommitdiff
path: root/modules/cvtt/image_compress_cvtt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/cvtt/image_compress_cvtt.cpp')
-rw-r--r--modules/cvtt/image_compress_cvtt.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp
index 3a371c8597..17af6bff09 100644
--- a/modules/cvtt/image_compress_cvtt.cpp
+++ b/modules/cvtt/image_compress_cvtt.cpp
@@ -30,9 +30,9 @@
#include "image_compress_cvtt.h"
-#include "os/os.h"
-#include "os/thread.h"
-#include "print_string.h"
+#include "core/os/os.h"
+#include "core/os/thread.h"
+#include "core/print_string.h"
#include <ConvectionKernels.h>
@@ -247,8 +247,8 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::CompressS
}
dst_ofs += (MAX(4, bw) * MAX(4, bh)) >> shift;
- w >>= 1;
- h >>= 1;
+ w = MAX(w / 2, 1);
+ h = MAX(h / 2, 1);
}
if (num_job_threads > 0) {