vapostproc

vapostproc applies different video filters to VA surfaces. These filters vary depending on the installed and chosen VA-API driver, but usually resizing and color conversion are available.

The generated surfaces can be mapped onto main memory as video frames.

Use gst-inspect-1.0 to introspect the available capabilities of the driver's post-processor entry point.

Example launch line

gst-launch-1.0 videotestsrc ! "video/x-raw,format=(string)NV12" ! vapostproc ! autovideosink

Cropping is supported via buffers' crop meta. It's only done if the postproccessor is not in passthrough mode or if downstream doesn't support the crop meta API.

Cropping example

gst-launch-1.0 videotestsrc ! "video/x-raw,format=(string)NV12" ! videocrop bottom=50 left=100 ! vapostproc ! autovideosink

If the VA driver support color balance filter, with controls such as hue, brightness, contrast, etc., those controls are exposed both as element properties and through the GstColorBalance interface.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseTransform
                    ╰──GstVaBaseTransform
                        ╰──vapostproc

Implemented interfaces

Factory details

Authors: – Víctor Jáquez

Classification:Converter/Filter/Colorspace/Scaler/Video/Hardware

Rank – none

Plugin – va

Package – GStreamer Bad Plug-ins

Pad Templates

sink

video/x-raw(memory:VAMemory):
         format: { NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR }
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]
video/x-raw:
         format: { VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, I420, P010_10LE, RGBA, BGRA, ARGB, ABGR }
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsink

Object typeGstPad


src

video/x-raw(memory:VAMemory):
         format: { NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR }
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]
video/x-raw:
         format: { VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, I420, P010_10LE, RGBA, BGRA, ARGB, ABGR }
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsrc

Object typeGstPad


Properties

add-borders

“add-borders” gboolean

If set to TRUE the filter will add black borders if necessary to keep the display aspect ratio.

Flags : Read / Write

Default value : false

Since : 1.20


disable-passthrough

“disable-passthrough” gboolean

If set to TRUE the filter will not enable passthrough mode, thus each frame will be processed. It's useful for cropping, for example.

Flags : Read / Write

Default value : false

Since : 1.20


interpolation-method

“interpolation-method” GstVaInterpolationMethod *

Sets the interpolation method algorithm to use when resizing.

Flags : Read / Write

Default value : default (0)

Since : 1.26


scale-method

“scale-method” GstVaScaleMethod *

Sets the scale method algorithm to use when resizing.

Flags : Read / Write

Default value : default (0)

Since : 1.22


Named constants

GstVaInterpolationMethod

Members

default (0) – Default interpolation
nearest-neighbor (4096) – Nearest neighbor interpolation
bilinear (8192) – Bilinear interpolation
advanced (12288) – Advanced interpolation method is defined by each implementation and usually gives best quality.

GstVaScaleMethod

Members

default (0) – Default scaling method
fast (256) – Fast scaling method
hq (512) – High quality scaling method

Since : 1.22


The results of the search are