Skip to content

DVR reencode: stop silently corrupting recordings, fail fast instead#141

Draft
henkwiedig wants to merge 5 commits into
OpenIPC:masterfrom
henkwiedig:dvr-issues
Draft

DVR reencode: stop silently corrupting recordings, fail fast instead#141
henkwiedig wants to merge 5 commits into
OpenIPC:masterfrom
henkwiedig:dvr-issues

Conversation

@henkwiedig

Copy link
Copy Markdown
Collaborator

DVR reencode: stop silently corrupting recordings, fail fast instead

Investigated a video artifact reported in field footage — DVR reencode frames occasionally skipped colour-correction and showed a green bar at the bottom, while the recording looked completely normal (still "recording", no errors). Root cause: the colour-correct/OSD-blend GL+RGA pipeline had a fallback chain that could publish a corrupted or partially-written frame instead of catching the problem.

Two changes:

Removed the fallback cascade. Any GL/RGA conversion failure now stops the reencode session immediately (raw recording, if also enabled, keeps going untouched) and shows an OSD popup so the user knows recording stopped instead of unknowingly getting a broken file.

Padding guard. Even a successful RGA call could leave the last few rows of the frame buffer unwritten (the bit beyond 1080p's real height, up to the 16-pixel-aligned buffer size) — and this hardware can't reliably let the CPU verify what RGA actually wrote, so detecting it after the fact isn't possible. Instead, we now always extend the last real row into that padding via one more RGA op — guaranteed correct by construction, not by inspection.

This is not a actual fix, at least not for the second bug. We try to guard it and hope it helps.
Will amend this with logging in the sbc-groundstation so the user can generate more useful information.

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

Successfully merging this pull request may close these issues.

1 participant