platform/upstream/gstreamer.git
3 years agocodecparsers: av1: clean the seen_frame_header in parse_tile_group().
He Junyan [Fri, 9 Oct 2020 08:01:35 +0000 (16:01 +0800)]
codecparsers: av1: clean the seen_frame_header in parse_tile_group().

The current seen_frame_header is not cleaned correctly. According
to the spec, it should be cleaned when tiles are parsed completely.
Also delete a verbose seen_frame_header init in reset_state().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: fix a typo in parse_metadata_scalability
He Junyan [Tue, 29 Sep 2020 05:15:37 +0000 (13:15 +0800)]
codecparsers: av1: fix a typo in parse_metadata_scalability

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: Do not assert in identify_one_obu when check annex b size.
He Junyan [Mon, 28 Sep 2020 10:22:08 +0000 (18:22 +0800)]
codecparsers: av1: Do not assert in identify_one_obu when check annex b size.

Some buggy stream just writes the wrong temporal unit and frame size in
the stream. We should return failure rather than assert to abort.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: Add unknow AV1 profile define for saint check.
He Junyan [Tue, 22 Sep 2020 11:16:30 +0000 (19:16 +0800)]
codecparsers: av1: Add unknow AV1 profile define for saint check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: Improve the parse_tile_info.
He Junyan [Fri, 24 Jul 2020 06:54:37 +0000 (14:54 +0800)]
codecparsers: av1: Improve the parse_tile_info.

1. store more tile info when parse tile group.
   The column, row, tile offset and tile data size are all useful for
   decoder process, especially for HW kind decoder such as VAAPI dec.
   Also fix the tile group skip size for each tile data.
2. No min_inner_tile_width requirement in newest spec.
3. Calculate the sbs of each tile for both uniform tile and non-uniformi
   tile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: Fix a tile info read typo in frame header.
He Junyan [Tue, 28 Jul 2020 09:25:44 +0000 (17:25 +0800)]
codecparsers: av1: Fix a tile info read typo in frame header.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: Fix a typo when get value of segmentation params.
He Junyan [Tue, 25 Aug 2020 11:44:48 +0000 (19:44 +0800)]
codecparsers: av1: Fix a typo when get value of segmentation params.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: add valid check for global motion params.
He Junyan [Tue, 25 Aug 2020 08:33:26 +0000 (16:33 +0800)]
codecparsers: av1: add valid check for global motion params.

The global motion params and its matrix values need to be verified
before we use them. If it is invalid, we should notify the decoder
that it should not be used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: uint8 range is not enough for av1_bitstreamfn_ns
He Junyan [Tue, 25 Aug 2020 07:25:56 +0000 (15:25 +0800)]
codecparsers: av1: uint8 range is not enough for av1_bitstreamfn_ns

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: delete duplicated GST_AV1_GM_ABS_ALPHA_BITS define.
He Junyan [Tue, 25 Aug 2020 07:25:06 +0000 (15:25 +0800)]
codecparsers: av1: delete duplicated GST_AV1_GM_ABS_ALPHA_BITS define.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agotest: av1parser: update the test result because of bug fixing.
He Junyan [Thu, 27 Aug 2020 13:33:14 +0000 (21:33 +0800)]
test: av1parser: update the test result because of bug fixing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: Improve the loop filter setting.
He Junyan [Mon, 24 Aug 2020 07:29:56 +0000 (15:29 +0800)]
codecparsers: av1: Improve the loop filter setting.

1. loop_filter_ref_deltas should be int because it needs to compare
   with 0.
2. Move the loop filter init logic to setup_past_independence() and
   load_previous(), which make it more precise with the spec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: Fix a error report for metadata obu.
He Junyan [Fri, 14 Aug 2020 06:40:49 +0000 (14:40 +0800)]
codecparsers: av1: Fix a error report for metadata obu.

The metadata OBUs, for example, ITUT_T35 has an undefined payload such
as itu_t_t35_payload_bytes field in AV1 spec, which may cause the failure
of parsing the trailings bits. We can give a warning and ignore this kind
of errors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: Fix a level index bug in sequence.
He Junyan [Tue, 28 Jul 2020 07:06:04 +0000 (15:06 +0800)]
codecparsers: av1: Fix a level index bug in sequence.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agocodecparsers: av1: all ref idx should be gint8.
He Junyan [Fri, 24 Jul 2020 04:49:10 +0000 (12:49 +0800)]
codecparsers: av1: all ref idx should be gint8.

