• Zhong Li's avatar
    lavc/qsvenc: enable hevc gpb option · 1125277b
    Zhong Li authored
    GPB is the default type, just contains forward references but the
    slice_type is B slice with higher encoding efficiency than regular P
    slice, but lower performance.
    
    Add an option to allow user to set regular P slice.
    
    Fix ticket#6870
    
    Test data on Intel Kabylake (i7-7567U CPU @ 3.50GHz):
    1. ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal.mp4 -vsync passthrough
    -vframes 1000  -c:v hevc_qsv -gpb 0 -bf 0 -q 25 test_gpb_off_bf0_kbl.mp4
    
    transcoding fps: 85
    encoded file size of test_gpb_off_bf0_kbl.mp4: 21960100 (bytes)
    
    2. ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal.mp4 -vsync passthrough
    -vframes 1000  -c:v hevc_qsv -gpb 1 -bf 0 -q 25 test_gpb_on_bf0_kbl.mp4
    
    transcoding fps: 79
    encoded file size oftest_gpb_on_bf0_kbl.mp4:  21211449 (bytes)
    
    In this case, enable gpb can bring about 7% performance drop but 3.4% encoding efficiency improvment.
    Signed-off-by: 's avatarZhong Li <zhong.li@intel.com>
    1125277b
qsvenc.h 8.07 KB