FFmpeg Lands H.265 Vulkan Encode Performance Optimizations

The FFmpeg multimedia library can now enjoy faster H.265/HEVC video encoding with the Vulkan-powered encode path. With the optimizations merged today, the H.265 encode performance should be roughly at parity to the H.264 encode speed.

An optimization patch was merged to FFmpeg Git today for speeding up hevc_vulkan in following some of the same tuning as h264_vulkan. The commit message explains as well as providing some performance numbers:
"Without ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS and with min CU forced to 8x8, hevc_vulkan keeps a much heavier encode config at common quality levels than h264_vulkan (16x16 macroblocks, no min-CU SPS field). Set the session flag and use min CU 16x16 when CTB >= 32; also fix max_transform_hierarchy_depth_inter assignment.

When applying GetEncoded SPS feedback, sync overridden fields together (extent/conf_win, min/diff CU and TB sizes, transform hierarchy). Copying only log2_diff left CtbLog2SizeY=7 and undecodable HEVC after some implementations rewrote min CU.

Reporter cmd (1080p testsrc2, quality 1, 1000 frames):
before: hevc ~200–317 fps vs higher h264
after: hevc 289/325/358 fps, h264 288/317/359 fps (parity)"

Nice seeing the HEVC Vulkan encode performance not only faster than before but performing at parity to the H.264 encode speed.


Those interested can find the patch merged via this commit .