+ set_neutral_color_from_signal(simple_chain_hq_wb_effect, live_signal_num)
+ end
+ return simple_chain_hq, prepare
+ 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
+ end
+
+ -- SBS code (live_signal_num == SBS_SIGNAL_NUM).
+ if t > transition_end and zoom_dst == 1.0 then
+ -- Special case: Show only the single image on screen.
+ prepare = function()
+ simple_chain_hq_input:connect_signal(INPUT0_SIGNAL_NUM)
+ set_neutral_color(simple_chain_hq_wb_effect, input0_neutral_color)