Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
d62bc8cf
Commit
d62bc8cf
authored
Apr 01, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove more old definitions from internal.hpp
parent
e972d6b8
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
84 additions
and
87 deletions
+84
-87
boost.cpp
apps/traincascade/boost.cpp
+2
-2
internal.hpp
modules/core/include/opencv2/core/internal.hpp
+39
-78
types_c.h
modules/core/include/opencv2/core/types_c.h
+4
-0
array.cpp
modules/core/src/array.cpp
+6
-0
datastructs.cpp
modules/core/src/datastructs.cpp
+6
-0
precomp.hpp
modules/core/src/precomp.hpp
+12
-6
color.cpp
modules/imgproc/src/color.cpp
+2
-0
demosaicing.cpp
modules/imgproc/src/demosaicing.cpp
+2
-0
distransform.cpp
modules/imgproc/src/distransform.cpp
+1
-0
filter.cpp
modules/imgproc/src/filter.cpp
+1
-1
precomp.hpp
modules/legacy/src/precomp.hpp
+4
-0
precomp.hpp
modules/ml/src/precomp.hpp
+3
-0
lkpyramid.cpp
modules/video/src/lkpyramid.cpp
+2
-0
No files found.
apps/traincascade/boost.cpp
View file @
d62bc8cf
...
...
@@ -44,7 +44,7 @@ static CvMat* cvPreprocessIndexArray( const CvMat* idx_arr, int data_arr_size, b
CV_FUNCNAME
(
"cvPreprocessIndexArray"
);
__BEGIN__
;
__
CV_
BEGIN__
;
int
i
,
idx_total
,
idx_selected
=
0
,
step
,
type
,
prev
=
INT_MIN
,
is_sorted
=
1
;
uchar
*
srcb
=
0
;
...
...
@@ -132,7 +132,7 @@ static CvMat* cvPreprocessIndexArray( const CvMat* idx_arr, int data_arr_size, b
}
}
__END__
;
__
CV_
END__
;
if
(
cvGetErrStatus
()
<
0
)
cvReleaseMat
(
&
idx
);
...
...
modules/core/include/opencv2/core/internal.hpp
View file @
d62bc8cf
...
...
@@ -12,6 +12,7 @@
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
...
...
@@ -40,30 +41,22 @@
//
//M*/
/* The header is for internal use and it is likely to change.
It contains some macro definitions that are used in cxcore, cv, cvaux
and, probably, other libraries. If you need some of this functionality,
the safe way is to copy it into your code and rename the macros.
*/
#ifndef __OPENCV_CORE_INTERNAL_HPP__
#define __OPENCV_CORE_INTERNAL_HPP__
#ifndef __OPENCV_CORE_PRIVATE_HPP__
#define __OPENCV_CORE_PRIVATE_HPP__
#define __BEGIN__ __CV_BEGIN__
#define __END__ __CV_END__
#define EXIT __CV_EXIT__
#ifdef HAVE_IPP
# include "ipp.h"
CV_INLINE
IppiSize
ippiSize
(
int
width
,
int
height
)
{
IppiSize
size
=
{
width
,
height
};
return
size
;
}
#ifndef __OPENCV_BUILD
# error this is a private header which should not be used from outside of the OpenCV library
#endif
#ifndef IPPI_CALL
# define IPPI_CALL(func) CV_Assert((func) >= 0)
#include "opencv2/core.hpp"
#include "cvconfig.h"
#ifdef HAVE_EIGEN
# if defined __GNUC__ && defined __APPLE__
# pragma GCC diagnostic ignored "-Wshadow"
# endif
# include <Eigen/Core>
# include "opencv2/core/eigen.hpp"
#endif
#ifdef HAVE_TBB
...
...
@@ -78,16 +71,6 @@ CV_INLINE IppiSize ippiSize(int width, int height)
# endif
#endif
#ifdef HAVE_EIGEN
# if defined __GNUC__ && defined __APPLE__
# pragma GCC diagnostic ignored "-Wshadow"
# endif
# include <Eigen/Core>
# include "opencv2/core/eigen.hpp"
#endif
#ifdef __cplusplus
namespace
cv
{
#ifdef HAVE_TBB
...
...
@@ -167,33 +150,14 @@ namespace cv
return &classname##_info(); \
}
#endif //__cplusplus
/* default image row align (in bytes) */
#define CV_DEFAULT_IMAGE_ROW_ALIGN 4
/* the alignment of all the allocated buffers */
#define CV_MALLOC_ALIGN 16
/* default alignment for dynamic data strucutures, resided in storages. */
#define CV_STRUCT_ALIGN ((int)sizeof(double))
/* default storage block size */
#define CV_STORAGE_BLOCK_SIZE ((1<<16) - 128)
/* default memory block for sparse array elements */
#define CV_SPARSE_MAT_BLOCK (1<<12)
/* initial hash table size */
#define CV_SPARSE_HASH_SIZE0 (1<<10)
/* maximal average node_count/hash_size ratio beyond which hash table is resized */
#define CV_SPARSE_HASH_RATIO 3
/****************************************************************************************\
* Common declarations *
\****************************************************************************************/
/* the alignment of all the allocated buffers */
#define CV_MALLOC_ALIGN 16
#ifdef __GNUC__
# define CV_DECL_ALIGNED(x) __attribute__ ((aligned (x)))
#elif defined _MSC_VER
...
...
@@ -202,48 +166,45 @@ namespace cv
# define CV_DECL_ALIGNED(x)
#endif
#ifndef CV_IMPL
# define CV_IMPL CV_EXTERN_C
#endif
#define CV_ORIGIN_TL 0
#define CV_ORIGIN_BL 1
/* IEEE754 constants and macros */
#define CV_TOGGLE_FLT(x) ((x)^((int)(x) < 0 ? 0x7fffffff : 0))
#define CV_TOGGLE_DBL(x) \
((x)^((int64)(x) < 0 ? CV_BIG_INT(0x7fffffffffffffff) : 0))
//TODO: remove after dropping sorts
#define CV_LT(a, b) ((a) < (b))
#define CV_TOGGLE_DBL(x) ((x)^((int64)(x) < 0 ? CV_BIG_INT(0x7fffffffffffffff) : 0))
CV_INLINE
void
*
cvAlignPtr
(
const
void
*
ptr
,
int
align
CV_DEFAULT
(
32
)
)
static
inline
void
*
cvAlignPtr
(
const
void
*
ptr
,
int
align
CV_DEFAULT
(
32
)
)
{
assert
(
(
align
&
(
align
-
1
))
==
0
);
CV_DbgAssert
(
(
align
&
(
align
-
1
))
==
0
);
return
(
void
*
)(
((
size_t
)
ptr
+
align
-
1
)
&
~
(
size_t
)(
align
-
1
)
);
}
CV_INLINE
int
cvAlign
(
int
size
,
int
align
)
static
inline
int
cvAlign
(
int
size
,
int
align
)
{
a
ssert
(
(
align
&
(
align
-
1
))
==
0
&&
size
<
INT_MAX
);
CV_DbgA
ssert
(
(
align
&
(
align
-
1
))
==
0
&&
size
<
INT_MAX
);
return
(
size
+
align
-
1
)
&
-
align
;
}
CV_INLINE
CvSize
cvGetMatSize
(
const
CvMat
*
mat
)
static
inline
cv
::
Size
cvGetMatSize
(
const
CvMat
*
mat
)
{
CvSize
size
;
size
.
width
=
mat
->
cols
;
size
.
height
=
mat
->
rows
;
return
size
;
return
cv
::
Size
(
mat
->
cols
,
mat
->
rows
);
}
#define CV_DESCALE(x,n) (((x) + (1 << ((n)-1))) >> (n))
#define CV_FLT_TO_FIX(x,n) cvRound((x)*(1<<(n)))
/****************************************************************************************\
* Structures and macros for integration with IPP *
\****************************************************************************************/
#ifdef HAVE_IPP
# include "ipp.h"
static
inline
IppiSize
ippiSize
(
int
width
,
int
height
)
{
IppiSize
size
=
{
width
,
height
};
return
size
;
}
#endif
#ifndef IPPI_CALL
# define IPPI_CALL(func) CV_Assert((func) >= 0)
#endif
/* IPP-compatible return codes */
typedef
enum
CvStatus
{
...
...
@@ -284,4 +245,4 @@ typedef enum CvStatus
}
CvStatus
;
#endif // __OPENCV_CORE_
INTERNAL
_HPP__
#endif // __OPENCV_CORE_
PRIVATE
_HPP__
modules/core/include/opencv2/core/types_c.h
View file @
d62bc8cf
...
...
@@ -92,6 +92,10 @@
# define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
#endif
#ifndef CV_IMPL
# define CV_IMPL CV_EXTERN_C
#endif
#ifdef __cplusplus
# include "opencv2/core.hpp"
#endif
...
...
modules/core/src/array.cpp
View file @
d62bc8cf
...
...
@@ -48,6 +48,12 @@
#include "precomp.hpp"
#define CV_ORIGIN_TL 0
#define CV_ORIGIN_BL 1
/* default image row align (in bytes) */
#define CV_DEFAULT_IMAGE_ROW_ALIGN 4
static
struct
{
...
...
modules/core/src/datastructs.cpp
View file @
d62bc8cf
...
...
@@ -40,6 +40,12 @@
//M*/
#include "precomp.hpp"
/* default alignment for dynamic data strucutures, resided in storages. */
#define CV_STRUCT_ALIGN ((int)sizeof(double))
/* default storage block size */
#define CV_STORAGE_BLOCK_SIZE ((1<<16) - 128)
#define ICV_FREE_PTR(storage) \
((schar*)(storage)->top + (storage)->block_size - (storage)->free_space)
...
...
modules/core/src/precomp.hpp
View file @
d62bc8cf
...
...
@@ -96,11 +96,22 @@ static inline void ___cudaSafeCall(cudaError_t err, const char *file, const int
#else
# define cudaSafeCall(expr)
#endif
#endif
//HAVE_CUDA
namespace
cv
{
/* default memory block for sparse array elements */
#define CV_SPARSE_MAT_BLOCK (1<<12)
/* initial hash table size */
#define CV_SPARSE_HASH_SIZE0 (1<<10)
/* maximal average node_count/hash_size ratio beyond which hash table is resized */
#define CV_SPARSE_HASH_RATIO 3
// -128.f ... 255.f
extern
const
float
g_8x32fTab
[];
#define CV_8TO32F(x) cv::g_8x32fTab[(x)+128]
...
...
@@ -207,11 +218,6 @@ extern volatile bool USE_AVX;
enum
{
BLOCK_SIZE
=
1024
};
#ifdef HAVE_IPP
static
inline
IppiSize
ippiSize
(
int
width
,
int
height
)
{
IppiSize
sz
=
{
width
,
height
};
return
sz
;
}
static
inline
IppiSize
ippiSize
(
Size
_sz
)
{
IppiSize
sz
=
{
_sz
.
width
,
_sz
.
height
};
return
sz
;
}
#endif
#if defined HAVE_IPP && (IPP_VERSION_MAJOR >= 7)
#define ARITHM_USE_IPP 1
#define IF_IPP(then_call, else_call) then_call
...
...
modules/imgproc/src/color.cpp
View file @
d62bc8cf
...
...
@@ -92,6 +92,8 @@
#include "precomp.hpp"
#include <limits>
#define CV_DESCALE(x,n) (((x) + (1 << ((n)-1))) >> (n))
namespace
cv
{
...
...
modules/imgproc/src/demosaicing.cpp
View file @
d62bc8cf
...
...
@@ -44,6 +44,8 @@
#include <limits>
#define CV_DESCALE(x,n) (((x) + (1 << ((n)-1))) >> (n))
namespace
cv
{
...
...
modules/imgproc/src/distransform.cpp
View file @
d62bc8cf
...
...
@@ -46,6 +46,7 @@ namespace cv
static
const
int
DIST_SHIFT
=
16
;
static
const
int
INIT_DIST0
=
(
INT_MAX
>>
2
);
#define CV_FLT_TO_FIX(x,n) cvRound((x)*(1<<(n)))
static
void
initTopBottom
(
Mat
&
temp
,
int
border
)
...
...
modules/imgproc/src/filter.cpp
View file @
d62bc8cf
...
...
@@ -193,7 +193,7 @@ void FilterEngine::init( const Ptr<BaseFilter>& _filter2D,
wholeSize
=
Size
(
-
1
,
-
1
);
}
static
const
int
VEC_ALIGN
=
CV_MALLOC_ALIGN
;
#define VEC_ALIGN CV_MALLOC_ALIGN
int
FilterEngine
::
start
(
Size
_wholeSize
,
Rect
_roi
,
int
_maxBufRows
)
{
...
...
modules/legacy/src/precomp.hpp
View file @
d62bc8cf
...
...
@@ -54,6 +54,10 @@
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#define __BEGIN__ __CV_BEGIN__
#define __END__ __CV_END__
#define EXIT __CV_EXIT__
#include "_matrix.h"
CV_INLINE
bool
operator
==
(
CvSize
size1
,
CvSize
size2
);
...
...
modules/ml/src/precomp.hpp
View file @
d62bc8cf
...
...
@@ -61,6 +61,9 @@
#include <time.h>
#define ML_IMPL CV_IMPL
#define __BEGIN__ __CV_BEGIN__
#define __END__ __CV_END__
#define EXIT __CV_EXIT__
#define CV_MAT_ELEM_FLAG( mat, type, comp, vect, tflag ) \
(( tflag == CV_ROW_SAMPLE ) \
...
...
modules/video/src/lkpyramid.cpp
View file @
d62bc8cf
...
...
@@ -44,6 +44,8 @@
#include <stdio.h>
#include "lkpyramid.hpp"
#define CV_DESCALE(x,n) (((x) + (1 << ((n)-1))) >> (n))
namespace
{
static
void
calcSharrDeriv
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment