Commit graph

39 commits

Author SHA1 Message Date
Thiago Santos
461db47e87 geometrictransform: Adds rotate element
Adds a new rotate element to geometrictransform. It still
needs some work. But this is a good starting point.

Based on patch from Bert Douglas <bertd tplogic com>
2010-10-13 12:14:36 -03:00
Thiago Santos
6fcbf593b8 geometrictransform: Fix build with debugging disabled
Add some ifdefs to prevent build failures due to unused
variables
2010-09-10 10:29:38 -03:00
Filippo Argiolas
fd4a629825 geometrictransform: add a "zoom" parameter to square filter
https://bugzilla.gnome.org/show_bug.cgi?id=625908
2010-08-09 19:25:54 +02:00
Filippo Argiolas
4cec7d10cd geometrictransform: make square "width" and "height" customizable
https://bugzilla.gnome.org/show_bug.cgi?id=625908
2010-08-09 19:25:54 +02:00
Filippo Argiolas
2a9b456dab geometrictransform: add a "mode" property to mirror filter
Add a "mode" enum property to mirror that defines how to split the frame
and with side reflect.

https://bugzilla.gnome.org/show_bug.cgi?id=625908
2010-08-09 19:25:54 +02:00
Filippo Argiolas
a72b2f5849 geometrictransform: add a "zoom" parameter to bulge filter
Rework bulge mapping function to give more predictable results.
Now the bulge is done dividing by a scale factor that smoothsteps from
"zoom" at the center to 1.0 at "radius".

https://bugzilla.gnome.org/show_bug.cgi?id=625908
2010-08-09 19:25:54 +02:00
Filippo Argiolas
58b76ac56c geometrictransform: add an "intensity" parameter to stretch filter
https://bugzilla.gnome.org/show_bug.cgi?id=625908
2010-08-09 19:25:53 +02:00
Filippo Argiolas
7be30c3daf geometrictransform: make tunnel "radius" customizable
https://bugzilla.gnome.org/show_bug.cgi?id=625908
2010-08-09 19:25:53 +02:00
Filippo Argiolas
1652a3ef57 geometrictransform: make bulge "radius" customizable
https://bugzilla.gnome.org/show_bug.cgi?id=625908
2010-08-09 19:25:53 +02:00
Filippo Argiolas
27134c6e38 geometrictransform: make stretch "radius" customizable
https://bugzilla.gnome.org/show_bug.cgi?id=625908
2010-08-09 19:25:53 +02:00
Filippo Argiolas
c921067208 geometrictransform: make ciclegt "radius" property relative
Make the "radius" property of CircleGeometricTransform relative.
This is more coherent with the way [x,y]-center properties are handled
and allow to set a radius without knowing the video size.
Radius is defined with respect to the circle circumscribed about the
video rectangle so that a point in the center has radius 0.0 and one in
a vertex has radius 1.0.
Note that this is not a regression from the previous absolute way of
defining the radius as a user who knows the video size can easily
calculate the relative radius and set that.

https://bugzilla.gnome.org/show_bug.cgi?id=625959
2010-08-04 20:09:09 -03:00
Filippo Argiolas
0c0adffce7 geometrictransform: new filter "fisheye"
Ports gleffects "fisheye" filter to geometrictransform.
Fake fisheye lens filter. Somewhat empiric implementation because I
didn't find any good algorithm that does it with nice results.

https://bugzilla.gnome.org/show_bug.cgi?id=625722
2010-08-02 20:16:37 +02:00
Filippo Argiolas
9ee12f94de geometrictransform: new filter "mirror"
Ports gleffects "mirror" filter to geometrictransform.
Simple yet effective mirror effect, splits the image into halves and
reflect the first into the second.

https://bugzilla.gnome.org/show_bug.cgi?id=625722
2010-08-02 20:15:06 +02:00
Filippo Argiolas
5c4915d917 geometrictransform: new filter "square"
Ports gleffects "square" filter to geometrictransform.
Maps a region around the center into a zoomed square and smoothly get
back to normal zoom. With faces it makes a funny "cube-face" effect.

https://bugzilla.gnome.org/show_bug.cgi?id=625722
2010-08-02 20:14:23 +02:00
Filippo Argiolas
a7fb7ae06c geometrictransform: new filter "tunnel"
Ports gleffects "tunnel" filter to geometrictransform.
Do nothing in a circle around the center and zoom outside.

https://bugzilla.gnome.org/show_bug.cgi?id=625722
2010-08-02 20:12:44 +02:00
Filippo Argiolas
3ba3310b01 geometrictransform: new filter "bulge"
Ports gleffects "bulge" filter to geometrictransform.
Adds a protuberance around the center point.

https://bugzilla.gnome.org/show_bug.cgi?id=625722
2010-08-02 20:11:28 +02:00
Filippo Argiolas
2edd185a9a geometrictransform: new filter "stretch"
Ports gleffects "stretch" filter to geometrictransform.
Shrinks the image around the center and gradually return to normal zoom
creating funny caricatures.