All the ref index need to compare with 0 in reference index decision
algorithm. We also need to init them to -1.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>

3 years agova: h264dec: Add support for interlaced stream
Seungha Yang [Sat, 14 Nov 2020 09:48:05 +0000 (18:48 +0900)]
va: h264dec: Add support for interlaced stream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>

3 years agova: h264dec: implement gst_va_h264_dec_new_field_picture()
Víctor Manuel Jáquez Leal [Mon, 16 Nov 2020 15:29:04 +0000 (16:29 +0100)]
va: h264dec: implement gst_va_h264_dec_new_field_picture()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>

3 years agova: h264dec: Fix picture_height_in_mbs_minus1
Seungha Yang [Sat, 14 Nov 2020 11:46:30 +0000 (20:46 +0900)]
va: h264dec: Fix picture_height_in_mbs_minus1

Fix for interlaced stream (when sps->frame_mbs_only_flag is equal to one)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>

3 years agova: h264dec: admit baseline if stream obeys A.2
Víctor Manuel Jáquez Leal [Mon, 16 Nov 2020 15:29:46 +0000 (16:29 +0100)]
va: h264dec: admit baseline if stream obeys A.2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>

3 years agocodecs: h264decoder: Add support for field ref picture list modification
Seungha Yang [Sat, 14 Nov 2020 15:20:54 +0000 (00:20 +0900)]
codecs: h264decoder: Add support for field ref picture list modification

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>

3 years agocodecs: h264decoder: Add more option arguments for reference picture getter
Seungha Yang [Tue, 17 Nov 2020 09:39:56 +0000 (18:39 +0900)]
codecs: h264decoder: Add more option arguments for reference picture getter

In case that "pic_order_cnt_type" is equal to zero, ref picture
list for B slice should not include non-existing picture
as per spec 8.2.4.2.3. And, the second field is not needed
for the process of frame picture reference list construction
since it needs to be frame unit, not field picture in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>

3 years agocodecs: h264decoder: Split gap picture as well if needed
Seungha Yang [Tue, 17 Nov 2020 09:59:35 +0000 (18:59 +0900)]
codecs: h264decoder: Split gap picture as well if needed

field pair pictures might be required for reference list
depending on context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>

3 years agoh264dec: Fix POC calculation for type 0
Nicolas Dufresne [Thu, 5 Nov 2020 23:09:06 +0000 (18:09 -0500)]
h264dec: Fix POC calculation for type 0

This is mostly for future use as it only fixes the caclulation for interlaced
cases, the case of frame seemed correct already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>

3 years agocodecs: h264decoder: Don't try to construct RefPicList0 and RefPicList1 if not required
Seungha Yang [Mon, 16 Nov 2020 18:11:46 +0000 (03:11 +0900)]
codecs: h264decoder: Don't try to construct RefPicList0 and RefPicList1 if not required

We were trying to construct reference picture list even for
I slice before this commit. Reference list is required only for
P, SP and B slices. Also, if all existing reference pictures
are gap pictures, we don't need to construct lists.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>

3 years agova: pool: Check the force_videometa for all memory types.
He Junyan [Mon, 2 Nov 2020 17:59:46 +0000 (01:59 +0800)]
va: pool: Check the force_videometa for all memory types.

force_videometa should mean that the buffer must use video meta to
map correctly. When the stride or the offset of the alloc_info is
different from the src caps, the downstream must use video meta.
So this flag should not link with the RAW caps only. All kinds of
caps(memory:VAMemory, memory:DMABuf) should have this flag.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1711>

3 years agova: basedec: Improve the decide_allocation().
He Junyan [Mon, 16 Nov 2020 16:18:22 +0000 (00:18 +0800)]
va: basedec: Improve the decide_allocation().

In decide_allocation(), we now just use the other_pool for frames
copy when the src caps is raw. This can make the logic a little
clear. There is no need for us to check the alignment and video
meta again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1711>

