From 0c47c9028be2cf4b1a557e653606fced5b959445 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 28 Apr 2013 19:28:42 +0200 Subject: sws: support xyz input The implementation is heavily based on Matthias Buerchers and Nicolas Bertrands vf_xyz2rgb.c Signed-off-by: Michael Niedermayer --- libswscale/swscale_internal.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libswscale/swscale_internal.h') diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index be5a80e73b..36ce1ea661 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -380,6 +380,8 @@ typedef struct SwsContext { int dstRange; ///< 0 = MPG YUV range, 1 = JPG YUV range (destination image). int src0Alpha; int dst0Alpha; + int srcXYZ; + int dstXYZ; int yuv2rgb_y_offset; int yuv2rgb_y_coeff; int yuv2rgb_v2r_coeff; @@ -473,6 +475,13 @@ typedef struct SwsContext { #endif int use_mmx_vfilter; +/* pre defined color-spaces gamma */ +#define XYZ_GAMMA (2.6f) +#define RGB_GAMMA (2.2f) + int16_t xyzgamma[4096]; + int16_t rgbgamma[4096]; + int16_t xyz2rgb_matrix[3][4]; + /* function pointers for swScale() */ yuv2planar1_fn yuv2plane1; yuv2planarX_fn yuv2planeX; -- cgit v1.2.3