mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
sws: replace all long with int.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
parent
7d8c17b5f6
commit
b8e893399f
@ -466,8 +466,8 @@ DEFUN_END(yuv2rgb24_line)
|
||||
#define ARG_srcStride 40
|
||||
|
||||
DEFUN(uyvytoyv12, mL3, (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)):
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)):
|
||||
link 0;
|
||||
[--sp] = (r7:4,p5:4);
|
||||
|
||||
@ -539,8 +539,8 @@ DEFUN(uyvytoyv12, mL3, (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8
|
||||
DEFUN_END(uyvytoyv12)
|
||||
|
||||
DEFUN(yuyvtoyv12, mL3, (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)):
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)):
|
||||
link 0;
|
||||
[--sp] = (r7:4,p5:4);
|
||||
|
||||
|
@ -38,12 +38,12 @@
|
||||
#endif
|
||||
|
||||
int ff_bfin_uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride) L1CODE;
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride) L1CODE;
|
||||
|
||||
int ff_bfin_yuyvtoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride) L1CODE;
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride) L1CODE;
|
||||
|
||||
static int uyvytoyv12_unscaled(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
|
||||
int srcSliceH, uint8_t* dst[], int dstStride[])
|
||||
|
@ -52,7 +52,7 @@ int main(int argc, char **argv)
|
||||
int src_bpp;
|
||||
int dst_bpp;
|
||||
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(2, 2, rgb15to16),
|
||||
FUNC(2, 3, rgb15to24),
|
||||
|
@ -29,13 +29,13 @@ altivec_packIntArrayToCharArray(int *val, uint8_t* dest, int dstW)
|
||||
register int i;
|
||||
vector unsigned int altivec_vectorShiftInt19 =
|
||||
vec_add(vec_splat_u32(10), vec_splat_u32(9));
|
||||
if ((unsigned long)dest % 16) {
|
||||
if ((unsigned int)dest % 16) {
|
||||
/* badly aligned store, we force store alignment */
|
||||
/* and will handle load misalignment on val w/ vec_perm */
|
||||
vector unsigned char perm1;
|
||||
vector signed int v1;
|
||||
for (i = 0 ; (i < dstW) &&
|
||||
(((unsigned long)dest + i) % 16) ; i++) {
|
||||
(((unsigned int)dest + i) % 16) ; i++) {
|
||||
int t = val[i] >> 19;
|
||||
dest[i] = (t < 0) ? 0 : ((t > 255) ? 255 : t);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ static inline void RENAME(yuv2yuvX)(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t **chrVSrc, int chrFilterSize,
|
||||
const int16_t **alpSrc,
|
||||
uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
|
||||
uint8_t *aDest, long dstW, long chrDstW)
|
||||
uint8_t *aDest, int dstW, int chrDstW)
|
||||
{
|
||||
yuv2yuvX_altivec_real(lumFilter, lumSrc, lumFilterSize,
|
||||
chrFilter, chrUSrc, chrVSrc, chrFilterSize,
|
||||
@ -45,7 +45,7 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc, int chrFilterSize,
|
||||
const int16_t **alpSrc, uint8_t *dest,
|
||||
long dstW, long dstY)
|
||||
int dstW, int dstY)
|
||||
{
|
||||
/* The following list of supported dstFormat values should
|
||||
match what's found in the body of ff_yuv2packedX_altivec() */
|
||||
|
@ -793,7 +793,7 @@ ff_yuv2packedX_altivec(SwsContext *c, const int16_t *lumFilter,
|
||||
|
||||
vector signed short RND = vec_splat_s16(1<<3);
|
||||
vector unsigned short SCL = vec_splat_u16(4);
|
||||
DECLARE_ALIGNED(16, unsigned long, scratch)[16];
|
||||
DECLARE_ALIGNED(16, unsigned int, scratch)[16];
|
||||
|
||||
vector signed short *YCoeffs, *CCoeffs;
|
||||
|
||||
|
@ -29,70 +29,70 @@
|
||||
#include "swscale.h"
|
||||
#include "swscale_internal.h"
|
||||
|
||||
void (*rgb24tobgr32)(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 (*rgb32tobgr24)(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 (*rgb15tobgr24)(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 (*rgb16tobgr24)(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void (*rgb16to32)(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void (*rgb24tobgr24)(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 (*shuffle_bytes_2103)(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 (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
|
||||
void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride);
|
||||
void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride);
|
||||
void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride);
|
||||
void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride);
|
||||
void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
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);
|
||||
int width, 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);
|
||||
void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst,
|
||||
long width, long height, long src1Stride,
|
||||
long src2Stride, long dstStride);
|
||||
int width, int height, int src1Stride,
|
||||
int src2Stride, int dstStride);
|
||||
void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
|
||||
uint8_t *dst1, uint8_t *dst2,
|
||||
long width, long height,
|
||||
long srcStride1, long srcStride2,
|
||||
long dstStride1, long dstStride2);
|
||||
int width, int height,
|
||||
int srcStride1, int srcStride2,
|
||||
int dstStride1, int dstStride2);
|
||||
void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
|
||||
uint8_t *dst,
|
||||
long width, long height,
|
||||
long srcStride1, long srcStride2,
|
||||
long srcStride3, long dstStride);
|
||||
int width, int height,
|
||||
int srcStride1, int srcStride2,
|
||||
int srcStride3, int dstStride);
|
||||
void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
|
||||
#define RGB2YUV_SHIFT 8
|
||||
#define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5))
|
||||
@ -123,10 +123,10 @@ void sws_rgb2rgb_init(void)
|
||||
rgb2rgb_init_x86();
|
||||
}
|
||||
|
||||
void rgb32to24(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
long i;
|
||||
long num_pixels = src_size >> 2;
|
||||
int i;
|
||||
int num_pixels = src_size >> 2;
|
||||
for (i=0; i<num_pixels; i++) {
|
||||
#if HAVE_BIGENDIAN
|
||||
/* RGB32 (= A,B,G,R) -> BGR24 (= B,G,R) */
|
||||
@ -141,9 +141,9 @@ void rgb32to24(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void rgb24to32(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
long i;
|
||||
int i;
|
||||
for (i=0; 3*i<src_size; i++) {
|
||||
#if HAVE_BIGENDIAN
|
||||
/* RGB24 (= R,G,B) -> BGR32 (= A,R,G,B) */
|
||||
@ -160,7 +160,7 @@ void rgb24to32(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
uint8_t *d = dst;
|
||||
@ -183,7 +183,7 @@ void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void rgb16to24(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
uint8_t *d = dst;
|
||||
@ -198,10 +198,10 @@ void rgb16to24(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void rgb16tobgr16(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
long i;
|
||||
long num_pixels = src_size >> 1;
|
||||
int i;
|
||||
int num_pixels = src_size >> 1;
|
||||
|
||||
for (i=0; i<num_pixels; i++) {
|
||||
unsigned rgb = ((const uint16_t*)src)[i];
|
||||
@ -209,10 +209,10 @@ void rgb16tobgr16(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
long i;
|
||||
long num_pixels = src_size >> 1;
|
||||
int i;
|
||||
int num_pixels = src_size >> 1;
|
||||
|
||||
for (i=0; i<num_pixels; i++) {
|
||||
unsigned rgb = ((const uint16_t*)src)[i];
|
||||
@ -220,7 +220,7 @@ void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
uint8_t *d = dst;
|
||||
@ -243,7 +243,7 @@ void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void rgb15to24(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
uint8_t *d = dst;
|
||||
@ -258,10 +258,10 @@ void rgb15to24(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void rgb15tobgr16(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
long i;
|
||||
long num_pixels = src_size >> 1;
|
||||
int i;
|
||||
int num_pixels = src_size >> 1;
|
||||
|
||||
for (i=0; i<num_pixels; i++) {
|
||||
unsigned rgb = ((const uint16_t*)src)[i];
|
||||
@ -269,10 +269,10 @@ void rgb15tobgr16(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
long i;
|
||||
long num_pixels = src_size >> 1;
|
||||
int i;
|
||||
int num_pixels = src_size >> 1;
|
||||
|
||||
for (i=0; i<num_pixels; i++) {
|
||||
unsigned br;
|
||||
@ -282,10 +282,10 @@ void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
void bgr8torgb8(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
void bgr8torgb8(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
long i;
|
||||
long num_pixels = src_size;
|
||||
int i;
|
||||
int num_pixels = src_size;
|
||||
for (i=0; i<num_pixels; i++) {
|
||||
unsigned b,g,r;
|
||||
register uint8_t rgb;
|
||||
@ -298,9 +298,9 @@ void bgr8torgb8(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
|
||||
#define DEFINE_SHUFFLE_BYTES(a, b, c, d) \
|
||||
void shuffle_bytes_##a##b##c##d(const uint8_t *src, uint8_t *dst, long src_size) \
|
||||
void shuffle_bytes_##a##b##c##d(const uint8_t *src, uint8_t *dst, int src_size) \
|
||||
{ \
|
||||
long i; \
|
||||
int i; \
|
||||
\
|
||||
for (i = 0; i < src_size; i+=4) { \
|
||||
dst[i + 0] = src[i + a]; \
|
||||
|
@ -32,83 +32,83 @@
|
||||
#include "libavutil/avutil.h"
|
||||
|
||||
/* A full collection of RGB to RGB(BGR) converters */
|
||||
extern void (*rgb24tobgr32)(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 (*rgb32tobgr24)(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 (*rgb15tobgr24)(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 (*rgb16tobgr24)(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 (*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 (*shuffle_bytes_2103)(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, int src_size);
|
||||
extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb32to16) (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb32to15) (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb15to16) (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb15to32) (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb16to15) (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb16to32) (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb24to16) (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb24to15) (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
|
||||
void rgb24to32 (const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb32to24 (const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb16to24 (const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb16tobgr16(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb15to24 (const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb15tobgr16(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void bgr8torgb8 (const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void rgb24to32 (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void rgb32to24 (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void rgb16to24 (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void rgb15to24 (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void bgr8torgb8 (const uint8_t *src, uint8_t *dst, int src_size);
|
||||
|
||||
void shuffle_bytes_0321(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void shuffle_bytes_3012(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void shuffle_bytes_3210(const uint8_t *src, uint8_t *dst, long src_size);
|
||||
void shuffle_bytes_0321(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void shuffle_bytes_3012(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
void shuffle_bytes_3210(const uint8_t *src, uint8_t *dst, int src_size);
|
||||
|
||||
void rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,
|
||||
uint8_t *vdst, long width, long height, long lumStride,
|
||||
long chromStride, long srcStride);
|
||||
uint8_t *vdst, int width, int height, int lumStride,
|
||||
int chromStride, int srcStride);
|
||||
|
||||
/**
|
||||
* Height should be a multiple of 2 and width should be a multiple of 16.
|
||||
* (If this is a problem for anyone then tell me, and I will fix it.)
|
||||
*/
|
||||
extern void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int 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,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride);
|
||||
|
||||
/**
|
||||
* Height should be a multiple of 2 and width should be a multiple of 16.
|
||||
* (If this is a problem for anyone then tell me, and I will fix it.)
|
||||
*/
|
||||
extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
|
||||
/**
|
||||
* Height should be a multiple of 2 and width should be a multiple of 16.
|
||||
* (If this is a problem for anyone then tell me, and I will fix it.)
|
||||
*/
|
||||
extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride);
|
||||
|
||||
/**
|
||||
* Width should be a multiple of 16.
|
||||
*/
|
||||
extern void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride);
|
||||
|
||||
/**
|
||||
* Height should be a multiple of 2 and width should be a multiple of 2.
|
||||
@ -117,40 +117,40 @@ extern void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uin
|
||||
* FIXME: Write high quality version.
|
||||
*/
|
||||
extern void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
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);
|
||||
int width, 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);
|
||||
|
||||
extern void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst,
|
||||
long width, long height, long src1Stride,
|
||||
long src2Stride, long dstStride);
|
||||
int width, int 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,
|
||||
long width, long height,
|
||||
long srcStride1, long srcStride2,
|
||||
long dstStride1, long dstStride2);
|
||||
int width, int height,
|
||||
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,
|
||||
long width, long height,
|
||||
long srcStride1, long srcStride2,
|
||||
long srcStride3, long dstStride);
|
||||
int width, int height,
|
||||
int srcStride1, int srcStride2,
|
||||
int srcStride3, int dstStride);
|
||||
|
||||
|
||||
extern void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
extern void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
extern void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
extern void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride);
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride);
|
||||
|
||||
void sws_rgb2rgb_init(void);
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
static inline void rgb24tobgr32_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb24tobgr32_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
uint8_t *dest = dst;
|
||||
const uint8_t *s = src;
|
||||
@ -50,7 +50,7 @@ static inline void rgb24tobgr32_c(const uint8_t *src, uint8_t *dst, long src_siz
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb32tobgr24_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb32tobgr24_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
uint8_t *dest = dst;
|
||||
const uint8_t *s = src;
|
||||
@ -81,7 +81,7 @@ static inline void rgb32tobgr24_c(const uint8_t *src, uint8_t *dst, long src_siz
|
||||
MMX2, 3DNOW optimization by Nick Kurshev
|
||||
32-bit C version, and and&add trick by Michael Niedermayer
|
||||
*/
|
||||
static inline void rgb15to16_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb15to16_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
register const uint8_t* s=src;
|
||||
register uint8_t* d=dst;
|
||||
@ -101,7 +101,7 @@ static inline void rgb15to16_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb16to15_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb16to15_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
register const uint8_t* s=src;
|
||||
register uint8_t* d=dst;
|
||||
@ -122,7 +122,7 @@ static inline void rgb16to15_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb32to16_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb32to16_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -135,7 +135,7 @@ static inline void rgb32to16_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb32tobgr16_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb32tobgr16_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -147,7 +147,7 @@ static inline void rgb32tobgr16_c(const uint8_t *src, uint8_t *dst, long src_siz
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb32to15_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb32to15_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -159,7 +159,7 @@ static inline void rgb32to15_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb32tobgr15_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb32tobgr15_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -171,7 +171,7 @@ static inline void rgb32tobgr15_c(const uint8_t *src, uint8_t *dst, long src_siz
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb24tobgr16_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb24tobgr16_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -185,7 +185,7 @@ static inline void rgb24tobgr16_c(const uint8_t *src, uint8_t *dst, long src_siz
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb24to16_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb24to16_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -199,7 +199,7 @@ static inline void rgb24to16_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb24tobgr15_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb24tobgr15_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -213,7 +213,7 @@ static inline void rgb24tobgr15_c(const uint8_t *src, uint8_t *dst, long src_siz
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb24to15_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb24to15_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -248,7 +248,7 @@ static inline void rgb24to15_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
|
|
||||
original bits
|
||||
*/
|
||||
static inline void rgb15tobgr24_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb15tobgr24_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
uint8_t *d = dst;
|
||||
@ -263,7 +263,7 @@ static inline void rgb15tobgr24_c(const uint8_t *src, uint8_t *dst, long src_siz
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb16tobgr24_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb16tobgr24_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
uint8_t *d = (uint8_t *)dst;
|
||||
@ -278,7 +278,7 @@ static inline void rgb16tobgr24_c(const uint8_t *src, uint8_t *dst, long src_siz
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb15to32_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb15to32_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
uint8_t *d = dst;
|
||||
@ -301,7 +301,7 @@ static inline void rgb15to32_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb16to32_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb16to32_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
uint8_t *d = dst;
|
||||
@ -324,7 +324,7 @@ static inline void rgb16to32_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void shuffle_bytes_2103_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void shuffle_bytes_2103_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
int idx = 15 - src_size;
|
||||
const uint8_t *s = src-idx;
|
||||
@ -336,7 +336,7 @@ static inline void shuffle_bytes_2103_c(const uint8_t *src, uint8_t *dst, long s
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb24tobgr24_c(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void rgb24tobgr24_c(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
unsigned i;
|
||||
for (i=0; i<src_size; i+=3) {
|
||||
@ -350,11 +350,11 @@ static inline void rgb24tobgr24_c(const uint8_t *src, uint8_t *dst, long src_siz
|
||||
|
||||
static inline void yuvPlanartoyuy2_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride,
|
||||
long dstStride, long vertLumPerChroma)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride,
|
||||
int dstStride, int vertLumPerChroma)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const int chromWidth = width >> 1;
|
||||
for (y=0; y<height; y++) {
|
||||
#if HAVE_FAST_64BIT
|
||||
@ -404,9 +404,9 @@ static inline void yuvPlanartoyuy2_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
*/
|
||||
static inline void yv12toyuy2_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride,
|
||||
long dstStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride,
|
||||
int dstStride)
|
||||
{
|
||||
//FIXME interpolate chroma
|
||||
yuvPlanartoyuy2_c(ysrc, usrc, vsrc, dst, width, height, lumStride,
|
||||
@ -415,11 +415,11 @@ static inline void yv12toyuy2_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
|
||||
static inline void yuvPlanartouyvy_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride,
|
||||
long dstStride, long vertLumPerChroma)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride,
|
||||
int dstStride, int vertLumPerChroma)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const int chromWidth = width >> 1;
|
||||
for (y=0; y<height; y++) {
|
||||
#if HAVE_FAST_64BIT
|
||||
@ -469,9 +469,9 @@ static inline void yuvPlanartouyvy_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
*/
|
||||
static inline void yv12touyvy_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride,
|
||||
long dstStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride,
|
||||
int dstStride)
|
||||
{
|
||||
//FIXME interpolate chroma
|
||||
yuvPlanartouyvy_c(ysrc, usrc, vsrc, dst, width, height, lumStride,
|
||||
@ -483,9 +483,9 @@ static inline void yv12touyvy_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
*/
|
||||
static inline void yuv422ptouyvy_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride,
|
||||
long dstStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride,
|
||||
int dstStride)
|
||||
{
|
||||
yuvPlanartouyvy_c(ysrc, usrc, vsrc, dst, width, height, lumStride,
|
||||
chromStride, dstStride, 1);
|
||||
@ -496,9 +496,9 @@ static inline void yuv422ptouyvy_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
*/
|
||||
static inline void yuv422ptoyuy2_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride,
|
||||
long dstStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride,
|
||||
int dstStride)
|
||||
{
|
||||
yuvPlanartoyuy2_c(ysrc, usrc, vsrc, dst, width, height, lumStride,
|
||||
chromStride, dstStride, 1);
|
||||
@ -510,14 +510,14 @@ static inline void yuv422ptoyuy2_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
*/
|
||||
static inline void yuy2toyv12_c(const uint8_t *src, uint8_t *ydst,
|
||||
uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride,
|
||||
long srcStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride,
|
||||
int srcStride)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const int chromWidth = width >> 1;
|
||||
for (y=0; y<height; y+=2) {
|
||||
long i;
|
||||
int i;
|
||||
for (i=0; i<chromWidth; i++) {
|
||||
ydst[2*i+0] = src[4*i+0];
|
||||
udst[i] = src[4*i+1];
|
||||
@ -538,10 +538,10 @@ static inline void yuy2toyv12_c(const uint8_t *src, uint8_t *ydst,
|
||||
}
|
||||
}
|
||||
|
||||
static inline void planar2x_c(const uint8_t *src, uint8_t *dst, long srcWidth,
|
||||
long srcHeight, long srcStride, long dstStride)
|
||||
static inline void planar2x_c(const uint8_t *src, uint8_t *dst, int srcWidth,
|
||||
int srcHeight, int srcStride, int dstStride)
|
||||
{
|
||||
long x,y;
|
||||
int x,y;
|
||||
|
||||
dst[0]= src[0];
|
||||
|
||||
@ -598,14 +598,14 @@ static inline void planar2x_c(const uint8_t *src, uint8_t *dst, long srcWidth,
|
||||
*/
|
||||
static inline void uyvytoyv12_c(const uint8_t *src, uint8_t *ydst,
|
||||
uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride,
|
||||
long srcStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride,
|
||||
int srcStride)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const int chromWidth = width >> 1;
|
||||
for (y=0; y<height; y+=2) {
|
||||
long i;
|
||||
int i;
|
||||
for (i=0; i<chromWidth; i++) {
|
||||
udst[i] = src[4*i+0];
|
||||
ydst[2*i+0] = src[4*i+1];
|
||||
@ -634,14 +634,14 @@ static inline void uyvytoyv12_c(const uint8_t *src, uint8_t *ydst,
|
||||
* FIXME: Write HQ version.
|
||||
*/
|
||||
void rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,
|
||||
uint8_t *vdst, long width, long height, long lumStride,
|
||||
long chromStride, long srcStride)
|
||||
uint8_t *vdst, int width, int height, int lumStride,
|
||||
int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const int chromWidth = width >> 1;
|
||||
y=0;
|
||||
for (; y<height; y+=2) {
|
||||
long i;
|
||||
int i;
|
||||
for (i=0; i<chromWidth; i++) {
|
||||
unsigned int b = src[6*i+0];
|
||||
unsigned int g = src[6*i+1];
|
||||
@ -689,14 +689,14 @@ void rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,
|
||||
}
|
||||
|
||||
static void interleaveBytes_c(const uint8_t *src1, const uint8_t *src2,
|
||||
uint8_t *dest, long width,
|
||||
long height, long src1Stride,
|
||||
long src2Stride, long dstStride)
|
||||
uint8_t *dest, int width,
|
||||
int height, int src1Stride,
|
||||
int src2Stride, int dstStride)
|
||||
{
|
||||
long h;
|
||||
int h;
|
||||
|
||||
for (h=0; h < height; h++) {
|
||||
long w;
|
||||
int w;
|
||||
for (w=0; w < width; w++) {
|
||||
dest[2*w+0] = src1[w];
|
||||
dest[2*w+1] = src2[w];
|
||||
@ -709,12 +709,12 @@ static void interleaveBytes_c(const uint8_t *src1, const uint8_t *src2,
|
||||
|
||||
static inline void vu9_to_vu12_c(const uint8_t *src1, const uint8_t *src2,
|
||||
uint8_t *dst1, uint8_t *dst2,
|
||||
long width, long height,
|
||||
long srcStride1, long srcStride2,
|
||||
long dstStride1, long dstStride2)
|
||||
int width, int height,
|
||||
int srcStride1, int srcStride2,
|
||||
int dstStride1, int dstStride2)
|
||||
{
|
||||
int y;
|
||||
long x,w,h;
|
||||
int x,w,h;
|
||||
w=width/2; h=height/2;
|
||||
for (y=0;y<h;y++) {
|
||||
const uint8_t* s1=src1+srcStride1*(y>>1);
|
||||
@ -732,12 +732,12 @@ static inline void vu9_to_vu12_c(const uint8_t *src1, const uint8_t *src2,
|
||||
|
||||
static inline void yvu9_to_yuy2_c(const uint8_t *src1, const uint8_t *src2,
|
||||
const uint8_t *src3, uint8_t *dst,
|
||||
long width, long height,
|
||||
long srcStride1, long srcStride2,
|
||||
long srcStride3, long dstStride)
|
||||
int width, int height,
|
||||
int srcStride1, int srcStride2,
|
||||
int srcStride3, int dstStride)
|
||||
{
|
||||
int x;
|
||||
long y,w,h;
|
||||
int y,w,h;
|
||||
w=width/2; h=height;
|
||||
for (y=0;y<h;y++) {
|
||||
const uint8_t* yp=src1+srcStride1*y;
|
||||
@ -746,7 +746,7 @@ static inline void yvu9_to_yuy2_c(const uint8_t *src1, const uint8_t *src2,
|
||||
uint8_t* d=dst+dstStride*y;
|
||||
x=0;
|
||||
for (; x<w; x++) {
|
||||
const long x2 = x<<2;
|
||||
const int x2 = x<<2;
|
||||
d[8*x+0] = yp[x2];
|
||||
d[8*x+1] = up[x];
|
||||
d[8*x+2] = yp[x2+1];
|
||||
@ -833,11 +833,11 @@ static void extract_odd2avg_c(const uint8_t *src0, const uint8_t *src1,
|
||||
}
|
||||
|
||||
static void yuyvtoyuv420_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
const uint8_t *src, long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
const uint8_t *src, int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
const long chromWidth= -((-width)>>1);
|
||||
int y;
|
||||
const int chromWidth= -((-width)>>1);
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
extract_even_c(src, ydst, width);
|
||||
@ -853,11 +853,11 @@ static void yuyvtoyuv420_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
}
|
||||
|
||||
static void yuyvtoyuv422_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
const uint8_t *src, long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
const uint8_t *src, int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
const long chromWidth= -((-width)>>1);
|
||||
int y;
|
||||
const int chromWidth= -((-width)>>1);
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
extract_even_c(src, ydst, width);
|
||||
@ -871,11 +871,11 @@ static void yuyvtoyuv422_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
}
|
||||
|
||||
static void uyvytoyuv420_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
const uint8_t *src, long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
const uint8_t *src, int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
const long chromWidth= -((-width)>>1);
|
||||
int y;
|
||||
const int chromWidth= -((-width)>>1);
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
extract_even_c(src + 1, ydst, width);
|
||||
@ -891,11 +891,11 @@ static void uyvytoyuv420_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
}
|
||||
|
||||
static void uyvytoyuv422_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
const uint8_t *src, long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
const uint8_t *src, int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
const long chromWidth= -((-width)>>1);
|
||||
int y;
|
||||
const int chromWidth= -((-width)>>1);
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
extract_even_c(src + 1, ydst, width);
|
||||
|
@ -980,7 +980,7 @@ static void fillPlane(uint8_t* plane, int stride, int width, int height, int y,
|
||||
}
|
||||
}
|
||||
|
||||
static inline void rgb48ToY(uint8_t *dst, const uint8_t *src, long width,
|
||||
static inline void rgb48ToY(uint8_t *dst, const uint8_t *src, int width,
|
||||
uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
@ -995,7 +995,7 @@ static inline void rgb48ToY(uint8_t *dst, const uint8_t *src, long width,
|
||||
|
||||
static inline void rgb48ToUV(uint8_t *dstU, uint8_t *dstV,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
long width, uint32_t *unused)
|
||||
int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
assert(src1==src2);
|
||||
@ -1011,7 +1011,7 @@ static inline void rgb48ToUV(uint8_t *dstU, uint8_t *dstV,
|
||||
|
||||
static inline void rgb48ToUV_half(uint8_t *dstU, uint8_t *dstV,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
long width, uint32_t *unused)
|
||||
int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
assert(src1==src2);
|
||||
@ -1025,7 +1025,7 @@ static inline void rgb48ToUV_half(uint8_t *dstU, uint8_t *dstV,
|
||||
}
|
||||
}
|
||||
|
||||
static inline void bgr48ToY(uint8_t *dst, const uint8_t *src, long width,
|
||||
static inline void bgr48ToY(uint8_t *dst, const uint8_t *src, int width,
|
||||
uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
@ -1040,7 +1040,7 @@ static inline void bgr48ToY(uint8_t *dst, const uint8_t *src, long width,
|
||||
|
||||
static inline void bgr48ToUV(uint8_t *dstU, uint8_t *dstV,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
long width, uint32_t *unused)
|
||||
int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < width; i++) {
|
||||
@ -1055,7 +1055,7 @@ static inline void bgr48ToUV(uint8_t *dstU, uint8_t *dstV,
|
||||
|
||||
static inline void bgr48ToUV_half(uint8_t *dstU, uint8_t *dstV,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
long width, uint32_t *unused)
|
||||
int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < width; i++) {
|
||||
@ -1069,7 +1069,7 @@ static inline void bgr48ToUV_half(uint8_t *dstU, uint8_t *dstV,
|
||||
}
|
||||
|
||||
#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;\
|
||||
for (i=0; i<width; i++) {\
|
||||
@ -1090,7 +1090,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, 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;
|
||||
for (i=0; i<width; i++) {
|
||||
@ -1099,7 +1099,7 @@ static inline void abgrToA(uint8_t *dst, const uint8_t *src, long width, uint32_
|
||||
}
|
||||
|
||||
#define BGR2UV(type, name, shr, shg, shb, shp, 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;\
|
||||
for (i=0; i<width; i++) {\
|
||||
@ -1111,7 +1111,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);\
|
||||
}\
|
||||
}\
|
||||
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;\
|
||||
for (i=0; i<width; i++) {\
|
||||
@ -1138,7 +1138,7 @@ BGR2UV(uint16_t, bgr15ToUV, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, RU<<10, GU<<
|
||||
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, long width, uint32_t *pal)
|
||||
static inline void palToY(uint8_t *dst, const uint8_t *src, int width, uint32_t *pal)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<width; i++) {
|
||||
@ -1150,7 +1150,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,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
long width, uint32_t *pal)
|
||||
int width, uint32_t *pal)
|
||||
{
|
||||
int i;
|
||||
assert(src1 == src2);
|
||||
@ -1162,7 +1162,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;
|
||||
for (i=0; i<width/8; i++) {
|
||||
@ -1172,7 +1172,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;
|
||||
for (i=0; i<width/8; i++) {
|
||||
@ -1365,24 +1365,24 @@ static int uyvyToYuv422Wrapper(SwsContext *c, const uint8_t* src[], int srcStrid
|
||||
return srcSliceH;
|
||||
}
|
||||
|
||||
static void gray8aToPacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
|
||||
static void gray8aToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
|
||||
{
|
||||
long i;
|
||||
int i;
|
||||
for (i=0; i<num_pixels; i++)
|
||||
((uint32_t *) dst)[i] = ((const uint32_t *)palette)[src[i<<1]] | (src[(i<<1)+1] << 24);
|
||||
}
|
||||
|
||||
static void gray8aToPacked32_1(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
|
||||
static void gray8aToPacked32_1(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
|
||||
{
|
||||
long i;
|
||||
int i;
|
||||
|
||||
for (i=0; i<num_pixels; i++)
|
||||
((uint32_t *) dst)[i] = ((const uint32_t *)palette)[src[i<<1]] | src[(i<<1)+1];
|
||||
}
|
||||
|
||||
static void gray8aToPacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
|
||||
static void gray8aToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
|
||||
{
|
||||
long i;
|
||||
int i;
|
||||
|
||||
for (i=0; i<num_pixels; i++) {
|
||||
//FIXME slow?
|
||||
@ -1398,7 +1398,7 @@ static int palToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[],
|
||||
{
|
||||
const enum PixelFormat srcFormat= c->srcFormat;
|
||||
const enum PixelFormat dstFormat= c->dstFormat;
|
||||
void (*conv)(const uint8_t *src, uint8_t *dst, long num_pixels,
|
||||
void (*conv)(const uint8_t *src, uint8_t *dst, int num_pixels,
|
||||
const uint8_t *palette)=NULL;
|
||||
int i;
|
||||
uint8_t *dstPtr= dst[0] + dstStride[0]*srcSliceY;
|
||||
@ -1455,7 +1455,7 @@ static int rgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[],
|
||||
const int dstBpp= (c->dstFormatBpp + 7) >> 3;
|
||||
const int srcId= c->srcFormatBpp >> 2; /* 1:0, 4:1, 8:2, 15:3, 16:4, 24:6, 32:8 */
|
||||
const int dstId= c->dstFormatBpp >> 2;
|
||||
void (*conv)(const uint8_t *src, uint8_t *dst, long src_size)=NULL;
|
||||
void (*conv)(const uint8_t *src, uint8_t *dst, int src_size)=NULL;
|
||||
|
||||
#define CONV_IS(src, dst) (srcFormat == PIX_FMT_##src && dstFormat == PIX_FMT_##dst)
|
||||
|
||||
@ -2057,18 +2057,18 @@ int sws_scale(SwsContext *c, const uint8_t* const src[], const int srcStride[],
|
||||
}
|
||||
|
||||
/* Convert the palette to the same packed 32-bit format as the palette */
|
||||
void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
|
||||
void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
|
||||
{
|
||||
long i;
|
||||
int i;
|
||||
|
||||
for (i=0; i<num_pixels; i++)
|
||||
((uint32_t *) dst)[i] = ((const uint32_t *) palette)[src[i]];
|
||||
}
|
||||
|
||||
/* Palette format: ABCD -> dst format: ABC */
|
||||
void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
|
||||
void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
|
||||
{
|
||||
long i;
|
||||
int i;
|
||||
|
||||
for (i=0; i<num_pixels; i++) {
|
||||
//FIXME slow?
|
||||
|
@ -335,7 +335,7 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context,
|
||||
* @param num_pixels number of pixels to convert
|
||||
* @param palette array with [256] entries, which must match color arrangement (RGB or BGR) of src
|
||||
*/
|
||||
void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
|
||||
void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette);
|
||||
|
||||
/**
|
||||
* Converts an 8bit paletted frame into a frame with a color depth of 24 bits.
|
||||
@ -347,7 +347,7 @@ void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, long num_pi
|
||||
* @param num_pixels number of pixels to convert
|
||||
* @param palette array with [256] entries, which must match color arrangement (RGB or BGR) of src
|
||||
*/
|
||||
void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
|
||||
void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette);
|
||||
|
||||
|
||||
#endif /* SWSCALE_SWSCALE_H */
|
||||
|
@ -261,7 +261,7 @@ typedef struct SwsContext {
|
||||
const int16_t *chrVSrc, const int16_t *alpSrc,
|
||||
uint8_t *dest,
|
||||
uint8_t *uDest, uint8_t *vDest, uint8_t *aDest,
|
||||
long dstW, long chrDstW);
|
||||
int dstW, int chrDstW);
|
||||
void (*yuv2yuvX )(struct SwsContext *c,
|
||||
const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
@ -269,7 +269,7 @@ typedef struct SwsContext {
|
||||
const int16_t **alpSrc,
|
||||
uint8_t *dest,
|
||||
uint8_t *uDest, uint8_t *vDest, uint8_t *aDest,
|
||||
long dstW, long chrDstW);
|
||||
int dstW, int chrDstW);
|
||||
void (*yuv2packed1)(struct SwsContext *c,
|
||||
const uint16_t *buf0,
|
||||
const uint16_t *ubuf0, const uint16_t *ubuf1,
|
||||
@ -289,26 +289,26 @@ typedef struct SwsContext {
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc, int chrFilterSize,
|
||||
const int16_t **alpSrc, uint8_t *dest,
|
||||
long dstW, long dstY);
|
||||
int dstW, int dstY);
|
||||
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
int16_t *dst, long dstWidth,
|
||||
int16_t *dst, int dstWidth,
|
||||
const uint8_t *src, int srcW, int xInc);
|
||||
void (*hcscale_fast)(struct SwsContext *c,
|
||||
int16_t *dst1, int16_t *dst2, long dstWidth,
|
||||
int16_t *dst1, int16_t *dst2, int dstWidth,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
int srcW, int xInc);
|
||||
|
||||
void (*hScale)(int16_t *dst, int dstW, const uint8_t *src, int srcW,
|
||||
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 (*chrConvertRange)(uint16_t *dst1, uint16_t *dst2, int width); ///< Color range conversion function for chroma planes if needed.
|
||||
|
@ -24,7 +24,7 @@ static inline void yuv2yuvX_c(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
|
||||
uint8_t *aDest, long dstW, long chrDstW)
|
||||
uint8_t *aDest, int dstW, int chrDstW)
|
||||
{
|
||||
yuv2yuvXinC(lumFilter, lumSrc, lumFilterSize,
|
||||
chrFilter, chrUSrc, chrVSrc, chrFilterSize,
|
||||
@ -47,7 +47,7 @@ static inline void yuv2yuv1_c(SwsContext *c, const int16_t *lumSrc,
|
||||
const int16_t *chrUSrc, const int16_t *chrVSrc,
|
||||
const int16_t *alpSrc,
|
||||
uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
|
||||
uint8_t *aDest, long dstW, long chrDstW)
|
||||
uint8_t *aDest, int dstW, int chrDstW)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<dstW; i++) {
|
||||
@ -79,7 +79,7 @@ static inline void yuv2packedX_c(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
yuv2packedXinC(c, lumFilter, lumSrc, lumFilterSize,
|
||||
chrFilter, chrUSrc, chrVSrc, chrFilterSize,
|
||||
@ -128,7 +128,7 @@ static inline void yuv2packed1_c(SwsContext *c, const uint16_t *buf0,
|
||||
|
||||
//FIXME yuy2* can read up to 7 samples too much
|
||||
|
||||
static inline void yuy2ToY_c(uint8_t *dst, const uint8_t *src, long width,
|
||||
static inline void yuy2ToY_c(uint8_t *dst, const uint8_t *src, int width,
|
||||
uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
@ -137,7 +137,7 @@ static inline void yuy2ToY_c(uint8_t *dst, const uint8_t *src, long width,
|
||||
}
|
||||
|
||||
static inline void yuy2ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
const uint8_t *src2, long width, uint32_t *unused)
|
||||
const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<width; i++) {
|
||||
@ -148,7 +148,7 @@ static inline void yuy2ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
}
|
||||
|
||||
static inline void LEToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
const uint8_t *src2, long width, uint32_t *unused)
|
||||
const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
// FIXME I don't think this code is right for YUV444/422, since then h is not subsampled so
|
||||
@ -161,7 +161,7 @@ static inline void LEToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
|
||||
/* This is almost identical to the previous, end exists only because
|
||||
* yuy2ToY/UV)(dst, src+1, ...) would have 100% unaligned accesses. */
|
||||
static inline void uyvyToY_c(uint8_t *dst, const uint8_t *src, long width,
|
||||
static inline void uyvyToY_c(uint8_t *dst, const uint8_t *src, int width,
|
||||
uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
@ -170,7 +170,7 @@ static inline void uyvyToY_c(uint8_t *dst, const uint8_t *src, long width,
|
||||
}
|
||||
|
||||
static inline void uyvyToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
const uint8_t *src2, long width, uint32_t *unused)
|
||||
const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<width; i++) {
|
||||
@ -181,7 +181,7 @@ static inline void uyvyToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
}
|
||||
|
||||
static inline void BEToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
const uint8_t *src2, long width, uint32_t *unused)
|
||||
const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<width; i++) {
|
||||
@ -191,7 +191,7 @@ static inline void BEToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
}
|
||||
|
||||
static inline void nvXXtoUV_c(uint8_t *dst1, uint8_t *dst2,
|
||||
const uint8_t *src, long width)
|
||||
const uint8_t *src, int width)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < width; i++) {
|
||||
@ -202,14 +202,14 @@ static inline void nvXXtoUV_c(uint8_t *dst1, uint8_t *dst2,
|
||||
|
||||
static inline void nv12ToUV_c(uint8_t *dstU, uint8_t *dstV,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
long width, uint32_t *unused)
|
||||
int width, uint32_t *unused)
|
||||
{
|
||||
nvXXtoUV_c(dstU, dstV, src1, width);
|
||||
}
|
||||
|
||||
static inline void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
long width, uint32_t *unused)
|
||||
int width, uint32_t *unused)
|
||||
{
|
||||
nvXXtoUV_c(dstV, dstU, src1, width);
|
||||
}
|
||||
@ -218,7 +218,7 @@ static inline void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV,
|
||||
#define YUV_NBPS(depth, endianness, rfunc) \
|
||||
static inline void endianness ## depth ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
|
||||
const uint8_t *_srcU, const uint8_t *_srcV, \
|
||||
long width, uint32_t *unused) \
|
||||
int width, uint32_t *unused) \
|
||||
{ \
|
||||
int i; \
|
||||
const uint16_t *srcU = (const uint16_t*)_srcU; \
|
||||
@ -229,7 +229,7 @@ static inline void endianness ## depth ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
static inline void endianness ## depth ## ToY_c(uint8_t *dstY, const uint8_t *_srcY, long width, uint32_t *unused) \
|
||||
static inline void endianness ## depth ## ToY_c(uint8_t *dstY, const uint8_t *_srcY, int width, uint32_t *unused) \
|
||||
{ \
|
||||
int i; \
|
||||
const uint16_t *srcY = (const uint16_t*)_srcY; \
|
||||
@ -243,7 +243,7 @@ YUV_NBPS(10, LE, AV_RL16)
|
||||
YUV_NBPS(10, BE, AV_RB16)
|
||||
|
||||
static inline void bgr24ToY_c(uint8_t *dst, const uint8_t *src,
|
||||
long width, uint32_t *unused)
|
||||
int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<width; i++) {
|
||||
@ -256,7 +256,7 @@ static inline void bgr24ToY_c(uint8_t *dst, const uint8_t *src,
|
||||
}
|
||||
|
||||
static inline void bgr24ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
const uint8_t *src2, long width, uint32_t *unused)
|
||||
const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<width; i++) {
|
||||
@ -271,7 +271,7 @@ static inline void bgr24ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1
|
||||
}
|
||||
|
||||
static inline void bgr24ToUV_half_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
const uint8_t *src2, long width, uint32_t *unused)
|
||||
const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<width; i++) {
|
||||
@ -285,7 +285,7 @@ static inline void bgr24ToUV_half_c(uint8_t *dstU, uint8_t *dstV, const uint8_t
|
||||
assert(src1 == src2);
|
||||
}
|
||||
|
||||
static inline void rgb24ToY_c(uint8_t *dst, const uint8_t *src, long width,
|
||||
static inline void rgb24ToY_c(uint8_t *dst, const uint8_t *src, int width,
|
||||
uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
@ -299,7 +299,7 @@ static inline void rgb24ToY_c(uint8_t *dst, const uint8_t *src, long width,
|
||||
}
|
||||
|
||||
static inline void rgb24ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
const uint8_t *src2, long width, uint32_t *unused)
|
||||
const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
assert(src1==src2);
|
||||
@ -314,7 +314,7 @@ static inline void rgb24ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1
|
||||
}
|
||||
|
||||
static inline void rgb24ToUV_half_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
|
||||
const uint8_t *src2, long width, uint32_t *unused)
|
||||
const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
int i;
|
||||
assert(src1==src2);
|
||||
@ -333,7 +333,7 @@ static inline void rgb24ToUV_half_c(uint8_t *dstU, uint8_t *dstV, const uint8_t
|
||||
static inline void hScale_c(int16_t *dst, int dstW, const uint8_t *src,
|
||||
int srcW, int xInc,
|
||||
const int16_t *filter, const int16_t *filterPos,
|
||||
long filterSize)
|
||||
int filterSize)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<dstW; i++) {
|
||||
@ -380,7 +380,7 @@ static void lumRangeFromJpeg_c(uint16_t *dst, int width)
|
||||
dst[i] = (dst[i]*14071 + 33561947)>>14;
|
||||
}
|
||||
|
||||
static inline void hyscale_fast_c(SwsContext *c, int16_t *dst, long dstWidth,
|
||||
static inline void hyscale_fast_c(SwsContext *c, int16_t *dst, int dstWidth,
|
||||
const uint8_t *src, int srcW, int xInc)
|
||||
{
|
||||
int i;
|
||||
@ -394,14 +394,14 @@ static inline void hyscale_fast_c(SwsContext *c, int16_t *dst, long dstWidth,
|
||||
}
|
||||
|
||||
// *** horizontal scale Y line to temp buffer
|
||||
static inline void hyscale_c(SwsContext *c, uint16_t *dst, long dstWidth,
|
||||
static inline void hyscale_c(SwsContext *c, uint16_t *dst, int dstWidth,
|
||||
const uint8_t *src, int srcW, int xInc,
|
||||
const int16_t *hLumFilter,
|
||||
const int16_t *hLumFilterPos, int hLumFilterSize,
|
||||
uint8_t *formatConvBuffer,
|
||||
uint32_t *pal, int isAlpha)
|
||||
{
|
||||
void (*toYV12)(uint8_t *, const uint8_t *, long, uint32_t *) = isAlpha ? c->alpToYV12 : c->lumToYV12;
|
||||
void (*toYV12)(uint8_t *, const uint8_t *, int, uint32_t *) = isAlpha ? c->alpToYV12 : c->lumToYV12;
|
||||
void (*convertRange)(uint16_t *, int) = isAlpha ? NULL : c->lumConvertRange;
|
||||
|
||||
src += isAlpha ? c->alpSrcOffset : c->lumSrcOffset;
|
||||
@ -422,7 +422,7 @@ static inline void hyscale_c(SwsContext *c, uint16_t *dst, long dstWidth,
|
||||
}
|
||||
|
||||
static inline void hcscale_fast_c(SwsContext *c, int16_t *dst1, int16_t *dst2,
|
||||
long dstWidth, const uint8_t *src1,
|
||||
int dstWidth, const uint8_t *src1,
|
||||
const uint8_t *src2, int srcW, int xInc)
|
||||
{
|
||||
int i;
|
||||
@ -436,7 +436,7 @@ static inline void hcscale_fast_c(SwsContext *c, int16_t *dst1, int16_t *dst2,
|
||||
}
|
||||
}
|
||||
|
||||
inline static void hcscale_c(SwsContext *c, uint16_t *dst1, uint16_t *dst2, long dstWidth,
|
||||
inline static void hcscale_c(SwsContext *c, uint16_t *dst1, uint16_t *dst2, int dstWidth,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
int srcW, int xInc, const int16_t *hChrFilter,
|
||||
const int16_t *hChrFilterPos, int hChrFilterSize,
|
||||
|
@ -61,7 +61,7 @@
|
||||
|
||||
#if !COMPILE_TEMPLATE_AMD3DNOW
|
||||
|
||||
static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
uint8_t *dest = dst;
|
||||
const uint8_t *s = src;
|
||||
@ -143,7 +143,7 @@ static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, long s
|
||||
MOVNTQ" %%mm4, 16%0"
|
||||
|
||||
|
||||
static inline void RENAME(rgb32tobgr24)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
uint8_t *dest = dst;
|
||||
const uint8_t *s = src;
|
||||
@ -186,7 +186,7 @@ static inline void RENAME(rgb32tobgr24)(const uint8_t *src, uint8_t *dst, long s
|
||||
MMX2, 3DNOW optimization by Nick Kurshev
|
||||
32-bit C version, and and&add trick by Michael Niedermayer
|
||||
*/
|
||||
static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
register const uint8_t* s=src;
|
||||
register uint8_t* d=dst;
|
||||
@ -230,7 +230,7 @@ static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, long src_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
register const uint8_t* s=src;
|
||||
register uint8_t* d=dst;
|
||||
@ -279,7 +279,7 @@ static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, long src_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -371,7 +371,7 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, long src_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -426,7 +426,7 @@ static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long s
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -518,7 +518,7 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -573,7 +573,7 @@ static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long s
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -630,7 +630,7 @@ static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long s
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -687,7 +687,7 @@ static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, long src_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -744,7 +744,7 @@ static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long s
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
@ -822,7 +822,7 @@ static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_
|
||||
|
|
||||
original bits
|
||||
*/
|
||||
static inline void RENAME(rgb15tobgr24)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
const uint16_t *mm_end;
|
||||
@ -925,7 +925,7 @@ static inline void RENAME(rgb15tobgr24)(const uint8_t *src, uint8_t *dst, long s
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb16tobgr24)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
const uint16_t *mm_end;
|
||||
@ -1046,7 +1046,7 @@ static inline void RENAME(rgb16tobgr24)(const uint8_t *src, uint8_t *dst, long s
|
||||
MOVNTQ" %%mm0, %0 \n\t" \
|
||||
MOVNTQ" %%mm3, 8%0 \n\t" \
|
||||
|
||||
static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
const uint16_t *mm_end;
|
||||
@ -1088,7 +1088,7 @@ static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb16to32)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
const uint16_t *mm_end;
|
||||
@ -1130,7 +1130,7 @@ static inline void RENAME(rgb16to32)(const uint8_t *src, uint8_t *dst, long src_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
x86_reg idx = 15 - src_size;
|
||||
const uint8_t *s = src-idx;
|
||||
@ -1192,7 +1192,7 @@ static inline void RENAME(shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst,
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size)
|
||||
{
|
||||
unsigned i;
|
||||
x86_reg mmx_size= 23 - src_size;
|
||||
@ -1260,10 +1260,10 @@ static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long s
|
||||
}
|
||||
|
||||
static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride, int vertLumPerChroma)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const x86_reg chromWidth= width>>1;
|
||||
for (y=0; y<height; y++) {
|
||||
//FIXME handle 2 lines at once (fewer prefetches, reuse some chroma, but very likely memory-limited anyway)
|
||||
@ -1317,18 +1317,18 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u
|
||||
* (If this is a problem for anyone then tell me, and I will fix it.)
|
||||
*/
|
||||
static inline void RENAME(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride)
|
||||
{
|
||||
//FIXME interpolate chroma
|
||||
RENAME(yuvPlanartoyuy2)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 2);
|
||||
}
|
||||
|
||||
static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride, int vertLumPerChroma)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const x86_reg chromWidth= width>>1;
|
||||
for (y=0; y<height; y++) {
|
||||
//FIXME handle 2 lines at once (fewer prefetches, reuse some chroma, but very likely memory-limited anyway)
|
||||
@ -1382,8 +1382,8 @@ static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *u
|
||||
* (If this is a problem for anyone then tell me, and I will fix it.)
|
||||
*/
|
||||
static inline void RENAME(yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride)
|
||||
{
|
||||
//FIXME interpolate chroma
|
||||
RENAME(yuvPlanartouyvy)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 2);
|
||||
@ -1393,8 +1393,8 @@ static inline void RENAME(yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
* Width should be a multiple of 16.
|
||||
*/
|
||||
static inline void RENAME(yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride)
|
||||
{
|
||||
RENAME(yuvPlanartouyvy)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 1);
|
||||
}
|
||||
@ -1403,8 +1403,8 @@ static inline void RENAME(yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usr
|
||||
* Width should be a multiple of 16.
|
||||
*/
|
||||
static inline void RENAME(yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long dstStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int dstStride)
|
||||
{
|
||||
RENAME(yuvPlanartoyuy2)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 1);
|
||||
}
|
||||
@ -1414,10 +1414,10 @@ static inline void RENAME(yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usr
|
||||
* (If this is a problem for anyone then tell me, and I will fix it.)
|
||||
*/
|
||||
static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const x86_reg chromWidth= width>>1;
|
||||
for (y=0; y<height; y+=2) {
|
||||
__asm__ volatile(
|
||||
@ -1513,9 +1513,9 @@ static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
|
||||
#endif /* !COMPILE_TEMPLATE_AMD3DNOW */
|
||||
|
||||
#if COMPILE_TEMPLATE_MMX2 || COMPILE_TEMPLATE_AMD3DNOW
|
||||
static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, long srcWidth, long srcHeight, long srcStride, long dstStride)
|
||||
static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, int srcWidth, int srcHeight, int srcStride, int dstStride)
|
||||
{
|
||||
long x,y;
|
||||
int x,y;
|
||||
|
||||
dst[0]= src[0];
|
||||
|
||||
@ -1612,10 +1612,10 @@ static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, long srcWi
|
||||
* FIXME: Write HQ version.
|
||||
*/
|
||||
static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const x86_reg chromWidth= width>>1;
|
||||
for (y=0; y<height; y+=2) {
|
||||
__asm__ volatile(
|
||||
@ -1718,13 +1718,13 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
|
||||
* FIXME: Write HQ version.
|
||||
*/
|
||||
static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
int y;
|
||||
const x86_reg chromWidth= width>>1;
|
||||
for (y=0; y<height-2; y+=2) {
|
||||
long i;
|
||||
int i;
|
||||
for (i=0; i<2; i++) {
|
||||
__asm__ volatile(
|
||||
"mov %2, %%"REG_a" \n\t"
|
||||
@ -1963,13 +1963,13 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
|
||||
|
||||
#if !COMPILE_TEMPLATE_AMD3DNOW
|
||||
static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dest,
|
||||
long width, long height, long src1Stride,
|
||||
long src2Stride, long dstStride)
|
||||
int width, int height, int src1Stride,
|
||||
int src2Stride, int dstStride)
|
||||
{
|
||||
long h;
|
||||
int h;
|
||||
|
||||
for (h=0; h < height; h++) {
|
||||
long w;
|
||||
int w;
|
||||
|
||||
#if COMPILE_TEMPLATE_SSE2
|
||||
__asm__(
|
||||
@ -2037,12 +2037,12 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, ui
|
||||
#if !COMPILE_TEMPLATE_AMD3DNOW
|
||||
static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
|
||||
uint8_t *dst1, uint8_t *dst2,
|
||||
long width, long height,
|
||||
long srcStride1, long srcStride2,
|
||||
long dstStride1, long dstStride2)
|
||||
int width, int height,
|
||||
int srcStride1, int srcStride2,
|
||||
int dstStride1, int dstStride2)
|
||||
{
|
||||
x86_reg y;
|
||||
long x,w,h;
|
||||
int x,w,h;
|
||||
w=width/2; h=height/2;
|
||||
__asm__ volatile(
|
||||
PREFETCH" %0 \n\t"
|
||||
@ -2131,12 +2131,12 @@ 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,
|
||||
long width, long height,
|
||||
long srcStride1, long srcStride2,
|
||||
long srcStride3, long dstStride)
|
||||
int width, int height,
|
||||
int srcStride1, int srcStride2,
|
||||
int srcStride3, int dstStride)
|
||||
{
|
||||
x86_reg x;
|
||||
long y,w,h;
|
||||
int y,w,h;
|
||||
w=width/2; h=height;
|
||||
for (y=0;y<h;y++) {
|
||||
const uint8_t* yp=src1+srcStride1*y;
|
||||
@ -2197,7 +2197,7 @@ static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2
|
||||
:"memory");
|
||||
}
|
||||
for (; x<w; x++) {
|
||||
const long x2 = x<<2;
|
||||
const int x2 = x<<2;
|
||||
d[8*x+0] = yp[x2];
|
||||
d[8*x+1] = up[x];
|
||||
d[8*x+2] = yp[x2+1];
|
||||
@ -2459,11 +2459,11 @@ static void RENAME(extract_odd2avg)(const uint8_t *src0, const uint8_t *src1, ui
|
||||
}
|
||||
|
||||
static void RENAME(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
const long chromWidth= -((-width)>>1);
|
||||
int y;
|
||||
const int chromWidth= -((-width)>>1);
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
RENAME(extract_even)(src, ydst, width);
|
||||
@ -2485,11 +2485,11 @@ static void RENAME(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, co
|
||||
|
||||
#if !COMPILE_TEMPLATE_AMD3DNOW
|
||||
static void RENAME(yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
const long chromWidth= -((-width)>>1);
|
||||
int y;
|
||||
const int chromWidth= -((-width)>>1);
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
RENAME(extract_even)(src, ydst, width);
|
||||
@ -2509,11 +2509,11 @@ static void RENAME(yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, co
|
||||
#endif /* !COMPILE_TEMPLATE_AMD3DNOW */
|
||||
|
||||
static void RENAME(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
const long chromWidth= -((-width)>>1);
|
||||
int y;
|
||||
const int chromWidth= -((-width)>>1);
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
RENAME(extract_even)(src+1, ydst, width);
|
||||
@ -2535,11 +2535,11 @@ static void RENAME(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, co
|
||||
|
||||
#if !COMPILE_TEMPLATE_AMD3DNOW
|
||||
static void RENAME(uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
|
||||
long width, long height,
|
||||
long lumStride, long chromStride, long srcStride)
|
||||
int width, int height,
|
||||
int lumStride, int chromStride, int srcStride)
|
||||
{
|
||||
long y;
|
||||
const long chromWidth= -((-width)>>1);
|
||||
int y;
|
||||
const int chromWidth= -((-width)>>1);
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
RENAME(extract_even)(src+1, ydst, width);
|
||||
|
@ -78,7 +78,7 @@ static inline void RENAME(yuv2yuvX)(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
|
||||
uint8_t *aDest, long dstW, long chrDstW)
|
||||
uint8_t *aDest, int dstW, int chrDstW)
|
||||
{
|
||||
if (uDest) {
|
||||
x86_reg uv_off = c->uv_off;
|
||||
@ -159,7 +159,7 @@ static inline void RENAME(yuv2yuvX_ar)(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
|
||||
uint8_t *aDest, long dstW, long chrDstW)
|
||||
uint8_t *aDest, int dstW, int chrDstW)
|
||||
{
|
||||
if (uDest) {
|
||||
x86_reg uv_off = c->uv_off;
|
||||
@ -190,9 +190,9 @@ static inline void RENAME(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc,
|
||||
const int16_t *chrUSrc, const int16_t *chrVSrc,
|
||||
const int16_t *alpSrc,
|
||||
uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
|
||||
uint8_t *aDest, long dstW, long chrDstW)
|
||||
uint8_t *aDest, int dstW, int chrDstW)
|
||||
{
|
||||
long p= 4;
|
||||
int p= 4;
|
||||
const uint8_t *src[4]= { alpSrc + dstW, lumSrc + dstW, chrUSrc + chrDstW, chrVSrc + chrDstW };
|
||||
uint8_t *dst[4]= { aDest, dest, uDest, vDest };
|
||||
x86_reg counter[4]= { dstW, dstW, chrDstW, chrDstW };
|
||||
@ -231,9 +231,9 @@ static inline void RENAME(yuv2yuv1_ar)(SwsContext *c, const int16_t *lumSrc,
|
||||
const int16_t *chrUSrc, const int16_t *chrVSrc,
|
||||
const int16_t *alpSrc,
|
||||
uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
|
||||
uint8_t *aDest, long dstW, long chrDstW)
|
||||
uint8_t *aDest, int dstW, int chrDstW)
|
||||
{
|
||||
long p= 4;
|
||||
int p= 4;
|
||||
const uint8_t *src[4]= { alpSrc + dstW, lumSrc + dstW, chrUSrc + chrDstW, chrVSrc + chrDstW };
|
||||
uint8_t *dst[4]= { aDest, dest, uDest, vDest };
|
||||
x86_reg counter[4]= { dstW, dstW, chrDstW, chrDstW };
|
||||
@ -471,7 +471,7 @@ static inline void RENAME(yuv2rgb32_X_ar)(SwsContext *c, const int16_t *lumFilte
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -504,7 +504,7 @@ static inline void RENAME(yuv2rgb32_X)(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -561,7 +561,7 @@ static inline void RENAME(yuv2rgb565_X_ar)(SwsContext *c, const int16_t *lumFilt
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -585,7 +585,7 @@ static inline void RENAME(yuv2rgb565_X)(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -638,7 +638,7 @@ static inline void RENAME(yuv2rgb555_X_ar)(SwsContext *c, const int16_t *lumFilt
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -662,7 +662,7 @@ static inline void RENAME(yuv2rgb555_X)(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -795,7 +795,7 @@ static inline void RENAME(yuv2bgr24_X_ar)(SwsContext *c, const int16_t *lumFilte
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -819,7 +819,7 @@ static inline void RENAME(yuv2bgr24_X)(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -860,7 +860,7 @@ static inline void RENAME(yuv2yuyv422_X_ar)(SwsContext *c, const int16_t *lumFil
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -881,7 +881,7 @@ static inline void RENAME(yuv2yuyv422_X)(SwsContext *c, const int16_t *lumFilter
|
||||
const int16_t *chrFilter, const int16_t **chrUSrc,
|
||||
const int16_t **chrVSrc,
|
||||
int chrFilterSize, const int16_t **alpSrc,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
uint8_t *dest, int dstW, int dstY)
|
||||
{
|
||||
x86_reg dummy=0;
|
||||
x86_reg dstW_reg = dstW;
|
||||
@ -1578,7 +1578,7 @@ static inline void RENAME(yuv2yuyv422_1)(SwsContext *c, const uint16_t *buf0,
|
||||
#if !COMPILE_TEMPLATE_MMX2
|
||||
//FIXME yuy2* can read up to 7 samples too much
|
||||
|
||||
static inline void RENAME(yuy2ToY)(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
|
||||
static inline void RENAME(yuy2ToY)(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
|
||||
{
|
||||
__asm__ volatile(
|
||||
"movq "MANGLE(bm01010101)", %%mm2 \n\t"
|
||||
@ -1597,7 +1597,7 @@ static inline void RENAME(yuy2ToY)(uint8_t *dst, const uint8_t *src, long width,
|
||||
);
|
||||
}
|
||||
|
||||
static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
|
||||
static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
__asm__ volatile(
|
||||
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
|
||||
@ -1623,7 +1623,7 @@ static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t
|
||||
assert(src1 == src2);
|
||||
}
|
||||
|
||||
static inline void RENAME(LEToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
|
||||
static inline void RENAME(LEToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
__asm__ volatile(
|
||||
"mov %0, %%"REG_a" \n\t"
|
||||
@ -1649,7 +1649,7 @@ static inline void RENAME(LEToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *s
|
||||
|
||||
/* This is almost identical to the previous, end exists only because
|
||||
* yuy2ToY/UV)(dst, src+1, ...) would have 100% unaligned accesses. */
|
||||
static inline void RENAME(uyvyToY)(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
|
||||
static inline void RENAME(uyvyToY)(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
|
||||
{
|
||||
__asm__ volatile(
|
||||
"mov %0, %%"REG_a" \n\t"
|
||||
@ -1667,7 +1667,7 @@ static inline void RENAME(uyvyToY)(uint8_t *dst, const uint8_t *src, long width,
|
||||
);
|
||||
}
|
||||
|
||||
static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
|
||||
static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
__asm__ volatile(
|
||||
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
|
||||
@ -1693,7 +1693,7 @@ static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t
|
||||
assert(src1 == src2);
|
||||
}
|
||||
|
||||
static inline void RENAME(BEToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
|
||||
static inline void RENAME(BEToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
__asm__ volatile(
|
||||
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
|
||||
@ -1719,7 +1719,7 @@ static inline void RENAME(BEToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *s
|
||||
}
|
||||
|
||||
static inline void RENAME(nvXXtoUV)(uint8_t *dst1, uint8_t *dst2,
|
||||
const uint8_t *src, long width)
|
||||
const uint8_t *src, int width)
|
||||
{
|
||||
__asm__ volatile(
|
||||
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
|
||||
@ -1746,20 +1746,20 @@ static inline void RENAME(nvXXtoUV)(uint8_t *dst1, uint8_t *dst2,
|
||||
|
||||
static inline void RENAME(nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
long width, uint32_t *unused)
|
||||
int width, uint32_t *unused)
|
||||
{
|
||||
RENAME(nvXXtoUV)(dstU, dstV, src1, width);
|
||||
}
|
||||
|
||||
static inline void RENAME(nv21ToUV)(uint8_t *dstU, uint8_t *dstV,
|
||||
const uint8_t *src1, const uint8_t *src2,
|
||||
long width, uint32_t *unused)
|
||||
int width, uint32_t *unused)
|
||||
{
|
||||
RENAME(nvXXtoUV)(dstV, dstU, src1, width);
|
||||
}
|
||||
#endif /* !COMPILE_TEMPLATE_MMX2 */
|
||||
|
||||
static inline void RENAME(bgr24ToY_mmx)(uint8_t *dst, const uint8_t *src, long width, enum PixelFormat srcFormat)
|
||||
static inline void RENAME(bgr24ToY_mmx)(uint8_t *dst, const uint8_t *src, int width, enum PixelFormat srcFormat)
|
||||
{
|
||||
|
||||
if(srcFormat == PIX_FMT_BGR24) {
|
||||
@ -1812,7 +1812,7 @@ static inline void RENAME(bgr24ToY_mmx)(uint8_t *dst, const uint8_t *src, long w
|
||||
);
|
||||
}
|
||||
|
||||
static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, long width, enum PixelFormat srcFormat)
|
||||
static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, int width, enum PixelFormat srcFormat)
|
||||
{
|
||||
__asm__ volatile(
|
||||
"movq 24(%4), %%mm6 \n\t"
|
||||
@ -1870,23 +1870,23 @@ static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uin
|
||||
);
|
||||
}
|
||||
|
||||
static inline void RENAME(bgr24ToY)(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
|
||||
static inline void RENAME(bgr24ToY)(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
|
||||
{
|
||||
RENAME(bgr24ToY_mmx)(dst, src, width, PIX_FMT_BGR24);
|
||||
}
|
||||
|
||||
static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
|
||||
static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);
|
||||
assert(src1 == src2);
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb24ToY)(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
|
||||
static inline void RENAME(rgb24ToY)(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
|
||||
{
|
||||
RENAME(bgr24ToY_mmx)(dst, src, width, PIX_FMT_RGB24);
|
||||
}
|
||||
|
||||
static inline void RENAME(rgb24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
|
||||
static inline void RENAME(rgb24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
|
||||
{
|
||||
assert(src1==src2);
|
||||
RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_RGB24);
|
||||
@ -1895,7 +1895,7 @@ static inline void RENAME(rgb24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t
|
||||
#if !COMPILE_TEMPLATE_MMX2
|
||||
// bilinear / bicubic scaling
|
||||
static inline void RENAME(hScale)(int16_t *dst, int dstW, const uint8_t *src, int srcW, int xInc,
|
||||
const int16_t *filter, const int16_t *filterPos, long filterSize)
|
||||
const int16_t *filter, const int16_t *filterPos, int filterSize)
|
||||
{
|
||||
assert(filterSize % 4 == 0 && filterSize>0);
|
||||
if (filterSize==4) { // Always true for upscaling, sometimes for down, too.
|
||||
@ -2051,7 +2051,7 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, const uint8_t *src, in
|
||||
|
||||
#if COMPILE_TEMPLATE_MMX2
|
||||
static inline void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
|
||||
long dstWidth, const uint8_t *src, int srcW,
|
||||
int dstWidth, const uint8_t *src, int srcW,
|
||||
int xInc)
|
||||
{
|
||||
int32_t *filterPos = c->hLumFilterPos;
|
||||
@ -2123,7 +2123,7 @@ static inline void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
|
||||
}
|
||||
|
||||
static inline void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
|
||||
long dstWidth, const uint8_t *src1,
|
||||
int dstWidth, const uint8_t *src1,
|
||||
const uint8_t *src2, int srcW, int xInc)
|
||||
{
|
||||
int32_t *filterPos = c->hChrFilterPos;
|
||||
|
Loading…
Reference in New Issue
Block a user