Commit Graph

1 Commits

Author SHA1 Message Date
marfrit 7c06c519e7 iter35 close: MPEG-2 verified libva-correct; HW IDCT precision intrinsic
Investigation requested via /user 'mpeg2 next' after iter33 closed
MPEG-2 at libva==kdirect with libva!=SW gap. iter35 verifies:

1. libva==kdirect holds across:
   - BBB 720p MPEG-2 240F (sha a75015b10fe205ea)
   - Synthetic testsrc 720p MPEG-2 48F (sha 5557dae9fa99d01b)
   Rules out fixture coincidence.

2. v4l2 ctrl structs (SEQUENCE + PICTURE + QUANTISATION) semantically
   correct per V4L2 spec via iter35 env-gated DIAG dump. Intra Q
   matrix in zigzag scan order; flags = PROGRESSIVE+FRAME_PRED_DCT.

3. HW vs SW gap quantified:
   - mean byte-diff = 0.015, max = 3
   - SSIM = 0.999923 (visually identical)
   Within IEEE 1180 / ISO 13818-2 Annex A MPEG-2 IDCT precision
   tolerance. Not fixable at V4L2/libva layer.

ffmpeg's own SW IDCT options (-idct auto/int/simple/...) produce 4
distinct hashes for the same bitstream — libavcodec internally has
the same precision divergence between impls. Hantro HW IDCT is yet
another impl, not matching any SW.

Backend tip 48fd028 (added env-gated LIBVA_MPEG2_DUMP_FRAME).
Memory: feedback_mpeg2_hw_sw_idct_precision.md added.
2026-05-14 17:58:31 +00:00