1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libyuv/util/ssim.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +/* 1.5 + * Copyright 2013 The LibYuv Project Authors. All rights reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 +// Get SSIM for video sequence. Assuming RAW 4:2:0 Y:Cb:Cr format 1.15 + 1.16 +#ifndef UTIL_SSIM_H_ // NOLINT 1.17 +#define UTIL_SSIM_H_ 1.18 + 1.19 +#ifdef __cplusplus 1.20 +extern "C" { 1.21 +#endif 1.22 + 1.23 +#if !defined(INT_TYPES_DEFINED) && !defined(UINT8_TYPE_DEFINED) 1.24 +typedef unsigned char uint8; 1.25 +#define UINT8_TYPE_DEFINED 1.26 +#endif 1.27 + 1.28 +double CalcSSIM(const uint8* org, const uint8* rec, 1.29 + const int image_width, const int image_height); 1.30 + 1.31 +// does -10.0 * log10(1.0 - ssim) 1.32 +double CalcLSSIM(double ssim); 1.33 + 1.34 +#ifdef __cplusplus 1.35 +} // extern "C" 1.36 +#endif 1.37 + 1.38 +#endif // UTIL_SSIM_H_ // NOLINT