3 years agova: basedec: fallback to system memory if downstream caps is any.
He Junyan [Mon, 16 Nov 2020 15:53:39 +0000 (23:53 +0800)]
va: basedec: fallback to system memory if downstream caps is any.

When the downstream element reports an ANY caps, and it also fails to
support VideoMeta, we should fallback to the system memory.
Note: the basetransform kind elements never return valid allocation
query before set_caps(). So, if a basetransform return an ANY sink
caps, we always fallback to system memory for it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1711>

3 years agovah264dec: Fix for long term reference picture signalling
Seungha Yang [Sun, 15 Nov 2020 19:38:28 +0000 (04:38 +0900)]
vah264dec: Fix for long term reference picture signalling

Allocate a GArray which is used to fill
VAPictureParameterBufferH264.ReferenceFrames (called per frame),
instead of alloc/free per frame.
Also this commit is to fix the condition where long-term reference
picture is needed for VAPictureParameterBufferH264.ReferenceFrames
entry.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1813>

3 years agocodecs: h264decoder: Fix MMCO type 1 for interlaced stream
Seungha Yang [Sat, 14 Nov 2020 18:41:27 +0000 (03:41 +0900)]
codecs: h264decoder: Fix MMCO type 1 for interlaced stream

If field_pic_flag of current picture is equal to zero,
both field of reference field pair should be marked as
"unused for reference"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1810>

3 years agocodecs: h264decoder: Fix MMCO type 3 for interlaced stream
Seungha Yang [Sat, 14 Nov 2020 17:59:24 +0000 (02:59 +0900)]
codecs: h264decoder: Fix MMCO type 3 for interlaced stream

Depending on short-ref picture corresponding to picNumX value,
there's a condition that only one field should be updated to
be non-reference picture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1810>

3 years agocodecs: h264decoder: Split frame picture into field pictures if needed
Seungha Yang [Sat, 14 Nov 2020 15:55:09 +0000 (00:55 +0900)]
codecs: h264decoder: Split frame picture into field pictures if needed

In case of interlaced stream, frame pictures need to be splitted
into field for reference marking process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1810>

3 years agocodecs: h264decoder: Add util macro for frame/field picture identification
Seungha Yang [Sun, 15 Nov 2020 15:27:28 +0000 (00:27 +0900)]
codecs: h264decoder: Add util macro for frame/field picture identification

Add a macro to check whether given GstH264Picture is for frame or field
decoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1810>

3 years agod3d11window: Prefer full color range for display target colorspace
Seungha Yang [Mon, 16 Nov 2020 11:44:06 +0000 (20:44 +0900)]
d3d11window: Prefer full color range for display target colorspace

We don't need to preserve input color range for transformed target
color space. Also some GPUs doesn't seem to be happy with 16-235
color range for RGB color space.
Also, since our default display target color space is
DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709, choosing full color range
would make more sense.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1814>

3 years agowpe: Don't crash when running on X11.
Jan Schmidt [Fri, 14 Aug 2020 16:02:44 +0000 (02:02 +1000)]
wpe: Don't crash when running on X11.

Don't assume the available EGL display is a wayland display -
instead, check the the GStreamer GL context is EGL, and then
use gst_gl_display_egl_from_gl_display to create a
GstGLDisplayEGL from that, which also adds refcounting
around the underlying EGLDisplay.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1385

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1752>

3 years agova: allocator: dmabuf: log unknown surface format
Víctor Manuel Jáquez Leal [Fri, 13 Nov 2020 19:25:36 +0000 (20:25 +0100)]
va: allocator: dmabuf: log unknown surface format

It is possible that surface format is not assigned, keeping its default
GStreamer value: unknown, but gst_video_format_to_string() doesn't print
unknown format, so this patch does it manually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1811>

3 years agova: allocator: dmabuf: destroy VASurface if no pooled buffer
Víctor Manuel Jáquez Leal [Fri, 13 Nov 2020 19:20:47 +0000 (20:20 +0100)]
va: allocator: dmabuf: destroy VASurface if no pooled buffer

When gst_va_dmabuf_allocator_setup_buffer_full() receives info (not NULL) it is
supposed that this buffer is not part of the allocator pool, so it has to be
de-allocated as soon it is freed.

This patch sets the destroy notify of the assigned GstVaBufferSurface if info is
not NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1811>

