| 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_ASM || HAVE_NEON | 28 #if 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 | |
| 35 | 34 |
| 36 #if HAVE_NEON_ASM | |
| 37 extern loopfilter_y_neon vp8_loop_filter_horizontal_edge_y_neon; | 35 extern loopfilter_y_neon vp8_loop_filter_horizontal_edge_y_neon; |
| 38 extern loopfilter_y_neon vp8_loop_filter_vertical_edge_y_neon; | 36 extern loopfilter_y_neon vp8_loop_filter_vertical_edge_y_neon; |
| 39 extern loopfilter_uv_neon vp8_loop_filter_horizontal_edge_uv_neon; | 37 extern loopfilter_uv_neon vp8_loop_filter_horizontal_edge_uv_neon; |
| 40 extern loopfilter_uv_neon vp8_loop_filter_vertical_edge_uv_neon; | 38 extern loopfilter_uv_neon vp8_loop_filter_vertical_edge_uv_neon; |
| 41 #endif | |
| 42 | 39 |
| 43 #if HAVE_NEON | |
| 44 extern loopfilter_y_neon vp8_mbloop_filter_horizontal_edge_y_neon; | 40 extern loopfilter_y_neon vp8_mbloop_filter_horizontal_edge_y_neon; |
| 45 extern loopfilter_y_neon vp8_mbloop_filter_vertical_edge_y_neon; | 41 extern loopfilter_y_neon vp8_mbloop_filter_vertical_edge_y_neon; |
| 46 extern loopfilter_uv_neon vp8_mbloop_filter_horizontal_edge_uv_neon; | 42 extern loopfilter_uv_neon vp8_mbloop_filter_horizontal_edge_uv_neon; |
| 47 extern loopfilter_uv_neon vp8_mbloop_filter_vertical_edge_uv_neon; | 43 extern loopfilter_uv_neon vp8_mbloop_filter_vertical_edge_uv_neon; |
| 48 #endif | 44 #endif |
| 49 | 45 |
| 50 #if HAVE_MEDIA | 46 #if HAVE_MEDIA |
| 51 /* ARMV6/MEDIA loopfilter functions*/ | 47 /* ARMV6/MEDIA loopfilter functions*/ |
| 52 /* Horizontal MB filtering */ | 48 /* Horizontal MB filtering */ |
| 53 void vp8_loop_filter_mbh_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsig
ned char *v_ptr, | 49 void vp8_loop_filter_mbh_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsig
ned char *v_ptr, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 { | 139 { |
| 144 unsigned char mblim = *lfi->mblim; | 140 unsigned char mblim = *lfi->mblim; |
| 145 unsigned char lim = *lfi->lim; | 141 unsigned char lim = *lfi->lim; |
| 146 unsigned char hev_thr = *lfi->hev_thr; | 142 unsigned char hev_thr = *lfi->hev_thr; |
| 147 | 143 |
| 148 vp8_mbloop_filter_vertical_edge_y_neon(y_ptr, y_stride, mblim, lim, hev_thr)
; | 144 vp8_mbloop_filter_vertical_edge_y_neon(y_ptr, y_stride, mblim, lim, hev_thr)
; |
| 149 | 145 |
| 150 if (u_ptr) | 146 if (u_ptr) |
| 151 vp8_mbloop_filter_vertical_edge_uv_neon(u_ptr, uv_stride, mblim, lim, he
v_thr, v_ptr); | 147 vp8_mbloop_filter_vertical_edge_uv_neon(u_ptr, uv_stride, mblim, lim, he
v_thr, v_ptr); |
| 152 } | 148 } |
| 153 #endif | |
| 154 | 149 |
| 155 #if HAVE_NEON_ASM | |
| 156 /* Horizontal B Filtering */ | 150 /* Horizontal B Filtering */ |
| 157 void vp8_loop_filter_bh_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsigne
d char *v_ptr, | 151 void vp8_loop_filter_bh_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsigne
d char *v_ptr, |
| 158 int y_stride, int uv_stride, loop_filter_info *lfi) | 152 int y_stride, int uv_stride, loop_filter_info *lfi) |
| 159 { | 153 { |
| 160 unsigned char blim = *lfi->blim; | 154 unsigned char blim = *lfi->blim; |
| 161 unsigned char lim = *lfi->lim; | 155 unsigned char lim = *lfi->lim; |
| 162 unsigned char hev_thr = *lfi->hev_thr; | 156 unsigned char hev_thr = *lfi->hev_thr; |
| 163 | 157 |
| 164 vp8_loop_filter_horizontal_edge_y_neon(y_ptr + 4 * y_stride, y_stride, blim,
lim, hev_thr); | 158 vp8_loop_filter_horizontal_edge_y_neon(y_ptr + 4 * 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); | 159 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... |
| 178 unsigned char hev_thr = *lfi->hev_thr; | 172 unsigned char hev_thr = *lfi->hev_thr; |
| 179 | 173 |
| 180 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 4, y_stride, blim, lim, hev_thr
); | 174 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 4, y_stride, blim, lim, hev_thr
); |
| 181 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 8, y_stride, blim, lim, hev_thr
); | 175 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 8, y_stride, blim, lim, hev_thr
); |
| 182 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 12, y_stride, blim, lim, hev_th
r); | 176 vp8_loop_filter_vertical_edge_y_neon(y_ptr + 12, y_stride, blim, lim, hev_th
r); |
| 183 | 177 |
| 184 if (u_ptr) | 178 if (u_ptr) |
| 185 vp8_loop_filter_vertical_edge_uv_neon(u_ptr + 4, uv_stride, blim, lim, h
ev_thr, v_ptr + 4); | 179 vp8_loop_filter_vertical_edge_uv_neon(u_ptr + 4, uv_stride, blim, lim, h
ev_thr, v_ptr + 4); |
| 186 } | 180 } |
| 187 #endif | 181 #endif |
| OLD | NEW |