intel / intel/media-driver

[Bug]: HDR Decode Issues - Kodi/FFMpeg and Arc A380

Open
#1,758 4 comments 0 reactions 1 assignee Assigned to @Jexu View on GitHub
Decode
Dominant language
C
Stars
1.2k
Forks
383
Avg merge
8d 18h
Merged PRs (30d)
4

Description

### Which component impacted?

Decode

### Is it regression? Good in old configuration?

None

### What happened?

In Linux, using Kodi, who uses VAAPI and ffmpeg for hardware video decoding, I attempt to play an HDR youtube video - any of them will do. This issue looks possibly similar to #629.

Interestingly, if I use yt-dlp or youtube-dl to download the HDR webm, it then plays properly. I have attempted to get help from the kodi devs and their inputstream.adaptive people, however they have not been able to assist me in determining this issue. See:

https://github.com/xbmc/xbmc/issues/23957
https://github.com/xbmc/inputstream.adaptive/issues/1410

Additionally, if I turn off VAAPI acceleration, thus using CPU/Software decoding, the video plays back properly.

The end result is:

```
2024-01-02 17:18:46.713 T:930 debug : ffmpeg[0x55a833b0f730]: [SWR] Using fltp internally between filters
2024-01-02 17:18:46.714 T:1030 debug : ffmpeg[0x55a83538fa50]: [vp9] Decode context initialised: 0x44/0x10000000.
2024-01-02 17:18:46.714 T:1030 debug : ffmpeg[0x55a83538fa50]: [vp9] Param buffer (type 0, 92 bytes) is 0.
2024-01-02 17:18:46.714 T:1030 debug : ffmpeg[0x55a83538fa50]: [vp9] Slice 0 param buffer (316 bytes) is 0x1.
2024-01-02 17:18:46.716 T:1030 debug : ffmpeg[0x55a83538fa50]: [vp9] Slice 0 data buffer (39504 bytes) is 0x2.
2024-01-02 17:18:46.716 T:1030 debug : ffmpeg[0x55a83538fa50]: [vp9] Decode to surface 0.
2024-01-02 17:18:46.716 T:1030 error : ffmpeg[0x55a83538fa50]: [vp9] Failed to end picture decode issue: 18 (invalid parameter).
2024-01-02 17:18:46.716 T:1030 debug : CVideoPlayerVideo::CalcDropRequirement - hurry: 0
2024-01-02 17:18:46.716 T:1030 error : ffmpeg[0x55a83538fa50]: [vp9] Not all references are available
2024-01-02 17:18:46.716 T:1030 info : Skipped 1 duplicate messages..
2024-01-02 17:18:46.716 T:1030 error : GetPicture - avcodec_receive_frame returned failure
2024-01-02 17:18:46.716 T:1030 debug : CVideoPlayerVideo - video decoder returned error
2024-01-02 17:18:46.716 T:1030 debug : CVideoPlayerVideo::CalcDropRequirement - hurry: 0
2024-01-02 17:18:46.716 T:1030 error : ffmpeg[0x55a83538fa50]: [vp9] Not all references are available
2024-01-02 17:18:46.716 T:1030 debug : CVideoPlayerVideo::CalcDropRequirement - hurry: 0
2024-01-02 17:18:46.716 T:1030 error : ffmpeg[0x55a83538fa50]: [vp9] Not all references are available
2024-01-02 17:18:46.716 T:1030 debug : CVideoPlayerVideo::CalcDropRequirement - hurry: 0
2024-01-02 17:18:46.716 T:1030 error : ffmpeg[0x55a83538fa50]: [vp9] Not all references are available
2024-01-02 17:18:46.716 T:1030 debug : CVideoPlayerVideo::CalcDropRequirement - hurry: 0
2024-01-02 17:18:46.716 T:1030 error : ffmpeg[0x55a83538fa50]: [vp9] Not all references are available
2024-01-02 17:18:46.716 T:1030 debug : CVideoPlayerVideo::CalcDropRequirement - hurry: 0
```

### What's the usage scenario when you are seeing the problem?

Playback

### What impacted?

_No response_

### Debug Information

I am using the -git head of libva, gmmlib, and media-driver.

The card is a sparkle A380 - ls /dev/dri renders
`by-path card0 renderD128`

`03:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Arc A380] [8086:56a5] (rev 05)`

### Do you want to contribute a patch to fix the issue?

None

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.