diff --git a/src/BC1/BC1Decoder.cpp b/src/BC1/BC1Decoder.cpp index 77640fc..1c9c7d7 100644 --- a/src/BC1/BC1Decoder.cpp +++ b/src/BC1/BC1Decoder.cpp @@ -19,14 +19,12 @@ #include "BC1Decoder.h" -#include -#include - #include +#include +#include #include "../BlockView.h" #include "../Color.h" -#include "../Interpolator.h" #include "../ndebug.h" #include "BC1Block.h" diff --git a/src/BC3/BC3Decoder.cpp b/src/BC3/BC3Decoder.cpp index 51fd888..2115b55 100644 --- a/src/BC3/BC3Decoder.cpp +++ b/src/BC3/BC3Decoder.cpp @@ -23,6 +23,7 @@ #include "../BC4/BC4Decoder.h" #include "../BlockView.h" #include "../ndebug.h" +#include "BC3Block.h" namespace rgbcx { diff --git a/src/BC4/BC4Decoder.cpp b/src/BC4/BC4Decoder.cpp index c3e3675..11070c2 100644 --- a/src/BC4/BC4Decoder.cpp +++ b/src/BC4/BC4Decoder.cpp @@ -19,12 +19,10 @@ #include "BC4Decoder.h" -#include // for assert - -#include // for array +#include // for array +#include // for assert #include "../BlockView.h" // for ColorBlock -#include "../Color.h" // for Color #include "../ndebug.h" // for ndebug #include "BC4Block.h" diff --git a/src/BC4/BC4Decoder.h b/src/BC4/BC4Decoder.h index dc725cf..2b8cb9e 100644 --- a/src/BC4/BC4Decoder.h +++ b/src/BC4/BC4Decoder.h @@ -19,7 +19,8 @@ #pragma once -#include +#include +#include #include "../BlockDecoder.h" #include "../BlockView.h" diff --git a/src/BC4/BC4Encoder.cpp b/src/BC4/BC4Encoder.cpp index abbeeac..0319914 100644 --- a/src/BC4/BC4Encoder.cpp +++ b/src/BC4/BC4Encoder.cpp @@ -19,7 +19,12 @@ #include "BC4Encoder.h" -#include +#include // for minmax_element +#include // for array +#include // for uint8_t +#include // for pair + +#include "BC4Block.h" // for BC4Block namespace rgbcx { void BC4Encoder::EncodeBlock(Byte4x4 pixels, BC4Block *const dest) const noexcept(ndebug) { @@ -38,7 +43,7 @@ void BC4Encoder::EncodeBlock(Byte4x4 pixels, BC4Block *const dest) const noexcep } std::array selectors = {}; - const static std::array Levels = {1U, 7U, 6U, 5U, 4U, 3U, 2U, 0U}; // selector value options in linear order + const static std::array Levels = {1U, 7U, 6U, 5U, 4U, 3U, 2U, 0U}; // selector value options in linear order // BC4 floors in its divisions, which we compensate for with the 4 bias. // This function is optimal for all possible inputs (i.e. it outputs the same results as checking all 8 values and choosing the closest one). @@ -52,7 +57,7 @@ void BC4Encoder::EncodeBlock(Byte4x4 pixels, BC4Block *const dest) const noexcep // iterate over all values and calculate selectors for (unsigned i = 0; i < 16; i++) { - int value = flattened[i] * 14; // multiply by demonimator + int value = flattened[i] * 14; // multiply by demonimator // level = number of thresholds this value is greater than unsigned level = 0; diff --git a/src/BC4/BC4Encoder.h b/src/BC4/BC4Encoder.h index 61c3e08..f388cbe 100644 --- a/src/BC4/BC4Encoder.h +++ b/src/BC4/BC4Encoder.h @@ -19,8 +19,14 @@ #pragma once +#include +#include + #include "../BlockEncoder.h" +#include "../BlockView.h" +#include "../ndebug.h" #include "BC4Block.h" + namespace rgbcx { class BC4Encoder : public BlockEncoder { diff --git a/src/BC5/BC5Decoder.cpp b/src/BC5/BC5Decoder.cpp index 0e21c76..ada279a 100644 --- a/src/BC5/BC5Decoder.cpp +++ b/src/BC5/BC5Decoder.cpp @@ -19,9 +19,9 @@ #include "BC5Decoder.h" -#include "../BC4/BC4Decoder.h" #include "../BlockView.h" #include "../ndebug.h" +#include "BC5Block.h" namespace rgbcx { diff --git a/src/BC5/BC5Decoder.h b/src/BC5/BC5Decoder.h index 8feaf44..f50fdfa 100644 --- a/src/BC5/BC5Decoder.h +++ b/src/BC5/BC5Decoder.h @@ -19,8 +19,9 @@ #pragma once -#include - +#include +#include +#include #include #include "../BC4/BC4Decoder.h"