[FFmpeg-devel] [PATCH] Transpose filter
Michael Niedermayer
michaelni
Sun Oct 17 21:16:37 CEST 2010
On Sun, Oct 17, 2010 at 01:22:26PM +0200, Stefano Sabatini wrote:
> On date Sunday 2010-10-17 11:07:45 +0200, Michael Niedermayer encoded:
> > On Thu, Oct 14, 2010 at 01:29:22PM +0200, Stefano Sabatini wrote:
> [...]
> > > + for (y = 0; y < outh; y++) {
> > > + for (x = 0; x < outw; x++) {
> > > + int32_t v;
> > > +
> > > + switch (pixstep) {
> > > + case 1:
> > > + *(out + x) = *(in + x*inlinesize + y);
> > > + break;
> > > + case 2:
> > > + *((uint16_t *)(out + 2*x)) = *((uint16_t *)(in + x*inlinesize + y*2));
> > > + break;
> > > + case 3:
> > > + v = AV_RB24(in + x*inlinesize + y*3);
> > > + AV_WB24(out + 3*x, v);
> > > + break;
> > > + case 4:
> > > + *((uint32_t *)(out + 4*x)) = *((uint32_t *)(in + x*inlinesize + y*4));
> > > + break;
> > > + }
> >
> > please put the for loop inside the switch
>
> Updated.
> --
> FFmpeg = Foolish Fundamentalist Multipurpose Programmable Empowered Gymnast
> doc/filters.texi | 15 +++
> libavfilter/Makefile | 1
> libavfilter/allfilters.c | 1
> libavfilter/vf_transpose.c | 211 +++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 228 insertions(+)
> d409cc3aa29d5a2cb81f6d19b4d108228021bf10 0002-Add-transpose-filter.patch
> From 5d17c66287aacbcce6e619b43febc63286b2dd62 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.
>
> ---
> doc/filters.texi | 15 +++
> libavfilter/Makefile | 1 +
> libavfilter/allfilters.c | 1 +
> libavfilter/vf_transpose.c | 211 ++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 228 insertions(+), 0 deletions(-)
> create mode 100644 libavfilter/vf_transpose.c
>
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 66c1606..d4552da 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -508,6 +508,21 @@ not specified it will use the default value of 16.
> Adding this in the beginning of filter chains should make filtering
> faster due to better use of the memory cache.
>
> + at section transpose
> +
> +Transpose rows with columns in the input video and optionally flip it.
> +
> +It accepts a parameter representing an integer, which can assume the
> +values:
> +
> +0 Rotate by 90 degrees clockwise and flip (default).
> +
> +1 Rotate by 90 degrees clockwise.
> +
> +2 Rotate by 90 degrees counterclockwise.
> +
> +3 Rotate by 90 degrees counterclockwise and flip.
that description is ambigous and also not very clear. flip can be horizontally
vertically or diaginally.
maybe you should write examples like
1.2 4.2
. . -> . .
3.4 3.1
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- 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/20101017/e2710859/attachment.pgp>
More information about the ffmpeg-devel
mailing list