diff options
author | John Stebbins <[email protected]> | 2019-01-22 08:48:09 -0800 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-01-22 08:51:49 -0800 |
commit | 557a3311639315422e71145038d617e4d9e49dcd (patch) | |
tree | d3b7efd3171a55a412db26e427ef451884f7af10 | |
parent | c6639d32c6ca893a2893063428f57858ecd86dd7 (diff) |
encavcodec: enable "row-mt=1" for vp9
Improves encoding speed by about 20% for SD content and 35% for HD
content in my testing on a 4 core 8 thread system. CPU utilization is
around 60% as compared with 40% prior to the change.
Fixes https://github.com/HandBrake/HandBrake/issues/1830
-rw-r--r-- | libhb/encavcodec.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index 8d8ad8b06..1ca9dbda5 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -1023,14 +1023,27 @@ static int apply_vpx_preset(AVDictionary ** av_opts, const char * preset) return 0; } +// VP8 and VP9 have some options in common and some different +static int apply_vp8_preset(AVDictionary ** av_opts, const char * preset) +{ + return apply_vpx_preset(av_opts, preset); +} + +static int apply_vp9_preset(AVDictionary ** av_opts, const char * preset) +{ + av_dict_set(av_opts, "row-mt", "1", 0); + return apply_vpx_preset(av_opts, preset); +} + static int apply_encoder_preset(int vcodec, AVDictionary ** av_opts, const char * preset) { switch (vcodec) { case HB_VCODEC_FFMPEG_VP8: + return apply_vp8_preset(av_opts, preset); case HB_VCODEC_FFMPEG_VP9: - return apply_vpx_preset(av_opts, preset); + return apply_vp9_preset(av_opts, preset); case HB_VCODEC_FFMPEG_NVENC_H264: case HB_VCODEC_FFMPEG_NVENC_H265: av_dict_set( av_opts, "preset", preset, 0); |