From 2a7feb18c47d9bcc35b0f7d5c144c92a3933c1a2 Mon Sep 17 00:00:00 2001 From: Andrea Gualano Date: Thu, 11 Oct 2007 22:31:08 +0000 Subject: [PATCH] Enable avpicture_deinterlace() for PIX_FMT_GRAY8. Patch by Andrea Gualano, gualano T imavis O com Originally committed as revision 10712 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/imgconvert.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index c64d56b729..f03203cec0 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -2824,7 +2824,8 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, if (pix_fmt != PIX_FMT_YUV420P && pix_fmt != PIX_FMT_YUV422P && pix_fmt != PIX_FMT_YUV444P && - pix_fmt != PIX_FMT_YUV411P) + pix_fmt != PIX_FMT_YUV411P && + pix_fmt != PIX_FMT_GRAY8) return -1; if ((width & 3) != 0 || (height & 3) != 0) return -1; @@ -2845,6 +2846,9 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, default: break; } + if (pix_fmt == PIX_FMT_GRAY8) { + break; + } } if (src == dst) { deinterlace_bottom_field_inplace(dst->data[i], dst->linesize[i],