资源简介
音频处理matlab代码,配合mp3.pdf中介绍使用,共有6个代码,其二
代码片段和文件信息
function [N_bitsSNR] = MPEG1_bit_allocation1(SMR bit_rate)
% |function [N_bitsSNR] = MPEG1_bit_allocation(SMR bit_rate)|
% Implements a simplified bit allocation greedy algorithm.
% |SMR| is the signal-to-mask ratios in each sub-band
% as defined by the MPEG1 psycho-acoustic model.
% |bit_rate| is in kbits/s.
% |N_bits| is the number is bits in each sub_band.
% |SNR| is the maximum SNR in each sub-band after quantization i.e. the
% SNR assuming each sub-band contains a full-range sinusoid.
% NB: N_bits and SNR are set to zero for sub-bands 28 to 32.
%
% Copyright N. Moreau ENST Paris 19/03/02
% Modified by Thierry Dutoit FPMs Mons 03/05/07
Fe=44100;
% Imposing low SMR for bands 28-32 to ensure 0 bits.
SMR = [SMR(1:27) ones(15)*-100];
% Assuming 6 bits for each scale factor and 4 bits for each number of
% allocated
- 上一篇:Simuli
nk七自由度整车模型 - 下一篇:MP3原理和实现代码3
评论
共有 条评论