diff libswscale/swscale.c @ 31113:1f7d0e9e2ebf

Revert r31153. It failed to build on: x86_64 / Mac OS X gcc 4.0.1 x86_64 / Linux icc (all) x86_64 / Linux gcc 4.0.4 x86_64 / OpenBSD gcc 3.3.5 x86_64 / Linux suncc 5.10 and there are some reports of crashes.
author ramiro
date Wed, 12 May 2010 20:47:32 +0000
parents 0a999f052474
children 100a50819c58
line wrap: on
line diff
--- a/libswscale/swscale.c	Wed May 12 08:29:55 2010 +0000
+++ b/libswscale/swscale.c	Wed May 12 20:47:32 2010 +0000
@@ -1040,7 +1040,7 @@
 }
 
 #define BGR2Y(type, name, shr, shg, shb, maskr, maskg, maskb, RY, GY, BY, S)\
-static inline void name(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)\
+static inline void name(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)\
 {\
     int i;\
     for (i=0; i<width; i++) {\
@@ -1059,7 +1059,7 @@
 BGR2Y(uint16_t, rgb16ToY, 0, 0, 0, 0xF800, 0x07E0, 0x001F, RY    , GY<<5, BY<<11, RGB2YUV_SHIFT+8)
 BGR2Y(uint16_t, rgb15ToY, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, RY    , GY<<5, BY<<10, RGB2YUV_SHIFT+7)
 
-static inline void abgrToA(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
+static inline void abgrToA(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
 {
     int i;
     for (i=0; i<width; i++) {
@@ -1068,7 +1068,7 @@
 }
 
 #define BGR2UV(type, name, shr, shg, shb, maska, maskr, maskg, maskb, RU, GU, BU, RV, GV, BV, S)\
-static inline void name(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, const uint8_t *dummy, int width, uint32_t *unused)\
+static inline void name(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, const uint8_t *dummy, long width, uint32_t *unused)\
 {\
     int i;\
     for (i=0; i<width; i++) {\
@@ -1080,7 +1080,7 @@
         dstV[i]= ((RV)*r + (GV)*g + (BV)*b + (257<<((S)-1)))>>(S);\
     }\
 }\
-static inline void name ## _half(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, const uint8_t *dummy, int width, uint32_t *unused)\
+static inline void name ## _half(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, const uint8_t *dummy, long width, uint32_t *unused)\
 {\
     int i;\
     for (i=0; i<width; i++) {\
@@ -1105,7 +1105,7 @@
 BGR2UV(uint16_t, rgb16ToUV, 0, 0, 0,          0,   0xF800, 0x07E0,   0x001F, RU    , GU<<5, BU<<11, RV    , GV<<5, BV<<11, RGB2YUV_SHIFT+8)
 BGR2UV(uint16_t, rgb15ToUV, 0, 0, 0,          0,   0x7C00, 0x03E0,   0x001F, RU    , GU<<5, BU<<10, RV    , GV<<5, BV<<10, RGB2YUV_SHIFT+7)
 
-static inline void palToY(uint8_t *dst, const uint8_t *src, int width, uint32_t *pal)
+static inline void palToY(uint8_t *dst, const uint8_t *src, long width, uint32_t *pal)
 {
     int i;
     for (i=0; i<width; i++) {
@@ -1117,7 +1117,7 @@
 
 static inline void palToUV(uint8_t *dstU, uint8_t *dstV,
                            const uint8_t *src1, const uint8_t *src2,
-                           int width, uint32_t *pal)
+                           long width, uint32_t *pal)
 {
     int i;
     assert(src1 == src2);
@@ -1129,7 +1129,7 @@
     }
 }
 
-static inline void monowhite2Y(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
+static inline void monowhite2Y(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
 {
     int i, j;
     for (i=0; i<width/8; i++) {
@@ -1139,7 +1139,7 @@
     }
 }
 
-static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
+static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
 {
     int i, j;
     for (i=0; i<width/8; i++) {