diff options
author | Rodeo <[email protected]> | 2013-09-05 20:30:07 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-09-05 20:30:07 +0000 |
commit | d8729498fb53e8fe761c1c47af2415ffd847bd3a (patch) | |
tree | 9ed13843033a3adcb36a792de3d01a074073c762 /libhb/qsv_common.c | |
parent | 7fad76dfdaa73ff0e178e00d34643370b88f5136 (diff) |
QSV: add an option to control B-pyramid.
Since there is no way to control it directly, output settings need to be adjusted a bit.
Disabled by default for improved compatibility.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5768 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/qsv_common.c')
-rw-r--r-- | libhb/qsv_common.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c index 210a91388..949176f0a 100644 --- a/libhb/qsv_common.c +++ b/libhb/qsv_common.c @@ -368,6 +368,28 @@ int hb_qsv_param_parse(hb_qsv_param_t *param, param->gop.gop_pic_size = HB_QSV_CLIP3(-1, UINT16_MAX, ivalue); } } + else if (!strcasecmp(key, "b-pyramid")) + { + if (hb_qsv_info->capabilities & HB_QSV_CAP_H264_BPYRAMID) + { + switch (vcodec) + { + case HB_VCODEC_QSV_H264: + ivalue = hb_qsv_atobool(value, &error); + break; + default: + return HB_QSV_PARAM_UNSUPPORTED; + } + if (!error) + { + param->gop.b_pyramid = ivalue; + } + } + else + { + return HB_QSV_PARAM_UNSUPPORTED; + } + } else if (!strcasecmp(key, "scenecut")) { ivalue = hb_qsv_atobool(value, &error); @@ -752,6 +774,7 @@ int hb_qsv_param_default(hb_qsv_param_t *param, mfxVideoParam *videoParam) param->codingOption2.Trellis = MFX_TRELLIS_UNKNOWN; // GOP & rate control + param->gop.b_pyramid = 0; param->gop.gop_pic_size = -1; // set automatically param->gop.int_ref_cycle_size = -1; // set automatically param->rc.lookahead = -1; // set automatically @@ -776,7 +799,7 @@ int hb_qsv_param_default(hb_qsv_param_t *param, mfxVideoParam *videoParam) param->videoParam->mfx.NumSlice = 0; // use Media SDK default param->videoParam->mfx.NumRefFrame = 0; // use Media SDK default param->videoParam->mfx.GopPicSize = 0; // use Media SDK default - param->videoParam->mfx.GopRefDist = 4; // power of 2, >= 4: B-pyramid + param->videoParam->mfx.GopRefDist = 0; // use Media SDK default // introduced in API 1.1 param->videoParam->AsyncDepth = AV_QSV_ASYNC_DEPTH_DEFAULT; // introduced in API 1.3 |