summaryrefslogtreecommitdiffstats
path: root/libhb/qsv_common.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-09-24 23:49:44 +0000
committerRodeo <[email protected]>2013-09-24 23:49:44 +0000
commitd9897313ea70197e7c5fd8c247436839d013e087 (patch)
treee291608453349a959eb3962a269a4d7d1f13847a /libhb/qsv_common.c
parent12cceb5288f4f8179c5d18b3e97ba6eb01a01ffe (diff)
QSV: miscellaneous option-related improvements.
All user-controlled settings except GOP-related ones now have an explicit default value (it's never "unknown"). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5812 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/qsv_common.c')
-rw-r--r--libhb/qsv_common.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c
index 1683264dc..eade262d9 100644
--- a/libhb/qsv_common.c
+++ b/libhb/qsv_common.c
@@ -445,18 +445,22 @@ int hb_qsv_param_parse(hb_qsv_param_t *param,
param->rc.vbv_max_bitrate = HB_QSV_CLIP3(0, UINT16_MAX, ivalue);
}
}
- else if (!strcasecmp(key, "cabac"))
+ else if (!strcasecmp(key, "cavlc") || !strcasecmp(key, "cabac"))
{
switch (vcodec)
{
case HB_VCODEC_QSV_H264:
- ivalue = !hb_qsv_atobool(value, &error);
+ ivalue = hb_qsv_atobool(value, &error);
break;
default:
return HB_QSV_PARAM_UNSUPPORTED;
}
if (!error)
{
+ if (!strcasecmp(key, "cabac"))
+ {
+ ivalue = !ivalue;
+ }
param->codingOption.CAVLC = hb_qsv_codingoption_xlat(ivalue);
}
}
@@ -577,7 +581,7 @@ int hb_qsv_param_parse(hb_qsv_param_t *param,
{
if (hb_qsv_info->capabilities & HB_QSV_CAP_OPTION2_MBBRC)
{
- ivalue = hb_qsv_atoi(value, &error);
+ ivalue = hb_qsv_atobool(value, &error);
if (!error)
{
param->codingOption2.MBBRC = hb_qsv_codingoption_xlat(ivalue);
@@ -592,7 +596,7 @@ int hb_qsv_param_parse(hb_qsv_param_t *param,
{
if (hb_qsv_info->capabilities & HB_QSV_CAP_OPTION2_EXTBRC)
{
- ivalue = hb_qsv_atoi(value, &error);
+ ivalue = hb_qsv_atobool(value, &error);
if (!error)
{
param->codingOption2.ExtBRC = hb_qsv_codingoption_xlat(ivalue);
@@ -785,7 +789,6 @@ int hb_qsv_param_default(hb_qsv_param_t *param, mfxVideoParam *videoParam)
param->codingOption.MVPrecision = 0; // reserved, must be 0
param->codingOption.EndOfSequence = MFX_CODINGOPTION_UNKNOWN;
param->codingOption.RateDistortionOpt = MFX_CODINGOPTION_UNKNOWN;
- param->codingOption.CAVLC = MFX_CODINGOPTION_UNKNOWN;
param->codingOption.ResetRefList = MFX_CODINGOPTION_UNKNOWN;
param->codingOption.MaxDecFrameBuffering = 0; // unspecified
param->codingOption.AUDelimiter = MFX_CODINGOPTION_OFF;
@@ -793,6 +796,7 @@ int hb_qsv_param_default(hb_qsv_param_t *param, mfxVideoParam *videoParam)
param->codingOption.PicTimingSEI = MFX_CODINGOPTION_OFF;
param->codingOption.VuiNalHrdParameters = MFX_CODINGOPTION_UNKNOWN;
param->codingOption.FramePicture = MFX_CODINGOPTION_UNKNOWN;
+ param->codingOption.CAVLC = MFX_CODINGOPTION_OFF;
// introduced in API 1.3
param->codingOption.RefPicMarkRep = MFX_CODINGOPTION_UNKNOWN;
param->codingOption.FieldOutput = MFX_CODINGOPTION_UNKNOWN;