michael@0: /* michael@0: * Copyright (c) 2012 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: michael@0: #include "vpx_config.h" michael@0: #include "vp8_rtcd.h" michael@0: #include "vpx_ports/x86.h" michael@0: #include "vp8/encoder/block.h" michael@0: michael@0: int vp8_mbblock_error_xmm_impl(short *coeff_ptr, short *dcoef_ptr, int dc); michael@0: int vp8_mbblock_error_xmm(MACROBLOCK *mb, int dc) michael@0: { michael@0: short *coeff_ptr = mb->block[0].coeff; michael@0: short *dcoef_ptr = mb->e_mbd.block[0].dqcoeff; michael@0: return vp8_mbblock_error_xmm_impl(coeff_ptr, dcoef_ptr, dc); michael@0: } michael@0: michael@0: int vp8_mbuverror_xmm_impl(short *s_ptr, short *d_ptr); michael@0: int vp8_mbuverror_xmm(MACROBLOCK *mb) michael@0: { michael@0: short *s_ptr = &mb->coeff[256]; michael@0: short *d_ptr = &mb->e_mbd.dqcoeff[256]; michael@0: return vp8_mbuverror_xmm_impl(s_ptr, d_ptr); michael@0: } michael@0: michael@0: void vp8_subtract_b_sse2_impl(unsigned char *z, int src_stride, michael@0: short *diff, unsigned char *predictor, michael@0: int pitch); michael@0: void vp8_subtract_b_sse2(BLOCK *be, BLOCKD *bd, int pitch) michael@0: { michael@0: unsigned char *z = *(be->base_src) + be->src; michael@0: unsigned int src_stride = be->src_stride; michael@0: short *diff = &be->src_diff[0]; michael@0: unsigned char *predictor = &bd->predictor[0]; michael@0: vp8_subtract_b_sse2_impl(z, src_stride, diff, predictor, pitch); michael@0: }