1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

cleanup (unsigned stride -> int stride)

Originally committed as revision 9393 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
This commit is contained in:
Michael Niedermayer 2003-02-11 12:57:53 +00:00
parent df4f91471c
commit f0b62bbde2
5 changed files with 47 additions and 48 deletions

View File

@ -716,7 +716,7 @@ void rgb8tobgr8(const uint8_t *src, uint8_t *dst, unsigned int 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,
unsigned int lumStride, unsigned int chromStride, unsigned int dstStride)
int lumStride, int chromStride, int dstStride)
{
#ifdef CAN_COMPILE_X86_ASM
// ordered per speed fasterst first
@ -737,7 +737,7 @@ void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, u
*/
void yuv422ptoyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int dstStride)
int lumStride, int chromStride, int dstStride)
{
#ifdef CAN_COMPILE_X86_ASM
// ordered per speed fasterst first
@ -759,7 +759,7 @@ void yuv422ptoyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc
*/
void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
int lumStride, int chromStride, int srcStride)
{
#ifdef CAN_COMPILE_X86_ASM
// ordered per speed fasterst first
@ -782,7 +782,7 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
*/
void uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
int lumStride, int chromStride, int srcStride)
{
#ifdef CAN_COMPILE_X86_ASM
// ordered per speed fasterst first
@ -802,7 +802,7 @@ void uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
void yvu9toyv12(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc,
uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride)
int lumStride, int chromStride)
{
#ifdef CAN_COMPILE_X86_ASM
// ordered per speed fasterst first
@ -840,7 +840,7 @@ void planar2x(const uint8_t *src, uint8_t *dst, int width, int height, int srcSt
*/
void rgb24toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
int lumStride, int chromStride, int srcStride)
{
#ifdef CAN_COMPILE_X86_ASM
// ordered per speed fasterst first
@ -856,8 +856,8 @@ void rgb24toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst
}
void interleaveBytes(uint8_t *src1, uint8_t *src2, uint8_t *dst,
unsigned width, unsigned height, unsigned src1Stride,
unsigned src2Stride, unsigned dstStride)
unsigned width, unsigned height, int src1Stride,
int src2Stride, int dstStride)
{
#ifdef CAN_COMPILE_X86_ASM
// ordered per speed fasterst first
@ -875,8 +875,8 @@ void interleaveBytes(uint8_t *src1, uint8_t *src2, uint8_t *dst,
void vu9_to_vu12(const uint8_t *src1, const uint8_t *src2,
uint8_t *dst1, uint8_t *dst2,
unsigned width, unsigned height,
unsigned srcStride1, unsigned srcStride2,
unsigned dstStride1, unsigned dstStride2)
int srcStride1, int srcStride2,
int dstStride1, int dstStride2)
{
#ifdef CAN_COMPILE_X86_ASM
if(gCpuCaps.hasMMX2)
@ -893,8 +893,8 @@ void vu9_to_vu12(const uint8_t *src1, const uint8_t *src2,
void yvu9_to_yuy2(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
uint8_t *dst,
unsigned width, unsigned height,
unsigned srcStride1, unsigned srcStride2,
unsigned srcStride3, unsigned dstStride)
int srcStride1, int srcStride2,
int srcStride3, int dstStride)
{
#ifdef CAN_COMPILE_X86_ASM
if(gCpuCaps.hasMMX2)

View File

@ -52,33 +52,33 @@ extern void palette8tobgr15(const uint8_t *src, uint8_t *dst, unsigned num_pixel
extern void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int dstStride);
int lumStride, int chromStride, int dstStride);
extern void yuv422ptoyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int dstStride);
int lumStride, int chromStride, int dstStride);
extern void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int srcStride);
int lumStride, int chromStride, int srcStride);
extern void rgb24toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int srcStride);
int lumStride, int chromStride, int srcStride);
extern void planar2x(const uint8_t *src, uint8_t *dst, int width, int height, int srcStride, int dstStride);
extern void interleaveBytes(uint8_t *src1, uint8_t *src2, uint8_t *dst,
unsigned width, unsigned height, unsigned src1Stride,
unsigned src2Stride, unsigned dstStride);
unsigned width, unsigned height, int src1Stride,
int src2Stride, int dstStride);
extern void vu9_to_vu12(const uint8_t *src1, const uint8_t *src2,
uint8_t *dst1, uint8_t *dst2,
unsigned width, unsigned height,
unsigned srcStride1, unsigned srcStride2,
unsigned dstStride1, unsigned dstStride2);
int srcStride1, int srcStride2,
int dstStride1, int 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,
unsigned srcStride1, unsigned srcStride2,
unsigned srcStride3, unsigned dstStride);
int srcStride1, int srcStride2,
int srcStride3, int dstStride);
#define MODE_RGB 0x1
@ -87,7 +87,7 @@ extern void yvu9_to_yuy2(const uint8_t *src1, const uint8_t *src2, const uint8_t
typedef void (* yuv2rgb_fun) (uint8_t * image, uint8_t * py,
uint8_t * pu, uint8_t * pv,
unsigned h_size, unsigned v_size,
unsigned rgb_stride, unsigned y_stride, unsigned uv_stride);
int rgb_stride, int y_stride, int uv_stride);
extern yuv2rgb_fun yuv2rgb;

