Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.GstVideo.Structs.VideoScaler
Description
VideoScaler
is a utility object for rescaling and resampling
video frames using various interpolation / sampling methods.
Synopsis
- newtype VideoScaler = VideoScaler (ManagedPtr VideoScaler)
- videoScaler2d :: (HasCallStack, MonadIO m) => VideoScaler -> VideoScaler -> VideoFormat -> Ptr () -> Int32 -> Ptr () -> Int32 -> Word32 -> Word32 -> Word32 -> Word32 -> m ()
- videoScalerFree :: (HasCallStack, MonadIO m) => VideoScaler -> m ()
- videoScalerGetCoeff :: (HasCallStack, MonadIO m) => VideoScaler -> Word32 -> m (Double, Word32, Word32)
- videoScalerGetMaxTaps :: (HasCallStack, MonadIO m) => VideoScaler -> m Word32
- videoScalerHorizontal :: (HasCallStack, MonadIO m) => VideoScaler -> VideoFormat -> Ptr () -> Ptr () -> Word32 -> Word32 -> m ()
- videoScalerVertical :: (HasCallStack, MonadIO m) => VideoScaler -> VideoFormat -> Ptr () -> Ptr () -> Word32 -> Word32 -> m ()
Exported types
newtype VideoScaler Source #
Memory-managed wrapper type.
Constructors
VideoScaler (ManagedPtr VideoScaler) |
Instances
Eq VideoScaler Source # | |
Defined in GI.GstVideo.Structs.VideoScaler | |
BoxedPtr VideoScaler Source # | |
Defined in GI.GstVideo.Structs.VideoScaler | |
ManagedPtrNewtype VideoScaler Source # | |
Defined in GI.GstVideo.Structs.VideoScaler Methods toManagedPtr :: VideoScaler -> ManagedPtr VideoScaler |
Methods
Click to display all available methods, including inherited ones
2d
Arguments
:: (HasCallStack, MonadIO m) | |
=> VideoScaler |
|
-> VideoScaler |
|
-> VideoFormat |
|
-> Ptr () |
|
-> Int32 |
|
-> Ptr () |
|
-> Int32 |
|
-> Word32 |
|
-> Word32 |
|
-> Word32 |
|
-> Word32 |
|
-> 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
Arguments
:: (HasCallStack, MonadIO m) | |
=> VideoScaler |
|
-> m () |
Free a previously allocated VideoScaler
scale
.
getCoeff
Arguments
:: (HasCallStack, MonadIO m) | |
=> VideoScaler |
|
-> Word32 |
|
-> m (Double, Word32, Word32) | Returns: an array of |
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 |
|
-> m Word32 | Returns: the maximum number of taps |
Get the maximum number of taps for scale
.
horizontal
videoScalerHorizontal Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> VideoScaler |
|
-> VideoFormat |
|
-> Ptr () |
|
-> Ptr () |
|
-> Word32 |
|
-> Word32 |
|
-> m () |
Horizontally scale the pixels in src
to dest
, starting from destOffset
for width
samples.
vertical
Arguments
:: (HasCallStack, MonadIO m) | |
=> VideoScaler |
|
-> VideoFormat |
|
-> Ptr () |
|
-> Ptr () |
|
-> Word32 |
|
-> Word32 |
|
-> 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
.