[FFmpeg-devel] [PATCH] PPC64: Add versions of functions in libswscale/input.c optimized for POWER8 VSX SIMD.

Dan Parrot dan.parrot at mail.com
Tue Jul 5 07:08:15 EEST 2016


> > > > Can you confirm with START_TIMER / STOP_TIMER that there is no 
> > > > gain?
> > >
> > > SystemTap probes provide identical functionality by measuring 
> > > deltas between function entry and function return.
> > 
> > Sorry, I don't understand:
> > Did you test with both methods to verify that they provide 
> > the same results?
> > 
> > Note that if it turns out that START_TIMER / STOP_TIMER 
> > cannot be used on ppc64 (le) this would be important 
> > information for us.
> > 
> I'll insert these macros and inform of the results if the code compiles
> and runs.

These results for START_TIMER/STOP_TIMER are with ffmpeg compiled using
GCC 6.1.1

======================
Existing non-SIMD version:

./ffmpeg -report -cpuflags 0 -benchmark -f rawvideo -pix_fmt rgb24 -s
hd1080 -i /dev/zero -pix_fmt yuv420p -f null -vframes 1000 -

  33770 UNITS in rgb24ToY_c,       1 runs,      0 skips
  33430 UNITS in rgb24ToY_c,       2 runs,      0 skips
  33292 UNITS in rgb24ToY_c,       4 runs,      0 skips
  33128 UNITS in rgb24ToY_c,       8 runs,      0 skips
  32848 UNITS in rgb24ToY_c,      16 runs,      0 skips
  32347 UNITS in rgb24ToY_c,      32 runs,      0 skips
  31831 UNITS in rgb24ToY_c,      64 runs,      0 skips
  31594 UNITS in rgb24ToY_c,     128 runs,      0 skips
  31513 UNITS in rgb24ToY_c,     256 runs,      0 skips
  31628 UNITS in rgb24ToY_c,     512 runs,      0 skips
  31466 UNITS in rgb24ToY_c,    1024 runs,      0 skips
  31390 UNITS in rgb24ToY_c,    2048 runs,      0 skips
  31411 UNITS in rgb24ToY_c,    4096 runs,      0 skips
  31411 UNITS in rgb24ToY_c,    8192 runs,      0 skipstrate=N/A
speed=0.522x    
  31399 UNITS in rgb24ToY_c,   16384 runs,      0 skipstrate=N/A
speed=0.486x    
  31416 UNITS in rgb24ToY_c,   32763 runs,      5 skipstrate=N/A
speed=0.467x    
  31413 UNITS in rgb24ToY_c,   65530 runs,      6 skipstrate=N/A
speed=0.458x    
  31421 UNITS in rgb24ToY_c,  131064 runs,      8 skipstrate=N/A
speed=0.454x    
  31430 UNITS in rgb24ToY_c,  262131 runs,     13 skipstrate=N/A
speed=0.449x    
  31422 UNITS in rgb24ToY_c,  524264 runs,     24 skipstrate=N/A
speed=0.449x    
  31424 UNITS in rgb24ToY_c, 1048532 runs,     44 skipstrate=N/A
speed=0.45x     
frame= 1000 fps= 11 q=-0.0 Lsize=N/A time=00:00:40.00 bitrate=N/A
speed=0.449x    
video:477kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
bench: utime=88.212s
bench: maxrss=21120kB
----------------------------------------------------------
./ffmpeg -report -benchmark -f rawvideo -pix_fmt rgb24 -s hd1080
-i /dev/zero -pix_fmt yuv420p -f null -vframes 1000 -

  35440 UNITS in rgb24ToY_c,       1 runs,      0 skips
  34290 UNITS in rgb24ToY_c,       2 runs,      0 skips
  33670 UNITS in rgb24ToY_c,       4 runs,      0 skips
  33387 UNITS in rgb24ToY_c,       8 runs,      0 skips
  32786 UNITS in rgb24ToY_c,      16 runs,      0 skips
  32317 UNITS in rgb24ToY_c,      32 runs,      0 skips
  32008 UNITS in rgb24ToY_c,      64 runs,      0 skips
  31944 UNITS in rgb24ToY_c,     128 runs,      0 skips
  32049 UNITS in rgb24ToY_c,     256 runs,      0 skips
  31913 UNITS in rgb24ToY_c,     512 runs,      0 skips
  31822 UNITS in rgb24ToY_c,    1024 runs,      0 skips
  31805 UNITS in rgb24ToY_c,    2048 runs,      0 skips
  31841 UNITS in rgb24ToY_c,    4096 runs,      0 skips
  31825 UNITS in rgb24ToY_c,    8192 runs,      0 skips
  31803 UNITS in rgb24ToY_c,   16383 runs,      1 skipstrate=N/A
speed=0.649x    
  31822 UNITS in rgb24ToY_c,   32766 runs,      2 skipstrate=N/A
speed=0.602x    
  31816 UNITS in rgb24ToY_c,   65532 runs,      4 skipstrate=N/A
speed=0.59x     
  31811 UNITS in rgb24ToY_c,  131064 runs,      8 skipstrate=N/A
speed=0.584x    
  31810 UNITS in rgb24ToY_c,  262133 runs,     11 skipstrate=N/A
speed=0.583x    
  31811 UNITS in rgb24ToY_c,  524266 runs,     22 skipstrate=N/A
speed=0.583x    
  31822 UNITS in rgb24ToY_c, 1048527 runs,     49 skipstrate=N/A
