grabbit 10fe6f95dd perf(vida): Phase 2-3 optimizations and FFmpeg hardware decode fallback
Performance optimizations:
- Frame accumulator: iterator-based loops, hot/cold path separation
- Morphology: dirty rect tracking for Zhang-Suen thinning
- Meteor detector: precomputed thresholds, sqrt elimination in centroid
- Async frame prefetch with producer-consumer pattern
- 2MB BufReader buffer to reduce syscalls

FFmpeg improvements:
- Hardware decoding with auto-fallback (VideoToolbox/VAAPI)
- 3-second timeout probe to detect unsupported codecs
- Automatic CPU fallback when hardware decode fails

Detection visualization:
- Draw fireball trajectories in red on maxpixel
- Draw meteor trajectories in green
- Save detection overlay as _detections.png

Test results (1024 frames @ 1080p):
- Detection processing: ~420ms/block (was ~987ms)
- AV1 video: auto-fallback to CPU decode
- H.264 video: uses hardware acceleration when available

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 20:23:18 +08:00
..
lot
2025-11-03 00:11:13 +08:00
lot
2025-11-03 00:11:13 +08:00