Skip to content

Commit

Permalink
Bug 1851413 - Update libjxl to 5d20fbe1cfcdb54bcc7880fc8a59bb9047d8c6…
Browse files Browse the repository at this point in the history
…0f r=saschanaz

Differential Revision: https://phabricator.services.mozilla.com/D187360
  • Loading branch information
updatebot-ci committed Sep 11, 2023
1 parent 0fb89a4 commit aa17d3e
Show file tree
Hide file tree
Showing 117 changed files with 1,514 additions and 565 deletions.
1 change: 1 addition & 0 deletions media/libjxl/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ SOURCES += [
"/third_party/jpeg-xl/lib/jxl/render_pipeline/stage_write.cc",
"/third_party/jpeg-xl/lib/jxl/render_pipeline/stage_xyb.cc",
"/third_party/jpeg-xl/lib/jxl/render_pipeline/stage_ycbcr.cc",
"/third_party/jpeg-xl/lib/jxl/simd_util.cc",
"/third_party/jpeg-xl/lib/jxl/splines.cc",
"/third_party/jpeg-xl/lib/jxl/toc.cc",
]
Expand Down
4 changes: 2 additions & 2 deletions media/libjxl/moz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ origin:

url: https://github.com/libjxl/libjxl

release: e6202f7181eff36c78bfdb79aa9bd45c3d1d614b (2023-08-11T12:36:59Z).
release: 5d20fbe1cfcdb54bcc7880fc8a59bb9047d8c60f (2023-08-31T08:05:46Z).

revision: e6202f7181eff36c78bfdb79aa9bd45c3d1d614b
revision: 5d20fbe1cfcdb54bcc7880fc8a59bb9047d8c60f

license: Apache-2.0

