]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Enable avpicture_deinterlace() for PIX_FMT_GRAY8.
authorcehoyos <cehoyos@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 11 Oct 2007 22:31:08 +0000 (22:31 +0000)
committercehoyos <cehoyos@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 11 Oct 2007 22:31:08 +0000 (22:31 +0000)
Patch by Andrea Gualano, gualano T imavis O com

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10712 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/imgconvert.c

index c64d56b7296f0e8b1f490429ef6990315cab8e20..f03203cec014f5d709c04db2bfa4ea97a5148cb0 100644 (file)
@@ -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],