Image transformation
[Video]


Typedefs

typedef struct
gavl_image_transform_s 
gavl_image_transform_t
 Opaque image transformation engine.
typedef void(* gavl_image_transform_func )(void *priv, double xdst, double ydst, double *xsrc, double *ysrc)
 Function describing the method.

Functions

GAVL_PUBLIC
gavl_image_transform_t
gavl_image_transform_create ()
 Create a transformation engine.
GAVL_PUBLIC void gavl_image_transform_destroy (gavl_image_transform_t *t)
 Destroy a transformation engine.
GAVL_PUBLIC void gavl_image_transform_init (gavl_image_transform_t *t, gavl_video_format_t *format, gavl_image_transform_func func, void *priv)
 Initialize a transformation engine.
GAVL_PUBLIC void gavl_image_transform_transform (gavl_image_transform_t *t, gavl_video_frame_t *in_frame, gavl_video_frame_t *out_frame)
 Transform an image.
GAVL_PUBLIC gavl_video_options_tgavl_image_transform_get_options (gavl_image_transform_t *t)
 Get transformation options.

Detailed Description

gavl includes a generic image transformation engine. You pass a function pointer to the init function, which transforms the destination coordinates into source coordinates.

The interpolation method is set with gavl_video_options_set_scale_mode, but not all modes are supported. When initialized with an invalid scale mode, the transformation engine will silently choose the closest one.


Typedef Documentation

typedef struct gavl_image_transform_s gavl_image_transform_t

Opaque image transformation engine.

You don't want to know what's inside.

typedef void(* gavl_image_transform_func)(void *priv, double xdst, double ydst, double *xsrc, double *ysrc)

Function describing the method.

Parameters:
priv User data
xdst X-coordinate of the destination
ydst Y-coordinate of the destination
xsrc Returns X-coordinate of the source
ysrc Returns Y-coordinate of the source
All coordinates are in fractional pixels. 0,0 is the upper left corner. Return negative values or values larger than the dimesion to signal that a pixel is outside the source image.


Function Documentation

GAVL_PUBLIC gavl_image_transform_t* gavl_image_transform_create (  ) 

Create a transformation engine.

Returns:
A newly allocated transformation engine
Since 1.1.0.

GAVL_PUBLIC void gavl_image_transform_destroy ( gavl_image_transform_t t  ) 

Destroy a transformation engine.

Parameters:
t A transformation engine Since 1.1.0.

GAVL_PUBLIC void gavl_image_transform_init ( gavl_image_transform_t t,
gavl_video_format_t format,
gavl_image_transform_func  func,
void *  priv 
)

Initialize a transformation engine.

Parameters:
t A transformation engine
Format (can be changed)
func Coordinate transform function
priv The priv argument for func
If you enabled multithreading support, func will be called from multiple threads at the same time. Make sure, that it doesn't access any global data.

Since 1.1.0.

GAVL_PUBLIC void gavl_image_transform_transform ( gavl_image_transform_t t,
gavl_video_frame_t in_frame,
gavl_video_frame_t out_frame 
)

Transform an image.

Parameters:
t A transformation engine
Input frame
Output frame Since 1.1.0.

GAVL_PUBLIC gavl_video_options_t* gavl_image_transform_get_options ( gavl_image_transform_t t  ) 

Get transformation options.

Parameters:
t A transformation engine
Returns:
Options
After you called this, you can use the gavl_video_options_set_*() functions to change the options. Options will become valid with the next call to gavl_image_transform_init.

Since 1.1.0.


Generated on Mon Jul 27 23:22:49 2009 for gavl by  doxygen 1.5.4