mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Add a function to return the frame buffer size.
* This returns the frame buffer size without the fb header size.
This commit is contained in:
parent
e18f83cfe1
commit
1d93c54983
@ -16,6 +16,7 @@
|
||||
#define CONSERVATIVE_JPEG_BUF_SIZE (OMV_JPEG_BUF_SIZE-64)
|
||||
|
||||
extern char _fb_base;
|
||||
extern char _fballoc;
|
||||
framebuffer_t *framebuffer = (framebuffer_t *) &_fb_base;
|
||||
|
||||
extern char _jpeg_buf;
|
||||
@ -222,6 +223,11 @@ uint32_t framebuffer_get_frame_size()
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t framebuffer_get_buffer_size()
|
||||
{
|
||||
return &_fballoc - (char *) framebuffer->pixels;
|
||||
}
|
||||
|
||||
uint8_t *framebuffer_get_buffer()
|
||||
{
|
||||
return framebuffer->pixels;
|
||||
|
||||
@ -64,6 +64,9 @@ int32_t framebuffer_get_depth();
|
||||
// otherwise return 0 if the framebuffer is unintialized or invalid (e.g. first frame).
|
||||
uint32_t framebuffer_get_frame_size();
|
||||
|
||||
// Return the max frame size that fits the framebuffer (i.e OMV_RAW_BUF_SIZE - sizeof(framebuffer_t))
|
||||
uint32_t framebuffer_get_buffer_size();
|
||||
|
||||
// Return the current buffer address.
|
||||
uint8_t *framebuffer_get_buffer();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user