diff options
author | James Almer <jamrial@gmail.com> | 2023-04-11 15:02:14 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-05-04 18:14:02 -0300 |
commit | 2f561ba953e23887ddb25ab1b6739aab04ff9115 (patch) | |
tree | dff824910ba954804d593dbf1aee0978dd5b612e /libavcodec/qsvenc.c | |
parent | 2df4e054d4b8f69ce3c2c06aace9df9ba6d2ac2e (diff) | |
download | ffmpeg-2f561ba953e23887ddb25ab1b6739aab04ff9115.tar.gz |
avcodec: use the new AVFrame interlace flags in all decoders and encoders
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/qsvenc.c')
-rw-r--r-- | libavcodec/qsvenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index c975302b4f..0ed1f757d4 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1947,8 +1947,8 @@ static int submit_frame(QSVEncContext *q, const AVFrame *frame, qf->surface.Info = q->param.mfx.FrameInfo; qf->surface.Info.PicStruct = - !frame->interlaced_frame ? MFX_PICSTRUCT_PROGRESSIVE : - frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF : + !(frame->flags & AV_FRAME_FLAG_INTERLACED) ? MFX_PICSTRUCT_PROGRESSIVE : + (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? MFX_PICSTRUCT_FIELD_TFF : MFX_PICSTRUCT_FIELD_BFF; if (frame->repeat_pict == 1) qf->surface.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED; @@ -2402,7 +2402,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q, goto free; } - if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && frame->interlaced_frame) + if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && (frame->flags & AV_FRAME_FLAG_INTERLACED)) print_interlace_msg(avctx, q); ret = 0; |