Searched refs:palette (Results 1 - 25 of 83) sorted by relevance

1234

/external/fonttools/Lib/fontTools/ttLib/tables/
H A 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):
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 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):
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 Dutils.cpp341 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 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/libvncserver/libvncserver/
H A Dzrlepalettehelper.h22 * 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 Dzrlepalettehelper.c29 memset(helper->palette, 0, sizeof(helper->palette));
46 helper->palette[helper->size] = pix;
H A Dtight.c142 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 Dtexcompress_cpal.h35 GLsizei imageSize, const void *palette);
H A Dtexcompress_cpal.c67 * 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 DSkTextureCompressor_LATC.cpp22 // 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 DSkTextureCompressor_R11EAC.cpp26 // 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 Dpngpixel.c82 /* 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 Dgentests.sh86 for ct in gray palette
/external/skia/src/codec/
H A DSkCodec_libpng.cpp124 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 Dzopflipng_lib.cc116 // 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 Dfx_pngrtran.c392 /* 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 Dpnginfo.h36 * 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 Dpngrtran.c393 /* 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 Dexample.c413 * 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 Dpnginfo.h36 * 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 DSkImageDecoder_libpng.cpp381 /* 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 Dxvmc_private.h90 /* optional palette for this subpicture */
91 struct pipe_sampler_view *palette; member in struct:__anon12494
H A Dsubpicture.c283 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 DUtils.java177 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 Dzrle.c299 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];

Completed in 1911 milliseconds

1234