[Bug]: AV1e EncTools + lookahead>8 + async_depth>1 causes "Invalid FrameType:0"
- Dominant language
- C++
- Stars
- 157
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
### Which component impacted?
Encode
### Is it regression? Good in old configuration?
No, this issue exist a long time
### What happened?
1. Linux 6.15 + FFmpeg 7.1.1
2. libva 2.22.0 + gmmlib 22.7.2 + media-driver 25.2.3 + vpl-gpu-rt 25.2.3
3. Run
```console
ffmpeg -extra_hw_frames 40 -init_hw_device vaapi=va:/dev/dri/renderD129 -init_hw_device qsv=qs@va -filter_hw_device qs \
-hwaccel vaapi -hwaccel_output_format vaapi -i -an -sn -dn -vf hwmap=derive_device=qsv,format=qsv -c:v av1_qsv \
-preset veryslow -low_power 1 -b:v 6M -rc_init_occupancy 12M -bufsize 24M -bf 7 -g 240 -extbrc 1 -look_ahead_depth 40 \
-b_strategy 1 -adaptive_i 1 -adaptive_b 1 -strict -1 -async_depth 4 -y -v verbose
```
4. See error in about 5 seconds
```console
[av1_qsv @ 0x55eaaf135a80] Invalid FrameType:0.
[vost#0:0/av1_qsv @ 0x55eaaf137b00] Error submitting video frame to the encoder
```
The error will occur only if both of these conditions are met: **lookahead > 8 + async_depth > 1**
### What's the usage scenario when you are seeing the problem?
Transcode for media delivery
### What impacted?
Using AV1e EncTools with lookhead enabled to improve video quality.
https://github.com/intel/media-delivery/blob/master/doc/quality.rst#av1
### Debug Information
1. libva 2.22.0 + gmmlib 22.7.2 + media-driver 25.2.3 + vpl-gpu-rt 25.2.3
2. Yes. `03:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Arc A380] [8086:56a5] (rev 05)`
3. [vainfo.log.txt](https://github.com/user-attachments/files/20772505/vainfo.log.txt)
4. [libva_trace.log.zip](https://github.com/user-attachments/files/20772542/libva_trace.log.zip)
5. No GPU hang in dmesg.
### Do you want to contribute a patch to fix the issue?
None
Contributor guide
Assessment
This issue has not been assessed yet.