[AZ-658] frame_ingest H.264/265 decoder (NVDEC + sw fallback)

Wires a real ffmpeg-next 8.1 decoder into the frame_ingest lifecycle
loop. NVDEC is probed at runtime via h264_cuvid / hevc_cuvid; CUDA-less
hosts transparently fall back to software h264 / hevc. Each decoded
frame is stamped with capture_ts (taken at packet receipt) and
decode_ts (taken after decode returns) so movement_detector sees
accurate frame-arrival times. Single-frame decode errors are counted
toward decode_errors_total and dropped; the stream is never aborted.

Adds new public API on FrameIngestHandle: decoder_backend(),
decode_errors_total(), frames_decoded_total(), decode_ms_first_frame(),
decode_ms_p50(), decode_ms_p99(). Integration tests under
crates/frame_ingest/tests/decoder_pipeline.rs cover AC-1, AC-3, AC-4
end-to-end through the real FfmpegDecoder using libx264-encoded
synthetic streams; AC-2 positive (NVDEC selection) is opt-in via
--ignored on a CUDA host. AZ-657 lifecycle tests retained via a
StubDecoder.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-20 17:05:27 +03:00
parent c1558ac5c3
commit 251ebed1c2
12 changed files with 1566 additions and 65 deletions
+13 -13
View File
@@ -4,27 +4,27 @@
flow: greenfield
step: 7
name: Implement
status: between-batches
status: in_progress
sub_step:
phase: 0
name: batch-16-select
detail: ""
phase: 11
name: commit
detail: "batch 16 — AZ-658 awaiting commit + push approval"
retry_count: 0
cycle: 1
tracker: jira
## Last Completed Batch
batch: 15
commit: ccf929a
ticket: AZ-676 / AZ-677 / AZ-678 / AZ-679
jira_status: In Testing (all 4 confirmed via read-back)
pushed_to: origin/dev
report: _docs/03_implementation/batch_15_cycle1_report.md
batch: 16
commit: pending
ticket: AZ-658
jira_status: In Progress (transition to In Testing pending commit)
pushed_to: pending
report: _docs/03_implementation/batch_16_cycle1_report.md
cumulative_review: _docs/03_implementation/cumulative_review_batches_13-15_cycle1_report.md
## Process Leftovers
- `_docs/_process_leftovers/2026-05-20_autopilot_clippy.md`C5 replay
- `_docs/_process_leftovers/2026-05-20_mission_executor_ac3_flake.md`C6 fix recipe
- `_docs/_process_leftovers/2026-05-20_autopilot_clippy.md`out-of-scope for batch 16
- `_docs/_process_leftovers/2026-05-20_mission_executor_ac3_flake.md`out-of-scope for batch 16
## Cumulative Review Cadence
Last cumulative: batches 1315 (just produced). Next due: end of batch 18.
Last cumulative: batches 1315. Next due: end of batch 18.