Commit graph

26906 commits

Author SHA1 Message Date
Vivia Nikolaidou
cb55d30b3c interlace: Specify interlace-modes in the sink pad template
Especially specify the field-order in the interleaved mode. Otherwise it
might cause the negotiation to fail, because
GST_PAD_SET_ACCEPT_INTERSECT is not set on the sinkpad, and the
field-order is missing in the sink template but can be present in the
outside caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>
2021-03-08 21:01:50 +02:00
Seungha Yang
9da6da20e7 nvh264sldec: Reopen decoder object if larger DPB size is required
Equivalent to the d3d11h264dec fix
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1839

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2059>
2021-03-07 16:51:59 +09:00
Seungha Yang
a29c8935b7 d3d11: Fix an HLSL compiler warning
warning X3578: Output value 'main' is not completely initialized

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2052>
2021-03-04 20:34:23 +00:00
Bing Song
89f193e1eb transcoder: handle SIGINT and SIGHUP
Handle SIGINT and SIGHUP in transcoder. Or the output file maybe corrupt.

Fixes #1507

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1987>
2021-03-04 14:04:43 +00:00
Seungha Yang
3730ea3366 d3d11h264dec: Keep track of actually configured DPB size
... instead of the largest we ever seen.
Note that d3d11h264dec element holds previously configured DPB size
for later decoder object re-open decision.

This is to fix below case:
1) Initial SPS, required DPB size is 6
  - decoder object is opened with DPB size 6
  - max_dpb_size is now 6
2) SPS update with resolution change, required DPB size is 1
  - decoder object is re-opened with DPB size 1
  - max_dpb_size should be updated to 1, but it didn't happen (BUG)
3) SPS update without resolution change, only required DPB size is updated to 6
  - decoder object should be re-opened but didn't happen
    because we didn't update max_dpb_size at 2).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2056>
2021-03-04 17:57:14 +09:00
Tim-Philipp Müller
766bd655fc interlace: add more formats, esp 10-bit, 12-bit and 16-bit ones
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2054>
2021-03-03 18:34:26 +00:00
Benjamin Gaignard
5e8daa1c5c v4l2codecs: h264: retrieve interlaced information
Lets the decoder knows if the frames are interlaced or not.
Provide this information to the driver while filling reference
pictures fields in slice params structure

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
2021-03-02 22:03:34 +00:00
Nicolas Dufresne
84daea6be2 v4l2codecs: h264: Reduce controls for subsequent slices
Only the SLICE_PARAMS and PRED_WEIGHTS are needed for the second and
following slices.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
2021-03-02 22:03:34 +00:00
Ezequiel Garcia
1c082b79e1 v4l2codecs: h264: Implement optional scaling matrix
The new H.264 uAPI requires that all drivers support
scaling matrix only as an option, when a non-flat
scaling matrix is provided in the bitstream headers.

Take advantage of this and avoid passing the scaling
matrix if not needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
2021-03-02 22:03:34 +00:00
Ezequiel Garcia
78756ecba9 v4l2codecs: h264: Only set SPS control if needed
Given V4L2 controls are cached in V4L2, there is no need
to set them if they don't change. Set the SPS control
only if a new sequence was received by the parser.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
2021-03-02 22:03:34 +00:00
Ezequiel Garcia
ae9411e334 v4l2codecs: h264: Only slice-based need SLICE_PARAMS and PRED_WEIGHTS
Frame-based decoding mode doesn't require SLICE_PARAMS and
PRED_WEIGHTS controls.

Moreover, if the driver doesn't support these two controls, trying
to set them will fail. Fix this by only setting these on
slice-based decoding mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
2021-03-02 22:03:34 +00:00
Ezequiel Garcia
010565eb7f v4l2codecs: h264: Add API checks
Check that the V4L2 H264 controls' sizes match
our expectation. If not, then probably there's an API
mismatch which will cause errors or decoding corruption.

