CN101308657B - Code stream synthesizing method based on advanced audio coder - Google Patents

Code stream synthesizing method based on advanced audio coder Download PDF

Info

Publication number
CN101308657B
CN101308657B CN2007101484562A CN200710148456A CN101308657B CN 101308657 B CN101308657 B CN 101308657B CN 2007101484562 A CN2007101484562 A CN 2007101484562A CN 200710148456 A CN200710148456 A CN 200710148456A CN 101308657 B CN101308657 B CN 101308657B
Authority
CN
China
Prior art keywords
subband
code book
code
coding
book
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.)
Active
Application number
CN2007101484562A
Other languages
Chinese (zh)
Other versions
CN101308657A (en
Inventor
吴晟
邱小军
黎家力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN2007101484562A priority Critical patent/CN101308657B/en
Publication of CN101308657A publication Critical patent/CN101308657A/en
Application granted granted Critical
Publication of CN101308657B publication Critical patent/CN101308657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a bit stream synthesis method based on an advanced audio encoder. The method includes the following steps: A, quantization coding: processing the bit stream to be coded with quantizing coding to obtain a plurality of coding sub-bands; B, combination of the code books: calculating the reference bit consumptions of the coding sub-bands when the coding sub-bands use differentcode books and determining the code books of the coding sub-bands; selecting the code book with the smallest reference bit consumption for the first coding sub-band according to coding sequence as the using code book; as for each coding sub-band after the first coding sub-band, selecting the code book with the smallest total reference bit consumption value between the current code sub-band and the previous code sub-band as the using code book, if not all the quantification spectrums of the current coding sub-band are zero; C, synthesizing a bit stream: coding the coding sub-bands with the code books determined in step B and finishing the bit stream synthesis process. The bit stream synthesis method reduces bit consumption of the entropy codes and improves coding efficiency of the advancedaudio encoder.

Description

A kind of code stream synthesizing method based on advanced audio coder
Technical field
(Advanced Audio Coding AAC), relates in particular to a kind of code stream synthesizing method based on advanced audio coder to the present invention relates to the advanced audio of MPEG-4 (Motion Picture Experts Group formulate a kind of dynamic image standard).
Background technology
The audio coding technology is such as digital audio broadcasting, the core of multimedia application technology such as the propagation music of internet and voice communication, and these use the raising of greatly benefiting from the audio coder compression performance.Perceptual audio encoders is modern main flow audio coder as diminishing a kind of of transform domain coding.Perceptual audio encoders depends on the auditory perception property research of people's ear, and coding noise is carried out the perception shaping, hangs down the coding effect that perceived quality descends with higher encoding compression than acquisition.In the sensing audio encoding algorithm, the transform domain of sound signal spectrum needs to use entropy coder that quantized spectrum is encoded, to reduce information redundancy through after quantizing.As a kind of perceptual audio encoders, in MPEG-4AAC, quantification is a unit with the subband, and the MDCT in the subband (improved discrete cosine transform) spectrum obtains the integer quantisation spectrum after quantizing, and the integer quantisation spectrum is that unit uses the Huffman code book to carry out entropy coding with the subband.The Huffman code school bag contains code word code book HW among the MPEG-4AAC kWith code length code book HL k, k represents the code book sequence number, gets 1 to 11, represents 11 kinds of Huffman code books of different nature, and they are listed in the table 1.Retrieval obtains the Huffman code word to the code word code book, and retrieval obtains the length of Huffman code word, i.e. code length to the code length code book.
Huffman code book and character thereof among the table 1MPEG-4AAC
The code book sequence number Symbol Dimension Maximum value Total number
1 Have 4 1 81
2 Have 4 1 81
3 Do not have 4 2 81
4 Do not have 4 2 81
5 Have 2 4 81
6 Have 2 4 81
7 Do not have 2 7 64
8 Do not have 2 7 64
9 Do not have 2 12 169
10 Do not have 2 12 169
11 Do not have 2 15 289
In the table 1, this code book of symbology is arranged directly to the integer quantisation spectral encoding; This code book of no symbology is only encoded to the absolute value of integer quantisation spectrum.N dimension code book is represented n corresponding Huffman code word of integer quantisation spectrum; Maximum value is represented integer quantisation spectrum maximum value in the subband that can use this code book coding.The entropy coding code length is retrieved, at first tried to achieve the maximum value t of integer quantisation spectrum in the subband Max, successively four adjacent in subband integer quantisation spectrums are formed four-vector [t 1t 2t 3t 4] go to search as index, add up and try to achieve the sum of the required code length of different code book entropy codings, wherein, there is the symbolic code index to a book will add maximum value as skew, do not have the symbolic code index to a book and then add 1, four-dimensional code book uses [t 1t 2t 3t 4] as the indexed search of each dimension, two-dimentional code book uses [t 1t 2], [t 3t 4] retrieve respectively twice.The flow process of traditional retrieval code book is according to t MaxJudge as follows:
t Max=1, retrieval 1,2,3,4,5,6,7,8,9,10,11 number books
t Max=2, retrieval 3,4,5,6,7,8,9,10,11 number books
2<t Max4, retrieval 5,6,7,8,9,10,11 number books
4<t Max7, retrieval 7,8,9,10,11 number books
7<t Max12, retrieval 9,10,11 number books
12<t Max15, retrieve 11 number books
16 £ t Max, retrieve 11 number books, start overflow protection mechanism overflow protection mechanism wherein, at t Max 3Retrieved as index with the 16 integer spectrum t that substitute greater than 16 earlier in 16 o'clock, then in this Huffman code word back, for the index more than or equal to 16 adds the escape sequence successively.Escaping sequence (escape sequence) is made up of following three parts:
[escape_prefix][escape_separator][escape_word]
Wherein [escape_prefix] is N ' 1 ', and [escape_separator] is one ' 0 ', and [escape_word] is the unsigned int number of a N+4 bit, and t satisfies t=2 N+4+ [escape_word], increase bit number are 2int[log2 (t+1)+1]-5.
Use the bit consumption reference value of m number book by look n subband integer quantisation spectrum of retrieval code, and be the ranks parameter with the sub-reel number of sign indicating number book number and integer quantisation spectrum, with the bit consumption reference value be recorded in reference bits absorption matrix refBits (m, n) in.RefBits is as the foundation of determining the final code book sequence number of using of each subband.The synthetic code book sequence number that needs each subband of extra bit storage to use of the code stream of AAC, from first subband, it represents the code book sequence number with 4 bits, the sub band number of representing to use continuously this sequence number code book with 5 bits, if use the sub band number of this sequence number code book to meet or exceed 31 continuously, increase by 5 bits so again and be used to represent that continuous sub band number deducts 31 numerical value.Like this, generally, only increase the expense that 9 bits are used for indication code book sequence number.In fact, because quantized subband spectrum maximal value is not quite similar, and use different code books with subband, the bit number difference that its quantized spectrum entropy coding consumes is very big, subband uses same code book can not save overhead bit when code stream is synthetic, determining the optimum sub-band serial number of each subband, the continuous subband that uses same code book is merged, is the optimizing process of a complexity.Traditional way has, and does not consider to optimize, and selects the code book of bit consumption minimum for each subband; The regular length code book merges, and forces three or more adjacent in addition subband to use the minimum same code book of bit consumption etc.The bit number that these methods consume is still more, has influenced the efficient of entropy coding.
Summary of the invention
Technical matters to be solved by this invention provides a kind of code stream synthesizing method based on advanced audio coder, can better optimize code book merging process, thus improve the code stream synthetic effect, and then improve the performance of whole audio coder.
In order to solve the problems of the technologies described above, the present invention adopts following technical scheme:
A kind of code stream synthesizing method based on advanced audio coder comprises following steps:
A, quantization encoding: code stream to be encoded is carried out quantization encoding handle, obtain a plurality of coding subbands;
B, code book merge: the reference bits consumption figures when calculating the subband of respectively encoding and using different code book, the code book that definite subband of respectively encoding uses: press coded sequence, for first coding subband, the code book of selecting reference bits consumption figures minimum in each code book is as using code book; For first coding each coding subband after subband, if the quantized spectrum of present encoding subband is not 0 entirely, select to make in each code book present encoding subband and a last coding subband always with reference to the code book of bit consumption value minimum as the use code book;
C, code stream synthesize: to each coding subband, the use code book of selecting to determine among the step B is encoded, and finishes the synthetic processing of code stream.
It is to determine by following principle that each coding subband among the described step B after first coding subband is selected code book:
Obtain the reference bits consumption figures that the present encoding subband uses each code book, if the code book of reference bits consumption figures minimum is identical with the code book that a last coding subband uses, the present encoding subband uses this code book, otherwise, always always select to use code book by what following three kinds of modes were calculated a present encoding subband and a last coding subband respectively with reference to the mode of bit consumption value minimum with reference to the bit consumption value and according to what make that present encoding subband and last encodes subband:
1) get a coding subband the code selection book always equal the reference bits consumption figures sum of two subbands of encoding as candidate's code book of present encoding subband with reference to the bit consumption value;
2) except that on a coding subband in other all code books the code selection book, selection make two the coding subbands reference bits consumption figures sum minimum code book as the present encoding subband and last one the coding subband common candidate's code book, always equal the reference bits consumption figures sum of two coding subbands with reference to the bit consumption value, if what a last coding subband and a last coding subband used is same code book, always the reference bits consumption figures sum that equals two subbands of encoding with reference to the bit consumption value adds the code book handover overhead.
3) code book of selecting present encoding subband reference bits consumption figures minimum always equals the last one reference bits consumption figures sum of encoding subband and present encoding subband with reference to the bit consumption value and adds the code book handover overhead as candidate's code book.
In the code book merging process of described step B, if the quantized spectrum of a coding subband or a plurality of continuous programming code subbands is 0 entirely, add up reference bits consumption figures or reference bits consumption figures sum that a plurality of continuous programming code subbands of this coding subband or this adopt the previous code book that is not 0 coding subband uses entirely to encode, if this reference bits consumption figures or reference bits consumption figures sum are greater than the code book handover overhead, described coding subband or a plurality of continuous programming code subband use 0 number book coding; Otherwise using previous is not the code book coding that 0 coding subband uses entirely.
Described reference bits consumption figures is pre-stored among the two-dimensional array refBits, (m n) is the element value of the capable n row of m among the array refBits to refBits, and it represents the reference bits consumption figures of the integer quantisation spectrum use m number book of n subband, (m, initial value n) are changed to maximum 65535 to refBits.
If the integer quantisation of present encoding subband spectrum is 0 entirely, the code book reference bits consumption figures of this subband correspondence be refBits (m, n)=bw Sfb(n) * CW 0(m), wherein, bw SfbAnd CW 0Be one-dimension array, bw Sfb(n) be array bw SfbIn n element value, the bandwidth of its presentation code subband n, CW 0(m) be array CW 0In m element value, its expression is composed the every spectral line bit number that is consumed with the integer quantisation of code book m coding 0 value.
Also comprise the array pre-service, described array pre-service utilizes following formula to carry out: if refBits (m, n+1)=65535, then refBits (m, n)=refBits (m, n)+C, wherein (m n) is the reference bits consumption figures of present encoding subband, refBits (m to refBits, n+1) be the reference bits consumption figures of next coding subband, C is the code book handover overhead.
Described one-dimension array CW 0=[0.250.750.2510.520.52.50.532].
Described code book is the Huffman code book, comprises the code book of 11 sequence numbers.
Described reference bits consumption figures is to be that the described Huffman code book of indexed search obtains by the integer quantisation spectrum with the coding subband.
The present invention when guaranteeing coding always with reference to the principle of bit consumption value minimum, to each coding subband, all select the code book that always hour uses of itself and last coding subband to determine respectively to encode code book that subband uses with reference to the bit consumption value, the mode of utilizing this single order to recall has been optimized the code book merging process of code stream in synthetic, thereby reduced overhead bit, improve the synthetic effect of code stream, and then improved the code efficiency of advanced audio coder.
Further, integer quantisation spectrum at the coding subband is 0 o'clock entirely, the subband of relatively encoding adopts the code book that last coding subband uses and adopts different always with reference to the bit consumption value under two kinds of situations of 0 number book, and always selects to make with reference to the littler code book of bit consumption value and compose the code book that is adopted when being 0 coding sub-band coding entirely as integer quantisation.
Further, reference bits consumption figures array is carried out pre-service, the back is added the code book handover overhead to isolated array location (being that rank rear is 65535), by considered behind the single order to situation, improved the optimization effect that code book merges.
Description of drawings
Fig. 1 is the processing flow chart of the specific embodiment of the invention;
Fig. 2 is under 100 frame 80kbps stereo codings, and the code book merging method that the various code book merging methods of the prior art and the specific embodiment of the invention adopt is with respect to the bit consumption comparative effectiveness of minimum value bit consumption;
Fig. 3 is under 100 frame 128kbps stereo codings, and the code book merging method that the various code book merging methods of the prior art and the specific embodiment of the invention adopt is with respect to the bit consumption comparative effectiveness of minimum value bit consumption;
Fig. 4 is under 100 frame 192kbps stereo codings, and the code book merging method that the various code book merging methods of the prior art and the specific embodiment of the invention adopt is with respect to the bit consumption comparative effectiveness of minimum value bit consumption;
Fig. 5 is under 100 frame 256kbps stereo codings, and the code book merging method that the various code book merging methods of the prior art and the specific embodiment of the invention adopt is with respect to the bit consumption comparative effectiveness of minimum value bit consumption;
Fig. 6 is under the different bit polytype audio codings, and the code book merging method that the various code book merging methods of the prior art and the specific embodiment of the invention adopt is with respect to the bit consumption comparative effectiveness of minimum value bit consumption.
Embodiment
The contrast accompanying drawing elaborates to the present invention in conjunction with embodiment below.
As Fig. 1, the code stream of MPEG-4AAC is synthetic, need select different code books to encode to a plurality of coding subbands that code stream to be encoded carries out forming after the quantification treatment, and this is called the code book merging process.Whether code book merges optimizes, and directly has influence on the synthetic effect of code stream, thereby has influence on the code efficiency of whole encoder.The processing procedure of the embodiment of this method comprises:
One, quantization encoding: code stream to be encoded is carried out quantization encoding handle, obtain a plurality of coding subbands;
Two, code book merges:
1, preset two-dimensional array refBits (m, n), n coding subband of the integer quantisation spectrum that n represents to obtain behind the code stream quantization encoding to be encoded, the code book sequence number of the subband of respectively encoding during m presentation code use; (on behalf of the integer quantisation of n subband, m n) compose the reference bits consumption figures that uses m number book to refBits; The initial value of each value in the array is changed to maximal value 65535.Adopt the Huffman code book in the present embodiment, comprise the code book of 11 sequence numbers.
2, calculate all the coding subbands in each code book the reference bits consumption figures and with its deposit in two-dimensional array refBits (m, n).
3, when certain subband need not be encoded (quantized spectrum of this subband is 0 entirely), the code book reference bits consumption figures of this subband correspondence be refBits (m, n)=bw Sfb(n) * CW 0(m), wherein, bw Sfb(n) be the bandwidth of present encoding subband n, CW 0(m) the every spectral line bit number that is consumed for the integer quantisation spectrum with code book m coding 0 value, this is called zero subband jump and evades principle.
4, array is carried out pre-service, consider the expense that code book switches needs to increase the C bit.Pretreated method is: if refBits (m, n+1)=65535, then refBits (m, n)=refBits (m, n)+C.Even the subband of back is not used the code book of current sub, and the reference bits consumption figures of the code book of current sub correspondence adds C.Code book handover overhead C represents the code book sequence number with 4 bits, represents to use continuously the sub band number of this sequence number code book with 5 bits.
5, recall code book merging method by single order, select the code book combination of overhead bit minimum.
5.1 press coded sequence,, in the code book of 11 sequence numbers of Huffman code book, select the code book of reference bits consumption figures minimum for first coding subband.
5.2 for each the coding subband after first coding subband, the branch quantized spectrum is 0 entirely and is not 0 two kinds of situations entirely;
5.3 the quantized spectrum of current sub k is not 0 situation entirely:
5.3.1, then select the code book of this sequence number code book as the current sub use if the code book that makes code book and a last subband of current sub reference bits consumption figures minimum get in each sequence number code book is identical.
5.3.2 otherwise, calculate the current sub of following three kinds of alternative means and a last subband always with reference to the bit consumption value, always select wherein a kind of mode with reference to bit consumption value minimum:
5.3.2.1 get code book that a subband selected candidate's code book (two same code books of subband), always equal the reference bits consumption figures sum of two subbands with reference to the bit consumption value as current sub.
5.3.2.2 a current sub and a last subband are got same candidate's code book, the code book of the every other sequence number of traversal except the code book that a last subband has selected is selected the common candidate code book (two subband same code book) of the code book of their two reference bits consumption figures sum minimums as two subbands.In such cases, change has taken place in candidate's code book that a last subband uses, so if a last subband and a last subband use is same code book, always also will add the expense C of code book switching with reference to the bit consumption value.
5.3.2.3 in each sequence number code book, select to make the code book of current sub reference bits consumption figures minimum as candidate's code book (two different code books of subband), always the reference bits consumption figures that equals a last subband with reference to the bit consumption value adds the minimum reference bits consumption figures of current sub, adds code book handover overhead C.
5.4 the quantized spectrum of current sub k is 0 situation entirely:
5.4.1 for this kind situation, general direct employing 0 number book in the prior art, but such selection causes code book to switch, thus increased the code book handover overhead.And present embodiment adopts the code book of previous subband (quantized spectrum is not 0 entirely) to switch to avoid code book.Quantize bit number that the integer spectrum of 0 value consumed reference bits consumption figures, zeroBits=refBits[BookIndex (k-1), k with the code book of previous subband as current sub], BookIndex (k-1) represents the code book of last subband.
5.4.2 if the quantized spectrum of subband k+1 still be 0 subsequently, still taking previous quantized spectrum is not that the code book of 0 subband quantizes entirely, composes the bit number that the consumed reference bits consumption figures as current sub with the integer of this code book quantification 0 value.The reference bits that adds up simultaneously consumption figures promptly calculates continuous a plurality of quantized spectrum and is the reference bits consumption figures sum of 0 coding subband.zeroBits=zeroBits+refBits[BookIndex(k-1),k+1]。ZeroBits be the code book with the k-1 subband come to continuous subsequently quantized spectrum be entirely 0 subband encode always with reference to the bit consumption value.
5.4.3 repeating the 5.4.2 step is not 0 up to the quantized spectrum of subband entirely.
5.4.4 if zeroBits>C, be that 0 subband is encoded with 0 number book entirely to quantized spectrum, C is the overhead-bits of code book switching.
5.4.5 if zeroBits<=C, coming continuous subsequently quantized spectrum with the code book of k-1 subband is that 0 subband is encoded entirely.
5.4.6 if the quantized spectrum of subband k+1 is not 0 entirely, promptly just the quantized spectrum of a coding of current sub k subband is 0 entirely, then if the reference bits consumption figures of current sub k greater than the code book handover overhead, current sub k uses 0 number book coding; Otherwise using previous is not the code book coding that 0 coding subband uses entirely.
5.5 repeated for 5.3 steps, finish entropy coding up to all subbands.
Three, code stream synthesizes: to each coding subband, the use code book of selecting to determine among the step B is encoded, and finishes the synthetic processing of code stream.
Below the several treatment steps in the above-mentioned steps are described further.
A, calculating reference bits consumption figures
In the embodiment of the invention, use respectively the encode calculating of reference bits consumption figures of subband of Huffman code book.Huffman code book among the AAC has 11 altogether, and its specification such as table 1 have 0 number book to be used for representing that quantized spectrum is the code book that used entirely in addition at 0 o'clock, and so-called 0 number book comes down to a virtual code book, is used to refer to for this subband and does not encode.Calculate the bit consumption of quantized spectrum, computation process is: the maximum value t that at first tries to achieve integer quantisation spectrum in the subband Max, successively four adjacent in subband integer quantisation spectrums are formed four-vector [t 1t 2t 3t 4] go to search as index, add up and try to achieve the sum of the required code length of different code book entropy codings, wherein, there is the symbolic code index to a book will add maximum value as skew, do not have the symbolic code index to a book and then add 1.Search method is:
codeLen1=Huf_Len1[t1+1][t2+1][t3+1][t4+1]
codeLen2=Huf_Len2[t1+1][t2+1][t3+1][t4+1]
codeLen5=Huf_Len5[t1+4][t2+4]+Huf_Len5[t3+4][t4+4]
codeLen6=Huf_Len6[t1+4][t2+4]+Huf_Len6[t3+4][t4+4]
t1=|t1|,t2=|t2|,t3=|t3|,t4=|t4|
signLen=!!t1+!!t2+!!t3+!!t4
codeLen3=Huf_Len3[t1][t2][t3][t4]+signLen (1)
codeLen4=Huf_Len4[t1][t2][t3][t4]+signLen
codeLen7=Huf_Len7[t1][t2]+Huf_Len7[t3][t4]+signLen
codeLen8=Huf_Len8[t1][t2]+Huf_Len8[t3][t4]+signLen
codeLen9=Huf_Len9[t1][t2]+Huf_Len9[t3][t4]+signLen
codeLen10=Huf_Len10[t1][t2]+Huf_Len10[t3][t4]+signLen
codeLen11=Huf_Len11[t1][t2]+Huf_Len11[t3][t4]+signLen
If the computing principle of operational symbol is t 10,! T=1, if t=0,! T=0;
The flow process of retrieval code book is according to t MaxJudge as follows:
Figure GSB00000529560700081
Overflow protection mechanism, t Max 3Retrieved as index with the 16 integer spectrum t that substitute greater than 16 earlier in 16 o'clock, then in this Huffman code word back, for the index more than or equal to 16 adds the escape sequence successively.Escaping sequence (escape sequence) is made up of following three parts:
[escape_prefix][escape_separator][escape_word]
Wherein [escape_prefix] is N ' 1 ', and [escape_separator] is one ' 0 ', and [escape_word] is the unsigned int number of a N+4 bit, and t satisfies t=2 N+4+ [escape_word], increase bit number are 2int[log2 (t+1)+1]-5.
N subband integer quantisation that retrieval code is looked spectrum is used the bit consumption reference value of m number book, be recorded in reference bits absorption matrix refBits (m, n) in, what do not calculate is designated as 65535.The reference bits consumption figures of current sub is
sfbbit(n)=sfLen(n)+min(refBits(m,n)),m=1,2L,11(2)
B, zero subband jump and evade
Switch for avoiding at the subband of not encoding the code book sequence number taking place repeatedly, increase overhead, when not needing the current sub quantized spectrum encode, the reference bits consumption figures of corresponding 11 code books that is listed as of refBits is bw Sfb(k) * [0.250.750.2510.520.52.50.532], above-mentioned value is for searching the code table gained, and writes down bookIndex (k)=0 in reference codebook index bookIndex, and the reference codebook index of all the other subbands is 12.As in the table 2, wherein the corresponding example of the 12nd, 13 subbands is 8 * [0.250.750.2510.520.52.50.532], and wherein, 8 is the bandwidth value of the 12nd, 13 subbands.
C. the pre-service of reference bits consumption figures
RefBits is done pre-service, if behind the refBits unit to isolated (rank rear is 65535), this unit adds 9 (short block is encoded to 7, and the length piece refers to that AAC handles the length of windowing).With table 2 is example, 1,2,3,4 row of the 2nd row, and the 10th row 3,4 row, the 3rd row 5,6,7,8 row and the 8th row 5,6,7,8 row belong to the back to isolated unit.RefBits after the processing sees Table 3, the corresponding sequence number of the minimum code book of reference bits consumption figures when number using the code book of different sequence numbers to encode for each subband through the row that adds the black numerical value correspondence of handling in the table.
The overhead bit number of table 2 code book
Figure GSB00000529560700091
The overhead bit number of table 3 code book
Figure GSB00000529560700092
Figure GSB00000529560700101
D. single order is recalled the code book merging
After the pre-service, from first subband, codebook index is the row number (if having identical, get row number big person) of minimum value, i.e. BookIndex (1)=m, refBits[m, 1]=min (refBits[11 to1,1]), as table 3, BookIndex (1)=6.
Principle as described above, subband C2 application rule 5.3.1 gets BookIndex (2)=6, subband C3 application rule 5.3.2.2 gets BookIndex (3)=6, subband C4 application rule 5.3.2.2, get BookIndex (4)=10, and BookIndex (3) be modified as 10, C5 application rule 5.3.1,, BookIndex (5)=10, for subband 12,13, according to step 5.4, with the 0 number book BookIndex (12)=0 that encodes, BookIndex (13)=0.
Determined respectively to encode behind the code book that subband uses according to above step, each coding subband is carried out entropy coding, it is synthetic to finish code stream.
The present invention is based on the single order back trace technique, try to achieve the code book sequence number of the subband of optimization with advantages of simplicity and high efficiency code book merging method, thereby the overhead bit in the time of can reducing entropy coding has improved the synthetic effect of code stream, and then has improved the code efficiency of whole audio coder.
Verify validity of the present invention with Megal AAC scrambler as test platform, Megal AAC scrambler is for using the MPEG-4AAC scrambler that code stream synthesizing method of the present invention is realized.Test is sampled to 8 sections 44100Hz, and the stereo montage of 16 bit quantizations is carried out, and every section montage continues 11.63 seconds, and the montage song sees Table 3, and each test result is got the mean value of 8 sections montages.Test is carried out on the workstation of the Intel E6300 processor that to be loaded with a dominant frequency be 1.86GHz.The average bit rate of encoded test is set at 80kbps, totally 4 groups of 128kbps, 192kbps, 256kbps.Adopt respectively and all choose the minimum value merging, force 3 subbands to merge, force 6 subbands to merge, force the code book of merging of 9 subbands and present embodiment to merge the entropy coding consumption figures that calculates each frame respectively, the reference bits consumption figures that wherein offers the code book merge algorithm is identical.
Table 4 test clips
Figure GSB00000529560700111
Fig. 2,3,4,5 preceding 100 frames that are respectively montage 1 are respectively at 80kbps, 128kbps, 192kbps, during 256kbps code check coding, force 3 subbands to merge, force 6 subbands to merge, force the merging of 9 subbands and this method to divide these four kinds of code book merge algorithms to merge the ratio of each frame of bit consumption with respect to minimum value.Fig. 6 be these 8 montages respectively at 80kbps, 128kbps, 192kbps, during 256kbps code check coding, force 3 subbands to merge, force 6 subbands to merge, force the merging of 9 subbands and these four kinds of code book merge algorithms of present embodiment mean value with respect to the ratio of minimum value bit consumption.Can obtain present embodiment from experimental data and reach 10% to 15% with respect to the efficient that various code book merge algorithms improve scramblers, this in low code check particularly evident.