View File

@ -1371,7 +1371,7 @@ static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsign
static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int dstStride, int vertLumPerChroma)
int lumStride, int chromStride, int dstStride, int vertLumPerChroma)
{
unsigned y;
const unsigned chromWidth= width>>1;
@ -1463,7 +1463,7 @@ asm( EMMS" \n\t"
*/
static inline void RENAME(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int dstStride)
int lumStride, int chromStride, int dstStride)
{
//FIXME interpolate chroma
RENAME(yuvPlanartoyuy2)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 2);
@ -1475,7 +1475,7 @@ static inline void RENAME(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc,
*/
static inline void RENAME(yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int dstStride)
int lumStride, int chromStride, int dstStride)
{
RENAME(yuvPlanartoyuy2)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 1);
}
@ -1487,7 +1487,7 @@ static inline void RENAME(yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usr
*/
static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
int lumStride, int chromStride, int srcStride)
{
unsigned y;
const unsigned chromWidth= width>>1;
@ -1607,7 +1607,7 @@ asm volatile( EMMS" \n\t"
static inline void RENAME(yvu9toyv12)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc,
uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height, unsigned int lumStride, unsigned int chromStride)
unsigned int width, unsigned int height, int lumStride, int chromStride)
{
/* Y Plane */
memcpy(ydst, ysrc, width*height);
@ -1725,7 +1725,7 @@ asm volatile( EMMS" \n\t"
*/
static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
int lumStride, int chromStride, int srcStride)
{
unsigned y;
const unsigned chromWidth= width>>1;
@ -1851,7 +1851,7 @@ asm volatile( EMMS" \n\t"
*/
static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
unsigned int width, unsigned int height,
unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
int lumStride, int chromStride, int srcStride)
{
unsigned y;
const unsigned chromWidth= width>>1;
@ -2147,8 +2147,8 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
}
void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest,
unsigned width, unsigned height, unsigned src1Stride,
unsigned src2Stride, unsigned dstStride){
unsigned width, unsigned height, int src1Stride,
int src2Stride, int dstStride){
unsigned h;
for(h=0; h < height; h++)
@ -2230,10 +2230,11 @@ void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest,
static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
uint8_t *dst1, uint8_t *dst2,
unsigned width, unsigned height,
unsigned srcStride1, unsigned srcStride2,
unsigned dstStride1, unsigned dstStride2)
int srcStride1, int srcStride2,
int dstStride1, int dstStride2)
{
unsigned y,x,w,h;
unsigned int y,x,h;
int w;
w=width/2; h=height/2;
#ifdef HAVE_MMX
asm volatile(
@ -2246,8 +2247,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
uint8_t* d=dst1+dstStride1*y;
x=0;
#ifdef HAVE_MMX
if(w > 32)
for(;x<w;x+=32)
for(;x<w-31;x+=32)
{
asm volatile(
PREFETCH" 32%1\n\t"
@ -2287,8 +2287,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
uint8_t* d=dst2+dstStride2*y;
x=0;
#ifdef HAVE_MMX
if(w > 32)
for(;x<w;x+=32)
for(;x<w-31;x+=32)
{
asm volatile(
PREFETCH" 32%1\n\t"
@ -2335,8 +2334,8 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
uint8_t *dst,
unsigned width, unsigned height,
unsigned srcStride1, unsigned srcStride2,
unsigned srcStride3, unsigned dstStride)
int srcStride1, int srcStride2,
int srcStride3, int dstStride)
{
unsigned y,x,x2,w,h;
w=width/2; h=height;

View File

@ -30,7 +30,7 @@
static void mlib_YUV2ARGB420_32(uint8_t* image, uint8_t* py,
uint8_t* pu, uint8_t* pv,
unsigned h_size, unsigned v_size,
unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
int rgb_stride, int y_stride, int uv_stride)
{
mlib_VideoColorYUV2ARGB420(image, py, pu, pv, h_size,
v_size, rgb_stride, y_stride, uv_stride);
@ -39,7 +39,7 @@ static void mlib_YUV2ARGB420_32(uint8_t* image, uint8_t* py,
static void mlib_YUV2ABGR420_32(uint8_t* image, uint8_t* py,
uint8_t* pu, uint8_t* pv,
unsigned h_size, unsigned v_size,
unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
int rgb_stride, int y_stride, int uv_stride)
{
mlib_VideoColorYUV2ABGR420(image, py, pu, pv, h_size,
v_size, rgb_stride, y_stride, uv_stride);
@ -48,7 +48,7 @@ static void mlib_YUV2ABGR420_32(uint8_t* image, uint8_t* py,
static void mlib_YUV2RGB420_24(uint8_t* image, uint8_t* py,
uint8_t* pu, uint8_t* pv,
unsigned h_size, unsigned v_size,
unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
int rgb_stride, int y_stride, int uv_stride)
{
mlib_VideoColorYUV2RGB420(image, py, pu, pv, h_size,
v_size, rgb_stride, y_stride, uv_stride);

View File

@ -124,7 +124,7 @@
static inline void RENAME(yuv420_rgb16) (uint8_t * image, uint8_t * py,
uint8_t * pu, uint8_t * pv,
unsigned h_size, unsigned v_size,
unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
int rgb_stride, int y_stride, int uv_stride)
{
int even = 1;
int x, y;
@ -229,7 +229,7 @@ YUV2RGB
static inline void RENAME(yuv420_rgb15) (uint8_t * image, uint8_t * py,
uint8_t * pu, uint8_t * pv,
unsigned h_size, unsigned v_size,
unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
int rgb_stride, int y_stride, int uv_stride)
{
int even = 1;
int x, y;
@ -330,7 +330,7 @@ YUV2RGB
static inline void RENAME(yuv420_rgb24) (uint8_t * image, uint8_t * py,
uint8_t * pu, uint8_t * pv,
unsigned h_size, unsigned v_size,
unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
int rgb_stride, int y_stride, int uv_stride)
{
int even = 1;
int x, y;
@ -489,7 +489,7 @@ YUV2RGB
static inline void RENAME(yuv420_argb32) (uint8_t * image, uint8_t * py,
uint8_t * pu, uint8_t * pv,
unsigned h_size, unsigned v_size,
unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
int rgb_stride, int y_stride, int uv_stride)
{
int even = 1;
int x, y;