summaryrefslogtreecommitdiff
path: root/chromium/third_party/libvpx/source/libvpx/vpx_dsp/avg.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/libvpx/source/libvpx/vpx_dsp/avg.c')
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_dsp/avg.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/chromium/third_party/libvpx/source/libvpx/vpx_dsp/avg.c b/chromium/third_party/libvpx/source/libvpx/vpx_dsp/avg.c
index 26fe7859a5c..a8c996663d9 100644
--- a/chromium/third_party/libvpx/source/libvpx/vpx_dsp/avg.c
+++ b/chromium/third_party/libvpx/source/libvpx/vpx_dsp/avg.c
@@ -62,7 +62,9 @@ static void hadamard_col8(const int16_t *src_diff, int src_stride,
coeff[5] = c3 - c7;
}
-void vpx_hadamard_8x8_c(int16_t const *src_diff, int src_stride,
+// The order of the output coeff of the hadamard is not important. For
+// optimization purposes the final transpose may be skipped.
+void vpx_hadamard_8x8_c(const int16_t *src_diff, int src_stride,
int16_t *coeff) {
int idx;
int16_t buffer[64];
@@ -85,12 +87,12 @@ void vpx_hadamard_8x8_c(int16_t const *src_diff, int src_stride,
}
// In place 16x16 2D Hadamard transform
-void vpx_hadamard_16x16_c(int16_t const *src_diff, int src_stride,
+void vpx_hadamard_16x16_c(const int16_t *src_diff, int src_stride,
int16_t *coeff) {
int idx;
for (idx = 0; idx < 4; ++idx) {
// src_diff: 9 bit, dynamic range [-255, 255]
- int16_t const *src_ptr = src_diff + (idx >> 1) * 8 * src_stride
+ const int16_t *src_ptr = src_diff + (idx >> 1) * 8 * src_stride
+ (idx & 0x01) * 8;
vpx_hadamard_8x8_c(src_ptr, src_stride, coeff + idx * 64);
}
@@ -130,7 +132,7 @@ int vpx_satd_c(const int16_t *coeff, int length) {
// Integer projection onto row vectors.
// height: value range {16, 32, 64}.
-void vpx_int_pro_row_c(int16_t hbuf[16], uint8_t const *ref,
+void vpx_int_pro_row_c(int16_t hbuf[16], const uint8_t *ref,
const int ref_stride, const int height) {
int idx;
const int norm_factor = height >> 1;
@@ -147,7 +149,7 @@ void vpx_int_pro_row_c(int16_t hbuf[16], uint8_t const *ref,
}
// width: value range {16, 32, 64}.
-int16_t vpx_int_pro_col_c(uint8_t const *ref, const int width) {
+int16_t vpx_int_pro_col_c(const uint8_t *ref, const int width) {
int idx;
int16_t sum = 0;
// sum: 14 bit, dynamic range [0, 16320]
@@ -159,7 +161,7 @@ int16_t vpx_int_pro_col_c(uint8_t const *ref, const int width) {
// ref: [0 - 510]
// src: [0 - 510]
// bwl: {2, 3, 4}
-int vpx_vector_var_c(int16_t const *ref, int16_t const *src,
+int vpx_vector_var_c(const int16_t *ref, const int16_t *src,
const int bwl) {
int i;
int width = 4 << bwl;