ref: bf86ee73173a945abdd765ea88d5eac12030cb60
parent: 1cb039529d4c1b535093c759850835fae794d424
author: Johann <johannkoenig@google.com>
date: Fri Dec 21 06:59:07 EST 2018
vp9_highbd_block_error_sse2: resolve missing declarations BUG=webm:1584 Change-Id: I43d051c538bf4a6f6210eefa398dc0901ab8d157
--- a/vp9/encoder/x86/vp9_highbd_block_error_intrin_sse2.c
+++ b/vp9/encoder/x86/vp9_highbd_block_error_intrin_sse2.c
@@ -11,24 +11,25 @@
#include <emmintrin.h>
#include <stdio.h>
+#include "./vp9_rtcd.h"
#include "vp9/common/vp9_common.h"
-int64_t vp9_highbd_block_error_sse2(tran_low_t *coeff, tran_low_t *dqcoeff,
- intptr_t block_size, int64_t *ssz,
- int bps) {
+int64_t vp9_highbd_block_error_sse2(const tran_low_t *coeff,
+ const tran_low_t *dqcoeff,
+ intptr_t block_size, int64_t *ssz, int bd) {
int i, j, test;
uint32_t temp[4];
__m128i max, min, cmp0, cmp1, cmp2, cmp3;
int64_t error = 0, sqcoeff = 0;
- const int shift = 2 * (bps - 8);
+ const int shift = 2 * (bd - 8);
const int rounding = shift > 0 ? 1 << (shift - 1) : 0;
for (i = 0; i < block_size; i += 8) {
// Load the data into xmm registers
- __m128i mm_coeff = _mm_load_si128((__m128i *)(coeff + i));
- __m128i mm_coeff2 = _mm_load_si128((__m128i *)(coeff + i + 4));
- __m128i mm_dqcoeff = _mm_load_si128((__m128i *)(dqcoeff + i));
- __m128i mm_dqcoeff2 = _mm_load_si128((__m128i *)(dqcoeff + i + 4));
+ __m128i mm_coeff = _mm_load_si128((const __m128i *)(coeff + i));
+ __m128i mm_coeff2 = _mm_load_si128((const __m128i *)(coeff + i + 4));
+ __m128i mm_dqcoeff = _mm_load_si128((const __m128i *)(dqcoeff + i));
+ __m128i mm_dqcoeff2 = _mm_load_si128((const __m128i *)(dqcoeff + i + 4));
// Check if any values require more than 15 bit
max = _mm_set1_epi32(0x3fff);
min = _mm_set1_epi32(0xffffc000);