[FFmpeg-devel] [PATCH 1/2] lavc/speedhqdec: Add AV_CODEC_CAP_SLICE_THREADS

Tomas Härdin git at haerdin.se
Mon May 13 18:42:54 EEST 2024


On a 36 core Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz
command: /usr/bin/time ./ffmpeg -t 30 -thread_type slice -threads
$THREADS -i $INPUT.mov -vcodec rawvideo -f null -

before:
frame= 1500 fps=160 q=-0.0 Lsize=N/A time=00:00:30.00 bitrate=N/A
speed= 3.2x    
10.54user 0.37system 0:09.40elapsed 116%CPU (0avgtext+0avgdata
175300maxresident)k

-thread_type slice -threads 1
frame= 1500 fps=161 q=-0.0 Lsize=N/A time=00:00:30.00 bitrate=N/A
speed=3.22x    
10.57user 0.29system 0:09.34elapsed 116%CPU (0avgtext+0avgdata
175580maxresident)k

-thread_type slice -threads 2
frame= 1500 fps=318 q=-0.0 Lsize=N/A time=00:00:30.00 bitrate=N/A
speed=6.36x    
10.53user 0.39system 0:04.73elapsed 230%CPU (0avgtext+0avgdata
175632maxresident)k

-thread_type slice -threads 4
frame= 1500 fps=615 q=-0.0 Lsize=N/A time=00:00:30.00 bitrate=N/A
speed=12.3x    
10.58user 0.34system 0:02.46elapsed 444%CPU (0avgtext+0avgdata
175452maxresident)k

-thread_type slice -threads 8
frame= 1500 fps=613 q=-0.0 Lsize=N/A time=00:00:30.00 bitrate=N/A
speed=12.3x    
10.60user 0.33system 0:02.46elapsed 443%CPU (0avgtext+0avgdata
180532maxresident)k
^ same as -threads 4 as we'd expect for progressive essence

I don't have any interlaced samples at the moment, and speedhqenc can't
make any. I also noticed speedhqenc produces broken output when width %
16 == 8. Will file a ticket on that tomorrow.

/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavc-speedhqdec-Add-AV_CODEC_CAP_SLICE_THREADS.patch
Type: text/x-patch
Size: 6394 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240513/d6febd5d/attachment.bin>


More information about the ffmpeg-devel mailing list