Home
last modified time | relevance | path

Searched refs:palette (Results 1 – 25 of 93) sorted by relevance

1234

/external/opencv/otherlibs/highgui/
Dutils.cpp341 void CvtPaletteToGray( const PaletteEntry* palette, uchar* grayPalette, int entries ) in CvtPaletteToGray() argument
346 icvCvt_BGR2Gray_8u_C3C1R( (uchar*)(palette + i), 0, grayPalette + i, 0, cvSize(1,1) ); in CvtPaletteToGray()
351 void FillGrayPalette( PaletteEntry* palette, int bpp, bool negative ) in FillGrayPalette() argument
359 palette[i].b = palette[i].g = palette[i].r = (uchar)val; in FillGrayPalette()
360 palette[i].a = 0; in FillGrayPalette()
365 bool IsColorPalette( PaletteEntry* palette, int bpp ) in IsColorPalette() argument
371 if( palette[i].b != palette[i].g || in IsColorPalette()
372 palette[i].b != palette[i].r ) in IsColorPalette()
444 uchar* FillColorRow8( uchar* data, uchar* indices, int len, PaletteEntry* palette ) in FillColorRow8() argument
449 *((PaletteEntry*)(data-3)) = palette[*indices++]; in FillColorRow8()
[all …]
Dutils.h96 void FillGrayPalette( PaletteEntry* palette, int bpp, bool negative = false );
97 bool IsColorPalette( PaletteEntry* palette, int bpp );
98 void CvtPaletteToGray( const PaletteEntry* palette, uchar* grayPalette, int entries );
104 uchar* FillColorRow8( uchar* data, uchar* indices, int len, PaletteEntry* palette );
105 uchar* FillGrayRow8( uchar* data, uchar* indices, int len, uchar* palette );
106 uchar* FillColorRow4( uchar* data, uchar* indices, int len, PaletteEntry* palette );
107 uchar* FillGrayRow4( uchar* data, uchar* indices, int len, uchar* palette );
108 uchar* FillColorRow1( uchar* data, uchar* indices, int len, PaletteEntry* palette );
109 uchar* FillGrayRow1( uchar* data, uchar* indices, int len, uchar* palette );
/external/fonttools/Lib/fontTools/ttLib/tables/
DC_P_A_L_.py23 palette = []
26 palette.append( Color(*struct.unpack(">BBBB", data[ppos:ppos+4])) )
28 self.palettes.append(palette)
34 for palette in self.palettes:
35 assert(len(palette) == self.numPaletteEntries)
36 for color in palette:
46 for index, palette in enumerate(self.palettes):
49 assert(len(palette) == self.numPaletteEntries)
50 for cindex, color in enumerate(palette):
59 palette = []
[all …]
/external/mesa3d/src/mesa/main/
Dtexcompress_cpal.c70 get_palette_entry(const struct cpal_format_info *info, const GLubyte *palette, in get_palette_entry() argument
73 memcpy(pixel, palette + info->size * index, info->size); in get_palette_entry()
82 paletted_to_color(const struct cpal_format_info *info, const GLubyte *palette, in paletted_to_color() argument
95 pix += get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix); in paletted_to_color()
96 pix += get_palette_entry(info, palette, ind[i] & 0xf, pix); in paletted_to_color()
99 get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix); in paletted_to_color()
106 pix += get_palette_entry(info, palette, ind[i], pix); in paletted_to_color()
169 GLsizei imageSize, const void *palette) in _mesa_cpal_compressed_teximage2d() argument
187 indices = (const GLubyte *) palette + info->palette_size * info->size; in _mesa_cpal_compressed_teximage2d()
210 if (palette) { in _mesa_cpal_compressed_teximage2d()
[all …]
/external/skia/src/utils/
DSkTextureCompressor_LATC.cpp44 static void generate_latc_palette(uint8_t palette[], uint8_t lum0, uint8_t lum1) { in generate_latc_palette() argument
45 palette[0] = lum0; in generate_latc_palette()
46 palette[1] = lum1; in generate_latc_palette()
49 palette[i+1] = ((7-i)*lum0 + i*lum1) / 7; in generate_latc_palette()
53 palette[i+1] = ((5-i)*lum0 + i*lum1) / 5; in generate_latc_palette()
55 palette[6] = 0; in generate_latc_palette()
56 palette[7] = 255; in generate_latc_palette()
141 uint8_t palette[kLATCPaletteSize]; in compress_latc_block_bb() local
142 generate_latc_palette(palette, maxVal, minVal); in compress_latc_block_bb()
148 uint8_t bestError = abs_diff(pixels[i], palette[0]); in compress_latc_block_bb()
[all …]
DSkTextureCompressor_R11EAC.cpp59 static uint64_t pack_r11eac_block(uint16_t base_cw, uint16_t palette, uint16_t multiplier, in pack_r11eac_block() argument
61 SkASSERT(palette < 16); in pack_r11eac_block()
67 const uint64_t p = static_cast<uint64_t>(palette) << 48; in pack_r11eac_block()
116 const int *palette = kR11EACModifierPalettes[paletteIdx]; in compress_heterogeneous_r11eac_block() local
129 abs_diff(pixel, compute_r11eac_pixel(center, palette[0], multiplier)); in compress_heterogeneous_r11eac_block()
132 const uint16_t p = compute_r11eac_pixel(center, palette[i], multiplier); in compress_heterogeneous_r11eac_block()
576 const int* palette = kR11EACModifierPalettes[palette_idx]; in decompress_r11_eac_block() local
581 const int val = base_cw*8 + 4 + palette[idx]*mod*8; in decompress_r11_eac_block()
/external/libpng/contrib/examples/
Dpngpixel.c89 png_colorp palette = NULL; in print_pixel() local
92 if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) & in print_pixel()
93 PNG_INFO_PLTE) && num_palette > 0 && palette != NULL) in print_pixel()
101 palette[index].red, palette[index].green, in print_pixel()
102 palette[index].blue, in print_pixel()
107 palette[index].red, palette[index].green, in print_pixel()
108 palette[index].blue); in print_pixel()
/external/pdfium/samples/fx_lpng/lpng_v163/
Dfx_pngrtran.c411 png_set_quantize(png_structrp png_ptr, png_colorp palette, in png_set_quantize() argument
497 palette[i] = palette[j]; in png_set_quantize()
519 tmp_color = palette[j]; in png_set_quantize()
520 palette[j] = palette[i]; in png_set_quantize()
521 palette[i] = tmp_color; in png_set_quantize()
537 min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); in png_set_quantize()
542 d = PNG_COLOR_DIST(palette[d_index], palette[k]); in png_set_quantize()
614 d = PNG_COLOR_DIST(palette[i], palette[j]); in png_set_quantize()
663 palette[png_ptr->index_to_palette[j]] in png_set_quantize()
664 = palette[num_new_palette]; in png_set_quantize()
[all …]
Dfx_pngwrite.c204 png_write_PLTE(png_ptr, info_ptr->palette, in png_write_info()
1897 png_color palette[256]; in png_image_set_PLTE() local
1901 memset(palette, 0, (sizeof palette)); in png_image_set_PLTE()
1918 palette[i].blue = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE()
1920 palette[i].green = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE()
1922 palette[i].red = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE()
1927 palette[i].blue = palette[i].red = palette[i].green = in png_image_set_PLTE()
1950 palette[i].blue = png_unpremultiply(entry[afirst + (2 ^ bgr)], in png_image_set_PLTE()
1952 palette[i].green = png_unpremultiply(entry[afirst + 1], alpha, in png_image_set_PLTE()
1954 palette[i].red = png_unpremultiply(entry[afirst + bgr], alpha, in png_image_set_PLTE()
[all …]
/external/libpng/
Dpngrtran.c412 png_set_quantize(png_structrp png_ptr, png_colorp palette, in png_set_quantize() argument
498 palette[i] = palette[j]; in png_set_quantize()
520 tmp_color = palette[j]; in png_set_quantize()
521 palette[j] = palette[i]; in png_set_quantize()
522 palette[i] = tmp_color; in png_set_quantize()
538 min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); in png_set_quantize()
543 d = PNG_COLOR_DIST(palette[d_index], palette[k]); in png_set_quantize()
615 d = PNG_COLOR_DIST(palette[i], palette[j]); in png_set_quantize()
664 palette[png_ptr->index_to_palette[j]] in png_set_quantize()
665 = palette[num_new_palette]; in png_set_quantize()
[all …]
Dexample.c475 png_colorp palette;
487 else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette))
493 png_set_quantize(png_ptr, palette, num_palette,
769 png_colorp palette;
848 palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH
851 png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH);
1036 png_free(png_ptr, palette);
1037 palette = NULL;
Dpngwrite.c205 png_write_PLTE(png_ptr, info_ptr->palette, in png_write_info()
2004 png_color palette[256]; in png_image_set_PLTE() local
2008 memset(palette, 0, (sizeof palette)); in png_image_set_PLTE()
2025 palette[i].blue = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE()
2027 palette[i].green = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE()
2029 palette[i].red = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE()
2034 palette[i].blue = palette[i].red = palette[i].green = in png_image_set_PLTE()
2057 palette[i].blue = png_unpremultiply(entry[afirst + (2 ^ bgr)], in png_image_set_PLTE()
2059 palette[i].green = png_unpremultiply(entry[afirst + 1], alpha, in png_image_set_PLTE()
2061 palette[i].red = png_unpremultiply(entry[afirst + bgr], alpha, in png_image_set_PLTE()
[all …]
/external/zopfli/src/zopflipng/
Dzopflipng_lib.cc118 bool palette = count.size() <= 256; in LossyOptimizeTransparent() local
122 if (key || palette) { in LossyOptimizeTransparent()
142 if (!key && !palette) { in LossyOptimizeTransparent()
153 if (palette && inputstate->info_png.color.palettesize > 0) { in LossyOptimizeTransparent()
157 unsigned char* palette_in = inputstate->info_png.color.palette; in LossyOptimizeTransparent()
253 if (color.palette[i * 4 + 0] != color.palette[i * 4 + 2] in TryOptimize()
254 || color.palette[i * 4 + 1] != color.palette[i * 4 + 2]) { in TryOptimize()
/external/libvncserver/libvncserver/
Dzrlepalettehelper.c29 memset(helper->palette, 0, sizeof(helper->palette)); in zrlePaletteHelperInit()
46 helper->palette[helper->size] = pix; in zrlePaletteHelperInsert()
Dtight.c142 static TLS PALETTE palette; variable
948 palette.entry[i].listNode->rgb; in SendIndexedRect()
968 (uint16_t)palette.entry[i].listNode->rgb; in SendIndexedRect()
1350 memset(palette.hash, 0, 256 * sizeof(COLOR_LIST *)); in PaletteReset()
1365 pnode = palette.hash[hash_key]; in PaletteInsert()
1371 count = palette.entry[idx].numPixels + numPixels; in PaletteInsert()
1372 if (new_idx && palette.entry[new_idx-1].numPixels < count) { in PaletteInsert()
1374 palette.entry[new_idx] = palette.entry[new_idx-1]; in PaletteInsert()
1375 palette.entry[new_idx].listNode->idx = new_idx; in PaletteInsert()
1378 while (new_idx && palette.entry[new_idx-1].numPixels < count); in PaletteInsert()
[all …]
/external/skia/src/codec/
DSkCodec_libpng.cpp124 png_colorp palette; in decodePalette() local
127 if (!png_get_PLTE(fPng_ptr, fInfo_ptr, &palette, &numPalette)) { in decodePalette()
160 *colorPtr++ = proc(*trans++, palette->red, palette->green, palette->blue); in decodePalette()
161 palette++; in decodePalette()
167 *colorPtr++ = SkPackARGB32(0xFF, palette->red, palette->green, palette->blue); in decodePalette()
168 palette++; in decodePalette()
/external/skia/src/images/
DSkImageDecoder_libpng.cpp667 png_colorp palette; in decodePalette() local
671 png_get_PLTE(png_ptr, info_ptr, &palette, &numPalette); in decodePalette()
701 *colorPtr++ = proc(*trans++, palette->red, palette->green, palette->blue); in decodePalette()
702 palette++; in decodePalette()
707 *colorPtr++ = SkPackARGB32(0xFF, palette->red, palette->green, palette->blue); in decodePalette()
708 palette++; in decodePalette()
1056 png_color* SK_RESTRICT palette, in pack_palette() argument
1087 palette[i].red = SkUnPreMultiply::ApplyScale(s, SkGetPackedR32(c)); in pack_palette()
1088 palette[i].green = SkUnPreMultiply::ApplyScale(s,SkGetPackedG32(c)); in pack_palette()
1089 palette[i].blue = SkUnPreMultiply::ApplyScale(s, SkGetPackedB32(c)); in pack_palette()
[all …]
/external/libvncserver/x11vnc/misc/turbovnc/
Dtight.c102 static PALETTE palette; variable
798 palette.entry[i].listNode->rgb;
816 (CARD16)palette.entry[i].listNode->rgb;
1186 memset(palette.hash, 0, 256 * sizeof(COLOR_LIST *)); in PaletteReset()
1201 pnode = palette.hash[hash_key];
1207 count = palette.entry[idx].numPixels + numPixels;
1208 if (new_idx && palette.entry[new_idx-1].numPixels < count) {
1210 palette.entry[new_idx] = palette.entry[new_idx-1];
1211 palette.entry[new_idx].listNode->idx = new_idx;
1214 while (new_idx && palette.entry[new_idx-1].numPixels < count);
[all …]
/external/libvncserver/libvncclient/
Dzrle.c299 CARDBPP palette[16]; in HandleZRLETile() local
310 palette[i] = UncompressCPixel(buffer); in HandleZRLETile()
315 ((CARDBPP*)client->frameBuffer)[j+i] = palette[((*buffer)>>shift)&mask]; in HandleZRLETile()
368 CARDBPP palette[128]; in HandleZRLETile() local
376 palette[i] = UncompressCPixel(buffer); in HandleZRLETile()
384 color = palette[(*buffer)&0x7f]; in HandleZRLETile()
/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/
DUtils.java177 if (!data.palette.isDirect && data.depth <= 8) in downSample()
188 RGB rgb = data.palette.getRGB(pixels[x]); in downSample()
214 …rgbs[rgbs.length - 1] = data.transparentPixel != -1 ? data.palette.getRGB(data.transparentPixel) :… in downSample()
216 PaletteData palette = new PaletteData(rgbs); in downSample() local
221 ImageData newData = new ImageData(width, data.height, 8, palette); in downSample()
232 RGB rgb = data.palette.getRGB(pixels[x]); in downSample()
/external/webp/src/enc/
Dvp8l.c45 uint32_t palette[MAX_PALETTE_SIZE], in AnalyzeAndCreatePalette()
91 palette[num_colors] = colors[i]; in AnalyzeAndCreatePalette()
96 qsort(palette, num_colors, sizeof(*palette), CompareColors); in AnalyzeAndCreatePalette()
878 const uint32_t* palette, int palette_size, in ApplyPalette() argument
883 if ((palette[i] & 0xffff00ffu) != 0) { in ApplyPalette()
892 const int color = (palette[i] >> 8) & 0xff; in ApplyPalette()
906 uint32_t last_pix = palette[0]; in ApplyPalette()
913 if (pix == palette[i]) { in ApplyPalette()
941 uint32_t* const palette = enc->palette_; in EncodePalette() local
962 palette, palette_size, width, height, xbits, row); in EncodePalette()
[all …]
/external/mesa3d/src/gallium/state_trackers/xvmc/
Dsubpicture.c283 subpicture_priv->palette = pipe->create_sampler_view(pipe, tex, &sampler_templ); in XvMCCreateSubpicture()
399 pipe_sampler_view_reference(&subpicture_priv->palette, NULL); in XvMCDestroySubpicture()
408 Status XvMCSetSubpicturePalette(Display *dpy, XvMCSubpicture *subpicture, unsigned char *palette) in XvMCSetSubpicturePalette() argument
416 assert(palette); in XvMCSetSubpicturePalette()
427 upload_sampler(pipe, subpicture_priv->palette, &dst_box, palette, 0, 0, 0); in XvMCSetSubpicturePalette()
/external/libpng/contrib/libtests/
Dmakepng.c170 generate_palette(png_colorp palette, png_bytep trans, int bit_depth, in generate_palette() argument
190 set_color(palette+0, trans+0, colors[1], colors[1], colors[1], 255, in generate_palette()
195 set_color(palette+0, trans+0, colors[1], colors[1], colors[1], in generate_palette()
200 set_color(palette+0, trans+0, colors[1], colors[2], colors[3], 255, in generate_palette()
205 set_color(palette+0, trans+0, colors[1], colors[2], colors[3], in generate_palette()
212 set_color(palette+0, trans+0, 255, 0, 0, 0, gamma_table); in generate_palette()
213 set_color(palette+1, trans+1, 255, 255, 255, 255, gamma_table); in generate_palette()
233 set_color(palette+ip, trans+ip, in generate_palette()
640 png_color palette[256]; in write_png() local
643 npalette = generate_palette(palette, trans, bit_depth, gamma_table, in write_png()
[all …]
/external/fio/tools/plot/
Dgraph2D.gpm20 #set palette rgbformulae 22,9,23
21 #set palette rgbformulae 7,5,15
/external/zopfli/src/zopflipng/lodepng/
Dlodepng.cpp2530 info->palette = 0; in lodepng_color_mode_init()
2544 if(source->palette) in lodepng_color_mode_copy()
2546 dest->palette = (unsigned char*)lodepng_malloc(1024); in lodepng_color_mode_copy()
2547 if(!dest->palette && source->palettesize) return 83; /*alloc fail*/ in lodepng_color_mode_copy()
2548 for(i = 0; i < source->palettesize * 4; i++) dest->palette[i] = source->palette[i]; in lodepng_color_mode_copy()
2568 if(a->palette[i] != b->palette[i]) return 0; in lodepng_color_mode_equal()
2575 if(info->palette) lodepng_free(info->palette); in lodepng_palette_clear()
2576 info->palette = 0; in lodepng_palette_clear()
2586 if(!info->palette) /*allocate palette if empty*/ in lodepng_palette_add()
2589 data = (unsigned char*)lodepng_realloc(info->palette, 1024); in lodepng_palette_add()
[all …]

1234