无损音频编码技术解析:预测与可扩展方法
1. 预测无损音频解码器
预测无损解码器使用无损预测器进行音频重建。以下是相关的Python代码实现:
import numpy as np
import sys
import os
import pickle
import struct
from bitstring import BitStream
from ricecoder import rice
def nlmslosslesspreddec(e,L,h):
#Computes the NLMS lossless predictor
#arguments: x: input signal (mono)
#L: Predictor lenght
#h: starting values for the L predictor coefficients
#returns: e, the prediction error
xrek=np.zeros(len(e))
for n in range(L, len(e)):
#prediction error and filter, using the vector of reconstructed samples,
#predicted value from past reconstructed values, since it is lossless, xrek=x:
xrekvec=xrek[n-L+np.arange(L)]
P=np.dot(np.flipud(xrekvec),
超级会员免费看
订阅专栏 解锁全文
6万+

被折叠的 条评论
为什么被折叠?



