FFmpeg
Data Structures | Macros | Functions | Variables
murmur3.c File Reference
#include <stdint.h>
#include "mem.h"
#include "intreadwrite.h"
#include "murmur3.h"

Go to the source code of this file.

Data Structures

struct  AVMurMur3
 

Macros

#define ROT(a, b)   (((a) << (b)) | ((a) >> (64 - (b))))
 

Functions

AVMurMur3av_murmur3_alloc (void)
 Allocate an AVMurMur3 hash context. More...
 
void av_murmur3_init_seeded (AVMurMur3 *c, uint64_t seed)
 Initialize or reinitialize an AVMurMur3 hash context with a seed. More...
 
void av_murmur3_init (AVMurMur3 *c)
 Initialize or reinitialize an AVMurMur3 hash context. More...
 
static uint64_t get_k1 (const uint8_t *src)
 
static uint64_t get_k2 (const uint8_t *src)
 
static uint64_t update_h1 (uint64_t k, uint64_t h1, uint64_t h2)
 
static uint64_t update_h2 (uint64_t k, uint64_t h1, uint64_t h2)
 
void av_murmur3_update (AVMurMur3 *c, const uint8_t *src, int len)
 Update hash context with new data. More...
 
static uint64_t fmix (uint64_t k)
 
void av_murmur3_final (AVMurMur3 *c, uint8_t dst[16])
 Finish hashing and output digest value. More...
 

Variables

static const uint64_t c1 = UINT64_C(0x87c37b91114253d5)
 
static const uint64_t c2 = UINT64_C(0x4cf5ad432745937f)
 

Macro Definition Documentation

◆ ROT

#define ROT (   a,
  b 
)    (((a) << (b)) | ((a) >> (64 - (b))))

Definition at line 52 of file murmur3.c.

Function Documentation

◆ get_k1()

static uint64_t get_k1 ( const uint8_t src)
inlinestatic

Definition at line 54 of file murmur3.c.

Referenced by av_murmur3_final(), and av_murmur3_update().

◆ get_k2()

static uint64_t get_k2 ( const uint8_t src)
inlinestatic

Definition at line 63 of file murmur3.c.

Referenced by av_murmur3_final(), and av_murmur3_update().

◆ update_h1()

static uint64_t update_h1 ( uint64_t  k,
uint64_t  h1,
uint64_t  h2 
)
inlinestatic

Definition at line 72 of file murmur3.c.

Referenced by av_murmur3_update().

◆ update_h2()

static uint64_t update_h2 ( uint64_t  k,
uint64_t  h1,
uint64_t  h2 
)
inlinestatic

Definition at line 82 of file murmur3.c.

Referenced by av_murmur3_update().

◆ fmix()

static uint64_t fmix ( uint64_t  k)
inlinestatic

Definition at line 135 of file murmur3.c.

Referenced by av_murmur3_final().

Variable Documentation

◆ c1

const uint64_t c1 = UINT64_C(0x87c37b91114253d5)
static

◆ c2

const uint64_t c2 = UINT64_C(0x4cf5ad432745937f)
static