aboutsummaryrefslogtreecommitdiffstats
path: root/testing/blender
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-11-12 13:56:01 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-11-12 15:12:54 +0000
commit392681f49fad2e9d411aa985d15412c5057418a3 (patch)
tree49a01a490f505dcfed4e87f7ede36f7fb1f21ddb /testing/blender
parent9ed5e9e96f4c33861b8eec8393aa9e970b2d2451 (diff)
downloadaports-392681f49fad2e9d411aa985d15412c5057418a3.tar.bz2
aports-392681f49fad2e9d411aa985d15412c5057418a3.tar.xz
testing/blender: rebuild against ffmpeg 4
Diffstat (limited to 'testing/blender')
-rw-r--r--testing/blender/APKBUILD9
-rw-r--r--testing/blender/ffmpeg4.0.patch113
2 files changed, 119 insertions, 3 deletions
diff --git a/testing/blender/APKBUILD b/testing/blender/APKBUILD
index 840a2d3380..4823241f80 100644
--- a/testing/blender/APKBUILD
+++ b/testing/blender/APKBUILD
@@ -3,7 +3,7 @@
pkgname=blender
pkgver=2.79b
_pkgver=${pkgver/[a-z]}
-pkgrel=2
+pkgrel=3
pkgdesc="3D Creation/Animation/Publishing System"
url="https://www.blender.org/"
arch="x86_64"
@@ -16,7 +16,9 @@ makedepends="cmake libx11-dev jpeg-dev zlib-dev libpng-dev freetype-dev python3-
subpackages="$pkgname-doc $pkgname-shared::noarch $pkgname-headless $pkgname-player py3-$pkgname:python"
source="http://download.blender.org/source/${pkgname}-${pkgver}.tar.gz
blender-2.78a-musl.patch
- gcc8.patch"
+ gcc8.patch
+ ffmpeg4.0.patch
+ "
builddir="$srcdir"/$pkgname-$pkgver
@@ -111,4 +113,5 @@ python() {
sha512sums="2db21ace446168dd683cdb5aad9dec001f8888ae4e9603a04ddb44fb78489ded827deb07e83712b0f1118a0e7bf66f2a5d935dc4ebb3a6703d72672ff414367f blender-2.79b.tar.gz
47e8a6a017cea8c004d7e4205f201f167dd81ba95a4aadf9e55d01e81cc4a23e4d7f1d6aa7a6d1300fe3a5f5c98c664f584e7551fcde7fb1137147e2438f7ed5 blender-2.78a-musl.patch
-59cc54ddc772ed02db8e6ef94b18bad5c7ec8c1bb8cdc2231a6747063ac386f31a77e58322acf32ef4d5d9278ac0449bbf78e440134bfb612d1c86bb67f9df55 gcc8.patch"
+59cc54ddc772ed02db8e6ef94b18bad5c7ec8c1bb8cdc2231a6747063ac386f31a77e58322acf32ef4d5d9278ac0449bbf78e440134bfb612d1c86bb67f9df55 gcc8.patch
+446dd46557c7c976a68010c62e04693c61171980abea1cd0a900b00bcc3d525b83bb6ee200739623110e592e37e8f4783a18f234b40e9f85483830ea9785640d ffmpeg4.0.patch"
diff --git a/testing/blender/ffmpeg4.0.patch b/testing/blender/ffmpeg4.0.patch
new file mode 100644
index 0000000000..4fd7801bc3
--- /dev/null
+++ b/testing/blender/ffmpeg4.0.patch
@@ -0,0 +1,113 @@
+diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
+index e9eea195208..84aea330313 100644
+--- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
++++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
+@@ -264,9 +264,9 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(boost::shared_ptr<AUD_Buffer> buffer) :
+ m_membuffer(buffer),
+ m_membufferpos(0)
+ {
+- m_membuf = reinterpret_cast<data_t*>(av_malloc(FF_MIN_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE));
++ m_membuf = reinterpret_cast<data_t*>(av_malloc(AV_INPUT_BUFFER_MIN_SIZE + AV_INPUT_BUFFER_PADDING_SIZE));
+
+- m_aviocontext = avio_alloc_context(m_membuf, FF_MIN_BUFFER_SIZE, 0, this,
++ m_aviocontext = avio_alloc_context(m_membuf, AV_INPUT_BUFFER_MIN_SIZE, 0, this,
+ read_packet, NULL, seek_packet);
+
+ if(!m_aviocontext)
+diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
+index 3f95ac7a4da..2c2f0916406 100644
+--- a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
++++ b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
+@@ -163,7 +163,7 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs,
+ try
+ {
+ if(m_formatCtx->oformat->flags & AVFMT_GLOBALHEADER)
+- m_codecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ m_codecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+
+ AVCodec* codec = avcodec_find_encoder(m_codecCtx->codec_id);
+ if(!codec)
+@@ -185,11 +185,11 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs,
+ if(avcodec_open2(m_codecCtx, codec, NULL))
+ AUD_THROW(AUD_ERROR_FFMPEG, codec_error);
+
+- m_output_buffer.resize(FF_MIN_BUFFER_SIZE);
++ m_output_buffer.resize(AV_INPUT_BUFFER_MIN_SIZE);
+ int samplesize = AUD_MAX(AUD_SAMPLE_SIZE(m_specs), AUD_DEVICE_SAMPLE_SIZE(m_specs));
+
+ if(m_codecCtx->frame_size <= 1) {
+- m_input_size = FF_MIN_BUFFER_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels;
++ m_input_size = AV_INPUT_BUFFER_MIN_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels;
+ m_input_buffer.resize(m_input_size * samplesize);
+ }
+ else
+diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
+index d7fcd896e11..9e82df17dce 100644
+--- a/source/blender/blenkernel/intern/writeffmpeg.c
++++ b/source/blender/blenkernel/intern/writeffmpeg.c
+@@ -619,8 +619,6 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int
+ c->rc_buffer_aggressivity = 1.0;
+ #endif
+
+- c->me_method = ME_EPZS;
+-
+ codec = avcodec_find_encoder(c->codec_id);
+ if (!codec)
+ return NULL;
+@@ -682,14 +680,14 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int
+ )
+ {
+ PRINT("Using global header\n");
+- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ }
+
+ /* Determine whether we are encoding interlaced material or not */
+ if (rd->mode & R_FIELDS) {
+ PRINT("Encoding interlaced video\n");
+- c->flags |= CODEC_FLAG_INTERLACED_DCT;
+- c->flags |= CODEC_FLAG_INTERLACED_ME;
++ c->flags |= AV_CODEC_FLAG_INTERLACED_DCT;
++ c->flags |= AV_CODEC_FLAG_INTERLACED_ME;
+ }
+
+ /* xasp & yasp got float lately... */
+@@ -779,7 +777,7 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, RenderData *rd, int
+ }
+
+ if (of->oformat->flags & AVFMT_GLOBALHEADER) {
+- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ }
+
+ set_ffmpeg_properties(rd, c, "audio", &opts);
+@@ -798,14 +796,14 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, RenderData *rd, int
+ st->codec->time_base.den = st->codec->sample_rate;
+
+ #ifndef FFMPEG_HAVE_ENCODE_AUDIO2
+- context->audio_outbuf_size = FF_MIN_BUFFER_SIZE;
++ context->audio_outbuf_size = AV_INPUT_BUFFER_MIN_SIZE;
+ #endif
+
+ if (c->frame_size == 0)
+ // used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
+ // not sure if that is needed anymore, so let's try out if there are any
+ // complaints regarding some ffmpeg versions users might have
+- context->audio_input_samples = FF_MIN_BUFFER_SIZE * 8 / c->bits_per_coded_sample / c->channels;
++ context->audio_input_samples = AV_INPUT_BUFFER_MIN_SIZE * 8 / c->bits_per_coded_sample / c->channels;
+ else {
+ context->audio_input_samples = c->frame_size;
+ #ifndef FFMPEG_HAVE_ENCODE_AUDIO2
+diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
+index eaf4dfd84b4..9c2f42feb52 100644
+--- a/source/blender/imbuf/intern/indexer.c
++++ b/source/blender/imbuf/intern/indexer.c
+@@ -537,7 +537,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
+ av_opt_set_int(rv->c, "qmax", ffmpeg_quality, 0);
+
+ if (rv->of->flags & AVFMT_GLOBALHEADER) {
+- rv->c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ rv->c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ }
+
+ if (avio_open(&rv->of->pb, fname, AVIO_FLAG_WRITE) < 0) {