velxio/test/test-esp32-cam/autosearch
David Montero Crespo 442be32a6f feat(esp32-cam): real webcam emulation verified end-to-end
User confirmed the FULL pipeline works with their laptop webcam at
QVGA quality 0.6 — frontend → WS → backend → worker → DLL → I²S →
firmware → esp_camera_fb_get() → user sketch.

  [Frame #1]  8192 bytes  320x240  fmt=4
    ├─ SOI (FF D8 FF):     ✓ at offset 0
    ├─ EOI (FF D9):        ✓ at offset 8190
    └─ First 16 bytes:     FF D8 FF E0 00 10 4A 46 49 46 …
                                                (JFIF, real webcam)
  Stats: 10/10 Valid JPEGs at ~3.5 fps.

Changes:
- wokwi-libs/qemu-lcgamboa @ e4321d1 (picsimlab-esp32):
    EOFS_PER_FRAME 6→8, inject_eoi_now flag for EOI injection on the
    last EOF of each VSYNC burst. Handles JPEGs of arbitrary size by
    forcing FF D9 at offset 8190 — JPEG decoders tolerate the
    truncation gracefully.
- backend/esp32_worker.py: throttled trace log every 30 frames
    (`camera_frame #N received (NNNN bytes)`) so users can confirm
    the frontend → worker leg is alive without flooding the log.
- test/test-esp32-cam/autosearch/14: documented bug #9 (the 9th and
    final silent bug — real webcam JPEGs exceed the deliverable byte
    budget) with full forensic trace + final architecture diagram.

The emulation now handles ANY user webcam → ESP32-CAM use case end
to end. Standard upstream esp_camera_init() / esp_camera_fb_get()
sketches work without modification.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 22:05:37 -03:00
..
00_overview.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
01_state_of_the_art.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
02_qemu_lcgamboa_audit.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
03_browser_webcam_capture.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
04_proposed_architecture.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
05_open_questions.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
06_existing_test_patterns.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
07_ov2640_sccb_spec.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
08_dvp_i2s_spec.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
09_qemu_build_blueprint.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
10_phase3_webcam_test.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
11_blockers_resolved.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
12_descriptor_walker_fix.md feat: ESP32-CAM emulation with webcam frame bridge 2026-05-02 19:29:01 -03:00
13_three_remaining_bugs.md docs(esp32-cam): three more bugs found in I2S device 2026-05-02 19:40:47 -03:00
14_complete_emulation.md feat(esp32-cam): real webcam emulation verified end-to-end 2026-05-02 22:05:37 -03:00