Commit 7f526efd authored by Reimar Döffinger's avatar Reimar Döffinger
Browse files

Change unsigned->signed and int->long, this fits the asm code better on 64

bit systems.
Also fixes several crashes because (long)-i is incorrect if i is unsigned.

Originally committed as revision 16740 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
parent b926572a
......@@ -18,56 +18,57 @@
#define FAST_BGR2YV12 // use 7 bit coeffs instead of 15bit
void (*rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb24to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb24to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb32to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb32to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb15to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb15to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb15to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb16to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb16to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
void (*rgb16to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
//void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, unsigned src_size);
void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned src_size);
void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, unsigned src_size);
void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size);
void (*rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsigned src_size);
//void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, unsigned src_size);
void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsigned src_size);
void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size);
void (*rgb24to32)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb24to16)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb24to15)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb32to24)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb32to16)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb32to15)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb15to16)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb15to24)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb15to32)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb16to15)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb16to24)(const uint8_t *src,uint8_t *dst,long src_size);
void (*rgb16to32)(const uint8_t *src,uint8_t *dst,long src_size);
//void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, long src_size);
void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long src_size);
void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long src_size);
void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size);
void (*rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size);
//void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, long src_size);
void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size);
void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long src_size);
void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int dstStride);
long width, long height,
long lumStride, long chromStride, long dstStride);
void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int dstStride);
long width, long height,
long lumStride, long chromStride, long dstStride);
void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int dstStride);
long width, long height,
long lumStride, long chromStride, long dstStride);
void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int srcStride);
long width, long height,
long lumStride, long chromStride, long srcStride);
void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int srcStride);
void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, int srcStride, int dstStride);
long width, long height,
long lumStride, long chromStride, long srcStride);
void (*planar2x)(const uint8_t *src, uint8_t *dst, long width, long height,
long srcStride, long dstStride);
void (*interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dst,
unsigned width, unsigned height, int src1Stride,
int src2Stride, int dstStride);
long width, long height, long src1Stride,
long src2Stride, long dstStride);
void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
uint8_t *dst1, uint8_t *dst2,
unsigned width, unsigned height,
int srcStride1, int srcStride2,
int dstStride1, int dstStride2);
long width, long height,
long srcStride1, long srcStride2,
long dstStride1, long dstStride2);
void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
uint8_t *dst,
unsigned width, unsigned height,
int srcStride1, int srcStride2,
int srcStride3, int dstStride);
long width, long height,
long srcStride1, long srcStride2,
long srcStride3, long dstStride);
#if defined(ARCH_X86) || defined(ARCH_X86_64)
static const uint64_t mmx_null __attribute__((aligned(8))) = 0x0000000000000000ULL;
......@@ -321,9 +322,9 @@ void sws_rgb2rgb_init(int flags){
/**
* Pallete is assumed to contain bgr32
*/
void palette8torgb32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
void palette8torgb32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
unsigned i;
long i;
/*
for(i=0; i<num_pixels; i++)
......@@ -347,9 +348,9 @@ void palette8torgb32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, cons
}
}
void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
void palette8tobgr32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
unsigned i;
long i;
for(i=0; i<num_pixels; i++)
{
#ifdef WORDS_BIGENDIAN
......@@ -371,9 +372,9 @@ void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, cons
/**
* Pallete is assumed to contain bgr32
*/
void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
void palette8torgb24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
unsigned i;
long i;
/*
writes 1 byte o much and might cause alignment issues on some architectures?
for(i=0; i<num_pixels; i++)
......@@ -389,9 +390,9 @@ void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, cons
}
}
void palette8tobgr24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
void palette8tobgr24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
unsigned i;
long i;
/*
writes 1 byte o much and might cause alignment issues on some architectures?
for(i=0; i<num_pixels; i++)
......@@ -410,15 +411,15 @@ void palette8tobgr24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, cons
/**
* Palette is assumed to contain bgr16, see rgb32to16 to convert the palette
*/
void palette8torgb16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
unsigned i;
long i;
for(i=0; i<num_pixels; i++)
((uint16_t *)dst)[i] = ((uint16_t *)palette)[ src[i] ];
}
void palette8tobgr16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
unsigned i;
long i;
for(i=0; i<num_pixels; i++)
((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[ src[i] ]);
}
......@@ -426,23 +427,23 @@ void palette8tobgr16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, cons
/**
* Pallete is assumed to contain bgr15, see rgb32to15 to convert the palette
*/
void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
unsigned i;
long i;
for(i=0; i<num_pixels; i++)
((uint16_t *)dst)[i] = ((uint16_t *)palette)[ src[i] ];
}
void palette8tobgr15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
unsigned i;
long i;
for(i=0; i<num_pixels; i++)
((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[ src[i] ]);
}
void rgb32tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb32tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
{
unsigned i;
unsigned num_pixels = src_size >> 2;
long i;
long num_pixels = src_size >> 2;
for(i=0; i<num_pixels; i++)
{
dst[3*i + 0] = src[4*i + 2];
......@@ -451,9 +452,9 @@ void rgb32tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb24tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb24tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
{
unsigned i;
long i;
for(i=0; 3*i<src_size; i++)
{
dst[4*i + 0] = src[3*i + 2];
......@@ -463,7 +464,7 @@ void rgb24tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb16tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
......@@ -480,7 +481,7 @@ void rgb16tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb16tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb16tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
......@@ -496,10 +497,10 @@ void rgb16tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb16tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb16tobgr16(const uint8_t *src, uint8_t *dst, long src_size)
{
unsigned i;
unsigned num_pixels = src_size >> 1;
long i;
long num_pixels = src_size >> 1;
for(i=0; i<num_pixels; i++)
{
......@@ -513,10 +514,10 @@ void rgb16tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb16tobgr15(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
{
unsigned i;
unsigned num_pixels = src_size >> 1;
long i;
long num_pixels = src_size >> 1;
for(i=0; i<num_pixels; i++)
{
......@@ -530,7 +531,7 @@ void rgb16tobgr15(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
......@@ -547,7 +548,7 @@ void rgb15tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb15tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb15tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
......@@ -563,10 +564,10 @@ void rgb15tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb15tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb15tobgr16(const uint8_t *src, uint8_t *dst, long src_size)
{
unsigned i;
unsigned num_pixels = src_size >> 1;
long i;
long num_pixels = src_size >> 1;
for(i=0; i<num_pixels; i++)
{
......@@ -580,10 +581,10 @@ void rgb15tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb15tobgr15(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
{
unsigned i;
unsigned num_pixels = src_size >> 1;
long i;
long num_pixels = src_size >> 1;
for(i=0; i<num_pixels; i++)
{
......@@ -597,10 +598,10 @@ void rgb15tobgr15(const uint8_t *src, uint8_t *dst, unsigned int src_size)
}
}
void rgb8tobgr8(const uint8_t *src, uint8_t *dst, unsigned int src_size)
void rgb8tobgr8(const uint8_t *src, uint8_t *dst, long src_size)
{
unsigned i;
unsigned num_pixels = src_size;
long i;
long num_pixels = src_size;
for(i=0; i<num_pixels; i++)
{
unsigned b,g,r;
......
......@@ -12,46 +12,46 @@
// Note: do not fix the dependence on stdio.h
/* A full collection of rgb to rgb(bgr) convertors */
extern void (*rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb24to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb24to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb32to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb32to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb15to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb15to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb15to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb16to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb16to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb16to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
extern void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void (*rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb24tobgr32(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb32tobgr24(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb16tobgr32(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb16tobgr24(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb16tobgr16(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb16tobgr15(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb15tobgr32(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb15tobgr24(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb15tobgr16(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb15tobgr15(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void rgb8tobgr8(const uint8_t *src, uint8_t *dst, unsigned src_size);
extern void palette8torgb32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
extern void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
extern void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
extern void palette8tobgr24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
extern void palette8torgb16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
extern void palette8tobgr16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
extern void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
extern void palette8tobgr15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
extern void (*rgb24to32)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb24to16)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb24to15)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb32to24)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb32to16)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb32to15)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb15to16)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb15to24)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb15to32)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb16to15)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb16to24)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb16to32)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb24tobgr32(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb32tobgr24(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb16tobgr24(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb16tobgr16(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb15tobgr24(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb15tobgr16(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb8tobgr8(const uint8_t *src, uint8_t *dst, long src_size);
extern void palette8torgb32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8tobgr32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8torgb24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8tobgr24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
/**
*
......@@ -67,16 +67,16 @@ extern void palette8tobgr15(const uint8_t *src, uint8_t *dst, unsigned num_pixel
* problem for anyone then tell me, and ill fix it)
*/
extern void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int dstStride);
long width, long height,
long lumStride, long chromStride, long dstStride);
/**
*
* width should be a multiple of 16
*/
extern void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int dstStride);
long width, long height,
long lumStride, long chromStride, long dstStride);
/**
*
......@@ -84,8 +84,8 @@ extern void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uin
* problem for anyone then tell me, and ill fix it)
*/
extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int srcStride);
long width, long height,
long lumStride, long chromStride, long srcStride);
/**
*
......@@ -93,8 +93,8 @@ extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint
* problem for anyone then tell me, and ill fix it)
*/
extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int dstStride);
long width, long height,
long lumStride, long chromStride, long dstStride);
/**
*
......@@ -103,25 +103,26 @@ extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_
* chrominance data is only taken from every secound line others are ignored FIXME write HQ version
*/
extern void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
int lumStride, int chromStride, int srcStride);
extern void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, int srcStride, int dstStride);
long width, long height,
long lumStride, long chromStride, long srcStride);
extern void (*planar2x)(const uint8_t *src, uint8_t *dst, long width, long height,
long srcStride, long dstStride);
extern void (*interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dst,
unsigned width, unsigned height, int src1Stride,
int src2Stride, int dstStride);
long width, long height, long src1Stride,
long src2Stride, long dstStride);
extern void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
uint8_t *dst1, uint8_t *dst2,
unsigned width, unsigned height,
int srcStride1, int srcStride2,
int dstStride1, int dstStride2);
long width, long height,
long srcStride1, long srcStride2,
long dstStride1, long dstStride2);
extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
uint8_t *dst,
unsigned width, unsigned height,
int srcStride1, int srcStride2,
int srcStride3, int dstStride);
long width, long height,
long srcStride1, long srcStride2,
long srcStride3, long dstStride);
#define MODE_RGB 0x1
......
......@@ -59,7 +59,7 @@
#define SFENCE "/nop"
#endif
static inline void RENAME(rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size)
static inline void RENAME(rgb24to32)(const uint8_t *src,uint8_t *dst,long src_size)
{
uint8_t *dest = dst;
const uint8_t *s = src;
......@@ -117,7 +117,7 @@ static inline void RENAME(rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned sr
}
}
static inline void RENAME(rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size)
static inline void RENAME(rgb32to24)(const uint8_t *src,uint8_t *dst,long src_size)
{
uint8_t *dest = dst;
const uint8_t *s = src;
......@@ -207,7 +207,7 @@ static inline void RENAME(rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned sr
MMX2, 3DNOW optimization by Nick Kurshev
32bit c version, and and&add trick by Michael Niedermayer
*/
static inline void RENAME(rgb15to16)(const uint8_t *src,uint8_t *dst,unsigned src_size)
static inline void RENAME(rgb15to16)(const uint8_t *src,uint8_t *dst,long src_size)
{
register const uint8_t* s=src;
register uint8_t* d=dst;
......@@ -256,7 +256,7 @@ static inline void RENAME(rgb15to16)(const uint8_t *src,uint8_t *dst,unsigned sr
}
}
static inline void RENAME(rgb16to15)(const uint8_t *src,uint8_t *dst,unsigned src_size)
static inline void RENAME(rgb16to15)(const uint8_t *src,uint8_t *dst,long src_size)
{
register const uint8_t* s=src;
register uint8_t* d=dst;
......@@ -312,7 +312,7 @@ static inline void RENAME(rgb16to15)(const uint8_t *src,uint8_t *dst,unsigned sr
}
}
static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, unsigned src_size)
static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
......@@ -408,7 +408,7 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, unsigned
}
}
static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsigned int src_size)
static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
......@@ -470,7 +470,7 @@ static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsign
}
}
static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, unsigned src_size)
static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
......@@ -567,7 +567,7 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, unsigned
}
}
static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size)
static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
......@@ -629,7 +629,7 @@ static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsign
}
}
static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, unsigned src_size)
static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
......@@ -692,7 +692,7 @@ static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, unsigned
}
}
static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, unsigned int src_size)
static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
......@@ -755,7 +755,7 @@ static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, unsign
}
}
static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, unsigned src_size)
static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
......@@ -818,7 +818,7 @@ static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, unsigned
}
}