mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
omxvideoenc: add 'roi' qp-mode on zynqultrascaleplus
New QP mode used to handle ROI metadata. https://bugzilla.gnome.org/show_bug.cgi?id=793696
This commit is contained in:
parent
6b6ea6fdf7
commit
530a7537cf
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue