diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-07-05 12:49:11 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-11 03:51:46 +0200 |
commit | c59f9a68e2eda847538df367b5b9e7256247ef78 (patch) | |
tree | a8723b7ac590080127bbe8210f9ad8477c025fc4 /libswscale/swscale_internal.h | |
parent | 93a10dd56121862fab13aa6676227673c534cc12 (diff) | |
download | ffmpeg-c59f9a68e2eda847538df367b5b9e7256247ef78.tar.gz |
swscale: error dithering for 16/9/10-bit to 8-bit.
Based on a somewhat similar idea in FFmpeg's swscale copy.
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r-- | libswscale/swscale_internal.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index e19956c079..09e6ad4b01 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -75,8 +75,7 @@ typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t* src[], typedef void (*yuv2planar1_fn) (struct SwsContext *c, const int16_t *lumSrc, const int16_t *chrUSrc, const int16_t *chrVSrc, const int16_t *alpSrc, - uint8_t *dest[4], int dstW, int chrDstW, - const uint8_t *lumDither, const uint8_t *chrDither); + uint8_t *dest[4], int dstW, int chrDstW); /** * Write one line of horizontally scaled Y/U/V/A to planar output * with multi-point vertical scaling between input pixels. @@ -99,7 +98,7 @@ typedef void (*yuv2planarX_fn) (struct 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[4], - int dstW, int chrDstW, const uint8_t *lumDither, const uint8_t *chrDither); + int dstW, int chrDstW); /** * Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB * output without any additional vertical scaling (or point-scaling). Note @@ -323,7 +322,7 @@ typedef struct SwsContext { #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" +#define DITHER32 "11*8+4*4*256*3+80" DECLARE_ALIGNED(8, uint64_t, redDither); DECLARE_ALIGNED(8, uint64_t, greenDither); @@ -351,6 +350,8 @@ typedef struct SwsContext { uint16_t dither16[8]; uint32_t dither32[8]; + const uint8_t *chrDither8, *lumDither8; + #if HAVE_ALTIVEC vector signed short CY; vector signed short CRV; |