Claims (7)

1. the code stream synthesizing method based on advanced audio coder is characterized in that, comprises following steps:
A, quantization encoding: code stream to be encoded is carried out quantization encoding handle, obtain a plurality of coding subbands;
B, code book merge: the reference bits consumption figures when calculating the subband of respectively encoding and using different code book, the code book that definite subband of respectively encoding uses: press coded sequence, for first coding subband, the code book of selecting reference bits consumption figures minimum in each code book is as using code book; For each the coding subband after first coding subband, if the quantized spectrum of present encoding subband is not 0 entirely, select to make in each code book a present encoding subband and a last coding subband always with reference to the code book of bit consumption value minimum as using code book, specifically comprise: obtain the reference bits consumption figures that the present encoding subband uses each code book, if the code book of reference bits consumption figures minimum is identical with the code book that a last coding subband uses, the present encoding subband uses this code book, otherwise, always always select to use code book by what following three kinds of modes were calculated a present encoding subband and a last coding subband respectively with reference to the mode of bit consumption value minimum with reference to the bit consumption value and according to what make that present encoding subband and last encodes subband:
1) get a coding subband the code selection book always equal the reference bits consumption figures sum of two subbands of encoding as candidate's code book of present encoding subband with reference to the bit consumption value;
2) except that on a coding subband in other all code books the code selection book, selection make two the coding subbands reference bits consumption figures sum minimum code book as the present encoding subband and last one the coding subband common candidate's code book, always equal the reference bits consumption figures sum of two coding subbands with reference to the bit consumption value, if what a last coding subband and a last coding subband used is same code book, always the reference bits consumption figures sum that equals two subbands of encoding with reference to the bit consumption value adds the code book handover overhead.
3) code book of selecting present encoding subband reference bits consumption figures minimum always equals the last one reference bits consumption figures sum of encoding subband and present encoding subband with reference to the bit consumption value and adds the code book handover overhead as candidate's code book;
If the quantized spectrum of a coding subband or a plurality of continuous programming code subbands is 0 entirely, add up reference bits consumption figures or reference bits consumption figures sum that a plurality of continuous programming code subbands of this coding subband or this adopt the previous code book that is not 0 coding subband uses entirely to encode, if this reference bits consumption figures or reference bits consumption figures sum are greater than the code book handover overhead, described coding subband or a plurality of continuous programming code subband use 0 number book coding; Otherwise using previous is not the code book coding that 0 coding subband uses entirely.
C, code stream synthesize: to each coding subband, the use code book of selecting to determine among the step B is encoded, and finishes the synthetic processing of code stream.
2. code stream synthesizing method as claimed in claim 1, it is characterized in that, described reference bits consumption figures is pre-stored among the two-dimensional array refBits, refBits (m, n) be the element value of the capable n row of m among the array refBits, it represents the reference bits consumption figures of the integer quantisation spectrum use m number book of n subband, and (m, initial value n) are changed to maximum 65535 to refBits.
3. code stream synthesizing method as claimed in claim 2 is characterized in that, if the integer quantisation of present encoding subband spectrum is 0 entirely, the code book reference bits consumption figures of this subband correspondence be refBits (m, n)=bw Sfb(n) * CW 0(m), wherein, bw SfbAnd CW 0Be one-dimension array, bw Sfb(n) be array bw SfbIn n element value, the bandwidth of its presentation code subband n, CW 0(m) be array CW 0In m element value, its expression is composed the every spectral line bit number that is consumed with the integer quantisation of code book m coding 0 value.
4. code stream synthesizing method as claimed in claim 3 is characterized in that, also comprises the array pre-service, described array pre-service utilizes following formula to carry out: if refBits (m, n+1)=65535, then refBits (m, n)=refBits (m, n)+C, wherein (m n) is the reference bits consumption figures of present encoding subband, refBits (m to refBits, n+1) be the reference bits consumption figures of next coding subband, C is the code book handover overhead.
5. code stream synthesizing method as claimed in claim 4 is characterized in that, described one-dimension array CW 0=[0.25 0.75 0.251 0.5 2 0.5 2.5 0.5 3 2].
6. code stream synthesizing method as claimed in claim 1 is characterized in that described code book is the Huffman code book, comprises the code book of 11 sequence numbers.
7. code stream synthesizing method as claimed in claim 6 is characterized in that, described reference bits consumption figures is to be that the described Huffman code book of indexed search obtains by the integer quantisation spectrum with the coding subband.
CN2007101484562A 2007-05-16 2007-08-21 Code stream synthesizing method based on advanced audio coder Active CN101308657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101484562A CN101308657B (en) 2007-05-16 2007-08-21 Code stream synthesizing method based on advanced audio coder

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN200710074479 2007-05-16
CN200710074479.3 2007-05-16
CN2007101484562A CN101308657B (en) 2007-05-16 2007-08-21 Code stream synthesizing method based on advanced audio coder

