Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If there are multiple fbs, whether the specified frame can be retrieved from the cache #678

Open
cainiaoyizhou opened this issue Aug 26, 2024 · 1 comment

Comments

@cainiaoyizhou
Copy link

cainiaoyizhou commented Aug 26, 2024

I was using the esp32s3, using the ov2640 to get a JPEG stream and send it to the 4G module through the serial port. Then I set fb_count to 2, xclk_freq_hz to 40 million and running steadily, and pushed the frame time into 40ms(25 FPS). But uart also takes time to send, if a single thread runs then it will be less than 25 frames, multi-threaded running requires that I must first copy the obtained frame to another piece of ram, and then get the next frame and send the last frame. But since fb_cont is 2, that is, there are two frames in the buffer, and esp_camera_fb_get only changes one frame at a time, can I send the previous frame when I get a new frame, so that I can run uninterrupted

我在用esp32s3当中转,用ov2640获取JPEG流在通过串口发到4G模块上。然后我把fb_count设为2,xclk_freq_hz开到了4千万并稳定运行,一帧的时间压进了40ms(也就是25fps)。但是uart发送也需要时间,如果单线程运行那么就达不到25帧,多线程运行就要求我必须把获取到的帧先复制到另一块ram,然后获取下一帧同时把上一帧发出去。但是既然fb_cont是2,也就是缓冲区本来就有两帧,一次esp_camera_fb_get又只改一帧,那我是不是可以趁获取新帧的时候把上一帧发出去,这样就可以不间断运行了

@cainiaoyizhou cainiaoyizhou changed the title How to get the previous frame If there are multiple fb frames, whether the specified frame can be retrieved from the cache Aug 28, 2024
@cainiaoyizhou cainiaoyizhou changed the title If there are multiple fb frames, whether the specified frame can be retrieved from the cache If there are multiple fbs, whether the specified frame can be retrieved from the cache Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@cainiaoyizhou and others