Expand Down
3 changes: 3 additions & 0 deletions third_party/jpeg-xl/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ CanadianBaconBoi <[email protected]>
Damiano Albani <[email protected]>
Daniel Novomeský <[email protected]>
David Burnett <[email protected]>
dependabot[bot]
Diego Pino <[email protected]>
Dirk Lemstra <[email protected]>
Don Olmstead <[email protected]>
Expand All @@ -42,6 +43,7 @@ Jon Sneyers <[email protected]>
Jonathan Brown (Jonnyawsom3) <[email protected]>
Joshua Root <[email protected]>
Kai Hollberg <[email protected]>
Kerry Su <[email protected]>
Kleis Auke Wolthuizen <[email protected]>
L. E. Segovia
Leo Izen <[email protected]>
Expand All @@ -52,6 +54,7 @@ Martin Strunz
Mathieu Malaterre <[email protected]>
Mikk Leini <[email protected]>
Misaki Kasumi <[email protected]>
Moonchild Straver <[email protected]>
Nicholas Hayes <[email protected]>
Nigel Tao <[email protected]>
Petr Diblík
Expand Down
6 changes: 3 additions & 3 deletions third_party/jpeg-xl/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- encoder API: add `JxlEncoderSetExtraChannelDistance` to adjust the quality
of extra channels (like alpha) separately.
- encoder API: new api functions for streaming encoding:
- `JxlEncoderSetOutputProcessor`
- `JxlEncoderFlushInput` and
- `JxlEncoderOutputProcessor` struct
- `JxlEncoderSetOutputCallback`,
- `JxlEncoderChunkedImageFrameStart`,
- `JxlEncoderChunkedImageFrameAddPart` and new
- `JXL_ENC_FRAME_SETTING_BUFFERING` enum value.
- encoder API: new options for more fine-grained control over metadata
preservation when using `JxlEncoderAddJPEGFrame`:
- `JXL_ENC_FRAME_SETTING_JPEG_KEEP_EXIF`
Expand Down
2 changes: 1 addition & 1 deletion third_party/jpeg-xl/bash_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ test_printf_size_t() {
ret=1
fi

if grep -n -E 'gtest\.h' \
if grep -n -E '[^_]gtest\.h' \
$(git ls-files | grep -E '(\.c|\.cc|\.cpp|\.h)$' | grep -v -F /testing.h); then
echo "Don't include gtest directly, instead include 'testing.h'. " >&2
ret=1
Expand Down
7 changes: 5 additions & 2 deletions third_party/jpeg-xl/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ else
fi
# Whether we should post a message in the MR when the build fails.
POST_MESSAGE_ON_ERROR="${POST_MESSAGE_ON_ERROR:-1}"
# By default, do a lightweight debian HWY package build.
HWY_PKG_OPTIONS="${HWY_PKG_OPTIONS:---set-envvar=HWY_EXTRA_CONFIG=-DBUILD_TESTING=OFF -DHWY_ENABLE_EXAMPLES=OFF -DHWY_ENABLE_CONTRIB=OFF}"

# Set default compilers to clang if not already set
export CC=${CC:-clang}
Expand Down Expand Up @@ -1354,6 +1356,7 @@ cmd_debian_stats() {
build_debian_pkg() {
local srcdir="$1"
local srcpkg="$2"
local options="${3:-}"

local debsdir="${BUILD_DIR}/debs"
local builddir="${debsdir}/${srcpkg}"
Expand All @@ -1369,7 +1372,7 @@ build_debian_pkg() {
done
(
cd "${builddir}"
debuild -b -uc -us
debuild "${options}" -b -uc -us
)
}

Expand All @@ -1381,7 +1384,7 @@ cmd_debian_build() {
build_debian_pkg "${MYDIR}" "jpeg-xl"
;;
highway)
build_debian_pkg "${MYDIR}/third_party/highway" "highway"
build_debian_pkg "${MYDIR}/third_party/highway" "highway" "${HWY_PKG_OPTIONS}"
;;
*)
echo "ERROR: Must pass a valid source package name to build." >&2
Expand Down
2 changes: 1 addition & 1 deletion third_party/jpeg-xl/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MYDIR=$(dirname $(realpath "$0"))
# Git revisions we use for the given submodules. Update these whenever you
# update a git submodule.
THIRD_PARTY_BROTLI="36533a866ed1ca4b75cf049f4521e4ec5fe24727"
THIRD_PARTY_HIGHWAY="270d84417f9776a2516b37910f571ef13947be21"
THIRD_PARTY_HIGHWAY="ba0900a4957b929390ab73827235557959234fea"
THIRD_PARTY_SKCMS="b25b07b4b07990811de121c0356155b2ba0f4318"
THIRD_PARTY_SJPEG="e5ab13008bb214deb66d5f3e17ca2f8dbff150bf"
THIRD_PARTY_ZLIB="cacf7f1d4e3d44d871b605da3b647f07d718623f"
Expand Down
1 change: 0 additions & 1 deletion third_party/jpeg-xl/examples/decode_exif_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <jxl/decode_cxx.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>

#include <vector>
Expand Down
1 change: 0 additions & 1 deletion third_party/jpeg-xl/lib/extras/codec_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "lib/extras/codec.h"

#include <stddef.h>
#include <stdio.h>

#include <algorithm>
#include <sstream>
Expand Down
1 change: 0 additions & 1 deletion third_party/jpeg-xl/lib/extras/dec/apng.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

#include <jxl/codestream_header.h>
#include <jxl/encode.h>
#include <stdio.h>
#include <string.h>

#include <string>
Expand Down
1 change: 0 additions & 1 deletion third_party/jpeg-xl/lib/extras/enc/apng.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
*
*/

#include <stdio.h>
#include <string.h>

#include <string>
Expand Down
1 change: 0 additions & 1 deletion third_party/jpeg-xl/lib/extras/enc/npy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "lib/extras/enc/npy.h"

#include <jxl/types.h>
#include <stdio.h>

#include <sstream>
#include <string>
Expand Down
1 change: 0 additions & 1 deletion third_party/jpeg-xl/lib/extras/enc/pgx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "lib/extras/enc/pgx.h"

#include <jxl/codestream_header.h>
#include <stdio.h>
#include <string.h>

#include "lib/extras/packed_image.h"
Expand Down
1 change: 0 additions & 1 deletion third_party/jpeg-xl/lib/extras/enc/pnm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "lib/extras/enc/pnm.h"

#include <stdio.h>
#include <string.h>

#include <string>
Expand Down
2 changes: 1 addition & 1 deletion third_party/jpeg-xl/lib/extras/metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ double ComputeDistanceP(const ImageF& distmap, const ButteraugliParams& params,
using T = float;
#endif
const HWY_FULL(T) d;
constexpr size_t N = MaxLanes(HWY_FULL(T)());
constexpr size_t N = MaxLanes(d);
// Manually aligned storage to avoid asan crash on clang-7 due to
// unaligned spill.
HWY_ALIGN T sum_totals0[N] = {0};
Expand Down
1 change: 0 additions & 1 deletion third_party/jpeg-xl/lib/extras/time.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "lib/extras/time.h"

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

#include <ctime>
Expand Down
2 changes: 1 addition & 1 deletion third_party/jpeg-xl/lib/include/jxl/cms_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license that can be found in the LICENSE file.
*/

/** @addtogroup libjxl_common
/** @addtogroup libjxl_color
* @{
* @file cms_interface.h
* @brief Interface to allow the injection of different color management systems
Expand Down
2 changes: 1 addition & 1 deletion third_party/jpeg-xl/lib/include/jxl/codestream_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license that can be found in the LICENSE file.
*/

/** @addtogroup libjxl_common
/** @addtogroup libjxl_metadata
* @{
* @file codestream_header.h
* @brief Definitions of structs and enums for the metadata from the JPEG XL
Expand Down
2 changes: 1 addition & 1 deletion third_party/jpeg-xl/lib/include/jxl/color_encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license that can be found in the LICENSE file.
*/

/** @addtogroup libjxl_common
/** @addtogroup libjxl_color
* @{
* @file color_encoding.h
* @brief Color Encoding definitions used by JPEG XL.
Expand Down
27 changes: 27 additions & 0 deletions third_party/jpeg-xl/lib/include/jxl/decode.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,33 @@ typedef enum {
JXL_DEC_FRAME_PROGRESSION = 0x8000,
} JxlDecoderStatus;

/** Types of progressive detail.
* Setting a progressive detail with value N implies all progressive details
* with smaller or equal value. Currently only the following level of
* progressive detail is implemented:
* - kDC (which implies kFrames)
* - kLastPasses (which implies kDC and kFrames)
* - kPasses (which implies kLastPasses, kDC and kFrames)
*/
typedef enum {
// after completed kRegularFrames
kFrames = 0,
// after completed DC (1:8)
kDC = 1,
// after completed AC passes that are the last pass for their resolution
// target.
kLastPasses = 2,
// after completed AC passes that are not the last pass for their resolution
// target.
kPasses = 3,
// during DC frame when lower resolution are completed (1:32, 1:16)
kDCProgressive = 4,
// after completed groups
kDCGroups = 5,
// after completed groups
kGroups = 6,
} JxlProgressiveDetail;

/** Rewinds decoder to the beginning. The same input must be given again from
* the beginning of the file and the decoder will emit events from the beginning
* again. When rewinding (as opposed to @ref JxlDecoderReset), the decoder can
Expand Down
2 changes: 1 addition & 1 deletion third_party/jpeg-xl/lib/include/jxl/decode_cxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/// @addtogroup libjxl_decoder
/// @addtogroup libjxl_cpp
/// @{
///
/// @file decode_cxx.h
Expand Down
Loading

0 comments on commit aa17d3e

Please sign in to comment.