[FFmpeg-devel] swscale/input : avoid float calc for GrayFloat to Gray16 conv
Martin Vignali
martin.vignali at gmail.com
Wed Aug 22 13:45:50 EEST 2018
> > ---
> > libswscale/input.c | 10 +++++-----
> > libswscale/swscale_internal.h | 20 ++++++++++++++++++++
> > 2 files changed, 25 insertions(+), 5 deletions(-)
>
> please provide benchmark, what is the impact on speed from this ?
>
>
In my tests, the patch increase speed by around 20%.
Test with this sample (UHD Gray float PSD file) : https://we.tl/t-Ty9hR20gUw
And this command line (test the bswap func : grayf32ToY16_bswap_c)
./ffmpeg -benchmark -loop 1 -t 30 -i TEST_PSD_GRAY_00000.psd -pix_fmt
gray16be -f null -
Without the patch : (using float calc)
frame= 750 fps= 23 q=-0.0 Lsize=N/A time=00:00:30.00 bitrate=N/A
speed=0.909x
bench: utime=26.577s stime=10.061s rtime=33.063s
bench: maxrss=697888768kB
With the patch : (not use float calc)
frame= 750 fps= 27 q=-0.0 Lsize=N/A time=00:00:30.00 bitrate=N/A
speed=1.07x
bench: utime=21.512s stime=10.136s rtime=27.992s
bench: maxrss=697942016kB
Martin
More information about the ffmpeg-devel
mailing list