| Index: source/libvpx/vp9/encoder/vp9_ssim.c
|
| ===================================================================
|
| --- source/libvpx/vp9/encoder/vp9_ssim.c (revision 177019)
|
| +++ source/libvpx/vp9/encoder/vp9_ssim.c (working copy)
|
| @@ -11,7 +11,7 @@
|
|
|
| #include "vp9/encoder/vp9_onyx_int.h"
|
|
|
| -void vp9_ssim_parms_16x16_c(unsigned char *s, int sp, unsigned char *r,
|
| +void vp9_ssim_parms_16x16_c(uint8_t *s, int sp, uint8_t *r,
|
| int rp, unsigned long *sum_s, unsigned long *sum_r,
|
| unsigned long *sum_sq_s, unsigned long *sum_sq_r,
|
| unsigned long *sum_sxr) {
|
| @@ -26,7 +26,7 @@
|
| }
|
| }
|
| }
|
| -void vp9_ssim_parms_8x8_c(unsigned char *s, int sp, unsigned char *r, int rp,
|
| +void vp9_ssim_parms_8x8_c(uint8_t *s, int sp, uint8_t *r, int rp,
|
| unsigned long *sum_s, unsigned long *sum_r,
|
| unsigned long *sum_sq_s, unsigned long *sum_sq_r,
|
| unsigned long *sum_sxr) {
|
| @@ -65,13 +65,13 @@
|
| return ssim_n * 1.0 / ssim_d;
|
| }
|
|
|
| -static double ssim_16x16(unsigned char *s, int sp, unsigned char *r, int rp) {
|
| +static double ssim_16x16(uint8_t *s, int sp, uint8_t *r, int rp) {
|
| unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0;
|
| vp9_ssim_parms_16x16(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r,
|
| &sum_sxr);
|
| return similarity(sum_s, sum_r, sum_sq_s, sum_sq_r, sum_sxr, 256);
|
| }
|
| -static double ssim_8x8(unsigned char *s, int sp, unsigned char *r, int rp) {
|
| +static double ssim_8x8(uint8_t *s, int sp, uint8_t *r, int rp) {
|
| unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0;
|
| vp9_ssim_parms_8x8(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r,
|
| &sum_sxr);
|
| @@ -81,7 +81,7 @@
|
| // We are using a 8x8 moving window with starting location of each 8x8 window
|
| // on the 4x4 pixel grid. Such arrangement allows the windows to overlap
|
| // block boundaries to penalize blocking artifacts.
|
| -double vp9_ssim2(unsigned char *img1, unsigned char *img2, int stride_img1,
|
| +double vp9_ssim2(uint8_t *img1, uint8_t *img2, int stride_img1,
|
| int stride_img2, int width, int height) {
|
| int i, j;
|
| int samples = 0;
|
|
|