Commit e7604e2c authored by Guillaume Desmottes's avatar Guillaume Desmottes 🐐

omxvideoenc: add 'roi' qp-mode on zynqultrascaleplus

New QP mode used to handle ROI metadata.

https://bugzilla.gnome.org/show_bug.cgi?id=793696
parent f5d58a3c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment