GstVideo.VideoScaler

Fields

None

Methods

free ()

get_coeff (out_offset)

get_max_taps ()

horizontal (format, src, dest, dest_offset, width)

vertical (format, src_lines, dest, dest_offset, width)

Details

class GstVideo.VideoScaler

GstVideo.VideoScaler is a utility object for rescaling and resampling video frames using various interpolation / sampling methods.

free()

Free a previously allocated GstVideo.VideoScaler self.

get_coeff(out_offset)
Parameters:

out_offset (int) – an output offset

Returns:

an array of n_tap float values with filter coefficients.

in_offset:

result input offset

n_taps:

result n_taps

Return type:

(float, in_offset: int, n_taps: int)

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.

get_max_taps()
Returns:

the maximum number of taps

Return type:

int

Get the maximum number of taps for self.

horizontal(format, src, dest, dest_offset, width)
Parameters:

Horizontally scale the pixels in src to dest, starting from dest_offset for width samples.

vertical(format, src_lines, dest, dest_offset, width)
Parameters:

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.