forked from bartvdbraak/blender
Fix T42997: Support RGBA output for HuffYUV
More like a feature request but was simple to support.
This commit is contained in:
parent
0fcf9b2672
commit
607c45ae6b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user