+ elseif live_signal_num == STATIC_SIGNAL_NUM then -- Static picture.
+ prepare = function()
+ end
+ return static_chain_hq, prepare
+ elseif live_signal_num == FADE_VTV_SIGNAL_NUM then -- Fade video-to-video.
+ prepare = function()
+ fade_vtv_chain_hq_input0:connect_signal(fade_src_signal)
+ set_neutral_color_from_signal(fade_vtv_chain_hq_wb0_effect, fade_src_signal)
+ fade_vtv_chain_hq_input1:connect_signal(fade_dst_signal)
+ set_neutral_color_from_signal(fade_vtv_chain_hq_wb1_effect, fade_dst_signal)
+ local tt = calc_fade_progress(t, transition_start, transition_end)
+
+ fade_vtv_chain_mix_effect:set_float("strength_first", 1.0 - tt)
+ fade_vtv_chain_mix_effect:set_float("strength_second", tt)
+ end
+ return fade_vtv_chain_hq, prepare
+ elseif live_signal_num == FADE_VTP_SIGNAL_NUM then -- Fade video-to-picture (or picture-to-video).
+ prepare = function()
+ local tt
+ if fade_src_signal == STATIC_SIGNAL_NUM then
+ fade_vtp_chain_hq_input0:connect_signal(fade_dst_signal)
+ set_neutral_color_from_signal(fade_vtp_chain_hq_wb0_effect, fade_dst_signal)
+ tt = 1.0 - calc_fade_progress(t, transition_start, transition_end)
+ else
+ fade_vtp_chain_hq_input0:connect_signal(fade_src_signal)
+ set_neutral_color_from_signal(fade_vtp_chain_hq_wb0_effect, fade_src_signal)
+ tt = calc_fade_progress(t, transition_start, transition_end)
+ end
+ fade_vtp_chain_mix_effect:set_float("strength_first", 1.0 - tt)
+ fade_vtp_chain_mix_effect:set_float("strength_second", tt)
+ end
+ return fade_vtp_chain_hq, prepare