diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2018-02-22 11:27:03 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2018-03-28 10:15:40 +0200 |
commit | e7604e2c5ef043862daf45633f3df6475ee6eeae (patch) | |
tree | 8eeb9cc62be24dae20cc1d325ccf834746b58b7d | |
parent | f5d58a3c58d42d112a7b0980c17711738305d93f (diff) | |
download | gst-omx-e7604e2c5ef043862daf45633f3df6475ee6eeae.tar.gz |
omxvideoenc: add 'roi' qp-mode on zynqultrascaleplus
New QP mode used to handle ROI metadata.
https://bugzilla.gnome.org/show_bug.cgi?id=793696
-rw-r--r-- | omx/gstomxvideoenc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index ff8efcf..da005e1 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -80,6 +80,9 @@ gst_omx_video_enc_qp_mode_get_type (void) {OMX_ALG_AUTO_QP, "Let the VCU encoder change the QP for each coding unit according to its content", "auto"}, + {OMX_ALG_ROI_QP, + "Adjust QP according to the regions of interest defined on each frame. Must be set to handle ROI metadata.", + "roi"}, {0xffffffff, "Component Default", "default"}, {0, NULL, NULL} }; @@ -2498,6 +2501,13 @@ handle_roi_metadata (GstOMXVideoEnc * self, GstBuffer * input) g_quark_to_string (roi->roi_type), roi->id, roi->x, roi->y, roi->w, roi->h); + if (self->qp_mode != OMX_ALG_ROI_QP) { + GST_WARNING_OBJECT (self, + "Need qp-mode=roi to handle ROI metadata (current: %d); ignoring", + self->qp_mode); + continue; + } + GST_OMX_INIT_STRUCT (&roi_param); roi_param.nPortIndex = self->enc_in_port->index; roi_param.nLeft = roi->x; |