Skip to content

Commit

Permalink
OlympusDecompressor: operate on mRaw->dim directly
Browse files Browse the repository at this point in the history
  • Loading branch information
LebedevRI committed Feb 29, 2024
1 parent d4a8d09 commit fa778a1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/librawspeed/decompressors/OlympusDecompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,10 @@ OlympusDecompressor::OlympusDecompressor(RawImage img) : mRaw(std::move(img)) {
mRaw->getBpp() != sizeof(uint16_t))
ThrowRDE("Unexpected component count / data type");

Check warning on line 220 in src/librawspeed/decompressors/OlympusDecompressor.cpp

View check run for this annotation

Codecov / codecov/patch

src/librawspeed/decompressors/OlympusDecompressor.cpp#L220

Added line #L220 was not covered by tests

const uint32_t w = mRaw->dim.x;
const uint32_t h = mRaw->dim.y;

if (w == 0 || h == 0 || w % 2 != 0 || h % 2 != 0 || w > 10400 || h > 7792)
ThrowRDE("Unexpected image dimensions found: (%u; %u)", w, h);
if (!mRaw->dim.hasPositiveArea() || mRaw->dim.x % 2 != 0 ||
mRaw->dim.y % 2 != 0 || mRaw->dim.x > 10400 || mRaw->dim.y > 7792)
ThrowRDE("Unexpected image dimensions found: (%u; %u)", mRaw->dim.x,

Check warning on line 224 in src/librawspeed/decompressors/OlympusDecompressor.cpp

View check run for this annotation

Codecov / codecov/patch

src/librawspeed/decompressors/OlympusDecompressor.cpp#L224

Added line #L224 was not covered by tests
mRaw->dim.y);
}

void OlympusDecompressor::decompress(ByteStream input) const {
Expand Down

0 comments on commit fa778a1

Please sign in to comment.