[FFmpeg-devel] [PATCH, v2] lavf/deinterlace_qsv: set specific field for repeat

Li, Zhong zhong.li at intel.com
Fri Mar 8 09:46:45 EET 2019


> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Linjie Fu
> Sent: Friday, March 8, 2019 11:34 PM
> To: ffmpeg-devel at ffmpeg.org
> Cc: Fu, Linjie <linjie.fu at intel.com>
> Subject: [FFmpeg-devel] [PATCH, v2] 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>
> ---
>  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;
> --
> 2.17.1

LGTM, will apply. 


More information about the ffmpeg-devel mailing list