He Junyan [Fri, 21 Jun 2019 16:05:24 +0000 (00:05 +0800)]
libs: dec: h265: Fix profile_idc mapping.
The old mapping values return by gst_vaapi_utils_h265_get_profile_idc is
wrong, though GST_H265_PROFILE_IDC_MAIN and GST_H265_PROFILE_IDC_MAIN_10
happened to be the correct value.
We only support Annex A profile_idc (1-4).
U. Artie Eoff [Tue, 11 Jun 2019 03:46:30 +0000 (20:46 -0700)]
plugins: remove last negotiated video info if caps are same
If the allocation caps and negotiated caps are the same,
then ensure any previously negotiated video info is also
removed. This can occur when multi-resolution video
decoding returns to it's original resolution.
Fixes #170
U. Artie Eoff [Tue, 11 Jun 2019 03:39:28 +0000 (20:39 -0700)]
vaapivideomemory: allow negotiated info to be removed
Allow NULL negotiated_vinfo to be passed into
gst_allocator_set_vaapi_negotiated_video_info to allow
any previously set info to be removed.
Freyr [Thu, 6 Jun 2019 14:24:30 +0000 (17:24 +0300)]
libs: encoder: vp8,vp9: reset frame_counter when input frame's format changes
When input frame's formate changes, vp{8,9} encoders don't reset their frame
counter, hence the newly created frame could become a P-frame, leading to some
major troubles (sigabrt in libdrm in case of vp9). This patch adds some frame
prediction-related reset logic to the `flush' methods of GstVaapiEncoderVP8 and
GstVaapiEncoderVP9 implementations.
U. Artie Eoff [Fri, 31 May 2019 19:30:03 +0000 (12:30 -0700)]
libs: encoder: increase bitrate prop max value
There are many profile levels that can support
more than 102400 kbps. Thus, increase the max
allowed bitrate property value from 102400 kbps
to 2048000 kbps (same as msdk encoder plugins).
He Junyan [Tue, 4 Jun 2019 05:27:50 +0000 (13:27 +0800)]
libs: mpeg2 encoder: No packed header for SPS and PPS
Dislable passing down packed PPS and PPS to driver if driver does
not want it.
Fix: #168
Niels De Graef [Fri, 31 May 2019 21:10:33 +0000 (23:10 +0200)]
meson: Bump minimal GLib version to 2.44
This means we can use some newer features and get rid of some
boilerplate code using the G_DECLARE_* macros.
As discussed on IRC, 2.44 is old enough by now to start depending on it.
Víctor Manuel Jáquez Leal [Fri, 31 May 2019 11:08:39 +0000 (13:08 +0200)]
libs: dec: vp9: clear parser pointer after release
Fix an use-after-release of the parser pointer in VP9 decoder.
Freyr666 [Tue, 28 May 2019 09:09:36 +0000 (12:09 +0300)]
vaapiencode: Fixes deadlock in gst_vaapiencode_change_state function
This fixes a deadlock in gst_vaapiencode_change_state, which was due to
srcpad's chain function was locked waiting for available buffers. Since the
coded buffers in codedbuf_queue become available after sinkpad consume the
encoded frames, Paused -> Ready state change leads to deadlock. Coded buffers
are never consumed and marked free, hence gst_vaapiencode_handle_frame waits for
available buffers and holds the stream_lock of the srcpad.
Mathieu Duponchelle [Wed, 29 May 2019 21:08:22 +0000 (23:08 +0200)]
doc: remove xml from comments
U. Artie Eoff [Mon, 13 May 2019 23:39:33 +0000 (16:39 -0700)]
vaapipostproc: add mirror support
Adds vpp mirroring support to vaapipostproc. Use
property video-direction. Valid values are identity,
horiz or vert. Default is identity (no mirror).
Closes #89
v2: Use GstVideoOrientationMethod enum
v3: Don't warn for VA_MIRROR_NONE.
Use GST_TYPE_VIDEO_ORIENTATION_METHOD type.
v4: Query VAAPI caps when setting mirror value
instead of during per-frame processing.
v5: Return TRUE in warning cases when setting mirror value.
Mathieu Duponchelle [Tue, 28 May 2019 23:35:17 +0000 (01:35 +0200)]
doc: fix some incorrect gtk-doc links
Thibault Saunier [Thu, 16 May 2019 13:22:42 +0000 (09:22 -0400)]
docs: Update plugin cache
Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/issues/36
Víctor Manuel Jáquez Leal [Thu, 16 May 2019 14:46:43 +0000 (16:46 +0200)]
libs: surface: fix documentation format
Wangfei [Thu, 16 May 2019 02:05:17 +0000 (10:05 +0800)]
libs: enc: h265: reset num_ref_idx_l1_active_minus1 when low delay B.
When enable low delay B, the reference list 1 will be same with
reference list 0, so need reset the num_ref_idx_l1_active_minus1
to num_ref_idx_l0_active_minus1.
Fixes: #160
Thibault Saunier [Mon, 13 May 2019 23:05:43 +0000 (19:05 -0400)]
meson: Fix call to wrong function
Thibault Saunier [Mon, 22 Oct 2018 09:48:29 +0000 (11:48 +0200)]
docs: Port to hotdoc
He Junyan [Fri, 10 May 2019 10:29:10 +0000 (18:29 +0800)]
libs: encoder: not call ensure_num_slices inside g_assert
g_assert will take no effect when glib's G_DISABLE_ASSERT macro is
defined. The function inside the g_assert will take no effect and
we will fail to set the correct slice number.
Wangfei [Mon, 29 Apr 2019 01:52:39 +0000 (09:52 +0800)]
libs: h265: dec: Add extension flags setting.
Use VAPictureParameterBufferHEVCExtension&
VASliceParameterBufferHEVCExtension to pass extension setting from
some extension profile clips which may include these information.
The hevc extension setting only supported after libva release 2.2.0
(API 1.2.0).
U. Artie Eoff [Wed, 1 May 2019 19:56:55 +0000 (12:56 -0700)]
libs: encoder: add target-percentage property
Allow users to set the target-percentage for
variable rate controls. The default value is
70 (as hard-coded prior).
v2: minimum allowed value changed from 0 to 1
v3: target-percentage unchanged if CBR used
Resolves #129
He Junyan [Wed, 8 May 2019 16:09:21 +0000 (00:09 +0800)]
libs: encoder: Add a missing comment for DEFAULT_ROI_VALUE property.
He Junyan [Wed, 8 May 2019 15:39:20 +0000 (23:39 +0800)]
libs: encoder: Enable trellis quantization method.
The advanced trellis algorithm is supported in VA driver. We add
its support as a property named "trellis" of encoder.
It only works for H264 now, should be more in future.
Wangfei [Tue, 7 May 2019 03:03:51 +0000 (11:03 +0800)]
libs: decoder: vp9: support 422/444 8bit/10bit chroma type.
According to the vp9 sepc, profile 1/3 support 422/440/444 chroma
type, so we need to add subsampling_x&subsampling_y to fix it.
Here is the relationship between chroma type and profile and
subsampling_x&subsampling_y according to vp9 spec:
------------------------------------------
Profile | Bit depth | Chroma subsampling |
------------------------------------------
0 | 8 | 420 |
------------------------------------------
1 | 8 | 422,440,444 |
------------------------------------------
2 | 10, 12 | 420 |
------------------------------------------
3 | 10, 12 | 422,440,444 |
------------------------------------------
-----------------------------------------------
Subsampling_x | Subsampling_y | Chroma format |
-----------------------------------------------
0 | 0 | 444 |
-----------------------------------------------
0 | 1 | 440 |
-----------------------------------------------
1 | 0 | 422 |
-----------------------------------------------
1 | 1 | 420 |
-----------------------------------------------
He Junyan [Tue, 16 Apr 2019 10:33:54 +0000 (18:33 +0800)]
libs: Add packed 24 RGB format support.
Can not find a suitable chrome_type for this GST_VIDEO_FORMAT_RGB
packed 24 format. Just use GST_VAAPI_CHROMA_TYPE_RGB32 as its chrome
type. This kind of surface will just be created by new API with fourcc
and no old style chrome based creation is available.
fixes: #151
Wangfei [Fri, 15 Mar 2019 06:29:41 +0000 (14:29 +0800)]
vaapiencode: handle DMABuf caps feature in sink pad
Add DMABuff caps features in all encoders' sink pad.
Víctor Manuel Jáquez Leal [Fri, 3 May 2019 08:31:52 +0000 (10:31 +0200)]
libs: encoder: continue if roi meta is NULL
Coverity scan bug:
If the function actually returns a null value, a null pointer
dereference will occur.
In gst_vaapi_encoder_ensure_param_roi_regions(): Return value of
function which returns null is dereferenced without checking
He Junyan [Mon, 15 Apr 2019 11:58:14 +0000 (19:58 +0800)]
lib: decoder: vp9: Set chroma_type by VP9 bit_depth
The decoder's surface chroma type should depend on the bit depth
of VP9's parser. For 10bits VP9 stream, we need to use P10LE kind
10 bits surface as the decoder result.
Fixes #155
Víctor Manuel Jáquez Leal [Thu, 2 May 2019 14:00:57 +0000 (16:00 +0200)]
vaapipostproc: don't do any color conversion when GL_TEXTURE_UPLOAD
https://bugzilla.gnome.org/show_bug.cgi?id=748184 has resurrected
with commit
3e992d8a
Since gst_vaapi_find_preferred_caps_feature() returns a color format
from caps negotiation, different from the default one (NV12), the
postproc enables the color transformation. But when GL_TEXTURE_UPLOAD
feature is negotiated, no color transformation shall be done.
Nonetheless, with commit
3e992d8a the requested format changes
firstly, because there's no video sink yet, so ANY caps are
negotiated; but later, when there's a video sink and a caps
renegotiation, the GL_TEXTURE_UPLOAD is negotiated though the color
format conversion still ongoing. It is required to reset that
conversion.
This patch force default color format when GL_TEXTURE_UPLOAD is
selected as preferred, thus avoiding the color conversion.
Fixes: #157
Julien Isorce [Fri, 19 Apr 2019 22:49:37 +0000 (15:49 -0700)]
libs: surface: fix double free when dmabuf export fails
Happens if vaAcquireBufferHandle fails.
He Junyan [Mon, 29 Apr 2019 12:10:39 +0000 (20:10 +0800)]
libs: h264encoder: fix a typo of GstVaapiEncoderH264PredictionType
Tim-Philipp Müller [Fri, 19 Apr 2019 09:43:35 +0000 (10:43 +0100)]
Back to development
Tim-Philipp Müller [Thu, 18 Apr 2019 23:38:12 +0000 (00:38 +0100)]
Release 1.16.0
Tim-Philipp Müller [Thu, 18 Apr 2019 23:38:12 +0000 (00:38 +0100)]
Update docs
Víctor Manuel Jáquez Leal [Mon, 15 Apr 2019 17:34:05 +0000 (19:34 +0200)]
libs: encoder: h264,h265: guard VA version for max_qp property
This patch fixes a regression from commit
5b1fe9c6.
max_qp, in rate control configuration, appeared in libva release
2.1 (API 1.1), thus it is required to guard the VA API version.
Fixes: #150
He Junyan [Mon, 8 Apr 2019 10:29:35 +0000 (18:29 +0800)]
libs: Add RGB565 image format support.
Víctor Manuel Jáquez Leal [Wed, 10 Apr 2019 11:59:05 +0000 (13:59 +0200)]
build: configure: delay USE_GTK conditional until check libva-x11
libva-x11 is used for X11 applications, so it is required to build
any GTK application.
Later, when Wayland test is added, we should change this.
Víctor Manuel Jáquez Leal [Wed, 10 Apr 2019 11:25:10 +0000 (13:25 +0200)]
build: configure: disable GLX if libva-x11 is not found
He Junyan [Mon, 15 Apr 2019 11:55:26 +0000 (13:55 +0200)]
libs: utils: avoid macro evaluation when stringify
string_of_va_chroma_format() gets a wrong string format description.
For example, the YUV420_10BPP get a string of 0x00000100 as output.
It's because VA_RT_FORMAT_xxx values are macro definitions. And
STRINGIFY(VA_RT_FORMAT_xxx) will expand to its real value
0x00000XXX.
To avoid the macro evaluation, it is changed to show only the color
format without VA_RT_FORMAT_ prefix.
Víctor Manuel Jáquez Leal [Mon, 15 Apr 2019 11:54:15 +0000 (13:54 +0200)]
libs: utils: use glib's macros
Don't reinvent the wheel.
Wangfei [Thu, 11 Apr 2019 07:05:02 +0000 (15:05 +0800)]
plugins: find the preferred format from right caps.
When the downstream has any caps, then raw video feature will
be used. At this situation, the preferred format should be chose
from caps which contains "vide/x-raw" feature instead of from
the fist allowed caps.
Fixes #142
U. Artie Eoff [Wed, 10 Apr 2019 18:43:33 +0000 (11:43 -0700)]
libs: encoder: h265: fill tier in va seq param buf
Now that tier is calculated in commit
58e74f9440fe (!68),
ensure we fill in the general_tier_flag in the
VAEncSequenceParameterBufferHEVC.
Tim-Philipp Müller [Wed, 10 Apr 2019 23:40:03 +0000 (00:40 +0100)]
Release 1.15.90
Tim-Philipp Müller [Wed, 10 Apr 2019 23:40:03 +0000 (00:40 +0100)]
Update docs
He Junyan [Tue, 9 Apr 2019 12:42:04 +0000 (20:42 +0800)]
libs: encoder: h265: Recognize the correct level and tier.
The current manner can not recognize the correct level and always
set the tier to main. Need to add frame rate check to recognize
levels such as 4.1, 6.2, etc. We also add a logic to check main
and high tier based on bitrate.
Fixes: #145
He Junyan [Wed, 3 Apr 2019 06:12:23 +0000 (14:12 +0800)]
libs: encoder: h264,h265: Set max_qp if min_qp is non-zero.
media-driver currently fails to set a correct value of max_qp when
min_qp is different to zero, in CBR and VBR mode, generating full
quality frames, thus unexpected huge output.
This patch sets max_qp to an arbitrary value to avoid this output
temporary.
Fixes: #144
Víctor Manuel Jáquez Leal [Tue, 9 Apr 2019 10:42:56 +0000 (12:42 +0200)]
libs: encoder: h264,h265: initial and minimal QP can be zero
Currently the minimal value for either min_qp and init_qp are 1,
but VA documentation specifiy that zero is also valid and means
to ignore the quantiser.
The default value is not changed though to avoid behaivor changes
to users.
Haihao Xiang [Tue, 9 Apr 2019 01:20:23 +0000 (09:20 +0800)]
meson: build test-vaapicontext when using X11
x11_dep and libva_x11_dep are optional and meson ignores these
dependencies even if they are added into the dependency list.
This fixes the error below when libva-x11 is not avaiblabe:
cc -Itests/elements/tests@elements@@test-vaapicontext@exe
-Itests/elements -I../../gstreamer-vaapi/tests/elements -I.
-I../../gstreamer-vaapi/ -Igst-libs -I../../gstreamer-vaapi/gst-libs
-I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/orc-0.4
-I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0
-I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include
-I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/
-I/usr/include/libdrm -I/usr/include/harfbuzz -I/usr/include/pango-1.0
-I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
-fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -O2 -g -fvisibility=hidden -fno-strict-aliasing -pthread
-DHAVE_CONFIG_H -MD -MQ
'tests/elements/tests@elements@@test-vaapicontext@exe/test-vaapicontext.c.o'
-MF
'tests/elements/tests@elements@@test-vaapicontext@exe/test-vaapicontext.c.o.d'
-o
'tests/elements/tests@elements@@test-vaapicontext@exe/test-vaapicontext.c.o'
-c ../../gstreamer-vaapi/tests/elements/test-vaapicontext.c
../../gstreamer-vaapi/tests/elements/test-vaapicontext.c:29:10: fatal
error: va/va_x11.h: No such file or directory
#include <va/va_x11.h>
He Junyan [Mon, 1 Apr 2019 04:56:28 +0000 (12:56 +0800)]
libs: encoder: h264_fei: Use gst_param_spec_array for view-ids
GValueArray is deprecated. Use GstValueArray instead.
Danilo Spinella [Sat, 30 Mar 2019 17:29:31 +0000 (18:29 +0100)]
vaapipluginutil: Fix #endif for USE_X11
Víctor Manuel Jáquez Leal [Fri, 29 Mar 2019 17:29:51 +0000 (18:29 +0100)]
libs: encoder: h264: simplify the view-ids setting
He Junyan [Tue, 26 Mar 2019 06:54:47 +0000 (14:54 +0800)]
libs: encoder: h264: Use gst_param_spec_array for view-ids
GValueArray is deprecated. Use GstValueArray instead.
gst_param_spec_array can be deserialized from command line using:
vaapih264enc view-ids="<(uint)40,(uint)100>" num-views=2
While the g_param_spec_value_array() can not, and always get
error: "gst_value_deserialize_g_value_array: unimplemented"
Also fixed an out-of-range bug.
He Junyan [Fri, 29 Mar 2019 05:33:41 +0000 (13:33 +0800)]
libs: Change the parameter setting order when encode picture.
The order in gst_vaapi_enc_picture_encode when encoding one
picture is not very correct. The misc parameters are set before
the picture parameters. Some of the misc parameters such as
ROI may change the current picture parameters. But the later
setting of picture parameter will re-init all picture related
parameters and clear the previous setting. The right order
should be picture parameter first and then misc parameters.
Signed-off-by: He Junyan <junyan.he@hotmail.com>
Wangfei [Tue, 26 Mar 2019 06:20:34 +0000 (14:20 +0800)]
libs: decoder: jpeg: support dynamic resolution change decode.
Add size_changed flag to watch out resolution. if change, reset
jpeg decoder's context.
Wangfei [Sat, 23 Mar 2019 07:34:03 +0000 (15:34 +0800)]
libs: encoder: h265: add low power mode encode.
By now, this feature only support by media-driver on Ice Lake
platform, more information you can reference:
https://github.com/intel/media-driver
He Junyan [Fri, 15 Mar 2019 10:40:21 +0000 (18:40 +0800)]
vaapiencode: gobject's prop_id differ from vaapi encoder
The vaapi internal encoder's property id are negative, thus they are
different from GObject's property ids.
gst_vaapi_encoder_set_property() should map to the internal encoder
property id, assigned in gst_vaapiencode_default_set_property().
Tim-Philipp Müller [Thu, 21 Mar 2019 16:56:34 +0000 (16:56 +0000)]
meson: disable compiler warnings for unused vars and args if gst debug system is disabled
Tim-Philipp Müller [Thu, 21 Mar 2019 13:31:57 +0000 (13:31 +0000)]
meson: use new 'python' module instead of deprecated 'python3' one
Thibault Saunier [Mon, 11 Mar 2019 21:38:36 +0000 (18:38 -0300)]
Tim-Philipp Müller [Mon, 4 Mar 2019 09:16:17 +0000 (09:16 +0000)]
Back to development
He Junyan [Fri, 1 Mar 2019 04:33:26 +0000 (12:33 +0800)]
libs: Fix a typo in comments.
Fix a typo in function description of
gst_vaapi_surface_pool_new_with_chroma_type.
Signed-off-by: He Junyan <junyan.he@hotmail.com>
Víctor Manuel Jáquez Leal [Wed, 27 Feb 2019 12:02:10 +0000 (13:02 +0100)]
plugin: if any caps in downstream, negotiate raw video
When downstream has any caps, vaapi should not shovel vaapi featured
buffers, but rather plain raw video, assuming always the worst case
scenario (downstream cannot handle featured video memory but raw
system memory buffers).
This patch query the peer caps without any filter, to know if
donwstream just ask for any caps, if so jump to the color space
checking, otherwise do the caps intersection and continue with the
feature selection algorithm.
Fixes: #139
Tim-Philipp Müller [Tue, 26 Feb 2019 12:01:53 +0000 (12:01 +0000)]
Release 1.15.2
Tim-Philipp Müller [Tue, 26 Feb 2019 12:01:53 +0000 (12:01 +0000)]
Update docs
He Junyan [Tue, 5 Feb 2019 08:59:40 +0000 (16:59 +0800)]
vaapivideomemory: Prefer same format for surface and image
We prefer to use the same format between image and surface for gst
vaapi allocator. The old way may choose different formats between
image and surface. For example, the RGBA image may have a NV12 surface.
So we need to do format conversion when we put/get image to surface.
Some drivers such as iHD can not support such conversion and always
cause a data flow error. There may also have some performance cost
for format conversion when put/get images.
So we prefer to use the same format for image and surface in the
allocator. If the surface can not support that format, we then
fallback to find a best one as the surface format.
Co-authored-by: Víctor Jáquez <vjaquez@igalia.com>
He Junyan [Fri, 15 Feb 2019 07:19:51 +0000 (15:19 +0800)]
libs: Delete the duplicated ARGB video format.
Two ARGB formats with the same format information.
Should be verbose and delete one.
Signed-off-by: He Junyan <junyan.he@hotmail.com>
Adam Jackson [Wed, 13 Feb 2019 15:39:59 +0000 (10:39 -0500)]
glx: Stop specifying GLX_DEPTH_SIZE
This code is just confused. It's asking for at least as many bits of
(z-axis) depth as the root window has bits of (color) depth. For rgb565
or rgb888 this is harmless, but at 10 bits per channel this demands a
30-bit or deeper Z buffer. While some hardware could in principle do a
32-bit Z buffer, Mesa does not expose such fbconfigs (at least on Intel
and AMD).
We're not actually using the Z buffer, so just stop asking for one.
Niels De Graef [Mon, 14 Jan 2019 10:30:48 +0000 (11:30 +0100)]
libs: wayland: add support for XDG-shell protocol
[wl_shell] is officially [deprecated], so provide support for the
XDG-shell protocol should be provided by all desktop-like compositors.
(In case they don't, we can of course fall back to wl_shell).
Note that the XML file is directly provided by the `wayland-protocols`
dependency and generates the protocol marshalling code.
[wl_shell]: https://people.freedesktop.org/~whot/wayland-doxygen/wayland/Client/group__iface__wl__shell.html
[deprecated]: https://github.com/wayland-project/wayland/commit/
698dde195837f3d0844b2725ba4ea8ce9ee7518c
Niels De Graef [Sat, 16 Feb 2019 18:09:50 +0000 (19:09 +0100)]
libs: window: wayland: Prefix wl_shell_surface field with `wl_`
It will help us to distinguish from other Wayland shell surface
(such as XDG-shell) later on.
Niels De Graef [Mon, 14 Jan 2019 08:58:19 +0000 (09:58 +0100)]
libs: wayland: Prefix wl_shell field with `wl_`
It will help us to distinguish from other Wayland shells (such as
XDG-shell) later on.
Denis Nagorny [Fri, 8 Feb 2019 06:21:28 +0000 (09:21 +0300)]
libs: display: lock ensure_profile()
Thread safety patch for ensure_profile() function
Fixes #133
Víctor Manuel Jáquez Leal [Fri, 8 Feb 2019 15:35:39 +0000 (16:35 +0100)]
meson: bump the minimum wayland version requirement to 1.11.0
This was missed on commit
77bb3424
Víctor Manuel Jáquez Leal [Thu, 24 Jan 2019 20:08:07 +0000 (21:08 +0100)]
vaapisink: x11: trap WM_DELETE_WINDOW message
Register the WM_DELETE_WINDOW message from window manager and
trap it to stop the pipeline cleanly.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/130
Víctor Manuel Jáquez Leal [Mon, 21 Jan 2019 18:22:58 +0000 (19:22 +0100)]
libs: window: remove native-id property
native-id property is problematic since the variable that stores it is
gsize, which is platform specific, and in some is bigger than unsigned
long, and there are not way to handle gsize properties.
Also, GST_VAAPI_ID_INVALID is defined in gsize terms, and we would
like to keep using it for this scope.
This patch removes the native-id property and set it manually in
gst_vaapi_window_new_internal().
Víctor Manuel Jáquez Leal [Fri, 18 Jan 2019 09:33:37 +0000 (10:33 +0100)]
libs: window: use G_GSIZE_MODIFIER for window id
gsize type is not equal in all platforms, then the 'l' print modifier
shall not be used always.
This issue was found in Debian builds.
Wangfei [Thu, 17 Jan 2019 02:27:13 +0000 (10:27 +0800)]
encoder: h264/h265: set SPS cbr_flag with correct value.
The flag only set as 1 when the rate-control mode is CBR.
Tim-Philipp Müller [Thu, 17 Jan 2019 02:36:52 +0000 (02:36 +0000)]
Release 1.15.1
Tim-Philipp Müller [Thu, 17 Jan 2019 02:36:52 +0000 (02:36 +0000)]
Update docs
Víctor Manuel Jáquez Leal [Mon, 14 Jan 2019 18:35:34 +0000 (19:35 +0100)]
libs: encoder: refactor to avoid code duplication
gst_vaapi_encoder_put_frame() and gst_vaapi_encoder_flush() duplicates
the same code segment where the coded buffer is created, the picture
encoded on it and pushed to the async queue.
The function gst_vaapi_encoder_encode_and_queue() refactor this.
Víctor Manuel Jáquez Leal [Mon, 14 Jan 2019 17:21:30 +0000 (18:21 +0100)]
libs: encoder: h264/h265: flush pending ordered pictures
In order to flush the pending pictures, a new internal encoder vmethod
is used: get_pending_reordered()
This method follows an iterator pattern which will return the next
picture to encode and push.
The base encoder will call this function in a loop when flush() is called.
For now, only H.264 and H.265 encoders implement this flushing mechanism.
Wangfei [Thu, 6 Dec 2018 02:18:53 +0000 (10:18 +0800)]
libs: encoder: h264/h265: fix encode lose frame issue.
Instead of dropping all remain frames in reorder_frame_list during
flush, keep encoding.
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/97
Wangfei [Tue, 15 Jan 2019 06:33:11 +0000 (14:33 +0800)]
vaapipostproc: before set surface proxy, check if it already been created and exist.
Fix the deinterlace black frame when playing with glimagesink:
gst-launch-1.0 filesrc location=test.264 ! h264parse ! vaapih264dec \
! vaapipostproc deinterlace-mode=1 deinterlace-method=1 ! glimagesink
Wangfei [Fri, 11 Jan 2019 05:48:29 +0000 (13:48 +0800)]
vaapipostproc: clean up USE_VA_VPP macro since it already removed from
configure file.
Haihao Xiang [Wed, 26 Dec 2018 06:36:23 +0000 (14:36 +0800)]
meson: build h264 fei encoder if possible
Haihao Xiang [Wed, 26 Dec 2018 06:04:08 +0000 (14:04 +0800)]
configure: bump the minimum wayland version requirement to 1.11.0
Haihao Xiang [Mon, 24 Dec 2018 04:58:53 +0000 (12:58 +0800)]
vaapi: bump the minimum vaapi version requirement to 0.39.0
And reduce unnecessary API version and structures check as well.
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/108
Víctor Manuel Jáquez Leal [Sat, 22 Dec 2018 17:07:35 +0000 (18:07 +0100)]
libs: window: remove custom ref() and unref()
Use gst_object_ref() and gst_object_unref() instead.
Víctor Manuel Jáquez Leal [Sat, 22 Dec 2018 12:25:09 +0000 (13:25 +0100)]
libs: window: use its own debug category
Víctor Manuel Jáquez Leal [Sat, 22 Dec 2018 17:02:38 +0000 (18:02 +0100)]
libs: window: refactor as gobject
This is another step in the gobjectification of the internal library
of gstreamer-vaapi. Now it is the turn of GstVaapiWindow and its
derivates.
The idea is to minimize the changeset keeping the same design as
much as possible.
GstVaapiWindow is defined as an abstract class with two properties:
the GstVaapiDisplay and the native ID. Thus, many of the
GstVaapiObject macros were copied as GstVaapiWindow macros.
The function gst_vaapi_window_new_internal() is kept as a decorator
of for calling gst_vaapi_window_create() and the possibility of
failure.
The descendant classes, such as glx, still use the private
structures, but through the gobject mechanism.
Víctor Manuel Jáquez Leal [Mon, 3 Dec 2018 21:05:29 +0000 (22:05 +0100)]
libs: filter: use its own debug category
He Junyan [Mon, 24 Dec 2018 06:08:42 +0000 (14:08 +0800)]
plugins: Add more check for allowed raw caps.
The gst_vaapi_plugin_base_get_allowed_raw_caps is used for both sink
pad and src pad, which cause some bugs. For sink pad, we need to verify
vaPutImage() while for the src pad we need to verify vaGetImage().
For vaapidecoderXXX kind of plugins, the case is more complex. We need
to verify whether the decoded result(in some surface, NV12 format most
of the time) can be vaGetImage to some raw image format. Add more check
to fix all these problems.
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/123
Signed-off-by: He Junyan <junyan.he@hotmail.com>
Wangfei [Tue, 18 Dec 2018 02:44:21 +0000 (10:44 +0800)]
vaapipostproc: fix csc fail when only change width or height.
Wonchul Lee [Sat, 15 Dec 2018 00:47:15 +0000 (09:47 +0900)]
meson: Add gtk guard
Wangfei [Sat, 15 Dec 2018 06:48:03 +0000 (14:48 +0800)]
libs: enc: h264: set max profile idc with correct profile.
Use the highest rank of available profile as the max profile to
set max idc value.
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/124
Niels De Graef [Mon, 3 Dec 2018 12:56:52 +0000 (13:56 +0100)]
Use G_DEFINE_TYPE_WITH_PRIVATE if applicable
This gets rid of the strange `do_init` macro and makes the intent a bit
more clear.
Thibault Saunier [Wed, 5 Dec 2018 20:24:53 +0000 (17:24 -0300)]
Automatic update of common submodule
From ed78bee to 59cb678
Wangfei [Tue, 27 Nov 2018 14:47:44 +0000 (09:47 -0500)]
libs: dec: h265: support decode for main-444 10bit streams.
Add 444 10bit yuv format Y410, which can be used to decode
main-444 10bit streams. Currently, this feature is only
supported by media-driver in Icelake.
Jordan Petridis [Wed, 28 Nov 2018 03:56:44 +0000 (05:56 +0200)]
Run gst-indent through the files
This is required before we enabled an indent test in the CI.
https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
He Junyan [Wed, 14 Nov 2018 05:11:56 +0000 (13:11 +0800)]
plugins: modify image check of extract_allowed_surface_formats.
The extract_allowed_surface_formats function just check whether
we can support some kind of surface/image format pair. We just
need to create a surface, create an image with the same video-format
and putImage from image to surface. All these operations success,
that kind of video-format is supported.
The old manner do not work for some kind of video-format. For example,
the RGBA kind of format will create a NV12 surface and RGBA image,
and the putImage will fail because the format is not same. And so
the RGBA format is not supported but actually it is supported.
Michael Olbrich [Wed, 14 Nov 2018 10:34:20 +0000 (11:34 +0100)]
vaapipostproc: add some missing locking
gst_vaapi_plugin_base_close() removed the raw caps that are used indirectly
in gst_vaapipostproc_transform_caps(). The usage is already protected by
the mutex.
This is needed when the pipeline is stopped during startup.
Xiang, Haihao [Tue, 20 Nov 2018 08:07:44 +0000 (16:07 +0800)]
Close dmabuf_fd
Otherwise it will result in resource leak when failed to create
dmabuf memory