[FFmpeg-trac] #7706(avcodec:open): 20-30% perf drop in FFmpeg (H264) transcode performance with VAAPI
FFmpeg
trac at avcodec.org
Thu Nov 7 18:37:49 EET 2019
#7706: 20-30% perf drop in FFmpeg (H264) transcode performance with VAAPI
-------------------------------------+-------------------------------------
Reporter: eero-t | Owner:
Type: defect | Status: open
Priority: important | Component: avcodec
Version: git-master | Resolution:
Keywords: vaapi | Blocked By:
regression |
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by fulinjie):
Currently, vaapi encodes a pic if all its referenced pics are ready,
and then outputs it immediately by calling
vaapi_encode_output(vaSyncSurfac).
When working on output procedure, hardware is be able to cope with
encoding
tasks in the meantime to have better performance.
So there is a more efficient way to encode the pics whose refs are all
ready
during one receive_packets() function and output the pkt when encoder is
encoding
new pic waiting for its references.
It's what vaapi originally did before the regression, and the performance
could be
improved for ~20%.
CMD:
ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128
-hwaccel_output_format vaapi -i bbb_sunflower_1080p_30fps_normal.mp4
-c:v h264_vaapi -f h264 -y /dev/null
Source:
https://download.blender.org/demo/movies/BBB/
Before:
~164 fps
After:
~198 fps
However, it didn't totally meet the performance benchmark before the
regression in my experiment.
Hi Eero,
Would you please help to verify this patch:
https://patchwork.ffmpeg.org/patch/16156/
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7706#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list