summaryrefslogtreecommitdiff
path: root/gst-libs
Commit message (Collapse)AuthorAgeFilesLines
* codecs: h264decoder: let print_ref_pic_list_b print the correct list name.He Junyan2021-07-231-10/+13
| | | | | | | | The print_ref_pic_list_b now not only needs to trace the ref_pic_list_b0/1, but also need to trace the ref_frame_list_0_short_term. We need to pass the name directly to it rather than an index to refer to ref_pic_list_b0/1. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2425>
* codecs: h264dec: Fix a typo in construct_ref_field_pic_lists_b.He Junyan2021-07-231-1/+2
| | | | | | | | The array sort of ref_frame_list_0_short_term has some typo. The typo makes this list not in the POC ascend order and generate wrong decoding result for interlaced streams. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2425>
* codecs: h264dec: Improve the algorithm for low latency mode.He Junyan2021-07-213-13/+149
| | | | | | | | | | | | | | In low_latency mode, try to bump the picture as soon as possible without the frames disorder: 1. We can directly output the continuous non-reference frame. 2. Consider max_num_reorder_frames, which is special useful for I-P mode. 3. Consider the leading pictures with negative POC. 4 Output small POC pictures when non-reference frame comes. 4. Output the POC increment<=2 pictures. This is not 100% safe, but in practice this condition can be used. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2373>
* codecs: h264dec: Add help function of dpb_set_max_num_reorder_frames.He Junyan2021-07-213-10/+35
| | | | | | | The max_num_reorder_frames can be useful for bump check. We store it in the DPB and no need for the decoder now. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2373>
* codecs: h264dec: Add a flag to record whether picture is reference.He Junyan2021-07-213-2/+11
| | | | | | | | | The picture->ref field will change from time to time according to decoder's state and reference sliding window. We need another flag to record whether the picture is a reference picture when it is created, and this can help the bumping check. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2373>
* codecs: h264dec: Change the order of dpb_add and dpb_bump.He Junyan2021-07-211-33/+63
| | | | | | | | The current behavior is different from the SPEC. We should check and bump the DPB or drain the DPB before we insert the current picture into it. This may cause the output picture disorder. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2373>
* codecs: h264dec: Modify the DPB need bump check.He Junyan2021-07-213-59/+41
| | | | | | | | | | | | | | | Accord to spec, we should not add the current picture into the DPB when we check whether it needs to bump, so the checks of the IDR and the "memory_management_control_operation equal to 5" are no needed. And the spec also says that the DPB only needs to bump when there is no empty frame buffer left(We handle the IDR cases in other places). We need to follow that and the max_num_reorder_frames is useless. We also minus 1 in has_empty_frame_buffer because the current frame has not been added yet. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2373>
* codecs: h264dec: Make dpb_has_empty_frame_buffer a codecs API.He Junyan2021-07-212-1/+12
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2373>
* codecs: h264dec: Set picture to a small poc when mem_mgmt_5.He Junyan2021-07-211-0/+16
| | | | | | | | | When current frame memory_management_control_operation equal to 5, that means we need to drain the dpb and the current picture act as an IDR frame. So it should have smaller poc than the later pictures to ensure the output order. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2373>
* codecs: h265decoder: Fix a typo of NumPocTotalCurr when process ref pic list.He Junyan2021-07-162-5/+5
| | | | | | | | | | | We should use the NumPocTotalCurr value stored in decoder, which is a calculated valid value, rather than use the invalid value in the slice header. Most of the time, the NumPocTotalCurr is 0 and make the tmp_refs a very short length, and causes the decoder's wrong result. By the way, the NumPocTotalCurr is not the correct name specified in H265 spec, its name should be NumPicTotalCurr. We change it to the correct name. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2414>
* codecs: h265decoder: Always free messages while parsing SEIMads Buvik Sandvei2021-07-141-1/+2
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2390>
* codecs: vp9statefulparser: not init segmentation_abs_or_delta_update.He Junyan2021-07-131-1/+0
| | | | | | | The segmentation_abs_or_delta_update is a stateful var, it should not be inited every time when parsing the segmentation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2403>
* codecparsers: av1: fix underflow in last_frame_idxDaniel Almeida2021-07-121-1/+1
| | | | | | | | | The spec mandates this field be parsed using unsigned arithmetic. Nevertheless, av1parser will use -1 apparently as an uninitialized value in gst_av1_parse_frame_header. This immediately underflows last_frame_idx though, since its type was defined as guint8. Fix this by converting to gint8. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2401>
* play: Emit correct signalGuido Günther2021-07-121-2/+1
| | | | | | | SIGNAL_MEDIA_INFO_UPDATED should be emitted on media info changes, not SIGNAL_VIDEO_DIMENSIONS_CHANGED. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2398>
* vulkan: Declare missing auto-pointer cleanup functions.Víctor Manuel Jáquez Leal2021-07-1212-6/+24
| | | | | | | Also removed a couple guards since, given the glib dependency, they are set. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
* vulkan: filter: Use filter variable name for choosing queue.Víctor Manuel Jáquez Leal2021-07-121-4/+4
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
* gst-libs/gst/wayland: handle display passing betterDominique Martinet2021-07-091-3/+6
| | | | | | | | | | | | | | | | failure to pass a display in 'handle' would result in uninitialized value being returned, which would often segfault later down the road when trying to initialize gstreamer context with it. Check the return value of gst_structure_get() to make sure we return valid data. Furthermore, the gstglimagesink in gst-plugins-base also has a similar mechanism but uses 'display' as field name to pass the value; instead of requiring the application to behave differently depending on what sink was automatically detected just try to read both values here, with display being the new default. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2292>
* codecs: h265dec: Disable the POC order warning for negative POC.He Junyan2021-07-061-3/+5
| | | | | | | | | There may be leading frames after the IRAP frames, which has negative POC. This kind of frames are allowed and they will be displayed before the IRAP frame. So the warning should not be triggered for them. Init the last_output_poc to G_MININT32 can avoid this. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2380>
* codecs: h264dec: Disable the POC order warning for negative POC.He Junyan2021-07-061-2/+4
| | | | | | | | | There may be leading frames after the IDR frame, which has negative POC. This kind of frames are allowed and they will be displayed before the IDR frame. So the warning should not be triggered for them. Init the last_output_poc to G_MININT32 can avoid this. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2380>
* codecparsers: vp9statefulparser: Fix the gst_vp9_get_qindex clamp issue.He Junyan2021-07-021-1/+1
| | | | | | | | The alternate quantizer is a delta value and should be int type. We mark it wrongly as uint, that will make CLAMP (data, 0, 255) always choose 255 rather than 0 if the data < 0. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
* codecparsers: vp9parser: Use macro to define the size of filter_level in ↵He Junyan2021-07-021-1/+1
| | | | | | Segmentation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
* codecparsers: vp9parser: Delete the verbose redefine of MAX_LOOP_FILTER.He Junyan2021-07-021-1/+0
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
* codecs: h265decoder: Consider the conformance window changes when ↵He Junyan2021-07-011-1/+32
| | | | | | | | | | new_sequence(). The change of conformance_window_flag and crop windows size also has impact on the output resolution and caps. So it deserves a trigger of new_sequence() to notify the sub class to update caps and pool. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2312>
* h265decoder: Don't hold reference to GstVideoCodecFrame for dropped pictureSeungha Yang2021-07-011-2/+7
| | | | | | | | | | | We are dropping RASL (Random Access Skipped Leading picture) which is associated with an IRAP (Intra Random Access Picture) that has NoRaslOutputFlag equal to 1, since the RASL picture will not be outputted and also it should not be used for reference picture. So, corresponding GstVideoCodecFrame should be released immediately. Otherwise GstVideoDecoder baseclass will hold the unused frame. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2330>
* opencv: Fix build error on macOSyoungsoo.lee2021-06-301-0/+1
| | | | | | | | | | The build fails on macos with the following error: /usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:2226:15: error: no template named 'initializer_list' in namespace 'std' Mat_(std::initializer_list<_Tp> values); fatal error: too many errors emitted, stopping now [-ferror-limit=] 35 warnings and 20 errors generated. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2368>
* av1decoder: Store display resolution for duplicated pictureSeungha Yang2021-06-291-0/+2
| | | | | | Target display resolution might be required by subclass implementation Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
* av1decoder: Fix debug typoSeungha Yang2021-06-291-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
* av1parser: Fix tile size calculationSeungha Yang2021-06-291-1/+1
| | | | | | | Remaining size should exclude already read "tile size bits". And see also "5.11.1. General tile group OBU syntax" Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
* webrtcbin: Sync to the clock per stream and not per bundleSebastian Dröge2021-06-281-1/+1
| | | | | | | | | | | | | By using the clocksync inside the dtlssrtpenc, all streams inside a bundled are synchronized together. This will cause problems if their buffers are not already arriving synchronized: clocksync would wait for a buffer on one stream and then buffers from the other stream(s) with lower timestamps would all be sent out too late. Placing the clocksync before the rtpbin and rtpfunnel synchronizes each stream individually and they will be send out more smoothly as a result. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2355>
* webrtc: Remove the webrtc-priv.h header from public headersOlivier Crête2021-06-282-2/+1
| | | | | | | | | And this time for real, also import it in a couple more places inside the webrtc element to make it build. Fixes #1607 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2359>
* webrtc: Re-add WebRTC object docs to the public headersSebastian Dröge2021-06-282-6/+30
| | | | | | | | | | | | So they end up in the generated documentation and the Since markers appear in the .gir files too. Also remove wrong "Since: 1.16" markers for some objects that were available since 1.14.0 already. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1609 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2366>
* d3d11: Add support for GRAY and more YUV formatsSeungha Yang2021-06-232-2/+79
| | | | | | | | | | | | | | | | | | | | By this commit, following formats will be newly supported by d3d11 elements * Y444_{8, 12, 16}LE formats: Similar to other planar formats. Such Y444 variants are not supported by Direct3D11 natively, but we can simply map each plane by using R8 and/or R16 texture. * P012_LE: It is not different from P016_LE, but defining P012 and P016 separately for more explicit signalling. Note that DXVA uses P016 texture for 12bits encoded bitstreams. * GRAY: This format is required for some codecs (e.g., AV1) if monochrome is supported * 4:2:0 planar 12bits (I420_12LE) and 4:2:2 planar 8, 10, 12bits formats (Y42B, I422_10LE, and I422_12LE) Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2346>
* webrtc lib: Make the datachannel struct privateOlivier Crête2021-06-213-63/+64
| | | | | | This will prevent any unsafe access. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
* webrtc lib: Make the DTLSTransport struct privateOlivier Crête2021-06-213-32/+34
| | | | | | This will prevent any unsafe access. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
* webrtc lib: Make the icetransport struct privateOlivier Crête2021-06-213-40/+43
| | | | | | This will prevent any unsafe access. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
* webrtc lib: Make the rtpreceiver struct privateOlivier Crête2021-06-212-30/+33
| | | | | | This will prevent any unsafe access. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
* webrtc lib: Make the rtpsender struct privateOlivier Crête2021-06-213-42/+43
| | | | | | This will prevent any unsafe access. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
* webrtc lib: Make the transceiver struct privateOlivier Crête2021-06-213-61/+93
| | | | | | This will prevent any unsafe access. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
* transcoder: Fix usage of g_error_propagateThibault Saunier2021-06-211-2/+1
| | | | | | | | | | In the error callback we were propagating an error we were not owning which is incorrect use of the API. Also we were clearing a GError we already propagated which is wrong as propagating gives ownership away. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2325>
* transcoder: Add a missing object unlockingThibault Saunier2021-06-211-0/+2
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2325>
* libs: d3d11: Port to C++Seungha Yang2021-06-207-236/+211
| | | | | | | | In general, C++ COM APIs are slightly less verbose and more readable than C APIs. And C++ supports some helper methods (smart pointer and C++ only macros for example) which are not allowed for C. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2343>
* vp8decoder: Drain the output queue on EOS/finishNicolas Dufresne2021-06-161-1/+1
| | | | | | | | The finish() virtual method was flushing the queue, instead push the remaining buffers. It is not required to reset in finish() unlike drain(). This a regression causing last frame to always be lost. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>
* v4l2slvp8dec: Only ask for output delay once per negotiationNicolas Dufresne2021-06-161-4/+6
| | | | | | | While it's technically possible to change it per frame, asking for that every frame is not very useful. This mimic H264 decoder better. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>
* jpeg2000parse, openjpeg: add support for YCrCb 4:1:1 samplingStéphane Cerveau2021-06-142-12/+24
| | | | | | | Add YCrCb 4:1:1 support in openjpeg elements and fix in jpeg2000parse the YCrCb 4:1:0 support Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2321>
* codecs: Fix the H265 poc out of order warning.He Junyan2021-06-101-0/+8
| | | | | | | | | | | | | | We always get a warning such as: h265decoder gsth265decoder.c:1432:gst_h265_decoder_do_output_picture: \ <vah265dec0> Outputting out of order 255 -> 0, likely a broken stream in H265 decoder. The problem is caused because we fail to reset the last_output_poc when we get IDR and BLA. The incoming IDR and BLA frame already bump all the frames in the DPB, but we forget to reset the last_output_poc, which make the POC out of order and generate the warning all the time. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2294>
* d3d11memory: Implement GstAllocator::mem_copy methodSeungha Yang2021-06-103-2/+104
| | | | | | | | | | | There are a few places which require deep copy (basesink on drain for example). Also this implementation can be useful for future use case. One probable future use case is that copying DPB texture to another texture for in-place transform since our DPB texture is never writable, and therefore copying is unavoidable. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2308>
* vkinstance: Don't abort in case that system has no available vulkan deviceSeungha Yang2021-06-041-1/+9
| | | | | | | Specification doesn't have restriction that returned pPhysicalDeviceCount value must be non-zero Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2304>
* d3d11: Add support for YV12 and NV21 formatsSeungha Yang2021-06-032-3/+17
| | | | | | Handle UV swapped 4:2:0 8bits formats Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2290>
* codecs: Integrate H265 DPB full check into need_bump().He Junyan2021-06-023-24/+10
| | | | | | | | | | | | | | | The current DPB check of H265 is not very correct. The current frame is already in the DPB when we check whether the DPB is full. For example, the DPB max size is 16 and we have 15 ref frames in the DPB, so the gst_h265_dpb_delete_unused() cleans no one, and then plus the current frame, the DPB is 16. This causes an error return, but in fact, the stream is correct. We now integrate the DPB full check into the need_bump() function. We add the correct frame into to DPB and then check whether the picture num is bigger than max_num_pics of DPB(which means there is no room for the current picture). If true, we bump the DPB immediately. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2291>
* codecs: gstvp8decoder: add support for render delayDaniel Almeida2021-05-312-2/+86
| | | | | | | | | | | | | | Some decoding APIs support delayed output for performance reasons. One example would be to request decoding for multiple frames and then query for the oldest frame in the output queue. This also increases throughput for transcoding and improves seek performance when supported by the underlying backend. Introduce support in the vp8 base class, so that backends that support render delays can actually implement it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2150>