mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
gifsicle: bump version
patch upstream
This commit is contained in:
@@ -10,8 +10,7 @@ COPYRIGHT="1997-2018 Eddie Kohler"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.lcdf.org/gifsicle/gifsicle-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5ab556c01d65fddf980749e3ccf50b7fd40de738b6df679999294cc5fabfce65"
|
||||
PATCHES="gifsicle-$portVersion.patchset"
|
||||
CHECKSUM_SHA256="92f67079732bf4c1da087e6ae0905205846e5ac777ba5caa66d12a73aa943447"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
From b1338f362620d9bbfe4c1ca41ae37c0c7ceeca53 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 3 May 2019 19:04:54 +0200
|
||||
Subject: gcc2 patch
|
||||
|
||||
|
||||
diff --git a/src/gifwrite.c b/src/gifwrite.c
|
||||
index 3688a09..50b2c4d 100644
|
||||
--- a/src/gifwrite.c
|
||||
+++ b/src/gifwrite.c
|
||||
@@ -210,6 +210,8 @@ typedef struct gfc_rgbdiff {signed short r, g, b;} gfc_rgbdiff;
|
||||
/* Difference (MSE) between given color indexes + dithering error */
|
||||
static inline unsigned int color_diff(Gif_Color a, Gif_Color b, int a_transparent, int b_transparent, gfc_rgbdiff dither)
|
||||
{
|
||||
+ unsigned int dith, undith;
|
||||
+
|
||||
/* if one is transparent and the other is not, then return maximum difference */
|
||||
/* TODO: figure out what color is in the canvas under the transparent pixel and match against that */
|
||||
if (a_transparent != b_transparent) return 1<<25;
|
||||
@@ -218,11 +220,11 @@ static inline unsigned int color_diff(Gif_Color a, Gif_Color b, int a_transparen
|
||||
if (a_transparent) return 0;
|
||||
|
||||
/* squared error with or without dithering. */
|
||||
- unsigned int dith = (a.gfc_red-b.gfc_red+dither.r)*(a.gfc_red-b.gfc_red+dither.r)
|
||||
+ dith = (a.gfc_red-b.gfc_red+dither.r)*(a.gfc_red-b.gfc_red+dither.r)
|
||||
+ (a.gfc_green-b.gfc_green+dither.g)*(a.gfc_green-b.gfc_green+dither.g)
|
||||
+ (a.gfc_blue-b.gfc_blue+dither.b)*(a.gfc_blue-b.gfc_blue+dither.b);
|
||||
|
||||
- unsigned int undith = (a.gfc_red-b.gfc_red+dither.r/2)*(a.gfc_red-b.gfc_red+dither.r/2)
|
||||
+ undith = (a.gfc_red-b.gfc_red+dither.r/2)*(a.gfc_red-b.gfc_red+dither.r/2)
|
||||
+ (a.gfc_green-b.gfc_green+dither.g/2)*(a.gfc_green-b.gfc_green+dither.g/2)
|
||||
+ (a.gfc_blue-b.gfc_blue+dither.b/2)*(a.gfc_blue-b.gfc_blue+dither.b/2);
|
||||
|
||||
@@ -336,9 +338,10 @@ gfc_lookup_lossy(Gif_CodeTable *gfc, const Gif_Colormap *gfcm, Gif_Image *gfi,
|
||||
unsigned image_endpos = gfi->width * gfi->height;
|
||||
|
||||
struct selected_node best_t = {node, pos, base_diff};
|
||||
+ uint8_t suffix;
|
||||
if (pos >= image_endpos) return best_t;
|
||||
|
||||
- uint8_t suffix = gif_pixel_at_pos(gfi, pos);
|
||||
+ suffix = gif_pixel_at_pos(gfi, pos);
|
||||
assert(!node || (node >= gfc->nodes && node < gfc->nodes + NODES_SIZE));
|
||||
assert(suffix < gfc->clear_code);
|
||||
if (!node) {
|
||||
--
|
||||
2.21.0
|
||||
|
||||
Reference in New Issue
Block a user