Also, print a warning if the kernel version is too old.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
2021-03-02 22:03:34 +00:00
Ezequiel Garcia
7d6b06ca1b v4l2codecs: h264: Update to the new uAPI
Starting from Linux v5.11, the V4L2 stateless H.264 uAPI
is updated and stable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
2021-03-02 22:03:34 +00:00
Ezequiel Garcia
56ecc19067 v4l2codecs: h264: Set the scaling matrix present flag unconditionally
We are currently always setting and passing a scaling matrix,
so need to set this flag accordingly. Passing a scaling matrix
optionally will be implemented in follow-up commit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
2021-03-02 22:03:34 +00:00
Víctor Manuel Jáquez Leal
f823124a39 va: postproc: mention the possibility of color balance
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2050>
2021-03-02 15:33:54 +00:00
Víctor Manuel Jáquez Leal
b61b3d833d docs: plugins update VA elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2050>
2021-03-02 15:33:54 +00:00
Víctor Manuel Jáquez Leal
c191a1a5da va: vp8dec, vp9dec: only set NV12 color format for documentation
Mention in documentation only the most used output format in VA-API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2050>
2021-03-02 15:33:54 +00:00
Seungha Yang
96fd79cfc5 d3d11convert: Forward colorimetry and chroma-site from upstream
Adopt the improvement of https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033
into d3d11.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
2021-03-02 23:26:59 +09:00
Seungha Yang
6afb6e65fc d3d11convert: Add support for border drawing
... and fix wrong resizing when downstream requested PAR value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
2021-03-02 23:26:46 +09:00
Seungha Yang
82a4e7e773 d3d11convert: Prefer video processor over shader
... if video processor was used previously. Otherwise, switching
between video processor and shader would result in inconsistent
output image quality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
2021-03-02 23:10:47 +09:00
Seungha Yang
6ba1ee8d0f d3d11videoprocessor: Disable auto processing mode explicitly
Don't allow auto processing (e.g., denoising), as it might result
in unexpected output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
2021-03-02 23:10:47 +09:00
Seungha Yang
646c34794f d3d11memory: Fix for wrong texture_array_size returns
Fix mismatched return values

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
2021-03-02 23:10:46 +09:00
Seungha Yang
47bcd62d1d d3d11decoder: Add trace log for DPB pool size debugging
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
2021-03-02 23:10:46 +09:00
Seungha Yang
98929c8157 d3d11decoder: Always use render-target bind flag for downstream pool
To convert decoded texture into other format, downstream would use
video processor instead of shader. In order for downstream to
be able to use video processor even if we copied decoded texture
into downstream pool, we should set this bind flag. Otherwise,
downstream would keep switching video processor and shader
to convert format which would result in inconsistent image quality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
2021-03-02 23:10:46 +09:00
Seungha Yang
a4c6130477 d3d11: Fix wrong preprocessing blocks
Missed in https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/464

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
2021-03-02 23:10:46 +09:00
He Junyan
f7eb93e22b va: vpp: fix a wrong caps logic in vpp_transform_caps().
The current gst_va_vpp_transform_caps return such as:
  video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ],
  interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA,
  BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16,
  16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive, format=(string)
  { NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw,
  width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive,
  format=(string){ VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, I420, P010_10LE };
  video/x-raw(memory:VAMemory), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ],
  interlace-mode=(string)progressive; video/x-raw(memory:DMABuf), width=(int)[ 1, 2147483647 ],
  height=(int)[ 1, 2147483647 ], interlace-mode=(string)progressive; video/x-raw, width=(int)
  [ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], interlace-mode=(string)progressive

Which is not correct. It mixes the template caps and the input query caps together.
The correct way should be: clip the template caps with the input caps(remove format
and rangify size). The correct answer should be:
  video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace
  -mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE,
  ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16, 16384 ], height=(int)[ 16,
  16384 ], interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA,
  BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw, width=(int)[ 16, 16384 ], height=(int)[ 16,
  16384 ], interlace-mode=(string)progressive, format=(string){ VUYA, GRAY8, NV12, NV21, YUY2,
  UYVY, YV12, I420, P010_10LE }

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2045>
2021-03-01 16:43:29 +00:00
Jan Alexander Steffens (heftig)
b9cc83ccf8 mpegtsparse: Fix switched DTS/PTS when set-timestamps=false
Fixes 30ee21eae3.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2047>
2021-03-01 16:29:58 +01:00
Ilya Kreymer
92626535c7 webrtc ice: Add 'min/max-rtp-port' props for setting RTP port range
default min port == 0, max port == 65535 -- if min port == 0, uses existing random port selection (range ignored)
add 'gathering_started' flag to avoid changing ports after gathering has started
validity checks: min port <= max port enforced, error thrown otherwise
include tests to ensure port range is being utilized (by @hhardy)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119>
2021-03-01 14:42:17 +00:00
Olivier Crête
3a3965e5cf webrtc ice: Only ever request one component, it's always rtcpmux
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119>
2021-03-01 14:42:16 +00:00
Thibault Saunier
1d03fdcc09 transcoder: Add some missing API guards
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
2021-03-01 12:37:44 +00:00
Thibault Saunier
d252ab2e06 transcoder: Fix potential use of uninitialized variables
gst_structure_get won't touch variables if the field is not present
leading to potential use of initialized vars

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
2021-03-01 12:37:44 +00:00
Thibault Saunier
8c2fd4fff7 transcoder: Rework the API to create/get SignalAdapter
We can only have 1 single GstTranscoderSignalAdapter object for a
given GstTranscoder object, this enforces that by avoiding to expose
a constructor and instead add a method to GstTranscoder to get the
signal adapter (internally creating it when needed). We can still
cleanly ensure that the signal adapter is running for the requested
GMainContext and return NULL if it is not the case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
2021-03-01 12:37:44 +00:00
Matthew Waters
b6038523c1 webrtcbin: use regular ice nomination by default
1. We don't currently deal with an a=ice-options in the SDP which means
   we currently violate https://tools.ietf.org/html/rfc5245#section-8.1.1
   which states: "If its peer is using ICE options (present in
   an ice-options attribute from the peer) that the agent does not
   understand, the agent MUST use a regular nomination algorithm."
