Hi > On Sep 25, 2024, at 6:00 PM, donbernhardo via ffmpeg-devel > <[email protected]> wrote: > > VC-1 in container formats (ASF/WMV/Matroska/MPEG-TS) is often stored as > fragmented packets, where the demuxer splits each frame into ~3 separate > packets. The software decoder handles this internally, but the VA-API > hwaccel path was passing each fragment as a separate picture to the > driver, resulting in incomplete frames being submitted to the hardware > decoder. > > This causes silent decode failures where vaEndPicture() reports success > but the output is a frozen/garbage frame. NVIDIA's CUVID decoder handles > this through its parser API (cuvidParseVideoData), but VA-API has no > equivalent parser layer. > > This patch adds frame reassembly logic to vaapi_vc1.c: > - Buffers incoming slice data until a complete frame is detected > - Detects frame boundaries using VC-1 frame start codes from vc1_common.h > - Only submits to VA-API when a complete frame has been assembled > - Maintains compatibility with non-fragmented streams > > Testing on nvidia-vaapi-driver with fragmented VC-1 samples shows this > fixes the frozen-frame issue and produces correct decode output matching > the software decoder: > - Before: 5799 frames -> 1 unique frame (frozen) > - After: 5799 frames -> bit-exact match with software decoder > > This fix benefits all VA-API drivers (Intel, AMD, NVIDIA). > > Signed-off-by: donbernhardo <[email protected]>
The VC-1 parser should be used instead ? — Baptiste Coudurier _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
