aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_idet.c
diff options
context:
space:
mode:
authorPascal Massimino <pascal.massimino@gmail.com>2014-09-09 14:38:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-09 16:47:22 +0200
commite3fd6a3a4e3d28d8a50bb6ec3e19449bc4e0d3db (patch)
tree4706c3e78a5046f13e80142b1f12cbbc0756e2b6 /libavfilter/vf_idet.c
parent881f96c4c2ef0c0162f63a370cbfff3c1e1feb2a (diff)
downloadffmpeg-e3fd6a3a4e3d28d8a50bb6ec3e19449bc4e0d3db.tar.gz
av_filter/x86/idet: MMX/SSE2 implementation of 16bits filter_line()
tested on http://ps-auxw.de/10bit-h264-sample/10bit-eldorado.mkv MMX: ~30% faster decoding overall SSE2:~40% faster Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_idet.c')
-rw-r--r--libavfilter/vf_idet.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index 4416228431..22ff494dfb 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -61,7 +61,7 @@ int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c,
return ret;
}
-static int filter_line_c_16bit(const uint16_t *a, const uint16_t *b, const uint16_t *c, int w)
+int ff_idet_filter_line_c_16bit(const uint16_t *a, const uint16_t *b, const uint16_t *c, int w)
{
int x;
int ret=0;
@@ -169,8 +169,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
if (!idet->csp)
idet->csp = av_pix_fmt_desc_get(link->format);
- if (idet->csp->comp[0].depth_minus1 / 8 == 1)
- idet->filter_line = (void*)filter_line_c_16bit;
+ if (idet->csp->comp[0].depth_minus1 / 8 == 1){
+ idet->filter_line = (ff_idet_filter_func)ff_idet_filter_line_c_16bit;
+ if (ARCH_X86)
+ ff_idet_init_x86(idet, 1);
+ }
filter(ctx);
@@ -245,7 +248,7 @@ static av_cold int init(AVFilterContext *ctx)
idet->filter_line = ff_idet_filter_line_c;
if (ARCH_X86)
- ff_idet_init_x86(idet);
+ ff_idet_init_x86(idet, 0);
return 0;
}