24#error IMPL0 must be defined to one of rawspeeds huffman table implementations
27#error IMPL1 must be defined to one of rawspeeds huffman table implementations
48struct BaselineCodeTag;
54template <
typename Pump,
bool IsFullDecode,
typename HT0,
typename HT1>
64 bool failure0 =
false;
65 bool failure1 =
false;
68 decoded1 = ht1.template decode<decltype(bits1), IsFullDecode>(bits1);
77 decoded0 = ht0.template decode<decltype(bits0), IsFullDecode>(bits0);
86 assert(failure0 == failure1);
89 if (failure0 || failure1)
96 assert(decoded0 == decoded1);
100template <
typename Pump,
typename HT0,
typename HT1>
103 assert(ht0.isFullDecode() == ht1.isFullDecode());
104 if (ht0.isFullDecode())
105 workloop<Pump,
true>(input, ht0, ht1);
107 workloop<Pump,
false>(input, ht0, ht1);
118 rawspeed::IMPL0<CodeTag, rawspeed::BACKIMPL0<CodeTag>>>(bs0);
125 rawspeed::IMPL1<CodeTag, rawspeed::BACKIMPL1<CodeTag>>>(bs1);
129 const int format0 = bs0.
getByte();
130 const int format1 = bs1.
getByte();
136 assert(format0 == format1);
141 assert(format0 == format1);
185 __builtin_unreachable();
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
assert(dim.area() >=area)
Array1DRef< const uint8_t > getAsArray1DRef() const
size_type getPosition() const
Buffer peekRemainingBuffer() const
static T createPrefixCodeDecoder(rawspeed::ByteStream &bs)
void checkPump(rawspeed::Array1DRef< const uint8_t > input, const HT0 &ht0, const HT1 &ht1)
void checkFlavour(rawspeed::ByteStream bs)
void workloop(rawspeed::Array1DRef< const uint8_t > input, const HT0 &ht0, const HT1 &ht1)
constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value)