Commit 3edac01f authored by Anton Khirnov's avatar Anton Khirnov

qsvenc: fix setting maxrate for VBR

parent 4d8f536b
...@@ -338,7 +338,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) ...@@ -338,7 +338,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
case MFX_RATECONTROL_VBR: case MFX_RATECONTROL_VBR:
q->param.mfx.InitialDelayInKB = avctx->rc_initial_buffer_occupancy / 1000; q->param.mfx.InitialDelayInKB = avctx->rc_initial_buffer_occupancy / 1000;
q->param.mfx.TargetKbps = avctx->bit_rate / 1000; q->param.mfx.TargetKbps = avctx->bit_rate / 1000;
q->param.mfx.MaxKbps = avctx->bit_rate / 1000; q->param.mfx.MaxKbps = avctx->rc_max_rate / 1000;
break; break;
case MFX_RATECONTROL_CQP: case MFX_RATECONTROL_CQP:
quant = avctx->global_quality / FF_QP2LAMBDA; quant = avctx->global_quality / FF_QP2LAMBDA;
......
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