From 26333dbfec8f826805b33f169c43af5295f27ef2 Mon Sep 17 00:00:00 2001 From: benoit Date: Wed, 18 Jul 2007 08:12:40 +0000 Subject: [PATCH] =?UTF-8?q?use=20YUV440P=20in=20swscale=20patch=20by=20And?= =?UTF-8?q?reas=20=C3=96man:=20\andreas=20olebyn=20nu/=20original=20thread?= =?UTF-8?q?:=20[FFmpeg-devel]=20half=20vertical=20chroma=20resolution=20fr?= =?UTF-8?q?om=20JPEGs..=20date:=2007/03/2007=2001:29=20PM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23811 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 10 ++++++++++ libswscale/swscale_internal.h | 1 + 2 files changed, 11 insertions(+) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 349822ab0f..7c2e0254c1 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -124,6 +124,7 @@ untested special converters || (x)==PIX_FMT_RGB8 \ || (x)==PIX_FMT_BGR4_BYTE \ || (x)==PIX_FMT_RGB4_BYTE \ + || (x)==PIX_FMT_YUV440P \ ) #define isSupportedOut(x) ( \ (x)==PIX_FMT_YUV420P \ @@ -351,6 +352,8 @@ char *sws_format_name(enum PixelFormat format) return "nv12"; case PIX_FMT_NV21: return "nv21"; + case PIX_FMT_YUV440P: + return "yuv440p"; default: return "Unknown format"; } @@ -1882,6 +1885,10 @@ static void getSubSampleFactors(int *h, int *v, int format){ *h=1; *v=1; break; + case PIX_FMT_YUV440P: + *h=0; + *v=1; + break; case PIX_FMT_YUV410P: *h=2; *v=2; @@ -2002,6 +2009,9 @@ static int handle_jpeg(int *format) case PIX_FMT_YUVJ444P: *format = PIX_FMT_YUV444P; return 1; + case PIX_FMT_YUVJ440P: + *format = PIX_FMT_YUV440P; + return 1; default: return 0; } diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index bc0cff1acd..baebdf2566 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -193,6 +193,7 @@ char *sws_format_name(int format); || (x)==PIX_FMT_YUV411P \ || (x)==PIX_FMT_YUV422P \ || (x)==PIX_FMT_YUV444P \ + || (x)==PIX_FMT_YUV440P \ || (x)==PIX_FMT_NV12 \ || (x)==PIX_FMT_NV21 \ )