Ticket #23 (closed defect: fixed)
Broken h264 with vaapi and vdpau
| Reported by: | ivanich | Owned by: | michael |
|---|---|---|---|
| Priority: | normal | Component: | FFmpeg |
| Version: | git | Keywords: | |
| Cc: | gbeauchesne@… | Blocked By: | |
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | yes |
Description
Enabling Gpu acceleration in vlc cause hd video corruption. It happens with latest ffmpeg from git compiled with vaapi support, older versions ffmpeg(revision 25767) and current libav from git works just fine.
I'm using vdpau-video-0.7.3 and libva-0.32.0_p2.
Attachments
Change History
Changed 2 years ago by ivanich
-
attachment
vlc_vaapi.jpeg
added
comment:1 Changed 2 years ago by gb
- Status changed from new to open
Hi, reproduced with mplayer + FFmpeg checkout as of today. I will look into it.
comment:2 Changed 2 years ago by gb
A quick look reveals that reference fields in h->short_ref[] are different from those that would be generated by the other/older FFmpeg version.
comment:3 follow-up: ↓ 4 Changed 2 years ago by gb
Does this fails on Windows too? i.e. with DXVA2 enabled?
comment:4 in reply to: ↑ 3 Changed 2 years ago by ivanich
Replying to gb:
Does this fails on Windows too? i.e. with DXVA2 enabled?
Unfortunately, I can not check, I do not have Windows.
comment:5 Changed 2 years ago by gb
The bug might be introduced by MT branch merge, since a checkout of 4c886d613df8b217c6d62cb2c94e88f848177b23 (just prior the merge) makes it work. i.e. pic->reference flags are correctly generated.
comment:6 Changed 2 years ago by gb
The new code generates extra DELAYED_PIC_REF, thus making code like if (pic->reference != PICT_FRAME) to check for something that is not a frame (i.e. top or bottom field) to fail. I have a patch at the VA-API level as I am not able to check why h264.c changes operate that way now.
i.e. even in non-VAAPI case, h264 code that uses the FIELD_PICTURE macro may not get what it expected in the older code.
Changed 2 years ago by gb
-
attachment
0001-vaapi-filter-out-DELAYED_PIC_REF-flag-to-determine.patch
added
Filter out DELAYED_PIC_REF flag
comment:8 in reply to: ↑ 7 Changed 2 years ago by ivanich
Replying to gb:
Please try the attached patch.
Patch did the trick, now everything works as before. Thanks.
comment:9 follow-up: ↓ 10 Changed 2 years ago by michael
The patch looks quite harmless, if that fixes it, i have no objections
comment:10 in reply to: ↑ 9 Changed 2 years ago by ivanich
Replying to michael:
The patch looks quite harmless, if that fixes it, i have no objections
It would be nice if you could put it in upstream.
comment:11 Changed 2 years ago by gb
OK, I will apply. Thanks.
comment:12 Changed 2 years ago by gb
- Analyzed by developer set
- Cc gbeauchesne@… added
- Status changed from open to closed
- Resolution set to fixed
- Reproduced by developer set



Video corruption