Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multimedia/vapoursynth: Update to R63
* Plugins are no longer maintained within the main project repo * Revert upstream commit 1239124c2d70f32c468326e48bfa7e9362550c36 as it breaks compatibility with Clang/LLVM with libc++ [1] 1: vapoursynth/vapoursynth#953 Changelog: https://github.com/vapoursynth/vapoursynth/releases/tag/R63
- Loading branch information
Daniel Engberg
authored and
Daniel Engberg
committed
Aug 5, 2023
1 parent
c92e9cc
commit 69e0cbe
Showing
6 changed files
with
187 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1626721847 | ||
SHA256 (vapoursynth-vapoursynth-R54_GH0.tar.gz) = ad0c446adcb3877c253dc8c1372a053ad35022bcf42600889b927d2797c5330b | ||
SIZE (vapoursynth-vapoursynth-R54_GH0.tar.gz) = 631275 | ||
TIMESTAMP = 1690671648 | ||
SHA256 (vapoursynth-vapoursynth-R63_GH0.tar.gz) = ed909b3c58e79bcbb056d07c5d301222ba8001222b4b40d5c1123be35fea9ae2 | ||
SIZE (vapoursynth-vapoursynth-R63_GH0.tar.gz) = 1869415 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- Makefile.am.orig 2023-07-30 11:59:40 UTC | ||
+++ Makefile.am | ||
@@ -1,5 +1,5 @@ | ||
warningflags = -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-ignored-attributes | ||
-commoncflags = -O3 -fvisibility=hidden $(warningflags) -I$(srcdir)/include $(DEBUGCFLAGS) $(MFLAGS) $(UNICODECFLAGS) $(STACKREALIGN) | ||
+commoncflags = -fvisibility=hidden $(warningflags) -I$(srcdir)/include $(DEBUGCFLAGS) $(MFLAGS) $(UNICODECFLAGS) $(STACKREALIGN) | ||
AM_CXXFLAGS = -std=c++17 $(commoncflags) | ||
AM_CFLAGS = -std=c99 $(commoncflags) | ||
ACLOCAL_AMFLAGS = -I m4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- configure.ac.orig 2023-07-30 14:56:15 UTC | ||
+++ configure.ac | ||
@@ -109,8 +109,8 @@ AS_IF( | ||
] | ||
) | ||
|
||
- AC_SUBST([MFLAGS], ["-mfpmath=sse -msse2"]) | ||
- AC_SUBST([AVX2FLAGS], ["-mavx2 -mfma -mtune=haswell"]) | ||
+ AC_SUBST([MFLAGS], [""]) | ||
+ AC_SUBST([AVX2FLAGS], [""]) | ||
] | ||
) | ||
|
122 changes: 122 additions & 0 deletions
122
multimedia/vapoursynth/files/patch-src_core_expr_expr.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- src/core/expr/expr.cpp.orig 2023-06-06 12:15:18 UTC | ||
+++ src/core/expr/expr.cpp | ||
@@ -20,15 +20,15 @@ | ||
|
||
#include <algorithm> | ||
#include <cassert> | ||
-#include <charconv> | ||
#include <cmath> | ||
+#include <iostream> | ||
+#include <locale> | ||
#include <map> | ||
#include <memory> | ||
#include <set> | ||
#include <sstream> | ||
#include <stdexcept> | ||
#include <string> | ||
-#include <string_view> | ||
#include <unordered_map> | ||
#include <unordered_set> | ||
#include <vector> | ||
@@ -136,9 +136,9 @@ bool equalSubTree(const ExpressionTreeNode *lhs, const | ||
return true; | ||
} | ||
|
||
-std::vector<std::string_view> tokenize(const std::string &expr) | ||
+std::vector<std::string> tokenize(const std::string &expr) | ||
{ | ||
- std::vector<std::string_view> tokens; | ||
+ std::vector<std::string> tokens; | ||
auto it = expr.begin(); | ||
auto prev = expr.begin(); | ||
|
||
@@ -147,20 +147,20 @@ std::vector<std::string_view> tokenize(const std::stri | ||
|
||
if (std::isspace(c)) { | ||
if (it != prev) | ||
- tokens.push_back({ expr.c_str() + (prev - expr.begin()), static_cast<size_t>(it - prev) }); | ||
+ tokens.push_back(expr.substr(prev - expr.begin(), it - prev)); | ||
prev = it + 1; | ||
} | ||
++it; | ||
} | ||
if (prev != expr.end()) | ||
- tokens.push_back({ expr.c_str() + (prev - expr.begin()), static_cast<size_t>(expr.end() - prev) }); | ||
+ tokens.push_back(expr.substr(prev - expr.begin(), expr.end() - prev)); | ||
|
||
return tokens; | ||
} | ||
|
||
-ExprOp decodeToken(std::string_view token) | ||
+ExprOp decodeToken(const std::string &token) | ||
{ | ||
- static const std::unordered_map<std::string_view, ExprOp> simple{ | ||
+ static const std::unordered_map<std::string, ExprOp> simple{ | ||
{ "+", { ExprOpType::ADD } }, | ||
{ "-", { ExprOpType::SUB } }, | ||
{ "*", { ExprOpType::MUL } }, | ||
@@ -195,26 +195,34 @@ ExprOp decodeToken(std::string_view token) | ||
return{ ExprOpType::MEM_LOAD_U8, token[0] >= 'x' ? token[0] - 'x' : token[0] - 'a' + 3 }; | ||
} else if (token.substr(0, 3) == "dup" || token.substr(0, 4) == "swap") { | ||
size_t prefix = token[0] == 'd' ? 3 : 4; | ||
+ size_t count = 0; | ||
int idx = -1; | ||
|
||
- auto result = std::from_chars(token.data() + prefix, token.data() + token.size(), idx); | ||
- if (idx < 0 || result.ptr != token.data() + token.size()) | ||
- throw std::runtime_error("illegal token: " + std::string{ token }); | ||
+ try { | ||
+ idx = std::stoi(token.substr(prefix), &count); | ||
+ } catch (...) { | ||
+ // ... | ||
+ } | ||
+ | ||
+ if (idx < 0 || prefix + count != token.size()) | ||
+ throw std::runtime_error("illegal token: " + token); | ||
return{ token[0] == 'd' ? ExprOpType::DUP : ExprOpType::SWAP, idx }; | ||
} else { | ||
float f; | ||
- auto result = std::from_chars(token.data(), token.data() + token.size(), f); | ||
- if (result.ec == std::errc::invalid_argument) | ||
- throw std::runtime_error("failed to convert '" + std::string{ token } + "' to float"); | ||
- if (result.ptr != token.data() + token.size()) | ||
- throw std::runtime_error("failed to convert '" + std::string{ token } + "' to float, not the whole token could be converted"); | ||
+ std::string s; | ||
+ std::istringstream numStream(token); | ||
+ numStream.imbue(std::locale::classic()); | ||
+ if (!(numStream >> f)) | ||
+ throw std::runtime_error("failed to convert '" + token + "' to float"); | ||
+ if (numStream >> s) | ||
+ throw std::runtime_error("failed to convert '" + token + "' to float, not the whole token could be converted"); | ||
return{ ExprOpType::CONSTANT, f }; | ||
} | ||
} | ||
|
||
ExpressionTree parseExpr(const std::string &expr, const VSVideoInfo * const srcFormats[], int numInputs) | ||
{ | ||
- static constexpr unsigned char numOperands[] = { | ||
+ constexpr unsigned char numOperands[] = { | ||
0, // MEM_LOAD_U8 | ||
0, // MEM_LOAD_U16 | ||
0, // MEM_LOAD_F16 | ||
@@ -256,16 +264,16 @@ ExpressionTree parseExpr(const std::string &expr, cons | ||
ExpressionTree tree; | ||
std::vector<ExpressionTreeNode *> stack; | ||
|
||
- for (std::string_view tok : tokens) { | ||
+ for (const std::string &tok : tokens) { | ||
ExprOp op = decodeToken(tok); | ||
|
||
// Check validity. | ||
if (op.type == ExprOpType::MEM_LOAD_U8 && op.imm.i >= numInputs) | ||
- throw std::runtime_error("reference to undefined clip: " + std::string{ tok }); | ||
+ throw std::runtime_error("reference to undefined clip: " + tok); | ||
if ((op.type == ExprOpType::DUP || op.type == ExprOpType::SWAP) && op.imm.u >= stack.size()) | ||
- throw std::runtime_error("insufficient values on stack: " + std::string{ tok }); | ||
+ throw std::runtime_error("insufficient values on stack: " + tok); | ||
if (stack.size() < numOperands[static_cast<size_t>(op.type)]) | ||
- throw std::runtime_error("insufficient values on stack: " + std::string{ tok }); | ||
+ throw std::runtime_error("insufficient values on stack: " + tok); | ||
|
||
// Rename load operations with the correct data type. | ||
if (op.type == ExprOpType::MEM_LOAD_U8) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
%%VSPIPE%%bin/vspipe | ||
%%CORE%%include/vapoursynth/VSHelper.h | ||
%%CORE%%include/vapoursynth/VSScript.h | ||
%%CORE%%include/vapoursynth/VapourSynth.h | ||
%%VSSCRIPT%%lib/libvapoursynth-script.a | ||
%%VSSCRIPT%%lib/libvapoursynth-script.so | ||
%%VSSCRIPT%%lib/libvapoursynth-script.so.0 | ||
%%VSSCRIPT%%lib/libvapoursynth-script.so.0.0.0 | ||
%%CORE%%lib/libvapoursynth.a | ||
%%CORE%%lib/libvapoursynth.so | ||
%%PYTHON%%%%PYTHON_SITELIBDIR%%/vapoursynth.so | ||
%%VSSCRIPT%%libdata/pkgconfig/vapoursynth-script.pc | ||
%%CORE%%libdata/pkgconfig/vapoursynth.pc | ||
%%EEDI3%%%%DATADIR%%/libeedi3.so | ||
%%IMAGEMAGICK%%%%DATADIR%%/libimwri.so | ||
%%MISCFILTERS%%%%DATADIR%%/libmiscfilters.so | ||
%%MORPHO%%%%DATADIR%%/libmorpho.so | ||
%%TESSERACT%%%%DATADIR%%/libocr.so | ||
%%REMOVEGRAIN%%%%DATADIR%%/libremovegrain.so | ||
%%ASS%%%%DATADIR%%/libsubtext.so | ||
%%VINVERSE%%%%DATADIR%%/libvinverse.so | ||
%%VIVTC%%%%DATADIR%%/libvivtc.so | ||
%%DOCS%%%%VSPIPE%%share/man/man1/vspipe.1.gz | ||
bin/vspipe | ||
include/vapoursynth/VSConstants4.h | ||
include/vapoursynth/VSHelper.h | ||
include/vapoursynth/VSHelper4.h | ||
include/vapoursynth/VSScript.h | ||
include/vapoursynth/VSScript4.h | ||
include/vapoursynth/VapourSynth.h | ||
include/vapoursynth/VapourSynth4.h | ||
lib/libvapoursynth-script.so | ||
lib/libvapoursynth-script.so.0 | ||
lib/libvapoursynth-script.so.0.0.0 | ||
lib/libvapoursynth.so | ||
%%PYTHON_SITELIBDIR%%/vapoursynth.so | ||
libdata/pkgconfig/vapoursynth-script.pc | ||
libdata/pkgconfig/vapoursynth.pc |