qmf_realtime_class.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:ASP 作者: TUIlmenauAMS 项目源码 文件源码
def DST4(samples):
    """
        Method to create DST4 transformation using DST3

        Arguments   :
            samples : (1D Array) Input samples to be transformed

        Returns     :
            y       :  (1D Array) Transformed output samples

    """

    # Initialize
    samplesup=np.zeros(2*N, dtype = np.float32)

    # Upsample signal
    # Reverse order to obtain DST4 out of DCT4:
    #samplesup[1::2]=np.flipud(samples)
    samplesup[0::2] = samples
    y = spfft.dst(samplesup,type=3,norm='ortho')*np.sqrt(2)#/2

    # Flip sign of every 2nd subband to obtain DST4 out of DCT4
    #y=(y[0:N])*(((-1)*np.ones(N, dtype = np.float32))**range(N))

    return y[0: N]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号