20-30% perf drop in FFmpeg (H264) transcode performance with VAAPI
|Reported by:||eero-t||Owned by:|
|Blocking:||Reproduced by developer:||yes|
|Analyzed by developer:||no|
Summary of the bug:
VAAPI H264 transcode performance dropped 20-30% between following commits:
- d92f06eb6663dce8cb8942a1314f736a07f255e0 2019-01-22 19-59-10 avformat/img2enc: mention -frames:v in error message
- 3224d6691cdc59ef0d31cdb35efac27494ff515b 2019-01-24 16-38-34 avfilter/afade+acrossfade: allow skipping fade on inputs
There's no drop with QSV backend. Between the indicated commit range, there's a series of changes to FFmpeg VAAPI support (and couple of other changes).
- Ubuntu 18.04
- drm-tip kernel v4.20
- FFmpeg and iHD driver built from git
- HW supported by iHD driver
How to reproduce:
$ ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.264 -c:v h264_vaapi -y output.h264
I see the drop on all platforms supported by iHD driver i.e. Broadwell and newer. With i965 driver (which supports also older platforms), the drop is visible on Braswell too, but I don't see it on Sandybridge or Haswell.
This drop may be there also for other codecs, but I've tested only H264.
GPU is running at full speed before and after the change, but it and CPU use less power, i.e. they're underutilized compared to earlier situation. If one runs many instances of FFmpeg at same time so that HW is definitely fully utilized, that still retains same perf => FFmpeg VAAPI usage seems to become more synchronous.
Change History (17)
comment:3 by , 5 years ago
|Component:||undetermined → avcodec|
|Priority:||normal → important|
|Status:||new → open|