[FFmpeg-devel] [PATCH] fix vdpau vc1 field interlace mode

Hendrik Leppkes h.leppkes at gmail.com
Fri May 3 21:42:44 CEST 2013


On Thu, May 2, 2013 at 8:42 PM, Rainer Hochecker <fernetmenta at online.de>wrote:

> ---
>  libavcodec/vdpau_vc1.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/vdpau_vc1.c b/libavcodec/vdpau_vc1.c
> index f5da9bb..c3d2f65 100644
> --- a/libavcodec/vdpau_vc1.c
> +++ b/libavcodec/vdpau_vc1.c
> @@ -59,7 +59,12 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx,
>      else
>          info->picture_type  = s->pict_type - 1 + s->pict_type / 3;
>
> -    info->frame_coding_mode = v->fcm;
> +    if (v->fcm == PROGRESSIVE)
> +        info->frame_coding_mode = 0;
> +    else if (v->fcm == ILACE_FRAME)
> +        info->frame_coding_mode = 2;
> +    else if (v->fcm == ILACE_FIELD)
> +       info->frame_coding_mode = 3;
>      info->postprocflag      = v->postprocflag;
>      info->pulldown          = v->broadcast;
>      info->interlace         = v->interlace;
>
>
info->frame_coding_mode = v->fcm ? v->fcm + 1 : 0

?
Seems cleaner and easier to read to me.


More information about the ffmpeg-devel mailing list