update liblqr to 0.4.1

- trailing whitespace note by jca@

ok jca@
This commit is contained in:
rsadowski 2017-06-11 15:29:13 +00:00
parent f8cd771238
commit 13d827f923
4 changed files with 7 additions and 70 deletions

View File

@ -1,21 +1,19 @@
# $OpenBSD: Makefile,v 1.12 2016/03/18 21:38:24 naddy Exp $
# $OpenBSD: Makefile,v 1.13 2017/06/11 15:29:13 rsadowski Exp $
COMMENT = seam-carving smart rescale library
CATEGORIES = graphics devel
HOMEPAGE = http://liblqr.wikidot.com/
DISTNAME = liblqr-1-0.4.1
PKGNAME = liblqr-0.4.1
DISTNAME = liblqr-1-0.4.2
PKGNAME = liblqr-0.4.2
MASTER_SITES = ${HOMEPAGE}local--files/en:download-page/
EXTRACT_SUFX = .tar.bz2
REVISION = 0
# Library is LGPLv3, examples are GPLv3
PERMIT_PACKAGE_CDROM = Yes
CONFIGURE_STYLE = gnu
SEPARATE_BUILD = simple
#CONFIGURE_ENV = CFLAGS="${CFLAGS} ${COPTS}"
SHARED_LIBS += lqr-1 1.0 # .0.0

View File

@ -1,2 +1,2 @@
SHA256 (liblqr-1-0.4.1.tar.bz2) = n9oxaASk+goHGESDpLSIYRljNAYQYV6pzCX28xQH6Qk=
SIZE (liblqr-1-0.4.1.tar.bz2) = 347474
SHA256 (liblqr-1-0.4.2.tar.bz2) = FzqCLv0gfXLNp9f06VHFAA8xsQIJNm/38PWXL3+f8Tc=
SIZE (liblqr-1-0.4.2.tar.bz2) = 344739

View File

@ -1,61 +0,0 @@
$OpenBSD: patch-lqr_lqr_energy_c,v 1.1 2017/05/07 14:29:35 espie Exp $
C99 inlines require an extern decl
Index: lqr/lqr_energy.c
--- lqr/lqr_energy.c.orig
+++ lqr/lqr_energy.c
@@ -44,6 +44,8 @@
/* read normalised pixel value from
* rgb buffer at the given index */
+extern inline gdouble
+lqr_pixel_get_norm(void *rgb, gint rgb_ind, LqrColDepth col_depth);
inline gdouble
lqr_pixel_get_norm(void *rgb, gint rgb_ind, LqrColDepth col_depth)
{
@@ -66,6 +68,8 @@ lqr_pixel_get_norm(void *rgb, gint rgb_ind, LqrColDept
/* write pixel from normalised value
* in rgb buffer at the given index */
+extern inline void
+lqr_pixel_set_norm(gdouble val, void *rgb, gint rgb_ind, LqrColDepth col_depth);
inline void
lqr_pixel_set_norm(gdouble val, void *rgb, gint rgb_ind, LqrColDepth col_depth)
{
@@ -90,6 +94,8 @@ lqr_pixel_set_norm(gdouble val, void *rgb, gint rgb_in
}
}
+extern inline gdouble
+lqr_pixel_get_rgbcol(void *rgb, gint rgb_ind, LqrColDepth col_depth, LqrImageType image_type, gint channel);
inline gdouble
lqr_pixel_get_rgbcol(void *rgb, gint rgb_ind, LqrColDepth col_depth, LqrImageType image_type, gint channel)
{
@@ -115,6 +121,8 @@ lqr_pixel_get_rgbcol(void *rgb, gint rgb_ind, LqrColDe
}
}
+extern inline gdouble
+lqr_carver_read_brightness_grey(LqrCarver *r, gint x, gint y);
inline gdouble
lqr_carver_read_brightness_grey(LqrCarver *r, gint x, gint y)
{
@@ -123,6 +131,8 @@ lqr_carver_read_brightness_grey(LqrCarver *r, gint x,
return lqr_pixel_get_norm(r->rgb, rgb_ind, r->col_depth);
}
+extern inline gdouble
+lqr_carver_read_brightness_std(LqrCarver *r, gint x, gint y);
inline gdouble
lqr_carver_read_brightness_std(LqrCarver *r, gint x, gint y)
{
@@ -205,6 +215,9 @@ lqr_carver_read_brightness(LqrCarver *r, gint x, gint
return bright * alpha_fact;
}
+extern
+inline gdouble
+lqr_carver_read_luma_std(LqrCarver *r, gint x, gint y);
inline gdouble
lqr_carver_read_luma_std(LqrCarver *r, gint x, gint y)
{

View File

@ -1,7 +1,7 @@
liblqr (liquid resize) implements a smart-resize algorithm from 2007 SigGraph.
This algorithm works by finding paths of least energy that traverse an image
from top to bottom (or left to right) in an image, and carving the image
by removing the line.
by removing the line.
The algorithm can also be reversed, and used to insert a line of
The algorithm can also be reversed, and used to insert a line of
averaged pixels to enlarge the picture.