intel / intel/media-driver

[Bug]: VA_RC_ICQ not available in VP9 encoder on DG2

Open
#1,742 8 comments 0 reactions 3 assignees Claimed by @leyu-yao View on GitHub
Encode P2 VP9
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?

No, this issue exist a long time

### What happened?

1. Linux, FFmpeg self built with `--enable-libvpl` (version `N-112750-g6d60cc7baf`)
2. libva 2.19, intel-media-va-driver-non-free 23.3.2
3. Run `sudo ffmpeg -v verbose -hwaccel qsv -hwaccel_output_format qsv -an -c:v h264_qsv -i ~/videos/V2023CW0079.mp4 -c:v vp9_qsv -global_quality 45 ~/output/V2023CW0079_icq.webm`
4. Error:
```
[vp9_qsv @ 0x56191eae4bc0] Using the intelligent constant quality (ICQ) ratecontrol method
[vp9_qsv @ 0x56191eae4bc0] Error initializing the encoder: device failed (-17)
[vost#0:0/vp9_qsv @ 0x56191eb2d340] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
```

I'm aware of https://github.com/intel/media-driver/issues/1597 and the corresponding patches but it only focused on AV1.

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

Transcode for media delivery

### What impacteded

We need to encode video to VP9 and want to use GPU encode to speed up the transcoding. But since file size/ bandwith is important we want the maximum quality for low file sizes. The ICQ Rate control mode should give us the best results but doesn't work.

We also can't use AV1 because the hardware decode support for AV1 is still not very broad.

### Debug Information

`vainfo -a` lists VA_RC_ICQ as available but it doesn't work with ffmpeg via vpl

```
VAProfileVP9Profile3/VAEntrypointEncSliceLP
VAConfigAttribRTFormat : VA_RT_FORMAT_YUV420
VA_RT_FORMAT_YUV444
VA_RT_FORMAT_YUV420_10
VA_RT_FORMAT_YUV444_10
VA_RT_FORMAT_RGB32
VA_RT_FORMAT_RGB32_10
VA_RT_FORMAT_RGB32_10BPP
VA_RT_FORMAT_YUV420_10BPP
VAConfigAttribRateControl : VA_RC_CBR
VA_RC_VBR
VA_RC_CQP
VA_RC_ICQ
```

This is on an intel Arc A380 (DG2)

### 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.