/external/opencv/otherlibs/highgui/ |
D | utils.cpp | 341 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 …]
|
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/fonttools/Lib/fontTools/ttLib/tables/ |
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): 49 assert(len(palette) == self.numPaletteEntries) 50 for cindex, color in enumerate(palette): 59 palette = [] [all …]
|
/external/ImageMagick/coders/ |
D | cut.c | 292 Image *image,*palette; in ReadCUTImage() local 329 palette=NULL; in ReadCUTImage() 414 if( (palette=AcquireImage(clone_info,exception))==NULL ) goto NoPalette; in ReadCUTImage() 415 status=OpenBlob(clone_info,palette,ReadBinaryBlobMode,exception); in ReadCUTImage() 419 palette=DestroyImage(palette); in ReadCUTImage() 420 palette=NULL; in ReadCUTImage() 425 if(palette!=NULL) in ReadCUTImage() 427 (void) ReadBlob(palette,2,(unsigned char *) PalHeader.FileId); in ReadCUTImage() 429 PalHeader.Version=ReadBlobLSBShort(palette); in ReadCUTImage() 430 PalHeader.Size=ReadBlobLSBShort(palette); in ReadCUTImage() [all …]
|
/external/mesa3d/src/mesa/main/ |
D | texcompress_cpal.c | 70 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/syslinux/com32/lib/libpng/ |
D | pngrtran.c | 164 png_set_dither(png_structp png_ptr, png_colorp palette, in png_set_dither() argument 247 palette[i] = palette[j]; in png_set_dither() 269 tmp_color = palette[j]; in png_set_dither() 270 palette[j] = palette[i]; in png_set_dither() 271 palette[i] = tmp_color; in png_set_dither() 287 min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); in png_set_dither() 292 d = PNG_COLOR_DIST(palette[d_index], palette[k]); in png_set_dither() 364 d = PNG_COLOR_DIST(palette[i], palette[j]); in png_set_dither() 411 palette[png_ptr->index_to_palette[j]] in png_set_dither() 412 = palette[num_new_palette]; in png_set_dither() [all …]
|
D | example.c | 280 png_colorp palette; 292 else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) 298 png_set_dither(png_ptr, palette, num_palette, 566 png_colorp palette; 645 palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH 648 png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH); 807 png_free(png_ptr, palette); 808 palette = NULL;
|
/external/libpng/contrib/examples/ |
D | pngpixel.c | 91 png_colorp palette = NULL; in print_pixel() local 94 if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) & in print_pixel() 95 PNG_INFO_PLTE) && num_palette > 0 && palette != NULL) in print_pixel() 103 palette[index].red, palette[index].green, in print_pixel() 104 palette[index].blue, in print_pixel() 109 palette[index].red, palette[index].green, in print_pixel() 110 palette[index].blue); in print_pixel()
|
/external/skia/src/images/ |
D | SkPNGImageEncoder.cpp | 122 static inline int pack_palette(SkColorTable* ctable, png_color* SK_RESTRICT palette, in pack_palette() argument 143 palette[numWithAlpha].red = SkGetPackedR32(colors[i]); in pack_palette() 144 palette[numWithAlpha].green = SkGetPackedG32(colors[i]); in pack_palette() 145 palette[numWithAlpha].blue = SkGetPackedB32(colors[i]); in pack_palette() 156 palette[i].red = SkGetPackedR32(c); in pack_palette() 157 palette[i].green = SkGetPackedG32(c); in pack_palette() 158 palette[i].blue = SkGetPackedB32(c); in pack_palette() 167 palette[currIndex].red = SkGetPackedR32(colors[i]); in pack_palette() 168 palette[currIndex].green = SkGetPackedG32(colors[i]); in pack_palette() 169 palette[currIndex].blue = SkGetPackedB32(colors[i]); in pack_palette()
|
/external/libpng/ |
D | pngrtran.c | 416 png_set_quantize(png_structrp png_ptr, png_colorp palette, in png_set_quantize() argument 502 palette[i] = palette[j]; in png_set_quantize() 524 tmp_color = palette[j]; in png_set_quantize() 525 palette[j] = palette[i]; in png_set_quantize() 526 palette[i] = tmp_color; in png_set_quantize() 542 min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); in png_set_quantize() 547 d = PNG_COLOR_DIST(palette[d_index], palette[k]); in png_set_quantize() 619 d = PNG_COLOR_DIST(palette[i], palette[j]); in png_set_quantize() 668 palette[png_ptr->index_to_palette[j]] in png_set_quantize() 669 = palette[num_new_palette]; in png_set_quantize() [all …]
|
D | example.c | 475 png_colorp palette; 487 else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) != 0) 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;
|
D | pngwrite.c | 206 png_write_PLTE(png_ptr, info_ptr->palette, in png_write_info() 1797 png_color palette[256]; in png_image_set_PLTE() local 1801 memset(palette, 0, (sizeof palette)); in png_image_set_PLTE() 1818 palette[i].blue = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE() 1820 palette[i].green = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE() 1822 palette[i].red = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE() 1827 palette[i].blue = palette[i].red = palette[i].green = in png_image_set_PLTE() 1850 palette[i].blue = png_unpremultiply(entry[afirst + (2 ^ bgr)], in png_image_set_PLTE() 1852 palette[i].green = png_unpremultiply(entry[afirst + 1], alpha, in png_image_set_PLTE() 1854 palette[i].red = png_unpremultiply(entry[afirst + bgr], alpha, in png_image_set_PLTE() [all …]
|
/external/skia/third_party/libpng/ |
D | pngrtran.c | 416 png_set_quantize(png_structrp png_ptr, png_colorp palette, in png_set_quantize() argument 502 palette[i] = palette[j]; in png_set_quantize() 524 tmp_color = palette[j]; in png_set_quantize() 525 palette[j] = palette[i]; in png_set_quantize() 526 palette[i] = tmp_color; in png_set_quantize() 542 min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); in png_set_quantize() 547 d = PNG_COLOR_DIST(palette[d_index], palette[k]); in png_set_quantize() 619 d = PNG_COLOR_DIST(palette[i], palette[j]); in png_set_quantize() 668 palette[png_ptr->index_to_palette[j]] in png_set_quantize() 669 = palette[num_new_palette]; in png_set_quantize() [all …]
|
D | example.c | 475 png_colorp palette; 487 else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) != 0) 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;
|
D | pngwrite.c | 206 png_write_PLTE(png_ptr, info_ptr->palette, in png_write_info() 1797 png_color palette[256]; in png_image_set_PLTE() local 1801 memset(palette, 0, (sizeof palette)); in png_image_set_PLTE() 1818 palette[i].blue = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE() 1820 palette[i].green = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE() 1822 palette[i].red = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE() 1827 palette[i].blue = palette[i].red = palette[i].green = in png_image_set_PLTE() 1850 palette[i].blue = png_unpremultiply(entry[afirst + (2 ^ bgr)], in png_image_set_PLTE() 1852 palette[i].green = png_unpremultiply(entry[afirst + 1], alpha, in png_image_set_PLTE() 1854 palette[i].red = png_unpremultiply(entry[afirst + bgr], alpha, in png_image_set_PLTE() [all …]
|
/external/pdfium/third_party/libpng16/ |
D | pngrtran.c | 416 png_set_quantize(png_structrp png_ptr, png_colorp palette, in png_set_quantize() argument 502 palette[i] = palette[j]; in png_set_quantize() 524 tmp_color = palette[j]; in png_set_quantize() 525 palette[j] = palette[i]; in png_set_quantize() 526 palette[i] = tmp_color; in png_set_quantize() 542 min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); in png_set_quantize() 547 d = PNG_COLOR_DIST(palette[d_index], palette[k]); in png_set_quantize() 619 d = PNG_COLOR_DIST(palette[i], palette[j]); in png_set_quantize() 668 palette[png_ptr->index_to_palette[j]] in png_set_quantize() 669 = palette[num_new_palette]; in png_set_quantize() [all …]
|
D | pngwrite.c | 206 png_write_PLTE(png_ptr, info_ptr->palette, in png_write_info() 1797 png_color palette[256]; in png_image_set_PLTE() local 1801 memset(palette, 0, (sizeof palette)); in png_image_set_PLTE() 1818 palette[i].blue = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE() 1820 palette[i].green = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE() 1822 palette[i].red = (png_byte)PNG_sRGB_FROM_LINEAR(255 * in png_image_set_PLTE() 1827 palette[i].blue = palette[i].red = palette[i].green = in png_image_set_PLTE() 1850 palette[i].blue = png_unpremultiply(entry[afirst + (2 ^ bgr)], in png_image_set_PLTE() 1852 palette[i].green = png_unpremultiply(entry[afirst + 1], alpha, in png_image_set_PLTE() 1854 palette[i].red = png_unpremultiply(entry[afirst + bgr], alpha, in png_image_set_PLTE() [all …]
|
/external/webp/src/enc/ |
D | vp8l_enc.c | 71 static void GreedyMinimizeDeltas(uint32_t palette[], int num_colors) { in GreedyMinimizeDeltas() argument 81 const uint32_t cur_score = PaletteColorDistance(palette[k], predict); in GreedyMinimizeDeltas() 87 SwapColor(&palette[best_ix], &palette[i]); in GreedyMinimizeDeltas() 88 predict = palette[i]; in GreedyMinimizeDeltas() 98 static int PaletteHasNonMonotonousDeltas(uint32_t palette[], int num_colors) { in PaletteHasNonMonotonousDeltas() argument 103 const uint32_t diff = VP8LSubPixels(palette[i], predict); in PaletteHasNonMonotonousDeltas() 116 predict = palette[i]; in PaletteHasNonMonotonousDeltas() 128 uint32_t palette[MAX_PALETTE_SIZE], in AnalyzeAndCreatePalette() 130 const int num_colors = WebPGetColorPalette(pic, palette); in AnalyzeAndCreatePalette() 133 qsort(palette, num_colors, sizeof(*palette), PaletteCompareColorsForQsort); in AnalyzeAndCreatePalette() [all …]
|
D | delta_palettization_enc.c | 352 const uint32_t palette[], int palette_size) { in FindBestPaletteEntry() argument 355 uint32_t best_distance = CalcDist(predicted_value, src, palette[0]); in FindBestPaletteEntry() 357 const uint32_t distance = CalcDist(predicted_value, src, palette[i]); in FindBestPaletteEntry() 389 const uint32_t* palette, in ApplyDeltaPalette() argument 409 palette, palette_size); in ApplyDeltaPalette() 410 ApplyBestPaletteEntry(x, y, predicted_value, palette[tmp_row[x]], in ApplyDeltaPalette() 414 cur_dst[x] = palette[tmp_row[x]]; in ApplyDeltaPalette()
|
/external/zopfli/src/zopflipng/ |
D | zopflipng_lib.cc | 118 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/ |
D | zrlepalettehelper.c | 29 memset(helper->palette, 0, sizeof(helper->palette)); in zrlePaletteHelperInit() 46 helper->palette[helper->size] = pix; in zrlePaletteHelperInsert()
|
D | tight.c | 142 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/libvncserver/libvncclient/ |
D | zrle.c | 299 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/skia/src/codec/ |
D | SkPngCodec.cpp | 251 png_color* palette; in createColorTable() local 252 if (!png_get_PLTE(fPng_ptr, fInfo_ptr, &palette, &numColors)) { in createColorTable() 276 colorTable[i] = proc(alphas[i], palette->red, palette->green, palette->blue); in createColorTable() 277 palette++; in createColorTable() 286 SkASSERT(&palette->red < &palette->green); in createColorTable() 287 SkASSERT(&palette->green < &palette->blue); in createColorTable() 291 SkOpts::RGB_to_RGB1(colorTable + numColorsWithAlpha, palette, in createColorTable() 294 SkOpts::RGB_to_BGR1(colorTable + numColorsWithAlpha, palette, in createColorTable()
|
/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ |
D | Utils.java | 177 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()
|