[MPlayer-cvslog] r20272 - in trunk/libmpcodecs: Makefile vf.c vf_geq.c

Oded Shimon ods15 at ods15.dyndns.org
Sun Nov 5 17:48:19 CET 2006


On Sun, Nov 05, 2006 at 02:13:14PM +0100, Diego Biurrun wrote:
> 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.
most importantly:
      function p(x,y): returns the value of the pixel at location x/y of 
      the current plane.
> 
> > 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
> _______________________________________________
> MPlayer-cvslog mailing list
> MPlayer-cvslog at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list