diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-13 13:13:03 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-13 13:13:03 +0000 |
commit | cac335b979a95e31e201f9766d19d737361e09b2 (patch) | |
tree | d967a82132e9a3b80b9593999ba50fe2e17196f5 /src | |
parent | e592eb93dbd7df177993986f01ba6f65c4e20d4a (diff) |
sna/video: Constify a couple of attribute arrays
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_video_overlay.c | 14 | ||||
-rw-r--r-- | src/sna/sna_video_textured.c | 11 |
2 files changed, 11 insertions, 14 deletions
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c index 9ba78ef4..ba6f6714 100644 --- a/src/sna/sna_video_overlay.c +++ b/src/sna/sna_video_overlay.c @@ -70,13 +70,12 @@ static const XF86VideoEncodingRec DummyEncoding[1] = { }; #define NUM_FORMATS 3 - -static XF86VideoFormatRec Formats[NUM_FORMATS] = { +static const XF86VideoFormatRec Formats[NUM_FORMATS] = { {15, TrueColor}, {16, TrueColor}, {24, TrueColor} }; #define NUM_ATTRIBUTES 5 -static XF86AttributeRec Attributes[NUM_ATTRIBUTES] = { +static const XF86AttributeRec Attributes[NUM_ATTRIBUTES] = { {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"}, {XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"}, {XvSettable | XvGettable, 0, 255, "XV_CONTRAST"}, @@ -85,7 +84,7 @@ static XF86AttributeRec Attributes[NUM_ATTRIBUTES] = { }; #define GAMMA_ATTRIBUTES 6 -static XF86AttributeRec GammaAttributes[GAMMA_ATTRIBUTES] = { +static const XF86AttributeRec GammaAttributes[GAMMA_ATTRIBUTES] = { {XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA0"}, {XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA1"}, {XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA2"}, @@ -95,8 +94,7 @@ static XF86AttributeRec GammaAttributes[GAMMA_ATTRIBUTES] = { }; #define NUM_IMAGES 4 - -static XF86ImageRec Images[NUM_IMAGES] = { +static const XF86ImageRec Images[NUM_IMAGES] = { XVIMAGE_YUY2, XVIMAGE_YV12, XVIMAGE_I420, @@ -660,7 +658,7 @@ XF86VideoAdaptorPtr sna_video_overlay_setup(struct sna *sna, adaptor->pEncodings->height = IMAGE_MAX_HEIGHT_LEGACY; } adaptor->nFormats = NUM_FORMATS; - adaptor->pFormats = Formats; + adaptor->pFormats = (XF86VideoFormatPtr)Formats; adaptor->nPorts = 1; adaptor->pPortPrivates = (DevUnion *)&adaptor[1]; @@ -682,7 +680,7 @@ XF86VideoAdaptorPtr sna_video_overlay_setup(struct sna *sna, att += GAMMA_ATTRIBUTES; } adaptor->nImages = NUM_IMAGES; - adaptor->pImages = Images; + adaptor->pImages = (XF86ImagePtr)Images; adaptor->PutVideo = NULL; adaptor->PutStill = NULL; adaptor->GetVideo = NULL; diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c index 88a73689..55c78c96 100644 --- a/src/sna/sna_video_textured.c +++ b/src/sna/sna_video_textured.c @@ -49,14 +49,13 @@ static Atom xvBrightness, xvContrast, xvSyncToVblank; #define NUM_FORMATS 3 - -static XF86VideoFormatRec Formats[NUM_FORMATS] = { +static const XF86VideoFormatRec Formats[NUM_FORMATS] = { {15, TrueColor}, {16, TrueColor}, {24, TrueColor} }; //#define NUM_TEXTURED_ATTRIBUTES 3 #define NUM_TEXTURED_ATTRIBUTES 1 -static XF86AttributeRec TexturedAttributes[] = { +static const XF86AttributeRec TexturedAttributes[] = { {XvSettable | XvGettable, -1, 1, "XV_SYNC_TO_VBLANK"}, {XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"}, {XvSettable | XvGettable, 0, 255, "XV_CONTRAST"}, @@ -70,7 +69,7 @@ static XF86AttributeRec TexturedAttributes[] = { #define XVMC_IMAGE 0 #endif -static XF86ImageRec Images[NUM_IMAGES] = { +static const XF86ImageRec Images[NUM_IMAGES] = { XVIMAGE_YUY2, XVIMAGE_YV12, XVIMAGE_I420, @@ -406,7 +405,7 @@ XF86VideoAdaptorPtr sna_video_textured_setup(struct sna *sna, adaptor->pEncodings[0].rate.numerator = 1; adaptor->pEncodings[0].rate.denominator = 1; adaptor->nFormats = NUM_FORMATS; - adaptor->pFormats = Formats; + adaptor->pFormats = (XF86VideoFormatPtr)Formats; adaptor->nPorts = nports; adaptor->pPortPrivates = devUnions; adaptor->nAttributes = NUM_TEXTURED_ATTRIBUTES; @@ -414,7 +413,7 @@ XF86VideoAdaptorPtr sna_video_textured_setup(struct sna *sna, memcpy(attrs, TexturedAttributes, NUM_TEXTURED_ATTRIBUTES * sizeof(XF86AttributeRec)); adaptor->nImages = NUM_IMAGES; - adaptor->pImages = Images; + adaptor->pImages = (XF86ImagePtr)Images; adaptor->PutVideo = NULL; adaptor->PutStill = NULL; adaptor->GetVideo = NULL; |