# vaapipostproc

vaapipostproc consists in various postprocessing algorithms to be applied to VA surfaces.

## Example launch line

     gst-launch-1.0 videotestsrc ! vaapipostproc ! video/x-raw, width=1920, height=1080 ! vaapisink

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBaseTransform
                        ╰──vaapipostproc

## Implemented interfaces

    GstColorBalance

## Factory details

Authors: – Gwenole Beauchesne

Classification: – `Filter/Converter/Effect/Video/Scaler/Deinterlace/Hardware`

Rank – none

Plugin – vaapi

Package – gstreamer-vaapi

## Pad Templates

### `sink`

    video/x-raw(memory:VASurface):
             format: { ENCODED, NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, Y212_LE, Y412_LE, ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: { (string)progressive, (string)interleaved, (string)mixed }
    video/x-raw:
             format: { ENCODED, NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, Y212_LE, Y412_LE, ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: { (string)progressive, (string)interleaved, (string)mixed }

    video/x-raw(memory:DMABuf):
             format: { ENCODED, NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, Y212_LE, Y412_LE, ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: { (string)progressive, (string)interleaved, (string)mixed }

Presence – always

Direction – sink

Object type – GstPad

### `src`

    video/x-raw(memory:VASurface):
             format: { ENCODED, NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, Y212_LE, Y412_LE, ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: progressive

    video/x-raw(meta:GstVideoGLTextureUploadMeta):
             format: { RGBA, BGRA }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
    video/x-raw:
             format: { ENCODED, NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, Y212_LE, Y412_LE, ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: { (string)progressive, (string)interleaved, (string)mixed }

Presence – always

Direction – src

Object type – GstPad

## Properties

### brightness

    “brightness” gfloat

The color brightness, expressed as a float value. Range is -1.0 to 1.0. Default value is 0.0 and represents no modification.

Flags : Read / Write

Default value : 0

### contrast

    “contrast” gfloat

The color contrast, expressed as a float value. Range is 0.0 to 2.0. Default value is 1.0 and represents no modification.

Flags : Read / Write

Default value : 1

### crop-bottom

    “crop-bottom” guint

The number of pixels to crop at bottom.

Flags : Read / Write

Default value : 0

### crop-left

    “crop-left” guint

The number of pixels to crop at left.

Flags : Read / Write

Default value : 0

### crop-right

    “crop-right” guint

The number of pixels to crop at right.

Flags : Read / Write

Default value : 0

### crop-top

    “crop-top” guint

The number of pixels to crop at top.

Flags : Read / Write

Default value : 0

### deinterlace-method

    “deinterlace-method” GstVaapiDeinterlaceMethod *

This selects the deinterlacing method to apply.

Flags : Read / Write

Default value : bob (1)

### deinterlace-mode

    “deinterlace-mode” Vaapi-deinterlace-mode *

This selects whether the deinterlacing should always be applied or if they should only be applied on content that has the "interlaced" flag on the caps.

Flags : Read / Write

Default value : auto (0)

### denoise

    “denoise” gfloat

The level of noise reduction to apply.

Flags : Read / Write

Default value : 0

### force-aspect-ratio

    “force-aspect-ratio” gboolean

When enabled, scaling respects video aspect ratio; when disabled, the video is distorted to fit the width and height properties.

Flags : Read / Write

Default value : true

### format

    “format” GstVideoFormat *

The forced output pixel format, expressed as a GstVideoFormat.

Flags : Read / Write

Default value : encoded (1)

### hdr-tone-map

    “hdr-tone-map” Vaapi-hdrtone-map *

Selects whether HDR tone mapping should not be applied or if it should be only applied on content that has the HDR meta on the caps.

Flags : Read / Write

Default value : auto (0)

### height

    “height” guint

The forced output height in pixels. If set to zero, the height is calculated from the width if aspect ration is preserved, or inherited from the sink caps height

Flags : Read / Write

Default value : 0

### hue

    “hue” gfloat

The color hue, expressed as a float value. Range is -180.0 to 180.0. Default value is 0.0 and represents no modification.

Flags : Read / Write

Default value : 0

### saturation

    “saturation” gfloat

The color saturation, expressed as a float value. Range is 0.0 to 2.0. Default value is 1.0 and represents no modification.

Flags : Read / Write

Default value : 1

### scale-method

    “scale-method” Vaapi-scale-method *

The scaling method to use, expressed as an enum value. See Vaapi-scale-method.

Flags : Read / Write

Default value : default (0)

### sharpen

    “sharpen” gfloat

The level of sharpening to apply for positive values, or the level of blurring for negative values.

Flags : Read / Write

Default value : 0

### skin-tone-enhancement

    “skin-tone-enhancement” gboolean

Apply the skin tone enhancement algorithm.

Flags : Read / Write

Default value : false

### skin-tone-enhancement-level

    “skin-tone-enhancement-level” guint

Apply the skin tone enhancement algorithm with specified level

Flags : Read / Write

Default value : 3

### video-direction

    “video-direction” GstVideoOrientationMethod *

The video-direction to use, expressed as an enum value. See GstVideoDirection.

Flags : Read / Write

Default value : identity (0)

### width

    “width” guint

The forced output width in pixels. If set to zero, the width is calculated from the height if aspect ration is preserved, or inherited from the sink caps width

Flags : Read / Write

Default value : 0

## Named constants

### GstVaapiDeinterlaceMethod

#### Members

`none` (0) – Disable deinterlacing
`bob` (1) – Bob deinterlacing
`weave` (2) – Weave deinterlacing
`motion-adaptive` (3) – Motion adaptive deinterlacing
`motion-compensated` (4) – Motion compensated deinterlacing

### Vaapi-deinterlace-mode

#### Members

`auto` (0) – Auto detection
`interlaced` (1) – Force deinterlacing
`disabled` (2) – Never deinterlace

### Vaapi-hdrtone-map

#### Members

`auto` (0) – Auto detection
`disabled` (1) – Disable HDR tone mapping

### Vaapi-scale-method

#### Members

`default` (0) – Default scaling mode
`fast` (1) – Fast scaling mode
`hq` (2) – High quality scaling mode

The results of the search are