summaryrefslogtreecommitdiffstats
path: root/libhb/enc_qsv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhb/enc_qsv.c')
-rw-r--r--libhb/enc_qsv.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c
index a545c8960..e036c8115 100644
--- a/libhb/enc_qsv.c
+++ b/libhb/enc_qsv.c
@@ -77,7 +77,6 @@ struct hb_work_private_s
av_qsv_space enc_space;
hb_qsv_info_t *qsv_info;
- mfxEncodeCtrl force_keyframe;
hb_list_t *delayed_chapters;
int64_t next_chapter_pts;
@@ -406,14 +405,6 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
pv->encoded_frames = hb_list_init();
pv->last_start = INT64_MIN;
- // set up a re-usable mfxEncodeCtrl to force keyframes (e.g. for chapters)
- pv->force_keyframe.QP = 0;
- pv->force_keyframe.FrameType = MFX_FRAMETYPE_I|MFX_FRAMETYPE_IDR|MFX_FRAMETYPE_REF;
- pv->force_keyframe.NumExtParam = 0;
- pv->force_keyframe.NumPayload = 0;
- pv->force_keyframe.ExtParam = NULL;
- pv->force_keyframe.Payload = NULL;
-
pv->next_chapter_pts = AV_NOPTS_VALUE;
pv->delayed_chapters = hb_list_init();
@@ -1565,8 +1556,9 @@ fail:
*pv->job->die = 1;
}
-static int qsv_enc_work(hb_work_private_t *pv, av_qsv_list *qsv_atom,
- mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface)
+static int qsv_enc_work(hb_work_private_t *pv,
+ av_qsv_list *qsv_atom,
+ mfxFrameSurface1 *surface)
{
mfxStatus sts;
av_qsv_context *qsv_ctx = pv->job->qsv.ctx;
@@ -1586,7 +1578,7 @@ static int qsv_enc_work(hb_work_private_t *pv, av_qsv_list *qsv_atom,
do
{
sts = MFXVideoENCODE_EncodeFrameAsync(qsv_ctx->mfx_session,
- ctrl, surface, task->bs,
+ NULL, surface, task->bs,
qsv_enc_space->p_syncp[sync_idx]->p_sync);
if (sts == MFX_ERR_MORE_DATA || (sts >= MFX_ERR_NONE &&
@@ -1741,14 +1733,13 @@ int encqsvWork(hb_work_object_t *w, hb_buffer_t **buf_in, hb_buffer_t **buf_out)
*/
if (in->size <= 0)
{
- qsv_enc_work(pv, NULL, NULL, NULL);
+ qsv_enc_work(pv, NULL, NULL);
hb_list_add(pv->encoded_frames, in);
*buf_out = link_buffer_list(pv->encoded_frames);
*buf_in = NULL; // don't let 'work_loop' close this buffer
return HB_WORK_DONE;
}
- mfxEncodeCtrl *ctrl = NULL;
mfxFrameSurface1 *surface = NULL;
av_qsv_list *qsv_atom = NULL;
av_qsv_context *qsv_ctx = job->qsv.ctx;
@@ -1823,7 +1814,7 @@ int encqsvWork(hb_work_object_t *w, hb_buffer_t **buf_in, hb_buffer_t **buf_out)
{
mfxStatus sts;
- if (encode_loop(pv, NULL, NULL) < 0)
+ if (qsv_enc_work(pv, NULL, NULL) < 0)
{
goto fail;
}
@@ -1861,7 +1852,7 @@ int encqsvWork(hb_work_object_t *w, hb_buffer_t **buf_in, hb_buffer_t **buf_out)
/*
* Now that the input surface is setup, we can encode it.
*/
- if (qsv_enc_work(pv, qsv_atom, ctrl, surface) < 0)
+ if (qsv_enc_work(pv, qsv_atom, surface) < 0)
{
goto fail;
}