Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into stable
Browse files Browse the repository at this point in the history
* Bump minimal (required) LLVM/XCode versions
* Fix GCC14 build
* Basic Sinarback eVolution decoder
* Nikon Coolpix A1000 camera support
* Nikon Z f camera support
* OM System TG-7 camera support
* Panasonic DMC-G10: add missing crop modes
* Panasonic ZS200: add missing aliases
* Pentax KF camera support
* Sigma sd Quattro H camera support
* Sony ILCE-7CM2 camera support
* Sony ILME-FX3 camera support
* Sony ZV-E1 camera support
* Samsung EK-GN120: fix CFA pattern
* Leica M10-D name normalisation
* Leica M10-P name normalisation
* Leica M10-R name normalisation
* Leica M11-P name normalisation
* Leica Q2 Monochrom name normalisation
* Leica SL2 name normalisation
* Leica SL2-S name normalisation
* Samsung EK-GN120: name normalization
* Sigma fp L name normalisation
* Sigma fp name normalisation

* upstream/develop: (40 commits)
  [CI] MSYS2: disable caching, it should not be an opt-out feature
  Drop all justification comments on include lines
  `TiffEntry::getString()`: rewrite to pacify `misc-include-cleaner`
  Apply clang-tidy-17's `performance-avoid-endl`
  Apply clang-tidy-17's `bugprone-empty-catch`
  Apply clang-tidy-17's `bugprone-switch-missing-default-case`
  Apply clang-tidy-17's `performance-move-const-arg`
  Apply clang-tidy-17's `cppcoreguidelines-missing-std-forward`
  Apply clang-tidy-17's `readability-avoid-unconditional-preprocessor-if`
  Apply clang-tidy-17's `cppcoreguidelines-rvalue-reference-param-not-moved`
  Apply clang-tidy-17's `cppcoreguidelines-use-default-member-init`
  Apply clang-tidy-17's `modernize-type-traits`
  Drop IWYU stuff
  Apply clang-tidy-17's `misc-include-cleaner`
  Pentax KF support
  [CI] Add LLVM17
  Samsung EK-GN120: normalize name
  Samsung EK-GN120: fix color table
  Nikon Z f support
  Leica Q2 Monochrom name normalisation
  ...
  • Loading branch information
