summaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
...
* mediafoundation: Run gst-indentSeungha Yang2021-07-0413-475/+504
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
* va: Consider the compatibility when we get_profile() for H265 decoder.He Junyan2021-07-021-1/+32
| | | | | | | | | Adding the compatile profiles when we decide the final profile used for decoding. The final profile candidates include: 1. The profile directly specified by SPS, which is the exact one. 2. The compatile profiles decided by the upstream element such as the h265parse. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2322>
* va: vp9dec: update segmentation and store the result.He Junyan2021-07-021-42/+68
| | | | | | | | | | | | | | The segmentation is stateful, its information may depend on the previous segmentation setting. For example, if loop_filter_delta_enabled is TRUE, the filter_level[GST_VP9_REF_FRAME_INTRA][1] should inherit the previous frame's value and can not be calculated by the current frame's segmentation data only. So we need to maintain the segmentation state inside the vp9 decoder and update it when the new frame header comes. We also fix the CLAMP issue of lvl_seg and intra_lvl because of their wrong uint type here. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
* va: allocator: dma: Fail when mapping the non-linear buffer.He Junyan2021-07-021-12/+10
| | | | | | | | | | | The current way of DMA buffer mapping is simply forwarding the job to parent's map function, which is a mmap(). That can not handle the non-linear buffers, such as tiling, compressed, etc. The incorrect mapping of such buffers causes broken images, which are recognized as bugs. We should directly block this kind of mapping to avoid the misunderstanding. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2353>
* mfvideoenc: Don't ignore previous flow return valueSeungha Yang2021-06-301-2/+12
| | | | | | | In case of ASYNC MFT (hardware encoder), we were ignoring previous finish_frame or pad_push return value. so, error wasn't propagated. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2370>
* d3d11compositor: Add scaling policy to support PAR-aware scalingSeungha Yang2021-06-303-22/+174
| | | | | | | Identical to https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1156 but for D3D11. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2263>
* v4l2codecs: vp8: Check kernel versionEzequiel Garcia2021-06-291-0/+14
| | | | | | | Print a warning if the kernel version is too old. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2075>
* v4l2codecs: vp8: Update to the new uAPIEzequiel Garcia2021-06-295-154/+237
| | | | | | | | Starting from Linux v5.13, the V4L2 stateless VP8 uAPI is updated and stable. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2075>
* nvcodec: Enhance CUDA runtime compiler library loading on WindowsSeungha Yang2021-06-291-6/+28
| | | | | | | | | | The name of installed CUDA runtime compiler library is formed like nvrtc64_{major-version}{minor-version}_0.dll on Windows (which is differnt from documented in https://docs.nvidia.com/cuda/nvrtc/index.html) And minor version might not be exactly same as that of CUDA. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2362>
* d3d11: Add AV1 decoderSeungha Yang2021-06-296-0/+1562
| | | | | | Introduce Direct3D11/DXVA AV1 decoder element Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
* va: change AV1 GstVideoAlignment setting to left-top corner.He Junyan2021-06-281-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
* va: h264dec: Set the GstVideoAlignment correctly.He Junyan2021-06-281-2/+18
| | | | | | We should set GstVideoAlignment based on the sequence's crop information. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
* va: h265dec: Set the GstVideoAlignment correctly.He Junyan2021-06-281-2/+18
| | | | | | We should set GstVideoAlignment based on the conformance window info. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
* va: pool: Add VideoCropMeta to the buffer if crop_top/left > 0.He Junyan2021-06-281-8/+34
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
* va: basedec: Copy the frames into other_pool if needed.He Junyan2021-06-282-12/+88
| | | | | | | | If decoder's crop_top/left value > 0 and the downstream does not support the VideoCropMeta, we need to manually copy the frames into the other_pool and output it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
* va: basedec: Setup the other_pool to copy output if crop_left/top.He Junyan2021-06-282-12/+220
| | | | | | | | | | | | | If the decoder has crop_top/left value > 0(e.g. the conformance window in the H265). Which means that the real output picture locates in the middle of the decoded buffer. If the downstream can support VideoCropMeta, a VideoCropMeta is added to notify the real picture's coordinate and size. But if not, we need to copy it manually and the other_pool is needed. We always assume that decoded picture starts from top-left corner, and so there is no need to do this if crop_bottom/right value > 0. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
* va: No need to set the alignment for VideoMetaHe Junyan2021-06-281-37/+7
| | | | | | | | | The base va decoder's video_align is just used for calculation the real decoded buffer's width and height. It does not have meaning for the VideoMeta, because it does not align to the real picture in the output buffer. We will use VideoCropMeta to replace it later. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
* va: Delete the useless align expand in va_pool_set_config().He Junyan2021-06-281-9/+0
| | | | | | | | | | The base va decoder's video_align is just used for calculation the real decoded buffer's width and height. While the gst_video_info_align just calculate the offset and stride based on the video_align. But all the offsets and strides are overwritten in gst_va_dmabuf_allocator_try or gst_va_allocator_try, which make that calculation useless. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
* msdk: fix qp range for vp9encMengkejiergeli Ba2021-06-243-3/+15
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2349>
* d3d11: Add support for GRAY and more YUV formatsSeungha Yang2021-06-232-4/+337
| | | | | | | | | | | | | | | | | | | | 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>
* mfvideoenc: Enhance B-frame timestamp handlingSeungha Yang2021-06-234-31/+144
| | | | | | | | | | | | | | | | | | | | | | When B-frame is enabled, encoder seems to adjust PTS of encoded sample by using frame duration. For instance, one observed timestamp pattern by using B-frame enabled and 30fps stream is: * Frame-1: MF pts 0:00.033333300 MF dts 0:00.000000000 * Frame-2: MF pts 0:00.133333300 MF dts 0:00.033333300 * Frame-3: MF pts 0:00.066666600 MF dts 0:00.066666600 * Frame-4: MF pts 0:00.099999900 MF dts 0:00.100000000 We can notice that the amount of PTS shift is frame duration and Frame-4 exhibits PTS < DTS. To compensate shifted timestamp, we should calculate the timestamp offset and re-calculate DTS correspondingly. Otherwise, total timeline of output stream will be shifted, and that can cause time sync issue. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2354>
* mfh264enc, mfh265enc: Set profile string to src capsSeungha Yang2021-06-223-3/+43
| | | | | | | Set configured profile to src caps so that downstream can figure out selected profile. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2347>
* decklinkaudiosrc: Don't assume that stream time is always validSeungha Yang2021-06-211-12/+33
| | | | | | | | | | As per SDK doc, IDeckLinkInputCallback::VideoInputFrameArrived method might not provide video frame and it can be null. In that case, given stream_time can be invalid. So, we should not try to convert GST_CLOCK_TIME_NONE by using gst_clock_adjust_with_calibration() Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2337>
* msdk: Demote error log message to warning.Víctor Manuel Jáquez Leal2021-06-211-1/+1
| | | | | | | It is not an error that the available hardware doesn't support VA-API/MSDK. Just none plugin features will be registered. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2336>
* msdk: declare external dependenciesU. Artie Eoff2021-06-172-4/+37
| | | | | | | | | | | | Track kernel and VA driver dependencies so gstreamer will re-inspect the plugin if any of them change. Also, do not blacklist the plugin if !msdk_is_available since it could be a transient issue caused by one or more external dependency issues (e.g. wrong/missing driver specified, but corrected by user later on). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2335>
* va: Improve the default mapping between rt_format and video format.He Junyan2021-06-161-3/+16
| | | | | | | | | We add 12 bits entries into this default mapping. And the old mapping is not precise. For example, the NV12 should not be used as the default mapping for VA_RT_FORMAT_YUV422 and VA_RT_FORMAT_YUV444, it is even not a 422 or 444 format. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>
* va: Add 12 bits rt_format setting in H265.He Junyan2021-06-161-0/+8
| | | | | | | In order to support 12 bits format decoding, we need to add the support for 12 bits rt_format in H265. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>
* va: Fix a typo in video format mapping.He Junyan2021-06-161-1/+1
| | | | | | | GST_VIDEO_FORMAT_Y412_LE is a 4:4:4 format and so should be mapped to VA_RT_YUV444_12 rt format. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>
* alphadecodebin: Fix stall due to QoSNicolas Dufresne2021-06-141-0/+5
| | | | | | | | | alphacombine element is a simple element that assumes buffers are always paired, or at least that missing buffers are signalled with a GAP. The QoS implementation in the GstVideoDecoder base class allow decoders dropping frames independently and that could lead to stall in alphacombine. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2326>
* d3d11decoder: Don't print error log when no DPB texture is availableSeungha Yang2021-06-146-7/+12
| | | | | | | ... but we are flushing. The condition is quite expected situation when pipeline is in the middle of seeking operation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2320>
* msdkenc: add extbrc support in ext-coding-props propertyYinhang Liu2021-06-111-2/+10
| | | | | | | | | The SDK can support external bitrate control [1], so add extbrc to enable this feature. [1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxextcodingoption2 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2139>
* msdkenc: add ext-coding-props for external coding optionsYinhang Liu2021-06-112-0/+164
| | | | | | | | | This property supports passing multiple parameters using GstStructure. Example usage: ext-coding-props="props,key0=value0,key1=value1,..." Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2139>
* wasapi2sink: Fix ringbuffer object leakSeungha Yang2021-06-101-0/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2315>
* wasapi2ringbuffer: Implement GstAudioRingBuffer::pause()Seungha Yang2021-06-101-9/+64
| | | | | | | | WASAPI doesn't support PAUSE so it's not different from Stop(). When pipeline is in paused state, we don't need to waste CPU resource for feeding silent buffers. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2315>
* wasapi2src: Add support for loopback recordingSeungha Yang2021-06-097-40/+460
| | | | | | | | | | ... and add various device error handling. This loopback implementation is functionally identical to that of wasapisrc. When it's enabled, wasapi2src will read data from render device instead of capture device. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2311>
* wasapi2: Rewrite plugin and implement audioringbuffer subclassSeungha Yang2021-06-0813-1684/+1629
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... based on MediaFoundation work queue API. By this commit, wasapi2 plugin will make use of pull mode scheduling with audioringbuffer subclass. There are several drawbacks of audiosrc/audiosink subclassing (not audiobasesrc/audiobasesink) for WASAPI API, which are: * audiosrc/audiosink classes try to set high priority to read/write thread via MMCSS (Multimedia Class Scheduler Service) but it's not allowed in case of UWP application. In order to use MMCSS in UWP, application should use MediaFoundation work queue indirectly. Since audiosrc/audiosink scheduling model is not compatible with MediaFoundation's work queue model, audioringbuffer subclassing is required. * WASAPI capture device might report larger packet size than expected (i.e., larger frames we can read than expected frame size per period). Meanwhile, in any case, application should drain all packets at that moment. In order to handle the case, wasapi/wasapi2 plugins were making use of GstAdapter which is obviously sub-optimal because it requires additional memory allocation and copy. By implementing audioringbuffer subclassing, we can avoid such inefficiency. In this commit, all the device read/write operations will be moved to newly implemented wasapi2ringbuffer class and existing wasapi2client class will take care of device enumeration and activation parts only. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2306>
* wasapi2: Use AUDCLNT_STREAMFLAGS_NOPERSIST flagSeungha Yang2021-06-081-9/+4
| | | | | | ... so that we can disable persistence of our mute/volume status Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2306>
* wasapi2src: Fix doc typoSeungha Yang2021-06-081-4/+4
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2306>
* d3d11: Add support for YV12 and NV21 formatsSeungha Yang2021-06-031-107/+195
| | | | | | Handle UV swapped 4:2:0 8bits formats Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2290>
* d3d11window_win32: Ensure closing internal HWND from window threadSeungha Yang2021-06-031-56/+101
| | | | | | Window handle must be closed from its own message thread Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2302>
* doc: add the msdk elementsYinhang Liu2021-06-0315-1/+230
| | | | | | | | | Supported elements: msdkav1dec, msdkh264dec, msdkh264enc, msdkh265dec, msdkh265enc, msdkmjpegdec, msdkmjpegenc, msdkmpeg2dec, msdkmpeg2enc, msdkvc1dec, msdkvp8dec, msdkvp9dec, msdkvp9enc, msdkvpp. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2296>
* v4l2codecs: gstv4l2codecsvp8dec: implement a render delayDaniel Almeida2021-05-311-1/+25
| | | | | | | | The v4l2 backend support delayed output for performance reasons. It is then possible to use render delays to queue multiple requests simultaneously, thus increasing performance. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2150>
* d3d11: Suppress some warning logsSeungha Yang2021-05-291-1/+26
| | | | | | | | We uses gst_d3d11_device_new() for enumerating device which can fail for some reason. Don't print warning log for the case. And decoding capability check is the same case as well. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2286>
* d3d11compositor: Reuse converter on alpha updateSeungha Yang2021-05-281-2/+12
| | | | | | ... instead of creating converter object Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2276>
* d3d11converter: Introduce config to be extensibleSeungha Yang2021-05-289-66/+278
| | | | | | | Add a config argument like that of GstVideoConverter so that we can add more options without modifying existing methods Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2276>
* d3d11shader: Don't hold state object in GstD3D11QuadSeungha Yang2021-05-285-48/+32
| | | | | | We might want to update state object Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2276>
* v4lcodecs: Validate src formatsNicolas Dufresne2021-05-275-8/+49
| | | | | | | | | This add src format validation, this avoid registering element for drivers we don't support any of their src formats. This also special case the AlphaDecodeBin wrapper, as we know that alphacombine element only support I420 and NV12 for now. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2272>
* v4l2codecs: add wrappers for alpha decodeDaniel Almeida2021-05-277-11/+357
| | | | | | | | | | | | | | | | | | codecalpha is a new plugin introduced to support VP8/VP9 alpha as defined in the WebM and Matroska specifications. It splits the stream into two streams, one for the alpha and one for the actual content, then it decodes them separately with vpxdec and finally combine the results as A420 or AV12 (i.e. YUV + an extra alpha plane). The workflow above is setup by means of a bin, gstcodecalphabin. This patch simulates the same workflow into the v4l2codecs namespace, thus using the new v4l2 stateless decoders for hardware acceleration. This is so we can register the new alpha decode elements only if the hardware produces formats we support, i.e. I420 or NV12 for now. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2272>
* d3d11compositor: Fix caps update handlingSeungha Yang2021-05-261-25/+7
| | | | | | | | New caps is applied only when previous buffer is consumed if any. So, the lastest given caps might not be corresponding to the current buffer to be handled. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2284>
* va: h265dec: Add current picture into reference list for SCC.He Junyan2021-05-251-0/+14
| | | | | | | The current picture is not in the DPB, so we need to add it manually to the reference list when SCC is enabled. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2255>