diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2019-07-31 12:15:14 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2019-07-31 12:28:33 +0300 |
commit | 631d5026c7bb34320c5d9b60afa5bc44b40fc5e4 (patch) | |
tree | af5a6ccfbb186da2649cf8554740516e4256309b /source/blender/blenkernel/intern | |
parent | af4dcc6073fa1a04edbfb69e591f9aac9f452f17 (diff) |
Cleanup: Simplification of `BKE_ffmpeg_alpha_channel_is_supported()`
Simplified `BKE_ffmpeg_alpha_channel_is_supported()` to use `ELEM()`
instead of a row consecutive `if`-statements.
No functional changes.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5156
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index f3336adda30..0d4182ff24d 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1835,26 +1835,13 @@ void BKE_ffmpeg_codec_settings_verify(RenderData *rd) bool BKE_ffmpeg_alpha_channel_is_supported(RenderData *rd) { int codec = rd->ffcodecdata.codec; - - if (codec == AV_CODEC_ID_QTRLE) { - return true; - } - - if (codec == AV_CODEC_ID_PNG) { - return true; - } - - if (codec == AV_CODEC_ID_HUFFYUV) { - return true; - } - + return ELEM(codec, + AV_CODEC_ID_QTRLE, + AV_CODEC_ID_PNG, # ifdef FFMPEG_FFV1_ALPHA_SUPPORTED - if (codec == AV_CODEC_ID_FFV1) { - return true; - } + AV_CODEC_ID_FFV1, # endif - - return false; + AV_CODEC_ID_HUFFYUV); } void *BKE_ffmpeg_context_create(void) |