mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-02-17 07:39:53 +08:00
Fix for clobber registers on SumSquareError_SSE2 used for PSNR
BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/1410004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@683 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
4154163e20
commit
b432b7da2d
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 682
|
Version: 683
|
||||||
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 682
|
#define LIBYUV_VERSION 683
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -56,7 +56,7 @@ uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) {
|
|||||||
:
|
:
|
||||||
: "memory", "cc"
|
: "memory", "cc"
|
||||||
#if defined(__SSE2__)
|
#if defined(__SSE2__)
|
||||||
, "xmm0", "xmm1", "xmm2", "xmm5"
|
, "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
return sse;
|
return sse;
|
||||||
|
|||||||
@ -159,7 +159,7 @@ static uint32 SumSquareError_SSE2(const uint8* src_a,
|
|||||||
:
|
:
|
||||||
: "memory", "cc"
|
: "memory", "cc"
|
||||||
#if defined(__SSE2__)
|
#if defined(__SSE2__)
|
||||||
, "xmm0", "xmm1", "xmm2", "xmm5"
|
, "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"
|
||||||
#endif
|
#endif
|
||||||
); // NOLINT
|
); // NOLINT
|
||||||
return sse;
|
return sse;
|
||||||
|
|||||||
@ -20,10 +20,11 @@ extern "C" {
|
|||||||
typedef unsigned int uint32; // NOLINT
|
typedef unsigned int uint32; // NOLINT
|
||||||
typedef unsigned short uint16; // NOLINT
|
typedef unsigned short uint16; // NOLINT
|
||||||
|
|
||||||
#if defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 2))
|
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||||
|
(defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)))
|
||||||
#define __SSE2__
|
#define __SSE2__
|
||||||
#endif
|
#endif
|
||||||
#ifdef __SSE2__
|
#if !defined(LIBYUV_DISABLE_X86) && defined(__SSE2__)
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ static const double kiW[KERNEL + 1 + 1] = {
|
|||||||
1. / 726., // 1 / sum(i:0..3, j..6) K[i]*K[j]
|
1. / 726., // 1 / sum(i:0..3, j..6) K[i]*K[j]
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __SSE2__
|
#if !defined(LIBYUV_DISABLE_X86) && defined(__SSE2__)
|
||||||
|
|
||||||
#define PWEIGHT(A, B) static_cast<uint16>(K[(A)] * K[(B)]) // weight product
|
#define PWEIGHT(A, B) static_cast<uint16>(K[(A)] * K[(B)]) // weight product
|
||||||
#define MAKE_WEIGHT(L) \
|
#define MAKE_WEIGHT(L) \
|
||||||
@ -130,7 +131,7 @@ double GetSSIMFullKernel(const uint8 *org, const uint8 *rec,
|
|||||||
double area_weight) {
|
double area_weight) {
|
||||||
uint32 xm = 0, ym = 0, xxm = 0, xym = 0, yym = 0;
|
uint32 xm = 0, ym = 0, xxm = 0, xym = 0, yym = 0;
|
||||||
|
|
||||||
#ifndef __SSE2__
|
#if defined(LIBYUV_DISABLE_X86) || !defined(__SSE2__)
|
||||||
|
|
||||||
org += yo * stride + xo;
|
org += yo * stride + xo;
|
||||||
rec += yo * stride + xo;
|
rec += yo * stride + xo;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user