39 memset(c, 0,
sizeof(*c));
49 static const uint64_t
c1 = UINT64_C(0x87c37b91114253d5);
50 static const uint64_t
c2 = UINT64_C(0x4cf5ad432745937f);
52 #define ROT(a, b) (((a) << (b)) | ((a) >> (64 - (b))))
72 static uint64_t
inline update_h1(uint64_t k, uint64_t h1, uint64_t h2)
82 static uint64_t
inline update_h2(uint64_t k, uint64_t h1, uint64_t h2)
95 uint64_t h1 = c->
h1, h2 = c->
h2;
102 if (--len <= 0)
return;
111 end = src + (len & ~15);
126 memcpy(c->
state, src, len);
131 static inline uint64_t
fmix(uint64_t k)
134 k *= UINT64_C(0xff51afd7ed558ccd);
136 k *= UINT64_C(0xc4ceb9fe1a85ec53);
143 uint64_t h1 = c->
h1, h2 = c->
h2;
memory handling functions
AVMurMur3 * av_murmur3_alloc(void)
static av_cold int end(AVCodecContext *avctx)
void av_murmur3_init(AVMurMur3 *c)
static uint64_t update_h2(uint64_t k, uint64_t h1, uint64_t h2)
void av_murmur3_final(AVMurMur3 *c, uint8_t dst[16])
static uint64_t get_k2(const uint8_t *src)
void av_murmur3_update(AVMurMur3 *c, const uint8_t *src, int len)
static uint64_t get_k1(const uint8_t *src)
static uint64_t fmix(uint64_t k)
void av_murmur3_init_seeded(AVMurMur3 *c, uint64_t seed)
static uint64_t update_h1(uint64_t k, uint64_t h1, uint64_t h2)
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...