#define DEFAULT_CABAC MFX_CODINGOPTION_UNKNOWN
#define DEFAULT_QP 0
-#define DEFAULT_GOP_SIZE 0
+#define DEFAULT_GOP_SIZE 30
#define DEFAULT_I_FRAMES 0
#define DEFAULT_B_FRAMES 0
#define DEFAULT_REF_FRAMES 2
#define DEFAULT_BITRATE 2000
#define DEFAULT_MAX_BITRATE 0
-#define DEFAULT_RATE_CONTROL MFX_RATECONTROL_CBR
+#define DEFAULT_RATE_CONTROL MFX_RATECONTROL_VBR
#define DEFAULT_RC_LOOKAHEAD 10
#define DEFAULT_RC_LOOKAHEAD_DS MFX_LOOKAHEAD_DS_UNKNOWN
#define DEFAULT_AVBR_ACCURACY 0
GST_TYPE_QSV_CODING_OPTION, DEFAULT_CABAC,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MIN_QP_I,
- g_param_spec_uint ("min-qpi", "Min QP I",
- "Minimum allowed QP value for I-frame types (0: no limitations)",
+ g_param_spec_uint ("min-qp-i", "Min QP I",
+ "Minimum allowed QP value for I-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MIN_QP_P,
- g_param_spec_uint ("min-qpp", "Min QP P",
- "Minimum allowed QP value for P-frame types (0: no limitations)",
+ g_param_spec_uint ("min-qp-p", "Min QP P",
+ "Minimum allowed QP value for P-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MIN_QP_B,
- g_param_spec_uint ("min-qpb", "Min QP B",
- "Minimum allowed QP value for B-frame types (0: no limitations)",
+ g_param_spec_uint ("min-qp-b", "Min QP B",
+ "Minimum allowed QP value for B-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MAX_QP_I,
- g_param_spec_uint ("max-qpi", "Max QP I",
- "Maximum allowed QP value for I-frame types (0: no limitations)",
+ g_param_spec_uint ("max-qp-i", "Max QP I",
+ "Maximum allowed QP value for I-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MAX_QP_P,
- g_param_spec_uint ("max-qpp", "Max QP P",
- "Maximum allowed QP value for P-frame types (0: no limitations)",
+ g_param_spec_uint ("max-qp-p", "Max QP P",
+ "Maximum allowed QP value for P-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MAX_QP_B,
- g_param_spec_uint ("max-qpb", "Max QP B",
- "Maximum allowed QP value for B-frame types (0: no limitations)",
+ g_param_spec_uint ("max-qp-b", "Max QP B",
+ "Maximum allowed QP value for B-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_QP_I,
- g_param_spec_uint ("qpi", "QP I",
- "Constant quantizer for I frames (0: no limitations)",
+ g_param_spec_uint ("qp-i", "QP I",
+ "Constant quantizer for I frames (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_QP_P,
- g_param_spec_uint ("qpp", "QP P",
- "Constant quantizer for P frames (0: no limitations)",
+ g_param_spec_uint ("qp-p", "QP P",
+ "Constant quantizer for P frames (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_QP_B,
- g_param_spec_uint ("qpb", "QP B",
- "Constant quantizer for B frames (0: no limitations)",
+ g_param_spec_uint ("qp-b", "QP B",
+ "Constant quantizer for B frames (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_GOP_SIZE,
g_param_spec_uint ("gop-size", "GOP Size",
"Number of pictures within a GOP (0: unspecified)",
- 0, G_MAXINT, DEFAULT_GOP_SIZE, (GParamFlags)
+ 0, G_MAXUSHORT, DEFAULT_GOP_SIZE, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_I_FRAMES,
g_param_spec_uint ("i-frames", "I Frames",
"Number of I frames between IDR frames"
"(0: every I frame is an IDR frame)",
- 0, G_MAXINT, DEFAULT_I_FRAMES, (GParamFlags)
+ 0, G_MAXUSHORT, DEFAULT_I_FRAMES, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_B_FRAMES,
g_param_spec_uint ("b-frames", "B Frames",
"Number of B frames between I and P frames",
- 0, G_MAXINT, DEFAULT_B_FRAMES, (GParamFlags)
+ 0, G_MAXUSHORT, DEFAULT_B_FRAMES, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_REF_FRAMES,
g_param_spec_uint ("ref-frames", "Reference Frames",
};
#define DEFAULT_QP 0
-#define DEFAULT_GOP_SIZE 0
+#define DEFAULT_GOP_SIZE 30
#define DEFAULT_I_FRAMES 0
#define DEFAULT_B_FRAMES 0
#define DEFAULT_REF_FRAMES 2
#define DEFAULT_BITRATE 2000
#define DEFAULT_MAX_BITRATE 0
-#define DEFAULT_RATE_CONTROL MFX_RATECONTROL_CBR
+#define DEFAULT_RATE_CONTROL MFX_RATECONTROL_VBR
#define DEFAULT_IQC_QUALITY 0
#define DEFAULT_QVBR_QUALITY 0
#define DEFAULT_DISABLE_HRD_CONFORMANCE FALSE
#endif
g_object_class_install_property (object_class, PROP_MIN_QP_I,
- g_param_spec_uint ("min-qpi", "Min QP I",
- "Minimum allowed QP value for I-frame types (0: no limitations)",
+ g_param_spec_uint ("min-qp-i", "Min QP I",
+ "Minimum allowed QP value for I-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MIN_QP_P,
- g_param_spec_uint ("min-qpp", "Min QP P",
- "Minimum allowed QP value for P-frame types (0: no limitations)",
+ g_param_spec_uint ("min-qp-p", "Min QP P",
+ "Minimum allowed QP value for P-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MIN_QP_B,
- g_param_spec_uint ("min-qpb", "Min QP B",
- "Minimum allowed QP value for B-frame types (0: no limitations)",
+ g_param_spec_uint ("min-qp-b", "Min QP B",
+ "Minimum allowed QP value for B-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MAX_QP_I,
- g_param_spec_uint ("max-qpi", "Max QP I",
- "Maximum allowed QP value for I-frame types (0: no limitations)",
+ g_param_spec_uint ("max-qp-i", "Max QP I",
+ "Maximum allowed QP value for I-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MAX_QP_P,
- g_param_spec_uint ("max-qpp", "Max QP P",
- "Maximum allowed QP value for P-frame types (0: no limitations)",
+ g_param_spec_uint ("max-qp-p", "Max QP P",
+ "Maximum allowed QP value for P-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_MAX_QP_B,
- g_param_spec_uint ("max-qpb", "Max QP B",
- "Maximum allowed QP value for B-frame types (0: no limitations)",
+ g_param_spec_uint ("max-qp-b", "Max QP B",
+ "Maximum allowed QP value for B-frame types (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_QP_I,
- g_param_spec_uint ("qpi", "QP I",
- "Constant quantizer for I frames (0: no limitations)",
+ g_param_spec_uint ("qp-i", "QP I",
+ "Constant quantizer for I frames (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_QP_P,
- g_param_spec_uint ("qpp", "QP P",
- "Constant quantizer for P frames (0: no limitations)",
+ g_param_spec_uint ("qp-p", "QP P",
+ "Constant quantizer for P frames (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_QP_B,
- g_param_spec_uint ("qpb", "QP B",
- "Constant quantizer for B frames (0: no limitations)",
+ g_param_spec_uint ("qp-b", "QP B",
+ "Constant quantizer for B frames (0: default)",
0, 51, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_GOP_SIZE,
g_param_spec_uint ("gop-size", "GOP Size",
"Number of pictures within a GOP (0: unspecified)",
- 0, G_MAXINT, DEFAULT_GOP_SIZE, (GParamFlags)
+ 0, G_MAXUSHORT, DEFAULT_GOP_SIZE, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_I_FRAMES,
g_param_spec_uint ("i-frames", "I Frames",
"Number of I frames between IDR frames"
"(0: every I frame is an IDR frame)",
- 0, G_MAXINT, DEFAULT_I_FRAMES, (GParamFlags)
+ 0, G_MAXUSHORT, DEFAULT_I_FRAMES, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_B_FRAMES,
g_param_spec_uint ("b-frames", "B Frames",
"Number of B frames between I and P frames",
- 0, G_MAXINT, DEFAULT_B_FRAMES, (GParamFlags)
+ 0, G_MAXUSHORT, DEFAULT_B_FRAMES, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_REF_FRAMES,
g_param_spec_uint ("ref-frames", "Reference Frames",
#define DEFAULT_REF_FRAMES 1
#define DEFAULT_BITRATE 2000
#define DEFAULT_MAX_BITRATE 0
-#define DEFAULT_RATE_CONTROL MFX_RATECONTROL_CBR
+#define DEFAULT_RATE_CONTROL MFX_RATECONTROL_VBR
#define DEFAULT_IQC_QUALITY 0
typedef struct _GstQsvVP9EncClassData
#endif
g_object_class_install_property (object_class, PROP_QP_I,
- g_param_spec_uint ("qpi", "QP I",
- "Constant quantizer for I frames (0: no limitations)",
+ g_param_spec_uint ("qp-i", "QP I",
+ "Constant quantizer for I frames (0: default)",
0, 255, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_QP_P,
- g_param_spec_uint ("qpp", "QP P",
- "Constant quantizer for P frames (0: no limitations)",
+ g_param_spec_uint ("qp-p", "QP P",
+ "Constant quantizer for P frames (0: default)",
0, 255, DEFAULT_QP, (GParamFlags)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (object_class, PROP_GOP_SIZE,
case 'I':
if (rc_mode == RC_MODE_CQP && qp_i < max_qp) {
gst_println ("Increase QP-I to %d", ++qp_i);
- g_object_set (data->encoder, "qpi", qp_i, NULL);
+ g_object_set (data->encoder, "qp-i", qp_i, NULL);
}
break;
case 'i':
if (rc_mode == RC_MODE_CQP && qp_i > 0) {
gst_println ("Decrease QP-I to %d", --qp_i);
- g_object_set (data->encoder, "qpi", qp_i, NULL);
+ g_object_set (data->encoder, "qp-i", qp_i, NULL);
}
break;
case 'P':
if (rc_mode == RC_MODE_CQP && qp_p < max_qp) {
gst_println ("Increase QP-P to %d", ++qp_p);
- g_object_set (data->encoder, "qpp", qp_p, NULL);
+ g_object_set (data->encoder, "qp-p", qp_p, NULL);
}
break;
case 'p':
if (rc_mode == RC_MODE_CQP && qp_p > 0) {
gst_println ("Decrease QP-P to %d", --qp_p);
- g_object_set (data->encoder, "qpp", qp_p, NULL);
+ g_object_set (data->encoder, "qp-p", qp_p, NULL);
}
break;
case 'B':
if (rc_mode == RC_MODE_CQP && qp_b < max_qp && codec != CODEC_VP9) {
gst_println ("Increase QP-B to %d", ++qp_b);
- g_object_set (data->encoder, "qpb", qp_b, NULL);
+ g_object_set (data->encoder, "qp-b", qp_b, NULL);
}
break;
case 'b':
if (rc_mode == RC_MODE_CQP && qp_b > 0 && codec != CODEC_VP9) {
gst_println ("Decrease QP-B to %d", --qp_b);
- g_object_set (data->encoder, "qpb", qp_b, NULL);
+ g_object_set (data->encoder, "qp-b", qp_b, NULL);
}
break;
default:
MAKE_ELEMENT_AND_ADD (enc, encoder_name);
g_object_set (enc, "bitrate", bitrate, "max-bitrate", max_bitrate,
- "qpi", qp_i, "qpp", qp_p, "gop-size", 30, NULL);
+ "qp-i", qp_i, "qp-p", qp_p, "gop-size", 30, NULL);
if (codec != CODEC_VP9)
- g_object_set (enc, "qpb", qp_b, NULL);
+ g_object_set (enc, "qp-b", qp_b, NULL);
gst_util_set_object_arg (G_OBJECT (enc), "rate-control", rate_control);