summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-09-24 22:48:03 +0000
committerRodeo <[email protected]>2013-09-24 22:48:03 +0000
commit36f9e230ba352b4f7fc50e75ed8a2b0789af04e5 (patch)
tree62bc8fa3ad0d102fa9e946f908df173738ad3d9d /libhb
parent18ca6fd97fff57a39f7cf4235e92915113bc49aa (diff)
QSV: ExtBRC/MBBRC and lookahead are mutually exclusive, plus miscelleanous stuff found in testing.
Thanks to gmb for pointing it out, and Nina Kurina for pointing out the ExtBRC/AsyncDepth issue. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5808 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/enc_qsv.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c
index 337befeca..ae3e9bf90 100644
--- a/libhb/enc_qsv.c
+++ b/libhb/enc_qsv.c
@@ -619,6 +619,14 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
{
hb_log("encqsvInit: MFX_RATECONTROL_LA, ignoring VBV");
}
+ /*
+ * When LA is used, ExtBRC, MBBRC and RateDistortionOpt are ignored.
+ * But some drivers ignore them too late and change other settings
+ * (such as AsyncDepth) based on their values. So disable them here.
+ */
+ pv->param.codingOption2.ExtBRC = MFX_CODINGOPTION_OFF;
+ pv->param.codingOption2.MBBRC = MFX_CODINGOPTION_OFF;
+ pv->param.codingOption.RateDistortionOpt = MFX_CODINGOPTION_OFF;
}
else
{
@@ -958,18 +966,23 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
videoParam.mfx.FrameInfo.PicStruct);
return -1;
}
- hb_log("encqsvInit: CAVLC %s RateDistortionOpt %s",
- hb_qsv_codingoption_get_name(option1->CAVLC),
- hb_qsv_codingoption_get_name(option1->RateDistortionOpt));
- if (hb_qsv_info->capabilities & HB_QSV_CAP_OPTION2_EXTBRC)
- {
- hb_log("encqsvInit: ExtBRC %s",
- hb_qsv_codingoption_get_name(option2->ExtBRC));
- }
- if (hb_qsv_info->capabilities & HB_QSV_CAP_OPTION2_MBBRC)
+ hb_log("encqsvInit: CAVLC %s",
+ hb_qsv_codingoption_get_name(option1->CAVLC));
+ if (videoParam.mfx.RateControlMethod != MFX_RATECONTROL_LA)
{
- hb_log("encqsvInit: MBBRC %s",
- hb_qsv_codingoption_get_name(option2->MBBRC));
+ // LA and ExtBRC, MBBRC, RateDistortionOpt are mutually exclusive
+ if (hb_qsv_info->capabilities & HB_QSV_CAP_OPTION2_EXTBRC)
+ {
+ hb_log("encqsvInit: ExtBRC %s",
+ hb_qsv_codingoption_get_name(option2->ExtBRC));
+ }
+ if (hb_qsv_info->capabilities & HB_QSV_CAP_OPTION2_MBBRC)
+ {
+ hb_log("encqsvInit: MBBRC %s",
+ hb_qsv_codingoption_get_name(option2->MBBRC));
+ }
+ hb_log("encqsvInit: RateDistortionOpt %s",
+ hb_qsv_codingoption_get_name(option1->RateDistortionOpt));
}
if (hb_qsv_info->capabilities & HB_QSV_CAP_OPTION2_TRELLIS)
{