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
cc9b199e
Commit
cc9b199e
authored
Oct 15, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15704 from alalek:gapi_avoid_dynamic_initializers_in_optimized_code
parents
823e767e
a84969bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
gfluidimgproc_func.simd.hpp
modules/gapi/src/backends/fluid/gfluidimgproc_func.simd.hpp
+6
-5
No files found.
modules/gapi/src/backends/fluid/gfluidimgproc_func.simd.hpp
View file @
cc9b199e
...
@@ -876,11 +876,12 @@ void run_yuv2rgb_impl(uchar out[], const uchar in[], int width, const float coef
...
@@ -876,11 +876,12 @@ void run_yuv2rgb_impl(uchar out[], const uchar in[], int width, const float coef
// V' = (R' - Y')*0.877
// V' = (R' - Y')*0.877
static
const
float
coef
[
5
]
=
{
0.299
f
,
0.587
f
,
0.114
f
,
0.492
f
,
0.877
f
};
static
const
float
coef
[
5
]
=
{
0.299
f
,
0.587
f
,
0.114
f
,
0.492
f
,
0.877
f
};
static
const
ushort
c0
=
static_cast
<
ushort
>
(
coef
[
0
]
*
(
1
<<
16
)
+
0.5
f
);
// don't use expressions (avoid any dynamic initialization): https://github.com/opencv/opencv/issues/15690
static
const
ushort
c1
=
static_cast
<
ushort
>
(
coef
[
1
]
*
(
1
<<
16
)
+
0.5
f
);
static
const
ushort
c0
=
19595
;
// static_cast<ushort>(coef[0]*(1 << 16) + 0.5f);
static
const
ushort
c2
=
static_cast
<
ushort
>
(
coef
[
2
]
*
(
1
<<
16
)
+
0.5
f
);
static
const
ushort
c1
=
38470
;
// static_cast<ushort>(coef[1]*(1 << 16) + 0.5f);
static
const
short
c3
=
static_cast
<
short
>
(
coef
[
3
]
*
(
1
<<
12
)
+
0.5
f
);
static
const
ushort
c2
=
7471
;
// static_cast<ushort>(coef[2]*(1 << 16) + 0.5f);
static
const
short
c4
=
static_cast
<
short
>
(
coef
[
4
]
*
(
1
<<
12
)
+
0.5
f
);
static
const
short
c3
=
2015
;
// static_cast<short>(coef[3]*(1 << 12) + 0.5f);
static
const
short
c4
=
3592
;
// static_cast<short>(coef[4]*(1 << 12) + 0.5f);
void
run_rgb2yuv422_impl
(
uchar
out
[],
const
uchar
in
[],
int
width
)
void
run_rgb2yuv422_impl
(
uchar
out
[],
const
uchar
in
[],
int
width
)
{
{
...
...
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