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

indi_rpicam: Wrong byte order in Raw12toBayer16pipeline.cpp? #751

Closed
IanCassTwo opened this issue Mar 10, 2023 · 1 comment
Closed

indi_rpicam: Wrong byte order in Raw12toBayer16pipeline.cpp? #751

IanCassTwo opened this issue Mar 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@IanCassTwo
Copy link
Contributor

Guys,

I'm not sure this is right.

 * [ Bh ] [ Gh ] [ Bl | Gl ] ...
 * [ Gh ] [ Rh ] [ Gl | Rl ] ...

                <read a byte>
                cur_row[x+0] = byte << 8;
                <read a byte>
                cur_row[x+1] = byte << 8;
                <read a byte>
                cur_row[x+0] |= static_cast<uint16_t>((byte & 0x0F) << 4);
                cur_row[x+1] |= static_cast<uint16_t>((byte & 0xF0) << 0);

Are those lower order bytes given to the correct column in cur_row? It looks like they may be the wrong way around?

@IanCassTwo IanCassTwo added the bug Something isn't working label Mar 10, 2023
@IanCassTwo
Copy link
Contributor Author

According to this, the code is right but the comment is wrong https://www.strollswithmydog.com/open-raspberry-pi-high-quality-camera-raw/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant