From 11a73c5cb052df859e90a98c865d74a252846d54 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 5 Apr 2020 23:56:09 +0000 Subject: [PATCH] Revert "tight: Limit rectangle max width according to spec" This reverts commit 999c1ef255ee58e4d04b08f8699d36bfccf67692. This sends more rects than the original rect count allows for. --- src/tight.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/tight.c b/src/tight.c index 97e04bf..dceffe5 100644 --- a/src/tight.c +++ b/src/tight.c @@ -321,17 +321,10 @@ int tight_encode_frame(struct tight_encoder* self, struct vec* dst, int box_width = box[i].x2 - x; int box_height = box[i].y2 - y; - while (box_width > 0) { - int w = MIN(TIGHT_MAX_WIDTH, box_width); - box_width -= w; - - rc = tight_encode_box(self, dst, fb, src_fmt, x, y, - fb->width, w, box_height); - if (rc < 0) - return -1; - - x += w; - } + rc = tight_encode_box(self, dst, fb, src_fmt, x, y, + fb->width, box_width, box_height); + if (rc < 0) + return -1; } return 0;