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.h | |
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.h')
-rw-r--r-- | src/radeon_video.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/radeon_video.h b/src/radeon_video.h index 44980025..be338715 100644 --- a/src/radeon_video.h +++ b/src/radeon_video.h @@ -123,6 +123,18 @@ typedef struct { int vsync; } RADEONPortPrivRec, *RADEONPortPrivPtr; +/* 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; + xf86CrtcPtr radeon_xv_pick_best_crtc(ScrnInfoPtr pScrn, int x1, int x2, int y1, int y2); |