GstVideoScaler
GstVideoScaler is a utility object for rescaling and resampling video frames using various interpolation / sampling methods.
GstVideoScaler
GstVideo.VideoScaler
GstVideo.VideoScaler
Methods
gst_video_scaler_2d
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.
Parameters:
hscale
–
a horizontal GstVideoScaler
vscale
–
a vertical GstVideoScaler
format
–
a GstVideoFormat for srcs and dest
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
GstVideo.VideoScaler.prototype.2d
function GstVideo.VideoScaler.prototype.2d(vscale: GstVideo.VideoScaler, format: GstVideo.VideoFormat, src: Object, src_stride: Number, dest: Object, dest_stride: Number, x: Number, y: Number, width: Number, height: Number): {
// javascript wrapper for 'gst_video_scaler_2d'
}
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.
Parameters:
hscale
(
GstVideo.VideoScaler
)
–
a horizontal GstVideo.VideoScaler
vscale
(
GstVideo.VideoScaler
)
–
a vertical GstVideo.VideoScaler
format
(
GstVideo.VideoFormat
)
–
a GstVideo.VideoFormat for srcs and dest
src
(
Object
)
–
source pixels
src_stride
(
Number
)
–
source pixels stride
dest
(
Object
)
–
destination pixels
dest_stride
(
Number
)
–
destination pixels stride
x
(
Number
)
–
the horizontal destination offset
y
(
Number
)
–
the vertical destination offset
width
(
Number
)
–
the number of output pixels to scale
height
(
Number
)
–
the number of output lines to scale
GstVideo.VideoScaler.2d
def GstVideo.VideoScaler.2d (self, vscale, format, src, src_stride, dest, dest_stride, x, y, width, height):
#python wrapper for 'gst_video_scaler_2d'
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.
Parameters:
hscale
(
GstVideo.VideoScaler
)
–
a horizontal GstVideo.VideoScaler
vscale
(
GstVideo.VideoScaler
)
–
a vertical GstVideo.VideoScaler
format
(
GstVideo.VideoFormat
)
–
a GstVideo.VideoFormat for srcs and dest
src
(
object
)
–
source pixels
src_stride
(
int
)
–
source pixels stride
dest
(
object
)
–
destination pixels
dest_stride
(
int
)
–
destination pixels stride
x
(
int
)
–
the horizontal destination offset
y
(
int
)
–
the vertical destination offset
width
(
int
)
–
the number of output pixels to scale
height
(
int
)
–
the number of output lines to scale
gst_video_scaler_combine_packed_YUV
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.
Parameters:
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
a new horizontal videoscaler for format.
Since : 1.6
gst_video_scaler_free
gst_video_scaler_free (GstVideoScaler * scale)
Free a previously allocated GstVideoScaler scale.
Parameters:
scale
–
GstVideo.VideoScaler.prototype.free
function GstVideo.VideoScaler.prototype.free(): {
// javascript wrapper for 'gst_video_scaler_free'
}
Free a previously allocated GstVideo.VideoScaler scale.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
GstVideo.VideoScaler.free
def GstVideo.VideoScaler.free (self):
#python wrapper for 'gst_video_scaler_free'
Free a previously allocated GstVideo.VideoScaler scale.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
gst_video_scaler_get_coeff
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.
Parameters:
scale
–
out_offset
–
an output offset
in_offset
–
result input offset
n_taps
–
result n_taps
an array of n_tap gdouble values with filter coefficients.
GstVideo.VideoScaler.prototype.get_coeff
function GstVideo.VideoScaler.prototype.get_coeff(out_offset: Number, in_offset: Number, n_taps: Number): {
// javascript wrapper for 'gst_video_scaler_get_coeff'
}
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.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
out_offset
(
Number
)
–
an output offset
in_offset
(
Number
)
–
result input offset
n_taps
(
Number
)
–
result n_taps
an array of n_tap gdouble values with filter coefficients.
GstVideo.VideoScaler.get_coeff
def GstVideo.VideoScaler.get_coeff (self, out_offset, in_offset, n_taps):
#python wrapper for 'gst_video_scaler_get_coeff'
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.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
out_offset
(
int
)
–
an output offset
in_offset
(
int
)
–
result input offset
n_taps
(
int
)
–
result n_taps
an array of n_tap gdouble values with filter coefficients.
gst_video_scaler_get_max_taps
guint gst_video_scaler_get_max_taps (GstVideoScaler * scale)
Get the maximum number of taps for scale.
Parameters:
scale
–
the maximum number of taps
GstVideo.VideoScaler.prototype.get_max_taps
function GstVideo.VideoScaler.prototype.get_max_taps(): {
// javascript wrapper for 'gst_video_scaler_get_max_taps'
}
Get the maximum number of taps for scale.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
the maximum number of taps
GstVideo.VideoScaler.get_max_taps
def GstVideo.VideoScaler.get_max_taps (self):
#python wrapper for 'gst_video_scaler_get_max_taps'
Get the maximum number of taps for scale.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
the maximum number of taps
gst_video_scaler_horizontal
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.
Parameters:
scale
–
format
–
a GstVideoFormat for src and dest
src
–
source pixels
dest
–
destination pixels
dest_offset
–
the horizontal destination offset
width
–
the number of pixels to scale
GstVideo.VideoScaler.prototype.horizontal
function GstVideo.VideoScaler.prototype.horizontal(format: GstVideo.VideoFormat, src: Object, dest: Object, dest_offset: Number, width: Number): {
// javascript wrapper for 'gst_video_scaler_horizontal'
}
Horizontally scale the pixels in src to dest, starting from dest_offset for width samples.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
format
(
GstVideo.VideoFormat
)
–
a GstVideo.VideoFormat for src and dest
src
(
Object
)
–
source pixels
dest
(
Object
)
–
destination pixels
dest_offset
(
Number
)
–
the horizontal destination offset
width
(
Number
)
–
the number of pixels to scale
GstVideo.VideoScaler.horizontal
def GstVideo.VideoScaler.horizontal (self, format, src, dest, dest_offset, width):
#python wrapper for 'gst_video_scaler_horizontal'
Horizontally scale the pixels in src to dest, starting from dest_offset for width samples.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
format
(
GstVideo.VideoFormat
)
–
a GstVideo.VideoFormat for src and dest
src
(
object
)
–
source pixels
dest
(
object
)
–
destination pixels
dest_offset
(
int
)
–
the horizontal destination offset
width
(
int
)
–
the number of pixels to scale
gst_video_scaler_vertical
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.
Parameters:
scale
–
format
–
a GstVideoFormat for srcs and dest
src_lines
–
source pixels lines
dest
–
destination pixels
dest_offset
–
the vertical destination offset
width
–
the number of pixels to scale
GstVideo.VideoScaler.prototype.vertical
function GstVideo.VideoScaler.prototype.vertical(format: GstVideo.VideoFormat, src_lines: Object, dest: Object, dest_offset: Number, width: Number): {
// javascript wrapper for 'gst_video_scaler_vertical'
}
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.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
format
(
GstVideo.VideoFormat
)
–
a GstVideo.VideoFormat for srcs and dest
src_lines
(
Object
)
–
source pixels lines
dest
(
Object
)
–
destination pixels
dest_offset
(
Number
)
–
the vertical destination offset
width
(
Number
)
–
the number of pixels to scale
GstVideo.VideoScaler.vertical
def GstVideo.VideoScaler.vertical (self, format, src_lines, dest, dest_offset, width):
#python wrapper for 'gst_video_scaler_vertical'
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.
Parameters:
scale
(
GstVideo.VideoScaler
)
–
format
(
GstVideo.VideoFormat
)
–
a GstVideo.VideoFormat for srcs and dest
src_lines
(
object
)
–
source pixels lines
dest
(
object
)
–
destination pixels
dest_offset
(
int
)
–
the vertical destination offset
width
(
int
)
–
the number of pixels to scale
Functions
gst_video_scaler_new
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.
Parameters:
method
–
flags
–
n_taps
–
number of taps to use
in_size
–
number of source elements
out_size
–
number of destination elements
options
(
[allow-none]
)
–
extra options
Enumerations
GstVideoScalerFlags
Different scale flags.
Members
GST_VIDEO_SCALER_FLAG_NONE
(0)
–
no flags
GST_VIDEO_SCALER_FLAG_INTERLACED
(1)
–
Set up a scaler for interlaced content
GstVideo.VideoScalerFlags
Different scale flags.
Members
GstVideo.VideoScalerFlags.NONE
(0)
–
no flags
GstVideo.VideoScalerFlags.INTERLACED
(1)
–
Set up a scaler for interlaced content
GstVideo.VideoScalerFlags
Different scale flags.
Members
GstVideo.VideoScalerFlags.NONE
(0)
–
no flags
GstVideo.VideoScalerFlags.INTERLACED
(1)
–
Set up a scaler for interlaced content
Constants
GST_VIDEO_SCALER_OPT_DITHER_METHOD
#define GST_VIDEO_SCALER_OPT_DITHER_METHOD "GstVideoScaler.dither-method"
GstVideoDitherMethod, The dither method to use for propagating quatization errors.
GstVideo.VIDEO_SCALER_OPT_DITHER_METHOD
GstVideo.VideoDitherMethod, The dither method to use for propagating quatization errors.
GstVideo.VIDEO_SCALER_OPT_DITHER_METHOD
GstVideo.VideoDitherMethod, The dither method to use for propagating quatization errors.
The results of the search are