aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/swscale_internal.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-02 04:41:44 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-02 21:03:55 +0200
commit6713989c231104ff4381ef58f25ec1af8603535b (patch)
treea2e9c22e162bba4c8e5907697839aa25f86141a2 /libswscale/swscale_internal.h
parent877f76ad33bb9b0b0d09565dd9ec1cf8e91096f1 (diff)
downloadffmpeg-6713989c231104ff4381ef58f25ec1af8603535b.tar.gz
swscale: dither for planar yuv outputs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r--libswscale/swscale_internal.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 8577448c38..87712be1b3 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -195,6 +195,8 @@ typedef struct SwsContext {
#define ALP_MMX_FILTER_OFFSET "11*8+4*4*256*2+48"
#define UV_OFF "11*8+4*4*256*3+48"
#define UV_OFFx2 "11*8+4*4*256*3+56"
+#define DITHER16 "11*8+4*4*256*3+64"
+#define DITHER32 "11*8+4*4*256*3+64+16"
DECLARE_ALIGNED(8, uint64_t, redDither);
DECLARE_ALIGNED(8, uint64_t, greenDither);
@@ -219,6 +221,8 @@ typedef struct SwsContext {
int32_t alpMmxFilter[4*MAX_FILTER_SIZE];
DECLARE_ALIGNED(8, ptrdiff_t, uv_off); ///< offset (in pixels) between u and v planes
DECLARE_ALIGNED(8, ptrdiff_t, uv_offx2); ///< offset (in bytes) between u and v planes
+ uint16_t dither16[8];
+ uint32_t dither32[8];
#if HAVE_ALTIVEC
vector signed short CY;
@@ -255,13 +259,13 @@ typedef struct SwsContext {
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);
+ int dstW, int chrDstW, int dstFormat, const uint8_t *lumDither, const uint8_t *chrDither);
void (*yuv2yuv1 )(struct 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,
- int dstW, int chrDstW);
+ int dstW, int chrDstW, const uint8_t *lumDither, const uint8_t *chrDither);
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 +273,7 @@ typedef struct SwsContext {
const int16_t **alpSrc,
uint8_t *dest,
uint8_t *uDest, uint8_t *vDest, uint8_t *aDest,
- int dstW, int chrDstW);
+ int dstW, int chrDstW, const uint8_t *lumDither, const uint8_t *chrDither);
void (*yuv2packed1)(struct SwsContext *c,
const uint16_t *buf0,
const uint16_t *ubuf0, const uint16_t *ubuf1,