Skip to content

Commit b5755b1

Browse files
vpisarevOpenCV Buildbot
authored and
OpenCV Buildbot
committed
Merge pull request opencv#2588 from vpisarev:fix_samples_n_unused
2 parents 7b366df + 1b339eb commit b5755b1

File tree

6 files changed

+3
-35
lines changed

6 files changed

+3
-35
lines changed

modules/core/src/arithm.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,13 @@ template<typename T> struct OpNot
448448
T operator()( T a, T ) const { return ~a; }
449449
};
450450

451+
#if (ARITHM_USE_IPP == 1)
451452
static inline void fixSteps(Size sz, size_t elemSize, size_t& step1, size_t& step2, size_t& step)
452453
{
453454
if( sz.height == 1 )
454455
step1 = step2 = step = sz.width*elemSize;
455456
}
457+
#endif
456458

457459
static void add8u( const uchar* src1, size_t step1,
458460
const uchar* src2, size_t step2,

modules/core/src/mathfuncs.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
namespace cv
4747
{
4848

49-
static const int MAX_BLOCK_SIZE = 1024;
5049
typedef void (*MathFunc)(const void* src, void* dst, int len);
5150

5251
static const float atan2_p1 = 0.9997878412794807f*(float)(180/CV_PI);

modules/core/test/test_countnonzero.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ using namespace std;
5252

5353
#define sign(a) a > 0 ? 1 : a == 0 ? 0 : -1
5454

55-
const int FLOAT_TYPE [2] = {CV_32F, CV_64F};
56-
const int INT_TYPE [5] = {CV_8U, CV_8S, CV_16U, CV_16S, CV_32S};
57-
5855
#define MAX_WIDTH 100
5956
#define MAX_HEIGHT 100
6057

modules/imgproc/src/samplers.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void getRectSubPix_Cn_(const _Tp* src, size_t src_step, Size src_size,
172172
dst[j+1] = cast_op(s1);
173173
}
174174

175-
for( j = 0; j < win_size.width; j++ )
175+
for( ; j < win_size.width; j++ )
176176
{
177177
_WTp s0 = src[j]*a11 + src[j+cn]*a12 + src[j+src_step]*a21 + src[j+src_step+cn]*a22;
178178
dst[j] = cast_op(s0);

modules/nonfree/src/sift.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,6 @@ namespace cv
111111

112112
/******************************* Defs and macros *****************************/
113113

114-
// default number of sampled intervals per octave
115-
static const int SIFT_INTVLS = 3;
116-
117-
// default sigma for initial gaussian smoothing
118-
static const float SIFT_SIGMA = 1.6f;
119-
120-
// default threshold on keypoint contrast |D(x)|
121-
static const float SIFT_CONTR_THR = 0.04f;
122-
123-
// default threshold on keypoint ratio of principle curvatures
124-
static const float SIFT_CURV_THR = 10.f;
125-
126-
// double image size before pyramid construction?
127-
static const bool SIFT_IMG_DBL = true;
128-
129114
// default width of descriptor histogram array
130115
static const int SIFT_DESCR_WIDTH = 4;
131116

modules/video/src/simpleflow.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,6 @@ inline static float dist(const Vec2f& p1, const Vec2f& p2) {
6666
(p1[1] - p2[1]) * (p1[1] - p2[1]);
6767
}
6868

69-
inline static float dist(const Point2f& p1, const Point2f& p2) {
70-
return (p1.x - p2.x) * (p1.x - p2.x) +
71-
(p1.y - p2.y) * (p1.y - p2.y);
72-
}
73-
74-
inline static float dist(float x1, float y1, float x2, float y2) {
75-
return (x1 - x2) * (x1 - x2) +
76-
(y1 - y2) * (y1 - y2);
77-
}
78-
79-
inline static int dist(int x1, int y1, int x2, int y2) {
80-
return (x1 - x2) * (x1 - x2) +
81-
(y1 - y2) * (y1 - y2);
82-
}
83-
8469
template<class T>
8570
inline static T min(T t1, T t2, T t3) {
8671
return (t1 <= t2 && t1 <= t3) ? t1 : min(t2, t3);

0 commit comments

Comments
 (0)