[FFmpeg-devel] [PATCH] lavfi: port 2xsai filter from libmpcodecs
Stefano Sabatini
stefasab at gmail.com
Wed Apr 11 12:50:52 CEST 2012
On date Sunday 2012-04-08 12:39:56 +0200, Stefano Sabatini encoded:
> On date Sunday 2012-04-08 00:07:43 +0200, Stefano Sabatini encoded:
> > On date Saturday 2012-04-07 23:58:28 +0200, Stefano Sabatini encoded:
> > > Based on the port by Nielkie <nielkie at gmail.com>, done for GCI 2010.
> > > Same output as the original filter.
> > >
> > > See thread:
> > > Subject: [FFmpeg-devel] [PATCH] Port MPlayer 2xSaI filter to libavfilter
> > > Date: Thu, 25 Nov 2010 01:31:24 +1000
> > > ---
> > > configure | 1 +
> > > doc/filters.texi | 7 +
> > > libavfilter/Makefile | 1 +
> > > libavfilter/allfilters.c | 1 +
>
> > > libavfilter/vf_super2xsai.c | 302 +++++++++++++++++++++++++++++++++++++++++++
>
> Note also that the name of the filter is "super2xsai" rather than
> "2xsai" since an FFmpeg component can't start with a number (alternative
> names are welcome).
>
> > > 5 files changed, 312 insertions(+), 0 deletions(-)
> > > create mode 100644 libavfilter/vf_super2xsai.c
> >
> > I had to rewrite the port basically from scratch, in order to check
> > where the Nielkie port was diverging. New variant is as fast as the
> > original, so I'll remove the libmpcodecs wrapped filter as I'll commit
> > this one.
After more benchmarking, I noted the performance was actually worst,
due to some unnecessary and redundant checks. New variant is as fast
as the original, and produce the same output.
> >
> > [...]
> > > + READ_COLOR(color[0][0], src_line[0], 0); color[0][1] = color[0][0]; READ_COLOR(color[0][2], src_line[0], 1); READ_COLOR(color[0][3], src_line[0], 2);
> > > + READ_COLOR(color[1][0], src_line[1], 0); color[1][1] = color[1][0]; READ_COLOR(color[1][2], src_line[1], 1); READ_COLOR(color[1][3], src_line[1], 2);
> > > + READ_COLOR(color[2][0], src_line[2], 0); color[2][1] = color[2][1]; READ_COLOR(color[2][2], src_line[2], 1); READ_COLOR(color[2][3], src_line[2], 2);
> > ^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > > + READ_COLOR(color[3][0], src_line[3], 0); color[3][1] = color[3][0]; READ_COLOR(color[3][2], src_line[3], 1); READ_COLOR(color[3][3], src_line[3], 2);
> >
> > This looks like an error, but I kept it for maintaining the same output.
>
> I'll push the filter in a few days if I read no comments.
I'll apply tomorrow if I read no comments.
--
FFmpeg = Funny and Foolish Multipurpose Portable Egregious God
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavfi-port-2xsai-filter-from-libmpcodecs.patch
Type: text/x-diff
Size: 19857 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120411/7c5888ba/attachment.bin>
More information about the ffmpeg-devel
mailing list