Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RawImageDataU16::calculateBlackAreas() only looks at a single pixel o_O #389

Open
LebedevRI opened this issue Oct 21, 2022 · 0 comments
Open

Comments

@LebedevRI
Copy link
Member

const auto* pixel =
reinterpret_cast<uint16_t*>(getDataUncropped(mOffset.x, y));
auto* localhist = &histogram[(y & 1) * (65536UL * 2UL)];
for (int x = mOffset.x; x < dim.x+mOffset.x; x++) {
const auto hBin = ((x & 1) << 16) + *pixel;
localhist[hBin]++;
}

const auto* pixel =
reinterpret_cast<uint16_t*>(getDataUncropped(area.offset, y));
auto* localhist = &histogram[(y & 1) * (65536UL * 2UL)];
for (uint32_t x = area.offset; x < area.size + area.offset; x++) {
const auto hBin = ((x & 1) << 16) + *pixel;
localhist[hBin]++;
}

^ nowhere in these loop do we advance the pixel pointer...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant