From d6d3c2a4fb238068d0bc35f3feb604dc27838b84 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 28 Jul 2024 12:52:08 +0200 Subject: [PATCH] qimagescale: fix compiler warnings [-Wunused-function] --- crengine/qimagescale/qimagescale.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crengine/qimagescale/qimagescale.cpp b/crengine/qimagescale/qimagescale.cpp index a836daf82..4bc3a5e3a 100644 --- a/crengine/qimagescale/qimagescale.cpp +++ b/crengine/qimagescale/qimagescale.cpp @@ -272,6 +272,8 @@ static QImageScaleInfo* QImageScale::qimageCalcScaleInfo(const unsigned char* __ } +#if defined(FBINK_QIS_NO_SIMD) || (!defined(__SSE4_1__) && !defined(__ARM_NEON__)) + static void qt_qimageScaleAARGBA_up_x_down_y(QImageScaleInfo *isi, unsigned int * __restrict dest, int dw, int dh, int dow, int sow); @@ -281,6 +283,8 @@ static void qt_qimageScaleAARGBA_down_x_up_y(QImageScaleInfo *isi, unsigned int static void qt_qimageScaleAARGBA_down_xy(QImageScaleInfo *isi, unsigned int * __restrict dest, int dw, int dh, int dow, int sow); +#endif + #ifndef FBINK_QIS_NO_SIMD #if defined(__SSE4_1__) template @@ -397,6 +401,8 @@ static void qt_qimageScaleAARGBA(QImageScaleInfo *isi, unsigned int * __restrict } } +#if defined(FBINK_QIS_NO_SIMD) || (!defined(__SSE4_1__) && !defined(__ARM_NEON__)) + inline static void qt_qimageScaleAARGBA_helper(const unsigned int * __restrict pix, const int xyap, const int Cxy, const int step, int &r, int &g, int &b, int &a) { r = qRed(*pix) * xyap; @@ -553,6 +559,8 @@ static void qt_qimageScaleAARGB_down_x_up_y(QImageScaleInfo *isi, unsigned int * static void qt_qimageScaleAARGB_down_xy(QImageScaleInfo *isi, unsigned int * __restrict dest, int dw, int dh, int dow, int sow); +#endif + /* scale by area sampling - IGNORE the ALPHA byte*/ static void qt_qimageScaleAARGB(QImageScaleInfo *isi, unsigned int * __restrict dest, int dw, int dh, int dow, int sow) @@ -606,6 +614,8 @@ static void qt_qimageScaleAARGB(QImageScaleInfo *isi, unsigned int * __restrict } +#if defined(FBINK_QIS_NO_SIMD) || (!defined(__SSE4_1__) && !defined(__ARM_NEON__)) + inline static void qt_qimageScaleAARGB_helper(const unsigned int * __restrict pix, const int xyap, const int Cxy, const int step, int &r, int &g, int &b) { r = qRed(*pix) * xyap; @@ -743,6 +753,8 @@ static void qt_qimageScaleAARGB_down_xy(QImageScaleInfo *isi, unsigned int * __r } } +#endif + unsigned char* qSmoothScaleImage(const unsigned char* __restrict src, int sw, int sh, bool ignore_alpha, int dw, int dh) { unsigned char* __restrict buffer = nullptr;