aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/swscale_internal.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-28 15:52:50 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-29 02:13:36 +0200
commit986f0d86cbdc92f46e5fbba05fb29526b76162be (patch)
tree6f1a2fd291a6930528a806c9b68c530f9d22f392 /libswscale/swscale_internal.h
parentea535ed50d1b8d751e2d194a987295ab38daf1a2 (diff)
downloadffmpeg-986f0d86cbdc92f46e5fbba05fb29526b76162be.tar.gz
Commits that could not be pulled earlier due to bugs.
commit 93681fbd5082a3af896b7a730dacdd27a3052406 Author: Ronald S. Bultje <rsbultje@gmail.com> Date: Thu May 26 11:32:32 2011 -0400 swscale: fix compile on ppc. commit e758573a887cfb1155e81499ca54f433127cf24e Author: Ronald S. Bultje <rsbultje@gmail.com> Date: Thu May 26 10:36:47 2011 -0400 swscale: fix compile on x86-32. commit 0f4eb8b04341081591bf401eaa2c07d6bc3ff52e Author: Ronald S. Bultje <rsbultje@gmail.com> Date: Thu May 26 09:17:52 2011 -0400 swscale: remove VOF/VOFW. commit b4a224c5e4109cb2cca8bac38628673d685fe763 Author: Ronald S. Bultje <rsbultje@gmail.com> Date: Wed May 25 14:30:09 2011 -0400 swscale: split chroma buffers into separate U/V planes. Preparatory step to implement support for sizes > VOFW.
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r--libswscale/swscale_internal.h38
1 files changed, 22 insertions, 16 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 9f656c9af2..cac40b22f8 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -35,10 +35,6 @@
#define MAX_FILTER_SIZE 256
-#define VOFW 21504
-
-#define VOF (VOFW*2)
-
#if HAVE_BIGENDIAN
#define ALT32_CORR (-1)
#else
@@ -108,7 +104,8 @@ typedef struct SwsContext {
*/
//@{
int16_t **lumPixBuf; ///< Ring buffer for scaled horizontal luma plane lines to be fed to the vertical scaler.
- int16_t **chrPixBuf; ///< Ring buffer for scaled horizontal chroma plane lines to be fed to the vertical scaler.
+ int16_t **chrUPixBuf; ///< Ring buffer for scaled horizontal chroma plane lines to be fed to the vertical scaler.
+ int16_t **chrVPixBuf; ///< Ring buffer for scaled horizontal chroma plane lines to be fed to the vertical scaler.
int16_t **alpPixBuf; ///< Ring buffer for scaled horizontal alpha plane lines to be fed to the vertical scaler.
int vLumBufSize; ///< Number of vertical luma/alpha lines allocated in the ring buffer.
int vChrBufSize; ///< Number of vertical chroma lines allocated in the ring buffer.
@@ -196,6 +193,7 @@ typedef struct SwsContext {
#define V_TEMP "11*8+4*4*256*2+32"
#define Y_TEMP "11*8+4*4*256*2+40"
#define ALP_MMX_FILTER_OFFSET "11*8+4*4*256*2+48"
+#define UV_OFF "11*8+4*4*256*3+48"
DECLARE_ALIGNED(8, uint64_t, redDither);
DECLARE_ALIGNED(8, uint64_t, greenDither);
@@ -218,6 +216,7 @@ typedef struct SwsContext {
DECLARE_ALIGNED(8, uint64_t, v_temp);
DECLARE_ALIGNED(8, uint64_t, y_temp);
int32_t alpMmxFilter[4*MAX_FILTER_SIZE];
+ DECLARE_ALIGNED(8, ptrdiff_t, uv_off); ///< offset (in pixels) between u and v planes
#if HAVE_ALTIVEC
vector signed short CY;
@@ -251,36 +250,42 @@ typedef struct SwsContext {
/* function pointers for swScale() */
void (*yuv2nv12X )(struct SwsContext *c,
const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
- const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize,
+ const int16_t *chrFilter, const int16_t **chrUSrc,
+ const int16_t **chrVSrc, int chrFilterSize,
uint8_t *dest, uint8_t *uDest,
int dstW, int chrDstW, int dstFormat);
void (*yuv2yuv1 )(struct SwsContext *c,
- const int16_t *lumSrc, const int16_t *chrSrc, const int16_t *alpSrc,
+ 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);
void (*yuv2yuvX )(struct SwsContext *c,
const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
- const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize,
+ const int16_t *chrFilter, const int16_t **chrUSrc,
+ 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);
void (*yuv2packed1)(struct SwsContext *c,
const uint16_t *buf0,
- const uint16_t *uvbuf0, const uint16_t *uvbuf1,
+ const uint16_t *ubuf0, const uint16_t *ubuf1,
+ const uint16_t *vbuf0, const uint16_t *vbuf1,
const uint16_t *abuf0,
uint8_t *dest,
int dstW, int uvalpha, int dstFormat, int flags, int y);
void (*yuv2packed2)(struct SwsContext *c,
const uint16_t *buf0, const uint16_t *buf1,
- const uint16_t *uvbuf0, const uint16_t *uvbuf1,
+ 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);
void (*yuv2packedX)(struct SwsContext *c,
const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
- const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize,
+ const int16_t *chrFilter, const int16_t **chrUSrc,
+ const int16_t **chrVSrc, int chrFilterSize,
const int16_t **alpSrc, uint8_t *dest,
long dstW, long dstY);
@@ -295,7 +300,7 @@ typedef struct SwsContext {
int16_t *dst, long dstWidth,
const uint8_t *src, int srcW, int xInc);
void (*hcscale_fast)(struct SwsContext *c,
- int16_t *dst, long dstWidth,
+ int16_t *dst1, int16_t *dst2, long dstWidth,
const uint8_t *src1, const uint8_t *src2,
int srcW, int xInc);
@@ -308,7 +313,7 @@ typedef struct SwsContext {
long filterSize, int shift);
void (*lumConvertRange)(int16_t *dst, int width); ///< Color range conversion function for luma plane if needed.
- void (*chrConvertRange)(int16_t *dst, int width); ///< Color range conversion function for chroma planes if needed.
+ void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width); ///< Color range conversion function for chroma planes if needed.
int lumSrcOffset; ///< Offset given to luma src pointers passed to horizontal input functions.
int chrSrcOffset; ///< Offset given to chroma src pointers passed to horizontal input functions.
@@ -332,9 +337,10 @@ SwsFunc ff_yuv2rgb_init_mlib(SwsContext *c);
SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c);
SwsFunc ff_yuv2rgb_get_func_ptr_bfin(SwsContext *c);
void ff_bfin_get_unscaled_swscale(SwsContext *c);
-void ff_yuv2packedX_altivec(SwsContext *c,
- const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
- const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize,
+void ff_yuv2packedX_altivec(SwsContext *c, const int16_t *lumFilter,
+ const int16_t **lumSrc, int lumFilterSize,
+ const int16_t *chrFilter, const int16_t **chrUSrc,
+ const int16_t **chrVSrc, int chrFilterSize,
uint8_t *dest, int dstW, int dstY);
const char *sws_format_name(enum PixelFormat format);