speed=0.582x    
frame= 1000 fps= 15 q=-0.0 Lsize=N/A time=00:00:40.00 bitrate=N/A
speed=0.581x    
video:477kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
bench: utime=68.211s
bench: maxrss=21120kB

============================================
SIMD version in patch submitted earlier in this message thread:

./ffmpeg -report -cpuflags 0 -benchmark -f rawvideo -pix_fmt rgb24 -s
hd1080 -i /dev/zero -pix_fmt yuv420p -f null -vframes 1000 - && ./ffmpeg
-report -benchmark -f rawvideo -pix_fmt rgb24 -s hd1080 -i /dev/zero
-pix_fmt yuv420p -f null -vframes 1000

  23950 UNITS in rgb24ToY_c_vsx,       1 runs,      0 skips
  23175 UNITS in rgb24ToY_c_vsx,       2 runs,      0 skips
  22752 UNITS in rgb24ToY_c_vsx,       4 runs,      0 skips
  22401 UNITS in rgb24ToY_c_vsx,       8 runs,      0 skips
  22106 UNITS in rgb24ToY_c_vsx,      16 runs,      0 skips
  21585 UNITS in rgb24ToY_c_vsx,      32 runs,      0 skips
  21126 UNITS in rgb24ToY_c_vsx,      64 runs,      0 skips
  21046 UNITS in rgb24ToY_c_vsx,     128 runs,      0 skips
  20816 UNITS in rgb24ToY_c_vsx,     256 runs,      0 skips
  20817 UNITS in rgb24ToY_c_vsx,     512 runs,      0 skips
  20767 UNITS in rgb24ToY_c_vsx,    1024 runs,      0 skips
  20794 UNITS in rgb24ToY_c_vsx,    2048 runs,      0 skips
  20703 UNITS in rgb24ToY_c_vsx,    4096 runs,      0 skips
  20681 UNITS in rgb24ToY_c_vsx,    8192 runs,      0 skipse=N/A
speed=0.555x    
  20638 UNITS in rgb24ToY_c_vsx,   16384 runs,      0 skipse=N/A
speed=0.516x    
  20646 UNITS in rgb24ToY_c_vsx,   32768 runs,      0 skipse=N/A
speed=0.498x    
  20634 UNITS in rgb24ToY_c_vsx,   65536 runs,      0 skipse=N/A
speed=0.486x    
  20635 UNITS in rgb24ToY_c_vsx,  131070 runs,      2 skipse=N/A
speed=0.483x    
  20646 UNITS in rgb24ToY_c_vsx,  262139 runs,      5 skipse=N/A
speed=0.481x    
  20651 UNITS in rgb24ToY_c_vsx,  524272 runs,     16 skipse=N/A
speed=0.48x     
  20649 UNITS in rgb24ToY_c_vsx, 1048533 runs,     43 skipse=N/A
speed=0.479x    
frame= 1000 fps= 12 q=-0.0 Lsize=N/A time=00:00:40.00 bitrate=N/A
speed=0.478x    
video:477kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
bench: utime=82.969s
bench: maxrss=21248kB

-------------------------------------------------------------------------------

./ffmpeg -report -benchmark -f rawvideo -pix_fmt rgb24 -s hd1080
-i /dev/zero -pix_fmt yuv420p -f null -vframes 1000

  23040 UNITS in rgb24ToY_c_vsx,       1 runs,      0 skips
  24140 UNITS in rgb24ToY_c_vsx,       2 runs,      0 skips
  24097 UNITS in rgb24ToY_c_vsx,       4 runs,      0 skips
  23578 UNITS in rgb24ToY_c_vsx,       8 runs,      0 skips
  22892 UNITS in rgb24ToY_c_vsx,      16 runs,      0 skips
  22109 UNITS in rgb24ToY_c_vsx,      32 runs,      0 skips
  21422 UNITS in rgb24ToY_c_vsx,      64 runs,      0 skips
  21086 UNITS in rgb24ToY_c_vsx,     128 runs,      0 skips
  20834 UNITS in rgb24ToY_c_vsx,     256 runs,      0 skips
  20695 UNITS in rgb24ToY_c_vsx,     512 runs,      0 skips
  20652 UNITS in rgb24ToY_c_vsx,    1024 runs,      0 skips
  20641 UNITS in rgb24ToY_c_vsx,    2048 runs,      0 skips
  20626 UNITS in rgb24ToY_c_vsx,    4096 runs,      0 skips
  20648 UNITS in rgb24ToY_c_vsx,    8192 runs,      0 skips
  20617 UNITS in rgb24ToY_c_vsx,   16384 runs,      0 skipse=N/A
speed=0.701x    
  20599 UNITS in rgb24ToY_c_vsx,   32768 runs,      0 skipse=N/A
speed=0.655x    
  20601 UNITS in rgb24ToY_c_vsx,   65536 runs,      0 skipse=N/A
speed=0.642x    
  20593 UNITS in rgb24ToY_c_vsx,  131072 runs,      0 skipse=N/A
speed=0.635x    
  20590 UNITS in rgb24ToY_c_vsx,  262140 runs,      4 skipse=N/A
speed=0.634x    
  20592 UNITS in rgb24ToY_c_vsx,  524277 runs,     11 skipse=N/A
speed=0.632x    
  20598 UNITS in rgb24ToY_c_vsx, 1048538 runs,     38 skipse=N/A
speed=0.632x    
frame= 1000 fps= 16 q=-0.0 Lsize=N/A time=00:00:40.00 bitrate=N/A
speed=0.631x    
video:477kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
bench: utime=62.787s
bench: maxrss=21184kB




More information about the ffmpeg-devel mailing list