Skip to content

Commit a928b8e

Browse files
committed
PanasonicV8Decompressor: decoded value may be negative
FIXME: is clamp the correct handling here?
1 parent 88feeaf commit a928b8e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/librawspeed/decompressors/PanasonicV8Decompressor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ void PanasonicV8Decompressor::decompressStrip(const Array2DRef<uint16_t> out,
426426
for (int i = 0; i != 2; ++i) {
427427
const int32_t diff = decoder.decodeNextDiffValue();
428428
const int32_t decodedValue = pred(i, j) + diff;
429-
invariant(decodedValue > 0);
430429
pred(i, j) = uint16_t(std::clamp(
431430
decodedValue, 0, int32_t(std::numeric_limits<uint16_t>::max())));
432431
outBlock(i, j) = pred(i, j);

0 commit comments

Comments
 (0)