Saturate QSV bitrate even for custom parameters

Fixes QSV not initializing with very high bitrates when custom
parameters are used
master
palana 2014-09-27 19:26:45 +02:00
parent 89b560b82d
commit 7100ba89fa
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ void Parameters::Init(mfxU16 target_usage, mfxU16 profile, int fps, int keyframe
params.mfx.NumSlice = 1;
params.mfx.CodecProfile = profile;
params.mfx.TargetKbps = use_custom_params ? custom_params.TargetKbps : saturate<mfxU16>(max_bitrate);
params.mfx.TargetKbps = saturate<mfxU16>(use_custom_params ? custom_params.TargetKbps : max_bitrate);
params.mfx.BufferSizeInKB = use_custom_params ? custom_params.BufferSizeInKB : buffer_size / 8;
params.mfx.RateControlMethod = use_custom_params ? custom_params.RateControlMethod : use_cbr ? MFX_RATECONTROL_CBR : MFX_RATECONTROL_VBR;