Gitweb links:

...log 
http://git.netsurf-browser.org/toolchains.git/shortlog/67f8220fe97747ba361115f592abe25f41978bb0
...commit 
http://git.netsurf-browser.org/toolchains.git/commit/67f8220fe97747ba361115f592abe25f41978bb0
...tree 
http://git.netsurf-browser.org/toolchains.git/tree/67f8220fe97747ba361115f592abe25f41978bb0

The branch, chris/libimagequant has been updated
       via  67f8220fe97747ba361115f592abe25f41978bb0 (commit)
      from  6d2a834c845600ae82b1291f8af4415c5b93c48d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/toolchains.git/commit/?id=67f8220fe97747ba361115f592abe25f41978bb0
commit 67f8220fe97747ba361115f592abe25f41978bb0
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Fix libimagequant build on OS3

diff --git a/sdk/Makefile b/sdk/Makefile
index c3389fe..de85489 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -350,7 +350,7 @@ $(BUILDSTEPS)/libimagequant.d: $(BUILDSTEPS)/builddir.d 
$(BUILDSTEPS)/libimagequ
 ifneq ($(realpath $(RECIPES)/patches/libimagequant/$(TARGET)),)
        for p in `ls $(RECIPES)/patches/libimagequant/$(TARGET)/*.p` ; do 
$(PATCH) -d $(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT) -p0 
<$$p ; done
 endif
-       cd $(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT)/lib && 
$(env) make PREFIX=$(GCCSDK_INSTALL_ENV)
+       cd $(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT)/lib && 
$(env) make static PREFIX=$(GCCSDK_INSTALL_ENV)
        cp 
$(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT)/lib/libimagequant.h 
$(GCCSDK_INSTALL_ENV)/include/libimagequant.h
        cp 
$(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT)/lib/libimagequant.a 
$(GCCSDK_INSTALL_ENV)/lib/libimagequant.a
        touch $@
diff --git 
a/sdk/recipes/patches/libimagequant/m68k-unknown-amigaos/lib.mediancut.p 
b/sdk/recipes/patches/libimagequant/m68k-unknown-amigaos/lib.mediancut.p
new file mode 100644
index 0000000..9bd38ef
--- /dev/null
+++ b/sdk/recipes/patches/libimagequant/m68k-unknown-amigaos/lib.mediancut.p
@@ -0,0 +1,32 @@
+--- lib/mediancut.c    2016-01-24 15:46:08.000000000 +0000
++++ lib/mediancut.c    2016-04-23 14:58:16.431016951 +0100
+@@ -93,7 +93,13 @@ static double box_max_error(const hist_i
+     return max_error;
+ }
+ 
+-ALWAYS_INLINE static double color_weight(f_pixel median, hist_item h);
++inline static double color_weight(f_pixel median, hist_item h)
++{
++    float diff = colordifference(median, h.acolor);
++    // if color is "good enough", don't split further
++    if (diff < 2.f/256.f/256.f) diff /= 2.f;
++    return sqrt(diff) * (sqrt(1.0+h.adjusted_weight)-1.0);
++}
+ 
+ static inline void hist_item_swap(hist_item *l, hist_item *r)
+ {
+@@ -275,14 +281,6 @@ static int best_splittable_box(struct bo
+     return bi;
+ }
+ 
+-inline static double color_weight(f_pixel median, hist_item h)
+-{
+-    float diff = colordifference(median, h.acolor);
+-    // if color is "good enough", don't split further
+-    if (diff < 2.f/256.f/256.f) diff /= 2.f;
+-    return sqrt(diff) * (sqrt(1.0+h.adjusted_weight)-1.0);
+-}
+-
+ static void set_colormap_from_boxes(colormap *map, struct box* bv, unsigned 
int boxes, hist_item *achv);
+ static void adjust_histogram(hist_item *achv, const colormap *map, const 
struct box* bv, unsigned int boxes);
+ 


-----------------------------------------------------------------------

Summary of changes:
 sdk/Makefile                                       |    2 +-
 .../m68k-unknown-amigaos/lib.mediancut.p           |   32 ++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 
sdk/recipes/patches/libimagequant/m68k-unknown-amigaos/lib.mediancut.p

diff --git a/sdk/Makefile b/sdk/Makefile
index c3389fe..de85489 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -350,7 +350,7 @@ $(BUILDSTEPS)/libimagequant.d: $(BUILDSTEPS)/builddir.d 
$(BUILDSTEPS)/libimagequ
 ifneq ($(realpath $(RECIPES)/patches/libimagequant/$(TARGET)),)
        for p in `ls $(RECIPES)/patches/libimagequant/$(TARGET)/*.p` ; do 
$(PATCH) -d $(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT) -p0 
<$$p ; done
 endif
-       cd $(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT)/lib && 
$(env) make PREFIX=$(GCCSDK_INSTALL_ENV)
+       cd $(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT)/lib && 
$(env) make static PREFIX=$(GCCSDK_INSTALL_ENV)
        cp 
$(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT)/lib/libimagequant.h 
$(GCCSDK_INSTALL_ENV)/include/libimagequant.h
        cp 
$(BUILDDIR)/libimagequant/pngquant-$(VERSION_LIBIMAGEQUANT)/lib/libimagequant.a 
$(GCCSDK_INSTALL_ENV)/lib/libimagequant.a
        touch $@
diff --git 
a/sdk/recipes/patches/libimagequant/m68k-unknown-amigaos/lib.mediancut.p 
b/sdk/recipes/patches/libimagequant/m68k-unknown-amigaos/lib.mediancut.p
new file mode 100644
index 0000000..9bd38ef
--- /dev/null
+++ b/sdk/recipes/patches/libimagequant/m68k-unknown-amigaos/lib.mediancut.p
@@ -0,0 +1,32 @@
+--- lib/mediancut.c    2016-01-24 15:46:08.000000000 +0000
++++ lib/mediancut.c    2016-04-23 14:58:16.431016951 +0100
+@@ -93,7 +93,13 @@ static double box_max_error(const hist_i
+     return max_error;
+ }
+ 
+-ALWAYS_INLINE static double color_weight(f_pixel median, hist_item h);
++inline static double color_weight(f_pixel median, hist_item h)
++{
++    float diff = colordifference(median, h.acolor);
++    // if color is "good enough", don't split further
++    if (diff < 2.f/256.f/256.f) diff /= 2.f;
++    return sqrt(diff) * (sqrt(1.0+h.adjusted_weight)-1.0);
++}
+ 
+ static inline void hist_item_swap(hist_item *l, hist_item *r)
+ {
+@@ -275,14 +281,6 @@ static int best_splittable_box(struct bo
+     return bi;
+ }
+ 
+-inline static double color_weight(f_pixel median, hist_item h)
+-{
+-    float diff = colordifference(median, h.acolor);
+-    // if color is "good enough", don't split further
+-    if (diff < 2.f/256.f/256.f) diff /= 2.f;
+-    return sqrt(diff) * (sqrt(1.0+h.adjusted_weight)-1.0);
+-}
+-
+ static void set_colormap_from_boxes(colormap *map, struct box* bv, unsigned 
int boxes, hist_item *achv);
+ static void adjust_histogram(hist_item *achv, const colormap *map, const 
struct box* bv, unsigned int boxes);
+ 


-- 
Cross-compilation toolchains and environments

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to