29template <
typename CodeTag>
39 template <
typename BIT_VACUUMER>
43 "This BitVacuumer specialization is not marked as usable here");
48 bv.put(symbol.code, symbol.code_len);
53 for (
int codeIndex = 0;
56 const auto& codeValue =
Base::code.codeValues[codeIndex];
57 if (codeValue == value)
60 __builtin_unreachable();
64 void setup(
bool fullDecode_,
bool fixDNGBug16_) {
68 template <
typename BIT_VACUUMER>
70 typename Traits::CodeValueTy codeValue)
const {
73 "This BitVacuumer specialization is not marked as usable here");
79 template <
typename BIT_VACUUMER>
83 "This BitVacuumer specialization is not marked as usable here");
89 bv.put(diff, diffLen);
92 template <
typename BIT_VACUUMER,
bool FULL_DECODE>
93 void encode(BIT_VACUUMER& bv,
int value)
const {
96 "This BitVacuumer specialization is not marked as usable here");
99 if constexpr (!FULL_DECODE)
typename Base::CodeSymbol CodeSymbol
AbstractPrefixCodeTranscoder< CodeTag > Base
typename Base::Traits Traits
void setup(bool fullDecode_, bool fixDNGBug16_)
static std::pair< uint32_t, uint8_t > RAWSPEED_READNONE reduce(int32_t extendedDiff)
bool RAWSPEED_READONLY isFullDecode() const
bool RAWSPEED_READONLY handleDNGBug16() const
PrefixCode< CodeTag > code
typename Base::Traits Traits
void setup(bool fullDecode_, bool fixDNGBug16_)
void encodeCodeValue(BIT_VACUUMER &bv, typename Traits::CodeValueTy codeValue) const
int getCodeIndexOfCodeValue(const typename Traits::CodeValueTy value) const
AbstractPrefixCodeEncoder< CodeTag > Base
void encodeDifference(BIT_VACUUMER &bv, int value) const
void encode(BIT_VACUUMER &bv, int value) const
void encodeCodeValueImpl(BIT_VACUUMER &bv, int codeIndex) const
constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value)