/external/fonttools/Lib/fontTools/ttLib/tables/ |
H A D | C_P_A_L_.py | 23 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): 47 writer.begintag("palette", index=index) 49 assert(len(palette) == self.numPaletteEntries) 50 for cindex, color in enumerate(palette) [all...] |
/external/fonttools/Tools/fontTools/ttLib/tables/ |
H A D | C_P_A_L_.py | 23 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): 47 writer.begintag("palette", index=index) 49 assert(len(palette) == self.numPaletteEntries) 50 for cindex, color in enumerate(palette) [all...] |
/external/opencv/otherlibs/highgui/ |
H A D | utils.cpp | 341 void CvtPaletteToGray( const PaletteEntry* palette, uchar* grayPalette, int entries ) argument 346 icvCvt_BGR2Gray_8u_C3C1R( (uchar*)(palette + i), 0, grayPalette + i, 0, cvSize(1,1) ); 351 void FillGrayPalette( PaletteEntry* palette, int bpp, bool negative ) argument 359 palette[i].b = palette[i].g = palette[i].r = (uchar)val; 360 palette[i].a = 0; 365 bool IsColorPalette( PaletteEntry* palette, int bpp ) argument 371 if( palette[i].b != palette[ [all...] |
H A D | utils.h | 96 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/libvncserver/libvncserver/ |
H A D | zrlepalettehelper.h | 22 * The PaletteHelper class helps us build up the palette from pixel data by 34 zrle_U32 palette[ZRLE_PALETTE_MAX_SIZE]; member in struct:__anon9213
|
H A D | zrlepalettehelper.c | 29 memset(helper->palette, 0, sizeof(helper->palette)); 46 helper->palette[helper->size] = pix;
|
H A D | tight.c | 142 static TLS PALETTE palette; variable 839 /* TODO: setup palette maybe */ 841 /* TODO: destroy palette maybe */ 864 /* Prepare palette, convert image. */ 940 /* Prepare palette, convert image. */ 948 palette.entry[i].listNode->rgb; 968 (uint16_t)palette.entry[i].listNode->rgb; 1339 * Functions to operate with palette structures. 1350 memset(palette.hash, 0, 256 * sizeof(COLOR_LIST *)); 1365 pnode = palette [all...] |
/external/mesa3d/src/mesa/main/ |
H A D | texcompress_cpal.h | 35 GLsizei imageSize, const void *palette);
|
H A D | texcompress_cpal.c | 67 * Get a color/entry from the palette. 70 get_palette_entry(const struct cpal_format_info *info, const GLubyte *palette, argument 73 memcpy(pixel, palette + info->size * index, info->size); 82 paletted_to_color(const struct cpal_format_info *info, const GLubyte *palette, argument 95 pix += get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix); 96 pix += get_palette_entry(info, palette, ind[i] & 0xf, pix); 99 get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix); 106 pix += get_palette_entry(info, palette, ind[i], pix); 163 * compressed palette format into a regular GLubyte/RGBA glTexImage2D() call. 169 GLsizei imageSize, const void *palette) 166 _mesa_cpal_compressed_teximage2d(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei imageSize, const void *palette) argument [all...] |
/external/skia/src/utils/ |
H A D | SkTextureCompressor_LATC.cpp | 22 // Generates an LATC palette. LATC constructs 23 // a palette of eight colors from LUM0 and LUM1 using the algorithm: 44 static void generate_latc_palette(uint8_t palette[], uint8_t lum0, uint8_t lum1) { argument 45 palette[0] = lum0; 46 palette[1] = lum1; 49 palette[i+1] = ((7-i)*lum0 + i*lum1) / 7; 53 palette[i+1] = ((5-i)*lum0 + i*lum1) / 5; 55 palette[6] = 0; 56 palette[7] = 255; 141 uint8_t palette[kLATCPaletteSiz local 187 uint8_t palette[kLATCPaletteSize]; local 411 uint8_t palette[kLATCPaletteSize]; local [all...] |
H A D | SkTextureCompressor_R11EAC.cpp | 26 // mod_val is chosen from a palette of values based on the index of the 27 // given pixel. The palette is chosen by the value stored in mod. 57 // Pack the base codeword, palette, and multiplier into the 64 bits necessary 59 static uint64_t pack_r11eac_block(uint16_t base_cw, uint16_t palette, uint16_t multiplier, argument 61 SkASSERT(palette < 16); 67 const uint64_t p = static_cast<uint64_t>(palette) << 48; 82 // 3. Iterate through each palette and choose the one with the most accurate 111 // Finally, choose the proper palette and indices 116 const int *palette = kR11EACModifierPalettes[paletteIdx]; 118 // Iterate through each pixel to find the best palette inde [all...] |
/external/libpng/contrib/examples/ |
H A D | pngpixel.c | 82 /* The palette case is slightly more difficult - the palette and, if 89 png_colorp palette = NULL; local 92 if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) & 93 PNG_INFO_PLTE) && num_palette > 0 && palette != NULL) 101 palette[index].red, palette[index].green, 102 palette[index].blue, 107 palette[index].red, palette[inde [all...] |
/external/libpng/contrib/libtests/ |
H A D | gentests.sh | 86 for ct in gray palette
|
/external/skia/src/codec/ |
H A D | SkCodec_libpng.cpp | 124 png_colorp palette; local 127 if (!png_get_PLTE(fPng_ptr, fInfo_ptr, &palette, &numPalette)) { 160 *colorPtr++ = proc(*trans++, palette->red, palette->green, palette->blue); 161 palette++; 167 *colorPtr++ = SkPackARGB32(0xFF, palette->red, palette->green, palette->blue); 168 palette [all...] |
/external/zopfli/src/zopflipng/ |
H A D | zopflipng_lib.cc | 116 // If true, means palette is possible so avoid using different RGB values for 118 bool palette = count.size() <= 256; local 122 if (key || palette) { 126 // used as a valid color key, or in case of palette ensures a color 127 // existing in the input image palette is used. 142 if (!key && !palette) { 143 // Use the last encountered RGB value if no key or palette is used: that 152 // If there are now less colors, update palette of input image to match this. 153 if (palette && inputstate->info_png.color.palettesize > 0) { 157 unsigned char* palette_in = inputstate->info_png.color.palette; [all...] |
/external/pdfium/samples/fx_lpng/lpng_v163/ |
H A D | fx_pngrtran.c | 392 /* Dither file to 8-bit. Supply a palette, the current number
393 * of elements in the palette, the maximum number of elements
395 * of colors is greater then the maximum number, the palette will be
411 png_set_quantize(png_structrp png_ptr, png_colorp palette,
argument 450 /* Find the least used palette entries by starting a
481 /* Swap the palette around, and set up a table, if necessary */
497 palette[i] = palette[j];
519 tmp_color = palette[j];
520 palette[ 1586 png_colorp palette = png_ptr->palette; local 1803 png_colorp palette = png_ptr->palette; local 1834 png_colorp palette = png_ptr->palette; local 3470 png_build_grayscale_palette(int bit_depth, png_colorp palette) argument 4535 png_do_expand_palette(png_row_infop row_info, png_bytep row, png_const_colorp palette, png_const_bytep trans_alpha, int num_trans) argument [all...] |
H A D | pnginfo.h | 36 * cleaned up before the structure is discarded: palette, trans, text,
63 png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */
member in struct:png_info_def 64 png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
65 png_uint_16 num_trans; /* number of transparent palette color (tRNS) */
148 * same order as the palette colors, starting from index 0. Values
155 png_color_16 trans_color; /* transparent color for non-palette image */
191 * various palette entries, so that a viewer can intelligently select a
192 * reduced-color palette, if required. Data is an array of "num_palette"
|
/external/libpng/ |
H A D | pngrtran.c | 393 /* Dither file to 8-bit. Supply a palette, the current number 394 * of elements in the palette, the maximum number of elements 396 * of colors is greater then the maximum number, the palette will be 412 png_set_quantize(png_structrp png_ptr, png_colorp palette, argument 451 /* Find the least used palette entries by starting a 482 /* Swap the palette around, and set up a table, if necessary */ 498 palette[i] = palette[j]; 520 tmp_color = palette[j]; 521 palette[ 1593 png_colorp palette = png_ptr->palette; local 1810 png_colorp palette = png_ptr->palette; local 1841 png_colorp palette = png_ptr->palette; local 4190 png_do_expand_palette(png_row_infop row_info, png_bytep row, png_const_colorp palette, png_const_bytep trans_alpha, int num_trans) argument [all...] |
H A D | example.c | 413 * for paletted images instead of supplying a palette index. Note that 469 /* Quantize RGB files down to 8 bit palette or reduce palettes 475 png_colorp palette; 477 /* This reduces the image to the application supplied palette */ 478 if (/* We have our own palette */) 486 /* This reduces the image to the palette supplied in the file */ 487 else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) 493 png_set_quantize(png_ptr, palette, num_palette, 538 /* Optional call to gamma correct and add the background to the palette 540 * update the palette fo [all...] |
H A D | pnginfo.h | 36 * cleaned up before the structure is discarded: palette, trans, text, 63 png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ member in struct:png_info_def 64 png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ 65 png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ 148 * same order as the palette colors, starting from index 0. Values 155 png_color_16 trans_color; /* transparent color for non-palette image */ 191 * various palette entries, so that a viewer can intelligently select a 192 * reduced-color palette, if required. Data is an array of "num_palette"
|
/external/skia/src/images/ |
H A D | SkImageDecoder_libpng.cpp | 381 /* Optional call to gamma correct and add the background to the palette 383 * update the palette for you (ie you selected such a transform above). 423 upscale png's palette to a direct model 667 png_colorp palette; local 671 png_get_PLTE(png_ptr, info_ptr, &palette, &numPalette); 701 *colorPtr++ = proc(*trans++, palette->red, palette->green, palette->blue); 702 palette++; 707 *colorPtr++ = SkPackARGB32(0xFF, palette 1055 pack_palette(SkColorTable* ctable, png_color* SK_RESTRICT palette, png_byte* SK_RESTRICT trans, bool hasAlpha) argument [all...] |
/external/mesa3d/src/gallium/state_trackers/xvmc/ |
H A D | xvmc_private.h | 90 /* optional palette for this subpicture */ 91 struct pipe_sampler_view *palette; member in struct:__anon12494
|
H A D | subpicture.c | 283 subpicture_priv->palette = pipe->create_sampler_view(pipe, tex, &sampler_templ); 399 pipe_sampler_view_reference(&subpicture_priv->palette, NULL); 408 Status XvMCSetSubpicturePalette(Display *dpy, XvMCSubpicture *subpicture, unsigned char *palette) argument 416 assert(palette); 427 upload_sampler(pipe, subpicture_priv->palette, &dst_box, palette, 0, 0, 0);
|
/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ |
H A D | Utils.java | 177 if (!data.palette.isDirect && data.depth <= 8) 188 RGB rgb = data.palette.getRGB(pixels[x]); 204 // pick the most frequently used 256 (or fewer), and make a palette 214 rgbs[rgbs.length - 1] = data.transparentPixel != -1 ? data.palette.getRGB(data.transparentPixel) : new RGB(255, 255, 255); 216 PaletteData palette = new PaletteData(rgbs); 218 // create a new image using the new palette: 220 // index in the new palette 221 ImageData newData = new ImageData(width, data.height, 8, palette); 232 RGB rgb = data.palette.getRGB(pixels[x]);
|
/external/libvncserver/libvncclient/ |
H A D | zrle.c | 299 CARDBPP palette[16]; local 308 /* read palette */ 310 palette[i] = UncompressCPixel(buffer); 315 ((CARDBPP*)client->frameBuffer)[j+i] = palette[((*buffer)>>shift)&mask]; 366 else if( type >= 130 ) /* palette RLE */ 368 CARDBPP palette[128]; local 374 /* read palette */ 376 palette[i] = UncompressCPixel(buffer); 384 color = palette[(*buffer)&0x7f];
|