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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue May 14 19:20:12 CEST 2013



On 14.05.2013, at 18:13, James Almer <jamrial at gmail.com> wrote:

> 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?

For CRC we should probably provide all common variants in the long term.
In the mean time, I am all for you changing them to whatever you think is most convenient/common.


More information about the ffmpeg-devel mailing list