#include "src/webp/encode.h"
#if !(defined(WEBP_DISABLE_STATS) || defined(WEBP_REDUCE_SIZE))
#include <math.h>
#include <stdlib.h>
#include "src/dsp/dsp.h"
#include "src/enc/vp8i_enc.h"
#include "src/utils/utils.h"
AccumulateFunc;
#define RADIUS …
static double AccumulateLSIM(const uint8_t* src, int src_stride,
const uint8_t* ref, int ref_stride,
int w, int h) { … }
#undef RADIUS
static double AccumulateSSE(const uint8_t* src, int src_stride,
const uint8_t* ref, int ref_stride,
int w, int h) { … }
static double AccumulateSSIM(const uint8_t* src, int src_stride,
const uint8_t* ref, int ref_stride,
int w, int h) { … }
static const double kMinDistortion_dB = …;
static double GetPSNR(double v, double size) { … }
static double GetLogSSIM(double v, double size) { … }
int WebPPlaneDistortion(const uint8_t* src, size_t src_stride,
const uint8_t* ref, size_t ref_stride,
int width, int height, size_t x_step,
int type, float* distortion, float* result) { … }
#ifdef WORDS_BIGENDIAN
#define BLUE_OFFSET …
#else
#define BLUE_OFFSET …
#endif
int WebPPictureDistortion(const WebPPicture* src, const WebPPicture* ref,
int type, float results[5]) { … }
#undef BLUE_OFFSET
#else
int WebPPlaneDistortion(const uint8_t* src, size_t src_stride,
const uint8_t* ref, size_t ref_stride,
int width, int height, size_t x_step,
int type, float* distortion, float* result) {
(void)src;
(void)src_stride;
(void)ref;
(void)ref_stride;
(void)width;
(void)height;
(void)x_step;
(void)type;
if (distortion == NULL || result == NULL) return 0;
*distortion = 0.f;
*result = 0.f;
return 1;
}
int WebPPictureDistortion(const WebPPicture* src, const WebPPicture* ref,
int type, float results[5]) {
int i;
(void)src;
(void)ref;
(void)type;
if (results == NULL) return 0;
for (i = 0; i < 5; ++i) results[i] = 0.f;
return 1;
}
#endif