[FFmpeg-devel] [PATCH 3/5] lavfi/gradfun: fix dithering in MMX code.
Clément Bœsch
ubitux at gmail.com
Tue Dec 18 22:45:50 CET 2012
On Mon, Dec 17, 2012 at 04:46:30AM +0100, Michael Niedermayer wrote:
> On Sun, Dec 16, 2012 at 09:41:42PM +0100, Clément Bœsch wrote:
> > On Tue, Dec 11, 2012 at 08:13:52AM +0100, Michael Niedermayer wrote:
> > > On Tue, Dec 11, 2012 at 01:21:58AM +0100, Clément Bœsch wrote:
> > > > On Fri, Dec 07, 2012 at 08:50:48AM +0100, Reimar Döffinger wrote:
> > > > > "Clément Bœsch" <ubitux at gmail.com> wrote:
> > > > >
> > > > > >Current dithering only use the first 4w instead of the whole 8 random
> > > > > >values.
> > > > >
> > > > > I think you should benchmark it, I suspect leaving the comparison in the middle instead of having the C version handle more pixels might be faster.
> > > >
> > > > Yes indeed, with a width=719 it's indeed a little faster to add a
> > > > comparison in the middle.
> > > >
> > > > Note: the dithers+4 is a little ugly, any suggestion welcome (and a later
> > > > commit to at least make it close to *dithers might be a good idea)
> > >
> > > "r"(dithers)
> > > and address based on that
> > > the 2 as its now after the patch might also cause problems for some
> > > gcc on x86-32
> > >
> >
> > OK, thanks, new patch attached.
> >
> > --
> > Clément B.
>
> > gradfun.c | 31 +++++++++++++++++++++++++++++--
> > 1 file changed, 29 insertions(+), 2 deletions(-)
> > 9405ef6befb362429fec3f65127f066476444a2e 0003-lavfi-gradfun-fix-dithering-in-MMX-code.patch
> > From b633360ecd13f8ad89f382d9d844bc352413b56b Mon Sep 17 00:00:00 2001
> > From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <ubitux at gmail.com>
> > Date: Fri, 7 Dec 2012 00:39:31 +0100
> > Subject: [PATCH 3/5] lavfi/gradfun: fix dithering in MMX code.
> >
> > Current dithering only use the first 4w instead of the whole 8 random values.
>
> should be fine if its not slower and closer in output to the others
>
I see no noticeable performance difference:
before:
29627 decicycles in gradfun_filter_line_mmxext, 8385793 runs, 2815 skips
after:
29616 decicycles in gradfun_filter_line_mmxext, 8385822 runs, 2786 skips
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121218/f32a6eef/attachment.asc>
More information about the ffmpeg-devel
mailing list