He Junyan
67eb1223c0
jpegdecoder: return the real error of decode_scan and decode_frame.
...
The current handle_frame() does not return the real error that happens
in decode_scan and decode_frame, which makes the pipeline continue with
the error and may trigger asserting later.
We also return the error when decode_quant_table or decode_huffman_table
fails.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2938 >
2022-08-25 17:42:55 +08:00
He Junyan
42838c3b9e
va: h265dec: Enable the scc_main_4:4:4_10 profile.
...
We should enable this profile which is already allown in vaprofile.c
after libva 1.8 version.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2909 >
2022-08-19 00:50:53 +00:00
Víctor Manuel Jáquez Leal
b10fc4d8db
vajpegdec: Fix memory leak.
...
Free value content.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899 >
2022-08-17 18:34:10 +00:00
Víctor Manuel Jáquez Leal
a075e57c61
vajpegdec: Fix 4:2:2 for i965.
...
Since i965 uses NV12 either for 4:2:0 and 4:2:2 chroma (using an
internal color conversion) the chroma validation has to be shortcut.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899 >
2022-08-17 18:34:10 +00:00
Víctor Manuel Jáquez Leal
4dd6728ed5
va: Validate JPEG subsampling configurations.
...
There are Mesa Gallium drivers that report subsampling but without
any pixel format. So, strip out these subsamplings.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899 >
2022-08-17 18:34:10 +00:00
Víctor Manuel Jáquez Leal
0446e35a14
va: gst_va_create_raw_caps_from_config() may return NULL.
...
This patch verifies if the function returns NULL in the caller.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899 >
2022-08-17 18:34:10 +00:00
Víctor Manuel Jáquez Leal
ad15fc9169
vah264enc: Set codec frame sync point if IDR
...
This flag is used by GstVideoEncoder base class for certain configurations.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2852 >
2022-08-10 08:00:18 +00:00
Víctor Manuel Jáquez Leal
c4706ed219
vah264enc: Packed headers can be zero.
...
A driver can report back no packed header support (VA_ENC_PACKED_HEADER_NONE).
This patch removes that false verification.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2851 >
2022-08-10 04:31:27 +00:00
Víctor Manuel Jáquez Leal
ecb12a05b8
vah264enc: Fix caps for mesa gallium.
...
Radeon mesa gallium driver has a bug which adds P010_10LE sink caps
format. This patch removes formats which arent 420 chroma.
gst_caps_set_format_array() wasn't used because the fix traverse
several structures with potential different formats.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2844 >
2022-08-08 17:47:56 +00:00
Víctor Manuel Jáquez Leal
8c59ee29c2
vah264dec: Complete profiles in decoder.
...
Instead of specifying all the H.264 "supported" profiles in the global
hash table (used either by decoders and encoders), just complete them
in the decoder only, since the encoder doesn't support them.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2844 >
2022-08-08 17:47:56 +00:00
Víctor Manuel Jáquez Leal
67ce55f33e
vah264enc: Lock properties read/write.
...
This is a first step for changing properties at runtime.
And add missing bitrate upate and notification.
Fixes : #1258
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2836 >
2022-08-04 14:26:00 +00:00
Víctor Manuel Jáquez Leal
cc9d69cb66
vah264enc: Use guint32 for rc_ctrl as it's for rc_ctrl_mode.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2836 >
2022-08-04 14:26:00 +00:00
Víctor Manuel Jáquez Leal
7e95a8fc92
vah264enc: Split aud property and its usage.
...
Just as other property variables, it's split for ease it usage,
particularly after adding access locks.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2836 >
2022-08-04 14:26:00 +00:00
Víctor Manuel Jáquez Leal
c9f2108b43
va: baseenc: Untabbify and format.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2836 >
2022-08-04 14:26:00 +00:00
Víctor Manuel Jáquez Leal
ce7070bf5b
vapostproc: Check for colorimetry changes.
...
It uses what's merged in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2777 >
2022-08-02 17:39:24 +00:00
Eric Knapp
d11a0d04ec
va: h264enc: Make AUD the first NAL unit
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2796 >
2022-07-27 06:46:21 +00:00
He Junyan
8e2bbfed13
va: baseenc: Do not use codec frame structure again after finish_frame().
...
In _push_out_one_buffer(), we use codec frame structure again for error handling
after we already call finish_frame(), which is a latent segment fault.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2739 >
2022-07-11 10:12:29 +00:00
He Junyan
27c33f0161
va: baseenc: Do not clear the codec frame twice when error.
...
The current manner will clear the input codec frame twice if we fail
to push the output data, which will trigger an assert.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2739 >
2022-07-11 10:12:29 +00:00
U. Artie Eoff
c4a9a96a15
va: postproc: add scale-method property
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2654 >
2022-06-27 12:17:54 -04:00
U. Artie Eoff
211ba46369
va: filter/postproc: move unconditional props to vavpp
...
Only conditional/dynamic properties should be installed/handled
by vafilter. Thus, move and install the unconditional/static
properties in vavpp.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2654 >
2022-06-27 12:17:53 -04:00
U. Artie Eoff
178f4fcd20
va: compositor/filter: use scale method setter
...
Use the filter's scale method member instead of the sample's member.
Removes the filter_flags member from the composite sample.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2654 >
2022-06-27 10:53:11 -04:00
U. Artie Eoff
280678fe42
va: filter: add scale method field and setter
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2654 >
2022-06-27 10:52:03 -04:00
Víctor Manuel Jáquez Leal
63a8fc505e
va: Add vajpegdec element.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1575 >
2022-06-27 13:43:14 +00:00
Víctor Manuel Jáquez Leal
ec55017a83
va: allocator: Add hack for no fourcc when surface creation.
...
This patch adds general mechanism for handling specific hacks. In this
case for jpeg decoder in i965 driver, which cannot create surfaces
with fourcc specified.
From jpeg decoder to the allocator, which creates the surfaces,
there's a non-simple path: basedec pseudo-class adds a hacks guint32
which will be set by actual elements (vajpegdec, in this case) and
basedec will always set the hack to the allocator when the allocator
is instantiated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1575 >
2022-06-27 13:43:14 +00:00
Víctor Manuel Jáquez Leal
5b28509564
va: caps: Add jpeg fields in coded caps.
...
Given the supported rt formats in a profile/entrypoint config it's
possible to know the supported JPEG colorspace and subsampling. This
patch adds this information in coded caps to a safer autoplugging
after jpegparser.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1575 >
2022-06-27 13:43:14 +00:00
Víctor Manuel Jáquez Leal
cc30854893
va: Add jpegdecoder base class.
...
This base class is intented for hardware accelerated decoders, but since
only VA uses it, it will be kept internally in va plugin.
It follows the same logic as the others video decoders in the library but.
as JPEG are independet images, there's no need to handle a DBP so no need
of a picture object. Instead a scan object is added with all the structures
required to decode the image (huffman and quant tables, mcus, etc.).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1575 >
2022-06-27 13:43:14 +00:00
Víctor Manuel Jáquez Leal
f36d2671e4
va: build: Remove duplicated source.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1575 >
2022-06-27 13:43:14 +00:00
Víctor Manuel Jáquez Leal
685a611812
va: Use driver implementation macro rather than function.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2642 >
2022-06-21 18:21:46 +00:00
Víctor Manuel Jáquez Leal
bb84a533bf
va: basedec: Select output format with the used chroma in decoder.
...
Currently, video format is decided with downstream caps intersection,
but that's not correct since chroma is not considered. The video
decoders have to decide the output format given the used chroma, not
by the downstream caps negotiation.
This patch changes that. Still, caps feature is selected by caps
negotiation, then, with the preferred caps feature, the output format
is search within that caps feature.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2569 >
2022-06-15 00:00:53 +00:00
Tim-Philipp Müller
9d9e59622f
Bump GLib requirement to >= 2.62
...
Can't require 2.64 yet because of
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/323
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2568 >
2022-06-10 06:01:41 +00:00
Víctor Manuel Jáquez Leal
045b6f5ea3
vah264enc: Guard logging functions
...
.. and use spec for rate control rather than static switch.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2522 >
2022-06-07 12:02:21 +00:00
Víctor Manuel Jáquez Leal
261714e25d
vah264enc: Support default and none rate control.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2522 >
2022-06-07 12:02:21 +00:00
Víctor Manuel Jáquez Leal
e27ad1a273
va: encoder: Rate control property.
...
Fixes : #1241
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2522 >
2022-06-07 12:02:21 +00:00
Víctor Manuel Jáquez Leal
be948816d3
va: Register base classes as abstract.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2521 >
2022-05-29 16:03:46 +00:00
Víctor Manuel Jáquez Leal
ae9fe4a851
va: encoder: Use entrypoint type.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2521 >
2022-05-29 16:03:46 +00:00
Víctor Manuel Jáquez Leal
4474056f6f
va264enc: Fix typo.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2508 >
2022-05-29 11:56:39 +00:00
Víctor Manuel Jáquez Leal
e83983d7ca
va: encoder: Fix regression since commit 2042c2d4f0
.
...
There's no need to compare with the open entrypoint to query the
encoder. This commit removes the checks to the configured entrypoint
with the parameter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2508 >
2022-05-29 11:56:39 +00:00
Víctor Manuel Jáquez Leal
24527856cb
vacompositor: Pass video info pointer than copying it.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2496 >
2022-05-28 00:00:39 +00:00
Víctor Manuel Jáquez Leal
f9b631e0ea
vacompositor: Remove useless consts.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2496 >
2022-05-28 00:00:39 +00:00
He Junyan
2042c2d4f0
va: H264enc: Add encoder for VAEntrypointEncSliceLP.
...
We name vah264lpenc to support H264's VAEntrypointEncSliceLP encoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2472 >
2022-05-25 20:40:48 +00:00
He Junyan
d47416d3a2
va: encoder: Do not reset the frame count when reconfig().
...
We should not reset the input/output_frame_count when some configure
changes. For example, the if resolution changes, the current way just
resets the frame count and make the PTS of the output buffer restart
from the original PTS of the first frame. That causes a lot of QOS
event and drop all the new frames.
We should only reset them when encoder start().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2489 >
2022-05-25 18:56:34 +00:00
He Junyan
994f2c56e2
va: encoder: change reset_state() to a virtual function of base class.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2489 >
2022-05-25 18:56:34 +00:00
U. Artie Eoff
8a161880fc
vacompositor: check caps and info return values
...
Check return values for get caps and video info from caps.
This was flagged by static analysis.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2480 >
2022-05-25 10:16:00 +00:00
Víctor Manuel Jáquez Leal
8433bab0b5
va: Avoid unused variable if logging is disabled.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2478 >
2022-05-24 19:07:47 +00:00
Víctor Manuel Jáquez Leal
84c0d02755
va: Keep include's code style
...
Headers are in alphabetical order.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2465 >
2022-05-24 13:41:50 +00:00
Víctor Manuel Jáquez Leal
46e536898f
vafilter: Fix logging of unsupported alpha blending.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2477 >
2022-05-24 12:30:49 +00:00
He Junyan
fc75e38496
va: baseenc: No need to check the frame pointer in handle_frame().
...
No need to check the NULL pointer of "frame" in error handling, it
is assured non-NULL by base class and we already use it everywhere
in this function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2471 >
2022-05-23 15:03:03 +08:00
He Junyan
de5952bc83
va: baseenc: include the "vacompat.h" for old version glib.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2463 >
2022-05-22 15:03:54 +08:00
U. Artie Eoff
d2651a1e0b
va: vpp: enable compositor
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2332 >
2022-05-21 21:18:15 +02:00
U. Artie Eoff
afe8723196
va: vpp: add compositor
...
New implementation of a VA-API compositor with blend feature.
Various chunks of code was taken from vavpp.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2332 >
2022-05-21 21:18:15 +02:00