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

Michael Niedermayer michaelni at gmx.at
Thu Oct 26 13:59:29 CEST 2006


Hi

On Tue, Oct 24, 2006 at 08:52:16PM +0200, Diego Biurrun wrote:
> On Mon, Oct 16, 2006 at 05:47:32PM +0200, michael wrote:
> > 
> > Added:
> >    trunk/libmpcodecs/vf_geq.c
> >       - copied, changed from r20265, /trunk/libmpcodecs/vf_qp.c
> > 
> > Log:
> > generic equation filter
> > example: -vf 'geq=(p(X\,Y)+p(mod(Y*2-X*2\,W)\,mod(Y*2+X*2+sin((X-Y)/10/SW+N)*SW*20\,H)))/2'
> 
> Would something like this be a correct description?  Is adding all those
> spaces legal?

no, vf_geq or eval.c should be changed to discard whitespace it doesnt
currently


> 
>   geq=equation
>     generic equation change filter
>       <equation>
>         "(  p(X\,Y) + p( mod( Y*2-X*2 \,W) \,mod( Y*2+X*2 + sin( (X-Y)
>         /10 /SW +N ) *SW *20 \,H)) ) /2"
> 
> 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

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)

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is



More information about the MPlayer-cvslog mailing list