aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2016-11-05 13:18:53 +0200
committerMartin Storsjö <martin@martin.st>2016-11-10 11:05:57 +0200
commita4cfcddcb0f76e837d5abc06840c2b26c0e8aefc (patch)
tree4379598c2fce748bdc36a4565e9a8a904a96084e
parent98cae966c77875e26c5958206a6cfe7eba6269e8 (diff)
downloadffmpeg-a4cfcddcb0f76e837d5abc06840c2b26c0e8aefc.tar.gz
vp9: Make the subpel filters non-static
Make them aligned, to allow efficient access to them from simd. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavcodec/vp9.h2
-rw-r--r--libavcodec/vp9dsp.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/vp9.h b/libavcodec/vp9.h
index e4b9f82689..654c8ed09c 100644
--- a/libavcodec/vp9.h
+++ b/libavcodec/vp9.h
@@ -431,6 +431,8 @@ typedef struct VP9Context {
DECLARE_ALIGNED(32, uint8_t, tmp_uv)[2][32 * 32];
} VP9Context;
+extern const int8_t ff_vp9_subpel_filters[3][15][8];
+
void ff_vp9dsp_init(VP9DSPContext *dsp);
void ff_vp9dsp_init_arm(VP9DSPContext *dsp);
diff --git a/libavcodec/vp9dsp.c b/libavcodec/vp9dsp.c
index 0eca389de6..a2862bd1dc 100644
--- a/libavcodec/vp9dsp.c
+++ b/libavcodec/vp9dsp.c
@@ -1786,7 +1786,7 @@ copy_avg_fn(4)
#undef fpel_fn
#undef copy_avg_fn
-static const int8_t vp9_subpel_filters[3][15][8] = {
+const DECLARE_ALIGNED(8, int8_t, ff_vp9_subpel_filters)[3][15][8] = {
[FILTER_8TAP_REGULAR] = {
{ 0, 1, -5, 126, 8, -3, 1, 0 },
{ -1, 3, -10, 122, 18, -6, 2, 0 },
@@ -1948,7 +1948,7 @@ avg ## _8tap_ ## type ## _ ## sz ## dir ## _c(uint8_t *dst, \
int h, int mx, int my) \
{ \
avg ## _8tap_1d_ ## dir ## _c(dst, dst_stride, src, src_stride, sz, h, \
- vp9_subpel_filters[type_idx][dir_m - 1]); \
+ ff_vp9_subpel_filters[type_idx][dir_m - 1]); \
}
#define filter_fn_2d(sz, type, type_idx, avg) \
@@ -1959,8 +1959,8 @@ static void avg ## _8tap_ ## type ## _ ## sz ## hv_c(uint8_t *dst, \
int h, int mx, int my) \
{ \
avg ## _8tap_2d_hv_c(dst, dst_stride, src, src_stride, sz, h, \
- vp9_subpel_filters[type_idx][mx - 1], \
- vp9_subpel_filters[type_idx][my - 1]); \
+ ff_vp9_subpel_filters[type_idx][mx - 1], \
+ ff_vp9_subpel_filters[type_idx][my - 1]); \
}
#define FILTER_BILIN(src, x, mxy, stride) \