3 years agovah264dec: Allow missing reference picture
Seungha Yang [Fri, 13 Nov 2020 18:20:19 +0000 (03:20 +0900)]
vah264dec: Allow missing reference picture

baseclass might provide reference picture list with null picture.
Ensure picture before filling picture information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1809>

3 years agocodecs: h264decoder: Don't give up to decode due to missing reference picture
Seungha Yang [Fri, 13 Nov 2020 18:16:07 +0000 (03:16 +0900)]
codecs: h264decoder: Don't give up to decode due to missing reference picture

Missing reference picture is very common thing for broken/malformed stream.
Decoder should be able to keep decoding if it's not a very critical error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1809>

3 years agompegtsdemux: Fix off by one error
Edward Hervey [Fri, 13 Nov 2020 16:50:03 +0000 (17:50 +0100)]
mpegtsdemux: Fix off by one error

Turns out timestamps of zero are valid :) Fixes issues with streams where the
PTS/DTS would be equal to the first PCR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1807>

3 years agod3d11h264dec: Add support for interlaced stream
Seungha Yang [Thu, 5 Nov 2020 17:45:21 +0000 (02:45 +0900)]
d3d11h264dec: Add support for interlaced stream

Add support for interlaced stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1534>

3 years agocodecs: h264decoder: Add support for interlaced stream
Seungha Yang [Mon, 9 Nov 2020 16:28:03 +0000 (01:28 +0900)]
codecs: h264decoder: Add support for interlaced stream

Initial support for interlaced stream. Subclass should implement
new_field_picture() vfunc. Otherwise, baseclass will assume that
subclass doesn't support interlaced stream.

Restrictions:
* Reference picture modification process for interlaced stream
  is not implemented yet
* PAFF (Picture Adaptive Frame Field) is not properly implemented.
* Field display ordering (e.g., top-field-first) decision should
  be enhanced via picture timing SEI parsing
* Gap in field picture should be handled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1534>

3 years agocodecs: h264decoder: Rename DPB methods
Seungha Yang [Wed, 4 Nov 2020 19:16:54 +0000 (04:16 +0900)]
codecs: h264decoder: Rename DPB methods

Clarify wheter it's for picture(field) or frame in order to
support interlaced stream, because DPB size is frame unit, not picture
in case of interlaced stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1534>

3 years agocodecs: h264decoder: Remove interlaced stream related constraints
Seungha Yang [Wed, 4 Nov 2020 18:47:35 +0000 (03:47 +0900)]
codecs: h264decoder: Remove interlaced stream related constraints

... and add new_field_picture() vfunc so that ensure interlaced
decoding support by subclass.
The method will be used later with interlaced stream support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1534>

3 years agocodecs: h264decoder: Move to inline GstH264DecoderClass documentation
Seungha Yang [Thu, 12 Nov 2020 14:49:01 +0000 (23:49 +0900)]
codecs: h264decoder: Move to inline GstH264DecoderClass documentation

Don't duplicate documentation for class vfunc. Hotdoc doesn't seem
to be happy with duplicated documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1534>

3 years agocodecs: h264decoder: Store reference picture type using enum value
Seungha Yang [Thu, 5 Nov 2020 16:45:36 +0000 (01:45 +0900)]
codecs: h264decoder: Store reference picture type using enum value

Managing reference picture type by using two variables
(ref and long_term) seems to be redundant and that can be
represented by using a single enum value.

This is to sync this implementation with gstreamer-vaapi so that
make comparison between this and gstreamer-vaapi easier and also
in order to minimize the change required for subclass to be able
to support interlaced.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1534>

3 years agocodecs: h264decoder: Minor documentation fix
Seungha Yang [Tue, 10 Nov 2020 16:56:52 +0000 (01:56 +0900)]
codecs: h264decoder: Minor documentation fix

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1534>

3 years agocodecs: h264decoder: Remove DPB size related spammy debug message
Seungha Yang [Fri, 13 Nov 2020 14:18:20 +0000 (23:18 +0900)]
codecs: h264decoder: Remove DPB size related spammy debug message

It's not informative at all if SPS wasn't updated. Also we are printing
DPB size related debug message in another place already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1806>