Publications (2)

Publication Number Publication Date
CN101308657A CN101308657A (en) 2008-11-19
CN101308657B true CN101308657B (en) 2011-10-26

Family

ID=40125070

Family Applications (2)

Application Number Title Priority Date Filing Date
CN2007101484543A Expired - Fee Related CN101308661B (en) 2007-05-16 2007-08-21 Quantizer code rate distortion controlling means based on advanced audio coder
CN2007101484562A Active CN101308657B (en) 2007-05-16 2007-08-21 Code stream synthesizing method based on advanced audio coder

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN2007101484543A Expired - Fee Related CN101308661B (en) 2007-05-16 2007-08-21 Quantizer code rate distortion controlling means based on advanced audio coder

Country Status (1)

Country Link
CN (2) CN101308661B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8781822B2 (en) * 2009-12-22 2014-07-15 Qualcomm Incorporated Audio and speech processing with optimal bit-allocation for constant bit rate applications
ES2617958T3 (en) * 2011-04-05 2017-06-20 Nippon Telegraph And Telephone Corporation Coding of an acoustic signal
CN107480572B (en) * 2017-08-15 2020-06-23 北京安云世纪科技有限公司 Method and system for identifying coded data by using general service

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5420639A (en) * 1993-04-01 1995-05-30 Scientific-Atlanta, Inc. Rate adaptive huffman coding
CN1284791A (en) * 1999-04-20 2001-02-21 松下电器产业株式会社 Encoder
US6198412B1 (en) * 1999-01-20 2001-03-06 Lucent Technologies Inc. Method and apparatus for reduced complexity entropy coding
US6542863B1 (en) * 2000-06-14 2003-04-01 Intervideo, Inc. Fast codebook search method for MPEG audio encoding

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003066998A (en) * 2001-08-28 2003-03-05 Mitsubishi Electric Corp Acoustic signal encoding apparatus
CN100370836C (en) * 2004-08-02 2008-02-20 华为技术有限公司 Motion forecast method based on rate-distortion optimization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5420639A (en) * 1993-04-01 1995-05-30 Scientific-Atlanta, Inc. Rate adaptive huffman coding
US6198412B1 (en) * 1999-01-20 2001-03-06 Lucent Technologies Inc. Method and apparatus for reduced complexity entropy coding
CN1284791A (en) * 1999-04-20 2001-02-21 松下电器产业株式会社 Encoder
US6542863B1 (en) * 2000-06-14 2003-04-01 Intervideo, Inc. Fast codebook search method for MPEG audio encoding

