Lines Matching refs:checker
2017 pixel_checker_init (pixel_checker_t *checker, pixman_format_code_t format) in pixel_checker_init() argument
2021 checker->format = format; in pixel_checker_init()
2030 checker->bs = 0; in pixel_checker_init()
2031 checker->gs = 0; in pixel_checker_init()
2032 checker->rs = 0; in pixel_checker_init()
2033 checker->as = 0; in pixel_checker_init()
2038 checker->bs = 0; in pixel_checker_init()
2039 checker->gs = checker->bs + PIXMAN_FORMAT_B (format); in pixel_checker_init()
2040 checker->rs = checker->gs + PIXMAN_FORMAT_G (format); in pixel_checker_init()
2041 checker->as = checker->rs + PIXMAN_FORMAT_R (format); in pixel_checker_init()
2045 checker->rs = 0; in pixel_checker_init()
2046 checker->gs = checker->rs + PIXMAN_FORMAT_R (format); in pixel_checker_init()
2047 checker->bs = checker->gs + PIXMAN_FORMAT_G (format); in pixel_checker_init()
2048 checker->as = checker->bs + PIXMAN_FORMAT_B (format); in pixel_checker_init()
2053 checker->bs = PIXMAN_FORMAT_BPP (format) - PIXMAN_FORMAT_B (format); in pixel_checker_init()
2054 checker->gs = checker->bs - PIXMAN_FORMAT_B (format); in pixel_checker_init()
2055 checker->rs = checker->gs - PIXMAN_FORMAT_G (format); in pixel_checker_init()
2056 checker->as = checker->rs - PIXMAN_FORMAT_R (format); in pixel_checker_init()
2061 checker->rs = PIXMAN_FORMAT_BPP (format) - PIXMAN_FORMAT_R (format); in pixel_checker_init()
2062 checker->gs = checker->rs - PIXMAN_FORMAT_R (format); in pixel_checker_init()
2063 checker->bs = checker->gs - PIXMAN_FORMAT_G (format); in pixel_checker_init()
2064 checker->as = checker->bs - PIXMAN_FORMAT_B (format); in pixel_checker_init()
2072 checker->am = ((1U << PIXMAN_FORMAT_A (format)) - 1) << checker->as; in pixel_checker_init()
2073 checker->rm = ((1U << PIXMAN_FORMAT_R (format)) - 1) << checker->rs; in pixel_checker_init()
2074 checker->gm = ((1U << PIXMAN_FORMAT_G (format)) - 1) << checker->gs; in pixel_checker_init()
2075 checker->bm = ((1U << PIXMAN_FORMAT_B (format)) - 1) << checker->bs; in pixel_checker_init()
2077 checker->aw = PIXMAN_FORMAT_A (format); in pixel_checker_init()
2078 checker->rw = PIXMAN_FORMAT_R (format); in pixel_checker_init()
2079 checker->gw = PIXMAN_FORMAT_G (format); in pixel_checker_init()
2080 checker->bw = PIXMAN_FORMAT_B (format); in pixel_checker_init()
2082 checker->ad = DEVIATION; in pixel_checker_init()
2083 checker->rd = DEVIATION; in pixel_checker_init()
2084 checker->gd = DEVIATION; in pixel_checker_init()
2085 checker->bd = DEVIATION; in pixel_checker_init()
2091 pixel_checker_allow_dither (pixel_checker_t *checker) in pixel_checker_allow_dither() argument
2093 checker->ad += 1 / (double)((1 << checker->aw) - 1); in pixel_checker_allow_dither()
2094 checker->rd += 1 / (double)((1 << checker->rw) - 1); in pixel_checker_allow_dither()
2095 checker->gd += 1 / (double)((1 << checker->gw) - 1); in pixel_checker_allow_dither()
2096 checker->bd += 1 / (double)((1 << checker->bw) - 1); in pixel_checker_allow_dither()
2100 pixel_checker_require_uint32_format (const pixel_checker_t *checker) in pixel_checker_require_uint32_format() argument
2102 assert (checker->format != PIXMAN_rgba_float && in pixel_checker_require_uint32_format()
2103 checker->format != PIXMAN_rgb_float); in pixel_checker_require_uint32_format()
2107 pixel_checker_split_pixel (const pixel_checker_t *checker, uint32_t pixel, in pixel_checker_split_pixel() argument
2110 pixel_checker_require_uint32_format(checker); in pixel_checker_split_pixel()
2112 *a = (pixel & checker->am) >> checker->as; in pixel_checker_split_pixel()
2113 *r = (pixel & checker->rm) >> checker->rs; in pixel_checker_split_pixel()
2114 *g = (pixel & checker->gm) >> checker->gs; in pixel_checker_split_pixel()
2115 *b = (pixel & checker->bm) >> checker->bs; in pixel_checker_split_pixel()
2119 pixel_checker_get_masks (const pixel_checker_t *checker, in pixel_checker_get_masks() argument
2125 pixel_checker_require_uint32_format(checker); in pixel_checker_get_masks()
2128 *am = checker->am; in pixel_checker_get_masks()
2130 *rm = checker->rm; in pixel_checker_get_masks()
2132 *gm = checker->gm; in pixel_checker_get_masks()
2134 *bm = checker->bm; in pixel_checker_get_masks()
2138 pixel_checker_convert_pixel_to_color (const pixel_checker_t *checker, in pixel_checker_convert_pixel_to_color() argument
2143 pixel_checker_require_uint32_format(checker); in pixel_checker_convert_pixel_to_color()
2145 pixel_checker_split_pixel (checker, pixel, &a, &r, &g, &b); in pixel_checker_convert_pixel_to_color()
2147 if (checker->am == 0) in pixel_checker_convert_pixel_to_color()
2150 color->a = a / (double)(checker->am >> checker->as); in pixel_checker_convert_pixel_to_color()
2152 if (checker->rm == 0) in pixel_checker_convert_pixel_to_color()
2155 color->r = r / (double)(checker->rm >> checker->rs); in pixel_checker_convert_pixel_to_color()
2157 if (checker->gm == 0) in pixel_checker_convert_pixel_to_color()
2160 color->g = g / (double)(checker->gm >> checker->gs); in pixel_checker_convert_pixel_to_color()
2162 if (checker->bm == 0) in pixel_checker_convert_pixel_to_color()
2165 color->b = b / (double)(checker->bm >> checker->bs); in pixel_checker_convert_pixel_to_color()
2167 if (PIXMAN_FORMAT_TYPE (checker->format) == PIXMAN_TYPE_ARGB_SRGB) in pixel_checker_convert_pixel_to_color()
2190 get_limits (const pixel_checker_t *checker, double sign, in get_limits() argument
2196 if (PIXMAN_FORMAT_TYPE (checker->format) == PIXMAN_TYPE_ARGB_SRGB) in get_limits()
2206 *ao = convert (color->a + sign * checker->ad, in get_limits()
2207 checker->aw, checker->am, checker->as, 1.0); in get_limits()
2208 *ro = convert (color->r + sign * checker->rd, in get_limits()
2209 checker->rw, checker->rm, checker->rs, 0.0); in get_limits()
2210 *go = convert (color->g + sign * checker->gd, in get_limits()
2211 checker->gw, checker->gm, checker->gs, 0.0); in get_limits()
2212 *bo = convert (color->b + sign * checker->bd, in get_limits()
2213 checker->bw, checker->bm, checker->bs, 0.0); in get_limits()
2217 pixel_checker_get_max (const pixel_checker_t *checker, color_t *color, in pixel_checker_get_max() argument
2220 pixel_checker_require_uint32_format(checker); in pixel_checker_get_max()
2222 get_limits (checker, 1, color, am, rm, gm, bm); in pixel_checker_get_max()
2226 pixel_checker_get_min (const pixel_checker_t *checker, color_t *color, in pixel_checker_get_min() argument
2229 pixel_checker_require_uint32_format(checker); in pixel_checker_get_min()
2231 get_limits (checker, - 1, color, am, rm, gm, bm); in pixel_checker_get_min()
2235 pixel_checker_check (const pixel_checker_t *checker, uint32_t pixel, in pixel_checker_check() argument
2242 pixel_checker_require_uint32_format(checker); in pixel_checker_check()
2244 pixel_checker_get_min (checker, color, &a_lo, &r_lo, &g_lo, &b_lo); in pixel_checker_check()
2245 pixel_checker_get_max (checker, color, &a_hi, &r_hi, &g_hi, &b_hi); in pixel_checker_check()
2246 pixel_checker_split_pixel (checker, pixel, &ai, &ri, &gi, &bi); in pixel_checker_check()
2258 color_limits (const pixel_checker_t *checker, in color_limits() argument
2261 if (PIXMAN_FORMAT_A(checker->format)) in color_limits()
2272 pixel_checker_check_color (const pixel_checker_t *checker, in pixel_checker_check_color() argument
2278 color_limits(checker, -DEVIATION, reference, &min); in pixel_checker_check_color()
2279 color_limits(checker, DEVIATION, reference, &max); in pixel_checker_check_color()