2. The recommendation is default to regular nomination in both RFC5245
   and RFC8445.  libnice change for this is
   https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/125
   which requires an API break in libnice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2031>
2021-03-01 10:00:06 +00:00
Philippe Normand
552007f839 transcoder: Remove un-needed gst_init call
We can safely assume GStreamer is already initialized from here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
2021-02-26 15:37:23 +00:00
Thibault Saunier
984f0c2d2f transcoder: Port to a GstBus API instead
Following the move made by GstPlayer in:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/35

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
2021-02-26 15:37:23 +00:00
Thibault Saunier
7cf6e4d8f2 transcoder: Automatically generate enums GTypes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
2021-02-26 15:37:23 +00:00
Thibault Saunier
0a1dcc9546 transcoder: Port to G_DECLARE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
2021-02-26 15:37:23 +00:00
Sebastian Dröge
02412620a8 decklinkvideosink: Use correct numerator for 29.97fps
It's not 0.2997fps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2042>
2021-02-26 16:36:58 +02:00
Edward Hervey
6fe54f7f48 decklinksrc: Use a more accurate capture time
Use the hardware reference clock time when the frame was finished being captured
instead of a time much further down the road.

This improves the stability/accuracy of buffer times.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2040>
2021-02-26 14:08:43 +01:00
Víctor Manuel Jáquez Leal
a9211a5067 va: allocator: No need of fourcc to create surface.
In commits 430aa327 and a119a940 there are a regression since it is
possible to create surfaces without fourcc, only chroma (rtformat) is
required.

This regression is shown on radeonsi driver with certain color
formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2035>
2021-02-25 12:05:19 +00:00
Víctor Manuel Jáquez Leal
87fe2e321e va: vpp: implement GstColorBalance interface
And modify multiple-vpp example to use it with -r parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>
2021-02-25 11:22:53 +00:00
Víctor Manuel Jáquez Leal
5b117045e0 va: filter: add controllable and mutable playing to GParamFlags
Add controllable and mutable playgin to common GParamFlags.

Also use this common flags to video-direction

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>
2021-02-25 11:22:53 +00:00
Víctor Manuel Jáquez Leal
771645e445 vulkan: Fix elements long name.
Fix vkcoloconvert and vkviewconvert long names.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2034>
2021-02-24 20:15:52 +01:00
Haihao Xiang
54091d0290 msdk: allow user specify a drm device via an env variable
User may specify the required device via GST_MSDK_DRM_DEVICE

Example:
GST_MSDK_DRM_DEVICE=/dev/dri/card0 gst-launch-1.0 videotestsrc ! msdkh264enc
! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1953>
2021-02-24 04:40:14 +00:00
He Junyan
e15be4cf0f VA: Add the vaav1dec element as the av1 decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:53:43 +08:00
He Junyan
a119a940e4 VA: Add the aux surface for gst buffer used by decoder.
The AV1 codec needs to support the film grain feature. When the film
grain feature is enabled, we need two surfaces as the output of the
decoded picture, one without film grain effect and the other one with
it. The first one acts as the reference and is needed for later pictures'
reconstruction, and the second one is the real display output.
So we need to attach another aux surface to the gst buffer/mem and make
that aux surface as the target of vaBeginPicture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:52:50 +08:00
He Junyan
e40e78a793 VA: Add a helper function of decoder_add_slice_buffer_with_n_params.
Some codecs such as AV1 needs several parameters associated with one
slice. It may have multi tiles within one slice and each tile needs
its description parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:51:00 +08:00
He Junyan
315b101394 codecs: AV1decoder: Add the AV1 decoder base class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:50:51 +08:00
He Junyan
430aa327a8 va: allocator: replace assert with error log in va alloc.
We should print error log rather than assert when the forcc or
the rt_format of va allocator is unrecognized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:47:29 +08:00
Seungha Yang
8794f4b713 d3d11: Documentation update
* Update class metadata
  * for wrapper bin elements to be distinguishable from internal element.
  * D3D11 -> Direct3D11 for consistency
* Add missing Since mark everywhere
* Update plugin cache

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
2021-02-23 03:34:11 +09:00