summaryrefslogtreecommitdiffstats
path: root/libhb/enc_qsv.c
diff options
context:
space:
mode:
authorTim Walker <[email protected]>2016-03-29 23:22:26 +0200
committerTim Walker <[email protected]>2016-03-31 01:05:16 +0200
commitf62eab7af77982d8a161d2714d237f3b7bda3cf8 (patch)
tree1388fe4e13257e8b503260b4f9e29b9205c7dd13 /libhb/enc_qsv.c
parent0de684adbc17b445f93ed8e6f52951b44dc12063 (diff)
libhb: fix incorrect assumption that video quality is always positive.
Diffstat (limited to 'libhb/enc_qsv.c')
-rw-r--r--libhb/enc_qsv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c
index 48e4c845e..15d7b6bd5 100644
--- a/libhb/enc_qsv.c
+++ b/libhb/enc_qsv.c
@@ -888,7 +888,7 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
}
else
{
- pv->param.rc.icq = pv->param.rc.icq && job->vquality >= 0;
+ pv->param.rc.icq = pv->param.rc.icq && job->vquality > HB_INVALID_VIDEO_QUALITY;
}
// sanitize lookahead
@@ -907,7 +907,7 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
}
else
{
- pv->param.rc.lookahead = pv->param.rc.lookahead && (pv->param.rc.icq || job->vquality < 0);
+ pv->param.rc.lookahead = pv->param.rc.lookahead && (pv->param.rc.icq || job->vquality <= HB_INVALID_VIDEO_QUALITY);
}
// set VBV here (this will be overridden for CQP and ignored for LA)
@@ -932,7 +932,7 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
}
// set rate control paremeters
- if (job->vquality >= 0)
+ if (job->vquality > HB_INVALID_VIDEO_QUALITY)
{
if (pv->param.rc.icq)
{