summaryrefslogtreecommitdiff
path: root/libavcodec/qsv.c
diff options
context:
space:
mode:
authorZhong Li <zhong.li@intel.com>2018-01-25 18:19:12 +0800
committerLuca Barbato <lu_zero@gentoo.org>2018-01-26 10:00:17 +0100
commit6829a079444e10818a847e153121fb458cc5c0a8 (patch)
treee50c90e798c2809e10fb28886b84787ee5882c53 /libavcodec/qsv.c
parent559370f2c45110afd8308eec7194437736c323d4 (diff)
downloadffmpeg-6829a079444e10818a847e153121fb458cc5c0a8.tar.gz
qsvdec: Relax the surface vs coded dimension check
Fix a common vp8 decoding failure. Many vp8 clips cannot decode if hw_frames_ctx is enabled, reporting "Error during QSV decoding.: incompatible video parameters (-14)". It is due to mfx.FrameInfo.Width/Height not matching coded_w/coded_h. See: avconv -hwaccel qsv -init_hw_device qsv -c:v vp8_qsv -i vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf -vf "hwdownload,format=nv12" -pix_fmt yuv420p -f md5 - Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/qsv.c')
-rw-r--r--libavcodec/qsv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 96dca14e9a..e78633d62a 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -389,7 +389,7 @@ static mfxStatus qsv_frame_alloc(mfxHDL pthis, mfxFrameAllocRequest *req,
mfxFrameInfo *i = &req->Info;
mfxFrameInfo *i1 = &frames_hwctx->surfaces[0].Info;
- if (i->Width != i1->Width || i->Height != i1->Height ||
+ if (i->Width > i1->Width || i->Height > i1->Height ||
i->FourCC != i1->FourCC || i->ChromaFormat != i1->ChromaFormat) {
av_log(ctx->logctx, AV_LOG_ERROR, "Mismatching surface properties in an "
"allocation request: %dx%d %d %d vs %dx%d %d %d\n",