Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please, support 64-bit seed. This is needed for compatibility with ffmpeg #4

Closed
safinaskar opened this issue Jun 19, 2023 · 2 comments

Comments

@safinaskar
Copy link

safinaskar commented Jun 19, 2023

I'm attempting to generate the same murmur3 hash values as ffmpeg generates. But it seems to use particular 64-bit seed ( https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/1617d1a752d5e97d5e74f6c384609c027c884553:/libavutil/murmur3.c#l48 ). So, please, support 64-bit seeds

(The same bug applies to "murmur3" crate ( stusmall/murmur3#21 ))

@kurtbuilds
Copy link
Owner

The tests aren't running, because the tests also run benchmarks, which involve building cpp and c versions which I don't have time ATM to set up. Ideally the benchmarks should move to a different repo so that tests for the Rust code can be run independently.

Anyway, that u32 parameter is immediately cast to u64, so there it appears to be a trivial change to change that to a u64.

I just changed the parameter to a u64 and cut a release as 0.2.0.

If there's additional changes you need, I welcome a PR.

@safinaskar
Copy link
Author

@kurtbuilds , I just tested. And I see your implementation produces the same answers the crate "murmurhash" produces. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants