diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-06-16 08:31:52 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-06-16 08:31:52 +0800 |
commit | 86448e24de894b009b23e10beebb7141c3c4b2e9 (patch) | |
tree | 32b0a5dec9702dc7fd95aa8d7551663a2412dbbd | |
parent | b22a12928813162815943e4e72a87dfb9bac653c (diff) | |
download | freebsd-ports-gnome-86448e24de894b009b23e10beebb7141c3c4b2e9.tar.gz freebsd-ports-gnome-86448e24de894b009b23e10beebb7141c3c4b2e9.tar.zst freebsd-ports-gnome-86448e24de894b009b23e10beebb7141c3c4b2e9.zip |
graphics/vapoursynth-fmtconv: add new port
Requested by: Juho Kerola
Fmtconv is a format-conversion plug-in for the Vapoursynth video
processing engine.
It does:
* Resizing.
* Bitdepth conversion with dithering.
* Colorspace conversion (matrix, transfer characteristics and chromatic adaptation).
It supports:
* Pixel data types: 8-–12-, 14- and 16-bit integer, 32-bit float.
* Colorspaces: RGB, Y, YUV in 4:4:4, 4:2:2, 4:2:0, 4:1:1 and YCgCo with the same chroma subsampling factors.
* Progressive and interlaced content.
Fmtconv is focussed primarily on quality and exactness rather than
execution speed. This does not mean it is slow or unoptimized, but
fmtconv is clearly not on par with the fastest equivalent 8-bit
filters.
https://github.com/EleonoreMizo/fmtconv
-rw-r--r-- | graphics/Makefile | 1 | ||||
-rw-r--r-- | graphics/vapoursynth-fmtconv/Makefile | 41 | ||||
-rw-r--r-- | graphics/vapoursynth-fmtconv/distinfo | 3 | ||||
-rw-r--r-- | graphics/vapoursynth-fmtconv/files/patch-src_conc_Interlocked.hpp | 63 | ||||
-rw-r--r-- | graphics/vapoursynth-fmtconv/pkg-descr | 21 |
5 files changed, 129 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile index 20616d679757..38e65f3e32b3 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -1048,6 +1048,7 @@ SUBDIR += uniconvw SUBDIR += unpaper SUBDIR += urt + SUBDIR += vapoursynth-fmtconv SUBDIR += vapoursynth-waifu2x-w2xc SUBDIR += variety SUBDIR += vcg diff --git a/graphics/vapoursynth-fmtconv/Makefile b/graphics/vapoursynth-fmtconv/Makefile new file mode 100644 index 000000000000..10b7b7864e08 --- /dev/null +++ b/graphics/vapoursynth-fmtconv/Makefile @@ -0,0 +1,41 @@ +# $FreeBSD$ + +PORTNAME= fmtconv +PORTVERSION= r20 +CATEGORIES= graphics +PKGNAMEPREFIX= vapoursynth- + +MAINTAINER= jbeich@FreeBSD.org +COMMENT= Format conversion tools for Vapoursynth + +LICENSE= WTFPL + +BUILD_DEPENDS= ${LOCALBASE}/include/vapoursynth/VapourSynth.h:multimedia/vapoursynth + +USE_GITHUB= yes +GH_ACCOUNT= EleonoreMizo + +USES= autoreconf compiler:c++11-lib gmake libtool pkgconfig +EXCLUDE= VapourSynth.h *.txt +EXTRACT_AFTER_ARGS= ${EXCLUDE:S,^,--exclude ,} +WRKSRC_SUBDIR= build/unix +PATCH_WRKSRC= ${WRKSRC:H:H} +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --libdir="${DATADIR}" +CPPFLAGS+= `pkg-config vapoursynth --cflags` +INSTALL_TARGET= install-strip +DATADIR= ${PREFIX}/lib/vapoursynth +DOCSDIR= ${PREFIX}/share/doc/${PKGBASE} +PLIST_FILES= %%DATADIR%%/libfmtconv.so +PORTDOCS= * + +post-patch: + @${REINPLACE_CMD} -e 's/x86_64/&|amd64/' \ + ${WRKSRC}/configure.ac + @${REINPLACE_CMD} -e 's/-O3 //' ${WRKSRC}/Makefile.am + +post-install: + (cd ${PATCH_WRKSRC}/doc && ${COPYTREE_SHARE} \ + "${PORTDOCS}" ${STAGEDIR}${DOCSDIR}) + +.include <bsd.port.mk> diff --git a/graphics/vapoursynth-fmtconv/distinfo b/graphics/vapoursynth-fmtconv/distinfo new file mode 100644 index 000000000000..56b28c88c2eb --- /dev/null +++ b/graphics/vapoursynth-fmtconv/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1458918419 +SHA256 (EleonoreMizo-fmtconv-r20_GH0.tar.gz) = 44f2f2be05a0265136ee1bb51bd08e5a47c6c1e856d0d045cde5a6bbd7b4350c +SIZE (EleonoreMizo-fmtconv-r20_GH0.tar.gz) = 233504 diff --git a/graphics/vapoursynth-fmtconv/files/patch-src_conc_Interlocked.hpp b/graphics/vapoursynth-fmtconv/files/patch-src_conc_Interlocked.hpp new file mode 100644 index 000000000000..bdb0048307b5 --- /dev/null +++ b/graphics/vapoursynth-fmtconv/files/patch-src_conc_Interlocked.hpp @@ -0,0 +1,63 @@ +https://github.com/EleonoreMizo/fmtconv/pull/9 + +--- src/conc/Interlocked.hpp.orig 2016-03-25 15:06:59 UTC ++++ src/conc/Interlocked.hpp +@@ -100,10 +100,6 @@ int32_t Interlocked::cas (int32_t volatile &dest, int3 + ::LONG (comp) + )); + +-#elif defined (__linux__) +- +- return (__sync_val_compare_and_swap (&dest, comp, excg)); +- + #elif defined (__APPLE__) + + return (::OSAtomicCompareAndSwap32Barrier ( +@@ -112,6 +108,10 @@ int32_t Interlocked::cas (int32_t volatile &dest, int3 + const_cast <int32_t *> (reinterpret_cast <int32_t volatile *> (&dest)) + ) ? comp : excg); + ++#elif defined (__GNUC__) ++ ++ return (__sync_val_compare_and_swap (&dest, comp, excg)); ++ + #else + + #error Unknown platform +@@ -214,10 +214,6 @@ int64_t Interlocked::cas (int64_t volatile &dest, int6 + + return (old); + +-#elif defined (__linux__) +- +- return (__sync_val_compare_and_swap (&dest, comp, excg)); +- + #elif defined (__APPLE__) + + return (::OSAtomicCompareAndSwap64Barrier ( +@@ -226,6 +222,10 @@ int64_t Interlocked::cas (int64_t volatile &dest, int6 + const_cast <int64_t *> (reinterpret_cast <int64_t volatile *> (&dest)) + ) ? comp : excg); + ++#elif defined (__GNUC__) ++ ++ return (__sync_val_compare_and_swap (&dest, comp, excg)); ++ + #else + + #error Unknown platform +@@ -355,9 +355,13 @@ void Interlocked::cas (Data128 &old, volatile Data128 + + #endif + +-#elif defined (__linux__) ++#elif defined (__GNUC__) + + old = __sync_val_compare_and_swap (&dest, comp, excg); ++ ++#else ++ ++ #error Unknown platform + + #endif + } diff --git a/graphics/vapoursynth-fmtconv/pkg-descr b/graphics/vapoursynth-fmtconv/pkg-descr new file mode 100644 index 000000000000..4effb7650f1e --- /dev/null +++ b/graphics/vapoursynth-fmtconv/pkg-descr @@ -0,0 +1,21 @@ +Fmtconv is a format-conversion plug-in for the Vapoursynth video +processing engine. + +It does: +* Resizing. +* Bitdepth conversion with dithering. +* Colorspace conversion (matrix, transfer characteristics and + chromatic adaptation). + +It supports: +* Pixel data types: 8--12-, 14- and 16-bit integer, 32-bit float. +* Colorspaces: RGB, Y, YUV in 4:4:4, 4:2:2, 4:2:0, 4:1:1 and YCgCo + with the same chroma subsampling factors. +* Progressive and interlaced content. + +Fmtconv is focussed primarily on quality and exactness rather than +execution speed. This does not mean it is slow or unoptimized, but +fmtconv is clearly not on par with the fastest equivalent 8-bit +filters. + +WWW: https://github.com/EleonoreMizo/fmtconv |