![]() |
![]() |
![]() |
GStreamer Base Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/video/video-scaler.h> GstVideoScaler; enum GstVideoScalerFlags; void gst_video_scaler_2d (GstVideoScaler *hscale
,GstVideoScaler *vscale
,GstVideoFormat format
,gpointer src
,gint src_stride
,gpointer dest
,gint dest_stride
,guint x
,guint y
,guint width
,guint height
); GstVideoScaler * gst_video_scaler_combine_packed_YUV (GstVideoScaler *y_scale
,GstVideoScaler *uv_scale
,GstVideoFormat in_format
,GstVideoFormat out_format
); void gst_video_scaler_free (GstVideoScaler *scale
); const gdouble * gst_video_scaler_get_coeff (GstVideoScaler *scale
,guint out_offset
,guint *in_offset
,guint *n_taps
); void gst_video_scaler_horizontal (GstVideoScaler *scale
,GstVideoFormat format
,gpointer src
,gpointer dest
,guint dest_offset
,guint width
); GstVideoScaler * gst_video_scaler_new (GstVideoResamplerMethod method
,GstVideoScalerFlags flags
,guint n_taps
,guint in_size
,guint out_size
,GstStructure *options
); void gst_video_scaler_vertical (GstVideoScaler *scale
,GstVideoFormat format
,gpointer src_lines[]
,gpointer dest
,guint dest_offset
,guint width
);
GstVideoScaler is a utility object for rescaling and resampling video frames using various interpolation / sampling methods.
typedef enum { GST_VIDEO_SCALER_FLAG_NONE = (0), GST_VIDEO_SCALER_FLAG_INTERLACED = (1 << 0), } GstVideoScalerFlags;
Different scale flags.
void gst_video_scaler_2d (GstVideoScaler *hscale
,GstVideoScaler *vscale
,GstVideoFormat format
,gpointer src
,gint src_stride
,gpointer dest
,gint dest_stride
,guint x
,guint y
,guint width
,guint height
);
Scale a rectangle of pixels in src
with src_stride
to dest
with
dest_stride
using the horizontal scaler hscaler
and the vertical
scaler vscale
.
One or both of hscale
and vscale
can be NULL to only perform scaling in
one dimension or do a copy without scaling.
x
and y
are the coordinates in the destination image to process.
|
a horzontal GstVideoScaler |
|
a vertical GstVideoScaler |
|
a GstVideoFormat for srcs and dest
|
|
source pixels |
|
source pixels stride |
|
destination pixels |
|
destination pixels stride |
|
the horizontal destination offset |
|
the vertical destination offset |
|
the number of output pixels to scale |
|
the number of output lines to scale |
GstVideoScaler * gst_video_scaler_combine_packed_YUV (GstVideoScaler *y_scale
,GstVideoScaler *uv_scale
,GstVideoFormat in_format
,GstVideoFormat out_format
);
Combine a scaler for Y and UV into one scaler for the packed format
.
|
a scaler for the Y component |
|
a scaler for the U and V components |
|
the input video format |
|
the output video format |
Returns : |
a new horizontal videoscaler for format . |
Since 1.6
void gst_video_scaler_free (GstVideoScaler *scale
);
Free a previously allocated GstVideoScaler scale
.
|
a GstVideoScaler |
const gdouble * gst_video_scaler_get_coeff (GstVideoScaler *scale
,guint out_offset
,guint *in_offset
,guint *n_taps
);
For a given pixel at out_offset
, get the first required input pixel at
in_offset
and the n_taps
filter coefficients.
Note that for interlaced content, in_offset
needs to be incremented with
2 to get the next input line.
|
a GstVideoScaler |
|
an output offset |
|
result input offset |
|
result n_taps |
Returns : |
an array of n_tap gdouble values with filter coefficients. |
void gst_video_scaler_horizontal (GstVideoScaler *scale
,GstVideoFormat format
,gpointer src
,gpointer dest
,guint dest_offset
,guint width
);
Horizontally scale the pixels in src
to dest
, starting from dest_offset
for width
samples.
|
a GstVideoScaler |
|
a GstVideoFormat for src and dest
|
|
source pixels |
|
destination pixels |
|
the horizontal destination offset |
|
the number of pixels to scale |
GstVideoScaler * gst_video_scaler_new (GstVideoResamplerMethod method
,GstVideoScalerFlags flags
,guint n_taps
,guint in_size
,guint out_size
,GstStructure *options
);
Make a new method
video scaler. in_size
source lines/pixels will
be scaled to out_size
destination lines/pixels.
n_taps
specifies the amount of pixels to use from the source for one output
pixel. If n_taps is 0, this function chooses a good value automatically based
on the method
and in_size
/out_size
.
|
a GstVideoResamplerMethod |
|
GstVideoScalerFlags |
|
number of taps to use |
|
number of source elements |
|
number of destination elements |
|
extra options. [allow-none] |
Returns : |
a GstVideoResample |
void gst_video_scaler_vertical (GstVideoScaler *scale
,GstVideoFormat format
,gpointer src_lines[]
,gpointer dest
,guint dest_offset
,guint width
);
Vertically combine width
pixels in the lines in src_lines
to dest
.
dest
is the location of the target line at dest_offset
and
srcs
are the input lines for dest_offset
, as obtained with
gst_video_scaler_get_info()
.
|
a GstVideoScaler |
|
a GstVideoFormat for srcs and dest
|
|
source pixels lines |
|
destination pixels |
|
the vertical destination offset |
|
the number of pixels to scale |