Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-03-12 20:09:23 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-03-12 20:09:23 +0400
commitd0af1101fb502ec9bce2622d92f79fa60b826bd8 (patch)
tree033fb4c57ae25ea26b21340510b122342913d69b
parentf6025018f55aa668c7fcc205d0ce1d19bb415ef2 (diff)
Patch #34569: Enable PNG Codec for video output
By Gottfried Hofmann, thanks!
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c9
-rw-r--r--source/blender/makesrna/intern/rna_scene.c3
2 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 2cf7a962d07..af8b32ab75c 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -551,6 +551,12 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
}
}
+ if (codec_id == CODEC_ID_PNG) {
+ if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
+ c->pix_fmt = PIX_FMT_ARGB;
+ }
+ }
+
if ((of->oformat->flags & AVFMT_GLOBALHEADER)
// || !strcmp(of->oformat->name, "mp4")
// || !strcmp(of->oformat->name, "mov")
@@ -1493,6 +1499,9 @@ int BKE_ffmpeg_alpha_channel_is_supported(RenderData *rd)
if (codec == CODEC_ID_QTRLE)
return TRUE;
+ if (codec == CODEC_ID_PNG)
+ return TRUE;
+
#ifdef FFMPEG_FFV1_ALPHA_SUPPORTED
if (codec == CODEC_ID_FFV1)
return TRUE;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 4ce57e560e5..d556cc0dcdc 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3089,8 +3089,9 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
{CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
{CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""},
- {CODEC_ID_QTRLE, "QTRLE", 0, "QTRLE", ""},
+ {CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""},
{CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""},
+ {CODEC_ID_PNG, "PNG", 0, "PNG", ""},
{0, NULL, 0, NULL, NULL}
};