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
099388bd
Commit
099388bd
authored
Oct 22, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed crashes in color-luv & color-lab when gcc 4.2 on x64 is used (tickets #502, #627)
parent
5ac4b23b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
color.cpp
modules/imgproc/src/color.cpp
+10
-6
tsysa.cpp
tests/cv/src/tsysa.cpp
+2
-2
No files found.
modules/imgproc/src/color.cpp
View file @
099388bd
...
...
@@ -1235,7 +1235,6 @@ static void initLabTabs()
}
}
struct
RGB2Lab_b
{
typedef
uchar
channel_type
;
...
...
@@ -1244,6 +1243,7 @@ struct RGB2Lab_b
const
float
*
_whitept
,
bool
_srgb
)
:
srccn
(
_srccn
),
srgb
(
_srgb
)
{
static
volatile
int
_3
=
3
;
initLabTabs
();
if
(
!
_coeffs
)
_coeffs
=
sRGB2XYZ_D65
;
...
...
@@ -1255,11 +1255,12 @@ struct RGB2Lab_b
(
1
<<
lab_shift
)
/
_whitept
[
2
]
};
for
(
int
i
=
0
;
i
<
3
;
i
++
)
for
(
int
i
=
0
;
i
<
_
3
;
i
++
)
{
coeffs
[
i
*
3
+
(
blueIdx
^
2
)]
=
cvRound
(
_coeffs
[
i
*
3
]
*
scale
[
i
]);
coeffs
[
i
*
3
+
1
]
=
cvRound
(
_coeffs
[
i
*
3
+
1
]
*
scale
[
i
]);
coeffs
[
i
*
3
+
blueIdx
]
=
cvRound
(
_coeffs
[
i
*
3
+
2
]
*
scale
[
i
]);
CV_Assert
(
coeffs
[
i
]
>=
0
&&
coeffs
[
i
*
3
+
1
]
>=
0
&&
coeffs
[
i
*
3
+
2
]
>=
0
&&
coeffs
[
i
*
3
]
+
coeffs
[
i
*
3
+
1
]
+
coeffs
[
i
*
3
+
2
]
<
2
*
(
1
<<
lab_shift
)
);
}
...
...
@@ -1307,13 +1308,14 @@ struct RGB2Lab_f
const
float
*
_whitept
,
bool
_srgb
)
:
srccn
(
_srccn
),
srgb
(
_srgb
)
{
volatile
int
_3
=
3
;
initLabTabs
();
if
(
!
_coeffs
)
_coeffs
=
sRGB2XYZ_D65
;
if
(
!
_whitept
)
_whitept
=
D65
;
float
scale
[]
=
{
LabCbrtTabScale
/
_whitept
[
0
],
LabCbrtTabScale
,
LabCbrtTabScale
/
_whitept
[
2
]
};
for
(
int
i
=
0
;
i
<
3
;
i
++
)
for
(
int
i
=
0
;
i
<
_
3
;
i
++
)
{
coeffs
[
i
*
3
+
(
blueIdx
^
2
)]
=
_coeffs
[
i
*
3
]
*
scale
[
i
];
coeffs
[
i
*
3
+
1
]
=
_coeffs
[
i
*
3
+
1
]
*
scale
[
i
];
...
...
@@ -1484,9 +1486,11 @@ struct RGB2Luv_f
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
coeffs
[
i
*
3
+
(
blueIdx
^
2
)
]
=
_coeffs
[
i
*
3
];
coeffs
[
i
*
3
]
=
_coeffs
[
i
*
3
];
coeffs
[
i
*
3
+
1
]
=
_coeffs
[
i
*
3
+
1
];
coeffs
[
i
*
3
+
blueIdx
]
=
_coeffs
[
i
*
3
+
2
];
coeffs
[
i
*
3
+
2
]
=
_coeffs
[
i
*
3
+
2
];
if
(
blueIdx
==
0
)
std
::
swap
(
coeffs
[
i
*
3
],
coeffs
[
i
*
3
+
2
]);
CV_Assert
(
coeffs
[
i
*
3
]
>=
0
&&
coeffs
[
i
*
3
+
1
]
>=
0
&&
coeffs
[
i
*
3
+
2
]
>=
0
&&
coeffs
[
i
*
3
]
+
coeffs
[
i
*
3
+
1
]
+
coeffs
[
i
*
3
+
2
]
<
1.5
f
);
}
...
...
@@ -2343,7 +2347,7 @@ void cvtColor( const Mat& src, Mat& dst, int code, int dcn )
int
scn
=
src
.
channels
(),
depth
=
src
.
depth
(),
bidx
;
CV_Assert
(
depth
==
CV_8U
||
depth
==
CV_16U
||
depth
==
CV_32F
);
switch
(
code
)
{
case
CV_BGR2BGRA
:
case
CV_RGB2BGRA
:
case
CV_BGRA2BGR
:
...
...
tests/cv/src/tsysa.cpp
View file @
099388bd
...
...
@@ -53,7 +53,7 @@ const char* blacklist[] =
"cascade-detector"
,
//ticket 432
"chessboard-detector"
,
//ticket 569
"chessboard-subpixel"
,
//ticket 473
"color-luv"
,
//ticket 502
//
"color-luv", //ticket 502
"descriptor_sift"
,
//ticket 567
"descriptor_surf"
,
//ticket 568
...
...
@@ -90,7 +90,7 @@ const char* blacklist[] =
"warp-remap"
,
//ticket 576
"warp-resize"
,
//ticket 429
"warp-undistort"
,
//ticket 577
"color-lab"
,
//ticket 627
//
"color-lab", //ticket 627
0
};
...
...
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