[vlc-commits] contrib: update libplacebo to 0.2.1
Thomas Guillem
git at videolan.org
Wed Feb 14 13:50:52 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Feb 14 09:21:59 2018 +0100| [5f088e89ad711e184f569ecec256daaa3279dff3] | committer: Thomas Guillem
contrib: update libplacebo to 0.2.1
Mainly to fix the lack of mix(vecN, vecN, bvecN) on GLSL 120 that broke HLG
tone mapping on some systems (macOS).
Release note: https://github.com/haasn/libplacebo/releases/tag/v0.2.1
win32 patch is not needed anymore.
(cherry picked from commit b282a78f4c47bf1956e506ac311bd92ddda2c6c9)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=5f088e89ad711e184f569ecec256daaa3279dff3
---
.../src/libplacebo/0001-build-use-a-Makefile.patch | 12 ++--
.../libplacebo/0002-build-fix-win32-build.patch | 69 ----------------------
contrib/src/libplacebo/0003-2.0-fixup.patch | 66 ---------------------
contrib/src/libplacebo/SHA512SUMS | 2 +-
contrib/src/libplacebo/rules.mak | 6 +-
5 files changed, 7 insertions(+), 148 deletions(-)
diff --git a/contrib/src/libplacebo/0001-build-use-a-Makefile.patch b/contrib/src/libplacebo/0001-build-use-a-Makefile.patch
index 1d0976ce46..1691016dcb 100644
--- a/contrib/src/libplacebo/0001-build-use-a-Makefile.patch
+++ b/contrib/src/libplacebo/0001-build-use-a-Makefile.patch
@@ -16,17 +16,15 @@ new file mode 100644
index 0000000..4c431cf
--- /dev/null
+++ b/Makefile
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,43 @@
+SRCS := colorspace.c common.c context.c dither.c dispatch.c filters.c ra.c renderer.c shaders.c \
-+ shaders/colorspace.c shaders/sampling.c spirv.c bstr/bstr.c siphash.c \
++ shaders/colorspace.c shaders/sampling.c spirv.c bstr/bstr.c bstr/format.c 3rdparty/siphash.c \
+ ta/ta.c ta/ta_utils.c ta/talloc.c
+
+ifdef HAVE_WIN32
-+SRCS += osdep/printf_useloc_win.c
+CFLAGS += -DPTW32_STATIC_LIB
+lpthread_libs = -lpthreadGC2 -lws2_32
+else
-+SRCS += osdep/printf_useloc_posix.c
+lpthread_libs = $(shell $(LD) -lpthread && echo "-lpthread" || echo "")
+endif
+
@@ -49,7 +47,7 @@ index 0000000..4c431cf
+ cp libplacebo.a $(PREFIX)/lib/
+ @echo "Name: libplacebo" > $(PREFIX)/lib/pkgconfig/libplacebo.pc
+ @echo "Description: Reusable library for GPU-accelerated video/image rendering" >> $(PREFIX)/lib/pkgconfig/libplacebo.pc
-+ @echo "Version: 0.2.0" >> $(PREFIX)/lib/pkgconfig/libplacebo.pc
++ @echo "Version: 0.2.1" >> $(PREFIX)/lib/pkgconfig/libplacebo.pc
+ @echo "Libs: -L$(PREFIX)/lib -lplacebo $(lpthread_libs)" >> $(PREFIX)/lib/pkgconfig/libplacebo.pc
+ @echo "Cflags: -I$(PREFIX)/include" >> $(PREFIX)/lib/pkgconfig/libplacebo.pc
+
@@ -96,10 +94,10 @@ index 0000000..85aac82
+#define PL_API_VER 2
+
+// Increased any time a fix is made to a given API version.
-+#define PL_FIX_VER 0
++#define PL_FIX_VER 1
+
+// Friendly name (`git describe`) for the overall version of the library
-+#define PL_VERSION "v0.2.0"
++#define PL_VERSION "v0.2.1"
+
+// Feature tests. These aren't described in further detail, but may be useful
+// for programmers wanting to programmatically check for feature support
diff --git a/contrib/src/libplacebo/0002-build-fix-win32-build.patch b/contrib/src/libplacebo/0002-build-fix-win32-build.patch
deleted file mode 100644
index 53b4499d47..0000000000
--- a/contrib/src/libplacebo/0002-build-fix-win32-build.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 158a429154af39896a7c6edcd0d07e83b2a4368e Mon Sep 17 00:00:00 2001
-From: Thomas Guillem <thomas at gllm.fr>
-Date: Mon, 13 Nov 2017 15:00:04 +0100
-Subject: [PATCH 2/3] build: fix win32 build
-
-Remove msvcr100.dll dependency. This dll is not avaible on old Windows
-versions. Don't set locale on Windows, this doesn't seem to have any
-consequences with VLC on windows (tested with US/FR locales).
----
- src/osdep/printf_useloc_win.c | 18 ++++++------------
- 1 file changed, 6 insertions(+), 12 deletions(-)
-
-diff --git a/src/osdep/printf_useloc_win.c b/src/osdep/printf_useloc_win.c
-index 0c4c3be..fc56f90 100644
---- a/src/osdep/printf_useloc_win.c
-+++ b/src/osdep/printf_useloc_win.c
-@@ -16,43 +16,37 @@
- */
-
- #include <stdlib.h>
--#include <locale.h>
-
- #include "osdep/printf.h"
--
--static _locale_t cloc;
-+#include <locale.h>
-+#include <windows.h>
-
- void printf_c_init()
- {
-- cloc = _create_locale(LC_ALL, "C");
-- if (!cloc)
-- abort();
- }
-
- void printf_c_uninit()
- {
-- _free_locale(cloc);
-- cloc = (_locale_t) 0;
- }
-
- int vprintf_c(const char *format, va_list ap)
- {
-- return _vprintf_l(format, cloc, ap);
-+ return vprintf(format, ap);
- }
-
- int vfprintf_c(FILE *stream, const char *format, va_list ap)
- {
-- return _vfprintf_l(stream, format, cloc, ap);
-+ return vfprintf(stream, format, ap);
- }
-
- int vsprintf_c(char *str, const char *format, va_list ap)
- {
-- return _vsprintf_l(str, format, cloc, ap);
-+ return vsprintf(str, format, ap);
- }
-
- int vsnprintf_c(char *str, size_t size, const char *format, va_list ap)
- {
-- return _vsnprintf_l(str, size, format, cloc, ap);
-+ return vsnprintf(str, size, format, ap);
- }
-
- #define WRAP(fn, ...) \
---
-2.11.0
-
diff --git a/contrib/src/libplacebo/0003-2.0-fixup.patch b/contrib/src/libplacebo/0003-2.0-fixup.patch
deleted file mode 100644
index 4eecf94e6a..0000000000
--- a/contrib/src/libplacebo/0003-2.0-fixup.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From e8f45790dbf39ac39ac81ef47bde84fd92282ae2 Mon Sep 17 00:00:00 2001
-From: Niklas Haas <git at haasn.xyz>
-Date: Tue, 26 Dec 2017 04:14:53 +0100
-Subject: [PATCH 3/3] 2.0 fixup
-
-Include the following commits:
-
-- shaders: fix typo in comment
-- dither: minor fixes
-- shaders: fix typo in gamut warning shader
----
- src/dither.c | 3 ++-
- src/include/libplacebo/shaders/colorspace.h | 2 +-
- src/shaders/colorspace.c | 2 +-
- 3 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/dither.c b/src/dither.c
-index 4a08e5c..e2b54ae 100644
---- a/src/dither.c
-+++ b/src/dither.c
-@@ -34,6 +34,7 @@
- void pl_generate_bayer_matrix(float *data, int size)
- {
- pl_assert(size >= 0);
-+
- // Start with a single entry of 0
- data[0] = 0;
-
-@@ -73,7 +74,7 @@ struct ctx {
-
- static void makegauss(struct ctx *k, unsigned int sizeb)
- {
-- assert(sizeb >= 1 && sizeb <= MAX_SIZEB);
-+ pl_assert(sizeb >= 1 && sizeb <= MAX_SIZEB);
-
- k->sizeb = sizeb;
- k->size = 1 << k->sizeb;
-diff --git a/src/include/libplacebo/shaders/colorspace.h b/src/include/libplacebo/shaders/colorspace.h
-index fb80bea..82bfc69 100644
---- a/src/include/libplacebo/shaders/colorspace.h
-+++ b/src/include/libplacebo/shaders/colorspace.h
-@@ -159,7 +159,7 @@ enum pl_dither_method {
- // Dither with blue noise. Very high quality, but requires the use of a
- // LUT. Warning: Computing a blue noise texture with a large size can be
- // very slow, however this only needs to be performed once. Even so, using
-- // this with a `lut_size` greater than 8 is generally ill-advised. This is
-+ // this with a `lut_size` greater than 6 is generally ill-advised. This is
- // the preferred/default dither method.
- PL_DITHER_BLUE_NOISE,
-
-diff --git a/src/shaders/colorspace.c b/src/shaders/colorspace.c
-index b85e1b2..6d467f5 100644
---- a/src/shaders/colorspace.c
-+++ b/src/shaders/colorspace.c
-@@ -749,7 +749,7 @@ void pl_shader_color_map(struct pl_shader *sh,
- if (params->gamut_warning) {
- GLSL("if (any(greaterThan(color.rgb, vec3(1.01))) ||\n"
- " any(lessThan(color.rgb, vec3(-0.01))))\n"
-- " color.rgb = vec3(1.0) - color.rgb;) // invert\n");
-+ " color.rgb = vec3(1.0) - color.rgb; // invert\n");
- }
-
- if (src.light != dst.light)
---
-2.11.0
-
diff --git a/contrib/src/libplacebo/SHA512SUMS b/contrib/src/libplacebo/SHA512SUMS
index bf8160d6b6..a8e6eb7d09 100644
--- a/contrib/src/libplacebo/SHA512SUMS
+++ b/contrib/src/libplacebo/SHA512SUMS
@@ -1 +1 @@
-5b1079d21684ffe7bb7e1984bdff8ed3b2a4c5d0454758ed9764bab3947fed693147ace9ec877f758e1c5c466a560fceaf4975666ca26d47c2278182dc60e2eb libplacebo-0.2.0.tar.gz
+d662c1972ee36f45d1e75b1c38edb7d2a47a1df8dedd811c37662ae88514403c978088bc4a42c3bf850b22e9cc882cb5de730bf2463f36caf284f6172e177dbb libplacebo-0.2.1.tar.gz
diff --git a/contrib/src/libplacebo/rules.mak b/contrib/src/libplacebo/rules.mak
index 5d0bb834d9..b9871a0056 100644
--- a/contrib/src/libplacebo/rules.mak
+++ b/contrib/src/libplacebo/rules.mak
@@ -1,6 +1,6 @@
# libplacebo
-PLACEBO_VERSION := 0.2.0
+PLACEBO_VERSION := 0.2.1
PLACEBO_URL := https://github.com/haasn/libplacebo/archive/v$(PLACEBO_VERSION).tar.gz
PLACEBO_ARCHIVE = libplacebo-$(PLACEBO_VERSION).tar.gz
@@ -26,10 +26,6 @@ $(TARBALLS)/$(PLACEBO_ARCHIVE):
libplacebo: $(PLACEBO_ARCHIVE) .sum-libplacebo
$(UNPACK)
$(APPLY) $(SRC)/libplacebo/0001-build-use-a-Makefile.patch
-ifdef HAVE_WIN32
- $(APPLY) $(SRC)/libplacebo/0002-build-fix-win32-build.patch
-endif
- $(APPLY) $(SRC)/libplacebo/0003-2.0-fixup.patch
$(MOVE)
.libplacebo: libplacebo
More information about the vlc-commits
mailing list