Commit 74459922 authored by ramiro's avatar ramiro

Use int instead of long to pass width parameters in non-public functions.

long was being incorrectly used as an x86-sized register, both for 32 and 64
bits, but this is not the case in win64.

git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@31153 b3059339-0415-0410-9bf9-f77b7e298cf2
parent a0856ec4
...@@ -466,8 +466,8 @@ DEFUN_END(yuv2rgb24_line) ...@@ -466,8 +466,8 @@ DEFUN_END(yuv2rgb24_line)
#define ARG_srcStride 40 #define ARG_srcStride 40
DEFUN(uyvytoyv12, mL3, (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, DEFUN(uyvytoyv12, mL3, (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
long width, long height, int width, int height,
long lumStride, long chromStride, long srcStride)): int lumStride, int chromStride, int srcStride)):
link 0; link 0;
[--sp] = (r7:4,p5:4); [--sp] = (r7:4,p5:4);
...@@ -539,8 +539,8 @@ DEFUN(uyvytoyv12, mL3, (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8 ...@@ -539,8 +539,8 @@ DEFUN(uyvytoyv12, mL3, (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8
DEFUN_END(uyvytoyv12) DEFUN_END(uyvytoyv12)
DEFUN(yuyvtoyv12, mL3, (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, DEFUN(yuyvtoyv12, mL3, (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
long width, long height, int width, int height,
long lumStride, long chromStride, long srcStride)): int lumStride, int chromStride, int srcStride)):
link 0; link 0;
[--sp] = (r7:4,p5:4); [--sp] = (r7:4,p5:4);
......
...@@ -38,12 +38,12 @@ ...@@ -38,12 +38,12 @@
#endif #endif
int ff_bfin_uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int ff_bfin_uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
long width, long height, int width, int height,
long lumStride, long chromStride, long srcStride) L1CODE; int lumStride, int chromStride, int srcStride) L1CODE;
int ff_bfin_yuyvtoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int ff_bfin_yuyvtoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
long width, long height, int width, int height,
long lumStride, long chromStride, long srcStride) L1CODE; int lumStride, int chromStride, int srcStride) L1CODE;
static int uyvytoyv12_unscaled(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, static int uyvytoyv12_unscaled(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]) int srcSliceH, uint8_t* dst[], int dstStride[])
......
...@@ -79,7 +79,7 @@ int main(int argc, char **argv) ...@@ -79,7 +79,7 @@ int main(int argc, char **argv)
int src_bpp; int src_bpp;
int dst_bpp; int dst_bpp;
const char *name; const char *name;
void (*func)(const uint8_t *src, uint8_t *dst, long src_size); void (*func)(const uint8_t *src, uint8_t *dst, int src_size);
} func_info[] = { } func_info[] = {
FUNC(2, 2, rgb15to16), FUNC(2, 2, rgb15to16),
FUNC(2, 3, rgb15to24), FUNC(2, 3, rgb15to24),
......
...@@ -1040,7 +1040,7 @@ static inline void rgb48ToUV_half(uint8_t *dstU, uint8_t *dstV, ...@@ -1040,7 +1040,7 @@ static inline void rgb48ToUV_half(uint8_t *dstU, uint8_t *dstV,
} }
#define BGR2Y(type, name, shr, shg, shb, maskr, maskg, maskb, RY, GY, BY, S)\ #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, long width, uint32_t *unused)\ static inline void name(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)\
{\ {\
int i;\ int i;\
for (i=0; i<width; i++) {\ for (i=0; i<width; i++) {\
...@@ -1059,7 +1059,7 @@ BGR2Y(uint16_t, bgr15ToY, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, RY<<10, GY<<5, BY ...@@ -1059,7 +1059,7 @@ BGR2Y(uint16_t, bgr15ToY, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, RY<<10, GY<<5, BY
BGR2Y(uint16_t, rgb16ToY, 0, 0, 0, 0xF800, 0x07E0, 0x001F, RY , GY<<5, BY<<11, RGB2YUV_SHIFT+8) 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) 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, long width, uint32_t *unused) static inline void abgrToA(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
{ {
int i; int i;
for (i=0; i<width; i++) { for (i=0; i<width; i++) {
...@@ -1068,7 +1068,7 @@ static inline void abgrToA(uint8_t *dst, const uint8_t *src, long width, uint32_ ...@@ -1068,7 +1068,7 @@ static inline void abgrToA(uint8_t *dst, const uint8_t *src, long width, uint32_
} }
#define BGR2UV(type, name, shr, shg, shb, maska, maskr, maskg, maskb, RU, GU, BU, RV, GV, BV, S)\ #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, long width, uint32_t *unused)\ static inline void name(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, const uint8_t *dummy, int width, uint32_t *unused)\
{\ {\
int i;\ int i;\
for (i=0; i<width; i++) {\ for (i=0; i<width; i++) {\
...@@ -1080,7 +1080,7 @@ static inline void name(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, const ...@@ -1080,7 +1080,7 @@ static inline void name(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, const
dstV[i]= ((RV)*r + (GV)*g + (BV)*b + (257<<((S)-1)))>>(S);\ 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, long width, uint32_t *unused)\ static inline void name ## _half(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, const uint8_t *dummy, int width, uint32_t *unused)\
{\ {\
int i;\ int i;\
for (i=0; i<width; i++) {\ for (i=0; i<width; i++) {\
...@@ -1105,7 +1105,7 @@ BGR2UV(uint16_t, bgr15ToUV, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, RU< ...@@ -1105,7 +1105,7 @@ BGR2UV(uint16_t, bgr15ToUV, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, RU<
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, 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) 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, long width, uint32_t *pal) static inline void palToY(uint8_t *dst, const uint8_t *src, int width, uint32_t *pal)
{ {
int i; int i;
for (i=0; i<width; i++) { for (i=0; i<width; i++) {
...@@ -1117,7 +1117,7 @@ static inline void palToY(uint8_t *dst, const uint8_t *src, long width, uint32_t ...@@ -1117,7 +1117,7 @@ static inline void palToY(uint8_t *dst, const uint8_t *src, long width, uint32_t
static inline void palToUV(uint8_t *dstU, uint8_t *dstV, static inline void palToUV(uint8_t *dstU, uint8_t *dstV,
const uint8_t *src1, const uint8_t *src2, const uint8_t *src1, const uint8_t *src2,
long width, uint32_t *pal) int width, uint32_t *pal)
{ {
int i; int i;
assert(src1 == src2); assert(src1 == src2);
...@@ -1129,7 +1129,7 @@ static inline void palToUV(uint8_t *dstU, uint8_t *dstV, ...@@ -1129,7 +1129,7 @@ static inline void palToUV(uint8_t *dstU, uint8_t *dstV,
} }
} }
static inline void monowhite2Y(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused) static inline void monowhite2Y(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
{ {
int i, j; int i, j;
for (i=0; i<width/8; i++) { for (i=0; i<width/8; i++) {
...@@ -1139,7 +1139,7 @@ static inline void monowhite2Y(uint8_t *dst, const uint8_t *src, long width, uin ...@@ -1139,7 +1139,7 @@ static inline void monowhite2Y(uint8_t *dst, const uint8_t *src, long width, uin
} }
} }
static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused) static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
{ {
int i, j; int i, j;
for (i=0; i<width/8; i++) { for (i=0; i<width/8; i++) {
......
...@@ -260,14 +260,14 @@ typedef struct SwsContext { ...@@ -260,14 +260,14 @@ typedef struct SwsContext {
const int16_t *lumSrc, const int16_t *chrSrc, const int16_t *alpSrc, const int16_t *lumSrc, const int16_t *chrSrc, const int16_t *alpSrc,
uint8_t *dest, uint8_t *dest,
uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest,
long dstW, long chrDstW); int dstW, int chrDstW);
void (*yuv2yuvX )(struct SwsContext *c, void (*yuv2yuvX )(struct SwsContext *c,
const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize, const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize,
const int16_t **alpSrc, const int16_t **alpSrc,
uint8_t *dest, uint8_t *dest,
uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest,
long dstW, long chrDstW); int dstW, int chrDstW);
void (*yuv2packed1)(struct SwsContext *c, void (*yuv2packed1)(struct SwsContext *c,
const uint16_t *buf0, const uint16_t *buf0,
const uint16_t *uvbuf0, const uint16_t *uvbuf1, const uint16_t *uvbuf0, const uint16_t *uvbuf1,
...@@ -284,26 +284,26 @@ typedef struct SwsContext { ...@@ -284,26 +284,26 @@ typedef struct SwsContext {
const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize, const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize,
const int16_t **alpSrc, uint8_t *dest, const int16_t **alpSrc, uint8_t *dest,
long dstW, long dstY); int dstW, int dstY);
void (*lumToYV12)(uint8_t *dst, const uint8_t *src, void (*lumToYV12)(uint8_t *dst, const uint8_t *src,
long width, uint32_t *pal); ///< Unscaled conversion of luma plane to YV12 for horizontal scaler. int width, uint32_t *pal); ///< Unscaled conversion of luma plane to YV12 for horizontal scaler.
void (*alpToYV12)(uint8_t *dst, const uint8_t *src, void (*alpToYV12)(uint8_t *dst, const uint8_t *src,
long width, uint32_t *pal); ///< Unscaled conversion of alpha plane to YV12 for horizontal scaler. int width, uint32_t *pal); ///< Unscaled conversion of alpha plane to YV12 for horizontal scaler.
void (*chrToYV12)(uint8_t *dstU, uint8_t *dstV, void (*chrToYV12)(uint8_t *dstU, uint8_t *dstV,
const uint8_t *src1, const uint8_t *src2, const uint8_t *src1, const uint8_t *src2,
long width, uint32_t *pal); ///< Unscaled conversion of chroma planes to YV12 for horizontal scaler. int width, uint32_t *pal); ///< Unscaled conversion of chroma planes to YV12 for horizontal scaler.
void (*hyscale_fast)(struct SwsContext *c, void (*hyscale_fast)(struct SwsContext *c,
int16_t *dst, long dstWidth, int16_t *dst, int dstWidth,
const uint8_t *src, int srcW, int xInc); const uint8_t *src, int srcW, int xInc);
void (*hcscale_fast)(struct SwsContext *c, void (*hcscale_fast)(struct SwsContext *c,
int16_t *dst, long dstWidth, int16_t *dst, int dstWidth,
const uint8_t *src1, const uint8_t *src2, const uint8_t *src1, const uint8_t *src2,
int srcW, int xInc); int srcW, int xInc);
void (*hScale)(int16_t *dst, int dstW, const uint8_t *src, int srcW, void (*hScale)(int16_t *dst, int dstW, const uint8_t *src, int srcW,
int xInc, const int16_t *filter, const int16_t *filterPos, int xInc, const int16_t *filter, const int16_t *filterPos,
long filterSize); int filterSize);
void (*lumConvertRange)(uint16_t *dst, int width); ///< Color range conversion function for luma plane if needed. void (*lumConvertRange)(uint16_t *dst, int width); ///< Color range conversion function for luma plane if needed.
void (*chrConvertRange)(uint16_t *dst, int width); ///< Color range conversion function for chroma planes if needed. void (*chrConvertRange)(uint16_t *dst, int width); ///< Color range conversion function for chroma planes if needed.
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment