mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
Compare commits
17 Commits
wasm-simd
...
v1.2.2-rc2
Author | SHA1 | Date | |
---|---|---|---|
9195ea0538 | |||
4acae017bd | |||
883f063397 | |||
567e1f442b | |||
f084244d9f | |||
b217b4fff7 | |||
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>
|
||||
Hui Su <huisu@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)
|
||||
- Paweł Hajdan, Jr (phajdan dot jr at chromium dot org)
|
||||
- Pierre Joye (pierre dot php at gmail dot com)
|
||||
- Roberto Alanis (alanisbaez at google dot com)
|
||||
- Sam Clegg (sbc at chromium dot org)
|
||||
- Scott Hancher (seh at google dot com)
|
||||
- Scott LaVarnway (slavarnway at google dot com)
|
||||
|
46
ChangeLog
46
ChangeLog
@ -1,7 +1,53 @@
|
||||
883f0633 man/img2webp.1: update date
|
||||
567e1f44 Reword img2webp synopsis command line
|
||||
f084244d anim_decode: fix alpha blending with big-endian
|
||||
b217b4ff webpinfo: fix fourcc comparison w/big-endian
|
||||
f035d2e4 update ChangeLog (tag: v1.2.2-rc1)
|
||||
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
|
||||
c5bc3624 fuzzer/*: normalize src/ includes
|
||||
53b6f762 fix indent
|
||||
d2caaba4 fix indent
|
||||
731246ba update ChangeLog (tag: v1.2.1-rc2)
|
||||
d250f01d dsp/*: use WEBP_HAVE_* to determine Init availability
|
||||
1fe31625 dsp/*: use WEBP_HAVE_* to determine Init availability
|
||||
3a4d3ecd update NEWS
|
||||
b2bc8093 bump version to 1.2.1
|
||||
e542fc7a update AUTHORS
|
||||
|
8
NEWS
8
NEWS
@ -1,3 +1,11 @@
|
||||
- 1/11/2022: 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, #548, #550)
|
||||
|
||||
- 7/20/2021: version 1.2.1
|
||||
This is a binary compatible release.
|
||||
* 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.
|
||||
"""
|
||||
|
||||
import re
|
||||
import subprocess2
|
||||
|
||||
USE_PYTHON3 = True
|
||||
_BASH_INDENTATION = "2"
|
||||
_GIT_COMMIT_SUBJECT_LENGTH = 65
|
||||
_INCLUDE_BASH_FILES_ONLY = [r".*\.sh$"]
|
||||
_INCLUDE_MAN_FILES_ONLY = [r"man/.+\.1$"]
|
||||
_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):
|
||||
return list(input_api.DEFAULT_FILES_TO_SKIP) + [
|
||||
r"swig/.*\.py$",
|
||||
@ -123,6 +153,7 @@ def _CommonChecks(input_api, output_api):
|
||||
results.extend(
|
||||
input_api.canned_checks.CheckChangeHasNoStrayWhitespace(
|
||||
input_api, output_api))
|
||||
results.append(_CheckCommitSubjectLength(input_api, output_api))
|
||||
|
||||
source_file_filter = lambda x: input_api.FilterSourceFile(
|
||||
x, files_to_skip=_GetFilesToSkip(input_api))
|
||||
|
16
README
16
README
@ -4,7 +4,7 @@
|
||||
\__\__/\____/\_____/__/ ____ ___
|
||||
/ _/ / \ \ / _ \/ _/
|
||||
/ \_/ / / \ \ __/ \__
|
||||
\____/____/\_____/_____/____/v1.2.1
|
||||
\____/____/\_____/_____/____/v1.2.2
|
||||
|
||||
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,
|
||||
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
|
||||
https://chromium.googlesource.com/webm/libwebp
|
||||
|
||||
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
|
||||
property rights grant can be found in the file PATENTS.
|
||||
|
||||
@ -436,8 +436,8 @@ Prerequisites:
|
||||
|
||||
2) (Optional) qcms (Quick Color Management System)
|
||||
i. Download qcms from Mozilla / Chromium:
|
||||
http://hg.mozilla.org/mozilla-central/file/0e7639e3bdfb/gfx/qcms
|
||||
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/qcms
|
||||
https://hg.mozilla.org/mozilla-central/file/0e7639e3bdfb/gfx/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
|
||||
iii. Update makefile.unix / Makefile.vc
|
||||
a) Define WEBP_HAVE_QCMS
|
||||
@ -456,7 +456,7 @@ modes, etc.
|
||||
|
||||
Usage:
|
||||
|
||||
img2webp [file-level options] [image files...] [per-frame options...]
|
||||
img2webp [file_options] [[frame_options] frame_file]...
|
||||
|
||||
File-level options (only used at the start of compression):
|
||||
-min_size ............ minimize size
|
||||
@ -786,10 +786,10 @@ Bugs:
|
||||
Please report all bugs to the issue tracker:
|
||||
https://bugs.chromium.org/p/webp
|
||||
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:
|
||||
========
|
||||
|
||||
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:
|
||||
@ -249,10 +249,10 @@ Bugs:
|
||||
Please report all bugs to the issue tracker:
|
||||
https://bugs.chromium.org/p/webp
|
||||
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:
|
||||
========
|
||||
|
||||
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,6 +1,6 @@
|
||||
AC_INIT([libwebp], [1.2.1],
|
||||
AC_INIT([libwebp], [1.2.2],
|
||||
[https://bugs.chromium.org/p/webp],,
|
||||
[http://developers.google.com/speed/webp])
|
||||
[https://developers.google.com/speed/webp])
|
||||
AC_CANONICAL_HOST
|
||||
AC_PREREQ([2.60])
|
||||
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
|
||||
automatically.
|
||||
|
||||
[1]: http://kramdown.rubyforge.org/
|
||||
[2]: http://rubygems.org/
|
||||
[1]: https://kramdown.gettalong.org/
|
||||
[2]: https://rubygems.org/
|
||||
|
||||
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.
|
||||
|
||||
[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
|
||||
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
|
||||
end of this file.
|
||||
@ -811,9 +811,9 @@ RIFF/WEBP
|
||||
+- 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
|
||||
[iccspec]: http://www.color.org/icc_specs2.xalter
|
||||
[metadata]: http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf
|
||||
[rfc 1166]: http://tools.ietf.org/html/rfc1166
|
||||
[rfc 2119]: http://tools.ietf.org/html/rfc2119
|
||||
[iccspec]: https://www.color.org/icc_specs2.xalter
|
||||
[metadata]: https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf
|
||||
[rfc 1166]: https://datatracker.ietf.org/doc/html/rfc1166
|
||||
[rfc 2119]: https://datatracker.ietf.org/doc/html/rfc2119
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Although you may be viewing an alternate representation, this document
|
||||
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
|
||||
end of this file.
|
||||
@ -1087,4 +1087,4 @@ A possible example sequence:
|
||||
<lz77-coded image>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
[canonical_huff]: http://en.wikipedia.org/wiki/Canonical_Huffman_code
|
||||
[canonical_huff]: https://en.wikipedia.org/wiki/Canonical_Huffman_code
|
||||
|
@ -35,8 +35,7 @@
|
||||
|
||||
static void Help(void) {
|
||||
printf("Usage:\n\n");
|
||||
printf(" img2webp [file-level options] [image files...] "
|
||||
"[per-frame options...]\n");
|
||||
printf(" img2webp [file_options] [[frame_options] frame_file]...\n");
|
||||
printf("\n");
|
||||
|
||||
printf("File-level options (only used at the start of compression):\n");
|
||||
|
@ -125,16 +125,16 @@ static void WebPInfoInit(WebPInfo* const webp_info) {
|
||||
memset(webp_info, 0, sizeof(*webp_info));
|
||||
}
|
||||
|
||||
static const char kWebPChunkTags[CHUNK_TYPES][4] = {
|
||||
{ 'V', 'P', '8', ' ' },
|
||||
{ 'V', 'P', '8', 'L' },
|
||||
{ 'V', 'P', '8', 'X' },
|
||||
{ 'A', 'L', 'P', 'H' },
|
||||
{ 'A', 'N', 'I', 'M' },
|
||||
{ 'A', 'N', 'M', 'F' },
|
||||
{ 'I', 'C', 'C', 'P' },
|
||||
{ 'E', 'X', 'I', 'F' },
|
||||
{ 'X', 'M', 'P', ' ' },
|
||||
static const uint32_t kWebPChunkTags[CHUNK_TYPES] = {
|
||||
MKFOURCC('V', 'P', '8', ' '),
|
||||
MKFOURCC('V', 'P', '8', 'L'),
|
||||
MKFOURCC('V', 'P', '8', 'X'),
|
||||
MKFOURCC('A', 'L', 'P', 'H'),
|
||||
MKFOURCC('A', 'N', 'I', 'M'),
|
||||
MKFOURCC('A', 'N', 'M', 'F'),
|
||||
MKFOURCC('I', 'C', 'C', 'P'),
|
||||
MKFOURCC('E', 'X', 'I', 'F'),
|
||||
MKFOURCC('X', 'M', 'P', ' '),
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -644,7 +644,7 @@ static WebPInfoStatus ParseChunk(const WebPInfo* const webp_info,
|
||||
return WEBP_INFO_TRUNCATED_DATA;
|
||||
}
|
||||
for (i = 0; i < CHUNK_TYPES; ++i) {
|
||||
if (!memcmp(kWebPChunkTags[i], &fourcc, TAG_SIZE)) break;
|
||||
if (kWebPChunkTags[i] == fourcc) break;
|
||||
}
|
||||
chunk_data->offset_ = chunk_start_offset;
|
||||
chunk_data->size_ = chunk_size;
|
||||
@ -939,7 +939,13 @@ static WebPInfoStatus ProcessChunk(const ChunkData* const chunk_data,
|
||||
LOG_WARN(error_message);
|
||||
} else {
|
||||
if (!webp_info->quiet_) {
|
||||
const char* tag = kWebPChunkTags[chunk_data->id_];
|
||||
char tag[4];
|
||||
uint32_t fourcc = kWebPChunkTags[chunk_data->id_];
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
fourcc = (fourcc >> 24) | ((fourcc >> 8) & 0xff00) |
|
||||
((fourcc << 8) & 0xff0000) | (fourcc << 24);
|
||||
#endif
|
||||
memcpy(tag, &fourcc, sizeof(tag));
|
||||
printf("Chunk %c%c%c%c at offset %6d, length %6d\n",
|
||||
tag[0], tag[1], tag[2], tag[3], (int)chunk_data->offset_,
|
||||
(int)chunk_data->size_);
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#define XTRA_MAJ_VERSION 1
|
||||
#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);
|
||||
|
||||
// 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).
|
||||
int WebPWritePGM(FILE* fout, const struct WebPDecBuffer* const buffer);
|
||||
|
||||
|
@ -133,7 +133,7 @@ static const struct {
|
||||
MetadataPayload* const payload);
|
||||
size_t storage_offset;
|
||||
} 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.
|
||||
{ "Raw profile type exif", ProcessRawProfile, METADATA_OFFSET(exif) },
|
||||
{ "Raw profile type xmp", ProcessRawProfile, METADATA_OFFSET(xmp) },
|
||||
|
@ -9,7 +9,7 @@
|
||||
# (the previous build will be erased if it exists).
|
||||
#
|
||||
# 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
|
||||
|
||||
@ -86,7 +86,7 @@ if [[ ! -e ${SRCDIR}/configure ]]; then
|
||||
Error creating configure script!
|
||||
This script requires the autoconf/automake and libtool to build. MacPorts can
|
||||
be used to obtain these:
|
||||
http://www.macports.org/install.php
|
||||
https://www.macports.org/install.php
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
@ -47,7 +47,7 @@ else
|
||||
endif
|
||||
|
||||
# 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"
|
||||
# 3. Run "sudo port install libpng"
|
||||
# 4. Run "sudo port install tiff"
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH CWEBP 1 "November 19, 2020"
|
||||
.TH CWEBP 1 "November 17, 2021"
|
||||
.SH NAME
|
||||
cwebp \- compress an image file to a WebP file
|
||||
.SH SYNOPSIS
|
||||
@ -222,7 +222,7 @@ Compute and report average PSNR (Peak\-Signal\-To\-Noise ratio).
|
||||
.TP
|
||||
.B \-print_ssim
|
||||
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
|
||||
.B \-print_lsim
|
||||
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
|
||||
.br
|
||||
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
|
||||
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 gif2webp (1)
|
||||
.br
|
||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
||||
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||
information.
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH DWEBP 1 "November 19, 2020"
|
||||
.TH DWEBP 1 "November 17, 2021"
|
||||
.SH NAME
|
||||
dwebp \- decompress a WebP file to an image file
|
||||
.SH SYNOPSIS
|
||||
@ -113,7 +113,7 @@ Please report all bugs to the issue tracker:
|
||||
https://bugs.chromium.org/p/webp
|
||||
.br
|
||||
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
|
||||
dwebp picture.webp \-o output.png
|
||||
@ -138,7 +138,7 @@ for the Debian project (and may be used by others).
|
||||
.BR gif2webp (1),
|
||||
.BR webpmux (1)
|
||||
.br
|
||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
||||
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||
information.
|
||||
.SS Output file format details
|
||||
PAM: http://netpbm.sourceforge.net/doc/pam.html
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH GIF2WEBP 1 "May 1, 2020"
|
||||
.TH GIF2WEBP 1 "November 17, 2021"
|
||||
.SH NAME
|
||||
gif2webp \- Convert a GIF image to WebP
|
||||
.SH SYNOPSIS
|
||||
@ -131,7 +131,7 @@ Please report all bugs to the issue tracker:
|
||||
https://bugs.chromium.org/p/webp
|
||||
.br
|
||||
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
|
||||
gif2webp picture.gif \-o picture.webp
|
||||
@ -160,5 +160,5 @@ Debian project (and may be used by others).
|
||||
.BR dwebp (1),
|
||||
.BR webpmux (1)
|
||||
.br
|
||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
||||
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||
information.
|
||||
|
@ -1,10 +1,10 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH IMG2WEBP 1 "May 1, 2020"
|
||||
.TH IMG2WEBP 1 "January 5, 2022"
|
||||
.SH NAME
|
||||
img2webp \- create animated WebP file from a sequence of input images.
|
||||
.SH SYNOPSIS
|
||||
.B img2webp
|
||||
[file_level_options] [files] [per_frame_options...]
|
||||
[file_options] [[frame_options] frame_file]...
|
||||
.br
|
||||
.B img2webp argument_file_name
|
||||
.br
|
||||
@ -86,7 +86,7 @@ Please report all bugs to the issue tracker:
|
||||
https://bugs.chromium.org/p/webp
|
||||
.br
|
||||
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
|
||||
\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 gif2webp (1)
|
||||
.br
|
||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
||||
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||
information.
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH VWEBP 1 "June 5, 2019"
|
||||
.TH VWEBP 1 "November 17, 2021"
|
||||
.SH NAME
|
||||
vwebp \- decompress a WebP file and display it in a window
|
||||
.SH SYNOPSIS
|
||||
@ -77,7 +77,7 @@ Please report all bugs to the issue tracker:
|
||||
https://bugs.chromium.org/p/webp
|
||||
.br
|
||||
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
|
||||
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
|
||||
.BR dwebp (1)
|
||||
.br
|
||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
||||
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||
information.
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH WEBPINFO 1 "November 24, 2017"
|
||||
.TH WEBPINFO 1 "November 17, 2021"
|
||||
.SH NAME
|
||||
webpinfo \- print out the chunk level structure of WebP files
|
||||
along with basic integrity checks.
|
||||
@ -52,7 +52,7 @@ Please report all bugs to the issue tracker:
|
||||
https://bugs.chromium.org/p/webp
|
||||
.br
|
||||
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
|
||||
.br
|
||||
@ -76,5 +76,5 @@ for the Debian project (and may be used by others).
|
||||
.SH SEE ALSO
|
||||
.BR webpmux (1)
|
||||
.br
|
||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
||||
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||
information.
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH WEBPMUX 1 "November 3, 2021"
|
||||
.TH WEBPMUX 1 "November 17, 2021"
|
||||
.SH NAME
|
||||
webpmux \- create animated WebP files from non\-animated WebP images, extract
|
||||
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
|
||||
.br
|
||||
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
|
||||
.P
|
||||
@ -267,5 +267,5 @@ for the Debian project (and may be used by others).
|
||||
.BR dwebp (1),
|
||||
.BR gif2webp (1)
|
||||
.br
|
||||
Please refer to http://developers.google.com/speed/webp/ for additional
|
||||
Please refer to https://developers.google.com/speed/webp/ for additional
|
||||
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
|
||||
# not have unresolved symbols. Some platforms (Windows among them) require all
|
||||
# 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
|
||||
pkgconfig_DATA = libwebp.pc
|
||||
|
||||
@ -48,7 +48,7 @@ if BUILD_LIBWEBPDECODER
|
||||
libwebpdecoder_la_LIBADD += dsp/libwebpdspdecode.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
|
||||
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
|
||||
};
|
||||
|
||||
// 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) {
|
||||
int v;
|
||||
if (!VP8GetBit(br, p[3], "coeffs")) {
|
||||
|
@ -32,7 +32,7 @@ extern "C" {
|
||||
// version numbers
|
||||
#define DEC_MAJ_VERSION 1
|
||||
#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).
|
||||
// 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)
|
||||
// + color_cache_size (between 0 and 2048).
|
||||
// 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)
|
||||
static const uint16_t kTableSize[12] = {
|
||||
FIXED_TABLE_SIZE + 654,
|
||||
|
@ -13,6 +13,6 @@ noinst_HEADERS =
|
||||
noinst_HEADERS += ../webp/format_constants.h
|
||||
|
||||
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
|
||||
pkgconfig_DATA = libwebpdemux.pc
|
||||
|
@ -23,6 +23,14 @@
|
||||
|
||||
#define NUM_CHANNELS 4
|
||||
|
||||
// Channel extraction from a uint32_t representation of a uint8_t RGBA/BGRA
|
||||
// buffer.
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define CHANNEL_SHIFT(i) (24 - (i) * 8)
|
||||
#else
|
||||
#define CHANNEL_SHIFT(i) ((i) * 8)
|
||||
#endif
|
||||
|
||||
typedef void (*BlendRowFunc)(uint32_t* const, const uint32_t* const, int);
|
||||
static void BlendPixelRowNonPremult(uint32_t* const src,
|
||||
const uint32_t* const dst, int num_pixels);
|
||||
@ -209,35 +217,35 @@ static uint8_t BlendChannelNonPremult(uint32_t src, uint8_t src_a,
|
||||
const uint8_t dst_channel = (dst >> shift) & 0xff;
|
||||
const uint32_t blend_unscaled = src_channel * src_a + dst_channel * dst_a;
|
||||
assert(blend_unscaled < (1ULL << 32) / scale);
|
||||
return (blend_unscaled * scale) >> 24;
|
||||
return (blend_unscaled * scale) >> CHANNEL_SHIFT(3);
|
||||
}
|
||||
|
||||
// Blend 'src' over 'dst' assuming they are NOT pre-multiplied by alpha.
|
||||
static uint32_t BlendPixelNonPremult(uint32_t src, uint32_t dst) {
|
||||
const uint8_t src_a = (src >> 24) & 0xff;
|
||||
const uint8_t src_a = (src >> CHANNEL_SHIFT(3)) & 0xff;
|
||||
|
||||
if (src_a == 0) {
|
||||
return dst;
|
||||
} else {
|
||||
const uint8_t dst_a = (dst >> 24) & 0xff;
|
||||
const uint8_t dst_a = (dst >> CHANNEL_SHIFT(3)) & 0xff;
|
||||
// This is the approximate integer arithmetic for the actual formula:
|
||||
// dst_factor_a = (dst_a * (255 - src_a)) / 255.
|
||||
const uint8_t dst_factor_a = (dst_a * (256 - src_a)) >> 8;
|
||||
const uint8_t blend_a = src_a + dst_factor_a;
|
||||
const uint32_t scale = (1UL << 24) / blend_a;
|
||||
|
||||
const uint8_t blend_r =
|
||||
BlendChannelNonPremult(src, src_a, dst, dst_factor_a, scale, 0);
|
||||
const uint8_t blend_g =
|
||||
BlendChannelNonPremult(src, src_a, dst, dst_factor_a, scale, 8);
|
||||
const uint8_t blend_b =
|
||||
BlendChannelNonPremult(src, src_a, dst, dst_factor_a, scale, 16);
|
||||
const uint8_t blend_r = BlendChannelNonPremult(
|
||||
src, src_a, dst, dst_factor_a, scale, CHANNEL_SHIFT(0));
|
||||
const uint8_t blend_g = BlendChannelNonPremult(
|
||||
src, src_a, dst, dst_factor_a, scale, CHANNEL_SHIFT(1));
|
||||
const uint8_t blend_b = BlendChannelNonPremult(
|
||||
src, src_a, dst, dst_factor_a, scale, CHANNEL_SHIFT(2));
|
||||
assert(src_a + dst_factor_a < 256);
|
||||
|
||||
return (blend_r << 0) |
|
||||
(blend_g << 8) |
|
||||
(blend_b << 16) |
|
||||
((uint32_t)blend_a << 24);
|
||||
return ((uint32_t)blend_r << CHANNEL_SHIFT(0)) |
|
||||
((uint32_t)blend_g << CHANNEL_SHIFT(1)) |
|
||||
((uint32_t)blend_b << CHANNEL_SHIFT(2)) |
|
||||
((uint32_t)blend_a << CHANNEL_SHIFT(3));
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,7 +255,7 @@ static void BlendPixelRowNonPremult(uint32_t* const src,
|
||||
const uint32_t* const dst, int num_pixels) {
|
||||
int i;
|
||||
for (i = 0; i < num_pixels; ++i) {
|
||||
const uint8_t src_alpha = (src[i] >> 24) & 0xff;
|
||||
const uint8_t src_alpha = (src[i] >> CHANNEL_SHIFT(3)) & 0xff;
|
||||
if (src_alpha != 0xff) {
|
||||
src[i] = BlendPixelNonPremult(src[i], dst[i]);
|
||||
}
|
||||
@ -264,7 +272,7 @@ static WEBP_INLINE uint32_t ChannelwiseMultiply(uint32_t pix, uint32_t scale) {
|
||||
|
||||
// Blend 'src' over 'dst' assuming they are pre-multiplied by alpha.
|
||||
static uint32_t BlendPixelPremult(uint32_t src, uint32_t dst) {
|
||||
const uint8_t src_a = (src >> 24) & 0xff;
|
||||
const uint8_t src_a = (src >> CHANNEL_SHIFT(3)) & 0xff;
|
||||
return src + ChannelwiseMultiply(dst, 256 - src_a);
|
||||
}
|
||||
|
||||
@ -274,7 +282,7 @@ static void BlendPixelRowPremult(uint32_t* const src, const uint32_t* const dst,
|
||||
int num_pixels) {
|
||||
int i;
|
||||
for (i = 0; i < num_pixels; ++i) {
|
||||
const uint8_t src_alpha = (src[i] >> 24) & 0xff;
|
||||
const uint8_t src_alpha = (src[i] >> CHANNEL_SHIFT(3)) & 0xff;
|
||||
if (src_alpha != 0xff) {
|
||||
src[i] = BlendPixelPremult(src[i], dst[i]);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#define DMUX_MAJ_VERSION 1
|
||||
#define DMUX_MIN_VERSION 2
|
||||
#define DMUX_REV_VERSION 1
|
||||
#define DMUX_REV_VERSION 2
|
||||
|
||||
typedef struct {
|
||||
size_t start_; // start location of the data
|
||||
|
@ -6,8 +6,8 @@
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,2,1
|
||||
PRODUCTVERSION 1,0,2,1
|
||||
FILEVERSION 1,0,2,2
|
||||
PRODUCTVERSION 1,0,2,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -24,12 +24,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Google, Inc."
|
||||
VALUE "FileDescription", "libwebpdemux DLL"
|
||||
VALUE "FileVersion", "1.2.1"
|
||||
VALUE "FileVersion", "1.2.2"
|
||||
VALUE "InternalName", "libwebpdemux.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||
VALUE "OriginalFilename", "libwebpdemux.dll"
|
||||
VALUE "ProductName", "WebP Image Demuxer"
|
||||
VALUE "ProductVersion", "1.2.1"
|
||||
VALUE "ProductVersion", "1.2.2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -9,7 +9,7 @@
|
||||
//
|
||||
// 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"
|
||||
|
||||
|
@ -107,63 +107,77 @@ static WEBP_INLINE uint32_t Select(uint32_t a, uint32_t b, uint32_t c) {
|
||||
//------------------------------------------------------------------------------
|
||||
// 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)left;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
return top[-1];
|
||||
}
|
||||
uint32_t VP8LPredictor5_C(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Average3(left, top[0], top[1]);
|
||||
uint32_t VP8LPredictor5_C(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Average3(*left, top[0], top[1]);
|
||||
return pred;
|
||||
}
|
||||
uint32_t VP8LPredictor6_C(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Average2(left, top[-1]);
|
||||
uint32_t VP8LPredictor6_C(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Average2(*left, top[-1]);
|
||||
return pred;
|
||||
}
|
||||
uint32_t VP8LPredictor7_C(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Average2(left, top[0]);
|
||||
uint32_t VP8LPredictor7_C(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Average2(*left, top[0]);
|
||||
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]);
|
||||
(void)left;
|
||||
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]);
|
||||
(void)left;
|
||||
return pred;
|
||||
}
|
||||
uint32_t VP8LPredictor10_C(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Average4(left, top[-1], top[0], top[1]);
|
||||
uint32_t VP8LPredictor10_C(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Average4(*left, top[-1], top[0], top[1]);
|
||||
return pred;
|
||||
}
|
||||
uint32_t VP8LPredictor11_C(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Select(top[0], left, top[-1]);
|
||||
uint32_t VP8LPredictor11_C(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Select(top[0], *left, top[-1]);
|
||||
return pred;
|
||||
}
|
||||
uint32_t VP8LPredictor12_C(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = ClampedAddSubtractFull(left, top[0], top[-1]);
|
||||
uint32_t VP8LPredictor12_C(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = ClampedAddSubtractFull(*left, top[0], top[-1]);
|
||||
return pred;
|
||||
}
|
||||
uint32_t VP8LPredictor13_C(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = ClampedAddSubtractHalf(left, top[0], top[-1]);
|
||||
uint32_t VP8LPredictor13_C(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = ClampedAddSubtractHalf(*left, top[0], top[-1]);
|
||||
return pred;
|
||||
}
|
||||
|
||||
|
@ -28,23 +28,38 @@ extern "C" {
|
||||
//------------------------------------------------------------------------------
|
||||
// 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];
|
||||
|
||||
uint32_t VP8LPredictor0_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor1_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor2_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor3_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor4_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor5_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor6_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor7_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor8_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor9_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor10_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor11_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor12_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor13_C(uint32_t left, const uint32_t* const top);
|
||||
uint32_t VP8LPredictor0_C(const uint32_t* const left,
|
||||
const uint32_t* const top);
|
||||
uint32_t VP8LPredictor1_C(const uint32_t* const left,
|
||||
const uint32_t* const top);
|
||||
uint32_t VP8LPredictor2_C(const uint32_t* const left,
|
||||
const uint32_t* const top);
|
||||
uint32_t VP8LPredictor3_C(const uint32_t* const left,
|
||||
const uint32_t* const top);
|
||||
uint32_t VP8LPredictor4_C(const uint32_t* const left,
|
||||
const uint32_t* const top);
|
||||
uint32_t VP8LPredictor5_C(const uint32_t* const left,
|
||||
const uint32_t* const top);
|
||||
uint32_t VP8LPredictor6_C(const uint32_t* const left,
|
||||
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.
|
||||
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; \
|
||||
assert(upper != NULL); \
|
||||
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); \
|
||||
} \
|
||||
}
|
||||
|
@ -745,7 +745,7 @@ static void PredictorSub##PREDICTOR_I##_C(const uint32_t* in, \
|
||||
assert(upper != NULL); \
|
||||
for (x = 0; x < num_pixels; ++x) { \
|
||||
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); \
|
||||
} \
|
||||
}
|
||||
|
@ -188,46 +188,51 @@ static WEBP_INLINE uint32_t Average4(uint32_t a0, uint32_t a1,
|
||||
return Average2(Average2(a0, a1), Average2(a2, a3));
|
||||
}
|
||||
|
||||
static uint32_t Predictor5_MIPSdspR2(uint32_t left, const uint32_t* const top) {
|
||||
return Average3(left, top[0], top[1]);
|
||||
static uint32_t Predictor5_MIPSdspR2(const uint32_t* const left,
|
||||
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) {
|
||||
return Average2(left, top[-1]);
|
||||
static uint32_t Predictor6_MIPSdspR2(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
return Average2(*left, top[-1]);
|
||||
}
|
||||
|
||||
static uint32_t Predictor7_MIPSdspR2(uint32_t left, const uint32_t* const top) {
|
||||
return Average2(left, top[0]);
|
||||
static uint32_t Predictor7_MIPSdspR2(const uint32_t* const left,
|
||||
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;
|
||||
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;
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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
|
||||
|
@ -188,17 +188,21 @@ static WEBP_INLINE uint32_t Average3_NEON(uint32_t a0, uint32_t a1,
|
||||
return avg;
|
||||
}
|
||||
|
||||
static uint32_t Predictor5_NEON(uint32_t left, const uint32_t* const top) {
|
||||
return Average3_NEON(left, top[0], top[1]);
|
||||
static uint32_t Predictor5_NEON(const uint32_t* const left,
|
||||
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) {
|
||||
return Average2_NEON(left, top[-1]);
|
||||
static uint32_t Predictor6_NEON(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
return Average2_NEON(*left, top[-1]);
|
||||
}
|
||||
static uint32_t Predictor7_NEON(uint32_t left, const uint32_t* const top) {
|
||||
return Average2_NEON(left, top[0]);
|
||||
static uint32_t Predictor7_NEON(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
return Average2_NEON(*left, top[0]);
|
||||
}
|
||||
static uint32_t Predictor13_NEON(uint32_t left, const uint32_t* const top) {
|
||||
return ClampedAddSubtractHalf_NEON(left, top[0], top[-1]);
|
||||
static uint32_t Predictor13_NEON(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
return ClampedAddSubtractHalf_NEON(*left, top[0], top[-1]);
|
||||
}
|
||||
|
||||
// Batch versions of those functions.
|
||||
|
@ -138,42 +138,51 @@ static WEBP_INLINE uint32_t Average4_SSE2(uint32_t a0, uint32_t a1,
|
||||
return output;
|
||||
}
|
||||
|
||||
static uint32_t Predictor5_SSE2(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Average3_SSE2(left, top[0], top[1]);
|
||||
static uint32_t Predictor5_SSE2(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Average3_SSE2(*left, top[0], top[1]);
|
||||
return pred;
|
||||
}
|
||||
static uint32_t Predictor6_SSE2(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Average2_SSE2(left, top[-1]);
|
||||
static uint32_t Predictor6_SSE2(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Average2_SSE2(*left, top[-1]);
|
||||
return pred;
|
||||
}
|
||||
static uint32_t Predictor7_SSE2(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Average2_SSE2(left, top[0]);
|
||||
static uint32_t Predictor7_SSE2(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Average2_SSE2(*left, top[0]);
|
||||
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]);
|
||||
(void)left;
|
||||
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]);
|
||||
(void)left;
|
||||
return pred;
|
||||
}
|
||||
static uint32_t Predictor10_SSE2(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Average4_SSE2(left, top[-1], top[0], top[1]);
|
||||
static uint32_t Predictor10_SSE2(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Average4_SSE2(*left, top[-1], top[0], top[1]);
|
||||
return pred;
|
||||
}
|
||||
static uint32_t Predictor11_SSE2(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = Select_SSE2(top[0], left, top[-1]);
|
||||
static uint32_t Predictor11_SSE2(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = Select_SSE2(top[0], *left, top[-1]);
|
||||
return pred;
|
||||
}
|
||||
static uint32_t Predictor12_SSE2(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = ClampedAddSubtractFull_SSE2(left, top[0], top[-1]);
|
||||
static uint32_t Predictor12_SSE2(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = ClampedAddSubtractFull_SSE2(*left, top[0], top[-1]);
|
||||
return pred;
|
||||
}
|
||||
static uint32_t Predictor13_SSE2(uint32_t left, const uint32_t* const top) {
|
||||
const uint32_t pred = ClampedAddSubtractHalf_SSE2(left, top[0], top[-1]);
|
||||
static uint32_t Predictor13_SSE2(const uint32_t* const left,
|
||||
const uint32_t* const top) {
|
||||
const uint32_t pred = ClampedAddSubtractHalf_SSE2(*left, top[0], top[-1]);
|
||||
return pred;
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,10 @@
|
||||
#ifndef 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 <msa.h>
|
||||
|
||||
@ -1389,4 +1393,5 @@ static WEBP_INLINE uint32_t func_hadd_uh_u32(v8u16 in) {
|
||||
} while (0)
|
||||
#define AVER_UB2_UB(...) AVER_UB2(v16u8, __VA_ARGS__)
|
||||
|
||||
#endif // WEBP_USE_MSA
|
||||
#endif // WEBP_DSP_MSA_MACRO_H_
|
||||
|
@ -12,10 +12,12 @@
|
||||
#ifndef WEBP_DSP_NEON_H_
|
||||
#define WEBP_DSP_NEON_H_
|
||||
|
||||
#include <arm_neon.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
|
||||
// everywhere except newer clang/gcc or aarch64 where the inline assembly is
|
||||
// incompatible.
|
||||
@ -98,4 +100,5 @@ static WEBP_INLINE int32x4x4_t Transpose4x4_NEON(const int32x4x4_t rows) {
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#endif // WEBP_USE_NEON
|
||||
#endif // WEBP_DSP_NEON_H_
|
||||
|
@ -10,7 +10,7 @@
|
||||
// inline YUV<->RGB conversion function
|
||||
//
|
||||
// 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
|
||||
// U = -0.1483 * R - 0.2911 * G + 0.4394 * 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) {
|
||||
predict = upper_row[x]; // Top.
|
||||
} 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 (max_quantization == 1 || mode == 0 || y == 0 || y == height - 1 ||
|
||||
|
@ -32,7 +32,7 @@ extern "C" {
|
||||
// version numbers
|
||||
#define ENC_MAJ_VERSION 1
|
||||
#define ENC_MIN_VERSION 2
|
||||
#define ENC_REV_VERSION 1
|
||||
#define ENC_REV_VERSION 2
|
||||
|
||||
enum { MAX_LF_LEVELS = 64, // Maximum loop filter level
|
||||
MAX_VARIABLE_LEVEL = 67, // last (inclusive) level with variable cost
|
||||
|
@ -6,8 +6,8 @@
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,2,1
|
||||
PRODUCTVERSION 1,0,2,1
|
||||
FILEVERSION 1,0,2,2
|
||||
PRODUCTVERSION 1,0,2,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -24,12 +24,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Google, Inc."
|
||||
VALUE "FileDescription", "libwebp DLL"
|
||||
VALUE "FileVersion", "1.2.1"
|
||||
VALUE "FileVersion", "1.2.2"
|
||||
VALUE "InternalName", "libwebp.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||
VALUE "OriginalFilename", "libwebp.dll"
|
||||
VALUE "ProductName", "WebP Image Codec"
|
||||
VALUE "ProductVersion", "1.2.1"
|
||||
VALUE "ProductVersion", "1.2.2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -6,8 +6,8 @@
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,2,1
|
||||
PRODUCTVERSION 1,0,2,1
|
||||
FILEVERSION 1,0,2,2
|
||||
PRODUCTVERSION 1,0,2,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -24,12 +24,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Google, Inc."
|
||||
VALUE "FileDescription", "libwebpdecoder DLL"
|
||||
VALUE "FileVersion", "1.2.1"
|
||||
VALUE "FileVersion", "1.2.2"
|
||||
VALUE "InternalName", "libwebpdecoder.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||
VALUE "OriginalFilename", "libwebpdecoder.dll"
|
||||
VALUE "ProductName", "WebP Image Decoder"
|
||||
VALUE "ProductVersion", "1.2.1"
|
||||
VALUE "ProductVersion", "1.2.2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -17,6 +17,6 @@ noinst_HEADERS =
|
||||
noinst_HEADERS += ../webp/format_constants.h
|
||||
|
||||
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
|
||||
pkgconfig_DATA = libwebpmux.pc
|
||||
|
@ -6,8 +6,8 @@
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,2,1
|
||||
PRODUCTVERSION 1,0,2,1
|
||||
FILEVERSION 1,0,2,2
|
||||
PRODUCTVERSION 1,0,2,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -24,12 +24,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Google, Inc."
|
||||
VALUE "FileDescription", "libwebpmux DLL"
|
||||
VALUE "FileVersion", "1.2.1"
|
||||
VALUE "FileVersion", "1.2.2"
|
||||
VALUE "InternalName", "libwebpmux.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||
VALUE "OriginalFilename", "libwebpmux.dll"
|
||||
VALUE "ProductName", "WebP Image Muxer"
|
||||
VALUE "ProductVersion", "1.2.1"
|
||||
VALUE "ProductVersion", "1.2.2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -29,7 +29,7 @@ extern "C" {
|
||||
|
||||
#define MUX_MAJ_VERSION 1
|
||||
#define MUX_MIN_VERSION 2
|
||||
#define MUX_REV_VERSION 1
|
||||
#define MUX_REV_VERSION 2
|
||||
|
||||
// Chunk object.
|
||||
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
|
||||
// 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,
|
||||
int histogram_size,
|
||||
HuffmanTree* tree, int tree_depth_limit,
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#define DFIX 4 // extra precision for ordered dithering
|
||||
#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] = {
|
||||
{ 0, 8, 2, 10 }, // coefficients are in DFIX fixed-point precision
|
||||
{ 12, 4, 14, 6 },
|
||||
|
@ -23,7 +23,7 @@
|
||||
// alloc/free etc) is printed. For debugging/tuning purpose only (it's slow,
|
||||
// and not multi-thread safe!).
|
||||
// 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:
|
||||
/* valgrind --tool=massif --massif-out-file=massif.out \
|
||||
--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
|
||||
// have a common stride returned as '*uv_stride'.
|
||||
// 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,
|
||||
int* width, int* height,
|
||||
uint8_t** u, uint8_t** v,
|
||||
|
@ -79,6 +79,26 @@ if [[ -z "${SDK[$IOS]}" ]] || [[ ${SDK[$IOS]%%.*} -lt 8 ]]; then
|
||||
exit 1
|
||||
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 "iOS SDK Version: ${SDK[$IOS]}"
|
||||
echo "MacOS SDK Version: ${SDK[$MACOS]}"
|
||||
@ -105,7 +125,7 @@ if [[ ! -e ${SRCDIR}/configure ]]; then
|
||||
Error creating configure script!
|
||||
This script requires the autoconf/automake and libtool to build. MacPorts or
|
||||
Homebrew can be used to obtain these:
|
||||
http://www.macports.org/install.php
|
||||
https://www.macports.org/install.php
|
||||
https://brew.sh/
|
||||
EOF
|
||||
exit 1
|
||||
@ -228,6 +248,10 @@ xcodebuild -create-xcframework "${FAT_DEMUXLIBLIST[@]}" \
|
||||
-output ${DEMUXTARGETDIR}
|
||||
xcodebuild -create-xcframework "${FAT_MUXLIBLIST[@]}" \
|
||||
-output ${MUXTARGETDIR}
|
||||
update_headers_path "${TARGETDIR}"
|
||||
update_headers_path "${DECTARGETDIR}"
|
||||
update_headers_path "${DEMUXTARGETDIR}"
|
||||
update_headers_path "${MUXTARGETDIR}"
|
||||
set +x
|
||||
|
||||
echo "SUCCESS"
|
||||
|
Reference in New Issue
Block a user