Date: Sunday, March 5, 2023 @ 05:28:25
  Author: svenstaro
Revision: 1412597

upgpkg: blender 17:3.4.1-16: ffmpeg 6 rebuild

Added:
  blender/trunk/blender-ffmpeg6.patch
Modified:
  blender/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   17 ++++++++----
 blender-ffmpeg6.patch |   63 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-03-05 04:55:02 UTC (rev 1412596)
+++ PKGBUILD    2023-03-05 05:28:25 UTC (rev 1412597)
@@ -8,7 +8,7 @@
 
 pkgname=blender
 pkgver=3.4.1
-pkgrel=15
+pkgrel=16
 epoch=17
 pkgdesc="A fully integrated 3D graphics creation suite"
 arch=('x86_64')
@@ -26,14 +26,15 @@
              'intel-compute-runtime')
 optdepends=('cuda: cycles renderer cuda support'
             'libdecor: wayland support')
-source=("git+https://git.blender.org/blender.git#tag=v$pkgver";
-        "git+https://git.blender.org/blender-addons.git";
-        "git+https://git.blender.org/blender-addons-contrib.git";
-        "git+https://git.blender.org/blender-translations.git";
-        "git+https://git.blender.org/blender-dev-tools.git";
+source=("git+https://projects.blender.org/blender/blender.git#tag=v$pkgver";
+        "git+https://projects.blender.org/blender/blender-addons.git";
+        "git+https://projects.blender.org/blender/blender-addons-contrib.git";
+        "git+https://projects.blender.org/blender/blender-translations.git";
+        "git+https://projects.blender.org/blender/blender-dev-tools.git";
         
https://developer.download.nvidia.com/redist/optix/v7.5/OptiX-7.5-Include.zip
         blender-sycl-path.patch
         blender-numpy.patch
+        blender-ffmpeg6.patch
         force-draco1.patch
         force-draco2.patch)
 sha512sums=('SKIP'
@@ -44,6 +45,7 @@
             
'32a77c7a64c5d38f2af76b2c0d09c6b53b7adcc7d85a0b271ba09647858b21fb8f534da5dc4143079359cbedc8074a58715ff2cea0b85019596531a7dca8dbf7'
             
'bc9a80941a18aaddc3e8f2d9963e4f6b7eb1cf9f098418adb236771c3bedcab7b7a06121178f7498caba1af67116cd0ea549382e14a707163cdd5d8fbf3ee824'
             
'a39d9a13515b71d3b686d8f011b3eb9ee45de04f716627d711c5119317cb130c587da1b806f276f97064f814cfce3790b201731f047e5ec01e7d6f65acd04b3b'
+            
'34a2e2a344e851858fc8408ca9fd31d1d4a40083b2a1b2c01cabf48c2728c0b97226cf22c4224f93eda383b4690ff57e98291ad4fa81b960f0531067b40f78f7'
             
'e239da4f3906f1b54265435181cf770bae3d269c8d915df9a73861e6ee71ec70bf2339426e7c81a91e5a567273b3b3742d7a99feefd3398d821b26e1ff3a56d0'
             
'527ab66e5eace777de0043c1ca5787a488f6471450ce67fd6d08137ad0ef56177bc0c17696f30a5fca23fa55d8ca9c3f30cb7b17550dba2dbd8e89ca0b361990')
 
@@ -69,6 +71,9 @@
 
   # fix SYCL include dir
   patch -p1 -i "$srcdir"/blender-sycl-path.patch
+
+  # ffmpeg 6
+  patch -p1 -i "$srcdir"/blender-ffmpeg6.patch
 }
 
 get_pyver() {

Added: blender-ffmpeg6.patch
===================================================================
--- blender-ffmpeg6.patch                               (rev 0)
+++ blender-ffmpeg6.patch       2023-03-05 05:28:25 UTC (rev 1412597)
@@ -0,0 +1,63 @@
+diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
+index f311e04d8e0..4f474d0c267 100644
+--- a/intern/ffmpeg/ffmpeg_compat.h
++++ b/intern/ffmpeg/ffmpeg_compat.h
+@@ -36,6 +36,10 @@
+ #  define FFMPEG_INLINE static inline
+ #endif
+ 
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,132,100)
++#  define AV_CODEC_CAP_OTHER_THREADS AV_CODEC_CAP_AUTO_THREADS
++#endif
++
+ #if (LIBAVFORMAT_VERSION_MAJOR < 58) || \
+     ((LIBAVFORMAT_VERSION_MAJOR == 58) && (LIBAVFORMAT_VERSION_MINOR < 76))
+ #  define FFMPEG_USE_DURATION_WORKAROUND 1
+diff --git a/source/blender/blenkernel/intern/writeffmpeg.c 
b/source/blender/blenkernel/intern/writeffmpeg.c
+index 1d4cbc48833..c812c2e8f26 100644
+--- a/source/blender/blenkernel/intern/writeffmpeg.c
++++ b/source/blender/blenkernel/intern/writeffmpeg.c
+@@ -855,7 +855,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
+                                                             255);
+   st->avg_frame_rate = av_inv_q(c->time_base);
+ 
+-  if (codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
++  if (codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
+     c->thread_count = 0;
+   }
+   else {
+diff --git a/source/blender/imbuf/intern/anim_movie.c 
b/source/blender/imbuf/intern/anim_movie.c
+index 94c0555dcf0..52314c2ca21 100644
+--- a/source/blender/imbuf/intern/anim_movie.c
++++ b/source/blender/imbuf/intern/anim_movie.c
+@@ -554,7 +554,7 @@ static int startffmpeg(struct anim *anim)
+   avcodec_parameters_to_context(pCodecCtx, video_stream->codecpar);
+   pCodecCtx->workaround_bugs = FF_BUG_AUTODETECT;
+ 
+-  if (pCodec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
++  if (pCodec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
+     pCodecCtx->thread_count = 0;
+   }
+   else {
+diff --git a/source/blender/imbuf/intern/indexer.c 
b/source/blender/imbuf/intern/indexer.c
+index 63836690ee4..fb0dd4f3e3e 100644
+--- a/source/blender/imbuf/intern/indexer.c
++++ b/source/blender/imbuf/intern/indexer.c
+@@ -559,7 +559,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
+   av_dict_set(&codec_opts, "preset", "veryfast", 0);
+   av_dict_set(&codec_opts, "tune", "fastdecode", 0);
+ 
+-  if (rv->codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
++  if (rv->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
+     rv->c->thread_count = 0;
+   }
+   else {
+@@ -872,7 +872,7 @@ static IndexBuildContext 
*index_ffmpeg_create_context(struct anim *anim,
+   avcodec_parameters_to_context(context->iCodecCtx, 
context->iStream->codecpar);
+   context->iCodecCtx->workaround_bugs = FF_BUG_AUTODETECT;
+ 
+-  if (context->iCodec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
++  if (context->iCodec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
+     context->iCodecCtx->thread_count = 0;
+   }
+   else {

Reply via email to