Commit 79a06ac5 authored by fbarchard@google.com's avatar fbarchard@google.com

omp friendly version of psnr

BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/378007

git-svn-id: http://libyuv.googlecode.com/svn/trunk@167 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 3e34b8e8
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 165
Version: 167
License: BSD
License File: LICENSE
......
......@@ -16,7 +16,7 @@ namespace libyuv {
extern "C" {
#endif
#define LIBYUV_VERSION 165
#define LIBYUV_VERSION 167
#ifdef __cplusplus
} // extern "C"
......
......@@ -12,6 +12,9 @@
#include <float.h>
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "libyuv/basic_types.h"
#include "libyuv/cpu_id.h"
......@@ -23,7 +26,7 @@ extern "C" {
#endif
// hash seed of 5381 recommended.
uint32 HashDjb2(const uint8* src, size_t len, uint32 seed) {
uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed) {
uint32 hash = seed;
if (len > 0) {
do {
......@@ -190,7 +193,9 @@ uint64 ComputeSumSquareError(const uint8* src_a,
{
SumSquareError = SumSquareError_C;
}
const int kBlockSize = 32768;
// 32K values will fit a 32bit int return value from SumSquareError.
// After each block of 32K, accumulate into 64 bit int.
const int kBlockSize = 1 << 15; // 32768;
uint64 sse = 0;
#ifdef _OPENMP
#pragma omp parallel for reduction(+: sse)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment