[FFmpeg-devel] [PATCH] avutil/md5: inline function, 2% speedup

Giorgio Vazzana mywing81 at gmail.com
Mon May 20 21:47:39 CEST 2013


2013/5/20 Giorgio Vazzana <mywing81 at gmail.com>:
> 2013/5/20 Michael Niedermayer <michaelni at gmx.at>:
>> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
>> ---
>>  libavutil/md5.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavutil/md5.c b/libavutil/md5.c
>> index e3c4981..2df37cc 100644
>> --- a/libavutil/md5.c
>> +++ b/libavutil/md5.c
>> @@ -92,7 +92,7 @@ static const uint32_t T[64] = { // T[i]= fabs(sin(i+1)<<32)
>>          a = b + (a << t | a >> (32 - t));                               \
>>      } while (0)
>>
>> -static void body(uint32_t ABCD[4], uint32_t X[16])
>> +static av_always_inline void body(uint32_t ABCD[4], uint32_t X[16])
>>  {
>>      int i av_unused;
>>      uint32_t t;
>> --
>
> On my pc I get:

For reference, I am using the attached code for the benchmarks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avutil_md5_test2.c
Type: text/x-csrc
Size: 1718 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130520/15cb1806/attachment.bin>


More information about the ffmpeg-devel mailing list