Skip to content
Snippets Groups Projects

msdkenc{h264,h265}: add dblk-idc property

Merged Yinhang Liu requested to merge liuyinhangx/gst-plugins-bad:master into master
Files
4
+ 16
0
@@ -58,6 +58,7 @@ enum
PROP_MIN_QP,
PROP_MAX_QP,
PROP_INTRA_REFRESH_TYPE,
PROP_DBLK_IDC,
};
enum
@@ -78,6 +79,7 @@ enum
#define PROP_MIN_QP_DEFAULT 0
#define PROP_MAX_QP_DEFAULT 0
#define PROP_INTRA_REFRESH_TYPE_DEFAULT MFX_REFRESH_NO
#define PROP_DBLK_IDC_DEFAULT 0
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
@@ -389,6 +391,7 @@ gst_msdkh264enc_configure (GstMsdkEnc * encoder)
encoder->option2.MaxQPI = encoder->option2.MaxQPP = encoder->option2.MaxQPB =
thiz->max_qp;
encoder->option2.IntRefType = thiz->intra_refresh_type;
encoder->option2.DisableDeblockingIdc = thiz->dblk_idc;
if (encoder->rate_control == MFX_RATECONTROL_LA ||
encoder->rate_control == MFX_RATECONTROL_LA_HRD ||
@@ -592,6 +595,9 @@ gst_msdkh264enc_set_property (GObject * object, guint prop_id,
case PROP_INTRA_REFRESH_TYPE:
thiz->intra_refresh_type = g_value_get_enum (value);
break;
case PROP_DBLK_IDC:
thiz->dblk_idc = g_value_get_uint (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -649,6 +655,9 @@ gst_msdkh264enc_get_property (GObject * object, guint prop_id, GValue * value,
case PROP_INTRA_REFRESH_TYPE:
g_value_set_enum (value, thiz->intra_refresh_type);
break;
case PROP_DBLK_IDC:
g_value_set_uint (value, thiz->dblk_idc);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -774,6 +783,12 @@ gst_msdkh264enc_class_init (GstMsdkH264EncClass * klass)
PROP_INTRA_REFRESH_TYPE_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DBLK_IDC,
g_param_spec_uint ("dblk-idc", "Disable Deblocking Idc",
"Option of disable deblocking idc",
0, 2, PROP_DBLK_IDC_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_static_metadata (element_class,
"Intel MSDK H264 encoder", "Codec/Encoder/Video/Hardware",
"H264 video encoder based on Intel Media SDK",
@@ -796,4 +811,5 @@ gst_msdkh264enc_init (GstMsdkH264Enc * thiz)
thiz->min_qp = PROP_MIN_QP_DEFAULT;
thiz->max_qp = PROP_MAX_QP_DEFAULT;
thiz->intra_refresh_type = PROP_INTRA_REFRESH_TYPE_DEFAULT;
thiz->dblk_idc = PROP_DBLK_IDC_DEFAULT;
}
Loading