intel / intel/media-driver

[Bug]: h.264 encoding on Intel Arc drops bitrate when compiled as generic-x86-v4 (AVX512 support)

Open
#1,886 1 comment 0 reactions 2 assignees Claimed by @XinfengZhang View on GitHub
Dominant language
C
Stars
1.2k
Forks
383
Avg merge
8d 18h
Merged PRs (30d)
4

Description

### Which component impacted?

Encode

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

None

### What happened?

Using constant bitrate encoding the bitrate of the video drops from the desired value to fraction after a while.

Example video ([keyframe cut original video/no transcoding](https://files.catbox.moe/lac4mq.mkv)):

https://github.com/user-attachments/assets/d07dad0b-2055-4997-9c74-8f2a9cde3a35

- Reproducible with cachyos-v4 repo, ALHP-v4 repo and local build native arch (Rocket Lake)
- Drop always happens ca. 750 MB into the recording (the higher the bitrate the faster the issue occurs time-wise)
- Reproducible in gpu-screen-recorder and OBS
- Affects QSV and VA-API encoding
- intel-media-driver 24.4.3 (versions from at least the last few months are affected too)

Example OBS configuration:

![Screenshot_20241127_163505](https://github.com/user-attachments/assets/0473b330-aff9-47c4-9dcb-3c0f9879915b)

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

Content Creation, Game Streaming

### What impacted?

_No response_

### Debug Information

libva 2.22.0
libva-utils 2.22.0
intel-gmmlib 22.5.2
intel-media-driver 24.4.3

```
$ ls /dev/dri
total 0
drwxr-xr-x 3 root root 100 26. Nov 21:37 .
drwxr-xr-x 22 root root 5020 27. Nov 15:14 ..
drwxr-xr-x 2 root root 80 26. Nov 21:37 by-path
crw-rw----+ 1 root video 226, 0 27. Nov 14:47 card0
crw-rw-rw- 1 root render 226, 128 27. Nov 08:49 renderD128

$ lspci -nn |grep -Ei 'VGA|DISPLAY'
03:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Arc A750] [8086:56a1] (rev 08)
```

[libva_trace.log.155.zip](https://github.com/user-attachments/files/17937087/libva_trace.log.155.zip)

[vainfo.log](https://github.com/user-attachments/files/17936959/vainfo.log)

[dmesg.log](https://github.com/user-attachments/files/17936961/dmesg.log)

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

No.

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.