GstVideoResampler

## GstVideoResampler GstVideoResampler — Utility structure for resampler information |

## Functions

void | gst_video_resampler_clear ()
gboolean | gst_video_resampler_init ()

## Types and Values

struct | GstVideoResampler
enum | GstVideoResamplerFlags
enum | GstVideoResamplerMethod
#define | GST_VIDEO_RESAMPLER_OPT_CUBIC_B
#define | GST_VIDEO_RESAMPLER_OPT_CUBIC_C
#define | GST_VIDEO_RESAMPLER_OPT_ENVELOPE
#define | GST_VIDEO_RESAMPLER_OPT_MAX_TAPS
#define | GST_VIDEO_RESAMPLER_OPT_SHARPEN
#define | GST_VIDEO_RESAMPLER_OPT_SHARPNESS

## Includes

    #include <gst/video/video-resampler.h>

## Description

GstVideoResampler is a structure which holds the information required to perform various kinds of resampling filtering.

## Functions

### gst_video_resampler_clear ()

    void
    gst_video_resampler_clear (GstVideoResampler *resampler);

Clear a previously initialized GstVideoResampler `resampler` .

#### Parameters

resampler | a GstVideoResampler |

Since: 1.6

### gst_video_resampler_init ()

    gboolean
    gst_video_resampler_init (GstVideoResampler *resampler,
                              GstVideoResamplerMethod method,
                              GstVideoResamplerFlags flags,
                              guint n_phases,
                              guint n_taps,
                              gdouble shift,
                              guint in_size,
                              guint out_size,
                              GstStructure *options);

## Types and Values

### struct GstVideoResampler

    struct GstVideoResampler {
      gint in_size;
      gint out_size;
      guint max_taps;
      guint n_phases;
      guint32 *offset;
      guint32 *phase;
      guint32 *n_taps;
      gdouble *taps;
    };

A structure holding resampler information.

#### Members

gint `in_size`; | the input size |
gint `out_size`; | the output size |
guint `max_taps`; | the maximum number of taps |
guint `n_phases`; | the number of phases |
guint32 *`offset`; | array with the source offset for each output element |
guint32 *`phase`; | array with the phase to use for each output element |
guint32 *`n_taps`; | array with new number of taps for each phase |
gdouble *`taps`; | the taps for all phases |

Since: 1.6

### enum GstVideoResamplerFlags

Different resampler flags.

#### Members

GST_VIDEO_RESAMPLER_FLAG_NONE | no flags |
GST_VIDEO_RESAMPLER_FLAG_HALF_TAPS | when no taps are given, half the number of calculated taps. This can be used when making scalers for the different fields of an interlaced picture. Since 1.10 |

Since: 1.6

### enum GstVideoResamplerMethod

Different subsampling and upsampling methods

#### Members

GST_VIDEO_RESAMPLER_METHOD_NEAREST | Duplicates the samples when upsampling and drops when downsampling |
GST_VIDEO_RESAMPLER_METHOD_LINEAR | Uses linear interpolation to reconstruct missing samples and averaging to downsample |
GST_VIDEO_RESAMPLER_METHOD_CUBIC | Uses cubic interpolation |
GST_VIDEO_RESAMPLER_METHOD_SINC | Uses sinc interpolation |
GST_VIDEO_RESAMPLER_METHOD_LANCZOS | Uses lanczos interpolation |

Since: 1.6

### GST_VIDEO_RESAMPLER_OPT_CUBIC_B

    #define GST_VIDEO_RESAMPLER_OPT_CUBIC_B      "GstVideoResampler.cubic-b"

G_TYPE_DOUBLE, B parameter of the cubic filter. The B parameter controls the bluriness. Values between 0.0 and 2.0 are accepted. 1/3 is the default.

Below are some values of popular filters: B C Hermite 0.0 0.0 Spline 1.0 0.0 Catmull-Rom 0.0 1/2 Mitchell 1/3 1/3 Robidoux 0.3782 0.3109 Robidoux Sharp 0.2620 0.3690 Robidoux Soft 0.6796 0.1602

### GST_VIDEO_RESAMPLER_OPT_CUBIC_C

    #define GST_VIDEO_RESAMPLER_OPT_CUBIC_C      "GstVideoResampler.cubic-c"

G_TYPE_DOUBLE, C parameter of the cubic filter. The C parameter controls the Keys alpha value. Values between 0.0 and 2.0 are accepted. 1/3 is the default.

See GST_VIDEO_RESAMPLER_OPT_CUBIC_B for some more common values

### GST_VIDEO_RESAMPLER_OPT_ENVELOPE

    #define GST_VIDEO_RESAMPLER_OPT_ENVELOPE      "GstVideoResampler.envelope"

G_TYPE_DOUBLE, specifies the size of filter envelope for `GST_VIDEO_RESAMPLER_METHOD_LANCZOS` . values are clamped between 1.0 and 5.0. 2.0 is the default.

### GST_VIDEO_RESAMPLER_OPT_MAX_TAPS

    #define GST_VIDEO_RESAMPLER_OPT_MAX_TAPS     "GstVideoResampler.max-taps"

G_TYPE_INT, limits the maximum number of taps to use. 16 is the default.

### GST_VIDEO_RESAMPLER_OPT_SHARPEN

    #define GST_VIDEO_RESAMPLER_OPT_SHARPEN      "GstVideoResampler.sharpen"

G_TYPE_DOUBLE, specifies sharpening of the filter for `GST_VIDEO_RESAMPLER_METHOD_LANCZOS` . values are clamped between 0.0 and 1.0. 0.0 is the default.

### GST_VIDEO_RESAMPLER_OPT_SHARPNESS

    #define GST_VIDEO_RESAMPLER_OPT_SHARPNESS     "GstVideoResampler.sharpness"

G_TYPE_DOUBLE, specifies sharpness of the filter for `GST_VIDEO_RESAMPLER_METHOD_LANCZOS` . values are clamped between 0.5 and 1.5. 1.0 is the default.