Commit 6ff29343 authored by Li, Zhong's avatar Li, Zhong Committed by Maxym Dmytrychenko

lavc/qsvenc: set HRD buffer size

Hypothetical Reference Decoding (HRD) model assumes that data flows
into a buffer of the fixed size BufferSizeInKB with a constant bitrate.
Smaller BufferSizeInKB means smaller frame size variations,
but more difficult to maintain HRD.
Signed-off-by: 's avatarZhong Li <zhong.li@intel.com>
Signed-off-by: 's avatarMaxym Dmytrychenko <maxim.d33@gmail.com>
parent 18a0f420
......@@ -503,6 +503,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
#if QSV_HAVE_VCM
case MFX_RATECONTROL_VCM:
#endif
q->param.mfx.BufferSizeInKB = avctx->rc_buffer_size / 8000;
q->param.mfx.InitialDelayInKB = avctx->rc_initial_buffer_occupancy / 1000;
q->param.mfx.TargetKbps = avctx->bit_rate / 1000;
q->param.mfx.MaxKbps = avctx->rc_max_rate / 1000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment