X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=futatabi%2Fycbcr_converter.h;h=c2ad2fad98c1a5b33e34de14e91b6cc1696e6c74;hp=459377c3f19103134db8145ed65d049b0f28e496;hb=e15251d2787cb8e6b677af801de6180e55171763;hpb=eeda8995329601f9f4e35047358400833eeae68e diff --git a/futatabi/ycbcr_converter.h b/futatabi/ycbcr_converter.h index 459377c..c2ad2fa 100644 --- a/futatabi/ycbcr_converter.h +++ b/futatabi/ycbcr_converter.h @@ -3,6 +3,7 @@ #include #include +#include #include namespace movit { @@ -10,6 +11,7 @@ namespace movit { class EffectChain; class MixEffect; class ResourcePool; +class WhiteBalanceEffect; struct YCbCrFormat; } // namespace movit @@ -25,12 +27,13 @@ public: }; YCbCrConverter(OutputMode output_mode, movit::ResourcePool *resource_pool); - // Returns the appropriate chain for rendering. + // Returns the appropriate chain for rendering. Fades apply white balance, + // straight-up conversion does not. movit::EffectChain *prepare_chain_for_conversion(std::shared_ptr frame); movit::EffectChain *prepare_chain_for_fade(std::shared_ptr frame, std::shared_ptr secondary_frame, float fade_alpha); // must be interleaved Y'CbCr. - movit::EffectChain *prepare_chain_for_fade_from_texture(GLuint tex, std::shared_ptr secondary_frame, float fade_alpha); + movit::EffectChain *prepare_chain_for_fade_from_texture(GLuint tex, movit::RGBTriplet neutral_color, unsigned width, unsigned height, std::shared_ptr secondary_frame, float fade_alpha); private: movit::YCbCrFormat ycbcr_format; @@ -45,6 +48,7 @@ private: struct FadeChain { std::unique_ptr chain; movit::YCbCrInput *input[2]; + movit::WhiteBalanceEffect *wb_effect[2]; movit::MixEffect *mix_effect; }; FadeChain fade_chains[2][2];