#include <assert.h>
#include <stdlib.h>
#include "src/dsp/dsp.h"
#if !defined(WEBP_REDUCE_SIZE)
static const uint32_t kWeight[2 * VP8_SSIM_KERNEL + 1] = …;
static const uint32_t kWeightSum = …;
static WEBP_INLINE double SSIMCalculation(
const VP8DistoStats* const stats, uint32_t N ) { … }
double VP8SSIMFromStats(const VP8DistoStats* const stats) { … }
double VP8SSIMFromStatsClipped(const VP8DistoStats* const stats) { … }
static double SSIMGetClipped_C(const uint8_t* src1, int stride1,
const uint8_t* src2, int stride2,
int xo, int yo, int W, int H) { … }
static double SSIMGet_C(const uint8_t* src1, int stride1,
const uint8_t* src2, int stride2) { … }
#endif
#if !defined(WEBP_DISABLE_STATS)
static uint32_t AccumulateSSE_C(const uint8_t* src1,
const uint8_t* src2, int len) { … }
#endif
#if !defined(WEBP_REDUCE_SIZE)
VP8SSIMGetFunc VP8SSIMGet;
VP8SSIMGetClippedFunc VP8SSIMGetClipped;
#endif
#if !defined(WEBP_DISABLE_STATS)
VP8AccumulateSSEFunc VP8AccumulateSSE;
#endif
extern VP8CPUInfo VP8GetCPUInfo;
extern void VP8SSIMDspInitSSE2(void);
WEBP_DSP_INIT_FUNC(VP8SSIMDspInit) { … }