3 years agoh264parse: try harder to update timecode
Mathieu Duponchelle [Thu, 12 Nov 2020 21:27:08 +0000 (22:27 +0100)]
h264parse: try harder to update timecode

NumClockTS is the maximum number of timecodes the pic_timing SEI
can carry, but it is perfectly OK for it to carry fewer, and have
one of the clock_timestamp_flags set to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1804>

3 years agoh264parse: fix installing of update-timecode property
Mathieu Duponchelle [Thu, 12 Nov 2020 21:32:00 +0000 (22:32 +0100)]
h264parse: fix installing of update-timecode property

Simply fixes a typo that did not have any adverse effect,
and avoid hardcoding initializer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1805>

3 years agocodecs: h264decoder: Don't fill gap picture if it's not allowed
Seungha Yang [Thu, 12 Nov 2020 10:43:22 +0000 (19:43 +0900)]
codecs: h264decoder: Don't fill gap picture if it's not allowed

We should fill gap picture only if sps->gaps_in_frame_num_value_allowed_flag
is set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1801>

3 years agoopenjpegenc: store stripe offset when encoding image
Aaron Boxer [Thu, 16 Apr 2020 14:06:29 +0000 (10:06 -0400)]
openjpegenc: store stripe offset when encoding image

The decoder can simply read this offset after decoding
to know where to blit the stripe to the full frame

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1800>

3 years agoopenjpegenc: take subsampling into account when calculating stripe height
Aaron Boxer [Tue, 24 Mar 2020 13:15:30 +0000 (09:15 -0400)]
openjpegenc: take subsampling into account when calculating stripe height

We calculate minimum of (stripe height * sub sampling) across all components
to ensure that all component dimensions are consistent with sub-sampling.
The last stripe for each component is simply the remaining height.

limit wavelet resolutions for "thin" stripes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1800>

3 years agoopenjpegenc: fix memory leak from mstream
Stéphane Cerveau [Thu, 12 Mar 2020 12:41:40 +0000 (13:41 +0100)]
openjpegenc: fix memory leak from mstream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1800>

3 years agoopenjpegenc: fail negotation in handle_frame if alignment mismatch
Aaron Boxer [Mon, 13 Jan 2020 19:00:38 +0000 (14:00 -0500)]
openjpegenc: fail negotation in handle_frame if alignment mismatch

If encoder is in stripe mode, then downstream must also support stripe

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1800>

3 years agonvcodec: Fix various typo
Seungha Yang [Thu, 12 Nov 2020 12:46:59 +0000 (21:46 +0900)]
nvcodec: Fix various typo

Not sure where the DECOCER came from

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1803>

3 years agova: comments to explain code
Víctor Manuel Jáquez Leal [Thu, 12 Nov 2020 12:33:26 +0000 (13:33 +0100)]
va: comments to explain code

There are a couple part where code seems, at least to me, a bit oscure or
confusing. So let's better add an explanation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1802>

3 years agoadaptivedemux: Don't calculate bitrate for header/index fragments
Edward Hervey [Tue, 10 Nov 2020 13:48:28 +0000 (14:48 +0100)]
adaptivedemux: Don't calculate bitrate for header/index fragments

They are generally substantially smaller than regular fragments, and therefore
we end up pushing totally wrong bitrates downstream.

Fixes erratic buffering issues with DASH introduced by
66f5e874352016e29f555e3ce693b23474e476db

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1021>

3 years agoadaptivedemux: Store QoS values on the element
Edward Hervey [Mon, 9 Nov 2020 10:41:10 +0000 (11:41 +0100)]
adaptivedemux: Store QoS values on the element

Storing it per-stream requires taking the manifest lock which can apparenly be
hold for aeons. And since the QoS event comes from the video rendering thread
we *really* do not want to do that.

Storing it as-is in the element is fine, the important part is knowing the
earliest time downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1021>

3 years agoadaptivedemux: Don't calculate bitrate for header/index fragments
Edward Hervey [Tue, 10 Nov 2020 13:48:28 +0000 (14:48 +0100)]
adaptivedemux: Don't calculate bitrate for header/index fragments

They are generally substantially smaller than regular fragments, and therefore
we end up pushing totally wrong bitrates downstream.

