1*4e366538SXin Li /* 2*4e366538SXin Li * Copyright 2013 The LibYuv Project Authors. All rights reserved. 3*4e366538SXin Li * 4*4e366538SXin Li * Use of this source code is governed by a BSD-style license 5*4e366538SXin Li * that can be found in the LICENSE file in the root of the source 6*4e366538SXin Li * tree. An additional intellectual property rights grant can be found 7*4e366538SXin Li * in the file PATENTS. All contributing project authors may 8*4e366538SXin Li * be found in the AUTHORS file in the root of the source tree. 9*4e366538SXin Li */ 10*4e366538SXin Li 11*4e366538SXin Li // Get SSIM for video sequence. Assuming RAW 4:2:0 Y:Cb:Cr format 12*4e366538SXin Li 13*4e366538SXin Li #ifndef UTIL_SSIM_H_ 14*4e366538SXin Li #define UTIL_SSIM_H_ 15*4e366538SXin Li 16*4e366538SXin Li #include <math.h> // For log10() 17*4e366538SXin Li 18*4e366538SXin Li #ifdef __cplusplus 19*4e366538SXin Li extern "C" { 20*4e366538SXin Li #endif 21*4e366538SXin Li 22*4e366538SXin Li #if !defined(INT_TYPES_DEFINED) && !defined(UINT8_TYPE_DEFINED) 23*4e366538SXin Li typedef unsigned char uint8_t; 24*4e366538SXin Li #define UINT8_TYPE_DEFINED 25*4e366538SXin Li #endif 26*4e366538SXin Li 27*4e366538SXin Li double CalcSSIM(const uint8_t* org, 28*4e366538SXin Li const uint8_t* rec, 29*4e366538SXin Li const int image_width, 30*4e366538SXin Li const int image_height); 31*4e366538SXin Li 32*4e366538SXin Li double CalcLSSIM(double ssim); 33*4e366538SXin Li 34*4e366538SXin Li #ifdef __cplusplus 35*4e366538SXin Li } // extern "C" 36*4e366538SXin Li #endif 37*4e366538SXin Li 38*4e366538SXin Li #endif // UTIL_SSIM_H_ 39