Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: source/libvpx/vp8/common/arm/variance_arm.c

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/vp8/common/arm/neon/variance_neon.c ('k') | source/libvpx/vp8/common/copy_c.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "vpx_config.h" 11 #include "vpx_config.h"
12 #include "vp8_rtcd.h" 12 #include "./vp8_rtcd.h"
13 #include "./vpx_dsp_rtcd.h"
13 #include "vp8/common/variance.h" 14 #include "vp8/common/variance.h"
14 #include "vp8/common/filter.h" 15 #include "vp8/common/filter.h"
15 16
17 // TODO(johannkoenig): Move this to vpx_dsp or vp8/encoder
18 #if CONFIG_VP8_ENCODER
19
16 #if HAVE_MEDIA 20 #if HAVE_MEDIA
17 #include "vp8/common/arm/bilinearfilter_arm.h" 21 #include "vp8/common/arm/bilinearfilter_arm.h"
18 22
19 unsigned int vp8_sub_pixel_variance8x8_armv6 23 unsigned int vp8_sub_pixel_variance8x8_armv6
20 ( 24 (
21 const unsigned char *src_ptr, 25 const unsigned char *src_ptr,
22 int src_pixels_per_line, 26 int src_pixels_per_line,
23 int xoffset, 27 int xoffset,
24 int yoffset, 28 int yoffset,
25 const unsigned char *dst_ptr, 29 const unsigned char *dst_ptr,
26 int dst_pixels_per_line, 30 int dst_pixels_per_line,
27 unsigned int *sse 31 unsigned int *sse
28 ) 32 )
29 { 33 {
30 unsigned short first_pass[10*8]; 34 unsigned short first_pass[10*8];
31 unsigned char second_pass[8*8]; 35 unsigned char second_pass[8*8];
32 const short *HFilter, *VFilter; 36 const short *HFilter, *VFilter;
33 37
34 HFilter = vp8_bilinear_filters[xoffset]; 38 HFilter = vp8_bilinear_filters[xoffset];
35 VFilter = vp8_bilinear_filters[yoffset]; 39 VFilter = vp8_bilinear_filters[yoffset];
36 40
37 vp8_filter_block2d_bil_first_pass_armv6(src_ptr, first_pass, 41 vp8_filter_block2d_bil_first_pass_armv6(src_ptr, first_pass,
38 src_pixels_per_line, 42 src_pixels_per_line,
39 9, 8, HFilter); 43 9, 8, HFilter);
40 vp8_filter_block2d_bil_second_pass_armv6(first_pass, second_pass, 44 vp8_filter_block2d_bil_second_pass_armv6(first_pass, second_pass,
41 8, 8, 8, VFilter); 45 8, 8, 8, VFilter);
42 46
43 return vp8_variance8x8_armv6(second_pass, 8, dst_ptr, 47 return vpx_variance8x8_media(second_pass, 8, dst_ptr,
44 dst_pixels_per_line, sse); 48 dst_pixels_per_line, sse);
45 } 49 }
46 50
47 unsigned int vp8_sub_pixel_variance16x16_armv6 51 unsigned int vp8_sub_pixel_variance16x16_armv6
48 ( 52 (
49 const unsigned char *src_ptr, 53 const unsigned char *src_ptr,
50 int src_pixels_per_line, 54 int src_pixels_per_line,
51 int xoffset, 55 int xoffset,
52 int yoffset, 56 int yoffset,
53 const unsigned char *dst_ptr, 57 const unsigned char *dst_ptr,
54 int dst_pixels_per_line, 58 int dst_pixels_per_line,
(...skipping 24 matching lines...) Expand all
79 { 83 {
80 HFilter = vp8_bilinear_filters[xoffset]; 84 HFilter = vp8_bilinear_filters[xoffset];
81 VFilter = vp8_bilinear_filters[yoffset]; 85 VFilter = vp8_bilinear_filters[yoffset];
82 86
83 vp8_filter_block2d_bil_first_pass_armv6(src_ptr, first_pass, 87 vp8_filter_block2d_bil_first_pass_armv6(src_ptr, first_pass,
84 src_pixels_per_line, 88 src_pixels_per_line,
85 17, 16, HFilter); 89 17, 16, HFilter);
86 vp8_filter_block2d_bil_second_pass_armv6(first_pass, second_pass, 90 vp8_filter_block2d_bil_second_pass_armv6(first_pass, second_pass,
87 16, 16, 16, VFilter); 91 16, 16, 16, VFilter);
88 92
89 var = vp8_variance16x16_armv6(second_pass, 16, dst_ptr, 93 var = vpx_variance16x16_media(second_pass, 16, dst_ptr,
90 dst_pixels_per_line, sse); 94 dst_pixels_per_line, sse);
91 } 95 }
92 return var; 96 return var;
93 } 97 }
94 98
95 #endif /* HAVE_MEDIA */ 99 #endif // HAVE_MEDIA
96 100
97 101
98 #if HAVE_NEON 102 #if HAVE_NEON
99 103
100 extern unsigned int vp8_sub_pixel_variance16x16_neon_func 104 extern unsigned int vp8_sub_pixel_variance16x16_neon_func
101 ( 105 (
102 const unsigned char *src_ptr, 106 const unsigned char *src_ptr,
103 int src_pixels_per_line, 107 int src_pixels_per_line,
104 int xoffset, 108 int xoffset,
105 int yoffset, 109 int yoffset,
(...skipping 16 matching lines...) Expand all
122 if (xoffset == 4 && yoffset == 0) 126 if (xoffset == 4 && yoffset == 0)
123 return vp8_variance_halfpixvar16x16_h_neon(src_ptr, src_pixels_per_line, dst _ptr, dst_pixels_per_line, sse); 127 return vp8_variance_halfpixvar16x16_h_neon(src_ptr, src_pixels_per_line, dst _ptr, dst_pixels_per_line, sse);
124 else if (xoffset == 0 && yoffset == 4) 128 else if (xoffset == 0 && yoffset == 4)
125 return vp8_variance_halfpixvar16x16_v_neon(src_ptr, src_pixels_per_line, dst _ptr, dst_pixels_per_line, sse); 129 return vp8_variance_halfpixvar16x16_v_neon(src_ptr, src_pixels_per_line, dst _ptr, dst_pixels_per_line, sse);
126 else if (xoffset == 4 && yoffset == 4) 130 else if (xoffset == 4 && yoffset == 4)
127 return vp8_variance_halfpixvar16x16_hv_neon(src_ptr, src_pixels_per_line, ds t_ptr, dst_pixels_per_line, sse); 131 return vp8_variance_halfpixvar16x16_hv_neon(src_ptr, src_pixels_per_line, ds t_ptr, dst_pixels_per_line, sse);
128 else 132 else
129 return vp8_sub_pixel_variance16x16_neon_func(src_ptr, src_pixels_per_line, x offset, yoffset, dst_ptr, dst_pixels_per_line, sse); 133 return vp8_sub_pixel_variance16x16_neon_func(src_ptr, src_pixels_per_line, x offset, yoffset, dst_ptr, dst_pixels_per_line, sse);
130 } 134 }
131 135
132 #endif 136 #endif // HAVE_NEON
137 #endif // CONFIG_VP8_ENCODER
OLDNEW
« no previous file with comments | « source/libvpx/vp8/common/arm/neon/variance_neon.c ('k') | source/libvpx/vp8/common/copy_c.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698