int vnc_tight_send_framebuffer_update(VncState *vs, int x, int y,

                                      int w, int h)

{

    int max_rows;



    if (vs->clientds.pf.bytes_per_pixel == 4 && vs->clientds.pf.rmax == 0xFF &&

        vs->clientds.pf.bmax == 0xFF && vs->clientds.pf.gmax == 0xFF) {

        vs->tight_pixel24 = true;

    } else {

        vs->tight_pixel24 = false;

    }



    if (w * h < VNC_TIGHT_MIN_SPLIT_RECT_SIZE)

        return send_rect_simple(vs, x, y, w, h);



    /* Calculate maximum number of rows in one non-solid rectangle. */



    max_rows = tight_conf[vs->tight_compression].max_rect_size;

    max_rows /= MIN(tight_conf[vs->tight_compression].max_rect_width, w);



    return find_large_solid_color_rect(vs, x, y, w, h, max_rows);

}

int vnc_tight_send_framebuffer_update(VncState *vs, int x, int y,

                                      int w, int h)

{

    int max_rows;



    if (vs->clientds.pf.bytes_per_pixel == 4 && vs->clientds.pf.rmax == 0xFF &&

        vs->clientds.pf.bmax == 0xFF && vs->clientds.pf.gmax == 0xFF) {

        vs->tight_pixel24 = true;

    } else {

        vs->tight_pixel24 = false;

    }



    if (w * h < VNC_TIGHT_MIN_SPLIT_RECT_SIZE)

        return send_rect_simple(vs, x, y, w, h);



    



    max_rows = tight_conf[vs->tight_compression].max_rect_size;

    max_rows /= MIN(tight_conf[vs->tight_compression].max_rect_width, w);



    return find_large_solid_color_rect(vs, x, y, w, h, max_rows);

}

int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2,

                                      int VAR_3, int VAR_4)

{

    int VAR_5;



    if (VAR_0->clientds.pf.bytes_per_pixel == 4 && VAR_0->clientds.pf.rmax == 0xFF &&

        VAR_0->clientds.pf.bmax == 0xFF && VAR_0->clientds.pf.gmax == 0xFF) {

        VAR_0->tight_pixel24 = true;

    } else {

        VAR_0->tight_pixel24 = false;

    }



    if (VAR_3 * VAR_4 < VNC_TIGHT_MIN_SPLIT_RECT_SIZE)

        return send_rect_simple(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4);



    



    VAR_5 = tight_conf[VAR_0->tight_compression].max_rect_size;

    VAR_5 /= MIN(tight_conf[VAR_0->tight_compression].max_rect_width, VAR_3);



    return find_large_solid_color_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);

}

int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{ int VAR_5; if (VAR_0->clientds.pf.bytes_per_pixel == 4 && VAR_0->clientds.pf.rmax == 0xFF &&
VAR_0->clientds.pf.bmax == 0xFF && VAR_0->clientds.pf.gmax == 0xFF) { VAR_0->tight_pixel24 = true; } else { VAR_0->tight_pixel24 = false; } if (VAR_3 * VAR_4 < VNC_TIGHT_MIN_SPLIT_RECT_SIZE)
return send_rect_simple(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4); VAR_5 = tight_conf[VAR_0->tight_compression].max_rect_size; VAR_5 /= MIN(tight_conf[VAR_0->tight_compression].max_rect_width, VAR_3); return find_large_solid_color_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5); }