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
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-12-24 16:54:38 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-24 16:54:38 +0300
commit607c45ae6b8ecf0b4ce5278f4fbecb575efcb308 (patch)
tree193f741650f55d2b27be2f533a06c0821740fb67 /source
parent0fcf9b26725863030023f4529acfd6fa2bec2969 (diff)
Fix T42997: Support RGBA output for HuffYUV
More like a feature request but was simple to support.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index d4f5da2e36f..9737ef429cb 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;