summaryrefslogtreecommitdiffstats
path: root/libhb/enc_qsv.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2015-06-27 22:10:00 +0000
committerRodeo <[email protected]>2015-06-27 22:10:00 +0000
commit1572b921587434e2363cc94502cde97ad6279536 (patch)
treef422b162a2612f8784e0da60e39e67165ef4b899 /libhb/enc_qsv.c
parent28766d686195854538de63620209c04c9533d26f (diff)
QSV: add new capability guards for some extended video parameter buffers.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7326 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/enc_qsv.c')
-rw-r--r--libhb/enc_qsv.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c
index 6e52edb73..27cd378e7 100644
--- a/libhb/enc_qsv.c
+++ b/libhb/enc_qsv.c
@@ -911,14 +911,16 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
memset(option1, 0, sizeof(mfxExtCodingOption));
option1->Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
option1->Header.BufferSz = sizeof(mfxExtCodingOption);
- videoParam.ExtParam[videoParam.NumExtParam++] = (mfxExtBuffer*)option1;
+ if (pv->qsv_info->capabilities & HB_QSV_CAP_OPTION1)
+ {
+ videoParam.ExtParam[videoParam.NumExtParam++] = (mfxExtBuffer*)option1;
+ }
// introduced in API 1.6
memset(option2, 0, sizeof(mfxExtCodingOption2));
option2->Header.BufferId = MFX_EXTBUFF_CODING_OPTION2;
option2->Header.BufferSz = sizeof(mfxExtCodingOption2);
- if (pv->qsv_info->capabilities & HB_QSV_CAP_MSDK_API_1_6)
+ if (pv->qsv_info->capabilities & HB_QSV_CAP_OPTION2)
{
- // attach to get the final output mfxExtCodingOption2 settings
videoParam.ExtParam[videoParam.NumExtParam++] = (mfxExtBuffer*)option2;
}
err = MFXVideoENCODE_GetVideoParam(session, &videoParam);
@@ -1099,10 +1101,16 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
videoParam.mfx.FrameInfo.PicStruct);
return -1;
}
- if (option1->CAVLC != MFX_CODINGOPTION_OFF)
+ if (pv->qsv_info->capabilities & HB_QSV_CAP_OPTION1)
{
- hb_log("encqsvInit: CAVLC %s",
- hb_qsv_codingoption_get_name(option1->CAVLC));
+ if (videoParam.mfx.CodecId == MFX_CODEC_AVC)
+ {
+ if (option1->CAVLC != MFX_CODINGOPTION_OFF)
+ {
+ hb_log("encqsvInit: CAVLC %s",
+ hb_qsv_codingoption_get_name(option1->CAVLC));
+ }
+ }
}
if (pv->qsv_info->capabilities & HB_QSV_CAP_OPTION2_EXTBRC)
{