summaryrefslogtreecommitdiff
path: root/libswscale/swscale_internal.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-07-05 12:49:11 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2011-07-08 15:15:30 -0700
commit4e3e333a79272944b40695166438359b376d7864 (patch)
treee7e89603def69ffe3372e2257c6f6c8f573614ab /libswscale/swscale_internal.h
parent7d7bacf0f1f43f5cc112977fc3b8438e3e4a4a9b (diff)
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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index b3698a3d94..efb8aff088 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -321,6 +321,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+80"
DECLARE_ALIGNED(8, uint64_t, redDither);
DECLARE_ALIGNED(8, uint64_t, greenDither);
@@ -345,6 +347,10 @@ 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];
+
+ const uint8_t *chrDither8, *lumDither8;
#if HAVE_ALTIVEC
vector signed short CY;