[FFmpeg-devel] [PATCH] Add negate filter.

Michael Niedermayer michaelni
Thu Dec 2 22:55:24 CET 2010


On Thu, Dec 02, 2010 at 08:45:24PM +0100, Stefano Sabatini wrote:
> On date Wednesday 2010-12-01 20:57:19 +0100, Stefano Sabatini encoded:
> > On date Wednesday 2010-12-01 03:25:47 +0100, Michael Niedermayer encoded:
> > > On Tue, Nov 30, 2010 at 11:22:43PM +0100, Stefano Sabatini wrote:
> > > > > From 3c16bf49c0f9f4c3c72d9eea49ae35a47d58d961 Mon Sep 17 00:00:00 2001
> > > > > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> > > > > Date: Fri, 26 Nov 2010 17:31:11 +0100
> > > > > Subject: [PATCH] Add negate filter.
> > > > > 
> > > > > Ported from the libavfilter-soc repo with per-component negation
> > > > > addition.
> > > > > ---
> > > > >  doc/filters.texi         |   22 ++++++
> > > > >  libavfilter/Makefile     |    1 +
> > > > >  libavfilter/allfilters.c |    1 +
> > > > >  libavfilter/vf_negate.c  |  184 ++++++++++++++++++++++++++++++++++++++++++++++
> > > > >  4 files changed, 208 insertions(+), 0 deletions(-)
> > > > >  create mode 100644 libavfilter/vf_negate.c
> > > > 
> > > > I'll apply in three days unless objections.
> > > 
> > > is it faster than using a LUT ?
> > 
> > 32246490 dezicycles in nolut, 1 runs, 0 skips
> > 27420150 dezicycles in nolut, 2 runs, 0 skips
> > 29323650 dezicycles in nolut, 4 runs, 0 skips
> > 36039801 dezicycles in nolut, 8 runs, 0 skips
> > 34124634 dezicycles in nolut, 16 runs, 0 skips
> > 39557091 dezicycles in nolut, 32 runs, 0 skips
> > 37006964 dezicycles in nolut, 64 runs, 0 skips
> > 37271243 dezicycles in nolut, 128 runs, 0 skips
> > 36437873 dezicycles in nolut, 256 runs, 0 skips
> > 37591370 dezicycles in nolut, 512 runs, 0 skips
> > 37119779 dezicycles in nolut, 1024 runs, 0 skips
> > 37390082 dezicycles in nolut, 2048 runs, 0 skips
> > 
> > 22483590 dezicycles in lut, 1 runs, 0 skips
> > 16486965 dezicycles in lut, 2 runs, 0 skips
> > 14703345 dezicycles in lut, 4 runs, 0 skips
> > 13340126 dezicycles in lut, 8 runs, 0 skips
> > 14286336 dezicycles in lut, 16 runs, 0 skips
> > 17345394 dezicycles in lut, 32 runs, 0 skips
> > 18178503 dezicycles in lut, 64 runs, 0 skips
> > 18047690 dezicycles in lut, 128 runs, 0 skips
> > 18159589 dezicycles in lut, 256 runs, 0 skips
> > 17833263 dezicycles in lut, 512 runs, 0 skips
> > 17624724 dezicycles in lut, 1024 runs, 0 skips
> > 17303343 dezicycles in lut, 2048 runs, 0 skips
> > 
> > Updated (with some simplifications).
> [...]
> 
> I'll apply in few days if there are no more comments.

There should be a vf_lut.c that does generic LUT based filtering and vf_negate
should use that filter

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101202/bd5181d2/attachment.pgp>



More information about the ffmpeg-devel mailing list