[PATCH] Stop accessing the attribute array using the attribute name enum.

Matt Turner mattst88 at gmail.com
Tue Oct 6 12:46:24 PDT 2015


On Tue, Oct 6, 2015 at 3:43 AM, Thomas Klausner <wiz at netbsd.org> wrote:
> The whole SMI_VideoAttributes array looks quite strange to me.
>
> static XF86AttributeRec SMI_VideoAttributes[2] = {
>     {XvSettable | XvGettable,        0,           255, XV_BRIGHTNESS_NAME},
>     {XvSettable | XvGettable, 0x000000,      0xFFFFFF, XV_COLORKEY_NAME},
> };
>
> but it is accessed using these defines as indices:
>
> #define XV_ENCODING             0
> #define XV_BRIGHTNESS           1
> #define XV_CAPTURE_BRIGHTNESS   2
> #define XV_CONTRAST             3
> #define XV_SATURATION           4
> #define XV_HUE                  5
> #define XV_COLORKEY             6
> #define XV_INTERLACED           7
>
> However, all of this code including the CLAMP has been this way since
>
> commit 78af703cb019a60cc93843efcd4889ccb15abd13
> Author: Kaleb Keithley <kaleb at freedesktop.org>
> Date:   Fri Nov 14 16:48:55 2003 +0000
>
>     Initial revision
>
>
> I agree that this CLAMP call should go, perhaps just ifdefed out with
> a comment. Not sure what the tradition for this is with xorg.

Just delete it -- the history and the deleted code will still be in git.


More information about the xorg-devel mailing list