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
822d33d6
Commit
822d33d6
authored
Sep 13, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9374 from savuor:test_lab_bit_exact
parents
31348f8c
18ca3d1e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
color.cpp
modules/imgproc/src/color.cpp
+5
-5
test_color.cpp
modules/imgproc/test/test_color.cpp
+0
-0
test_precomp.hpp
modules/imgproc/test/test_precomp.hpp
+1
-0
No files found.
modules/imgproc/src/color.cpp
View file @
822d33d6
...
...
@@ -6771,7 +6771,10 @@ struct Lab2RGBinteger
//float fxz[] = { ai / 500.0f + fy, fy - bi / 200.0f };
int
adiv
,
bdiv
;
adiv
=
aa
*
BASE
/
500
-
128
*
BASE
/
500
,
bdiv
=
bb
*
BASE
/
200
-
128
*
BASE
/
200
;
//adiv = aa*BASE/500 - 128*BASE/500, bdiv = bb*BASE/200 - 128*BASE/200;
//approximations with reasonable precision
adiv
=
((
5
*
aa
*
53687
+
(
1
<<
7
))
>>
13
)
-
128
*
BASE
/
500
;
bdiv
=
((
bb
*
41943
+
(
1
<<
4
))
>>
9
)
-
128
*
BASE
/
200
+
1
;
int
ifxz
[]
=
{
ify
+
adiv
,
ify
-
bdiv
};
...
...
@@ -7104,8 +7107,6 @@ struct Lab2RGB_b
const
float
*
_whitept
,
bool
_srgb
)
:
fcvt
(
3
,
_blueIdx
,
_coeffs
,
_whitept
,
_srgb
),
icvt
(
_dstcn
,
_blueIdx
,
_coeffs
,
_whitept
,
_srgb
),
dstcn
(
_dstcn
)
{
useBitExactness
=
(
!
_coeffs
&&
!
_whitept
&&
_srgb
&&
enableBitExactness
);
#if CV_NEON
v_scale_inv
=
vdupq_n_f32
(
100.
f
/
255.
f
);
v_scale
=
vdupq_n_f32
(
255.
f
);
...
...
@@ -7162,7 +7163,7 @@ struct Lab2RGB_b
void
operator
()(
const
uchar
*
src
,
uchar
*
dst
,
int
n
)
const
{
if
(
us
eBitExactness
)
if
(
enabl
eBitExactness
)
{
icvt
(
src
,
dst
,
n
);
return
;
...
...
@@ -7328,7 +7329,6 @@ struct Lab2RGB_b
__m128i
v_zero
;
bool
haveSIMD
;
#endif
bool
useBitExactness
;
int
dstcn
;
};
...
...
modules/imgproc/test/test_color.cpp
View file @
822d33d6
This diff is collapsed.
Click to expand it.
modules/imgproc/test/test_precomp.hpp
View file @
822d33d6
...
...
@@ -14,6 +14,7 @@
#include "opencv2/core/private.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/core/softfloat.hpp"
#include "opencv2/imgproc/imgproc_c.h"
...
...
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