Sebastian Dröge
5bc92375c9
svtav1enc: Fix indentation
2023-02-03 22:14:18 +02:00
Sebastian Dröge
7890a1f8c7
svtav1: Integrate into the build system properly
2023-02-03 22:14:18 +02:00
Sebastian Dröge
b15efacf84
svtav1: Merge SVT-AV1 encoder into gst-plugins-bad
...
This is based on d5e1e2a586020854733f6b0806064d0c900c88d2 from
https://gitlab.com/AOMediaCodec/SVT-AV1 .
2023-02-03 22:13:30 +02:00
Tim-Philipp Müller
85476eab08
kms: drop use of GSlice allocator and remove unnecessary check
...
g_new0() will never return NULL but just abort if it can't
allocate memory (same for g_slice_new).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784 >
2023-02-03 17:48:10 +00:00
Tim-Philipp Müller
35405de344
shm: drop use of GSlice allocator
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784 >
2023-02-03 17:48:10 +00:00
Tim-Philipp Müller
3f94d7ec37
midiparse: drop use of GSlice allocator
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784 >
2023-02-03 17:48:10 +00:00
Tim-Philipp Müller
d95d3e39af
cc708overlay: bump pango requirement and drop no longer required locking
...
Gets rid of GSlice allocation that's never freed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784 >
2023-02-03 17:48:10 +00:00
Seungha Yang
e1a22402d3
tools: Make sure UTF-8 encoded command line arguments on Windows
...
On Windows, arguments passed in main() are system codepage
encoded and might not be valid UTF-8 string.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3828 >
2023-02-03 16:05:19 +00:00
Seungha Yang
090d50e1a0
tests: Add CUDA memory allocator test
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:43 +00:00
Seungha Yang
10ade466ef
nvenc: Use CUDA stream of memory if exists
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:43 +00:00
Seungha Yang
7a8bb85523
cudaupload, cudadownload: Update for shared CUDA stream
...
Use CUDA stream of memory if exists
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:43 +00:00
Seungha Yang
aabcba16db
nvdecoder: Skip synchronization if downstream buffer holds CUDA stream
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
ddc5f1d425
cudaconvertscale: Add support for shared CUDA stream
...
If CUDA stream is shared by upstream/downstream, don't sync at
convert element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
1cb47d549b
cudaconverter: Don't sync per conversion
...
Caller should take care of synchronization
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
8d14194fdd
nvencoder: Add support for shared CUDA stream
...
Sets CUDA stream on CUDA buffer pool so that CUDA stream object
can be shared
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
d409c35367
cudabufferpool: Add support for CUDA stream use in memory
...
* Use GstCudaPoolAllocator
* Pass configured GstCudaStream object to allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
30d06e03c2
cudamemory: Make GstCudaStream-aware
...
This will be used for CUDA stream sharing.
* Adding GstCudaPoolAllocator object. The pool allocator will
control synchronization of allocated memory objects.
* Modify gst_cuda_allocator_alloc() API so that caller can specify/set
GstCudaStream object for the newly allocated memory.
* GST_CUDA_MEMORY_TRANSFER_NEED_SYNC flag is added in addition to
existing GST_CUDA_MEMORY_TRANSFER_NEED_{UPLOAD,DOWNLOAD}.
The flag indicates that any GPU command queued in the CUDA stream
may not be finished yet, and caller should take care of the
synchronization.
The flag is controlled by GstCudaMemory object if the memory holds
GstCudaStream. (Otherwise, GstCudaMemory will do synchronization
as before this commit). Specifically, GstCudaMemory object will set
the new flag automatically when memory is mapped with
(GST_MAP_CUDA | GST_MAP_WRITE) flags. Caller will need to unset
the flag via GST_MEMORY_FLAG_UNSET() if it's already synchronized
by client code.
* gst_cuda_memory_sync() helper function is added to perform synchronization
* Why not use CUevent object to keep track of synchronization status?
CUDA provides fence-like interface already via CUevent object,
but cuEventRecord/cuEventQuery APIs are not zero-cost operations.
Instead, in this version, the status is tracked by using map and
object flags.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
9eaae61a44
cudamemory: Allow nullptr allocator object
...
The GstCudaAllocator object doesn't hold any device object.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
0a81c8deb3
nvcodec: Port to GstCudaStream
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
a7c54ebc06
cuda: Add GstCudaStream object
...
Wrap CUstream handle with GstCudaStream to make it ref-counted
object. This GstCudaStream object will be used later for
CUDA stream sharing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
661b5f60c6
cuda: Provide single header include entry point
...
Add "gstcuda.h" header file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629 >
2023-02-03 15:27:42 +00:00
Seungha Yang
bc0708eafb
nvencoder: Fix min buffers parameter of allocation query in auto GPU mode
...
At the time when propose_allocation() get called, encoder session
would not be initialized yet.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3888 >
2023-02-03 22:19:22 +09:00
Sebastian Dröge
8aa376d541
gstreamer: Decide rate-control-mode based on the bitrate/cqp/crf settings
...
And also keep the default encoder settings but simply override them with
our own values that we care about.
This mirrors the encoder configuration behaviour from ffmpeg.
2023-02-03 12:48:56 +02:00
Sebastian Dröge
70c83bc59c
gstreamer: Use GLib types instead of stdint.h types consistently
2023-02-03 12:48:56 +02:00
Sebastian Dröge
dd1db338df
gstreamer: Fix double unref
...
The ownership of the caps is passed to `gst_video_encoder_set_output_state()`.
2023-02-03 12:48:56 +02:00
Sebastian Dröge
df064c6cc2
gstreamer: Configure colorimetry and HDR metadata if present
...
This raises the minimum GStreamer requirement to 1.16 as used by the CI
and optionally makes use of 1.18 features, including HDR.
2023-02-03 12:48:25 +02:00
Sebastian Dröge
aeee6f5b6a
gstreamer: Set correct maximum width/height limits
2023-02-03 12:35:24 +02:00
Sebastian Dröge
65eb56e7ad
gstreamer: Use correct 10-bit format on big endian systems
2023-02-03 12:35:24 +02:00
Sebastian Dröge
90fd191392
gstreamer: Set force_key_frames=true
in CQP/CRF mode
...
Other modes don't support that so keyframes can't be requested at
arbitrary times.
2023-02-03 12:35:24 +02:00
Sebastian Dröge
f24643b48f
gstreamer: Add support for setting arbitrary parameters via parameters-string
property
2023-02-03 12:35:18 +02:00
Sebastian Dröge
d746164ba0
gstreamer: Fix naming of function name that was taken over from the SVT-HEVC encoder
2023-02-03 12:34:38 +02:00
Sebastian Dröge
ddb9a037e1
gstreamer: Don't overwrite application configuration on initialization and initialize with the default configuration
2023-02-03 12:34:38 +02:00
Sebastian Dröge
7b1b33aff2
gstreamer: Clean up property handling
...
Use more correct types, defaults and clean up property names a bit.
This now matches the configuration provided by ffmpeg.
2023-02-03 12:34:38 +02:00
Sebastian Dröge
78ee7e82d9
gstreamer: Mark all internal functions as static
2023-02-03 12:34:38 +02:00
Sebastian Dröge
10769e7fe6
gstreamer: Fix encoder and buffer state life cycle
...
Allocate/deallocate the encoder in `open()`/`close()` and its buffers in
`start()` / `stop()`.
Also fail correctly if configuring the encoder fails.
2023-02-03 12:34:38 +02:00
Sebastian Dröge
24d6027d2e
gstreamer: Remove unused frame_count
and dts_offset
2023-02-03 12:34:38 +02:00
Sebastian Dröge
2d250439f1
gstreamer: Fix debug category description
2023-02-03 12:34:38 +02:00
Adrian Fiergolski
79d2af5626
avtp: rvf: add missing since markers
...
Add missing markers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335 >
2023-02-02 19:15:46 +01:00
Adrian Fiergolski
9f880b37fc
avtp: rvf: add AVTP RVF de-payload support
...
Add AVTP Raw Video Format de-payload support. The element supports only
GRAY16_LE output format, so:
- active pixels (no vertical blanking),
- progressive mode,
- 8 and 16-bit pixel depth,
- mono pixel format,
- grayscale colorspace.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335 >
2023-02-02 19:15:42 +01:00
Adrian Fiergolski
d8f449ccda
avtp: cvf: extract AVTP VF depayload base class
...
Extract a part which could be common with the AVTP RVF depayload plugin to a separate class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335 >
2023-02-02 19:15:38 +01:00
Adrian Fiergolski
4f2fde0163
avtp: rvf: add AVTP RVF payload support
...
Add AVTP Raw Video Format payload support. The element supports only GRAY16_LE
input format, so:
- active pixels (no vertical blanking),
- progressive mode,
- 8 and 16-bit pixel depth,
- mono pixel format,
- grayscale colorspace.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335 >
2023-02-02 19:15:33 +01:00
Adrian Fiergolski
8702a1fa67
avtp: cvf: extract AVTP VF payload base class
...
Extract a part which could be common with the AVTP RVF payload plugin to a separate class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335 >
2023-02-02 19:15:29 +01:00
Piotr Brzeziński
ae200a4d62
vtenc: Disable HW acceleration for interlaced ProRes
...
Due to a bug in the VT API, attempting to encode interlaced content
with ProRes results in an error, halting the pipeline instead of
gracefully falling back to software encoding.
Should be removed in the future if Apple ever fixes this issue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3222 >
2023-02-02 06:18:02 +00:00
He Junyan
60731adea6
va: Avoid the array index overflow when filling 8x8 scaling list.
...
The VA API has not defined the scaling list entries for U/V planes
for the 4:4:4 stream. In fact, we do not meet the 4:4:4 format output
for H264 so far, and scaling list is not used frequently, so we just
print out some warning and ignore these scaling list values.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3749 >
2023-02-02 00:41:42 +00:00
Seungha Yang
29bd8de052
nvvp9dec: Fix return value
...
It should return GstFlowReturn value, not boolean
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3870 >
2023-02-02 05:07:44 +09:00
Sebastian Dröge
b12c66042b
aom: Include stream-format and alignment in the AV1 caps
...
The decoder does not work with arbitrary alignment and annexb stream
format and the encoder can give the information that it outputs
obu-stream/tu to downstream.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3862 >
2023-02-01 19:04:32 +00:00
Olivier Crête
16158df5b2
wayland: Export the _get_type() functions
...
Add the macro before the declaration so the types are properly exported,
this makes it possible to do dynamic casting and checks.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3858 >
2023-02-01 15:29:26 +00:00
Mengkejiergeli Ba
dfe16a5cf2
msdkallocator: Use const ptr of videoinfo in func param
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3621 >
2023-02-01 04:31:23 +00:00
Benjamin Gaignard
16ad80179b
codec2json: Add av12json element
...
This element convert AV1 frame header into human readable
json data.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3734 >
2023-01-30 19:46:55 +00:00
Benjamin Gaignard
fd588a50e4
codec2json: Add vp82json element
...
This element convert vp8 frame header into human readable
json data.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3734 >
2023-01-30 19:46:55 +00:00