mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
libs: encoder: h264,h265,mpeg2: add framerate parameter
https://bugzilla.gnome.org/show_bug.cgi?id=783449
This commit is contained in:
parent
846c276e26
commit
d733714ef8
3 changed files with 20 additions and 0 deletions
|
@ -2171,6 +2171,12 @@ ensure_control_rate_params (GstVaapiEncoderH264 * encoder)
|
|||
|
||||
/* HRD params */
|
||||
fill_hrd_params (encoder, &GST_VAAPI_ENCODER_VA_HRD (encoder));
|
||||
|
||||
/* FrameRate params */
|
||||
GST_VAAPI_ENCODER_VA_FRAME_RATE (encoder) = (VAEncMiscParameterFrameRate) {
|
||||
.framerate = (guint) GST_VAAPI_ENCODER_FPS_D (encoder) << 16 |
|
||||
GST_VAAPI_ENCODER_FPS_N (encoder),
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -1771,9 +1771,17 @@ ensure_control_rate_params (GstVaapiEncoderH265 * encoder)
|
|||
if (GST_VAAPI_ENCODER_RATE_CONTROL (encoder) == GST_VAAPI_RATECONTROL_CQP)
|
||||
return TRUE;
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
/* HRD params */
|
||||
fill_hrd_params (encoder, &GST_VAAPI_ENCODER_VA_HRD (encoder));
|
||||
|
||||
/* FrameRate params */
|
||||
GST_VAAPI_ENCODER_VA_FRAME_RATE (encoder) = (VAEncMiscParameterFrameRate) {
|
||||
.framerate = (guint) GST_VAAPI_ENCODER_FPS_D (encoder) << 16 |
|
||||
GST_VAAPI_ENCODER_FPS_N (encoder),
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -473,6 +473,12 @@ ensure_control_rate_params (GstVaapiEncoderMpeg2 * encoder)
|
|||
.buffer_size = base_encoder->bitrate * 1000 * 8,
|
||||
.initial_buffer_fullness = base_encoder->bitrate * 1000 * 4,
|
||||
};
|
||||
|
||||
/* FrameRate params */
|
||||
GST_VAAPI_ENCODER_VA_FRAME_RATE (encoder) = (VAEncMiscParameterFrameRate) {
|
||||
.framerate = (guint) GST_VAAPI_ENCODER_FPS_D (encoder) << 16 |
|
||||
GST_VAAPI_ENCODER_FPS_N (encoder),
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue