Skip to content

Commit

Permalink
RawImageDataU16::scaleValues_SSE2(): avoid touching padding
Browse files Browse the repository at this point in the history
Now, this is indeed a breaking change, and now up to 7 last columnts
may end up being unscaled. This is not good, but we also can't really
touch that padding, asan complains. Perhaps there needs to be two types
of padding.
  • Loading branch information
LebedevRI committed Oct 19, 2022
1 parent 0471890 commit 96a39e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librawspeed/common/RawImageDataU16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ void RawImageDataU16::scaleValues_SSE2(int start_y, int end_y) {

assert(sub_mul != nullptr);

uint32_t gw = pitch / 16;
// 10 bit fraction
uint32_t mul = static_cast<int>(
1024.0F * 65535.0F /
Expand Down Expand Up @@ -280,7 +279,8 @@ void RawImageDataU16::scaleValues_SSE2(int start_y, int end_y) {
ssescale = _mm_load_si128(reinterpret_cast<__m128i*>(&sub_mul[12]));
}

for (uint32_t x = 0; x < gw; x++) {
for (int x = 0; x < static_cast<int>(roundDown(uncropped_dim.x, 8));
x += 8) {
__m128i pix_high;
__m128i temp;
_mm_prefetch(reinterpret_cast<char*>(pixel + 1), _MM_HINT_T0);
Expand Down

0 comments on commit 96a39e3

Please sign in to comment.