[FFmpeg-devel] [PATCH 2/5] fate: avoid framemd5, use framecrc its faster

Nicolas George nicolas.george at normalesup.org
Thu May 16 20:35:32 CEST 2013


Le decadi 20 floréal, an CCXXI, Michael Niedermayer a écrit :
> hmm, i get:
> ffmpeg -f rawvideo md5:  user    0m2.212s    sys 0m0.428s
> ffmpeg -f md5 -          user    0m2.192s    sys 0m0.408s
> ffmpeg -f crc -          user    0m0.356s    sys 0m0.408s
> ffmpeg -f null -         user    0m0.008s    sys 0m0.084s
> aviocat md5:             user    0m2.004s    sys 0m0.108s
> gnu md5sum               user    0m1.272s    sys 0m0.116s
> ffadler                  user    0m0.164s    sys 0m0.060s
> 
> Note, my ffmpeg tests did read the random file as if it was
> rawvideo (which it was not) no real demuxing thus done
> test done with a random 900mb file on sandybridge i7 4ghz

It is hard to reproduce your runs, and the framework overhead may make
comparison less relevant.

I have written a small benchmark for various hash functions, I can send the
program itself if wanted, and the results are below (the time is in cycles
per byte).

You will notice that OpenSSL is always faster than lavu; the difference is
negligible for SHA-2 on x86_32, but elsewhere it is significant, and it is
even huge for MD5 on Atom, for some reason.

(The input size does not seem to change the results much.)

Regards,

-- 
  Nicolas George


Core i7 Sandy Bridge, x86_64:

lavu    MD5      size:  1048576  runs:     1024  time:    8.222 +- 0.158
openssl MD5      size:  1048576  runs:     1024  time:    5.067 +- 0.048
lavu    SHA-1    size:  1048576  runs:     1024  time:    7.049 +- 0.295
openssl SHA-1    size:  1048576  runs:     1024  time:    4.717 +- 0.355
lavu    SHA-224  size:  1048576  runs:     1024  time:   15.016 +- 0.479
openssl SHA-224  size:  1048576  runs:     1024  time:   13.219 +- 0.523
lavu    SHA-256  size:  1048576  runs:     1024  time:   15.026 +- 0.496
openssl SHA-256  size:  1048576  runs:     1024  time:   13.209 +- 0.629

Atom Pineview, x86_64:

lavu    MD5      size:  1048576  runs:     1024  time:   17.205 +- 0.038
openssl MD5      size:  1048576  runs:     1024  time:    5.689 +- 0.022
lavu    SHA-1    size:  1048576  runs:     1024  time:   16.397 +- 0.037
openssl SHA-1    size:  1048576  runs:     1024  time:    9.609 +- 0.031
lavu    SHA-224  size:  1048576  runs:     1024  time:   36.932 +- 0.050
openssl SHA-224  size:  1048576  runs:     1024  time:   24.407 +- 0.052
lavu    SHA-256  size:  1048576  runs:     1024  time:   36.931 +- 0.048
openssl SHA-256  size:  1048576  runs:     1024  time:   24.402 +- 0.037

Athlon II X2 250, x86_32:

lavu    MD5      size:  1048576  runs:       64  time:    9.109 +- 0.060
openssl MD5      size:  1048576  runs:       64  time:    5.354 +- 0.020
lavu    SHA-1    size:  1048576  runs:       64  time:   11.299 +- 0.013
openssl SHA-1    size:  1048576  runs:       64  time:    7.049 +- 0.018
lavu    SHA-224  size:  1048576  runs:       64  time:   20.347 +- 0.027
openssl SHA-224  size:  1048576  runs:       64  time:   19.698 +- 0.014
lavu    SHA-256  size:  1048576  runs:       64  time:   20.346 +- 0.029
openssl SHA-256  size:  1048576  runs:       64  time:   19.699 +- 0.017
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130516/021c6199/attachment.asc>


More information about the ffmpeg-devel mailing list