You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using JPEG mode with low resolution settings such as QQVGA, the allocated frame buffer size frequently becomes insufficient, causing capture failures. This issue arises due to the hardcoded buffer size calculation in cam_hal.h.
The hardcoded limit for this setting is 3840 bytes, but this limit is frequently exceeded when capturing complex objects, even with a relatively low JPEG quality setting.
Suggested Fix:
One potential solution is to add a new member to the camera_config_t structure to allow the frame buffer size to be adjusted during the esp_camera_init call. However, I am not very experienced with this library, so this suggestion might not be the most feasible.
The text was updated successfully, but these errors were encountered:
There is no clear way to calculate the expected maximum size that an image can be. Spec goes as far to say that with high quality, the image can be larger than it's RGB counterpart. I'll think about providing a way to adjust this, or make it slightly larger for smaller resolutions
Is there a way to determine what the maximum buffer size is I can allocate for PSRAM? By means of experimenting I found out that setting CONFIG_CAMERA_JPEG_MODE_FRAME_SIZE to 7000000 works, but 8000000 and higher don't work anymore. Makes sense, I have 8MB PSRAM on board, but I suppose the PSRAM is used for more than solely framebuffer, right?
Description:
When using JPEG mode with low resolution settings such as QQVGA, the allocated frame buffer size frequently becomes insufficient, causing capture failures. This issue arises due to the hardcoded buffer size calculation in cam_hal.h.
esp32-camera/driver/cam_hal.c
Lines 376 to 379 in 30aeeee
I have confirmed this problem with OV2640. The settings at that time were as follows
The hardcoded limit for this setting is 3840 bytes, but this limit is frequently exceeded when capturing complex objects, even with a relatively low JPEG quality setting.
Suggested Fix:
One potential solution is to add a new member to the
camera_config_t
structure to allow the frame buffer size to be adjusted during theesp_camera_init
call. However, I am not very experienced with this library, so this suggestion might not be the most feasible.The text was updated successfully, but these errors were encountered: