Top |
void | gst_video_scaler_2d () |
GstVideoScaler * | gst_video_scaler_combine_packed_YUV () |
void | gst_video_scaler_free () |
const gdouble * | gst_video_scaler_get_coeff () |
void | gst_video_scaler_horizontal () |
GstVideoScaler * | gst_video_scaler_new () |
void | gst_video_scaler_vertical () |
guint | gst_video_scaler_get_max_taps () |
GstVideoScaler is a utility object for rescaling and resampling video frames using various interpolation / sampling methods.
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.
hscale |
a horzontal GstVideoScaler |
|
vscale |
a vertical GstVideoScaler |
|
format |
a GstVideoFormat for |
|
src |
source pixels |
|
src_stride |
source pixels stride |
|
dest |
destination pixels |
|
dest_stride |
destination pixels stride |
|
x |
the horizontal destination offset |
|
y |
the vertical destination offset |
|
width |
the number of output pixels to scale |
|
height |
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
.
[skip]
y_scale |
a scaler for the Y component |
|
uv_scale |
a scaler for the U and V components |
|
in_format |
the input video format |
|
out_format |
the output video format |
Since: 1.6
void
gst_video_scaler_free (GstVideoScaler *scale
);
Free a previously allocated GstVideoScaler scale
.
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.
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.
scale |
||
format |
a GstVideoFormat for |
|
src |
source pixels |
|
dest |
destination pixels |
|
dest_offset |
the horizontal destination offset |
|
width |
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
.
[skip]
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()
.
scale |
||
format |
a GstVideoFormat for |
|
src_lines |
source pixels lines |
|
dest |
destination pixels |
|
dest_offset |
the vertical destination offset |
|
width |
the number of pixels to scale |
guint
gst_video_scaler_get_max_taps (GstVideoScaler *scale
);
Get the maximum number of taps for scale
.