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_config.h" | 12 #include "vpx_config.h" |
13 #include "vp8_rtcd.h" | 13 #include "vp8_rtcd.h" |
14 #include "vp8/common/loopfilter.h" | 14 #include "vp8/common/loopfilter.h" |
15 #include "vp8/common/onyxc_int.h" | 15 #include "vp8/common/onyxc_int.h" |
16 | 16 |
17 #define prototype_loopfilter(sym) \ | 17 #define prototype_loopfilter(sym) \ |
18 void sym(unsigned char *src, int pitch, const unsigned char *blimit,\ | 18 void sym(unsigned char *src, int pitch, const unsigned char *blimit,\ |
19 const unsigned char *limit, const unsigned char *thresh, int count) | 19 const unsigned char *limit, const unsigned char *thresh, int count) |
20 | 20 |
21 #if HAVE_MEDIA | 21 #if HAVE_MEDIA |
22 extern prototype_loopfilter(vp8_loop_filter_horizontal_edge_armv6); | 22 extern prototype_loopfilter(vp8_loop_filter_horizontal_edge_armv6); |
23 extern prototype_loopfilter(vp8_loop_filter_vertical_edge_armv6); | 23 extern prototype_loopfilter(vp8_loop_filter_vertical_edge_armv6); |
24 extern prototype_loopfilter(vp8_mbloop_filter_horizontal_edge_armv6); | 24 extern prototype_loopfilter(vp8_mbloop_filter_horizontal_edge_armv6); |
25 extern prototype_loopfilter(vp8_mbloop_filter_vertical_edge_armv6); | 25 extern prototype_loopfilter(vp8_mbloop_filter_vertical_edge_armv6); |
26 #endif | 26 #endif |
27 | 27 |
28 #if HAVE_NEON | 28 #if HAVE_NEON_ASM || HAVE_NEON |
29 typedef void loopfilter_y_neon(unsigned char *src, int pitch, | 29 typedef void loopfilter_y_neon(unsigned char *src, int pitch, |
30 unsigned char blimit, unsigned char limit, unsigned char thresh); | 30 unsigned char blimit, unsigned char limit, unsigned char thresh); |
31 typedef void loopfilter_uv_neon(unsigned char *u, int pitch, | 31 typedef void loopfilter_uv_neon(unsigned char *u, int pitch, |
32 unsigned char blimit, unsigned char limit, unsigned char thresh, | 32 unsigned char blimit, unsigned char limit, unsigned char thresh, |
33 unsigned char *v); | 33 unsigned char *v); |
| 34 #endif |
34 | 35 |
| 36 #if HAVE_NEON_ASM |
35 extern loopfilter_y_neon vp8_loop_filter_horizontal_edge_y_neon; | 37 extern loopfilter_y_neon vp8_loop_filter_horizontal_edge_y_neon; |
36 extern loopfilter_y_neon vp8_loop_filter_vertical_edge_y_neon; | 38 extern loopfilter_y_neon vp8_loop_filter_vertical_edge_y_neon; |
| 39 extern loopfilter_uv_neon vp8_loop_filter_horizontal_edge_uv_neon; |
| 40 extern loopfilter_uv_neon vp8_loop_filter_vertical_edge_uv_neon; |
| 41 #endif |
| 42 |
| 43 #if HAVE_NEON |
37 extern loopfilter_y_neon vp8_mbloop_filter_horizontal_edge_y_neon; | 44 extern loopfilter_y_neon vp8_mbloop_filter_horizontal_edge_y_neon; |
38 extern loopfilter_y_neon vp8_mbloop_filter_vertical_edge_y_neon; | 45 extern loopfilter_y_neon vp8_mbloop_filter_vertical_edge_y_neon; |
39 | |
40 extern loopfilter_uv_neon vp8_loop_filter_horizontal_edge_uv_neon; | |
41 extern loopfilter_uv_neon vp8_loop_filter_vertical_edge_uv_neon; | |
42 extern loopfilter_uv_neon vp8_mbloop_filter_horizontal_edge_uv_neon; | 46 extern loopfilter_uv_neon vp8_mbloop_filter_horizontal_edge_uv_neon; |
43 extern loopfilter_uv_neon vp8_mbloop_filter_vertical_edge_uv_neon; | 47 extern loopfilter_uv_neon vp8_mbloop_filter_vertical_edge_uv_neon; |
44 #endif | 48 #endif |
45 | 49 |
46 #if HAVE_MEDIA | 50 #if HAVE_MEDIA |
47 /* ARMV6/MEDIA loopfilter functions*/ | 51 /* ARMV6/MEDIA loopfilter functions*/ |
48 /* Horizontal MB filtering */ | 52 /* Horizontal MB filtering */ |
49 void vp8_loop_filter_mbh_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsig
ned char *v_ptr, | 53 void vp8_loop_filter_mbh_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsig
ned char *v_ptr, |
50 int y_stride, int uv_stride, loop_filter_info *lf
i) | 54 int y_stride, int uv_stride, loop_filter_info *lf
i) |
51 { | 55 { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 { | 143 { |
140 unsigned char mblim = *lfi->mblim; | 144 unsigned char mblim = *lfi->mblim; |
141 unsigned char lim = *lfi->lim; | 145 unsigned char lim = *lfi->lim; |
142 unsigned char hev_thr = *lfi->hev_thr; | 146 unsigned char hev_thr = *lfi->hev_thr; |
143 | 147 |
144 vp8_mbloop_filter_vertical_edge_y_neon(y_ptr, y_stride, mblim, lim, hev_thr)
; | 148 vp8_mbloop_filter_vertical_edge_y_neon(y_ptr, y_stride, mblim, lim, hev_thr)
; |
145 | 149 |
146 if (u_ptr) | 150 if (u_ptr) |
147 vp8_mbloop_filter_vertical_edge_uv_neon(u_ptr, uv_stride, mblim, lim, he
v_thr, v_ptr); | 151 vp8_mbloop_filter_vertical_edge_uv_neon(u_ptr, uv_stride, mblim, lim, he
v_thr, v_ptr); |
148 } | 152 } |
| 153 #endif |
149 | 154 |
| 155 #if HAVE_NEON_ASM |
150 /* Horizontal B Filtering */ | 156 /* Horizontal B Filtering */ |
151 void vp8_loop_filter_bh_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsigne
d char *v_ptr, | 157 void vp8_loop_filter_bh_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsigne
d char *v_ptr, |
152 int y_stride, int uv_stride, loop_filter_info *lfi) | 158 int y_stride, int uv_stride, loop_filter_info *lfi) |
153 { | 159 { |
154 unsigned char blim = *lfi->blim; | 160 unsigned char blim = *lfi->blim; |
155 unsigned char lim = *lfi->lim; | 161 unsigned char lim = *lfi->lim; |
156 unsigned char hev_thr = *lfi->hev_thr; | 162 unsigned char hev_thr = *lfi->hev_thr; |
157 | 163 |
158 vp8_loop_filter_horizontal_edge_y_neon(y_ptr + 4 * y_stride, y_stride, blim,
lim, hev_thr); | 164 vp8_loop_filter_horizontal_edge_y_neon(y_ptr + 4 * y_stride, y_stride, blim,
lim, hev_thr); |
159 vp8_loop_filter_horizontal_edge_y_neon(y_ptr + 8 * y_stride, y_stride, blim,
lim, hev_thr); | 165 vp8_loop_filter_horizontal_edge_y_neon(y_ptr + 8 * y_stride, y_stride, blim,
lim, hev_thr); |
(...skipping 12 matching lines...) Expand all Loading... |
172 unsigned char hev_thr = *lfi->hev_thr; | 178 unsigned char hev_thr = *lfi->hev_thr; |
173 | 179 |
174 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 4, y_stride, blim, lim, hev_thr
); | 180 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 4, y_stride, blim, lim, hev_thr
); |
175 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 8, y_stride, blim, lim, hev_thr
); | 181 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 8, y_stride, blim, lim, hev_thr
); |
176 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 12, y_stride, blim, lim, hev_th
r); | 182 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 12, y_stride, blim, lim, hev_th
r); |
177 | 183 |
178 if (u_ptr) | 184 if (u_ptr) |
179 vp8_loop_filter_vertical_edge_uv_neon(u_ptr + 4, uv_stride, blim, lim, h
ev_thr, v_ptr + 4); | 185 vp8_loop_filter_vertical_edge_uv_neon(u_ptr + 4, uv_stride, blim, lim, h
ev_thr, v_ptr + 4); |
180 } | 186 } |
181 #endif | 187 #endif |
OLD | NEW |