LebedevRI committed Nov 4, 2023
2 parents 5eb7e26 + 19c4936 commit f8aa765
Show file tree
Hide file tree
Showing 299 changed files with 3,289 additions and 2,914 deletions.
1 change: 0 additions & 1 deletion .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
.mailmap
CMakeLists.txt
LICENSE
cmake/iwyu.imp
docs/Doxyfile.in
fuzz/all-fuzzers.txt
fuzz/common.dict
13 changes: 5 additions & 8 deletions .github/workflows/CI-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ jobs:
APT::Get::Fix-Missing "true";
EOT
rm -rf /etc/apt/sources.list*
if [ "${{ inputs.distro }}" = "debian:trixie-slim" ]; then
if [ "${{ inputs.distro }}" = "debian:unstable-slim" ]; then
tee /etc/apt/sources.list > /dev/null <<EOT
deb http://debian-archive.trafficmanager.net/debian unstable main
EOT
elif [ "${{ inputs.distro }}" = "debian:trixie-slim" ]; then
tee /etc/apt/sources.list > /dev/null <<EOT
deb http://debian-archive.trafficmanager.net/debian trixie main
deb http://debian-archive.trafficmanager.net/debian trixie-updates main
Expand All @@ -90,13 +94,6 @@ jobs:
deb http://debian-archive.trafficmanager.net/debian-security bookworm-security main
deb http://debian-archive.trafficmanager.net/debian bookworm-backports main
EOT
elif [ "${{ inputs.distro }}" = "ubuntu:jammy" ]; then
tee /etc/apt/sources.list > /dev/null <<EOT
deb http://azure.archive.ubuntu.com/ubuntu jammy main universe
deb http://azure.archive.ubuntu.com/ubuntu jammy-updates main universe
deb http://azure.archive.ubuntu.com/ubuntu jammy-security main universe
deb http://azure.archive.ubuntu.com/ubuntu jammy-backports main universe
EOT
fi
- name: Update base packages
timeout-minutes: 1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/CI-windows-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
timeout-minutes: 3
uses: msys2/setup-msys2@v2
with:
cache: false
msystem: ${{ inputs.msys2-msystem }}
update: true
install: >-
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
os: [ linux ]
compiler:
- { distro: "debian:trixie-slim", family: GNU, version: 13, CC: gcc-13, CXX: g++-13 }
- { distro: "debian:trixie-slim", family: LLVM, version: 16, CC: clang-16, CXX: clang++-16 }
- { distro: "debian:unstable-slim", family: LLVM, version: 17, CC: clang-17, CXX: clang++-17 }
flavor: [ RelWithDebInfo, Release ]
uses: ./.github/workflows/CI-linux.yml
with:
Expand All @@ -41,10 +41,9 @@ jobs:
os: [ linux ]
compiler:
- { distro: "debian:bookworm-slim", family: GNU, version: 12, CC: gcc-12, CXX: g++-12 }
- { distro: "debian:trixie-slim", family: LLVM, version: 16, CC: clang-16, CXX: clang++-16 }
- { distro: "debian:bookworm-slim", family: LLVM, version: 15, CC: clang-15, CXX: clang++-15 }
- { distro: "debian:bookworm-slim", family: LLVM, version: 14, CC: clang-14, CXX: clang++-14 }
- { distro: "debian:bookworm-slim", family: LLVM, version: 13, CC: clang-13, CXX: clang++-13 }
- { distro: "ubuntu:jammy", family: LLVM, version: 12, CC: clang-12, CXX: clang++-12 }
flavor: [ RelWithDebInfo, Release ]
uses: ./.github/workflows/CI-linux.yml
with:
Expand All @@ -63,13 +62,13 @@ jobs:
matrix:
include:
- os: linux
compiler: { distro: "debian:trixie-slim", family: LLVM, version: 16, CC: clang-16, CXX: clang++-16, CLANG_TIDY: clang-tidy-16 }
compiler: { distro: "debian:unstable-slim", family: LLVM, version: 17, CC: clang-17, CXX: clang++-17, CLANG_TIDY: clang-tidy-17 }
flavor: ClangTidy
- os: linux
compiler: { distro: "debian:trixie-slim", family: LLVM, version: 16, CC: clang-16, CXX: clang++-16 }
compiler: { distro: "debian:unstable-slim", family: LLVM, version: 17, CC: clang-17, CXX: clang++-17 }
flavor: ClangStaticAnalysis
- os: linux
compiler: { distro: "debian:trixie-slim", family: LLVM, version: 16, CC: clang-16, CXX: clang++-16 }
compiler: { distro: "debian:unstable-slim", family: LLVM, version: 17, CC: clang-17, CXX: clang++-17 }
flavor: CodeQLAnalysis
uses: ./.github/workflows/CI-linux.yml
with:
Expand Down Expand Up @@ -110,7 +109,7 @@ jobs:
matrix:
include:
- os: linux
compiler: { distro: "debian:trixie-slim", family: LLVM, version: 16, CC: clang-16, CXX: clang++-16 }
compiler: { distro: "debian:unstable-slim", family: LLVM, version: 17, CC: clang-17, CXX: clang++-17 }
flavor: SonarCloudStaticAnalysis
uses: ./.github/workflows/CI-linux.yml
with:
Expand Down Expand Up @@ -182,8 +181,8 @@ jobs:
fail-fast: false
matrix:
compiler:
- { os: macos-13, family: XCode, version: 14.3, deployment_target: 13.0, CC: cc, CXX: c++ } # LLVM15, native
- { os: macos-11, family: XCode, version: 13.2.1, deployment_target: 11.3, CC: cc, CXX: c++ } # LLVM12, native
- { os: macos-13, family: XCode, version: 14.3, deployment_target: 13.0, CC: cc, CXX: c++ } # LLVM15, native
- { os: macos-12, family: XCode, version: 14.2, deployment_target: 12.5, CC: cc, CXX: c++ } # LLVM14, native
flavor: [ RelWithDebInfo, Release ]
uses: ./.github/workflows/CI-macOS.yml
with:
Expand All @@ -199,9 +198,7 @@ jobs:
fail-fast: false
matrix:
compiler:
- { os: macos-13, family: XCode, version: 14.3, deployment_target: 11.3, CC: cc, CXX: c++ } # LLVM15, "backdeploy"
- { os: macos-12, family: XCode, version: 14.2, deployment_target: 12.5, CC: cc, CXX: c++ } # LLVM14, native
- { os: macos-12, family: XCode, version: 13.4.1, deployment_target: 12.0, CC: cc, CXX: c++ } # LLVM13, native
- { os: macos-13, family: XCode, version: 14.3, deployment_target: 12.5, CC: cc, CXX: c++ } # LLVM15, "backdeploy"
flavor: [ RelWithDebInfo, Release ]
uses: ./.github/workflows/CI-macOS.yml
with:
Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ else()
set(ALLOW_DOWNLOADING_ZLIB OFF CACHE BOOL "If ZLIB src tree is not found in location specified by ZLIB_PATH, do fetch the archive from internet" FORCE)
endif()
option(USE_XMLLINT "Run xmllint to test if data/cameras.xml is valid" ON)
option(USE_IWYU "Run iwyu tool when compiling sources" OFF)
option(USE_CLANG_TIDY "Run clang-tidy tool when compiling sources" OFF)
option(BUILD_TESTING "Build the testing tree." ON)
if(BUILD_TESTING)
Expand Down Expand Up @@ -170,10 +169,6 @@ if(RAWSPEED_USE_LIBCXX)
include(libc++)
endif()

