NVIDIA NVENC AV1 Encoding Produces Incorrect Quantization for B-Frames

Using RTX 5070 Driver: 572.83

Command:
ffmpeg.exe -i src.264 -c:v av1_nvenc -rc_mode CQP -qp 50 -i_qfactor 1 -b_qfactor 1 -i_qoffset -25 -b_qoffset 5 -bf 2 -o output.ivf

When using -bf 2 with the AV1 encoder in FFmpeg, I expect the B-frames to have a different quantization value than P-frames, but they all appear to be quantized similarly, with the output being:
25 / 55 / 55 / 55 / 55 / 55 / 55 / 55 / … / 50
However, the expected output should be:
25 / 55 / 55 / 50 / 55 / 55 / 50 / 55 / 55 … / 50

Hi @Masa-Tam,

How are you checking the QP values? Could you share the output.ivf file?

I was not able to reproduce the error with the following command line:

ffmpeg -t 10 -r 30 -y -f lavfi -i "testsrc=s=3840x2160:r=1,format=nv12" -c:v av1_nvenc -rc_mode CQP -qp 50 -i_qfactor 1 -b_qfactor 1 -i_qoffset -25 -b_qoffset 5 -bf 2 output.ivf

I got your expected output 25 / 55 / 55 / 50 / 55 / 55 / 50 …