mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-02-14 06:09:51 +08:00
Remainder calc needs to be after blocks are done. Move calc to old location.
BUG=303 TESTED=Djb2 unittests R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/6849004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@960 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
6700a27c97
commit
da443d7adc
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 958
|
Version: 960
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 958
|
#define LIBYUV_VERSION 960
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -47,7 +47,7 @@ uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed);
|
|||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed) {
|
uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed) {
|
||||||
const int kBlockSize = 1 << 15; // 32768;
|
const int kBlockSize = 1 << 15; // 32768;
|
||||||
int remainder = (int)(count) & ~15;
|
int remainder;
|
||||||
uint32 (*HashDjb2_SSE)(const uint8* src, int count, uint32 seed) = HashDjb2_C;
|
uint32 (*HashDjb2_SSE)(const uint8* src, int count, uint32 seed) = HashDjb2_C;
|
||||||
#if defined(HAS_HASHDJB2_SSE41)
|
#if defined(HAS_HASHDJB2_SSE41)
|
||||||
if (TestCpuFlag(kCpuHasSSE41)) {
|
if (TestCpuFlag(kCpuHasSSE41)) {
|
||||||
@ -65,6 +65,7 @@ uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed) {
|
|||||||
src += kBlockSize;
|
src += kBlockSize;
|
||||||
count -= kBlockSize;
|
count -= kBlockSize;
|
||||||
}
|
}
|
||||||
|
remainder = (int)(count) & ~15;
|
||||||
if (remainder) {
|
if (remainder) {
|
||||||
seed = HashDjb2_SSE(src, remainder, seed);
|
seed = HashDjb2_SSE(src, remainder, seed);
|
||||||
src += remainder;
|
src += remainder;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user