Home
last modified time | relevance | path

Searched refs:ncolors (Results 1 – 25 of 30) sorted by relevance

12

/third_party/flutter/skia/third_party/externals/sdl/test/
Dtestautomation_pixels.c324 int ncolors; in pixels_allocFreePalette() local
332 ncolors = 1; in pixels_allocFreePalette()
336 ncolors = 2; in pixels_allocFreePalette()
340 ncolors = SDLTest_RandomIntegerInRange(8, 16); in pixels_allocFreePalette()
344 result = SDL_AllocPalette(ncolors); in pixels_allocFreePalette()
345 SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors); in pixels_allocFreePalette()
348 …LTest_AssertCheck(result->ncolors == ncolors, "Verify value of result.ncolors; expected: %u, got %… in pixels_allocFreePalette()
349 if (result->ncolors > 0) { in pixels_allocFreePalette()
352 for(i = 0; i < result->ncolors; i++) { in pixels_allocFreePalette()
369 for (ncolors = 0; ncolors > -3; ncolors--) { in pixels_allocFreePalette()
[all …]
/third_party/flutter/skia/third_party/externals/sdl/src/video/
DSDL_pixels.c617 SDL_AllocPalette(int ncolors) in SDL_AllocPalette() argument
622 if (ncolors < 1) { in SDL_AllocPalette()
633 (SDL_Color *) SDL_malloc(ncolors * sizeof(*palette->colors)); in SDL_AllocPalette()
638 palette->ncolors = ncolors; in SDL_AllocPalette()
642 SDL_memset(palette->colors, 0xFF, ncolors * sizeof(*palette->colors)); in SDL_AllocPalette()
654 if (palette && palette->ncolors != (1 << format->BitsPerPixel)) { in SDL_SetPixelFormatPalette()
677 int firstcolor, int ncolors) in SDL_SetPaletteColors() argument
685 if (ncolors > (palette->ncolors - firstcolor)) { in SDL_SetPaletteColors()
686 ncolors = (palette->ncolors - firstcolor); in SDL_SetPaletteColors()
692 ncolors * sizeof(*colors)); in SDL_SetPaletteColors()
[all …]
DSDL_bmp.c314 if ((int) biClrUsed > palette->ncolors) { in SDL_LoadBMP_RW()
316 int ncolors = biClrUsed; in SDL_LoadBMP_RW() local
319 ncolors * in SDL_LoadBMP_RW()
326 palette->ncolors = ncolors; in SDL_LoadBMP_RW()
328 } else if ((int) biClrUsed < palette->ncolors) { in SDL_LoadBMP_RW()
329 palette->ncolors = biClrUsed; in SDL_LoadBMP_RW()
585 biClrUsed = surface->format->palette->ncolors; in SDL_SaveBMP_RW()
637 int ncolors; in SDL_SaveBMP_RW() local
640 ncolors = surface->format->palette->ncolors; in SDL_SaveBMP_RW()
641 for (i = 0; i < ncolors; ++i) { in SDL_SaveBMP_RW()
DSDL_surface.c68 if (palette->ncolors == 2) { in SDL_CreateRGBSurfaceWithFormat()
220 if (surface->format->palette && key >= ((Uint32) surface->format->palette->ncolors)) { in SDL_SetColorKey()
888 for (i = 0; i < format->palette->ncolors; ++i) { in SDL_ConvertSurface()
894 if (i == format->palette->ncolors) { in SDL_ConvertSurface()
913 format->palette->ncolors * sizeof(SDL_Color)); in SDL_ConvertSurface()
914 convert->format->palette->ncolors = format->palette->ncolors; in SDL_ConvertSurface()
958 surface->format->palette->ncolors <= format->palette->ncolors && in SDL_ConvertSurface()
960 surface->format->palette->ncolors * sizeof(SDL_Color)) == 0)) { in SDL_ConvertSurface()
/third_party/libjpeg-turbo/
Drdcolmap.c52 int ncolors = cinfo->actual_number_of_colors; in add_map_entry() local
56 for (index = 0; index < ncolors; index++) { in add_map_entry()
64 if (ncolors >= (MAXJSAMPLE + 1)) in add_map_entry()
68 colormap0[ncolors] = (JSAMPLE)R; in add_map_entry()
69 colormap1[ncolors] = (JSAMPLE)G; in add_map_entry()
70 colormap2[ncolors] = (JSAMPLE)B; in add_map_entry()
Drdrle.c127 if (source->header.ncolors == 1 && source->header.ncmap == 0) { in start_input_rle()
130 } else if (source->header.ncolors == 1 && source->header.ncmap == 1) { in start_input_rle()
134 } else if (source->header.ncolors == 1 && source->header.ncmap == 3) { in start_input_rle()
138 } else if (source->header.ncolors == 3 && source->header.ncmap == 3) { in start_input_rle()
142 } else if (source->header.ncolors == 3 && source->header.ncmap == 0) { in start_input_rle()
169 (JDIMENSION)(width * source->header.ncolors), in start_input_rle()
298 for (channel = 0; channel < source->header.ncolors; channel++) { in load_image()
Djquant2.c639 int i, x, ncolors; in find_nearby_colors() local
744 ncolors = 0; in find_nearby_colors()
747 colorlist[ncolors++] = (JSAMPLE)i; in find_nearby_colors()
749 return ncolors; in find_nearby_colors()
Djquant1.c400 make_odither_array(j_decompress_ptr cinfo, int ncolors) in make_odither_array() argument
414 den = 2 * ODITHER_CELLS * ((JLONG)(ncolors - 1)); in make_odither_array()
/third_party/skia/third_party/externals/libjpeg-turbo/
Drdcolmap.c52 int ncolors = cinfo->actual_number_of_colors; in add_map_entry() local
56 for (index = 0; index < ncolors; index++) { in add_map_entry()
63 if (ncolors >= (MAXJSAMPLE + 1)) in add_map_entry()
67 colormap0[ncolors] = (JSAMPLE)R; in add_map_entry()
68 colormap1[ncolors] = (JSAMPLE)G; in add_map_entry()
69 colormap2[ncolors] = (JSAMPLE)B; in add_map_entry()
Djquant2.c639 int i, x, ncolors; in find_nearby_colors() local
744 ncolors = 0; in find_nearby_colors()
747 colorlist[ncolors++] = (JSAMPLE)i; in find_nearby_colors()
749 return ncolors; in find_nearby_colors()
/third_party/flutter/skia/third_party/externals/libjpeg-turbo/
Drdcolmap.c52 int ncolors = cinfo->actual_number_of_colors; in add_map_entry() local
56 for (index = 0; index < ncolors; index++) { in add_map_entry()
64 if (ncolors >= (MAXJSAMPLE + 1)) in add_map_entry()
68 colormap0[ncolors] = (JSAMPLE)R; in add_map_entry()
69 colormap1[ncolors] = (JSAMPLE)G; in add_map_entry()
70 colormap2[ncolors] = (JSAMPLE)B; in add_map_entry()
Drdrle.c127 if (source->header.ncolors == 1 && source->header.ncmap == 0) { in start_input_rle()
130 } else if (source->header.ncolors == 1 && source->header.ncmap == 1) { in start_input_rle()
134 } else if (source->header.ncolors == 1 && source->header.ncmap == 3) { in start_input_rle()
138 } else if (source->header.ncolors == 3 && source->header.ncmap == 3) { in start_input_rle()
142 } else if (source->header.ncolors == 3 && source->header.ncmap == 0) { in start_input_rle()
169 (JDIMENSION)(width * source->header.ncolors), in start_input_rle()
298 for (channel = 0; channel < source->header.ncolors; channel++) { in load_image()
Djquant2.c639 int i, x, ncolors; in find_nearby_colors() local
744 ncolors = 0; in find_nearby_colors()
747 colorlist[ncolors++] = (JSAMPLE)i; in find_nearby_colors()
749 return ncolors; in find_nearby_colors()
/third_party/ffmpeg/libavcodec/
Dxwddec.c37 uint32_t version, header_size, vclass, ncolors; in xwd_decode_frame() local
78 ncolors = bytestream2_get_be32u(&gb); in xwd_decode_frame()
89 vclass, ncolors, bpp, be, lsize, xoffset); in xwd_decode_frame()
134 if (ncolors > 256) { in xwd_decode_frame()
148 … if (bytestream2_get_bytes_left(&gb) < ncolors * XWD_CMAP_SIZE + (uint64_t)avctx->height * lsize) { in xwd_decode_frame()
200 bytestream2_skipu(&gb, ncolors * XWD_CMAP_SIZE); in xwd_decode_frame()
224 for (i = 0; i < ncolors; i++) { in xwd_decode_frame()
Dxwdenc.c38 uint32_t pixdepth, bpp, bpad, ncolors = 0, lsize, vclass, be = 0; in xwd_encode_frame() local
127 ncolors = 256; in xwd_encode_frame()
148 out_size = header_size + ncolors * XWD_CMAP_SIZE + avctx->height * lsize; in xwd_encode_frame()
175 bytestream_put_be32(&buf, ncolors); // number of colors in xwd_encode_frame()
176 bytestream_put_be32(&buf, ncolors); // number of entries in color map in xwd_encode_frame()
190 for (i = 0; i < ncolors; i++) { in xwd_encode_frame()
Dxpmdec.c311 int ncolors, cpp, ret, i, j; in xpm_decode_frame() local
336 &width, &height, &ncolors, &cpp) != 4) { in xpm_decode_frame()
353 if (ncolors <= 0 || ncolors > size) { in xpm_decode_frame()
354 av_log(avctx, AV_LOG_ERROR, "invalid number of colors: %d\n", ncolors); in xpm_decode_frame()
371 for (i = 0; i < ncolors; i++) { in xpm_decode_frame()
/third_party/skia/third_party/externals/swiftshader/tests/
Dpresubmit.sh12 ncolors=$(tput colors)
13 if test -n "$ncolors" && test $ncolors -ge 8; then
/third_party/flutter/skia/third_party/externals/sdl/src/video/directfb/
DSDL_DirectFB_render.c68 int firstcolor, int ncolors);
72 int firstcolor, int ncolors);
299 int ncolors; in DisplayPaletteChanged() local
305 ncolors = (palette->ncolors < 256 ? palette->ncolors : 256); in DisplayPaletteChanged()
307 for (i = 0; i < ncolors; ++i) { in DisplayPaletteChanged()
313 SDL_DFB_CHECKERR(surfpal->SetEntries(surfpal, entries, ncolors, 0)); in DisplayPaletteChanged()
630 int ncolors) in DirectFB_SetTexturePalette() argument
638 if (ncolors > 256) in DirectFB_SetTexturePalette()
639 ncolors = 256; in DirectFB_SetTexturePalette()
641 for (i = 0; i < ncolors; ++i) { in DirectFB_SetTexturePalette()
[all …]
/third_party/flutter/skia/third_party/externals/sdl/src/video/x11/
DSDL_x11window.c424 int ncolors; in X11_CreateWindow() local
443 ncolors = visual->map_entries; in X11_CreateWindow()
470 for (i = 0; i < ncolors; i++) { in X11_CreateWindow()
471 Uint32 red = (rmax * i) / (ncolors - 1); in X11_CreateWindow()
472 Uint32 green = (gmax * i) / (ncolors - 1); in X11_CreateWindow()
473 Uint32 blue = (bmax * i) / (ncolors - 1); in X11_CreateWindow()
475 Uint32 rbits = (rmask * i) / (ncolors - 1); in X11_CreateWindow()
476 Uint32 gbits = (gmask * i) / (ncolors - 1); in X11_CreateWindow()
477 Uint32 bbits = (bmask * i) / (ncolors - 1); in X11_CreateWindow()
491 X11_XStoreColors(display, xattr.colormap, colorcells, ncolors); in X11_CreateWindow()
[all …]
/third_party/flutter/skia/third_party/externals/sdl/include/
DSDL_pixels.h304 int ncolors; member
389 extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
409 int firstcolor, int ncolors);
/third_party/gstreamer/gstplugins_bad/ext/kate/
Dgstkatespu.c433 kp->ncolors = 4; in gst_kate_spu_create_spu_palette()
434 kp->colors = (kate_color *) g_malloc (kp->ncolors * sizeof (kate_color)); in gst_kate_spu_create_spu_palette()
440 for (n = 0; n < kp->ncolors; ++n) { in gst_kate_spu_create_spu_palette()
455 for (n = 0; n < kp->ncolors; ++n) in gst_kate_spu_create_spu_palette()
459 for (n = 0; n < kp->ncolors; ++n) { in gst_kate_spu_create_spu_palette()
731 if (kp->ncolors != 4) in gst_kate_spu_encode_spu()
/third_party/flutter/skia/third_party/externals/sdl/src/render/software/
DSDL_rotate.c534 for (i = 0; i < rz_src->format->palette->ncolors; i++) { in SDLgfx_rotateSurface()
537 rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; in SDLgfx_rotateSurface()
/third_party/flutter/skia/third_party/externals/libpng/contrib/libtests/
Dmakepng.c1642 unsigned int ncolors = 0; in parse_color() local
1644 while (*arg && ncolors < 4) in parse_color()
1665 colors[++ncolors] = (unsigned int)ul; /* checked above */ in parse_color()
1674 *colors = ncolors; in parse_color()
/third_party/skia/third_party/externals/libpng/contrib/libtests/
Dmakepng.c1642 unsigned int ncolors = 0; in parse_color() local
1644 while (*arg && ncolors < 4) in parse_color()
1665 colors[++ncolors] = (unsigned int)ul; /* checked above */ in parse_color()
1674 *colors = ncolors; in parse_color()
/third_party/libpng/contrib/libtests/
Dmakepng.c1642 unsigned int ncolors = 0; in parse_color() local
1644 while (*arg && ncolors < 4) in parse_color()
1665 colors[++ncolors] = (unsigned int)ul; /* checked above */ in parse_color()
1674 *colors = ncolors; in parse_color()

12