-
Notifications
You must be signed in to change notification settings - Fork 184
Description
Checklist
- Checked the issue tracker for similar issues to ensure this is not a duplicate
- Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
- Tested with the latest version to ensure the issue hasn't been fixed
How often does this bug occurs?
always
Expected behavior
I have recompiled the esp32-arduino-lib using both the cli and pyton gui with both of the following in my defconfig.common targeting an ESP32.
CONFIG_CAMERA_JPEG_MODE_FRAME_SIZE_AUTO=n
CONFIG_CAMERA_JPEG_MODE_FRAME_SIZE_CUSTOM=1048576
My board has 4mb of usable psram but only allocates 300Kb for a 1600x1200 jpeg image which obviously isn't going to work.
Actual behavior (suspected bug)
The build is successful and after having copied the modified library into arduinoIDE there is no effect on PSRAM usage :
log_i("Free PSRAM: %d Total PSRAM: %u", ESP.getFreePsram(), ESP.getPsramSize());
Free PSRAM: 3808108 Total PSRAM: 4194304
Bad jpeg, FFD9 not found
Thinking that the config parameter is being ignored I alter the code in managed_components/espressif__esp32-camera/driver/cam_hal.c as below :
if(cam_obj->jpeg_mode)
{
cam_obj->fb_size = 3145728;`
}
After working out that my in source changes would be wiped I write protected the esp32-camera directory and set/exported the IDF_COMPONENT_MANAGER=0 variable so that the change would be pulled into the compilation. I then loaded the library code into arduino and again this had no effect on the jpeg memory allocation.
How can I increase the JPEG_MODE_FRAME_SIZE ?
Error logs or terminal output
Steps to reproduce the behavior
set sdk config variables
CONFIG_CAMERA_JPEG_MODE_FRAME_SIZE_AUTO=n
CONFIG_CAMERA_JPEG_MODE_FRAME_SIZE_CUSTOM=1048576
compile and test any Arduino code that calls the camera_init_function()
PSRAM usage will only increase by 300kb per fb_count.
Project release version
latest
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
Arch linux - 6.16.8.arch3-1
Shell
Bash
Additional context
No response