community/blender to 2.83.4-1

This commit is contained in:
Kevin Mihelich 2020-08-05 13:42:36 +00:00
parent 271313a48c
commit 88ee434164
2 changed files with 3 additions and 43 deletions

View file

@ -1,35 +0,0 @@
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -1205,7 +1205,29 @@
}
IMB_freeImBuf(anim->last_frame);
- anim->last_frame = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect);
+
+ /* Certain versions of FFmpeg have a bug in libswscale which ends up in crash
+ * when destination buffer is not properly aligned. For example, this happens
+ * in FFmpeg 4.3.1. It got fixed later on, but for compatibility reasons is
+ * still best to avoid crash.
+ *
+ * This is achieved by using own allocation call rather than relying on
+ * IMB_allocImBuf() to do so since the IMB_allocImBuf() is not guaranteed
+ * to perform aligned allocation.
+ *
+ * In theory this could give better performance, since SIMD operations on
+ * aligned data are usually faster.
+ *
+ * Note that even though sometimes vertical flip is required it does not
+ * affect on alignment of data passed to sws_scale because if the X dimension
+ * is not 32 byte aligned special intermediate buffer is allocated.
+ *
+ * The issue was reported to FFmpeg under ticket #8747 in the FFmpeg tracker
+ * and is fixed in the newer versions than 4.3.1. */
+ anim->last_frame = IMB_allocImBuf(anim->x, anim->y, 32, 0);
+ anim->last_frame->rect = MEM_mallocN_aligned((size_t)4 * anim->x * anim->y, 32, "ffmpeg ibuf");
+ anim->last_frame->mall |= IB_rect;
+
anim->last_frame->rect_colorspace = colormanage_colorspace_get_named(anim->colorspace);
ffmpeg_postprocess(anim);

View file

@ -21,13 +21,13 @@ buildarch=8
# just build the package against them. I checked with NVIDIA and this way is
# fine with them.
_gittag=v2.83.3
_gittag=v2.83.4
# _gitcommit=054dbb833e15275e0e991e2c15e754a3e7583716
pkgname=blender
pkgver=2.83.3
pkgver=2.83.4
[[ -n $_gitcommit ]] && pkgver=${pkgver}.git1.${_gitcommit:0:8}
pkgrel=3
pkgrel=1
epoch=17
pkgdesc="A fully integrated 3D graphics creation suite"
arch=('x86_64')
@ -46,7 +46,6 @@ source=("git://git.blender.org/blender-addons.git"
"git://git.blender.org/blender-dev-tools.git"
embree.patch
D8063-cuda11.diff
D8355-ffmpeg43.patch
https://developer.download.nvidia.com/redist/optix/v7.0/OptiX-7.0.0-include.zip)
if [[ -n $_gittag ]]; then
source+=("${pkgname}-${pkgver}::git://git.blender.org/blender.git#tag=${_gittag}")
@ -59,7 +58,6 @@ sha512sums=('SKIP'
'SKIP'
'6de779ad8649a034ee65c45a36d7838ac0b8b32c3336b4d476186265c060f56276e3e0a2860ec4bff42bef7d5582ee82238013845f6a697672767a05a455aaca'
'7b0dc31c8babaaeed35807d27cc54e6e9fb79a08c4c267244bea2b47149e05089fe495f239fff7d4fff9b1ebcafd588396e8d1db5529dc7ac49d78731575e128'
'70e3bd8762c573cac4ec1d6772cdaab3ce6a248c26c78cbfe729d29058b3bf764305ee02525529955f292ad682883433ca20a91096ccb10d0cfe0148a67ee15f'
'b2cff73def3757d4259f4b4d318a8ccfe166bf7c215cbb2124f1c81bd6e742f96207285b24eb4d99b527b7b97dc6d5e8fdf2f16d78d5d1e2684c26d681328491'
'SKIP')
@ -76,9 +74,6 @@ prepare() {
patch -Np1 -i "$srcdir"/embree.patch
patch -Np1 -i "$srcdir"/D8063-cuda11.diff
# Fix crash with ffmpeg 4.3 (https://bugs.archlinux.org/task/67402)
patch -Np1 -i "$srcdir"/D8355-ffmpeg43.patch
mkdir build
}