diff options
author | Roland Scheidegger <sroland@tungstengraphics.com> | 2009-04-13 15:36:07 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-04-17 10:24:58 -0400 |
commit | a30737b337edb31528174b483c9094941a5d41bb (patch) | |
tree | 32d75dbdfee5ec44567e5e7a7e8c0370cd263a6b /src/radeon_video.c | |
parent | 9dd33cc8346073300312cd5f68de72d9bea1dd6b (diff) |
r200/r300: implement brightness/contrast/hue/saturation/gamma controls for textured video
This implements
contrast/brightness/hue/saturation controls for r200/r300 plus gamma (same
gamma value for all channels used though separate values would be trivial)
control for r300.
Some issues left:
- only r200/r300
- still can't be combined with bicubic
- controls will silently cease to work if the format used is packed and not
planar (except for rv250)
- gamma range is from 100 to 10000 corresponding to 0.1 and 10.0 like used in
overlay. However, usable range is far smaller. Over 2.0 picture gets dark
pretty quickly, and below 0.6 or so black seems to turn into purple (I've
verified that even with gamma 1.0 black actually often seems to be RGB 1/0/1 so
this explains this since that gets amplified by low gamma values - not sure if
this is a rounding problem somewhere, bogus reference values or is somehow
expected).
- gamma adds a bit too many instructions for my taste (7) though the
alternative (3 texture lookups + some swizzling instructions) doesn't seem any
better.
Diffstat (limited to 'src/radeon_video.c')
-rw-r--r-- | src/radeon_video.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c index 6314eb18..84791608 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -541,18 +541,6 @@ static XF86ImageRec Images[NUM_IMAGES] = #endif -/* Reference color space transform data */ -typedef struct tagREF_TRANSFORM -{ - float RefLuma; - float RefRCb; - float RefRCr; - float RefGCb; - float RefGCr; - float RefBCb; - float RefBCr; -} REF_TRANSFORM; - /* Parameters for ITU-R BT.601 and ITU-R BT.709 colour spaces */ static REF_TRANSFORM trans[2] = { @@ -560,7 +548,6 @@ static REF_TRANSFORM trans[2] = {1.1678, 0.0, 1.7980, -0.2139, -0.5345, 2.1186, 0.0} /* BT.709 */ }; - /* Gamma curve definition for preset gammas */ typedef struct tagGAMMA_CURVE_R100 { |