ref: aed0d8c463032f9e652f0f0a4fe1a84ff27240a2
parent: 442ff059c30d86d9dc47fd98f1a3d6cb9bacbe20
parent: ea283a6272186022e9948637023775941cee0e5e
author: Alex Converse <[email protected]>
date: Fri Jan 24 10:41:01 EST 2014
Merge "Add some consts to vp9_calc_ss_err()."
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -3872,12 +3872,13 @@
return;
}
-int vp9_calc_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest) {
+int vp9_calc_ss_err(const YV12_BUFFER_CONFIG *source,
+ const YV12_BUFFER_CONFIG *reference) {
int i, j;
int total = 0;
- uint8_t *src = source->y_buffer;
- uint8_t *dst = dest->y_buffer;
+ const uint8_t *src = source->y_buffer;
+ const uint8_t *ref = reference->y_buffer;
// Loop through the Y plane raw and reconstruction data summing
// (square differences)
@@ -3884,12 +3885,12 @@
for (i = 0; i < source->y_height; i += 16) {
for (j = 0; j < source->y_width; j += 16) {
unsigned int sse;
- total += vp9_mse16x16(src + j, source->y_stride, dst + j, dest->y_stride,
- &sse);
+ total += vp9_mse16x16(src + j, source->y_stride,
+ ref + j, reference->y_stride, &sse);
}
src += 16 * source->y_stride;
- dst += 16 * dest->y_stride;
+ ref += 16 * reference->y_stride;
}
return total;
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -810,7 +810,8 @@
void vp9_set_speed_features(VP9_COMP *cpi);
-int vp9_calc_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest);
+int vp9_calc_ss_err(const YV12_BUFFER_CONFIG *source,
+ const YV12_BUFFER_CONFIG *reference);
void vp9_alloc_compressor_data(VP9_COMP *cpi);
--- a/vp9/encoder/vp9_picklpf.c
+++ b/vp9/encoder/vp9_picklpf.c
@@ -34,7 +34,7 @@
void vp9_set_alt_lf_level(VP9_COMP *cpi, int filt_val) {
}
-static void search_filter_level(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
+static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
int partial) {
MACROBLOCKD *const xd = &cpi->mb.e_mbd;
VP9_COMMON *const cm = &cpi->common;
@@ -128,7 +128,8 @@
lf->filter_level = filt_best;
}
-void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, int method) {
+void vp9_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
+ int method) {
VP9_COMMON *const cm = &cpi->common;
struct loopfilter *const lf = &cm->lf;
--- a/vp9/encoder/vp9_picklpf.h
+++ b/vp9/encoder/vp9_picklpf.h
@@ -21,7 +21,7 @@
void vp9_set_alt_lf_level(struct VP9_COMP *cpi, int filt_val);
-void vp9_pick_filter_level(struct yv12_buffer_config *sd,
+void vp9_pick_filter_level(const struct yv12_buffer_config *sd,
struct VP9_COMP *cpi, int method);
#ifdef __cplusplus
} // extern "C"