Commit graph

30 commits

Author SHA1 Message Date
Thibault Saunier
b7d9115a05 Move files from gst-omx into the "subprojects/gst-omx/" subdir 2021-09-24 16:15:01 -03:00
Varunkumar Allagadapa
f35f312634 omxvideoenc: Add look-ahead property to ZYNQ_USCALE_PLUS encoder
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-09 11:44:55 +01:00
Varunkumar Allagadapa
bfd8306ef6 omxvideoenc: Add long-term-ref support to ZYNQ_USCALE_PLUS encoder
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-09 11:44:55 +01:00
Guillaume Desmottes
7be54ad091 omxvideoenc: implement dmabuf export on input buffers
Propose pool upstream so input buffers can be allocated by the port and
exported as dmabuf.

The actual OMX buffers are allocated when the pool is activated, so we
don't end up doing useless allocations if the pool isn't used.

https://bugzilla.gnome.org/show_bug.cgi?id=796918
2018-08-30 10:59:30 +02:00
Guillaume Desmottes
c8969b0dbe omxvideoenc: implement decide_allocation
Increase the number of output buffers by the number of buffers requested
downstream.
Prevent buffers starvation if downstream is going to use dynamic buffer
mode on its input.

https://bugzilla.gnome.org/show_bug.cgi?id=795746
2018-06-08 09:53:01 +02:00
Guillaume Desmottes
84483f3d7a omxvideoenc: always signal drain cond when stopping streaming loop
Similar change as the one I just did in omxvideodec.

https://bugzilla.gnome.org/show_bug.cgi?id=796207
2018-06-08 09:47:32 +02:00
Guillaume Desmottes
72cb1943da omxvideoenc: restore OMX default target-bitrate if requested by user
0xffffffff is the magic number in gst-omx meaning 'the default value
defined in OMX'. This works fine with OMX parameters which are only set
once when starting the component but not with configs which can be
changed while PLAYING.
Save the actual OMX default bitrate so we can restore it later if user
sets back 0xffffffff on the property.

Added GST_OMX_PROP_OMX_DEFAULT so we stop hardcoding magic numbers
everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=794998
2018-04-23 10:41:10 +02:00
Guillaume Desmottes
6921568161 videoenc: implement ROI on zynqultrascaleplus
Check input buffers for ROI meta and pass them to the encoder by using
zynqultrascaleplus's custom OMX extension. Also add a new
"default-roi-quality" in order to tell the encoder what quality level
should be applied to ROI by default.

https://bugzilla.gnome.org/show_bug.cgi?id=793696
2018-02-21 12:31:39 -05:00
Guillaume Desmottes
2d3816fabc omxvideoenc: protect target_bitrate with the object lock
The 'target-bitrate' property can be changed while PLAYING
(GST_PARAM_MUTABLE_PLAYING). Make it thread-safe to prevent concurrent
accesses between the application and streaming thread.

https://bugzilla.gnome.org/show_bug.cgi?id=793458
2018-02-21 11:24:52 +00:00
Guillaume Desmottes
e3396210d2 omxvideoenc: add zynqultrascaleplus specific properties
https://bugzilla.gnome.org/show_bug.cgi?id=792528
2018-01-30 11:51:10 +00:00
Guillaume Desmottes
9f87b987ef omxvideoenc: implement dmabuf import on zynqultrascaleplus
The Zynq UltraScale+ encoder implements a custom OMX extension to
directly import dmabuf saving the need of mapping input buffers.

This can be use with either 'v4l2src io-mode=dmabuf' or an OMX video
decoder upstream.

https://bugzilla.gnome.org/show_bug.cgi?id=792361
2018-01-29 15:21:02 +00:00
Guillaume Desmottes
533ee7fadc omxvideoenc: use dynamic buffer mode on input if possible
If the OMX component supports dynamic buffer mode and the input buffers
are properly aligned avoid copying each input frame between OMX and
GStreamer.

Tested on zynqultrascaleplus and rpi (without dynamic buffers).

https://bugzilla.gnome.org/show_bug.cgi?id=787093
2017-12-14 09:00:31 +00:00
Guillaume Desmottes
973c6e109a omxvideoenc: factor out enable and disable code
No semantic change, just factor out the code enabling and disabling the
component to their own functions.

Makes the code easier to read as the set_format() method was already
pretty big. Will also allow us to easily change the enabling logic.

https://bugzilla.gnome.org/show_bug.cgi?id=785967
2017-08-08 10:40:47 -04:00
Sebastian Dröge
d75334456d omx: Let base classes handle EOS
https://bugzilla.gnome.org//show_bug.cgi?id=734774
2014-08-14 17:36:11 +03:00
Josep Torra
118c023f55 omxvideoenc: drop unused data member 2013-03-01 15:32:47 +01:00
Sebastian Dröge
92c7944499 omxvideoenc: Rename component variable 2013-02-25 09:19:08 +01:00
Sebastian Dröge
219a93bbaf omx: Some minor refactoring and cleanup 2013-02-12 11:49:21 +01:00
Sebastian Dröge
4044aaecbe omx: Fix includes to properly work with the 1.0 releases 2013-01-17 18:08:15 +01:00
Sebastian Dröge
3244201b49 omx: Fix some compilation errors caused by circular includes 2012-12-12 17:45:39 +00:00
Sebastian Dröge
2481ceb8c4 omx: Update to new GLib thread API 2012-11-12 11:29:48 +01:00
Sebastian Dröge
5fdb490f1a omx: Port to video base classes from -base 2012-10-22 14:20:41 +02:00
Olivier Crête
ff2603a727 Port to Gst 0.11 2012-04-13 12:16:34 -04:00
Sebastian Dröge
bd60f141e9 omxvideoenc: Use correct timestamp, duration and filled length for the EOS buffers 2011-12-06 12:46:51 +01:00
Sebastian Dröge
22ba4e1b9e omxvideoenc: Add vfunc for handling the output frames
This can be used by subclasses to override the buffer flags
or to handle some frames differently than the default behaviour.
2011-11-15 08:28:32 -08:00
Sebastian Dröge
2d6239678f omxvideoenc: Don't try to drain the component after EOS
And don't send EOS twice in any case. This most likely
will cause the component to not output it again and
is not necessary anyway.
2011-11-08 11:10:52 +01:00
Sebastian Dröge
ef67a43702 omxvideoenc: Better handling of encoder parameters
Only set them if necessary and allow to use the component
defaults.
2011-11-02 13:50:14 +01:00
Sebastian Dröge
8eaf25c10e omxvideoenc: Implement draining of the component and use it
This makes sure that all buffers are encoded and pushed downstream
before flushing the ports and losing some buffers.
2011-11-01 16:41:46 +01:00
Sebastian Dröge
f93a45fb66 omxaudioenc: Forward downstream flow returns to upstream 2011-11-01 15:10:12 +01:00
Sebastian Dröge
e7b421c131 omxvideoenc: Add support for setting bitrate/quantization related parameters 2011-07-28 12:52:24 +02:00
Sebastian Dröge
2343decb3c omxvideoenc: Add video encoder base class and MPEG4 video encoder
Unfortunately requires lots of hacks again to work properly with
Bellagio.
2011-07-20 11:08:18 +02:00