mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
msdkh265enc: add dblk-idc property
The SDK can support deblocking reference structure [1], so add a new property to enable this feature. [1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxextcodingoption2 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2122>
This commit is contained in:
parent
d99e97af80
commit
7740ab9b86
2 changed files with 19 additions and 0 deletions
|
@ -57,6 +57,7 @@ enum
|
||||||
PROP_MIN_QP,
|
PROP_MIN_QP,
|
||||||
PROP_MAX_QP,
|
PROP_MAX_QP,
|
||||||
PROP_INTRA_REFRESH_TYPE,
|
PROP_INTRA_REFRESH_TYPE,
|
||||||
|
PROP_DBLK_IDC,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -76,6 +77,7 @@ enum
|
||||||
#define PROP_MIN_QP_DEFAULT 0
|
#define PROP_MIN_QP_DEFAULT 0
|
||||||
#define PROP_MAX_QP_DEFAULT 0
|
#define PROP_MAX_QP_DEFAULT 0
|
||||||
#define PROP_INTRA_REFRESH_TYPE_DEFAULT MFX_REFRESH_NO
|
#define PROP_INTRA_REFRESH_TYPE_DEFAULT MFX_REFRESH_NO
|
||||||
|
#define PROP_DBLK_IDC_DEFAULT 0
|
||||||
|
|
||||||
#define RAW_FORMATS "NV12, I420, YV12, YUY2, UYVY, BGRA, P010_10LE, VUYA"
|
#define RAW_FORMATS "NV12, I420, YV12, YUY2, UYVY, BGRA, P010_10LE, VUYA"
|
||||||
#define PROFILES "main, main-10, main-444"
|
#define PROFILES "main, main-10, main-444"
|
||||||
|
@ -354,6 +356,7 @@ gst_msdkh265enc_configure (GstMsdkEnc * encoder)
|
||||||
encoder->option2.MaxQPI = encoder->option2.MaxQPP = encoder->option2.MaxQPB =
|
encoder->option2.MaxQPI = encoder->option2.MaxQPP = encoder->option2.MaxQPB =
|
||||||
h265enc->max_qp;
|
h265enc->max_qp;
|
||||||
encoder->option2.IntRefType = h265enc->intra_refresh_type;
|
encoder->option2.IntRefType = h265enc->intra_refresh_type;
|
||||||
|
encoder->option2.DisableDeblockingIdc = h265enc->dblk_idc;
|
||||||
|
|
||||||
#if (MFX_VERSION >= 1026)
|
#if (MFX_VERSION >= 1026)
|
||||||
if (h265enc->transform_skip != MFX_CODINGOPTION_UNKNOWN) {
|
if (h265enc->transform_skip != MFX_CODINGOPTION_UNKNOWN) {
|
||||||
|
@ -581,6 +584,10 @@ gst_msdkh265enc_set_property (GObject * object, guint prop_id,
|
||||||
thiz->intra_refresh_type = g_value_get_enum (value);
|
thiz->intra_refresh_type = g_value_get_enum (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PROP_DBLK_IDC:
|
||||||
|
thiz->dblk_idc = g_value_get_uint (value);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -645,6 +652,10 @@ gst_msdkh265enc_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
g_value_set_enum (value, thiz->intra_refresh_type);
|
g_value_set_enum (value, thiz->intra_refresh_type);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PROP_DBLK_IDC:
|
||||||
|
g_value_set_uint (value, thiz->dblk_idc);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -799,6 +810,12 @@ gst_msdkh265enc_class_init (GstMsdkH265EncClass * klass)
|
||||||
PROP_INTRA_REFRESH_TYPE_DEFAULT,
|
PROP_INTRA_REFRESH_TYPE_DEFAULT,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
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,
|
gst_element_class_set_static_metadata (element_class,
|
||||||
"Intel MSDK H265 encoder",
|
"Intel MSDK H265 encoder",
|
||||||
"Codec/Encoder/Video/Hardware",
|
"Codec/Encoder/Video/Hardware",
|
||||||
|
@ -824,5 +841,6 @@ gst_msdkh265enc_init (GstMsdkH265Enc * thiz)
|
||||||
thiz->min_qp = PROP_MIN_QP_DEFAULT;
|
thiz->min_qp = PROP_MIN_QP_DEFAULT;
|
||||||
thiz->max_qp = PROP_MAX_QP_DEFAULT;
|
thiz->max_qp = PROP_MAX_QP_DEFAULT;
|
||||||
thiz->intra_refresh_type = PROP_INTRA_REFRESH_TYPE_DEFAULT;
|
thiz->intra_refresh_type = PROP_INTRA_REFRESH_TYPE_DEFAULT;
|
||||||
|
thiz->dblk_idc = PROP_DBLK_IDC_DEFAULT;
|
||||||
msdk_enc->num_extra_frames = 1;
|
msdk_enc->num_extra_frames = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ struct _GstMsdkH265Enc
|
||||||
guint min_qp;
|
guint min_qp;
|
||||||
guint max_qp;
|
guint max_qp;
|
||||||
guint intra_refresh_type;
|
guint intra_refresh_type;
|
||||||
|
guint dblk_idc;
|
||||||
|
|
||||||
mfxExtHEVCTiles ext_tiles;
|
mfxExtHEVCTiles ext_tiles;
|
||||||
/* roi[0] for current ROI and roi[1] for previous ROI */
|
/* roi[0] for current ROI and roi[1] for previous ROI */
|
||||||
|
|
Loading…
Reference in a new issue