summaryrefslogtreecommitdiff
path: root/omx
AgeCommit message (Collapse)AuthorFilesLines
2020-04-10video: remove BGR from supported formatGuillaume Desmottes1-1/+1
It's not supported by either decoder or encoder and is even not listed in gst_omx_video_get_format_from_omx() so it can't work.
2020-04-10omxvideoenc: add GRAY8 supportGuillaume Desmottes1-0/+18
It's supported by Zynq encoder and was already in the sink caps template.
2020-04-10omxvideoenc: factor out gst_omx_video_enc_copy_plane()Guillaume Desmottes1-37/+50
No semantic change, I'm going to use it to copy GRAY8 buffers which is actually a single plane 8-bits format.
2020-04-10omxvideoenc: use gst_video_meta_get_plane_height() to compute slice heightGuillaume Desmottes1-1/+9
This new API saves us from doing manual computation and actually work with single planar formats, such as GRAY8.
2020-04-08omxh26xenc: fix coverity with frame testStéphane Cerveau4-9/+13
Coverity was complaining with: Null pointer dereferences (REVERSE_INULL) Null-checking "frame" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. The frame == NULL has been removed as 'frame' is actively used in the code above without any change of dereferencing and setting its value to NULL before the test. CID: 1461287
2020-03-19gstomxvideoenc: fix subframe output_bufferStéphane Cerveau1-1/+1
Using more than 1 subframes was failing with frame->output_buffer = NULL
2020-02-27omxvideodec: add support of alternate interlace mode on zynqGuillaume Desmottes1-12/+207
2020-02-27omxvideoenc: add support of alternate interlace mode on zynqGuillaume Desmottes2-0/+136
It's only supported by the Zynq HEVC encoder for now.
2020-02-27omx: add alternate flags to buffer_flags_mapGuillaume Desmottes1-0/+4
Zynq specific flags used to tag top/bottom fields in alternate mode.
2020-02-27omxvideo(enc): use GST_VIDEO_INFO_FIELD_RATE_N()Guillaume Desmottes2-7/+16
Does not change anything for now but will be needed when we'll support interlace-mode=alternate as the field rate will be twice the frame rate. Made the code safe from division by 0 while I was on it.
2020-02-27omxvideo{enc,dec}: use GST_VIDEO_INFO_FIELD_HEIGHT()Guillaume Desmottes2-14/+17
Does not change anything for now but will be needed when we'll support interlace-mode=alternate as the fields will have half the frame height.
2020-02-25omx: don't log error when failing to load conf file with generic targetGuillaume Desmottes1-8/+17
The generic target is meant to only test building gst-omx. It doesn't provide any configuration file and so is not supposed to register any element. I'm not aware of any user building gst-omx with this target and providing their own conf file to actually register elements. But best to not break this use case anyway so let's just downgrade the log message. Fix GST_ERROR in the 'check fedora' CI job.
2020-01-16omxvideoenc: fix warningStéphane Cerveau1-2/+3
Fix warning test when OMX_BUFFERFLAG_ENDOFFRAME is not set.
2020-01-09omxvideoenc: Add look-ahead property to ZYNQ_USCALE_PLUS encoderVarunkumar Allagadapa2-0/+32
This patch adds look-ahead property to encoder The value indicates look ahead size in frames, the number of frames processed ahead of second pass encoding. Dual pass encoding is disabled if look-ahead value is less than 2.
2020-01-09omxvideoenc: Add long-term-ref support to ZYNQ_USCALE_PLUS encoderVarunkumar Allagadapa2-0/+126
Custom API that upstream elements can use to notify encoders about marking longterm ref. pictures or using longterm ref. pictures in encoding process. This patch adds below properties: long-term-ref: Enable/Disable dynamically marking long-term reference pictures in encoding process long-term-freq: Periodicity of long-term reference picture marking in encoding process. If a picture is marked as long-term reference picture then it remains in the DPB list for ever unless it overrides with new long-term pitcure with same index. Encoder can use this long-term picture as refence for encoding. This feature is mostly useful to avoid visual artifacts propagation in streaming use cases when packet loss happens. Instead of requesting for IDR, client can request for use long-term reference picture for encoding.
2020-01-07omx: remove useless double negationsGuillaume Desmottes1-2/+2
flush and port->flushing are both gboolean.
2019-12-22omxh265enc: handle CODECCONFIG buffersGuillaume Desmottes2-0/+78
Exact same code as omxh264enc.
2019-12-22omxh264enc: send codec data downstreamGuillaume Desmottes1-2/+7
We are operating in stream-format=byte-stream so the codec data buffer is meant to be part of the buffer flow. The base class will push it when a key frame is requested (as we stored it with gst_video_encoder_set_headers()) but we still have to push it right away as part of the normal buffer flow. Also set the HEADER flag on this buffer.
2019-12-22omxh264enc: no need to check if codeconfig has startcodeGuillaume Desmottes1-18/+14
We currently only support stream-format=byte-stream so there is no point re-checking for it when handling CODECCONFIG buffer.
2019-12-22omxh26xenc: Negotiate subframe modeNicolas Dufresne2-7/+45
We now negotiate subframe mode through the caps. To enabled subframe mode, the caps need to specify alignment=nal: ... ! omxh264enc ! video/x-h264,alignment=nal ! ... ... ! omxh265enc ! video/x-h265,alignment=nal ! ...
2019-12-22omxvideoenc: use subframe base class APIGuillaume Desmottes1-3/+13
Use subframe base class support.
2019-12-22omx: Add helper to enable/disable/read subframe modeNicolas Dufresne2-0/+57
2019-12-19zynq: add mapping for latest custom indexesGuillaume Desmottes1-0/+30
Fix warning when building using version 2019.2 of OMX headers.
2019-12-19omxvideoenc: update qp-mode settingsVarunkumar Allagadapa1-9/+67
Adds load-qp-absolute and load-qp-relative qp-modes
2019-12-11omxvideoenc: Add stride check for input buffer extractionShinya Saito1-2/+5
Stride of input buffer may be different from that of omx input port even if both sizes are the same.
2019-11-05omxvideoenc: pass padding requirements to ALLOCATION queryGuillaume Desmottes1-1/+25
By passing the expected video buffer layout, the upstream producer may be able to produce buffers fitting those requierements allowing gst-omx to use dynamic buffer mode rather than having to copy each input buffer. This is particularly useful with v4l2src as it can request the capture driver to produce buffers with the required paddings.
2019-11-05omxbufferpool: use gst_video_meta_set_alignment()Guillaume Desmottes3-1/+105
Tell buffer consumer about our paddings. v4l2src can now uses these paddings information when trying to import buffers to configure the v4l2 driver accordingly.
2019-11-02omxvideoenc: fix buffer size in debug logGuillaume Desmottes1-2/+2
Use the actual OMX buffer size rather than the info.size as OMX may require larger buffer if the port requires some padding.
2019-10-14Remove autotools buildTim-Philipp Müller1-116/+0
2019-10-07omxallocator: fix leak with a proper chaining finalizeStéphane Cerveau1-0/+2
2019-09-23omxvideoenc: revert draining on ALLOCATION and DRAIN queryGuillaume Desmottes1-27/+0
My latest patch introduces some regressions which I have no time to debug properly at the moment so just revert it for now.
2019-09-17omxvideoenc: let encoder base class handle ALLOCATION queryGuillaume Desmottes1-1/+0
Fixing a regression introduced in my previous patch (7c40a91c31aa4bcbb191f7c6a5d222edf9dfd9d1). The ALLOCATION query needs to be handled by GstVideoEncoder (to call propose_allocation()) so chain up the query handling rather than early returning.
2019-09-05omxvideoenc: drain encoder on ALLOCATION and DRAIN queriesGuillaume Desmottes1-0/+28
Ensure that the encoder releases all its input buffers when requested by upstream. Encoder input buffers may be shared with downstreaming (when using dmabuf), upstream may then request the encoder to drain when reconfiguring before destroying its buffers. Also drain on ALLOCATION query as we already do in kmssink as that notify of a format change. Fix "decoder ! encoder" pipeline when decoding a file with different resolutions on Zynq.
2019-09-04omx: log the number of pending buffers when port is EOSGuillaume Desmottes1-1/+2
2019-09-04omx: log when an output port is eosGuillaume Desmottes1-2/+8
2019-09-04omxvideoenc: log the full input formatGuillaume Desmottes1-2/+4
Make it easier to debug dynamic format changes.
2019-09-02omxvideodec: fix dmabuf importGuillaume Desmottes1-2/+12
When importing dmabuf, UseBuffer() has to be called with the fd as pBuffer rather than the mapped address of the buffer.
2019-09-02omxbufferpool: fix dmabuf importGuillaume Desmottes1-3/+6
When importing dmabuf from downstream, we want the allocator to be in OTHER_POOL mode despite output_mode being DMABUF. So check first if other_pool is set before checking for pool's output_mode.
2019-08-22omxvideoenc: Remove unnecessary gst_video_frame_unmap()Shinya Saito1-1/+0
2019-08-05omxvideodec: log supported caps by the decoderGuillaume Desmottes1-0/+3
Can be useful when debugging to check the caps supported by the decoder before filtering.
2019-07-11omxvideoenc: Unref frame of codec config bufferShinya Saito1-0/+1
After handling codec config, codec frame should be unreffed.
2019-06-17omxvideo: check difference between frame and requested tsGuillaume Desmottes1-1/+12
This has proven to be very useful when debugging to detect bugs where we match the wrong gst frame with an output OMX buffer.
2019-06-17omxvideo: add debug infos to find_nearest_frame()Guillaume Desmottes4-4/+12
Those debug infos have proved to be very helpful when debugging timestamp issues. They are often linked to gst-omx picking the wrong frame when trying to map from OMX.
2019-06-07omxvideodec: Deactivate negotiated pool when output own bufferShinya Saito1-0/+2
If decoder outputs internal buffer and not use OMX_UseBuffer, downstream bufferpool should be stopped.
2019-06-04omxh264enc: Add 'ref-frames' propertyShinya Saito2-1/+24
Add a property to control the number of frames for reference. Min and max value is based on OpenMAX IL 1.2.0 Specification.
2019-05-13doc: Build documentation of hotdocThibault Saunier1-0/+2
2019-04-25gstomx: remove gst_omx_buffer_set_omx_buf/get_omx_bufGeorge Kiagiadakis2-21/+0
They are no longer used anywhere
2019-04-25omxbufferpool: refactor to allow memory sharingGeorge Kiagiadakis7-265/+849
One big restriction of the OMX buffer pool has always been that the GstMemory objects were flagged with NO_SHARE. This was because the buffer pool needed to be sure that when a buffer returned to the pool, it would be safe to release the OMX buffer back to OpenMAX. With this change, this is no longer a restriction. What this commit introduces is a new allocator that allows us to track the GstMemory objects independently. Now, when a buffer returns to the pool, it is not necessary for the memory to be released as well. We simply track the memory's ref count in the allocator and we return the OMX buffer back when the memory's ref count drops to 0. The reason for doing this is to allow implementing zero-copy transfers in situations where we may need to copy or map a certain region of the buffer. For instance, omxh264enc ! h264parse should be possible to be zero-copy by using an OMX buffer pool between them.
2019-04-23omxbufferpool: fix memory mapping with offsetGuillaume Desmottes1-1/+1
gst_memory_map() is already adding the offset to the mapped pointer. Doing it in the memory implementation was resulting in the offset being accounted twice. It doesn't matter yet as we are only creating memory without offset for now but it will once we'll start sharing OMX memories.
2019-04-16Fixes build with omx >= 1.2.0Julien Isorce1-12/+19
gstomx.c:1405:10: error: ‘OMX_IndexParamCustomContentPipe’ undeclared (first use in this function) case OMX_IndexParamCustomContentPipe Some enums have been deprecated in 1.2.0 https://gitlab.freedesktop.org/gstreamer/gst-omx/issues/27