#7663 closed defect (fixed)

ffmpeg-qsv: it will overflow when set maxrate more than 65535 Kbps

Reported by: wangzj0601 Owned by:
Priority: minor Component: avcodec
Version: unspecified Keywords: qsv
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:
How to reproduce:

% ffmpeg -init_hw_device qsv=qsv:hw -hwaccel qsv -filter_hw_device qsv -v verbose -f rawvideo -pix_fmt yuv420p -s:v 3840x2160 -r:v 25 -i /media_stream/assets/yuv/4k_2013_3840x2160_I420.yuv -vf 'format=nv12,hwupload=extra_hw_frames=64' -an -c:v h264_qsv -profile:v high -g 12 -bf 0 -slices 1 -b:v 70000k -maxrate 140000k -vframes 75 -refs 1 -preset 4 -y ./test.h264

System Environment
Platform: KBL
Arch: x86_64
Kernel: 4.18.0+
libva commit 566a1388b4e5961fb73d0fd03058d50c5965a7f4
media_driver commit 8968471978818839fed845ce918843a9ef3210c9
mediasdk commit 750cfb4776023fb5a9b2481c1bf1956ab5568651
ffmpeg: commit 1a6cca19898c5e65d0e3cb9b9b293146b8268dcc

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (7)

comment:1 Changed 18 months ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords qsv added
  • Priority changed from normal to minor
  • Status changed from new to open

While this is not the right bug tracker, I fear we have to clip the value.

Please understand that a valid ticket on this bug tracker needs a command line including the complete, uncut console output, not necessarily an analysis.

comment:3 Changed 18 months ago by uartie

MSDK provides mfxInfoMFX::BRCParamMultiplier for this reason. So it should be used to enable higher bitrates. We have the same issue in gst-msdk plugin, too, where a fix has already been proposed. FFmpeg-qsv will need similar fix.


Last edited 18 months ago by uartie (previous) (diff)

comment:4 Changed 18 months ago by cehoyos

They are joking, right?

comment:6 Changed 18 months ago by lizhong1008

https://patchwork.ffmpeg.org/patch/11707/ has been sent to fix this issue.

comment:7 Changed 18 months ago by lizhong1008

  • Resolution set to fixed
  • Status changed from open to closed

Fixing patch has been merged as 87c165c2379a69a6261c439299cabbe4b77c4b3c.
Please be free to let know if still any issue.

Note: See TracTickets for help on using tickets.