Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-10-26 23:27:49 +0300
committerMark Thompson <sw@jkqxz.net>2016-11-14 22:38:19 +0300
commit030d84fa2e35af0e77516735de35bf1a52371c86 (patch)
treefb36efbe8a5c05841be2f2c66d1357bbbc259844 /libavcodec/qsvdec.c
parentcd1047f3911fa0d34c86f470537f343d23c8b956 (diff)
qsvdec: Pass field order information to libmfx
The VC-1 decoder fails to initialise if this is not set.
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r--libavcodec/qsvdec.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 9b5dc1df81..d61ec7d0aa 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -155,6 +155,21 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q)
param.mfx.FrameInfo.Height = frame_height;
param.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
+ switch (avctx->field_order) {
+ case AV_FIELD_PROGRESSIVE:
+ param.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;
+ break;
+ case AV_FIELD_TT:
+ param.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_FIELD_TFF;
+ break;
+ case AV_FIELD_BB:
+ param.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_FIELD_BFF;
+ break;
+ default:
+ param.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_UNKNOWN;
+ break;
+ }
+
param.IOPattern = q->iopattern;
param.AsyncDepth = q->async_depth;
param.ExtParam = q->ext_buffers;
@@ -485,6 +500,7 @@ int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q,
avctx->height = q->parser->height;
avctx->coded_width = q->parser->coded_width;
avctx->coded_height = q->parser->coded_height;
+ avctx->field_order = q->parser->field_order;
avctx->level = q->avctx_internal->level;
avctx->profile = q->avctx_internal->profile;