[MPlayer-cvslog] r20272 - in trunk/libmpcodecs: Makefile vf.c vf_geq.c
Diego Biurrun
diego at biurrun.de
Sun Nov 5 14:13:14 CET 2006
On Thu, Oct 26, 2006 at 01:59:29PM +0200, Michael Niedermayer wrote:
>
> On Tue, Oct 24, 2006 at 08:52:16PM +0200, Diego Biurrun wrote:
> >
> > Plus, this is still lacking a description of the constants
> > ("PI", "E", "X", "Y", "W", "H", "N", "SW", "SH").
>
> PI, E see wikipedia
> X and Y are the coordnates of the current sample
> W and H are width and height of the image
> SW and SH are width/height scale (for YUV 4:2:0 they are 1,1 and 0.5,0.5)
> depending on the currently filtered plane
OK, how about
geq=equation
generic equation change filter
<equation>
Some equation, e.g.\& 'p(W-X\,Y)' to flip the image horizontally.
Note that this filter does not yet understand whitespace used to
make the equation more readable.
There are a couple of constants that can be used in the equation:
PI: the number pi
E: the number e
X / Y: the coordinates of the current sample
W / H: width and height of the image
SW / SH: width/height scale depending on the currently filtered plane,
e.g. 1,1 and 0.5,0.5 for YUV 4:2:0.
> btw some examples
>
> flip image hozizontally
> geq='p(W-X\,Y)'
> sheer image horizintally with warparound (wrong stride effect)
> geq='p(mod(X+Y\,W)\,Y)'
> checkerboard invert
> geq='128+(p(X\,Y)-128)*(0.5-gt(mod(X/SW\,128)\,64))*(0.5-gt(mod(Y/SH\,128)\,64))*4'
> map video onto a sphere
> geq=(1-SH)*256+(p(mod(atan((X-W/2)/(Y-H/2))/PI+3/4\,1)*W\,H-asin(((X-W/2)^2+(Y-H/2)^2)^0.5*2/H)/PI*2*H)-(1-SH)*256)/100*(max(X-W/2-Y+H/2+((H/2)^2-(X-W/2)^2-(Y-H/2)^2)^0.5\,0)*2/H)^3*24*lt((X-W/2)^2+(Y-H/2)^2\,(H/2)^2)
Funky stuff ...
Diego
More information about the MPlayer-cvslog
mailing list