mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Fix FB_PIXELS() macro.
* If bpp > 2 (means JPEG image) return pixels + bpp (bpp stores image size in JPEG mode) * If bpp <= 2 (means GS or RGB image) return pixels + w * h * bpp.
This commit is contained in:
parent
d2ac2c63a8
commit
d658608061
@ -25,5 +25,5 @@ static struct framebuffer {
|
||||
|
||||
// Use this macro to get a pointer to the free SRAM area located after the framebuffer.
|
||||
// If JPEG is enabled, this macro returns pixels + the JPEG image size (usually stored in bpp).
|
||||
#define FB_PIXELS() ((fb->bpp > 2)? (fb->pixels+fb->bpp) : (fb->pixels+fb->w*fb->h+FB_JPEG_OFFS_SIZE))
|
||||
#define FB_PIXELS() ((fb->bpp > 2)? (fb->pixels+fb->bpp) : (fb->pixels+fb->w*fb->h*fb->bpp+FB_JPEG_OFFS_SIZE))
|
||||
#endif /* __FRAMEBUFFER_H__ */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user