path: root/gst-libs
AgeCommit message (Collapse)AuthorFilesLines
16 hourslibs: profile: The VP9 profiles' name should be just "0,1,2,3"HEADmasterHe Junyan1-4/+4
Part-of: <>
4 daysvaapidecode: Remove NO_SURFACE error handlingVíctor Manuel Jáquez Leal2-21/+0
Since surfaces are not bounded to decoding context it makes no sense to keep the surface semaphore. This patch removes the handling of this error. Part-of: <>
4 dayslibs: decoder: context: remove surfaces binding from context.He Junyan1-3/+19
The vaCreateContext do not need to specify the surfaces for the context creation now. So we do not need to bind any surface to the context anymore. Surfaces should be the resource belong to display and just be used in encoder/decoder context. The previous manner has big limitation for decoder. The context's surface number is decided by dpb size. All the surfaces in dpb will be attached to a gstbuffer and be pushed to down stream, and the decoder need to wait down stream free the surface and go on if not enough surface available. For more and more use cases, this causes deadlock. For example, gst-launch-1.0 filesrc location=a.h264 ! h264parse ! vaapih264dec ! x264enc ! filesink location=./output.h264 will cause deadlock and make the whole pipeline hang. the x264enc encoder need to cache more than dpb size surfaces. The best solution is seperating the surfaces number and the dpb size. dpb and dpb size shoule be virtual concepts maintained by the decoder. And let the surfaces_pool in context maintain the re-use of all surfaces. For encoder, the situation is better, all the surfaces are just used as reference frame and no need to be pushed to down stream. We can just reserve and set the capacity of the surfaces_pool to meet the request. Fix: #147 Fix: #88 Co-Author: Víctor Manuel Jáquez Leal <> Part-of: <>
6 dayslibs: decoder: h264, h265: in context at least 16 reference surfacesVíctor Manuel Jáquez Leal2-2/+2
Registering only stream's DBP size number of surfaces for decoding VA surfaces brings issues for certain streams. This change register all possible number of reference surfaces in a stream, which is 16. Fixes: #94
8 dayslibs: encoder: h265: init tier to GST_VAAPI_TIER_H265_UNKNOWN.He Junyan1-0/+1
Part-of: <>
8 dayslibs: encoder: h265: fix a bug to get get_profile_tier_level.He Junyan1-1/+2
0 is a valid value for h265 tier. Part-of: <>
10 dayslibs: encoder: h265: no need to check the high compression tune.He Junyan1-40/+0
The h265 encoder just support tune mode: (0): none - None (3): low-power - Low power mode So, no need to check and set the high compression parameters. And by the way, the current ensure_tuning_high_compression manner of choosing the hightest profile idc as the best compression profile is not correct. Unlike h264, in h265 the higher profile idc number does not mean it has more compression tools, and so it has better compression performance. It may even be un-compatible with the lower profile idc. For example, the SCREEN_CONTENT_CODING profile with idc 9 is not compatible with 3D_MAIN profile with idc 8. Part-of: <>
2020-06-19Update plugin docs and add more pluginsTim-Philipp Müller4-0/+12
Part-of: <>
2020-06-17libs: wayland: display: only handle the first outputMichael Olbrich1-2/+4
Right now, all outputs are handled. The means that the registry object for all but the last are leaked. As a result the sizes are not used correctly. With two outputs, at first the mode and physical size of the second output are used. If the first output changes the mode, then the physical size of the second output is used in combination with the resolution of the first output. The resulting pixel aspect ratio is incorrect. There seems to be no way to determine on which output the window is shown, so just use the first one to get consistent results. Part-of: <>
2020-06-09libs: context: use correct printing modifierVíctor Manuel Jáquez Leal1-1/+1
GstVaapiID is an alias of gsize, thus its modifier is platform dependant. Part-of: <>
2020-06-06plugins: uddate gst_type_mark_as_plugin_api() callsMathieu Duponchelle5-16/+17
2020-06-05libs: encoder: h265: Enable tile in VA command.He Junyan1-48/+98
Part-of: <>
2020-06-05libs: encoder: h265: Add ensure_tile to calculate tiles.He Junyan1-0/+310
We need consider tiles and slices together, separate tiles uniformly and then assign slices uniformly to each tiles. Part-of: <>
2020-06-05libs: display: add a quirk for iHD driver tile encoding.He Junyan2-0/+4
The iHD driver has a requirement that one slice can not span tiles when tile is enabled, which is not required by hevc spec. Part-of: <>
2020-06-05libs: encoder: h265: Add tile info to bitstream.He Junyan1-0/+24
Part-of: <>
2020-06-05libs: encoder: h265: promote level if tile is enabled.He Junyan1-1/+27
Part-of: <>
2020-06-05libs: encoder: h265: Add num-tile-cols/rows properties.He Junyan2-0/+57
These properties are used for support of tile encoding. We just support uniform mode of tile encoding, that is, separating picture equally by (num-tile-cols X num-tile-rows). According to HEVC spec A1, the max number of tiles in column is 20 and in rows is 22, so add two constant definitions. Part-of: <>
2020-06-05libs: encoder: h265: extract slice creation from add_slice_headersHe Junyan1-81/+99
extract slice creation details from add_slice_headers, and let the add_slice_headers just focuses on calculating slice start address and CTU number. Part-of: <>
2020-06-05libs: encoder: Add a helper function to check the tile support.He Junyan2-0/+42
Encoding by tiles separation now is a very common feature for all relative new codecs, such as HEVC, AV1, and VP9. Just make this check as a common helper function of the encoder base class. Part-of: <>
2020-06-05libs: decoder: H265: Add SCC_MAIN_444_10 profile support.He Junyan5-1/+27
Part-of: <>
2020-06-05libs: decoder: update reference list for SCC.He Junyan1-1/+39
Part-of: <>
2020-06-05libs: decoder: H265: Fill picture and slice SCC parameters.He Junyan1-4/+85
Part-of: <>
2020-06-05libs: util: H265: recognize the SCC profiles.He Junyan1-0/+38
Part-of: <>
2020-06-05libs: profile: Add screen extended main/main10/main444 define.He Junyan3-0/+15
Part-of: <>
2020-06-05libs: encoder: h265: Add support for MAIN 4:2:2 10 profile.He Junyan3-3/+28
Using YUY2 as the input of the encoder can generate main 4:2:2 bit streams and using Y210 as the input of the encoder can generate main 4:2:2 10 bit streams. Part-of: <>
2020-06-05libs: encoder: h265: Use correct index for SubWidthC and SubHeightC.He Junyan1-2/+7
We need to use the chroma_format_idc as the index for getting the SubWidthC and SubHeightC values as the spec 6.1(table 6-1) defines. The wrong SubWidthC or SubHeightC make us calculate a wrong right or bottom offset for crop size and generate garbage in output. Part-of: <>
2020-06-05libs: encoder: h265: Fix chrome idc for 444 10 bitsHe Junyan1-0/+1
GST_VAAPI_CHROMA_TYPE_YUV444_10BPP should also set chroma_format_idc to 3 as GST_VAAPI_CHROMA_TYPE_YUV444 does. Part-of: <>
2020-06-03Use gst_type_mark_as_plugin_api() for all non-element plugin typesThibault Saunier5-0/+19
2020-05-27libs: delete all gstvaapiobject related files.He Junyan22-485/+1
Part-of: <>
2020-05-27libs: surface: return fail immediately if can not create subpictureHe Junyan1-0/+4
Part-of: <>
2020-05-27libs: subpicture: Make subpicture a standard GstMiniObject.He Junyan3-61/+83
Part-of: <>
2020-05-26libs: decoder: h264: Add ref flags for splited field.He Junyan1-0/+3
When split one frame into fields, the second field should also copy the reference flags. Part-of: <>
2020-05-25libs: decoder: h264: disallow multiple slice groupVíctor Manuel Jáquez Leal1-0/+6
As far as we know there are no VAAPI drivers supporting FMO, which migth be used in baseline streams. This commit is a continuation of Part-of: <>
2020-05-21vaapidecoder: h264: remove baseline as constrained propertyVíctor Manuel Jáquez Leal2-28/+5
From now on always the baseline is going to be treated as constrained without need of setting a property. Since the property was added along the development cycle (1.17 / commit 866a9f06) and never released, we assume that it is safe to remove it. Fixes: #252 Part-of: <>
2020-05-21vaapiencoder_h264: set direct_spatial_mv_pred_flag to true by defaultHaihao Xiang1-1/+1
This flag is set to true by default in both MediaSDK and FFmpeg-vaapi, so let's align this plugin with other libraries / softwares. Part-of: <>
2020-05-16libs: use array_unref() rather than array_free()Víctor Manuel Jáquez Leal5-37/+10
It is more convinience and thread-safe. Part-of: <>
2020-05-16libs: video-format: add a helper function of get_formats_by_chroma.He Junyan2-0/+36
The function iterates all supported video formats and returns the formats belong to the specified chroma type. Part-of: <>
2020-05-16libs: texture: remove unused headers includeVíctor Manuel Jáquez Leal2-3/+1
This is continuation of Part-of: <>
2020-05-16libs: removed duplicated function declarationsVíctor Manuel Jáquez Leal3-3/+0
Some headers had duplicated inlined function declaration. This was for gtkdoc, but now GStreamer uses hotdoc and the internal library documentation is not generated. So let's remove these extra lines. Part-of: <>
2020-05-16libs: texture: Make texture a standard GstMiniObject.He Junyan7-310/+343
We store GstVaapiTextureGLX and GstVaapiTextureEGL's private data in the qdata of miniobject and avoid extending the base texture class. Part-of: <>
2020-04-26libs: display: drm: use g_strcmp0 to be null safeVíctor Manuel Jáquez Leal1-1/+1
Part-of: <>
2020-04-04libs: bufferproxy: remove GstMemory referenceHe Junyan3-47/+0
Since bufferproxy and surface are not referenced circularly, there's no need to keep, in the buffer proxy, a reference to the GstMemory where it is held. This patch removes that handling.
2020-04-04libs,plugin: break surface-bufferproxy circular referenceHe Junyan4-17/+43
The bufferproxy may reference the surface and the surface may also reference the bufferproxy, producing a circular reference, which might lead to serious resource leak problems. Now make the relationship clearer, the bufferproxy's references is transfered to surface, while bufferproxy just keeps the surface's address without increasing its reference count. The surface can be created through a bufferproxy like in gst_vaapi_surface_new_with_dma_buf_handle(), and the surface might get its bufferproxy via gst_vaapi_surface_get_dma_buf_handle(). In both cases the surface holds a bufferproxy's reference.
2020-04-04libs: bufferproxy: rename parent memeber as surfaceHe Junyan3-14/+12
2020-04-03libs: filter: HDR10 tone mapping supportU. Artie Eoff2-0/+183
Add support for HDR10 tone mapping (since VA-API 1.4.0).
2020-04-02libs: encoder: h265: Support MAIN 4:4:4 10 profile.He Junyan4-2/+31
Using Y410 as the input of the encoder can generate main_444_10 bit streams.
2020-04-02libs: encoder: fix an inexact trace info in chroma type check.He Junyan1-2/+3
2020-03-31libs: encoder: make sure format array is not NULL when returning TRUEHaihao Xiang1-1/+5
This fixed segfault when running the pipeline below with iHD driver (commit efe5e9a) on ICL gst-launch-1.0 videotestsrc ! vaapivp9enc tune=low-power ! vaapivp9dec ! \ fakesink
2020-03-27libs: extend g_autoptr supportVíctor Manuel Jáquez Leal30-16/+45
2020-03-20libs,plugins: decoder: Add -intra profile support for hevc.He Junyan2-0/+64
In hevc, we can consider the -intra profile a subset of the none -intra profile. The -intra profiles just contain I frames and we definitely can use the none -intra profiles's context to decode them. Signed-off-by: Víctor Manuel Jáquez Leal <>