diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-02-01 02:10:47 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-02-01 02:10:47 +0300 |
commit | 95005bbe02cf69f4cb232df761b941fa2cd29616 (patch) | |
tree | ca14e6629247799c8f0c59412bdf002ceb3aeb7c | |
parent | 1d1859c3c488f6be7a3635816914888ad102f3f7 (diff) | |
parent | f420118335e4a3c81f7a50eb08c9da8765d451e3 (diff) |
Merge branch 'blender-v3.1-release'
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 4d94132e6fd..9effeb831b6 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -726,14 +726,12 @@ static AVStream *alloc_video_stream(FFMpegContext *context, } } - if (codec_id == AV_CODEC_ID_VP9) { - if (rd->im_format.planes == R_IMF_PLANES_RGBA) { - c->pix_fmt = AV_PIX_FMT_YUVA420P; - } + if (codec_id == AV_CODEC_ID_VP9 && rd->im_format.planes == R_IMF_PLANES_RGBA) { + c->pix_fmt = AV_PIX_FMT_YUVA420P; } - - /* Use 4:4:4 instead of 4:2:0 pixel format for lossless rendering. */ - if ((codec_id == AV_CODEC_ID_H264 || codec_id == AV_CODEC_ID_VP9) && context->ffmpeg_crf == 0) { + else if ((codec_id == AV_CODEC_ID_H264 || codec_id == AV_CODEC_ID_VP9) && + context->ffmpeg_crf == 0) { + /* Use 4:4:4 instead of 4:2:0 pixel format for lossless rendering. */ c->pix_fmt = AV_PIX_FMT_YUV444P; } |