libs: encoder: h264,h265: extend max periodic keyframe.

Increased max values of periodic key frame for h26x codecs.
This allow more fine tunning of encoder that in certian scenario
want higher periodic key frame.

For example: it doesn't want a key frame each 10 seconds but
each 120 seconds.

https://bugzilla.gnome.org/show_bug.cgi?id=786320
This commit is contained in:
Matteo Valdina 2018-02-15 14:55:42 -06:00 committed by Víctor Manuel Jáquez Leal
parent a9b61f22f9
commit 83886ced66
7 changed files with 1 additions and 21 deletions

View file

@ -164,7 +164,7 @@ gst_vaapi_encoder_properties_get_default (const GstVaapiEncoderClass * klass)
GST_VAAPI_ENCODER_PROP_KEYFRAME_PERIOD,
g_param_spec_uint ("keyframe-period",
"Keyframe Period",
"Maximal distance between two keyframes (0: auto-calculate)", 1, 300,
"Maximal distance between two keyframes (0: auto-calculate)", 1, G_MAXUINT32,
30, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**

View file

@ -2761,8 +2761,6 @@ reset_properties (GstVaapiEncoderH264 * encoder)
if (encoder->idr_period < base_encoder->keyframe_period)
encoder->idr_period = base_encoder->keyframe_period;
if (encoder->idr_period > MAX_IDR_PERIOD)
encoder->idr_period = MAX_IDR_PERIOD;
if (encoder->min_qp > encoder->init_qp)
encoder->min_qp = encoder->init_qp;

View file

@ -58,9 +58,6 @@ gst_vaapi_encoder_h264_fei_ensure_secondary_context (GstVaapiEncoder *
/* Define the maximum value for view-id */
#define MAX_VIEW_ID 1023
/* Define the maximum IDR period */
#define MAX_IDR_PERIOD 512
/* Default CPB length (in milliseconds) */
#define DEFAULT_CPB_LENGTH 1500
@ -2650,8 +2647,6 @@ reset_properties (GstVaapiEncoderH264Fei * encoder)
if (encoder->idr_period < base_encoder->keyframe_period)
encoder->idr_period = base_encoder->keyframe_period;
if (encoder->idr_period > MAX_IDR_PERIOD)
encoder->idr_period = MAX_IDR_PERIOD;
if (encoder->min_qp > encoder->init_qp ||
(GST_VAAPI_ENCODER_RATE_CONTROL (encoder) == GST_VAAPI_RATECONTROL_CQP &&

View file

@ -2024,8 +2024,6 @@ reset_properties (GstVaapiEncoderH265 * encoder)
if (encoder->idr_period < base_encoder->keyframe_period)
encoder->idr_period = base_encoder->keyframe_period;
if (encoder->idr_period > MAX_IDR_PERIOD)
encoder->idr_period = MAX_IDR_PERIOD;
if (encoder->min_qp > encoder->init_qp)
encoder->min_qp = encoder->init_qp;

View file

@ -49,9 +49,6 @@
/* Define the maximum value for view-id */
#define MAX_VIEW_ID 1023
/* Define the maximum IDR period */
#define MAX_IDR_PERIOD 512
/* Default CPB length (in milliseconds) */
#define DEFAULT_CPB_LENGTH 1500
@ -1303,8 +1300,6 @@ reset_properties (GstVaapiFeiEncH264 * feienc)
if (feienc->idr_period < base_encoder->keyframe_period)
feienc->idr_period = base_encoder->keyframe_period;
if (feienc->idr_period > MAX_IDR_PERIOD)
feienc->idr_period = MAX_IDR_PERIOD;
if (feienc->min_qp > feienc->init_qp ||
(GST_VAAPI_ENCODER_RATE_CONTROL (feienc) == GST_VAAPI_RATECONTROL_CQP &&

View file

@ -46,9 +46,6 @@
/* Define the maximum value for view-id */
#define MAX_VIEW_ID 1023
/* Define the maximum IDR period */
#define MAX_IDR_PERIOD 512
/* Default CPB length (in milliseconds) */
#define DEFAULT_CPB_LENGTH 1500

View file

@ -29,9 +29,6 @@
G_BEGIN_DECLS
/* Define the maximum IDR period */
#define MAX_IDR_PERIOD 512
/* Default CPB length (in milliseconds) */
#define DEFAULT_CPB_LENGTH 1500