diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-11 19:10:10 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-11 19:13:03 +0100 |
commit | 96d616052b3d39678e477fa10610ca688f46fff9 (patch) | |
tree | 8bd31d06318bc786ea8f1d84f92090c9c860bc11 /libavutil/murmur3.c | |
parent | 27506aceda8115f82f89691a4441d62a8cf24a6e (diff) | |
parent | d12b5b2f135aade4099f4b26b0fe678656158c13 (diff) | |
download | ffmpeg-96d616052b3d39678e477fa10610ca688f46fff9.tar.gz |
Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'
* commit 'd12b5b2f135aade4099f4b26b0fe678656158c13':
build: Split test programs off into separate files
Some conversions done by: James Almer <jamrial@gmail.com>
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavutil/murmur3.c')
-rw-r--r-- | libavutil/murmur3.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/libavutil/murmur3.c b/libavutil/murmur3.c index c4d8dcb529..4271e01453 100644 --- a/libavutil/murmur3.c +++ b/libavutil/murmur3.c @@ -153,40 +153,3 @@ void av_murmur3_final(AVMurMur3 *c, uint8_t dst[16]) AV_WL64(dst, h1); AV_WL64(dst + 8, h2); } - -#ifdef TEST -int main(void) -{ - int i; - uint8_t hash_result[16] = {0}; - AVMurMur3 *ctx = av_murmur3_alloc(); -#if 1 - uint8_t in[256] = {0}; - uint8_t *hashes = av_mallocz(256 * 16); - for (i = 0; i < 256; i++) - { - in[i] = i; - av_murmur3_init_seeded(ctx, 256 - i); - // Note: this actually tests hashing 0 bytes - av_murmur3_update(ctx, in, i); - av_murmur3_final(ctx, hashes + 16 * i); - } - av_murmur3_init_seeded(ctx, 0); - av_murmur3_update(ctx, hashes, 256 * 16); - av_murmur3_final(ctx, hash_result); - av_free(hashes); - av_freep(&ctx); - printf("result: 0x%"PRIx64" 0x%"PRIx64"\n", AV_RL64(hash_result), AV_RL64(hash_result + 8)); - // official reference value is 32 bit - return AV_RL32(hash_result) != 0x6384ba69; -#else - uint8_t *in = av_mallocz(512*1024); - av_murmur3_init(ctx); - for (i = 0; i < 40*1024; i++) - av_murmur3_update(ctx, in, 512*1024); - av_murmur3_final(ctx, hash_result); - av_free(in); - return hash_result[0]; -#endif -} -#endif |