[FFmpeg-devel] [PATCH] Rename ffadler to ffhash and expand it using the generic hash API

James Almer jamrial at gmail.com
Tue May 14 18:13:19 CEST 2013


On 14/05/13 6:08 AM, Michael Niedermayer wrote:
> On Tue, May 14, 2013 at 05:41:05AM -0300, James Almer wrote:
>> On 14/05/13 3:54 AM, James Almer wrote:
>>> Signed-off-by: James Almer <jamrial at gmail.com>
>>> ---
>>>  libavutil/Makefile            |  2 +-
>>>  tools/{ffadler.c => ffhash.c} | 63 +++++++++++++++++++++++++++++++++++--------
>>>  2 files changed, 53 insertions(+), 12 deletions(-)
>>>  rename tools/{ffadler.c => ffhash.c} (55%)
>>
>> I should mention a few things.
>> Adler32 is giving different results now because it's initialized with 0 
>> in hash.c instead of 1 as it used to be in ffadler. Also, AV_WL32() in 
>> av_hash_final() is making it print in reverse.
> 
> adler must be initialized with a non zero value otherwise the hash
> does not work correctly. For example {0} and {0,0} would give the same
> checksum

I suppose the value in hash.c should be changed then.
What about the CRC32 one, though?

Regards.


More information about the ffmpeg-devel mailing list