[FFmpeg-devel] [PATCH] Transpose filter
Stefano Sabatini
stefano.sabatini-lala
Mon Oct 18 17:42:38 CEST 2010
On date Sunday 2010-10-17 22:05:40 +0200, Michael Niedermayer encoded:
> On Sun, Oct 17, 2010 at 09:54:53PM +0200, Stefano Sabatini wrote:
[...]
> > doc/filters.texi | 35 +++++++
> > libavfilter/Makefile | 1
> > libavfilter/allfilters.c | 1
> > libavfilter/vf_transpose.c | 211 +++++++++++++++++++++++++++++++++++++++++++++
> > 4 files changed, 248 insertions(+)
> > 19f52fa952acc7efca50ef7fbc1f3742f3b566eb 0002-Add-transpose-filter.patch
> > From e04cbff39214bfc1a1641b592e1af51e3111c268 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> > Date: Mon, 11 Oct 2010 14:16:35 +0200
> > Subject: [PATCH 2/4] Add transpose filter.
>
> should be ok if tested and benchmarked against mplayers rotate
$ gcc --version
gcc (Debian 4.4.4-8) 4.4.5 20100728 (prerelease)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Curious, I tried the code and I got:
14515950 dezicycles in fftranspose, 1 runs, 0 skips
8731830 dezicycles in fftranspose, 2 runs, 0 skips
7977697 dezicycles in fftranspose, 4 runs, 0 skips
6721785 dezicycles in fftranspose, 8 runs, 0 skips
6964627 dezicycles in fftranspose, 16 runs, 0 skips
6305574 dezicycles in fftranspose, 32 runs, 0 skips
6071716 dezicycles in fftranspose, 64 runs, 0 skips
5950493 dezicycles in fftranspose, 128 runs, 0 skips
6108487 dezicycles in fftranspose, 256 runs, 0 skips
6190255 dezicycles in fftranspose, 512 runs, 0 skips
6182728 dezicycles in fftranspose, 1024 runs, 0 skips
Changing:
*(out + x) = *(in + x*inlinesize + y);
to
out[x] = in[x*inlinesize + y];
I got:
2796300 dezicycles in fftranspose, 1 runs, 0 skips
1741350 dezicycles in fftranspose, 2 runs, 0 skips
2488815 dezicycles in fftranspose, 4 runs, 0 skips
2041652 dezicycles in fftranspose, 8 runs, 0 skips
1914091 dezicycles in fftranspose, 16 runs, 0 skips
1881855 dezicycles in fftranspose, 32 runs, 0 skips
1696222 dezicycles in fftranspose, 64 runs, 0 skips
1603417 dezicycles in fftranspose, 128 runs, 0 skips
1545936 dezicycles in fftranspose, 256 runs, 0 skips
1566907 dezicycles in fftranspose, 512 runs, 0 skips
1611006 dezicycles in fftranspose, 1024 runs, 0 skips
1610478 dezicycles in fftranspose, 2048 runs, 0 skips
1605196 dezicycles in fftranspose, 4096 runs, 0 skips
1612250 dezicycles in fftranspose, 8192 runs, 0 skips
which are comparable with the same values from mplayer rotate:
2222190 dezicycles in mpcrotate, 1 runs, 0 skips
1382235 dezicycles in mpcrotate, 2 runs, 0 skips
1361745 dezicycles in mpcrotate, 4 runs, 0 skips
1385261 dezicycles in mpcrotate, 8 runs, 0 skips
1362976 dezicycles in mpcrotate, 16 runs, 0 skips
1259585 dezicycles in mpcrotate, 32 runs, 0 skips
1340383 dezicycles in mpcrotate, 64 runs, 0 skips
1419385 dezicycles in mpcrotate, 128 runs, 0 skips
1588434 dezicycles in mpcrotate, 256 runs, 0 skips
1604090 dezicycles in mpcrotate, 512 runs, 0 skips
1650801 dezicycles in mpcrotate, 1024 runs, 0 skips
1692090 dezicycles in mpcrotate, 2046 runs, 2 skips
1703945 dezicycles in mpcrotate, 4093 runs, 3 skips
1689078 dezicycles in mpcrotate, 8188 runs, 4 skips
I have no idea why it is so much faster, anyway patch updated.
--
FFmpeg = Fiendish & Foolish Marvellous Prodigious Elected Geek
More information about the ffmpeg-devel
mailing list