<commit_before>#ifndef __libfixmath_color_h__
#define __libfixmath_color_h__

#include "fix16.h"

typedef union {
        struct {
                uint8_t r;
                uint8_t g;
                uint8_t b;
        };
        uint8_t comp[3];
} __attribute__ ((packed)) color_rgb_t;

typedef union {
        struct {
                fix16_t h;
                fix16_t s;
                fix16_t v;
        };
        fix16_t comp[3];
} __attribute__ ((packed)) color_fix16_hsv_t;

typedef union {
        struct {
                uint8_t h;
                uint8_t s;
                uint8_t v;
        };
        uint8_t comp[3];
} __attribute__ ((packed)) color_uint8_hsv_t;

extern void color_rgb_hsv_convert(const color_rgb_t *,
    color_fix16_hsv_t *);

extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *,
    fix16_t, color_fix16_hsv_t *);

#endif /* !__libfixmath_color_h__ */<commit_msg>Change color structs to bitfields<commit_after>#ifndef __libfixmath_color_h__
#define __libfixmath_color_h__

#include "fix16.h"

typedef union {
        struct {
                unsigned int r:5;
                unsigned int g:5;
                unsigned int b:5;
                unsigned int :1;
        } __packed;
        uint8_t comp[3];
        uint16_t raw;
}  __aligned (4) color_rgb_t;

typedef union {
        struct {
                fix16_t h;
                fix16_t s;
                fix16_t v;
        };
        fix16_t comp[3];
} __aligned (4) color_fix16_hsv_t;

typedef union {
        struct {
                uint8_t h;
                uint8_t s;
                uint8_t v;
        };
        uint8_t comp[3];
} __aligned (4) color_uint8_hsv_t;

extern void color_rgb_hsv_convert(const color_rgb_t *,
    color_fix16_hsv_t *);

extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *,
    fix16_t, color_fix16_hsv_t *);

#endif /* !__libfixmath_color_h__ */
{'fraction_non_alphanumeric': 0.08070356958096224, 'fraction_numerical': 0.03828246249353337, 'mean_word_length': 1.890881913303438, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1508123', 'n_tokens_mistral': 741, 'n_tokens_neox': 678, 'n_words': 139}