提交 556206de 编写于 作者: I Ilya Lavrenov

fixed defects found by coverity scan

上级 a4225942
...@@ -926,7 +926,6 @@ protected: ...@@ -926,7 +926,6 @@ protected:
void detectImpl(InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask) const; void detectImpl(InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask) const;
void computeImpl(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors) const; void computeImpl(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors) const;
CV_PROP int descriptor;
CV_PROP bool extended; CV_PROP bool extended;
CV_PROP bool upright; CV_PROP bool upright;
}; };
......
...@@ -3326,7 +3326,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) ...@@ -3326,7 +3326,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
dst = _dst.getMat(); dst = _dst.getMat();
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
if( code == CV_BGR2BGRA || code == CV_RGB2RGBA) if( code == CV_BGR2BGRA)
{ {
if ( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippiSwapChannelsC3C4RTab[depth], 0, 1, 2)) ) if ( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippiSwapChannelsC3C4RTab[depth], 0, 1, 2)) )
return; return;
......
...@@ -1917,12 +1917,13 @@ class IPPresizeInvoker : ...@@ -1917,12 +1917,13 @@ class IPPresizeInvoker :
{ {
public: public:
IPPresizeInvoker(const Mat & _src, Mat & _dst, double _inv_scale_x, double _inv_scale_y, int _mode, bool *_ok) : IPPresizeInvoker(const Mat & _src, Mat & _dst, double _inv_scale_x, double _inv_scale_y, int _mode, bool *_ok) :
ParallelLoopBody(), src(_src), dst(_dst), inv_scale_x(_inv_scale_x), inv_scale_y(_inv_scale_y), mode(_mode), ok(_ok) ParallelLoopBody(), src(_src), dst(_dst), inv_scale_x(_inv_scale_x),
inv_scale_y(_inv_scale_y), pSpec(NULL), mode(_mode),
func(NULL), getBufferSizeFunc(NULL), getSrcOffsetFunc(NULL), ok(_ok)
{ {
*ok = true; *ok = true;
IppiSize srcSize, dstSize; IppiSize srcSize, dstSize;
int type = src.type(); int type = src.type(), specSize = 0, initSize = 0;
int specSize = 0, initSize = 0;
srcSize.width = src.cols; srcSize.width = src.cols;
srcSize.height = src.rows; srcSize.height = src.rows;
dstSize.width = dst.cols; dstSize.width = dst.cols;
...@@ -1958,7 +1959,7 @@ public: ...@@ -1958,7 +1959,7 @@ public:
virtual void operator() (const Range& range) const virtual void operator() (const Range& range) const
{ {
if (*ok == false) if (*ok == false)
return; return;
int cn = src.channels(); int cn = src.channels();
int dsty = min(cvRound(range.start * inv_scale_y), dst.rows); int dsty = min(cvRound(range.start * inv_scale_y), dst.rows);
...@@ -1987,7 +1988,7 @@ private: ...@@ -1987,7 +1988,7 @@ private:
double inv_scale_x; double inv_scale_x;
double inv_scale_y; double inv_scale_y;
void *pSpec; void *pSpec;
AutoBuffer<uchar> specBuf; AutoBuffer<uchar> specBuf;
int mode; int mode;
ippiResizeFunc func; ippiResizeFunc func;
ippiResizeGetBufferSize getBufferSizeFunc; ippiResizeGetBufferSize getBufferSizeFunc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册