Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
01916248
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
01916248
编写于
12月 22, 2017
作者:
V
Vitaly Tuzov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Disabled universal intrinsic based implementation for bit-exact resize of 3-channel images
上级
1bc1f3d3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
98 deletion
+0
-98
modules/imgproc/src/resize.cpp
modules/imgproc/src/resize.cpp
+0
-98
未找到文件。
modules/imgproc/src/resize.cpp
浏览文件 @
01916248
...
...
@@ -443,104 +443,6 @@ void hlineResizeCn<uint8_t, ufixedpoint16, 2, true, 2>(uint8_t* src, int, int *o
}
}
template
<
>
void
hlineResizeCn
<
uint8_t
,
ufixedpoint16
,
2
,
true
,
3
>
(
uint8_t
*
src
,
int
,
int
*
ofst
,
ufixedpoint16
*
m
,
ufixedpoint16
*
dst
,
int
dst_min
,
int
dst_max
,
int
dst_width
)
{
int
i
=
0
;
ufixedpoint16
srccn
[
3
]
=
{
src
[
0
],
src
[
1
],
src
[
2
]
};
v_uint16x8
v_srccn0
=
v_setall_u16
(((
uint16_t
*
)
srccn
)[
0
]);
v_uint16x8
v_srccn1
=
v_setall_u16
(((
uint16_t
*
)
srccn
)[
1
]);
v_uint16x8
v_srccn2
=
v_setall_u16
(((
uint16_t
*
)
srccn
)[
2
]);
for
(;
i
<
dst_min
-
7
;
i
+=
8
,
m
+=
16
,
dst
+=
24
)
// Points that fall left from src image so became equal to leftmost src point
{
v_store_interleave
((
uint16_t
*
)
dst
,
v_srccn0
,
v_srccn1
,
v_srccn2
);
}
for
(;
i
<
dst_min
;
i
++
,
m
+=
2
)
{
*
(
dst
++
)
=
srccn
[
0
];
*
(
dst
++
)
=
srccn
[
1
];
*
(
dst
++
)
=
srccn
[
2
];
}
for
(;
i
<
dst_max
-
7
&&
ofst
[
i
+
7
]
+
15
<=
ofst
[
dst_width
-
1
];
i
+=
8
,
m
+=
16
,
dst
+=
24
)
{
v_uint8x16
v_src0_c1
,
v_src0_c2
,
v_src0_c3
;
v_load_deinterleave
(
src
+
3
*
ofst
[
i
],
v_src0_c1
,
v_src0_c2
,
v_src0_c3
);
v_uint8x16
v_src1_c1
,
v_src1_c2
,
v_src1_c3
;
v_load_deinterleave
(
src
+
3
*
ofst
[
i
+
1
],
v_src1_c1
,
v_src1_c2
,
v_src1_c3
);
v_uint8x16
v_src2_c1
,
v_src2_c2
,
v_src2_c3
;
v_load_deinterleave
(
src
+
3
*
ofst
[
i
+
2
],
v_src2_c1
,
v_src2_c2
,
v_src2_c3
);
v_uint8x16
v_src3_c1
,
v_src3_c2
,
v_src3_c3
;
v_load_deinterleave
(
src
+
3
*
ofst
[
i
+
3
],
v_src3_c1
,
v_src3_c2
,
v_src3_c3
);
v_uint16x8
v_tmp0
,
v_tmp1
,
v_tmp2
;
v_uint16x8
v_src0123_c1
,
v_src0123_c2
,
v_src0123_c3
;
v_zip
(
v_reinterpret_as_u16
(
v_src0_c1
),
v_reinterpret_as_u16
(
v_src2_c1
),
v_tmp0
,
v_tmp1
);
v_zip
(
v_reinterpret_as_u16
(
v_src1_c1
),
v_reinterpret_as_u16
(
v_src3_c1
),
v_tmp1
,
v_tmp2
);
v_zip
(
v_tmp0
,
v_tmp1
,
v_src0123_c1
,
v_tmp2
);
v_zip
(
v_reinterpret_as_u16
(
v_src0_c2
),
v_reinterpret_as_u16
(
v_src2_c2
),
v_tmp0
,
v_tmp1
);
v_zip
(
v_reinterpret_as_u16
(
v_src1_c2
),
v_reinterpret_as_u16
(
v_src3_c2
),
v_tmp1
,
v_tmp2
);
v_zip
(
v_tmp0
,
v_tmp1
,
v_src0123_c2
,
v_tmp2
);
v_zip
(
v_reinterpret_as_u16
(
v_src0_c3
),
v_reinterpret_as_u16
(
v_src2_c3
),
v_tmp0
,
v_tmp1
);
v_zip
(
v_reinterpret_as_u16
(
v_src1_c3
),
v_reinterpret_as_u16
(
v_src3_c3
),
v_tmp1
,
v_tmp2
);
v_zip
(
v_tmp0
,
v_tmp1
,
v_src0123_c3
,
v_tmp2
);
v_load_deinterleave
(
src
+
3
*
ofst
[
i
+
4
],
v_src0_c1
,
v_src0_c2
,
v_src0_c3
);
v_load_deinterleave
(
src
+
3
*
ofst
[
i
+
5
],
v_src1_c1
,
v_src1_c2
,
v_src1_c3
);
v_load_deinterleave
(
src
+
3
*
ofst
[
i
+
6
],
v_src2_c1
,
v_src2_c2
,
v_src2_c3
);
v_load_deinterleave
(
src
+
3
*
ofst
[
i
+
7
],
v_src3_c1
,
v_src3_c2
,
v_src3_c3
);
v_uint16x8
v_src4567_c1
,
v_src4567_c2
,
v_src4567_c3
;
v_zip
(
v_reinterpret_as_u16
(
v_src0_c1
),
v_reinterpret_as_u16
(
v_src2_c1
),
v_tmp0
,
v_tmp1
);
v_zip
(
v_reinterpret_as_u16
(
v_src1_c1
),
v_reinterpret_as_u16
(
v_src3_c1
),
v_tmp1
,
v_tmp2
);
v_zip
(
v_tmp0
,
v_tmp1
,
v_src4567_c1
,
v_tmp2
);
v_zip
(
v_reinterpret_as_u16
(
v_src0_c2
),
v_reinterpret_as_u16
(
v_src2_c2
),
v_tmp0
,
v_tmp1
);
v_zip
(
v_reinterpret_as_u16
(
v_src1_c2
),
v_reinterpret_as_u16
(
v_src3_c2
),
v_tmp1
,
v_tmp2
);
v_zip
(
v_tmp0
,
v_tmp1
,
v_src4567_c2
,
v_tmp2
);
v_zip
(
v_reinterpret_as_u16
(
v_src0_c3
),
v_reinterpret_as_u16
(
v_src2_c3
),
v_tmp0
,
v_tmp1
);
v_zip
(
v_reinterpret_as_u16
(
v_src1_c3
),
v_reinterpret_as_u16
(
v_src3_c3
),
v_tmp1
,
v_tmp2
);
v_zip
(
v_tmp0
,
v_tmp1
,
v_src4567_c3
,
v_tmp2
);
v_expand
(
v_reinterpret_as_u8
(
v_combine_low
(
v_src0123_c1
,
v_src4567_c1
)),
v_src0123_c1
,
v_src4567_c1
);
v_expand
(
v_reinterpret_as_u8
(
v_combine_low
(
v_src0123_c2
,
v_src4567_c2
)),
v_src0123_c2
,
v_src4567_c2
);
v_expand
(
v_reinterpret_as_u8
(
v_combine_low
(
v_src0123_c3
,
v_src4567_c3
)),
v_src0123_c3
,
v_src4567_c3
);
v_int16x8
v_mul0123
=
v_load
((
int16_t
*
)
m
);
v_int16x8
v_mul4567
=
v_load
((
int16_t
*
)
m
+
8
);
v_uint32x4
v_res0123_c1
=
v_reinterpret_as_u32
(
v_dotprod
(
v_reinterpret_as_s16
(
v_src0123_c1
),
v_mul0123
));
v_uint32x4
v_res0123_c2
=
v_reinterpret_as_u32
(
v_dotprod
(
v_reinterpret_as_s16
(
v_src0123_c2
),
v_mul0123
));
v_uint32x4
v_res0123_c3
=
v_reinterpret_as_u32
(
v_dotprod
(
v_reinterpret_as_s16
(
v_src0123_c3
),
v_mul0123
));
v_uint32x4
v_res4567_c1
=
v_reinterpret_as_u32
(
v_dotprod
(
v_reinterpret_as_s16
(
v_src4567_c1
),
v_mul4567
));
v_uint32x4
v_res4567_c2
=
v_reinterpret_as_u32
(
v_dotprod
(
v_reinterpret_as_s16
(
v_src4567_c2
),
v_mul4567
));
v_uint32x4
v_res4567_c3
=
v_reinterpret_as_u32
(
v_dotprod
(
v_reinterpret_as_s16
(
v_src4567_c3
),
v_mul4567
));
v_store_interleave
((
uint16_t
*
)
dst
,
v_pack
(
v_res0123_c1
,
v_res4567_c1
),
v_pack
(
v_res0123_c2
,
v_res4567_c2
),
v_pack
(
v_res0123_c3
,
v_res4567_c3
));
}
for
(;
i
<
dst_max
;
i
+=
1
,
m
+=
2
)
{
uint8_t
*
px
=
src
+
3
*
ofst
[
i
];
*
(
dst
++
)
=
m
[
0
]
*
px
[
0
]
+
m
[
1
]
*
px
[
3
];
*
(
dst
++
)
=
m
[
0
]
*
px
[
1
]
+
m
[
1
]
*
px
[
4
];
*
(
dst
++
)
=
m
[
0
]
*
px
[
2
]
+
m
[
1
]
*
px
[
5
];
}
srccn
[
0
]
=
(
src
+
3
*
ofst
[
dst_width
-
1
])[
0
];
v_srccn0
=
v_setall_u16
(((
uint16_t
*
)
srccn
)[
0
]);
srccn
[
1
]
=
(
src
+
3
*
ofst
[
dst_width
-
1
])[
1
];
v_srccn1
=
v_setall_u16
(((
uint16_t
*
)
srccn
)[
1
]);
srccn
[
2
]
=
(
src
+
3
*
ofst
[
dst_width
-
1
])[
2
];
v_srccn2
=
v_setall_u16
(((
uint16_t
*
)
srccn
)[
2
]);
for
(;
i
<
dst_width
-
7
;
i
+=
8
,
dst
+=
24
)
// Points that fall left from src image so became equal to leftmost src point
{
v_store_interleave
((
uint16_t
*
)
dst
,
v_srccn0
,
v_srccn1
,
v_srccn2
);
}
for
(;
i
<
dst_width
;
i
++
)
{
*
(
dst
++
)
=
srccn
[
0
];
*
(
dst
++
)
=
srccn
[
1
];
*
(
dst
++
)
=
srccn
[
2
];
}
}
template
<
>
void
hlineResizeCn
<
uint8_t
,
ufixedpoint16
,
2
,
true
,
4
>
(
uint8_t
*
src
,
int
,
int
*
ofst
,
ufixedpoint16
*
m
,
ufixedpoint16
*
dst
,
int
dst_min
,
int
dst_max
,
int
dst_width
)
{
int
i
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录