summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2018-02-14 16:27:47 +0000
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>2018-02-20 12:39:13 -0900
commitf076f1948ecbea7162d7f6c98ed8a9e8b2bdacef (patch)
tree6af5abcf0fc2bc716783fe6b51bfa1f4c8cb4b50 /sys
parenta165a1a1a9c9aaad6dcd178a75086864ec438a8f (diff)
downloadgstreamer-plugins-bad-f076f1948ecbea7162d7f6c98ed8a9e8b2bdacef.tar.gz
msdk: encode: Add property to set slice/partitioning
Adding a new property num-slices to set the number of slices/partitions per frame. Adding it as a general property for all codecs (except jpeg). https://bugzilla.gnome.org/show_bug.cgi?id=791637
Diffstat (limited to 'sys')
-rw-r--r--sys/msdk/gstmsdkenc.c3
-rw-r--r--sys/msdk/gstmsdkenc.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/msdk/gstmsdkenc.c b/sys/msdk/gstmsdkenc.c
index b2e5a5a19..2219a5031 100644
--- a/sys/msdk/gstmsdkenc.c
+++ b/sys/msdk/gstmsdkenc.c
@@ -94,6 +94,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
#define PROP_REF_FRAMES_DEFAULT 1
#define PROP_I_FRAMES_DEFAULT 0
#define PROP_B_FRAMES_DEFAULT 0
+#define PROP_NUM_SLICES_DEFAULT 0
#define GST_MSDKENC_RATE_CONTROL_TYPE (gst_msdkenc_rate_control_get_type())
static GType
@@ -293,6 +294,7 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz)
thiz->param.mfx.GopPicSize = thiz->gop_size;
thiz->param.mfx.GopRefDist = thiz->b_frames + 1;
thiz->param.mfx.IdrInterval = thiz->i_frames;
+ thiz->param.mfx.NumSlice = thiz->num_slices;
thiz->param.mfx.NumRefFrame = thiz->ref_frames;
thiz->param.mfx.EncodedOrder = 0; /* Take input frames in display order */
@@ -1302,6 +1304,7 @@ gst_msdkenc_init (GstMsdkEnc * thiz)
thiz->ref_frames = PROP_REF_FRAMES_DEFAULT;
thiz->i_frames = PROP_I_FRAMES_DEFAULT;
thiz->b_frames = PROP_B_FRAMES_DEFAULT;
+ thiz->num_slices = PROP_NUM_SLICES_DEFAULT;
}
/* gst_msdkenc_set_common_property:
diff --git a/sys/msdk/gstmsdkenc.h b/sys/msdk/gstmsdkenc.h
index 6813099be..baccb7d5c 100644
--- a/sys/msdk/gstmsdkenc.h
+++ b/sys/msdk/gstmsdkenc.h
@@ -134,6 +134,7 @@ struct _GstMsdkEnc
guint ref_frames;
guint i_frames;
guint b_frames;
+ guint num_slices;
gboolean reconfig;
};