Fix deinterlacing flags to make more sense. The TFF (top-field-first)
flag is meant to specify the organization of reference frames used in
advanced deinterlacing modes. Introduce the more explicit flag TOPFIELD
to specify that the top-field of the supplied input surface is to be
used for deinterlacing. Conversely, if not set, this means that the
bottom field of the supplied input surface will be used instead.
Don't try to create pixmaps if we have not requested that feature. This
fixes execution for non-X11 backends, and most specifically DRM video
output mode.
Add --deinterlace option to enable deinterlacing through explicit VA/VPP
deinterlacing filter. However, if --deinterlace option is not set but the
--deinterlace-flags option is set with "top-field-first", then the very
basic bob deinterlacing filter is set through VA/VPP proc pipeline flags.
Add --denoise option to enable noise reduction with the level specified
as the option value (float). Likewise, add --sharpen option to enable
sharpening.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Add support for frame cropping through the --crop-rect|-c argument.
The format used is either <WIDTH> 'x' <HEIGHT>, with origin at (0,0) ;
or full specification with '('? <X> ',' <Y> ')'? <WIDTH> 'x' <HEIGHT>.
Add image_generate_full() function to create interleaved color rectangles.
If flags is zero, the whole frame is generated with a unique pattern. If
flags is non-zero, then each field is handled individually.
On some platforms, vaPutImage() would fail even if it does not involve
color format conversion or scaling, whereas copying raw pixels through
vaDeriveImage() could work instead.
Add --pixmap option to test-decode so that to allow copies of VA
surface to an intermediate pixmap and rendering from that pixmap.
Only X11 backends are supported for now.
Fix new internal video format API, based on GstVideoFormat, to not
clobber with system symbols. So replace the gst_video_format_* prefix
with gst_vaapi_video_format_ prefix, even if the format type remains
GstVideoFormat.
Get rid of GstCaps to create surface/image pool, and use GstVideoInfo
structures instead. Those are smaller, and allows for streamlining
libgstvaapi more.
Change generic decoder of sample I-frame to return a GstVaapiSurfaceProxy
instead of a plain GstVaapiSurface. This means that we can now retrieve
the frame cropping rectangle from the surface proxy, along with additional
information if ever needed.
Improve check for display cache infrastructure. In particular, for X11 and
GLX backends, we need to make sure that we can create a GstVaapiDisplayX11
from another GstVaapiDisplayGLX, i.e. underlying X11 and VA displays can be
shared. Besides, allocating a GstVaapiDisplayGLX while a GstVaapiDisplayX11
already exists will have to generate different VA displays.
Introduce a new configure option --with-gstreamer-api that determines
the desired GStreamer API to use. By default, GStreamer 1.0 is selected.
Also integrate more compatibility glue into gstcompat.h and plugins.
Use gst_vaapi_image_format_from_structure() helper in test-display and
then extract a VAImageFormat from it instead of relying on GstCaps for
YUV and RGB formats.
Set the window size to the decoded surface dimensions, if the user has
not requested the application to run in full-screen mode. Besides, no
effort is made to preserve aspect ratio or to center the video within
the mapped window.
Add helper functions to determine the codec type from a specific file
or utility functions to convert from codec type to GstCaps or from
codec name to codec type.