Fixes erratic buffering issues with DASH introduced by
66f5e874352016e29f555e3ce693b23474e476db

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1786>

3 years agohlsdemux: Don't double-free variant streams on errors
Edward Hervey [Wed, 11 Nov 2020 17:07:57 +0000 (18:07 +0100)]
hlsdemux: Don't double-free variant streams on errors

If an error happened switching to a new variant, we switch back to the previous
one ... except it will be unreffed when settin git.

In order to avoid such issues, keep a reference to the old variant until we're
sure we don't need it anymore

Fixes cases of double-free on variants and its contents

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1799>

3 years agocodecs: vp8decoder: Fix two typo of struct name.
He Junyan [Wed, 11 Nov 2020 16:42:59 +0000 (00:42 +0800)]
codecs: vp8decoder: Fix two typo of struct name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1797>

3 years agogsta2dpsink: Fix GstPad leak
Sanchayan Maity [Tue, 27 Oct 2020 14:23:44 +0000 (19:53 +0530)]
gsta2dpsink: Fix GstPad leak

The sinkpad returned by a call to gst_element_get_static_pad needs to be
unrefed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1621>

3 years agobluez: a2dpsink: Add support for LDAC to a2dpsink
Arun Raghavan [Wed, 30 Sep 2020 11:42:04 +0000 (17:12 +0530)]
bluez: a2dpsink: Add support for LDAC to a2dpsink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1621>

3 years agobluez: avdtpsink: Add support for LDAC to avdtpsink
Arun Raghavan [Wed, 30 Sep 2020 07:58:08 +0000 (13:28 +0530)]
bluez: avdtpsink: Add support for LDAC to avdtpsink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1621>

3 years agoext: Add LDAC encoder
Sanchayan Maity [Fri, 18 Sep 2020 12:05:24 +0000 (17:35 +0530)]
ext: Add LDAC encoder

LDAC is an audio coding technology developed by Sony that enables the
transmission of High-Resolution (Hi-Res) audio contents over Bluetooth.

Currently Adaptive Bit Rate (ABR) as supported by libldac encoder is not
implemented.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1621>

3 years agompegdemux: Set duration on seeking query if possible
Seungha Yang [Wed, 11 Nov 2020 09:21:25 +0000 (18:21 +0900)]
mpegdemux: Set duration on seeking query if possible

Set duration on seeking query in the same way as duration query handler.
Otherwise application might get confused as if the duration is unknown.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1791>

3 years agowebrtc: Update libnice version requirement to 0.1.17
Raul Tambre [Wed, 11 Nov 2020 11:39:37 +0000 (13:39 +0200)]
webrtc: Update libnice version requirement to 0.1.17

Since !1366 nice_agent_get_sockets() is used, which requires 0.1.17.
Update the version requirement accordingly.

Fixes #1459.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1792>

3 years agohlsdemux: Re-use streams if possible
Edward Hervey [Tue, 3 Nov 2020 16:48:02 +0000 (17:48 +0100)]
hlsdemux: Re-use streams if possible

When switching variants, try to re-use existing streams/pads instead of creating
new ones. When dealing with urisourcebin and decodebin3 this is not only the
expected way but also avoids a lot of buffering/hang issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1757>

3 years agom3u8: Make a debug function usable elsewhere
Edward Hervey [Wed, 4 Nov 2020 09:36:21 +0000 (10:36 +0100)]
m3u8: Make a debug function usable elsewhere

The rest of the code might want to use this

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1757>

3 years agoqroverlay: Generate documentation
Thibault Saunier [Sun, 12 Jul 2020 04:18:38 +0000 (00:18 -0400)]
qroverlay: Generate documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Add a qroverlay element that allows overlaying any data
Thibault Saunier [Sun, 12 Jul 2020 04:03:04 +0000 (00:03 -0400)]
qroverlay: Add a qroverlay element that allows overlaying any data

This moves `gstqroverlay.c` to `gstdebugqroverlay.c` and implements
a simple `gstqroverlay` element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Rename qroverlay to debugqroverlay
Thibault Saunier [Sun, 12 Jul 2020 03:43:01 +0000 (23:43 -0400)]
qroverlay: Rename qroverlay to debugqroverlay

