summaryrefslogtreecommitdiff
path: root/libavcodec/hevcpred_template.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-05-17 20:41:22 +0200
committerAnton Khirnov <anton@khirnov.net>2014-05-19 07:10:03 +0200
commita1c2b48018b09d2613f075ec0748c95bd520ac00 (patch)
tree49de2ee15d4718ddcf9139a87d2be32230bb8f7e /libavcodec/hevcpred_template.c
parent04db5794cd97e4b33ec2f963ef7f967722a456eb (diff)
hevc: templatize intra_pred
Diffstat (limited to 'libavcodec/hevcpred_template.c')
-rw-r--r--libavcodec/hevcpred_template.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libavcodec/hevcpred_template.c b/libavcodec/hevcpred_template.c
index 19ca96dd19..2e1a886895 100644
--- a/libavcodec/hevcpred_template.c
+++ b/libavcodec/hevcpred_template.c
@@ -28,7 +28,8 @@
#define POS(x, y) src[(x) + stride * (y)]
-static void FUNC(intra_pred)(HEVCContext *s, int x0, int y0, int log2_size, int c_idx)
+static av_always_inline void FUNC(intra_pred)(HEVCContext *s, int x0, int y0,
+ int log2_size, int c_idx)
{
#define PU(x) \
((x) >> s->sps->log2_min_pu_size)
@@ -349,6 +350,19 @@ static void FUNC(intra_pred)(HEVCContext *s, int x0, int y0, int log2_size, int
}
}
+#define INTRA_PRED(size) \
+static void FUNC(intra_pred_ ## size)(HEVCContext *s, int x0, int y0, int c_idx) \
+{ \
+ FUNC(intra_pred)(s, x0, y0, size, c_idx); \
+}
+
+INTRA_PRED(2)
+INTRA_PRED(3)
+INTRA_PRED(4)
+INTRA_PRED(5)
+
+#undef INTRA_PRED
+
static av_always_inline void FUNC(pred_planar)(uint8_t *_src, const uint8_t *_top,
const uint8_t *_left, ptrdiff_t stride,
int trafo_size)