Skip to content

Convert P010/P016 hardware-decoder frames to 8-bit before analysis - #7

Merged
eric merged 2 commits into
fancybitsfrom
fix-p010-hw-decode
Aug 30, 2026
Merged

eric merged 2 commits into
fancybitsfrom
fix-p010-hw-decode

Conversation

@eric

@eric eric commented Aug 30, 2026

Copy link
Copy Markdown
Member

Supersedes #4 (commit kept, credit to @v8eta) with review fixes on top: conversion keyed on luma depth rather than a format list, the replaced AVFrame freed, allocation failures skipped, and SubmitFrame refusing non-8-bit frames.

Verified on a 10-bit HEVC recording: cut list and CSV identical to the current fancybits build, peak RSS 8 MB lower.

touki and others added 2 commits August 30, 2026 11:23
Hardware decoders emit P010LE (not YUV420P10LE) for 10-bit HEVC, so the
8-bit conversion from erikkaashoek#143 was skipped and frames were processed as a
double-width 8-bit buffer, corrupting brightness, uniformity and logo
metrics on Main10 sources.
Decide the 8-bit conversion by the pixel format's luma depth instead of
listing formats, so 12-bit and 4:4:4 hardware outputs are covered too.
Free the decoder frame it replaces, which leaked one AVFrame per converted
frame, and skip the frame when allocation fails. SubmitFrame refuses a
frame that is still not 8-bit instead of reading it as a wider buffer.
@eric
eric merged commit 7ab211e into fancybits Aug 30, 2026
10 checks passed
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