mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
libs: encoder: vp8: fix bitrate calculation
Base encoder's unit of bitrate is in Kbps. We should honor it so we use the value of bitrate in VA, in which is expressed in bps. https://bugzilla.gnome.org/show_bug.cgi?id=749950
This commit is contained in:
parent
025d5ce33e
commit
ffc5b43da7
1 changed files with 3 additions and 2 deletions
|
@ -129,8 +129,9 @@ ensure_bitrate (GstVaapiEncoderVP8 * encoder)
|
|||
gst_util_uint64_scale (GST_VAAPI_ENCODER_WIDTH (encoder) *
|
||||
GST_VAAPI_ENCODER_HEIGHT (encoder),
|
||||
GST_VAAPI_ENCODER_FPS_N (encoder),
|
||||
GST_VAAPI_ENCODER_FPS_D (encoder)) / 4 * 1000;
|
||||
GST_VAAPI_ENCODER_FPS_D (encoder)) / (4 * 1000);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
base_encoder->bitrate = 0;
|
||||
break;
|
||||
|
@ -219,7 +220,7 @@ fill_sequence (GstVaapiEncoderVP8 * encoder, GstVaapiEncSequence * sequence)
|
|||
seq_param->frame_height = GST_VAAPI_ENCODER_HEIGHT (encoder);
|
||||
|
||||
if (GST_VAAPI_ENCODER_RATE_CONTROL (encoder) & GST_VAAPI_RATECONTROL_CBR)
|
||||
seq_param->bits_per_second = base_encoder->bitrate;
|
||||
seq_param->bits_per_second = base_encoder->bitrate * 1000;
|
||||
|
||||
seq_param->intra_period = base_encoder->keyframe_period;
|
||||
|
||||
|
|
Loading…
Reference in a new issue