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

ov2640 idea of optimization of reverse_u32pixel function #138

Open
dimitre opened this issue Jun 6, 2024 · 0 comments
Open

ov2640 idea of optimization of reverse_u32pixel function #138

dimitre opened this issue Jun 6, 2024 · 0 comments

Comments

@dimitre
Copy link
Contributor

dimitre commented Jun 6, 2024

Flipping the first bit of IMAGE_MODE register it can give you the image in the right channel position.

 { IMAGE_MODE, IMAGE_MODE_RGB565 | 0b00000001 }, // or changing the IMAGE_MODE_RGB565 register itself

so the image doesn't need reverse_u32pixel. in fact it still needs a simplified version just to invert the odd and even column pixels, like

 *(addr) = ((data & 0x0000FFFF) << 16) | ((data & 0xFFFF0000) >> 16);

of even removing reverse_u32pixel if there are other configurations of image format in DVP

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