mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-17 22:39:52 +02:00
Compare commits
11 Commits
wasm-simd
...
v1.2.2-rc1
Author | SHA1 | Date | |
---|---|---|---|
f035d2e40d | |||
7031946ad8 | |||
973390b618 | |||
abd6664fee | |||
5b7e79303a | |||
02ca04c348 | |||
e94716e27c | |||
c846efd888 | |||
b6f756e82b | |||
8f5cb4c18e | |||
8ea81561d2 |
1
.mailmap
1
.mailmap
@ -12,3 +12,4 @@ Tamar Levy <tamar.levy@intel.com>
|
|||||||
<qrczak@google.com> <qrczak>
|
<qrczak@google.com> <qrczak>
|
||||||
Hui Su <huisu@google.com>
|
Hui Su <huisu@google.com>
|
||||||
James Zern <jzern@google.com>
|
James Zern <jzern@google.com>
|
||||||
|
Roberto Alanis <alanisbaez@google.com>
|
||||||
|
1
AUTHORS
1
AUTHORS
@ -32,6 +32,7 @@ Contributors:
|
|||||||
- Pascal Massimino (pascal dot massimino at gmail dot com)
|
- Pascal Massimino (pascal dot massimino at gmail dot com)
|
||||||
- Paweł Hajdan, Jr (phajdan dot jr at chromium dot org)
|
- Paweł Hajdan, Jr (phajdan dot jr at chromium dot org)
|
||||||
- Pierre Joye (pierre dot php at gmail dot com)
|
- Pierre Joye (pierre dot php at gmail dot com)
|
||||||
|
- Roberto Alanis (alanisbaez at google dot com)
|
||||||
- Sam Clegg (sbc at chromium dot org)
|
- Sam Clegg (sbc at chromium dot org)
|
||||||
- Scott Hancher (seh at google dot com)
|
- Scott Hancher (seh at google dot com)
|
||||||
- Scott LaVarnway (slavarnway at google dot com)
|
- Scott LaVarnway (slavarnway at google dot com)
|
||||||
|
@ -22,9 +22,6 @@ if(NOT EMSCRIPTEN)
|
|||||||
endif()
|
endif()
|
||||||
option(WEBP_ENABLE_SIMD "Enable any SIMD optimization."
|
option(WEBP_ENABLE_SIMD "Enable any SIMD optimization."
|
||||||
${WEBP_ENABLE_SIMD_DEFAULT})
|
${WEBP_ENABLE_SIMD_DEFAULT})
|
||||||
# Emscripten supports SSE builds using its compatibility headers, by default it
|
|
||||||
# will use SSE4 if WEBP_ENABLE_WASM_SIMD is OFF and WEBP_ENABLE_SIMD is ON.
|
|
||||||
option(WEBP_ENABLE_WASM_SIMD "Enable WebAssembly SIMD optimizations" OFF)
|
|
||||||
option(WEBP_BUILD_ANIM_UTILS "Build animation utilities." ON)
|
option(WEBP_BUILD_ANIM_UTILS "Build animation utilities." ON)
|
||||||
option(WEBP_BUILD_CWEBP "Build the cwebp command line tool." ON)
|
option(WEBP_BUILD_CWEBP "Build the cwebp command line tool." ON)
|
||||||
option(WEBP_BUILD_DWEBP "Build the dwebp command line tool." ON)
|
option(WEBP_BUILD_DWEBP "Build the dwebp command line tool." ON)
|
||||||
@ -51,6 +48,7 @@ endif()
|
|||||||
if(WEBP_BUILD_WEBP_JS)
|
if(WEBP_BUILD_WEBP_JS)
|
||||||
set(WEBP_BUILD_ANIM_UTILS OFF)
|
set(WEBP_BUILD_ANIM_UTILS OFF)
|
||||||
set(WEBP_BUILD_CWEBP OFF)
|
set(WEBP_BUILD_CWEBP OFF)
|
||||||
|
set(WEBP_BUILD_DWEBP OFF)
|
||||||
set(WEBP_BUILD_GIF2WEBP OFF)
|
set(WEBP_BUILD_GIF2WEBP OFF)
|
||||||
set(WEBP_BUILD_IMG2WEBP OFF)
|
set(WEBP_BUILD_IMG2WEBP OFF)
|
||||||
set(WEBP_BUILD_VWEBP OFF)
|
set(WEBP_BUILD_VWEBP OFF)
|
||||||
@ -82,9 +80,6 @@ include(GNUInstallDirs)
|
|||||||
if(WEBP_ENABLE_SWAP_16BIT_CSP)
|
if(WEBP_ENABLE_SWAP_16BIT_CSP)
|
||||||
add_definitions(-DWEBP_SWAP_16BIT_CSP=1)
|
add_definitions(-DWEBP_SWAP_16BIT_CSP=1)
|
||||||
endif()
|
endif()
|
||||||
if(WEBP_ENABLE_WASM_SIMD)
|
|
||||||
add_definitions(-DWEBP_ENABLE_WASM_SIMD_INTRINSICS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT WEBP_BITTRACE STREQUAL "0")
|
if(NOT WEBP_BITTRACE STREQUAL "0")
|
||||||
add_definitions(-DBITTRACE=${WEBP_BITTRACE})
|
add_definitions(-DBITTRACE=${WEBP_BITTRACE})
|
||||||
|
41
ChangeLog
41
ChangeLog
@ -1,7 +1,48 @@
|
|||||||
|
7031946a update NEWS
|
||||||
|
973390b6 bump version to 1.2.2
|
||||||
|
abd6664f update AUTHORS
|
||||||
|
5b7e7930 Merge "add missing USE_{MSA,NEON} checks in headers" into main
|
||||||
|
02ca04c3 add missing USE_{MSA,NEON} checks in headers
|
||||||
|
e94716e2 xcframeworkbuild.sh: place headers in a subdir
|
||||||
|
c846efd8 patch-check: commit subject length check
|
||||||
|
b6f756e8 update http links
|
||||||
|
8f5cb4c1 update rfc links
|
||||||
|
8ea81561 change VP8LPredictorFunc signature to avoid reading 'left'
|
||||||
|
6b1d18c3 webpmux: fix the -bgcolor description
|
||||||
|
3368d876 Merge "webpmux: add "-set bgcolor A,R,G,B"" into main
|
||||||
|
f213abf6 webpinfo: print the number of warnings
|
||||||
|
50c97c30 webpmux: add "-set bgcolor A,R,G,B"
|
||||||
|
2c206aaf Remove CMakeLists.txt check in compile.sh
|
||||||
|
96e3dfef Merge "infra/common.sh: add shard_should_run()" into main
|
||||||
|
0e0f74b7 infra/common.sh: add shard_should_run()
|
||||||
|
35b7436a Jenkins scripts port: update shell function comments
|
||||||
|
21d24b4c webp-container-spec.txt: remove 'experimental' markers
|
||||||
|
cdcf8902 Merge "Port Jenkins script: compile" into main
|
||||||
|
dc683cde Jenkins scripts port: static analysis
|
||||||
|
0858494e Port Jenkins script: compile
|
||||||
|
c2cf6a93 Jenkins scripts port: android compilation
|
||||||
|
df0e808f presubmit: Add pylint-2.7 and .pylintrc
|
||||||
|
676c57db patch-check: shfmt
|
||||||
|
7bb7f747 patch-check: Add shellcheck
|
||||||
|
abcd1797 Reformat docstrings and imports
|
||||||
|
edaf0895 Port Jenkins scripts: compile js
|
||||||
|
b9622063 Set CheckPatchFormatted flags to fail on diffs
|
||||||
|
e23cd548 dsp.h: enable NEON w/VS2019+ ARM64 targets
|
||||||
|
3875c7de CMakeLists.txt: set minimum version to 3.7
|
||||||
|
1a8f0d45 Have a hard-coded value for memset in TrellisQuantizeBlock.
|
||||||
|
93480160 Speed up TrellisQuantizeBlock
|
||||||
|
45eaacc9 Convert deprecated uint32 to uint32_t.
|
||||||
|
42592af8 webp,cmake: Remove unnecessary include dirs
|
||||||
|
e298e05f Add patch-check steps in PRESUBMIT.py
|
||||||
|
29148919 Merge tag 'v1.2.1'
|
||||||
|
9ce5843d update ChangeLog (tag: v1.2.1, origin/1.2.1)
|
||||||
d9191588 fuzzer/*: normalize src/ includes
|
d9191588 fuzzer/*: normalize src/ includes
|
||||||
|
c5bc3624 fuzzer/*: normalize src/ includes
|
||||||
53b6f762 fix indent
|
53b6f762 fix indent
|
||||||
|
d2caaba4 fix indent
|
||||||
731246ba update ChangeLog (tag: v1.2.1-rc2)
|
731246ba update ChangeLog (tag: v1.2.1-rc2)
|
||||||
d250f01d dsp/*: use WEBP_HAVE_* to determine Init availability
|
d250f01d dsp/*: use WEBP_HAVE_* to determine Init availability
|
||||||
|
1fe31625 dsp/*: use WEBP_HAVE_* to determine Init availability
|
||||||
3a4d3ecd update NEWS
|
3a4d3ecd update NEWS
|
||||||
b2bc8093 bump version to 1.2.1
|
b2bc8093 bump version to 1.2.1
|
||||||
e542fc7a update AUTHORS
|
e542fc7a update AUTHORS
|
||||||
|
8
NEWS
8
NEWS
@ -1,3 +1,11 @@
|
|||||||
|
- 12/15/2021: version 1.2.2
|
||||||
|
This is a binary compatible release.
|
||||||
|
* webpmux: add "-set bgcolor A,R,G,B"
|
||||||
|
* add ARM64 NEON support for MSVC builds (#539)
|
||||||
|
* fix duplicate include error in Xcode when using multiple XCFrameworks in a
|
||||||
|
project (#542)
|
||||||
|
* doc updates and bug fixes (#538, #544)
|
||||||
|
|
||||||
- 7/20/2021: version 1.2.1
|
- 7/20/2021: version 1.2.1
|
||||||
This is a binary compatible release.
|
This is a binary compatible release.
|
||||||
* minor lossless encoder improvements and x86 color conversion speed up
|
* minor lossless encoder improvements and x86 color conversion speed up
|
||||||
|
31
PRESUBMIT.py
31
PRESUBMIT.py
@ -33,15 +33,45 @@ See https://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
|
|||||||
details on the presubmit API built into depot_tools.
|
details on the presubmit API built into depot_tools.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import re
|
||||||
import subprocess2
|
import subprocess2
|
||||||
|
|
||||||
USE_PYTHON3 = True
|
USE_PYTHON3 = True
|
||||||
_BASH_INDENTATION = "2"
|
_BASH_INDENTATION = "2"
|
||||||
|
_GIT_COMMIT_SUBJECT_LENGTH = 65
|
||||||
_INCLUDE_BASH_FILES_ONLY = [r".*\.sh$"]
|
_INCLUDE_BASH_FILES_ONLY = [r".*\.sh$"]
|
||||||
_INCLUDE_MAN_FILES_ONLY = [r"man/.+\.1$"]
|
_INCLUDE_MAN_FILES_ONLY = [r"man/.+\.1$"]
|
||||||
_LIBWEBP_MAX_LINE_LENGTH = 80
|
_LIBWEBP_MAX_LINE_LENGTH = 80
|
||||||
|
|
||||||
|
|
||||||
|
def _CheckCommitSubjectLength(input_api, output_api):
|
||||||
|
"""Ensures commit's subject length is no longer than 65 chars."""
|
||||||
|
name = "git-commit subject"
|
||||||
|
cmd = ["git", "log", "-1", "--pretty=%s"]
|
||||||
|
start = input_api.time.time()
|
||||||
|
proc = subprocess2.Popen(
|
||||||
|
cmd,
|
||||||
|
stderr=subprocess2.PIPE,
|
||||||
|
stdout=subprocess2.PIPE,
|
||||||
|
universal_newlines=True)
|
||||||
|
|
||||||
|
stdout, _ = proc.communicate()
|
||||||
|
duration = input_api.time.time() - start
|
||||||
|
|
||||||
|
if not re.match(r"^Revert",
|
||||||
|
stdout) and (len(stdout) - 1) > _GIT_COMMIT_SUBJECT_LENGTH:
|
||||||
|
failure_msg = (
|
||||||
|
"The commit subject: %s is too long (%d chars)\n"
|
||||||
|
"Try to keep this to 50 or less (up to 65 is permitted for "
|
||||||
|
"non-reverts).\n"
|
||||||
|
"https://www.git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-"
|
||||||
|
"Project#_commit_guidelines") % (stdout, len(stdout) - 1)
|
||||||
|
return output_api.PresubmitError("%s\n (%4.2fs) failed\n%s" %
|
||||||
|
(name, duration, failure_msg))
|
||||||
|
|
||||||
|
return output_api.PresubmitResult("%s\n (%4.2fs) success" % (name, duration))
|
||||||
|
|
||||||
|
|
||||||
def _GetFilesToSkip(input_api):
|
def _GetFilesToSkip(input_api):
|
||||||
return list(input_api.DEFAULT_FILES_TO_SKIP) + [
|
return list(input_api.DEFAULT_FILES_TO_SKIP) + [
|
||||||
r"swig/.*\.py$",
|
r"swig/.*\.py$",
|
||||||
@ -123,6 +153,7 @@ def _CommonChecks(input_api, output_api):
|
|||||||
results.extend(
|
results.extend(
|
||||||
input_api.canned_checks.CheckChangeHasNoStrayWhitespace(
|
input_api.canned_checks.CheckChangeHasNoStrayWhitespace(
|
||||||
input_api, output_api))
|
input_api, output_api))
|
||||||
|
results.append(_CheckCommitSubjectLength(input_api, output_api))
|
||||||
|
|
||||||
source_file_filter = lambda x: input_api.FilterSourceFile(
|
source_file_filter = lambda x: input_api.FilterSourceFile(
|
||||||
x, files_to_skip=_GetFilesToSkip(input_api))
|
x, files_to_skip=_GetFilesToSkip(input_api))
|
||||||
|
14
README
14
README
@ -4,7 +4,7 @@
|
|||||||
\__\__/\____/\_____/__/ ____ ___
|
\__\__/\____/\_____/__/ ____ ___
|
||||||
/ _/ / \ \ / _ \/ _/
|
/ _/ / \ \ / _ \/ _/
|
||||||
/ \_/ / / \ \ __/ \__
|
/ \_/ / / \ \ __/ \__
|
||||||
\____/____/\_____/_____/____/v1.2.1
|
\____/____/\_____/_____/____/v1.2.2
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
============
|
============
|
||||||
@ -13,13 +13,13 @@ WebP codec: library to encode and decode images in WebP format. This package
|
|||||||
contains the library that can be used in other programs to add WebP support,
|
contains the library that can be used in other programs to add WebP support,
|
||||||
as well as the command line tools 'cwebp' and 'dwebp'.
|
as well as the command line tools 'cwebp' and 'dwebp'.
|
||||||
|
|
||||||
See http://developers.google.com/speed/webp
|
See https://developers.google.com/speed/webp
|
||||||
|
|
||||||
The latest source tree is available at
|
The latest source tree is available at
|
||||||
https://chromium.googlesource.com/webm/libwebp
|
https://chromium.googlesource.com/webm/libwebp
|
||||||
|
|
||||||
It is released under the same license as the WebM project.
|
It is released under the same license as the WebM project.
|
||||||
See http://www.webmproject.org/license/software/ or the
|
See https://www.webmproject.org/license/software/ or the
|
||||||
"COPYING" file for details. An additional intellectual
|
"COPYING" file for details. An additional intellectual
|
||||||
property rights grant can be found in the file PATENTS.
|
property rights grant can be found in the file PATENTS.
|
||||||
|
|
||||||
@ -436,8 +436,8 @@ Prerequisites:
|
|||||||
|
|
||||||
2) (Optional) qcms (Quick Color Management System)
|
2) (Optional) qcms (Quick Color Management System)
|
||||||
i. Download qcms from Mozilla / Chromium:
|
i. Download qcms from Mozilla / Chromium:
|
||||||
http://hg.mozilla.org/mozilla-central/file/0e7639e3bdfb/gfx/qcms
|
https://hg.mozilla.org/mozilla-central/file/0e7639e3bdfb/gfx/qcms
|
||||||
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/qcms
|
https://source.chromium.org/chromium/chromium/src/+/main:third_party/qcms/;drc=d4a2f8e1ed461d8fc05ed88d1ae2dc94c9773825
|
||||||
ii. Build and archive the source files as libqcms.a / qcms.lib
|
ii. Build and archive the source files as libqcms.a / qcms.lib
|
||||||
iii. Update makefile.unix / Makefile.vc
|
iii. Update makefile.unix / Makefile.vc
|
||||||
a) Define WEBP_HAVE_QCMS
|
a) Define WEBP_HAVE_QCMS
|
||||||
@ -786,10 +786,10 @@ Bugs:
|
|||||||
Please report all bugs to the issue tracker:
|
Please report all bugs to the issue tracker:
|
||||||
https://bugs.chromium.org/p/webp
|
https://bugs.chromium.org/p/webp
|
||||||
Patches welcome! See this page to get started:
|
Patches welcome! See this page to get started:
|
||||||
http://www.webmproject.org/code/contribute/submitting-patches/
|
https://www.webmproject.org/code/contribute/submitting-patches/
|
||||||
|
|
||||||
Discuss:
|
Discuss:
|
||||||
========
|
========
|
||||||
|
|
||||||
Email: webp-discuss@webmproject.org
|
Email: webp-discuss@webmproject.org
|
||||||
Web: http://groups.google.com/a/webmproject.org/group/webp-discuss
|
Web: https://groups.google.com/a/webmproject.org/group/webp-discuss
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
__ __ ____ ____ ____ __ __ _ __ __
|
__ __ ____ ____ ____ __ __ _ __ __
|
||||||
/ \\/ \/ _ \/ _ \/ _ \/ \ \/ \___/_ / _\
|
/ \\/ \/ _ \/ _ \/ _ \/ \ \/ \___/_ / _\
|
||||||
\ / __/ _ \ __/ / / (_/ /__
|
\ / __/ _ \ __/ / / (_/ /__
|
||||||
\__\__/\_____/_____/__/ \__//_/\_____/__/___/v1.2.1
|
\__\__/\_____/_____/__/ \__//_/\_____/__/___/v1.2.2
|
||||||
|
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
@ -249,10 +249,10 @@ Bugs:
|
|||||||
Please report all bugs to the issue tracker:
|
Please report all bugs to the issue tracker:
|
||||||
https://bugs.chromium.org/p/webp
|
https://bugs.chromium.org/p/webp
|
||||||
Patches welcome! See this page to get started:
|
Patches welcome! See this page to get started:
|
||||||
http://www.webmproject.org/code/contribute/submitting-patches/
|
https://www.webmproject.org/code/contribute/submitting-patches/
|
||||||
|
|
||||||
Discuss:
|
Discuss:
|
||||||
========
|
========
|
||||||
|
|
||||||
Email: webp-discuss@webmproject.org
|
Email: webp-discuss@webmproject.org
|
||||||
Web: http://groups.google.com/a/webmproject.org/group/webp-discuss
|
Web: https://groups.google.com/a/webmproject.org/group/webp-discuss
|
||||||
|
@ -108,9 +108,6 @@
|
|||||||
/* Set to 1 if JPEG library is installed */
|
/* Set to 1 if JPEG library is installed */
|
||||||
#cmakedefine WEBP_HAVE_JPEG 1
|
#cmakedefine WEBP_HAVE_JPEG 1
|
||||||
|
|
||||||
/* Set to 1 if Wasm SIMD is supported */
|
|
||||||
#cmakedefine WEBP_HAVE_WASM_SIMD
|
|
||||||
|
|
||||||
/* Set to 1 if NEON is supported */
|
/* Set to 1 if NEON is supported */
|
||||||
#cmakedefine WEBP_HAVE_NEON
|
#cmakedefine WEBP_HAVE_NEON
|
||||||
|
|
||||||
|
@ -36,9 +36,9 @@ function(webp_check_compiler_flag WEBP_SIMD_FLAG ENABLE_SIMD)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# those are included in the names of WEBP_USE_* in c++ code.
|
# those are included in the names of WEBP_USE_* in c++ code.
|
||||||
set(WEBP_SIMD_FLAGS "WASM_SIMD;SSE41;SSE2;MIPS32;MIPS_DSP_R2;NEON;MSA")
|
set(WEBP_SIMD_FLAGS "SSE41;SSE2;MIPS32;MIPS_DSP_R2;NEON;MSA")
|
||||||
set(WEBP_SIMD_FILE_EXTENSIONS
|
set(WEBP_SIMD_FILE_EXTENSIONS
|
||||||
"_wasm.c;_sse41.c;_sse2.c;_mips32.c;_mips_dsp_r2.c;_neon.c;_msa.c")
|
"_sse41.c;_sse2.c;_mips32.c;_mips_dsp_r2.c;_neon.c;_msa.c")
|
||||||
if(MSVC AND CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
if(MSVC AND CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||||
# With at least Visual Studio 12 (2013)+ /arch is not necessary to build SSE2
|
# With at least Visual Studio 12 (2013)+ /arch is not necessary to build SSE2
|
||||||
# or SSE4 code unless a lesser /arch is forced. MSVC does not have a SSE4
|
# or SSE4 code unless a lesser /arch is forced. MSVC does not have a SSE4
|
||||||
@ -53,9 +53,9 @@ if(MSVC AND CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
|||||||
set(SIMD_DISABLE_FLAGS)
|
set(SIMD_DISABLE_FLAGS)
|
||||||
else()
|
else()
|
||||||
set(SIMD_ENABLE_FLAGS
|
set(SIMD_ENABLE_FLAGS
|
||||||
"-msimd128;-msse4.1;-msse2;-mips32;-mdspr2;-mfpu=neon;-mmsa")
|
"-msse4.1;-msse2;-mips32;-mdspr2;-mfpu=neon;-mmsa")
|
||||||
set(SIMD_DISABLE_FLAGS
|
set(SIMD_DISABLE_FLAGS
|
||||||
"-mno-simd128;-mno-sse4.1;-mno-sse2;;-mno-dspr2;;-mno-msa")
|
"-mno-sse4.1;-mno-sse2;;-mno-dspr2;;-mno-msa")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(WEBP_SIMD_FILES_TO_NOT_INCLUDE)
|
set(WEBP_SIMD_FILES_TO_NOT_INCLUDE)
|
||||||
@ -77,12 +77,7 @@ math(EXPR WEBP_SIMD_FLAGS_RANGE "${WEBP_SIMD_FLAGS_LENGTH} - 1")
|
|||||||
foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
|
foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
|
||||||
# With Emscripten 2.0.9 -msimd128 -mfpu=neon will enable NEON, but the
|
# With Emscripten 2.0.9 -msimd128 -mfpu=neon will enable NEON, but the
|
||||||
# source will fail to compile.
|
# source will fail to compile.
|
||||||
if(EMSCRIPTEN AND ${I_SIMD} GREATER_EQUAL 5)
|
if(EMSCRIPTEN AND ${I_SIMD} GREATER_EQUAL 2)
|
||||||
break()
|
|
||||||
endif()
|
|
||||||
# Emscripten supports SSE via compat headers, if WEBP_ENABLED_WASM_SIMD is
|
|
||||||
# specified skip testing those (because it will succeed).
|
|
||||||
if (EMSCRIPTEN AND ${I_SIMD} GREATER_EQUAL 1 AND ${WEBP_ENABLE_WASM_SIMD})
|
|
||||||
break()
|
break()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -96,7 +91,6 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
|
|||||||
webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD})
|
webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD})
|
||||||
if(NOT WEBP_HAVE_${WEBP_SIMD_FLAG})
|
if(NOT WEBP_HAVE_${WEBP_SIMD_FLAG})
|
||||||
list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
|
list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
|
||||||
# This enables using Emscripten's SSE compatibility headers.
|
|
||||||
if(EMSCRIPTEN)
|
if(EMSCRIPTEN)
|
||||||
set(SIMD_COMPILE_FLAG "-msimd128 ${SIMD_COMPILE_FLAG}")
|
set(SIMD_COMPILE_FLAG "-msimd128 ${SIMD_COMPILE_FLAG}")
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
AC_INIT([libwebp], [1.2.1],
|
AC_INIT([libwebp], [1.2.2],
|
||||||
[https://bugs.chromium.org/p/webp],,
|
[https://bugs.chromium.org/p/webp],,
|
||||||
[http://developers.google.com/speed/webp])
|
[https://developers.google.com/speed/webp])
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
AC_PREREQ([2.60])
|
AC_PREREQ([2.60])
|
||||||
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
|
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
|
||||||
|
@ -6,8 +6,8 @@ HTML generation requires kramdown [1], easily installed as a
|
|||||||
rubygem [2]. Rubygems installation should satisfy dependencies
|
rubygem [2]. Rubygems installation should satisfy dependencies
|
||||||
automatically.
|
automatically.
|
||||||
|
|
||||||
[1]: http://kramdown.rubyforge.org/
|
[1]: https://kramdown.gettalong.org/
|
||||||
[2]: http://rubygems.org/
|
[2]: https://rubygems.org/
|
||||||
|
|
||||||
HTML generation can then be done from the project root:
|
HTML generation can then be done from the project root:
|
||||||
|
|
||||||
@ -26,4 +26,4 @@ $ kramdown doc/webp-lossless-bitstream-spec.txt --template \
|
|||||||
|
|
||||||
Optimally, use kramdown 0.13.7 or newer if syntax highlighting desired.
|
Optimally, use kramdown 0.13.7 or newer if syntax highlighting desired.
|
||||||
|
|
||||||
[3]: http://coderay.rubychan.de/
|
[3]: https://github.com/rubychan/coderay
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Although you may be viewing an alternate representation, this document
|
Although you may be viewing an alternate representation, this document
|
||||||
is sourced in Markdown, a light-duty markup scheme, and is optimized for
|
is sourced in Markdown, a light-duty markup scheme, and is optimized for
|
||||||
the [kramdown](http://kramdown.rubyforge.org/) transformer.
|
the [kramdown](https://kramdown.gettalong.org/) transformer.
|
||||||
|
|
||||||
See the accompanying README. External link targets are referenced at the
|
See the accompanying README. External link targets are referenced at the
|
||||||
end of this file.
|
end of this file.
|
||||||
@ -811,9 +811,9 @@ RIFF/WEBP
|
|||||||
+- EXIF (metadata)
|
+- EXIF (metadata)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
[vp8spec]: http://tools.ietf.org/html/rfc6386
|
[vp8spec]: https://datatracker.ietf.org/doc/html/rfc6386
|
||||||
[webpllspec]: https://chromium.googlesource.com/webm/libwebp/+/HEAD/doc/webp-lossless-bitstream-spec.txt
|
[webpllspec]: https://chromium.googlesource.com/webm/libwebp/+/HEAD/doc/webp-lossless-bitstream-spec.txt
|
||||||
[iccspec]: http://www.color.org/icc_specs2.xalter
|
[iccspec]: https://www.color.org/icc_specs2.xalter
|
||||||
[metadata]: http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf
|
[metadata]: https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf
|
||||||
[rfc 1166]: http://tools.ietf.org/html/rfc1166
|
[rfc 1166]: https://datatracker.ietf.org/doc/html/rfc1166
|
||||||
[rfc 2119]: http://tools.ietf.org/html/rfc2119
|
[rfc 2119]: https://datatracker.ietf.org/doc/html/rfc2119
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Although you may be viewing an alternate representation, this document
|
Although you may be viewing an alternate representation, this document
|
||||||
is sourced in Markdown, a light-duty markup scheme, and is optimized for
|
is sourced in Markdown, a light-duty markup scheme, and is optimized for
|
||||||
the [kramdown](http://kramdown.rubyforge.org/) transformer.
|
the [kramdown](https://kramdown.gettalong.org/) transformer.
|
||||||
|
|
||||||
See the accompanying README. External link targets are referenced at the
|
See the accompanying README. External link targets are referenced at the
|
||||||
end of this file.
|
end of this file.
|
||||||
@ -1087,4 +1087,4 @@ A possible example sequence:
|
|||||||
<lz77-coded image>
|
<lz77-coded image>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
[canonical_huff]: http://en.wikipedia.org/wiki/Canonical_Huffman_code
|
[canonical_huff]: https://en.wikipedia.org/wiki/Canonical_Huffman_code
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#define XTRA_MAJ_VERSION 1
|
#define XTRA_MAJ_VERSION 1
|
||||||
#define XTRA_MIN_VERSION 2
|
#define XTRA_MIN_VERSION 2
|
||||||
#define XTRA_REV_VERSION 1
|
#define XTRA_REV_VERSION 2
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ int WebPWriteTIFF(FILE* fout, const struct WebPDecBuffer* const buffer);
|
|||||||
int WebPWriteAlphaPlane(FILE* fout, const struct WebPDecBuffer* const buffer);
|
int WebPWriteAlphaPlane(FILE* fout, const struct WebPDecBuffer* const buffer);
|
||||||
|
|
||||||
// Save as YUV samples as PGM format (using IMC4 layout).
|
// Save as YUV samples as PGM format (using IMC4 layout).
|
||||||
// See: http://www.fourcc.org/yuv.php#IMC4.
|
// See: https://www.fourcc.org/yuv.php#IMC4.
|
||||||
// (very convenient format for viewing the samples, esp. for odd dimensions).
|
// (very convenient format for viewing the samples, esp. for odd dimensions).
|
||||||
int WebPWritePGM(FILE* fout, const struct WebPDecBuffer* const buffer);
|
int WebPWritePGM(FILE* fout, const struct WebPDecBuffer* const buffer);
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ static const struct {
|
|||||||
MetadataPayload* const payload);
|
MetadataPayload* const payload);
|
||||||
size_t storage_offset;
|
size_t storage_offset;
|
||||||
} kPNGMetadataMap[] = {
|
} kPNGMetadataMap[] = {
|
||||||
// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/PNG.html#TextualData
|
// https://exiftool.org/TagNames/PNG.html#TextualData
|
||||||
// See also: ExifTool on CPAN.
|
// See also: ExifTool on CPAN.
|
||||||
{ "Raw profile type exif", ProcessRawProfile, METADATA_OFFSET(exif) },
|
{ "Raw profile type exif", ProcessRawProfile, METADATA_OFFSET(exif) },
|
||||||
{ "Raw profile type xmp", ProcessRawProfile, METADATA_OFFSET(xmp) },
|
{ "Raw profile type xmp", ProcessRawProfile, METADATA_OFFSET(xmp) },
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# (the previous build will be erased if it exists).
|
# (the previous build will be erased if it exists).
|
||||||
#
|
#
|
||||||
# This script is inspired by the build script written by Carson McDonald.
|
# This script is inspired by the build script written by Carson McDonald.
|
||||||
# (http://www.ioncannon.net/programming/1483/using-webp-to-reduce-native-ios-app-size/).
|
# (https://www.ioncannon.net/programming/1483/using-webp-to-reduce-native-ios-app-size/).
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ if [[ ! -e ${SRCDIR}/configure ]]; then
|
|||||||
Error creating configure script!
|
Error creating configure script!
|
||||||
This script requires the autoconf/automake and libtool to build. MacPorts can
|
This script requires the autoconf/automake and libtool to build. MacPorts can
|
||||||
be used to obtain these:
|
be used to obtain these:
|
||||||
http://www.macports.org/install.php
|
https://www.macports.org/install.php
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -47,7 +47,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# To install libraries on Mac OS X:
|
# To install libraries on Mac OS X:
|
||||||
# 1. Install MacPorts (http://www.macports.org/install.php)
|
# 1. Install MacPorts (https://www.macports.org/install.php)
|
||||||
# 2. Run "sudo port install jpeg"
|
# 2. Run "sudo port install jpeg"
|
||||||
# 3. Run "sudo port install libpng"
|
# 3. Run "sudo port install libpng"
|
||||||
# 4. Run "sudo port install tiff"
|
# 4. Run "sudo port install tiff"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH CWEBP 1 "November 19, 2020"
|
.TH CWEBP 1 "November 17, 2021"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
cwebp \- compress an image file to a WebP file
|
cwebp \- compress an image file to a WebP file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -222,7 +222,7 @@ Compute and report average PSNR (Peak\-Signal\-To\-Noise ratio).
|
|||||||
.TP
|
.TP
|
||||||
.B \-print_ssim
|
.B \-print_ssim
|
||||||
Compute and report average SSIM (structural similarity
|
Compute and report average SSIM (structural similarity
|
||||||
metric, see http://en.wikipedia.org/wiki/SSIM for additional details).
|
metric, see https://en.wikipedia.org/wiki/SSIM for additional details).
|
||||||
.TP
|
.TP
|
||||||
.B \-print_lsim
|
.B \-print_lsim
|
||||||
Compute and report local similarity metric (sum of lowest error amongst the
|
Compute and report local similarity metric (sum of lowest error amongst the
|
||||||
@ -298,7 +298,7 @@ Please report all bugs to the issue tracker:
|
|||||||
https://bugs.chromium.org/p/webp
|
https://bugs.chromium.org/p/webp
|
||||||
.br
|
.br
|
||||||
Patches welcome! See this page to get started:
|
Patches welcome! See this page to get started:
|
||||||
http://www.webmproject.org/code/contribute/submitting\-patches/
|
https://www.webmproject.org/code/contribute/submitting\-patches/
|
||||||
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
cwebp \-q 50 -lossless picture.png \-o picture_lossless.webp
|
cwebp \-q 50 -lossless picture.png \-o picture_lossless.webp
|
||||||
@ -322,5 +322,5 @@ for the Debian project (and may be used by others).
|
|||||||
.BR dwebp (1),
|
.BR dwebp (1),
|
||||||
.BR gif2webp (1)
|
.BR gif2webp (1)
|
||||||
.br
|
.br
|
||||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||||
information.
|
information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH DWEBP 1 "November 19, 2020"
|
.TH DWEBP 1 "November 17, 2021"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
dwebp \- decompress a WebP file to an image file
|
dwebp \- decompress a WebP file to an image file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -113,7 +113,7 @@ Please report all bugs to the issue tracker:
|
|||||||
https://bugs.chromium.org/p/webp
|
https://bugs.chromium.org/p/webp
|
||||||
.br
|
.br
|
||||||
Patches welcome! See this page to get started:
|
Patches welcome! See this page to get started:
|
||||||
http://www.webmproject.org/code/contribute/submitting-patches/
|
https://www.webmproject.org/code/contribute/submitting\-patches/
|
||||||
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
dwebp picture.webp \-o output.png
|
dwebp picture.webp \-o output.png
|
||||||
@ -138,7 +138,7 @@ for the Debian project (and may be used by others).
|
|||||||
.BR gif2webp (1),
|
.BR gif2webp (1),
|
||||||
.BR webpmux (1)
|
.BR webpmux (1)
|
||||||
.br
|
.br
|
||||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||||
information.
|
information.
|
||||||
.SS Output file format details
|
.SS Output file format details
|
||||||
PAM: http://netpbm.sourceforge.net/doc/pam.html
|
PAM: http://netpbm.sourceforge.net/doc/pam.html
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH GIF2WEBP 1 "May 1, 2020"
|
.TH GIF2WEBP 1 "November 17, 2021"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
gif2webp \- Convert a GIF image to WebP
|
gif2webp \- Convert a GIF image to WebP
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -131,7 +131,7 @@ Please report all bugs to the issue tracker:
|
|||||||
https://bugs.chromium.org/p/webp
|
https://bugs.chromium.org/p/webp
|
||||||
.br
|
.br
|
||||||
Patches welcome! See this page to get started:
|
Patches welcome! See this page to get started:
|
||||||
http://www.webmproject.org/code/contribute/submitting-patches/
|
https://www.webmproject.org/code/contribute/submitting\-patches/
|
||||||
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
gif2webp picture.gif \-o picture.webp
|
gif2webp picture.gif \-o picture.webp
|
||||||
@ -160,5 +160,5 @@ Debian project (and may be used by others).
|
|||||||
.BR dwebp (1),
|
.BR dwebp (1),
|
||||||
.BR webpmux (1)
|
.BR webpmux (1)
|
||||||
.br
|
.br
|
||||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||||
information.
|
information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH IMG2WEBP 1 "May 1, 2020"
|
.TH IMG2WEBP 1 "November 17, 2021"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
img2webp \- create animated WebP file from a sequence of input images.
|
img2webp \- create animated WebP file from a sequence of input images.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -86,7 +86,7 @@ Please report all bugs to the issue tracker:
|
|||||||
https://bugs.chromium.org/p/webp
|
https://bugs.chromium.org/p/webp
|
||||||
.br
|
.br
|
||||||
Patches welcome! See this page to get started:
|
Patches welcome! See this page to get started:
|
||||||
http://www.webmproject.org/code/contribute/submitting\-patches/
|
https://www.webmproject.org/code/contribute/submitting\-patches/
|
||||||
|
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
\fBimg2webp\fP is a part of libwebp and was written by the WebP team.
|
\fBimg2webp\fP is a part of libwebp and was written by the WebP team.
|
||||||
@ -101,5 +101,5 @@ for the Debian project (and may be used by others).
|
|||||||
.BR webpmux (1),
|
.BR webpmux (1),
|
||||||
.BR gif2webp (1)
|
.BR gif2webp (1)
|
||||||
.br
|
.br
|
||||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||||
information.
|
information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH VWEBP 1 "June 5, 2019"
|
.TH VWEBP 1 "November 17, 2021"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
vwebp \- decompress a WebP file and display it in a window
|
vwebp \- decompress a WebP file and display it in a window
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -77,7 +77,7 @@ Please report all bugs to the issue tracker:
|
|||||||
https://bugs.chromium.org/p/webp
|
https://bugs.chromium.org/p/webp
|
||||||
.br
|
.br
|
||||||
Patches welcome! See this page to get started:
|
Patches welcome! See this page to get started:
|
||||||
http://www.webmproject.org/code/contribute/submitting-patches/
|
https://www.webmproject.org/code/contribute/submitting\-patches/
|
||||||
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
vwebp picture.webp
|
vwebp picture.webp
|
||||||
@ -97,5 +97,5 @@ This manual page was written for the Debian project (and may be used by others).
|
|||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR dwebp (1)
|
.BR dwebp (1)
|
||||||
.br
|
.br
|
||||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||||
information.
|
information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH WEBPINFO 1 "November 24, 2017"
|
.TH WEBPINFO 1 "November 17, 2021"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
webpinfo \- print out the chunk level structure of WebP files
|
webpinfo \- print out the chunk level structure of WebP files
|
||||||
along with basic integrity checks.
|
along with basic integrity checks.
|
||||||
@ -52,7 +52,7 @@ Please report all bugs to the issue tracker:
|
|||||||
https://bugs.chromium.org/p/webp
|
https://bugs.chromium.org/p/webp
|
||||||
.br
|
.br
|
||||||
Patches welcome! See this page to get started:
|
Patches welcome! See this page to get started:
|
||||||
http://www.webmproject.org/code/contribute/submitting\-patches/
|
https://www.webmproject.org/code/contribute/submitting\-patches/
|
||||||
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.br
|
.br
|
||||||
@ -76,5 +76,5 @@ for the Debian project (and may be used by others).
|
|||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR webpmux (1)
|
.BR webpmux (1)
|
||||||
.br
|
.br
|
||||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||||
information.
|
information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH WEBPMUX 1 "November 3, 2021"
|
.TH WEBPMUX 1 "November 17, 2021"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
webpmux \- create animated WebP files from non\-animated WebP images, extract
|
webpmux \- create animated WebP files from non\-animated WebP images, extract
|
||||||
frames from animated WebP images, and manage XMP/EXIF metadata and ICC profile.
|
frames from animated WebP images, and manage XMP/EXIF metadata and ICC profile.
|
||||||
@ -191,7 +191,7 @@ Please report all bugs to the issue tracker:
|
|||||||
https://bugs.chromium.org/p/webp
|
https://bugs.chromium.org/p/webp
|
||||||
.br
|
.br
|
||||||
Patches welcome! See this page to get started:
|
Patches welcome! See this page to get started:
|
||||||
http://www.webmproject.org/code/contribute/submitting\-patches/
|
https://www.webmproject.org/code/contribute/submitting\-patches/
|
||||||
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.P
|
.P
|
||||||
@ -267,5 +267,5 @@ for the Debian project (and may be used by others).
|
|||||||
.BR dwebp (1),
|
.BR dwebp (1),
|
||||||
.BR gif2webp (1)
|
.BR gif2webp (1)
|
||||||
.br
|
.br
|
||||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||||
information.
|
information.
|
||||||
|
@ -36,7 +36,7 @@ libwebp_la_LIBADD += utils/libwebputils.la
|
|||||||
# other than the ones listed on the command line, i.e., after linking, it will
|
# other than the ones listed on the command line, i.e., after linking, it will
|
||||||
# not have unresolved symbols. Some platforms (Windows among them) require all
|
# not have unresolved symbols. Some platforms (Windows among them) require all
|
||||||
# symbols in shared libraries to be resolved at library creation.
|
# symbols in shared libraries to be resolved at library creation.
|
||||||
libwebp_la_LDFLAGS = -no-undefined -version-info 8:2:1
|
libwebp_la_LDFLAGS = -no-undefined -version-info 8:3:1
|
||||||
libwebpincludedir = $(includedir)/webp
|
libwebpincludedir = $(includedir)/webp
|
||||||
pkgconfig_DATA = libwebp.pc
|
pkgconfig_DATA = libwebp.pc
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ if BUILD_LIBWEBPDECODER
|
|||||||
libwebpdecoder_la_LIBADD += dsp/libwebpdspdecode.la
|
libwebpdecoder_la_LIBADD += dsp/libwebpdspdecode.la
|
||||||
libwebpdecoder_la_LIBADD += utils/libwebputilsdecode.la
|
libwebpdecoder_la_LIBADD += utils/libwebputilsdecode.la
|
||||||
|
|
||||||
libwebpdecoder_la_LDFLAGS = -no-undefined -version-info 4:2:1
|
libwebpdecoder_la_LDFLAGS = -no-undefined -version-info 4:3:1
|
||||||
pkgconfig_DATA += libwebpdecoder.pc
|
pkgconfig_DATA += libwebpdecoder.pc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -403,7 +403,7 @@ static const uint8_t kZigzag[16] = {
|
|||||||
0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15
|
0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15
|
||||||
};
|
};
|
||||||
|
|
||||||
// See section 13-2: http://tools.ietf.org/html/rfc6386#section-13.2
|
// See section 13-2: https://datatracker.ietf.org/doc/html/rfc6386#section-13.2
|
||||||
static int GetLargeValue(VP8BitReader* const br, const uint8_t* const p) {
|
static int GetLargeValue(VP8BitReader* const br, const uint8_t* const p) {
|
||||||
int v;
|
int v;
|
||||||
if (!VP8GetBit(br, p[3], "coeffs")) {
|
if (!VP8GetBit(br, p[3], "coeffs")) {
|
||||||
|
@ -32,7 +32,7 @@ extern "C" {
|
|||||||
// version numbers
|
// version numbers
|
||||||
#define DEC_MAJ_VERSION 1
|
#define DEC_MAJ_VERSION 1
|
||||||
#define DEC_MIN_VERSION 2
|
#define DEC_MIN_VERSION 2
|
||||||
#define DEC_REV_VERSION 1
|
#define DEC_REV_VERSION 2
|
||||||
|
|
||||||
// YUV-cache parameters. Cache is 32-bytes wide (= one cacheline).
|
// YUV-cache parameters. Cache is 32-bytes wide (= one cacheline).
|
||||||
// Constraints are: We need to store one 16x16 block of luma samples (y),
|
// Constraints are: We need to store one 16x16 block of luma samples (y),
|
||||||
|
@ -84,7 +84,7 @@ static const uint8_t kCodeToPlane[CODE_TO_PLANE_CODES] = {
|
|||||||
// to 256 (green component values) + 24 (length prefix values)
|
// to 256 (green component values) + 24 (length prefix values)
|
||||||
// + color_cache_size (between 0 and 2048).
|
// + color_cache_size (between 0 and 2048).
|
||||||
// All values computed for 8-bit first level lookup with Mark Adler's tool:
|
// All values computed for 8-bit first level lookup with Mark Adler's tool:
|
||||||
// http://www.hdfgroup.org/ftp/lib-external/zlib/zlib-1.2.5/examples/enough.c
|
// https://github.com/madler/zlib/blob/v1.2.5/examples/enough.c
|
||||||
#define FIXED_TABLE_SIZE (630 * 3 + 410)
|
#define FIXED_TABLE_SIZE (630 * 3 + 410)
|
||||||
static const uint16_t kTableSize[12] = {
|
static const uint16_t kTableSize[12] = {
|
||||||
FIXED_TABLE_SIZE + 654,
|
FIXED_TABLE_SIZE + 654,
|
||||||
|
@ -13,6 +13,6 @@ noinst_HEADERS =
|
|||||||
noinst_HEADERS += ../webp/format_constants.h
|
noinst_HEADERS += ../webp/format_constants.h
|
||||||
|
|
||||||
libwebpdemux_la_LIBADD = ../libwebp.la
|
libwebpdemux_la_LIBADD = ../libwebp.la
|
||||||
libwebpdemux_la_LDFLAGS = -no-undefined -version-info 2:8:0
|
libwebpdemux_la_LDFLAGS = -no-undefined -version-info 2:9:0
|
||||||
libwebpdemuxincludedir = $(includedir)/webp
|
libwebpdemuxincludedir = $(includedir)/webp
|
||||||
pkgconfig_DATA = libwebpdemux.pc
|
pkgconfig_DATA = libwebpdemux.pc
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#define DMUX_MAJ_VERSION 1
|
#define DMUX_MAJ_VERSION 1
|
||||||
#define DMUX_MIN_VERSION 2
|
#define DMUX_MIN_VERSION 2
|
||||||
#define DMUX_REV_VERSION 1
|
#define DMUX_REV_VERSION 2
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
size_t start_; // start location of the data
|
size_t start_; // start location of the data
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,2,1
|
FILEVERSION 1,0,2,2
|
||||||
PRODUCTVERSION 1,0,2,1
|
PRODUCTVERSION 1,0,2,2
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -24,12 +24,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Google, Inc."
|
VALUE "CompanyName", "Google, Inc."
|
||||||
VALUE "FileDescription", "libwebpdemux DLL"
|
VALUE "FileDescription", "libwebpdemux DLL"
|
||||||
VALUE "FileVersion", "1.2.1"
|
VALUE "FileVersion", "1.2.2"
|
||||||
VALUE "InternalName", "libwebpdemux.dll"
|
VALUE "InternalName", "libwebpdemux.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||||
VALUE "OriginalFilename", "libwebpdemux.dll"
|
VALUE "OriginalFilename", "libwebpdemux.dll"
|
||||||
VALUE "ProductName", "WebP Image Demuxer"
|
VALUE "ProductName", "WebP Image Demuxer"
|
||||||
VALUE "ProductVersion", "1.2.1"
|
VALUE "ProductVersion", "1.2.2"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -13,7 +13,6 @@ noinst_LTLIBRARIES += libwebpdsp_mips32.la
|
|||||||
noinst_LTLIBRARIES += libwebpdspdecode_mips32.la
|
noinst_LTLIBRARIES += libwebpdspdecode_mips32.la
|
||||||
noinst_LTLIBRARIES += libwebpdsp_mips_dsp_r2.la
|
noinst_LTLIBRARIES += libwebpdsp_mips_dsp_r2.la
|
||||||
noinst_LTLIBRARIES += libwebpdspdecode_mips_dsp_r2.la
|
noinst_LTLIBRARIES += libwebpdspdecode_mips_dsp_r2.la
|
||||||
noinst_LTLIBRARIES += libwebpdspdecode_wasm.la
|
|
||||||
|
|
||||||
if BUILD_LIBWEBPDECODER
|
if BUILD_LIBWEBPDECODER
|
||||||
noinst_LTLIBRARIES += libwebpdspdecode.la
|
noinst_LTLIBRARIES += libwebpdspdecode.la
|
||||||
@ -107,8 +106,6 @@ libwebpdspdecode_mips_dsp_r2_la_SOURCES += yuv_mips_dsp_r2.c
|
|||||||
libwebpdspdecode_mips_dsp_r2_la_CPPFLAGS = $(libwebpdsp_mips_dsp_r2_la_CPPFLAGS)
|
libwebpdspdecode_mips_dsp_r2_la_CPPFLAGS = $(libwebpdsp_mips_dsp_r2_la_CPPFLAGS)
|
||||||
libwebpdspdecode_mips_dsp_r2_la_CFLAGS = $(libwebpdsp_mips_dsp_r2_la_CFLAGS)
|
libwebpdspdecode_mips_dsp_r2_la_CFLAGS = $(libwebpdsp_mips_dsp_r2_la_CFLAGS)
|
||||||
|
|
||||||
libwebpdspdecode_wasm_la_SOURCES = dec_wasm.c
|
|
||||||
|
|
||||||
libwebpdsp_sse2_la_SOURCES =
|
libwebpdsp_sse2_la_SOURCES =
|
||||||
libwebpdsp_sse2_la_SOURCES += cost_sse2.c
|
libwebpdsp_sse2_la_SOURCES += cost_sse2.c
|
||||||
libwebpdsp_sse2_la_SOURCES += enc_sse2.c
|
libwebpdsp_sse2_la_SOURCES += enc_sse2.c
|
||||||
|
@ -26,10 +26,8 @@
|
|||||||
// SSE2 detection.
|
// SSE2 detection.
|
||||||
//
|
//
|
||||||
|
|
||||||
// Skip SSE detection if using Wasm SIMD build.
|
|
||||||
#if defined(WEBP_USE_WASM_SIMD)
|
|
||||||
// apple/darwin gcc-4.0.1 defines __PIC__, but not __pic__ with -fPIC.
|
// apple/darwin gcc-4.0.1 defines __PIC__, but not __pic__ with -fPIC.
|
||||||
#elif (defined(__pic__) || defined(__PIC__)) && defined(__i386__)
|
#if (defined(__pic__) || defined(__PIC__)) && defined(__i386__)
|
||||||
static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
|
static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
|
||||||
__asm__ volatile (
|
__asm__ volatile (
|
||||||
"mov %%ebx, %%edi\n"
|
"mov %%ebx, %%edi\n"
|
||||||
@ -71,10 +69,8 @@ static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Skip xgetbv definition if using Wasm SIMD build.
|
|
||||||
#if defined(WEBP_USE_WASM_SIMD)
|
|
||||||
// NaCl has no support for xgetbv or the raw opcode.
|
// NaCl has no support for xgetbv or the raw opcode.
|
||||||
#elif !defined(__native_client__) && (defined(__i386__) || defined(__x86_64__))
|
#if !defined(__native_client__) && (defined(__i386__) || defined(__x86_64__))
|
||||||
static WEBP_INLINE uint64_t xgetbv(void) {
|
static WEBP_INLINE uint64_t xgetbv(void) {
|
||||||
const uint32_t ecx = 0;
|
const uint32_t ecx = 0;
|
||||||
uint32_t eax, edx;
|
uint32_t eax, edx;
|
||||||
@ -104,13 +100,7 @@ static WEBP_INLINE uint64_t xgetbv(void) {
|
|||||||
#define xgetbv() 0U // no AVX for older x64 or unrecognized toolchains.
|
#define xgetbv() 0U // no AVX for older x64 or unrecognized toolchains.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WEBP_USE_WASM_SIMD)
|
#if defined(__i386__) || defined(__x86_64__) || defined(WEBP_HAVE_MSC_CPUID)
|
||||||
static int wasmCPUInfo(CPUFeature feature) {
|
|
||||||
if (feature != kWasmSIMD) return 0;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
VP8CPUInfo VP8GetCPUInfo = wasmCPUInfo;
|
|
||||||
#elif defined(__i386__) || defined(__x86_64__) || defined(WEBP_HAVE_MSC_CPUID)
|
|
||||||
|
|
||||||
// helper function for run-time detection of slow SSSE3 platforms
|
// helper function for run-time detection of slow SSSE3 platforms
|
||||||
static int CheckSlowModel(int info) {
|
static int CheckSlowModel(int info) {
|
||||||
|
@ -740,7 +740,6 @@ extern void VP8DspInitNEON(void);
|
|||||||
extern void VP8DspInitMIPS32(void);
|
extern void VP8DspInitMIPS32(void);
|
||||||
extern void VP8DspInitMIPSdspR2(void);
|
extern void VP8DspInitMIPSdspR2(void);
|
||||||
extern void VP8DspInitMSA(void);
|
extern void VP8DspInitMSA(void);
|
||||||
extern void VP8DspInitWasmSIMD(void);
|
|
||||||
|
|
||||||
WEBP_DSP_INIT_FUNC(VP8DspInit) {
|
WEBP_DSP_INIT_FUNC(VP8DspInit) {
|
||||||
VP8InitClipTables();
|
VP8InitClipTables();
|
||||||
@ -832,12 +831,6 @@ WEBP_DSP_INIT_FUNC(VP8DspInit) {
|
|||||||
if (VP8GetCPUInfo(kMSA)) {
|
if (VP8GetCPUInfo(kMSA)) {
|
||||||
VP8DspInitMSA();
|
VP8DspInitMSA();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if defined(WEBP_USE_WASM_SIMD) && defined(WEBP_ENABLE_WASM_SIMD_INTRINSICS)
|
|
||||||
// Check that SIMD is supported and that we want to use Wasm intrinsics.
|
|
||||||
if (VP8GetCPUInfo(kWasmSIMD)) {
|
|
||||||
VP8DspInitWasmSIMD();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
// Copyright 2021 Google Inc. All Rights Reserved.
|
|
||||||
//
|
|
||||||
// Use of this source code is governed by a BSD-style license
|
|
||||||
// that can be found in the COPYING file in the root of the source
|
|
||||||
// tree. An additional intellectual property rights grant can be found
|
|
||||||
// in the file PATENTS. All contributing project authors may
|
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// WebAssembly (Wasm) version of some decoding functions.
|
|
||||||
//
|
|
||||||
// This will contain Wasm implementation of some decoding functions.
|
|
||||||
|
|
||||||
#include "./dsp.h"
|
|
||||||
|
|
||||||
#if defined(WEBP_USE_WASM_SIMD)
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
// Entry point
|
|
||||||
|
|
||||||
extern void VP8DspInitWasmSIMD(void);
|
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitWasmSIMD(void) {
|
|
||||||
// TODO(crbug.com/v8/12371): No special implementation for Wasm yet, will be
|
|
||||||
// added later.
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
WEBP_DSP_INIT_STUB(VP8DspInitWasmSIMD)
|
|
||||||
|
|
||||||
#endif // WEBP_USE_WASM_SIMD
|
|
@ -80,11 +80,6 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(EMSCRIPTEN) || defined(WEBP_HAVE_WASM_SIMD)) && \
|
|
||||||
defined(__wasm_simd128__)
|
|
||||||
#define WEBP_USE_WASM_SIMD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// WEBP_HAVE_* are used to indicate the presence of the instruction set in dsp
|
// WEBP_HAVE_* are used to indicate the presence of the instruction set in dsp
|
||||||
// files without intrinsics, allowing the corresponding Init() to be called.
|
// files without intrinsics, allowing the corresponding Init() to be called.
|
||||||
// Files containing intrinsics will need to be built targeting the instruction
|
// Files containing intrinsics will need to be built targeting the instruction
|
||||||
@ -262,8 +257,7 @@ typedef enum {
|
|||||||
kNEON,
|
kNEON,
|
||||||
kMIPS32,
|
kMIPS32,
|
||||||
kMIPSdspR2,
|
kMIPSdspR2,
|
||||||
kMSA,
|
kMSA
|
||||||
kWasmSIMD
|
|
||||||
} CPUFeature;
|
} CPUFeature;
|
||||||
// returns true if the CPU supports the feature.
|
// returns true if the CPU supports the feature.
|
||||||
typedef int (*VP8CPUInfo)(CPUFeature feature);
|
typedef int (*VP8CPUInfo)(CPUFeature feature);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
//
|
//
|
||||||
// ARM NEON version of speed-critical encoding functions.
|
// ARM NEON version of speed-critical encoding functions.
|
||||||
//
|
//
|
||||||
// adapted from libvpx (http://www.webmproject.org/code/)
|
// adapted from libvpx (https://www.webmproject.org/code/)
|
||||||
|
|
||||||
#include "src/dsp/dsp.h"
|
#include "src/dsp/dsp.h"
|
||||||
|
|
||||||
|
@ -107,63 +107,77 @@ static WEBP_INLINE uint32_t Select(uint32_t a, uint32_t b, uint32_t c) {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Predictors
|
// Predictors
|
||||||
|
|
||||||
uint32_t VP8LPredictor0_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor0_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
(void)top;
|
(void)top;
|
||||||
(void)left;
|
(void)left;
|
||||||
return ARGB_BLACK;
|
return ARGB_BLACK;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor1_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor1_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
(void)top;
|
(void)top;
|
||||||
return left;
|
return *left;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor2_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor2_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
(void)left;
|
(void)left;
|
||||||
return top[0];
|
return top[0];
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor3_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor3_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
(void)left;
|
(void)left;
|
||||||
return top[1];
|
return top[1];
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor4_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor4_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
(void)left;
|
(void)left;
|
||||||
return top[-1];
|
return top[-1];
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor5_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor5_C(const uint32_t* const left,
|
||||||
const uint32_t pred = Average3(left, top[0], top[1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Average3(*left, top[0], top[1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor6_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor6_C(const uint32_t* const left,
|
||||||
const uint32_t pred = Average2(left, top[-1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Average2(*left, top[-1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor7_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor7_C(const uint32_t* const left,
|
||||||
const uint32_t pred = Average2(left, top[0]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Average2(*left, top[0]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor8_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor8_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
const uint32_t pred = Average2(top[-1], top[0]);
|
const uint32_t pred = Average2(top[-1], top[0]);
|
||||||
(void)left;
|
(void)left;
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor9_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor9_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
const uint32_t pred = Average2(top[0], top[1]);
|
const uint32_t pred = Average2(top[0], top[1]);
|
||||||
(void)left;
|
(void)left;
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor10_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor10_C(const uint32_t* const left,
|
||||||
const uint32_t pred = Average4(left, top[-1], top[0], top[1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Average4(*left, top[-1], top[0], top[1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor11_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor11_C(const uint32_t* const left,
|
||||||
const uint32_t pred = Select(top[0], left, top[-1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Select(top[0], *left, top[-1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor12_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor12_C(const uint32_t* const left,
|
||||||
const uint32_t pred = ClampedAddSubtractFull(left, top[0], top[-1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = ClampedAddSubtractFull(*left, top[0], top[-1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
uint32_t VP8LPredictor13_C(uint32_t left, const uint32_t* const top) {
|
uint32_t VP8LPredictor13_C(const uint32_t* const left,
|
||||||
const uint32_t pred = ClampedAddSubtractHalf(left, top[0], top[-1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = ClampedAddSubtractHalf(*left, top[0], top[-1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,23 +28,38 @@ extern "C" {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Decoding
|
// Decoding
|
||||||
|
|
||||||
typedef uint32_t (*VP8LPredictorFunc)(uint32_t left, const uint32_t* const top);
|
typedef uint32_t (*VP8LPredictorFunc)(const uint32_t* const left,
|
||||||
|
const uint32_t* const top);
|
||||||
extern VP8LPredictorFunc VP8LPredictors[16];
|
extern VP8LPredictorFunc VP8LPredictors[16];
|
||||||
|
|
||||||
uint32_t VP8LPredictor0_C(uint32_t left, const uint32_t* const top);
|
uint32_t VP8LPredictor0_C(const uint32_t* const left,
|
||||||
uint32_t VP8LPredictor1_C(uint32_t left, const uint32_t* const top);
|
const uint32_t* const top);
|
||||||
uint32_t VP8LPredictor2_C(uint32_t left, const uint32_t* const top);
|
uint32_t VP8LPredictor1_C(const uint32_t* const left,
|
||||||
uint32_t VP8LPredictor3_C(uint32_t left, const uint32_t* const top);
|
const uint32_t* const top);
|
||||||
uint32_t VP8LPredictor4_C(uint32_t left, const uint32_t* const top);
|
uint32_t VP8LPredictor2_C(const uint32_t* const left,
|
||||||
uint32_t VP8LPredictor5_C(uint32_t left, const uint32_t* const top);
|
const uint32_t* const top);
|
||||||
uint32_t VP8LPredictor6_C(uint32_t left, const uint32_t* const top);
|
uint32_t VP8LPredictor3_C(const uint32_t* const left,
|
||||||
uint32_t VP8LPredictor7_C(uint32_t left, const uint32_t* const top);
|
const uint32_t* const top);
|
||||||
uint32_t VP8LPredictor8_C(uint32_t left, const uint32_t* const top);
|
uint32_t VP8LPredictor4_C(const uint32_t* const left,
|
||||||
uint32_t VP8LPredictor9_C(uint32_t left, const uint32_t* const top);
|
const uint32_t* const top);
|
||||||
uint32_t VP8LPredictor10_C(uint32_t left, const uint32_t* const top);
|
uint32_t VP8LPredictor5_C(const uint32_t* const left,
|
||||||
uint32_t VP8LPredictor11_C(uint32_t left, const uint32_t* const top);
|
const uint32_t* const top);
|
||||||
uint32_t VP8LPredictor12_C(uint32_t left, const uint32_t* const top);
|
uint32_t VP8LPredictor6_C(const uint32_t* const left,
|
||||||
uint32_t VP8LPredictor13_C(uint32_t left, const uint32_t* const top);
|
const uint32_t* const top);
|
||||||
|
uint32_t VP8LPredictor7_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top);
|
||||||
|
uint32_t VP8LPredictor8_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top);
|
||||||
|
uint32_t VP8LPredictor9_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top);
|
||||||
|
uint32_t VP8LPredictor10_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top);
|
||||||
|
uint32_t VP8LPredictor11_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top);
|
||||||
|
uint32_t VP8LPredictor12_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top);
|
||||||
|
uint32_t VP8LPredictor13_C(const uint32_t* const left,
|
||||||
|
const uint32_t* const top);
|
||||||
|
|
||||||
// These Add/Sub function expects upper[-1] and out[-1] to be readable.
|
// These Add/Sub function expects upper[-1] and out[-1] to be readable.
|
||||||
typedef void (*VP8LPredictorAddSubFunc)(const uint32_t* in,
|
typedef void (*VP8LPredictorAddSubFunc)(const uint32_t* in,
|
||||||
|
@ -179,7 +179,7 @@ static void PREDICTOR_ADD(const uint32_t* in, const uint32_t* upper, \
|
|||||||
int x; \
|
int x; \
|
||||||
assert(upper != NULL); \
|
assert(upper != NULL); \
|
||||||
for (x = 0; x < num_pixels; ++x) { \
|
for (x = 0; x < num_pixels; ++x) { \
|
||||||
const uint32_t pred = (PREDICTOR)(out[x - 1], upper + x); \
|
const uint32_t pred = (PREDICTOR)(&out[x - 1], upper + x); \
|
||||||
out[x] = VP8LAddPixels(in[x], pred); \
|
out[x] = VP8LAddPixels(in[x], pred); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -745,7 +745,7 @@ static void PredictorSub##PREDICTOR_I##_C(const uint32_t* in, \
|
|||||||
assert(upper != NULL); \
|
assert(upper != NULL); \
|
||||||
for (x = 0; x < num_pixels; ++x) { \
|
for (x = 0; x < num_pixels; ++x) { \
|
||||||
const uint32_t pred = \
|
const uint32_t pred = \
|
||||||
VP8LPredictor##PREDICTOR_I##_C(in[x - 1], upper + x); \
|
VP8LPredictor##PREDICTOR_I##_C(&in[x - 1], upper + x); \
|
||||||
out[x] = VP8LSubPixels(in[x], pred); \
|
out[x] = VP8LSubPixels(in[x], pred); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -188,46 +188,51 @@ static WEBP_INLINE uint32_t Average4(uint32_t a0, uint32_t a1,
|
|||||||
return Average2(Average2(a0, a1), Average2(a2, a3));
|
return Average2(Average2(a0, a1), Average2(a2, a3));
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor5_MIPSdspR2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor5_MIPSdspR2(const uint32_t* const left,
|
||||||
return Average3(left, top[0], top[1]);
|
const uint32_t* const top) {
|
||||||
|
return Average3(*left, top[0], top[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor6_MIPSdspR2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor6_MIPSdspR2(const uint32_t* const left,
|
||||||
return Average2(left, top[-1]);
|
const uint32_t* const top) {
|
||||||
|
return Average2(*left, top[-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor7_MIPSdspR2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor7_MIPSdspR2(const uint32_t* const left,
|
||||||
return Average2(left, top[0]);
|
const uint32_t* const top) {
|
||||||
|
return Average2(*left, top[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor8_MIPSdspR2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor8_MIPSdspR2(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
(void)left;
|
(void)left;
|
||||||
return Average2(top[-1], top[0]);
|
return Average2(top[-1], top[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor9_MIPSdspR2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor9_MIPSdspR2(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
(void)left;
|
(void)left;
|
||||||
return Average2(top[0], top[1]);
|
return Average2(top[0], top[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor10_MIPSdspR2(uint32_t left,
|
static uint32_t Predictor10_MIPSdspR2(const uint32_t* const left,
|
||||||
const uint32_t* const top) {
|
const uint32_t* const top) {
|
||||||
return Average4(left, top[-1], top[0], top[1]);
|
return Average4(*left, top[-1], top[0], top[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor11_MIPSdspR2(uint32_t left,
|
static uint32_t Predictor11_MIPSdspR2(const uint32_t* const left,
|
||||||
const uint32_t* const top) {
|
const uint32_t* const top) {
|
||||||
return Select(top[0], left, top[-1]);
|
return Select(top[0], *left, top[-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor12_MIPSdspR2(uint32_t left,
|
static uint32_t Predictor12_MIPSdspR2(const uint32_t* const left,
|
||||||
const uint32_t* const top) {
|
const uint32_t* const top) {
|
||||||
return ClampedAddSubtractFull(left, top[0], top[-1]);
|
return ClampedAddSubtractFull(*left, top[0], top[-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor13_MIPSdspR2(uint32_t left,
|
static uint32_t Predictor13_MIPSdspR2(const uint32_t* const left,
|
||||||
const uint32_t* const top) {
|
const uint32_t* const top) {
|
||||||
return ClampedAddSubtractHalf(left, top[0], top[-1]);
|
return ClampedAddSubtractHalf(*left, top[0], top[-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add green to blue and red channels (i.e. perform the inverse transform of
|
// Add green to blue and red channels (i.e. perform the inverse transform of
|
||||||
|
@ -188,17 +188,21 @@ static WEBP_INLINE uint32_t Average3_NEON(uint32_t a0, uint32_t a1,
|
|||||||
return avg;
|
return avg;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor5_NEON(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor5_NEON(const uint32_t* const left,
|
||||||
return Average3_NEON(left, top[0], top[1]);
|
const uint32_t* const top) {
|
||||||
|
return Average3_NEON(*left, top[0], top[1]);
|
||||||
}
|
}
|
||||||
static uint32_t Predictor6_NEON(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor6_NEON(const uint32_t* const left,
|
||||||
return Average2_NEON(left, top[-1]);
|
const uint32_t* const top) {
|
||||||
|
return Average2_NEON(*left, top[-1]);
|
||||||
}
|
}
|
||||||
static uint32_t Predictor7_NEON(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor7_NEON(const uint32_t* const left,
|
||||||
return Average2_NEON(left, top[0]);
|
const uint32_t* const top) {
|
||||||
|
return Average2_NEON(*left, top[0]);
|
||||||
}
|
}
|
||||||
static uint32_t Predictor13_NEON(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor13_NEON(const uint32_t* const left,
|
||||||
return ClampedAddSubtractHalf_NEON(left, top[0], top[-1]);
|
const uint32_t* const top) {
|
||||||
|
return ClampedAddSubtractHalf_NEON(*left, top[0], top[-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Batch versions of those functions.
|
// Batch versions of those functions.
|
||||||
|
@ -138,42 +138,51 @@ static WEBP_INLINE uint32_t Average4_SSE2(uint32_t a0, uint32_t a1,
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t Predictor5_SSE2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor5_SSE2(const uint32_t* const left,
|
||||||
const uint32_t pred = Average3_SSE2(left, top[0], top[1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Average3_SSE2(*left, top[0], top[1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
static uint32_t Predictor6_SSE2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor6_SSE2(const uint32_t* const left,
|
||||||
const uint32_t pred = Average2_SSE2(left, top[-1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Average2_SSE2(*left, top[-1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
static uint32_t Predictor7_SSE2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor7_SSE2(const uint32_t* const left,
|
||||||
const uint32_t pred = Average2_SSE2(left, top[0]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Average2_SSE2(*left, top[0]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
static uint32_t Predictor8_SSE2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor8_SSE2(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
const uint32_t pred = Average2_SSE2(top[-1], top[0]);
|
const uint32_t pred = Average2_SSE2(top[-1], top[0]);
|
||||||
(void)left;
|
(void)left;
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
static uint32_t Predictor9_SSE2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor9_SSE2(const uint32_t* const left,
|
||||||
|
const uint32_t* const top) {
|
||||||
const uint32_t pred = Average2_SSE2(top[0], top[1]);
|
const uint32_t pred = Average2_SSE2(top[0], top[1]);
|
||||||
(void)left;
|
(void)left;
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
static uint32_t Predictor10_SSE2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor10_SSE2(const uint32_t* const left,
|
||||||
const uint32_t pred = Average4_SSE2(left, top[-1], top[0], top[1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Average4_SSE2(*left, top[-1], top[0], top[1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
static uint32_t Predictor11_SSE2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor11_SSE2(const uint32_t* const left,
|
||||||
const uint32_t pred = Select_SSE2(top[0], left, top[-1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = Select_SSE2(top[0], *left, top[-1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
static uint32_t Predictor12_SSE2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor12_SSE2(const uint32_t* const left,
|
||||||
const uint32_t pred = ClampedAddSubtractFull_SSE2(left, top[0], top[-1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = ClampedAddSubtractFull_SSE2(*left, top[0], top[-1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
static uint32_t Predictor13_SSE2(uint32_t left, const uint32_t* const top) {
|
static uint32_t Predictor13_SSE2(const uint32_t* const left,
|
||||||
const uint32_t pred = ClampedAddSubtractHalf_SSE2(left, top[0], top[-1]);
|
const uint32_t* const top) {
|
||||||
|
const uint32_t pred = ClampedAddSubtractHalf_SSE2(*left, top[0], top[-1]);
|
||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
#ifndef WEBP_DSP_MSA_MACRO_H_
|
#ifndef WEBP_DSP_MSA_MACRO_H_
|
||||||
#define WEBP_DSP_MSA_MACRO_H_
|
#define WEBP_DSP_MSA_MACRO_H_
|
||||||
|
|
||||||
|
#include "src/dsp/dsp.h"
|
||||||
|
|
||||||
|
#if defined(WEBP_USE_MSA)
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <msa.h>
|
#include <msa.h>
|
||||||
|
|
||||||
@ -1389,4 +1393,5 @@ static WEBP_INLINE uint32_t func_hadd_uh_u32(v8u16 in) {
|
|||||||
} while (0)
|
} while (0)
|
||||||
#define AVER_UB2_UB(...) AVER_UB2(v16u8, __VA_ARGS__)
|
#define AVER_UB2_UB(...) AVER_UB2(v16u8, __VA_ARGS__)
|
||||||
|
|
||||||
|
#endif // WEBP_USE_MSA
|
||||||
#endif // WEBP_DSP_MSA_MACRO_H_
|
#endif // WEBP_DSP_MSA_MACRO_H_
|
||||||
|
@ -12,10 +12,12 @@
|
|||||||
#ifndef WEBP_DSP_NEON_H_
|
#ifndef WEBP_DSP_NEON_H_
|
||||||
#define WEBP_DSP_NEON_H_
|
#define WEBP_DSP_NEON_H_
|
||||||
|
|
||||||
#include <arm_neon.h>
|
|
||||||
|
|
||||||
#include "src/dsp/dsp.h"
|
#include "src/dsp/dsp.h"
|
||||||
|
|
||||||
|
#if defined(WEBP_USE_NEON)
|
||||||
|
|
||||||
|
#include <arm_neon.h>
|
||||||
|
|
||||||
// Right now, some intrinsics functions seem slower, so we disable them
|
// Right now, some intrinsics functions seem slower, so we disable them
|
||||||
// everywhere except newer clang/gcc or aarch64 where the inline assembly is
|
// everywhere except newer clang/gcc or aarch64 where the inline assembly is
|
||||||
// incompatible.
|
// incompatible.
|
||||||
@ -98,4 +100,5 @@ static WEBP_INLINE int32x4x4_t Transpose4x4_NEON(const int32x4x4_t rows) {
|
|||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // WEBP_USE_NEON
|
||||||
#endif // WEBP_DSP_NEON_H_
|
#endif // WEBP_DSP_NEON_H_
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// inline YUV<->RGB conversion function
|
// inline YUV<->RGB conversion function
|
||||||
//
|
//
|
||||||
// The exact naming is Y'CbCr, following the ITU-R BT.601 standard.
|
// The exact naming is Y'CbCr, following the ITU-R BT.601 standard.
|
||||||
// More information at: http://en.wikipedia.org/wiki/YCbCr
|
// More information at: https://en.wikipedia.org/wiki/YCbCr
|
||||||
// Y = 0.2569 * R + 0.5044 * G + 0.0979 * B + 16
|
// Y = 0.2569 * R + 0.5044 * G + 0.0979 * B + 16
|
||||||
// U = -0.1483 * R - 0.2911 * G + 0.4394 * B + 128
|
// U = -0.1483 * R - 0.2911 * G + 0.4394 * B + 128
|
||||||
// V = 0.4394 * R - 0.3679 * G - 0.0715 * B + 128
|
// V = 0.4394 * R - 0.3679 * G - 0.0715 * B + 128
|
||||||
|
@ -249,7 +249,7 @@ static WEBP_INLINE void GetResidual(
|
|||||||
} else if (x == 0) {
|
} else if (x == 0) {
|
||||||
predict = upper_row[x]; // Top.
|
predict = upper_row[x]; // Top.
|
||||||
} else {
|
} else {
|
||||||
predict = pred_func(current_row[x - 1], upper_row + x);
|
predict = pred_func(¤t_row[x - 1], upper_row + x);
|
||||||
}
|
}
|
||||||
#if (WEBP_NEAR_LOSSLESS == 1)
|
#if (WEBP_NEAR_LOSSLESS == 1)
|
||||||
if (max_quantization == 1 || mode == 0 || y == 0 || y == height - 1 ||
|
if (max_quantization == 1 || mode == 0 || y == 0 || y == height - 1 ||
|
||||||
|
@ -32,7 +32,7 @@ extern "C" {
|
|||||||
// version numbers
|
// version numbers
|
||||||
#define ENC_MAJ_VERSION 1
|
#define ENC_MAJ_VERSION 1
|
||||||
#define ENC_MIN_VERSION 2
|
#define ENC_MIN_VERSION 2
|
||||||
#define ENC_REV_VERSION 1
|
#define ENC_REV_VERSION 2
|
||||||
|
|
||||||
enum { MAX_LF_LEVELS = 64, // Maximum loop filter level
|
enum { MAX_LF_LEVELS = 64, // Maximum loop filter level
|
||||||
MAX_VARIABLE_LEVEL = 67, // last (inclusive) level with variable cost
|
MAX_VARIABLE_LEVEL = 67, // last (inclusive) level with variable cost
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,2,1
|
FILEVERSION 1,0,2,2
|
||||||
PRODUCTVERSION 1,0,2,1
|
PRODUCTVERSION 1,0,2,2
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -24,12 +24,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Google, Inc."
|
VALUE "CompanyName", "Google, Inc."
|
||||||
VALUE "FileDescription", "libwebp DLL"
|
VALUE "FileDescription", "libwebp DLL"
|
||||||
VALUE "FileVersion", "1.2.1"
|
VALUE "FileVersion", "1.2.2"
|
||||||
VALUE "InternalName", "libwebp.dll"
|
VALUE "InternalName", "libwebp.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||||
VALUE "OriginalFilename", "libwebp.dll"
|
VALUE "OriginalFilename", "libwebp.dll"
|
||||||
VALUE "ProductName", "WebP Image Codec"
|
VALUE "ProductName", "WebP Image Codec"
|
||||||
VALUE "ProductVersion", "1.2.1"
|
VALUE "ProductVersion", "1.2.2"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,2,1
|
FILEVERSION 1,0,2,2
|
||||||
PRODUCTVERSION 1,0,2,1
|
PRODUCTVERSION 1,0,2,2
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -24,12 +24,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Google, Inc."
|
VALUE "CompanyName", "Google, Inc."
|
||||||
VALUE "FileDescription", "libwebpdecoder DLL"
|
VALUE "FileDescription", "libwebpdecoder DLL"
|
||||||
VALUE "FileVersion", "1.2.1"
|
VALUE "FileVersion", "1.2.2"
|
||||||
VALUE "InternalName", "libwebpdecoder.dll"
|
VALUE "InternalName", "libwebpdecoder.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||||
VALUE "OriginalFilename", "libwebpdecoder.dll"
|
VALUE "OriginalFilename", "libwebpdecoder.dll"
|
||||||
VALUE "ProductName", "WebP Image Decoder"
|
VALUE "ProductName", "WebP Image Decoder"
|
||||||
VALUE "ProductVersion", "1.2.1"
|
VALUE "ProductVersion", "1.2.2"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -17,6 +17,6 @@ noinst_HEADERS =
|
|||||||
noinst_HEADERS += ../webp/format_constants.h
|
noinst_HEADERS += ../webp/format_constants.h
|
||||||
|
|
||||||
libwebpmux_la_LIBADD = ../libwebp.la
|
libwebpmux_la_LIBADD = ../libwebp.la
|
||||||
libwebpmux_la_LDFLAGS = -no-undefined -version-info 3:7:0 -lm
|
libwebpmux_la_LDFLAGS = -no-undefined -version-info 3:8:0 -lm
|
||||||
libwebpmuxincludedir = $(includedir)/webp
|
libwebpmuxincludedir = $(includedir)/webp
|
||||||
pkgconfig_DATA = libwebpmux.pc
|
pkgconfig_DATA = libwebpmux.pc
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,2,1
|
FILEVERSION 1,0,2,2
|
||||||
PRODUCTVERSION 1,0,2,1
|
PRODUCTVERSION 1,0,2,2
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -24,12 +24,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Google, Inc."
|
VALUE "CompanyName", "Google, Inc."
|
||||||
VALUE "FileDescription", "libwebpmux DLL"
|
VALUE "FileDescription", "libwebpmux DLL"
|
||||||
VALUE "FileVersion", "1.2.1"
|
VALUE "FileVersion", "1.2.2"
|
||||||
VALUE "InternalName", "libwebpmux.dll"
|
VALUE "InternalName", "libwebpmux.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||||
VALUE "OriginalFilename", "libwebpmux.dll"
|
VALUE "OriginalFilename", "libwebpmux.dll"
|
||||||
VALUE "ProductName", "WebP Image Muxer"
|
VALUE "ProductName", "WebP Image Muxer"
|
||||||
VALUE "ProductVersion", "1.2.1"
|
VALUE "ProductVersion", "1.2.2"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -29,7 +29,7 @@ extern "C" {
|
|||||||
|
|
||||||
#define MUX_MAJ_VERSION 1
|
#define MUX_MAJ_VERSION 1
|
||||||
#define MUX_MIN_VERSION 2
|
#define MUX_MIN_VERSION 2
|
||||||
#define MUX_REV_VERSION 1
|
#define MUX_REV_VERSION 2
|
||||||
|
|
||||||
// Chunk object.
|
// Chunk object.
|
||||||
typedef struct WebPChunk WebPChunk;
|
typedef struct WebPChunk WebPChunk;
|
||||||
|
@ -161,7 +161,7 @@ static void SetBitDepths(const HuffmanTree* const tree,
|
|||||||
// especially when population counts are longer than 2**tree_limit, but
|
// especially when population counts are longer than 2**tree_limit, but
|
||||||
// we are not planning to use this with extremely long blocks.
|
// we are not planning to use this with extremely long blocks.
|
||||||
//
|
//
|
||||||
// See http://en.wikipedia.org/wiki/Huffman_coding
|
// See https://en.wikipedia.org/wiki/Huffman_coding
|
||||||
static void GenerateOptimalTree(const uint32_t* const histogram,
|
static void GenerateOptimalTree(const uint32_t* const histogram,
|
||||||
int histogram_size,
|
int histogram_size,
|
||||||
HuffmanTree* tree, int tree_depth_limit,
|
HuffmanTree* tree, int tree_depth_limit,
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#define DFIX 4 // extra precision for ordered dithering
|
#define DFIX 4 // extra precision for ordered dithering
|
||||||
#define DSIZE 4 // dithering size (must be a power of two)
|
#define DSIZE 4 // dithering size (must be a power of two)
|
||||||
// cf. http://en.wikipedia.org/wiki/Ordered_dithering
|
// cf. https://en.wikipedia.org/wiki/Ordered_dithering
|
||||||
static const uint8_t kOrderedDither[DSIZE][DSIZE] = {
|
static const uint8_t kOrderedDither[DSIZE][DSIZE] = {
|
||||||
{ 0, 8, 2, 10 }, // coefficients are in DFIX fixed-point precision
|
{ 0, 8, 2, 10 }, // coefficients are in DFIX fixed-point precision
|
||||||
{ 12, 4, 14, 6 },
|
{ 12, 4, 14, 6 },
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
// alloc/free etc) is printed. For debugging/tuning purpose only (it's slow,
|
// alloc/free etc) is printed. For debugging/tuning purpose only (it's slow,
|
||||||
// and not multi-thread safe!).
|
// and not multi-thread safe!).
|
||||||
// An interesting alternative is valgrind's 'massif' tool:
|
// An interesting alternative is valgrind's 'massif' tool:
|
||||||
// http://valgrind.org/docs/manual/ms-manual.html
|
// https://valgrind.org/docs/manual/ms-manual.html
|
||||||
// Here is an example command line:
|
// Here is an example command line:
|
||||||
/* valgrind --tool=massif --massif-out-file=massif.out \
|
/* valgrind --tool=massif --massif-out-file=massif.out \
|
||||||
--stacks=yes --alloc-fn=WebPSafeMalloc --alloc-fn=WebPSafeCalloc
|
--stacks=yes --alloc-fn=WebPSafeMalloc --alloc-fn=WebPSafeCalloc
|
||||||
|
@ -85,7 +85,7 @@ WEBP_EXTERN uint8_t* WebPDecodeBGR(const uint8_t* data, size_t data_size,
|
|||||||
// Upon return, the Y buffer has a stride returned as '*stride', while U and V
|
// Upon return, the Y buffer has a stride returned as '*stride', while U and V
|
||||||
// have a common stride returned as '*uv_stride'.
|
// have a common stride returned as '*uv_stride'.
|
||||||
// Return NULL in case of error.
|
// Return NULL in case of error.
|
||||||
// (*) Also named Y'CbCr. See: http://en.wikipedia.org/wiki/YCbCr
|
// (*) Also named Y'CbCr. See: https://en.wikipedia.org/wiki/YCbCr
|
||||||
WEBP_EXTERN uint8_t* WebPDecodeYUV(const uint8_t* data, size_t data_size,
|
WEBP_EXTERN uint8_t* WebPDecodeYUV(const uint8_t* data, size_t data_size,
|
||||||
int* width, int* height,
|
int* width, int* height,
|
||||||
uint8_t** u, uint8_t** v,
|
uint8_t** u, uint8_t** v,
|
||||||
|
@ -79,6 +79,26 @@ if [[ -z "${SDK[$IOS]}" ]] || [[ ${SDK[$IOS]%%.*} -lt 8 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# Moves Headers/*.h to Headers/<framework>/
|
||||||
|
#
|
||||||
|
# Places framework headers in a subdirectory to avoid Xcode errors when using
|
||||||
|
# multiple frameworks:
|
||||||
|
# error: Multiple commands produce
|
||||||
|
# '.../Build/Products/Debug-iphoneos/include/types.h'
|
||||||
|
# Arguments:
|
||||||
|
# $1 - path to framework
|
||||||
|
#######################################
|
||||||
|
update_headers_path() {
|
||||||
|
local framework_name="$(basename ${1%.xcframework})"
|
||||||
|
local subdir
|
||||||
|
for d in $(find "$1" -path "*/Headers"); do
|
||||||
|
subdir="$d/$framework_name"
|
||||||
|
mkdir "$subdir"
|
||||||
|
mv "$d/"*.h "$subdir"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
echo "Xcode Version: ${XCODE}"
|
echo "Xcode Version: ${XCODE}"
|
||||||
echo "iOS SDK Version: ${SDK[$IOS]}"
|
echo "iOS SDK Version: ${SDK[$IOS]}"
|
||||||
echo "MacOS SDK Version: ${SDK[$MACOS]}"
|
echo "MacOS SDK Version: ${SDK[$MACOS]}"
|
||||||
@ -105,7 +125,7 @@ if [[ ! -e ${SRCDIR}/configure ]]; then
|
|||||||
Error creating configure script!
|
Error creating configure script!
|
||||||
This script requires the autoconf/automake and libtool to build. MacPorts or
|
This script requires the autoconf/automake and libtool to build. MacPorts or
|
||||||
Homebrew can be used to obtain these:
|
Homebrew can be used to obtain these:
|
||||||
http://www.macports.org/install.php
|
https://www.macports.org/install.php
|
||||||
https://brew.sh/
|
https://brew.sh/
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
@ -228,6 +248,10 @@ xcodebuild -create-xcframework "${FAT_DEMUXLIBLIST[@]}" \
|
|||||||
-output ${DEMUXTARGETDIR}
|
-output ${DEMUXTARGETDIR}
|
||||||
xcodebuild -create-xcframework "${FAT_MUXLIBLIST[@]}" \
|
xcodebuild -create-xcframework "${FAT_MUXLIBLIST[@]}" \
|
||||||
-output ${MUXTARGETDIR}
|
-output ${MUXTARGETDIR}
|
||||||
|
update_headers_path "${TARGETDIR}"
|
||||||
|
update_headers_path "${DECTARGETDIR}"
|
||||||
|
update_headers_path "${DEMUXTARGETDIR}"
|
||||||
|
update_headers_path "${MUXTARGETDIR}"
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
echo "SUCCESS"
|
echo "SUCCESS"
|
||||||
|
Reference in New Issue
Block a user