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
6bf49d49
Commit
6bf49d49
authored
Mar 26, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop CvModule and cvSetMemoryManager
parent
db45e04d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
155 deletions
+8
-155
core_c.h
modules/core/include/opencv2/core/core_c.h
+4
-30
alloc.cpp
modules/core/src/alloc.cpp
+0
-5
system.cpp
modules/core/src/system.cpp
+0
-119
compat.hpp
modules/legacy/include/opencv2/legacy/compat.hpp
+4
-1
No files found.
modules/core/include/opencv2/core/core_c.h
View file @
6bf49d49
...
...
@@ -1478,27 +1478,9 @@ CVAPI(int) cvKMeans2( const CvArr* samples, int cluster_count, CvArr* labels,
* System functions *
\****************************************************************************************/
/* Add the function pointers table with associated information to the IPP primitives list */
CVAPI
(
int
)
cvRegisterModule
(
const
CvModuleInfo
*
module_info
);
/* Loads optimized functions from IPP, MKL etc. or switches back to pure C code */
CVAPI
(
int
)
cvUseOptimized
(
int
on_off
);
/* Retrieves information about the registered modules and loaded optimized plugins */
CVAPI
(
void
)
cvGetModuleInfo
(
const
char
*
module_name
,
const
char
**
version
,
const
char
**
loaded_addon_plugins
);
typedef
void
*
(
CV_CDECL
*
CvAllocFunc
)(
size_t
size
,
void
*
userdata
);
typedef
int
(
CV_CDECL
*
CvFreeFunc
)(
void
*
pptr
,
void
*
userdata
);
/* Set user-defined memory managment functions (substitutors for malloc and free) that
will be called by cvAlloc, cvFree and higher-level functions (e.g. cvCreateImage) */
CVAPI
(
void
)
cvSetMemoryManager
(
CvAllocFunc
alloc_func
CV_DEFAULT
(
NULL
),
CvFreeFunc
free_func
CV_DEFAULT
(
NULL
),
void
*
userdata
CV_DEFAULT
(
NULL
));
typedef
IplImage
*
(
CV_STDCALL
*
Cv_iplCreateImageHeader
)
(
int
,
int
,
int
,
char
*
,
char
*
,
int
,
int
,
int
,
int
,
int
,
IplROI
*
,
IplImage
*
,
void
*
,
IplTileInfo
*
);
...
...
@@ -1843,19 +1825,11 @@ static char cvFuncName[] = Name
#define __CV_EXIT__ goto exit
#ifdef __cplusplus
}
// classes for automatic module/RTTI data registration/unregistration
struct
CV_EXPORTS
CvModule
{
CvModule
(
CvModuleInfo
*
_info
);
~
CvModule
();
CvModuleInfo
*
info
;
static
CvModuleInfo
*
first
;
static
CvModuleInfo
*
last
;
};
}
// extern "C"
#endif
#ifdef __cplusplus
// class for automatic module/RTTI data registration/unregistration
struct
CV_EXPORTS
CvType
{
CvType
(
const
char
*
type_name
,
...
...
modules/core/src/alloc.cpp
View file @
6bf49d49
...
...
@@ -683,11 +683,6 @@ void fastFree( void* ptr )
}
CV_IMPL
void
cvSetMemoryManager
(
CvAllocFunc
,
CvFreeFunc
,
void
*
)
{
CV_Error
(
-
1
,
"Custom memory allocator is not supported"
);
}
CV_IMPL
void
*
cvAlloc
(
size_t
size
)
{
return
cv
::
fastMalloc
(
size
);
...
...
modules/core/src/system.cpp
View file @
6bf49d49
...
...
@@ -671,125 +671,6 @@ cvErrorFromIppStatus( int status )
}
}
static
CvModuleInfo
cxcore_info
=
{
0
,
"cxcore"
,
CV_VERSION
,
0
};
CvModuleInfo
*
CvModule
::
first
=
0
,
*
CvModule
::
last
=
0
;
CvModule
::
CvModule
(
CvModuleInfo
*
_info
)
{
cvRegisterModule
(
_info
);
info
=
last
;
}
CvModule
::~
CvModule
(
void
)
{
if
(
info
)
{
CvModuleInfo
*
p
=
first
;
for
(
;
p
!=
0
&&
p
->
next
!=
info
;
p
=
p
->
next
)
;
if
(
p
)
p
->
next
=
info
->
next
;
if
(
first
==
info
)
first
=
info
->
next
;
if
(
last
==
info
)
last
=
p
;
free
(
info
);
info
=
0
;
}
}
CV_IMPL
int
cvRegisterModule
(
const
CvModuleInfo
*
module
)
{
CV_Assert
(
module
!=
0
&&
module
->
name
!=
0
&&
module
->
version
!=
0
);
size_t
name_len
=
strlen
(
module
->
name
);
size_t
version_len
=
strlen
(
module
->
version
);
CvModuleInfo
*
module_copy
=
(
CvModuleInfo
*
)
malloc
(
sizeof
(
*
module_copy
)
+
name_len
+
1
+
version_len
+
1
);
*
module_copy
=
*
module
;
module_copy
->
name
=
(
char
*
)(
module_copy
+
1
);
module_copy
->
version
=
(
char
*
)(
module_copy
+
1
)
+
name_len
+
1
;
memcpy
(
(
void
*
)
module_copy
->
name
,
module
->
name
,
name_len
+
1
);
memcpy
(
(
void
*
)
module_copy
->
version
,
module
->
version
,
version_len
+
1
);
module_copy
->
next
=
0
;
if
(
CvModule
::
first
==
0
)
CvModule
::
first
=
module_copy
;
else
CvModule
::
last
->
next
=
module_copy
;
CvModule
::
last
=
module_copy
;
return
0
;
}
CvModule
cxcore_module
(
&
cxcore_info
);
CV_IMPL
void
cvGetModuleInfo
(
const
char
*
name
,
const
char
**
version
,
const
char
**
plugin_list
)
{
static
char
joint_verinfo
[
1024
]
=
""
;
static
char
plugin_list_buf
[
1024
]
=
""
;
if
(
version
)
*
version
=
0
;
if
(
plugin_list
)
*
plugin_list
=
0
;
CvModuleInfo
*
module
;
if
(
version
)
{
if
(
name
)
{
size_t
i
,
name_len
=
strlen
(
name
);
for
(
module
=
CvModule
::
first
;
module
!=
0
;
module
=
module
->
next
)
{
if
(
strlen
(
module
->
name
)
==
name_len
)
{
for
(
i
=
0
;
i
<
name_len
;
i
++
)
{
int
c0
=
toupper
(
module
->
name
[
i
]),
c1
=
toupper
(
name
[
i
]);
if
(
c0
!=
c1
)
break
;
}
if
(
i
==
name_len
)
break
;
}
}
if
(
!
module
)
CV_Error
(
CV_StsObjectNotFound
,
"The module is not found"
);
*
version
=
module
->
version
;
}
else
{
char
*
ptr
=
joint_verinfo
;
for
(
module
=
CvModule
::
first
;
module
!=
0
;
module
=
module
->
next
)
{
sprintf
(
ptr
,
"%s: %s%s"
,
module
->
name
,
module
->
version
,
module
->
next
?
", "
:
""
);
ptr
+=
strlen
(
ptr
);
}
*
version
=
joint_verinfo
;
}
}
if
(
plugin_list
)
*
plugin_list
=
plugin_list_buf
;
}
#if defined BUILD_SHARED_LIBS && defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
BOOL
WINAPI
DllMain
(
HINSTANCE
,
DWORD
fdwReason
,
LPVOID
);
...
...
modules/legacy/include/opencv2/legacy/compat.hpp
View file @
6bf49d49
...
...
@@ -56,6 +56,8 @@
#include <math.h>
#include <string.h>
#define CV_NOOP(...)
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
@@ -190,7 +192,8 @@ CV_EXPORTS double cvPseudoInverse( const CvArr* src, CvArr* dst );
#define cvMinMaxLocMask(img, mask, min_val, max_val, min_loc, max_loc) \
cvMinMaxLoc(img, min_val, max_val, min_loc, max_loc, mask)
#define cvRemoveMemoryManager cvSetMemoryManager
#define cvRemoveMemoryManager CV_NOOP
#define cvSetMemoryManager CV_NOOP
#define cvmSetZero( mat ) cvSetZero( mat )
#define cvmSetIdentity( mat ) cvSetIdentity( mat )
...
...
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