From 5e1ba34bbba7b50c45ef0d10350fe01a3cf63290 Mon Sep 17 00:00:00 2001 From: Måns Rullgård Date: Fri, 30 Apr 2010 21:30:22 +0000 Subject: VP56: move vp56_edge_filter to new VP56DSPContext Using macro templates allows the vp[56]_adjust functions to be inlined instead of called through function pointers. The new function pointers enable optimised implementations of the filters. 4% faster VP6 decoding on Cortex-A8. Originally committed as revision 22992 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/vp5.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'libavcodec/vp5.c') diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c index f7177cafbf..1479344ba4 100644 --- a/libavcodec/vp5.c +++ b/libavcodec/vp5.c @@ -69,23 +69,6 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size, return 1; } -/* Gives very similar result than the vp6 version except in a few cases */ -static int vp5_adjust(int v, int t) -{ - int s2, s1 = v >> 31; - v ^= s1; - v -= s1; - v *= v < 2*t; - v -= t; - s2 = v >> 31; - v ^= s2; - v -= s2; - v = t - v; - v += s1; - v ^= s1; - return v; -} - static void vp5_parse_vector_adjustment(VP56Context *s, VP56mv *vect) { VP56RangeCoder *c = &s->c; @@ -274,7 +257,6 @@ static av_cold int vp5_decode_init(AVCodecContext *avctx) vp56_init(avctx, 1, 0); s->vp56_coord_div = vp5_coord_div; s->parse_vector_adjustment = vp5_parse_vector_adjustment; - s->adjust = vp5_adjust; s->parse_coeff = vp5_parse_coeff; s->default_models_init = vp5_default_models_init; s->parse_vector_models = vp5_parse_vector_models; -- cgit v1.2.3