[FFmpeg-devel] [PATCH v1] avcodec/v410dec: add the frame and slice threading support

Limin Wang lance.lmwang at gmail.com
Sat Oct 26 05:07:52 EEST 2019


On Fri, Oct 25, 2019 at 06:39:46PM +0200, Carl Eugen Hoyos wrote:
> Am Fr., 25. Okt. 2019 um 17:37 Uhr schrieb <lance.lmwang at gmail.com>:
> 
> > -    .capabilities = AV_CODEC_CAP_DR1,
> > +    .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS |
> > +                    AV_CODEC_CAP_FRAME_THREADS

It's related to cpu and memory very much, I recall on one of my linux
system, slice thread is faster. It's using the same process with v210dec,
although the patch is pending for review yet.

Below is testing result on my old mac pro system with 8G memory:
./ffmpeg -y -i ~/Movies/4k_Rec709_ProResHQ.mov -c:v v410 -an -frames:v 10 ~/Movies/1.avi

./ffmpeg -y -stream_loop 100 -i ~/Movies/1.avi  -benchmark -f null -
frame= 1010 fps= 27 q=-0.0 Lsize=N/A time=00:00:42.08 bitrate=N/A speed=1.11x

./ffmpeg -y -threads 4 -thread_type slice -stream_loop 100 -i ~/Movies/1.avi  -benchmark -f null -
frame= 1010 fps= 32 q=-0.0 Lsize=N/A time=00:00:42.08 bitrate=N/A speed=1.34x

./ffmpeg -y -threads 4 -thread_type frame -stream_loop 100 -i ~/Movies/1.avi  -benchmark -f null -
frame= 1010 fps= 38 q=-0.0 Lsize=N/A time=00:00:42.08 bitrate=N/A speed=1.58x

./ffmpeg -y -threads 4 -thread_type frame+slice -stream_loop 100 -i ~/Movies/1.avi  -benchmark -f null -
frame= 1010 fps= 38 q=-0.0 Lsize=N/A time=00:00:42.08 bitrate=N/A speed=1.59x


> 
> In your tests: Was slice threading or frame threading more effective?
> 
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list