Commit 13a09979 authored by Ronald S. Bultje's avatar Ronald S. Bultje

swscale: change prototypes of scaled YUV output functions.

Remove unused variables "flags" and "dstFormat" in yuv2packed1,
merge source rows per plane for yuv2packed[12], and make every
source argument int16_t (some where invalidly set to uint16_t).
This prevents stack pollution and is part of the Great Evil Plan
to simplify swscale.
parent dff5a835
...@@ -98,10 +98,9 @@ yuv2yuvX_altivec_real(SwsContext *c, ...@@ -98,10 +98,9 @@ yuv2yuvX_altivec_real(SwsContext *c,
int lumFilterSize, const int16_t *chrFilter, int lumFilterSize, const int16_t *chrFilter,
const int16_t **chrUSrc, const int16_t **chrVSrc, const int16_t **chrUSrc, const int16_t **chrVSrc,
int chrFilterSize, const int16_t **alpSrc, int chrFilterSize, const int16_t **alpSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *dest[4], int dstW, int chrDstW)
uint8_t *vDest, uint8_t *aDest,
int dstW, int chrDstW)
{ {
uint8_t *yDest = dest[0], *uDest = dest[1], *vDest = dest[2];
const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)}; const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)};
register int i, j; register int i, j;
{ {
...@@ -150,7 +149,7 @@ yuv2yuvX_altivec_real(SwsContext *c, ...@@ -150,7 +149,7 @@ yuv2yuvX_altivec_real(SwsContext *c,
val[i] += lumSrc[j][i] * lumFilter[j]; val[i] += lumSrc[j][i] * lumFilter[j];
} }
} }
altivec_packIntArrayToCharArray(val, dest, dstW); altivec_packIntArrayToCharArray(val, yDest, dstW);
} }
if (uDest != 0) { if (uDest != 0) {
DECLARE_ALIGNED(16, int, u)[chrDstW]; DECLARE_ALIGNED(16, int, u)[chrDstW];
......
This diff is collapsed.
...@@ -60,37 +60,27 @@ typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t* src[], ...@@ -60,37 +60,27 @@ typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t* src[],
typedef void (*yuv2planar1_fn) (struct SwsContext *c, typedef void (*yuv2planar1_fn) (struct SwsContext *c,
const int16_t *lumSrc, const int16_t *chrUSrc, const int16_t *lumSrc, const int16_t *chrUSrc,
const int16_t *chrVSrc, const int16_t *alpSrc, const int16_t *chrVSrc, const int16_t *alpSrc,
uint8_t *dest, uint8_t *dest[4], int dstW, int chrDstW);
uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, typedef void (*yuv2planarX_fn) (struct SwsContext *c, const int16_t *lumFilter,
int dstW, int chrDstW); const int16_t **lumSrc, int lumFilterSize,
typedef void (*yuv2planarX_fn) (struct SwsContext *c,
const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t *chrFilter, const int16_t **chrUSrc,
const int16_t **chrVSrc, int chrFilterSize, const int16_t **chrVSrc, int chrFilterSize,
const int16_t **alpSrc, const int16_t **alpSrc, uint8_t *dest[4],
uint8_t *dest,
uint8_t *uDest, uint8_t *vDest, uint8_t *aDest,
int dstW, int chrDstW); int dstW, int chrDstW);
typedef void (*yuv2packed1_fn) (struct SwsContext *c, typedef void (*yuv2packed1_fn) (struct SwsContext *c, const int16_t *lumSrc,
const uint16_t *buf0, const int16_t *chrUSrc[2], const int16_t *chrVSrc[2],
const uint16_t *ubuf0, const uint16_t *ubuf1, const int16_t *alpSrc, uint8_t *dest,
const uint16_t *vbuf0, const uint16_t *vbuf1, int dstW, int uvalpha, int y);
const uint16_t *abuf0, typedef void (*yuv2packed2_fn) (struct SwsContext *c, const int16_t *lumSrc[2],
uint8_t *dest, const int16_t *chrUSrc[2], const int16_t *chrVSrc[2],
int dstW, int uvalpha, int dstFormat, int flags, int y); const int16_t *alpSrc[2], uint8_t *dest,
typedef void (*yuv2packed2_fn) (struct SwsContext *c,
const uint16_t *buf0, const uint16_t *buf1,
const uint16_t *ubuf0, const uint16_t *ubuf1,
const uint16_t *vbuf0, const uint16_t *vbuf1,
const uint16_t *abuf0, const uint16_t *abuf1,
uint8_t *dest,
int dstW, int yalpha, int uvalpha, int y); int dstW, int yalpha, int uvalpha, int y);
typedef void (*yuv2packedX_fn) (struct SwsContext *c, typedef void (*yuv2packedX_fn) (struct SwsContext *c, const int16_t *lumFilter,
const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t *chrFilter, const int16_t **chrUSrc,
const int16_t **chrVSrc, int chrFilterSize, const int16_t **chrVSrc, int chrFilterSize,
const int16_t **alpSrc, uint8_t *dest, const int16_t **alpSrc, uint8_t *dest,
int dstW, int dstY); int dstW, int y);
/* This struct should be aligned on at least a 32-byte boundary. */ /* This struct should be aligned on at least a 32-byte boundary. */
typedef struct SwsContext { typedef struct SwsContext {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment