PSRAM-less framebuffer strategy
Posted: Mon Aug 26, 2024 5:11 pm
Hi everyone,
I am very happy that I was able to grab on of the engineering-sample-ESP32-P4-Function-EV-Boards. And I am quite impressed by the power of the new uC.
I was able to get snes9x (a SNES emulator) running with ESP-IDF. While I got ~22 fps on an S3 (without frame dropping), I get around 55 fps on the P4.
Now, since the P4 came with a nice, hi-res MIPI display (with no internal FB), I wanted to stretch the image a little (pixel doubling). And this is where my problem lies:
From the emulator I get a pixel buffer (internal RAM). And writing that buffer strechted to the (PSRAM) framebuffer is super slow. Frame rate drops to about 50%. Now, I think it is not the best strategy to have a framebuffer in PSRAM when showing dynamic content that's changing every frame at 60 fps.
Now my question: How and where would I start if I wanted to use a line buffer (IRAM) that the CPU generates on the fly just ahead of the "beam" (maybe evoked by some kind of hsync interrupt). Would that be a feasable strategy? (Is this how the factory camera app example gets this super fast full screen refresh rates?)
Thanks in advance for any input!
I am very happy that I was able to grab on of the engineering-sample-ESP32-P4-Function-EV-Boards. And I am quite impressed by the power of the new uC.
I was able to get snes9x (a SNES emulator) running with ESP-IDF. While I got ~22 fps on an S3 (without frame dropping), I get around 55 fps on the P4.
Now, since the P4 came with a nice, hi-res MIPI display (with no internal FB), I wanted to stretch the image a little (pixel doubling). And this is where my problem lies:
From the emulator I get a pixel buffer (internal RAM). And writing that buffer strechted to the (PSRAM) framebuffer is super slow. Frame rate drops to about 50%. Now, I think it is not the best strategy to have a framebuffer in PSRAM when showing dynamic content that's changing every frame at 60 fps.
Now my question: How and where would I start if I wanted to use a line buffer (IRAM) that the CPU generates on the fly just ahead of the "beam" (maybe evoked by some kind of hsync interrupt). Would that be a feasable strategy? (Is this how the factory camera app example gets this super fast full screen refresh rates?)
Thanks in advance for any input!