|
gavl
|
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 (void) |
| Create a transformation engine. | |
| GAVL_PUBLIC void | gavl_image_transform_destroy (gavl_image_transform_t *t) |
| Destroy a transformation engine. | |
| GAVL_PUBLIC int | 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_t * | gavl_image_transform_get_options (gavl_image_transform_t *t) |
| Get transformation options. | |
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 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.
| 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 dimension to signal that a pixel is outside the source image.
| GAVL_PUBLIC gavl_image_transform_t * gavl_image_transform_create | ( | void | ) |
Create a transformation engine.
Since 1.1.0.
References gavl_image_transform_create().
Referenced by gavl_image_transform_create().
| GAVL_PUBLIC void gavl_image_transform_destroy | ( | gavl_image_transform_t * | t | ) |
Destroy a transformation engine.
| t | A transformation engine Since 1.1.0. |
References gavl_image_transform_destroy().
Referenced by gavl_image_transform_destroy().
| GAVL_PUBLIC int 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.
| t | A transformation engine |
| format | 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.
Return type was changed from void to in in version 1.1.2 Under normal circumstances, this function always returns 1.
Since 1.1.0.
References gavl_image_transform_init().
Referenced by gavl_image_transform_init().
| 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.
| t | A transformation engine |
| in_frame | Input frame |
| out_frame | Output frame Since 1.1.0. |
References gavl_image_transform_transform().
Referenced by gavl_image_transform_transform().
| GAVL_PUBLIC gavl_video_options_t * gavl_image_transform_get_options | ( | gavl_image_transform_t * | t | ) |
Get transformation options.
| t | A transformation engine |
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.
References gavl_image_transform_get_options().
Referenced by gavl_image_transform_get_options().