summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2007-09-19 07:32:21 +0000
committerLuca Barbato <lu_zero@gentoo.org>2007-09-19 07:32:21 +0000
commitaf7386c6e0b95d38e462b2f57fddf6430841da27 (patch)
tree4d8fb01d759888dbba511aebc282b7362473ebe9 /media-gfx/blender/files
parentAdd reference to bugs #192894 and #192923 to ChangeLog. (diff)
downloadgentoo-2-af7386c6e0b95d38e462b2f57fddf6430841da27.tar.gz
gentoo-2-af7386c6e0b95d38e462b2f57fddf6430841da27.tar.bz2
gentoo-2-af7386c6e0b95d38e462b2f57fddf6430841da27.zip
complete the fix for ffmpeg
(Portage version: 2.1.3.9)
Diffstat (limited to 'media-gfx/blender/files')
-rw-r--r--media-gfx/blender/files/blender-2.44-swscale.patch84
-rw-r--r--media-gfx/blender/files/digest-blender-2.44-r13
2 files changed, 81 insertions, 6 deletions
diff --git a/media-gfx/blender/files/blender-2.44-swscale.patch b/media-gfx/blender/files/blender-2.44-swscale.patch
index 08bdb65bae98..4a8df202990e 100644
--- a/media-gfx/blender/files/blender-2.44-swscale.patch
+++ b/media-gfx/blender/files/blender-2.44-swscale.patch
@@ -1,7 +1,20 @@
-Index: writeffmpeg.c
-===================================================================
---- blender.orig/source/blender/blenkernel/intern/writeffmpeg.c (revision 11354)
-+++ blender/source/blender/blenkernel/intern/writeffmpeg.c (working copy)
+diff --git a/trunk/blender/config/linux2-config.py b/trunk/blender/config/linux2-config.py
+index edc7f26..bd323e4 100644
+--- a/trunk/blender/config/linux2-config.py
++++ b/trunk/blender/config/linux2-config.py
+@@ -119,7 +119,7 @@ WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
+ BF_FFMPEG = '/usr'
+ BF_FFMPEG_INC = '${BF_FFMPEG}/include'
+ BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
+-BF_FFMPEG_LIB = 'avformat avcodec avutil'
++BF_FFMPEG_LIB = 'avformat avcodec avutil swscale'
+
+ # Mesa Libs should go here if your using them as well....
+ WITH_BF_STATICOPENGL = 'false'
+diff --git a/trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c b/trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
+index 703f280..8576f59 100644
+--- a/trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
++++ b/trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
@@ -32,6 +32,7 @@
#include <ffmpeg/avformat.h>
#include <ffmpeg/avcodec.h>
@@ -10,7 +23,7 @@ Index: writeffmpeg.c
#if LIBAVFORMAT_VERSION_INT < (49 << 16)
#define FFMPEG_OLD_FRAME_RATE 1
-@@ -258,6 +259,7 @@
+@@ -258,6 +259,7 @@ static void write_video_frame(AVFrame* frame)
static AVFrame* generate_video_frame(uint8_t* pixels)
{
uint8_t* rendered_frame;
@@ -18,7 +31,7 @@ Index: writeffmpeg.c
AVCodecContext* c = get_codec_from_stream(video_stream);
int width = c->width;
-@@ -317,8 +319,18 @@
+@@ -317,8 +319,18 @@ static AVFrame* generate_video_frame(uint8_t* pixels)
}
if (c->pix_fmt != PIX_FMT_RGBA32) {
@@ -39,3 +52,62 @@ Index: writeffmpeg.c
delete_picture(rgb_frame);
}
return current_frame;
+diff --git a/trunk/blender/source/blender/imbuf/intern/anim.c b/trunk/blender/source/blender/imbuf/intern/anim.c
+index 5b185a4..5cdb651 100644
+--- a/trunk/blender/source/blender/imbuf/intern/anim.c
++++ b/trunk/blender/source/blender/imbuf/intern/anim.c
+@@ -89,6 +89,7 @@
+ #include <ffmpeg/avformat.h>
+ #include <ffmpeg/avcodec.h>
+ #include <ffmpeg/rational.h>
++#include <ffmpeg/swscale.h>
+
+ #if LIBAVFORMAT_VERSION_INT < (49 << 16)
+ #define FFMPEG_OLD_FRAME_RATE 1
+@@ -619,6 +620,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
+ AVPacket packet;
+ int64_t pts_to_search = 0;
+ int pos_found = 1;
++ static struct SwsContext *img_convert_ctx;
+
+ if (anim == 0) return (0);
+
+@@ -706,12 +708,32 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
+ unsigned char * p =(unsigned char*) ibuf->rect;
+ unsigned char * e = p + anim->x * anim->y * 4;
+
+- img_convert((AVPicture *)anim->pFrameRGB,
+- PIX_FMT_RGBA32,
+- (AVPicture*)anim->pFrame,
+- anim->pCodecCtx->pix_fmt,
+- anim->pCodecCtx->width,
+- anim->pCodecCtx->height);
++// img_convert((AVPicture *)anim->pFrameRGB,
++// PIX_FMT_RGBA32,
++// (AVPicture*)anim->pFrame,
++// anim->pCodecCtx->pix_fmt,
++// anim->pCodecCtx->width,
++// anim->pCodecCtx->height);
++ if (img_convert_ctx == NULL) {
++ img_convert_ctx = sws_getContext(
++ anim->pCodecCtx->width,
++ anim->pCodecCtx->height,
++ PIX_FMT_RGBA32,
++ anim->pCodecCtx->width,
++ anim->pCodecCtx->height,
++ anim->pCodecCtx->pix_fmt,
++ SWS_BICUBIC,
++ NULL, NULL, NULL);
++ }
++ sws_scale(img_convert_ctx,
++ anim->pFrame->data,
++ anim->pFrame->linesize,
++ 0,
++ anim->pCodecCtx->height,
++ anim->pFrameRGB->data,
++ anim->pFrameRGB->linesize);
++
++
+ IMB_flipy(ibuf);
+ if (G.order == L_ENDIAN) {
+ /* BGRA -> RGBA */
diff --git a/media-gfx/blender/files/digest-blender-2.44-r1 b/media-gfx/blender/files/digest-blender-2.44-r1
new file mode 100644
index 000000000000..b6d7e5970f2a
--- /dev/null
+++ b/media-gfx/blender/files/digest-blender-2.44-r1
@@ -0,0 +1,3 @@
+MD5 7ac841f6feb27e9d7fb6d77cf137be12 blender-2.44.tar.gz 14362667
+RMD160 65e96e03258263a7759bdff5a6d14fc65d13a816 blender-2.44.tar.gz 14362667
+SHA256 8fa5a46ea65d2a8b87fd1368d5984dfa0a41bdc3cfe24c776e069a4fe40102d1 blender-2.44.tar.gz 14362667