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
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 165
|
Version: 167
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace libyuv {
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LIBYUV_VERSION 165
|
#define LIBYUV_VERSION 167
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|||||||
@ -12,6 +12,9 @@
|
|||||||
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "libyuv/basic_types.h"
|
#include "libyuv/basic_types.h"
|
||||||
#include "libyuv/cpu_id.h"
|
#include "libyuv/cpu_id.h"
|
||||||
@ -23,7 +26,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// hash seed of 5381 recommended.
|
// 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;
|
uint32 hash = seed;
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
do {
|
do {
|
||||||
@ -190,7 +193,9 @@ uint64 ComputeSumSquareError(const uint8* src_a,
|
|||||||
{
|
{
|
||||||
SumSquareError = SumSquareError_C;
|
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;
|
uint64 sse = 0;
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for reduction(+: sse)
|
#pragma omp parallel for reduction(+: sse)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user