Home
last modified time | relevance | path

Searched refs:num_bits (Results 1 – 15 of 15) sorted by relevance

/plan9/sys/src/cmd/gs/src/
H A Dgxshade.c95 cs_next_packed_value(shade_coord_stream_t * cs, int num_bits, uint * pvalue) in cs_next_packed_value() argument
100 if (left >= num_bits) { in cs_next_packed_value()
102 cs->left = left -= num_bits; in cs_next_packed_value()
103 *pvalue = (bits >> left) & ((1 << num_bits) - 1); in cs_next_packed_value()
106 int needed = num_bits - left; in cs_next_packed_value()
141 cs_next_array_value(shade_coord_stream_t * cs, int num_bits, uint * pvalue) in cs_next_array_value() argument
151 if (value < 0 || (num_bits != 0 && num_bits < sizeof(uint) * 8 && in cs_next_array_value()
152 value >= (1 << num_bits)) || in cs_next_array_value()
162 cs_next_packed_decoded(shade_coord_stream_t * cs, int num_bits, in cs_next_packed_decoded() argument
166 int code = cs->get_value(cs, num_bits, &value); in cs_next_packed_decoded()
[all …]
H A Dgsht.c279 uint num_levels, uint num_bits, uint strip_shift, in gx_ht_alloc_ht_order() argument
292 porder->num_bits = num_bits; in gx_ht_alloc_ht_order()
305 if (num_bits > 0) { in gx_ht_alloc_ht_order()
307 gs_alloc_byte_array(mem, porder->num_bits, in gx_ht_alloc_ht_order()
334 psrc->num_levels, psrc->num_bits, psrc->shift, in gx_ht_copy_ht_order()
342 psrc->num_bits * psrc->procs->bit_data_elt_size); in gx_ht_copy_ht_order()
369 pdest->num_bits = psrc->num_bits; in gx_ht_move_ht_order()
408 uint num_bits = width * height; in gx_ht_alloc_threshold_order() local
410 (num_bits > 2000 && num_bits <= max_ushort ? in gx_ht_alloc_threshold_order()
427 uint num_levels, uint num_bits, gs_memory_t * mem) in gx_ht_alloc_client_order() argument
[all …]
H A Dgenht.c187 uint num_bits = Width * Height; in parse_halftone() local
200 malloc(num_bits * sizeof(ushort)); in parse_halftone()
201 Thresholds = malloc(num_bits); in parse_halftone()
206 w.limit = w.ptr + num_bits; in parse_halftone()
240 int num_bits = phtr->Width * phtr->Height; in write_halftone() local
260 for (i = 0; i < num_bits; ++i) { in write_halftone()
330 order.num_bits = res.Width * res.Height; in main()
H A Dgshtx.c439 (pocs[j].corder.num_bits / in gs_ht_install()
517 int num_bits = 0; in create_mask_order() local
522 for (prev_mask = masks, num_bits = 0, i = 0; in create_mask_order()
526 num_bits += create_mask_bits(prev_mask, prev_mask + bytes_per_mask, in create_mask_order()
529 num_levels, num_bits, mem); in create_mask_order()
533 for (prev_mask = masks, num_bits = 0, i = 0; in create_mask_order()
537 porder->levels[i] = num_bits; in create_mask_order()
538 num_bits += create_mask_bits(prev_mask, prev_mask + bytes_per_mask, in create_mask_order()
541 num_bits); in create_mask_order()
543 porder->levels[num_levels - 1] = num_bits; in create_mask_order()
H A Dgxdhtserial.c229 bits_size = porder->num_bits * porder->procs->bit_data_elt_size; in gx_ht_write_component()
235 + enc_u_sizew(porder->num_bits) in gx_ht_write_component()
256 enc_u_putw(porder->num_bits, data); in gx_ht_write_component()
327 enc_u_getw(new_order.num_bits, data); in gx_ht_read_component()
334 bits_size = new_order.num_bits * new_order.procs->bit_data_elt_size; in gx_ht_read_component()
378 new_order.num_bits, in gx_ht_read_component()
H A Dgxshade4.c102 int num_bits = psh->params.BitsPerFlag; in gs_shading_FfGt_fill_rectangle() local
119 while ((flag = shade_next_flag(&cs, num_bits)) >= 0) { in gs_shading_FfGt_fill_rectangle()
125 (code = shade_next_flag(&cs, num_bits)) < 0 || in gs_shading_FfGt_fill_rectangle()
127 (code = shade_next_flag(&cs, num_bits)) < 0 in gs_shading_FfGt_fill_rectangle()
H A Dgxshade.h120 int (*get_value)(shade_coord_stream_t *cs, int num_bits, uint *pvalue);
121 int (*get_decoded)(shade_coord_stream_t *cs, int num_bits,
H A Dgsmisc.c707 #define num_bits (sizeof(fixed) * 8) macro
708 #define half_bits (num_bits / 2)
805 #define bits_4th (num_bits / 4) in fixed_mult_quo()
806 if (denom < 1L << (num_bits - bits_4th)) { in fixed_mult_quo()
811 #define bits_8th (num_bits / 8) in fixed_mult_quo()
812 if (denom < 1L << (num_bits - bits_8th)) { in fixed_mult_quo()
817 while (!(denom & (-1L << (num_bits - 1)))) { in fixed_mult_quo()
821 msw = (msw << shift) + (lsw >> (num_bits - shift)); in fixed_mult_quo()
929 #undef num_bits
H A Dgzht.h35 uint num_levels, uint num_bits, uint strip_shift,
44 uint num_levels, uint num_bits, gs_memory_t * mem);
H A Dgxhtbit.c41 for (i = 0; i < porder->num_bits; i++) in construct_ht_order_default()
55 uint size = porder->num_bits; in construct_ht_order_short()
H A Dgxht.c725 if (porder->num_bits >= size) in gx_ht_init_cache()
726 size = porder->num_bits + 1; in gx_ht_init_cache()
807 pbt->tiles.size.y, porder->num_bits / porder->width); in render_ht()
809 if (level < 0 || level > porder->num_bits) { in render_ht()
811 level, pbt->level, porder->num_bits); in render_ht()
H A Dgxdht.h229 uint num_bits; /* = countof(bit_data) = width * height */ member
H A Dgdevpdfg.c717 uint num_bits = porder->num_bits; in pdf_write_spot_function() local
741 if (num_bits > 0x10000) in pdf_write_spot_function()
755 values = gs_alloc_byte_array(mem, num_bits, 2, "pdf_write_spot_function"); in pdf_write_spot_function()
758 for (i = 0; i < num_bits; ++i) { in pdf_write_spot_function()
770 sizeof(*values) * num_bits); in pdf_write_spot_function()
822 order.num_bits * porder->procs->bit_data_elt_size)) in pdf_write_spot_halftone()
H A Dgsht1.c378 uint size = porder->num_bits; in gx_ht_complete_threshold_order()
659 poc->corder.num_bits = 0; in gs_sethalftone_try_wts()
H A Dgdevtrac.c62 (ci < 0 ? pdcolor->colors.binary.b_ht->order.num_bits : in trace_drawing_color()
63 pdcolor->colors.binary.b_ht->components[ci].corder.num_bits), in trace_drawing_color()