CN1270290C - 子带分析/合成滤波方法 - Google Patents
子带分析/合成滤波方法 Download PDFInfo
- Publication number
- CN1270290C CN1270290C CNB2003101179487A CN200310117948A CN1270290C CN 1270290 C CN1270290 C CN 1270290C CN B2003101179487 A CNB2003101179487 A CN B2003101179487A CN 200310117948 A CN200310117948 A CN 200310117948A CN 1270290 C CN1270290 C CN 1270290C
- Authority
- CN
- China
- Prior art keywords
- sigma
- sample sound
- window
- sub
- sample
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Complex Calculations (AREA)
Abstract
本发明提供一种音频编码/译码方法,能够用来对一音频信号进行编码,也能够用来对多个子带样本进行译码以产生一数字音频信号。在编码过程中,该方法是根据依据2P个时域区间的P个窗口声音样本产生第0个和数,并根据依据该2P个时域区间的2P个窗口声音样本产生第1个至第(M-1)个和数中的一和数,再根据该M个和数计算M个子带样本。而于解码过程中,该方法是对应于一第一索引的变化,在多个子带样本当中读取M个子带样本,以通过一逆向修改离散余弦转换与一综合运算产生一数字音频信号。
Description
技术领域
本发明涉及一种音频编码/译码方法,尤指一种子带分析/合成滤波(Subband Analysis/Synthesis Filtering)方法。
技术背景
随着电子电路运算速度的提升,耗费大量系统资源的运算(如视频/音频处理)遂成为电子装置的发展重点之一。一般视频/音频处理的规格中通常包含有若干编码型态,以因应各种数据的编码需求。以运动图形专家组(MPEG,Moving Picture Coding Experts Group)规格为例,其对于音频编码/译码的定义是一种子带分析/合成滤波(Subband Analysis/SynthesisFiltering)。相关资料请参阅ISO 11172-3、美国专利USP5,214,678、USP5,508,949、USP5,809,474、USP6,094,637、以及1994年2月的IEEE SignalProcessing Letter Vol.1 No.「Fast subband filtering in MPEG audiocoding」等文献。
已知的子带分析/合成滤波过程中所运用到的修改离散余弦转换(MDCT、Modified Discrete Cosine Transform)与逆向修改离散余弦转换(IMDCT、Inverse MDCT)的转换矩阵的行元素(Column Element)数量与列元素(RowElement)数量并不相等。以典型的子带分析滤波的过程为例,一音频信号首先被取样而产生三十二个声音样本(Audio Sample)。经过一窗口运算(Windowing Operation)后,该三十二个声音样本分别被乘以对应的窗口系数(Windowing Coefficient)以对应地产生三十二个窗口(Windowed)声音样本。通过特定的取样方式,一可储存五百一十二个变量的循环缓冲器(Circular Buffer)当中储存了十六次窗口运算所对应的五百一十二个窗口声音样本。然而已知技术对于这些窗口声音样本进行后续将提到的加总运算(Summation Operation)时,是以六十四个窗口声音样本作为该加总运算的向量元素。而紧接在该加总运算后的修改离散余弦转换过程中,又必须通过前述的转换矩阵将一具有六十四个元素的加总向量转换为三十二个子带样本(Subband Sample)以完成该音频信号的编码。因此其整体运算量相当庞大。
已知的子带分析滤波方法是以六十四个变量为单位由该循环缓冲器读取八个编码中间(intermediate)向量,其中每个编码中间向量具有六十四个元素。然后对这些编码中间向量进行加总运算(Summation Operation)以产生一加总向量,其中该加总向量的每一元素是这些编码中间向量的对应元素之和。然后通过前述的转换矩阵对该加总向量进行修改离散余弦转换以产生该三十二个子带样本。由于前述的运算过程需要进行许多加法与乘法运算,并且相关运算过程中的操作数与其所对应的向量或矩阵中的排列顺序并不连续,因此不但耗费许多运算时间,并且不适用于数字信号处理器(DSP、DigitalSignal Processor)的流水线单指令多数据运算(Pipelined SIMD Operation、Pipelined Single Instruction Multiple Data Operation)。由于多个分散储存的数据所对应的读取速度并不若一系列连续储存的数据所对应的读取速度,并且当这些操作数所对应的向量或矩阵是储存于一储存装置(如一外部内存)时,这些操作数由于前述的不连续的排列顺序而无法被循序读取,因此前述的大量运算于数据读取时间的浪费相当可观。
又以典型的子带合成滤波的过程为例,其运算方式大致为前述的子带分析滤波的逆向运算。也就是说对这些子带样本进行译码以产生一数字音频信号。经过特定编码程序所产生的多个子带样本当中的三十二个子带样本首先经过前述的逆向修改离散余弦转换而产生一具有六十四个元素的第一译码中间向量,而每一元素是一属于时域的译码中间样本。随后该第一解码中间向量被储存于一先进先出(FIFO、First In First Out)内存,其中该先进先出内存可以储存十六个第一解码中间向量,亦即可以储存一千零二十四个译码中间样本。该一千零二十四个译码中间样本当中的五百一十二个译码中间样本须经过一特定顺序以三十二个译码中间样本为单位被读取,然后经过一窗口运算,以产生五百一十二个窗口(Windowed)译码中间样本,其中每三十二个窗口译码中间样本是定义为一第二解码中间向量。最后对该五百一十二个窗口译码中间样本所对应的十六个第二译码中间向量进行加总运算以产生一译码向量,而该译码向量的三十二个元素即为该数字音频信号的声音样本。上述的译码过程须进行许多加法运算与乘法运算,并且耗费许多缓冲器的存储空间。另外相关运算过程中的操作数于其所对应的向量或矩阵中的排列顺序并不连续,因此亦不适用于前述的流水线单指令多数据运算。当这些操作数所对应的向量或矩阵是储存于一储存装置时,其数据读取时间的浪费亦相当可观。
由上述可知,已知的子带分析/合成滤波技术由于须进行许多加法运算与乘法运算而耗费许多缓冲器的存储空间。另外由于已知技术的相关运算过程中的操作数在其所对应的向量或矩阵中的排列顺序并不连续,因此亦不适用于前述的流水线单指令多数据运算。又当这些操作数所对应的向量或矩阵是储存在一储存装置时,将浪费许多数据读取时间。已知技术实有待改进。
发明内容
因此本发明的主要目的在于提供一种子带分析/合成滤波(SubbandAnalysis/Synthesis Filtering)方法,以解决上述问题。
本发明提供一种音频处理方法,用来对一音频信号进行编码,该方法具有:对2P个时域区间的音频信号取样,以产生2P*M个声音样本(AudioSample);对该2P*M个声音样本进行窗口运算(Windowing Operation),以对应地产生2P*M个窗口(Windowed)声音样本;根据依据该2P个时域区间的P个窗口声音样本产生第0个和数;根据依据该2P个时域区间的2P个窗口声音样本产生第1个至第(M-1)个和数中的一和数;以及根据该M个和数,计算M个子带样本(Subband Sample)。其中这些和数产生步骤与该子带样本计算步骤实质上是一加总运算(Summation Operation)与一修改离散余弦转换(MDCT、Modified Discrete Cosine Transform)的组合。
本发明另提供一种音频处理方法,用来对多个子带样本进行译码以产生一数字音频信号,该方法具有:对应于一第一索引,在该多个子带样本当中读取M个子带样本;对该M个子带样本进行一逆向修改离散余弦转换(IMDCT、Inverse MDCT),以产生M个输出作为N个循环缓冲变量(Circular BufferVariable)当中的M个循环缓冲变量;根据该N个循环缓冲变量当中的多个循环缓冲变量进行一综合运算,其中该综合运算为一窗口运算与一加总运算的组合;以及对应于该第一索引的变化,重新在该多个子带样本当中读取M个子带样本,以通过该逆向修改离散余弦转换进行步骤与该综合运算进行步骤产生该数字音频信号。其中该综合运算进行步骤是对应于该第一索引的变化进行加总运算,并且该逆向修改离散余弦转换进行步骤与该综合运算进行步骤是对应于该第一索引的变化进行十八次,以产生该数字音频信号。
本发明又提供一种音频处理方法,其为一种音频编码/译码方法,能够用来对一音频信号进行编码,也能够用来对多个子带样本进行译码以产生一数字音频信号。该方法对一音频信号进行编码的步骤具有:对2P个时域区间的音频信号取样,以产生2P*M个声音样本;对该2P*M个声音样本进行窗口运算,以对应地产生2P*M个窗口声音样本;根据依据该2P个时域区间的P个窗口声音样本产生第0个和数;根据依据该2P个时域区间的2P个窗口声音样本产生第1个至第(M-1)个和数中的一和数;以及根据该M个和数,计算M个子带样本。而该方法对多个子带样本进行译码的步骤具有:对应于一第一索引,在该多个子带样本当中读取M个子带样本;对该M个子带样本进行一逆向修改离散余弦转换,以产生M个输出作为N个循环缓冲变量当中的M个循环缓冲变量;根据该N个循环缓冲变量当中的多个循环缓冲变量进行一综合运算,其中该综合运算为一窗口运算与一加总运算的组合;以及对应于该第一索引的变化,重新于该多个子带样本当中读取M个子带样本,以通过该逆向修改离散余弦转换进行步骤与该综合运算进行步骤产生该数字音频信号。
本发明的好处之一是,本发明的方法能节省许多缓冲器的存储空间。
本发明的另一好处是,本发明的相关运算过程中的操作数于其所对应的向量或矩阵中的排列顺序为连续排列,因此适用于数字信号处理器(DSP、Digital Signal Processor)的流水线单指令多数据运算(Pipelined SIMDOperation、Pipelined Single Instruction Multiple Data Operation)。
本发明的又一好处是,当这些操作数所对应的向量或矩阵是储存于一储存装置(如内存)时,本发明的方法相较于已知技术节省许多数据读取时间。
附图简述
图1为本发明的音频处理方法对一音频信号进行编码的流程示意图。
图2为本发明的音频处理方法对多个子带样本进行译码的流程示意图。
图3为本发明的音频处理方法的音频编码与音频译码的流程示意图。
附图符号说明
(相关图示是流程图)
具体实施方式
本发明提供一种子带分析/合成滤波(Subband Analysis/SynthesisFiltering)方法。以下首先介绍本发明的子带分析滤波方法(如图1所示的编码流程)。其次介绍本发明的子带合成滤波方法(如图2所示的译码流程)。
请参考图1,图1为本发明的音频处理方法对一音频信号进行编码的流程示意图。本发明提供一种音频处理方法,用来对一音频信号进行编码。这些步骤的顺序并非限定本发明的范围,该方法说明如下。
步骤110:对2P个时域区间的音频信号取样,以产生2P*M个声音样本(Audio Sample)X[n];
步骤120:对该2P*M个声音样本X[n]进行窗口运算(WindowingOperation),以对应地产生2P*M个窗口(Windowed)声音样本;
步骤130:根据依据该2P个时域区间的P窗口声音样本产生第0个和数(其对应的索引i=0,以下将进一步说明);
步骤140:根据依据该2P个时域区间的2P窗声音样本产生第1个至第(M-1)个和数(其对应的索引i=1-(M-1),以下将进一步说明)中的一和数;以及
步骤150:根据该M个和数,计算M个子带样本(Subband Sample)。
上述的方法是以M个声音样本为单位进行该取样步骤(步骤110)与该窗口运算进行步骤(步骤120),并且该2P*M个声音样本X[n]的初始值皆为零,作为该方法的初始状态。而这些和数产生步骤(步骤130、140)与该子带样本计算步骤(步骤150)实质上是一加总运算(Summation Operation)与一修改离散余弦转换(MDCT、Modified Discrete Cosine Transform)的组合。另外该音频处理方法符合MPEG的规格,也就是说这些子带样本是符合MPEG的规格。为了便于理解,在本实施例中可定义P=8,且M=32。
在该第一实施例中,每一窗口声音样本是该2P*M个声音样本中的一声音样本X[n]与2P*M个窗口系数(在本实施例是符合MPEG规格的窗口系数C[n])中的一窗口系数C[n]的乘积,这些和数为:
并且,这些子带样本是:
其中,
并且
本发明的第二实施例与该第一实施例大致相似,其相异之处说明如下。该第二实施例中的每一窗口声音样本是该2P*M个声音样本中的一声音样本X[n]与(2P*M-8)个窗口系数(是该第一实施例所使用的窗口系数C[n]当中去除八个窗口系数C[n],再经过重新排列而得到的窗口系数C1[n],后续将进一步说明)中的一窗口系数C1[n]的乘积,该方法更包含有:提供该(2P*M-8)个窗口系数C1[n],以使得这些和数当中的窗口系数可以通过流水线单指令多数据运算(Pipelined SIMD Operation、Pipelined Single InstructionMultiple Data Operation)的方式被使用,或者可以自一储存装置被循序读取。这些和数为:
并且这些子带样本是:
其中
并且
通过本发明的方法,该(2P*M-8)个窗口系数C1[n]对应于相关运算中的索引(如前述的和数Z[i]与窗口系数C1[n]的相关运算中窗口系数C1[n]的索引)是连续排列,因此本发明不但节省相关运算的缓冲器的存储空间,亦可通过较少数量的窗口系数C1[n]完成上述的编码过程。在本实施例中,P=8,且M=32,而该(2P*M-8)个窗口系数C1[n]即为该504个窗口系数C1[n],如以下所示。
C1[504]={
-0.000002384,0.000069618,-0.000021458,-0.004756451,0.030526638,0.004638195,0.000747204,0.000049591,
-0.000003338,0.000050545,-0.000259876,-0.006189346,0.029224873,0.004489899,0.000680923,0.000043392,
-0.000001907,0.000084400,0.000191689,-0.003411293,0.031706810,0.004728317,0.000809669,0.000055790,
-0.000003815,0.000027180,-0.000522137,-0.007703304,0.027815342,0.004290581,0.000611782,0.000037670,
-0.000001430,0.000095367,0.000378609,-0.002161503,0.032754898,0.004752159,0.000866413,0.000062942,
-0.000004768,-0.000000954,-0.000806808,-0.009287834,0.026310921,0.004048824,0.000542164,0.000032425,
-0.000000954,0.000102520,0.000539303,-0.001011848,0.033659935,0.004703045,0.000915051,0.000070095,
-0.000006199,-0.000034332,-0.001111031,-0.010933399,0.024725437,0.003771782,0.000472546,0.000027657,
-0.000000954,0.000106812,0.000674248,0.000033379,0.034412861,0.004573822,0.000954151,0.000076771,
-0.000007629,-0.000072956,-0.001432419,-0.012627602,0.023074150,0.003467083,0.000404358,0.000023365,
-0.000000477,0.000108719,0.000783920,0.000971317,0.035007000,0.004357815,0.000980854,0.000083923,
-0.000009060,-0.000116348,-0.001766682,-0.014358521,0.021372318,0.003141880,0.000339031,0.000019550,
-0.000000477,0.000108242,0.000868797,0.001800537,0.035435200,0.004049301,0.000994205,0.000090599,
-0.000011444,-0.000165462,-0.002110004,-0.016112804,0.019634247,0.002803326,0.000277042,0.000016689,
-0.000000477,0.000105858,0.000930786,0.002521515,0.035694122,0.003643036,0.000991821,0.000096321,
-0.000013828,-0.000218868,-0.002457142,-0.017876148,0.017876148,0.002457142,0.000218868,0.000013828,
0.000000000,0.000101566,0.000971317,0.003134727,0.035780907,0.003134727,0.000971317,0.000101566,
-0.000016689,-0.000277042,-0.002803326,-0.019634247,0.016112804,0.002110004,0.000165462,0.000011444,
0.000096321,0.000991821,0.003643036,0.035694122,0.002521515,0.000930786,0.000105858,-0.000000477,
-0.000019550,-0.000339031,-0.003141880,-0.021372318,0.014358521,0.001766682,0.000116348,0.000009060,
0.000090599,0.000994205,0.004049301,0.035435200,0.001800537,0.000868797,0.000108242,-0.000000477,
-0.000023365,-0.000404358,-0.003467083,-0.023074150,0.012627602,0.001432419,0.000072956,0.000007629,
0.000083923,0.000980854,0.004357815,0.035007000,0.000971317,0.000783920,0.000108719,-0.000000477,
-0.000027657,-0.000472546,-0.003771782,-0.024725437,0.010933399,0.001111031,0.000034332,0.000006199,
0.000076771,0.000954151,0.004573822,0.034412861,0.000033379,0.000674248,0.000106812,-0.000000954,
-0.000032425,-0.000542164,-0.004048824,-0.026310921,0.009287834,0.000806808,0.000000954,0.000004768,
0.000070095,0.000915051,0.004703045,0.033659935,-0.001011848,0.000539303,0.000102520,-0.000000954,
-0.000037670,-0.000611782,-0.004290581,-0.027815342,0.007703304,0.000522137,-0.000027180,0.000003815,
0.000062942,0.000866413,0.004752159,0.032754898,-0.002161503,0.000378609,0.000095367,-0.000001430,
-0.000043392,-0.000680923,-0.004489899,-0.029224873,0.006189346,0.000259876,-0.000050545,0.000003338,
0.000055790,0.000809669,0.004728317,0.031706810,-0.003411293,0.000191689,0.000084400,-0.000001907,
-0.000002861,0.000060558,-0.000137329,-0.005462170,0.029890060,0.004570484,0.000714302,0.000046253,
-0.000002384,0.000077724,0.000088215,-0.004072189,0.031132698,0.004691124,0.000779152,0.000052929,
-0.000003338,0.000039577,-0.000388145,-0.006937027,0.028532982,0.004395962,0.000646591,0.000040531,
-0.000001907,0.000090122,0.000288486,-0.002774239,0.032248020,0.004748821,0.000838757,0.000059605,
-0.000004292,0.000013828,-0.000661850,-0.008487225,0.027073860,0.004174709,0.000576973,0.000034809,
-0.000001430,0.000099182,0.000462532,-0.001573563,0.033225536,0.004737377,0.000891685,0.000066280,
-0.000005245,-0.000017166,-0.000956535,-0.010103703,0.025527000,0.003914356,0.000507355,0.000030041,
-0.000000954,0.000105381,0.000610352,-0.000475883,0.034055710,0.004649162,0.000935555,0.000073433,
-0.000006676,-0.000052929,-0.001269817,-0.011775017,0.023907185,0.003622532,0.000438213,0.000025272,
-0.000000954,0.000108242,0.000731945,0.000515938,0.034730434,0.004477024,0.000968933,0.000080585,
-0.000008106,-0.000093937,-0.001597881,-0.013489246,0.022228718,0.003306866,0.000371456,0.000021458,
-0.000000477,0.000108719,0.000829220,0.001399517,0.035242081,0.004215240,0.000989437,0.000087261,
-0.000010014,-0.000140190,-0.001937389,-0.015233517,0.020506859,0.002974033,0.000307560,0.000018120,
-0.000000477,0.000107288,0.000902653,0.002174854,0.035586357,0.003858566,0.000995159,0.000093460,
-0.000012398,-0.000191212,-0.002283096,-0.016994476,0.018756866,0.002630711,0.000247479,0.000014782,
-0.000000477,0.000103951,0.000953674,0.002841473,0.035758972,0.003401756,0.000983715,0.000099182,
-0.000014782,-0.000247479,-0.002630711,-0.018756866,0.016994476,0.002283096,0.000191212,0.000012398,
0.000099182,0.000983715,0.003401756,0.035758972,0.002841473,0.000953674,0.000103951,-0.000000477,
-0.000018120,-0.000307560,-0.002974033,-0.020506859,0.015233517,0.001937389,0.000140190,0.000010014,
0.000093460,0.000995159,0.003858566,0.035586357,0.002174854,0.000902653,0.000107288,-0.000000477,
-0.000021458,-0.000371456,-0.003306866,-0.022228718,0.013489246,0.001597881,0.000093937,0.000008106,
0.000087261,0.000989437,0.004215240,0.035242081,0.001399517,0.000829220,0.000108719,-0.000000477,
-0.000025272,-0.000438213,-0.003622532,-0.023907185,0.011775017,0.001269817,0.000052929,0.000006676,
0.000080585,0.000968933,0.004477024,0.034730434,0.000515938,0.000731945,0.000108242,-0.000000954,
-0.000030041,-0.000507355,-0.003914356,-0.025527000,0.010103703,0.000956535,0.000017166,0.000005245,
0.000073433,0.000935555,0.004649162,0.034055710,-0.000475883,0.000610352,0.000105381,-0.000000954,
-0.000034809,-0.000576973,-0.004174709,-0.027073860,0.008487225,0.000661850,-0.000013828,0.000004292,
0.000066280,0.000891685,0.004737377,0.033225536,-0.001573563,0.000462532,0.000099182,-0.000001430,
-0.000040531,-0.000646591,-0.004395962,-0.028532982,0.006937027,0.000388145,-0.000039577,0.000003338,
0.000059605,0.000838757,0.004748821,0.032248020,-0.002774239,0.000288486,0.000090122,-0.000001907,
-0.000046253,-0.000714302,-0.004570484,-0.029890060,0.005462170,0.000137329,-0.000060558,0.000002861,
0.000052929,0.000779152,0.004691124,0.031132698,-0.004072189,0.000088215,0.000077724,-0.000002384}
接下来说明本发明的第三实施例。请参考图2,图2为本发明的音频处理方法对多个子带样本进行译码的流程示意图。本发明提供一种音频处理方法,用来对多个子带样本xr[m]进行译码以产生一数字音频信号。该方法是适用于数字信号处理器(DSP、Digital Signal Processor)的流水线单指令多数据运算。这些步骤的顺序并非限定本发明的范围,该方法说明如下。
步骤210:对应于一第一索引p,于多个子带样本xr[m]当中读取M个子带样本xr[18q+p],其中q=M-1-0,而第一索引p的值域是零至十七的整数;
步骤220:对该M个子带样本xr[18q+p]进行一逆向修改离散余弦转换(IMDCT、Inverse MDCT),以产生M个输出作为N个循环缓冲变量(CircularBuffer Variable)vs[n]当中的M个循环缓冲变量;
步骤230:根据该N个循环缓冲变量当中的多个循环缓冲变量进行一综合运算;以及
步骤240:对应于第一索引p的变化,重新在多个子带样本xr[m]当中读取M个子带样本xr[18q+p],以通过该逆向修改离散余弦转换进行步骤(步骤220)与该综合运算进行步骤(步骤230)产生该数字音频信号。
在步骤220当中,每一次逆向修改离散余弦转换所产生的M个输出是依照一反向顺序排列(即对应于q=M-1-0而排列)作为该N个循环缓冲变量当中的连续M个循环缓冲变量的值。该N个循环缓冲变量可以储存于一循环缓冲器(Circular Buffer),而每一次逆向修改离散余弦转换所产生的M个输出则依照一反向顺序储存于该循环缓冲器。而该综合运算进行步骤(步骤230)是对应于第一索引p的变化进行加总运算,并且该逆向修改离散余弦转换进行步骤(步骤220)与该综合运算进行步骤(步骤230)是对应于第一索引p的变化进行十八次,以产生该数字音频信号。另外该音频处理方法是符合MPEG的规格,也就是说多个子带样本xr[m]是符合MPEG的规格。为了便于理解,在本实施例中可定义N=512,且M=32。这些逆向修改离散余弦转换是:for(i=3M/2;i>=M/2+1;i--){vs1[--vsi]=0;for(j=0;j<M;j++)
vs1[vsi]+=cos(PI/2M*(i+M/2)*(2*j+1))*xr[18M+18*j+p];}
其中PI代表圆周率。而该综合运算是:
for(j=0;j<=M/2-1;j++) {ps[M*p+j]=0;for(i=0;i<M/2;i+=2)
ps[M*p+j]+=(-d[M*i+j]*vs[vsi+M*i+M/2-1-j]);for(i=1;i<=M/2-1;i+=2)
ps[M*p+j]+=(d[M*i+j]*vs[vsi+M*i+M/2-1+j]);
}ps[18*M+M*p+M/2]=0;for(i=1;i<=M/2-1;i+=2)ps[M*p+M/2]+=(d[M*i+M/2]*vs[vsi+M*i+M/2-1+M/2]);for(j=M/2+1;j<=M-1;j++)
{ps[18*M+M*p+j]=0;
for(i=0;i<M/2;i+=2)
ps[M*p+j]+=(d[M*i+j]*vs[vsi+M*i+j-M/2+1]);for(i=1;i<=M/2-1;i+=2)
ps[M*p+j]+=(d[M*i+j]*vs[vsi+M*i+3M/2-1-j]);
}
其中,声音样本ps[n]是该数字音频信号的声音样本ps[n],而窗口系数d[n]是该窗口运算的窗口系数d[n]。
本发明的第四实施例与该第三实施例大致相似,其相异之处说明如下。在该第四实施例当中,该窗口运算的窗口系数d[n]的数量是N/2+1,因此不但可以大幅地节省缓冲存储器的储存空间,也可以大幅地节省相关运算中读取窗口系数d[n]的时间。为了便于理解,在本实施例中亦可定义N=512,且M=32。这些逆向修改离散余弦转换为:
for(i=3M/2;i>=M/2+1;i--)
{
vs1[--vsi]=0; for(j=0;j<M;j++)
vs1[vsi]+=cos(PI/2M*(i+M/2)*(2*j+1))*xr[18M+18*j+p];
}
其中PI代表圆周率。而该综合运算是:
j=0;
ps[M*p+j]=0;
for(i=0;i<M/4;i+=2)ps[M*p+j]+=(-d[M*i+j]*vs[(vsi+M*i+M/2-1-j)]);
for(i=M/4;i<M/2;i+=2)ps[M*p+j]+=(-d[N-M*i-j]*vs[(vsi+M*i+M/2-1-j)]);
for(i=1;i<M/4+1;i+=2)ps[M*p+j]+=(d[M*i+j]*vs[(vsi++M*i+M/2-1+j)]);
for(i=M/4+1;i<=M/2-1;i+=2)ps[M*p+j]+=(-d[N-M*i-j]*vs[(vsi+M*i+M/2-1+j)]);
for(j=1;j<=M/2-1;j++)
{
ps[M*p+j]=0;
for(i=0;i<M/4;i+=2)ps[18*M+M*p+j]+=(-d[M*i+j]*vs[(vsi+M*i+M/2-1-j)]);
for(i=8;i<M/2;i+=2)ps[M*p+j]+=(d[N-M*i-j]*vs[(vsi+M*i+M/2-1-j)]);
for(i=1;i<M/4+1;i+=2)ps[M*p+j]+=(d[M*i+j]*vs[(vsi+M*i+M/2-1+j)]);
for(i=M/4+1;i <=M/2-1;i+=2)ps[M*p+j]+=(-d[N-M*i-j]*vs[(vsi+M*i+M/2-1+j)]); }ps[M*p+M/2]=0;for(i=1;i<M/4+1;i+=2)ps[M*p+M/2]+=(d[M*i+M/2]*vs[(vsi+M*i+M/2-1+M/2)]);
for(i=M/4+1;i<=M/2-1;i+=2)ps[M*p+M/2]+=(-d[N-M*i-M/2]*vs[(vsi+M*i+M/2-1+M/2)]);
for(j=M/2+1;j<=M-1;j++)
{
ps[M*p+j]=0;
for(i=0;i<M/4;i+=2)ps[18*M+M*p+j]+=(d[M*i+j]*vs[(vsi+M*i+j-M/2+1)]);
for(i=M/4;i<M/2;i+=2)ps[M*p+j]+=(-d[N-M*i-j]*vs[(vsi+M*i+j-M/2+1)]);
for(i=1;i<M/4+1;i+=2)ps[M*p+j]+=(d[M*i+j]*vs[(vsi+M*i+3M/2-1-j)]);
for(i=M/4+1;i<=M/2-1;i+=2)ps[M*p+j]+=(-d[N-M*i-j]*vs[(vsi+M*i+3M/2-1-j)]);
}
其中,声音样本ps[n]是该数字音频信号的声音样本ps[n]。
请参考图3,图3为本发明的音频处理方法的音频编码与音频译码的流程示意图。图3的方法是图1的编码方法与图2的译码方法的组合,在不影响本发明的实施的情况下,相关步骤的顺序并非限定本发明的范围。图3的步骤不再重复赘述。
相较于已知技术,本发明的方法能节省许多缓冲器的存储空间,并且本发明的相关运算过程中的操作数在其所对应的向量或矩阵中的排列顺序是连续排列,因此适用于数字信号处理器的流水线单指令多数据运算。另外当这些操作数所对应的向量或矩阵是储存于一储存装置(如内存)时,本发明的方法相较于已知技术节省许多数据读取时间。
以上所述仅为本发明的较佳实施例,凡依本发明申请专利范围所做的均等变化与修饰,皆应属本发明专利的涵盖范围。
Claims (1)
1.一种符合MPEG规格的音频处理方法,用来对一音频信号进行编码,该方法包含有:
对2P个时域区间的音频信号取样,来以M个声音样本为单位产生2P*M个声音样本X,其中,该2P*M个声音样本X的初始值皆为0,作为该方法的初始状态;
以M个声音样本为单位对该2P*M个声音样本X进行窗口运算,以对应地产生2P*M个窗口(windowed)声音样本,其中,每一窗口声音样本是为该2P*M个声音样本X中的一声音样本X[n]与2P*M个窗口系数C中的一窗口系数C[n]的乘积,或每一窗口声音样本是为该2P*M个声音样本X中的一声音样本X[n]与(2P*M-8)个窗口系数C1中的一窗口系数C1[n]的乘积;以及
根据依据该2P个时域区间的P个窗口声音样本产生第0个和数,根据依据该2P个时域区间的2P个窗口声音样本产生第1个至第(M-1)个和数中的一和数,以及
根据该M个和数,计算M个子带样本,其中,下列所述(a)与(b)当中仅有一者成立:
(a)若每一个窗口声音样本是为2P*M个声音样本X中的一声音样本X[n]与2P*M个窗口系数C中的一个窗口系数C[[n]的乘积,则这些和数为:
并且,这些子带样本是为:
其中,
并且
(b)若每一窗口声音样本是为该2P*M个声音样本X中的一声音样本X[n]与(2P*M-8)个窗口系数C1中的一窗口系数C1[n]的乘积,则这些和数是为:
并且,这些子带样本为:
其中,
并且
其中,这些和数产生步骤与该子带样本计算步骤实质上是为一求和运算与一修改离散余弦转换的组合,以及这些和数中的窗口系数可以通过管线式单指令多数据运算的方式被使用或者可以自一存储装置被循环读取。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2003101179487A CN1270290C (zh) | 2003-11-26 | 2003-11-26 | 子带分析/合成滤波方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2003101179487A CN1270290C (zh) | 2003-11-26 | 2003-11-26 | 子带分析/合成滤波方法 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006100718328A Division CN100573666C (zh) | 2003-11-26 | 2003-11-26 | 子带分析/合成滤波方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1622197A CN1622197A (zh) | 2005-06-01 |
CN1270290C true CN1270290C (zh) | 2006-08-16 |
Family
ID=34761034
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2003101179487A Expired - Fee Related CN1270290C (zh) | 2003-11-26 | 2003-11-26 | 子带分析/合成滤波方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1270290C (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
USRE50132E1 (en) * | 2006-10-25 | 2024-09-17 | Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. | Apparatus and method for generating audio subband values and apparatus and method for generating time-domain audio samples |
-
2003
- 2003-11-26 CN CNB2003101179487A patent/CN1270290C/zh not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN1622197A (zh) | 2005-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1288849C (zh) | 音频译码装置 | |
CN1269027C (zh) | 数据并行右移合并的方法与装置 | |
CN100351747C (zh) | 数据传送方法和数据传送设备 | |
CN1236420C (zh) | 量化线谱对参数特征提取器及其特征提取方法 | |
CN1173931A (zh) | 处理器的定制的基本操作的方法与设备 | |
CN1291375C (zh) | 声信号编码方法和设备、解码方法和设备 | |
CN1202514C (zh) | 编码和解码语音及其参数的方法、编码器、解码器 | |
CN1223991C (zh) | 声频信号处理设备及方法 | |
CN1689069A (zh) | 声音编码设备和声音编码方法 | |
CN1159703C (zh) | 声音识别系统 | |
CN1492394A (zh) | 语音识别装置以及语音识别方法 | |
CN1653520A (zh) | 确定和降噪相关联的不确定性的方法 | |
CN1781141A (zh) | 使用频谱分量耦合和频谱分量再生的改进音频编码系统和方法 | |
CN101047849A (zh) | 离散余弦逆变换方法及其装置 | |
CN1247415A (zh) | 声音编码方式、声音编码装置、以及数据记录媒体 | |
CN1484822A (zh) | 编码装置和解码装置 | |
CN1767395A (zh) | 整数数据的无损自适应编码与解码 | |
CN1274456A (zh) | 语音编码器 | |
CN1222926C (zh) | 语音编码方法及其装置 | |
CN1484823A (zh) | 音频解码器和音频解码方法 | |
CN1864158A (zh) | 用于处理至少两个输入值的装置和方法 | |
CN1270290C (zh) | 子带分析/合成滤波方法 | |
CN1293535C (zh) | 声音编码设备和方法以及声音解码设备和方法 | |
CN1643574A (zh) | 水印时间尺度搜索 | |
CN1483189A (zh) | 语音编码装置以及语音编码方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20060816 Termination date: 20191126 |