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
6b1d9971
Commit
6b1d9971
authored
8 years ago
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8313 from alalek:ocl_fix_cvtcolor
parents
f9f013e2
ba8a6e35
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
cvtcolor.cl
modules/imgproc/src/opencl/cvtcolor.cl
+3
-2
No files found.
modules/imgproc/src/opencl/cvtcolor.cl
View file @
6b1d9971
...
...
@@ -160,6 +160,7 @@ enum
#
define
CAT
(
x,
y
)
__CAT
(
x,
y
)
#
define
DATA_TYPE_4
CAT
(
DATA_TYPE,
4
)
#
define
DATA_TYPE_3
CAT
(
DATA_TYPE,
3
)
/////////////////////////////////////
RGB
<->
GRAY
//////////////////////////////////////
...
...
@@ -182,7 +183,7 @@ __kernel void RGB2Gray(__global const uchar * srcptr, int src_step, int src_offs
{
__global
const
DATA_TYPE*
src
=
(
__global
const
DATA_TYPE*
)(
srcptr
+
src_index
)
;
__global
DATA_TYPE*
dst
=
(
__global
DATA_TYPE*
)(
dstptr
+
dst_index
)
;
DATA_TYPE_
4
src_pix
=
vload4
(
0
,
src
)
;
DATA_TYPE_
3
src_pix
=
vload3
(
0
,
src
)
;
#
ifdef
DEPTH_5
dst[0]
=
fma
(
src_pix.B_COMP,
B2YF,
fma
(
src_pix.G_COMP,
G2YF,
src_pix.R_COMP
*
R2YF
))
;
#
else
...
...
@@ -256,7 +257,7 @@ __kernel void RGB2YUV(__global const uchar* srcptr, int src_step, int src_offset
{
__global const DATA_TYPE* src = (__global const DATA_TYPE*)(srcptr + src_index);
__global DATA_TYPE* dst = (__global DATA_TYPE*)(dstptr + dst_index);
DATA_TYPE_
4 src_pix = vload4
(0, src);
DATA_TYPE_
3 src_pix = vload3
(0, src);
DATA_TYPE b = src_pix.B_COMP, g = src_pix.G_COMP, r = src_pix.R_COMP;
#ifdef DEPTH_5
...
...
This diff is collapsed.
Click to expand it.
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