diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-10 00:56:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-10 01:22:14 +0200 |
commit | 2d5e9451de3c7ab00cac6ec4aff290e12a2f190d (patch) | |
tree | 9934a09e3ad1f63796274ee59f216df19cd9ca02 /libavfilter/vf_mpdecimate.c | |
parent | 6cc1fec41263add956b35af96d7c4a81c9436a65 (diff) | |
parent | f46bb608d9d76c543e4929dc8cffe36b84bd789e (diff) | |
download | ffmpeg-2d5e9451de3c7ab00cac6ec4aff290e12a2f190d.tar.gz |
Merge commit 'f46bb608d9d76c543e4929dc8cffe36b84bd789e'
* commit 'f46bb608d9d76c543e4929dc8cffe36b84bd789e':
dsputil: Split off pixel block routines into their own context
Conflicts:
configure
libavcodec/dsputil.c
libavcodec/mpegvideo_enc.c
libavcodec/pixblockdsp_template.c
libavcodec/x86/dsputilenc.asm
libavcodec/x86/dsputilenc_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_mpdecimate.c')
-rw-r--r-- | libavfilter/vf_mpdecimate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/vf_mpdecimate.c b/libavfilter/vf_mpdecimate.c index 099622a029..c667a9f4cc 100644 --- a/libavfilter/vf_mpdecimate.c +++ b/libavfilter/vf_mpdecimate.c @@ -28,6 +28,7 @@ #include "libavutil/pixdesc.h" #include "libavutil/timestamp.h" #include "libavcodec/dsputil.h" +#include "libavcodec/pixblockdsp.h" #include "avfilter.h" #include "internal.h" #include "formats.h" @@ -49,6 +50,7 @@ typedef struct { int hsub, vsub; ///< chroma subsampling values AVFrame *ref; ///< reference picture DSPContext dspctx; ///< context providing optimized diff routines + PixblockDSPContext pdsp; AVCodecContext *avctx; ///< codec context required for the DSPContext } DecimateContext; @@ -75,6 +77,7 @@ static int diff_planes(AVFilterContext *ctx, { DecimateContext *decimate = ctx->priv; DSPContext *dspctx = &decimate->dspctx; + PixblockDSPContext *pdsp = &decimate->pdsp; int x, y; int d, c = 0; @@ -84,7 +87,7 @@ static int diff_planes(AVFilterContext *ctx, /* compute difference for blocks of 8x8 bytes */ for (y = 0; y < h-7; y += 4) { for (x = 8; x < w-7; x += 4) { - dspctx->diff_pixels(block, + pdsp->diff_pixels(block, cur+x+y*linesize, ref+x+y*linesize, linesize); d = dspctx->sum_abs_dctelem(block); @@ -141,6 +144,7 @@ static av_cold int init(AVFilterContext *ctx) if (!decimate->avctx) return AVERROR(ENOMEM); avpriv_dsputil_init(&decimate->dspctx, decimate->avctx); + ff_pixblockdsp_init(&decimate->pdsp, decimate->avctx); return 0; } |