[FFmpeg-devel] [PATCH v4 2/2] avcodec/v210dec: add the frame and slice threading support

Limin Wang lance.lmwang at gmail.com
Mon Oct 14 04:10:32 EEST 2019


On Sun, Oct 13, 2019 at 02:10:02PM +0100, Kieran Kunhya wrote:
> >
> > Michael, I have updated the patch to limit thread_count to [1,1,
> > avctx->height/4],
> > why height/4, it's borrowed from dxv.c, please give comments whether it's
> > proper.
> >
> 
> For the lack of big speed improvement, make sure you are giving each thread
> a slice in order.

Kieran, thanks for your hints, he describe performance data has been tested on my old Mac Pro, 
so you will find that the improvement is not that great. However, if you use a x86 server
with more cores and fewer cpu MHz cpus, you will get even more improvements.

Below is my testing results in one server for reference(Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz):

./ffmpeg  -y -i /root/UHD_Soccer_4K at 50_8Bit_45.7M_HEVC_AAC.ts -c:v v210 -f rawvideo -frames 50 /root/1.v210

./ffmpeg -threads 1 -s 3840x2160  -stream_loop 20 -i /root/1.v210 -benchmark -f null -
frame= 1050 fps= 80 q=-0.0 Lsize=N/A time=00:00:42.00 bitrate=N/A speed=3.19x

./ffmpeg -threads 2 -thread_type frame+slice  -s 3840x2160  -stream_loop 20 -i /root/1.v210 -benchmark -f null -
frame= 1050 fps=111 q=-0.0 Lsize=N/A time=00:00:42.00 bitrate=N/A speed=4.45x

./ffmpeg -threads 4 -thread_type frame+slice  -s 3840x2160  -stream_loop 20 -i /root/1.v210 -benchmark -f null -
frame= 1050 fps=145 q=-0.0 Lsize=N/A time=00:00:42.00 bitrate=N/A speed=5.81x



Thanks,
Limin


> 
> Kieran


More information about the ffmpeg-devel mailing list