From 0e0c0c02df442cf352385fd69b92f1f0f4dcad95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Tue, 18 Apr 2023 15:08:58 +0200 Subject: [PATCH 01/40] Add Sony ZV-E1 --- data/cameras.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 07eeb0553..45abd6524 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -14114,6 +14114,24 @@ + + Sony ZV-E1 + + RED + GREEN + GREEN + BLUE + + + + + + 6912 -2127 -469 + -4470 12175 2587 + -398 1478 6492 + + + Sony ZV-E10 From c49310d3e3872dfaf19d132ba964986dff40b873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Tue, 18 Apr 2023 15:33:32 +0200 Subject: [PATCH 02/40] Add Sony ILME-FX3 --- data/cameras.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 07eeb0553..b84330f7c 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -14132,6 +14132,24 @@ + + Sony ILME-FX3 + + RED + GREEN + GREEN + BLUE + + + + + + 6912 -2127 -469 + -4470 12175 2587 + -398 1478 6492 + + + Sony ILME-FX30 From f0fd7fab970a5ce78c5723da5c77742dbe5c6be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Thu, 17 Aug 2023 16:28:35 +0200 Subject: [PATCH 03/40] Sigma sd Quattro H support DNG mode name normalization only --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 74c0d7ca4..c091d0afd 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17566,6 +17566,9 @@ sd Quattro + + sd Quattro H + LG Nexus 5X From d3a009d4e6229fc926210a406cae0adb4fe608dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Wed, 27 Sep 2023 14:59:31 +0200 Subject: [PATCH 04/40] Nikon Coolpix A1000 support --- data/cameras.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index e972081ff..f26ff3db5 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -6429,6 +6429,27 @@ + + Nikon Coolpix A1000 + + RED + GREEN + GREEN + BLUE + + + + + + + + + 10601 -3487 -1127 + -2931 11443 1676 + -587 1740 5278 + + + Nikon Coolpix B700 From 57e04131d76162143b11b145962c7be0ad1fc9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Thu, 5 Oct 2023 09:22:47 +0200 Subject: [PATCH 05/40] Add Panasonic DMC-G10 crop modes --- data/cameras.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index e972081ff..3fd163dba 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -7882,6 +7882,42 @@ + + Panasonic DMC-G10 + + + + + 10113 -3400 -1114 + -4765 12683 2317 + -377 1437 6710 + + + + + Panasonic DMC-G10 + + + + + 10113 -3400 -1114 + -4765 12683 2317 + -377 1437 6710 + + + + + Panasonic DMC-G10 + + + + + 10113 -3400 -1114 + -4765 12683 2317 + -377 1437 6710 + + + Panasonic DMC-GH1 From 2bb6a82c980c2209c321cdf16c2e3011a2648278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= <4973094+kmilos@users.noreply.github.com> Date: Thu, 5 Oct 2023 11:10:01 +0200 Subject: [PATCH 06/40] Sync differences to stable branch --- data/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/data/README.md b/data/README.md index 729a53266..be33d411c 100644 --- a/data/README.md +++ b/data/README.md @@ -136,4 +136,3 @@ This is a possibility to add one or more model aliases for a camera, which may h ``` This may contain manufacturer-specific hints for decoding. This can result in the code taking a specific decoder path, or otherwise treat the image differently. This is mainly used when it isn’t possible to determine which way to decode the image directly from the image data. - From 0723e2b894478f0e78c2be06be5fd5b177f4a7ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Wed, 30 Aug 2023 09:54:28 +0200 Subject: [PATCH 07/40] Sony ILCE-7CM2 support --- data/cameras.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 6f81d178f..005cdf3a1 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -13855,6 +13855,24 @@ + + Sony ILCE-7CM2 + + RED + GREEN + GREEN + BLUE + + + + + + 7460 -2365 -588 + -5687 13442 2474 + -624 1156 6584 + + + Sony ILCE-7R From fd474cedcccbdad0ff28e3f19aa72e8b6b43d4fa Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Sun, 22 Oct 2023 03:49:53 +0300 Subject: [PATCH 08/40] Basic Sinarback eVolution decoder Seems to kind-of work, but `CFARepeatPatternDim` is `2,0` (??) Refs. https://github.com/darktable-org/darktable/issues/15466 --- data/cameras.xml | 18 ++++ data/cameras.xsd | 1 + fuzz/all-fuzzers.txt | 1 + .../decoders/TiffDecoders/CMakeLists.txt | 1 + .../decoders/TiffDecoders/main.cpp | 1 + src/librawspeed/decoders/CMakeLists.txt | 2 + src/librawspeed/decoders/StiDecoder.cpp | 97 +++++++++++++++++++ src/librawspeed/decoders/StiDecoder.h | 48 +++++++++ src/librawspeed/parsers/TiffParser.cpp | 4 +- src/librawspeed/parsers/TiffParser.h | 2 +- 10 files changed, 173 insertions(+), 2 deletions(-) create mode 100644 src/librawspeed/decoders/StiDecoder.cpp create mode 100644 src/librawspeed/decoders/StiDecoder.h diff --git a/data/cameras.xml b/data/cameras.xml index 6f81d178f..988ba89f6 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -14359,6 +14359,24 @@ + + Sinar eVolution 75 + + GREEN + RED + BLUE + GREEN + + + + + + 16442 -2956 -2422 + -2877 12128 750 + -1136 6066 4559 + + + Sinar Hy6 diff --git a/data/cameras.xsd b/data/cameras.xsd index 25b0d4187..837db6e78 100644 --- a/data/cameras.xsd +++ b/data/cameras.xsd @@ -473,6 +473,7 @@ + diff --git a/fuzz/all-fuzzers.txt b/fuzz/all-fuzzers.txt index 764a06036..8830122d6 100644 --- a/fuzz/all-fuzzers.txt +++ b/fuzz/all-fuzzers.txt @@ -66,6 +66,7 @@ TiffDecoderFuzzer-OrfDecoder TiffDecoderFuzzer-PefDecoder TiffDecoderFuzzer-Rw2Decoder TiffDecoderFuzzer-SrwDecoder +TiffDecoderFuzzer-StiDecoder TiffDecoderFuzzer-ThreefrDecoder TiffParserFuzzer-GetDecoder TiffParserFuzzer-GetDecoder-Decode diff --git a/fuzz/librawspeed/decoders/TiffDecoders/CMakeLists.txt b/fuzz/librawspeed/decoders/TiffDecoders/CMakeLists.txt index 54122ff0b..fc7cb002f 100644 --- a/fuzz/librawspeed/decoders/TiffDecoders/CMakeLists.txt +++ b/fuzz/librawspeed/decoders/TiffDecoders/CMakeLists.txt @@ -32,6 +32,7 @@ set(DECODERS "PefDecoder" "Rw2Decoder" "SrwDecoder" + "StiDecoder" "ThreefrDecoder" ) diff --git a/fuzz/librawspeed/decoders/TiffDecoders/main.cpp b/fuzz/librawspeed/decoders/TiffDecoders/main.cpp index 5e1cc5c9d..dd09f952b 100644 --- a/fuzz/librawspeed/decoders/TiffDecoders/main.cpp +++ b/fuzz/librawspeed/decoders/TiffDecoders/main.cpp @@ -39,6 +39,7 @@ #include "decoders/RafDecoder.h" // IWYU pragma: keep #include "decoders/Rw2Decoder.h" // IWYU pragma: keep #include "decoders/SrwDecoder.h" // IWYU pragma: keep +#include "decoders/StiDecoder.h" // IWYU pragma: keep #include "decoders/ThreefrDecoder.h" // IWYU pragma: keep #include "io/Buffer.h" // for Buffer #include "metadata/CameraMetaData.h" // for CameraMetaData diff --git a/src/librawspeed/decoders/CMakeLists.txt b/src/librawspeed/decoders/CMakeLists.txt index 654116331..beb2ed1fd 100644 --- a/src/librawspeed/decoders/CMakeLists.txt +++ b/src/librawspeed/decoders/CMakeLists.txt @@ -44,6 +44,8 @@ FILE(GLOB SOURCES "SimpleTiffDecoder.h" "SrwDecoder.cpp" "SrwDecoder.h" + "StiDecoder.cpp" + "StiDecoder.h" "ThreefrDecoder.cpp" "ThreefrDecoder.h" ) diff --git a/src/librawspeed/decoders/StiDecoder.cpp b/src/librawspeed/decoders/StiDecoder.cpp new file mode 100644 index 000000000..02df2949b --- /dev/null +++ b/src/librawspeed/decoders/StiDecoder.cpp @@ -0,0 +1,97 @@ +/* + RawSpeed - RAW file decoder. + + Copyright (C) 2023 Roman Lebedev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "decoders/StiDecoder.h" +#include "adt/Point.h" // for iPoint2D +#include "decoders/RawDecoderException.h" // for ThrowException +#include "decompressors/HasselbladLJpegDecoder.h" // for HasselbladLJpegDec... +#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... +#include "io/Buffer.h" // for Buffer, DataBuffer +#include "io/ByteStream.h" // for ByteStream +#include "io/Endianness.h" // for Endianness, Endian... +#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor... +#include "tiff/TiffEntry.h" // for TiffEntry +#include "tiff/TiffIFD.h" // for TiffRootIFD, TiffIFD +#include "tiff/TiffTag.h" // for TiffTag, TiffTag::... +#include // for array +#include // for uint32_t +#include // for unique_ptr, allocator +#include // for operator==, string + +namespace rawspeed { + +class CameraMetaData; + +bool StiDecoder::isAppropriateDecoder(const TiffRootIFD* rootIFD, + [[maybe_unused]] Buffer file) { + const auto id = rootIFD->getID(); + const std::string& make = id.make; + + // FIXME: magic + + return make == "Sinar AG"; +} + +RawImage StiDecoder::decodeRawInternal() { + const auto* raw = mRootIFD->getIFDWithTag(TiffTag::TILEOFFSETS, 0); + uint32_t width = raw->getEntry(TiffTag::IMAGEWIDTH)->getU32(); + uint32_t height = raw->getEntry(TiffTag::IMAGELENGTH)->getU32(); + uint32_t compression = raw->getEntry(TiffTag::COMPRESSION)->getU32(); + + mRaw->dim = iPoint2D(width, height); + + if (1 != compression) + ThrowRDE("Unexpected compression type."); + + DecodeUncompressed(raw); + return mRaw; +} + +void StiDecoder::DecodeUncompressed(const TiffIFD* raw) const { + if (mRaw->getDataType() != RawImageType::UINT16) + ThrowRDE("Unexpected data type"); + + if (mRaw->getCpp() != 1 || mRaw->getBpp() != sizeof(uint16_t)) + ThrowRDE("Unexpected cpp: %u", mRaw->getCpp()); + + // FIXME: could be wrong. + if (!mRaw->dim.hasPositiveArea() || mRaw->dim.x % 2 != 0 || + mRaw->dim.y % 2 != 0 || mRaw->dim.x > 4992 || mRaw->dim.y > 6668) { + ThrowRDE("Unexpected image dimensions found: (%u; %u)", mRaw->dim.x, + mRaw->dim.y); + } + + uint32_t off = raw->getEntry(TiffTag::TILEOFFSETS)->getU32(); + uint32_t count = raw->getEntry(TiffTag::TILEBYTECOUNTS)->getU32(); + + const ByteStream bs( + DataBuffer(mFile.getSubView(off, count), Endianness::little)); + + UncompressedDecompressor u(bs, mRaw, iRectangle2D({0, 0}, mRaw->dim), + 2 * mRaw->dim.x, 16, BitOrder::MSB); + mRaw->createData(); + u.readUncompressedRaw(); +} + +void StiDecoder::decodeMetaDataInternal(const CameraMetaData* meta) { + setMetaData(meta, "", 0); +} + +} // namespace rawspeed diff --git a/src/librawspeed/decoders/StiDecoder.h b/src/librawspeed/decoders/StiDecoder.h new file mode 100644 index 000000000..4ec101f76 --- /dev/null +++ b/src/librawspeed/decoders/StiDecoder.h @@ -0,0 +1,48 @@ +/* + RawSpeed - RAW file decoder. + + Copyright (C) 2023 Roman Lebedev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include "common/RawImage.h" // for RawImage +#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder +#include "io/Buffer.h" // for Buffer +#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) +#include // for move + +namespace rawspeed { + +class Buffer; +class CameraMetaData; + +class StiDecoder final : public AbstractTiffDecoder { +public: + static bool isAppropriateDecoder(const TiffRootIFD* rootIFD, Buffer file); + StiDecoder(TiffRootIFDOwner&& root, Buffer file) + : AbstractTiffDecoder(std::move(root), file) {} + + RawImage decodeRawInternal() override; + void decodeMetaDataInternal(const CameraMetaData* meta) override; + +private: + [[nodiscard]] int getDecoderVersion() const override { return 0; } + void DecodeUncompressed(const TiffIFD* raw) const; +}; + +} // namespace rawspeed diff --git a/src/librawspeed/parsers/TiffParser.cpp b/src/librawspeed/parsers/TiffParser.cpp index 742892a62..17f1872ab 100644 --- a/src/librawspeed/parsers/TiffParser.cpp +++ b/src/librawspeed/parsers/TiffParser.cpp @@ -38,6 +38,7 @@ #include "decoders/PefDecoder.h" // for PefDecoder #include "decoders/Rw2Decoder.h" // for Rw2Decoder #include "decoders/SrwDecoder.h" // for SrwDecoder +#include "decoders/StiDecoder.h" // for StiDecoder #include "decoders/ThreefrDecoder.h" // for ThreefrDecoder #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream @@ -120,7 +121,7 @@ std::unique_ptr TiffParser::constructor(TiffRootIFDOwner&& root, } const std::array, - 16> + 17> TiffParser::Map = {{ DECODER(DngDecoder), DECODER(MosDecoder), @@ -137,6 +138,7 @@ const std::array, DECODER(DcsDecoder), DECODER(KdcDecoder), DECODER(ErfDecoder), + DECODER(StiDecoder), DECODER(ThreefrDecoder), }}; diff --git a/src/librawspeed/parsers/TiffParser.h b/src/librawspeed/parsers/TiffParser.h index dbca26c8f..ce4ab4f77 100644 --- a/src/librawspeed/parsers/TiffParser.h +++ b/src/librawspeed/parsers/TiffParser.h @@ -55,7 +55,7 @@ class TiffParser final : public RawParser { using checker_t = bool (*)(const TiffRootIFD* root, Buffer data); using constructor_t = std::unique_ptr (*)(TiffRootIFDOwner&& root, Buffer data); - static const std::array, 16> Map; + static const std::array, 17> Map; }; } // namespace rawspeed From dc11b9730699950b0b143c78cbdca2f1fca6c451 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Sun, 22 Oct 2023 05:41:18 +0300 Subject: [PATCH 09/40] Bump minimal LLVM/XCode versions While the guidelines say wait until macos 14 is available on github actions, as noted in https://github.com/darktable-org/darktable/pull/15442 homebrew is already soft-killing macos 11, so let's just do that now, thus requiring XCode 14.2. This means LLVM12/LLVM13 are no longer supported, too. --- .github/workflows/CI.yml | 10 +++------- cmake/compiler-versions.cmake | 32 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 108dc904d..99c98f719 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -43,8 +43,6 @@ jobs: - { distro: "debian:bookworm-slim", family: GNU, version: 12, CC: gcc-12, CXX: g++-12 } - { 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: @@ -182,8 +180,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: @@ -199,9 +197,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: diff --git a/cmake/compiler-versions.cmake b/cmake/compiler-versions.cmake index d6951d35d..0acdf78ce 100644 --- a/cmake/compiler-versions.cmake +++ b/cmake/compiler-versions.cmake @@ -17,16 +17,16 @@ # * and the newest one that is available in *both* the # debian stable *and* the latest ubuntu LTS # -# As of the time of writing (2023-03-14), the next (spring) darktable release -# will happen in 2023-06 ish. By that time: +# As of the time of writing (2023-10-22), the next (winter) darktable release +# will happen in 2023-12 ish. By that time: # * debian 12 (Bookworm) will have been released, # coming with gcc-12 and LLVM15 # * Ubuntu 22.04.1 LTS (Jammy Jellyfish) will be the newest LTS, # coming with gcc-12 and LLVM15 -# * macOS 11 (Big Sur) be the oldest supported macOS version, -# with the newest supported Xcode version being 13.2 (LLVM12-based !) +# * macOS 12 (Big Sur) be the oldest supported macOS version, +# with the newest supported Xcode version being 14.2 (LLVM14-based !) # -# Therefore, we require GCC12, macOS 11 + Xcode 13.2, and LLVM12. +# Therefore, we require GCC12, macOS 12 + Xcode 14.2, and LLVM14. # # The next+1 (fall) darktable release will happen 2023-12 ish, # and by that time, macOS 11 will have EOL'd on 2023-10 ish, @@ -41,21 +41,21 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_L message(SEND_ERROR "GNU C++ compiler version ${CMAKE_CXX_COMPILER_VERSION} is too old and is unsupported. Version 12+ is required.") endif() -if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 12) - message(SEND_ERROR "LLVM Clang C compiler version ${CMAKE_C_COMPILER_VERSION} is too old and is unsupported. Version 12+ is required.") +if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 14) + message(SEND_ERROR "LLVM Clang C compiler version ${CMAKE_C_COMPILER_VERSION} is too old and is unsupported. Version 14+ is required.") endif() -if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12) - message(SEND_ERROR "LLVM Clang C++ compiler version ${CMAKE_CXX_COMPILER_VERSION} is too old and is unsupported. Version 12+ is required.") +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14) + message(SEND_ERROR "LLVM Clang C++ compiler version ${CMAKE_CXX_COMPILER_VERSION} is too old and is unsupported. Version 14+ is required.") endif() -# XCode 13.2 (apple clang 1300.0.29.3) is based on LLVM12 -if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 13.0.0.13000029) - message(SEND_ERROR "XCode (Apple clang) C compiler version ${CMAKE_C_COMPILER_VERSION} is too old and is unsupported. XCode version 13.2+ is required.") +# XCode 14.2 (apple clang 1400.0.29.202) is based on LLVM14 +if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 14.0.0.14000029) + message(SEND_ERROR "XCode (Apple clang) C compiler version ${CMAKE_C_COMPILER_VERSION} is too old and is unsupported. XCode version 14.2+ is required.") endif() -if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0.0.13000029) - message(SEND_ERROR "XCode (Apple clang) C++ compiler version ${CMAKE_CXX_COMPILER_VERSION} is too old and is unsupported. XCode version 13.2+ is required.") +if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0.0.14000029) + message(SEND_ERROR "XCode (Apple clang) C++ compiler version ${CMAKE_CXX_COMPILER_VERSION} is too old and is unsupported. XCode version 14.2+ is required.") endif() -if(CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 11.3) - message(SEND_ERROR "Targeting OSX version ${CMAKE_OSX_DEPLOYMENT_TARGET} older than 11.3 is unsupported.") +if(CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 12.5) + message(SEND_ERROR "Targeting OSX version ${CMAKE_OSX_DEPLOYMENT_TARGET} older than 12.5 is unsupported.") endif() From ea7ac9a7629ba6d3c83ae8458af540dd1999f9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Mon, 23 Oct 2023 10:01:41 +0200 Subject: [PATCH 10/40] OM System TG-7 support --- data/cameras.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 6f81d178f..f282d6fc0 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -7468,6 +7468,24 @@ + + OM Digital Solutions TG-7 + + GREEN + RED + BLUE + GREEN + + + + + + 10899 -3833 -1082 + -2112 10736 1575 + -267 1452 5269 + + + Panasonic DMC-CM1 From f3b69c6c3524c77cfc75e607bd1d3651405eb916 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Tue, 24 Oct 2023 01:46:04 +0300 Subject: [PATCH 11/40] Fix OBS GCC14(?) build ``` [ 34s] /home/abuild/rpmbuild/BUILD/rawspeed-v3.5~git1290.8ffc638/src/librawspeed/io/FileReader.cpp:56:59: error: ignoring attributes on template argument 'int (*)(FILE*)' [-Werror=ignored-attributes] [ 34s] 56 | using file_ptr = std::unique_ptr; [ 34s] | ^ ``` ``` [ 89s] /home/abuild/rpmbuild/BUILD/rawspeed-v3.5~git1291.32200db/src/utilities/rstest/rstest.cpp:250:57: error: ignoring attributes on template argument 'int (*)(FILE*)' [-Werror=ignored-attributes] [ 89s] 250 | using file_ptr = std::unique_ptr; [ 89s] | ^ ``` --- src/librawspeed/io/FileReader.cpp | 5 +++-- src/utilities/rstest/rstest.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/librawspeed/io/FileReader.cpp b/src/librawspeed/io/FileReader.cpp index 2385a8097..a199f8055 100644 --- a/src/librawspeed/io/FileReader.cpp +++ b/src/librawspeed/io/FileReader.cpp @@ -53,8 +53,9 @@ FileReader::readFile() { size_t fileSize = 0; #if defined(__unix__) || defined(__APPLE__) - using file_ptr = std::unique_ptr; - file_ptr file(fopen(fileName, "rb"), &fclose); + auto fclose = [](std::FILE* fp) { std::fclose(fp); }; + using file_ptr = std::unique_ptr; + file_ptr file(fopen(fileName, "rb"), fclose); if (file == nullptr) ThrowFIE("Could not open file \"%s\".", fileName); diff --git a/src/utilities/rstest/rstest.cpp b/src/utilities/rstest/rstest.cpp index adb9290da..3c5ecd004 100644 --- a/src/utilities/rstest/rstest.cpp +++ b/src/utilities/rstest/rstest.cpp @@ -247,10 +247,11 @@ std::string img_hash(const RawImage& r, bool noSamples) { return oss.str(); } -using file_ptr = std::unique_ptr; +auto fclose = [](std::FILE* fp) { std::fclose(fp); }; +using file_ptr = std::unique_ptr; void writePPM(const RawImage& raw, const std::string& fn) { - file_ptr f(fopen((fn + ".ppm").c_str(), "wb"), &fclose); + file_ptr f(fopen((fn + ".ppm").c_str(), "wb"), fclose); const iPoint2D dimUncropped = raw->getUncroppedDim(); int width = dimUncropped.x; @@ -274,7 +275,7 @@ void writePPM(const RawImage& raw, const std::string& fn) { } void writePFM(const RawImage& raw, const std::string& fn) { - file_ptr f(fopen((fn + ".pfm").c_str(), "wb"), &fclose); + file_ptr f(fopen((fn + ".pfm").c_str(), "wb"), fclose); const iPoint2D dimUncropped = raw->getUncroppedDim(); int width = dimUncropped.x; From 010ad11f8a10e57e521169b1649e2dafe290b8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Thu, 26 Oct 2023 10:09:48 +0200 Subject: [PATCH 12/40] Sigma fp name normalisation --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 988ba89f6..0f4295331 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17688,6 +17688,9 @@ Sigma DP1 Merrill + + SIGMA fp + sd Quattro From 81afbf8cd1409cb26364b51458555a25fb8894ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Thu, 26 Oct 2023 09:39:49 +0200 Subject: [PATCH 13/40] Sigma fp L name normalisation --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 0f4295331..07789bcaf 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17691,6 +17691,9 @@ SIGMA fp + + SIGMA fp L + sd Quattro From f25cd44dd35e0da9624dd4dcc4a32b4e289c026f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 27 Oct 2023 10:02:52 +0200 Subject: [PATCH 14/40] Add missing Panasonic ZS200 aliases --- data/cameras.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 07789bcaf..54ba2a938 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -11707,7 +11707,14 @@ DC-TZ200 + DC-TZ200D + DC-TZ202D + DC-TZ220 + DC-TZ220D DC-ZS200 + DC-ZS200D + DC-ZS220 + DC-ZS220D From 81ec2489af6e708d6cd73c68de96597d33f3bc6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= <4973094+kmilos@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:30:27 +0200 Subject: [PATCH 15/40] Add Leica M11-P name normalisation --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 54ba2a938..67a11f78f 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17544,6 +17544,9 @@ LEICA M11 Monochrom + + LEICA M11-P + LEICA M (Typ 240) From 953f41ceb89ef45ba3102365abe05dd18bdab9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 27 Oct 2023 15:41:27 +0200 Subject: [PATCH 16/40] Leica M10-P name normalisation --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 54ba2a938..a30172c79 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17538,6 +17538,9 @@ LEICA M10 MONOCHROM + + LEICA M10-P + LEICA M11 From 74728341665a5958d0df4de3384c1fa760fc4ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 27 Oct 2023 15:46:12 +0200 Subject: [PATCH 17/40] Leica M10-R name normalisation --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index a30172c79..24e086752 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17541,6 +17541,9 @@ LEICA M10-P + + LEICA M10-R + LEICA M11 From ccfed7656114680ce618daa26e422a5416cad811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 27 Oct 2023 15:53:04 +0200 Subject: [PATCH 18/40] Leica M10-D name normalisation --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 24e086752..04f462add 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17538,6 +17538,9 @@ LEICA M10 MONOCHROM + + LEICA M10-D + LEICA M10-P From 55a713fa84ac234267d2fe0a3326f66072750c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 27 Oct 2023 17:48:57 +0200 Subject: [PATCH 19/40] Leica SL2 name normalisation --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 4303589d4..7c8ded410 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17584,6 +17584,9 @@ LEICA SL (Typ 601) + + LEICA SL2 + LEICA CL From 7effb48b69e093bacefa17844d7a6a63e95a5a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 27 Oct 2023 17:49:13 +0200 Subject: [PATCH 20/40] Leica SL2-S name normalisation --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 7c8ded410..92967bf11 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17587,6 +17587,9 @@ LEICA SL2 + + LEICA SL2-S + LEICA CL From c8a6aef692bdd5ecf3691204c42ff0a0dc264c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 27 Oct 2023 18:22:32 +0200 Subject: [PATCH 21/40] Leica Q2 Monochrom name normalisation --- data/cameras.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index 4303589d4..66a8d231e 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -17578,6 +17578,9 @@ LEICA Q2 + + LEICA Q2 MONO + LEICA Q3 From 8920175d3f02d8ce26617ce1a4f2063fca14fcb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Wed, 20 Sep 2023 10:41:45 +0200 Subject: [PATCH 22/40] Nikon Z f support --- data/cameras.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index e90d1b8f7..93b58a0ec 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -4391,6 +4391,24 @@ + + Nikon Z f + + RED + GREEN + GREEN + BLUE + + + + + + 11607 -4491 -977 + -4522 12460 2304 + -458 1519 7616 + + + Nikon Z 30 From 1fa17aede48c891c2d11bbf088f8d10dc9fe5646 Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Mon, 30 Oct 2023 16:56:32 +0100 Subject: [PATCH 23/40] Samsung EK-GN120: fix color table --- data/cameras.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/cameras.xml b/data/cameras.xml index e90d1b8f7..f5c3d7428 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -12742,12 +12742,12 @@ - + Samsung EK-GN120 GREEN - BLUE - RED + RED + BLUE GREEN From 103ce63720793d5048d820db73ce9d224d6ab42c Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Mon, 30 Oct 2023 16:56:52 +0100 Subject: [PATCH 24/40] Samsung EK-GN120: normalize name --- data/cameras.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/cameras.xml b/data/cameras.xml index f5c3d7428..f93ef51bf 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -12743,7 +12743,7 @@ - Samsung EK-GN120 + Samsung Galaxy NX GREEN RED From edd7cee3d37718282b7c16a288daf3c6ec0269e3 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 01:17:29 +0300 Subject: [PATCH 25/40] [CI] Add LLVM17 --- .github/workflows/CI-linux.yml | 13 +++++-------- .github/workflows/CI.yml | 11 ++++++----- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI-linux.yml b/.github/workflows/CI-linux.yml index 2e4319f2f..4b0415724 100644 --- a/.github/workflows/CI-linux.yml +++ b/.github/workflows/CI-linux.yml @@ -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 < /dev/null < /dev/null < Date: Thu, 2 Nov 2023 10:55:22 +0100 Subject: [PATCH 26/40] Pentax KF support --- data/cameras.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/data/cameras.xml b/data/cameras.xml index a132c3cea..06fc6e9a8 100644 --- a/data/cameras.xml +++ b/data/cameras.xml @@ -12307,6 +12307,24 @@ + + PENTAX KF + + RED + GREEN + GREEN + BLUE + + + + + + 8113 -2078 -1275 + -4359 12953 1514 + -1091 1955 6044 + + + Pentax KP From 773e85f53a56842b42e9f5fad91367c38214f0cd Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 03:10:55 +0300 Subject: [PATCH 27/40] Apply clang-tidy-17's `misc-include-cleaner` --- .../DefaultInitAllocatorAdaptorBenchmark.cpp | 5 +- bench/librawspeed/bench/Common.cpp | 1 + .../DeflateDecompressorBenchmark.cpp | 6 +- .../UncompressedDecompressorBenchmark.cpp | 1 - .../Cr2sRawInterpolatorBenchmark.cpp | 1 - bench/librawspeed/io/BitStreamBenchmark.cpp | 16 ++++-- .../codes/PrefixCodeDecoder/Dual.cpp | 5 -- .../codes/PrefixCodeDecoder/Solo.cpp | 4 -- .../decompressors/Cr2Decompressor.cpp | 24 ++++---- .../decompressors/Cr2LJpegDecoder.cpp | 15 ++--- .../decompressors/HasselbladDecompressor.cpp | 2 - .../decompressors/LJpegDecompressor.cpp | 9 ++- .../decompressors/PanasonicV5Decompressor.cpp | 3 +- .../decompressors/PentaxDecompressor.cpp | 1 + .../decompressors/PhaseOneDecompressor.cpp | 1 + .../UncompressedDecompressor.cpp | 4 +- fuzz/librawspeed/fuzz/Common.cpp | 3 +- fuzz/librawspeed/parsers/main.cpp | 1 - src/librawspeed/common/ChecksumFile.cpp | 1 - src/librawspeed/common/DngOpcodes.cpp | 17 +++--- src/librawspeed/common/ErrorLog.cpp | 4 +- src/librawspeed/common/RawImage.cpp | 19 +++++-- src/librawspeed/common/RawImageDataFloat.cpp | 2 - src/librawspeed/common/RawImageDataU16.cpp | 2 - src/librawspeed/common/TableLookUp.cpp | 9 ++- .../decoders/AbstractTiffDecoder.cpp | 5 +- src/librawspeed/decoders/ArwDecoder.cpp | 21 ++++--- src/librawspeed/decoders/Cr2Decoder.cpp | 20 ++++--- src/librawspeed/decoders/CrwDecoder.cpp | 17 +++--- src/librawspeed/decoders/DcrDecoder.cpp | 7 ++- src/librawspeed/decoders/DcsDecoder.cpp | 8 ++- src/librawspeed/decoders/DngDecoder.cpp | 27 +++++---- src/librawspeed/decoders/ErfDecoder.cpp | 8 ++- src/librawspeed/decoders/IiqDecoder.cpp | 25 +++++---- src/librawspeed/decoders/KdcDecoder.cpp | 7 ++- src/librawspeed/decoders/MefDecoder.cpp | 11 ++-- src/librawspeed/decoders/MosDecoder.cpp | 12 ++-- src/librawspeed/decoders/MrwDecoder.cpp | 13 +++-- src/librawspeed/decoders/NakedDecoder.cpp | 6 +- src/librawspeed/decoders/NefDecoder.cpp | 21 ++++--- src/librawspeed/decoders/OrfDecoder.cpp | 14 +++-- src/librawspeed/decoders/PefDecoder.cpp | 5 +- src/librawspeed/decoders/RafDecoder.cpp | 10 ++-- src/librawspeed/decoders/RawDecoder.cpp | 15 +++-- src/librawspeed/decoders/Rw2Decoder.cpp | 5 +- src/librawspeed/decoders/StiDecoder.cpp | 6 +- src/librawspeed/decoders/ThreefrDecoder.cpp | 4 +- .../decompressors/AbstractDngDecompressor.cpp | 9 +-- .../decompressors/AbstractLJpegDecoder.cpp | 23 ++++---- .../decompressors/Cr2LJpegDecoder.cpp | 19 ++++--- .../decompressors/CrwDecompressor.cpp | 12 ++-- .../decompressors/DeflateDecompressor.cpp | 9 ++- .../decompressors/FujiDecompressor.cpp | 26 ++++----- .../decompressors/HasselbladDecompressor.cpp | 9 +-- .../decompressors/HasselbladLJpegDecoder.cpp | 7 ++- .../decompressors/JpegDecompressor.cpp | 1 + .../decompressors/KodakDecompressor.cpp | 4 ++ .../decompressors/LJpegDecoder.cpp | 15 ++--- .../decompressors/LJpegDecompressor.cpp | 15 +++-- .../decompressors/NikonDecompressor.cpp | 13 +++-- .../decompressors/OlympusDecompressor.cpp | 7 ++- .../decompressors/PanasonicV4Decompressor.cpp | 18 +++--- .../decompressors/PanasonicV5Decompressor.cpp | 16 +++--- .../decompressors/PanasonicV6Decompressor.cpp | 7 ++- .../decompressors/PanasonicV7Decompressor.cpp | 5 +- .../decompressors/PentaxDecompressor.cpp | 12 ++-- .../decompressors/PhaseOneDecompressor.cpp | 1 - .../decompressors/SamsungV0Decompressor.cpp | 19 ++++--- .../decompressors/SamsungV1Decompressor.cpp | 10 ++-- .../decompressors/SamsungV2Decompressor.cpp | 13 +++-- .../decompressors/SonyArw1Decompressor.cpp | 3 +- .../decompressors/SonyArw2Decompressor.cpp | 7 ++- .../UncompressedDecompressor.cpp | 14 +++-- .../decompressors/VC5Decompressor.cpp | 40 ++++++++----- src/librawspeed/io/BitStream.cpp | 2 - src/librawspeed/io/FileReader.cpp | 3 +- src/librawspeed/io/FileWriter.cpp | 3 +- src/librawspeed/metadata/Camera.cpp | 20 ++++--- src/librawspeed/metadata/CameraMetaData.cpp | 13 +++-- src/librawspeed/metadata/CameraSensorInfo.cpp | 1 + src/librawspeed/metadata/ColorFilterArray.cpp | 14 +++-- src/librawspeed/parsers/CiffParser.cpp | 15 ++--- src/librawspeed/parsers/RawParser.cpp | 1 + src/librawspeed/parsers/TiffParser.cpp | 56 ++++++++++--------- src/librawspeed/tiff/CiffEntry.cpp | 8 ++- src/librawspeed/tiff/CiffIFD.cpp | 19 ++++--- src/librawspeed/tiff/TiffEntry.cpp | 16 ++++-- src/librawspeed/tiff/TiffIFD.cpp | 24 ++++---- src/utilities/rsbench/main.cpp | 1 - src/utilities/rstest/md5.cpp | 1 + src/utilities/rstest/rstest.cpp | 2 - 91 files changed, 541 insertions(+), 415 deletions(-) diff --git a/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp b/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp index 689af364c..b9dfc1780 100644 --- a/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp +++ b/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp @@ -22,8 +22,9 @@ #include "bench/Common.h" // for benchmarkDryRun #include // for byte #include // for map<>::mapped_type -#include // for allocator, vector -#include // for State, Benchmark, BENCH... +#include +#include // for allocator, vector +#include // for State, Benchmark, BENCH... using Type = std::byte; diff --git a/bench/librawspeed/bench/Common.cpp b/bench/librawspeed/bench/Common.cpp index 70619fee1..0c4473075 100644 --- a/bench/librawspeed/bench/Common.cpp +++ b/bench/librawspeed/bench/Common.cpp @@ -18,6 +18,7 @@ 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 diff --git a/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp b/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp index c10b42462..4a1de06d9 100644 --- a/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp +++ b/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp @@ -24,15 +24,15 @@ #include "common/Common.h" // for isAligned #include "common/RawImage.h" // for RawImage, RawImageData #include "io/Buffer.h" // for Buffer -#include // for fill_n #include // for assert #include // for size_t #include // for uint8_t #include // for unique_ptr #include // for integral_constant #include // for vector -#include // for compress, compressBound -#include // for State, Benchmark, BEN... +#include +#include // for compress, compressBound +#include // for State, Benchmark, BEN... #ifndef NDEBUG #include // for numeric_limits diff --git a/bench/librawspeed/decompressors/UncompressedDecompressorBenchmark.cpp b/bench/librawspeed/decompressors/UncompressedDecompressorBenchmark.cpp index f8ee9b1d2..df2952453 100644 --- a/bench/librawspeed/decompressors/UncompressedDecompressorBenchmark.cpp +++ b/bench/librawspeed/decompressors/UncompressedDecompressorBenchmark.cpp @@ -26,7 +26,6 @@ #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endi... -#include // for fill_n #include // for assert #include // for size_t #include // for uint16_t, uint8_t diff --git a/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp b/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp index 5da37b416..2221f1c98 100644 --- a/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp +++ b/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp @@ -26,7 +26,6 @@ #include "common/RawImage.h" // for RawImage, RawImageData #include // for array #include // for uint16_t -#include // for array #include // for integral_constant #include // for State, Benchmark, Cou... diff --git a/bench/librawspeed/io/BitStreamBenchmark.cpp b/bench/librawspeed/io/BitStreamBenchmark.cpp index 686e6c6e4..cc9e6e352 100644 --- a/bench/librawspeed/io/BitStreamBenchmark.cpp +++ b/bench/librawspeed/io/BitStreamBenchmark.cpp @@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "io/BitStream.h" // for BitStream #include "bench/Common.h" // for benchmarkDryRun #include "io/BitPumpJPEG.h" // for BitPumpJPEG, BitStream<>::fillCache #include "io/BitPumpLSB.h" // for BitPumpLSB, BitStream<>::fillCache @@ -28,14 +27,21 @@ #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endianness::unknown -#include // for fill_n #include // for assert #include // for size_t -#include // for uint8_t -#include // for string, to_string, allocator -#include // for vector #include // for State, Benchmark, Initialize, RunSp... +#ifndef DEBUG +#include // for uint8_t +#include // for string, to_string, allocator +#include // for vector +#endif + +#ifdef DEBUG +#include "common/Common.h" +#include +#endif + using rawspeed::BitPumpJPEG; using rawspeed::BitPumpLSB; using rawspeed::BitPumpMSB; diff --git a/fuzz/librawspeed/codes/PrefixCodeDecoder/Dual.cpp b/fuzz/librawspeed/codes/PrefixCodeDecoder/Dual.cpp index c96d89e7c..7ad1c6928 100644 --- a/fuzz/librawspeed/codes/PrefixCodeDecoder/Dual.cpp +++ b/fuzz/librawspeed/codes/PrefixCodeDecoder/Dual.cpp @@ -25,7 +25,6 @@ #error IMPL1 must be defined to one of rawspeeds huffman table implementations #endif -#include "codes/BinaryPrefixTree.h" // for BinaryPrefixTree<>::... #include "codes/PrefixCodeDecoder.h" // IWYU pragma: keep #include "codes/PrefixCodeDecoder/Common.h" // for createPrefixCodeDecoder #include "codes/PrefixCodeLUTDecoder.h" // IWYU pragma: keep @@ -39,13 +38,9 @@ #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endiannes... #include "io/IOException.h" // for RawspeedException -#include // for generate_n, max #include // for assert #include // for uint8_t #include // for size_t -#include // for initializer_list -#include // for optional -#include // for vector namespace rawspeed { struct BaselineCodeTag; diff --git a/fuzz/librawspeed/codes/PrefixCodeDecoder/Solo.cpp b/fuzz/librawspeed/codes/PrefixCodeDecoder/Solo.cpp index 0000a8f38..7459eb570 100644 --- a/fuzz/librawspeed/codes/PrefixCodeDecoder/Solo.cpp +++ b/fuzz/librawspeed/codes/PrefixCodeDecoder/Solo.cpp @@ -22,7 +22,6 @@ #error IMPL must be defined to one of rawspeeds huffman table implementations #endif -#include "codes/BinaryPrefixTree.h" // for BinaryPrefixTree<>::... #include "codes/PrefixCodeDecoder.h" // IWYU pragma: keep #include "codes/PrefixCodeDecoder/Common.h" // for createPrefixCodeDecoder #include "codes/PrefixCodeLUTDecoder.h" // IWYU pragma: keep @@ -36,12 +35,9 @@ #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endiannes... -#include // for generate_n #include // for assert #include // for uint8_t #include // for size_t -#include // for initializer_list -#include // for vector namespace rawspeed { struct BaselineCodeTag; diff --git a/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp b/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp index 1e6f73dc9..7442edf61 100644 --- a/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp @@ -18,26 +18,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "adt/Point.h" +#include +#include +#include #ifndef PrefixCodeDecoderImpl #error PrefixCodeDecoderImpl must be defined to one of rawspeeds huffman tables #endif -#include "decompressors/Cr2Decompressor.h" #include "MemorySanitizer.h" // for MSan #include "codes/DummyPrefixCodeDecoder.h" // for DummyPrefixCodeDecoder -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder #include "codes/PrefixCodeDecoder/Common.h" // for createPrefixCodeDecoder #include "common/RawImage.h" // for RawImage, RawImageData #include "common/RawspeedException.h" // for ThrowException, Rawsp... -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endiannes... -#include // for generate_n, copy -#include // for assert -#include // for uint16_t, uint8_t -#include // for initializer_list -#include // for back_insert_iterator +#include "decompressors/Cr2Decompressor.h" +#include "fuzz/Common.h" // for CreateRawImage +#include "io/Buffer.h" // for Buffer, DataBuffer +#include "io/ByteStream.h" // for ByteStream +#include "io/Endianness.h" // for Endianness, Endiannes... +#include // for generate_n, copy +#include // for assert +#include // for uint16_t, uint8_t +#include // for back_insert_iterator #ifdef WITH_DummyPrefixCodeDecoder #include "decompressors/Cr2DecompressorImpl.h" // for Cr2Decompressor::Cr2D... diff --git a/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp b/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp index c80aedd96..e25db273f 100644 --- a/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp +++ b/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp @@ -22,13 +22,14 @@ #include "MemorySanitizer.h" // for MSan #include "common/RawImage.h" // for RawImage, RawImageData #include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint8_t, uint16_t -#include // for size_t +#include "decompressors/Cr2Decompressor.h" +#include "fuzz/Common.h" // for CreateRawImage +#include "io/Buffer.h" // for Buffer, DataBuffer +#include "io/ByteStream.h" // for ByteStream +#include "io/Endianness.h" // for Endianness, Endianness::little +#include // for assert +#include // for uint8_t, uint16_t +#include // for size_t extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp b/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp index 008258efa..e4640ff4e 100644 --- a/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp @@ -28,11 +28,9 @@ #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endianness::little -#include // for fill, copy, fill_n, generate_n #include // for assert #include // for size_t #include // for uint16_t, uint8_t -#include // for vector extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp b/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp index 4f5395e00..554e4dd0f 100644 --- a/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp @@ -19,7 +19,8 @@ */ #include "decompressors/LJpegDecompressor.h" -#include "MemorySanitizer.h" // for MSan +#include "MemorySanitizer.h" // for MSan +#include "adt/Point.h" #include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder #include "codes/PrefixCodeDecoder/Common.h" // for createPrefixCodeDecoder #include "common/RawImage.h" // for RawImage, RawImageData @@ -30,8 +31,10 @@ #include "io/Endianness.h" // for Endianness, Endianness::little #include // for generate_n, copy, fill, fill_n #include // for assert -#include // for uint16_t, uint8_t -#include // for back_insert_iterator, back_i... +#include +#include // for uint16_t, uint8_t +#include // for back_insert_iterator, back_i... +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp b/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp index 9801ce8f2..8420336c6 100644 --- a/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp @@ -27,7 +27,8 @@ #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endianness::little #include // for assert -#include // for uint32_t, uint8_t +#include +#include // for uint32_t, uint8_t extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp b/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp index 4010b0b9c..d37e41be9 100644 --- a/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp @@ -29,6 +29,7 @@ #include // for assert #include // for uint32_t, uint8_t #include // for size_t +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp b/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp index 3b822ec3e..f5fbd679e 100644 --- a/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp @@ -32,6 +32,7 @@ #include // for size_t #include // for back_insert_iterator, back_ins... #include // for move +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp b/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp index b10bb6600..96ab6c35f 100644 --- a/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp @@ -19,7 +19,9 @@ */ #include "decompressors/UncompressedDecompressor.h" -#include "MemorySanitizer.h" // for MSan +#include "MemorySanitizer.h" // for MSan +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" // for RawImage, RawImageData #include "common/RawspeedException.h" // for ThrowException, RawspeedException #include "fuzz/Common.h" // for CreateRawImage diff --git a/fuzz/librawspeed/fuzz/Common.cpp b/fuzz/librawspeed/fuzz/Common.cpp index cc9000cd9..ab09d2781 100644 --- a/fuzz/librawspeed/fuzz/Common.cpp +++ b/fuzz/librawspeed/fuzz/Common.cpp @@ -23,7 +23,8 @@ #include "common/RawImage.h" // for RawImage, RawImageData, RawImageType #include "io/ByteStream.h" // for ByteStream #include "io/IOException.h" // for ThrowException, ThrowRSE, ThrowIOE -#include // for uint32_t, int32_t +#include "metadata/ColorFilterArray.h" +#include // for uint32_t, int32_t rawspeed::RawImage CreateRawImage(rawspeed::ByteStream& bs) { const uint32_t width = bs.getU32(); diff --git a/fuzz/librawspeed/parsers/main.cpp b/fuzz/librawspeed/parsers/main.cpp index 0bb57eefc..9f9223487 100644 --- a/fuzz/librawspeed/parsers/main.cpp +++ b/fuzz/librawspeed/parsers/main.cpp @@ -42,7 +42,6 @@ #include // for size_t #if GETDECODER -#include "decoders/RawDecoder.h" // for RawDecoder #include "decoders/RawDecoderException.h" // for RawDecoderException #if DECODE #include "common/RawspeedException.h" // for RawspeedException diff --git a/src/librawspeed/common/ChecksumFile.cpp b/src/librawspeed/common/ChecksumFile.cpp index 0db066b96..c1f1dff20 100644 --- a/src/librawspeed/common/ChecksumFile.cpp +++ b/src/librawspeed/common/ChecksumFile.cpp @@ -24,7 +24,6 @@ #include "io/FileReader.h" // for FileReader #include // for assert #include // for string, allocator, operator+ -#include // for add_const<>::type #include // for vector namespace rawspeed { diff --git a/src/librawspeed/common/DngOpcodes.cpp b/src/librawspeed/common/DngOpcodes.cpp index 82f33aca4..e6cd4be70 100644 --- a/src/librawspeed/common/DngOpcodes.cpp +++ b/src/librawspeed/common/DngOpcodes.cpp @@ -22,7 +22,6 @@ #include "rawspeedconfig.h" // for RAWSPEED_READONLY #include "common/DngOpcodes.h" -#include "adt/CroppedArray1DRef.h" // for CroppedArray1DRef #include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef #include "adt/Mutex.h" // for MutexLocker #include "adt/Point.h" // for iRectangle2D, iPoint2D @@ -34,12 +33,16 @@ #include // for generate_n, clamp, fill_n #include // for assert #include // for isfinite, pow -#include // for abs -#include // for initializer_list -#include // for back_insert_iterator, back... -#include // for numeric_limits -#include // for optional, nullopt -#include // for tie, tuple +#include +#include // for abs +#include // for back_insert_iterator, back... +#include // for numeric_limits +#include +#include // for optional, nullopt +#include // for tie, tuple +#include +#include +#include // IWYU pragma: no_include // IWYU pragma: no_include diff --git a/src/librawspeed/common/ErrorLog.cpp b/src/librawspeed/common/ErrorLog.cpp index d48379b0a..263d4858e 100644 --- a/src/librawspeed/common/ErrorLog.cpp +++ b/src/librawspeed/common/ErrorLog.cpp @@ -20,7 +20,9 @@ #include "ErrorLog.h" #include "adt/Mutex.h" // for MutexLocker -#include // for move +#include +#include // for move +#include namespace rawspeed { diff --git a/src/librawspeed/common/RawImage.cpp b/src/librawspeed/common/RawImage.cpp index 6facf0e42..aaa12af03 100644 --- a/src/librawspeed/common/RawImage.cpp +++ b/src/librawspeed/common/RawImage.cpp @@ -20,15 +20,26 @@ #include "rawspeedconfig.h" // for RAWSPEED_READONLY, HAVE_OP... #include "common/RawImage.h" -#include "adt/CroppedArray1DRef.h" // for CroppedArray1DRef +#include "adt/CroppedArray2DRef.h" +#include "adt/Mutex.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/TableLookUp.h" #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "io/IOException.h" // for IOException #include "parsers/TiffParserException.h" // for TiffParserException #include // for min, fill, max, fill_n #include // for assert -#include // for numeric_limits -#include // for allocator, unique_ptr, mak... -#include // for move, swap +#include +#include +#include // for numeric_limits +#include // for allocator, unique_ptr, mak... +#include // for move, swap +#include + +#ifdef DEBUG +#include "adt/Array2DRef.h" +#endif #if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) #include "AddressSanitizer.h" // for ASan::... diff --git a/src/librawspeed/common/RawImageDataFloat.cpp b/src/librawspeed/common/RawImageDataFloat.cpp index 433fa7961..f285bf91a 100644 --- a/src/librawspeed/common/RawImageDataFloat.cpp +++ b/src/librawspeed/common/RawImageDataFloat.cpp @@ -20,7 +20,6 @@ #include "common/RawImage.h" // for RawImageDataFloat, RawImag... #include "adt/Array2DRef.h" // for Array2DRef -#include "adt/CroppedArray1DRef.h" // for CroppedArray1DRef #include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef #include "adt/Point.h" // for iPoint2D #include "common/Common.h" // for writeLog, DEBUG_PRIO, DEBU... @@ -29,7 +28,6 @@ #include // for fill_n, max, min #include // for array #include // for uint32_t, uint8_t, uint16_t -#include // for operator==, default_delete #include // for vector using std::max; diff --git a/src/librawspeed/common/RawImageDataU16.cpp b/src/librawspeed/common/RawImageDataU16.cpp index 334f41ef7..ce1c63512 100644 --- a/src/librawspeed/common/RawImageDataU16.cpp +++ b/src/librawspeed/common/RawImageDataU16.cpp @@ -21,7 +21,6 @@ #include "rawspeedconfig.h" // for WITH_SSE2 #include "common/RawImage.h" // for RawImageDataU16, RawImageType #include "adt/Array2DRef.h" // for Array2DRef -#include "adt/CroppedArray1DRef.h" // for CroppedArray1DRef #include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef #include "adt/Point.h" // for iPoint2D #include "common/Common.h" // for clampBits, roundDown, writ... @@ -32,7 +31,6 @@ #include // for array #include // for uint16_t, uint32_t, uint8_t #include // for unique_ptr -#include // for array #include // for vector #ifdef WITH_SSE2 diff --git a/src/librawspeed/common/TableLookUp.cpp b/src/librawspeed/common/TableLookUp.cpp index 752feb4a5..997409d92 100644 --- a/src/librawspeed/common/TableLookUp.cpp +++ b/src/librawspeed/common/TableLookUp.cpp @@ -20,11 +20,14 @@ */ #include "common/TableLookUp.h" +#include "adt/Invariant.h" #include "common/Common.h" // for clampBits #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include // for assert -#include // for uint16_t -#include // for numeric_limits +#include +#include // for assert +#include // for uint16_t +#include // for numeric_limits +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/AbstractTiffDecoder.cpp b/src/librawspeed/decoders/AbstractTiffDecoder.cpp index f88ce3699..baca9e41f 100644 --- a/src/librawspeed/decoders/AbstractTiffDecoder.cpp +++ b/src/librawspeed/decoders/AbstractTiffDecoder.cpp @@ -22,8 +22,9 @@ #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "tiff/TiffEntry.h" // for TiffEntry #include "tiff/TiffIFD.h" // for TiffIFD, TiffRootIFD, Tiff... -#include // for uint32_t -#include // for vector +#include "tiff/TiffTag.h" +#include // for uint32_t +#include // for vector namespace rawspeed { diff --git a/src/librawspeed/decoders/ArwDecoder.cpp b/src/librawspeed/decoders/ArwDecoder.cpp index a1ed2b11a..8a5817dbb 100644 --- a/src/librawspeed/decoders/ArwDecoder.cpp +++ b/src/librawspeed/decoders/ArwDecoder.cpp @@ -20,10 +20,13 @@ */ #include "decoders/ArwDecoder.h" -#include "MemorySanitizer.h" // for MSan -#include "adt/NORangesSet.h" // for NORangesSet -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for roundDown +#include "MemorySanitizer.h" // for MSan +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/NORangesSet.h" // for NORangesSet +#include "adt/Point.h" // for iPoint2D +#include "common/Common.h" // for roundDown +#include "common/RawImage.h" #include "common/RawspeedException.h" // for RawspeedException #include "decoders/RawDecoderException.h" // for ThrowRDE #include "decompressors/LJpegDecoder.h" // for LJpegDecoder @@ -38,13 +41,13 @@ #include "tiff/TiffEntry.h" // for TiffEntry #include "tiff/TiffIFD.h" // for TiffRootIFD, Tif... #include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for fill_n #include // for array #include // for assert -#include // for memcpy, size_t -#include // for unique_ptr, allo... -#include // for operator==, string -#include // for vector +#include +#include // for memcpy, size_t +#include // for unique_ptr, allo... +#include // for operator==, string +#include // for vector using std::vector; diff --git a/src/librawspeed/decoders/Cr2Decoder.cpp b/src/librawspeed/decoders/Cr2Decoder.cpp index 000c31bfe..2df38ad08 100644 --- a/src/librawspeed/decoders/Cr2Decoder.cpp +++ b/src/librawspeed/decoders/Cr2Decoder.cpp @@ -21,8 +21,9 @@ */ #include "decoders/Cr2Decoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D +#include "adt/Array2DRef.h" // for Array2DRef +#include "adt/Point.h" // for iPoint2D +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowRDE #include "decompressors/Cr2Decompressor.h" // for Cr2SliceWidths #include "decompressors/Cr2LJpegDecoder.h" // for Cr2LJpegDecoder @@ -34,13 +35,14 @@ #include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::G... #include "parsers/TiffParserException.h" // for ThrowException, Rawsp... #include "tiff/TiffEntry.h" // for TiffEntry, TiffDataType -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::CAN... -#include // for array -#include // for assert -#include // for uint32_t, uint16_t -#include // for unique_ptr, allocator -#include // for operator==, string -#include // for vector +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" // for TiffTag, TiffTag::CAN... +#include // for array +#include // for assert +#include // for uint32_t, uint16_t +#include // for unique_ptr, allocator +#include // for operator==, string +#include // for vector // IWYU pragma: no_include #include "MemorySanitizer.h" // for MSan diff --git a/src/librawspeed/decoders/CrwDecoder.cpp b/src/librawspeed/decoders/CrwDecoder.cpp index d8f73ded0..b59813682 100644 --- a/src/librawspeed/decoders/CrwDecoder.cpp +++ b/src/librawspeed/decoders/CrwDecoder.cpp @@ -22,7 +22,9 @@ #include "rawspeedconfig.h" // for RAWSPEED_READNONE #include "decoders/CrwDecoder.h" -#include "adt/Point.h" // for iPoint2D +#include "adt/Point.h" // for iPoint2D +#include "common/RawImage.h" +#include "decoders/RawDecoder.h" #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "decompressors/CrwDecompressor.h" // for CrwDecompressor #include "io/Buffer.h" // for Buffer @@ -34,12 +36,13 @@ #include // for array #include // for assert #include // for copysignf, expf, logf -#include // for abs, size_t -#include // for memcmp -#include // for unique_ptr, allocator -#include // for string -#include // for move -#include // for vector +#include +#include // for abs, size_t +#include // for memcmp +#include // for unique_ptr, allocator +#include // for string +#include // for move +#include // for vector using std::vector; diff --git a/src/librawspeed/decoders/DcrDecoder.cpp b/src/librawspeed/decoders/DcrDecoder.cpp index 49e8562a5..5b76e448c 100644 --- a/src/librawspeed/decoders/DcrDecoder.cpp +++ b/src/librawspeed/decoders/DcrDecoder.cpp @@ -20,8 +20,10 @@ */ #include "decoders/DcrDecoder.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "adt/NORangesSet.h" // for NORangesSet +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "decoders/SimpleTiffDecoder.h" #include "decompressors/KodakDecompressor.h" // for KodakDecompressor #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream @@ -31,7 +33,6 @@ #include "tiff/TiffTag.h" // for TiffTag, TiffTag::COMPR... #include // for array #include // for assert -#include // for uint32_t #include // for allocator, unique_ptr #include // for operator==, string diff --git a/src/librawspeed/decoders/DcsDecoder.cpp b/src/librawspeed/decoders/DcsDecoder.cpp index 8b4be45de..8d7ac3448 100644 --- a/src/librawspeed/decoders/DcsDecoder.cpp +++ b/src/librawspeed/decoders/DcsDecoder.cpp @@ -20,9 +20,11 @@ */ #include "decoders/DcsDecoder.h" -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... -#include "decoders/RawDecoderException.h" // for ThrowException +#include "adt/Point.h" // for iPoint2D, iRecta... +#include "common/Common.h" // for BitOrder, BitOrd... +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" // for ThrowException +#include "decoders/SimpleTiffDecoder.h" #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream diff --git a/src/librawspeed/decoders/DngDecoder.cpp b/src/librawspeed/decoders/DngDecoder.cpp index fc1e20d5b..50ba95ff9 100644 --- a/src/librawspeed/decoders/DngDecoder.cpp +++ b/src/librawspeed/decoders/DngDecoder.cpp @@ -20,16 +20,17 @@ #include "rawspeedconfig.h" // for HAVE_JPEG, HAVE_ZLIB #include "decoders/DngDecoder.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "adt/NotARational.h" // for NotARational -#include "adt/Point.h" // for iPoint2D, iRectan... -#include "common/Common.h" // for roundUpDivision -#include "common/DngOpcodes.h" // for DngOpcodes +#include "adt/NORangesSet.h" // for NORangesSet +#include "adt/NotARational.h" // for NotARational +#include "adt/Point.h" // for iPoint2D, iRectan... +#include "common/Common.h" // for roundUpDivision +#include "common/DngOpcodes.h" // for DngOpcodes +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" #include "decoders/RawDecoderException.h" // for ThrowRDE, RawDeco... #include "decompressors/AbstractDngDecompressor.h" // for DngSliceElement #include "io/Buffer.h" // for Buffer, operator< #include "io/ByteStream.h" // for ByteStream -#include "metadata/BlackArea.h" // for BlackArea #include "metadata/Camera.h" // for Camera #include "metadata/CameraMetaData.h" // for CameraMetaData #include "metadata/ColorFilterArray.h" // for CFAColor, ColorFi... @@ -40,12 +41,14 @@ #include // for max, transform #include // for array, array<>::v... #include // for assert -#include // for numeric_limits -#include // for map -#include // for unique_ptr, alloc... -#include // for char_traits, string -#include // for move -#include // for vector, allocator +#include +#include // for numeric_limits +#include // for map +#include // for unique_ptr, alloc... +#include +#include // for char_traits, string +#include // for move +#include // for vector, allocator // IWYU pragma: no_include using std::map; diff --git a/src/librawspeed/decoders/ErfDecoder.cpp b/src/librawspeed/decoders/ErfDecoder.cpp index be2db1308..3a59407f2 100644 --- a/src/librawspeed/decoders/ErfDecoder.cpp +++ b/src/librawspeed/decoders/ErfDecoder.cpp @@ -20,9 +20,11 @@ */ #include "decoders/ErfDecoder.h" -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... -#include "decoders/RawDecoderException.h" // for ThrowException +#include "adt/Point.h" // for iPoint2D, iRecta... +#include "common/Common.h" // for BitOrder, BitOrd... +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" // for ThrowException +#include "decoders/SimpleTiffDecoder.h" #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream diff --git a/src/librawspeed/decoders/IiqDecoder.cpp b/src/librawspeed/decoders/IiqDecoder.cpp index 58367d653..60e2f584a 100644 --- a/src/librawspeed/decoders/IiqDecoder.cpp +++ b/src/librawspeed/decoders/IiqDecoder.cpp @@ -22,9 +22,11 @@ */ #include "decoders/IiqDecoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Mutex.h" // for MutexLocker -#include "adt/Point.h" // for iPoint2D +#include "adt/Array2DRef.h" // for Array2DRef +#include "adt/Mutex.h" // for MutexLocker +#include "adt/Point.h" // for iPoint2D +#include "common/Common.h" +#include "common/RawImage.h" #include "common/Spline.h" // for Spline, Spline<>::va... #include "decoders/RawDecoder.h" // for RawDecoder::(anonymous) #include "decoders/RawDecoderException.h" // for ThrowException, Thro... @@ -41,14 +43,15 @@ #include // for assert #include // for PRIu64 #include // for lround -#include // for abs -#include // for greater_equal -#include // for advance, next, begin -#include // for unique_ptr -#include // for optional, nullopt -#include // for operator==, string -#include // for move -#include // for vector, allocator +#include +#include // for abs +#include // for greater_equal +#include // for advance, next, begin +#include // for unique_ptr +#include // for optional, nullopt +#include // for operator==, string +#include // for move +#include // for vector, allocator namespace rawspeed { diff --git a/src/librawspeed/decoders/KdcDecoder.cpp b/src/librawspeed/decoders/KdcDecoder.cpp index b0fd8a62f..800712604 100644 --- a/src/librawspeed/decoders/KdcDecoder.cpp +++ b/src/librawspeed/decoders/KdcDecoder.cpp @@ -20,9 +20,10 @@ */ #include "decoders/KdcDecoder.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/NORangesSet.h" // for NORangesSet +#include "adt/Point.h" // for iPoint2D, iRecta... +#include "common/Common.h" // for BitOrder, BitOrd... +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowRDE #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... #include "io/Buffer.h" // for Buffer, DataBuffer diff --git a/src/librawspeed/decoders/MefDecoder.cpp b/src/librawspeed/decoders/MefDecoder.cpp index 5ac9b7dd3..dd727f306 100644 --- a/src/librawspeed/decoders/MefDecoder.cpp +++ b/src/librawspeed/decoders/MefDecoder.cpp @@ -20,14 +20,17 @@ */ #include "decoders/MefDecoder.h" -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... -#include "decoders/RawDecoderException.h" // for ThrowException +#include "adt/Point.h" // for iPoint2D, iRecta... +#include "common/Common.h" // for BitOrder, BitOrd... +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" // for ThrowException +#include "decoders/SimpleTiffDecoder.h" #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endi... -#include // for allocator, opera... +#include "tiff/TiffIFD.h" +#include // for allocator, opera... namespace rawspeed { diff --git a/src/librawspeed/decoders/MosDecoder.cpp b/src/librawspeed/decoders/MosDecoder.cpp index e4e0d6f06..72010d09a 100644 --- a/src/librawspeed/decoders/MosDecoder.cpp +++ b/src/librawspeed/decoders/MosDecoder.cpp @@ -20,8 +20,10 @@ */ #include "decoders/MosDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for trimSpaces +#include "adt/Point.h" // for iPoint2D +#include "common/Common.h" // for trimSpaces +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" #include "decoders/IiqDecoder.h" // for IiqDecoder #include "decoders/RawDecoder.h" // for RawDecoder #include "decoders/RawDecoderException.h" // for ThrowRDE @@ -39,8 +41,10 @@ #include // for memchr #include // for istringstream #include // for unique_ptr -#include // for string, allocator -#include // for move +#include +#include // for string, allocator +#include +#include // for move namespace rawspeed { diff --git a/src/librawspeed/decoders/MrwDecoder.cpp b/src/librawspeed/decoders/MrwDecoder.cpp index 4abbd6a81..f222bee4e 100644 --- a/src/librawspeed/decoders/MrwDecoder.cpp +++ b/src/librawspeed/decoders/MrwDecoder.cpp @@ -21,8 +21,9 @@ */ #include "decoders/MrwDecoder.h" -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/Point.h" // for iPoint2D, iRecta... +#include "common/Common.h" // for BitOrder, BitOrd... +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowException #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... #include "io/Buffer.h" // for Buffer, DataBuffer @@ -31,9 +32,11 @@ #include "metadata/Camera.h" // for Hints #include "parsers/TiffParser.h" // for TiffParser #include "tiff/TiffIFD.h" // for TiffRootIFDOwner -#include // for assert -#include // for memcmp -#include // for allocator, uniqu... +#include +#include // for assert +#include +#include // for memcmp +#include // for allocator, uniqu... namespace rawspeed { diff --git a/src/librawspeed/decoders/NakedDecoder.cpp b/src/librawspeed/decoders/NakedDecoder.cpp index 529859070..49064724a 100644 --- a/src/librawspeed/decoders/NakedDecoder.cpp +++ b/src/librawspeed/decoders/NakedDecoder.cpp @@ -20,8 +20,10 @@ */ #include "decoders/NakedDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/Point.h" // for iPoint2D +#include "common/Common.h" // for BitOrder, BitOrd... +#include "common/RawImage.h" +#include "decoders/RawDecoder.h" #include "decoders/RawDecoderException.h" // for ThrowException #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... #include "io/Buffer.h" // for Buffer, DataBuffer diff --git a/src/librawspeed/decoders/NefDecoder.cpp b/src/librawspeed/decoders/NefDecoder.cpp index d6b846101..014adc9db 100644 --- a/src/librawspeed/decoders/NefDecoder.cpp +++ b/src/librawspeed/decoders/NefDecoder.cpp @@ -20,9 +20,10 @@ */ #include "decoders/NefDecoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for clampBits, round... +#include "adt/Array2DRef.h" // for Array2DRef +#include "adt/Point.h" // for iPoint2D +#include "common/Common.h" // for clampBits, round... +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowRDE #include "decompressors/NikonDecompressor.h" // for NikonDecompressor #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... @@ -38,12 +39,14 @@ #include "tiff/TiffIFD.h" // for TiffRootIFD, Tif... #include "tiff/TiffTag.h" // for TiffTag, TiffTag... #include // for min, max -#include // for assert -#include // for pow, exp, log -#include // for unique_ptr, allo... -#include // for operator<<, basi... -#include // for string, basic_st... -#include // for vector +#include +#include // for assert +#include // for pow, exp, log +#include +#include // for unique_ptr, allo... +#include // for operator<<, basi... +#include // for string, basic_st... +#include // for vector // IWYU pragma: no_include using std::vector; diff --git a/src/librawspeed/decoders/OrfDecoder.cpp b/src/librawspeed/decoders/OrfDecoder.cpp index ac5f3aa18..32c35f360 100644 --- a/src/librawspeed/decoders/OrfDecoder.cpp +++ b/src/librawspeed/decoders/OrfDecoder.cpp @@ -21,10 +21,11 @@ */ #include "decoders/OrfDecoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/NORangesSet.h" // for NORangesSet -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, roundUp +#include "adt/Array2DRef.h" // for Array2DRef +#include "adt/NORangesSet.h" // for NORangesSet +#include "adt/Point.h" // for iPoint2D, iRecta... +#include "common/Common.h" // for BitOrder, roundUp +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowException #include "decompressors/OlympusDecompressor.h" // for OlympusDecompressor #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... @@ -38,8 +39,9 @@ #include "tiff/TiffTag.h" // for TiffTag, TiffTag... #include // for array #include // for assert -#include // for unique_ptr, allo... -#include // for operator==, string +#include +#include // for unique_ptr, allo... +#include // for operator==, string namespace rawspeed { diff --git a/src/librawspeed/decoders/PefDecoder.cpp b/src/librawspeed/decoders/PefDecoder.cpp index e4e0c5233..f82d6c39c 100644 --- a/src/librawspeed/decoders/PefDecoder.cpp +++ b/src/librawspeed/decoders/PefDecoder.cpp @@ -20,8 +20,9 @@ */ #include "decoders/PefDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for BitOrder, BitOrder::MSB +#include "adt/Point.h" // for iPoint2D +#include "common/Common.h" // for BitOrder, BitOrder::MSB +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "decompressors/PentaxDecompressor.h" // for PentaxDecompressor #include "io/Buffer.h" // for Buffer, DataBuffer diff --git a/src/librawspeed/decoders/RafDecoder.cpp b/src/librawspeed/decoders/RafDecoder.cpp index b0b801360..e20308608 100644 --- a/src/librawspeed/decoders/RafDecoder.cpp +++ b/src/librawspeed/decoders/RafDecoder.cpp @@ -20,17 +20,16 @@ */ #include "decoders/RafDecoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/NotARational.h" // for NotARational -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/Array2DRef.h" // for Array2DRef +#include "adt/Point.h" // for iPoint2D, iRecta... +#include "common/Common.h" // for BitOrder, BitOrd... +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowException #include "decompressors/FujiDecompressor.h" // for FujiDecompressor #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, getH... -#include "metadata/BlackArea.h" // for BlackArea #include "metadata/Camera.h" // for Camera, Hints #include "metadata/CameraMetaData.h" // for CameraMetaData #include "metadata/CameraSensorInfo.h" // for CameraSensorInfo @@ -38,7 +37,6 @@ #include "tiff/TiffEntry.h" // for TiffEntry #include "tiff/TiffIFD.h" // for TiffRootIFD, Tif... #include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for copy #include // for array #include // for assert #include // for uint32_t diff --git a/src/librawspeed/decoders/RawDecoder.cpp b/src/librawspeed/decoders/RawDecoder.cpp index a062e0d7a..8f32fb1b9 100644 --- a/src/librawspeed/decoders/RawDecoder.cpp +++ b/src/librawspeed/decoders/RawDecoder.cpp @@ -20,17 +20,16 @@ */ #include "decoders/RawDecoder.h" -#include "MemorySanitizer.h" // for MSan -#include "adt/NotARational.h" // for NotARational -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for writeLog, roundU... +#include "MemorySanitizer.h" // for MSan +#include "adt/Point.h" // for iPoint2D, iRecta... +#include "common/Common.h" // for writeLog, roundU... +#include "common/RawImage.h" #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endi... #include "io/FileIOException.h" // for ThrowException #include "io/IOException.h" // for IOException -#include "metadata/BlackArea.h" // for BlackArea #include "metadata/Camera.h" // for Camera, Camera::... #include "metadata/CameraMetaData.h" // for CameraMetaData #include "metadata/CameraSensorInfo.h" // for CameraSensorInfo @@ -39,11 +38,11 @@ #include "tiff/TiffEntry.h" // for TiffEntry #include "tiff/TiffIFD.h" // for TiffIFD #include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for copy, max #include // for array #include // for assert -#include // for string, allocator -#include // for vector +#include +#include // for string, allocator +#include // for vector using std::vector; diff --git a/src/librawspeed/decoders/Rw2Decoder.cpp b/src/librawspeed/decoders/Rw2Decoder.cpp index ad530464f..0b3063317 100644 --- a/src/librawspeed/decoders/Rw2Decoder.cpp +++ b/src/librawspeed/decoders/Rw2Decoder.cpp @@ -20,8 +20,9 @@ */ #include "decoders/Rw2Decoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for writeLog, DEBUG_... +#include "adt/Point.h" // for iPoint2D +#include "common/Common.h" // for writeLog, DEBUG_... +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowException #include "decompressors/PanasonicV4Decompressor.h" // for PanasonicV4Decom... #include "decompressors/PanasonicV5Decompressor.h" // for PanasonicV5Decom... diff --git a/src/librawspeed/decoders/StiDecoder.cpp b/src/librawspeed/decoders/StiDecoder.cpp index 02df2949b..de4964565 100644 --- a/src/librawspeed/decoders/StiDecoder.cpp +++ b/src/librawspeed/decoders/StiDecoder.cpp @@ -19,18 +19,18 @@ */ #include "decoders/StiDecoder.h" -#include "adt/Point.h" // for iPoint2D +#include "adt/Point.h" // for iPoint2D +#include "common/Common.h" +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowException #include "decompressors/HasselbladLJpegDecoder.h" // for HasselbladLJpegDec... #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... #include "io/Buffer.h" // for Buffer, DataBuffer #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endian... -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor... #include "tiff/TiffEntry.h" // for TiffEntry #include "tiff/TiffIFD.h" // for TiffRootIFD, TiffIFD #include "tiff/TiffTag.h" // for TiffTag, TiffTag::... -#include // for array #include // for uint32_t #include // for unique_ptr, allocator #include // for operator==, string diff --git a/src/librawspeed/decoders/ThreefrDecoder.cpp b/src/librawspeed/decoders/ThreefrDecoder.cpp index bdf3891b7..2b770f0c1 100644 --- a/src/librawspeed/decoders/ThreefrDecoder.cpp +++ b/src/librawspeed/decoders/ThreefrDecoder.cpp @@ -20,7 +20,9 @@ */ #include "decoders/ThreefrDecoder.h" -#include "adt/Point.h" // for iPoint2D +#include "adt/Point.h" // for iPoint2D +#include "common/Common.h" +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowException #include "decompressors/HasselbladLJpegDecoder.h" // for HasselbladLJpegDec... #include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... diff --git a/src/librawspeed/decompressors/AbstractDngDecompressor.cpp b/src/librawspeed/decompressors/AbstractDngDecompressor.cpp index 64d28aea9..ba10a3bd5 100644 --- a/src/librawspeed/decompressors/AbstractDngDecompressor.cpp +++ b/src/librawspeed/decompressors/AbstractDngDecompressor.cpp @@ -34,10 +34,11 @@ #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endi... #include "io/IOException.h" // for IOException, Thr... -#include // for numeric_limits -#include // for unique_ptr -#include // for string -#include // for vector, allocator +#include +#include // for numeric_limits +#include // for unique_ptr +#include // for string +#include // for vector, allocator namespace rawspeed { diff --git a/src/librawspeed/decompressors/AbstractLJpegDecoder.cpp b/src/librawspeed/decompressors/AbstractLJpegDecoder.cpp index df332b737..aaa629590 100644 --- a/src/librawspeed/decompressors/AbstractLJpegDecoder.cpp +++ b/src/librawspeed/decompressors/AbstractLJpegDecoder.cpp @@ -21,21 +21,24 @@ */ #include "decompressors/AbstractLJpegDecoder.h" -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "codes/HuffmanCode.h" // for HuffmanCode -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder, Huffma... -#include "common/RawspeedException.h" // for ThrowException +#include "adt/Array1DRef.h" // for Array1DRef +#include "adt/Invariant.h" // for invariant +#include "adt/Point.h" // for iPoint2D +#include "codes/AbstractPrefixCode.h" +#include "codes/HuffmanCode.h" // for HuffmanCode +#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder, Huffma... +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowRDE #include "io/Buffer.h" // for Buffer #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endianne... #include // for array -#include // for unique_ptr, make_unique -#include // for optional -#include // for move -#include // for vector +#include +#include +#include // for unique_ptr, make_unique +#include // for optional +#include // for move +#include // for vector namespace rawspeed { diff --git a/src/librawspeed/decompressors/Cr2LJpegDecoder.cpp b/src/librawspeed/decompressors/Cr2LJpegDecoder.cpp index 0f0f1a1eb..c007a67e7 100644 --- a/src/librawspeed/decompressors/Cr2LJpegDecoder.cpp +++ b/src/librawspeed/decompressors/Cr2LJpegDecoder.cpp @@ -25,15 +25,16 @@ #include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder #include "common/RawImage.h" // for RawImage, RawImageData #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/ByteStream.h" // for ByteStream -#include // for generate_n -#include // for array -#include // for assert -#include // for uint16_t, uint32_t -#include // for initializer_list -#include // for back_insert_iterator, back... -#include // for tuple, get -#include // for vector +#include "decompressors/AbstractLJpegDecoder.h" +#include "decompressors/Cr2Decompressor.h" +#include "io/ByteStream.h" // for ByteStream +#include // for generate_n +#include // for array +#include // for assert +#include // for uint16_t, uint32_t +#include // for back_insert_iterator, back... +#include // for tuple, get +#include // for vector namespace rawspeed { diff --git a/src/librawspeed/decompressors/CrwDecompressor.cpp b/src/librawspeed/decompressors/CrwDecompressor.cpp index 92665b3ac..a04919d59 100644 --- a/src/librawspeed/decompressors/CrwDecompressor.cpp +++ b/src/librawspeed/decompressors/CrwDecompressor.cpp @@ -21,10 +21,11 @@ */ #include "decompressors/CrwDecompressor.h" -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D +#include "adt/Array1DRef.h" // for Array1DRef +#include "adt/Array2DRef.h" // for Array2DRef +#include "adt/Invariant.h" // for invariant +#include "adt/Point.h" // for iPoint2D +#include "codes/AbstractPrefixCode.h" #include "codes/HuffmanCode.h" // for HuffmanCode #include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder, HuffmanT... #include "common/Common.h" // for isIntN @@ -33,12 +34,9 @@ #include "io/BitPumpJPEG.h" // for BitPumpJPEG, BitStrea... #include "io/Buffer.h" // for Buffer #include "io/ByteStream.h" // for ByteStream -#include // for fill, copy, fill_n, max #include // for array #include // for uint8_t, uint16_t, int... -#include // for array #include // for move -#include // for vector using std::array; diff --git a/src/librawspeed/decompressors/DeflateDecompressor.cpp b/src/librawspeed/decompressors/DeflateDecompressor.cpp index 5fe2df4f5..ff66c3bbe 100644 --- a/src/librawspeed/decompressors/DeflateDecompressor.cpp +++ b/src/librawspeed/decompressors/DeflateDecompressor.cpp @@ -23,8 +23,10 @@ #include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef #include "adt/Invariant.h" // for invariant #include "common/Common.h" // for bit_cast -#include // for array -#include // for CHAR_BIT +#include "common/RawImage.h" +#include "io/Buffer.h" +#include // for array +#include // for CHAR_BIT #ifdef HAVE_ZLIB @@ -36,7 +38,8 @@ #include // for uint32_t, uint16_t #include // for size_t #include // for move -#include // for uncompress, zError, Z_OK +#include +#include // for uncompress, zError, Z_OK namespace rawspeed { diff --git a/src/librawspeed/decompressors/FujiDecompressor.cpp b/src/librawspeed/decompressors/FujiDecompressor.cpp index 5a2cedfe1..41a13e236 100644 --- a/src/librawspeed/decompressors/FujiDecompressor.cpp +++ b/src/librawspeed/decompressors/FujiDecompressor.cpp @@ -26,7 +26,6 @@ #include "MemorySanitizer.h" // for MSan #include "adt/Array1DRef.h" // for Array1DRef #include "adt/Array2DRef.h" // for Array2DRef -#include "adt/CroppedArray1DRef.h" // for CroppedArray1DRef #include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef #include "adt/Invariant.h" // for invariant #include "adt/Point.h" // for iPoint2D @@ -36,18 +35,19 @@ #include "common/XTransPhase.h" // for XTransPhase, getAsCFAColors #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "io/BitPumpMSB.h" // for BitPumpMSB -#include "io/Endianness.h" // for Endianness, Endianness::big -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::BLUE -#include // for max, min, fill, minmax -#include // for array, array<>::value_type -#include // for assert -#include // for uint16_t, int8_t, uint32_t -#include // for abs -#include // for memcpy, memset -#include // for initializer_list -#include // for optional, operator!= -#include // for string -#include // for pair +#include "io/ByteStream.h" +#include "io/Endianness.h" // for Endianness, Endianness::big +#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::BLUE +#include // for max, min, fill, minmax +#include // for array, array<>::value_type +#include // for assert +#include // for uint16_t, int8_t, uint32_t +#include // for abs +#include // for memcpy, memset +#include // for optional, operator!= +#include // for string +#include // for pair +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/HasselbladDecompressor.cpp b/src/librawspeed/decompressors/HasselbladDecompressor.cpp index 0a05a372e..7351cb1d4 100644 --- a/src/librawspeed/decompressors/HasselbladDecompressor.cpp +++ b/src/librawspeed/decompressors/HasselbladDecompressor.cpp @@ -24,12 +24,13 @@ #include "adt/Array2DRef.h" // for Array2DRef #include "adt/Invariant.h" // for invariant #include "adt/Point.h" // for iPoint2D +#include "codes/PrefixCodeDecoder.h" #include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for ThrowException #include "decoders/RawDecoderException.h" // for ThrowRDE -#include "io/ByteStream.h" // for ByteStream -#include // for uint16_t -#include // for move +#include "io/BitPumpMSB32.h" +#include "io/ByteStream.h" // for ByteStream +#include // for uint16_t +#include // for move namespace rawspeed { diff --git a/src/librawspeed/decompressors/HasselbladLJpegDecoder.cpp b/src/librawspeed/decompressors/HasselbladLJpegDecoder.cpp index 9408abd3c..0f274554d 100644 --- a/src/librawspeed/decompressors/HasselbladLJpegDecoder.cpp +++ b/src/librawspeed/decompressors/HasselbladLJpegDecoder.cpp @@ -20,9 +20,10 @@ */ #include "decompressors/HasselbladLJpegDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/RawImage.h" // for RawImage, RawImage... -#include "decoders/RawDecoderException.h" // for ThrowException +#include "adt/Point.h" // for iPoint2D +#include "common/RawImage.h" // for RawImage, RawImage... +#include "decoders/RawDecoderException.h" // for ThrowException +#include "decompressors/AbstractLJpegDecoder.h" #include "decompressors/HasselbladDecompressor.h" // for HasselbladDecompre... #include "io/ByteStream.h" // for ByteStream #include // for uint16_t diff --git a/src/librawspeed/decompressors/JpegDecompressor.cpp b/src/librawspeed/decompressors/JpegDecompressor.cpp index 93f99e479..fb7e10552 100644 --- a/src/librawspeed/decompressors/JpegDecompressor.cpp +++ b/src/librawspeed/decompressors/JpegDecompressor.cpp @@ -21,6 +21,7 @@ #include "rawspeedconfig.h" // for HAVE_JPEG_MEM_SRC, HAVE_JPEG #include "adt/AlignedAllocator.h" // for AlignedAllocator +#include #ifdef HAVE_JPEG diff --git a/src/librawspeed/decompressors/KodakDecompressor.cpp b/src/librawspeed/decompressors/KodakDecompressor.cpp index 5059b86dd..8cad180ab 100644 --- a/src/librawspeed/decompressors/KodakDecompressor.cpp +++ b/src/librawspeed/decompressors/KodakDecompressor.cpp @@ -34,6 +34,10 @@ #include // for uint32_t, uint8_t, uint16_t #include // for move +#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) +#include +#endif + namespace rawspeed { KodakDecompressor::KodakDecompressor(RawImage img, ByteStream bs, int bps_, diff --git a/src/librawspeed/decompressors/LJpegDecoder.cpp b/src/librawspeed/decompressors/LJpegDecoder.cpp index 8bf8b222d..8e2d70c55 100644 --- a/src/librawspeed/decompressors/LJpegDecoder.cpp +++ b/src/librawspeed/decompressors/LJpegDecoder.cpp @@ -20,17 +20,18 @@ */ #include "decompressors/LJpegDecoder.h" -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D, iRectangle2D -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "adt/Invariant.h" // for invariant +#include "adt/Point.h" // for iPoint2D, iRectangle2D +#include "common/RawImage.h" // for RawImage, RawImageData +#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "decompressors/AbstractLJpegDecoder.h" #include "decompressors/LJpegDecompressor.h" // for LJpegDecompressor::PerC... #include "io/ByteStream.h" // for ByteStream #include // for generate_n #include // for array -#include // for back_insert_iterator -#include // for vector +#include +#include // for back_insert_iterator +#include // for vector using std::copy_n; diff --git a/src/librawspeed/decompressors/LJpegDecompressor.cpp b/src/librawspeed/decompressors/LJpegDecompressor.cpp index ebf61f2c9..fb891104a 100644 --- a/src/librawspeed/decompressors/LJpegDecompressor.cpp +++ b/src/librawspeed/decompressors/LJpegDecompressor.cpp @@ -20,9 +20,10 @@ */ #include "decompressors/LJpegDecompressor.h" -#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D, iRectangle2D +#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef +#include "adt/Invariant.h" // for invariant +#include "adt/Point.h" // for iPoint2D, iRectangle2D +#include "codes/PrefixCodeDecoder.h" #include "common/Common.h" // for roundUpDivision #include "common/RawImage.h" // for RawImage, RawImageData #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE @@ -30,8 +31,12 @@ #include "io/ByteStream.h" // for ByteStream #include // for transform #include // for array -#include // for allocator_traits<>::value_... -#include // for move +#include +#include +#include +#include +#include // for move +#include using std::copy_n; diff --git a/src/librawspeed/decompressors/NikonDecompressor.cpp b/src/librawspeed/decompressors/NikonDecompressor.cpp index bb191d3ea..9bce883d7 100644 --- a/src/librawspeed/decompressors/NikonDecompressor.cpp +++ b/src/librawspeed/decompressors/NikonDecompressor.cpp @@ -23,6 +23,7 @@ #include "adt/Array2DRef.h" // for Array2DRef #include "adt/Invariant.h" // for invariant #include "adt/Point.h" // for iPoint2D +#include "codes/AbstractPrefixCode.h" #include "codes/HuffmanCode.h" #include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder #include "common/Common.h" // for extractHighBits, clampBits @@ -31,12 +32,12 @@ #include "io/BitPumpMSB.h" // for BitPumpMSB, BitStream<>::f... #include "io/Buffer.h" // for Buffer #include "io/ByteStream.h" // for ByteStream -#include // for fill_n, fill, max, copy -#include // for assert -#include // for uint16_t, uint32_t, int16_t -#include // for size_t -#include // for move -#include // for vector +#include +#include // for assert +#include // for uint16_t, uint32_t, int16_t +#include // for size_t +#include // for move +#include // for vector namespace rawspeed { diff --git a/src/librawspeed/decompressors/OlympusDecompressor.cpp b/src/librawspeed/decompressors/OlympusDecompressor.cpp index a43e4559e..4ba051c16 100644 --- a/src/librawspeed/decompressors/OlympusDecompressor.cpp +++ b/src/librawspeed/decompressors/OlympusDecompressor.cpp @@ -30,9 +30,10 @@ #include "io/BitPumpMSB.h" // for BitPumpMSB #include "io/ByteStream.h" // for ByteStream #include // for array -#include // for abs -#include // for enable_if_t -#include // for move +#include +#include // for abs +#include // for enable_if_t +#include // for move namespace { diff --git a/src/librawspeed/decompressors/PanasonicV4Decompressor.cpp b/src/librawspeed/decompressors/PanasonicV4Decompressor.cpp index 47f09db08..2aa0d4093 100644 --- a/src/librawspeed/decompressors/PanasonicV4Decompressor.cpp +++ b/src/librawspeed/decompressors/PanasonicV4Decompressor.cpp @@ -30,15 +30,15 @@ #include "common/RawImage.h" // for RawImage, RawImageData #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "io/Buffer.h" // for Buffer, Buffer::size_type -#include // for copy, max, fill_n, generate_n -#include // for array -#include // for assert -#include // for uint32_t, uint8_t, uint16_t -#include // for back_insert_iterator, back... -#include // for numeric_limits -#include // for allocator_traits<>::value_... -#include // for move -#include // for vector, vector<>::iterator +#include "io/ByteStream.h" +#include // for copy, max, fill_n, generate_n +#include // for array +#include // for assert +#include // for uint32_t, uint8_t, uint16_t +#include // for back_insert_iterator, back... +#include // for numeric_limits +#include // for move +#include // for vector, vector<>::iterator namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV5Decompressor.cpp b/src/librawspeed/decompressors/PanasonicV5Decompressor.cpp index c77b7b66c..28af6e1ab 100644 --- a/src/librawspeed/decompressors/PanasonicV5Decompressor.cpp +++ b/src/librawspeed/decompressors/PanasonicV5Decompressor.cpp @@ -30,14 +30,14 @@ #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "io/BitPumpLSB.h" // for BitPumpLSB #include "io/Buffer.h" // for Buffer, Buffer::size_type -#include "io/Endianness.h" // for Endianness, Endianness::li... -#include // for copy, generate_n, max -#include // for assert -#include // for uint8_t, uint16_t, uint32_t -#include // for back_insert_iterator, back... -#include // for allocator_traits<>::value_... -#include // for move -#include // for vector +#include "io/ByteStream.h" +#include "io/Endianness.h" // for Endianness, Endianness::li... +#include // for copy, generate_n, max +#include // for assert +#include // for uint8_t, uint16_t, uint32_t +#include // for back_insert_iterator, back... +#include // for move +#include // for vector namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV6Decompressor.cpp b/src/librawspeed/decompressors/PanasonicV6Decompressor.cpp index 70e0a4cd7..d3ee8707a 100644 --- a/src/librawspeed/decompressors/PanasonicV6Decompressor.cpp +++ b/src/librawspeed/decompressors/PanasonicV6Decompressor.cpp @@ -28,9 +28,10 @@ #include "common/RawImage.h" // for RawImage, RawImageData #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "io/BitPumpLSB.h" // for BitPumpLSB -#include // for array -#include // for uint16_t, uint32_t -#include // for move +#include "io/ByteStream.h" +#include // for array +#include // for uint16_t, uint32_t +#include // for move namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV7Decompressor.cpp b/src/librawspeed/decompressors/PanasonicV7Decompressor.cpp index 67d992cca..86f9d7eed 100644 --- a/src/librawspeed/decompressors/PanasonicV7Decompressor.cpp +++ b/src/librawspeed/decompressors/PanasonicV7Decompressor.cpp @@ -30,8 +30,9 @@ #include "common/RawImage.h" // for RawImage, RawImageData #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "io/BitPumpLSB.h" // for BitPumpLSB -#include // for uint16_t -#include // for move +#include "io/ByteStream.h" +#include // for uint16_t +#include // for move namespace rawspeed { diff --git a/src/librawspeed/decompressors/PentaxDecompressor.cpp b/src/librawspeed/decompressors/PentaxDecompressor.cpp index 603fe1896..742659d85 100644 --- a/src/librawspeed/decompressors/PentaxDecompressor.cpp +++ b/src/librawspeed/decompressors/PentaxDecompressor.cpp @@ -23,6 +23,7 @@ #include "adt/Array2DRef.h" // for Array2DRef #include "adt/Invariant.h" // for invariant #include "adt/Point.h" // for iPoint2D +#include "codes/AbstractPrefixCode.h" #include "codes/HuffmanCode.h" #include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder #include "common/Common.h" // for extractHighBits, isIntN @@ -31,11 +32,12 @@ #include "io/BitPumpMSB.h" // for BitPumpMSB, BitStream<>::f... #include "io/Buffer.h" // for Buffer #include "io/ByteStream.h" // for ByteStream -#include // for max, fill, fill_n, copy -#include // for assert -#include // for uint8_t, uint32_t, uint16_t -#include // for move -#include // for vector +#include +#include // for assert +#include // for uint8_t, uint32_t, uint16_t +#include +#include // for move +#include // for vector namespace rawspeed { diff --git a/src/librawspeed/decompressors/PhaseOneDecompressor.cpp b/src/librawspeed/decompressors/PhaseOneDecompressor.cpp index 9235e4f72..c4cdb85f6 100644 --- a/src/librawspeed/decompressors/PhaseOneDecompressor.cpp +++ b/src/librawspeed/decompressors/PhaseOneDecompressor.cpp @@ -32,7 +32,6 @@ #include // for sort, fill_n #include // for array #include // for int32_t, uint16_t -#include // for allocator_traits<>::value_... #include // for string #include // for move #include // for vector<>::iterator, vector diff --git a/src/librawspeed/decompressors/SamsungV0Decompressor.cpp b/src/librawspeed/decompressors/SamsungV0Decompressor.cpp index 1880feb0e..e4e6f03e0 100644 --- a/src/librawspeed/decompressors/SamsungV0Decompressor.cpp +++ b/src/librawspeed/decompressors/SamsungV0Decompressor.cpp @@ -27,15 +27,16 @@ #include "common/Common.h" // for signExtend #include "common/RawImage.h" // for RawImage, RawImageData #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 -#include "io/ByteStream.h" // for ByteStream -#include // for max -#include // for array -#include // for assert -#include // for uint32_t, uint16_t, int32_t -#include // for advance, begin, end, next -#include // for swap -#include // for vector +#include "decompressors/AbstractSamsungDecompressor.h" +#include "io/BitPumpMSB32.h" // for BitPumpMSB32 +#include "io/ByteStream.h" // for ByteStream +#include // for max +#include // for array +#include // for assert +#include // for uint32_t, uint16_t, int32_t +#include // for advance, begin, end, next +#include // for swap +#include // for vector namespace rawspeed { diff --git a/src/librawspeed/decompressors/SamsungV1Decompressor.cpp b/src/librawspeed/decompressors/SamsungV1Decompressor.cpp index 9bdc14824..c44895022 100644 --- a/src/librawspeed/decompressors/SamsungV1Decompressor.cpp +++ b/src/librawspeed/decompressors/SamsungV1Decompressor.cpp @@ -28,11 +28,11 @@ #include "common/Common.h" // for isIntN #include "common/RawImage.h" // for RawImage, RawImageData #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include // for fill_n -#include // for array -#include // for allocator_traits<>::value_... -#include // for vector +#include "decompressors/AbstractSamsungDecompressor.h" +#include "io/BitPumpMSB.h" // for BitPumpMSB +#include // for array +#include +#include // for vector namespace rawspeed { diff --git a/src/librawspeed/decompressors/SamsungV2Decompressor.cpp b/src/librawspeed/decompressors/SamsungV2Decompressor.cpp index 45f3e61a0..a48d599c1 100644 --- a/src/librawspeed/decompressors/SamsungV2Decompressor.cpp +++ b/src/librawspeed/decompressors/SamsungV2Decompressor.cpp @@ -27,12 +27,13 @@ #include "common/Common.h" // for clampBits, signExtend #include "common/RawImage.h" // for RawImage, RawImageData #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 -#include "io/ByteStream.h" // for ByteStream -#include // for fill_n -#include // for assert -#include // for uint16_t, uint32_t, int32_t -#include // for underlying_type_t +#include "decompressors/AbstractSamsungDecompressor.h" +#include "io/BitPumpMSB32.h" // for BitPumpMSB32 +#include "io/ByteStream.h" // for ByteStream +#include +#include // for assert +#include // for uint16_t, uint32_t, int32_t +#include // for underlying_type_t namespace rawspeed { diff --git a/src/librawspeed/decompressors/SonyArw1Decompressor.cpp b/src/librawspeed/decompressors/SonyArw1Decompressor.cpp index 6802b776c..6bbbd2bd1 100644 --- a/src/librawspeed/decompressors/SonyArw1Decompressor.cpp +++ b/src/librawspeed/decompressors/SonyArw1Decompressor.cpp @@ -30,7 +30,8 @@ #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "io/BitPumpMSB.h" // for BitPumpMSB #include "io/ByteStream.h" // for ByteStream -#include // for move +#include +#include // for move namespace rawspeed { diff --git a/src/librawspeed/decompressors/SonyArw2Decompressor.cpp b/src/librawspeed/decompressors/SonyArw2Decompressor.cpp index c3917d591..dc099ebba 100644 --- a/src/librawspeed/decompressors/SonyArw2Decompressor.cpp +++ b/src/librawspeed/decompressors/SonyArw2Decompressor.cpp @@ -29,9 +29,10 @@ #include "common/RawImage.h" // for RawImageData, RawImage #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE #include "io/BitPumpLSB.h" // for BitPumpLSB -#include // for uint16_t, uint32_t, uint8_t -#include // for allocator, string -#include // for move +#include "io/ByteStream.h" +#include // for uint16_t, uint32_t, uint8_t +#include // for allocator, string +#include // for move namespace rawspeed { diff --git a/src/librawspeed/decompressors/UncompressedDecompressor.cpp b/src/librawspeed/decompressors/UncompressedDecompressor.cpp index 2315defc1..185adc367 100644 --- a/src/librawspeed/decompressors/UncompressedDecompressor.cpp +++ b/src/librawspeed/decompressors/UncompressedDecompressor.cpp @@ -21,11 +21,12 @@ */ #include "decompressors/UncompressedDecompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D, iRectangle2D -#include "common/Common.h" // for BitOrder, copyPixels, BitO... -#include "common/FloatingPoint.h" // for Binary16, Binary24, Binary... +#include "adt/Array2DRef.h" // for Array2DRef +#include "adt/Invariant.h" // for invariant +#include "adt/Point.h" // for iPoint2D, iRectangle2D +#include "common/Common.h" // for BitOrder, copyPixels, BitO... +#include "common/FloatingPoint.h" // for Binary16, Binary24, Binary... +#include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowRDE #include "io/BitPumpLSB.h" // for BitPumpLSB, BitStream<>::f... #include "io/BitPumpMSB.h" // for BitPumpMSB, BitStream<>::f... @@ -36,7 +37,8 @@ #include "io/IOException.h" // for ThrowException, ThrowIOE #include // for min #include // for PRIu64 -#include // for move +#include +#include // for move using std::min; diff --git a/src/librawspeed/decompressors/VC5Decompressor.cpp b/src/librawspeed/decompressors/VC5Decompressor.cpp index fdcb008ff..6d11ead4e 100644 --- a/src/librawspeed/decompressors/VC5Decompressor.cpp +++ b/src/librawspeed/decompressors/VC5Decompressor.cpp @@ -29,23 +29,33 @@ #include "rawspeedconfig.h" // for HAVE_OPENMP, RAWSPEED_CACH... #include "decompressors/VC5Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for roundUpDivision, rawspeed_... -#include "common/ErrorLog.h" // for ErrorLog +#include "adt/Array2DRef.h" // for Array2DRef +#include "adt/Invariant.h" // for invariant +#include "adt/Point.h" // for iPoint2D +#include "codes/AbstractPrefixCode.h" +#include "codes/PrefixCode.h" +#include "common/BayerPhase.h" +#include "common/Common.h" // for roundUpDivision, rawspeed_... +#include "common/ErrorLog.h" // for ErrorLog +#include "common/RawImage.h" #include "common/SimpleLUT.h" // for SimpleLUT, SimpleLUT<>::va... #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/Endianness.h" // for Endianness, Endianness::big -#include // for all_of, max -#include // for assert -#include // for pow -#include // for initializer_list -#include // for numeric_limits -#include // for optional, operator== -#include // for string -#include // for tie, tuple -#include // for pair +#include "io/BitPumpMSB.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" // for Endianness, Endianness::big +#include // for all_of, max +#include +#include // for assert +#include // for pow +#include +#include // for numeric_limits +#include +#include // for optional, operator== +#include // for string +#include // for tie, tuple +#include +#include // for pair +#include // IWYU pragma: no_include namespace { diff --git a/src/librawspeed/io/BitStream.cpp b/src/librawspeed/io/BitStream.cpp index 1aefecd20..7494812f2 100644 --- a/src/librawspeed/io/BitStream.cpp +++ b/src/librawspeed/io/BitStream.cpp @@ -17,5 +17,3 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ - -#include "io/BitStream.h" // for BitStreamCacheBase diff --git a/src/librawspeed/io/FileReader.cpp b/src/librawspeed/io/FileReader.cpp index a199f8055..c176fe696 100644 --- a/src/librawspeed/io/FileReader.cpp +++ b/src/librawspeed/io/FileReader.cpp @@ -26,11 +26,10 @@ #include "io/FileIOException.h" // for ThrowException, ThrowFIE #include // for uint8_t #include // for fclose, fseek, feof -#include // for SEEK_END, SEEK_SET #include // for numeric_limits #include // for unique_ptr, make_unique -#include // for remove_reference<>::type #include // for move, pair +#include #if !(defined(__unix__) || defined(__APPLE__)) #ifndef NOMINMAX diff --git a/src/librawspeed/io/FileWriter.cpp b/src/librawspeed/io/FileWriter.cpp index e06e23b81..53ddbaf43 100644 --- a/src/librawspeed/io/FileWriter.cpp +++ b/src/librawspeed/io/FileWriter.cpp @@ -21,7 +21,8 @@ #include "io/FileWriter.h" #include "io/Buffer.h" // for Buffer #include "io/FileIOException.h" // for ThrowException, ThrowFIE -#include // for fclose, fopen, fwrite, FILE, size_t +#include +#include // for fclose, fopen, fwrite, FILE, size_t #if !defined(__unix__) && !defined(__APPLE__) #ifndef NOMINMAX diff --git a/src/librawspeed/metadata/Camera.cpp b/src/librawspeed/metadata/Camera.cpp index a8bad3fb5..30d7ddf42 100644 --- a/src/librawspeed/metadata/Camera.cpp +++ b/src/librawspeed/metadata/Camera.cpp @@ -20,17 +20,21 @@ */ #include "metadata/Camera.h" +#include "adt/NotARational.h" #include "adt/Point.h" // for iPoint2D #include "common/Common.h" // for splitString #include "metadata/CameraMetadataException.h" // for ThrowException, ThrowCME -#include // for max, fill, transform -#include // for tolower -#include // for size_t -#include // for map -#include // for optional, nullopt -#include // for string, allocator, ope... -#include // for operator==, basic_stri... -#include // for vector +#include "metadata/CameraSensorInfo.h" +#include "metadata/ColorFilterArray.h" +#include // for max, fill, transform +#include // for tolower +#include +#include // for size_t +#include // for map +#include // for optional, nullopt +#include // for string, allocator, ope... +#include // for operator==, basic_stri... +#include // for vector #ifdef HAVE_PUGIXML #include // for xml_node, xml_attribute diff --git a/src/librawspeed/metadata/CameraMetaData.cpp b/src/librawspeed/metadata/CameraMetaData.cpp index 8eb7b693e..5a946497e 100644 --- a/src/librawspeed/metadata/CameraMetaData.cpp +++ b/src/librawspeed/metadata/CameraMetaData.cpp @@ -18,15 +18,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "rawspeedconfig.h" #include "metadata/CameraMetaData.h" #include "common/Common.h" // for trimSpaces, writeLog #include "metadata/Camera.h" // for Camera, Camera::Suppor... #include "metadata/CameraMetadataException.h" // for ThrowException, ThrowCME #include // for find_if -#include // for map, map<>::const_iter... -#include // for string, operator== -#include // for pair, move -#include // for vector +#include +#include // for map, map<>::const_iter... +#include +#include // for string, operator== +#include +#include +#include // for pair, move +#include // for vector #ifdef HAVE_PUGIXML #include // for xml_document, xml_pars... diff --git a/src/librawspeed/metadata/CameraSensorInfo.cpp b/src/librawspeed/metadata/CameraSensorInfo.cpp index 98766eadb..d0225f628 100644 --- a/src/librawspeed/metadata/CameraSensorInfo.cpp +++ b/src/librawspeed/metadata/CameraSensorInfo.cpp @@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "rawspeedconfig.h" #include "metadata/CameraSensorInfo.h" #include // for move #include // for vector diff --git a/src/librawspeed/metadata/ColorFilterArray.cpp b/src/librawspeed/metadata/ColorFilterArray.cpp index 8f5ef1a71..391db2d25 100644 --- a/src/librawspeed/metadata/ColorFilterArray.cpp +++ b/src/librawspeed/metadata/ColorFilterArray.cpp @@ -19,6 +19,7 @@ */ #include "metadata/ColorFilterArray.h" +#include "adt/Invariant.h" #include "adt/Point.h" // for iPoint2D, iPoint2D::value_... #include "common/Common.h" // for writeLog, DEBUG_PRIO, DEBU... #include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE @@ -26,12 +27,13 @@ #include // for assert #include // for PRId64 #include // for va_arg, va_end, va_list -#include // for size_t, abs -#include // for map -#include // for optional, nullopt -#include // for out_of_range -#include // for string -#include // for string_view, basic_string_... +#include +#include // for size_t, abs +#include // for map +#include // for optional, nullopt +#include // for out_of_range +#include // for string +#include // for string_view, basic_string_... using std::vector; diff --git a/src/librawspeed/parsers/CiffParser.cpp b/src/librawspeed/parsers/CiffParser.cpp index b042f2e51..cce1b143a 100644 --- a/src/librawspeed/parsers/CiffParser.cpp +++ b/src/librawspeed/parsers/CiffParser.cpp @@ -27,13 +27,14 @@ #include "io/ByteStream.h" // for ByteStream #include "io/Endianness.h" // for Endianness, Endianness::little #include "parsers/CiffParserException.h" // for ThrowException, ThrowCPE -#include "tiff/CiffEntry.h" // for CiffEntry -#include "tiff/CiffIFD.h" // for CiffIFD -#include "tiff/CiffTag.h" // for CiffTag, CiffTag::MAKEMODEL -#include // for uint16_t, uint32_t -#include // for operator==, string -#include // for move -#include // for vector +#include "parsers/RawParser.h" +#include "tiff/CiffEntry.h" // for CiffEntry +#include "tiff/CiffIFD.h" // for CiffIFD +#include "tiff/CiffTag.h" // for CiffTag, CiffTag::MAKEMODEL +#include // for uint16_t, uint32_t +#include +#include // for operator==, string +#include // for move namespace rawspeed { diff --git a/src/librawspeed/parsers/RawParser.cpp b/src/librawspeed/parsers/RawParser.cpp index d07aeb909..c22b40ef0 100644 --- a/src/librawspeed/parsers/RawParser.cpp +++ b/src/librawspeed/parsers/RawParser.cpp @@ -33,6 +33,7 @@ #include "parsers/FiffParserException.h" // for FiffParserException #include "parsers/TiffParser.h" // for TiffParser #include "parsers/TiffParserException.h" // for ThrowException, TiffParser... +#include namespace rawspeed { diff --git a/src/librawspeed/parsers/TiffParser.cpp b/src/librawspeed/parsers/TiffParser.cpp index 17f1872ab..3860c1603 100644 --- a/src/librawspeed/parsers/TiffParser.cpp +++ b/src/librawspeed/parsers/TiffParser.cpp @@ -22,33 +22,37 @@ */ #include "parsers/TiffParser.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "decoders/ArwDecoder.h" // for ArwDecoder -#include "decoders/Cr2Decoder.h" // for Cr2Decoder -#include "decoders/DcrDecoder.h" // for DcrDecoder -#include "decoders/DcsDecoder.h" // for DcsDecoder -#include "decoders/DngDecoder.h" // for DngDecoder -#include "decoders/ErfDecoder.h" // for ErfDecoder -#include "decoders/IiqDecoder.h" // for IiqDecoder -#include "decoders/KdcDecoder.h" // for KdcDecoder -#include "decoders/MefDecoder.h" // for MefDecoder -#include "decoders/MosDecoder.h" // for MosDecoder -#include "decoders/NefDecoder.h" // for NefDecoder -#include "decoders/OrfDecoder.h" // for OrfDecoder -#include "decoders/PefDecoder.h" // for PefDecoder -#include "decoders/Rw2Decoder.h" // for Rw2Decoder -#include "decoders/SrwDecoder.h" // for SrwDecoder -#include "decoders/StiDecoder.h" // for StiDecoder -#include "decoders/ThreefrDecoder.h" // for ThreefrDecoder -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::unk... +#include "adt/NORangesSet.h" // for NORangesSet +#include "decoders/ArwDecoder.h" // for ArwDecoder +#include "decoders/Cr2Decoder.h" // for Cr2Decoder +#include "decoders/DcrDecoder.h" // for DcrDecoder +#include "decoders/DcsDecoder.h" // for DcsDecoder +#include "decoders/DngDecoder.h" // for DngDecoder +#include "decoders/ErfDecoder.h" // for ErfDecoder +#include "decoders/IiqDecoder.h" // for IiqDecoder +#include "decoders/KdcDecoder.h" // for KdcDecoder +#include "decoders/MefDecoder.h" // for MefDecoder +#include "decoders/MosDecoder.h" // for MosDecoder +#include "decoders/NefDecoder.h" // for NefDecoder +#include "decoders/OrfDecoder.h" // for OrfDecoder +#include "decoders/PefDecoder.h" // for PefDecoder +#include "decoders/Rw2Decoder.h" // for Rw2Decoder +#include "decoders/SrwDecoder.h" // for SrwDecoder +#include "decoders/StiDecoder.h" // for StiDecoder +#include "decoders/ThreefrDecoder.h" // for ThreefrDecoder +#include "io/Buffer.h" // for Buffer, DataBuffer +#include "io/ByteStream.h" // for ByteStream +#include "io/Endianness.h" // for Endianness, Endianness::unk... +#include "parsers/RawParser.h" #include "parsers/TiffParserException.h" // for ThrowException, ThrowTPE -#include // for assert -#include // for UINT32_MAX, uint16_t, uint32_t -#include // for make_unique, unique_ptr -#include // for tie, tuple -#include // for vector +#include "tiff/TiffIFD.h" +#include +#include // for assert +#include // for UINT32_MAX, uint16_t, uint32_t +#include // for make_unique, unique_ptr +#include // for tie, tuple +#include +#include // for vector // IWYU pragma: no_include namespace rawspeed { diff --git a/src/librawspeed/tiff/CiffEntry.cpp b/src/librawspeed/tiff/CiffEntry.cpp index c3fb15224..8458718ad 100644 --- a/src/librawspeed/tiff/CiffEntry.cpp +++ b/src/librawspeed/tiff/CiffEntry.cpp @@ -20,14 +20,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "rawspeedconfig.h" #include "tiff/CiffEntry.h" #include "adt/NORangesSet.h" // for NORangesSet #include "io/Buffer.h" // for Buffer, operator< #include "io/ByteStream.h" // for ByteStream #include "parsers/CiffParserException.h" // for ThrowException, ThrowCPE -#include // for max -#include // for string, basic_string, alloc... -#include // for vector +#include +#include // for string, basic_string, alloc... +#include +#include // for vector using std::vector; diff --git a/src/librawspeed/tiff/CiffIFD.cpp b/src/librawspeed/tiff/CiffIFD.cpp index adefe4ea4..1d2b10753 100644 --- a/src/librawspeed/tiff/CiffIFD.cpp +++ b/src/librawspeed/tiff/CiffIFD.cpp @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "rawspeedconfig.h" #include "tiff/CiffIFD.h" #include "adt/NORangesSet.h" // for NORangesSet #include "common/Common.h" // for isIn @@ -27,14 +28,16 @@ #include "io/ByteStream.h" // for ByteStream #include "parsers/CiffParserException.h" // for ThrowException, ThrowCPE #include "tiff/CiffEntry.h" // for CiffEntry, CiffDataType -#include // for copy, max, any_of -#include // for assert -#include // for map, operator!=, _Rb_tree_c... -#include // for unique_ptr, make_unique -#include // for string, basic_string<>::__s... -#include // for operator== -#include // for move, pair -#include // for vector, vector<>::const_ite... +#include "tiff/CiffTag.h" +#include // for copy, max, any_of +#include // for assert +#include +#include // for map, operator!=, _Rb_tree_c... +#include // for unique_ptr, make_unique +#include // for string, basic_string<>::__s... +#include // for operator== +#include // for move, pair +#include // for vector, vector<>::const_ite... using std::vector; diff --git a/src/librawspeed/tiff/TiffEntry.cpp b/src/librawspeed/tiff/TiffEntry.cpp index 5c2e2ba07..1e69184c1 100644 --- a/src/librawspeed/tiff/TiffEntry.cpp +++ b/src/librawspeed/tiff/TiffEntry.cpp @@ -20,17 +20,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "rawspeedconfig.h" #include "tiff/TiffEntry.h" -#include "common/Common.h" // for isIn -#include "io/Buffer.h" // for Buffer, DataBuffer +#include "adt/NotARational.h" +#include "common/Common.h" // for isIn +#include "io/Buffer.h" // for Buffer, DataBuffer +#include "io/ByteStream.h" #include "io/Endianness.h" // for Endianness, Endianness::little #include "parsers/TiffParserException.h" // for ThrowException, ThrowTPE #include "tiff/TiffIFD.h" // for TiffIFD, TiffRootIFD #include "tiff/TiffTag.h" // for TiffTag, TiffTag::DNGPRIVAT... -#include // for assert -#include // for uint32_t, uint8_t, int32_t -#include // for strnlen -#include // for string +#include +#include // for assert +#include // for uint32_t, uint8_t, int32_t +#include +#include // for string namespace rawspeed { diff --git a/src/librawspeed/tiff/TiffIFD.cpp b/src/librawspeed/tiff/TiffIFD.cpp index e15592e87..6740b3c27 100644 --- a/src/librawspeed/tiff/TiffIFD.cpp +++ b/src/librawspeed/tiff/TiffIFD.cpp @@ -21,20 +21,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "rawspeedconfig.h" #include "tiff/TiffIFD.h" #include "adt/NORangesSet.h" // for NORangesSet #include "common/Common.h" // for trimSpaces #include "common/RawspeedException.h" // for ThrowException, RawspeedException -#include "io/IOException.h" // for IOException -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::MAKE, TiffTa... -#include // for copy, max -#include // for assert -#include // for map, operator!=, operator== -#include // for unique_ptr, make_unique, alloc... -#include // for string, operator==, basic_string -#include // for move, pair -#include // for vector<>::iterator, vector +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "io/IOException.h" // for IOException +#include "parsers/TiffParserException.h" +#include "tiff/TiffEntry.h" // for TiffEntry +#include "tiff/TiffTag.h" // for TiffTag, TiffTag::MAKE, TiffTa... +#include // for assert +#include +#include // for map, operator!=, operator== +#include // for unique_ptr, make_unique, alloc... +#include // for string, operator==, basic_string +#include // for move, pair +#include // for vector<>::iterator, vector using std::vector; diff --git a/src/utilities/rsbench/main.cpp b/src/utilities/rsbench/main.cpp index cfb397178..dc2414df8 100644 --- a/src/utilities/rsbench/main.cpp +++ b/src/utilities/rsbench/main.cpp @@ -22,7 +22,6 @@ #include "adt/AlignedAllocator.h" // for AlignedAllocator #include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocatorAda... #include "common/ChecksumFile.h" // for ChecksumFileEntry, Read... -#include // for max #include // for duration, high_resoluti... #include // for uint8_t #include // for clock, clock_t, CLOCKS_... diff --git a/src/utilities/rstest/md5.cpp b/src/utilities/rstest/md5.cpp index 446ebe544..c215083f9 100644 --- a/src/utilities/rstest/md5.cpp +++ b/src/utilities/rstest/md5.cpp @@ -29,6 +29,7 @@ #include "rawspeedconfig.h" // for RAWSPEED_READNONE #include "md5.h" +#include #include // for uint32_t, uint8_t #include // for size_t, snprintf #include // for memset, memcpy diff --git a/src/utilities/rstest/rstest.cpp b/src/utilities/rstest/rstest.cpp index 3c5ecd004..f7422c38f 100644 --- a/src/utilities/rstest/rstest.cpp +++ b/src/utilities/rstest/rstest.cpp @@ -24,7 +24,6 @@ #include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocatorAda... #include "adt/NotARational.h" // for NotARational #include "md5.h" // for md5_state, md5_hash -#include // for fill, copy, fill_n, max #include // for array #include // for assert #include // for milliseconds, steady_clock @@ -44,7 +43,6 @@ #include // for operator!=, string_view #include // for tie, tuple #include // for __type_identity_t -#include // for tuple_element<>::type #include // for vector // IWYU pragma: no_include From 41b8b4002b2e2a45e8bafc4ed950552d92f311b2 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 16:01:49 +0300 Subject: [PATCH 28/40] Drop IWYU stuff --- .clang-format-ignore | 1 - CMakeLists.txt | 5 --- cmake/iwyu.cmake | 40 ----------------- cmake/iwyu.imp | 45 ------------------- src/librawspeed/codes/PrefixCodeLUTDecoder.h | 1 - .../codes/PrefixCodeLookupDecoder.h | 1 - src/librawspeed/common/DngOpcodes.cpp | 2 - src/librawspeed/decoders/Cr2Decoder.cpp | 7 ++- src/librawspeed/decoders/DngDecoder.cpp | 1 - src/librawspeed/decoders/NefDecoder.cpp | 1 - .../decompressors/VC5Decompressor.cpp | 1 - src/librawspeed/parsers/TiffParser.cpp | 1 - src/utilities/rstest/rstest.cpp | 1 - test/librawspeed/adt/PointTest.cpp | 2 - 14 files changed, 3 insertions(+), 106 deletions(-) delete mode 100644 cmake/iwyu.cmake delete mode 100644 cmake/iwyu.imp diff --git a/.clang-format-ignore b/.clang-format-ignore index 09bdbe63f..48f5f5948 100644 --- a/.clang-format-ignore +++ b/.clang-format-ignore @@ -12,7 +12,6 @@ .mailmap CMakeLists.txt LICENSE -cmake/iwyu.imp docs/Doxyfile.in fuzz/all-fuzzers.txt fuzz/common.dict diff --git a/CMakeLists.txt b/CMakeLists.txt index 09285ae62..82bdf6fb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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() diff --git a/cmake/iwyu.cmake b/cmake/iwyu.cmake deleted file mode 100644 index 0fd7ea772..000000000 --- a/cmake/iwyu.cmake +++ /dev/null @@ -1,40 +0,0 @@ -set(IWYU_IMP "${CMAKE_SOURCE_DIR}/cmake/iwyu.imp") - -find_program(iwyu_path NAMES include-what-you-use iwyu) -if(NOT iwyu_path) - message(FATAL_ERROR "Could not find the program include-what-you-use.") -else(NOT iwyu_path) - set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "${iwyu_path}" -Xiwyu --mapping_file=${IWYU_IMP} -Xiwyu --check_also=${CMAKE_SOURCE_DIR}/src/* -Xiwyu --check_also=${CMAKE_SOURCE_DIR}/src/*/* -Xiwyu --check_also=${CMAKE_SOURCE_DIR}/src/*/*/* -Xiwyu --check_also=${CMAKE_SOURCE_DIR}/src/*/*/*/*) -endif() - -find_program(iwyu_tool_path NAMES iwyu_tool iwyu_tool.py) -if(iwyu_tool_path) - add_custom_command( - OUTPUT "${CMAKE_BINARY_DIR}/iwyu.log" - COMMAND "${iwyu_tool_path}" -v -p "${CMAKE_BINARY_DIR}" - -- --mapping_file=${IWYU_IMP} --check_also=${CMAKE_SOURCE_DIR}/src/* --check_also=${CMAKE_SOURCE_DIR}/src/*/* --check_also=${CMAKE_SOURCE_DIR}/src/*/*/* --check_also=${CMAKE_SOURCE_DIR}/src/*/*/*/* 2> - "${CMAKE_BINARY_DIR}/iwyu.log" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - COMMENT "Running include-what-you-use tool" - VERBATIM - ) - add_custom_target(iwyu - DEPENDS "${CMAKE_BINARY_DIR}/iwyu.log" - VERBATIM - ) -endif() - -find_program(fix_includes_path NAMES fix_include fix_includes.py) -if(fix_includes_path) - add_custom_target(iwyu_fix - COMMAND "${fix_includes_path}" --noblank_lines --comments - --safe_headers < "${CMAKE_BINARY_DIR}/iwyu.log" || true - COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/iwyu.log" - DEPENDS "${CMAKE_BINARY_DIR}/iwyu.log" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - COMMENT "Running include-what-you-use fix_includes tool" - VERBATIM - ) -endif() - -unset(IWYU_IMP) diff --git a/cmake/iwyu.imp b/cmake/iwyu.imp deleted file mode 100644 index e8c19c75c..000000000 --- a/cmake/iwyu.imp +++ /dev/null @@ -1,45 +0,0 @@ -[ - # C++ alternatives to C standard headers - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - { include: [ "", public, "", public ] }, - - # HACK: check whether this can be removed with next iwyu release. - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - - # libjpeg headers - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - - # Google Test headers - { include: [ "@", private, "", public ] }, - { include: [ "@", private, "", public ] }, - - # Our headers - { include: [ "", private, "\"ThreadSafetyAnalysis.h\"", public ] }, -] diff --git a/src/librawspeed/codes/PrefixCodeLUTDecoder.h b/src/librawspeed/codes/PrefixCodeLUTDecoder.h index bdc8502be..7a43b59be 100644 --- a/src/librawspeed/codes/PrefixCodeLUTDecoder.h +++ b/src/librawspeed/codes/PrefixCodeLUTDecoder.h @@ -31,7 +31,6 @@ #include // for allocator_traits<>::... #include // for tie #include // for vector -// IWYU pragma: no_include /* * The following code is inspired by the IJG JPEG library. diff --git a/src/librawspeed/codes/PrefixCodeLookupDecoder.h b/src/librawspeed/codes/PrefixCodeLookupDecoder.h index 58d5d3f4b..9ecb83399 100644 --- a/src/librawspeed/codes/PrefixCodeLookupDecoder.h +++ b/src/librawspeed/codes/PrefixCodeLookupDecoder.h @@ -31,7 +31,6 @@ #include // for tie #include // for pair #include // for vector -// IWYU pragma: no_include /* * The following code is inspired by the IJG JPEG library. diff --git a/src/librawspeed/common/DngOpcodes.cpp b/src/librawspeed/common/DngOpcodes.cpp index e6cd4be70..6aca13f00 100644 --- a/src/librawspeed/common/DngOpcodes.cpp +++ b/src/librawspeed/common/DngOpcodes.cpp @@ -43,8 +43,6 @@ #include #include #include -// IWYU pragma: no_include -// IWYU pragma: no_include #ifndef NDEBUG #include diff --git a/src/librawspeed/decoders/Cr2Decoder.cpp b/src/librawspeed/decoders/Cr2Decoder.cpp index 2df38ad08..45c078570 100644 --- a/src/librawspeed/decoders/Cr2Decoder.cpp +++ b/src/librawspeed/decoders/Cr2Decoder.cpp @@ -21,8 +21,9 @@ */ #include "decoders/Cr2Decoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D +#include "MemorySanitizer.h" // for MSan +#include "adt/Array2DRef.h" // for Array2DRef +#include "adt/Point.h" // for iPoint2D #include "common/RawImage.h" #include "decoders/RawDecoderException.h" // for ThrowRDE #include "decompressors/Cr2Decompressor.h" // for Cr2SliceWidths @@ -43,8 +44,6 @@ #include // for unique_ptr, allocator #include // for operator==, string #include // for vector -// IWYU pragma: no_include -#include "MemorySanitizer.h" // for MSan namespace rawspeed { class CameraMetaData; diff --git a/src/librawspeed/decoders/DngDecoder.cpp b/src/librawspeed/decoders/DngDecoder.cpp index 50ba95ff9..31af5e378 100644 --- a/src/librawspeed/decoders/DngDecoder.cpp +++ b/src/librawspeed/decoders/DngDecoder.cpp @@ -49,7 +49,6 @@ #include // for char_traits, string #include // for move #include // for vector, allocator -// IWYU pragma: no_include using std::map; using std::vector; diff --git a/src/librawspeed/decoders/NefDecoder.cpp b/src/librawspeed/decoders/NefDecoder.cpp index 014adc9db..6385f4f82 100644 --- a/src/librawspeed/decoders/NefDecoder.cpp +++ b/src/librawspeed/decoders/NefDecoder.cpp @@ -47,7 +47,6 @@ #include // for operator<<, basi... #include // for string, basic_st... #include // for vector -// IWYU pragma: no_include using std::vector; diff --git a/src/librawspeed/decompressors/VC5Decompressor.cpp b/src/librawspeed/decompressors/VC5Decompressor.cpp index 6d11ead4e..72255cf18 100644 --- a/src/librawspeed/decompressors/VC5Decompressor.cpp +++ b/src/librawspeed/decompressors/VC5Decompressor.cpp @@ -56,7 +56,6 @@ #include #include // for pair #include -// IWYU pragma: no_include namespace { diff --git a/src/librawspeed/parsers/TiffParser.cpp b/src/librawspeed/parsers/TiffParser.cpp index 3860c1603..896a52e5a 100644 --- a/src/librawspeed/parsers/TiffParser.cpp +++ b/src/librawspeed/parsers/TiffParser.cpp @@ -53,7 +53,6 @@ #include // for tie, tuple #include #include // for vector -// IWYU pragma: no_include namespace rawspeed { class RawDecoder; diff --git a/src/utilities/rstest/rstest.cpp b/src/utilities/rstest/rstest.cpp index f7422c38f..1f34316c9 100644 --- a/src/utilities/rstest/rstest.cpp +++ b/src/utilities/rstest/rstest.cpp @@ -44,7 +44,6 @@ #include // for tie, tuple #include // for __type_identity_t #include // for vector -// IWYU pragma: no_include #if !defined(__has_feature) || !__has_feature(thread_sanitizer) #include // for operator<<, setw diff --git a/test/librawspeed/adt/PointTest.cpp b/test/librawspeed/adt/PointTest.cpp index 5c1334392..2f3af6636 100644 --- a/test/librawspeed/adt/PointTest.cpp +++ b/test/librawspeed/adt/PointTest.cpp @@ -30,8 +30,6 @@ #include // for tuple #include // for Message, TestPartResult, ParamIteratorInter... -// IWYU pragma: no_include - using rawspeed::iPoint2D; using std::make_pair; using std::move; From fccd19c301e5760bcfdab34eb6f9fd9364279e6e Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 03:39:56 +0300 Subject: [PATCH 29/40] Apply clang-tidy-17's `modernize-type-traits` --- src/librawspeed/codes/AbstractPrefixCode.h | 18 +++++++++--------- src/librawspeed/common/Common.h | 5 ++--- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/librawspeed/codes/AbstractPrefixCode.h b/src/librawspeed/codes/AbstractPrefixCode.h index 9ea330d32..8166cf6ea 100644 --- a/src/librawspeed/codes/AbstractPrefixCode.h +++ b/src/librawspeed/codes/AbstractPrefixCode.h @@ -81,10 +81,10 @@ template <> struct CodeTraits final { template struct CodeTraitsValidator final { using Traits = CodeTraits; - static_assert(std::is_integral::value); - static_assert(std::is_unsigned::value); - static_assert(std::is_same::value || - std::is_same::value); + static_assert(std::is_integral_v); + static_assert(std::is_unsigned_v); + static_assert(std::is_same_v || + std::is_same_v); static_assert(Traits::MaxCodeLenghtBits > 0 && Traits::MaxCodeLenghtBits <= @@ -98,10 +98,10 @@ template struct CodeTraitsValidator final { static_assert(Traits::MaxNumCodeValues == 162 || Traits::MaxNumCodeValues == 264); - static_assert(std::is_integral::value); - static_assert(std::is_unsigned::value); - static_assert(std::is_same::value || - std::is_same::value); + static_assert(std::is_integral_v); + static_assert(std::is_unsigned_v); + static_assert(std::is_same_v || + std::is_same_v); static_assert(Traits::MaxCodeValueLenghtBits > 0 && Traits::MaxCodeValueLenghtBits <= @@ -115,7 +115,7 @@ template struct CodeTraitsValidator final { static_assert(Traits::MaxCodeValue == 255 || Traits::MaxCodeValue == 524287); static_assert( - std::is_same::value); + std::is_same_v); static_assert(!Traits::SupportsFullDecode || (Traits::MaxDiffLengthBits > 0 && diff --git a/src/librawspeed/common/Common.h b/src/librawspeed/common/Common.h index 341c236d4..8a79f8e04 100644 --- a/src/librawspeed/common/Common.h +++ b/src/librawspeed/common/Common.h @@ -85,7 +85,7 @@ constexpr unsigned RAWSPEED_READNONE bitwidth([[maybe_unused]] T unused = {}) { template constexpr size_t RAWSPEED_READNONE getMisalignmentOffset( T value, size_t multiple, - typename std::enable_if>::type* /*unused*/ = nullptr) { + std::enable_if_t>* /*unused*/ = nullptr) { if (multiple == 0) return 0; static_assert(bitwidth() >= bitwidth(), @@ -96,8 +96,7 @@ constexpr size_t RAWSPEED_READNONE getMisalignmentOffset( template constexpr size_t RAWSPEED_READNONE getMisalignmentOffset( T value, size_t multiple, - typename std::enable_if>::type* /*unused*/ = - nullptr) { + std::enable_if_t>* /*unused*/ = nullptr) { if (multiple == 0) return 0; return value % multiple; From d379165ffe7664f95e5a7d535b21e70af53da3cd Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 03:54:01 +0300 Subject: [PATCH 30/40] Apply clang-tidy-17's `cppcoreguidelines-use-default-member-init` --- src/librawspeed/adt/CroppedArray2DRef.h | 3 +-- src/librawspeed/decoders/RawDecoder.cpp | 5 +---- src/librawspeed/decoders/RawDecoder.h | 12 ++++++------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/librawspeed/adt/CroppedArray2DRef.h b/src/librawspeed/adt/CroppedArray2DRef.h index 21efbb1f8..b124e8af7 100644 --- a/src/librawspeed/adt/CroppedArray2DRef.h +++ b/src/librawspeed/adt/CroppedArray2DRef.h @@ -46,8 +46,7 @@ template class CroppedArray2DRef { // Conversion from Array2DRef to CroppedArray2DRef. CroppedArray2DRef(Array2DRef RHS) // NOLINT google-explicit-constructor - : base(RHS), offsetCols(0), offsetRows(0), croppedWidth(base.width), - croppedHeight(base.height) {} + : base(RHS), croppedWidth(base.width), croppedHeight(base.height) {} CroppedArray2DRef(Array2DRef base_, int offsetCols_, int offsetRows_, int croppedWidth_, int croppedHeight_); diff --git a/src/librawspeed/decoders/RawDecoder.cpp b/src/librawspeed/decoders/RawDecoder.cpp index 8f32fb1b9..33d9764b8 100644 --- a/src/librawspeed/decoders/RawDecoder.cpp +++ b/src/librawspeed/decoders/RawDecoder.cpp @@ -48,10 +48,7 @@ using std::vector; namespace rawspeed { -RawDecoder::RawDecoder(Buffer file) - : mRaw(RawImage::create()), failOnUnknown(false), - interpolateBadPixels(true), applyStage1DngOpcodes(true), applyCrop(true), - uncorrectedRawValues(false), fujiRotate(true), mFile(file) {} +RawDecoder::RawDecoder(Buffer file) : mRaw(RawImage::create()), mFile(file) {} void RawDecoder::decodeUncompressed(const TiffIFD* rawIFD, BitOrder order) const { diff --git a/src/librawspeed/decoders/RawDecoder.h b/src/librawspeed/decoders/RawDecoder.h index 6dfe598a9..0258bb8bf 100644 --- a/src/librawspeed/decoders/RawDecoder.h +++ b/src/librawspeed/decoders/RawDecoder.h @@ -81,27 +81,27 @@ class RawDecoder { /* support unknown cameras, you can enable this */ /* DNGs are always attempted to be decoded, so this variable has no effect on * DNGs */ - bool failOnUnknown; + bool failOnUnknown{false}; /* Set how to handle bad pixels. */ /* If you disable this parameter, no bad pixel interpolation will be done */ - bool interpolateBadPixels; + bool interpolateBadPixels{true}; /* Apply stage 1 DNG opcodes. */ /* This usually maps out bad pixels, etc */ - bool applyStage1DngOpcodes; + bool applyStage1DngOpcodes{true}; /* Apply crop - if false uncropped image is delivered */ - bool applyCrop; + bool applyCrop{true}; /* This will skip all corrections, and deliver the raw data */ /* This will skip any compression curves or other things that */ /* is needed to get the correct values */ /* Only enable if you are sure that is what you want */ - bool uncorrectedRawValues; + bool uncorrectedRawValues{false}; /* Should Fuji images be rotated? */ - bool fujiRotate; + bool fujiRotate{true}; struct { /* Should Quadrant Multipliers be applied to the IIQ raws? */ From 6334c16d4b1a90d30510da00fc1de25e6dfb5722 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 04:10:06 +0300 Subject: [PATCH 31/40] Apply clang-tidy-17's `cppcoreguidelines-rvalue-reference-param-not-moved` --- src/librawspeed/codes/PrefixCodeLUTDecoder.h | 1 + src/librawspeed/codes/PrefixCodeLookupDecoder.h | 3 ++- src/librawspeed/decompressors/Cr2DecompressorImpl.h | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/librawspeed/codes/PrefixCodeLUTDecoder.h b/src/librawspeed/codes/PrefixCodeLUTDecoder.h index 7a43b59be..d57939b5c 100644 --- a/src/librawspeed/codes/PrefixCodeLUTDecoder.h +++ b/src/librawspeed/codes/PrefixCodeLUTDecoder.h @@ -73,6 +73,7 @@ class PrefixCodeLUTDecoder final : public BackendPrefixCodeDecoder { using Base = BackendPrefixCodeDecoder; using Traits = typename Base::Traits; + // NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved) using Base::Base; private: diff --git a/src/librawspeed/codes/PrefixCodeLookupDecoder.h b/src/librawspeed/codes/PrefixCodeLookupDecoder.h index 9ecb83399..df55c2b7e 100644 --- a/src/librawspeed/codes/PrefixCodeLookupDecoder.h +++ b/src/librawspeed/codes/PrefixCodeLookupDecoder.h @@ -75,10 +75,11 @@ class PrefixCodeLookupDecoder : public AbstractPrefixCodeDecoder { // We only support true Huffman codes, not generic prefix codes. explicit PrefixCodeLookupDecoder(HuffmanCode&& hc) - : Base(hc.operator rawspeed::PrefixCode()) {} + : Base(std::move(hc).operator rawspeed::PrefixCode()) {} PrefixCodeLookupDecoder(PrefixCode) = delete; PrefixCodeLookupDecoder(const PrefixCode&) = delete; + // NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved) PrefixCodeLookupDecoder(PrefixCode&&) = delete; protected: diff --git a/src/librawspeed/decompressors/Cr2DecompressorImpl.h b/src/librawspeed/decompressors/Cr2DecompressorImpl.h index 92a48b62d..92e6bb948 100644 --- a/src/librawspeed/decompressors/Cr2DecompressorImpl.h +++ b/src/librawspeed/decompressors/Cr2DecompressorImpl.h @@ -186,8 +186,8 @@ class Cr2VerticalOutputStripIterator final { Cr2VerticalOutputStripIterator( Cr2OutputTileIterator&& outputTileIterator_, Cr2OutputTileIterator&& outputTileIterator_end_) - : outputTileIterator(outputTileIterator_), - outputTileIterator_end(outputTileIterator_end_) {} + : outputTileIterator(std::move(outputTileIterator_)), + outputTileIterator_end(std::move(outputTileIterator_end_)) {} value_type operator*() const { return coalesce().first; } Cr2VerticalOutputStripIterator& operator++() { From 4f674afd438a12bfc9a74b9e7b6061da4a1c25e7 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 04:17:25 +0300 Subject: [PATCH 32/40] Apply clang-tidy-17's `readability-avoid-unconditional-preprocessor-if` --- .../DeflateDecompressorBenchmark.cpp | 13 +++++----- .../Cr2sRawInterpolatorBenchmark.cpp | 11 ++++---- bench/librawspeed/io/BitStreamBenchmark.cpp | 13 +++++----- src/librawspeed/codes/PrefixCodeLUTDecoder.h | 14 ---------- src/librawspeed/common/RawImage.cpp | 10 ------- src/librawspeed/tiff/TiffEntry.cpp | 26 ++++++++++--------- 6 files changed, 34 insertions(+), 53 deletions(-) diff --git a/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp b/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp index 4a1de06d9..d68b88a8c 100644 --- a/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp +++ b/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp @@ -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); } diff --git a/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp b/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp index 2221f1c98..8ebaf8c65 100644 --- a/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp +++ b/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp @@ -92,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); } diff --git a/bench/librawspeed/io/BitStreamBenchmark.cpp b/bench/librawspeed/io/BitStreamBenchmark.cpp index cc9e6e352..df329fed8 100644 --- a/bench/librawspeed/io/BitStreamBenchmark.cpp +++ b/bench/librawspeed/io/BitStreamBenchmark.cpp @@ -111,12 +111,13 @@ inline void CustomArguments(benchmark::internal::Benchmark* b) { } b->RangeMultiplier(2); -#if 1 - b->Arg(256 << 20); -#else - b->Range(1, 1024 << 20); - b->Complexity(benchmark::oN); -#endif + // NOLINTNEXTLINE(readability-simplify-boolean-expr) + if constexpr ((true)) { + b->Arg(256 << 20); + } else { + b->Range(1, 1024 << 20); + b->Complexity(benchmark::oN); + } b->Unit(benchmark::kMillisecond); } diff --git a/src/librawspeed/codes/PrefixCodeLUTDecoder.h b/src/librawspeed/codes/PrefixCodeLUTDecoder.h index d57939b5c..c8e979f4a 100644 --- a/src/librawspeed/codes/PrefixCodeLUTDecoder.h +++ b/src/librawspeed/codes/PrefixCodeLUTDecoder.h @@ -77,11 +77,6 @@ class PrefixCodeLUTDecoder final : public BackendPrefixCodeDecoder { using Base::Base; private: - // The code can be compiled with two different decode lookup table layouts. - // The idea is that different CPU architectures may perform better with - // one or the other, depending on the relative performance of their arithmetic - // core vs their memory access. For an Intel Core i7, the big table is better. -#if 1 // lookup table containing 3 fields: payload:16|flag:8|len:8 // The payload may be the fully decoded diff or the length of the diff. // The len field contains the number of bits, this lookup consumed. @@ -94,15 +89,6 @@ class PrefixCodeLUTDecoder final : public BackendPrefixCodeDecoder { using LUTEntryTy = int32_t; using LUTUnsignedEntryTy = std::make_unsigned_t; std::vector decodeLookup; -#else - // lookup table containing 2 fields: payload:4|len:4 - // the payload is the length of the diff, len is the length of the code - static constexpr unsigned LookupDepth = 15; - static constexpr unsigned PayloadShift = 4; - static constexpr unsigned FlagMask = 0; - static constexpr unsigned LenMask = 0x0f; - std::vector decodeLookup; -#endif public: void setup(bool fullDecode_, bool fixDNGBug16_) { diff --git a/src/librawspeed/common/RawImage.cpp b/src/librawspeed/common/RawImage.cpp index aaa12af03..d615b125f 100644 --- a/src/librawspeed/common/RawImage.cpp +++ b/src/librawspeed/common/RawImage.cpp @@ -235,16 +235,6 @@ void RawImageData::fixBadPixels() { /* Transfer if not already done */ transferBadPixelsToMap(); -#if 0 // For testing purposes - if (!mBadPixelMap) - createBadPixelMap(); - for (int y = 400; y < 700; y++){ - for (int x = 1200; x < 1700; x++) { - mBadPixelMap[mBadPixelMapPitch * y + (x >> 3)] |= 1 << (x&7); - } - } -#endif - /* Process bad pixels, if any */ if (!mBadPixelMap.empty()) startWorker(RawImageWorker::RawImageWorkerTask::FIX_BAD_PIXELS, false); diff --git a/src/librawspeed/tiff/TiffEntry.cpp b/src/librawspeed/tiff/TiffEntry.cpp index 1e69184c1..e690ee736 100644 --- a/src/librawspeed/tiff/TiffEntry.cpp +++ b/src/librawspeed/tiff/TiffEntry.cpp @@ -70,18 +70,20 @@ TiffEntry::TiffEntry(TiffIFD* parent_, ByteStream& bs) TiffTag::MAKERNOTE_ALT, TiffTag::FUJI_RAW_IFD, TiffTag::SUBIFDS, TiffTag::EXIFIFDPOINTER})) { // preserve offset for SUB_IFD/EXIF/MAKER_NOTE data -#if 0 - // limit access to range from 0 to data_offset+byte_size - data = ByteStream(bs, data_offset, byte_size, bs.getByteOrder()); -#else - // allow access to whole file, necessary if offsets inside the maker note - // point to outside data, which is forbidden due to the TIFF/DNG spec but - // may happen none the less (see e.g. "old" ORF files like EX-1, note: - // the tags outside of the maker note area are currently not used anyway) - data = bs; - data.setPosition(data_offset); - (void)data.check(byte_size); -#endif + // NOLINTNEXTLINE(readability-simplify-boolean-expr) + if constexpr ((false)) { + // limit access to range from 0 to data_offset+byte_size + data = bs.getSubStream(data_offset, byte_size); + } else { + // allow access to whole file, necessary if offsets inside the maker + // note point to outside data, which is forbidden due to the TIFF/DNG + // spec but may happen none the less (see e.g. "old" ORF files like + // EX-1, note: the tags outside of the maker note area are currently not + // used anyway) + data = bs; + data.setPosition(data_offset); + (void)data.check(byte_size); + } } else { data = bs.getSubStream(data_offset, byte_size); } From feaa27bd57b742278e305ea871047f350d06c39a Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 04:24:11 +0300 Subject: [PATCH 33/40] Apply clang-tidy-17's `cppcoreguidelines-missing-std-forward` --- .../adt/DefaultInitAllocatorAdaptorBenchmark.cpp | 2 +- src/librawspeed/common/SimpleLUT.h | 2 +- src/librawspeed/decompressors/FujiDecompressor.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp b/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp index b9dfc1780..17c4bc72d 100644 --- a/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp +++ b/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp @@ -42,7 +42,7 @@ void construct_with_zeroinit(benchmark::State& state) { } template -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); diff --git a/src/librawspeed/common/SimpleLUT.h b/src/librawspeed/common/SimpleLUT.h index 28c41dbfa..ccd7bdd8c 100644 --- a/src/librawspeed/common/SimpleLUT.h +++ b/src/librawspeed/common/SimpleLUT.h @@ -49,7 +49,7 @@ template class SimpleLUT final { typename = std::enable_if>>> - explicit SimpleLUT(F&& f) { + explicit SimpleLUT(F f) { const auto fullTableSize = 1U << TableBitWidth; table.reserve(fullTableSize); std::generate_n(std::back_inserter(table), fullTableSize, diff --git a/src/librawspeed/decompressors/FujiDecompressor.cpp b/src/librawspeed/decompressors/FujiDecompressor.cpp index 41a13e236..aff815be2 100644 --- a/src/librawspeed/decompressors/FujiDecompressor.cpp +++ b/src/librawspeed/decompressors/FujiDecompressor.cpp @@ -256,7 +256,7 @@ struct fuji_compressed_block { void fuji_decode_strip(const FujiStrip& strip); template - void copy_line(const FujiStrip& strip, int cur_line, T&& idx) const; + void copy_line(const FujiStrip& strip, int cur_line, T idx) const; void copy_line_to_xtrans(const FujiStrip& strip, int cur_line) const; void copy_line_to_bayer(const FujiStrip& strip, int cur_line) const; @@ -286,7 +286,7 @@ struct fuji_compressed_block { void fuji_extend_blue() const; template - inline void fuji_decode_block(T&& func_even, int cur_line); + inline void fuji_decode_block(T func_even, int cur_line); void xtrans_decode_block(int cur_line); void fuji_bayer_decode_block(int cur_line); }; @@ -334,7 +334,7 @@ void fuji_compressed_block::reset(const fuji_compressed_params& params) { template void fuji_compressed_block::copy_line(const FujiStrip& strip, int cur_line, - T&& idx) const { + T idx) const { std::array.x * MCU.y> CFAData; if constexpr (std::is_same_v) CFAData = getAsCFAColors(XTransPhase(0, 0)); @@ -601,7 +601,7 @@ void fuji_compressed_block::fuji_extend_blue() const { template __attribute__((always_inline)) void -fuji_compressed_block::fuji_decode_block(T&& func_even, +fuji_compressed_block::fuji_decode_block(T func_even, [[maybe_unused]] int cur_line) { invariant(common_info.line_width % 2 == 0); const int line_width = common_info.line_width / 2; From 2c9e9d1913dda408edd4ef19e190d5500afd0766 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 04:29:08 +0300 Subject: [PATCH 34/40] Apply clang-tidy-17's `performance-move-const-arg` --- src/librawspeed/decompressors/Cr2DecompressorImpl.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/librawspeed/decompressors/Cr2DecompressorImpl.h b/src/librawspeed/decompressors/Cr2DecompressorImpl.h index 92e6bb948..e479a3e83 100644 --- a/src/librawspeed/decompressors/Cr2DecompressorImpl.h +++ b/src/librawspeed/decompressors/Cr2DecompressorImpl.h @@ -183,11 +183,10 @@ class Cr2VerticalOutputStripIterator final { using pointer = const value_type*; // Unusable, but must be here. using reference = const value_type&; // Unusable, but must be here. - Cr2VerticalOutputStripIterator( - Cr2OutputTileIterator&& outputTileIterator_, - Cr2OutputTileIterator&& outputTileIterator_end_) - : outputTileIterator(std::move(outputTileIterator_)), - outputTileIterator_end(std::move(outputTileIterator_end_)) {} + Cr2VerticalOutputStripIterator(Cr2OutputTileIterator outputTileIterator_, + Cr2OutputTileIterator outputTileIterator_end_) + : outputTileIterator(outputTileIterator_), + outputTileIterator_end(outputTileIterator_end_) {} value_type operator*() const { return coalesce().first; } Cr2VerticalOutputStripIterator& operator++() { From c67b6f17eb330a37f2f9259c8aa69f39a5b1e84a Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 04:31:38 +0300 Subject: [PATCH 35/40] Apply clang-tidy-17's `bugprone-switch-missing-default-case` --- src/librawspeed/decompressors/DeflateDecompressor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librawspeed/decompressors/DeflateDecompressor.cpp b/src/librawspeed/decompressors/DeflateDecompressor.cpp index ff66c3bbe..8a7c6dd5b 100644 --- a/src/librawspeed/decompressors/DeflateDecompressor.cpp +++ b/src/librawspeed/decompressors/DeflateDecompressor.cpp @@ -163,6 +163,8 @@ void DeflateDecompressor::decode( case 4: decodeFPDeltaRow(src, maxDim.x, out[row]); break; + default: + __builtin_unreachable(); } } } From 3373efc742a49024bacd0ca047f8b871890d5dad Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 04:41:36 +0300 Subject: [PATCH 36/40] Apply clang-tidy-17's `bugprone-empty-catch` --- fuzz/librawspeed/common/DngOpcodes.cpp | 2 +- .../librawspeed/decompressors/Cr2Decompressor.cpp | 2 +- .../librawspeed/decompressors/Cr2LJpegDecoder.cpp | 2 +- .../librawspeed/decompressors/CrwDecompressor.cpp | 2 +- .../decompressors/DummyLJpegDecoder.cpp | 2 +- .../decompressors/FujiDecompressor.cpp | 2 +- .../decompressors/HasselbladDecompressor.cpp | 2 +- .../decompressors/HasselbladLJpegDecoder.cpp | 2 +- .../decompressors/KodakDecompressor.cpp | 2 +- fuzz/librawspeed/decompressors/LJpegDecoder.cpp | 2 +- .../decompressors/LJpegDecompressor.cpp | 2 +- .../decompressors/NikonDecompressor.cpp | 2 +- .../decompressors/OlympusDecompressor.cpp | 2 +- .../decompressors/PanasonicV4Decompressor.cpp | 2 +- .../decompressors/PanasonicV5Decompressor.cpp | 2 +- .../decompressors/PanasonicV6Decompressor.cpp | 2 +- .../decompressors/PanasonicV7Decompressor.cpp | 2 +- .../decompressors/PentaxDecompressor.cpp | 2 +- .../decompressors/PhaseOneDecompressor.cpp | 2 +- .../decompressors/SamsungV0Decompressor.cpp | 2 +- .../decompressors/SamsungV1Decompressor.cpp | 2 +- .../decompressors/SamsungV2Decompressor.cpp | 2 +- .../decompressors/SonyArw1Decompressor.cpp | 2 +- .../decompressors/SonyArw2Decompressor.cpp | 2 +- .../decompressors/UncompressedDecompressor.cpp | 2 +- .../librawspeed/decompressors/VC5Decompressor.cpp | 2 +- src/librawspeed/parsers/RawParser.cpp | 15 ++++++++++----- 27 files changed, 36 insertions(+), 31 deletions(-) diff --git a/fuzz/librawspeed/common/DngOpcodes.cpp b/fuzz/librawspeed/common/DngOpcodes.cpp index fbb814ceb..adccd8ebd 100644 --- a/fuzz/librawspeed/common/DngOpcodes.cpp +++ b/fuzz/librawspeed/common/DngOpcodes.cpp @@ -96,7 +96,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { mRaw->getByteDataAsUncroppedArray2DRef()); mRaw->transferBadPixelsToMap(); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp b/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp index 7442edf61..da078be02 100644 --- a/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp @@ -123,7 +123,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp b/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp index e25db273f..889497c07 100644 --- a/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp +++ b/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp @@ -57,7 +57,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/CrwDecompressor.cpp b/fuzz/librawspeed/decompressors/CrwDecompressor.cpp index 8e3395c5d..f8c99a370 100644 --- a/fuzz/librawspeed/decompressors/CrwDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/CrwDecompressor.cpp @@ -52,7 +52,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/DummyLJpegDecoder.cpp b/fuzz/librawspeed/decompressors/DummyLJpegDecoder.cpp index 897a50163..5c810e359 100644 --- a/fuzz/librawspeed/decompressors/DummyLJpegDecoder.cpp +++ b/fuzz/librawspeed/decompressors/DummyLJpegDecoder.cpp @@ -61,7 +61,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { mRaw->createData(); // no image data was actually be decoded, so don't check for initialization - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/FujiDecompressor.cpp b/fuzz/librawspeed/decompressors/FujiDecompressor.cpp index 2f417db0b..a6273035a 100644 --- a/fuzz/librawspeed/decompressors/FujiDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/FujiDecompressor.cpp @@ -50,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp b/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp index e4640ff4e..624f10d31 100644 --- a/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp @@ -56,7 +56,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/HasselbladLJpegDecoder.cpp b/fuzz/librawspeed/decompressors/HasselbladLJpegDecoder.cpp index 5b8ea7a50..e19089871 100644 --- a/fuzz/librawspeed/decompressors/HasselbladLJpegDecoder.cpp +++ b/fuzz/librawspeed/decompressors/HasselbladLJpegDecoder.cpp @@ -48,7 +48,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/KodakDecompressor.cpp b/fuzz/librawspeed/decompressors/KodakDecompressor.cpp index c14493e2b..a405e2352 100644 --- a/fuzz/librawspeed/decompressors/KodakDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/KodakDecompressor.cpp @@ -54,7 +54,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/LJpegDecoder.cpp b/fuzz/librawspeed/decompressors/LJpegDecoder.cpp index 417cbf70d..9808d8349 100644 --- a/fuzz/librawspeed/decompressors/LJpegDecoder.cpp +++ b/fuzz/librawspeed/decompressors/LJpegDecoder.cpp @@ -53,7 +53,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { // we can not check that all the image was initialized, because normally // LJpegDecoder decodes just some one tile/slice. - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp b/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp index 554e4dd0f..1275ad8ef 100644 --- a/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp @@ -92,7 +92,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/NikonDecompressor.cpp b/fuzz/librawspeed/decompressors/NikonDecompressor.cpp index ab2c7b47b..8a7416b92 100644 --- a/fuzz/librawspeed/decompressors/NikonDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/NikonDecompressor.cpp @@ -54,7 +54,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/OlympusDecompressor.cpp b/fuzz/librawspeed/decompressors/OlympusDecompressor.cpp index 1f4ce0490..3ead85472 100644 --- a/fuzz/librawspeed/decompressors/OlympusDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/OlympusDecompressor.cpp @@ -50,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/PanasonicV4Decompressor.cpp b/fuzz/librawspeed/decompressors/PanasonicV4Decompressor.cpp index caa5be7b9..889cfba4f 100644 --- a/fuzz/librawspeed/decompressors/PanasonicV4Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/PanasonicV4Decompressor.cpp @@ -53,7 +53,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp b/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp index 8420336c6..f62978f38 100644 --- a/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp @@ -51,7 +51,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/PanasonicV6Decompressor.cpp b/fuzz/librawspeed/decompressors/PanasonicV6Decompressor.cpp index fe2fa10c7..e3b7add0e 100644 --- a/fuzz/librawspeed/decompressors/PanasonicV6Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/PanasonicV6Decompressor.cpp @@ -51,7 +51,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/PanasonicV7Decompressor.cpp b/fuzz/librawspeed/decompressors/PanasonicV7Decompressor.cpp index af8a998ed..f90412461 100644 --- a/fuzz/librawspeed/decompressors/PanasonicV7Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/PanasonicV7Decompressor.cpp @@ -50,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp b/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp index d37e41be9..28e7cb5bb 100644 --- a/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp @@ -59,7 +59,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp b/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp index f5fbd679e..16dda1420 100644 --- a/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp @@ -62,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/SamsungV0Decompressor.cpp b/fuzz/librawspeed/decompressors/SamsungV0Decompressor.cpp index 35895a793..48bf5d935 100644 --- a/fuzz/librawspeed/decompressors/SamsungV0Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SamsungV0Decompressor.cpp @@ -52,7 +52,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/SamsungV1Decompressor.cpp b/fuzz/librawspeed/decompressors/SamsungV1Decompressor.cpp index 4a1d9556a..20978a6fb 100644 --- a/fuzz/librawspeed/decompressors/SamsungV1Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SamsungV1Decompressor.cpp @@ -51,7 +51,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/SamsungV2Decompressor.cpp b/fuzz/librawspeed/decompressors/SamsungV2Decompressor.cpp index 9c60f614e..afa731591 100644 --- a/fuzz/librawspeed/decompressors/SamsungV2Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SamsungV2Decompressor.cpp @@ -51,7 +51,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/SonyArw1Decompressor.cpp b/fuzz/librawspeed/decompressors/SonyArw1Decompressor.cpp index 98323cbd4..a132b436e 100644 --- a/fuzz/librawspeed/decompressors/SonyArw1Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SonyArw1Decompressor.cpp @@ -50,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/SonyArw2Decompressor.cpp b/fuzz/librawspeed/decompressors/SonyArw2Decompressor.cpp index f0a4677f4..c5d1e9bbb 100644 --- a/fuzz/librawspeed/decompressors/SonyArw2Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SonyArw2Decompressor.cpp @@ -50,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp b/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp index 96ab6c35f..bf6253c6f 100644 --- a/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp @@ -68,7 +68,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/fuzz/librawspeed/decompressors/VC5Decompressor.cpp b/fuzz/librawspeed/decompressors/VC5Decompressor.cpp index 102c90839..56ed49066 100644 --- a/fuzz/librawspeed/decompressors/VC5Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/VC5Decompressor.cpp @@ -58,7 +58,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { // It is expected to be the only DNG tile, and to fill the entire image. rawspeed::MSan::CheckMemIsInitialized( mRaw->getByteDataAsUncroppedArray2DRef()); - } catch (const rawspeed::RawspeedException&) { + } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch) // Exceptions are good, crashes are bad. } diff --git a/src/librawspeed/parsers/RawParser.cpp b/src/librawspeed/parsers/RawParser.cpp index c22b40ef0..b4d8cd523 100644 --- a/src/librawspeed/parsers/RawParser.cpp +++ b/src/librawspeed/parsers/RawParser.cpp @@ -50,7 +50,8 @@ std::unique_ptr RawParser::getDecoder(const CameraMetaData* meta) { if (MrwDecoder::isMRW(mInput)) { try { return std::make_unique(mInput); - } catch (const RawDecoderException&) { + } catch (const RawDecoderException&) { // NOLINT(bugprone-empty-catch) + // Yes, just ignore the exception. } } @@ -60,7 +61,8 @@ std::unique_ptr RawParser::getDecoder(const CameraMetaData* meta) { try { FiffParser p(mInput); return p.getDecoder(meta); - } catch (const FiffParserException&) { + } catch (const FiffParserException&) { // NOLINT(bugprone-empty-catch) + // Yes, just ignore the exception. } } @@ -68,14 +70,16 @@ std::unique_ptr RawParser::getDecoder(const CameraMetaData* meta) { try { TiffParser p(mInput); return p.getDecoder(meta); - } catch (const TiffParserException&) { + } catch (const TiffParserException&) { // NOLINT(bugprone-empty-catch) + // Yes, just ignore the exception. } // CIFF images try { CiffParser p(mInput); return p.getDecoder(meta); - } catch (const CiffParserException&) { + } catch (const CiffParserException&) { // NOLINT(bugprone-empty-catch) + // Yes, just ignore the exception. } // Detect camera on filesize (CHDK). @@ -84,7 +88,8 @@ std::unique_ptr RawParser::getDecoder(const CameraMetaData* meta) { try { return std::make_unique(mInput, c); - } catch (const RawDecoderException&) { + } catch (const RawDecoderException&) { // NOLINT(bugprone-empty-catch) + // Yes, just ignore the exception. } } From 0c0580257bf0e4a895536ed3ac18800a3cee9562 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 04:45:31 +0300 Subject: [PATCH 37/40] Apply clang-tidy-17's `performance-avoid-endl` --- src/utilities/rstest/rstest.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/utilities/rstest/rstest.cpp b/src/utilities/rstest/rstest.cpp index 1f34316c9..afae6b406 100644 --- a/src/utilities/rstest/rstest.cpp +++ b/src/utilities/rstest/rstest.cpp @@ -62,7 +62,6 @@ using rawspeed::RawspeedException; using rawspeed::roundUp; using std::cerr; using std::cout; -using std::endl; using std::ifstream; using std::istreambuf_iterator; using std::map; @@ -350,7 +349,7 @@ size_t process(const std::string& filename, const CameraMetaData* metadata, #pragma omp critical(io) #endif cout << left << setw(55) << filename << ": hash " - << (o.create ? "exists" : "missing") << ", skipping" << endl; + << (o.create ? "exists" : "missing") << ", skipping" << '\n'; #endif return 0; } @@ -360,7 +359,7 @@ size_t process(const std::string& filename, const CameraMetaData* metadata, #ifdef HAVE_OPENMP #pragma omp critical(io) #endif - cout << left << setw(55) << filename << ": starting decoding ... " << endl; + cout << left << setw(55) << filename << ": starting decoding ... " << '\n'; #endif FileReader reader(filename.c_str()); @@ -394,7 +393,7 @@ size_t process(const std::string& filename, const CameraMetaData* metadata, #endif cout << left << setw(55) << filename << ": " << internal << setw(3) << buf.getSize() / 1000000 << " MB / " << setw(4) << time << " ms" - << endl; + << '\n'; #endif if (o.create) { @@ -435,9 +434,9 @@ int results(const map>& failedTests, if (failedTests.empty()) { cout << "All good, "; if (!o.create) - cout << "no tests failed!" << endl; + cout << "no tests failed!" << '\n'; else - cout << "all hashes created!" << endl; + cout << "all hashes created!" << '\n'; return 0; } @@ -564,14 +563,14 @@ int main(int argc, char **argv) { { std::string msg = std::string(argv[i]) + " failed: " + e.what(); #if !defined(__has_feature) || !__has_feature(thread_sanitizer) - cerr << msg << endl; + cerr << msg << '\n'; #endif failedTests.try_emplace(argv[i], msg); } } } - cout << "Total decoding time: " << time / 1000.0 << "s" << endl << endl; + cout << "Total decoding time: " << time / 1000.0 << "s" << '\n' << '\n'; return results(failedTests, o); } From b288d738aff52d19e2a1536f8ab38bb447319066 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 05:00:23 +0300 Subject: [PATCH 38/40] `TiffEntry::getString()`: rewrite to pacify `misc-include-cleaner` --- src/librawspeed/tiff/TiffEntry.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/librawspeed/tiff/TiffEntry.cpp b/src/librawspeed/tiff/TiffEntry.cpp index e690ee736..72659499d 100644 --- a/src/librawspeed/tiff/TiffEntry.cpp +++ b/src/librawspeed/tiff/TiffEntry.cpp @@ -30,11 +30,11 @@ #include "parsers/TiffParserException.h" // for ThrowException, ThrowTPE #include "tiff/TiffIFD.h" // for TiffIFD, TiffRootIFD #include "tiff/TiffTag.h" // for TiffTag, TiffTag::DNGPRIVAT... +#include #include #include // for assert #include // for uint32_t, uint8_t, int32_t -#include -#include // for string +#include // for string namespace rawspeed { @@ -283,10 +283,10 @@ std::string TiffEntry::getString() const { static_cast(type)); // *NOT* ByteStream::peekString() ! - const auto bufSize = data.getRemainSize(); - const auto* buf = data.peekData(bufSize); - const auto* s = reinterpret_cast(buf); - return {s, strnlen(s, bufSize)}; + Buffer tmp = data.peekBuffer(data.getRemainSize()); + const auto* termIter = std::find(tmp.begin(), tmp.end(), '\0'); + return {reinterpret_cast(tmp.begin()), + reinterpret_cast(termIter)}; } DataBuffer TiffEntry::getRootIfdData() const { From 237612851bf09c4e1c2b72ab9a5017b95cad2028 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 2 Nov 2023 16:35:52 +0300 Subject: [PATCH 39/40] Drop all justification comments on include lines --- .../DefaultInitAllocatorAdaptorBenchmark.cpp | 12 ++--- bench/librawspeed/bench/Common.cpp | 10 ++-- bench/librawspeed/bench/Common.h | 6 +-- .../DeflateDecompressorBenchmark.cpp | 30 +++++------ .../UncompressedDecompressorBenchmark.cpp | 30 +++++------ .../Cr2sRawInterpolatorBenchmark.cpp | 20 +++---- bench/librawspeed/io/BitStreamBenchmark.cpp | 30 +++++------ .../metadata/CameraMetaDataBenchmark.cpp | 8 +-- cmake/Modules/cpu-cache-line-size.cpp | 6 +-- cmake/Modules/cpu-large-page-size.cpp | 4 +- cmake/Modules/cpu-page-size.cpp | 4 +- fuzz/libFuzzer_dummy_main.cpp | 28 +++++----- .../codes/PrefixCodeDecoder/Common.h | 6 +-- .../codes/PrefixCodeDecoder/Dual.cpp | 32 +++++------ .../codes/PrefixCodeDecoder/Solo.cpp | 32 +++++------ fuzz/librawspeed/common/DngOpcodes.cpp | 26 ++++----- .../decoders/TiffDecoders/main.cpp | 54 +++++++++---------- .../decompressors/Cr2Decompressor.cpp | 28 +++++----- .../decompressors/Cr2LJpegDecoder.cpp | 20 +++---- .../decompressors/CrwDecompressor.cpp | 22 ++++---- .../decompressors/DummyLJpegDecoder.cpp | 20 +++---- .../decompressors/FujiDecompressor.cpp | 24 ++++----- .../decompressors/HasselbladDecompressor.cpp | 24 ++++----- .../decompressors/HasselbladLJpegDecoder.cpp | 22 ++++---- .../decompressors/KodakDecompressor.cpp | 22 ++++---- .../decompressors/LJpegDecoder.cpp | 20 +++---- .../decompressors/LJpegDecompressor.cpp | 26 ++++----- .../decompressors/NikonDecompressor.cpp | 22 ++++---- .../decompressors/OlympusDecompressor.cpp | 22 ++++---- .../decompressors/PanasonicV4Decompressor.cpp | 22 ++++---- .../decompressors/PanasonicV5Decompressor.cpp | 18 +++---- .../decompressors/PanasonicV6Decompressor.cpp | 20 +++---- .../decompressors/PanasonicV7Decompressor.cpp | 20 +++---- .../decompressors/PentaxDecompressor.cpp | 22 ++++---- .../decompressors/PhaseOneDecompressor.cpp | 28 +++++----- .../decompressors/SamsungV0Decompressor.cpp | 22 ++++---- .../decompressors/SamsungV1Decompressor.cpp | 22 ++++---- .../decompressors/SamsungV2Decompressor.cpp | 22 ++++---- .../decompressors/SonyArw1Decompressor.cpp | 22 ++++---- .../decompressors/SonyArw2Decompressor.cpp | 22 ++++---- .../UncompressedDecompressor.cpp | 20 +++---- .../decompressors/VC5Decompressor.cpp | 24 ++++----- fuzz/librawspeed/fuzz/Common.cpp | 10 ++-- fuzz/librawspeed/fuzz/Common.h | 4 +- fuzz/librawspeed/fuzz/RawSpeed.cpp | 4 +- fuzz/librawspeed/parsers/main.cpp | 28 +++++----- fuzz/rawspeed/main.cpp | 8 +-- src/external/AddressSanitizer.h | 2 +- src/external/MemorySanitizer.h | 6 +-- src/librawspeed/adt/AlignedAllocator.h | 8 +-- src/librawspeed/adt/Array1DRef.h | 8 +-- src/librawspeed/adt/Array2DRef.h | 10 ++-- src/librawspeed/adt/BitIterator.h | 8 +-- src/librawspeed/adt/CroppedArray1DRef.h | 10 ++-- src/librawspeed/adt/CroppedArray2DRef.h | 8 +-- .../adt/DefaultInitAllocatorAdaptor.h | 8 +-- src/librawspeed/adt/Invariant.h | 2 +- src/librawspeed/adt/Mutex.h | 6 +-- src/librawspeed/adt/NORangesSet.h | 14 ++--- src/librawspeed/adt/NotARational.h | 2 +- src/librawspeed/adt/Point.h | 14 ++--- src/librawspeed/adt/Range.h | 12 ++--- src/librawspeed/adt/iterator_range.h | 2 +- src/librawspeed/codes/AbstractPrefixCode.h | 12 ++--- .../codes/AbstractPrefixCodeDecoder.h | 26 ++++----- src/librawspeed/codes/BinaryPrefixTree.h | 12 ++--- .../codes/DummyPrefixCodeDecoder.h | 18 +++---- src/librawspeed/codes/HuffmanCode.h | 30 +++++------ src/librawspeed/codes/PrefixCode.h | 22 ++++---- src/librawspeed/codes/PrefixCodeDecoder.h | 9 ++-- src/librawspeed/codes/PrefixCodeLUTDecoder.h | 20 +++---- .../codes/PrefixCodeLookupDecoder.h | 20 +++---- src/librawspeed/codes/PrefixCodeTreeDecoder.h | 26 ++++----- .../codes/PrefixCodeVectorDecoder.h | 18 +++---- src/librawspeed/common/BayerPhase.h | 22 ++++---- src/librawspeed/common/ChecksumFile.cpp | 12 ++--- src/librawspeed/common/ChecksumFile.h | 4 +- src/librawspeed/common/Common.cpp | 4 +- src/librawspeed/common/Common.h | 26 ++++----- src/librawspeed/common/Cpuid.cpp | 2 +- src/librawspeed/common/Cpuid.h | 2 +- src/librawspeed/common/DngOpcodes.cpp | 34 ++++++------ src/librawspeed/common/DngOpcodes.h | 12 ++--- src/librawspeed/common/ErrorLog.cpp | 4 +- src/librawspeed/common/ErrorLog.h | 8 +-- src/librawspeed/common/FloatingPoint.h | 2 +- .../common/GetNumberOfProcessorCores.cpp | 6 +-- src/librawspeed/common/RawImage.cpp | 20 +++---- src/librawspeed/common/RawImage.h | 44 +++++++-------- src/librawspeed/common/RawImageDataFloat.cpp | 22 ++++---- src/librawspeed/common/RawImageDataU16.cpp | 32 +++++------ src/librawspeed/common/RawspeedException.h | 12 ++--- src/librawspeed/common/SimpleLUT.h | 14 ++--- src/librawspeed/common/Spline.h | 18 +++---- src/librawspeed/common/TableLookUp.cpp | 10 ++-- src/librawspeed/common/TableLookUp.h | 4 +- src/librawspeed/common/XTransPhase.h | 22 ++++---- .../decoders/AbstractTiffDecoder.cpp | 10 ++-- .../decoders/AbstractTiffDecoder.h | 14 ++--- src/librawspeed/decoders/ArwDecoder.cpp | 48 ++++++++--------- src/librawspeed/decoders/ArwDecoder.h | 14 ++--- src/librawspeed/decoders/Cr2Decoder.cpp | 42 +++++++-------- src/librawspeed/decoders/Cr2Decoder.h | 12 ++--- src/librawspeed/decoders/CrwDecoder.cpp | 38 ++++++------- src/librawspeed/decoders/CrwDecoder.h | 10 ++-- src/librawspeed/decoders/DcrDecoder.cpp | 26 ++++----- src/librawspeed/decoders/DcrDecoder.h | 10 ++-- src/librawspeed/decoders/DcsDecoder.cpp | 26 ++++----- src/librawspeed/decoders/DcsDecoder.h | 12 ++--- src/librawspeed/decoders/DngDecoder.cpp | 52 +++++++++--------- src/librawspeed/decoders/DngDecoder.h | 12 ++--- src/librawspeed/decoders/ErfDecoder.cpp | 26 ++++----- src/librawspeed/decoders/ErfDecoder.h | 10 ++-- src/librawspeed/decoders/IiqDecoder.cpp | 54 +++++++++---------- src/librawspeed/decoders/IiqDecoder.h | 14 ++--- src/librawspeed/decoders/KdcDecoder.cpp | 38 ++++++------- src/librawspeed/decoders/KdcDecoder.h | 10 ++-- src/librawspeed/decoders/MefDecoder.cpp | 16 +++--- src/librawspeed/decoders/MefDecoder.h | 10 ++-- src/librawspeed/decoders/MosDecoder.cpp | 42 +++++++-------- src/librawspeed/decoders/MosDecoder.h | 10 ++-- src/librawspeed/decoders/MrwDecoder.cpp | 26 ++++----- src/librawspeed/decoders/MrwDecoder.h | 14 ++--- src/librawspeed/decoders/NakedDecoder.cpp | 24 ++++----- src/librawspeed/decoders/NakedDecoder.h | 14 ++--- src/librawspeed/decoders/NefDecoder.cpp | 48 ++++++++--------- src/librawspeed/decoders/NefDecoder.h | 20 +++---- src/librawspeed/decoders/OrfDecoder.cpp | 38 ++++++------- src/librawspeed/decoders/OrfDecoder.h | 14 ++--- src/librawspeed/decoders/PefDecoder.cpp | 32 +++++------ src/librawspeed/decoders/PefDecoder.h | 10 ++-- src/librawspeed/decoders/RafDecoder.cpp | 46 ++++++++-------- src/librawspeed/decoders/RafDecoder.h | 10 ++-- src/librawspeed/decoders/RawDecoder.cpp | 42 +++++++-------- src/librawspeed/decoders/RawDecoder.h | 12 ++--- .../decoders/RawDecoderException.h | 4 +- src/librawspeed/decoders/Rw2Decoder.cpp | 42 +++++++-------- src/librawspeed/decoders/Rw2Decoder.h | 12 ++--- .../decoders/SimpleTiffDecoder.cpp | 14 ++--- src/librawspeed/decoders/SimpleTiffDecoder.h | 10 ++-- src/librawspeed/decoders/SrwDecoder.cpp | 40 +++++++------- src/librawspeed/decoders/SrwDecoder.h | 12 ++--- src/librawspeed/decoders/StiDecoder.cpp | 26 ++++----- src/librawspeed/decoders/StiDecoder.h | 10 ++-- src/librawspeed/decoders/ThreefrDecoder.cpp | 30 +++++------ src/librawspeed/decoders/ThreefrDecoder.h | 10 ++-- .../decompressors/AbstractDngDecompressor.cpp | 36 ++++++------- .../decompressors/AbstractDngDecompressor.h | 18 +++---- .../decompressors/AbstractLJpegDecoder.cpp | 28 +++++----- .../decompressors/AbstractLJpegDecoder.h | 24 ++++----- .../AbstractSamsungDecompressor.h | 6 +-- .../decompressors/Cr2Decompressor.cpp | 4 +- .../decompressors/Cr2Decompressor.h | 36 ++++++------- .../decompressors/Cr2DecompressorImpl.h | 42 +++++++-------- .../decompressors/Cr2LJpegDecoder.cpp | 24 ++++----- .../decompressors/Cr2LJpegDecoder.h | 8 +-- .../decompressors/CrwDecompressor.cpp | 30 +++++------ .../decompressors/CrwDecompressor.h | 14 ++--- .../decompressors/DeflateDecompressor.cpp | 30 +++++------ .../decompressors/DeflateDecompressor.h | 12 ++--- .../decompressors/FujiDecompressor.cpp | 48 ++++++++--------- .../decompressors/FujiDecompressor.h | 26 ++++----- .../decompressors/HasselbladDecompressor.cpp | 18 +++---- .../decompressors/HasselbladDecompressor.h | 36 ++++++------- .../decompressors/HasselbladLJpegDecoder.cpp | 14 ++--- .../decompressors/HasselbladLJpegDecoder.h | 4 +- .../decompressors/JpegDecompressor.cpp | 22 ++++---- .../decompressors/JpegDecompressor.h | 12 ++--- .../decompressors/KodakDecompressor.cpp | 24 ++++----- .../decompressors/KodakDecompressor.h | 10 ++-- .../decompressors/LJpegDecoder.cpp | 20 +++---- src/librawspeed/decompressors/LJpegDecoder.h | 4 +- .../decompressors/LJpegDecompressor.cpp | 22 ++++---- .../decompressors/LJpegDecompressor.h | 20 +++---- .../decompressors/NikonDecompressor.cpp | 32 +++++------ .../decompressors/NikonDecompressor.h | 12 ++--- .../decompressors/OlympusDecompressor.cpp | 24 ++++----- .../decompressors/OlympusDecompressor.h | 16 +++--- .../decompressors/PanasonicV4Decompressor.cpp | 34 ++++++------ .../decompressors/PanasonicV4Decompressor.h | 14 ++--- .../decompressors/PanasonicV5Decompressor.cpp | 32 +++++------ .../decompressors/PanasonicV5Decompressor.h | 18 +++---- .../decompressors/PanasonicV6Decompressor.cpp | 22 ++++---- .../decompressors/PanasonicV6Decompressor.h | 8 +-- .../decompressors/PanasonicV7Decompressor.cpp | 24 ++++----- .../decompressors/PanasonicV7Decompressor.h | 10 ++-- .../decompressors/PentaxDecompressor.cpp | 30 +++++------ .../decompressors/PentaxDecompressor.h | 12 ++--- .../decompressors/PhaseOneDecompressor.cpp | 28 +++++----- .../decompressors/PhaseOneDecompressor.h | 10 ++-- .../decompressors/SamsungV0Decompressor.cpp | 30 +++++------ .../decompressors/SamsungV0Decompressor.h | 10 ++-- .../decompressors/SamsungV1Decompressor.cpp | 20 +++---- .../decompressors/SamsungV1Decompressor.h | 10 ++-- .../decompressors/SamsungV2Decompressor.cpp | 22 ++++---- .../decompressors/SamsungV2Decompressor.h | 10 ++-- .../decompressors/SonyArw1Decompressor.cpp | 20 +++---- .../decompressors/SonyArw1Decompressor.h | 8 +-- .../decompressors/SonyArw2Decompressor.cpp | 22 ++++---- .../decompressors/SonyArw2Decompressor.h | 6 +-- .../UncompressedDecompressor.cpp | 32 +++++------ .../decompressors/UncompressedDecompressor.h | 16 +++--- .../decompressors/VC5Decompressor.cpp | 36 ++++++------- .../decompressors/VC5Decompressor.h | 34 ++++++------ .../interpolators/Cr2sRawInterpolator.cpp | 20 +++---- .../interpolators/Cr2sRawInterpolator.h | 6 +-- src/librawspeed/io/BitPumpJPEG.h | 14 ++--- src/librawspeed/io/BitPumpLSB.h | 8 +-- src/librawspeed/io/BitPumpMSB.h | 8 +-- src/librawspeed/io/BitPumpMSB16.h | 8 +-- src/librawspeed/io/BitPumpMSB32.h | 8 +-- src/librawspeed/io/BitStream.h | 22 ++++---- src/librawspeed/io/Buffer.h | 18 +++---- src/librawspeed/io/ByteStream.h | 18 +++---- src/librawspeed/io/Endianness.h | 8 +-- src/librawspeed/io/FileIO.h | 6 +-- src/librawspeed/io/FileIOException.h | 6 +-- src/librawspeed/io/FileReader.cpp | 20 +++---- src/librawspeed/io/FileReader.h | 12 ++--- src/librawspeed/io/FileWriter.cpp | 8 +-- src/librawspeed/io/FileWriter.h | 2 +- src/librawspeed/io/IOException.h | 4 +- src/librawspeed/metadata/BlackArea.h | 2 +- src/librawspeed/metadata/Camera.cpp | 24 ++++----- src/librawspeed/metadata/Camera.h | 28 +++++----- src/librawspeed/metadata/CameraMetaData.cpp | 18 +++---- src/librawspeed/metadata/CameraMetaData.h | 16 +++--- .../metadata/CameraMetadataException.h | 4 +- src/librawspeed/metadata/CameraSensorInfo.cpp | 4 +- src/librawspeed/metadata/CameraSensorInfo.h | 6 +-- src/librawspeed/metadata/ColorFilterArray.cpp | 26 ++++----- src/librawspeed/metadata/ColorFilterArray.h | 14 ++--- src/librawspeed/parsers/CiffParser.cpp | 24 ++++----- src/librawspeed/parsers/CiffParser.h | 6 +-- src/librawspeed/parsers/CiffParserException.h | 6 +-- src/librawspeed/parsers/FiffParser.cpp | 30 +++++------ src/librawspeed/parsers/FiffParser.h | 6 +-- src/librawspeed/parsers/FiffParserException.h | 6 +-- src/librawspeed/parsers/RawParser.cpp | 26 ++++----- src/librawspeed/parsers/RawParser.h | 4 +- src/librawspeed/parsers/RawParserException.h | 4 +- src/librawspeed/parsers/TiffParser.cpp | 54 +++++++++---------- src/librawspeed/parsers/TiffParser.h | 14 ++--- src/librawspeed/parsers/TiffParserException.h | 6 +-- src/librawspeed/tiff/CiffEntry.cpp | 12 ++--- src/librawspeed/tiff/CiffEntry.h | 16 +++--- src/librawspeed/tiff/CiffIFD.cpp | 28 +++++----- src/librawspeed/tiff/CiffIFD.h | 18 +++---- src/librawspeed/tiff/CiffTag.h | 2 +- src/librawspeed/tiff/TiffEntry.cpp | 18 +++---- src/librawspeed/tiff/TiffEntry.h | 18 +++---- src/librawspeed/tiff/TiffIFD.cpp | 24 ++++----- src/librawspeed/tiff/TiffIFD.h | 28 +++++----- src/utilities/identify/rawspeed-identify.cpp | 20 +++---- src/utilities/rsbench/main.cpp | 34 ++++++------ src/utilities/rstest/MD5Benchmark.cpp | 10 ++-- src/utilities/rstest/MD5Test.cpp | 16 +++--- src/utilities/rstest/md5.cpp | 10 ++-- src/utilities/rstest/md5.h | 8 +-- src/utilities/rstest/rstest.cpp | 54 +++++++++---------- test/librawspeed/adt/NORangesSetTest.cpp | 12 ++--- test/librawspeed/adt/PointTest.cpp | 22 ++++---- test/librawspeed/adt/RangeTest.cpp | 6 +-- test/librawspeed/adt/RangeTest.h | 12 ++--- test/librawspeed/codes/HuffmanCodeTest.cpp | 30 +++++------ test/librawspeed/codes/HuffmanTableTest.cpp | 28 +++++----- test/librawspeed/common/BayerPhaseTest.cpp | 20 +++---- test/librawspeed/common/ChecksumFileTest.cpp | 12 ++--- test/librawspeed/common/CommonTest.cpp | 24 ++++----- test/librawspeed/common/CpuidTest.cpp | 8 +-- test/librawspeed/common/SplineTest.cpp | 34 ++++++------ test/librawspeed/io/BitPumpJPEGTest.cpp | 22 ++++---- test/librawspeed/io/BitPumpLSBTest.cpp | 12 ++--- test/librawspeed/io/BitPumpMSB16Test.cpp | 12 ++--- test/librawspeed/io/BitPumpMSB32Test.cpp | 12 ++--- test/librawspeed/io/BitPumpMSBTest.cpp | 12 ++--- test/librawspeed/io/BitPumpTest.h | 20 +++---- test/librawspeed/io/EndiannessTest.cpp | 14 ++--- test/librawspeed/io/EndiannessTest.h | 4 +- test/librawspeed/metadata/BlackAreaTest.cpp | 10 ++-- .../metadata/CameraMetaDataTest.cpp | 12 ++--- .../metadata/CameraSensorInfoTest.cpp | 22 ++++---- test/librawspeed/metadata/CameraTest.cpp | 8 +-- .../metadata/ColorFilterArrayTest.cpp | 16 +++--- test/librawspeed/test/ExceptionsTest.cpp | 24 ++++----- 285 files changed, 2587 insertions(+), 2588 deletions(-) diff --git a/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp b/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp index 17c4bc72d..4d01c14c9 100644 --- a/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp +++ b/bench/librawspeed/adt/DefaultInitAllocatorAdaptorBenchmark.cpp @@ -18,13 +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 // for byte -#include // for map<>::mapped_type +#include "adt/DefaultInitAllocatorAdaptor.h" +#include "bench/Common.h" +#include +#include #include -#include // for allocator, vector -#include // for State, Benchmark, BENCH... +#include +#include using Type = std::byte; diff --git a/bench/librawspeed/bench/Common.cpp b/bench/librawspeed/bench/Common.cpp index 0c4473075..91a32ff5d 100644 --- a/bench/librawspeed/bench/Common.cpp +++ b/bench/librawspeed/bench/Common.cpp @@ -20,11 +20,11 @@ #include "rawspeedconfig.h" #include "bench/Common.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for roundUp -#include // for assert -#include // for ceil, sqrt -#include // for getenv +#include "adt/Point.h" +#include "common/Common.h" +#include +#include +#include using rawspeed::iPoint2D; using rawspeed::roundUp; diff --git a/bench/librawspeed/bench/Common.h b/bench/librawspeed/bench/Common.h index 93d56b5ab..e5b825ecf 100644 --- a/bench/librawspeed/bench/Common.h +++ b/bench/librawspeed/bench/Common.h @@ -20,9 +20,9 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READNONE -#include "adt/Point.h" // for iPoint2D -#include // for size_t +#include "rawspeedconfig.h" +#include "adt/Point.h" +#include bool RAWSPEED_READNONE benchmarkDryRun(); diff --git a/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp b/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp index d68b88a8c..3cdbb28d3 100644 --- a/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp +++ b/bench/librawspeed/decompressors/DeflateDecompressorBenchmark.cpp @@ -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 // for assert -#include // for size_t -#include // for uint8_t -#include // for unique_ptr -#include // for integral_constant -#include // for vector +#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 +#include +#include +#include +#include +#include #include -#include // for compress, compressBound -#include // for State, Benchmark, BEN... +#include +#include #ifndef NDEBUG -#include // for numeric_limits +#include #endif using rawspeed::Buffer; diff --git a/bench/librawspeed/decompressors/UncompressedDecompressorBenchmark.cpp b/bench/librawspeed/decompressors/UncompressedDecompressorBenchmark.cpp index df2952453..276592333 100644 --- a/bench/librawspeed/decompressors/UncompressedDecompressorBenchmark.cpp +++ b/bench/librawspeed/decompressors/UncompressedDecompressorBenchmark.cpp @@ -18,21 +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 // for assert -#include // for size_t -#include // for uint16_t, uint8_t -#include // for lcm -#include // for integral_constant -#include // for vector -#include // 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 +#include +#include +#include +#include +#include +#include using rawspeed::BitOrder; using rawspeed::Buffer; diff --git a/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp b/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp index 8ebaf8c65..85b7c6f1e 100644 --- a/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp +++ b/bench/librawspeed/interpolators/Cr2sRawInterpolatorBenchmark.cpp @@ -18,16 +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 // for array -#include // for uint16_t -#include // for integral_constant -#include // 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 +#include +#include +#include using rawspeed::Cr2sRawInterpolator; using rawspeed::iPoint2D; diff --git a/bench/librawspeed/io/BitStreamBenchmark.cpp b/bench/librawspeed/io/BitStreamBenchmark.cpp index df329fed8..428f8e644 100644 --- a/bench/librawspeed/io/BitStreamBenchmark.cpp +++ b/bench/librawspeed/io/BitStreamBenchmark.cpp @@ -18,23 +18,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "bench/Common.h" // for benchmarkDryRun -#include "io/BitPumpJPEG.h" // for BitPumpJPEG, BitStream<>::fillCache -#include "io/BitPumpLSB.h" // for BitPumpLSB, BitStream<>::fillCache -#include "io/BitPumpMSB.h" // for BitPumpMSB, BitStream<>::fillCache -#include "io/BitPumpMSB16.h" // for BitPumpMSB16, BitStream<>::fillCache -#include "io/BitPumpMSB32.h" // for BitPumpMSB32, BitStream<>::fillCache -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::unknown -#include // for assert -#include // for size_t -#include // for State, Benchmark, Initialize, RunSp... +#include "bench/Common.h" +#include "io/BitPumpJPEG.h" +#include "io/BitPumpLSB.h" +#include "io/BitPumpMSB.h" +#include "io/BitPumpMSB16.h" +#include "io/BitPumpMSB32.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include #ifndef DEBUG -#include // for uint8_t -#include // for string, to_string, allocator -#include // for vector +#include +#include +#include #endif #ifdef DEBUG diff --git a/bench/librawspeed/metadata/CameraMetaDataBenchmark.cpp b/bench/librawspeed/metadata/CameraMetaDataBenchmark.cpp index 9b3cdd3c3..b42275254 100644 --- a/bench/librawspeed/metadata/CameraMetaDataBenchmark.cpp +++ b/bench/librawspeed/metadata/CameraMetaDataBenchmark.cpp @@ -18,10 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_PUGIXML, RAWSPEED_SOURCE_DIR -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include // for xml_document, xml_parse_result -#include // for DoNotOptimize, State, State::St... +#include "rawspeedconfig.h" +#include "metadata/CameraMetaData.h" +#include +#include #ifndef HAVE_PUGIXML #error This benchmark requires to be built with pugixml being present. diff --git a/cmake/Modules/cpu-cache-line-size.cpp b/cmake/Modules/cpu-cache-line-size.cpp index f31d2ede9..d134c1b96 100644 --- a/cmake/Modules/cpu-cache-line-size.cpp +++ b/cmake/Modules/cpu-cache-line-size.cpp @@ -1,7 +1,7 @@ -#include // for endl, basic_ostream<>::__ostream_type, cout, ost... +#include #if defined(__unix__) -#include // for _POSIX_C_VERSION, sysconf, _SC_LEVEL1_DCACHE_LINESIZE +#include #endif #if defined(_SC_LEVEL1_DCACHE_LINESIZE) @@ -17,7 +17,7 @@ int main() { #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ defined(__DragonFly__) || defined(__APPLE__) -#include // for size_t +#include #include #include int main() { diff --git a/cmake/Modules/cpu-large-page-size.cpp b/cmake/Modules/cpu-large-page-size.cpp index 1eccc0a1a..8c7b5a2c2 100644 --- a/cmake/Modules/cpu-large-page-size.cpp +++ b/cmake/Modules/cpu-large-page-size.cpp @@ -1,8 +1,8 @@ -#include // for endl, basic_ostream<>::__ostream_type, cout, ost... +#include #if defined(__i386__) || defined(__x86_64__) -#include // for __get_cpuid +#include /* Features in %edx for leaf 1 */ #if !defined(bit_PSE) diff --git a/cmake/Modules/cpu-page-size.cpp b/cmake/Modules/cpu-page-size.cpp index 481ba2aad..49d4027dd 100644 --- a/cmake/Modules/cpu-page-size.cpp +++ b/cmake/Modules/cpu-page-size.cpp @@ -1,7 +1,7 @@ -#include // for endl, basic_ostream<>::__ostream_type, cout, ost... +#include #if defined(__unix__) || defined(__APPLE__) -#include // for _POSIX_C_SOURCE, sysconf, _SC_PAGESIZE +#include #endif #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) || defined(__APPLE__) diff --git a/fuzz/libFuzzer_dummy_main.cpp b/fuzz/libFuzzer_dummy_main.cpp index 4bcd335ea..8365316a5 100644 --- a/fuzz/libFuzzer_dummy_main.cpp +++ b/fuzz/libFuzzer_dummy_main.cpp @@ -18,22 +18,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP -#include "adt/AlignedAllocator.h" // for AlignedAllocator -#include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocatorAda... -#include "io/Buffer.h" // for Buffer -#include "io/FileIOException.h" // for FileIOException -#include "io/FileReader.h" // for FileReader -#include // for uint8_t -#include // for EXIT_SUCCESS, size_t -#include // for operator<<, cout, ostream -#include // for unique_ptr, allocator -#include // for operator==, string -#include // for tie, tuple -#include // for vector +#include "rawspeedconfig.h" +#include "adt/AlignedAllocator.h" +#include "adt/DefaultInitAllocatorAdaptor.h" +#include "io/Buffer.h" +#include "io/FileIOException.h" +#include "io/FileReader.h" +#include +#include +#include +#include +#include +#include +#include #ifdef HAVE_OPENMP -#include // for omp_get_num_threads +#include #endif extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/codes/PrefixCodeDecoder/Common.h b/fuzz/librawspeed/codes/PrefixCodeDecoder/Common.h index 1ce448dd6..d955d54e1 100644 --- a/fuzz/librawspeed/codes/PrefixCodeDecoder/Common.h +++ b/fuzz/librawspeed/codes/PrefixCodeDecoder/Common.h @@ -22,9 +22,9 @@ #include "codes/HuffmanCode.h" #include "common/RawspeedException.h" -#include "io/ByteStream.h" // for ByteStream -#include // for optional -#include // for is_same +#include "io/ByteStream.h" +#include +#include template auto getCodeValues(rawspeed::ByteStream& bs, unsigned numEntries) { diff --git a/fuzz/librawspeed/codes/PrefixCodeDecoder/Dual.cpp b/fuzz/librawspeed/codes/PrefixCodeDecoder/Dual.cpp index 7ad1c6928..e0ef18b15 100644 --- a/fuzz/librawspeed/codes/PrefixCodeDecoder/Dual.cpp +++ b/fuzz/librawspeed/codes/PrefixCodeDecoder/Dual.cpp @@ -25,22 +25,22 @@ #error IMPL1 must be defined to one of rawspeeds huffman table implementations #endif -#include "codes/PrefixCodeDecoder.h" // IWYU pragma: keep -#include "codes/PrefixCodeDecoder/Common.h" // for createPrefixCodeDecoder -#include "codes/PrefixCodeLUTDecoder.h" // IWYU pragma: keep -#include "codes/PrefixCodeLookupDecoder.h" // IWYU pragma: keep -#include "codes/PrefixCodeTreeDecoder.h" // IWYU pragma: keep -#include "codes/PrefixCodeVectorDecoder.h" // IWYU pragma: keep -#include "io/BitPumpJPEG.h" // for BitStream<>::fillCache -#include "io/BitPumpMSB.h" // for BitStream<>::fillCache -#include "io/BitPumpMSB32.h" // for BitStream<>::fillCache -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endiannes... -#include "io/IOException.h" // for RawspeedException -#include // for assert -#include // for uint8_t -#include // for size_t +#include "codes/PrefixCodeDecoder.h" // IWYU pragma: keep +#include "codes/PrefixCodeDecoder/Common.h" +#include "codes/PrefixCodeLUTDecoder.h" // IWYU pragma: keep +#include "codes/PrefixCodeLookupDecoder.h" // IWYU pragma: keep +#include "codes/PrefixCodeTreeDecoder.h" // IWYU pragma: keep +#include "codes/PrefixCodeVectorDecoder.h" // IWYU pragma: keep +#include "io/BitPumpJPEG.h" +#include "io/BitPumpMSB.h" +#include "io/BitPumpMSB32.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "io/IOException.h" +#include +#include +#include namespace rawspeed { struct BaselineCodeTag; diff --git a/fuzz/librawspeed/codes/PrefixCodeDecoder/Solo.cpp b/fuzz/librawspeed/codes/PrefixCodeDecoder/Solo.cpp index 7459eb570..a2829b515 100644 --- a/fuzz/librawspeed/codes/PrefixCodeDecoder/Solo.cpp +++ b/fuzz/librawspeed/codes/PrefixCodeDecoder/Solo.cpp @@ -22,22 +22,22 @@ #error IMPL must be defined to one of rawspeeds huffman table implementations #endif -#include "codes/PrefixCodeDecoder.h" // IWYU pragma: keep -#include "codes/PrefixCodeDecoder/Common.h" // for createPrefixCodeDecoder -#include "codes/PrefixCodeLUTDecoder.h" // IWYU pragma: keep -#include "codes/PrefixCodeLookupDecoder.h" // IWYU pragma: keep -#include "codes/PrefixCodeTreeDecoder.h" // IWYU pragma: keep -#include "codes/PrefixCodeVectorDecoder.h" // IWYU pragma: keep -#include "common/RawspeedException.h" // for ThrowException, ThrowRSE -#include "io/BitPumpJPEG.h" // for BitStream<>::fillCache -#include "io/BitPumpMSB.h" // for BitStream<>::fillCache -#include "io/BitPumpMSB32.h" // for BitStream<>::fillCache -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endiannes... -#include // for assert -#include // for uint8_t -#include // for size_t +#include "codes/PrefixCodeDecoder.h" // IWYU pragma: keep +#include "codes/PrefixCodeDecoder/Common.h" +#include "codes/PrefixCodeLUTDecoder.h" // IWYU pragma: keep +#include "codes/PrefixCodeLookupDecoder.h" // IWYU pragma: keep +#include "codes/PrefixCodeTreeDecoder.h" // IWYU pragma: keep +#include "codes/PrefixCodeVectorDecoder.h" // IWYU pragma: keep +#include "common/RawspeedException.h" +#include "io/BitPumpJPEG.h" +#include "io/BitPumpMSB.h" +#include "io/BitPumpMSB32.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include namespace rawspeed { struct BaselineCodeTag; diff --git a/fuzz/librawspeed/common/DngOpcodes.cpp b/fuzz/librawspeed/common/DngOpcodes.cpp index adccd8ebd..3ab55dace 100644 --- a/fuzz/librawspeed/common/DngOpcodes.cpp +++ b/fuzz/librawspeed/common/DngOpcodes.cpp @@ -19,19 +19,19 @@ */ #include "common/DngOpcodes.h" -#include "MemorySanitizer.h" // for MSan -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D, iRectangle2D -#include "common/RawImage.h" // for RawImage, RawImageData, RawIm... -#include "fuzz/Common.h" // for CreateCFA, CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include "io/IOException.h" // for ThrowException, RawspeedExcep... -#include "metadata/ColorFilterArray.h" // for ColorFilterArray -#include // for assert -#include // for uint16_t, uint8_t -#include // for size_t +#include "MemorySanitizer.h" +#include "adt/Array2DRef.h" +#include "adt/Point.h" +#include "common/RawImage.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "io/IOException.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decoders/TiffDecoders/main.cpp b/fuzz/librawspeed/decoders/TiffDecoders/main.cpp index dd09f952b..020f188da 100644 --- a/fuzz/librawspeed/decoders/TiffDecoders/main.cpp +++ b/fuzz/librawspeed/decoders/TiffDecoders/main.cpp @@ -22,33 +22,33 @@ #error DECODER must be defined #endif -#include "common/RawspeedException.h" // for RawspeedException -#include "decoders/ArwDecoder.h" // IWYU pragma: keep -#include "decoders/Cr2Decoder.h" // IWYU pragma: keep -#include "decoders/DcrDecoder.h" // IWYU pragma: keep -#include "decoders/DcsDecoder.h" // IWYU pragma: keep -#include "decoders/DngDecoder.h" // IWYU pragma: keep -#include "decoders/ErfDecoder.h" // IWYU pragma: keep -#include "decoders/IiqDecoder.h" // IWYU pragma: keep -#include "decoders/KdcDecoder.h" // IWYU pragma: keep -#include "decoders/MefDecoder.h" // IWYU pragma: keep -#include "decoders/MosDecoder.h" // IWYU pragma: keep -#include "decoders/NefDecoder.h" // IWYU pragma: keep -#include "decoders/OrfDecoder.h" // IWYU pragma: keep -#include "decoders/PefDecoder.h" // IWYU pragma: keep -#include "decoders/RafDecoder.h" // IWYU pragma: keep -#include "decoders/Rw2Decoder.h" // IWYU pragma: keep -#include "decoders/SrwDecoder.h" // IWYU pragma: keep -#include "decoders/StiDecoder.h" // IWYU pragma: keep -#include "decoders/ThreefrDecoder.h" // IWYU pragma: keep -#include "io/Buffer.h" // for Buffer -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include "parsers/TiffParser.h" // for TiffParser -#include // for assert -#include // for uint8_t -#include // for size_t -#include // for unique_ptr, make_unique -#include // for move +#include "common/RawspeedException.h" +#include "decoders/ArwDecoder.h" // IWYU pragma: keep +#include "decoders/Cr2Decoder.h" // IWYU pragma: keep +#include "decoders/DcrDecoder.h" // IWYU pragma: keep +#include "decoders/DcsDecoder.h" // IWYU pragma: keep +#include "decoders/DngDecoder.h" // IWYU pragma: keep +#include "decoders/ErfDecoder.h" // IWYU pragma: keep +#include "decoders/IiqDecoder.h" // IWYU pragma: keep +#include "decoders/KdcDecoder.h" // IWYU pragma: keep +#include "decoders/MefDecoder.h" // IWYU pragma: keep +#include "decoders/MosDecoder.h" // IWYU pragma: keep +#include "decoders/NefDecoder.h" // IWYU pragma: keep +#include "decoders/OrfDecoder.h" // IWYU pragma: keep +#include "decoders/PefDecoder.h" // IWYU pragma: keep +#include "decoders/RafDecoder.h" // IWYU pragma: keep +#include "decoders/Rw2Decoder.h" // IWYU pragma: keep +#include "decoders/SrwDecoder.h" // IWYU pragma: keep +#include "decoders/StiDecoder.h" // IWYU pragma: keep +#include "decoders/ThreefrDecoder.h" // IWYU pragma: keep +#include "io/Buffer.h" +#include "metadata/CameraMetaData.h" +#include "parsers/TiffParser.h" +#include +#include +#include +#include +#include static const rawspeed::CameraMetaData metadata{}; diff --git a/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp b/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp index da078be02..c00dccd10 100644 --- a/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/Cr2Decompressor.cpp @@ -26,23 +26,23 @@ #error PrefixCodeDecoderImpl must be defined to one of rawspeeds huffman tables #endif -#include "MemorySanitizer.h" // for MSan -#include "codes/DummyPrefixCodeDecoder.h" // for DummyPrefixCodeDecoder -#include "codes/PrefixCodeDecoder/Common.h" // for createPrefixCodeDecoder -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for ThrowException, Rawsp... +#include "MemorySanitizer.h" +#include "codes/DummyPrefixCodeDecoder.h" +#include "codes/PrefixCodeDecoder/Common.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" #include "decompressors/Cr2Decompressor.h" -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endiannes... -#include // for generate_n, copy -#include // for assert -#include // for uint16_t, uint8_t -#include // for back_insert_iterator +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include +#include #ifdef WITH_DummyPrefixCodeDecoder -#include "decompressors/Cr2DecompressorImpl.h" // for Cr2Decompressor::Cr2D... +#include "decompressors/Cr2DecompressorImpl.h" namespace rawspeed { diff --git a/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp b/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp index 889497c07..8538b188e 100644 --- a/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp +++ b/fuzz/librawspeed/decompressors/Cr2LJpegDecoder.cpp @@ -19,17 +19,17 @@ */ #include "decompressors/Cr2LJpegDecoder.h" -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" #include "decompressors/Cr2Decompressor.h" -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint8_t, uint16_t -#include // for size_t +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/CrwDecompressor.cpp b/fuzz/librawspeed/decompressors/CrwDecompressor.cpp index f8c99a370..d59139af2 100644 --- a/fuzz/librawspeed/decompressors/CrwDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/CrwDecompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/CrwDecompressor.h" // for CrwDecompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint32_t, uint8_t -#include // for size_t +#include "decompressors/CrwDecompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/DummyLJpegDecoder.cpp b/fuzz/librawspeed/decompressors/DummyLJpegDecoder.cpp index 5c810e359..eb7c8423a 100644 --- a/fuzz/librawspeed/decompressors/DummyLJpegDecoder.cpp +++ b/fuzz/librawspeed/decompressors/DummyLJpegDecoder.cpp @@ -18,16 +18,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "common/RawImage.h" // for RawImage, RawIm... -#include "common/RawspeedException.h" // for RawspeedException -#include "decompressors/AbstractLJpegDecoder.h" // for AbstractLJpegDe... -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, End... -#include // for assert -#include // for uint8_t -#include // for size_t +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "decompressors/AbstractLJpegDecoder.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/FujiDecompressor.cpp b/fuzz/librawspeed/decompressors/FujiDecompressor.cpp index a6273035a..71967bd4c 100644 --- a/fuzz/librawspeed/decompressors/FujiDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/FujiDecompressor.cpp @@ -18,18 +18,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/FujiDecompressor.h" // for FujiDecompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateCFA, CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include "metadata/ColorFilterArray.h" // for ColorFilterArray -#include // for assert -#include // for uint8_t -#include // for size_t +#include "decompressors/FujiDecompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp b/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp index 624f10d31..47be14d8b 100644 --- a/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/HasselbladDecompressor.cpp @@ -19,18 +19,18 @@ */ #include "decompressors/HasselbladDecompressor.h" -#include "MemorySanitizer.h" // for MSan -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "codes/PrefixCodeDecoder/Common.h" // for createPrefixCodeDecoder -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for size_t -#include // for uint16_t, uint8_t +#include "MemorySanitizer.h" +#include "codes/PrefixCodeDecoder.h" +#include "codes/PrefixCodeDecoder/Common.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/HasselbladLJpegDecoder.cpp b/fuzz/librawspeed/decompressors/HasselbladLJpegDecoder.cpp index e19089871..3ff816d3b 100644 --- a/fuzz/librawspeed/decompressors/HasselbladLJpegDecoder.cpp +++ b/fuzz/librawspeed/decompressors/HasselbladLJpegDecoder.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/HasselbladLJpegDecoder.h" // for HasselbladDecompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint8_t -#include // for size_t +#include "decompressors/HasselbladLJpegDecoder.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/KodakDecompressor.cpp b/fuzz/librawspeed/decompressors/KodakDecompressor.cpp index a405e2352..150e236f5 100644 --- a/fuzz/librawspeed/decompressors/KodakDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/KodakDecompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/KodakDecompressor.h" // for SonyArw1Decompre... -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint8_t -#include // for size_t +#include "decompressors/KodakDecompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/LJpegDecoder.cpp b/fuzz/librawspeed/decompressors/LJpegDecoder.cpp index 9808d8349..286e10def 100644 --- a/fuzz/librawspeed/decompressors/LJpegDecoder.cpp +++ b/fuzz/librawspeed/decompressors/LJpegDecoder.cpp @@ -18,16 +18,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/LJpegDecoder.h" // for LJpegDecoder -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint8_t -#include // for size_t +#include "decompressors/LJpegDecoder.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp b/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp index 1275ad8ef..77bf5e5af 100644 --- a/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/LJpegDecompressor.cpp @@ -19,21 +19,21 @@ */ #include "decompressors/LJpegDecompressor.h" -#include "MemorySanitizer.h" // for MSan +#include "MemorySanitizer.h" #include "adt/Point.h" -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "codes/PrefixCodeDecoder/Common.h" // for createPrefixCodeDecoder -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for ThrowException, RawspeedExce... -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for generate_n, copy, fill, fill_n -#include // for assert +#include "codes/PrefixCodeDecoder.h" +#include "codes/PrefixCodeDecoder/Common.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include #include -#include // for uint16_t, uint8_t -#include // for back_insert_iterator, back_i... +#include +#include #include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/NikonDecompressor.cpp b/fuzz/librawspeed/decompressors/NikonDecompressor.cpp index 8a7416b92..c179b38f1 100644 --- a/fuzz/librawspeed/decompressors/NikonDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/NikonDecompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/NikonDecompressor.h" // for NikonDecompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint32_t, uint8_t -#include // for size_t +#include "decompressors/NikonDecompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/OlympusDecompressor.cpp b/fuzz/librawspeed/decompressors/OlympusDecompressor.cpp index 3ead85472..a049f9550 100644 --- a/fuzz/librawspeed/decompressors/OlympusDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/OlympusDecompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/OlympusDecompressor.h" // for OlympusDecompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint8_t -#include // for size_t +#include "decompressors/OlympusDecompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/PanasonicV4Decompressor.cpp b/fuzz/librawspeed/decompressors/PanasonicV4Decompressor.cpp index 889cfba4f..bb6a58313 100644 --- a/fuzz/librawspeed/decompressors/PanasonicV4Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/PanasonicV4Decompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/PanasonicV4Decompressor.h" // for PanasonicDecompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint32_t, uint8_t -#include // for size_t +#include "decompressors/PanasonicV4Decompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp b/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp index f62978f38..35cfea87c 100644 --- a/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/PanasonicV5Decompressor.cpp @@ -19,16 +19,16 @@ */ #include "decompressors/PanasonicV5Decompressor.h" -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include #include -#include // for uint32_t, uint8_t +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/PanasonicV6Decompressor.cpp b/fuzz/librawspeed/decompressors/PanasonicV6Decompressor.cpp index e3b7add0e..d6c931f45 100644 --- a/fuzz/librawspeed/decompressors/PanasonicV6Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/PanasonicV6Decompressor.cpp @@ -19,16 +19,16 @@ */ #include "decompressors/PanasonicV6Decompressor.h" -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for size_t -#include // for uint8_t +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/PanasonicV7Decompressor.cpp b/fuzz/librawspeed/decompressors/PanasonicV7Decompressor.cpp index f90412461..dbdf7e90b 100644 --- a/fuzz/librawspeed/decompressors/PanasonicV7Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/PanasonicV7Decompressor.cpp @@ -19,16 +19,16 @@ */ #include "decompressors/PanasonicV7Decompressor.h" -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for size_t -#include // for uint8_t +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp b/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp index 28e7cb5bb..c73406599 100644 --- a/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/PentaxDecompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/PentaxDecompressor.h" // for PentaxDecompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint32_t, uint8_t -#include // for size_t +#include "decompressors/PentaxDecompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include #include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp b/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp index 16dda1420..96b4c817e 100644 --- a/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/PhaseOneDecompressor.cpp @@ -18,20 +18,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/PhaseOneDecompressor.h" // for PhaseOneDecompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for generate_n -#include // for assert -#include // for uint8_t -#include // for size_t -#include // for back_insert_iterator, back_ins... -#include // for move +#include "decompressors/PhaseOneDecompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include +#include +#include +#include #include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/SamsungV0Decompressor.cpp b/fuzz/librawspeed/decompressors/SamsungV0Decompressor.cpp index 48bf5d935..94bd2df38 100644 --- a/fuzz/librawspeed/decompressors/SamsungV0Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SamsungV0Decompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/SamsungV0Decompressor.h" // for SamsungV0Decompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint32_t, uint8_t -#include // for size_t +#include "decompressors/SamsungV0Decompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/SamsungV1Decompressor.cpp b/fuzz/librawspeed/decompressors/SamsungV1Decompressor.cpp index 20978a6fb..b2e5006d7 100644 --- a/fuzz/librawspeed/decompressors/SamsungV1Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SamsungV1Decompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/SamsungV1Decompressor.h" // for SamsungV1Decompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint32_t, uint8_t -#include // for size_t +#include "decompressors/SamsungV1Decompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/SamsungV2Decompressor.cpp b/fuzz/librawspeed/decompressors/SamsungV2Decompressor.cpp index afa731591..b2cc72296 100644 --- a/fuzz/librawspeed/decompressors/SamsungV2Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SamsungV2Decompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/SamsungV2Decompressor.h" // for SamsungV2Decompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint32_t, uint8_t -#include // for size_t +#include "decompressors/SamsungV2Decompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/SonyArw1Decompressor.cpp b/fuzz/librawspeed/decompressors/SonyArw1Decompressor.cpp index a132b436e..e99b99e58 100644 --- a/fuzz/librawspeed/decompressors/SonyArw1Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SonyArw1Decompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/SonyArw1Decompressor.h" // for SonyArw1Decompre... -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint8_t -#include // for size_t +#include "decompressors/SonyArw1Decompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/SonyArw2Decompressor.cpp b/fuzz/librawspeed/decompressors/SonyArw2Decompressor.cpp index c5d1e9bbb..618924a20 100644 --- a/fuzz/librawspeed/decompressors/SonyArw2Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/SonyArw2Decompressor.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/SonyArw2Decompressor.h" // for SonyArw1Decompre... -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for uint8_t -#include // for size_t +#include "decompressors/SonyArw2Decompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp b/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp index bf6253c6f..e799bfeeb 100644 --- a/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp +++ b/fuzz/librawspeed/decompressors/UncompressedDecompressor.cpp @@ -19,18 +19,18 @@ */ #include "decompressors/UncompressedDecompressor.h" -#include "MemorySanitizer.h" // for MSan +#include "MemorySanitizer.h" #include "adt/Point.h" #include "common/Common.h" -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for ThrowException, RawspeedException -#include "fuzz/Common.h" // for CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for assert -#include // for size_t -#include // for uint8_t +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/decompressors/VC5Decompressor.cpp b/fuzz/librawspeed/decompressors/VC5Decompressor.cpp index 56ed49066..bb4d698d3 100644 --- a/fuzz/librawspeed/decompressors/VC5Decompressor.cpp +++ b/fuzz/librawspeed/decompressors/VC5Decompressor.cpp @@ -18,18 +18,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/VC5Decompressor.h" // for VC5Decompressor -#include "MemorySanitizer.h" // for MSan -#include "common/RawImage.h" // for RawImage, RawImageData -#include "common/RawspeedException.h" // for RawspeedException -#include "fuzz/Common.h" // for CreateCFA, CreateRawImage -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include "metadata/ColorFilterArray.h" // for ColorFilterArray -#include // for assert -#include // for uint8_t -#include // for size_t +#include "decompressors/VC5Decompressor.h" +#include "MemorySanitizer.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "fuzz/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size); diff --git a/fuzz/librawspeed/fuzz/Common.cpp b/fuzz/librawspeed/fuzz/Common.cpp index ab09d2781..9dc243cab 100644 --- a/fuzz/librawspeed/fuzz/Common.cpp +++ b/fuzz/librawspeed/fuzz/Common.cpp @@ -19,12 +19,12 @@ */ #include "fuzz/Common.h" -#include "adt/Point.h" // for iPoint2D, iPoint2D::value_type -#include "common/RawImage.h" // for RawImage, RawImageData, RawImageType -#include "io/ByteStream.h" // for ByteStream -#include "io/IOException.h" // for ThrowException, ThrowRSE, ThrowIOE +#include "adt/Point.h" +#include "common/RawImage.h" +#include "io/ByteStream.h" +#include "io/IOException.h" #include "metadata/ColorFilterArray.h" -#include // for uint32_t, int32_t +#include rawspeed::RawImage CreateRawImage(rawspeed::ByteStream& bs) { const uint32_t width = bs.getU32(); diff --git a/fuzz/librawspeed/fuzz/Common.h b/fuzz/librawspeed/fuzz/Common.h index 5e1da5b2f..fe0d7a802 100644 --- a/fuzz/librawspeed/fuzz/Common.h +++ b/fuzz/librawspeed/fuzz/Common.h @@ -20,8 +20,8 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "metadata/ColorFilterArray.h" // for ColorFilterArray +#include "common/RawImage.h" +#include "metadata/ColorFilterArray.h" namespace rawspeed { class ByteStream; diff --git a/fuzz/librawspeed/fuzz/RawSpeed.cpp b/fuzz/librawspeed/fuzz/RawSpeed.cpp index 7e1b01b07..831f583ec 100644 --- a/fuzz/librawspeed/fuzz/RawSpeed.cpp +++ b/fuzz/librawspeed/fuzz/RawSpeed.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for RAWSPEED_READNONE -#include "common/Common.h" // for rawspeed_get_number_of_processor_cores +#include "rawspeedconfig.h" +#include "common/Common.h" // define this function, it is only declared in rawspeed: // for fuzzing, do not want any threading. diff --git a/fuzz/librawspeed/parsers/main.cpp b/fuzz/librawspeed/parsers/main.cpp index 9f9223487..a75fee473 100644 --- a/fuzz/librawspeed/parsers/main.cpp +++ b/fuzz/librawspeed/parsers/main.cpp @@ -30,23 +30,23 @@ #error DECODE must be defined as bool #endif -#include "io/Buffer.h" // for Buffer -#include "io/IOException.h" // for IOException, RawspeedExcep... -#include "parsers/CiffParser.h" // IWYU pragma: keep -#include "parsers/FiffParser.h" // IWYU pragma: keep -#include "parsers/RawParser.h" // IWYU pragma: keep -#include "parsers/RawParserException.h" // for RawParserException -#include "parsers/TiffParser.h" // for TiffParser -#include // for assert -#include // for uint8_t -#include // for size_t +#include "io/Buffer.h" +#include "io/IOException.h" +#include "parsers/CiffParser.h" // IWYU pragma: keep +#include "parsers/FiffParser.h" // IWYU pragma: keep +#include "parsers/RawParser.h" // IWYU pragma: keep +#include "parsers/RawParserException.h" +#include "parsers/TiffParser.h" +#include +#include +#include #if GETDECODER -#include "decoders/RawDecoderException.h" // for RawDecoderException +#include "decoders/RawDecoderException.h" #if DECODE -#include "common/RawspeedException.h" // for RawspeedException -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include // for unique_ptr +#include "common/RawspeedException.h" +#include "metadata/CameraMetaData.h" +#include #endif #endif diff --git a/fuzz/rawspeed/main.cpp b/fuzz/rawspeed/main.cpp index 8bd271c2b..c240000e0 100644 --- a/fuzz/rawspeed/main.cpp +++ b/fuzz/rawspeed/main.cpp @@ -18,10 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RawSpeed-API.h" // for RawDecoder, RawParser, Buffer, CameraMetaData -#include // for size_t -#include // for uint8_t -#include // for unique_ptr +#include "RawSpeed-API.h" +#include +#include +#include static const rawspeed::CameraMetaData metadata{}; diff --git a/src/external/AddressSanitizer.h b/src/external/AddressSanitizer.h index db7673967..48faeeabd 100644 --- a/src/external/AddressSanitizer.h +++ b/src/external/AddressSanitizer.h @@ -20,7 +20,7 @@ #pragma once -#include // for size_t +#include // see http://clang.llvm.org/docs/LanguageExtensions.html #ifndef __has_feature // Optional of course. diff --git a/src/external/MemorySanitizer.h b/src/external/MemorySanitizer.h index af5d0f872..fd9a8542f 100644 --- a/src/external/MemorySanitizer.h +++ b/src/external/MemorySanitizer.h @@ -20,9 +20,9 @@ #pragma once -#include "adt/CroppedArray1DRef.h" // for CroppedArray1DRef -#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef -#include // for byte, size_t +#include "adt/CroppedArray1DRef.h" +#include "adt/CroppedArray2DRef.h" +#include // see http://clang.llvm.org/docs/LanguageExtensions.html #ifndef __has_feature // Optional of course. diff --git a/src/librawspeed/adt/AlignedAllocator.h b/src/librawspeed/adt/AlignedAllocator.h index f28068bd1..35eb34bc1 100644 --- a/src/librawspeed/adt/AlignedAllocator.h +++ b/src/librawspeed/adt/AlignedAllocator.h @@ -22,12 +22,12 @@ #include "rawspeedconfig.h" #include "AddressSanitizer.h" -#include "adt/Invariant.h" // for invariant +#include "adt/Invariant.h" #include "common/Common.h" #include "common/RawspeedException.h" -#include // for size_t -#include // for SIZE_MAX -#include // for allocator_traits +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/adt/Array1DRef.h b/src/librawspeed/adt/Array1DRef.h index 5b90d51ee..e56a64bbf 100644 --- a/src/librawspeed/adt/Array1DRef.h +++ b/src/librawspeed/adt/Array1DRef.h @@ -20,10 +20,10 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include "adt/Invariant.h" // for invariant -#include // for negation, is_const, remove_const_t, is_same -#include // for vector +#include "rawspeedconfig.h" +#include "adt/Invariant.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/adt/Array2DRef.h b/src/librawspeed/adt/Array2DRef.h index fbd52e6c2..e49cd4c0e 100644 --- a/src/librawspeed/adt/Array2DRef.h +++ b/src/librawspeed/adt/Array2DRef.h @@ -21,11 +21,11 @@ #pragma once -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Invariant.h" // for invariant -#include // for byte -#include // for negation, is_const, remove_const_t, is_same -#include // for vector +#include "adt/Array1DRef.h" +#include "adt/Invariant.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/adt/BitIterator.h b/src/librawspeed/adt/BitIterator.h index daa2d446e..a3e87477a 100644 --- a/src/librawspeed/adt/BitIterator.h +++ b/src/librawspeed/adt/BitIterator.h @@ -20,10 +20,10 @@ #pragma once -#include "adt/Invariant.h" // for invariant -#include "common/Common.h" // for bitwidth -#include // for input_iterator_tag -#include // for enable_if_t, is_unsigned_v +#include "adt/Invariant.h" +#include "common/Common.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/adt/CroppedArray1DRef.h b/src/librawspeed/adt/CroppedArray1DRef.h index 08eb9e16c..8448dd7b8 100644 --- a/src/librawspeed/adt/CroppedArray1DRef.h +++ b/src/librawspeed/adt/CroppedArray1DRef.h @@ -20,11 +20,11 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Invariant.h" // for invariant -#include // for negation, is_const, remove_const_t, is_same -#include // for vector +#include "rawspeedconfig.h" +#include "adt/Array1DRef.h" +#include "adt/Invariant.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/adt/CroppedArray2DRef.h b/src/librawspeed/adt/CroppedArray2DRef.h index b124e8af7..6fa5aea1a 100644 --- a/src/librawspeed/adt/CroppedArray2DRef.h +++ b/src/librawspeed/adt/CroppedArray2DRef.h @@ -20,10 +20,10 @@ #pragma once -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/CroppedArray1DRef.h" // for CroppedArray1DRef -#include "adt/Invariant.h" // for invariant -#include // for enable_if_t, remove_const_t, remove_cv_t +#include "adt/Array2DRef.h" +#include "adt/CroppedArray1DRef.h" +#include "adt/Invariant.h" +#include namespace rawspeed { diff --git a/src/librawspeed/adt/DefaultInitAllocatorAdaptor.h b/src/librawspeed/adt/DefaultInitAllocatorAdaptor.h index 7bf973ea8..8f6c9cda2 100644 --- a/src/librawspeed/adt/DefaultInitAllocatorAdaptor.h +++ b/src/librawspeed/adt/DefaultInitAllocatorAdaptor.h @@ -20,10 +20,10 @@ #pragma once -#include // for size_t -#include // for allocator, allocator_traits -#include // for operator new -#include // for enable_if_t +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/adt/Invariant.h b/src/librawspeed/adt/Invariant.h index fbc5e9b65..48460de56 100644 --- a/src/librawspeed/adt/Invariant.h +++ b/src/librawspeed/adt/Invariant.h @@ -22,7 +22,7 @@ #ifndef NDEBUG -#include // for assert +#include #define invariant(expr) assert(expr) diff --git a/src/librawspeed/adt/Mutex.h b/src/librawspeed/adt/Mutex.h index 285201d15..2d7c5df7d 100644 --- a/src/librawspeed/adt/Mutex.h +++ b/src/librawspeed/adt/Mutex.h @@ -20,11 +20,11 @@ #pragma once -#include "rawspeedconfig.h" // for HAVE_OPENMP -#include "ThreadSafetyAnalysis.h" // for ACQUIRE, RELEASE, CAPABILITY, SCOP... +#include "rawspeedconfig.h" +#include "ThreadSafetyAnalysis.h" #ifdef HAVE_OPENMP -#include // for omp_destroy_lock, omp_init_lock +#include #endif namespace rawspeed { diff --git a/src/librawspeed/adt/NORangesSet.h b/src/librawspeed/adt/NORangesSet.h index ae164908f..fc93035ea 100644 --- a/src/librawspeed/adt/NORangesSet.h +++ b/src/librawspeed/adt/NORangesSet.h @@ -20,13 +20,13 @@ #pragma once -#include "adt/Range.h" // for operator<, RangesOverlap -#include // for partition_point -#include // for assert -#include // for size_t -#include // for prev -#include // IWYU pragma: export -#include // for pair +#include "adt/Range.h" +#include +#include +#include +#include +#include // IWYU pragma: export +#include namespace rawspeed { diff --git a/src/librawspeed/adt/NotARational.h b/src/librawspeed/adt/NotARational.h index eda370afa..d6db16fd4 100644 --- a/src/librawspeed/adt/NotARational.h +++ b/src/librawspeed/adt/NotARational.h @@ -20,7 +20,7 @@ #pragma once -#include // for enable_if_t +#include namespace rawspeed { diff --git a/src/librawspeed/adt/Point.h b/src/librawspeed/adt/Point.h index 42663a182..68e6eb924 100644 --- a/src/librawspeed/adt/Point.h +++ b/src/librawspeed/adt/Point.h @@ -21,13 +21,13 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READNONE -#include // for max, min -#include // for abs -#include // for int32_t, uint64_t -#include // for abs -#include // for tie, operator==, tuple -#include // for make_signed_t +#include "rawspeedconfig.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/adt/Range.h b/src/librawspeed/adt/Range.h index efd316eb6..e3460e017 100644 --- a/src/librawspeed/adt/Range.h +++ b/src/librawspeed/adt/Range.h @@ -20,12 +20,12 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READNONE -#include // for minmax -#include // for assert -#include // for begin, end -#include // for enable_if_t, make_unsigned_t -#include // for pair +#include "rawspeedconfig.h" +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/adt/iterator_range.h b/src/librawspeed/adt/iterator_range.h index 564c53f9b..442eba9a2 100644 --- a/src/librawspeed/adt/iterator_range.h +++ b/src/librawspeed/adt/iterator_range.h @@ -20,7 +20,7 @@ #pragma once -#include // for move +#include namespace rawspeed { diff --git a/src/librawspeed/codes/AbstractPrefixCode.h b/src/librawspeed/codes/AbstractPrefixCode.h index 8166cf6ea..d40c27800 100644 --- a/src/librawspeed/codes/AbstractPrefixCode.h +++ b/src/librawspeed/codes/AbstractPrefixCode.h @@ -20,12 +20,12 @@ #pragma once -#include "adt/BitIterator.h" // for BitMSBIterator -#include "adt/iterator_range.h" // for iterator_range -#include "common/Common.h" // for bitwidth -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include // for uint16_t -#include // for is_integral +#include "adt/BitIterator.h" +#include "adt/iterator_range.h" +#include "common/Common.h" +#include "decoders/RawDecoderException.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/codes/AbstractPrefixCodeDecoder.h b/src/librawspeed/codes/AbstractPrefixCodeDecoder.h index a4afb4611..ab80712b0 100644 --- a/src/librawspeed/codes/AbstractPrefixCodeDecoder.h +++ b/src/librawspeed/codes/AbstractPrefixCodeDecoder.h @@ -21,19 +21,19 @@ #pragma once -#include "adt/Invariant.h" // for invariant -#include "codes/AbstractPrefixCode.h" // for AbstractPrefixCode -#include "codes/PrefixCode.h" // for PrefixCode -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include // for copy, equal, fill, max -#include // for invariant -#include // for size_t -#include // for uint8_t, uint32_t, uint16_t -#include // for less, less_equal -#include // for back_insert_iterator, ba... -#include // for accumulate -#include // for is_integral -#include // for vector, vector<>::const_... +#include "adt/Invariant.h" +#include "codes/AbstractPrefixCode.h" +#include "codes/PrefixCode.h" +#include "decoders/RawDecoderException.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/codes/BinaryPrefixTree.h b/src/librawspeed/codes/BinaryPrefixTree.h index 27626f103..4b0f150c0 100644 --- a/src/librawspeed/codes/BinaryPrefixTree.h +++ b/src/librawspeed/codes/BinaryPrefixTree.h @@ -20,12 +20,12 @@ #pragma once -#include "adt/Invariant.h" // for invariant -#include "codes/AbstractPrefixCode.h" // for AbstractPrefixCode -#include // for assert -#include // for reference_wrapper -#include // IWYU pragma: keep -#include // for unique_ptr, make_unique +#include "adt/Invariant.h" +#include "codes/AbstractPrefixCode.h" +#include +#include +#include // IWYU pragma: keep +#include namespace rawspeed { diff --git a/src/librawspeed/codes/DummyPrefixCodeDecoder.h b/src/librawspeed/codes/DummyPrefixCodeDecoder.h index 2fc68f7bf..c6bfcff0c 100644 --- a/src/librawspeed/codes/DummyPrefixCodeDecoder.h +++ b/src/librawspeed/codes/DummyPrefixCodeDecoder.h @@ -20,15 +20,15 @@ #pragma once -#include "codes/AbstractPrefixCode.h" // for CodeTraits -#include "codes/HuffmanCode.h" // for HuffmanCode... -#include "codes/PrefixCode.h" // for PrefixCode... -#include "io/BitStream.h" // for BitStreamTraits -#include // for invariant -#include // for uint32_t -#include // for tie -#include // for pair -#include // for vector +#include "codes/AbstractPrefixCode.h" +#include "codes/HuffmanCode.h" +#include "codes/PrefixCode.h" +#include "io/BitStream.h" +#include +#include +#include +#include +#include namespace rawspeed { class Buffer; diff --git a/src/librawspeed/codes/HuffmanCode.h b/src/librawspeed/codes/HuffmanCode.h index 024481c54..2302a3f06 100644 --- a/src/librawspeed/codes/HuffmanCode.h +++ b/src/librawspeed/codes/HuffmanCode.h @@ -21,21 +21,21 @@ #pragma once -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Invariant.h" // for invariant -#include "codes/AbstractPrefixCode.h" // for AbstractPrefixCode -#include "codes/PrefixCode.h" // for PrefixCode -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/Buffer.h" // for Buffer -#include // for copy, equal, fill, max -#include // for invariant -#include // for size_t -#include // for uint8_t, uint32_t, uint16_t -#include // for less, less_equal -#include // for back_insert_iterator, ba... -#include // for accumulate -#include // for is_integral -#include // for vector, vector<>::const_... +#include "adt/Array1DRef.h" +#include "adt/Invariant.h" +#include "codes/AbstractPrefixCode.h" +#include "codes/PrefixCode.h" +#include "decoders/RawDecoderException.h" +#include "io/Buffer.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/codes/PrefixCode.h b/src/librawspeed/codes/PrefixCode.h index d0bfcb5ab..a052ce86b 100644 --- a/src/librawspeed/codes/PrefixCode.h +++ b/src/librawspeed/codes/PrefixCode.h @@ -20,17 +20,17 @@ #pragma once -#include "codes/AbstractPrefixCode.h" // for AbstractPrefixCode -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include // for copy, equal, fill, max -#include // for invariant -#include // for size_t -#include // for uint8_t, uint32_t, uint16_t -#include // for less, less_equal -#include // for back_insert_iterator, ba... -#include // for accumulate -#include // for is_integral -#include // for vector, vector<>::const_... +#include "codes/AbstractPrefixCode.h" +#include "decoders/RawDecoderException.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/codes/PrefixCodeDecoder.h b/src/librawspeed/codes/PrefixCodeDecoder.h index ae5333f96..5ca786299 100644 --- a/src/librawspeed/codes/PrefixCodeDecoder.h +++ b/src/librawspeed/codes/PrefixCodeDecoder.h @@ -22,11 +22,10 @@ // IWYU pragma: begin_exports -#include "codes/PrefixCodeLUTDecoder.h" // for PrefixCodeLUTDecoder -// #include "codes/PrefixCodeLookupDecoder.h" // for -// PrefixCodeLookupDecoder #include "codes/PrefixCodeTreeDecoder.h" // -// for PrefixCodeTreeDecoder #include "codes/PrefixCodeVectorDecoder.h" -// // for PrefixCodeVectorDecoder +#include "codes/PrefixCodeLUTDecoder.h" +// #include "codes/PrefixCodeLookupDecoder.h" +// #include "codes/PrefixCodeTreeDecoder.h" +// #include "codes/PrefixCodeVectorDecoder.h" // IWYU pragma: end_exports diff --git a/src/librawspeed/codes/PrefixCodeLUTDecoder.h b/src/librawspeed/codes/PrefixCodeLUTDecoder.h index c8e979f4a..0c88afa50 100644 --- a/src/librawspeed/codes/PrefixCodeLUTDecoder.h +++ b/src/librawspeed/codes/PrefixCodeLUTDecoder.h @@ -21,16 +21,16 @@ #pragma once -#include "codes/PrefixCodeLookupDecoder.h" // for PrefixCodeLookupDecoder -#include "common/Common.h" // for extractHighBits -#include "decoders/RawDecoderException.h" // for ThrowException, Thro... -#include "io/BitStream.h" // for BitStreamTraits -#include // for invariant -#include // for size_t -#include // for int32_t, uint16_t -#include // for allocator_traits<>::... -#include // for tie -#include // for vector +#include "codes/PrefixCodeLookupDecoder.h" +#include "common/Common.h" +#include "decoders/RawDecoderException.h" +#include "io/BitStream.h" +#include +#include +#include +#include +#include +#include /* * The following code is inspired by the IJG JPEG library. diff --git a/src/librawspeed/codes/PrefixCodeLookupDecoder.h b/src/librawspeed/codes/PrefixCodeLookupDecoder.h index df55c2b7e..b77d39e31 100644 --- a/src/librawspeed/codes/PrefixCodeLookupDecoder.h +++ b/src/librawspeed/codes/PrefixCodeLookupDecoder.h @@ -21,16 +21,16 @@ #pragma once -#include "codes/AbstractPrefixCodeDecoder.h" // for AbstractPrefixCod... -#include "codes/HuffmanCode.h" // for HuffmanCode... -#include "decoders/RawDecoderException.h" // for ThrowRDE -#include "io/BitStream.h" // for BitStreamTraits -#include // for invariant -#include // for uint32_t, uint16_t -#include // for allocator_traits... -#include // for tie -#include // for pair -#include // for vector +#include "codes/AbstractPrefixCodeDecoder.h" +#include "codes/HuffmanCode.h" +#include "decoders/RawDecoderException.h" +#include "io/BitStream.h" +#include +#include +#include +#include +#include +#include /* * The following code is inspired by the IJG JPEG library. diff --git a/src/librawspeed/codes/PrefixCodeTreeDecoder.h b/src/librawspeed/codes/PrefixCodeTreeDecoder.h index 9507a816a..7e9d66ef6 100644 --- a/src/librawspeed/codes/PrefixCodeTreeDecoder.h +++ b/src/librawspeed/codes/PrefixCodeTreeDecoder.h @@ -21,19 +21,19 @@ #pragma once -#include "codes/AbstractPrefixCodeDecoder.h" // for AbstractPrefixCodeDecoder... -#include "codes/BinaryPrefixTree.h" // for BinaryPrefixTree<>:... -#include "decoders/RawDecoderException.h" // for ThrowException, Thro... -#include "io/BitStream.h" // for BitStreamTraits -#include // for max, for_each, copy -#include // for invariant -#include // for initializer_list -#include // for advance, next -#include // for unique_ptr, make_unique -#include // for optional -#include // for tie -#include // for pair -#include // for vector, vector<>::co... +#include "codes/AbstractPrefixCodeDecoder.h" +#include "codes/BinaryPrefixTree.h" +#include "decoders/RawDecoderException.h" +#include "io/BitStream.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/codes/PrefixCodeVectorDecoder.h b/src/librawspeed/codes/PrefixCodeVectorDecoder.h index 0f7ce290c..ee7121cca 100644 --- a/src/librawspeed/codes/PrefixCodeVectorDecoder.h +++ b/src/librawspeed/codes/PrefixCodeVectorDecoder.h @@ -21,15 +21,15 @@ #pragma once -#include "codes/AbstractPrefixCodeDecoder.h" // for AbstractPrefixCodeDecoder... -#include "decoders/RawDecoderException.h" // for ThrowRDE -#include "io/BitStream.h" // for BitStreamTraits -#include // for max, fill_n -#include // for invariant -#include // for uint64_t -#include // for tie -#include // for pair -#include // for vector +#include "codes/AbstractPrefixCodeDecoder.h" +#include "decoders/RawDecoderException.h" +#include "io/BitStream.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/BayerPhase.h b/src/librawspeed/common/BayerPhase.h index b10bc1b3b..861a6c25a 100644 --- a/src/librawspeed/common/BayerPhase.h +++ b/src/librawspeed/common/BayerPhase.h @@ -20,17 +20,17 @@ #pragma once -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::GREEN -#include // for find_if, equal -#include // for array, operator== -#include // for assert -#include // for abs -#include // for abs -#include // for distance -#include // for optional -#include // for swap +#include "adt/Array2DRef.h" +#include "adt/Point.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/ChecksumFile.cpp b/src/librawspeed/common/ChecksumFile.cpp index c1f1dff20..1e9f0c864 100644 --- a/src/librawspeed/common/ChecksumFile.cpp +++ b/src/librawspeed/common/ChecksumFile.cpp @@ -19,12 +19,12 @@ */ #include "common/ChecksumFile.h" -#include "common/Common.h" // for splitString -#include "common/RawspeedException.h" // for ThrowException, ThrowRSE -#include "io/FileReader.h" // for FileReader -#include // for assert -#include // for string, allocator, operator+ -#include // for vector +#include "common/Common.h" +#include "common/RawspeedException.h" +#include "io/FileReader.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/ChecksumFile.h b/src/librawspeed/common/ChecksumFile.h index 7e0dcc6d0..68ccdc316 100644 --- a/src/librawspeed/common/ChecksumFile.h +++ b/src/librawspeed/common/ChecksumFile.h @@ -20,8 +20,8 @@ #pragma once -#include // for string, allocator -#include // for vector +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/Common.cpp b/src/librawspeed/common/Common.cpp index 323a7a54d..733a384b1 100644 --- a/src/librawspeed/common/Common.cpp +++ b/src/librawspeed/common/Common.cpp @@ -19,8 +19,8 @@ */ #include "common/Common.h" -#include // for va_end, va_list, va_start -#include // for fprintf, stdout, vfprintf +#include +#include // #define _DEBUG diff --git a/src/librawspeed/common/Common.h b/src/librawspeed/common/Common.h index 8a79f8e04..ddc4fa653 100644 --- a/src/librawspeed/common/Common.h +++ b/src/librawspeed/common/Common.h @@ -20,19 +20,19 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READNONE -#include "adt/Invariant.h" // for invariant -#include // for max, clamp -#include // for array -#include // for invariant -#include // for CHAR_BIT -#include // for uintptr_t, uint8_t, uint16_t -#include // for size_t, memcpy -#include // for initializer_list -#include // for string, basic_string, allocator -#include // for string_view -#include // for enable_if_t, enable_if, make_signed_t -#include // for vector +#include "rawspeedconfig.h" +#include "adt/Invariant.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include extern "C" int rawspeed_get_number_of_processor_cores(); diff --git a/src/librawspeed/common/Cpuid.cpp b/src/librawspeed/common/Cpuid.cpp index 2f468af94..2890c9b0e 100644 --- a/src/librawspeed/common/Cpuid.cpp +++ b/src/librawspeed/common/Cpuid.cpp @@ -21,7 +21,7 @@ #include "common/Cpuid.h" #if defined(__i386__) || defined(__x86_64__) -#include // for __get_cpuid, bit_SSE2 +#include #endif namespace rawspeed { diff --git a/src/librawspeed/common/Cpuid.h b/src/librawspeed/common/Cpuid.h index 5dab98d2a..e30fa4a02 100644 --- a/src/librawspeed/common/Cpuid.h +++ b/src/librawspeed/common/Cpuid.h @@ -20,7 +20,7 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READNONE +#include "rawspeedconfig.h" namespace rawspeed { diff --git a/src/librawspeed/common/DngOpcodes.cpp b/src/librawspeed/common/DngOpcodes.cpp index 6aca13f00..f9f08a21b 100644 --- a/src/librawspeed/common/DngOpcodes.cpp +++ b/src/librawspeed/common/DngOpcodes.cpp @@ -20,26 +20,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for RAWSPEED_READONLY +#include "rawspeedconfig.h" #include "common/DngOpcodes.h" -#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef -#include "adt/Mutex.h" // for MutexLocker -#include "adt/Point.h" // for iRectangle2D, iPoint2D -#include "common/Common.h" // for roundUpDivision, clampBits -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::big -#include // for generate_n, clamp, fill_n -#include // for assert -#include // for isfinite, pow +#include "adt/CroppedArray2DRef.h" +#include "adt/Mutex.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include #include -#include // for abs -#include // for back_insert_iterator, back... -#include // for numeric_limits +#include +#include +#include #include -#include // for optional, nullopt -#include // for tie, tuple +#include +#include #include #include #include diff --git a/src/librawspeed/common/DngOpcodes.h b/src/librawspeed/common/DngOpcodes.h index b61fcb389..f5a00bbfa 100644 --- a/src/librawspeed/common/DngOpcodes.h +++ b/src/librawspeed/common/DngOpcodes.h @@ -21,12 +21,12 @@ #pragma once -#include // for uint32_t -#include // for map -#include // for unique_ptr -#include // for optional -#include // for pair -#include // for vector +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/ErrorLog.cpp b/src/librawspeed/common/ErrorLog.cpp index 263d4858e..217403047 100644 --- a/src/librawspeed/common/ErrorLog.cpp +++ b/src/librawspeed/common/ErrorLog.cpp @@ -19,9 +19,9 @@ */ #include "ErrorLog.h" -#include "adt/Mutex.h" // for MutexLocker +#include "adt/Mutex.h" #include -#include // for move +#include #include namespace rawspeed { diff --git a/src/librawspeed/common/ErrorLog.h b/src/librawspeed/common/ErrorLog.h index 8301afd7b..7f71957db 100644 --- a/src/librawspeed/common/ErrorLog.h +++ b/src/librawspeed/common/ErrorLog.h @@ -20,10 +20,10 @@ #pragma once -#include "ThreadSafetyAnalysis.h" // for REQUIRES, GUARDED_BY -#include "adt/Mutex.h" // for Mutex -#include // for string, basic_string -#include // for vector +#include "ThreadSafetyAnalysis.h" +#include "adt/Mutex.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/FloatingPoint.h b/src/librawspeed/common/FloatingPoint.h index 7ade8204e..11d20221c 100644 --- a/src/librawspeed/common/FloatingPoint.h +++ b/src/librawspeed/common/FloatingPoint.h @@ -21,7 +21,7 @@ #pragma once -#include // for uint32_t, int32_t, uint16_t +#include namespace rawspeed { diff --git a/src/librawspeed/common/GetNumberOfProcessorCores.cpp b/src/librawspeed/common/GetNumberOfProcessorCores.cpp index 9ce30700d..ea3db3328 100644 --- a/src/librawspeed/common/GetNumberOfProcessorCores.cpp +++ b/src/librawspeed/common/GetNumberOfProcessorCores.cpp @@ -18,11 +18,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP -#include "common/Common.h" // for rawspeed_get_number_of_processor_cores +#include "rawspeedconfig.h" +#include "common/Common.h" #ifdef HAVE_OPENMP -#include // for omp_get_max_threads +#include #endif // define this function, it is only declared in rawspeed: diff --git a/src/librawspeed/common/RawImage.cpp b/src/librawspeed/common/RawImage.cpp index d615b125f..511120f99 100644 --- a/src/librawspeed/common/RawImage.cpp +++ b/src/librawspeed/common/RawImage.cpp @@ -18,23 +18,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for RAWSPEED_READONLY, HAVE_OP... +#include "rawspeedconfig.h" #include "common/RawImage.h" #include "adt/CroppedArray2DRef.h" #include "adt/Mutex.h" #include "adt/Point.h" #include "common/Common.h" #include "common/TableLookUp.h" -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/IOException.h" // for IOException -#include "parsers/TiffParserException.h" // for TiffParserException -#include // for min, fill, max, fill_n -#include // for assert +#include "decoders/RawDecoderException.h" +#include "io/IOException.h" +#include "parsers/TiffParserException.h" +#include +#include #include #include -#include // for numeric_limits -#include // for allocator, unique_ptr, mak... -#include // for move, swap +#include +#include +#include #include #ifdef DEBUG @@ -42,7 +42,7 @@ #endif #if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) -#include "AddressSanitizer.h" // for ASan::... +#include "AddressSanitizer.h" #endif namespace rawspeed { diff --git a/src/librawspeed/common/RawImage.h b/src/librawspeed/common/RawImage.h index 72cd217e6..0e8e93dcd 100644 --- a/src/librawspeed/common/RawImage.h +++ b/src/librawspeed/common/RawImage.h @@ -20,28 +20,28 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY, WITH... -#include "ThreadSafetyAnalysis.h" // for GUARDED_BY, REQUIRES -#include "adt/AlignedAllocator.h" // for AlignedAllocator -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef -#include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocatorAda... -#include "adt/Mutex.h" // for Mutex -#include "adt/NotARational.h" // for NotARational -#include "adt/Point.h" // for iPoint2D, iRectangle2D ... -#include "common/Common.h" // for writeLog, DEBUG_PRIO -#include "common/ErrorLog.h" // for ErrorLog -#include "common/TableLookUp.h" // for TableLookUp -#include "metadata/BlackArea.h" // for BlackArea -#include "metadata/ColorFilterArray.h" // for ColorFilterArray -#include // for array -#include // for assert -#include // for NAN -#include // for byte -#include // for uint32_t, uint16_t, uin... -#include // for unique_ptr, operator== -#include // for string -#include // for vector +#include "rawspeedconfig.h" +#include "ThreadSafetyAnalysis.h" +#include "adt/AlignedAllocator.h" +#include "adt/Array2DRef.h" +#include "adt/CroppedArray2DRef.h" +#include "adt/DefaultInitAllocatorAdaptor.h" +#include "adt/Mutex.h" +#include "adt/NotARational.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/ErrorLog.h" +#include "common/TableLookUp.h" +#include "metadata/BlackArea.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/RawImageDataFloat.cpp b/src/librawspeed/common/RawImageDataFloat.cpp index f285bf91a..4043a0b43 100644 --- a/src/librawspeed/common/RawImageDataFloat.cpp +++ b/src/librawspeed/common/RawImageDataFloat.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "common/RawImage.h" // for RawImageDataFloat, RawImag... -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for writeLog, DEBUG_PRIO, DEBU... -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "metadata/BlackArea.h" // for BlackArea -#include // for fill_n, max, min -#include // for array -#include // for uint32_t, uint8_t, uint16_t -#include // for vector +#include "common/RawImage.h" +#include "adt/Array2DRef.h" +#include "adt/CroppedArray2DRef.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "decoders/RawDecoderException.h" +#include "metadata/BlackArea.h" +#include +#include +#include +#include using std::max; using std::min; diff --git a/src/librawspeed/common/RawImageDataU16.cpp b/src/librawspeed/common/RawImageDataU16.cpp index ce1c63512..8fcacb922 100644 --- a/src/librawspeed/common/RawImageDataU16.cpp +++ b/src/librawspeed/common/RawImageDataU16.cpp @@ -18,24 +18,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for WITH_SSE2 -#include "common/RawImage.h" // for RawImageDataU16, RawImageType -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for clampBits, roundDown, writ... -#include "common/TableLookUp.h" // for TableLookUp -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "metadata/BlackArea.h" // for BlackArea -#include // for fill_n, fill, max, min -#include // for array -#include // for uint16_t, uint32_t, uint8_t -#include // for unique_ptr -#include // for vector +#include "rawspeedconfig.h" +#include "common/RawImage.h" +#include "adt/Array2DRef.h" +#include "adt/CroppedArray2DRef.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/TableLookUp.h" +#include "decoders/RawDecoderException.h" +#include "metadata/BlackArea.h" +#include +#include +#include +#include +#include #ifdef WITH_SSE2 -#include "common/Cpuid.h" // for Cpuid -#include // for __m128i, _mm_set1_epi32 +#include "common/Cpuid.h" +#include #endif using std::array; diff --git a/src/librawspeed/common/RawspeedException.h b/src/librawspeed/common/RawspeedException.h index 49c9f5855..9d4a4374a 100644 --- a/src/librawspeed/common/RawspeedException.h +++ b/src/librawspeed/common/RawspeedException.h @@ -21,12 +21,12 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_NOINLINE, RAWSPEED_UNLIKELY_FUN... -#include "common/Common.h" // for writeLog, DEBUG_PRIO, DEBUG_PRIO::EXTRA -#include // for array -#include // for va_end, va_list, va_start -#include // for vsnprintf, size_t -#include // for runtime_error +#include "rawspeedconfig.h" +#include "common/Common.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/SimpleLUT.h b/src/librawspeed/common/SimpleLUT.h index ccd7bdd8c..cf7bcc335 100644 --- a/src/librawspeed/common/SimpleLUT.h +++ b/src/librawspeed/common/SimpleLUT.h @@ -21,13 +21,13 @@ #pragma once -#include "common/Common.h" // for clampBits -#include // for generate_n, max -#include // for assert -#include // for function -#include // for back_inserter -#include // for enable_if -#include // for vector +#include "common/Common.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/Spline.h b/src/librawspeed/common/Spline.h index 78e05deed..f3f0ad66e 100644 --- a/src/librawspeed/common/Spline.h +++ b/src/librawspeed/common/Spline.h @@ -21,15 +21,15 @@ #pragma once -#include "adt/Point.h" // for iPoint2D -#include // for fill_n, max, copy, min -#include // for assert -#include // for uint16_t -#include // for greater_equal -#include // for numeric_limits -#include // for allocator_traits<>::value_type -#include // for enable_if_t, is_floating_point -#include // for vector +#include "adt/Point.h" +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { class iPoint2D; diff --git a/src/librawspeed/common/TableLookUp.cpp b/src/librawspeed/common/TableLookUp.cpp index 997409d92..b62f9498b 100644 --- a/src/librawspeed/common/TableLookUp.cpp +++ b/src/librawspeed/common/TableLookUp.cpp @@ -21,12 +21,12 @@ #include "common/TableLookUp.h" #include "adt/Invariant.h" -#include "common/Common.h" // for clampBits -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "common/Common.h" +#include "decoders/RawDecoderException.h" #include -#include // for assert -#include // for uint16_t -#include // for numeric_limits +#include +#include +#include #include namespace rawspeed { diff --git a/src/librawspeed/common/TableLookUp.h b/src/librawspeed/common/TableLookUp.h index 2d460070b..3173ba7a5 100644 --- a/src/librawspeed/common/TableLookUp.h +++ b/src/librawspeed/common/TableLookUp.h @@ -21,8 +21,8 @@ #pragma once -#include // for uint16_t -#include // for vector +#include +#include namespace rawspeed { diff --git a/src/librawspeed/common/XTransPhase.h b/src/librawspeed/common/XTransPhase.h index b1d36dcfe..8a7557766 100644 --- a/src/librawspeed/common/XTransPhase.h +++ b/src/librawspeed/common/XTransPhase.h @@ -20,17 +20,17 @@ #pragma once -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::GREEN -#include // for find_if, equal -#include // for array, operator== -#include // for assert -#include // for abs -#include // for abs -#include // for distance -#include // for optional -#include // for swap +#include "adt/Array2DRef.h" +#include "adt/Point.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/AbstractTiffDecoder.cpp b/src/librawspeed/decoders/AbstractTiffDecoder.cpp index baca9e41f..3c79df16c 100644 --- a/src/librawspeed/decoders/AbstractTiffDecoder.cpp +++ b/src/librawspeed/decoders/AbstractTiffDecoder.cpp @@ -19,12 +19,12 @@ */ #include "decoders/AbstractTiffDecoder.h" -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffIFD, TiffRootIFD, Tiff... +#include "decoders/RawDecoderException.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" #include "tiff/TiffTag.h" -#include // for uint32_t -#include // for vector +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/AbstractTiffDecoder.h b/src/librawspeed/decoders/AbstractTiffDecoder.h index b8912c9e8..1137542bb 100644 --- a/src/librawspeed/decoders/AbstractTiffDecoder.h +++ b/src/librawspeed/decoders/AbstractTiffDecoder.h @@ -20,13 +20,13 @@ #pragma once -#include "decoders/RawDecoder.h" // for RawDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffID, TiffRootIFD, TiffRootIFDOwner -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::IMAGEWIDTH -#include // for allocator, unique_ptr -#include // for string -#include // for move +#include "decoders/RawDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/ArwDecoder.cpp b/src/librawspeed/decoders/ArwDecoder.cpp index 8a5817dbb..b1c2249ab 100644 --- a/src/librawspeed/decoders/ArwDecoder.cpp +++ b/src/librawspeed/decoders/ArwDecoder.cpp @@ -20,34 +20,34 @@ */ #include "decoders/ArwDecoder.h" -#include "MemorySanitizer.h" // for MSan +#include "MemorySanitizer.h" #include "adt/Array2DRef.h" #include "adt/Invariant.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for roundDown +#include "adt/NORangesSet.h" +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "common/RawspeedException.h" // for RawspeedException -#include "decoders/RawDecoderException.h" // for ThrowRDE -#include "decompressors/LJpegDecoder.h" // for LJpegDecoder -#include "decompressors/SonyArw1Decompressor.h" // for SonyArw1Decompre... -#include "decompressors/SonyArw2Decompressor.h" // for SonyArw2Decompre... -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "metadata/Camera.h" // for Hints -#include "metadata/ColorFilterArray.h" // for CFAColor, CFACol... -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffRootIFD, Tif... -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for array -#include // for assert +#include "common/RawspeedException.h" +#include "decoders/RawDecoderException.h" +#include "decompressors/LJpegDecoder.h" +#include "decompressors/SonyArw1Decompressor.h" +#include "decompressors/SonyArw2Decompressor.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/Camera.h" +#include "metadata/ColorFilterArray.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include #include -#include // for memcpy, size_t -#include // for unique_ptr, allo... -#include // for operator==, string -#include // for vector +#include +#include +#include +#include using std::vector; diff --git a/src/librawspeed/decoders/ArwDecoder.h b/src/librawspeed/decoders/ArwDecoder.h index 9adae856e..2bb94c331 100644 --- a/src/librawspeed/decoders/ArwDecoder.h +++ b/src/librawspeed/decoders/ArwDecoder.h @@ -21,13 +21,13 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "io/ByteStream.h" // for ByteStream -#include "tiff/TiffIFD.h" // for TiffIFD (ptr only), TiffRo... -#include // for uint32_t -#include // for move +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "tiff/TiffIFD.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/Cr2Decoder.cpp b/src/librawspeed/decoders/Cr2Decoder.cpp index 45c078570..5ff79b8d8 100644 --- a/src/librawspeed/decoders/Cr2Decoder.cpp +++ b/src/librawspeed/decoders/Cr2Decoder.cpp @@ -21,29 +21,29 @@ */ #include "decoders/Cr2Decoder.h" -#include "MemorySanitizer.h" // for MSan -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D +#include "MemorySanitizer.h" +#include "adt/Array2DRef.h" +#include "adt/Point.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowRDE -#include "decompressors/Cr2Decompressor.h" // for Cr2SliceWidths -#include "decompressors/Cr2LJpegDecoder.h" // for Cr2LJpegDecoder -#include "interpolators/Cr2sRawInterpolator.h" // for Cr2sRawInterpolator -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endiannes... -#include "metadata/Camera.h" // for Hints -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::G... -#include "parsers/TiffParserException.h" // for ThrowException, Rawsp... -#include "tiff/TiffEntry.h" // for TiffEntry, TiffDataType +#include "decoders/RawDecoderException.h" +#include "decompressors/Cr2Decompressor.h" +#include "decompressors/Cr2LJpegDecoder.h" +#include "interpolators/Cr2sRawInterpolator.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/Camera.h" +#include "metadata/ColorFilterArray.h" +#include "parsers/TiffParserException.h" +#include "tiff/TiffEntry.h" #include "tiff/TiffIFD.h" -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::CAN... -#include // for array -#include // for assert -#include // for uint32_t, uint16_t -#include // for unique_ptr, allocator -#include // for operator==, string -#include // for vector +#include "tiff/TiffTag.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { class CameraMetaData; diff --git a/src/librawspeed/decoders/Cr2Decoder.h b/src/librawspeed/decoders/Cr2Decoder.h index cde77c935..9402d97a3 100644 --- a/src/librawspeed/decoders/Cr2Decoder.h +++ b/src/librawspeed/decoders/Cr2Decoder.h @@ -20,12 +20,12 @@ #pragma once -#include "adt/Point.h" // for iPoint2D -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for move +#include "adt/Point.h" +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/CrwDecoder.cpp b/src/librawspeed/decoders/CrwDecoder.cpp index b59813682..c46c56213 100644 --- a/src/librawspeed/decoders/CrwDecoder.cpp +++ b/src/librawspeed/decoders/CrwDecoder.cpp @@ -20,29 +20,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for RAWSPEED_READNONE +#include "rawspeedconfig.h" #include "decoders/CrwDecoder.h" -#include "adt/Point.h" // for iPoint2D +#include "adt/Point.h" #include "common/RawImage.h" #include "decoders/RawDecoder.h" -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "decompressors/CrwDecompressor.h" // for CrwDecompressor -#include "io/Buffer.h" // for Buffer -#include "metadata/Camera.h" // for Hints -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::GREEN -#include "tiff/CiffEntry.h" // for CiffEntry, CiffDataType -#include "tiff/CiffIFD.h" // for CiffIFD -#include "tiff/CiffTag.h" // for CiffTag, CiffTag::MAKEMODEL -#include // for array -#include // for assert -#include // for copysignf, expf, logf +#include "decoders/RawDecoderException.h" +#include "decompressors/CrwDecompressor.h" +#include "io/Buffer.h" +#include "metadata/Camera.h" +#include "metadata/ColorFilterArray.h" +#include "tiff/CiffEntry.h" +#include "tiff/CiffIFD.h" +#include "tiff/CiffTag.h" +#include +#include +#include #include -#include // for abs, size_t -#include // for memcmp -#include // for unique_ptr, allocator -#include // for string -#include // for move -#include // for vector +#include +#include +#include +#include +#include +#include using std::vector; diff --git a/src/librawspeed/decoders/CrwDecoder.h b/src/librawspeed/decoders/CrwDecoder.h index 7aa62458e..0966e0b4c 100644 --- a/src/librawspeed/decoders/CrwDecoder.h +++ b/src/librawspeed/decoders/CrwDecoder.h @@ -21,11 +21,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/RawDecoder.h" // for RawDecoder -#include "tiff/CiffIFD.h" // for CiffIFD -#include // for int64_t -#include // for unique_ptr +#include "common/RawImage.h" +#include "decoders/RawDecoder.h" +#include "tiff/CiffIFD.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/DcrDecoder.cpp b/src/librawspeed/decoders/DcrDecoder.cpp index 5b76e448c..a82bf71f7 100644 --- a/src/librawspeed/decoders/DcrDecoder.cpp +++ b/src/librawspeed/decoders/DcrDecoder.cpp @@ -20,21 +20,21 @@ */ #include "decoders/DcrDecoder.h" -#include "adt/NORangesSet.h" // for NORangesSet +#include "adt/NORangesSet.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "decoders/RawDecoderException.h" #include "decoders/SimpleTiffDecoder.h" -#include "decompressors/KodakDecompressor.h" // for KodakDecompressor -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness:... -#include "tiff/TiffEntry.h" // for TiffEntry, TiffDataType -#include "tiff/TiffIFD.h" // for TiffRootIFD, TiffID -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::COMPR... -#include // for array -#include // for assert -#include // for allocator, unique_ptr -#include // for operator==, string +#include "decompressors/KodakDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/DcrDecoder.h b/src/librawspeed/decoders/DcrDecoder.h index 367060df4..26cecb779 100644 --- a/src/librawspeed/decoders/DcrDecoder.h +++ b/src/librawspeed/decoders/DcrDecoder.h @@ -21,11 +21,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/SimpleTiffDecoder.h" // for SimpleTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only), Tiff... -#include // for move +#include "common/RawImage.h" +#include "decoders/SimpleTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/DcsDecoder.cpp b/src/librawspeed/decoders/DcsDecoder.cpp index 8d7ac3448..76336e93d 100644 --- a/src/librawspeed/decoders/DcsDecoder.cpp +++ b/src/librawspeed/decoders/DcsDecoder.cpp @@ -20,21 +20,21 @@ */ #include "decoders/DcsDecoder.h" -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException +#include "decoders/RawDecoderException.h" #include "decoders/SimpleTiffDecoder.h" -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "tiff/TiffEntry.h" // for TiffEntry, TiffD... -#include "tiff/TiffIFD.h" // for TiffRootIFD, TiffID -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for assert -#include // for allocator, uniqu... -#include // for operator==, string +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/DcsDecoder.h b/src/librawspeed/decoders/DcsDecoder.h index 1f464d1d8..ca05675e4 100644 --- a/src/librawspeed/decoders/DcsDecoder.h +++ b/src/librawspeed/decoders/DcsDecoder.h @@ -21,12 +21,12 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include "common/RawImage.h" // for RawImage -#include "decoders/SimpleTiffDecoder.h" // for SimpleTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only), Tiff... -#include // for move +#include "rawspeedconfig.h" +#include "common/RawImage.h" +#include "decoders/SimpleTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/DngDecoder.cpp b/src/librawspeed/decoders/DngDecoder.cpp index 31af5e378..3e3f30792 100644 --- a/src/librawspeed/decoders/DngDecoder.cpp +++ b/src/librawspeed/decoders/DngDecoder.cpp @@ -18,37 +18,37 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_JPEG, HAVE_ZLIB +#include "rawspeedconfig.h" #include "decoders/DngDecoder.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "adt/NotARational.h" // for NotARational -#include "adt/Point.h" // for iPoint2D, iRectan... -#include "common/Common.h" // for roundUpDivision -#include "common/DngOpcodes.h" // for DngOpcodes +#include "adt/NORangesSet.h" +#include "adt/NotARational.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/DngOpcodes.h" #include "common/RawImage.h" #include "decoders/AbstractTiffDecoder.h" -#include "decoders/RawDecoderException.h" // for ThrowRDE, RawDeco... -#include "decompressors/AbstractDngDecompressor.h" // for DngSliceElement -#include "io/Buffer.h" // for Buffer, operator< -#include "io/ByteStream.h" // for ByteStream -#include "metadata/Camera.h" // for Camera -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include "metadata/ColorFilterArray.h" // for CFAColor, ColorFi... -#include "parsers/TiffParserException.h" // for ThrowException -#include "tiff/TiffEntry.h" // for TiffEntry, TiffDa... -#include "tiff/TiffIFD.h" // for TiffIFD, TiffRootIFD -#include "tiff/TiffTag.h" // for TiffTag, TiffTag:... -#include // for max, transform -#include // for array, array<>::v... -#include // for assert +#include "decoders/RawDecoderException.h" +#include "decompressors/AbstractDngDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "metadata/Camera.h" +#include "metadata/CameraMetaData.h" +#include "metadata/ColorFilterArray.h" +#include "parsers/TiffParserException.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include #include -#include // for numeric_limits -#include // for map -#include // for unique_ptr, alloc... +#include +#include +#include #include -#include // for char_traits, string -#include // for move -#include // for vector, allocator +#include +#include +#include using std::map; using std::vector; diff --git a/src/librawspeed/decoders/DngDecoder.h b/src/librawspeed/decoders/DngDecoder.h index f4dee1930..0d16928b0 100644 --- a/src/librawspeed/decoders/DngDecoder.h +++ b/src/librawspeed/decoders/DngDecoder.h @@ -20,12 +20,12 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "tiff/TiffIFD.h" // for TiffIFD (ptr only), TiffRo... -#include // for uint32_t -#include // for optional -#include // for vector +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "tiff/TiffIFD.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/ErfDecoder.cpp b/src/librawspeed/decoders/ErfDecoder.cpp index 3a59407f2..cb28dba3b 100644 --- a/src/librawspeed/decoders/ErfDecoder.cpp +++ b/src/librawspeed/decoders/ErfDecoder.cpp @@ -20,21 +20,21 @@ */ #include "decoders/ErfDecoder.h" -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException +#include "decoders/RawDecoderException.h" #include "decoders/SimpleTiffDecoder.h" -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffRootIFD, TiffID -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for array -#include // for allocator, uniqu... -#include // for operator==, string +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/ErfDecoder.h b/src/librawspeed/decoders/ErfDecoder.h index 93c21894d..6d7d4c9e6 100644 --- a/src/librawspeed/decoders/ErfDecoder.h +++ b/src/librawspeed/decoders/ErfDecoder.h @@ -21,11 +21,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/SimpleTiffDecoder.h" // for SimpleTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only), Tiff... -#include // for move +#include "common/RawImage.h" +#include "decoders/SimpleTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/IiqDecoder.cpp b/src/librawspeed/decoders/IiqDecoder.cpp index 60e2f584a..88fa6dac6 100644 --- a/src/librawspeed/decoders/IiqDecoder.cpp +++ b/src/librawspeed/decoders/IiqDecoder.cpp @@ -22,36 +22,36 @@ */ #include "decoders/IiqDecoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Mutex.h" // for MutexLocker -#include "adt/Point.h" // for iPoint2D +#include "adt/Array2DRef.h" +#include "adt/Mutex.h" +#include "adt/Point.h" #include "common/Common.h" #include "common/RawImage.h" -#include "common/Spline.h" // for Spline, Spline<>::va... -#include "decoders/RawDecoder.h" // for RawDecoder::(anonymous) -#include "decoders/RawDecoderException.h" // for ThrowException, Thro... -#include "decompressors/PhaseOneDecompressor.h" // for PhaseOneStrip, Phase... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianne... -#include "metadata/Camera.h" // for Camera -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include "metadata/ColorFilterArray.h" // for ColorFilterArray -#include "tiff/TiffIFD.h" // for TiffID, TiffRootIFD -#include // for max, adjacent_find -#include // for array, array<>::valu... -#include // for assert -#include // for PRIu64 -#include // for lround +#include "common/Spline.h" +#include "decoders/RawDecoder.h" +#include "decoders/RawDecoderException.h" +#include "decompressors/PhaseOneDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/Camera.h" +#include "metadata/CameraMetaData.h" +#include "metadata/ColorFilterArray.h" +#include "tiff/TiffIFD.h" +#include +#include +#include +#include +#include #include -#include // for abs -#include // for greater_equal -#include // for advance, next, begin -#include // for unique_ptr -#include // for optional, nullopt -#include // for operator==, string -#include // for move -#include // for vector, allocator +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/IiqDecoder.h b/src/librawspeed/decoders/IiqDecoder.h index 5edf513c4..6e6adc1f6 100644 --- a/src/librawspeed/decoders/IiqDecoder.h +++ b/src/librawspeed/decoders/IiqDecoder.h @@ -21,13 +21,13 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for uint32_t, uint16_t -#include // for move -#include // for vector +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/KdcDecoder.cpp b/src/librawspeed/decoders/KdcDecoder.cpp index 800712604..9c4979755 100644 --- a/src/librawspeed/decoders/KdcDecoder.cpp +++ b/src/librawspeed/decoders/KdcDecoder.cpp @@ -20,26 +20,26 @@ */ #include "decoders/KdcDecoder.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/NORangesSet.h" +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowRDE -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "metadata/Camera.h" // for Hints -#include "parsers/TiffParserException.h" // for ThrowException -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffRootIFD, TiffID -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for array -#include // for assert -#include // for uint32_t, uint64_t -#include // for numeric_limits -#include // for unique_ptr, allo... -#include // for operator==, string +#include "decoders/RawDecoderException.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/Camera.h" +#include "parsers/TiffParserException.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/KdcDecoder.h b/src/librawspeed/decoders/KdcDecoder.h index 86e17eda2..42a57fea6 100644 --- a/src/librawspeed/decoders/KdcDecoder.h +++ b/src/librawspeed/decoders/KdcDecoder.h @@ -21,11 +21,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for move +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/MefDecoder.cpp b/src/librawspeed/decoders/MefDecoder.cpp index dd727f306..dda9422c3 100644 --- a/src/librawspeed/decoders/MefDecoder.cpp +++ b/src/librawspeed/decoders/MefDecoder.cpp @@ -20,17 +20,17 @@ */ #include "decoders/MefDecoder.h" -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException +#include "decoders/RawDecoderException.h" #include "decoders/SimpleTiffDecoder.h" -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" #include "tiff/TiffIFD.h" -#include // for allocator, opera... +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/MefDecoder.h b/src/librawspeed/decoders/MefDecoder.h index ae59aad01..d4a4b2f88 100644 --- a/src/librawspeed/decoders/MefDecoder.h +++ b/src/librawspeed/decoders/MefDecoder.h @@ -21,11 +21,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/SimpleTiffDecoder.h" // for SimpleTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only), Tiff... -#include // for move +#include "common/RawImage.h" +#include "decoders/SimpleTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/MosDecoder.cpp b/src/librawspeed/decoders/MosDecoder.cpp index 72010d09a..82e5e2dd2 100644 --- a/src/librawspeed/decoders/MosDecoder.cpp +++ b/src/librawspeed/decoders/MosDecoder.cpp @@ -20,31 +20,31 @@ */ #include "decoders/MosDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for trimSpaces +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" #include "decoders/AbstractTiffDecoder.h" -#include "decoders/IiqDecoder.h" // for IiqDecoder -#include "decoders/RawDecoder.h" // for RawDecoder -#include "decoders/RawDecoderException.h" // for ThrowRDE -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for DataBuffer, Buffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "parsers/TiffParserException.h" // for ThrowException -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffRootIFD, Tif... -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for array -#include // for assert -#include // for uint32_t -#include // for memchr -#include // for istringstream -#include // for unique_ptr +#include "decoders/IiqDecoder.h" +#include "decoders/RawDecoder.h" +#include "decoders/RawDecoderException.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "parsers/TiffParserException.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include +#include +#include #include -#include // for string, allocator +#include #include -#include // for move +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/MosDecoder.h b/src/librawspeed/decoders/MosDecoder.h index 8d0678a70..ba29a172d 100644 --- a/src/librawspeed/decoders/MosDecoder.h +++ b/src/librawspeed/decoders/MosDecoder.h @@ -21,11 +21,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for string -#include // for string_view +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "tiff/TiffIFD.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/MrwDecoder.cpp b/src/librawspeed/decoders/MrwDecoder.cpp index f222bee4e..dc814d5cc 100644 --- a/src/librawspeed/decoders/MrwDecoder.cpp +++ b/src/librawspeed/decoders/MrwDecoder.cpp @@ -21,22 +21,22 @@ */ #include "decoders/MrwDecoder.h" -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "metadata/Camera.h" // for Hints -#include "parsers/TiffParser.h" // for TiffParser -#include "tiff/TiffIFD.h" // for TiffRootIFDOwner +#include "decoders/RawDecoderException.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/Camera.h" +#include "parsers/TiffParser.h" +#include "tiff/TiffIFD.h" #include -#include // for assert +#include #include -#include // for memcmp -#include // for allocator, uniqu... +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/MrwDecoder.h b/src/librawspeed/decoders/MrwDecoder.h index d014b5c08..9a82ed2b0 100644 --- a/src/librawspeed/decoders/MrwDecoder.h +++ b/src/librawspeed/decoders/MrwDecoder.h @@ -21,13 +21,13 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/RawDecoder.h" // for RawDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFDOwner -#include // for array -#include // for NAN -#include // for uint32_t +#include "common/RawImage.h" +#include "decoders/RawDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/NakedDecoder.cpp b/src/librawspeed/decoders/NakedDecoder.cpp index 49064724a..d8b00c04d 100644 --- a/src/librawspeed/decoders/NakedDecoder.cpp +++ b/src/librawspeed/decoders/NakedDecoder.cpp @@ -20,20 +20,20 @@ */ #include "decoders/NakedDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" #include "decoders/RawDecoder.h" -#include "decoders/RawDecoderException.h" // for ThrowException -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "metadata/Camera.h" // for Camera, Hints -#include // for map -#include // for optional, nullopt -#include // for string, char_traits -#include // for operator==, basi... +#include "decoders/RawDecoderException.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/Camera.h" +#include +#include +#include +#include using std::map; diff --git a/src/librawspeed/decoders/NakedDecoder.h b/src/librawspeed/decoders/NakedDecoder.h index ad6e22c2e..38eb55d03 100644 --- a/src/librawspeed/decoders/NakedDecoder.h +++ b/src/librawspeed/decoders/NakedDecoder.h @@ -21,13 +21,13 @@ #pragma once -#include "common/Common.h" // for BitOrder, BitOrder::MSB16 -#include "common/RawImage.h" // for RawImage -#include "decoders/RawDecoder.h" // for RawDecoder -#include // for uint32_t -#include // for less -#include // for map -#include // for string +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoder.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/NefDecoder.cpp b/src/librawspeed/decoders/NefDecoder.cpp index 6385f4f82..e3402f74d 100644 --- a/src/librawspeed/decoders/NefDecoder.cpp +++ b/src/librawspeed/decoders/NefDecoder.cpp @@ -20,33 +20,33 @@ */ #include "decoders/NefDecoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for clampBits, round... +#include "adt/Array2DRef.h" +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowRDE -#include "decompressors/NikonDecompressor.h" // for NikonDecompressor -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for getU16BE, Endian... -#include "io/IOException.h" // for ThrowException -#include "metadata/Camera.h" // for Hints -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include "metadata/ColorFilterArray.h" // for CFAColor, CFACol... -#include "tiff/TiffEntry.h" // for TiffEntry, TiffD... -#include "tiff/TiffIFD.h" // for TiffRootIFD, Tif... -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for min, max +#include "decoders/RawDecoderException.h" +#include "decompressors/NikonDecompressor.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/BitPumpMSB.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "io/IOException.h" +#include "metadata/Camera.h" +#include "metadata/CameraMetaData.h" +#include "metadata/ColorFilterArray.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include #include -#include // for assert -#include // for pow, exp, log +#include +#include #include -#include // for unique_ptr, allo... -#include // for operator<<, basi... -#include // for string, basic_st... -#include // for vector +#include +#include +#include +#include using std::vector; diff --git a/src/librawspeed/decoders/NefDecoder.h b/src/librawspeed/decoders/NefDecoder.h index 9b43f4eed..1bd73a202 100644 --- a/src/librawspeed/decoders/NefDecoder.h +++ b/src/librawspeed/decoders/NefDecoder.h @@ -20,16 +20,16 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "decoders/RawDecoder.h" // for RawDecoder::RawSlice -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffIFD (ptr only), TiffRo... -#include // for array -#include // for uint8_t, uint16_t, uint32_t -#include // for string -#include // for move -#include // for vector +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "decoders/RawDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/OrfDecoder.cpp b/src/librawspeed/decoders/OrfDecoder.cpp index 32c35f360..5e945d04c 100644 --- a/src/librawspeed/decoders/OrfDecoder.cpp +++ b/src/librawspeed/decoders/OrfDecoder.cpp @@ -21,27 +21,27 @@ */ #include "decoders/OrfDecoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/NORangesSet.h" // for NORangesSet -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, roundUp +#include "adt/Array2DRef.h" +#include "adt/NORangesSet.h" +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException -#include "decompressors/OlympusDecompressor.h" // for OlympusDecompressor -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, getH... -#include "metadata/ColorFilterArray.h" // for CFAColor, ColorF... -#include "tiff/TiffEntry.h" // for TiffEntry, TiffD... -#include "tiff/TiffIFD.h" // for TiffRootIFD, Tif... -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for array -#include // for assert +#include "decoders/RawDecoderException.h" +#include "decompressors/OlympusDecompressor.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/BitPumpMSB.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/ColorFilterArray.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include #include -#include // for unique_ptr, allo... -#include // for operator==, string +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/OrfDecoder.h b/src/librawspeed/decoders/OrfDecoder.h index bf84a3692..15648db90 100644 --- a/src/librawspeed/decoders/OrfDecoder.h +++ b/src/librawspeed/decoders/OrfDecoder.h @@ -21,13 +21,13 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "io/ByteStream.h" // for ByteStream -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for uint32_t -#include // for move +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "tiff/TiffIFD.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/PefDecoder.cpp b/src/librawspeed/decoders/PefDecoder.cpp index f82d6c39c..b561cf09b 100644 --- a/src/librawspeed/decoders/PefDecoder.cpp +++ b/src/librawspeed/decoders/PefDecoder.cpp @@ -20,23 +20,23 @@ */ #include "decoders/PefDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for BitOrder, BitOrder::MSB +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "decompressors/PentaxDecompressor.h" // for PentaxDecompressor -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness... -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::GREEN -#include "tiff/TiffEntry.h" // for TiffEntry, TiffDataType -#include "tiff/TiffIFD.h" // for TiffRootIFD, TiffIFD -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::ISOS... -#include // for array -#include // for uint32_t -#include // for unique_ptr, allocator -#include // for optional -#include // for operator==, string +#include "decoders/RawDecoderException.h" +#include "decompressors/PentaxDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/ColorFilterArray.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/PefDecoder.h b/src/librawspeed/decoders/PefDecoder.h index 33bf77e73..ba643bcea 100644 --- a/src/librawspeed/decoders/PefDecoder.h +++ b/src/librawspeed/decoders/PefDecoder.h @@ -20,11 +20,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for move +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/RafDecoder.cpp b/src/librawspeed/decoders/RafDecoder.cpp index e20308608..1507d67d5 100644 --- a/src/librawspeed/decoders/RafDecoder.cpp +++ b/src/librawspeed/decoders/RafDecoder.cpp @@ -20,30 +20,30 @@ */ #include "decoders/RafDecoder.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for BitOrder, BitOrd... +#include "adt/Array2DRef.h" +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException -#include "decompressors/FujiDecompressor.h" // for FujiDecompressor -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, getH... -#include "metadata/Camera.h" // for Camera, Hints -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include "metadata/CameraSensorInfo.h" // for CameraSensorInfo -#include "metadata/ColorFilterArray.h" // for ColorFilterArray -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffRootIFD, Tif... -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for array -#include // for assert -#include // for uint32_t -#include // for memcmp -#include // for unique_ptr, allo... -#include // for string, operator== -#include // for vector +#include "decoders/RawDecoderException.h" +#include "decompressors/FujiDecompressor.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/Camera.h" +#include "metadata/CameraMetaData.h" +#include "metadata/CameraSensorInfo.h" +#include "metadata/ColorFilterArray.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/RafDecoder.h b/src/librawspeed/decoders/RafDecoder.h index cf6af9b95..ee9bccded 100644 --- a/src/librawspeed/decoders/RafDecoder.h +++ b/src/librawspeed/decoders/RafDecoder.h @@ -21,11 +21,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for move +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/RawDecoder.cpp b/src/librawspeed/decoders/RawDecoder.cpp index 33d9764b8..084e7ac44 100644 --- a/src/librawspeed/decoders/RawDecoder.cpp +++ b/src/librawspeed/decoders/RawDecoder.cpp @@ -20,29 +20,29 @@ */ #include "decoders/RawDecoder.h" -#include "MemorySanitizer.h" // for MSan -#include "adt/Point.h" // for iPoint2D, iRecta... -#include "common/Common.h" // for writeLog, roundU... +#include "MemorySanitizer.h" +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "io/FileIOException.h" // for ThrowException -#include "io/IOException.h" // for IOException -#include "metadata/Camera.h" // for Camera, Camera::... -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include "metadata/CameraSensorInfo.h" // for CameraSensorInfo -#include "metadata/ColorFilterArray.h" // for ColorFilterArray -#include "parsers/TiffParserException.h" // for TiffParserException -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffIFD -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for array -#include // for assert +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "io/FileIOException.h" +#include "io/IOException.h" +#include "metadata/Camera.h" +#include "metadata/CameraMetaData.h" +#include "metadata/CameraSensorInfo.h" +#include "metadata/ColorFilterArray.h" +#include "parsers/TiffParserException.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include #include -#include // for string, allocator -#include // for vector +#include +#include using std::vector; diff --git a/src/librawspeed/decoders/RawDecoder.h b/src/librawspeed/decoders/RawDecoder.h index 0258bb8bf..95d233bca 100644 --- a/src/librawspeed/decoders/RawDecoder.h +++ b/src/librawspeed/decoders/RawDecoder.h @@ -21,12 +21,12 @@ #pragma once -#include "common/Common.h" // for BitOrder -#include "common/RawImage.h" // for RawImage -#include "io/Buffer.h" // for Buffer -#include "metadata/Camera.h" // for Hints -#include // for uint32_t -#include // for string +#include "common/Common.h" +#include "common/RawImage.h" +#include "io/Buffer.h" +#include "metadata/Camera.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/RawDecoderException.h b/src/librawspeed/decoders/RawDecoderException.h index bd0af9d9d..ef8a926da 100644 --- a/src/librawspeed/decoders/RawDecoderException.h +++ b/src/librawspeed/decoders/RawDecoderException.h @@ -21,10 +21,10 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_NOINLINE, RAWSPEED_UN... +#include "rawspeedconfig.h" // IWYU pragma: begin_exports -#include "common/RawspeedException.h" // for ThrowExceptionHelper, Rawspeed... +#include "common/RawspeedException.h" // IWYU pragma: end_exports namespace rawspeed { diff --git a/src/librawspeed/decoders/Rw2Decoder.cpp b/src/librawspeed/decoders/Rw2Decoder.cpp index 0b3063317..1953fe27c 100644 --- a/src/librawspeed/decoders/Rw2Decoder.cpp +++ b/src/librawspeed/decoders/Rw2Decoder.cpp @@ -20,28 +20,28 @@ */ #include "decoders/Rw2Decoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for writeLog, DEBUG_... +#include "adt/Point.h" +#include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException -#include "decompressors/PanasonicV4Decompressor.h" // for PanasonicV4Decom... -#include "decompressors/PanasonicV5Decompressor.h" // for PanasonicV5Decom... -#include "decompressors/PanasonicV6Decompressor.h" // for PanasonicV6Decom... -#include "decompressors/PanasonicV7Decompressor.h" // for PanasonicV7Decom... -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "metadata/Camera.h" // for Hints -#include "metadata/ColorFilterArray.h" // for CFAColor, CFACol... -#include "tiff/TiffEntry.h" // for TiffEntry, TiffD... -#include "tiff/TiffIFD.h" // for TiffRootIFD, Tif... -#include "tiff/TiffTag.h" // for TiffTag, TiffTag... -#include // for array -#include // for fabs -#include // for uint32_t, uint16_t -#include // for unique_ptr -#include // for string, operator== +#include "decoders/RawDecoderException.h" +#include "decompressors/PanasonicV4Decompressor.h" +#include "decompressors/PanasonicV5Decompressor.h" +#include "decompressors/PanasonicV6Decompressor.h" +#include "decompressors/PanasonicV7Decompressor.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/Camera.h" +#include "metadata/ColorFilterArray.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include +#include using std::fabs; diff --git a/src/librawspeed/decoders/Rw2Decoder.h b/src/librawspeed/decoders/Rw2Decoder.h index 9c03f7bcb..1a6308163 100644 --- a/src/librawspeed/decoders/Rw2Decoder.h +++ b/src/librawspeed/decoders/Rw2Decoder.h @@ -21,12 +21,12 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for string -#include // for move +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/SimpleTiffDecoder.cpp b/src/librawspeed/decoders/SimpleTiffDecoder.cpp index cd3b8363c..8a5d37421 100644 --- a/src/librawspeed/decoders/SimpleTiffDecoder.cpp +++ b/src/librawspeed/decoders/SimpleTiffDecoder.cpp @@ -21,13 +21,13 @@ */ #include "decoders/SimpleTiffDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffIFD -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::IMAGELENGTH +#include "adt/Point.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/Buffer.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" namespace rawspeed { diff --git a/src/librawspeed/decoders/SimpleTiffDecoder.h b/src/librawspeed/decoders/SimpleTiffDecoder.h index 9b0e400a1..512436914 100644 --- a/src/librawspeed/decoders/SimpleTiffDecoder.h +++ b/src/librawspeed/decoders/SimpleTiffDecoder.h @@ -22,11 +22,11 @@ #pragma once -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffIFD (ptr only), TiffRo... -#include // for uint32_t -#include // for move +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/SrwDecoder.cpp b/src/librawspeed/decoders/SrwDecoder.cpp index bfd3d5b66..64ea1bbc9 100644 --- a/src/librawspeed/decoders/SrwDecoder.cpp +++ b/src/librawspeed/decoders/SrwDecoder.cpp @@ -20,26 +20,26 @@ */ #include "decoders/SrwDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for BitOrder, BitOrder:... -#include "decoders/RawDecoderException.h" // for ThrowException, Thr... -#include "decompressors/SamsungV0Decompressor.h" // for SamsungV0Decompressor -#include "decompressors/SamsungV1Decompressor.h" // for SamsungV1Decompressor -#include "decompressors/SamsungV2Decompressor.h" // for SamsungV2Decompressor -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endiann... -#include "metadata/Camera.h" // for Hints -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include "tiff/TiffEntry.h" // for TiffEntry, TiffData... -#include "tiff/TiffIFD.h" // for TiffRootIFD, TiffIFD -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::S... -#include // for array -#include // for uint32_t -#include // for unique_ptr -#include // for operator<<, ostring... -#include // for string, allocator -#include // for vector +#include "adt/Point.h" +#include "common/Common.h" +#include "decoders/RawDecoderException.h" +#include "decompressors/SamsungV0Decompressor.h" +#include "decompressors/SamsungV1Decompressor.h" +#include "decompressors/SamsungV2Decompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/Camera.h" +#include "metadata/CameraMetaData.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/SrwDecoder.h b/src/librawspeed/decoders/SrwDecoder.h index bff0a0930..a64b16884 100644 --- a/src/librawspeed/decoders/SrwDecoder.h +++ b/src/librawspeed/decoders/SrwDecoder.h @@ -20,12 +20,12 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for string -#include // for move +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/StiDecoder.cpp b/src/librawspeed/decoders/StiDecoder.cpp index de4964565..6ed43f4cc 100644 --- a/src/librawspeed/decoders/StiDecoder.cpp +++ b/src/librawspeed/decoders/StiDecoder.cpp @@ -19,21 +19,21 @@ */ #include "decoders/StiDecoder.h" -#include "adt/Point.h" // for iPoint2D +#include "adt/Point.h" #include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException -#include "decompressors/HasselbladLJpegDecoder.h" // for HasselbladLJpegDec... -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endian... -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffRootIFD, TiffIFD -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::... -#include // for uint32_t -#include // for unique_ptr, allocator -#include // for operator==, string +#include "decoders/RawDecoderException.h" +#include "decompressors/HasselbladLJpegDecoder.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/StiDecoder.h b/src/librawspeed/decoders/StiDecoder.h index 4ec101f76..8e5b1a2ad 100644 --- a/src/librawspeed/decoders/StiDecoder.h +++ b/src/librawspeed/decoders/StiDecoder.h @@ -20,11 +20,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for move +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/ThreefrDecoder.cpp b/src/librawspeed/decoders/ThreefrDecoder.cpp index 2b770f0c1..9238b0be4 100644 --- a/src/librawspeed/decoders/ThreefrDecoder.cpp +++ b/src/librawspeed/decoders/ThreefrDecoder.cpp @@ -20,23 +20,23 @@ */ #include "decoders/ThreefrDecoder.h" -#include "adt/Point.h" // for iPoint2D +#include "adt/Point.h" #include "common/Common.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowException -#include "decompressors/HasselbladLJpegDecoder.h" // for HasselbladLJpegDec... -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endian... -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor... -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffIFD.h" // for TiffRootIFD, TiffIFD -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::... -#include // for array -#include // for uint32_t -#include // for unique_ptr, allocator -#include // for operator==, string +#include "decoders/RawDecoderException.h" +#include "decompressors/HasselbladLJpegDecoder.h" +#include "decompressors/UncompressedDecompressor.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "metadata/ColorFilterArray.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decoders/ThreefrDecoder.h b/src/librawspeed/decoders/ThreefrDecoder.h index 57ad0ed50..269e52342 100644 --- a/src/librawspeed/decoders/ThreefrDecoder.h +++ b/src/librawspeed/decoders/ThreefrDecoder.h @@ -21,11 +21,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decoders/AbstractTiffDecoder.h" // for AbstractTiffDecoder -#include "io/Buffer.h" // for Buffer -#include "tiff/TiffIFD.h" // for TiffRootIFD (ptr only) -#include // for move +#include "common/RawImage.h" +#include "decoders/AbstractTiffDecoder.h" +#include "io/Buffer.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/AbstractDngDecompressor.cpp b/src/librawspeed/decompressors/AbstractDngDecompressor.cpp index ba10a3bd5..18bc77c88 100644 --- a/src/librawspeed/decompressors/AbstractDngDecompressor.cpp +++ b/src/librawspeed/decompressors/AbstractDngDecompressor.cpp @@ -19,26 +19,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP, HAV... +#include "rawspeedconfig.h" #include "decompressors/AbstractDngDecompressor.h" -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for rawspeed_get_num... -#include "common/RawImage.h" // for RawImageData -#include "decoders/RawDecoderException.h" // for RawDecoderException -#include "decompressors/DeflateDecompressor.h" // for DeflateDecompressor -#include "decompressors/JpegDecompressor.h" // for JpegDecompressor -#include "decompressors/LJpegDecoder.h" // for LJpegDecoder -#include "decompressors/UncompressedDecompressor.h" // for UncompressedDeco... -#include "decompressors/VC5Decompressor.h" // for VC5Decompressor -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endi... -#include "io/IOException.h" // for IOException, Thr... +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "decompressors/DeflateDecompressor.h" +#include "decompressors/JpegDecompressor.h" +#include "decompressors/LJpegDecoder.h" +#include "decompressors/UncompressedDecompressor.h" +#include "decompressors/VC5Decompressor.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "io/IOException.h" #include -#include // for numeric_limits -#include // for unique_ptr -#include // for string -#include // for vector, allocator +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/AbstractDngDecompressor.h b/src/librawspeed/decompressors/AbstractDngDecompressor.h index 41c6ad859..046709263 100644 --- a/src/librawspeed/decompressors/AbstractDngDecompressor.h +++ b/src/librawspeed/decompressors/AbstractDngDecompressor.h @@ -21,15 +21,15 @@ #pragma once -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for roundUpDivision -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/ByteStream.h" // for ByteStream -#include // for uint32_t -#include // for move -#include // for vector +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/ByteStream.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/AbstractLJpegDecoder.cpp b/src/librawspeed/decompressors/AbstractLJpegDecoder.cpp index aaa629590..027013c5f 100644 --- a/src/librawspeed/decompressors/AbstractLJpegDecoder.cpp +++ b/src/librawspeed/decompressors/AbstractLJpegDecoder.cpp @@ -21,24 +21,24 @@ */ #include "decompressors/AbstractLJpegDecoder.h" -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D +#include "adt/Array1DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" #include "codes/AbstractPrefixCode.h" -#include "codes/HuffmanCode.h" // for HuffmanCode -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder, Huffma... +#include "codes/HuffmanCode.h" +#include "codes/PrefixCodeDecoder.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowRDE -#include "io/Buffer.h" // for Buffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianne... -#include // for array +#include "decoders/RawDecoderException.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include #include #include -#include // for unique_ptr, make_unique -#include // for optional -#include // for move -#include // for vector +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/AbstractLJpegDecoder.h b/src/librawspeed/decompressors/AbstractLJpegDecoder.h index 28a13bd3b..ce37bcfbb 100644 --- a/src/librawspeed/decompressors/AbstractLJpegDecoder.h +++ b/src/librawspeed/decompressors/AbstractLJpegDecoder.h @@ -21,18 +21,18 @@ #pragma once -#include "codes/HuffmanCode.h" // for HuffmanCode -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/RawImage.h" // for RawImage -#include "common/RawspeedException.h" // for ThrowException -#include "decoders/RawDecoderException.h" // for ThrowException, Thro... -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/ByteStream.h" // for ByteStream -#include // for fill_n, fill -#include // for array -#include // for uint16_t, uint32_t -#include // for unique_ptr -#include // for vector +#include "codes/HuffmanCode.h" +#include "codes/PrefixCodeDecoder.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "decoders/RawDecoderException.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/ByteStream.h" +#include +#include +#include +#include +#include /* * The following enum and two structs are stolen from the IJG JPEG library diff --git a/src/librawspeed/decompressors/AbstractSamsungDecompressor.h b/src/librawspeed/decompressors/AbstractSamsungDecompressor.h index 07b5722be..fcd511803 100644 --- a/src/librawspeed/decompressors/AbstractSamsungDecompressor.h +++ b/src/librawspeed/decompressors/AbstractSamsungDecompressor.h @@ -20,9 +20,9 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include // for move +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/Cr2Decompressor.cpp b/src/librawspeed/decompressors/Cr2Decompressor.cpp index b33ed9752..2e09e49c3 100644 --- a/src/librawspeed/decompressors/Cr2Decompressor.cpp +++ b/src/librawspeed/decompressors/Cr2Decompressor.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/Cr2Decompressor.h" // for Cr2Decompressor -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder +#include "decompressors/Cr2Decompressor.h" +#include "codes/PrefixCodeDecoder.h" #include "decompressors/Cr2DecompressorImpl.h" // IWYU pragma: keep namespace rawspeed { diff --git a/src/librawspeed/decompressors/Cr2Decompressor.h b/src/librawspeed/decompressors/Cr2Decompressor.h index 978553f04..1c29ab03f 100644 --- a/src/librawspeed/decompressors/Cr2Decompressor.h +++ b/src/librawspeed/decompressors/Cr2Decompressor.h @@ -21,24 +21,24 @@ #pragma once -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "adt/iterator_range.h" // for iterator_range -#include "codes/DummyPrefixCodeDecoder.h" // for DummyPrefixCodeDecoder -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder, HuffmanTa... -#include "common/RawImage.h" // for RawImage -#include "common/RawspeedException.h" // for ThrowException -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/ByteStream.h" // for ByteStream -#include // for array -#include // for invariant -#include // for size_t, ptrdiff_t -#include // for uint16_t -#include // for reference_wrapper -#include // for input_iterator_tag -#include // for tuple -#include // for index_sequence -#include // for vector +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "adt/iterator_range.h" +#include "codes/DummyPrefixCodeDecoder.h" +#include "codes/PrefixCodeDecoder.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "decoders/RawDecoderException.h" +#include "io/ByteStream.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/Cr2DecompressorImpl.h b/src/librawspeed/decompressors/Cr2DecompressorImpl.h index e479a3e83..a4e9d3695 100644 --- a/src/librawspeed/decompressors/Cr2DecompressorImpl.h +++ b/src/librawspeed/decompressors/Cr2DecompressorImpl.h @@ -20,27 +20,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D, iPoint2D::area_... -#include "adt/iterator_range.h" // for iterator_range -#include "codes/DummyPrefixCodeDecoder.h" // for DummyPrefixCodeDecoder -#include "codes/PrefixCodeLUTDecoder.h" // for PrefixCodeLUTDecoder -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "decompressors/Cr2Decompressor.h" // for Cr2Decompressor, Cr2SliceWidths -#include "io/BitPumpJPEG.h" // for BitPumpJPEG, BitStream<>:... -#include "io/ByteStream.h" // for ByteStream -#include // for min, transform -#include // for array -#include // for invariant -#include // for size_t -#include // for uint16_t -#include // for cref, reference_wrapper -#include // for initializer_list -#include // for optional -#include // for make_tuple, operator==, get -#include // for move, index_sequence, mak... -#include // for vector +#include "adt/Array2DRef.h" +#include "adt/Point.h" +#include "adt/iterator_range.h" +#include "codes/DummyPrefixCodeDecoder.h" +#include "codes/PrefixCodeLUTDecoder.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "decompressors/Cr2Decompressor.h" +#include "io/BitPumpJPEG.h" +#include "io/ByteStream.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/Cr2LJpegDecoder.cpp b/src/librawspeed/decompressors/Cr2LJpegDecoder.cpp index c007a67e7..1ab815da8 100644 --- a/src/librawspeed/decompressors/Cr2LJpegDecoder.cpp +++ b/src/librawspeed/decompressors/Cr2LJpegDecoder.cpp @@ -21,20 +21,20 @@ */ #include "decompressors/Cr2LJpegDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "adt/Point.h" +#include "codes/PrefixCodeDecoder.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" #include "decompressors/AbstractLJpegDecoder.h" #include "decompressors/Cr2Decompressor.h" -#include "io/ByteStream.h" // for ByteStream -#include // for generate_n -#include // for array -#include // for assert -#include // for uint16_t, uint32_t -#include // for back_insert_iterator, back... -#include // for tuple, get -#include // for vector +#include "io/ByteStream.h" +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/Cr2LJpegDecoder.h b/src/librawspeed/decompressors/Cr2LJpegDecoder.h index e79b8c1d0..2e82871fa 100644 --- a/src/librawspeed/decompressors/Cr2LJpegDecoder.h +++ b/src/librawspeed/decompressors/Cr2LJpegDecoder.h @@ -21,10 +21,10 @@ #pragma once -#include "decompressors/AbstractLJpegDecoder.h" // for AbstractLJpegDecoder -#include "decompressors/Cr2Decompressor.h" // for Cr2SliceWidths -#include // for assert -#include // for uint16_t +#include "decompressors/AbstractLJpegDecoder.h" +#include "decompressors/Cr2Decompressor.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/CrwDecompressor.cpp b/src/librawspeed/decompressors/CrwDecompressor.cpp index a04919d59..0d03a3716 100644 --- a/src/librawspeed/decompressors/CrwDecompressor.cpp +++ b/src/librawspeed/decompressors/CrwDecompressor.cpp @@ -21,22 +21,22 @@ */ #include "decompressors/CrwDecompressor.h" -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D +#include "adt/Array1DRef.h" +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" #include "codes/AbstractPrefixCode.h" -#include "codes/HuffmanCode.h" // for HuffmanCode -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder, HuffmanT... -#include "common/Common.h" // for isIntN -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpJPEG.h" // for BitPumpJPEG, BitStrea... -#include "io/Buffer.h" // for Buffer -#include "io/ByteStream.h" // for ByteStream -#include // for array -#include // for uint8_t, uint16_t, int... -#include // for move +#include "codes/HuffmanCode.h" +#include "codes/PrefixCodeDecoder.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpJPEG.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include +#include +#include using std::array; diff --git a/src/librawspeed/decompressors/CrwDecompressor.h b/src/librawspeed/decompressors/CrwDecompressor.h index 32d293bd0..6c7980170 100644 --- a/src/librawspeed/decompressors/CrwDecompressor.h +++ b/src/librawspeed/decompressors/CrwDecompressor.h @@ -22,13 +22,13 @@ #pragma once -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/BitPumpJPEG.h" // for BitPumpJPEG -#include "io/ByteStream.h" // for ByteStream -#include // for array -#include // for uint32_t, uint8_t +#include "codes/PrefixCodeDecoder.h" +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/BitPumpJPEG.h" +#include "io/ByteStream.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/DeflateDecompressor.cpp b/src/librawspeed/decompressors/DeflateDecompressor.cpp index 8a7c6dd5b..fca7bed06 100644 --- a/src/librawspeed/decompressors/DeflateDecompressor.cpp +++ b/src/librawspeed/decompressors/DeflateDecompressor.cpp @@ -18,28 +18,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_ZLIB -#include "adt/CroppedArray1DRef.h" // for CroppedArray1DRef -#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef -#include "adt/Invariant.h" // for invariant -#include "common/Common.h" // for bit_cast +#include "rawspeedconfig.h" +#include "adt/CroppedArray1DRef.h" +#include "adt/CroppedArray2DRef.h" +#include "adt/Invariant.h" +#include "common/Common.h" #include "common/RawImage.h" #include "io/Buffer.h" -#include // for array -#include // for CHAR_BIT +#include +#include #ifdef HAVE_ZLIB -#include "adt/Point.h" // for iPoint2D -#include "common/FloatingPoint.h" // for Binary32, Binary16, Binary24 -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "adt/Point.h" +#include "common/FloatingPoint.h" +#include "decoders/RawDecoderException.h" #include "decompressors/DeflateDecompressor.h" -#include "io/Endianness.h" // for getBE -#include // for uint32_t, uint16_t -#include // for size_t -#include // for move +#include "io/Endianness.h" +#include +#include +#include #include -#include // for uncompress, zError, Z_OK +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/DeflateDecompressor.h b/src/librawspeed/decompressors/DeflateDecompressor.h index 34448a124..6e2eb925a 100644 --- a/src/librawspeed/decompressors/DeflateDecompressor.h +++ b/src/librawspeed/decompressors/DeflateDecompressor.h @@ -20,15 +20,15 @@ #pragma once -#include "rawspeedconfig.h" // for HAVE_ZLIB +#include "rawspeedconfig.h" #ifdef HAVE_ZLIB -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/Buffer.h" // for Buffer -#include // for unique_ptr -#include // for move +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/Buffer.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/FujiDecompressor.cpp b/src/librawspeed/decompressors/FujiDecompressor.cpp index aff815be2..608214c0d 100644 --- a/src/librawspeed/decompressors/FujiDecompressor.cpp +++ b/src/librawspeed/decompressors/FujiDecompressor.cpp @@ -21,32 +21,32 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for RAWSPEED_READONLY, HAVE_OP... +#include "rawspeedconfig.h" #include "decompressors/FujiDecompressor.h" -#include "MemorySanitizer.h" // for MSan -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/BayerPhase.h" // for getAsCFAColors, BayerPhase -#include "common/Common.h" // for countl_zero, rawspeed_get_... -#include "common/RawImage.h" // for RawImageData, RawImage -#include "common/XTransPhase.h" // for XTransPhase, getAsCFAColors -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB.h" // for BitPumpMSB +#include "MemorySanitizer.h" +#include "adt/Array1DRef.h" +#include "adt/Array2DRef.h" +#include "adt/CroppedArray2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/BayerPhase.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "common/XTransPhase.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpMSB.h" #include "io/ByteStream.h" -#include "io/Endianness.h" // for Endianness, Endianness::big -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::BLUE -#include // for max, min, fill, minmax -#include // for array, array<>::value_type -#include // for assert -#include // for uint16_t, int8_t, uint32_t -#include // for abs -#include // for memcpy, memset -#include // for optional, operator!= -#include // for string -#include // for pair +#include "io/Endianness.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include #include namespace rawspeed { diff --git a/src/librawspeed/decompressors/FujiDecompressor.h b/src/librawspeed/decompressors/FujiDecompressor.h index c7d02a9af..937c2acc6 100644 --- a/src/librawspeed/decompressors/FujiDecompressor.h +++ b/src/librawspeed/decompressors/FujiDecompressor.h @@ -21,19 +21,19 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include "io/ByteStream.h" // for ByteStream -#include "metadata/ColorFilterArray.h" // for CFAColor -#include // for array -#include // for assert -#include // for uint16_t, uint8_t -#include // for pair -#include // for vector +#include "rawspeedconfig.h" +#include "adt/Array2DRef.h" +#include "adt/Point.h" +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/BitPumpMSB.h" +#include "io/ByteStream.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/HasselbladDecompressor.cpp b/src/librawspeed/decompressors/HasselbladDecompressor.cpp index 7351cb1d4..16e021145 100644 --- a/src/librawspeed/decompressors/HasselbladDecompressor.cpp +++ b/src/librawspeed/decompressors/HasselbladDecompressor.cpp @@ -20,17 +20,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "decompressors/HasselbladDecompressor.h" // for HasselbladDecompressor, HasselbladSliceWidths -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D +#include "decompressors/HasselbladDecompressor.h" +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" #include "codes/PrefixCodeDecoder.h" -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowRDE +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" #include "io/BitPumpMSB32.h" -#include "io/ByteStream.h" // for ByteStream -#include // for uint16_t -#include // for move +#include "io/ByteStream.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/HasselbladDecompressor.h b/src/librawspeed/decompressors/HasselbladDecompressor.h index 95493e558..3d703ef8e 100644 --- a/src/librawspeed/decompressors/HasselbladDecompressor.h +++ b/src/librawspeed/decompressors/HasselbladDecompressor.h @@ -22,24 +22,24 @@ #pragma once -#include "adt/Point.h" // for iPoint2D -#include "adt/iterator_range.h" // for iterator_range -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/RawImage.h" // for RawImage -#include "common/RawspeedException.h" // for ThrowException -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 -#include "io/Buffer.h" // for Buffer::size_type -#include "io/ByteStream.h" // for ByteStream -#include // for array -#include // for assert -#include // for size_t, ptrdiff_t -#include // for uint16_t -#include // for reference_wrapper -#include // for input_iterator_tag -#include // for tuple -#include // for index_sequence -#include // for vector +#include "adt/Point.h" +#include "adt/iterator_range.h" +#include "codes/PrefixCodeDecoder.h" +#include "common/RawImage.h" +#include "common/RawspeedException.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpMSB32.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/HasselbladLJpegDecoder.cpp b/src/librawspeed/decompressors/HasselbladLJpegDecoder.cpp index 0f274554d..167753e58 100644 --- a/src/librawspeed/decompressors/HasselbladLJpegDecoder.cpp +++ b/src/librawspeed/decompressors/HasselbladLJpegDecoder.cpp @@ -20,14 +20,14 @@ */ #include "decompressors/HasselbladLJpegDecoder.h" -#include "adt/Point.h" // for iPoint2D -#include "common/RawImage.h" // for RawImage, RawImage... -#include "decoders/RawDecoderException.h" // for ThrowException +#include "adt/Point.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" #include "decompressors/AbstractLJpegDecoder.h" -#include "decompressors/HasselbladDecompressor.h" // for HasselbladDecompre... -#include "io/ByteStream.h" // for ByteStream -#include // for uint16_t -#include // for vector +#include "decompressors/HasselbladDecompressor.h" +#include "io/ByteStream.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/HasselbladLJpegDecoder.h b/src/librawspeed/decompressors/HasselbladLJpegDecoder.h index 769e5341c..761a7bd02 100644 --- a/src/librawspeed/decompressors/HasselbladLJpegDecoder.h +++ b/src/librawspeed/decompressors/HasselbladLJpegDecoder.h @@ -21,8 +21,8 @@ #pragma once -#include "decompressors/AbstractLJpegDecoder.h" // for AbstractLJpegDecoder -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 +#include "decompressors/AbstractLJpegDecoder.h" +#include "io/BitPumpMSB32.h" namespace rawspeed { diff --git a/src/librawspeed/decompressors/JpegDecompressor.cpp b/src/librawspeed/decompressors/JpegDecompressor.cpp index fb7e10552..b1e989eb8 100644 --- a/src/librawspeed/decompressors/JpegDecompressor.cpp +++ b/src/librawspeed/decompressors/JpegDecompressor.cpp @@ -19,24 +19,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_JPEG_MEM_SRC, HAVE_JPEG -#include "adt/AlignedAllocator.h" // for AlignedAllocator +#include "rawspeedconfig.h" +#include "adt/AlignedAllocator.h" #include #ifdef HAVE_JPEG -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Point.h" // for iPoint2D -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "adt/Array2DRef.h" +#include "adt/Point.h" +#include "decoders/RawDecoderException.h" #include "decompressors/JpegDecompressor.h" -#include // for min, fill_n, max -#include // for array -#include // for jpeg_destroy_decompress -#include // for unique_ptr -#include // for vector +#include +#include +#include +#include +#include #ifndef HAVE_JPEG_MEM_SRC -#include "io/IOException.h" // for ThrowIOE +#include "io/IOException.h" #endif using std::min; diff --git a/src/librawspeed/decompressors/JpegDecompressor.h b/src/librawspeed/decompressors/JpegDecompressor.h index 09a489e8b..8b86f0f74 100644 --- a/src/librawspeed/decompressors/JpegDecompressor.h +++ b/src/librawspeed/decompressors/JpegDecompressor.h @@ -20,15 +20,15 @@ #pragma once -#include "rawspeedconfig.h" // for HAVE_JPEG +#include "rawspeedconfig.h" #ifdef HAVE_JPEG -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/Buffer.h" // for Buffer -#include // for uint32_t -#include // for move +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/Buffer.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/KodakDecompressor.cpp b/src/librawspeed/decompressors/KodakDecompressor.cpp index 8cad180ab..2c817caad 100644 --- a/src/librawspeed/decompressors/KodakDecompressor.cpp +++ b/src/librawspeed/decompressors/KodakDecompressor.cpp @@ -21,18 +21,18 @@ */ #include "decompressors/KodakDecompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/Common.h" // for extractHighBits, isIntN -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/ByteStream.h" // for ByteStream -#include // for min, fill_n -#include // for array -#include // for uint32_t, uint8_t, uint16_t -#include // for move +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "codes/PrefixCodeDecoder.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/ByteStream.h" +#include +#include +#include +#include #if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) #include diff --git a/src/librawspeed/decompressors/KodakDecompressor.h b/src/librawspeed/decompressors/KodakDecompressor.h index 60b8d13f9..9ec72096c 100644 --- a/src/librawspeed/decompressors/KodakDecompressor.h +++ b/src/librawspeed/decompressors/KodakDecompressor.h @@ -22,11 +22,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/ByteStream.h" // for ByteStream -#include // for array -#include // for int16_t, uint32_t +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/ByteStream.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/LJpegDecoder.cpp b/src/librawspeed/decompressors/LJpegDecoder.cpp index 8e2d70c55..7a3f67b00 100644 --- a/src/librawspeed/decompressors/LJpegDecoder.cpp +++ b/src/librawspeed/decompressors/LJpegDecoder.cpp @@ -20,18 +20,18 @@ */ #include "decompressors/LJpegDecoder.h" -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D, iRectangle2D -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" #include "decompressors/AbstractLJpegDecoder.h" -#include "decompressors/LJpegDecompressor.h" // for LJpegDecompressor::PerC... -#include "io/ByteStream.h" // for ByteStream -#include // for generate_n -#include // for array +#include "decompressors/LJpegDecompressor.h" +#include "io/ByteStream.h" +#include +#include #include -#include // for back_insert_iterator -#include // for vector +#include +#include using std::copy_n; diff --git a/src/librawspeed/decompressors/LJpegDecoder.h b/src/librawspeed/decompressors/LJpegDecoder.h index 9160e35e0..3201ff684 100644 --- a/src/librawspeed/decompressors/LJpegDecoder.h +++ b/src/librawspeed/decompressors/LJpegDecoder.h @@ -20,8 +20,8 @@ #pragma once -#include "decompressors/AbstractLJpegDecoder.h" // for AbstractLJpegDe... -#include // for uint32_t +#include "decompressors/AbstractLJpegDecoder.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/LJpegDecompressor.cpp b/src/librawspeed/decompressors/LJpegDecompressor.cpp index fb891104a..19bd5e0fd 100644 --- a/src/librawspeed/decompressors/LJpegDecompressor.cpp +++ b/src/librawspeed/decompressors/LJpegDecompressor.cpp @@ -20,22 +20,22 @@ */ #include "decompressors/LJpegDecompressor.h" -#include "adt/CroppedArray2DRef.h" // for CroppedArray2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D, iRectangle2D +#include "adt/CroppedArray2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" #include "codes/PrefixCodeDecoder.h" -#include "common/Common.h" // for roundUpDivision -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpJPEG.h" // for BitPumpJPEG, BitStream<>::... -#include "io/ByteStream.h" // for ByteStream -#include // for transform -#include // for array +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpJPEG.h" +#include "io/ByteStream.h" +#include +#include #include #include #include #include -#include // for move +#include #include using std::copy_n; diff --git a/src/librawspeed/decompressors/LJpegDecompressor.h b/src/librawspeed/decompressors/LJpegDecompressor.h index 199b020ba..66876b957 100644 --- a/src/librawspeed/decompressors/LJpegDecompressor.h +++ b/src/librawspeed/decompressors/LJpegDecompressor.h @@ -21,16 +21,16 @@ #pragma once -#include "adt/Point.h" // for iPoint2D, iRectangle2D -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/RawImage.h" // for RawImage -#include "io/ByteStream.h" // for ByteStream -#include // for array -#include // for uint16_t -#include // for reference_wrapper -#include // for size_t -#include // for array -#include // for vector +#include "adt/Point.h" +#include "codes/PrefixCodeDecoder.h" +#include "common/RawImage.h" +#include "io/ByteStream.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/NikonDecompressor.cpp b/src/librawspeed/decompressors/NikonDecompressor.cpp index 9bce883d7..0b6341380 100644 --- a/src/librawspeed/decompressors/NikonDecompressor.cpp +++ b/src/librawspeed/decompressors/NikonDecompressor.cpp @@ -19,25 +19,25 @@ */ #include "decompressors/NikonDecompressor.h" -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D +#include "adt/Array1DRef.h" +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" #include "codes/AbstractPrefixCode.h" #include "codes/HuffmanCode.h" -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/Common.h" // for extractHighBits, clampBits -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB.h" // for BitPumpMSB, BitStream<>::f... -#include "io/Buffer.h" // for Buffer -#include "io/ByteStream.h" // for ByteStream +#include "codes/PrefixCodeDecoder.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpMSB.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" #include -#include // for assert -#include // for uint16_t, uint32_t, int16_t -#include // for size_t -#include // for move -#include // for vector +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/NikonDecompressor.h b/src/librawspeed/decompressors/NikonDecompressor.h index fbf006461..e23b0a8fb 100644 --- a/src/librawspeed/decompressors/NikonDecompressor.h +++ b/src/librawspeed/decompressors/NikonDecompressor.h @@ -21,12 +21,12 @@ #pragma once #include "codes/PrefixCodeDecoder.h" -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include // for array -#include // for uint32_t, uint16_t -#include // for vector +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/BitPumpMSB.h" +#include +#include +#include namespace rawspeed { class ByteStream; diff --git a/src/librawspeed/decompressors/OlympusDecompressor.cpp b/src/librawspeed/decompressors/OlympusDecompressor.cpp index 4ba051c16..0e8aec373 100644 --- a/src/librawspeed/decompressors/OlympusDecompressor.cpp +++ b/src/librawspeed/decompressors/OlympusDecompressor.cpp @@ -20,20 +20,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for RAWSPEED_READNONE +#include "rawspeedconfig.h" #include "decompressors/OlympusDecompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include "io/ByteStream.h" // for ByteStream -#include // for array +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpMSB.h" +#include "io/ByteStream.h" +#include #include -#include // for abs -#include // for enable_if_t -#include // for move +#include +#include +#include namespace { diff --git a/src/librawspeed/decompressors/OlympusDecompressor.h b/src/librawspeed/decompressors/OlympusDecompressor.h index 5b935f3ed..306b9fc12 100644 --- a/src/librawspeed/decompressors/OlympusDecompressor.h +++ b/src/librawspeed/decompressors/OlympusDecompressor.h @@ -20,14 +20,14 @@ #pragma once -#include "common/Common.h" // for extractHighBits -#include "common/RawImage.h" // for RawImage -#include "common/SimpleLUT.h" // for SimpleLUT<>::value_type -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include // for min -#include // for array -#include // for uint16_t +#include "common/Common.h" +#include "common/RawImage.h" +#include "common/SimpleLUT.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/BitPumpMSB.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV4Decompressor.cpp b/src/librawspeed/decompressors/PanasonicV4Decompressor.cpp index 2aa0d4093..e4ea961e5 100644 --- a/src/librawspeed/decompressors/PanasonicV4Decompressor.cpp +++ b/src/librawspeed/decompressors/PanasonicV4Decompressor.cpp @@ -20,25 +20,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP +#include "rawspeedconfig.h" #include "decompressors/PanasonicV4Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Mutex.h" // for MutexLocker -#include "adt/Point.h" // for iPoint2D, iPoint2D::value_... -#include "common/Common.h" // for extractHighBits, rawspeed_... -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/Buffer.h" // for Buffer, Buffer::size_type +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Mutex.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/Buffer.h" #include "io/ByteStream.h" -#include // for copy, max, fill_n, generate_n -#include // for array -#include // for assert -#include // for uint32_t, uint8_t, uint16_t -#include // for back_insert_iterator, back... -#include // for numeric_limits -#include // for move -#include // for vector, vector<>::iterator +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV4Decompressor.h b/src/librawspeed/decompressors/PanasonicV4Decompressor.h index 9526e3580..7b56d18fe 100644 --- a/src/librawspeed/decompressors/PanasonicV4Decompressor.h +++ b/src/librawspeed/decompressors/PanasonicV4Decompressor.h @@ -20,13 +20,13 @@ #pragma once -#include "adt/Point.h" // for iPoint2D -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/ByteStream.h" // for ByteStream -#include // for uint32_t -#include // for move -#include // for vector +#include "adt/Point.h" +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/ByteStream.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV5Decompressor.cpp b/src/librawspeed/decompressors/PanasonicV5Decompressor.cpp index 28af6e1ab..b44a4168e 100644 --- a/src/librawspeed/decompressors/PanasonicV5Decompressor.cpp +++ b/src/librawspeed/decompressors/PanasonicV5Decompressor.cpp @@ -20,24 +20,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP +#include "rawspeedconfig.h" #include "decompressors/PanasonicV5Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D, iPoint2D::value_... -#include "common/Common.h" // for rawspeed_get_number_of_pro... -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpLSB.h" // for BitPumpLSB -#include "io/Buffer.h" // for Buffer, Buffer::size_type +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpLSB.h" +#include "io/Buffer.h" #include "io/ByteStream.h" -#include "io/Endianness.h" // for Endianness, Endianness::li... -#include // for copy, generate_n, max -#include // for assert -#include // for uint8_t, uint16_t, uint32_t -#include // for back_insert_iterator, back... -#include // for move -#include // for vector +#include "io/Endianness.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV5Decompressor.h b/src/librawspeed/decompressors/PanasonicV5Decompressor.h index 774702540..aa1ef7f9a 100644 --- a/src/librawspeed/decompressors/PanasonicV5Decompressor.h +++ b/src/librawspeed/decompressors/PanasonicV5Decompressor.h @@ -21,15 +21,15 @@ #pragma once -#include "adt/Point.h" // for iPoint2D -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/BitPumpLSB.h" // for BitPumpLSB -#include "io/ByteStream.h" // for ByteStream -#include // for size_t -#include // for uint32_t -#include // for move -#include // for vector +#include "adt/Point.h" +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/BitPumpLSB.h" +#include "io/ByteStream.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV6Decompressor.cpp b/src/librawspeed/decompressors/PanasonicV6Decompressor.cpp index d3ee8707a..d3317e229 100644 --- a/src/librawspeed/decompressors/PanasonicV6Decompressor.cpp +++ b/src/librawspeed/decompressors/PanasonicV6Decompressor.cpp @@ -19,19 +19,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP +#include "rawspeedconfig.h" #include "decompressors/PanasonicV6Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for rawspeed_get_number_of_pro... -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpLSB.h" // for BitPumpLSB +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpLSB.h" #include "io/ByteStream.h" -#include // for array -#include // for uint16_t, uint32_t -#include // for move +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV6Decompressor.h b/src/librawspeed/decompressors/PanasonicV6Decompressor.h index 8648ec920..7fed5da6c 100644 --- a/src/librawspeed/decompressors/PanasonicV6Decompressor.h +++ b/src/librawspeed/decompressors/PanasonicV6Decompressor.h @@ -20,10 +20,10 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/ByteStream.h" // for ByteStream -#include // for uint32_t +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/ByteStream.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV7Decompressor.cpp b/src/librawspeed/decompressors/PanasonicV7Decompressor.cpp index 86f9d7eed..3de0b8953 100644 --- a/src/librawspeed/decompressors/PanasonicV7Decompressor.cpp +++ b/src/librawspeed/decompressors/PanasonicV7Decompressor.cpp @@ -19,20 +19,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP +#include "rawspeedconfig.h" #include "decompressors/PanasonicV7Decompressor.h" -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/CroppedArray1DRef.h" // for CroppedArray1DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for rawspeed_get_number_of_pro... -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpLSB.h" // for BitPumpLSB +#include "adt/Array1DRef.h" +#include "adt/Array2DRef.h" +#include "adt/CroppedArray1DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpLSB.h" #include "io/ByteStream.h" -#include // for uint16_t -#include // for move +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PanasonicV7Decompressor.h b/src/librawspeed/decompressors/PanasonicV7Decompressor.h index 7711d33bf..63cac58ee 100644 --- a/src/librawspeed/decompressors/PanasonicV7Decompressor.h +++ b/src/librawspeed/decompressors/PanasonicV7Decompressor.h @@ -20,11 +20,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/ByteStream.h" // for ByteStream -#include // for CHAR_BIT -#include // for uint16_t +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/ByteStream.h" +#include +#include #include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PentaxDecompressor.cpp b/src/librawspeed/decompressors/PentaxDecompressor.cpp index 742659d85..d07d615d7 100644 --- a/src/librawspeed/decompressors/PentaxDecompressor.cpp +++ b/src/librawspeed/decompressors/PentaxDecompressor.cpp @@ -19,25 +19,25 @@ */ #include "decompressors/PentaxDecompressor.h" -#include "adt/Array1DRef.h" // for Array1DRef -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D +#include "adt/Array1DRef.h" +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" #include "codes/AbstractPrefixCode.h" #include "codes/HuffmanCode.h" -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/Common.h" // for extractHighBits, isIntN -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB.h" // for BitPumpMSB, BitStream<>::f... -#include "io/Buffer.h" // for Buffer -#include "io/ByteStream.h" // for ByteStream +#include "codes/PrefixCodeDecoder.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpMSB.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" #include -#include // for assert -#include // for uint8_t, uint32_t, uint16_t +#include +#include #include -#include // for move -#include // for vector +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PentaxDecompressor.h b/src/librawspeed/decompressors/PentaxDecompressor.h index b5482b690..604a2dcda 100644 --- a/src/librawspeed/decompressors/PentaxDecompressor.h +++ b/src/librawspeed/decompressors/PentaxDecompressor.h @@ -21,12 +21,12 @@ #pragma once -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include // for array -#include // for uint8_t -#include // for optional +#include "codes/PrefixCodeDecoder.h" +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PhaseOneDecompressor.cpp b/src/librawspeed/decompressors/PhaseOneDecompressor.cpp index c4cdb85f6..1b6611851 100644 --- a/src/librawspeed/decompressors/PhaseOneDecompressor.cpp +++ b/src/librawspeed/decompressors/PhaseOneDecompressor.cpp @@ -20,21 +20,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP +#include "rawspeedconfig.h" #include "decompressors/PhaseOneDecompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for rawspeed_get_number_of_pro... -#include "common/RawImage.h" // for RawImageData, RawImage -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 -#include // for sort, fill_n -#include // for array -#include // for int32_t, uint16_t -#include // for string -#include // for move -#include // for vector<>::iterator, vector +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpMSB32.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/PhaseOneDecompressor.h b/src/librawspeed/decompressors/PhaseOneDecompressor.h index dd2fa7840..ef7a5e954 100644 --- a/src/librawspeed/decompressors/PhaseOneDecompressor.h +++ b/src/librawspeed/decompressors/PhaseOneDecompressor.h @@ -22,11 +22,11 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/ByteStream.h" // for ByteStream -#include // for move -#include // for vector +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/ByteStream.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SamsungV0Decompressor.cpp b/src/librawspeed/decompressors/SamsungV0Decompressor.cpp index e4e6f03e0..075d77e6a 100644 --- a/src/librawspeed/decompressors/SamsungV0Decompressor.cpp +++ b/src/librawspeed/decompressors/SamsungV0Decompressor.cpp @@ -21,22 +21,22 @@ */ #include "decompressors/SamsungV0Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for signExtend -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" #include "decompressors/AbstractSamsungDecompressor.h" -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 -#include "io/ByteStream.h" // for ByteStream -#include // for max -#include // for array -#include // for assert -#include // for uint32_t, uint16_t, int32_t -#include // for advance, begin, end, next -#include // for swap -#include // for vector +#include "io/BitPumpMSB32.h" +#include "io/ByteStream.h" +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SamsungV0Decompressor.h b/src/librawspeed/decompressors/SamsungV0Decompressor.h index fc5bdfa47..1c286035e 100644 --- a/src/librawspeed/decompressors/SamsungV0Decompressor.h +++ b/src/librawspeed/decompressors/SamsungV0Decompressor.h @@ -20,11 +20,11 @@ #pragma once -#include "decompressors/AbstractSamsungDecompressor.h" // for AbstractSamsu... -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 -#include "io/ByteStream.h" // for ByteStream -#include // for int32_t -#include // for vector +#include "decompressors/AbstractSamsungDecompressor.h" +#include "io/BitPumpMSB32.h" +#include "io/ByteStream.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SamsungV1Decompressor.cpp b/src/librawspeed/decompressors/SamsungV1Decompressor.cpp index c44895022..44c80f0a2 100644 --- a/src/librawspeed/decompressors/SamsungV1Decompressor.cpp +++ b/src/librawspeed/decompressors/SamsungV1Decompressor.cpp @@ -21,18 +21,18 @@ */ #include "decompressors/SamsungV1Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/Common.h" // for isIntN -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "codes/PrefixCodeDecoder.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" #include "decompressors/AbstractSamsungDecompressor.h" -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include // for array +#include "io/BitPumpMSB.h" +#include #include -#include // for vector +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SamsungV1Decompressor.h b/src/librawspeed/decompressors/SamsungV1Decompressor.h index 3d41edd0d..5334ddcd5 100644 --- a/src/librawspeed/decompressors/SamsungV1Decompressor.h +++ b/src/librawspeed/decompressors/SamsungV1Decompressor.h @@ -20,11 +20,11 @@ #pragma once -#include "decompressors/AbstractSamsungDecompressor.h" // for AbstractSamsu... -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include "io/ByteStream.h" // for ByteStream -#include // for int32_t -#include // for vector +#include "decompressors/AbstractSamsungDecompressor.h" +#include "io/BitPumpMSB.h" +#include "io/ByteStream.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SamsungV2Decompressor.cpp b/src/librawspeed/decompressors/SamsungV2Decompressor.cpp index a48d599c1..4eaebdfe8 100644 --- a/src/librawspeed/decompressors/SamsungV2Decompressor.cpp +++ b/src/librawspeed/decompressors/SamsungV2Decompressor.cpp @@ -21,19 +21,19 @@ */ #include "decompressors/SamsungV2Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for clampBits, signExtend -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" #include "decompressors/AbstractSamsungDecompressor.h" -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 -#include "io/ByteStream.h" // for ByteStream +#include "io/BitPumpMSB32.h" +#include "io/ByteStream.h" #include -#include // for assert -#include // for uint16_t, uint32_t, int32_t -#include // for underlying_type_t +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SamsungV2Decompressor.h b/src/librawspeed/decompressors/SamsungV2Decompressor.h index 3f9c2e2d4..e3f8b99ee 100644 --- a/src/librawspeed/decompressors/SamsungV2Decompressor.h +++ b/src/librawspeed/decompressors/SamsungV2Decompressor.h @@ -20,11 +20,11 @@ #pragma once -#include "decompressors/AbstractSamsungDecompressor.h" // for AbstractSamsu... -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 -#include "io/ByteStream.h" // for ByteStream -#include // for array -#include // for uint32_t, uin... +#include "decompressors/AbstractSamsungDecompressor.h" +#include "io/BitPumpMSB32.h" +#include "io/ByteStream.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SonyArw1Decompressor.cpp b/src/librawspeed/decompressors/SonyArw1Decompressor.cpp index 6bbbd2bd1..08ca14955 100644 --- a/src/librawspeed/decompressors/SonyArw1Decompressor.cpp +++ b/src/librawspeed/decompressors/SonyArw1Decompressor.cpp @@ -21,17 +21,17 @@ */ #include "decompressors/SonyArw1Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeDecoder -#include "common/Common.h" // for isIntN -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include "io/ByteStream.h" // for ByteStream +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "codes/PrefixCodeDecoder.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpMSB.h" +#include "io/ByteStream.h" #include -#include // for move +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SonyArw1Decompressor.h b/src/librawspeed/decompressors/SonyArw1Decompressor.h index 3de9f009c..852dba8d0 100644 --- a/src/librawspeed/decompressors/SonyArw1Decompressor.h +++ b/src/librawspeed/decompressors/SonyArw1Decompressor.h @@ -20,10 +20,10 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include // for uint32_t +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/BitPumpMSB.h" +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SonyArw2Decompressor.cpp b/src/librawspeed/decompressors/SonyArw2Decompressor.cpp index dc099ebba..7f7dedb89 100644 --- a/src/librawspeed/decompressors/SonyArw2Decompressor.cpp +++ b/src/librawspeed/decompressors/SonyArw2Decompressor.cpp @@ -20,19 +20,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP +#include "rawspeedconfig.h" #include "decompressors/SonyArw2Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for rawspeed_get_number_of_pro... -#include "common/RawImage.h" // for RawImageData, RawImage -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include "io/BitPumpLSB.h" // for BitPumpLSB +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include "io/BitPumpLSB.h" #include "io/ByteStream.h" -#include // for uint16_t, uint32_t, uint8_t -#include // for allocator, string -#include // for move +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/SonyArw2Decompressor.h b/src/librawspeed/decompressors/SonyArw2Decompressor.h index 3f05d4051..2d38baae2 100644 --- a/src/librawspeed/decompressors/SonyArw2Decompressor.h +++ b/src/librawspeed/decompressors/SonyArw2Decompressor.h @@ -20,9 +20,9 @@ #pragma once -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/ByteStream.h" // for ByteStream +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/ByteStream.h" namespace rawspeed { diff --git a/src/librawspeed/decompressors/UncompressedDecompressor.cpp b/src/librawspeed/decompressors/UncompressedDecompressor.cpp index 185adc367..357faa813 100644 --- a/src/librawspeed/decompressors/UncompressedDecompressor.cpp +++ b/src/librawspeed/decompressors/UncompressedDecompressor.cpp @@ -21,24 +21,24 @@ */ #include "decompressors/UncompressedDecompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D, iRectangle2D -#include "common/Common.h" // for BitOrder, copyPixels, BitO... -#include "common/FloatingPoint.h" // for Binary16, Binary24, Binary... +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/FloatingPoint.h" #include "common/RawImage.h" -#include "decoders/RawDecoderException.h" // for ThrowRDE -#include "io/BitPumpLSB.h" // for BitPumpLSB, BitStream<>::f... -#include "io/BitPumpMSB.h" // for BitPumpMSB, BitStream<>::f... -#include "io/BitPumpMSB16.h" // for BitPumpMSB16, BitStream<>:... -#include "io/BitPumpMSB32.h" // for BitPumpMSB32, BitStream<>:... -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::li... -#include "io/IOException.h" // for ThrowException, ThrowIOE -#include // for min -#include // for PRIu64 +#include "decoders/RawDecoderException.h" +#include "io/BitPumpLSB.h" +#include "io/BitPumpMSB.h" +#include "io/BitPumpMSB16.h" +#include "io/BitPumpMSB32.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "io/IOException.h" +#include +#include #include -#include // for move +#include using std::min; diff --git a/src/librawspeed/decompressors/UncompressedDecompressor.h b/src/librawspeed/decompressors/UncompressedDecompressor.h index 72b192b1b..9ab9858d5 100644 --- a/src/librawspeed/decompressors/UncompressedDecompressor.h +++ b/src/librawspeed/decompressors/UncompressedDecompressor.h @@ -22,14 +22,14 @@ #pragma once -#include "adt/Point.h" // for iPoint2D, iRectangle... -#include "common/Common.h" // for BitOrder -#include "common/RawImage.h" // for RawImage -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness -#include // for uint32_t -#include // for move +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/decompressors/VC5Decompressor.cpp b/src/librawspeed/decompressors/VC5Decompressor.cpp index 72255cf18..662355554 100644 --- a/src/librawspeed/decompressors/VC5Decompressor.cpp +++ b/src/librawspeed/decompressors/VC5Decompressor.cpp @@ -27,34 +27,34 @@ implementation. */ -#include "rawspeedconfig.h" // for HAVE_OPENMP, RAWSPEED_CACH... +#include "rawspeedconfig.h" #include "decompressors/VC5Decompressor.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" #include "codes/AbstractPrefixCode.h" #include "codes/PrefixCode.h" #include "common/BayerPhase.h" -#include "common/Common.h" // for roundUpDivision, rawspeed_... -#include "common/ErrorLog.h" // for ErrorLog +#include "common/Common.h" +#include "common/ErrorLog.h" #include "common/RawImage.h" -#include "common/SimpleLUT.h" // for SimpleLUT, SimpleLUT<>::va... -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE +#include "common/SimpleLUT.h" +#include "decoders/RawDecoderException.h" #include "io/BitPumpMSB.h" #include "io/ByteStream.h" -#include "io/Endianness.h" // for Endianness, Endianness::big -#include // for all_of, max +#include "io/Endianness.h" +#include #include -#include // for assert -#include // for pow +#include +#include #include -#include // for numeric_limits +#include #include -#include // for optional, operator== -#include // for string -#include // for tie, tuple +#include +#include +#include #include -#include // for pair +#include #include namespace { @@ -73,7 +73,7 @@ struct RLV { const uint32_t length; \ const RLV entries[n]; \ } constexpr -#include "gopro/vc5/table17.inc" // for table17 +#include "gopro/vc5/table17.inc" constexpr int16_t decompand(int16_t val) { double c = val; diff --git a/src/librawspeed/decompressors/VC5Decompressor.h b/src/librawspeed/decompressors/VC5Decompressor.h index b0d07ed64..8067b0d38 100644 --- a/src/librawspeed/decompressors/VC5Decompressor.h +++ b/src/librawspeed/decompressors/VC5Decompressor.h @@ -21,23 +21,23 @@ #pragma once -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocator... -#include "codes/PrefixCodeLUTDecoder.h" // for PrefixCodeLUTDecoder -#include "codes/PrefixCodeVectorDecoder.h" // for PrefixCodeVectorDe... -#include "common/BayerPhase.h" // for BayerPhase -#include "common/RawImage.h" // for RawImage -#include "common/SimpleLUT.h" // for SimpleLUT, SimpleLUT... -#include "decompressors/AbstractDecompressor.h" // for AbstractDecompressor -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include "io/ByteStream.h" // for ByteStream -#include // for array -#include // for int16_t, uint16_t -#include // for unique_ptr -#include // for optional -#include // for underlying_type_t -#include // for move, pair -#include // for vector +#include "adt/Array2DRef.h" +#include "adt/DefaultInitAllocatorAdaptor.h" +#include "codes/PrefixCodeLUTDecoder.h" +#include "codes/PrefixCodeVectorDecoder.h" +#include "common/BayerPhase.h" +#include "common/RawImage.h" +#include "common/SimpleLUT.h" +#include "decompressors/AbstractDecompressor.h" +#include "io/BitPumpMSB.h" +#include "io/ByteStream.h" +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { class ErrorLog; diff --git a/src/librawspeed/interpolators/Cr2sRawInterpolator.cpp b/src/librawspeed/interpolators/Cr2sRawInterpolator.cpp index b4940b44e..0143e0bab 100644 --- a/src/librawspeed/interpolators/Cr2sRawInterpolator.cpp +++ b/src/librawspeed/interpolators/Cr2sRawInterpolator.cpp @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_OPENMP +#include "rawspeedconfig.h" #include "interpolators/Cr2sRawInterpolator.h" -#include "adt/Array2DRef.h" // for Array2DRef -#include "adt/Invariant.h" // for invariant -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for clampBits, rawspeed_get_nu... -#include "common/RawImage.h" // for RawImage, RawImageData -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include // for array, array<>::value_type -#include // for size_t -#include // for uint16_t +#include "adt/Array2DRef.h" +#include "adt/Invariant.h" +#include "adt/Point.h" +#include "common/Common.h" +#include "common/RawImage.h" +#include "decoders/RawDecoderException.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/interpolators/Cr2sRawInterpolator.h b/src/librawspeed/interpolators/Cr2sRawInterpolator.h index 0693acb57..a19bd62bb 100644 --- a/src/librawspeed/interpolators/Cr2sRawInterpolator.h +++ b/src/librawspeed/interpolators/Cr2sRawInterpolator.h @@ -20,9 +20,9 @@ #pragma once -#include "adt/Array2DRef.h" // for Array2DRef -#include // for array -#include // for uint16_t +#include "adt/Array2DRef.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/io/BitPumpJPEG.h b/src/librawspeed/io/BitPumpJPEG.h index d7010d65a..6c478a089 100644 --- a/src/librawspeed/io/BitPumpJPEG.h +++ b/src/librawspeed/io/BitPumpJPEG.h @@ -20,13 +20,13 @@ #pragma once -#include "common/Common.h" // for bitwidth -#include "io/BitStream.h" // for BitStreamCacheRightInLeftOut, BitStream -#include "io/Buffer.h" // for Buffer::size_type -#include "io/Endianness.h" // for getBE -#include // for copy_n, none_of -#include // for array -#include // for uint8_t, uint32_t +#include "common/Common.h" +#include "io/BitStream.h" +#include "io/Buffer.h" +#include "io/Endianness.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/io/BitPumpLSB.h b/src/librawspeed/io/BitPumpLSB.h index d0abe03cf..3d3952ac6 100644 --- a/src/librawspeed/io/BitPumpLSB.h +++ b/src/librawspeed/io/BitPumpLSB.h @@ -20,10 +20,10 @@ #pragma once -#include "io/BitStream.h" // for BitStreamCacheLeftInRightOut, BitStream -#include "io/Buffer.h" // for Buffer::size_type -#include "io/Endianness.h" // for getLE -#include // for uint32_t, uint8_t +#include "io/BitStream.h" +#include "io/Buffer.h" +#include "io/Endianness.h" +#include namespace rawspeed { diff --git a/src/librawspeed/io/BitPumpMSB.h b/src/librawspeed/io/BitPumpMSB.h index 7923d8bbe..083cc7db1 100644 --- a/src/librawspeed/io/BitPumpMSB.h +++ b/src/librawspeed/io/BitPumpMSB.h @@ -20,10 +20,10 @@ #pragma once -#include "io/BitStream.h" // for BitStreamCacheRightInLeftOut, BitStream -#include "io/Buffer.h" // for Buffer::size_type -#include "io/Endianness.h" // for getBE -#include // for uint32_t, uint8_t +#include "io/BitStream.h" +#include "io/Buffer.h" +#include "io/Endianness.h" +#include namespace rawspeed { diff --git a/src/librawspeed/io/BitPumpMSB16.h b/src/librawspeed/io/BitPumpMSB16.h index 1686cb433..b1d6e393c 100644 --- a/src/librawspeed/io/BitPumpMSB16.h +++ b/src/librawspeed/io/BitPumpMSB16.h @@ -20,10 +20,10 @@ #pragma once -#include "io/BitStream.h" // for BitStreamCacheRightInLeftOut, BitStream -#include "io/Buffer.h" // for Buffer::size_type -#include "io/Endianness.h" // for getLE -#include // for uint16_t, uint8_t +#include "io/BitStream.h" +#include "io/Buffer.h" +#include "io/Endianness.h" +#include namespace rawspeed { diff --git a/src/librawspeed/io/BitPumpMSB32.h b/src/librawspeed/io/BitPumpMSB32.h index cf9c18492..a99c891db 100644 --- a/src/librawspeed/io/BitPumpMSB32.h +++ b/src/librawspeed/io/BitPumpMSB32.h @@ -20,10 +20,10 @@ #pragma once -#include "io/BitStream.h" // for BitStreamCacheRightInLeftOut, BitStream -#include "io/Buffer.h" // for Buffer::size_type -#include "io/Endianness.h" // for getLE -#include // for uint32_t, uint8_t +#include "io/BitStream.h" +#include "io/Buffer.h" +#include "io/Endianness.h" +#include namespace rawspeed { diff --git a/src/librawspeed/io/BitStream.h b/src/librawspeed/io/BitStream.h index 9d844e03e..127fee0f3 100644 --- a/src/librawspeed/io/BitStream.h +++ b/src/librawspeed/io/BitStream.h @@ -22,17 +22,17 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include "adt/Invariant.h" // for invariant -#include "common/Common.h" // for bitwidth, extractHighBits -#include "io/Buffer.h" // for Buffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::unknown -#include "io/IOException.h" // for ThrowIOE -#include // for fill_n, min -#include // for array -#include // for uint32_t, uint8_t, uint64_t -#include // for memcpy +#include "rawspeedconfig.h" +#include "adt/Invariant.h" +#include "common/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "io/IOException.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/io/Buffer.h b/src/librawspeed/io/Buffer.h index 0dc67417d..f64e8b879 100644 --- a/src/librawspeed/io/Buffer.h +++ b/src/librawspeed/io/Buffer.h @@ -21,15 +21,15 @@ #pragma once -#include "AddressSanitizer.h" // for ASan -#include "adt/Invariant.h" // for invariant -#include "common/Common.h" // for roundUp -#include "io/Endianness.h" // for Endianness, getHostEndianness, Endiannes... -#include "io/IOException.h" // for ThrowException, ThrowIOE -#include // for invariant -#include // for uint8_t, uint64_t, uint32_t -#include // for unique_ptr -#include // for move, operator<, pair, swap +#include "AddressSanitizer.h" +#include "adt/Invariant.h" +#include "common/Common.h" +#include "io/Endianness.h" +#include "io/IOException.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/io/ByteStream.h b/src/librawspeed/io/ByteStream.h index 788caa631..f1bea8fd3 100644 --- a/src/librawspeed/io/ByteStream.h +++ b/src/librawspeed/io/ByteStream.h @@ -21,15 +21,15 @@ #pragma once -#include "AddressSanitizer.h" // for ASan -#include "adt/Invariant.h" // for invariant -#include "common/Common.h" // for roundUp -#include "io/Buffer.h" // for Buffer::size_type, DataBuffer, Buffer -#include "io/IOException.h" // for ThrowException, ThrowIOE -#include // for invariant -#include // for uint8_t, uint16_t, int32_t, uint32_t -#include // for memchr, memcmp, memcpy -#include // for numeric_limits +#include "AddressSanitizer.h" +#include "adt/Invariant.h" +#include "common/Common.h" +#include "io/Buffer.h" +#include "io/IOException.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/io/Endianness.h b/src/librawspeed/io/Endianness.h index b6df58d02..14868554c 100644 --- a/src/librawspeed/io/Endianness.h +++ b/src/librawspeed/io/Endianness.h @@ -21,10 +21,10 @@ #pragma once -#include "common/Common.h" // for bit_cast -#include // for assert -#include // for uint32_t, uint16_t, uint64_t, int16_t -#include // for memcpy +#include "common/Common.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/io/FileIO.h b/src/librawspeed/io/FileIO.h index b9bfc8d8e..b3e0ed961 100644 --- a/src/librawspeed/io/FileIO.h +++ b/src/librawspeed/io/FileIO.h @@ -23,12 +23,12 @@ #define NOMINMAX // do not want the min()/max() macros! #endif -#include "io/FileIOException.h" // for FileIOException (ptr only), ThrowFIE +#include "io/FileIOException.h" #include -#include // for bind +#include #include #include -#include // for vector +#include namespace rawspeed { diff --git a/src/librawspeed/io/FileIOException.h b/src/librawspeed/io/FileIOException.h index 177705bdc..fee07fe3b 100644 --- a/src/librawspeed/io/FileIOException.h +++ b/src/librawspeed/io/FileIOException.h @@ -21,11 +21,11 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_NOINLINE, RAWSPEE... +#include "rawspeedconfig.h" // IWYU pragma: begin_exports -#include "common/RawspeedException.h" // for ThrowExceptionHelper -#include "decoders/RawDecoderException.h" // for RawDecoderException +#include "common/RawspeedException.h" +#include "decoders/RawDecoderException.h" // IWYU pragma: end_exports namespace rawspeed { diff --git a/src/librawspeed/io/FileReader.cpp b/src/librawspeed/io/FileReader.cpp index c176fe696..dc8323b06 100644 --- a/src/librawspeed/io/FileReader.cpp +++ b/src/librawspeed/io/FileReader.cpp @@ -20,15 +20,15 @@ */ #include "io/FileReader.h" -#include "adt/AlignedAllocator.h" // for AlignedAllocator -#include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocatorAda... -#include "io/Buffer.h" // for Buffer, Buffer::size_type -#include "io/FileIOException.h" // for ThrowException, ThrowFIE -#include // for uint8_t -#include // for fclose, fseek, feof -#include // for numeric_limits -#include // for unique_ptr, make_unique -#include // for move, pair +#include "adt/AlignedAllocator.h" +#include "adt/DefaultInitAllocatorAdaptor.h" +#include "io/Buffer.h" +#include "io/FileIOException.h" +#include +#include +#include +#include +#include #include #if !(defined(__unix__) || defined(__APPLE__)) @@ -36,7 +36,7 @@ #define NOMINMAX // do not want the min()/max() macros! #endif -#include "io/FileIO.h" // for widenFileName +#include "io/FileIO.h" #include #include #include diff --git a/src/librawspeed/io/FileReader.h b/src/librawspeed/io/FileReader.h index c8ee83df6..550b47d17 100644 --- a/src/librawspeed/io/FileReader.h +++ b/src/librawspeed/io/FileReader.h @@ -21,12 +21,12 @@ #pragma once #include "adt/AlignedAllocator.h" -#include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocatorAda... -#include "io/Buffer.h" // for Buffer -#include // for uint8_t -#include // for unique_ptr -#include // for pair -#include // for vector +#include "adt/DefaultInitAllocatorAdaptor.h" +#include "io/Buffer.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/io/FileWriter.cpp b/src/librawspeed/io/FileWriter.cpp index 53ddbaf43..8e98b28b0 100644 --- a/src/librawspeed/io/FileWriter.cpp +++ b/src/librawspeed/io/FileWriter.cpp @@ -19,17 +19,17 @@ */ #include "io/FileWriter.h" -#include "io/Buffer.h" // for Buffer -#include "io/FileIOException.h" // for ThrowException, ThrowFIE +#include "io/Buffer.h" +#include "io/FileIOException.h" #include -#include // for fclose, fopen, fwrite, FILE, size_t +#include #if !defined(__unix__) && !defined(__APPLE__) #ifndef NOMINMAX #define NOMINMAX // do not want the min()/max() macros! #endif -#include "io/FileIO.h" // for widenFileName +#include "io/FileIO.h" #include #include #include diff --git a/src/librawspeed/io/FileWriter.h b/src/librawspeed/io/FileWriter.h index 8c84112c1..76b2eb767 100644 --- a/src/librawspeed/io/FileWriter.h +++ b/src/librawspeed/io/FileWriter.h @@ -20,7 +20,7 @@ #pragma once -#include // for uint32_t +#include namespace rawspeed { diff --git a/src/librawspeed/io/IOException.h b/src/librawspeed/io/IOException.h index f4a3bb680..b71df081c 100644 --- a/src/librawspeed/io/IOException.h +++ b/src/librawspeed/io/IOException.h @@ -21,10 +21,10 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_NOINLINE, RAWSPEED_UN... +#include "rawspeedconfig.h" // IWYU pragma: begin_exports -#include "common/RawspeedException.h" // for ThrowExceptionHelper, Rawspeed... +#include "common/RawspeedException.h" // IWYU pragma: end_exports namespace rawspeed { diff --git a/src/librawspeed/metadata/BlackArea.h b/src/librawspeed/metadata/BlackArea.h index cc8883dd9..cdcf9e1b8 100644 --- a/src/librawspeed/metadata/BlackArea.h +++ b/src/librawspeed/metadata/BlackArea.h @@ -20,7 +20,7 @@ #pragma once -#include // for uint32_t +#include namespace rawspeed { diff --git a/src/librawspeed/metadata/Camera.cpp b/src/librawspeed/metadata/Camera.cpp index 30d7ddf42..811184a35 100644 --- a/src/librawspeed/metadata/Camera.cpp +++ b/src/librawspeed/metadata/Camera.cpp @@ -21,23 +21,23 @@ #include "metadata/Camera.h" #include "adt/NotARational.h" -#include "adt/Point.h" // for iPoint2D -#include "common/Common.h" // for splitString -#include "metadata/CameraMetadataException.h" // for ThrowException, ThrowCME +#include "adt/Point.h" +#include "common/Common.h" +#include "metadata/CameraMetadataException.h" #include "metadata/CameraSensorInfo.h" #include "metadata/ColorFilterArray.h" -#include // for max, fill, transform -#include // for tolower +#include +#include #include -#include // for size_t -#include // for map -#include // for optional, nullopt -#include // for string, allocator, ope... -#include // for operator==, basic_stri... -#include // for vector +#include +#include +#include +#include +#include +#include #ifdef HAVE_PUGIXML -#include // for xml_node, xml_attribute +#include using pugi::xml_node; #endif diff --git a/src/librawspeed/metadata/Camera.h b/src/librawspeed/metadata/Camera.h index 9620c2bc2..387dba7c5 100644 --- a/src/librawspeed/metadata/Camera.h +++ b/src/librawspeed/metadata/Camera.h @@ -20,20 +20,20 @@ #pragma once -#include "rawspeedconfig.h" // for HAVE_PUGIXML -#include "adt/NotARational.h" // for NotARational -#include "adt/Point.h" // for iPoint2D -#include "metadata/BlackArea.h" // for BlackArea -#include "metadata/CameraSensorInfo.h" // for CameraSensorInfo -#include "metadata/ColorFilterArray.h" // for CFAColor, ColorFilterArray -#include // for copy -#include // for uint32_t -#include // for less -#include // for map, operator!=, _Rb_tree_con... -#include // for basic_istream::operator>> -#include // for string, basic_string, operator< -#include // for pair -#include // for vector +#include "rawspeedconfig.h" +#include "adt/NotARational.h" +#include "adt/Point.h" +#include "metadata/BlackArea.h" +#include "metadata/CameraSensorInfo.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include +#include +#include +#include +#include +#include #ifdef HAVE_PUGIXML diff --git a/src/librawspeed/metadata/CameraMetaData.cpp b/src/librawspeed/metadata/CameraMetaData.cpp index 5a946497e..8c7768c70 100644 --- a/src/librawspeed/metadata/CameraMetaData.cpp +++ b/src/librawspeed/metadata/CameraMetaData.cpp @@ -20,21 +20,21 @@ #include "rawspeedconfig.h" #include "metadata/CameraMetaData.h" -#include "common/Common.h" // for trimSpaces, writeLog -#include "metadata/Camera.h" // for Camera, Camera::Suppor... -#include "metadata/CameraMetadataException.h" // for ThrowException, ThrowCME -#include // for find_if +#include "common/Common.h" +#include "metadata/Camera.h" +#include "metadata/CameraMetadataException.h" +#include #include -#include // for map, map<>::const_iter... +#include #include -#include // for string, operator== +#include #include #include -#include // for pair, move -#include // for vector +#include +#include #ifdef HAVE_PUGIXML -#include // for xml_document, xml_pars... +#include using pugi::xml_document; using pugi::xml_node; diff --git a/src/librawspeed/metadata/CameraMetaData.h b/src/librawspeed/metadata/CameraMetaData.h index f95073097..7afbac899 100644 --- a/src/librawspeed/metadata/CameraMetaData.h +++ b/src/librawspeed/metadata/CameraMetaData.h @@ -20,14 +20,14 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY, HAVE_PUGIXML -#include "metadata/Camera.h" // for Camera (ptr only) -#include // for uint32_t -#include // for map -#include // for unique_ptr -#include // for operator<, string -#include // for string_view -#include // for tie, operator<, tuple +#include "rawspeedconfig.h" +#include "metadata/Camera.h" +#include +#include +#include +#include +#include +#include namespace rawspeed { class Camera; diff --git a/src/librawspeed/metadata/CameraMetadataException.h b/src/librawspeed/metadata/CameraMetadataException.h index fb166242d..ec75270f8 100644 --- a/src/librawspeed/metadata/CameraMetadataException.h +++ b/src/librawspeed/metadata/CameraMetadataException.h @@ -21,10 +21,10 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_NOINLINE, RAWSPEED_UN... +#include "rawspeedconfig.h" // IWYU pragma: begin_exports -#include "common/RawspeedException.h" // for RawspeedException, ThrowExcept... +#include "common/RawspeedException.h" // IWYU pragma: end_exports namespace rawspeed { diff --git a/src/librawspeed/metadata/CameraSensorInfo.cpp b/src/librawspeed/metadata/CameraSensorInfo.cpp index d0225f628..67a6a0227 100644 --- a/src/librawspeed/metadata/CameraSensorInfo.cpp +++ b/src/librawspeed/metadata/CameraSensorInfo.cpp @@ -20,8 +20,8 @@ #include "rawspeedconfig.h" #include "metadata/CameraSensorInfo.h" -#include // for move -#include // for vector +#include +#include using std::vector; diff --git a/src/librawspeed/metadata/CameraSensorInfo.h b/src/librawspeed/metadata/CameraSensorInfo.h index fd4f150be..1f03bfc1a 100644 --- a/src/librawspeed/metadata/CameraSensorInfo.h +++ b/src/librawspeed/metadata/CameraSensorInfo.h @@ -20,9 +20,9 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include // for copy -#include // for vector +#include "rawspeedconfig.h" +#include +#include namespace rawspeed { diff --git a/src/librawspeed/metadata/ColorFilterArray.cpp b/src/librawspeed/metadata/ColorFilterArray.cpp index 391db2d25..8c4e988ed 100644 --- a/src/librawspeed/metadata/ColorFilterArray.cpp +++ b/src/librawspeed/metadata/ColorFilterArray.cpp @@ -20,20 +20,20 @@ #include "metadata/ColorFilterArray.h" #include "adt/Invariant.h" -#include "adt/Point.h" // for iPoint2D, iPoint2D::value_... -#include "common/Common.h" // for writeLog, DEBUG_PRIO, DEBU... -#include "decoders/RawDecoderException.h" // for ThrowException, ThrowRDE -#include // for copy, fill_n, fill, max -#include // for assert -#include // for PRId64 -#include // for va_arg, va_end, va_list +#include "adt/Point.h" +#include "common/Common.h" +#include "decoders/RawDecoderException.h" +#include +#include +#include +#include #include -#include // for size_t, abs -#include // for map -#include // for optional, nullopt -#include // for out_of_range -#include // for string -#include // for string_view, basic_string_... +#include +#include +#include +#include +#include +#include using std::vector; diff --git a/src/librawspeed/metadata/ColorFilterArray.h b/src/librawspeed/metadata/ColorFilterArray.h index 4dc36b2bf..a7295a5c3 100644 --- a/src/librawspeed/metadata/ColorFilterArray.h +++ b/src/librawspeed/metadata/ColorFilterArray.h @@ -20,13 +20,13 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READNONE -#include "adt/Point.h" // for iPoint2D -#include // for copy -#include // for uint32_t, uint8_t -#include // for map -#include // for string -#include // for vector +#include "rawspeedconfig.h" +#include "adt/Point.h" +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/parsers/CiffParser.cpp b/src/librawspeed/parsers/CiffParser.cpp index cce1b143a..8753799ed 100644 --- a/src/librawspeed/parsers/CiffParser.cpp +++ b/src/librawspeed/parsers/CiffParser.cpp @@ -21,20 +21,20 @@ */ #include "parsers/CiffParser.h" -#include "common/Common.h" // for trimSpaces -#include "decoders/CrwDecoder.h" // for CrwDecoder -#include "io/Buffer.h" // for Buffer (ptr only), DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include "parsers/CiffParserException.h" // for ThrowException, ThrowCPE +#include "common/Common.h" +#include "decoders/CrwDecoder.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "parsers/CiffParserException.h" #include "parsers/RawParser.h" -#include "tiff/CiffEntry.h" // for CiffEntry -#include "tiff/CiffIFD.h" // for CiffIFD -#include "tiff/CiffTag.h" // for CiffTag, CiffTag::MAKEMODEL -#include // for uint16_t, uint32_t +#include "tiff/CiffEntry.h" +#include "tiff/CiffIFD.h" +#include "tiff/CiffTag.h" +#include #include -#include // for operator==, string -#include // for move +#include +#include namespace rawspeed { diff --git a/src/librawspeed/parsers/CiffParser.h b/src/librawspeed/parsers/CiffParser.h index 2e5e60a46..80bbd9e60 100644 --- a/src/librawspeed/parsers/CiffParser.h +++ b/src/librawspeed/parsers/CiffParser.h @@ -21,9 +21,9 @@ #pragma once -#include "parsers/RawParser.h" // for RawParser -#include "tiff/CiffIFD.h" // for CiffIFD -#include // for unique_ptr +#include "parsers/RawParser.h" +#include "tiff/CiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/parsers/CiffParserException.h b/src/librawspeed/parsers/CiffParserException.h index 3fb4af6f3..8cd19548d 100644 --- a/src/librawspeed/parsers/CiffParserException.h +++ b/src/librawspeed/parsers/CiffParserException.h @@ -22,11 +22,11 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_NOINLINE, RAWSPEED_... +#include "rawspeedconfig.h" // IWYU pragma: begin_exports -#include "common/RawspeedException.h" // for ThrowExceptionHelper -#include "parsers/RawParserException.h" // for RawParserException +#include "common/RawspeedException.h" +#include "parsers/RawParserException.h" // IWYU pragma: end_exports namespace rawspeed { diff --git a/src/librawspeed/parsers/FiffParser.cpp b/src/librawspeed/parsers/FiffParser.cpp index 8d90b13b4..d208733a5 100644 --- a/src/librawspeed/parsers/FiffParser.cpp +++ b/src/librawspeed/parsers/FiffParser.cpp @@ -21,21 +21,21 @@ */ #include "parsers/FiffParser.h" -#include "decoders/RafDecoder.h" // for RafDecoder -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::big -#include "parsers/FiffParserException.h" // for ThrowFPE -#include "parsers/RawParser.h" // for RawParser -#include "parsers/TiffParser.h" // for TiffParser -#include "parsers/TiffParserException.h" // for ThrowException, TiffParserE... -#include "tiff/TiffEntry.h" // for TiffEntry, TiffDataType -#include "tiff/TiffIFD.h" // for TiffIFD, TiffRootIFDOwner -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::FUJIOLDWB -#include // for uint32_t, uint16_t -#include // for numeric_limits -#include // for make_unique, unique_ptr -#include // for move +#include "decoders/RafDecoder.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "parsers/FiffParserException.h" +#include "parsers/RawParser.h" +#include "parsers/TiffParser.h" +#include "parsers/TiffParserException.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include using std::numeric_limits; diff --git a/src/librawspeed/parsers/FiffParser.h b/src/librawspeed/parsers/FiffParser.h index ebd261bbf..00fd63fd8 100644 --- a/src/librawspeed/parsers/FiffParser.h +++ b/src/librawspeed/parsers/FiffParser.h @@ -20,9 +20,9 @@ #pragma once -#include "parsers/RawParser.h" // for RawParser -#include "tiff/TiffIFD.h" // for TiffRootIFDOwner -#include // for unique_ptr +#include "parsers/RawParser.h" +#include "tiff/TiffIFD.h" +#include namespace rawspeed { diff --git a/src/librawspeed/parsers/FiffParserException.h b/src/librawspeed/parsers/FiffParserException.h index 6abb6f128..4060a2c0d 100644 --- a/src/librawspeed/parsers/FiffParserException.h +++ b/src/librawspeed/parsers/FiffParserException.h @@ -20,11 +20,11 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_NOINLINE, RAWSPEED_... +#include "rawspeedconfig.h" // IWYU pragma: begin_exports -#include "common/RawspeedException.h" // for ThrowExceptionHelper -#include "parsers/RawParserException.h" // for RawParserException +#include "common/RawspeedException.h" +#include "parsers/RawParserException.h" // IWYU pragma: end_exports namespace rawspeed { diff --git a/src/librawspeed/parsers/RawParser.cpp b/src/librawspeed/parsers/RawParser.cpp index b4d8cd523..08d3157ca 100644 --- a/src/librawspeed/parsers/RawParser.cpp +++ b/src/librawspeed/parsers/RawParser.cpp @@ -20,19 +20,19 @@ */ #include "parsers/RawParser.h" -#include "decoders/MrwDecoder.h" // for MrwDecoder -#include "decoders/NakedDecoder.h" // for NakedDecoder -#include "decoders/RafDecoder.h" // for RafDecoder -#include "decoders/RawDecoder.h" // for RawDecoder -#include "decoders/RawDecoderException.h" // for RawDecoderException, ThrowRDE -#include "io/Buffer.h" // for Buffer -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include "parsers/CiffParser.h" // for CiffParser -#include "parsers/CiffParserException.h" // for CiffParserException -#include "parsers/FiffParser.h" // for FiffParser -#include "parsers/FiffParserException.h" // for FiffParserException -#include "parsers/TiffParser.h" // for TiffParser -#include "parsers/TiffParserException.h" // for ThrowException, TiffParser... +#include "decoders/MrwDecoder.h" +#include "decoders/NakedDecoder.h" +#include "decoders/RafDecoder.h" +#include "decoders/RawDecoder.h" +#include "decoders/RawDecoderException.h" +#include "io/Buffer.h" +#include "metadata/CameraMetaData.h" +#include "parsers/CiffParser.h" +#include "parsers/CiffParserException.h" +#include "parsers/FiffParser.h" +#include "parsers/FiffParserException.h" +#include "parsers/TiffParser.h" +#include "parsers/TiffParserException.h" #include namespace rawspeed { diff --git a/src/librawspeed/parsers/RawParser.h b/src/librawspeed/parsers/RawParser.h index afae77149..def61af88 100644 --- a/src/librawspeed/parsers/RawParser.h +++ b/src/librawspeed/parsers/RawParser.h @@ -20,8 +20,8 @@ #pragma once -#include "io/Buffer.h" // for Buffer -#include // for unique_ptr +#include "io/Buffer.h" +#include namespace rawspeed { diff --git a/src/librawspeed/parsers/RawParserException.h b/src/librawspeed/parsers/RawParserException.h index cb32ff493..d4cf3b732 100644 --- a/src/librawspeed/parsers/RawParserException.h +++ b/src/librawspeed/parsers/RawParserException.h @@ -20,10 +20,10 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_NOINLINE, RAWSPEED_UN... +#include "rawspeedconfig.h" // IWYU pragma: begin_exports -#include "common/RawspeedException.h" // for RawspeedException, ThrowExcept... +#include "common/RawspeedException.h" // IWYU pragma: end_exports namespace rawspeed { diff --git a/src/librawspeed/parsers/TiffParser.cpp b/src/librawspeed/parsers/TiffParser.cpp index 896a52e5a..9ef89dee2 100644 --- a/src/librawspeed/parsers/TiffParser.cpp +++ b/src/librawspeed/parsers/TiffParser.cpp @@ -22,37 +22,37 @@ */ #include "parsers/TiffParser.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "decoders/ArwDecoder.h" // for ArwDecoder -#include "decoders/Cr2Decoder.h" // for Cr2Decoder -#include "decoders/DcrDecoder.h" // for DcrDecoder -#include "decoders/DcsDecoder.h" // for DcsDecoder -#include "decoders/DngDecoder.h" // for DngDecoder -#include "decoders/ErfDecoder.h" // for ErfDecoder -#include "decoders/IiqDecoder.h" // for IiqDecoder -#include "decoders/KdcDecoder.h" // for KdcDecoder -#include "decoders/MefDecoder.h" // for MefDecoder -#include "decoders/MosDecoder.h" // for MosDecoder -#include "decoders/NefDecoder.h" // for NefDecoder -#include "decoders/OrfDecoder.h" // for OrfDecoder -#include "decoders/PefDecoder.h" // for PefDecoder -#include "decoders/Rw2Decoder.h" // for Rw2Decoder -#include "decoders/SrwDecoder.h" // for SrwDecoder -#include "decoders/StiDecoder.h" // for StiDecoder -#include "decoders/ThreefrDecoder.h" // for ThreefrDecoder -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::unk... +#include "adt/NORangesSet.h" +#include "decoders/ArwDecoder.h" +#include "decoders/Cr2Decoder.h" +#include "decoders/DcrDecoder.h" +#include "decoders/DcsDecoder.h" +#include "decoders/DngDecoder.h" +#include "decoders/ErfDecoder.h" +#include "decoders/IiqDecoder.h" +#include "decoders/KdcDecoder.h" +#include "decoders/MefDecoder.h" +#include "decoders/MosDecoder.h" +#include "decoders/NefDecoder.h" +#include "decoders/OrfDecoder.h" +#include "decoders/PefDecoder.h" +#include "decoders/Rw2Decoder.h" +#include "decoders/SrwDecoder.h" +#include "decoders/StiDecoder.h" +#include "decoders/ThreefrDecoder.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" #include "parsers/RawParser.h" -#include "parsers/TiffParserException.h" // for ThrowException, ThrowTPE +#include "parsers/TiffParserException.h" #include "tiff/TiffIFD.h" #include -#include // for assert -#include // for UINT32_MAX, uint16_t, uint32_t -#include // for make_unique, unique_ptr -#include // for tie, tuple +#include +#include +#include +#include #include -#include // for vector +#include namespace rawspeed { class RawDecoder; diff --git a/src/librawspeed/parsers/TiffParser.h b/src/librawspeed/parsers/TiffParser.h index ce4ab4f77..feaabf9d7 100644 --- a/src/librawspeed/parsers/TiffParser.h +++ b/src/librawspeed/parsers/TiffParser.h @@ -20,13 +20,13 @@ #pragma once -#include "decoders/RawDecoder.h" // for RawDecoder (ptr only) -#include "io/Buffer.h" // for Buffer -#include "parsers/RawParser.h" // for RawParser -#include "tiff/TiffIFD.h" // for TiffRootIFDOwner, TiffIFD (ptr only) -#include // for array -#include // for unique_ptr -#include // for pair +#include "decoders/RawDecoder.h" +#include "io/Buffer.h" +#include "parsers/RawParser.h" +#include "tiff/TiffIFD.h" +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/parsers/TiffParserException.h b/src/librawspeed/parsers/TiffParserException.h index 33dcfefd2..d5566ecd8 100644 --- a/src/librawspeed/parsers/TiffParserException.h +++ b/src/librawspeed/parsers/TiffParserException.h @@ -21,11 +21,11 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_NOINLINE, RAWSPEED_... +#include "rawspeedconfig.h" // IWYU pragma: begin_exports -#include "common/RawspeedException.h" // for ThrowExceptionHelper -#include "parsers/RawParserException.h" // for RawParserException +#include "common/RawspeedException.h" +#include "parsers/RawParserException.h" // IWYU pragma: end_exports namespace rawspeed { diff --git a/src/librawspeed/tiff/CiffEntry.cpp b/src/librawspeed/tiff/CiffEntry.cpp index 8458718ad..a1b02dd3f 100644 --- a/src/librawspeed/tiff/CiffEntry.cpp +++ b/src/librawspeed/tiff/CiffEntry.cpp @@ -22,14 +22,14 @@ #include "rawspeedconfig.h" #include "tiff/CiffEntry.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "io/Buffer.h" // for Buffer, operator< -#include "io/ByteStream.h" // for ByteStream -#include "parsers/CiffParserException.h" // for ThrowException, ThrowCPE +#include "adt/NORangesSet.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "parsers/CiffParserException.h" #include -#include // for string, basic_string, alloc... +#include #include -#include // for vector +#include using std::vector; diff --git a/src/librawspeed/tiff/CiffEntry.h b/src/librawspeed/tiff/CiffEntry.h index d560275a0..27369a13b 100644 --- a/src/librawspeed/tiff/CiffEntry.h +++ b/src/librawspeed/tiff/CiffEntry.h @@ -22,14 +22,14 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include "adt/NORangesSet.h" // for set -#include "io/ByteStream.h" // for ByteStream -#include "tiff/CiffTag.h" // for CiffTag -#include // for uint32_t, uint16_t, uint8_t -#include // for string -#include // for string_view -#include // for vector +#include "rawspeedconfig.h" +#include "adt/NORangesSet.h" +#include "io/ByteStream.h" +#include "tiff/CiffTag.h" +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/tiff/CiffIFD.cpp b/src/librawspeed/tiff/CiffIFD.cpp index 1d2b10753..dd9edb925 100644 --- a/src/librawspeed/tiff/CiffIFD.cpp +++ b/src/librawspeed/tiff/CiffIFD.cpp @@ -22,22 +22,22 @@ #include "rawspeedconfig.h" #include "tiff/CiffIFD.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "common/Common.h" // for isIn -#include "io/Buffer.h" // for Buffer -#include "io/ByteStream.h" // for ByteStream -#include "parsers/CiffParserException.h" // for ThrowException, ThrowCPE -#include "tiff/CiffEntry.h" // for CiffEntry, CiffDataType +#include "adt/NORangesSet.h" +#include "common/Common.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "parsers/CiffParserException.h" +#include "tiff/CiffEntry.h" #include "tiff/CiffTag.h" -#include // for copy, max, any_of -#include // for assert +#include +#include #include -#include // for map, operator!=, _Rb_tree_c... -#include // for unique_ptr, make_unique -#include // for string, basic_string<>::__s... -#include // for operator== -#include // for move, pair -#include // for vector, vector<>::const_ite... +#include +#include +#include +#include +#include +#include using std::vector; diff --git a/src/librawspeed/tiff/CiffIFD.h b/src/librawspeed/tiff/CiffIFD.h index 6666042cf..f59dab4b1 100644 --- a/src/librawspeed/tiff/CiffIFD.h +++ b/src/librawspeed/tiff/CiffIFD.h @@ -22,15 +22,15 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include "adt/NORangesSet.h" // for set -#include "tiff/CiffEntry.h" // for CiffEntry (ptr only) -#include "tiff/CiffTag.h" // for CiffTag -#include // for uint32_t -#include // for map -#include // for unique_ptr -#include // for string -#include // for vector +#include "rawspeedconfig.h" +#include "adt/NORangesSet.h" +#include "tiff/CiffEntry.h" +#include "tiff/CiffTag.h" +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/tiff/CiffTag.h b/src/librawspeed/tiff/CiffTag.h index b2f8734e9..8973b9250 100644 --- a/src/librawspeed/tiff/CiffTag.h +++ b/src/librawspeed/tiff/CiffTag.h @@ -21,7 +21,7 @@ #pragma once -#include // for initializer_list +#include namespace rawspeed { diff --git a/src/librawspeed/tiff/TiffEntry.cpp b/src/librawspeed/tiff/TiffEntry.cpp index 72659499d..8758deb92 100644 --- a/src/librawspeed/tiff/TiffEntry.cpp +++ b/src/librawspeed/tiff/TiffEntry.cpp @@ -23,18 +23,18 @@ #include "rawspeedconfig.h" #include "tiff/TiffEntry.h" #include "adt/NotARational.h" -#include "common/Common.h" // for isIn -#include "io/Buffer.h" // for Buffer, DataBuffer +#include "common/Common.h" +#include "io/Buffer.h" #include "io/ByteStream.h" -#include "io/Endianness.h" // for Endianness, Endianness::little -#include "parsers/TiffParserException.h" // for ThrowException, ThrowTPE -#include "tiff/TiffIFD.h" // for TiffIFD, TiffRootIFD -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::DNGPRIVAT... +#include "io/Endianness.h" +#include "parsers/TiffParserException.h" +#include "tiff/TiffIFD.h" +#include "tiff/TiffTag.h" #include #include -#include // for assert -#include // for uint32_t, uint8_t, int32_t -#include // for string +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/tiff/TiffEntry.h b/src/librawspeed/tiff/TiffEntry.h index 615cd8a84..c13635d21 100644 --- a/src/librawspeed/tiff/TiffEntry.h +++ b/src/librawspeed/tiff/TiffEntry.h @@ -22,15 +22,15 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include "adt/NotARational.h" // for NotARational -#include "io/ByteStream.h" // for ByteStream -#include "tiff/TiffTag.h" // for TiffTag -#include // for fill_n -#include // for array -#include // for uint32_t, uint16_t, uint8_t, int32_t -#include // for string -#include // for vector +#include "rawspeedconfig.h" +#include "adt/NotARational.h" +#include "io/ByteStream.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/librawspeed/tiff/TiffIFD.cpp b/src/librawspeed/tiff/TiffIFD.cpp index 6740b3c27..7cbe2f06c 100644 --- a/src/librawspeed/tiff/TiffIFD.cpp +++ b/src/librawspeed/tiff/TiffIFD.cpp @@ -23,22 +23,22 @@ #include "rawspeedconfig.h" #include "tiff/TiffIFD.h" -#include "adt/NORangesSet.h" // for NORangesSet -#include "common/Common.h" // for trimSpaces -#include "common/RawspeedException.h" // for ThrowException, RawspeedException +#include "adt/NORangesSet.h" +#include "common/Common.h" +#include "common/RawspeedException.h" #include "io/ByteStream.h" #include "io/Endianness.h" -#include "io/IOException.h" // for IOException +#include "io/IOException.h" #include "parsers/TiffParserException.h" -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffTag.h" // for TiffTag, TiffTag::MAKE, TiffTa... -#include // for assert +#include "tiff/TiffEntry.h" +#include "tiff/TiffTag.h" +#include #include -#include // for map, operator!=, operator== -#include // for unique_ptr, make_unique, alloc... -#include // for string, operator==, basic_string -#include // for move, pair -#include // for vector<>::iterator, vector +#include +#include +#include +#include +#include using std::vector; diff --git a/src/librawspeed/tiff/TiffIFD.h b/src/librawspeed/tiff/TiffIFD.h index 480be8812..a858e24f3 100644 --- a/src/librawspeed/tiff/TiffIFD.h +++ b/src/librawspeed/tiff/TiffIFD.h @@ -22,20 +22,20 @@ #pragma once -#include "rawspeedconfig.h" // for RAWSPEED_READONLY -#include "adt/NORangesSet.h" // for set -#include "common/RawspeedException.h" // for ThrowException -#include "io/Buffer.h" // for Buffer (ptr only), DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::big -#include "parsers/TiffParserException.h" // for ThrowException, ThrowTPE -#include "tiff/TiffEntry.h" // for TiffEntry -#include "tiff/TiffTag.h" // for TiffTag -#include // for uint32_t -#include // for map, operator!=, map<>::con... -#include // for unique_ptr -#include // for string -#include // for vector +#include "rawspeedconfig.h" +#include "adt/NORangesSet.h" +#include "common/RawspeedException.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include "parsers/TiffParserException.h" +#include "tiff/TiffEntry.h" +#include "tiff/TiffTag.h" +#include +#include +#include +#include +#include namespace rawspeed { diff --git a/src/utilities/identify/rawspeed-identify.cpp b/src/utilities/identify/rawspeed-identify.cpp index 887e61330..dc3e65269 100644 --- a/src/utilities/identify/rawspeed-identify.cpp +++ b/src/utilities/identify/rawspeed-identify.cpp @@ -17,16 +17,16 @@ along with darktable. If not, see . */ -#include "RawSpeed-API.h" // for RawImage, RawImageData, iPoint2D, Cam... -#include "adt/Array2DRef.h" // for Array2DRef -#include // for array -#include // for byte, size_t -#include // for uint16_t, uint32_t -#include // for fprintf, stdout, stderr -#include // for unique_ptr, allocator, make_unique -#include // for string, operator+, basic_string -#include // for stat -#include // for vector +#include "RawSpeed-API.h" +#include "adt/Array2DRef.h" +#include +#include +#include +#include +#include +#include +#include +#include #ifdef _WIN32 #ifndef NOMINMAX diff --git a/src/utilities/rsbench/main.cpp b/src/utilities/rsbench/main.cpp index dc2414df8..ccaedd618 100644 --- a/src/utilities/rsbench/main.cpp +++ b/src/utilities/rsbench/main.cpp @@ -18,25 +18,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RawSpeed-API.h" // for Buffer, RawDecoder, Fil... -#include "adt/AlignedAllocator.h" // for AlignedAllocator -#include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocatorAda... -#include "common/ChecksumFile.h" // for ChecksumFileEntry, Read... -#include // for duration, high_resoluti... -#include // for uint8_t -#include // for clock, clock_t, CLOCKS_... -#include // for unique_ptr, allocator -#include // for ratio -#include // for string, to_string, char... -#include // for operator!=, string_view -#include // for tie, tuple -#include // for __type_identity_t -#include // for move -#include // for vector -#include // for Counter, Counter::Flags +#include "RawSpeed-API.h" +#include "adt/AlignedAllocator.h" +#include "adt/DefaultInitAllocatorAdaptor.h" +#include "common/ChecksumFile.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef HAVE_OPENMP -#include // for omp_get_max_threads +#include #endif #define HAVE_STEADY_CLOCK diff --git a/src/utilities/rstest/MD5Benchmark.cpp b/src/utilities/rstest/MD5Benchmark.cpp index 8cd751dfe..b1d35b75d 100644 --- a/src/utilities/rstest/MD5Benchmark.cpp +++ b/src/utilities/rstest/MD5Benchmark.cpp @@ -18,11 +18,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "md5.h" // for md5_hash, md5_state -#include // for uint8_t -#include // for free, malloc, size_t -#include // for unique_ptr -#include // for State, Benchmark, State::StateIterator +#include "md5.h" +#include +#include +#include +#include static inline void BM_MD5(benchmark::State& state) { // Create a zero-initialized data. Content does not matter for our purpose. diff --git a/src/utilities/rstest/MD5Test.cpp b/src/utilities/rstest/MD5Test.cpp index 3e57c6435..7c7ca3362 100644 --- a/src/utilities/rstest/MD5Test.cpp +++ b/src/utilities/rstest/MD5Test.cpp @@ -27,14 +27,14 @@ * Software. */ -#include "md5.h" // for md5_state, md5_hash -#include // for array -#include // for UINT32_C, uint8_t -#include // for strlen -#include // for allocator, basic_string -#include // for tie, tuple -#include // for pair -#include // for ParamIteratorInterface, ParamGeneratorInter... +#include "md5.h" +#include +#include +#include +#include +#include +#include +#include using MD5Testcase = std::pair; class MD5Test : public ::testing::TestWithParam { diff --git a/src/utilities/rstest/md5.cpp b/src/utilities/rstest/md5.cpp index c215083f9..5bcea6142 100644 --- a/src/utilities/rstest/md5.cpp +++ b/src/utilities/rstest/md5.cpp @@ -27,13 +27,13 @@ * Software. */ -#include "rawspeedconfig.h" // for RAWSPEED_READNONE +#include "rawspeedconfig.h" #include "md5.h" #include -#include // for uint32_t, uint8_t -#include // for size_t, snprintf -#include // for memset, memcpy -#include // for allocator, string +#include +#include +#include +#include namespace rawspeed::md5 { diff --git a/src/utilities/rstest/md5.h b/src/utilities/rstest/md5.h index 657cd9229..b804149a6 100644 --- a/src/utilities/rstest/md5.h +++ b/src/utilities/rstest/md5.h @@ -29,10 +29,10 @@ #pragma once -#include // for array -#include // for uint32_t, UINT32_C, uint8_t -#include // for size_t -#include // for string +#include +#include +#include +#include namespace rawspeed::md5 { diff --git a/src/utilities/rstest/rstest.cpp b/src/utilities/rstest/rstest.cpp index afae6b406..16eff3a35 100644 --- a/src/utilities/rstest/rstest.cpp +++ b/src/utilities/rstest/rstest.cpp @@ -18,35 +18,35 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RawSpeed-API.h" // for RawImage, RawImageData -#include "adt/AlignedAllocator.h" // for AlignedAllocator -#include "adt/Array2DRef.h" // for Array2DRef, Array2DRef<... -#include "adt/DefaultInitAllocatorAdaptor.h" // for DefaultInitAllocatorAda... -#include "adt/NotARational.h" // for NotARational -#include "md5.h" // for md5_state, md5_hash -#include // for array -#include // for assert -#include // for milliseconds, steady_clock -#include // for va_end, va_list, va_start -#include // for size_t, byte -#include // for uint8_t, uint16_t, uint... -#include // for fclose, fprintf, fopen -#include // for system -#include // for operator<<, basic_ostream -#include // for less -#include // for cout, cerr -#include // for istreambuf_iterator -#include // for map, operator!=, _Rb_tr... -#include // for allocator, unique_ptr -#include // for basic_ostringstream -#include // for string, operator+, basi... -#include // for operator!=, string_view -#include // for tie, tuple -#include // for __type_identity_t -#include // for vector +#include "RawSpeed-API.h" +#include "adt/AlignedAllocator.h" +#include "adt/Array2DRef.h" +#include "adt/DefaultInitAllocatorAdaptor.h" +#include "adt/NotARational.h" +#include "md5.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #if !defined(__has_feature) || !__has_feature(thread_sanitizer) -#include // for operator<<, setw +#include #endif using std::chrono::steady_clock; diff --git a/test/librawspeed/adt/NORangesSetTest.cpp b/test/librawspeed/adt/NORangesSetTest.cpp index fba503fe4..d37aa0593 100644 --- a/test/librawspeed/adt/NORangesSetTest.cpp +++ b/test/librawspeed/adt/NORangesSetTest.cpp @@ -18,12 +18,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "adt/NORangesSet.h" // for NORangesSet, operator!=, set, set<>::co... -#include "adt/Range.h" // for Range, RangesOverlap -#include "adt/RangeTest.h" // for AllOverlapped, TwoRangesTest, twoRanges... -#include // for string, allocator -#include // for get, tuple -#include // for ParamIteratorInterface, AssertionResult +#include "adt/NORangesSet.h" +#include "adt/Range.h" +#include "adt/RangeTest.h" +#include +#include +#include // IWYU pragma: no_forward_declare rawspeed::Range diff --git a/test/librawspeed/adt/PointTest.cpp b/test/librawspeed/adt/PointTest.cpp index 2f3af6636..dd59fc76c 100644 --- a/test/librawspeed/adt/PointTest.cpp +++ b/test/librawspeed/adt/PointTest.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "adt/Point.h" // for iPoint2D, iPoint2D::area_type, iPoint2D::va... -#include // for find -#include // for cend, cbegin, pair -#include // for numeric_limits -#include // for operator<<, basic_ostream::operator<<, ostream -#include // for allocator, basic_string -#include // for make_tuple, get, tuple -#include // for __strip_reference_wrapper<>::__type -#include // for make_pair, pair, move -#include // for tuple -#include // for Message, TestPartResult, ParamIteratorInter... +#include "adt/Point.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using rawspeed::iPoint2D; using std::make_pair; diff --git a/test/librawspeed/adt/RangeTest.cpp b/test/librawspeed/adt/RangeTest.cpp index 7d9296d1f..07d1b69b1 100644 --- a/test/librawspeed/adt/RangeTest.cpp +++ b/test/librawspeed/adt/RangeTest.cpp @@ -18,9 +18,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "adt/Range.h" // for Range -#include "adt/RangeTest.h" // for RangeDoesntContain, RangeContains -#include // for allocator, operator!=, set, set<>::const_i... +#include "adt/Range.h" +#include "adt/RangeTest.h" +#include using rawspeed::Range; diff --git a/test/librawspeed/adt/RangeTest.h b/test/librawspeed/adt/RangeTest.h index eeb75f26e..410dc6cc5 100644 --- a/test/librawspeed/adt/RangeTest.h +++ b/test/librawspeed/adt/RangeTest.h @@ -18,12 +18,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "adt/Range.h" // for Range -#include // for basic_ostream::operator<<, operator<<, ost... -#include // for allocator, set -#include // for make_tuple, tuple, get -#include // for __tuple_element_t -#include // for ParamIteratorInterface, AssertionFailure +#include "adt/Range.h" +#include +#include +#include +#include +#include using rawspeed::Range; diff --git a/test/librawspeed/codes/HuffmanCodeTest.cpp b/test/librawspeed/codes/HuffmanCodeTest.cpp index 364b299e6..951fe05c8 100644 --- a/test/librawspeed/codes/HuffmanCodeTest.cpp +++ b/test/librawspeed/codes/HuffmanCodeTest.cpp @@ -18,22 +18,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "codes/HuffmanCode.h" // for HuffmanCode... -#include "adt/Array1DRef.h" // for Array1DRef +#include "codes/HuffmanCode.h" +#include "adt/Array1DRef.h" #include "codes/AbstractPrefixCodeDecoder.h" -#include "io/Buffer.h" // for Buffer -#include // for max, min -#include // for bitset -#include // for assert -#include // for uint8_t, uint32_t -#include // for initializer_list -#include // for operator<<, ostream -#include // for allocator, basic_string -#include // for make_tuple, get, tuple -#include // for __decay_and_strip -#include // for move -#include // for vector -#include // for ParamIteratorInterface +#include "io/Buffer.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { struct BaselineCodeTag; diff --git a/test/librawspeed/codes/HuffmanTableTest.cpp b/test/librawspeed/codes/HuffmanTableTest.cpp index 1afd85313..c421f52d5 100644 --- a/test/librawspeed/codes/HuffmanTableTest.cpp +++ b/test/librawspeed/codes/HuffmanTableTest.cpp @@ -18,21 +18,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "adt/Array1DRef.h" // for Array1DRef +#include "adt/Array1DRef.h" #include "codes/HuffmanCode.h" -#include "codes/PrefixCodeDecoder.h" // for PrefixCodeLUTDecoder, PrefixCodeDecoder -#include "io/BitPumpMSB.h" // for BitStream<>::fillCache, BitP... -#include "io/BitStream.h" // for BitStream -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::little -#include // for copy, fill_n, max -#include // for array -#include // for uint8_t -#include // for initializer_list -#include // for move -#include // for vector, allocator -#include // for Message, TestPartResult +#include "codes/PrefixCodeDecoder.h" +#include "io/BitPumpMSB.h" +#include "io/BitStream.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include +#include +#include +#include +#include namespace rawspeed { class RawDecoderException; diff --git a/test/librawspeed/common/BayerPhaseTest.cpp b/test/librawspeed/common/BayerPhaseTest.cpp index 293df0ca3..a62773129 100644 --- a/test/librawspeed/common/BayerPhaseTest.cpp +++ b/test/librawspeed/common/BayerPhaseTest.cpp @@ -18,16 +18,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "common/BayerPhase.h" // for BayerPhase, BayerPhase::BGGR -#include "metadata/ColorFilterArray.h" // for CFAColor, CFAColor::GREEN -#include // for array -#include // for assert -#include // for allocator, map, operator!= -#include // for optional -#include // for operator<<, ostream -#include // for get, tuple, apply -#include // for forward, pair -#include // for ParamIteratorInterface, Param... +#include "common/BayerPhase.h" +#include "metadata/ColorFilterArray.h" +#include +#include +#include +#include +#include +#include +#include +#include using rawspeed::BayerPhase; using rawspeed::CFAColor; diff --git a/test/librawspeed/common/ChecksumFileTest.cpp b/test/librawspeed/common/ChecksumFileTest.cpp index 42b689df1..f62f9fef2 100644 --- a/test/librawspeed/common/ChecksumFileTest.cpp +++ b/test/librawspeed/common/ChecksumFileTest.cpp @@ -18,12 +18,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "common/ChecksumFile.h" // for ParseChecksumFileContent, ChecksumF... -#include "common/RawspeedException.h" // for RawspeedException (ptr only) -#include // for allocator, allocator_traits<>::valu... -#include // for operator+, string, char_traits, bas... -#include // for vector -#include // for AssertionResult, Message, TestPartR... +#include "common/ChecksumFile.h" +#include "common/RawspeedException.h" +#include +#include +#include +#include using rawspeed::ParseChecksumFileContent; diff --git a/test/librawspeed/common/CommonTest.cpp b/test/librawspeed/common/CommonTest.cpp index 6feccba3d..6bc9a101a 100644 --- a/test/librawspeed/common/CommonTest.cpp +++ b/test/librawspeed/common/CommonTest.cpp @@ -18,18 +18,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "common/Common.h" // for roundUp, clampBits, copyPixels, isAligned -#include // for fill, min, copy, equal, fill_n, max -#include // for assert -#include // for size_t -#include // for uint8_t, uint16_t -#include // for numeric_limits -#include // for allocator, make_unique, unique_ptr -#include // for basic_string, string, operator== -#include // for make_tuple, get, tuple -#include // for __strip_reference_wrapper<>::__type -#include // for vector, vector<>::iterator, vector<>::val... -#include // for ParamIteratorInterface, ParamGeneratorInt... +#include "common/Common.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using rawspeed::clampBits; using rawspeed::copyPixels; diff --git a/test/librawspeed/common/CpuidTest.cpp b/test/librawspeed/common/CpuidTest.cpp index 4148ca9e6..cdfd5b69f 100644 --- a/test/librawspeed/common/CpuidTest.cpp +++ b/test/librawspeed/common/CpuidTest.cpp @@ -19,10 +19,10 @@ */ #include "rawspeedconfig.h" // IWYU pragma: keep -#include "common/Cpuid.h" // for Cpuid -#include // for exit -#include // for allocator, string -#include // for AssertionResult, DeathTest, ExitedWithCode +#include "common/Cpuid.h" +#include +#include +#include using rawspeed::Cpuid; diff --git a/test/librawspeed/common/SplineTest.cpp b/test/librawspeed/common/SplineTest.cpp index 8f20a021b..934d871a1 100644 --- a/test/librawspeed/common/SplineTest.cpp +++ b/test/librawspeed/common/SplineTest.cpp @@ -18,23 +18,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "common/Spline.h" // for Spline, Spline<>::value_type -#include "adt/Point.h" // for iPoint2D, iPoint2D::value_type -#include // for copy, max, generate_n, fill_n -#include // for array -#include // for assert -#include // for lround, acos, sin -#include // for uint16_t -#include // for exit -#include // for begin, end, back_inserter -#include // for numeric_limits -#include // for allocator, allocator_traits<>::value_type -#include // for operator<<, basic_ostream::operator<< -#include // for string -#include // for make_tuple, get, tuple -#include // for __strip_reference_wrapper<>::__type, enab... -#include // for vector -#include // for ParamIteratorInterface, ParamGeneratorInt... +#include "common/Spline.h" +#include "adt/Point.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using rawspeed::Spline; using std::make_tuple; diff --git a/test/librawspeed/io/BitPumpJPEGTest.cpp b/test/librawspeed/io/BitPumpJPEGTest.cpp index aaca88609..8a67e9c06 100644 --- a/test/librawspeed/io/BitPumpJPEGTest.cpp +++ b/test/librawspeed/io/BitPumpJPEGTest.cpp @@ -18,17 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "io/BitPumpJPEG.h" // for BitPumpJPEG -#include "io/BitPumpTest.h" // for Pattern, (anonymous), GenOnesBE, Patterns -#include "io/BitStream.h" // for BitStream -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::big, Endianness:... -#include // for array -#include // for uint8_t, uint32_t -#include // for initializer_list -#include // for allocator -#include // for Message, TestPartResult, INSTANTIATE_TYP... +#include "io/BitPumpJPEG.h" +#include "io/BitPumpTest.h" +#include "io/BitStream.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include +#include +#include using rawspeed::BitPumpJPEG; using rawspeed::Buffer; diff --git a/test/librawspeed/io/BitPumpLSBTest.cpp b/test/librawspeed/io/BitPumpLSBTest.cpp index 74cfcd94e..75ad8caf4 100644 --- a/test/librawspeed/io/BitPumpLSBTest.cpp +++ b/test/librawspeed/io/BitPumpLSBTest.cpp @@ -18,12 +18,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "io/BitPumpLSB.h" // for BitPumpLSB -#include "io/BitPumpTest.h" // for Pattern, (anonymous), GenOnesLE, Patterns -#include // for array -#include // for uint32_t, uint8_t -#include // for allocator -#include // for INSTANTIATE_TYPED_TEST_SUITE_P +#include "io/BitPumpLSB.h" +#include "io/BitPumpTest.h" +#include +#include +#include +#include using rawspeed::BitPumpLSB; diff --git a/test/librawspeed/io/BitPumpMSB16Test.cpp b/test/librawspeed/io/BitPumpMSB16Test.cpp index 18e79a349..53b114f2f 100644 --- a/test/librawspeed/io/BitPumpMSB16Test.cpp +++ b/test/librawspeed/io/BitPumpMSB16Test.cpp @@ -18,12 +18,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "io/BitPumpMSB16.h" // for BitPumpMSB16 -#include "io/BitPumpTest.h" // for Pattern, (anonymous), GenOnesBE, Patterns -#include // for array -#include // for uint32_t, uint8_t -#include // for allocator -#include // for INSTANTIATE_TYPED_TEST_SUITE_P +#include "io/BitPumpMSB16.h" +#include "io/BitPumpTest.h" +#include +#include +#include +#include using rawspeed::BitPumpMSB16; diff --git a/test/librawspeed/io/BitPumpMSB32Test.cpp b/test/librawspeed/io/BitPumpMSB32Test.cpp index 3ba6b4980..52b50c063 100644 --- a/test/librawspeed/io/BitPumpMSB32Test.cpp +++ b/test/librawspeed/io/BitPumpMSB32Test.cpp @@ -18,12 +18,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "io/BitPumpMSB32.h" // for BitPumpMSB32 -#include "io/BitPumpTest.h" // for Pattern, (anonymous), GenOnesBE, Patterns -#include // for array -#include // for uint32_t, uint8_t -#include // for allocator -#include // for INSTANTIATE_TYPED_TEST_SUITE_P +#include "io/BitPumpMSB32.h" +#include "io/BitPumpTest.h" +#include +#include +#include +#include using rawspeed::BitPumpMSB32; diff --git a/test/librawspeed/io/BitPumpMSBTest.cpp b/test/librawspeed/io/BitPumpMSBTest.cpp index fb79e8280..55b219306 100644 --- a/test/librawspeed/io/BitPumpMSBTest.cpp +++ b/test/librawspeed/io/BitPumpMSBTest.cpp @@ -18,12 +18,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "io/BitPumpMSB.h" // for BitPumpMSB -#include "io/BitPumpTest.h" // for Pattern, (anonymous), GenOnesBE, Patterns -#include // for array -#include // for uint32_t, uint8_t -#include // for allocator -#include // for INSTANTIATE_TYPED_TEST_SUITE_P +#include "io/BitPumpMSB.h" +#include "io/BitPumpTest.h" +#include +#include +#include +#include using rawspeed::BitPumpMSB; diff --git a/test/librawspeed/io/BitPumpTest.h b/test/librawspeed/io/BitPumpTest.h index 328790d44..47a184089 100644 --- a/test/librawspeed/io/BitPumpTest.h +++ b/test/librawspeed/io/BitPumpTest.h @@ -18,16 +18,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "common/Common.h" // for uint8_t -#include "io/BitStream.h" // for BitStream -#include "io/Buffer.h" // for Buffer, DataBuffer -#include "io/ByteStream.h" // for ByteStream -#include "io/Endianness.h" // for Endianness, Endianness::big, Endianness:... -#include // for array -#include // for assert -#include // for uint8_t, uint32_t -#include // for initializer_list -#include // for ParamIteratorInterface, Message +#include "common/Common.h" +#include "io/BitStream.h" +#include "io/Buffer.h" +#include "io/ByteStream.h" +#include "io/Endianness.h" +#include +#include +#include +#include +#include using rawspeed::Buffer; using rawspeed::ByteStream; diff --git a/test/librawspeed/io/EndiannessTest.cpp b/test/librawspeed/io/EndiannessTest.cpp index f365432a9..4c1b667b3 100644 --- a/test/librawspeed/io/EndiannessTest.cpp +++ b/test/librawspeed/io/EndiannessTest.cpp @@ -19,13 +19,13 @@ */ #include "EndiannessTest.h" -#include "io/Endianness.h" // for getHostEndianness, Endianness, getByteSwa... -#include // for copy -#include // for memcpy, memcmp -#include // for operator<<, setfill, setw, _Setw, _Setfill -#include // for hex, endl, ostream -#include // for allocator -#include // for ParamIteratorInterface, Message, TestPart... +#include "io/Endianness.h" +#include +#include +#include +#include +#include +#include using rawspeed::Endianness; using rawspeed::getBE; diff --git a/test/librawspeed/io/EndiannessTest.h b/test/librawspeed/io/EndiannessTest.h index 759819840..9061a07ec 100644 --- a/test/librawspeed/io/EndiannessTest.h +++ b/test/librawspeed/io/EndiannessTest.h @@ -20,8 +20,8 @@ #pragma once -#include // for uint16_t, uint32_t, uint64_t -#include // for tuple +#include +#include namespace rawspeed_test { diff --git a/test/librawspeed/metadata/BlackAreaTest.cpp b/test/librawspeed/metadata/BlackAreaTest.cpp index aaa5382ae..6b5d39f95 100644 --- a/test/librawspeed/metadata/BlackAreaTest.cpp +++ b/test/librawspeed/metadata/BlackAreaTest.cpp @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "metadata/BlackArea.h" // for BlackArea -#include // for unique_ptr, allocator -#include // for basic_string -#include // for get, tuple -#include // for ParamIteratorInterface, Message, Tes... +#include "metadata/BlackArea.h" +#include +#include +#include +#include using rawspeed::BlackArea; using std::unique_ptr; diff --git a/test/librawspeed/metadata/CameraMetaDataTest.cpp b/test/librawspeed/metadata/CameraMetaDataTest.cpp index 10976c715..dabe5cf6a 100644 --- a/test/librawspeed/metadata/CameraMetaDataTest.cpp +++ b/test/librawspeed/metadata/CameraMetaDataTest.cpp @@ -19,12 +19,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rawspeedconfig.h" // for HAVE_PUGIXML, RAWSPEED_SOURCE_DIR -#include "metadata/Camera.h" // for Camera -#include "metadata/CameraMetaData.h" // for CameraMetaData -#include // for allocator, unique_ptr -#include // for string, basic_string -#include // for Message, TestPartResult +#include "rawspeedconfig.h" +#include "metadata/Camera.h" +#include "metadata/CameraMetaData.h" +#include +#include +#include using rawspeed::CameraMetaData; using std::unique_ptr; diff --git a/test/librawspeed/metadata/CameraSensorInfoTest.cpp b/test/librawspeed/metadata/CameraSensorInfoTest.cpp index 62ee605f1..63129f4a0 100644 --- a/test/librawspeed/metadata/CameraSensorInfoTest.cpp +++ b/test/librawspeed/metadata/CameraSensorInfoTest.cpp @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "metadata/CameraSensorInfo.h" // for CameraSensorInfo -#include // for copy, generate, fill_n, max -#include // for rand, srand -#include // for operator<<, basic_ostream::op... -#include // for numeric_limits -#include // for unique_ptr, allocator -#include // for basic_string, string -#include // for get, tuple -#include // for vector -#include // for testing::InitGoogleMock -#include // for ParamIteratorInterface, Message +#include "metadata/CameraSensorInfo.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using rawspeed::CameraSensorInfo; using std::unique_ptr; diff --git a/test/librawspeed/metadata/CameraTest.cpp b/test/librawspeed/metadata/CameraTest.cpp index b8dbe6c6e..9fc27161a 100644 --- a/test/librawspeed/metadata/CameraTest.cpp +++ b/test/librawspeed/metadata/CameraTest.cpp @@ -18,10 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "metadata/Camera.h" // for Hints -#include // for string, allocator, basic_string, to_string -#include // for get, tuple -#include // for AssertionResult, Message, TestPartResult +#include "metadata/Camera.h" +#include +#include +#include using rawspeed::Hints; using std::string; diff --git a/test/librawspeed/metadata/ColorFilterArrayTest.cpp b/test/librawspeed/metadata/ColorFilterArrayTest.cpp index 898934f70..8d63fca73 100644 --- a/test/librawspeed/metadata/ColorFilterArrayTest.cpp +++ b/test/librawspeed/metadata/ColorFilterArrayTest.cpp @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "metadata/ColorFilterArray.h" // for ColorFilterArray, CFAColor -#include "adt/Point.h" // for iPoint2D -#include // for copy -#include // for uint32_t -#include // for ostream -#include // for allocator, basic_string, oper... -#include // for get, make_tuple, tuple -#include // for ParamIteratorInterface, Message +#include "metadata/ColorFilterArray.h" +#include "adt/Point.h" +#include +#include +#include +#include +#include +#include using rawspeed::CFAColor; using rawspeed::ColorFilterArray; diff --git a/test/librawspeed/test/ExceptionsTest.cpp b/test/librawspeed/test/ExceptionsTest.cpp index ad767da52..2cf0c5514 100644 --- a/test/librawspeed/test/ExceptionsTest.cpp +++ b/test/librawspeed/test/ExceptionsTest.cpp @@ -18,18 +18,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "common/RawspeedException.h" // for RawspeedException (ptr... -#include "decoders/RawDecoderException.h" // for RawDecoderException (p... -#include "io/FileIOException.h" // for FileIOException (ptr o... -#include "io/IOException.h" // for IOException (ptr only) -#include "metadata/CameraMetadataException.h" // for CameraMetadataExceptio... -#include "parsers/CiffParserException.h" // for CiffParserException (p... -#include "parsers/FiffParserException.h" // for FiffParserException (p... -#include "parsers/RawParserException.h" // for RawParserException (pt... -#include "parsers/TiffParserException.h" // for TiffParserException (p... -#include // for exception -#include // for unique_ptr -#include // for runtime_error +#include "common/RawspeedException.h" +#include "decoders/RawDecoderException.h" +#include "io/FileIOException.h" +#include "io/IOException.h" +#include "metadata/CameraMetadataException.h" +#include "parsers/CiffParserException.h" +#include "parsers/FiffParserException.h" +#include "parsers/RawParserException.h" +#include "parsers/TiffParserException.h" +#include +#include +#include using rawspeed::CameraMetadataException; using rawspeed::CiffParserException; From 19c49369f1976a217d715e122b7657a2afbcef90 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Sat, 4 Nov 2023 19:58:48 +0300 Subject: [PATCH 40/40] [CI] MSYS2: disable caching, it should not be an opt-out feature --- .github/workflows/CI-windows-msys2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI-windows-msys2.yml b/.github/workflows/CI-windows-msys2.yml index ed93c546d..e31b5fc7b 100644 --- a/.github/workflows/CI-windows-msys2.yml +++ b/.github/workflows/CI-windows-msys2.yml @@ -50,6 +50,7 @@ jobs: timeout-minutes: 3 uses: msys2/setup-msys2@v2 with: + cache: false msystem: ${{ inputs.msys2-msystem }} update: true install: >-