diff --git a/src/h264.c b/src/h264.c index 6202001..284a2a5 100644 --- a/src/h264.c +++ b/src/h264.c @@ -220,8 +220,18 @@ static inline int32_t h264_strip_ffmpeg_poc_sentinel(int32_t poc, uint32_t flags { if (flags & VA_PICTURE_H264_INVALID) return 0; - if (poc & (1 << 16)) - return poc - (1 << 16); + /* + * iter8 α-2: pass POC values through unchanged for rkvdec. The + * sentinel-subtract was added for hantro's tbl->poc[] prepare_table + * which fed the value through unmasked. rkvdec writes POC to MMIO + * via writel_relaxed (rkvdec-h264.c:975-978) and the macro + * RKVDEC_CUR_POC is a 32-bit passthrough. kdirect (ffmpeg-v4l2request) + * delivers the sentinel-encoded value directly and decodes + * correctly; libva's strip was the cause of the 16x32 partial-fill + * Bug 4 symptom. Hantro+H.264 isn't exercised on RK3399 (hantro-dec + * doesn't advertise H.264 there) — restoring the strip per-driver + * is iter9 work if it ever surfaces. + */ return poc; }