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
afbcc071
Commit
afbcc071
authored
Feb 21, 2017
by
chacha21
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/drawing_performance' into drawing_performance
# Conflicts: # modules/imgproc/src/drawing.cpp
parents
91a02704
16a9407f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
drawing.cpp
modules/imgproc/src/drawing.cpp
+9
-4
No files found.
modules/imgproc/src/drawing.cpp
View file @
afbcc071
...
@@ -1075,7 +1075,7 @@ EllipseEx( Mat& img, Point2l center, Size2l axes,
...
@@ -1075,7 +1075,7 @@ EllipseEx( Mat& img, Point2l center, Size2l axes,
#if (defined(i386) || defined(__i386__) || defined(_M_IX86) || \
#if (defined(i386) || defined(__i386__) || defined(_M_IX86) || \
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
defined(__arm__) || defined(_LITTLE_ENDIAN) || defined(LITTLE_ENDIAN))
defined(__arm__)
|| defined(__aarch64__)
|| defined(_LITTLE_ENDIAN) || defined(LITTLE_ENDIAN))
# define OPENCV_BYTEORDER 1234
# define OPENCV_BYTEORDER 1234
# define OPENCV_BIGENDIAN 0
# define OPENCV_BIGENDIAN 0
# define OPENCV_LITTLEENDIAN 1
# define OPENCV_LITTLEENDIAN 1
...
@@ -1086,6 +1086,7 @@ EllipseEx( Mat& img, Point2l center, Size2l axes,
...
@@ -1086,6 +1086,7 @@ EllipseEx( Mat& img, Point2l center, Size2l axes,
#endif
#endif
#if !defined(OPENCV_BYTEORDER)
#if !defined(OPENCV_BYTEORDER)
# define OPENCV_BYTEORDER 0
static
const
int
opencvOne
=
1
;
static
const
int
opencvOne
=
1
;
# define OPENCV_BIGENDIAN (*((const char *)(&opencvOne))==0)
# define OPENCV_BIGENDIAN (*((const char *)(&opencvOne))==0)
# define OPENCV_LITTLEENDIAN (*((const char *)(&opencvOne))==1)
# define OPENCV_LITTLEENDIAN (*((const char *)(&opencvOne))==1)
...
@@ -1102,12 +1103,13 @@ static const int opencvOne = 1;
...
@@ -1102,12 +1103,13 @@ static const int opencvOne = 1;
# endif
# endif
# endif
# endif
/*
static inline uint32_t opencvBigToHost32(const uchar* p){
static inline uint32_t opencvBigToHost32(const uchar* p){
#if OPENCV_BYTEORDER==4321
#if OPENCV_BYTEORDER==4321
uint32_t x;
uint32_t x;
memcpy(&x,p,4);
memcpy(&x,p,4);
return x;
return x;
#elif OPENCV_BYTEORDER==1234 && defined(__GNUC__)
&& GCC_VERSION>=4003000
#elif OPENCV_BYTEORDER==1234 && defined(__GNUC__)
uint32_t x;
uint32_t x;
memcpy(&x,p,4);
memcpy(&x,p,4);
return __builtin_bswap32(x);
return __builtin_bswap32(x);
...
@@ -1127,13 +1129,14 @@ static inline uint32_t opencvBigToHost32(uint32_t x){
...
@@ -1127,13 +1129,14 @@ static inline uint32_t opencvBigToHost32(uint32_t x){
return opencvBigToHost32((uchar*)&x);
return opencvBigToHost32((uchar*)&x);
#endif
#endif
}
}
*/
static
inline
uint32_t
opencvLittleToHost32
(
const
uchar
*
p
){
static
inline
uint32_t
opencvLittleToHost32
(
const
uchar
*
p
){
#if OPENCV_BYTEORDER==1234
#if OPENCV_BYTEORDER==1234
uint32_t
x
;
uint32_t
x
;
memcpy
(
&
x
,
p
,
4
);
memcpy
(
&
x
,
p
,
4
);
return
x
;
return
x
;
#elif OPENCV_BYTEORDER==4321 && defined(__GNUC__)
&& GCC_VERSION>=4003000
#elif OPENCV_BYTEORDER==4321 && defined(__GNUC__)
uint32_t
x
;
uint32_t
x
;
memcpy
(
&
x
,
p
,
4
);
memcpy
(
&
x
,
p
,
4
);
return
__builtin_bswap32
(
x
);
return
__builtin_bswap32
(
x
);
...
@@ -1141,13 +1144,15 @@ static inline uint32_t opencvLittleToHost32(const uchar* p){
...
@@ -1141,13 +1144,15 @@ static inline uint32_t opencvLittleToHost32(const uchar* p){
uint32_t
x
;
uint32_t
x
;
memcpy
(
&
x
,
p
,
4
);
memcpy
(
&
x
,
p
,
4
);
return
_byteswap_ulong
(
x
);
return
_byteswap_ulong
(
x
);
#elif OPENCV_LITTLEENDIAN
return
x
;
#else
#else
return
((
unsigned
)
p
[
0
]
<<
24
)
|
(
p
[
1
]
<<
16
)
|
(
p
[
2
]
<<
8
)
|
p
[
3
];
return
((
unsigned
)
p
[
0
]
<<
24
)
|
(
p
[
1
]
<<
16
)
|
(
p
[
2
]
<<
8
)
|
p
[
3
];
#endif
#endif
}
}
static
inline
uint32_t
opencvLittleToHost32
(
uint32_t
x
){
static
inline
uint32_t
opencvLittleToHost32
(
uint32_t
x
){
#if OPENCV_
BYTEORDER==1234
#if OPENCV_
LITTLEENDIAN
return
x
;
return
x
;
#else
#else
return
opencvLittleToHost32
((
uchar
*
)
&
x
);
return
opencvLittleToHost32
((
uchar
*
)
&
x
);
...
...
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