30#include <gtest/gtest.h>
49 __builtin_unreachable();
83template <
typename tuple_t>
85 constexpr auto get_array = [](
auto&&...
x) {
86 return std::array{std::forward<decltype(x)>(
x)...};
88 return std::apply(get_array, std::forward<tuple_t>(tuple));
92 :
public ::testing::TestWithParam<
93 std::tuple<CFAColor, CFAColor, CFAColor, CFAColor>> {
103 std::array<CFAColor, 4>
in;
118 if (it.second == GetParam()) {
138 :
public ::testing::TestWithParam<std::tuple<BayerPhase, BayerPhase>> {
142 src = std::get<0>(GetParam());
143 tgt = std::get<1>(GetParam());
173 __builtin_unreachable();
176const std::map<BayerPhase, std::array<const AbstractElement*, 4>>
211 __builtin_unreachable();
214const std::map<BayerPhase, std::array<const AbstractColorElement*, 4>>
INSTANTIATE_TEST_SUITE_P(MD5Test, MD5Test, ::testing::ValuesIn(testCases))
TEST_P(MD5Test, CheckTestCaseSet)
assert(dim.area() >=area)
BayerPhaseFromCFATest()=default
rawspeed::Optional< BayerPhase > expected
std::array< CFAColor, 4 > in
BayerPhaseShifTest()=default
BayerPhaseToCFATest()=default
rawspeed::Optional< BayerPhase > in
std::array< CFAColor, 4 > expected
const std::map< std::array< CFAColor, 4 >, BayerPhase > KnownBayerCFAs
const TopRightElement e01
auto AllPossibleBayerPhaseShifts
const BottomRightElement e11
constexpr auto get_array_from_tuple(tuple_t &&tuple)
const FirstGreenElement eG0
const std::map< BayerPhase, std::array< const AbstractElement *, 4 > > ExpectedBayerPhaseShifts
::std::ostream & operator<<(::std::ostream &os, const AbstractElement *e)
const BottomLeftElement e10
const std::map< BayerPhase, std::array< const AbstractColorElement *, 4 > > ExpectedBayerStablePhaseShifts
const SecondGreenElement eG1
std::array< CFAColor, 4 > getAsCFAColors(BayerPhase p)
Optional< BayerPhase > getAsBayerPhase(const ColorFilterArray &CFA)
std::array< T, 4 > applyPhaseShift(std::array< T, 4 > srcData, BayerPhase srcPhase, BayerPhase tgtPhase)
std::array< T, 4 > applyStablePhaseShift(std::array< T, 4 > srcData, BayerPhase srcPhase, BayerPhase tgtPhase)
static inline ::std::ostream & operator<<(::std::ostream &os, const T &b)