TableLookUp::setTable(): silence truncation of delta. Needs full rewrite.
TableLookUp::setTable(): silence truncation of delta. Needs full rewrite.

Wow. This is completely broken in the case of non-monotonic curve.
Like in the Sony DSC-RX0 raws.

../src/librawspeed/common/TableLookUp.cpp:62:20: runtime error: implicit conversion from type 'int' of value -13108 (32-bit, signed) to type 'rawspeed::ushort16' (aka 'unsigned short') changed the value to 52428 (16-bit, unsigned)
    #0 0x292f04 in rawspeed::TableLookUp::setTable(int, std::vector<unsigned short, std::allocator<unsigned short> > const&) /home/lebedevri/rawspeed/build-Clang-SANITIZE/../src/librawspeed/common/TableLookUp.cpp:62:20
    #1 0x2924e2 in rawspeed::RawImageData::setTable(std::vector<unsigned short, std::allocator<unsigned short> > const&, bool) /home/lebedevri/rawspeed/build-Clang-SANITIZE/../src/librawspeed/common/RawImage.cpp:618:6
    #2 0x2a83cc in rawspeed::RawImageCurveGuard::RawImageCurveGuard(rawspeed::RawImage*, std::vector<unsigned short, std::allocator<unsigned short> > const&, bool) /home/lebedevri/rawspeed/build-Clang-SANITIZE/../src/librawspeed/common/RawImage.h:310:14
    #3 0x2a83cc in rawspeed::ArwDecoder::decodeRawInternal() /home/lebedevri/rawspeed/build-Clang-SANITIZE/../src/librawspeed/decoders/ArwDecoder.cpp:211

LebedevRI/rawspeed,darktable-org/rawspeed,LebedevRI/rawspeed,darktable-org/rawspeed,darktable-org/rawspeed,darktable-org/rawspeed,LebedevRI/rawspeed,LebedevRI/rawspeed,LebedevRI/rawspeed,darktable-org/rawspeed