[Bf-blender-cvs] [607c45a] master: Fix T42997: Support RGBA output for HuffYUV
Sergey Sharybin
noreply at git.blender.org
Wed Dec 24 16:32:40 CET 2014
Commit: 607c45ae6b8ecf0b4ce5278f4fbecb575efcb308
Author: Sergey Sharybin
Date: Wed Dec 24 18:54:38 2014 +0500
Branches: master
https://developer.blender.org/rB607c45ae6b8ecf0b4ce5278f4fbecb575efcb308
Fix T42997: Support RGBA output for HuffYUV
More like a feature request but was simple to support.
===================================================================
M source/blender/blenkernel/intern/writeffmpeg.c
===================================================================
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index d4f5da2..9737ef4 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -598,8 +598,12 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
/* Keep lossless encodes in the RGB domain. */
if (codec_id == AV_CODEC_ID_HUFFYUV) {
- /* HUFFYUV was PIX_FMT_YUV422P before */
- c->pix_fmt = PIX_FMT_RGB32;
+ if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
+ c->pix_fmt = PIX_FMT_BGRA;
+ }
+ else {
+ c->pix_fmt = PIX_FMT_RGB32;
+ }
}
if (codec_id == AV_CODEC_ID_FFV1) {
@@ -1628,6 +1632,12 @@ bool BKE_ffmpeg_alpha_channel_is_supported(RenderData *rd)
if (codec == AV_CODEC_ID_PNG)
return true;
+ if (codec == AV_CODEC_ID_PNG)
+ return true;
+
+ if (codec == AV_CODEC_ID_HUFFYUV)
+ return true;
+
#ifdef FFMPEG_FFV1_ALPHA_SUPPORTED
if (codec == AV_CODEC_ID_FFV1)
return true;
More information about the Bf-blender-cvs
mailing list