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
46faf592
Commit
46faf592
authored
Oct 11, 2014
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cv::warpAffine
parent
85a814f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
imgwarp.cpp
modules/imgproc/src/imgwarp.cpp
+27
-1
No files found.
modules/imgproc/src/imgwarp.cpp
View file @
46faf592
...
...
@@ -4423,13 +4423,27 @@ public:
int
Y0
=
saturate_cast
<
int
>
((
M
[
4
]
*
(
y
+
y1
)
+
M
[
5
])
*
AB_SCALE
)
+
round_delta
;
if
(
interpolation
==
INTER_NEAREST
)
for
(
x1
=
0
;
x1
<
bw
;
x1
++
)
{
x1
=
0
;
#if CV_NEON
int32x4_t
v_X0
=
vdupq_n_s32
(
X0
),
v_Y0
=
vdupq_n_s32
(
Y0
);
for
(
;
x1
<=
bw
-
4
;
x1
+=
4
)
{
int32x4_t
v_X
=
vshrq_n_s32
(
vaddq_s32
(
v_X0
,
vld1q_s32
(
adelta
+
x
+
x1
)),
AB_BITS
-
INTER_BITS
);
int32x4_t
v_Y
=
vshrq_n_s32
(
vaddq_s32
(
v_Y0
,
vld1q_s32
(
bdelta
+
x
+
x1
)),
AB_BITS
-
INTER_BITS
);
vst1q_s16
(
xy
+
(
x1
<<
1
),
vcombine_s16
(
vqmovn_s32
(
vshrq_n_s32
(
v_X
,
INTER_BITS
)),
vqmovn_s32
(
vshrq_n_s32
(
v_Y
,
INTER_BITS
))));
}
#endif
for
(
;
x1
<
bw
;
x1
++
)
{
int
X
=
(
X0
+
adelta
[
x
+
x1
])
>>
AB_BITS
;
int
Y
=
(
Y0
+
bdelta
[
x
+
x1
])
>>
AB_BITS
;
xy
[
x1
*
2
]
=
saturate_cast
<
short
>
(
X
);
xy
[
x1
*
2
+
1
]
=
saturate_cast
<
short
>
(
Y
);
}
}
else
{
short
*
alpha
=
A
+
y1
*
bw
;
...
...
@@ -4467,6 +4481,18 @@ public:
_mm_storeu_si128
((
__m128i
*
)(
alpha
+
x1
),
fx_
);
}
}
// #elif CV_NEON
// int32x4_t v_X0 = vdupq_n_s32(X0), v_Y0 = vdupq_n_s32(Y0), v_mask = vdupq_n_s32(INTER_TAB_SIZE - 1);
// for( ; x1 <= bw - 4; x1 += 4 )
// {
// int32x4_t v_X = vshrq_n_s32(vaddq_s32(v_X0, vld1q_s32(adelta + x + x1)), AB_BITS - INTER_BITS);
// int32x4_t v_Y = vshrq_n_s32(vaddq_s32(v_Y0, vld1q_s32(bdelta + x + x1)), AB_BITS - INTER_BITS);
// vst1q_s16(xy + (x1 << 1), vcombine_s16(vqmovn_s32(vshrq_n_s32(v_X, INTER_BITS)),
// vqmovn_s32(vshrq_n_s32(v_Y, INTER_BITS))));
// vst1_s16(alpha + x1, vmovn_s32(vaddq_s32(vshlq_n_s32(vandq_s32(v_Y, v_mask), INTER_BITS),
// vandq_s32(v_X, v_mask))));
// }
#endif
for
(
;
x1
<
bw
;
x1
++
)
{
...
...
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