Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Libpng
提交
da9d1d7a
T
Third Party Libpng
项目概览
OpenHarmony
/
Third Party Libpng
11 个月 前同步成功
通知
4
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Libpng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
da9d1d7a
编写于
2月 19, 2016
作者:
G
Glenn Randers-Pehrson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[libpng16] Added pngdebug() statements to the new intel code and the arm code.
上级
52846504
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
32 addition
and
6 deletion
+32
-6
arm/arm_init.c
arm/arm_init.c
+3
-2
arm/filter_neon_intrinsics.c
arm/filter_neon_intrinsics.c
+16
-2
contrib/intel/INSTALL
contrib/intel/INSTALL
+4
-0
contrib/intel/filter_sse2_intrinsics.c
contrib/intel/filter_sse2_intrinsics.c
+7
-1
contrib/intel/intel_init.c
contrib/intel/intel_init.c
+2
-1
未找到文件。
arm/arm_init.c
浏览文件 @
da9d1d7a
/* arm_init.c - NEON optimised filter functions
*
* Copyright (c) 2014 Glenn Randers-Pehrson
* Copyright (c) 2014
,2016
Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
* Last changed in libpng 1.6.
16 [December 22, 2014
]
* Last changed in libpng 1.6.
22 [(PENDING RELEASE)
]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
...
...
@@ -66,6 +66,7 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
* wrong order of the 'ON' and 'default' cases. UNSET now defaults to OFF,
* as documented in png.h
*/
png_debug
(
1
,
"in png_init_filter_functions_neon"
);
#ifdef PNG_ARM_NEON_API_SUPPORTED
switch
((
pp
->
options
>>
PNG_ARM_NEON
)
&
3
)
{
...
...
arm/filter_neon_intrinsics.c
浏览文件 @
da9d1d7a
/* filter_neon_intrinsics.c - NEON optimised filter functions
*
* Copyright (c) 2014 Glenn Randers-Pehrson
* Copyright (c) 2014
,2016
Glenn Randers-Pehrson
* Written by James Yu <james.yu at linaro.org>, October 2013.
* Based on filter_neon.S, written by Mans Rullgard, 2011.
*
* Last changed in libpng 1.6.
16 [December 22, 2014
]
* Last changed in libpng 1.6.
22 [(PENDING RELEASE)
]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
...
...
@@ -47,6 +47,8 @@ png_read_filter_row_up_neon(png_row_infop row_info, png_bytep row,
png_bytep
rp_stop
=
row
+
row_info
->
rowbytes
;
png_const_bytep
pp
=
prev_row
;
png_debug
(
1
,
"in png_read_filter_row_up_neon"
);
for
(;
rp
<
rp_stop
;
rp
+=
16
,
pp
+=
16
)
{
uint8x16_t
qrp
,
qpp
;
...
...
@@ -72,6 +74,8 @@ png_read_filter_row_sub3_neon(png_row_infop row_info, png_bytep row,
uint8x8x4_t
vdest
;
vdest
.
val
[
3
]
=
vdup_n_u8
(
0
);
png_debug
(
1
,
"in png_read_filter_row_sub3_neon"
);
for
(;
rp
<
rp_stop
;)
{
uint8x8_t
vtmp1
,
vtmp2
;
...
...
@@ -113,6 +117,8 @@ png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row,
uint8x8x4_t
vdest
;
vdest
.
val
[
3
]
=
vdup_n_u8
(
0
);
png_debug
(
1
,
"in png_read_filter_row_sub4_neon"
);
for
(;
rp
<
rp_stop
;
rp
+=
16
)
{
uint32x2x4_t
vtmp
=
vld4_u32
(
png_ptr
(
uint32_t
,
rp
));
...
...
@@ -148,6 +154,8 @@ png_read_filter_row_avg3_neon(png_row_infop row_info, png_bytep row,
vrpt
=
png_ptr
(
uint8x8x2_t
,
&
vtmp
);
vrp
=
*
vrpt
;
png_debug
(
1
,
"in png_read_filter_row_avg3_neon"
);
for
(;
rp
<
rp_stop
;
pp
+=
12
)
{
uint8x8_t
vtmp1
,
vtmp2
,
vtmp3
;
...
...
@@ -207,6 +215,8 @@ png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row,
uint8x8x4_t
vdest
;
vdest
.
val
[
3
]
=
vdup_n_u8
(
0
);
png_debug
(
1
,
"in png_read_filter_row_avg4_neon"
);
for
(;
rp
<
rp_stop
;
rp
+=
16
,
pp
+=
16
)
{
uint32x2x4_t
vtmp
;
...
...
@@ -280,6 +290,8 @@ png_read_filter_row_paeth3_neon(png_row_infop row_info, png_bytep row,
vrpt
=
png_ptr
(
uint8x8x2_t
,
&
vtmp
);
vrp
=
*
vrpt
;
png_debug
(
1
,
"in png_read_filter_row_paeth3_neon"
);
for
(;
rp
<
rp_stop
;
pp
+=
12
)
{
uint8x8x2_t
*
vppt
;
...
...
@@ -339,6 +351,8 @@ png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
uint8x8x4_t
vdest
;
vdest
.
val
[
3
]
=
vdup_n_u8
(
0
);
png_debug
(
1
,
"in png_read_filter_row_paeth4_neon"
);
for
(;
rp
<
rp_stop
;
rp
+=
16
,
pp
+=
16
)
{
uint32x2x4_t
vtmp
;
...
...
contrib/intel/INSTALL
浏览文件 @
da9d1d7a
...
...
@@ -2,3 +2,7 @@
To enable SSE support in libpng, manually edit configure.ac and Makefile.am,
following the instructions in the configure.ac.patch and Makefile.am.patch
files, then configure with -DPNG_INTEL_SSE in CPPFLAGS.
If you have moved the *.c files to a different directory, be sure to update
the '#include "../../pngpriv.h"' line in both files if necessary to point
to the correct relative location of pngpriv.h.
contrib/intel/filter_sse2_intrinsics.c
浏览文件 @
da9d1d7a
...
...
@@ -4,7 +4,7 @@
* Copyright (c) 2016 Google, Inc.
* Written by Mike Klein and Matt Sarett
* Derived from arm/filter_neon_intrinsics.c, which was
* Copyright (c) 2014 Glenn Randers-Pehrson
* Copyright (c) 2014
,2016
Glenn Randers-Pehrson
*
* Last changed in libpng 1.6.22 [(PENDING RELEASE)]
*
...
...
@@ -55,6 +55,7 @@ void png_read_filter_row_sub3_sse2(png_row_infop row_info, png_bytep row,
* There is no pixel to the left of the first pixel. It's encoded directly.
* That works with our main loop if we just say that left pixel was zero.
*/
png_debug
(
1
,
"in png_read_filter_row_sub3_sse2"
);
__m128i
a
,
d
=
_mm_setzero_si128
();
int
rb
=
row_info
->
rowbytes
;
...
...
@@ -75,6 +76,7 @@ void png_read_filter_row_sub4_sse2(png_row_infop row_info, png_bytep row,
* There is no pixel to the left of the first pixel. It's encoded directly.
* That works with our main loop if we just say that left pixel was zero.
*/
png_debug
(
1
,
"in png_read_filter_row_sub4_sse2"
);
__m128i
a
,
d
=
_mm_setzero_si128
();
int
rb
=
row_info
->
rowbytes
;
...
...
@@ -96,6 +98,7 @@ void png_read_filter_row_avg3_sse2(png_row_infop row_info, png_bytep row,
* predicted to be half of the pixel above it. So again, this works
* perfectly with our loop if we make sure a starts at zero.
*/
png_debug
(
1
,
"in png_read_filter_row_avg3_sse2"
);
const
__m128i
zero
=
_mm_setzero_si128
();
__m128i
b
;
__m128i
a
,
d
=
zero
;
...
...
@@ -128,6 +131,7 @@ void png_read_filter_row_avg4_sse2(png_row_infop row_info, png_bytep row,
* predicted to be half of the pixel above it. So again, this works
* perfectly with our loop if we make sure a starts at zero.
*/
png_debug
(
1
,
"in png_read_filter_row_avg4_sse2"
);
const
__m128i
zero
=
_mm_setzero_si128
();
__m128i
b
;
__m128i
a
,
d
=
zero
;
...
...
@@ -196,6 +200,7 @@ void png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row,
* Here we zero b and d, which become c and a respectively at the start of
* the loop.
*/
png_debug
(
1
,
"in png_read_filter_row_paeth3_sse2"
);
const
__m128i
zero
=
_mm_setzero_si128
();
__m128i
c
,
b
=
zero
,
a
,
d
=
zero
;
...
...
@@ -254,6 +259,7 @@ void png_read_filter_row_paeth4_sse2(png_row_infop row_info, png_bytep row,
* Here we zero b and d, which become c and a respectively at the start of
* the loop.
*/
png_debug
(
1
,
"in png_read_filter_row_paeth4_sse2"
);
const
__m128i
zero
=
_mm_setzero_si128
();
__m128i
c
,
b
=
zero
,
a
,
d
=
zero
;
...
...
contrib/intel/intel_init.c
浏览文件 @
da9d1d7a
...
...
@@ -4,7 +4,7 @@
* Copyright (c) 2016 Google, Inc.
* Written by Mike Klein and Matt Sarett
* Derived from arm/arm_init.c, which was
* Copyright (c) 2014 Glenn Randers-Pehrson
* Copyright (c) 2014
,2016
Glenn Randers-Pehrson
*
* Last changed in libpng 1.6.22 [(PENDING RELEASE)]
*
...
...
@@ -29,6 +29,7 @@ png_init_filter_functions_sse2(png_structp pp, unsigned int bpp)
* Most of these can be implemented using only MMX and 64-bit registers,
* but they end up a bit slower than using the equally-ubiquitous SSE2.
*/
png_debug
(
1
,
"in png_init_filter_functions_sse2"
);
if
(
bpp
==
3
)
{
pp
->
read_filter
[
PNG_FILTER_VALUE_SUB
-
1
]
=
png_read_filter_row_sub3_sse2
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录