| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 | 11 |
| 12 #include "vpx_ports/config.h" | 12 #include "./vpx_config.h" |
| 13 #include "vpx_ports/mem.h" | 13 #include "vpx_ports/mem.h" |
| 14 #include "vp9/common/vp9_subpixel.h" | 14 #include "vp9/common/vp9_subpixel.h" |
| 15 | 15 |
| 16 extern const short vp9_six_tap_mmx[8][6 * 8]; | 16 extern const short vp9_six_tap_mmx[8][6 * 8]; |
| 17 | 17 |
| 18 extern const short vp9_bilinear_filters_8x_mmx[8][2 * 8]; | |
| 19 | |
| 20 extern void vp9_filter_block1d_h6_mmx(unsigned char *src_ptr, | 18 extern void vp9_filter_block1d_h6_mmx(unsigned char *src_ptr, |
| 21 unsigned short *output_ptr, | 19 unsigned short *output_ptr, |
| 22 unsigned int src_pixels_per_line, | 20 unsigned int src_pixels_per_line, |
| 23 unsigned int pixel_step, | 21 unsigned int pixel_step, |
| 24 unsigned int output_height, | 22 unsigned int output_height, |
| 25 unsigned int output_width, | 23 unsigned int output_width, |
| 26 const short *vp9_filter); | 24 const short *vp9_filter); |
| 27 | 25 |
| 28 extern void vp9_filter_block1dc_v6_mmx(unsigned short *src_ptr, | 26 extern void vp9_filter_block1dc_v6_mmx(unsigned short *src_ptr, |
| 29 unsigned char *output_ptr, | 27 unsigned char *output_ptr, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 unsigned int output_height, | 86 unsigned int output_height, |
| 89 const short *vp9_filter); | 87 const short *vp9_filter); |
| 90 | 88 |
| 91 extern void vp9_filter_block1d8_v6_only_sse2(unsigned char *src_ptr, | 89 extern void vp9_filter_block1d8_v6_only_sse2(unsigned char *src_ptr, |
| 92 unsigned int src_pixels_per_line, | 90 unsigned int src_pixels_per_line, |
| 93 unsigned char *output_ptr, | 91 unsigned char *output_ptr, |
| 94 int dst_pitch, | 92 int dst_pitch, |
| 95 unsigned int output_height, | 93 unsigned int output_height, |
| 96 const short *vp9_filter); | 94 const short *vp9_filter); |
| 97 | 95 |
| 98 extern prototype_subpixel_predict(vp9_bilinear_predict8x8_mmx); | |
| 99 | |
| 100 /////////////////////////////////////////////////////////////////////////// | 96 /////////////////////////////////////////////////////////////////////////// |
| 101 // the mmx function that does the bilinear filtering and var calculation // | 97 // the mmx function that does the bilinear filtering and var calculation // |
| 102 // int one pass // | 98 // int one pass // |
| 103 /////////////////////////////////////////////////////////////////////////// | 99 /////////////////////////////////////////////////////////////////////////// |
| 104 DECLARE_ALIGNED(16, const short, vp9_bilinear_filters_mmx[16][8]) = { | 100 DECLARE_ALIGNED(16, const short, vp9_bilinear_filters_mmx[16][8]) = { |
| 105 { 128, 128, 128, 128, 0, 0, 0, 0 }, | 101 { 128, 128, 128, 128, 0, 0, 0, 0 }, |
| 106 { 120, 120, 120, 120, 8, 8, 8, 8 }, | 102 { 120, 120, 120, 120, 8, 8, 8, 8 }, |
| 107 { 112, 112, 112, 112, 16, 16, 16, 16 }, | 103 { 112, 112, 112, 112, 16, 16, 16, 16 }, |
| 108 { 104, 104, 104, 104, 24, 24, 24, 24 }, | 104 { 104, 104, 104, 104, 24, 24, 24, 24 }, |
| 109 { 96, 96, 96, 96, 32, 32, 32, 32 }, | 105 { 96, 96, 96, 96, 32, 32, 32, 32 }, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 fdata2, src_pixels_per_line, 1, 9, 16, hfilter); | 221 fdata2, src_pixels_per_line, 1, 9, 16, hfilter); |
| 226 vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4, | 222 vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4, |
| 227 fdata2 + 4, src_pixels_per_line, 1, 9, 16, hfilter); | 223 fdata2 + 4, src_pixels_per_line, 1, 9, 16, hfilter); |
| 228 | 224 |
| 229 vfilter = vp9_six_tap_mmx[yoffset]; | 225 vfilter = vp9_six_tap_mmx[yoffset]; |
| 230 vp9_filter_block1dc_v6_mmx(fdata2 + 16, dst_ptr, dst_pitch, | 226 vp9_filter_block1dc_v6_mmx(fdata2 + 16, dst_ptr, dst_pitch, |
| 231 16, 8, 4, 8, vfilter); | 227 16, 8, 4, 8, vfilter); |
| 232 vp9_filter_block1dc_v6_mmx(fdata2 + 20, dst_ptr + 4, dst_pitch, | 228 vp9_filter_block1dc_v6_mmx(fdata2 + 20, dst_ptr + 4, dst_pitch, |
| 233 16, 8, 4, 8, vfilter); | 229 16, 8, 4, 8, vfilter); |
| 234 } | 230 } |
| 235 | |
| 236 void vp9_bilinear_predict16x16_mmx(unsigned char *src_ptr, | |
| 237 int src_pixels_per_line, | |
| 238 int xoffset, | |
| 239 int yoffset, | |
| 240 unsigned char *dst_ptr, | |
| 241 int dst_pitch) { | |
| 242 vp9_bilinear_predict8x8_mmx(src_ptr, | |
| 243 src_pixels_per_line, xoffset, yoffset, | |
| 244 dst_ptr, dst_pitch); | |
| 245 vp9_bilinear_predict8x8_mmx(src_ptr + 8, | |
| 246 src_pixels_per_line, xoffset, yoffset, | |
| 247 dst_ptr + 8, dst_pitch); | |
| 248 vp9_bilinear_predict8x8_mmx(src_ptr + 8 * src_pixels_per_line, | |
| 249 src_pixels_per_line, xoffset, yoffset, | |
| 250 dst_ptr + dst_pitch * 8, dst_pitch); | |
| 251 vp9_bilinear_predict8x8_mmx(src_ptr + 8 * src_pixels_per_line + 8, | |
| 252 src_pixels_per_line, xoffset, yoffset, | |
| 253 dst_ptr + dst_pitch * 8 + 8, dst_pitch); | |
| 254 } | |
| 255 #endif | 231 #endif |
| 256 | 232 |
| 257 #if HAVE_SSE2 | 233 #if HAVE_SSE2 |
| 258 void vp9_sixtap_predict16x16_sse2(unsigned char *src_ptr, | 234 void vp9_sixtap_predict16x16_sse2(unsigned char *src_ptr, |
| 259 int src_pixels_per_line, | 235 int src_pixels_per_line, |
| 260 int xoffset, | 236 int xoffset, |
| 261 int yoffset, | 237 int yoffset, |
| 262 unsigned char *dst_ptr, | 238 unsigned char *dst_ptr, |
| 263 int dst_pitch) { | 239 int dst_pitch) { |
| 264 /* Temp data bufffer used in filtering */ | 240 /* Temp data bufffer used in filtering */ |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 if (hfilter_aligned16[3] != 128) { | 592 if (hfilter_aligned16[3] != 128) { |
| 617 vp9_filter_block1d8_h8_ssse3(src_ptr, src_stride, dst_ptr, dst_stride, 4, | 593 vp9_filter_block1d8_h8_ssse3(src_ptr, src_stride, dst_ptr, dst_stride, 4, |
| 618 hfilter_aligned16); | 594 hfilter_aligned16); |
| 619 } else { | 595 } else { |
| 620 vp9_filter_block1d8_v8_ssse3(src_ptr - (3 * src_stride), src_stride, | 596 vp9_filter_block1d8_v8_ssse3(src_ptr - (3 * src_stride), src_stride, |
| 621 dst_ptr, dst_stride, 4, vfilter_aligned16); | 597 dst_ptr, dst_stride, 4, vfilter_aligned16); |
| 622 } | 598 } |
| 623 } | 599 } |
| 624 } | 600 } |
| 625 #endif | 601 #endif |
| OLD | NEW |