ref: 07ab3c642ccf4e90c72741f865bdf28ff632ffbb
parent: c41c4752a14b917a2155a5003d3e50efbb3b790b
author: sdeng <sdeng@google.com>
date: Thu Nov 29 10:20:35 EST 2018
Use 16 bit ints in Hadamard highbd col8 first pass Change-Id: I2f04937d8a4e171d42b25ee6c6555ccad29eb192
--- a/vpx_dsp/avg.c
+++ b/vpx_dsp/avg.c
@@ -37,7 +37,7 @@
// coeff: 16 bit
static void hadamard_highbd_col8_first_pass(const int16_t *src_diff,
ptrdiff_t src_stride,
- int32_t *coeff) {
+ int16_t *coeff) {
int16_t b0 = src_diff[0 * src_stride] + src_diff[1 * src_stride];
int16_t b1 = src_diff[0 * src_stride] - src_diff[1 * src_stride];
int16_t b2 = src_diff[2 * src_stride] + src_diff[3 * src_stride];
@@ -68,7 +68,7 @@
// src_diff: 16 bit, dynamic range [-32760, 32760]
// coeff: 19 bit
-static void hadamard_highbd_col8_second_pass(const int32_t *src_diff,
+static void hadamard_highbd_col8_second_pass(const int16_t *src_diff,
ptrdiff_t src_stride,
int32_t *coeff) {
int32_t b0 = src_diff[0 * src_stride] + src_diff[1 * src_stride];
@@ -104,9 +104,9 @@
void vpx_highbd_hadamard_8x8_c(const int16_t *src_diff, ptrdiff_t src_stride,
tran_low_t *coeff) {
int idx;
- int32_t buffer[64];
+ int16_t buffer[64];
int32_t buffer2[64];
- int32_t *tmp_buf = &buffer[0];
+ int16_t *tmp_buf = &buffer[0];
for (idx = 0; idx < 8; ++idx) {
// src_diff: 13 bit
// buffer: 16 bit, dynamic range [-32760, 32760]