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:
fbarchard@google.com 2014-01-09 20:29:27 +00:00
parent 6700a27c97
commit da443d7adc
3 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 958
Version: 960
License: BSD
License File: LICENSE

View File

@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 958
#define LIBYUV_VERSION 960
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT

View File

@ -47,7 +47,7 @@ uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed);
LIBYUV_API
uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed) {
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;
#if defined(HAS_HASHDJB2_SSE41)
if (TestCpuFlag(kCpuHasSSE41)) {
@ -65,6 +65,7 @@ uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed) {
src += kBlockSize;
count -= kBlockSize;
}
remainder = (int)(count) & ~15;
if (remainder) {
seed = HashDjb2_SSE(src, remainder, seed);
src += remainder;