Home
last modified time | relevance | path

Searched refs:depth (Results 1 – 25 of 335) sorted by relevance

12345678910>>...14

/plan9/sys/src/cmd/gs/src/
H A Dgdevppla.c80 int depth = tdev->color_info.depth / num_comp; in gdev_prn_set_planar() local
85 while (depth & (depth - 1)) in gdev_prn_set_planar()
86 --depth, depth = (depth | (depth >> 1)) + 1; in gdev_prn_set_planar()
87 planes[3].depth = planes[2].depth = planes[1].depth = planes[0].depth = in gdev_prn_set_planar()
88 depth; in gdev_prn_set_planar()
90 planes[0].shift = depth * (num_comp - 1); in gdev_prn_set_planar()
91 planes[1].shift = planes[0].shift - depth; in gdev_prn_set_planar()
92 planes[2].shift = planes[1].shift - depth; in gdev_prn_set_planar()
129 space->raster = bitmap_raster(target->width * mdev.planes[0].depth); in gdev_prn_size_buf_planar()
H A Dgxoprect.c42 int depth ) in unpack_scanline_lt8() argument
45 int i = 0, shift = 8 - depth, p_per_byte = 8 / depth; in unpack_scanline_lt8()
57 buff = *srcp++ << (src_offset * depth); in unpack_scanline_lt8()
63 for (; i < width; i++, buff <<= depth) { in unpack_scanline_lt8()
80 int depth ) in pack_scanline_lt8() argument
83 int i = 0, p_per_byte = 8 / depth; in pack_scanline_lt8()
95 buff = *destp++ >> (8 - dest_offset * depth); in pack_scanline_lt8()
102 buff = (buff << depth) | *srcp++; in pack_scanline_lt8()
107 int shift = depth * (p_per_byte - i); in pack_scanline_lt8()
124 int depth ) in unpack_scanline_ge8() argument
[all …]
H A Dgdevbmpc.c97 write_bmp_depth_header(gx_device_printer *pdev, FILE *file, int depth, in write_bmp_depth_header() argument
104 int quads = (depth <= 8 ? sizeof(bmp_quad) << depth : 0); in write_bmp_depth_header()
135 BMP_ASSIGN_WORD(ihdr.bitCount, depth); in write_bmp_depth_header()
157 if (depth <= 8) in write_bmp_depth_header()
158 fwrite(palette, sizeof(bmp_quad), 1 << depth, file); in write_bmp_depth_header()
167 int depth = pdev->color_info.depth; in write_bmp_header() local
170 if (depth <= 8) { in write_bmp_header()
176 for (i = 0; i != 1 << depth; i++) { in write_bmp_header()
188 return write_bmp_depth_header(pdev, file, depth, (const byte *)palette, in write_bmp_header()
196 int depth = pdev->color_info.depth; in write_bmp_separated_header() local
[all …]
H A Dgdevdgbr.c52 params.raster = bitmap_raster(dev->width * dev->color_info.depth); in gx_default_get_bits()
83 dev->color_info.depth : dev->color_info.num_components); in requested_includes_stored()
129 int depth = dev->color_info.depth; in gx_get_bits_return_pointer() local
140 bitmap_raster(dev->color_info.depth / in gx_get_bits_return_pointer()
166 if (depth & (depth - 1)) { in gx_get_bits_return_pointer()
168 int step = depth / igcd(depth, align_mod) * align_mod; in gx_get_bits_return_pointer()
173 bytes = bit_offset & (-depth & -(int)align_mod); in gx_get_bits_return_pointer()
176 params->x_offset = (bit_offset - bytes) / depth; in gx_get_bits_return_pointer()
189 dev->color_info.depth) : in gx_get_bits_return_pointer()
273 int depth = dev->color_info.depth; in gx_get_bits_copy() local
[all …]
H A Dgscpixel.c53 gs_cspace_init_DevicePixel(gs_memory_t *mem, gs_color_space * pcs, int depth) in gs_cspace_init_DevicePixel() argument
55 switch (depth) { in gs_cspace_init_DevicePixel()
68 pcs->params.pixel.depth = depth; in gs_cspace_init_DevicePixel()
80 ulong max_value = (1L << pcs->params.pixel.depth) - 1; in gx_restrict_DevicePixel()
102 color_set_pure(pdc, pconc[0] & ((1 << dev->color_info.depth) - 1)); in gx_remap_concrete_DevicePixel()
129 return sputs(s, (const byte *)&p->depth, sizeof(p->depth), &n); in gx_serialize_DevicePixel()
H A Dgdevpbm.c95 #define pbm_prn_device(procs, dev_name, magic, is_raw, num_comp, depth, max_gray, max_rgb, optimize… argument
99 num_comp, depth, max_gray, max_rgb, max_gray + 1, max_rgb + 1,\
134 private int pam_print_row(gx_device_printer * pdev, byte * data, int depth,
229 if (pdev->color_info.depth > 4) in ppm_set_dev_procs()
240 } else if (bdev->color_info.depth == 4) { in ppm_set_dev_procs()
341 if (dev->color_info.depth == 24) in gx_old_default_rgb_map_rgb_color()
346 int bpc = dev->color_info.depth / 3; in gx_old_default_rgb_map_rgb_color()
361 uint bpc = pdev->color_info.depth / 3; in ppm_map_rgb_color()
363 ((gx_color_index)1 << (pdev->color_info.depth - bpc)) - 1; in ppm_map_rgb_color()
377 uint bitspercolor = dev->color_info.depth / 3; in ppm_map_color_rgb()
[all …]
H A Dgsargs.c38 pal->depth = 0; in arg_init()
47 if (pal->depth == arg_depth_max) { in arg_push_memory_string()
51 pas = &pal->sources[pal->depth]; in arg_push_memory_string()
56 pal->depth++; in arg_push_memory_string()
64 while (pal->depth) { in arg_finit()
65 arg_source *pas = &pal->sources[--(pal->depth)]; in arg_finit()
88 top:pas = &pal->sources[pal->depth - 1]; in arg_next()
89 if (pal->depth == 0) { in arg_next()
122 pal->depth--; in arg_next()
191 if (pal->depth == arg_depth_max) { in arg_next()
[all …]
H A Dgdev4693.c30 #define t4693d_prn_device(name,depth,max_rgb) {prn_device_body( \ argument
33 3,depth,max_rgb,max_rgb,max_rgb + 1,max_rgb + 1, \
43 ushort bitspercolor = prn_dev->color_info.depth / 3; in gdev_t4693d_map_rgb_color()
62 ushort bitspercolor = prn_dev->color_info.depth / 3; in gdev_t4693d_map_color_rgb()
80 int depth = prn_dev->color_info.depth; in t4693d_print_page() local
104 *p++ = (char)(depth == 8) ? 0xcb : (depth == 16) ? 0xcc : 0xcd; in t4693d_print_page()
133 switch (depth) { in t4693d_print_page()
149 errprintf("Bad depth (%d) t4693d.\n",depth); in t4693d_print_page()
H A Dzcspixel.c33 ref depth; in zsetdevicepixelspace() local
40 array_get(imemory, op, 1L, &depth); in zsetdevicepixelspace()
41 check_type_only(depth, t_integer); in zsetdevicepixelspace()
42 code = gs_cspace_init_DevicePixel(imemory, &cs, (int)depth.value.intval); in zsetdevicepixelspace()
H A Dgxdevice.h147 #define std_device_full_body_type(dtype, pprocs, dname, stype, w, h, xdpi, ydpi, ncomp, depth, mg, … argument
149 dci_values(ncomp, depth, mg, mc, dg, dc),\
154 …xtended(dtype, pprocs, dname, stype, w, h, xdpi, ydpi, mcomp, ncomp, pol, depth, gi, mg, mc, dg, d… argument
156 dci_extended_alpha_values(mcomp, ncomp, pol, depth, gi, mg, mc, dg, dc, 1, 1, ef, cn), \
161 #define std_device_full_body(dtype, pprocs, dname, w, h, xdpi, ydpi, ncomp, depth, mg, mc, dg, dc, … argument
163 ncomp, depth, mg, mc, dg, dc, xoff, yoff, lm, bm, rm, tm)
165 #define std_device_dci_alpha_type_body(dtype, pprocs, dname, stype, w, h, xdpi, ydpi, ncomp, depth,… argument
167 dci_alpha_values(ncomp, depth, mg, mc, dg, dc, ta, ga),\
172 #define std_device_dci_type_body(dtype, pprocs, dname, stype, w, h, xdpi, ydpi, ncomp, depth, mg, m… argument
174 xdpi, ydpi, ncomp, depth, mg, mc, dg, dc, 1, 1)
[all …]
H A Dgdevbit.c145 int bpc = dev->color_info.depth; in bit_mono_map_color()
157 int depth = dev->color_info.depth; in bit_map_color_rgb() local
159 int bpc = depth / ncomp; in bit_map_color_rgb()
167 (depth == 1 ? (color ? 0 : gx_max_color_value) : in bit_map_color_rgb()
207 int bpc = dev->color_info.depth / 4; in bit_map_cmyk_color()
259 int bpc = pdev->color_info.depth / real_ncomps; in bit_put_params()
324 pdev->color_info.depth = depths[real_ncomps - 1][bpc - 1]; in bit_put_params()
337 if (pdev->color_info.depth != save_info.depth || in bit_put_params()
347 pdev->color_info.depth == 4 ? cmyk_1bit_map_cmyk_color : in bit_put_params()
348 pdev->color_info.depth == 32 ? cmyk_8bit_map_cmyk_color : in bit_put_params()
H A Dgdevmac.c124 mac_set_colordepth(dev, mdev->color_info.depth); in mac_open()
372 gx_color_index color, int depth) in mac_copy_alpha() argument
377 short copyMode, shade, maxShade = (1 << depth) - 1, byteCount = raster * h; in mac_copy_alpha()
420 PICTWritePixMap(mdev->currPicPos, 0, 0, raster*8/depth, h, raster, 0, 0, in mac_copy_alpha()
421 X2Fix(mdev->x_pixels_per_inch), X2Fix(mdev->y_pixels_per_inch), depth); in mac_copy_alpha()
538 mac_set_colordepth(gx_device *dev, int depth) in mac_set_colordepth() argument
543 if (depth != 1 && depth != 4 && depth != 7 && depth != 8 && depth != 24) in mac_set_colordepth()
546 mdev->color_info.depth = depth; in mac_set_colordepth()
547 switch (depth) in mac_set_colordepth()
566 ci->depth = 7; in mac_set_colordepth()
[all …]
H A Dgdevdbit.c84 int depth = dev->color_info.depth; in gx_default_copy_color() local
91 if (depth == 1) in gx_default_copy_color()
97 mask = (byte) ((1 << depth) - 1); in gx_default_copy_color()
101 const byte *ptr = row + ((dx * depth) >> 3); in gx_default_copy_color()
107 if (depth >= 8) { in gx_default_copy_color()
109 switch (depth) { in gx_default_copy_color()
126 uint dbit = (-(ix + dx + 1) * depth) & 7; in gx_default_copy_color()
157 gx_color_index color, int depth) in gx_no_copy_alpha() argument
165 gx_color_index color, int depth) in gx_default_copy_alpha() argument
167 if (depth == 1) in gx_default_copy_alpha()
[all …]
H A Dgxclbits.c253 cmd_store_tile_params(byte * dp, const gx_strip_bitmap * tile, int depth, in cmd_store_tile_params() argument
257 byte bd = cmd_depth_to_code(depth); in cmd_store_tile_params()
425 uint sraster, int depth) in clist_add_tile() argument
466 slot->cb_depth = depth; in clist_add_tile()
476 (tiles->rep_width * depth + 7) >> 3, in clist_add_tile()
505 int depth, const gx_device_clist_writer * cldev) in clist_new_tile_params() argument
520 uint rep_width_bits = rep_width * depth; in clist_new_tile_params()
538 new_tile->raster = bitmap_raster(new_tile->size.x * depth); in clist_new_tile_params()
559 const gx_strip_bitmap * tiles, int depth) in clist_change_tile() argument
564 #define tile_params_differ(cldev, tiles, depth)\ in clist_change_tile() argument
[all …]
H A Dgdevpsfx.c447 int depth; /* of operands on stack */ in psf_convert_type1_to_type2() local
450 (depth = 0, prev_op = -1) in psf_convert_type1_to_type2()
556 depth += cis.os_count; in psf_convert_type1_to_type2()
627 depth = 1, prev_op = cx_vmoveto; in psf_convert_type1_to_type2()
630 depth = 1, prev_op = cx_hmoveto; in psf_convert_type1_to_type2()
634 depth = 2, prev_op = cx_rmoveto; in psf_convert_type1_to_type2()
733 if (depth > MAX_STACK - 2) in psf_convert_type1_to_type2()
745 if (depth > MAX_STACK - 1 || in psf_convert_type1_to_type2()
746 prev_op != (depth & 1 ? cx_vlineto : cx_hlineto)) in psf_convert_type1_to_type2()
751 if (depth > MAX_STACK - 1 || in psf_convert_type1_to_type2()
[all …]
H A Dgdevmpla.c50 int same_depth = planes[0].depth; in gdev_mem_set_planar()
58 int plane_depth = planes[pi].depth; in gdev_mem_set_planar()
72 if (total_depth > mdev->color_info.depth) in gdev_mem_set_planar()
107 int depth; /* color_info.depth */ member
112 (msp.depth = mdev->color_info.depth,\
116 (mdev->color_info.depth = plane_depth, /* maybe not needed */\
120 (mdev->color_info.depth = msp.depth,\
135 int plane_depth = mdev->planes[pi].depth; in mem_planar_fill_rectangle()
162 int plane_depth = mdev->planes[pi].depth; in mem_planar_copy_mono()
200 int source_depth = dev->color_info.depth; in mem_planar_copy_color()
[all …]
H A Dgxbcache.h39 uint depth; /* bits per pixel, free block if 0 */ member
42 #define cb_head_is_free(cbh) ((cbh)->depth == 0)
43 #define cb_head_set_free(cbh) ((cbh)->depth = 0)
52 #define cb_depth head.depth
H A Dgdevos2p.c83 private void os2prn_set_bpp(gx_device * dev, int depth);
139 int depth; in os2prn_open() local
251 depth = dev->color_info.depth; in os2prn_open()
252 if (depth == 0) { in os2prn_open()
258 depth = caps[0] * caps[1]; in os2prn_open()
259 if (depth > 1) in os2prn_open()
260 depth = 24; in os2prn_open()
262 os2prn_set_bpp(dev, depth); in os2prn_open()
347 int old_bpp = dev->color_info.depth; in os2prn_put_params()
427 int depth = pdev->color_info.depth; in os2prn_print_page() local
[all …]
H A Dgsovrc.c564 swap_color_index(int depth, gx_color_index color) in swap_color_index() argument
566 int shift = depth - 8; in swap_color_index()
572 if (depth > 24) { in swap_color_index()
579 if (depth > 40) { in swap_color_index()
586 if (depth > 56) { in swap_color_index()
612 int depth = opdev->color_info.depth; in set_retain_mask() local
620 if (depth > 8) in set_retain_mask()
621 retain_mask = swap_color_index(depth, retain_mask); in set_retain_mask()
858 int depth = tdev->color_info.depth; in overprint_sep_fill_rectangle() local
866 if (depth > 8) in overprint_sep_fill_rectangle()
[all …]
/plan9/sys/src/libString/
H A Ds_rdinstack.c8 int depth; member
24 sp->depth = 0; in s_allocinstack()
32 while(sp->depth >= 0) in s_freeinstack()
33 Bterm(sp->fp[sp->depth--]); in s_freeinstack()
100 fp = sp->fp[sp->depth]; in s_rdinstack()
105 if(sp->depth == 0) in s_rdinstack()
108 sp->depth--; in s_rdinstack()
117 if(sp->depth >= nelem(sp->fp)) in s_rdinstack()
127 sp->depth++; in s_rdinstack()
128 sp->fp[sp->depth] = nfp; in s_rdinstack()
/plan9/sys/src/cmd/jpg/
H A Dwriteppm.c24 int i, x, y, ndata, depth, col, pix, xmask, pmask; in writedata() local
30 depth = memimage->depth; in writedata()
34 depth = image->depth; in writedata()
42 ndata = Dy(r)*(2+Dx(r)*depth/8); in writedata()
65 pmask = (1<<depth)-1; in writedata()
66 xmask = 7>>log2[depth]; in writedata()
68 i = (y-r.min.y)*bytesperline(r, depth); in writedata()
70 pix = (data[i]>>depth*((xmask-x)&xmask))&pmask; in writedata()
H A Dwritegif.c52 startgif0(Biobuf *fd, ulong chan, Rectangle r, int depth, int loopcount) in startgif0() argument
71 writeheader(fd, r, depth, chan, loopcount); in startgif0()
78 return startgif0(fd, image->chan, image->r, image->depth, loopcount); in startgif()
84 return startgif0(fd, memimage->chan, memimage->r, memimage->depth, loopcount); in memstartgif()
206 writeheader(Biobuf *fd, Rectangle r, int depth, ulong chan, int loopcount) in writeheader() argument
216 …Bputc(fd, (1<<7)|(3<<4)|(depth-1)); /* not right for GREY8, but GIF doesn't let us specify enough … in writeheader()
223 depth = GREYMAP; in writeheader()
225 depth = log2[depth]; in writeheader()
226 Bwrite(fd, colormap[depth], 3*colormapsize[depth]); in writeheader()
335 int ndata, depth; in writedata() local
[all …]
/plan9/sys/src/cmd/spin/
H A Dguided.c20 extern int verbose, lineno, xspin, jumpsteps, depth, merger, cutoff;
143 while (fscanf(fd, "%d:%d:%d\n", &depth, &pno, &nst) == 3) in match_trail()
144 { if (depth == -2) { start_claim(pno); continue; } in match_trail()
145 if (depth == -4) { merger = 1; ana_src(0, 1); continue; } in match_trail()
146 if (depth == -1) in match_trail()
156 if (cutoff > 0 && depth >= cutoff) in match_trail()
170 depth, pno - Have_claim, nst); in match_trail()
187 depth); in match_trail()
190 depth, pno - Have_claim); in match_trail()
195 printf("%3d: stop error, ", depth); in match_trail()
[all …]
/plan9/sys/src/cmd/vnc/
H A Dcolor.c114 int bpp, depth; in choosecolor() local
117 bpp = screen->depth; in choosecolor()
121 depth = screen->depth; in choosecolor()
136 depth = 12; in choosecolor()
144 depth = 8; in choosecolor()
152 v->depth = depth; in choosecolor()
161 v->bpp, v->depth, screen->chan, v->truecolor, v->bigendian); in choosecolor()
/plan9/sys/src/cmd/unix/drawterm/gui-win32/
H A Dscreen.c22 static int depth; variable
55 if(depth == 0) in screeninit()
56 depth = GetDeviceCaps(GetDC(NULL), BITSPIXEL); in screeninit()
57 switch(depth){ in screeninit()
60 screen.depth = 32; in screeninit()
65 screen.depth = 24; in screeninit()
70 screen.depth = 16; in screeninit()
76 screen.depth = 8; in screeninit()
77 depth = 8; in screeninit()
90 attachscreen(Rectangle *r, ulong *chan, int *depth, int *width, int *softscreen, void **X) in attachscreen() argument
[all …]

12345678910>>...14