summaryrefslogtreecommitdiffstats
path: root/libhb/enc_qsv.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-12-05 13:52:54 +0000
committerRodeo <[email protected]>2013-12-05 13:52:54 +0000
commitfa4abd915a82e1c301911b30aa9919d43eec9c2c (patch)
treef3ec29d0b042427c6deb70add68a24a6ae4c04e5 /libhb/enc_qsv.c
parent037efe2d010f7983cb83879850e276af38d57a80 (diff)
QSV: update libhb presets to match a more recent recommendation.
Based on a patch by Maxym Dmytrychenko. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5913 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/enc_qsv.c')
-rw-r--r--libhb/enc_qsv.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c
index 9ddfeb5a8..8236e0049 100644
--- a/libhb/enc_qsv.c
+++ b/libhb/enc_qsv.c
@@ -666,6 +666,34 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
return -1;
}
+ // set B-pyramid
+ if (pv->param.gop.b_pyramid < 0)
+ {
+ if (pv->param.videoParam->mfx.RateControlMethod == MFX_RATECONTROL_CQP)
+ {
+ pv->param.gop.b_pyramid = 1;
+ }
+ else
+ {
+ pv->param.gop.b_pyramid = 0;
+ }
+ }
+ pv->param.gop.b_pyramid = !!pv->param.gop.b_pyramid;
+
+ // set the GOP structure
+ if (pv->param.gop.gop_ref_dist < 0)
+ {
+ if (pv->param.videoParam->mfx.RateControlMethod == MFX_RATECONTROL_CQP)
+ {
+ pv->param.gop.gop_ref_dist = 4;
+ }
+ else
+ {
+ pv->param.gop.gop_ref_dist = 3;
+ }
+ }
+ pv->param.videoParam->mfx.GopRefDist = pv->param.gop.gop_ref_dist;
+
// set the keyframe interval
if (pv->param.gop.gop_pic_size < 0)
{
@@ -678,7 +706,7 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
else
{
// set the keyframe interval based on the framerate
- pv->param.gop.gop_pic_size = 5 * rate + 1;
+ pv->param.gop.gop_pic_size = rate;
}
}
pv->param.videoParam->mfx.GopPicSize = pv->param.gop.gop_pic_size;