[FFmpeg-cvslog] lavf/deinterlace_qsv: set specific field for repeat

Linjie Fu git at videolan.org
Fri Mar 8 16:28:06 EET 2019


ffmpeg | branch: master | Linjie Fu <linjie.fu at intel.com> | Fri Mar  8 23:34:01 2019 +0800| [147ef1d9472ea39f837224bc8a2fbe07a9f04ae3] | committer: Zhong Li

lavf/deinterlace_qsv: set specific field for repeat

Set specific field for repeat in PicStruct if the frame has repeat
flag.

Match the CheckInputPicStruct in MSDK.

Fix #7701.

Signed-off-by: Linjie Fu <linjie.fu at intel.com>
Signed-off-by: Zhong Li <zhong.li at intel.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=147ef1d9472ea39f837224bc8a2fbe07a9f04ae3
---

 libavfilter/vf_deinterlace_qsv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_deinterlace_qsv.c b/libavfilter/vf_deinterlace_qsv.c
index d6b02e98c5..bee10c220f 100644
--- a/libavfilter/vf_deinterlace_qsv.c
+++ b/libavfilter/vf_deinterlace_qsv.c
@@ -419,9 +419,11 @@ static int submit_frame(AVFilterContext *ctx, AVFrame *frame,
     qf->surface.Info.PicStruct = !qf->frame->interlaced_frame ? MFX_PICSTRUCT_PROGRESSIVE :
                                  (qf->frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF :
                                                            MFX_PICSTRUCT_FIELD_BFF);
-    if (qf->frame->repeat_pict == 1)
+    if (qf->frame->repeat_pict == 1) {
         qf->surface.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED;
-    else if (qf->frame->repeat_pict == 2)
+        qf->surface.Info.PicStruct |= qf->frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF :
+                                                            MFX_PICSTRUCT_FIELD_BFF;
+    } else if (qf->frame->repeat_pict == 2)
         qf->surface.Info.PicStruct |= MFX_PICSTRUCT_FRAME_DOUBLING;
     else if (qf->frame->repeat_pict == 4)
         qf->surface.Info.PicStruct |= MFX_PICSTRUCT_FRAME_TRIPLING;



More information about the ffmpeg-cvslog mailing list