Function DLPII(clip audio)
{
#Try apply DolbySurround Downmix II
channels = Audiochannels(audio)
daudio=ConvertAudioToFloat(audio)
fl = (channels>=1) ? GetChannel(daudio, 1) : 0
fr = (channels>=2) ? GetChannel(daudio, 2) : 0
c = (channels>=3) ? GetChannel(daudio, 3) : 0
sl = (channels>=5) ? GetChannel(daudio, 5) : 0
sr = (channels==6) ? GetChannel(daudio, 6) : 0
sr = (channels==5) ? GetChannel(daudio, 5) : sr
ssl = (channels>=5) ? MixAudio(sl, sr, 0.2818, 0.1627).Amplify(-1.0) : 0
fl_c = (channels>=5) ? MixAudio(fl, c, 0.3254, 0.2301) : 0
ssr = (channels>=5) ? MixAudio(sl, sr, 0.1627, 0.2818) : 0
fr_c = (channels>=5) ? MixAudio(fr, c, 0.3254, 0.2301) : 0
l = (channels>=5) ? MixAudio(ssl, fl_c, 1.0, 1.0) : 0
r = (channels>=5) ? MixAudio(ssr, fr_c, 1.0, 1.0) : 0
audio = (channels>=5) ? MergeChannels(l, r) : audio
#Remove possible LFE channel
l_ch = (channels==3) ? GetChannel(audio, 1) : 0
r_ch = (channels==3) ? GetChannel(audio, 2) : 0
audio = (channels==3) ? MergeChannels(l_ch, r_ch) : audio
return audio
}
在avs中调用此功能函数
dlpii()即可
声音嫌小可以再加normalize(150.0/100.0)