The element is specially focus on debugging purposes and not a generique QR overlay

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Factor out qroverlay logic to a base class
Thibault Saunier [Sun, 12 Jul 2020 03:36:03 +0000 (23:36 -0400)]
qroverlay: Factor out qroverlay logic to a base class

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Factor out qroverlay logic to a base class
Thibault Saunier [Sun, 12 Jul 2020 03:35:55 +0000 (23:35 -0400)]
qroverlay: Factor out qroverlay logic to a base class

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Make subclassable
Thibault Saunier [Sun, 12 Jul 2020 03:06:16 +0000 (23:06 -0400)]
qroverlay: Make subclassable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Port to VideoFilter
Thibault Saunier [Sun, 12 Jul 2020 00:42:51 +0000 (20:42 -0400)]
qroverlay: Port to VideoFilter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Make default pizel-size 3
Thibault Saunier [Sat, 11 Jul 2020 19:04:57 +0000 (15:04 -0400)]
qroverlay: Make default pizel-size 3

Otherwise zbar isn't able to read the produced qrcodes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Cleanup the way we build the json using json-glib
Thibault Saunier [Thu, 9 Jul 2020 18:14:45 +0000 (14:14 -0400)]
qroverlay: Cleanup the way we build the json using json-glib

And reindent the .h file removing tabs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Fix copyright
Thibault Saunier [Thu, 9 Jul 2020 17:05:20 +0000 (13:05 -0400)]
qroverlay: Fix copyright

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Fix some warnings
Thibault Saunier [Thu, 9 Jul 2020 16:51:23 +0000 (12:51 -0400)]
qroverlay: Fix some warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Minor renaming and documentation fixes
Thibault Saunier [Thu, 9 Jul 2020 16:49:51 +0000 (12:49 -0400)]
qroverlay: Minor renaming and documentation fixes

Matching usual namings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agoqroverlay: Import from gst-qroverlay
Thibault Saunier [Thu, 9 Jul 2020 16:37:55 +0000 (12:37 -0400)]
qroverlay: Import from gst-qroverlay

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1730>

3 years agonvcodec: Add VP9 stateless decoder element
Seungha Yang [Fri, 30 Oct 2020 14:22:01 +0000 (23:22 +0900)]
nvcodec: Add VP9 stateless decoder element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1738>

3 years agonvcodec: nvdecoder: Move to refcount based GstNvDecoderFrame
Seungha Yang [Fri, 30 Oct 2020 12:20:57 +0000 (21:20 +0900)]
nvcodec: nvdecoder: Move to refcount based GstNvDecoderFrame

This refcount based way would be helpful for sharing nvdec frame among
multiple codec pictures and later zero-copy use case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1738>

3 years agonvcodec: nvdecoder: Get rid of G_GNUC_INTERNAL
Seungha Yang [Fri, 30 Oct 2020 14:38:15 +0000 (23:38 +0900)]
nvcodec: nvdecoder: Get rid of G_GNUC_INTERNAL

default is visibility=hidden. Don't need to use G_GNUC_INTERNAL
for new code therefore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1738>

3 years agonvcodec: Add VP8 stateless decoder element
Seungha Yang [Fri, 30 Oct 2020 11:37:44 +0000 (20:37 +0900)]
nvcodec: Add VP8 stateless decoder element

Like other nvcodec stateless decoders, the rank of this new nvvp8sldec
element will be secondary for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1738>

3 years agonvcodec: nvsldec: Fix typo in debug message
Seungha Yang [Fri, 30 Oct 2020 14:26:49 +0000 (23:26 +0900)]
nvcodec: nvsldec: Fix typo in debug message

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1738>

3 years agompegtspacketizer: Handle PCR issues with adaptive streams
Edward Hervey [Mon, 9 Nov 2020 17:27:14 +0000 (18:27 +0100)]
mpegtspacketizer: Handle PCR issues with adaptive streams

