From: Steinar H. Gunderson Date: Wed, 16 Jan 2013 19:45:14 +0000 (+0100) Subject: Add an assert saying that if an input has premultiplied alpha, it must also have... X-Git-Tag: 1.0~172 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=7221906173f1cf1ce6913cbe9d62d5ca11e9ee0d;ds=sidebyside Add an assert saying that if an input has premultiplied alpha, it must also have linear gamma. This holds true for nodes in general, but I'm not sure enough about all sorts of intermediate states that could cause this to be temporarily untrue for other nodes. --- diff --git a/effect_chain.cpp b/effect_chain.cpp index 68a6073..a9b8927 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -727,6 +727,10 @@ void EffectChain::find_color_spaces_for_inputs() default: assert(false); } + + if (node->output_alpha_type == ALPHA_PREMULTIPLIED) { + assert(node->output_gamma_curve == GAMMA_LINEAR); + } } } }