Maixduino icon indicating copy to clipboard operation
Maixduino copied to clipboard

ov2640 idea of optimization of reverse_u32pixel function

Open dimitre opened this issue 1 year ago • 0 comments

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

dimitre avatar Jun 06 '24 01:06 dimitre