[FFmpeg-devel] libavutil: optimize twofish cipher

supraja reddy supraja0493 at gmail.com
Tue Feb 17 20:56:09 CET 2015


Hello,

I have made changes as suggested. Please let me know if any further changes
required.
I will soon send a patch for adding a fate test too.

Thanks,
Supraja

On Mon, Feb 16, 2015 at 5:10 PM, Michael Niedermayer <michaelni at gmx.at>
wrote:

> On Mon, Feb 16, 2015 at 03:11:08PM +0530, supraja reddy wrote:
> > Hello,
> >
> > I have attached a patch with optimization for twofish. Please let me know
> > if any further changes required.
> >
> > Following are the results for crypto_bench after optimization.
> >
>
> > lavu       TWOFISH      size: 1048576  runs:   1024  time:   18.799 +-
> 0.132
> > gcrypt     TWOFISH      size: 1048576  runs:   1024  time:   25.643 +-
> 0.096
> > tomcrypt   TWOFISH      size: 1048576  runs:   1024  time:   18.372 +-
> 0.082
>
> please put these into the commit message, also add a
> "before" value for lavu       TWOFISH so it can be seen by how much
> this commit makes the code faster
>
> [...]
> > +static uint32_t MDS[4][256];
>
> doesnt thiis depend on the key(size) ?
> static variables must not change because code could be called from
> different threads at the same time and the static array would be shared
> so it could only be correct for one of the 2 threads, the other would
> produce a wrong result
>
> also it seems theres no fate test for twofish yet, such test should
> be usefull for testing / detecting regressions as its automatically
> run on many different platforms
>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> No great genius has ever existed without some touch of madness. --
> Aristotle
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tfopt1.patch
Type: text/x-patch
Size: 5051 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150218/936fd971/attachment.bin>


More information about the ffmpeg-devel mailing list