https://bugzilla.gnome.org/show_bug.cgi?id=625722
2010-08-02 20:09:26 +02:00
Thiago Santos
4fa3e217e2 geometrictransform: Use _CAST macro
Replace default type casting macro with the faster direct _CAST macro
2010-06-07 22:56:17 -03:00
Thiago Santos
1c33b79c0c geometrictransform: Make properties controllable
Makes the element's properties controllable and threadsafe.

Fixes #620825
2010-06-07 22:55:24 -03:00
Thiago Santos
017808ef8d marble: Adds 'marble' element to geometrictransform
Adds a new element that does a marbling effect to
geometrictransform plugin
2010-06-06 22:38:34 -03:00
Thiago Santos
a45a1d70dd geometrictransform: Use explicit formats from gstvideo
Use explicit format macros from gstvideo to avoid exposing
unsupported formats on template pads. Using the macros
also give us complete caps (width/height/framerate).

And add support for AYUV.

Fixes #620717
2010-06-06 14:35:44 -03:00
Thiago Santos
9f6cbc889b diffuse: Adds diffuse element to geometrictransform
Adds the 'diffuse' element to geometrictransform. It moves
the pixels of the image in random directions
2010-06-06 13:00:45 -03:00
Thiago Santos
e7d417f4fc geometrictransform: Make map precalculation optional
Adds a variable to be set to allow subclasses to enable
or disable precalculation of the pixels mapping
2010-06-06 13:00:44 -03:00
Thiago Santos
581b63c678 geometrictransform: Set output buffer data to 0
Initialize output buffer data to 0 before doing the
transform.
2010-06-05 11:04:45 -03:00
Thiago Santos
964c71b7c6 geometrictransform: Descriptions and default values
Improve some properties and element descriptions and changes
some default properties values.
2010-06-05 10:58:00 -03:00
Thiago Santos
44d33ee1c8 geometrictransform: Remove trailing whitespace
Remove trailing whitespace from geometrictransform files
2010-06-04 15:53:20 -03:00
Thiago Santos
213277cc02 waterripple: Adds new waterripple element to geometrictransofmr
Adds an water ripple distortion element to geometrictransform
2010-06-04 15:31:22 -03:00
Thiago Santos
ed7461b589 sphere: Adds new 'sphere' element to geometrictransform
Adds a new element to do 'sphere' effect into geometrictransform
plugin
2010-06-04 15:31:22 -03:00
Thiago Santos
a00614064b geometrictransform: adds some properties to base class
Adds a property to select what to do with pixels that are mapped out of
edges: ignore, clamp or wrap.
2010-06-04 15:31:22 -03:00
Thiago Santos
179e234361 circle: Adds circle element to geometrictransform plugin
Adds the new 'circle' element to geometrictransform plugin
2010-06-04 15:31:21 -03:00
Thiago Santos
8eab2c8a30 kaleidoscope: Adds new element 'kaleidoscope'
Adds new kaleidoscope element to geometrictransform plugin
2010-06-04 15:31:21 -03:00
Thiago Santos
53d40802d2 gsttwirl: Adds new element twirl
Adds a new element to geometrictransform plugin: twirl
2010-06-04 15:31:21 -03:00
Thiago Santos
2f9a630a62 geometrictransform: Adds a intermediary baseclass circlegeometrictransform
Adds an intermediary baseclass named gstcirclegeometrictransform
to keep common properties code for filters that operate on
a circular area.
2010-06-04 15:31:20 -03:00
Thiago Santos
dcda4b606c pinch: Some optimization using the prepare func
Small optimization by precalculating the center of the effect,
also use newly added _CAST macro.
2010-06-04 15:31:20 -03:00
Thiago Santos
8c5360a559 geometrictransform: Adds prepare function and cleanup
Adds a prepare function to make subclasses precalculate values
that will be used throughout the mapping functions.

Also adds a missing cleanup to fix a memleak
2010-06-04 15:31:19 -03:00
Thiago Santos
6560248be9 geometrictransform: Precalculate mapping array
Precalculate when setting caps the warping map to avoid
recalculating it every buffer
2010-06-04 15:31:19 -03:00
Thiago Santos
1250a7406d geometrictransform: Accept any rgb or gray
Using gstvideo functions geometrictransform can handle
rgb or gray, put that on template caps
2010-06-04 15:31:19 -03:00
Thiago Santos
525aae23dc geometrictransform: Rename some variables for clarity
Renames some variables and adds a minimum doc to the
mapping function for a little clarity.

Also uses gstvideo functions for the row and pixel strides
instead of hardcoded values
2010-06-04 15:31:18 -03:00
Thiago Santos
b7660b122c geometrictransform: New plugin for geometric transforms
Adds a new plugin that has elements that perform geometric
transformations to images. By geometric transformations I mean
that the operations are functions that given the output pixel
position, get the pixel position in the input image. This pixel
is then copied from input to output.

The gstgeometrictransform baseclass makes it easy to write
such elements. It boils down to write the mapping function
and exposing properties

Already added the first of the elements, 'pinch'. It's a common
effect in image editors, like gimp (distort -> pinch)
2010-06-04 15:31:18 -03:00