[FFmpeg-soc] [soc]: r1773 - in libavfilter: Makefile allfilters.h avfilter.c vf_rot90.c

Michael Niedermayer michaelni at gmx.at
Sun Jan 6 17:42:02 CET 2008


On Sun, Jan 06, 2008 at 02:19:12PM +0100, vitor wrote:
> Author: vitor
> Date: Sun Jan  6 14:19:12 2008
> New Revision: 1773
> 
> Log:
> 90 degrees counter-clockwise rotation filter

[...]

> +static void draw_slice(AVFilterLink *link, int y, int h)
> +{
> +    RotContext *rot = link->dst->priv;
> +    AVFilterPicRef *in  = link->cur_pic;
> +    AVFilterPicRef *out = link->dst->outputs[0]->outpic;
> +    int i, j, plane;
> +
> +    /* luma plane */
> +    for(i = y; i < h; i ++)
> +        for(j = 0; j < link->w; j ++)
> +            *(out->data[0] +   j *out->linesize[0] + i) =
> +                *(in->data[0]+ i * in->linesize[0] + j);

this looks more like transpose, that is
A   B       A   C
        ->
C   D       B   D

instead of 90° ccw rotate:

A   B       B   D
        ->
C   D       A   C


although
traspose + vflip == 90°ccw rotate
vflip + transpose== 90° cw rotate
hflip + vflip    ==180° rotate

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

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080106/9108135b/attachment.pgp>


More information about the FFmpeg-soc mailing list