Feature or Bugfix: Bugfix
Binary Source:No
Signed-off-by: guomengyu <guomengyu5@h-partners.com>

Signed-off-by: Zacoh <kouzhenrong@h-partners.com>
This commit is contained in:
Zacoh
2025-05-10 15:57:20 +08:00
parent 35349cf948
commit ea0e53a7f0
11 changed files with 538 additions and 413 deletions
+24 -24
View File
@@ -5,27 +5,27 @@ import("//build/ohos.gni")
action("libpng_action") {
script = "//third_party/libpng/install.py"
outputs = [
"${target_gen_dir}/libpng-1.6.38/png.c",
"${target_gen_dir}/libpng-1.6.38/pngerror.c",
"${target_gen_dir}/libpng-1.6.38/pngget.c",
"${target_gen_dir}/libpng-1.6.38/pngmem.c",
"${target_gen_dir}/libpng-1.6.38/pngpread.c",
"${target_gen_dir}/libpng-1.6.38/pngread.c",
"${target_gen_dir}/libpng-1.6.38/pngrio.c",
"${target_gen_dir}/libpng-1.6.38/pngrtran.c",
"${target_gen_dir}/libpng-1.6.38/pngrutil.c",
"${target_gen_dir}/libpng-1.6.38/pngset.c",
"${target_gen_dir}/libpng-1.6.38/pngtrans.c",
"${target_gen_dir}/libpng-1.6.38/pngwio.c",
"${target_gen_dir}/libpng-1.6.38/pngwrite.c",
"${target_gen_dir}/libpng-1.6.38/pngwtran.c",
"${target_gen_dir}/libpng-1.6.38/pngwutil.c",
"${target_gen_dir}/libpng-1.6.38/arm/arm_init.c",
"${target_gen_dir}/libpng-1.6.38/arm/filter_neon_intrinsics.c",
"${target_gen_dir}/libpng-1.6.38/arm/palette_neon_intrinsics.c",
"${target_gen_dir}/libpng-1.6.44/png.c",
"${target_gen_dir}/libpng-1.6.44/pngerror.c",
"${target_gen_dir}/libpng-1.6.44/pngget.c",
"${target_gen_dir}/libpng-1.6.44/pngmem.c",
"${target_gen_dir}/libpng-1.6.44/pngpread.c",
"${target_gen_dir}/libpng-1.6.44/pngread.c",
"${target_gen_dir}/libpng-1.6.44/pngrio.c",
"${target_gen_dir}/libpng-1.6.44/pngrtran.c",
"${target_gen_dir}/libpng-1.6.44/pngrutil.c",
"${target_gen_dir}/libpng-1.6.44/pngset.c",
"${target_gen_dir}/libpng-1.6.44/pngtrans.c",
"${target_gen_dir}/libpng-1.6.44/pngwio.c",
"${target_gen_dir}/libpng-1.6.44/pngwrite.c",
"${target_gen_dir}/libpng-1.6.44/pngwtran.c",
"${target_gen_dir}/libpng-1.6.44/pngwutil.c",
"${target_gen_dir}/libpng-1.6.44/arm/arm_init.c",
"${target_gen_dir}/libpng-1.6.44/arm/filter_neon_intrinsics.c",
"${target_gen_dir}/libpng-1.6.44/arm/palette_neon_intrinsics.c",
]
inputs = [ "//third_party/libpng/libpng-1.6.38.tar.gz" ]
inputs = [ "//third_party/libpng/libpng-1.6.44.tar.gz" ]
libpng_path = rebase_path("${target_gen_dir}", root_build_dir)
libpng_source_path = rebase_path("//third_party/libpng", root_build_dir)
args = [
@@ -40,7 +40,7 @@ if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
config("libpng_config") {
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
include_dirs = [ "${target_gen_dir}/libpng-1.6.44/" ]
}
libpng_source = get_target_outputs(":libpng_action")
@@ -68,7 +68,7 @@ if (defined(ohos_lite)) {
import("//build/ohos.gni")
config("libpng_config") {
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
include_dirs = [ "${target_gen_dir}/libpng-1.6.44/" ]
}
config("libpng_wno_config") {
@@ -93,7 +93,7 @@ if (defined(ohos_lite)) {
ohos_source_set("png_static") {
sources = get_target_outputs(":libpng_action")
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
include_dirs = [ "${target_gen_dir}/libpng-1.6.44/" ]
external_deps = [ "zlib:libz" ]
deps = [ ":libpng_action" ]
public_configs = [ ":libpng_config" ]
@@ -103,7 +103,7 @@ if (defined(ohos_lite)) {
ohos_shared_library("libpng") {
sources = get_target_outputs(":libpng_action")
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
include_dirs = [ "${target_gen_dir}/libpng-1.6.44/" ]
deps = [ ":libpng_action" ]
if (is_arkui_x) {
deps += [ "//third_party/zlib:libz" ]
@@ -130,7 +130,7 @@ if (defined(ohos_lite)) {
ohos_static_library("libpng_static") {
sources = get_target_outputs(":libpng_action")
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
include_dirs = [ "${target_gen_dir}/libpng-1.6.44/" ]
deps = [ ":libpng_action" ]
if (is_arkui_x) {
deps += [ "//third_party/zlib:libz" ]
+2 -2
View File
@@ -2,7 +2,7 @@ diff --git a/contrib/pngminus/png2pnm.c b/contrib/pngminus/png2pnm.c
index 5fef7ed14..5c8ff30f6 100644
--- a/contrib/pngminus/png2pnm.c
+++ b/contrib/pngminus/png2pnm.c
@@ -208,6 +208,16 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file,
@@ -193,6 +193,16 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_
if (setjmp (png_jmpbuf (png_ptr)))
{
png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
@@ -16,6 +16,6 @@ index 5fef7ed14..5c8ff30f6 100644
+ free(png_pixels);
+ png_pixels = NULL;
+ }
return FALSE;
return FALSE; /* generic libpng error */
}
+1 -1
View File
@@ -1,4 +1,4 @@
README for libpng version 1.6.38
README for libpng version 1.6.44
================================
See the note about version numbers near the top of png.h.
+2 -2
View File
@@ -3,9 +3,9 @@
"Name": "openEuler:libpng",
"License": "libpng license",
"License File": "LICENSE",
"Version Number": "1.6.38-2.oe2203sp3",
"Version Number": "1.6.44-1.oe2203sp1",
"Owner": "shangzhi@huawei.com",
"Upstream URL": "https://repo.openeuler.org/openEuler-22.03-LTS-SP3/source/Packages/libpng-1.6.38-2.oe2203sp3.src.rpm",
"Upstream URL": "https://repo.openeuler.org/openEuler-22.03-LTS-SP3/source/Packages/libpng-1.6.44-1.oe2203sp1.src.rpm",
"Description": "Reference library for supporting the Portable Network Graphics (PNG) format."
}
]
+12 -10
View File
@@ -2,7 +2,7 @@ diff --git a/arm/arm_init.c b/arm/arm_init.c
index ab22525b3..3a89998ab 100644
--- a/arm/arm_init.c
+++ b/arm/arm_init.c
@@ -31,23 +31,21 @@
@@ -31,26 +31,21 @@
* has partial support is contrib/arm-neon/linux.c - a generic Linux
* implementation which reads /proc/cpufino.
*/
@@ -11,16 +11,19 @@ index ab22525b3..3a89998ab 100644
#ifndef PNG_ARM_NEON_FILE
-# if defined(__aarch64__) || defined(_M_ARM64)
- /* ARM Neon is expected to be unconditionally available on ARM64. */
-# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this platform"
-# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64"
-# elif defined(__ARM_NEON__) || defined(__ARM_NEON)
- /* ARM Neon is expected to be available on the target CPU architecture. */
-# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch"
-# elif defined(__linux__)
-# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
-# else
-# error "No support for run-time ARM Neon checking; use compile-time options"
+# ifdef __linux__
+# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
+#ifdef __linux__
+#define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
# endif
#endif
-static int png_have_neon(png_structp png_ptr);
#ifdef PNG_ARM_NEON_FILE
-# include PNG_ARM_NEON_FILE
@@ -34,7 +37,7 @@ index ab22525b3..3a89998ab 100644
+# error "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks"
+#endif /* PNG_ARM_NEON_FILE */
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
diff --git a/arm/palette_neon_intrinsics.c b/arm/palette_neon_intrinsics.c
index 92c7d6f9f..49909d475 100644
@@ -157,13 +160,12 @@ diff --git a/pngset.c b/pngset.c
index 8c372cf41..6444c0615 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1019,9 +1019,6 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr,
info_ptr->trans_alpha = png_voidcast(png_bytep,
@@ -1008,8 +1008,6 @@ png_set_tRNS(png_structrp png_ptr, png_i
png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH));
memcpy(info_ptr->trans_alpha, trans_alpha, (size_t)num_trans);
-
- info_ptr->valid |= PNG_INFO_tRNS;
- info_ptr->free_me |= PNG_FREE_TRNS;
- info_ptr->valid |= PNG_INFO_tRNS;
}
png_ptr->trans_alpha = info_ptr->trans_alpha;
}
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -78,8 +78,8 @@ def main():
libpng_path.add_argument('--gen-dir', help='generate path of log', required=True)
libpng_path.add_argument('--source-dir', help='generate path of log', required=True)
args = libpng_path.parse_args()
tar_file_path = os.path.join(args.source_dir, "libpng-1.6.38.tar.gz")
target_dir = os.path.join(args.gen_dir, "libpng-1.6.38")
tar_file_path = os.path.join(args.source_dir, "libpng-1.6.44.tar.gz")
target_dir = os.path.join(args.gen_dir, "libpng-1.6.44")
untar_file(tar_file_path, args.gen_dir)
move_file(args.source_dir, target_dir)
Binary file not shown.
Binary file not shown.
+6 -3
View File
@@ -2,7 +2,7 @@ diff --git a/configure.ac b/configure.ac
index 4fb0778..930bf50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -283,17 +283,21 @@ AC_ARG_ENABLE([arm-neon],
@@ -393,17 +393,21 @@ AC_ARG_ENABLE([arm-neon],
[case "$enableval" in
no|off)
# disable the default enabling on __ARM_NEON__ systems:
@@ -23,12 +23,13 @@ index 4fb0778..930bf50 100644
+ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
AC_DEFINE([PNG_ARM_NEON_OPT], [2],
[Enable ARM Neon optimizations])
AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if]
AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';]
diff --git a/pngpriv.h b/pngpriv.h
index 1997503..789206f 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -125,7 +125,7 @@
@@ -127,7 +127,7 @@
* associated assembler code, pass --enable-arm-neon=no to configure
* or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS.
*/
@@ -37,3 +38,5 @@ index 1997503..789206f 100644
defined(PNG_ALIGNED_MEMORY_SUPPORTED)
# define PNG_ARM_NEON_OPT 2
# else
+8 -5
View File
@@ -1,6 +1,6 @@
Name: libpng
Epoch: 2
Version: 1.6.38
Version: 1.6.44
Release: 2
Summary: A library of functions for manipulating PNG image format files
License: zlib
@@ -30,16 +30,16 @@ applications that using the PNG library.
%package static
Summary: Static PNG image format file library
Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
%description static
The libpng-static package contains the statically linkable version of libpng.
Linking to static libraries is discouraged for most applications, but it is
necessary for some boot packages.
%package tools
Summary: Tools for PNG image format file library
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description tools
The libpng-tools package contains tools used by the authors of libpng.
@@ -80,7 +80,7 @@ make check
%files static
%{_libdir}/libpng*.a
%files tools
%{_bindir}/*
@@ -89,6 +89,9 @@ make check
%{_mandir}/man*/*
%changelog
* Thu May 10 2025 zhouwenpei <zhouwenpei1@h-partners.com> - 1.6.44-1
- update 1.6.44
* Thu Dec 15 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 1.6.38-2
- remove example.c from help