diff options
author | Rodeo <[email protected]> | 2014-03-04 00:11:00 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2014-03-04 00:11:00 +0000 |
commit | a50faa6dcb89f6a2a9b2f07d38aced702e973b00 (patch) | |
tree | 6cd82e44c65c6129d4725baf9903632bd453c054 | |
parent | 5ade22957f09e273e1bae383b2967fb65c9419b1 (diff) |
QSV: alternate workaround for B-pyramid + keyframe insertion issue.
The original workaround (SVN 6016) got rid of the invalid timestamps,
but did nothing to prevent visual artifacts. Since it doesn't look
like I'll be fixing the underlying cause right away, this will avoid
broken output for our users in the meantime.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6098 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/enc_qsv.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c index c3129b749..86f786bdb 100644 --- a/libhb/enc_qsv.c +++ b/libhb/enc_qsv.c @@ -794,6 +794,16 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job) { gop_ref_dist *= 2; } + /* + * XXX: B-pyramid + forced keyframes will cause visual artifacts, + * force-disable B-pyramid until we insert keyframes properly + */ + if (pv->param.gop.b_pyramid && job->chapter_markers) + { + pv->param.gop.b_pyramid = 0; + hb_log("encqsvInit: chapter markers enabled, disabling B-pyramid " + "to work around a bug in our keyframe insertion code"); + } if ((pv->param.gop.b_pyramid) && (pv->param.videoParam->mfx.GopPicSize == 0 || pv->param.videoParam->mfx.GopPicSize > gop_ref_dist)) @@ -1556,16 +1566,6 @@ int encqsvWork( hb_work_object_t * w, hb_buffer_t ** buf_in, ((task->bs->TimeStamp - task->bs->DecodeTimeStamp + (duration / 2)) / duration)); - - // When forcing an IDR for a chapter right after another IDR - // selected by MSDK, we may end up with one more consecutive - // B-reference frame than the original delay accounts for; - // work around it by incrementing the delay in this case - if (pv->bfrm_workaround && job->chapter_markers && - pv->bfrm_delay > 1) - { - pv->bfrm_delay++; - } } if (!pv->bfrm_workaround) |