Commit acff1627 authored by John Koleszar's avatar John Koleszar Committed by Code Review
Browse files

Merge "Add const qualifiers to variance/SAD functions."

parents 037345eb f4a85944
......@@ -92,9 +92,9 @@ static int get_inter_mbpred_error(MACROBLOCK *mb, vp8_subpixvariance_fn_t svf, v
unsigned int vp8_get16x16pred_error_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
int max_sad
)
......@@ -125,9 +125,9 @@ unsigned int vp8_get16x16pred_error_c
unsigned int vp8_get4x4sse_cs_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
int max_sad
)
......
......@@ -12,9 +12,9 @@
#include <stdlib.h>
unsigned int vp8_sad16x16_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
int max_sad)
{
......@@ -39,9 +39,9 @@ unsigned int vp8_sad16x16_c(
static __inline
unsigned int sad_mx_n_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
int m,
int n)
......@@ -66,9 +66,9 @@ unsigned int sad_mx_n_c(
unsigned int vp8_sad8x8_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
int max_sad)
{
......@@ -78,9 +78,9 @@ unsigned int vp8_sad8x8_c(
unsigned int vp8_sad16x8_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
int max_sad)
{
......@@ -91,9 +91,9 @@ unsigned int vp8_sad16x8_c(
unsigned int vp8_sad8x16_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
int max_sad)
{
......@@ -103,9 +103,9 @@ unsigned int vp8_sad8x16_c(
unsigned int vp8_sad4x4_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
int max_sad)
{
......@@ -114,9 +114,9 @@ unsigned int vp8_sad4x4_c(
}
void vp8_sad16x16x3_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
unsigned int *sad_array
)
......@@ -127,9 +127,9 @@ void vp8_sad16x16x3_c(
}
void vp8_sad16x8x3_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
unsigned int *sad_array
)
......@@ -140,9 +140,9 @@ void vp8_sad16x8x3_c(
}
void vp8_sad8x8x3_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
unsigned int *sad_array
)
......@@ -153,9 +153,9 @@ void vp8_sad8x8x3_c(
}
void vp8_sad8x16x3_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
unsigned int *sad_array
)
......@@ -166,9 +166,9 @@ void vp8_sad8x16x3_c(
}
void vp8_sad4x4x3_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_stride,
unsigned int *sad_array
)
......@@ -179,7 +179,7 @@ void vp8_sad4x4x3_c(
}
void vp8_sad16x16x4d_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr[],
int ref_stride,
......@@ -193,7 +193,7 @@ void vp8_sad16x16x4d_c(
}
void vp8_sad16x8x4d_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr[],
int ref_stride,
......@@ -207,7 +207,7 @@ void vp8_sad16x8x4d_c(
}
void vp8_sad8x8x4d_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr[],
int ref_stride,
......@@ -221,7 +221,7 @@ void vp8_sad8x8x4d_c(
}
void vp8_sad8x16x4d_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr[],
int ref_stride,
......@@ -235,7 +235,7 @@ void vp8_sad8x16x4d_c(
}
void vp8_sad4x4x4d_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_stride,
unsigned char *ref_ptr[],
int ref_stride,
......
......@@ -15,9 +15,9 @@
#define prototype_sad(sym)\
unsigned int (sym)\
(\
unsigned char *src_ptr, \
const unsigned char *src_ptr, \
int source_stride, \
unsigned char *ref_ptr, \
const unsigned char *ref_ptr, \
int ref_stride, \
int max_sad\
)
......@@ -25,9 +25,9 @@
#define prototype_sad_multi_same_address(sym)\
void (sym)\
(\
unsigned char *src_ptr, \
const unsigned char *src_ptr, \
int source_stride, \
unsigned char *ref_ptr, \
const unsigned char *ref_ptr, \
int ref_stride, \
unsigned int *sad_array\
)
......@@ -35,7 +35,7 @@
#define prototype_sad_multi_dif_address(sym)\
void (sym)\
(\
unsigned char *src_ptr, \
const unsigned char *src_ptr, \
int source_stride, \
unsigned char *ref_ptr[4], \
int ref_stride, \
......@@ -45,9 +45,9 @@
#define prototype_variance(sym) \
unsigned int (sym) \
(\
unsigned char *src_ptr, \
const unsigned char *src_ptr, \
int source_stride, \
unsigned char *ref_ptr, \
const unsigned char *ref_ptr, \
int ref_stride, \
unsigned int *sse\
)
......@@ -55,9 +55,9 @@
#define prototype_variance2(sym) \
unsigned int (sym) \
(\
unsigned char *src_ptr, \
const unsigned char *src_ptr, \
int source_stride, \
unsigned char *ref_ptr, \
const unsigned char *ref_ptr, \
int ref_stride, \
unsigned int *sse,\
int *sum\
......@@ -66,17 +66,17 @@
#define prototype_subpixvariance(sym) \
unsigned int (sym) \
( \
unsigned char *src_ptr, \
const unsigned char *src_ptr, \
int source_stride, \
int xoffset, \
int yoffset, \
unsigned char *ref_ptr, \
const unsigned char *ref_ptr, \
int Refstride, \
unsigned int *sse \
);
#define prototype_getmbss(sym) unsigned int (sym)(short *)
#define prototype_getmbss(sym) unsigned int (sym)(const short *)
#if ARCH_X86 || ARCH_X86_64
#include "x86/variance_x86.h"
......
......@@ -41,7 +41,7 @@ const int vp8_bilinear_taps[8][2] =
unsigned int vp8_get_mb_ss_c
(
short *src_ptr
const short *src_ptr
)
{
unsigned int i = 0, sum = 0;
......@@ -58,9 +58,9 @@ unsigned int vp8_get_mb_ss_c
void vp8_variance(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
int w,
int h,
......@@ -90,9 +90,9 @@ void vp8_variance(
unsigned int
vp8_get8x8var_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *SSE,
int *Sum
......@@ -106,9 +106,9 @@ vp8_get8x8var_c
unsigned int
vp8_get16x16var_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *SSE,
int *Sum
......@@ -123,9 +123,9 @@ vp8_get16x16var_c
unsigned int vp8_variance16x16_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -139,9 +139,9 @@ unsigned int vp8_variance16x16_c(
}
unsigned int vp8_variance8x16_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -155,9 +155,9 @@ unsigned int vp8_variance8x16_c(
}
unsigned int vp8_variance16x8_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -172,9 +172,9 @@ unsigned int vp8_variance16x8_c(
unsigned int vp8_variance8x8_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -188,9 +188,9 @@ unsigned int vp8_variance8x8_c(
}
unsigned int vp8_variance4x4_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -205,9 +205,9 @@ unsigned int vp8_variance4x4_c(
unsigned int vp8_mse16x16_c(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -250,7 +250,7 @@ unsigned int vp8_mse16x16_c(
****************************************************************************/
void vp8e_filter_block2d_bil_first_pass
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
unsigned short *output_ptr,
unsigned int src_pixels_per_line,
int pixel_step,
......@@ -308,7 +308,7 @@ void vp8e_filter_block2d_bil_first_pass
****************************************************************************/
void vp8e_filter_block2d_bil_second_pass
(
unsigned short *src_ptr,
const unsigned short *src_ptr,
unsigned char *output_ptr,
unsigned int src_pixels_per_line,
unsigned int pixel_step,
......@@ -366,7 +366,7 @@ void vp8e_filter_block2d_bil_second_pass
****************************************************************************/
void vp8e_filter_block2d_bil
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
unsigned char *output_ptr,
unsigned int src_pixels_per_line,
int *HFilter,
......@@ -387,11 +387,11 @@ void vp8e_filter_block2d_bil
unsigned int vp8_sub_pixel_variance4x4_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_pixels_per_line,
int xoffset,
int yoffset,
unsigned char *dst_ptr,
const unsigned char *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse
)
......@@ -415,11 +415,11 @@ unsigned int vp8_sub_pixel_variance4x4_c
unsigned int vp8_sub_pixel_variance8x8_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_pixels_per_line,
int xoffset,
int yoffset,
unsigned char *dst_ptr,
const unsigned char *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse
)
......@@ -439,11 +439,11 @@ unsigned int vp8_sub_pixel_variance8x8_c
unsigned int vp8_sub_pixel_variance16x16_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_pixels_per_line,
int xoffset,
int yoffset,
unsigned char *dst_ptr,
const unsigned char *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse
)
......@@ -463,11 +463,11 @@ unsigned int vp8_sub_pixel_variance16x16_c
unsigned int vp8_sub_pixel_mse16x16_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_pixels_per_line,
int xoffset,
int yoffset,
unsigned char *dst_ptr,
const unsigned char *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse
)
......@@ -478,11 +478,11 @@ unsigned int vp8_sub_pixel_mse16x16_c
unsigned int vp8_sub_pixel_variance16x8_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_pixels_per_line,
int xoffset,
int yoffset,
unsigned char *dst_ptr,
const unsigned char *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse
)
......@@ -502,11 +502,11 @@ unsigned int vp8_sub_pixel_variance16x8_c
unsigned int vp8_sub_pixel_variance8x16_c
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_pixels_per_line,
int xoffset,
int yoffset,
unsigned char *dst_ptr,
const unsigned char *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse
)
......
......@@ -15,7 +15,7 @@
extern void filter_block1d_h6_mmx
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
unsigned short *output_ptr,
unsigned int src_pixels_per_line,
unsigned int pixel_step,
......@@ -25,7 +25,7 @@ extern void filter_block1d_h6_mmx
);
extern void filter_block1d_v6_mmx
(
short *src_ptr,
const short *src_ptr,
unsigned char *output_ptr,
unsigned int pixels_per_line,
unsigned int pixel_step,
......@@ -37,34 +37,34 @@ extern void filter_block1d_v6_mmx
extern unsigned int vp8_get_mb_ss_mmx(short *src_ptr);
extern unsigned int vp8_get8x8var_mmx
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *SSE,
int *Sum
);
extern unsigned int vp8_get4x4var_mmx
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *SSE,
int *Sum
);
extern unsigned int vp8_get4x4sse_cs_mmx
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride
);
extern void vp8_filter_block2d_bil4x4_var_mmx
(
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_pixels_per_line,
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_pixels_per_line,
const short *HFilter,
const short *VFilter,
......@@ -73,9 +73,9 @@ extern void vp8_filter_block2d_bil4x4_var_mmx
);
extern void vp8_filter_block2d_bil_var_mmx
(
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int ref_pixels_per_line,
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_pixels_per_line,
unsigned int Height,
const short *HFilter,
......@@ -126,9 +126,9 @@ void vp8_test_get_mb_ss(void)
unsigned int vp8_get16x16var_mmx(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned *SSE,
unsigned *SUM
......@@ -157,9 +157,9 @@ unsigned int vp8_get16x16var_mmx(
unsigned int vp8_variance4x4_mmx(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -173,9 +173,9 @@ unsigned int vp8_variance4x4_mmx(
}
unsigned int vp8_variance8x8_mmx(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -190,9 +190,9 @@ unsigned int vp8_variance8x8_mmx(
}
unsigned int vp8_mse16x16_mmx(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -212,9 +212,9 @@ unsigned int vp8_mse16x16_mmx(
unsigned int vp8_variance16x16_mmx(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
int *sse)
{
......@@ -234,9 +234,9 @@ unsigned int vp8_variance16x16_mmx(
}
unsigned int vp8_variance16x8_mmx(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -255,9 +255,9 @@ unsigned int vp8_variance16x8_mmx(
unsigned int vp8_variance8x16_mmx(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int source_stride,
unsigned char *ref_ptr,
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse)
{
......@@ -296,11 +296,11 @@ DECLARE_ALIGNED(16, const short, vp8_vp7_bilinear_filters_mmx[8][8]) =
unsigned int vp8_sub_pixel_variance4x4_mmx
(
unsigned char *src_ptr,
const unsigned char *src_ptr,
int src_pixels_per_line,
int xoffset,