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:
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index e9f7823dfe8..2291ea5a249 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -506,12 +506,21 @@ static AVStream* alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
}
// Keep lossless encodes in the RGB domain.
- if (codec_id == CODEC_ID_HUFFYUV || codec_id == CODEC_ID_FFV1) {
+ if (codec_id == CODEC_ID_HUFFYUV) {
/* HUFFYUV was PIX_FMT_YUV422P before */
c->pix_fmt = PIX_FMT_RGB32;
}
- if ( codec_id == CODEC_ID_QTRLE ) {
+ if (codec_id == CODEC_ID_FFV1) {
+ if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
+ c->pix_fmt = PIX_FMT_RGB32;
+ }
+ else {
+ c->pix_fmt = PIX_FMT_BGR0;
+ }
+ }
+
+ if (codec_id == CODEC_ID_QTRLE ) {
if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
c->pix_fmt = PIX_FMT_ARGB;
}
@@ -1422,4 +1431,11 @@ void ffmpeg_verify_codec_settings(RenderData *rd)
ffmpeg_set_expert_options(rd);
}
+int ffmpeg_alpha_channel_supported(RenderData *rd)
+{
+ int codec = rd->ffcodecdata.codec;
+
+ return ELEM(codec, CODEC_ID_QTRLE, CODEC_ID_FFV1);
+}
+
#endif