Skip to content

Commit

Permalink
Backed out changeset fe2b37539282 (bug 1749780) for causing build bus…
Browse files Browse the repository at this point in the history
…tages. CLOSED TREE
  • Loading branch information
Butkovits Atila committed Jan 13, 2022
1 parent 9f75ed4 commit db6013d
Show file tree
Hide file tree
Showing 217 changed files with 4,788 additions and 11,429 deletions.
1 change: 0 additions & 1 deletion media/libjxl/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ EXPORTS.jxl += [
"./include/jxl/jxl_threads_export.h",
"/third_party/jpeg-xl/lib/include/jxl/butteraugli.h",
"/third_party/jpeg-xl/lib/include/jxl/butteraugli_cxx.h",
"/third_party/jpeg-xl/lib/include/jxl/cms_interface.h",
"/third_party/jpeg-xl/lib/include/jxl/codestream_header.h",
"/third_party/jpeg-xl/lib/include/jxl/color_encoding.h",
"/third_party/jpeg-xl/lib/include/jxl/decode.h",
Expand Down
6 changes: 2 additions & 4 deletions media/libjxl/moz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ origin:

# Human-readable identifier for this version/release
# Generally "version NNN", "tag SSS", "bookmark SSS"
release: commit 9a74bd70b7932750deb78a8aebd6e041ce7f8b01 (2021-12-28T23:30:10Z).
release: commit a9100da7143e4f367d2e26f4d11e457e85343543 (2021-11-25T17:57:37Z).

# Revision to pull in
# Must be a long or short commit SHA (long preferred)
# NOTE(krosylight): Update highway together when updating this!
revision: 9a74bd70b7932750deb78a8aebd6e041ce7f8b01
revision: a9100da7143e4f367d2e26f4d11e457e85343543

# The package's license, where possible using the mnemonic from
# https://spdx.org/licenses/
Expand Down Expand Up @@ -54,5 +54,3 @@ vendoring:
- tools/




1 change: 0 additions & 1 deletion third_party/jpeg-xl/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Kleis Auke Wolthuizen <github@kleisauke.nl>
Leo Izen <leo.izen@gmail.com>
Lovell Fuller
Marcin Konicki <ahwayakchih@gmail.com>
Mathieu Malaterre <mathieu.malaterre@gmail.com>
Misaki Kasumi <misakikasumi@outlook.com>
Petr Diblík
Pieter Wuille
Expand Down
28 changes: 0 additions & 28 deletions third_party/jpeg-xl/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
the non-coalesced case.
- decoder API: new function `JxlDecoderGetExtraChannelBlendInfo` to get
the blending information for extra channels in the non-coalesced case.
- encoder API: added ability to set several encoder options to frames using
`JxlEncoderFrameSettingsSetOption`
- encoder API: new functions `JxlEncoderSetFrameHeader` and
`JxlEncoderSetExtraChannelBlendInfo` to set animation
and blending parameters of the frame, and `JxlEncoderInitFrameHeader` and
`JxlEncoderInitBlendInfo` to initialize the structs to set.
- decoder/encoder API: add two fields to `JXLBasicInfo`: `intrinsic_xsize`
and `intrinsic_ysize` to signal the intrinsic size.
- encoder API: ability to encode arbitrary extra channels:
`JxlEncoderInitExtraChannelInfo`, `JxlEncoderSetExtraChannelInfo`,
`JxlEncoderSetExtraChannelName` and `JxlEncoderSetExtraChannelBuffer`.

### Changed
- decoder API: using `JxlDecoderCloseInput` at the end of all input is required
when using JXL_DEC_BOX, and is now also encouraged in other cases, but not
required in those other cases for backwards compatiblity.
- encoder API: `JxlEncoderCloseInput` now closes both frames and boxes input.

### Deprecated
- encoder API: `JxlEncoderOptions`: use `JxlEncoderFrameSettings` instead
- encoder API: `JxlEncoderOptionsCreate`: use `JxlEncoderFrameSettingsCreate`
instead
- encoder API: `JxlEncoderOptionsSetDistance`: use `JxlEncoderSetFrameDistance`
instead
- encoder API: `JxlEncoderOptionsSetLossless`: use `JxlEncoderSetFrameLossless`
instead
- encoder API: `JxlEncoderOptionsSetEffort`: use `JxlEncoderFrameSettingsSetOption(
frame_settings, JXL_ENC_FRAME_SETTING_EFFORT, effort)` instead.
- encoder API: `JxlEncoderOptionsSetDecodingSpeed`: use
`JxlEncoderFrameSettingsSetOption(frame_settings,
JXL_ENC_FRAME_SETTING_DECODING_SPEED, tier)` instead.
- encoder API: deprecated `JXL_ENC_NOT_SUPPORTED`, the encoder returns
`JXL_ENC_ERROR` instead and there is no need to handle
`JXL_ENC_NOT_SUPPORTED`.

## [0.6.1] - 2021-10-29
### Changed
- Security: Fix OOB read in splines rendering (#735 -
Expand Down
19 changes: 6 additions & 13 deletions third_party/jpeg-xl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-fsanitize=fuzzer-no-link" CXX_FUZZERS_SUPPORTED)
check_cxx_compiler_flag("-Xclang -mconstructor-aliases" CXX_CONSTRUCTOR_ALIASES_SUPPORTED)
check_cxx_compiler_flag("-fmacro-prefix-map=OLD=NEW" CXX_MACRO_PREFIX_MAP)
check_cxx_compiler_flag("-fno-rtti" CXX_NO_RTTI_SUPPORTED)

# Enabled PIE binaries by default if supported.
include(CheckPIESupported OPTIONAL RESULT_VARIABLE CHECK_PIE_SUPPORTED)
Expand Down Expand Up @@ -74,12 +73,6 @@ endif()

set(WARNINGS_AS_ERRORS_DEFAULT false)

if((SANITIZER STREQUAL "msan") OR JPEGXL_EMSCRIPTEN)
set(BUNDLE_LIBPNG_DEFAULT YES)
else()
set(BUNDLE_LIBPNG_DEFAULT NO)
endif()

# Standard cmake naming for building shared libraries.
option(BUILD_SHARED_LIBS "Build shared libraries instead of static ones" ON)

Expand All @@ -95,8 +88,6 @@ set(JPEGXL_ENABLE_BENCHMARK true CACHE BOOL
"Build JPEGXL benchmark tools.")
set(JPEGXL_ENABLE_EXAMPLES true CACHE BOOL
"Build JPEGXL library usage examples.")
set(JPEGXL_BUNDLE_LIBPNG ${BUNDLE_LIBPNG_DEFAULT} CACHE BOOL
"Build libpng from source and link it statically.")
set(JPEGXL_ENABLE_JNI true CACHE BOOL
"Build JPEGXL JNI Java wrapper, if Java dependencies are installed.")
set(JPEGXL_ENABLE_SJPEG true CACHE BOOL
Expand Down Expand Up @@ -223,10 +214,6 @@ if ("${CXX_MACRO_PREFIX_MAP}")
add_compile_options(-fmacro-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.)
endif()

if (CXX_NO_RTTI_SUPPORTED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
endif()

if (MSVC)
# TODO(janwas): add flags
else ()
Expand All @@ -244,6 +231,12 @@ if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()

if("${JPEGXL_ENABLE_FUZZERS}" OR "${JPEGXL_ENABLE_COVERAGE}")
add_definitions(
-DJXL_ENABLE_FUZZERS
)
endif() # JPEGXL_ENABLE_FUZZERS

# In CMake before 3.12 it is problematic to pass repeated flags like -Xclang.
# For this reason we place them in CMAKE_CXX_FLAGS instead.
# See https://gitlab.kitware.com/cmake/cmake/issues/15826
Expand Down
10 changes: 5 additions & 5 deletions third_party/jpeg-xl/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,8 @@ cmd_gbench() {
}

cmd_asanfuzz() {
CMAKE_CXX_FLAGS+=" -fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1"
CMAKE_C_FLAGS+=" -fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1"
CMAKE_CXX_FLAGS+=" -fsanitize=fuzzer-no-link"
CMAKE_C_FLAGS+=" -fsanitize=fuzzer-no-link"
cmd_asan -DJPEGXL_ENABLE_FUZZERS=ON "$@"
}

Expand All @@ -615,8 +615,8 @@ cmd_msanfuzz() {
cmd_msan_install
fi

CMAKE_CXX_FLAGS+=" -fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1"
CMAKE_C_FLAGS+=" -fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1"
CMAKE_CXX_FLAGS+=" -fsanitize=fuzzer-no-link"
CMAKE_C_FLAGS+=" -fsanitize=fuzzer-no-link"
cmd_msan -DJPEGXL_ENABLE_FUZZERS=ON "$@"
}

Expand Down Expand Up @@ -697,7 +697,7 @@ cmd_msan() {
strip_dead_code
cmake_configure "$@" \
-DCMAKE_CROSSCOMPILING=1 -DRUN_HAVE_STD_REGEX=0 -DRUN_HAVE_POSIX_REGEX=0 \
-DJPEGXL_ENABLE_TCMALLOC=OFF -DJPEGXL_WARNINGS_AS_ERRORS=OFF
-DJPEGXL_ENABLE_TCMALLOC=OFF
cmake_build_and_test
}

Expand Down
85 changes: 0 additions & 85 deletions third_party/jpeg-xl/cmake/FindBrotli.cmake

This file was deleted.

22 changes: 22 additions & 0 deletions third_party/jpeg-xl/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@ Files: third_party/sjpeg/*
Copyright: 2017 Google, Inc
License: Apache-2.0

Files: third_party/lodepng/*
Copyright: 2005-2018 Lode Vandevenne
License: Zlib License
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
.
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
.
3. This notice may not be removed or altered from any source
distribution.

Files: third_party/skcms/*
Copyright: 2018 Google Inc.
License: BSD-3-clause
Expand Down
6 changes: 2 additions & 4 deletions third_party/jpeg-xl/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ MYDIR=$(dirname $(realpath "$0"))
# Git revisions we use for the given submodules. Update these whenever you
# update a git submodule.
THIRD_PARTY_HIGHWAY="e69083a12a05caf037cabecdf1b248b7579705a5"
THIRD_PARTY_LODEPNG="8c6a9e30576f07bf470ad6f09458a2dcd7a6a84a"
THIRD_PARTY_SKCMS="64374756e03700d649f897dbd98c95e78c30c7da"
THIRD_PARTY_SJPEG="868ab558fad70fcbe8863ba4e85179eeb81cc840"
THIRD_PARTY_ZLIB="cacf7f1d4e3d44d871b605da3b647f07d718623f"
THIRD_PARTY_LIBPNG="a40189cf881e9f0db80511c382292a5604c3c3d1"

# Download the target revision from GitHub.
download_github() {
Expand Down Expand Up @@ -71,11 +70,10 @@ EOF

# Sources downloaded from a tarball.
download_github third_party/highway google/highway
download_github third_party/lodepng lvandeve/lodepng
download_github third_party/sjpeg webmproject/sjpeg
download_github third_party/skcms \
"https://skia.googlesource.com/skcms/+archive/"
download_github third_party/zlib madler/zlib
download_github third_party/libpng glennrp/libpng
echo "Done."
}

Expand Down
8 changes: 2 additions & 6 deletions third_party/jpeg-xl/examples/encode_oneshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,13 @@ bool EncodeJxlOneshot(const std::vector<float>& pixels, const uint32_t xsize,
return false;
}

JxlEncoderFrameSettings* frame_settings =
JxlEncoderFrameSettingsCreate(enc.get(), nullptr);

if (JXL_ENC_SUCCESS !=
JxlEncoderAddImageFrame(frame_settings, &pixel_format,
(void*)pixels.data(),
JxlEncoderAddImageFrame(JxlEncoderOptionsCreate(enc.get(), nullptr),
&pixel_format, (void*)pixels.data(),
sizeof(float) * pixels.size())) {
fprintf(stderr, "JxlEncoderAddImageFrame failed\n");
return false;
}
JxlEncoderCloseInput(enc.get());

compressed->resize(64);
uint8_t* next_out = compressed->data();
Expand Down
6 changes: 2 additions & 4 deletions third_party/jpeg-xl/examples/jxlinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ int PrintBasicInfo(FILE* file) {
printf("num_loops: %u\n", info.animation.num_loops);
printf("have_timecodes: %d\n", info.animation.have_timecodes);
}
printf("intrinsic xsize: %u\n", info.intrinsic_xsize);
printf("intrinsic ysize: %u\n", info.intrinsic_ysize);
const char* const orientation_string[8] = {
"Normal", "Flipped horizontally",
"Upside down", "Flipped vertically",
Expand Down Expand Up @@ -155,8 +153,8 @@ int PrintBasicInfo(FILE* file) {
free(name);
break;
}
printf(" name: %s\n", name);
free(name);
printf(" name: %s\n", name);
}
if (extra.type == JXL_CHANNEL_ALPHA)
printf(" alpha_premultiplied: %d (%s)\n", extra.alpha_premultiplied,
Expand Down Expand Up @@ -270,8 +268,8 @@ int PrintBasicInfo(FILE* file) {
free(name);
break;
}
printf(" name: %s\n", name);
free(name);
printf(" name: %s\n", name);
}
float ms = frame_header.duration * 1000.f *
info.animation.tps_denominator / info.animation.tps_numerator;
Expand Down
Loading

0 comments on commit db6013d

Please sign in to comment.