Skip to content

Commit

Permalink
qimagescale: fix compiler warnings [-Wunused-function]
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-pierre authored and poire-z committed Jul 29, 2024
1 parent 70ca695 commit 159dba1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions crengine/qimagescale/qimagescale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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<bool RGB>
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 159dba1

Please sign in to comment.