gi-gstvideo-1.0.25: GStreamerVideo bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GstVideo.Structs.VideoScaler

Description

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

Synopsis

Exported types

newtype VideoScaler Source #

Memory-managed wrapper type.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

2d, free, horizontal, vertical.

Getters

getCoeff, getMaxTaps.

Setters

None.

2d

videoScaler2d Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoScaler

hscale: a horizontal VideoScaler

-> VideoScaler

vscale: a vertical VideoScaler

-> VideoFormat

format: a VideoFormat for srcs and dest

-> Ptr ()

src: source pixels

-> Int32

srcStride: source pixels stride

-> Ptr ()

dest: destination pixels

-> Int32

destStride: destination pixels stride

-> Word32

x: the horizontal destination offset

-> Word32

y: the vertical destination offset

-> Word32

width: the number of output pixels to scale

-> Word32

height: the number of output lines to scale

-> m () 

Scale a rectangle of pixels in src with srcStride to dest with destStride 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.

free

videoScalerFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoScaler

scale: a VideoScaler

-> m () 

Free a previously allocated VideoScaler scale.

getCoeff

videoScalerGetCoeff Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoScaler

scale: a VideoScaler

-> Word32

outOffset: an output offset

-> Word32

inOffset: result input offset

-> Word32

nTaps: result n_taps

-> m Double

Returns: an array of nTap gdouble values with filter coefficients.

For a given pixel at outOffset, get the first required input pixel at inOffset and the nTaps filter coefficients.

Note that for interlaced content, inOffset needs to be incremented with 2 to get the next input line.

getMaxTaps

videoScalerGetMaxTaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoScaler

scale: a VideoScaler

-> m Word32

Returns: the maximum number of taps

Get the maximum number of taps for scale.

horizontal

videoScalerHorizontal Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoScaler

scale: a VideoScaler

-> VideoFormat

format: a VideoFormat for src and dest

-> Ptr ()

src: source pixels

-> Ptr ()

dest: destination pixels

-> Word32

destOffset: the horizontal destination offset

-> Word32

width: the number of pixels to scale

-> m () 

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

vertical

videoScalerVertical Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoScaler

scale: a VideoScaler

-> VideoFormat

format: a VideoFormat for srcs and dest

-> Ptr ()

srcLines: source pixels lines

-> Ptr ()

dest: destination pixels

-> Word32

destOffset: the vertical destination offset

-> Word32

width: the number of pixels to scale

-> m () 

Vertically combine width pixels in the lines in srcLines to dest. dest is the location of the target line at destOffset and srcs are the input lines for destOffset.