Also Published As

Publication number Publication date
CN101308661A (en) 2008-11-19
CN101308657A (en) 2008-11-19
CN101308661B (en) 2011-07-13

Similar Documents

Publication Publication Date Title
CN101223582B (en) Audio frequency coding method, audio frequency decoding method and audio frequency encoder
CN101223570B (en) Frequency segmentation to obtain bands for efficient coding of digital media
US9390720B2 (en) Entropy encoding and decoding using direct level and run-length/level context-adaptive arithmetic coding/decoding modes
US7433824B2 (en) Entropy coding by adapting coding between level and run-length/level modes
KR101130355B1 (en) Efficient coding of digital media spectral data using wide-sense perceptual similarity
US7761290B2 (en) Flexible frequency and time partitioning in perceptual transform coding of audio
KR101238239B1 (en) An encoder
EP2272063B1 (en) Method and apparatus for selective signal coding based on core encoder performance
WO2007027006A1 (en) Method and apparatus to extract important spectral component from audio signal and low bit-rate audio signal coding and/or decoding method and apparatus using the same
US20100274555A1 (en) Audio Coding Apparatus and Method Thereof
MX2007009887A (en) Near-transparent or transparent multi-channel encoder/decoder scheme.
CN104509130A (en) Stereo audio signal encoder
WO2012052802A1 (en) An audio encoder/decoder apparatus
CN101308657B (en) Code stream synthesizing method based on advanced audio coder
AU2014286765B2 (en) Signal encoding and decoding methods and devices
CN101771416B (en) Bit-plane coding and decoding method, communication system and related equipment
CN103035249B (en) Audio arithmetic coding method based on time-frequency plane context
CN102479514A (en) Coding method, decoding method, apparatus and system thereof

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