if(USE_IWYU)
include(iwyu)
endif()

if(USE_LLVM_OPT_REPORT)
include(llvm-opt-report)
endif()
Expand Down
15 changes: 8 additions & 7 deletions bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocatorAda...
#include "bench/Common.h" // for benchmarkDryRun
#include <cstddef> // for byte
#include <map> // for map<>::mapped_type
#include <vector> // for allocator, vector
#include <benchmark/benchmark.h> // for State, Benchmark, BENCH...
#include "adt/DefaultInitAllocatorAdaptor.h"
#include "bench/Common.h"
#include <cstddef>
#include <map>
#include <memory>
#include <vector>
#include <benchmark/benchmark.h>

using Type = std::byte;

Expand All @@ -41,7 +42,7 @@ void construct_with_zeroinit(benchmark::State& state) {
}

template <typename Worker>
void BM_std_vector(benchmark::State& state, Worker&& worker) {
void BM_std_vector(benchmark::State& state, Worker worker) {
// Do it once outside of the loop to maybe offset the initial alloc time.
worker(state);

Expand Down
11 changes: 6 additions & 5 deletions bench/librawspeed/bench/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "rawspeedconfig.h"
#include "bench/Common.h"
#include "adt/Point.h" // for iPoint2D
#include "common/Common.h" // for roundUp
#include <cassert> // for assert
#include <cmath> // for ceil, sqrt
#include <cstdlib> // for getenv
#include "adt/Point.h"
#include "common/Common.h"
#include <cassert>
#include <cmath>
#include <cstdlib>

using rawspeed::iPoint2D;
using rawspeed::roundUp;
Expand Down
6 changes: 3 additions & 3 deletions bench/librawspeed/bench/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

#pragma once

#include "rawspeedconfig.h" // for RAWSPEED_READNONE
#include "adt/Point.h" // for iPoint2D
#include <cstddef> // for size_t
#include "rawspeedconfig.h"
#include "adt/Point.h"
#include <cstddef>

bool RAWSPEED_READNONE benchmarkDryRun();

Expand Down
45 changes: 23 additions & 22 deletions bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "decompressors/DeflateDecompressor.h" // for DeflateDecompressor
#include "adt/Point.h" // for iPoint2D
#include "bench/Common.h" // for areaToRectangle, benc...
#include "common/Common.h" // for isAligned
#include "common/RawImage.h" // for RawImage, RawImageData
#include "io/Buffer.h" // for Buffer
#include <algorithm> // for fill_n
#include <cassert> // for assert
#include <cstddef> // for size_t
#include <cstdint> // for uint8_t
#include <memory> // for unique_ptr
#include <type_traits> // for integral_constant
#include <vector> // for vector
#include <zlib.h> // for compress, compressBound
#include <benchmark/benchmark.h> // for State, Benchmark, BEN...
#include "decompressors/DeflateDecompressor.h"
#include "adt/Point.h"
#include "bench/Common.h"
#include "common/Common.h"
#include "common/RawImage.h"
#include "io/Buffer.h"
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <type_traits>
#include <vector>
#include <zconf.h>
#include <zlib.h>
#include <benchmark/benchmark.h>

#ifndef NDEBUG
#include <limits> // for numeric_limits
#include <limits>
#endif

using rawspeed::Buffer;
Expand Down Expand Up @@ -125,12 +125,13 @@ inline void CustomArgs(benchmark::internal::Benchmark* b) {
}

b->RangeMultiplier(2);
// FIXME: appears to not like 1GPix+ buffers
#if 1
b->Arg(128 << 20);
#else
b->Range(1, 1023 << 20)->Complexity(benchmark::oN);
#endif
// FIXME: appears to not like 1GPix+ buffers
// NOLINTNEXTLINE(readability-simplify-boolean-expr)
if constexpr ((true)) {
b->Arg(128 << 20);
} else {
b->Range(1, 1023 << 20)->Complexity(benchmark::oN);
}
b->Unit(benchmark::kMillisecond);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,21 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco...
#include "adt/Point.h" // for iPoint2D, iRecta...
#include "bench/Common.h" // for areaToRectangle
#include "common/Common.h" // for BitOrder, BitOrd...
#include "common/RawImage.h" // for RawImageType
#include "io/Buffer.h" // for Buffer, DataBuffer
#include "io/ByteStream.h" // for ByteStream
#include "io/Endianness.h" // for Endianness, Endi...
#include <algorithm> // for fill_n
#include <cassert> // for assert
#include <cstddef> // for size_t
#include <cstdint> // for uint16_t, uint8_t
#include <numeric> // for lcm
#include <type_traits> // for integral_constant
#include <vector> // for vector
#include <benchmark/benchmark.h> // for State, Benchmark
#include "decompressors/UncompressedDecompressor.h"
#include "adt/Point.h"
#include "bench/Common.h"
#include "common/Common.h"
#include "common/RawImage.h"
#include "io/Buffer.h"
#include "io/ByteStream.h"
#include "io/Endianness.h"
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <numeric>
#include <type_traits>
#include <vector>
#include <benchmark/benchmark.h>

using rawspeed::BitOrder;
using rawspeed::Buffer;
Expand Down
32 changes: 16 additions & 16 deletions bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "interpolators/Cr2sRawInterpolator.h" // for Cr2sRawInterpolator
#include "adt/Array2DRef.h" // for Array2DRef
#include "adt/Point.h" // for iPoint2D
#include "bench/Common.h" // for areaToRectangle
#include "common/Common.h" // for roundUp
#include "common/RawImage.h" // for RawImage, RawImageData
#include <array> // for array
#include <cstdint> // for uint16_t
#include <tuple> // for array
#include <type_traits> // for integral_constant
#include <benchmark/benchmark.h> // for State, Benchmark, Cou...
#include "interpolators/Cr2sRawInterpolator.h"
#include "adt/Array2DRef.h"
#include "adt/Point.h"
#include "bench/Common.h"
#include "common/Common.h"
#include "common/RawImage.h"
#include <array>
#include <cstdint>
#include <type_traits>
#include <benchmark/benchmark.h>

using rawspeed::Cr2sRawInterpolator;
using rawspeed::iPoint2D;
Expand Down Expand Up @@ -93,11 +92,12 @@ inline void CustomArguments(benchmark::internal::Benchmark* b) {
}

b->RangeMultiplier(2);
#if 1
b->Arg(2 * 3 * 2 * 1'000'000);
#else
b->Range(1, 256 << 20)->Complexity(benchmark::oN);
#endif
// NOLINTNEXTLINE(readability-simplify-boolean-expr)
if constexpr ((true)) {
b->Arg(2 * 3 * 2 * 1'000'000);
} else {
b->Range(1, 256 << 20)->Complexity(benchmark::oN);
}
b->Unit(benchmark::kMillisecond);
}

Expand Down
Loading

0 comments on commit f8aa765

Please sign in to comment.