summaryrefslogtreecommitdiff
path: root/media-gfx/blender/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /media-gfx/blender/files
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'media-gfx/blender/files')
-rw-r--r--media-gfx/blender/files/blender-2.83.13-ffmpeg-4_4.patch27
-rw-r--r--media-gfx/blender/files/blender-2.83.6-constraints_test.patch13
-rw-r--r--media-gfx/blender/files/blender-2.83.6-fix_opevdb_abi.patch21
-rw-r--r--media-gfx/blender/files/blender-2.83.6-libmv_eigen_alignment.patch219
4 files changed, 280 insertions, 0 deletions
diff --git a/media-gfx/blender/files/blender-2.83.13-ffmpeg-4_4.patch b/media-gfx/blender/files/blender-2.83.13-ffmpeg-4_4.patch
new file mode 100644
index 000000000000..bf8579675886
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.83.13-ffmpeg-4_4.patch
@@ -0,0 +1,27 @@
+From 9cdf11676ecd753fd86c3d8057c2375174ef0a70 Mon Sep 17 00:00:00 2001
+From: Sebastian Parborg <darkdefende@gmail.com>
+Date: Fri, 7 May 2021 16:51:28 +0200
+Subject: [PATCH] Fix: No sound is exported with ffmpeg 4.4
+
+We were not assigning the amount of sound channels to the output frames.
+Newer ffmpeg releases has sanity checks in place and doesn't fall back
+to two channels anymore.
+---
+ source/blender/blenkernel/intern/writeffmpeg.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
+index 7fc9e8cc0ef..e5550cee124 100644
+--- a/source/blender/blenkernel/intern/writeffmpeg.c
++++ b/source/blender/blenkernel/intern/writeffmpeg.c
+@@ -164,6 +164,7 @@ static int write_audio_frame(FFMpegContext *context)
+ frame->pts = context->audio_time / av_q2d(c->time_base);
+ frame->nb_samples = context->audio_input_samples;
+ frame->format = c->sample_fmt;
++ frame->channels = c->channels;
+ # ifdef FFMPEG_HAVE_FRAME_CHANNEL_LAYOUT
+ frame->channel_layout = c->channel_layout;
+ # endif
+--
+2.26.3
+
diff --git a/media-gfx/blender/files/blender-2.83.6-constraints_test.patch b/media-gfx/blender/files/blender-2.83.6-constraints_test.patch
new file mode 100644
index 000000000000..ab1e9a6d2d4a
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.83.6-constraints_test.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/python/bl_constraints.py b/tests/python/bl_constraints.py
+index 323dd874ac0..7cbc46d680a 100644
+--- a/tests/python/bl_constraints.py
++++ b/tests/python/bl_constraints.py
+@@ -44,7 +44,7 @@ class AbstractConstraintTests(unittest.TestCase):
+ collection = top_collection.children[self.layer_collection]
+ collection.exclude = False
+
+- def assert_matrix(self, actual_matrix, expect_matrix, object_name: str, places=6, delta=None):
++ def assert_matrix(self, actual_matrix, expect_matrix, object_name: str, places=None, delta=1e-6):
+ """Asserts that the matrices almost equal."""
+ self.assertEqual(len(actual_matrix), 4, 'Expected a 4x4 matrix')
+
diff --git a/media-gfx/blender/files/blender-2.83.6-fix_opevdb_abi.patch b/media-gfx/blender/files/blender-2.83.6-fix_opevdb_abi.patch
new file mode 100644
index 000000000000..b7537f97fc09
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.83.6-fix_opevdb_abi.patch
@@ -0,0 +1,21 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1552,7 +1552,7 @@
+ CMAKE_C_COMPILER_ID MATCHES "Intel"
+ )
+ # TODO(sergey): Do we want c++11 or gnu-c++11 here?
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+ else()
+ message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++11 build")
+ endif()
+--- a/extern/mantaflow/CMakeLists.txt
++++ b/extern/mantaflow/CMakeLists.txt
+@@ -51,7 +51,6 @@
+
+ if(WITH_OPENVDB)
+ add_definitions(-DOPENVDB=1)
+- add_definitions(-DOPENVDB_STATICLIB)
+ endif()
+
+ if(WIN32
diff --git a/media-gfx/blender/files/blender-2.83.6-libmv_eigen_alignment.patch b/media-gfx/blender/files/blender-2.83.6-libmv_eigen_alignment.patch
new file mode 100644
index 000000000000..1392510a23a7
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.83.6-libmv_eigen_alignment.patch
@@ -0,0 +1,219 @@
+diff --git a/intern/libmv/libmv/base/vector.h b/intern/libmv/libmv/base/vector.h
+index bdc4392155c..300291c5679 100644
+--- a/intern/libmv/libmv/base/vector.h
++++ b/intern/libmv/libmv/base/vector.h
+@@ -25,151 +25,18 @@
+ #ifndef LIBMV_BASE_VECTOR_H
+ #define LIBMV_BASE_VECTOR_H
+
+-#include <cstring>
+-#include <new>
++#include <vector>
+
+ #include <Eigen/Core>
+
+ namespace libmv {
+
+-// A simple container class, which guarantees 16 byte alignment needed for most
+-// vectorization. Don't use this container for classes that cannot be copied
+-// via memcpy.
+-// FIXME: this class has some issues:
+-// - doesn't support iterators.
+-// - impede compatibility with code using STL.
+-// - the STL already provide support for custom allocators
+-// it could be replaced with a simple
+-// template <T> class vector : std::vector<T, aligned_allocator> {} declaration
+-// provided it doesn't break code relying on libmv::vector specific behavior
+-template <typename T,
+- typename Allocator = Eigen::aligned_allocator<T> >
+-class vector {
+- public:
+- ~vector() { clear(); }
++// A simple container class, which guarantees the correct memory alignment
++// needed for most eigen vectorization. Don't use this container for classes
++// that cannot be copied via memcpy.
+
+- vector() { init(); }
+- vector(int size) { init(); resize(size); }
+- vector(int size, const T & val) {
+- init();
+- resize(size);
+- std::fill(data_, data_+size_, val); }
+-
+- // Copy constructor and assignment.
+- vector(const vector<T, Allocator> &rhs) {
+- init();
+- copy(rhs);
+- }
+- vector<T, Allocator> &operator=(const vector<T, Allocator> &rhs) {
+- if (&rhs != this) {
+- copy(rhs);
+- }
+- return *this;
+- }
+-
+- /// Swaps the contents of two vectors in constant time.
+- void swap(vector<T, Allocator> &other) {
+- std::swap(allocator_, other.allocator_);
+- std::swap(size_, other.size_);
+- std::swap(capacity_, other.capacity_);
+- std::swap(data_, other.data_);
+- }
+-
+- T *data() const { return data_; }
+- int size() const { return size_; }
+- int capacity() const { return capacity_; }
+- const T& back() const { return data_[size_ - 1]; }
+- T& back() { return data_[size_ - 1]; }
+- const T& front() const { return data_[0]; }
+- T& front() { return data_[0]; }
+- const T& operator[](int n) const { return data_[n]; }
+- T& operator[](int n) { return data_[n]; }
+- const T& at(int n) const { return data_[n]; }
+- T& at(int n) { return data_[n]; }
+- const T * begin() const { return data_; }
+- const T * end() const { return data_+size_; }
+- T * begin() { return data_; }
+- T * end() { return data_+size_; }
+-
+- void resize(size_t size) {
+- reserve(size);
+- if (size > size_) {
+- construct(size_, size);
+- } else if (size < size_) {
+- destruct(size, size_);
+- }
+- size_ = size;
+- }
+-
+- void push_back(const T &value) {
+- if (size_ == capacity_) {
+- reserve(size_ ? 2 * size_ : 1);
+- }
+- new (&data_[size_++]) T(value);
+- }
+-
+- void pop_back() {
+- resize(size_ - 1);
+- }
+-
+- void clear() {
+- destruct(0, size_);
+- deallocate();
+- init();
+- }
+-
+- void reserve(unsigned int size) {
+- if (size > size_) {
+- T *data = static_cast<T *>(allocate(size));
+- memcpy(static_cast<void *>(data), data_, sizeof(*data)*size_);
+- allocator_.deallocate(data_, capacity_);
+- data_ = data;
+- capacity_ = size;
+- }
+- }
+-
+- bool empty() {
+- return size_ == 0;
+- }
+-
+- private:
+- void construct(int start, int end) {
+- for (int i = start; i < end; ++i) {
+- new (&data_[i]) T;
+- }
+- }
+- void destruct(int start, int end) {
+- for (int i = start; i < end; ++i) {
+- data_[i].~T();
+- }
+- }
+- void init() {
+- size_ = 0;
+- data_ = 0;
+- capacity_ = 0;
+- }
+-
+- void *allocate(int size) {
+- return size ? allocator_.allocate(size) : 0;
+- }
+-
+- void deallocate() {
+- allocator_.deallocate(data_, size_);
+- data_ = 0;
+- }
+-
+- void copy(const vector<T, Allocator> &rhs) {
+- resize(rhs.size());
+- for (int i = 0; i < rhs.size(); ++i) {
+- (*this)[i] = rhs[i];
+- }
+- }
+-
+- Allocator allocator_;
+- size_t size_;
+- size_t capacity_;
+- T *data_;
+-};
++template <class ElementType>
++using vector = std::vector<ElementType, Eigen::aligned_allocator<ElementType>>;
+
+ } // namespace libmv
+
+diff --git a/intern/libmv/libmv/base/vector_test.cc b/intern/libmv/libmv/base/vector_test.cc
+index f17718c3926..44b9a152148 100644
+--- a/intern/libmv/libmv/base/vector_test.cc
++++ b/intern/libmv/libmv/base/vector_test.cc
+@@ -115,31 +115,24 @@ TEST_F(VectorTest, ResizeConstructsAndDestructsAsExpected) {
+ // Create one object.
+ v.resize(1);
+ EXPECT_EQ(1, v.size());
+- EXPECT_EQ(1, v.capacity());
+ EXPECT_EQ(1, foo_construct_calls);
+- EXPECT_EQ(0, foo_destruct_calls);
+ EXPECT_EQ(5, v[0].value);
+
+ // Create two more.
+ v.resize(3);
+ EXPECT_EQ(3, v.size());
+- EXPECT_EQ(3, v.capacity());
+ EXPECT_EQ(3, foo_construct_calls);
+- EXPECT_EQ(0, foo_destruct_calls);
+
+ // Delete the last one.
+ v.resize(2);
+ EXPECT_EQ(2, v.size());
+ EXPECT_EQ(3, v.capacity());
+ EXPECT_EQ(3, foo_construct_calls);
+- EXPECT_EQ(1, foo_destruct_calls);
+
+ // Delete the remaining two.
+ v.resize(0);
+ EXPECT_EQ(0, v.size());
+- EXPECT_EQ(3, v.capacity());
+ EXPECT_EQ(3, foo_construct_calls);
+- EXPECT_EQ(3, foo_destruct_calls);
+ }
+
+ TEST_F(VectorTest, PushPopBack) {
+@@ -192,15 +185,15 @@ TEST_F(VectorTest, STLFind) {
+ a.push_back(5);
+ a.push_back(3);
+
+- // Find return an int *
++ // Find returns an int *
+ EXPECT_EQ(std::find(&a[0], &a[2], 1) == &a[0], true);
+ EXPECT_EQ(std::find(&a[0], &a[2], 5) == &a[1], true);
+ EXPECT_EQ(std::find(&a[0], &a[2], 3) == &a[2], true);
+
+- // Find return a const int *
+- EXPECT_EQ(std::find(a.begin(), a.end(), 1) == &a[0], true);
+- EXPECT_EQ(std::find(a.begin(), a.end(), 5) == &a[1], true);
+- EXPECT_EQ(std::find(a.begin(), a.end(), 3) == &a[2], true);
++ // Find returns an interator
++ EXPECT_EQ(std::find(a.begin(), a.end(), 1) == std::next(a.begin(), 0), true);
++ EXPECT_EQ(std::find(a.begin(), a.end(), 5) == std::next(a.begin(), 1), true);
++ EXPECT_EQ(std::find(a.begin(), a.end(), 3) == std::next(a.begin(), 2), true);
+
+ // Search value that are not in the vector
+ EXPECT_EQ(std::find(a.begin(), a.end(), 0) == a.end(), true);