mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08:00
imgproc(resize): drop unused 'pix_size4'
This commit is contained in:
parent
be17f532e1
commit
61c4cfd896
@ -59,8 +59,8 @@ class resizeNNInvokerAVX4 CV_FINAL :
|
||||
public ParallelLoopBody
|
||||
{
|
||||
public:
|
||||
resizeNNInvokerAVX4(const Mat& _src, Mat &_dst, int *_x_ofs, int _pix_size4, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs), pix_size4(_pix_size4),
|
||||
resizeNNInvokerAVX4(const Mat& _src, Mat &_dst, int *_x_ofs, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs),
|
||||
ify(_ify)
|
||||
{
|
||||
}
|
||||
@ -129,9 +129,9 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const Mat src;
|
||||
Mat dst;
|
||||
int* x_ofs, pix_size4;
|
||||
const Mat& src;
|
||||
Mat& dst;
|
||||
int* x_ofs;
|
||||
double ify;
|
||||
|
||||
resizeNNInvokerAVX4(const resizeNNInvokerAVX4&);
|
||||
@ -142,8 +142,8 @@ class resizeNNInvokerAVX2 CV_FINAL :
|
||||
public ParallelLoopBody
|
||||
{
|
||||
public:
|
||||
resizeNNInvokerAVX2(const Mat& _src, Mat &_dst, int *_x_ofs, int _pix_size4, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs), pix_size4(_pix_size4),
|
||||
resizeNNInvokerAVX2(const Mat& _src, Mat &_dst, int *_x_ofs, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs),
|
||||
ify(_ify)
|
||||
{
|
||||
}
|
||||
@ -235,24 +235,24 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const Mat src;
|
||||
Mat dst;
|
||||
int* x_ofs, pix_size4;
|
||||
const Mat& src;
|
||||
Mat& dst;
|
||||
int* x_ofs;
|
||||
double ify;
|
||||
|
||||
resizeNNInvokerAVX2(const resizeNNInvokerAVX2&);
|
||||
resizeNNInvokerAVX2& operator=(const resizeNNInvokerAVX2&);
|
||||
};
|
||||
|
||||
void resizeNN2_AVX2(const Range& range, const Mat& src, Mat &dst, int *x_ofs, int pix_size4, double ify)
|
||||
void resizeNN2_AVX2(const Range& range, const Mat& src, Mat &dst, int *x_ofs, double ify)
|
||||
{
|
||||
resizeNNInvokerAVX2 invoker(src, dst, x_ofs, pix_size4, ify);
|
||||
resizeNNInvokerAVX2 invoker(src, dst, x_ofs, ify);
|
||||
parallel_for_(range, invoker, dst.total() / (double)(1 << 16));
|
||||
}
|
||||
|
||||
void resizeNN4_AVX2(const Range& range, const Mat& src, Mat &dst, int *x_ofs, int pix_size4, double ify)
|
||||
void resizeNN4_AVX2(const Range& range, const Mat& src, Mat &dst, int *x_ofs, double ify)
|
||||
{
|
||||
resizeNNInvokerAVX4 invoker(src, dst, x_ofs, pix_size4, ify);
|
||||
resizeNNInvokerAVX4 invoker(src, dst, x_ofs, ify);
|
||||
parallel_for_(range, invoker, dst.total() / (double)(1 << 16));
|
||||
}
|
||||
|
||||
|
@ -970,8 +970,8 @@ class resizeNNInvoker :
|
||||
public ParallelLoopBody
|
||||
{
|
||||
public:
|
||||
resizeNNInvoker(const Mat& _src, Mat &_dst, int *_x_ofs, int _pix_size4, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs), pix_size4(_pix_size4),
|
||||
resizeNNInvoker(const Mat& _src, Mat &_dst, int *_x_ofs, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs),
|
||||
ify(_ify)
|
||||
{
|
||||
}
|
||||
@ -1052,9 +1052,9 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const Mat src;
|
||||
Mat dst;
|
||||
int* x_ofs, pix_size4;
|
||||
const Mat& src;
|
||||
Mat& dst;
|
||||
int* x_ofs;
|
||||
double ify;
|
||||
|
||||
resizeNNInvoker(const resizeNNInvoker&);
|
||||
@ -1068,7 +1068,6 @@ resizeNN( const Mat& src, Mat& dst, double fx, double fy )
|
||||
AutoBuffer<int> _x_ofs(dsize.width);
|
||||
int* x_ofs = _x_ofs.data();
|
||||
int pix_size = (int)src.elemSize();
|
||||
int pix_size4 = (int)(pix_size / sizeof(int));
|
||||
double ifx = 1./fx, ify = 1./fy;
|
||||
int x;
|
||||
|
||||
@ -1083,9 +1082,9 @@ resizeNN( const Mat& src, Mat& dst, double fx, double fy )
|
||||
if(CV_CPU_HAS_SUPPORT_AVX2 && ((pix_size == 2) || (pix_size == 4)))
|
||||
{
|
||||
if(pix_size == 2)
|
||||
opt_AVX2::resizeNN2_AVX2(range, src, dst, x_ofs, pix_size4, ify);
|
||||
opt_AVX2::resizeNN2_AVX2(range, src, dst, x_ofs, ify);
|
||||
else
|
||||
opt_AVX2::resizeNN4_AVX2(range, src, dst, x_ofs, pix_size4, ify);
|
||||
opt_AVX2::resizeNN4_AVX2(range, src, dst, x_ofs, ify);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -1093,14 +1092,14 @@ resizeNN( const Mat& src, Mat& dst, double fx, double fy )
|
||||
if(CV_CPU_HAS_SUPPORT_SSE4_1 && ((pix_size == 2) || (pix_size == 4)))
|
||||
{
|
||||
if(pix_size == 2)
|
||||
opt_SSE4_1::resizeNN2_SSE4_1(range, src, dst, x_ofs, pix_size4, ify);
|
||||
opt_SSE4_1::resizeNN2_SSE4_1(range, src, dst, x_ofs, ify);
|
||||
else
|
||||
opt_SSE4_1::resizeNN4_SSE4_1(range, src, dst, x_ofs, pix_size4, ify);
|
||||
opt_SSE4_1::resizeNN4_SSE4_1(range, src, dst, x_ofs, ify);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
resizeNNInvoker invoker(src, dst, x_ofs, pix_size4, ify);
|
||||
resizeNNInvoker invoker(src, dst, x_ofs, ify);
|
||||
parallel_for_(range, invoker, dst.total()/(double)(1<<16));
|
||||
}
|
||||
}
|
||||
|
@ -56,16 +56,16 @@ namespace cv
|
||||
namespace opt_AVX2
|
||||
{
|
||||
#if CV_TRY_AVX2
|
||||
void resizeNN2_AVX2(const Range&, const Mat&, Mat&, int*, int, double);
|
||||
void resizeNN4_AVX2(const Range&, const Mat&, Mat&, int*, int, double);
|
||||
void resizeNN2_AVX2(const Range&, const Mat&, Mat&, int*, double);
|
||||
void resizeNN4_AVX2(const Range&, const Mat&, Mat&, int*, double);
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace opt_SSE4_1
|
||||
{
|
||||
#if CV_TRY_SSE4_1
|
||||
void resizeNN2_SSE4_1(const Range&, const Mat&, Mat&, int*, int, double);
|
||||
void resizeNN4_SSE4_1(const Range&, const Mat&, Mat&, int*, int, double);
|
||||
void resizeNN2_SSE4_1(const Range&, const Mat&, Mat&, int*, double);
|
||||
void resizeNN4_SSE4_1(const Range&, const Mat&, Mat&, int*, double);
|
||||
|
||||
int VResizeLanczos4Vec_32f16u_SSE41(const float** src, ushort* dst, const float* beta, int width);
|
||||
#endif
|
||||
|
@ -59,8 +59,8 @@ class resizeNNInvokerSSE2 :
|
||||
public ParallelLoopBody
|
||||
{
|
||||
public:
|
||||
resizeNNInvokerSSE2(const Mat& _src, Mat &_dst, int *_x_ofs, int _pix_size4, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs), pix_size4(_pix_size4),
|
||||
resizeNNInvokerSSE2(const Mat& _src, Mat &_dst, int *_x_ofs, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs),
|
||||
ify(_ify)
|
||||
{
|
||||
}
|
||||
@ -110,9 +110,9 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const Mat src;
|
||||
Mat dst;
|
||||
int* x_ofs, pix_size4;
|
||||
const Mat& src;
|
||||
Mat& dst;
|
||||
int* x_ofs;
|
||||
double ify;
|
||||
|
||||
resizeNNInvokerSSE2(const resizeNNInvokerSSE2&);
|
||||
@ -123,8 +123,8 @@ class resizeNNInvokerSSE4 :
|
||||
public ParallelLoopBody
|
||||
{
|
||||
public:
|
||||
resizeNNInvokerSSE4(const Mat& _src, Mat &_dst, int *_x_ofs, int _pix_size4, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs), pix_size4(_pix_size4),
|
||||
resizeNNInvokerSSE4(const Mat& _src, Mat &_dst, int *_x_ofs, double _ify) :
|
||||
ParallelLoopBody(), src(_src), dst(_dst), x_ofs(_x_ofs),
|
||||
ify(_ify)
|
||||
{
|
||||
}
|
||||
@ -165,24 +165,24 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const Mat src;
|
||||
Mat dst;
|
||||
int* x_ofs, pix_size4;
|
||||
const Mat& src;
|
||||
Mat& dst;
|
||||
int* x_ofs;
|
||||
double ify;
|
||||
|
||||
resizeNNInvokerSSE4(const resizeNNInvokerSSE4&);
|
||||
resizeNNInvokerSSE4& operator=(const resizeNNInvokerSSE4&);
|
||||
};
|
||||
|
||||
void resizeNN2_SSE4_1(const Range& range, const Mat& src, Mat &dst, int *x_ofs, int pix_size4, double ify)
|
||||
void resizeNN2_SSE4_1(const Range& range, const Mat& src, Mat &dst, int *x_ofs, double ify)
|
||||
{
|
||||
resizeNNInvokerSSE2 invoker(src, dst, x_ofs, pix_size4, ify);
|
||||
resizeNNInvokerSSE2 invoker(src, dst, x_ofs, ify);
|
||||
parallel_for_(range, invoker, dst.total() / (double)(1 << 16));
|
||||
}
|
||||
|
||||
void resizeNN4_SSE4_1(const Range& range, const Mat& src, Mat &dst, int *x_ofs, int pix_size4, double ify)
|
||||
void resizeNN4_SSE4_1(const Range& range, const Mat& src, Mat &dst, int *x_ofs, double ify)
|
||||
{
|
||||
resizeNNInvokerSSE4 invoker(src, dst, x_ofs, pix_size4, ify);
|
||||
resizeNNInvokerSSE4 invoker(src, dst, x_ofs, ify);
|
||||
parallel_for_(range, invoker, dst.total() / (double)(1 << 16));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user