[SCM] libav/experimental: BGR/RGB4 byte formats as input fixing isRGB/BGR() for the byte formats

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:56:29 UTC 2013


The following commit has been merged in the experimental branch:
commit 18064f5cf38730b70a6587c389e1838b00c753bb
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sat Feb 17 11:36:02 2007 +0000

    BGR/RGB4 byte formats as input
    fixing isRGB/BGR() for the byte formats
    
    Originally committed as revision 22244 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 13949a8..1e084b3 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -108,7 +108,8 @@ untested special converters
 			|| (x)==PIX_FMT_GRAY8 || (x)==PIX_FMT_YUV410P\
 			|| (x)==PIX_FMT_GRAY16BE || (x)==PIX_FMT_GRAY16LE\
 			|| (x)==PIX_FMT_YUV444P || (x)==PIX_FMT_YUV422P || (x)==PIX_FMT_YUV411P\
-			|| (x)==PIX_FMT_PAL8 || (x)==PIX_FMT_BGR8 || (x)==PIX_FMT_RGB8)
+			|| (x)==PIX_FMT_PAL8 || (x)==PIX_FMT_BGR8 || (x)==PIX_FMT_RGB8\
+                        || (x)==PIX_FMT_BGR4_BYTE  || (x)==PIX_FMT_RGB4_BYTE)
 #define isSupportedOut(x) ((x)==PIX_FMT_YUV420P || (x)==PIX_FMT_YUYV422 || (x)==PIX_FMT_UYVY422\
 			|| (x)==PIX_FMT_YUV444P || (x)==PIX_FMT_YUV422P || (x)==PIX_FMT_YUV411P\
 			|| isRGB(x) || isBGR(x)\
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 6302e86..faffa64 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -180,11 +180,11 @@ char *sws_format_name(int format);
 #define isGray16(x)    ((x)==PIX_FMT_GRAY16BE || (x)==PIX_FMT_GRAY16LE)
 #define isRGB(x)       ((x)==PIX_FMT_BGR32 || (x)==PIX_FMT_RGB24	\
 			|| (x)==PIX_FMT_RGB565 || (x)==PIX_FMT_RGB555	\
-			|| (x)==PIX_FMT_RGB8 || (x)==PIX_FMT_RGB4	\
+			|| (x)==PIX_FMT_RGB8 || (x)==PIX_FMT_RGB4 || (x)==PIX_FMT_RGB4_BYTE	\
 			|| (x)==PIX_FMT_MONOBLACK)
 #define isBGR(x)       ((x)==PIX_FMT_RGB32 || (x)==PIX_FMT_BGR24	\
 			|| (x)==PIX_FMT_BGR565 || (x)==PIX_FMT_BGR555	\
-			|| (x)==PIX_FMT_BGR8 || (x)==PIX_FMT_BGR4	\
+			|| (x)==PIX_FMT_BGR8 || (x)==PIX_FMT_BGR4 || (x)==PIX_FMT_BGR4_BYTE	\
 			|| (x)==PIX_FMT_MONOBLACK)
 
 static inline int fmt_depth(int fmt)
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c
index 928bf97..86598a2 100644
--- a/libswscale/swscale_template.c
+++ b/libswscale/swscale_template.c
@@ -2551,7 +2551,7 @@ static inline void RENAME(hyscale)(uint16_t *dst, long dstWidth, uint8_t *src, i
 	RENAME(rgb15ToY)(formatConvBuffer, src, srcW);
 	src= formatConvBuffer;
     }
-    else if(srcFormat==PIX_FMT_RGB8 || srcFormat==PIX_FMT_BGR8 || srcFormat==PIX_FMT_PAL8)
+    else if(srcFormat==PIX_FMT_RGB8 || srcFormat==PIX_FMT_BGR8 || srcFormat==PIX_FMT_PAL8 || srcFormat==PIX_FMT_BGR4_BYTE  || srcFormat==PIX_FMT_RGB4_BYTE)
     {
 	RENAME(palToY)(formatConvBuffer, src, srcW, pal);
 	src= formatConvBuffer;
@@ -2767,7 +2767,7 @@ inline static void RENAME(hcscale)(uint16_t *dst, long dstWidth, uint8_t *src1,
     {
     	return;
     }
-    else if(srcFormat==PIX_FMT_RGB8 || srcFormat==PIX_FMT_BGR8 || srcFormat==PIX_FMT_PAL8)
+    else if(srcFormat==PIX_FMT_RGB8 || srcFormat==PIX_FMT_BGR8 || srcFormat==PIX_FMT_PAL8 || srcFormat==PIX_FMT_BGR4_BYTE  || srcFormat==PIX_FMT_RGB4_BYTE)
     {
 	RENAME(palToUV)(formatConvBuffer, formatConvBuffer+2048, src1, src2, srcW, pal);
 	src1= formatConvBuffer;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list