[Ffmpeg-devel] [PATCH] flacenc - lpc and options

Justin Ruggles jruggle
Sat Jul 1 15:26:47 CEST 2006

Michael Niedermayer wrote:
> Hi
> On Fri, Jun 30, 2006 at 11:45:48PM -0400, Justin Ruggles wrote:
>>Michael Niedermayer wrote:
>>>a cleaned up md5.c is attached, iam not claiming it to be faster, probably
>>>its not but that is a gcc issue, if gcc would unroll the main loop it would
>>>be quite fast as everything could be optimized away
>>In my standalone encoder, I was using a modified version of a pretty
>>good public domain MD5 implementation.  I have added a couple more
>>changes based on your code.  This is not a proposal for final inclusion,
>>just another source for ideas.  It seems to run about 5X faster than
>>what you posted, but like you said, that could just be a gcc issue.
> hmm, ive added my code with some more changes into svn, the source
> is almost half the size of your code and with CONFIG_SMALL it gets
> compiled to ~2kb where your code is always >3kb, without CONFIG_SMALL
> its still smaller then your code (all that only with 
> gcc-4.1 -fomit-frame-pointer though, previous gcc had lots of troubble
> with my code for some reason)
> i didnt benchmark it but as the final code should be near identical it 
> shouldnt be slower
> furthermore i keep the struct in the c file and only export the size
> so a user app wont by misstake mess with the internals and become
> dependant on our implementation
> also note we cant just *alloc() the struct in the init function as
> libavutil should not depend on *malloc()
> [...]

Great.  It probably was just gcc then. I am using 3.4.4.  When I compile
with CONFIG_SMALL, that's when it runs much slower.  Without
CONFIG_SMALL it is much closer to the speed of other implementations.


More information about the ffmpeg-devel mailing list