A lot of content producers out there targetting "adaptive streaming" are riddled
with non-compliant PCR streams (essentially all the players out there just use
PTS/DTS and don't care about the PCR).

In order to gracefully cope with these, we detect them appropriately and any
small (< 15s) PCR resets get gracefully ignored.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1785>

3 years agonvcodec: leave g_once_init when all quarks are initialized
Julian Bouzas [Fri, 30 Oct 2020 14:07:02 +0000 (14:07 +0000)]
nvcodec: leave g_once_init when all quarks are initialized

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1782>

3 years agocodecs: h264decoder: Fix missing drain handling in bumping
Seungha Yang [Mon, 9 Nov 2020 14:22:09 +0000 (23:22 +0900)]
codecs: h264decoder: Fix missing drain handling in bumping

Should've included in the commit 5527cc4a2e7ce8eeee1d8a717f99252477d6015f

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1783>

3 years agocodecs: h264decoder: Try reference picture marking process in any case
Seungha Yang [Mon, 9 Nov 2020 14:04:32 +0000 (23:04 +0900)]
codecs: h264decoder: Try reference picture marking process in any case

... even if there is some invalid conditions
(because of broken stream, our implementation fault or so).
Otherwise baseclass will keep such reference pictures and
it would result to DPB full.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1783>

3 years agoexamples: Properly handle extended descriptors
Edward Hervey [Mon, 9 Nov 2020 10:44:36 +0000 (11:44 +0100)]
examples: Properly handle extended descriptors

By checking the extended tag. Provides a bit more information (if extended tag
is known)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1781>

3 years agod3d11h264dec: Fix for MbaffFrameFlag and FrameNumList
Seungha Yang [Sun, 8 Nov 2020 10:08:25 +0000 (19:08 +0900)]
d3d11h264dec: Fix for MbaffFrameFlag and FrameNumList

As per spec 7.4.3 Slice header semantics, the flag value is derived as
MbaffFrameFlag = (mb_adaptive_frame_field_flag && !field_pic_flag)
and DXVA uses the value.
Regarding FrameNumList, in case of long-term ref, FrameNumList[i]
value should be long_term_frame_idx not long_term_pic_num.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1780>

3 years agocodecs: h264decoder: Reset frame number per MMCO type 5
Seungha Yang [Thu, 5 Nov 2020 10:30:35 +0000 (19:30 +0900)]
codecs: h264decoder: Reset frame number per MMCO type 5

It should be cleared so that avoid wrong frame gap detection
for following pictures.

Passing 4 more conformance bitstream tests
* MR2_TANDBERG_E
* MR3_TANDBERG_B
* MR4_TANDBERG_C
* MR5_TANDBERG_C

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1768>

3 years agocodecs: h264decoder: Fix for MMCO type 2
Seungha Yang [Thu, 5 Nov 2020 09:42:37 +0000 (18:42 +0900)]
codecs: h264decoder: Fix for MMCO type 2

As per 8.2.5.4.2, we should mark a picture which has
LongTermPicNum == long_term_pic_num as "unused for reference",
not pic_num.

Passing conformance bitstream test with MR2_MW_A

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1768>

3 years agocodecs: h264picture: Add more trace log
Seungha Yang [Thu, 5 Nov 2020 09:27:11 +0000 (18:27 +0900)]
codecs: h264picture: Add more trace log

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1768>

3 years agodecklink: correct framerate 2KDCI 23.98
Jason Pereira [Thu, 5 Nov 2020 13:30:49 +0000 (13:30 +0000)]
decklink: correct framerate 2KDCI 23.98

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1771>

3 years agodoc: player: mention that get_pipeline method needs unref
Rafostar [Thu, 5 Nov 2020 08:11:03 +0000 (09:11 +0100)]
doc: player: mention that get_pipeline method needs unref

All other methods in docs clearly mention that an unref is needed, so should `get_pipeline()`. #1450

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1764>

3 years agoplayer: call ref_sink on pipeline
Rafostar [Thu, 5 Nov 2020 08:01:47 +0000 (09:01 +0100)]
player: call ref_sink on pipeline

Otherwise `gst_player_get_pipeline()` will return a floating reference which may confuse bindings and lead to crash.

Fixes #1450

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1763>

3 years agomeson: Enable some MSVC warnings for parity with GCC/Clang
Nirbheek Chauhan [Wed, 4 Nov 2020 13:13:41 +0000 (18:43 +0530)]
meson: Enable some MSVC warnings for parity with GCC/Clang

This makes it easier to do development with MSVC by making it warn
on common issues that GCC/Clang error out for in our CI configuration.

Continuation from https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/223

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1760>