Class (GI Struct)

GstVideo-1.0GstVideoVideoScalerAbstract

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

Index

Constructors

Properties

Methods

  • 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

    • vscale: VideoScaler
    • format: GstVideo.VideoFormat

      a GstVideo.VideoFormat for srcs and dest

    • src: any

      source pixels

    • src_stride: number

      source pixels stride

    • dest: any

      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

    Returns void

  • 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

    • out_offset: number

      an output offset

    Returns [number, number, number]

    an array of n_tap gdouble values with filter coefficients.

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

    Parameters

    • format: GstVideo.VideoFormat

      a GstVideo.VideoFormat for src and dest

    • src: any

      source pixels

    • dest: any

      destination pixels

    • dest_offset: number

      the horizontal destination offset

    • width: number

      the number of pixels to scale

    Returns void

  • 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

    • format: GstVideo.VideoFormat

      a GstVideo.VideoFormat for srcs and dest

    • src_lines: any

      source pixels lines

    • dest: any

      destination pixels

    • dest_offset: number

      the vertical destination offset

    • width: number

      the number of pixels to scale

    Returns void