[jonathan.rosser@rd.bbc.co.uk: zoneplate patch]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jonathan.rosser@rd.bbc.co.uk: zoneplate patch]

David Schleef
I just checked this patch into CVS.  (Note that 'pattern=13' is
incorrect, as it is 14, aka 'pattern=zone-plate'.)



dave...

----- Forwarded message from Jonathan Rosser <[hidden email]> -----

Envelope-to: [hidden email]
Delivery-date: Fri, 21 Nov 2008 10:06:38 -0800
From: Jonathan Rosser <[hidden email]>
To: David Schleef <[hidden email]>
Subject: zoneplate patch

Dave,

Attached is a patch to videotestsrc to generate a zoneplate.

It is worth asking if this test pattern belongs in videotestsrc at all as
we discussed before. There are lots of controls to fiddle with, here is a
brief explanation:-

Generate plain grey fields:

videotestsrc pattern=13 k0=100
videotestsrc pattern=13 k0=100 kt=1

Generate horizontal bars, kx is in units of n/256 of a cycle per pixel:

videotestsrc pattern=13 kx=1
videotestsrc pattern=13 kx=1 kt=1

likewise for horizontal bars with ky
diagonal bars with combinations of kx and ky

frequency varying vs time bars with kxt and kyt

horizontal and vertical frequency sweeps with kx2 and ky2
circular zoneplate with kx2 and ky2 together
"inside out" zoneplate with kx2 -ky2
hyperbolic curves with kxy

kt2 to sweep temporal phase

It is quite CPU intensive at the moment but I have done a first found of
optimisation to allow 30fps on a modest computer. Have a play with the
various controls, some combinations dont make much sense but there are lots
of useful patterns you can make with this.

To generate a particular frequency, you need to calculate the rate of
change of phase that corresponds to the frequency you want and scale it
suitably, where 128 is the nyquist limit. Note that arbitrarily big values
can be given and the phase just keeps wrapping round. The calculation is
currently scaled so that this frequency occurs in the sweep at width/2
pixels from the value of xreset. For example, to generate standard
definition sweep where the edge of the horizontal passband is 5.75MHz with
a pixel sample rate of 13.5MHz, you would use kx2=(5.75/13.5)*128=55,
xoffset=-360

Hope this makes some kind of sense... don't get hypnotised by the moving
patterns!

Regards,
Jonathan.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel