mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
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
This commit is contained in:
parent
3e34b8e89d
commit
79a06ac5fe
@ -1,6 +1,6 @@
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user