Lines Matching refs:tight

119     if (vs->tight->type != VNC_ENCODING_TIGHT_PNG) {  in tight_can_send_png_rect()
147 unsigned char *buf = vs->tight->tight.buffer; in tight_detect_smooth_image24()
218 unsigned char *buf = vs->tight->tight.buffer; \
299 int compression = vs->tight->compression; in tight_detect_smooth_image()
300 int quality = vs->tight->quality; in tight_detect_smooth_image()
312 if (vs->tight->quality != (uint8_t)-1) { in tight_detect_smooth_image()
323 if (vs->tight->pixel24) { in tight_detect_smooth_image()
325 if (vs->tight->quality != (uint8_t)-1) { in tight_detect_smooth_image()
355 data = (uint##bpp##_t *)vs->tight->tight.buffer; \
426 max = count / tight_conf[vs->tight->compression].idx_max_colors_divisor; in tight_fill_palette()
428 count >= tight_conf[vs->tight->compression].mono_min_rect_size) { in tight_fill_palette()
561 memset(vs->tight->gradient.buffer, 0, w * 3 * sizeof(int)); in tight_filter_gradient24()
578 prev = (int *)vs->tight->gradient.buffer; in tight_filter_gradient24()
618 memset(vs->tight->gradient.buffer, 0, w * 3 * sizeof(int)); \
634 prev = (int *)vs->tight->gradient.buffer; \
788 z_streamp zstream = &vs->tight->stream[stream_id]; in tight_init_stream()
806 vs->tight->levels[stream_id] = level; in tight_init_stream()
810 if (vs->tight->levels[stream_id] != level) { in tight_init_stream()
814 vs->tight->levels[stream_id] = level; in tight_init_stream()
842 z_streamp zstream = &vs->tight->stream[stream_id]; in tight_compress_data()
846 vnc_write(vs, vs->tight->tight.buffer, vs->tight->tight.offset); in tight_compress_data()
855 buffer_reserve(&vs->tight->zlib, bytes + 64); in tight_compress_data()
858 zstream->next_in = vs->tight->tight.buffer; in tight_compress_data()
859 zstream->avail_in = vs->tight->tight.offset; in tight_compress_data()
860 zstream->next_out = vs->tight->zlib.buffer + vs->tight->zlib.offset; in tight_compress_data()
861 zstream->avail_out = vs->tight->zlib.capacity - vs->tight->zlib.offset; in tight_compress_data()
871 vs->tight->zlib.offset = vs->tight->zlib.capacity - zstream->avail_out; in tight_compress_data()
876 vnc_write(vs, vs->tight->zlib.buffer, bytes); in tight_compress_data()
878 buffer_reset(&vs->tight->zlib); in tight_compress_data()
930 if (vs->tight->pixel24) { in send_full_color_rect()
931 tight_pack24(vs, vs->tight->tight.buffer, w * h, in send_full_color_rect()
932 &vs->tight->tight.offset); in send_full_color_rect()
939 tight_conf[vs->tight->compression].raw_zlib_level, in send_full_color_rect()
951 if (vs->tight->pixel24) { in send_solid_rect()
952 tight_pack24(vs, vs->tight->tight.buffer, 1, &vs->tight->tight.offset); in send_solid_rect()
958 vnc_write(vs, vs->tight->tight.buffer, bytes); in send_solid_rect()
967 int level = tight_conf[vs->tight->compression].mono_zlib_level; in send_mono_rect()
995 if (vs->tight->pixel24) { in send_mono_rect()
1000 tight_encode_mono_rect32(vs->tight->tight.buffer, w, h, bg, fg); in send_mono_rect()
1009 tight_encode_mono_rect16(vs->tight->tight.buffer, w, h, bg, fg); in send_mono_rect()
1018 tight_encode_mono_rect8(vs->tight->tight.buffer, w, h, bg, fg); in send_mono_rect()
1022 vs->tight->tight.offset = bytes; in send_mono_rect()
1052 int level = tight_conf[vs->tight->compression].gradient_zlib_level; in send_gradient_rect()
1062 buffer_reserve(&vs->tight->gradient, w * 3 * sizeof(int)); in send_gradient_rect()
1064 if (vs->tight->pixel24) { in send_gradient_rect()
1065 tight_filter_gradient24(vs, vs->tight->tight.buffer, w, h); in send_gradient_rect()
1068 tight_filter_gradient32(vs, (uint32_t *)vs->tight->tight.buffer, w, h); in send_gradient_rect()
1071 tight_filter_gradient16(vs, (uint16_t *)vs->tight->tight.buffer, w, h); in send_gradient_rect()
1075 buffer_reset(&vs->tight->gradient); in send_gradient_rect()
1078 vs->tight->tight.offset = bytes; in send_gradient_rect()
1089 int level = tight_conf[vs->tight->compression].idx_zlib_level; in send_palette_rect()
1116 if (vs->tight->pixel24) { in send_palette_rect()
1121 tight_encode_indexed_rect32(vs->tight->tight.buffer, w * h, palette); in send_palette_rect()
1132 tight_encode_indexed_rect16(vs->tight->tight.buffer, w * h, palette); in send_palette_rect()
1139 vs->tight->tight.offset = bytes; in send_palette_rect()
1158 Buffer *buffer = &vs->tight->jpeg; in jpeg_init_destination()
1168 Buffer *buffer = &vs->tight->jpeg; in jpeg_empty_output_buffer()
1180 Buffer *buffer = &vs->tight->jpeg; in jpeg_term_destination()
1199 buffer_reserve(&vs->tight->jpeg, 2048); in send_jpeg_rect()
1234 tight_send_compact_size(vs, vs->tight->jpeg.offset); in send_jpeg_rect()
1235 vnc_write(vs, vs->tight->jpeg.buffer, vs->tight->jpeg.offset); in send_jpeg_rect()
1236 buffer_reset(&vs->tight->jpeg); in send_jpeg_rect()
1252 if (vs->tight->pixel24) in write_png_palette()
1279 buffer_reserve(&vs->tight->png, vs->tight->png.offset + length); in png_write_data()
1280 memcpy(vs->tight->png.buffer + vs->tight->png.offset, data, length); in png_write_data()
1282 vs->tight->png.offset += length; in png_write_data()
1307 int level = tight_png_conf[vs->tight->compression].png_zlib_level; in send_png_rect()
1308 int filters = tight_png_conf[vs->tight->compression].png_filters; in send_png_rect()
1352 tight_encode_indexed_rect32(vs->tight->tight.buffer, w * h, in send_png_rect()
1355 tight_encode_indexed_rect16(vs->tight->tight.buffer, w * h, in send_png_rect()
1362 buffer_reserve(&vs->tight->png, 2048); in send_png_rect()
1368 memcpy(buf, vs->tight->tight.buffer + (dy * w), w); in send_png_rect()
1386 tight_send_compact_size(vs, vs->tight->png.offset); in send_png_rect()
1387 vnc_write(vs, vs->tight->png.buffer, vs->tight->png.offset); in send_png_rect()
1388 buffer_reset(&vs->tight->png); in send_png_rect()
1395 buffer_reset(&vs->tight->tight); in vnc_tight_start()
1398 vs->tight->tmp = vs->output; in vnc_tight_start()
1399 vs->output = vs->tight->tight; in vnc_tight_start()
1405 vs->tight->tight = vs->output; in vnc_tight_stop()
1406 vs->output = vs->tight->tmp; in vnc_tight_stop()
1440 if (force || (tight_jpeg_conf[vs->tight->quality].jpeg_full && in send_sub_rect_jpeg()
1442 int quality = tight_conf[vs->tight->quality].jpeg_quality; in send_sub_rect_jpeg()
1454 tight_jpeg_conf[vs->tight->quality].jpeg_idx && in send_sub_rect_jpeg()
1456 int quality = tight_conf[vs->tight->quality].jpeg_quality; in send_sub_rect_jpeg()
1494 vnc_framebuffer_update(vs, x, y, w, h, vs->tight->type); in send_sub_rect()
1501 if (!vs->vd->non_adaptive && vs->tight->quality != (uint8_t)-1) { in send_sub_rect()
1504 if (freq < tight_jpeg_conf[vs->tight->quality].jpeg_freq_min) { in send_sub_rect()
1507 if (freq >= tight_jpeg_conf[vs->tight->quality].jpeg_freq_threshold) { in send_sub_rect()
1517 if (allow_jpeg && vs->tight->quality != (uint8_t)-1) { in send_sub_rect()
1534 vnc_framebuffer_update(vs, x, y, w, h, vs->tight->type); in send_sub_rect_solid()
1552 max_size = tight_conf[vs->tight->compression].max_rect_size; in send_rect_simple()
1553 max_width = tight_conf[vs->tight->compression].max_rect_width; in send_rect_simple()
1662 vs->tight->pixel24 = true; in tight_send_framebuffer_update()
1664 vs->tight->pixel24 = false; in tight_send_framebuffer_update()
1668 if (vs->tight->quality != (uint8_t)-1) { in tight_send_framebuffer_update()
1671 if (freq > tight_jpeg_conf[vs->tight->quality].jpeg_freq_threshold) { in tight_send_framebuffer_update()
1683 max_rows = tight_conf[vs->tight->compression].max_rect_size; in tight_send_framebuffer_update()
1684 max_rows /= MIN(tight_conf[vs->tight->compression].max_rect_width, w); in tight_send_framebuffer_update()
1692 vs->tight->type = VNC_ENCODING_TIGHT; in vnc_tight_send_framebuffer_update()
1699 vs->tight->type = VNC_ENCODING_TIGHT_PNG; in vnc_tight_png_send_framebuffer_update()
1706 for (i = 0; i < ARRAY_SIZE(vs->tight->stream); i++) { in vnc_tight_clear()
1707 if (vs->tight->stream[i].opaque) { in vnc_tight_clear()
1708 deflateEnd(&vs->tight->stream[i]); in vnc_tight_clear()
1712 buffer_free(&vs->tight->tight); in vnc_tight_clear()
1713 buffer_free(&vs->tight->zlib); in vnc_tight_clear()
1714 buffer_free(&vs->tight->gradient); in vnc_tight_clear()
1716 buffer_free(&vs->tight->jpeg); in vnc_tight_clear()
1719 buffer_free(&vs->tight->png); in vnc_tight_clear()