Skip to content

Commit

Permalink
Saturate QSV bitrate even for custom parameters
Browse files Browse the repository at this point in the history
Fixes QSV not initializing with very high bitrates when custom
parameters are used
  • Loading branch information
palana committed Sep 27, 2014
1 parent 89b560b commit 7100ba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion QSVHelper/QSVStuff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7100ba8

Please sign in to comment.