1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp8/common/x86/idct_blk_sse2.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,89 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 +#include "vpx_config.h" 1.15 +#include "vp8_rtcd.h" 1.16 + 1.17 +void vp8_idct_dequant_0_2x_sse2 1.18 + (short *q, short *dq , 1.19 + unsigned char *dst, int dst_stride); 1.20 +void vp8_idct_dequant_full_2x_sse2 1.21 + (short *q, short *dq , 1.22 + unsigned char *dst, int dst_stride); 1.23 + 1.24 +void vp8_dequant_idct_add_y_block_sse2 1.25 + (short *q, short *dq, 1.26 + unsigned char *dst, int stride, char *eobs) 1.27 +{ 1.28 + int i; 1.29 + 1.30 + for (i = 0; i < 4; i++) 1.31 + { 1.32 + if (((short *)(eobs))[0]) 1.33 + { 1.34 + if (((short *)(eobs))[0] & 0xfefe) 1.35 + vp8_idct_dequant_full_2x_sse2 (q, dq, dst, stride); 1.36 + else 1.37 + vp8_idct_dequant_0_2x_sse2 (q, dq, dst, stride); 1.38 + } 1.39 + if (((short *)(eobs))[1]) 1.40 + { 1.41 + if (((short *)(eobs))[1] & 0xfefe) 1.42 + vp8_idct_dequant_full_2x_sse2 (q+32, dq, dst+8, stride); 1.43 + else 1.44 + vp8_idct_dequant_0_2x_sse2 (q+32, dq, dst+8, stride); 1.45 + } 1.46 + q += 64; 1.47 + dst += stride*4; 1.48 + eobs += 4; 1.49 + } 1.50 +} 1.51 + 1.52 +void vp8_dequant_idct_add_uv_block_sse2 1.53 + (short *q, short *dq, 1.54 + unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) 1.55 +{ 1.56 + if (((short *)(eobs))[0]) 1.57 + { 1.58 + if (((short *)(eobs))[0] & 0xfefe) 1.59 + vp8_idct_dequant_full_2x_sse2 (q, dq, dstu, stride); 1.60 + else 1.61 + vp8_idct_dequant_0_2x_sse2 (q, dq, dstu, stride); 1.62 + } 1.63 + q += 32; 1.64 + dstu += stride*4; 1.65 + 1.66 + if (((short *)(eobs))[1]) 1.67 + { 1.68 + if (((short *)(eobs))[1] & 0xfefe) 1.69 + vp8_idct_dequant_full_2x_sse2 (q, dq, dstu, stride); 1.70 + else 1.71 + vp8_idct_dequant_0_2x_sse2 (q, dq, dstu, stride); 1.72 + } 1.73 + q += 32; 1.74 + 1.75 + if (((short *)(eobs))[2]) 1.76 + { 1.77 + if (((short *)(eobs))[2] & 0xfefe) 1.78 + vp8_idct_dequant_full_2x_sse2 (q, dq, dstv, stride); 1.79 + else 1.80 + vp8_idct_dequant_0_2x_sse2 (q, dq, dstv, stride); 1.81 + } 1.82 + q += 32; 1.83 + dstv += stride*4; 1.84 + 1.85 + if (((short *)(eobs))[3]) 1.86 + { 1.87 + if (((short *)(eobs))[3] & 0xfefe) 1.88 + vp8_idct_dequant_full_2x_sse2 (q, dq, dstv, stride); 1.89 + else 1.90 + vp8_idct_dequant_0_2x_sse2 (q, dq, dstv, stride); 1.91 + } 1.92 +}