[FFmpeg-devel] [PATCH] lavfi: port decimate libmpcodecs filter
Stefano Sabatini
stefasab at gmail.com
Thu Aug 30 20:34:24 CEST 2012
On date Wednesday 2012-08-29 16:39:56 +0200, Stefano Sabatini encoded:
> On date Tuesday 2012-08-28 21:12:01 +0200, Stefano Sabatini encoded:
> [...]
>
> Patch updated, with more fixes and tested against mp=decimate.
>
> Note that I had to apply the attached patch to mp=decimate in order to
> get the same output. I couldn't test the MMX version in libmpcodecs
> since it is currently disable (with and without optims enabled).
> --
> FFmpeg = Forgiving Friendly Merciless Perfectionist Exxagerate Gadget
> From a9bf56155ae69e15d5d2fdba7adba630c0006bf5 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab at gmail.com>
> Date: Wed, 29 Aug 2012 13:08:49 +0200
> Subject: [PATCH] lavfi/mp=decimate: fix array loop, check values in the range
> 0-7
>
> The previously used loop range 8-1 seems wrong.
> ---
> libavfilter/libmpcodecs/vf_decimate.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/libmpcodecs/vf_decimate.c b/libavfilter/libmpcodecs/vf_decimate.c
> index 71cb007..6f36e1d 100644
> --- a/libavfilter/libmpcodecs/vf_decimate.c
> +++ b/libavfilter/libmpcodecs/vf_decimate.c
> @@ -83,8 +83,8 @@ static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
> static int diff_C(unsigned char *old, unsigned char *new, int os, int ns)
> {
> int x, y, d=0;
> - for (y = 8; y; y--) {
> - for (x = 8; x; x--) {
> + for (y = 0; y < 8; y++) {
> + for (x = 0; x < 8; x++) {
> d += abs(new[x] - old[x]);
> }
> new += ns;
> --
> 1.7.5.4
> From 5b871458916285207ff67f333f479d5e688b9538 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab at gmail.com>
> Date: Sat, 17 Mar 2012 15:49:51 +0100
> Subject: [PATCH] lavfi: port decimate libmpcodecs filter
>
> This filter is based on the MPlayer decimate filter by Rich Felker.
I'll apply this tomorrow if I read no more comments.
The suggestion by Nicolas can be applied in a further commit.
[...]
--
FFmpeg = Fast Friendly Mortal Perennial Eager Gargoyle
More information about the ffmpeg-devel
mailing list