www.pudn.com > Matlab-MPEG.rar > Global_masking_threshold.m, change:2007-08-21,size:1918b


function  LTg = Global_masking_threshold(LTq, LTt, LTn) 
%   LTg = Global_masking_threshold(LTq, LTt, LTn) 
% 
%   为表中定义的频率线子集,计算全局掩蔽阈值。 
%   它是在标准频谱的平方幅值尺下,单独掩蔽阈值和绝对掩蔽阈值之和。 
% 
%   参数LTq -- 安静时的绝对掩蔽阈 
%   参数LTt -- 音调的单独屏蔽阈值 
%   参数LTn -- 非音调的单独屏蔽阈值 
% 
%   Compute the global masking threshold for the subset of frequency lines  
%   defined in table [1, pp. 117]. It is the sum -- in the normal square 
%   amplitude scale of the spectrum -- of the individual masking 
%   thresholds and the absolute threshold [1, pp. 114]. 
% 
%   See also Individual_masking_thresholds, Table_absolute_threshold 
%    
%   References: 
%    [1] Information technology -- Coding of moving pictures and associated 
%        audio for digital storage media at up to 1,5 Mbits/s -- Part3: audio. 
%        British standard. BSI, London. October 1993. Implementation of ISO/IEC 
%        11172-3:1993. BSI, London. First edition 1993-08-01. 
% 
%------------------------------------------------------------------------------- 
Common; 
 
N = length(LTq(:, 1)); 
if not(isempty(LTt)) 
   m = length(LTt(:, 1)); 
end 
n = length(LTn(:, 1)); 
    
% The global masking thresholds is computing for the subset of frequencies 
% defined in [1, Table 1.b]. They are the summ of the powers of the  
% corresponding to the individual masking thresholds (LTt, LTn) and the 
% threshold in quiet (LTq). 
% 对表中定义的频率子集计算全局掩蔽阈值。 
% 它们是对应的单独掩蔽阈值(LTt, LTn)和安静时的绝对掩蔽阈值(LTq)的功率之和。 
 
for i = 1:N 
    
   % 安静时的阈值 
   temp = 10^(LTq(i) / 10);; 
    
   % 音调成分的贡献 
   if not(isempty(LTt)) 
	   for j = 1:m, 
	      temp = temp + 10^(LTt(j, i) / 10); 
      end 
   end 
       
   % 噪声成分的贡献 
   for j = 1:n, 
      temp = temp + 10^(LTn(j, i) / 10); 
   end 
    
   LTg(i) = 10 * log10(temp); 
end