JPWO2012002348A1 - Bit allocation apparatus, method, program, and recording medium thereof - Google Patents

Bit allocation apparatus, method, program, and recording medium thereof Download PDF

Info

Publication number
JPWO2012002348A1
JPWO2012002348A1 JP2012522627A JP2012522627A JPWO2012002348A1 JP WO2012002348 A1 JPWO2012002348 A1 JP WO2012002348A1 JP 2012522627 A JP2012522627 A JP 2012522627A JP 2012522627 A JP2012522627 A JP 2012522627A JP WO2012002348 A1 JPWO2012002348 A1 JP WO2012002348A1
Authority
JP
Japan
Prior art keywords
sample
index
bit
bits
samples
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.)
Granted
Application number
JP2012522627A
Other languages
Japanese (ja)
Other versions
JP5191617B2 (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2012522627A priority Critical patent/JP5191617B2/en
Application granted granted Critical
Publication of JP5191617B2 publication Critical patent/JP5191617B2/en
Publication of JPWO2012002348A1 publication Critical patent/JPWO2012002348A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/002Dynamic bit allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタに1を加算する処理をi=0,1,…,N−1のそれぞれに対して行う。Σt=Thres−1Mbitcount(t)>Maxbit≧Σt=ThresMbitcount(t)という関係を満たす値Thres以上の指標を有する各サンプルiに対して、k(i)−Thres+1とLのうち小さい方の数のビットを割り当てる。値Thres−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうちMaxbit−Σt=ThresMbitcount(t)個の各サンプルに対して、1個のビットを割り当てる。The process of adding 1 to each bit counter corresponding to the indices k (i),..., K (i) − (L−1) is performed for each of i = 0, 1,. For each sample i having an index greater than or equal to a value Thres satisfying the relationship of Σt = Thres−1 Mbitcount (t)> Maxbit ≧ Σt = ThresMbitcount (t), the smaller number of k (i) −Thres + 1 and L Assign bits. One bit is assigned to each Maxbit−Σt = ThresMbitcount (t) samples among samples having an index equal to or greater than the value Thres−1 and not yet assigned L bits.

Description

この発明は、音声、音楽等の音信号を符号化する技術に関する。   The present invention relates to a technique for encoding sound signals such as voice and music.

音声、音楽等の音信号を符号化する際、符号化すべき情報毎に必要なビット数を計算し、その計算されたビット数でその情報を符号化する技術がある。例えば、非特許文献1に記載されたITU−T標準G.711.1の低域拡張符号化で用いられているビット割当技術が知られている。非特許文献1では、1つのサンプルに割り当て可能な最大ビット数をLとして、フレーム内のN個のサンプルにMaxbit個のビットを割り当てる。この割り当てたビットで、低域入力信号とG.711復号信号との差分信号を符号化する。   When encoding a sound signal such as speech or music, there is a technique for calculating the number of bits necessary for each piece of information to be encoded and encoding the information with the calculated number of bits. For example, the ITU-T standard G.I. A bit allocation technique used in the low band extension coding of 711.1 is known. In Non-Patent Document 1, L is the maximum number of bits that can be assigned to one sample, and Maxbit bits are assigned to N samples in the frame. With these assigned bits, the low-frequency input signal and G. The difference signal with the 711 decoded signal is encoded.

以下、非特許文献1の割り当て方法の概要を説明する。まず、各サンプルn(n=0,1,…,N−1)に対して、0以上の整数であるk(n)を割り当てる。ここでは、サンプルnのサンプル値をx(n)とし、int(・)を・の小数点以下を切り捨てる関数として、k(n)=int(log|x(n)|)とする。   Hereinafter, an overview of the allocation method of Non-Patent Document 1 will be described. First, k (n) that is an integer greater than or equal to 0 is assigned to each sample n (n = 0, 1,..., N−1). Here, the sample value of the sample n is x (n), and int (·) is a function for truncating the decimal part of •, k (n) = int (log | x (n) |).

次に、サンプル番号nとk(n)との組の情報に基づいて、(M+L)×L個の要素から構成される二次元配列のテーブルを作成する。Mはk(n)の最大値である。具体的には、k(n)+2行のサンプル番号が代入されていない最も左の列、k(n)+1行のサンプル番号が代入されていない最も左の列、及び、k(n)行のサンプル番号が代入されていない最も左の列のそれぞれにサンプル番号nを代入する処理を、n=0,1,…,N−1のそれぞれについて行う。   Next, a table of a two-dimensional array composed of (M + L) × L elements is created based on information on a set of sample numbers n and k (n). M is the maximum value of k (n). Specifically, the leftmost column to which the sample number of k (n) +2 rows is not assigned, the leftmost column to which the sample number of k (n) +1 rows is not assigned, and k (n) rows The process of assigning the sample number n to each of the leftmost columns to which no sample number is assigned is performed for each of n = 0, 1,..., N−1.

例えば、図12に示すように、サンプル番号とそのk(n)の値が与えられたとする。この場合、図13のようなテーブルが作成される。図12及び図13の例では、L=3、N=10、Maxbit=10であるとする。   For example, as shown in FIG. 12, it is assumed that a sample number and its k (n) value are given. In this case, a table as shown in FIG. 13 is created. In the examples of FIGS. 12 and 13, it is assumed that L = 3, N = 10, and Maxbit = 10.

次に、(M+L−1)行から0行まで、0列からN−1列の順に要素を確認する。要素にサンプル番号が代入されている場合には、そのサンプル番号のサンプルの割当ビットに1を追加する。この作業を、割当ビットの総数が10(=Maxbit)になるまで繰り返す。   Next, the elements are confirmed in order from the 0th column to the N−1th column from the (M + L−1) th row to the 0th row. When the sample number is assigned to the element, 1 is added to the assigned bit of the sample of the sample number. This operation is repeated until the total number of assigned bits reaches 10 (= Maxbit).

図13の例では、太線で囲まれたサンプル番号のサンプルのそれぞれに1ビットが割り当てられる。この結果、図12の最下欄のようにビットが割り当てられることになる。   In the example of FIG. 13, 1 bit is assigned to each sample of the sample number surrounded by a thick line. As a result, bits are assigned as shown in the bottom column of FIG.

Rec. ITU-T G.711.1 (03/2008) “7.3.4.1 Generation of bits allocation table”Rec. ITU-T G.711.1 (03/2008) “7.3.4.1 Generation of bits allocation table”

非特許文献1に記載された手法によりビットの割り当てを行うためには、(M+L)×Nの二次元の配列を用意する必要がある。L、M及びNが大きくなると、配列が大きくなり、メモリの消費量が大きくなるという問題があった。   In order to assign bits by the method described in Non-Patent Document 1, it is necessary to prepare a (M + L) × N two-dimensional array. When L, M, and N are increased, there is a problem that the arrangement is increased and the amount of memory consumption is increased.

この発明の課題は、メモリの消費量が従来よりも小さいビット割当装置、方法、プログラム及びその記録媒体を提供することである。   An object of the present invention is to provide a bit allocation device, a method, a program, and a recording medium thereof, which consume less memory than before.

この発明の一態様によるビット割当装置によれば、1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てるために、N個のサンプルのサンプル番号を0,1,…,i,…,N−1とし、サンプル番号iのサンプルに与えられた重要度を表す指標をk(i)とし、指標k(i)の取り得る値の数+L−1個のビットカウンタbitcountの初期値を0として、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行う。指標k(i)の最大値をMとして、Σt=T−1 bitcount(t)>Maxbit≧Σt=T bitcount(t)という関係を満たす値T以上の指標を有する各サンプルiに対して、k(i)−T+1とLのうち小さい方の数のビットを割り当てる。値T−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうちMaxbit−Σt=T bitcount(t)個の各サンプルに対して、1個のビットを割り当てる。
この発明の他の一態様によるビット割当装置によれば、1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てるために、N個のサンプルに与えられた重要度を表す指標に基づいて、N個のサンプルを重要な順に並び替える。並び替えられたN個のサンプルのサンプル番号を新たに0,1,…,i,…,N−1とし、サンプル番号iのサンプルに与えられた重要度を表す指標をk(i)とし、指標k(i)の取り得る値の数+L−1個のビットカウンタbitcountの初期値を0として、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行う。指標k(i)の最大値をMとして、Σt=T−1 bitcount(t)>Maxbit≧Σt=T bitcount(t)という関係を満たす値T以上の指標を有する各サンプルiに対して、k(i)−T+1とLのうち小さい方の数のビットを割り当てる。値T−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうち上記並び替え前のサンプル番号が小さい方からMaxbit−Σt=T bitcount(t)個の各サンプルに対して、1個のビットを割り当てる。
According to the bit allocating device of one aspect of the present invention, the maximum number of bits that can be allocated to one sample is L, and in order to allocate Maxbit bits to N samples, the sample number of N samples is set to 0. , 1,..., I,..., N−1, an index representing the importance given to the sample of sample number i is k (i), and the number of possible values of index k (i) + L−1 , Bitcount (k (i)),..., Bitcount (k (i) corresponding to the indices k (i),..., K (i)-(L-1). )-(L-1)) is added to each of i = 0, 1,..., N-1. For each sample i having an index greater than or equal to a value T satisfying the relationship Σ t = T−1 M bitcount (t)> Maxbit ≧ Σt = T M bitcount (t), where M is the maximum value of the index k (i). On the other hand, the smaller number of bits of k (i) -T + 1 and L are allocated. One bit is assigned to each Maxbit-Σt = T M bitcount (t) samples among samples having an index equal to or greater than the value T−1 and not yet assigned L bits.
According to the bit allocating device according to another aspect of the present invention, the maximum number of bits that can be allocated to one sample is L, and Maxbit bits are allocated to N samples. The N samples are rearranged in the order of importance based on the index indicating the degree of importance. The sample numbers of the rearranged N samples are newly set to 0, 1,..., I,..., N−1, and the index indicating the importance given to the sample with the sample number i is k (i). The number of possible values of the index k (i) + the initial value of the L−1 bit counter bitcount is 0, and each bit counter corresponding to the index k (i),..., K (i) − (L−1) .., bitcount (k (i) − (L−1)) is incremented by 1 for each of i = 0, 1,..., N−1. For each sample i having an index greater than or equal to a value T satisfying the relationship Σ t = T−1 M bitcount (t)> Maxbit ≧ Σt = T M bitcount (t), where M is the maximum value of the index k (i). On the other hand, the smaller number of bits of k (i) -T + 1 and L are allocated. Among samples having an index equal to or greater than the value T-1 and not yet assigned L bits, Maxbit-Σt = T M bitcount (t) samples from the one with the smaller sample number before rearrangement. On the other hand, one bit is allocated.

二次元の配列ではなく一次元の配列を用いてビット割り当てを行うことにより、従来よりもメモリの消費量を小さくすることができる。   By allocating bits using a one-dimensional array instead of a two-dimensional array, it is possible to reduce the memory consumption compared to the conventional one.

ビット割当装置の例の機能ブロック図。The functional block diagram of the example of a bit allocation apparatus. ビット割当方法の例を示す流れ図。The flowchart which shows the example of the bit allocation method. ステップS2の例を示す流れ図。The flowchart which shows the example of step S2. ステップS3の例を示す流れ図。The flowchart which shows the example of step S3. ステップS4の例を示す流れ図。The flowchart which shows the example of step S4. ステップS5の例を示す流れ図。The flowchart which shows the example of step S5. この発明によるビット割当の例を説明するための図。The figure for demonstrating the example of the bit allocation by this invention. この発明によるビット割当の例を説明するための図。The figure for demonstrating the example of the bit allocation by this invention. この発明によるビット割当の例を説明するための図。The figure for demonstrating the example of the bit allocation by this invention. この発明によるビット割当の例を説明するための図。The figure for demonstrating the example of the bit allocation by this invention. この発明によるビット割当の例を説明するための図。The figure for demonstrating the example of the bit allocation by this invention. 従来技術によるビット割当の例を説明するための図。The figure for demonstrating the example of the bit allocation by a prior art. 従来技術によるビット割当の例を説明するための図。The figure for demonstrating the example of the bit allocation by a prior art.

以下、この発明の一実施形態のビット割当装置及び方法について、詳細に説明する。   Hereinafter, a bit allocation apparatus and method according to an embodiment of the present invention will be described in detail.

この発明は、1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てる。L,N及びMaxbitは、予め定められた正の整数である。   In the present invention, the maximum number of bits that can be assigned to one sample is L, and Maxbit bits are assigned to N samples. L, N and Maxbit are predetermined positive integers.

ビット割当装置は、図1に示すように、ソート部10、ビットカウント部20、閾値決定部30、第一割当部40、第二割当部50を例えば含む。ビット割当方法は、図2に示すように、ステップS1からステップS5から例えば構成される。   As shown in FIG. 1, the bit allocation device includes, for example, a sorting unit 10, a bit count unit 20, a threshold value determination unit 30, a first allocation unit 40, and a second allocation unit 50. As shown in FIG. 2, the bit allocation method includes, for example, steps S1 to S5.

N個のサンプルには、それぞれサンプル番号0,1,…,n,…,N−1が付されている。n=0,1,…,N−1として、サンプル番号nのサンプルを、サンプルnと表す。各サンプル0,1,…,n,…,N−1には、その各サンプルの重要度を表す指標が対応付けられている。n=0,1,…,N−1として、サンプルnの重要度を表す指標をk(n)と表す。k(n)は、例えばサンプルnのサンプル値x(n)の大きさのlog値を後述する関数fに入力した場合の出力値f(log|x(n)|)である。logの底は2である。f(・)は、・の小数点以下を切り捨て、切り上げ若しくは四捨五入する関数、又は、・以下の最大の整数を出力する関数である。k(n)は、サンプルnのサンプル値x(n)のlog値が正になるように、logx(n)に所定の定数cを加算した値を関数fに入力した場合の出力値f(log|x(n)|+c)であってもよい。   N samples are assigned sample numbers 0, 1,..., N,. The sample of sample number n is represented as sample n, where n = 0, 1,. Each sample 0, 1,..., N,..., N−1 is associated with an index representing the importance of each sample. As n = 0, 1,..., N−1, an index representing the importance of the sample n is represented as k (n). k (n) is, for example, an output value f (log | x (n) |) when a log value having a magnitude of the sample value x (n) of the sample n is input to a function f described later. The base of log is 2. f (·) is a function that rounds down, rounds up, or rounds off the decimal point of •, or a function that outputs the maximum integer less than or equal to •. k (n) is an output value f () when a value obtained by adding a predetermined constant c to logx (n) is input to the function f so that the log value of the sample value x (n) of the sample n becomes positive. log | x (n) | + c).

<ステップS1>
サンプルと指標の組(0,k(0)),(1,k(1)),…,(N−1,k(N−1))が用意され、これらがソート部10に入力される。ソート部10は、指標k(0),k(1),…,k(N−1)に基づいて、N個のサンプル0,1,…,N−1を重要な順に並び替える(ステップS1)。より重要なサンプルに値が大きい指標が与えられている場合には、サンプル0,1,…,N−1は、指標k(0),k(1),…,k(N−1)が降順になるように並び替えられる。
<Step S1>
Sample and index pairs (0, k (0)), (1, k (1)),..., (N−1, k (N−1)) are prepared and input to the sorting unit 10. . The sorting unit 10 rearranges the N samples 0, 1,..., N−1 in an important order based on the indices k (0), k (1),..., K (N−1) (Step S1). ). If a more important sample is given an index having a larger value, the samples 0, 1,..., N−1 have the indices k (0), k (1),. Rearranged in descending order.

並び替えられた後のサンプルには、0,1,…,i,…,N−1の新たなサンプル番号が付される。新たなサンプル番号iのサンプルに付されていた元のサンプル番号は、変数pos(i)に代入される。また、k(pos(i))は、変数exp(i)に代入される。すなわち、exp(i)=k(pos(i))である。   The samples after the rearrangement are assigned new sample numbers 0, 1,..., I,. The original sample number assigned to the sample with the new sample number i is substituted into the variable pos (i). Further, k (pos (i)) is assigned to the variable exp (i). That is, exp (i) = k (pos (i)).

図7に例示するように、サンプルnと指標k(n)の組が、(0,5),(1,5),(2,3),(3,3),(4,2),(5,7),(6,6),(7,2),(8,7),(9,5)である場合には、これらのサンプルnと指標k(n)の組は図8に示すようにソートされる。   As illustrated in FIG. 7, the set of the sample n and the index k (n) is (0,5), (1,5), (2,3), (3,3), (4,2), In the case of (5, 7), (6, 6), (7, 2), (8, 7), (9, 5), the set of these sample n and index k (n) is shown in FIG. Sorted as shown in

少なくとも、指標k(i)の取り得る値の数+L−1個のビットカウンタbitcountが用意される。各ビットカウンタbitcountは、初期値が0であり整数値を取る変数である。i=0,1,…,N−1として、指標k(i)に対応するビットカウンタを、bitcount(k(i))と表記する。   At least the number of possible values of the index k (i) + L−1 bit counters bitcount are prepared. Each bit counter bitcount is a variable that has an initial value of 0 and takes an integer value. As i = 0, 1,..., N−1, the bit counter corresponding to the index k (i) is expressed as bitcount (k (i)).

<ステップS2>
ビットカウント部20は、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行う(ステップS2)。
<Step S2>
The bit count unit 20 includes bit counters (bit (k (i)),..., Bitcount (k (i) − (L−) corresponding to the indices k (i),..., K (i) − (L−1)). 1)) is added to each of i = 0, 1,..., N−1 (step S2).

ビットカウント部20は、例えば図3に示すステップS21からステップS27を行うことにより、ステップS2を行う。   The bit count unit 20 performs step S2 by performing, for example, steps S21 to S27 shown in FIG.

ビットカウント部20は、iに0を代入する(ステップS21)。   The bit count unit 20 substitutes 0 for i (step S21).

ビットカウント部20は、jに0を代入する(ステップS22)。   The bit count unit 20 substitutes 0 for j (step S22).

ビットカウント部20は、ビットカウンタbitcount(exp(i)−j)に1を加算する(ステップS23)。   The bit count unit 20 adds 1 to the bit counter bitcount (exp (i) -j) (step S23).

ビットカウント部20は、j=L−1であるか判定する(ステップS24)。   The bit count unit 20 determines whether j = L−1 (step S24).

j=L−1でなければ、ビットカウント部20は、jにj+1を代入し(ステップS25)、その後ステップS23に進む。   If j = L−1 is not true, the bit count unit 20 substitutes j + 1 for j (step S25), and then proceeds to step S23.

j=L−1であれば、ビットカウント部20は、i=N−1であるか判定する(ステップS26)。   If j = L-1, the bit count unit 20 determines whether i = N-1 (step S26).

j=N−1でなければ、ビットカウント部20は、iにi+1を代入し(ステップS27)、その後ステップS22に進む。   If j = N−1 is not true, the bit count unit 20 substitutes i + 1 for i (step S27), and then proceeds to step S22.

j=N−1であれば、ステップS2を終了して、後述するステップS3に進む。   If j = N-1, step S2 is ended and the process proceeds to step S3 described later.

図7及び図8のようにサンプルと指標の組が与えられて、Maxbit=10,L=3である場合には、図9の中央に示すように各ビットカウンタbitcountの値が計算される。図9の左は、1を加算するビットカウンタbitcountの位置を表す。図9の左は、ビットカウンタbitcountの計算を説明するためのイメージ図であり、実際にはこのような二次元配列のテーブルは不要である。   When pairs of samples and indices are given as shown in FIGS. 7 and 8, and Maxbit = 10 and L = 3, the value of each bit counter bitcount is calculated as shown in the center of FIG. The left side of FIG. 9 represents the position of the bit counter bitcount to which 1 is added. The left side of FIG. 9 is an image diagram for explaining the calculation of the bit counter bitcount. Actually, such a two-dimensional array table is unnecessary.

<ステップS3>
閾値決定部30は、Σt=Thres−1 bitcount(t)>Maxbit≧Σt=Thres bitcount(t)という関係を満たす閾値Thresを決定する(ステップS3)。Mは、指標k(i)の最大値である。決定された閾値Thresについての情報は、第一割当部40に送られる。
上記関係は、より正確には下記式(1)のように表現することができる。なお、ThresをTと表記することもある。

Figure 2012002348
<Step S3>
Threshold determination section 30 determines the threshold Thres satisfying the relation Σ t = Thres-1 M bitcount (t)> Maxbit ≧ Σ t = Thres M bitcount (t) ( step S3). M is the maximum value of the index k (i). Information about the determined threshold value Thres is sent to the first allocation unit 40.
More precisely, the above relationship can be expressed as the following formula (1). Note that Thres may be written as T.
Figure 2012002348

閾値決定部30は、例えば図4に示すステップS31からステップS35を行うことにより、ステップS3を行う。   The threshold value determination unit 30 performs step S3 by performing, for example, step S31 to step S35 illustrated in FIG.

閾値決定部30は、iにMを代入し、bitsrvにMaxbitを代入し、bitsumにbitcount(M)を代入する(ステップS31)。bitsrvは割り当て可能なビットの数を示す。   The threshold value determination unit 30 substitutes M for i, substitutes Maxbit for bitsrv, and substitutes bitcount (M) for bitsum (step S31). bitsrv indicates the number of assignable bits.

閾値決定部30は、iにi−1を代入する(ステップS32)。   The threshold value determination unit 30 substitutes i−1 for i (step S32).

閾値決定部30は、bitsumとbitsrvとを比較する(ステップS33)。   The threshold value determination unit 30 compares bitsum and bitsrv (step S33).

bitsum>bitsrvでなければ、閾値決定部30は、bitsumにbitsum+bitcount(i)を代入し(ステップS34)、ステップS32に進む。   If bitsum> bitsrv is not satisfied, the threshold determination unit 30 substitutes bitsum + bitcount (i) for bitsum (step S34), and proceeds to step S32.

bitsum>bitsrvであれば、閾値決定部30は、bitsumにbitsum−bitcount(i+1)を代入し、Thresにi+2を代入する(ステップS35)。その後、後述するステップS4に進む。   If bitsum> bitsrv, the threshold determination unit 30 substitutes bitsum-bitcount (i + 1) for bitsum and i + 2 for Thres (step S35). Then, it progresses to step S4 mentioned later.

ステップS31からステップS35により得られる閾値Thresは、Σt=Thres−1 bitcount(t)>Maxbit≧Σt=Thres bitcount(t)という関係を満たす。Threshold Thres obtained by Step S35 from Step S31 satisfy the relationship of Σ t = Thres-1 M bitcount (t)> Maxbit ≧ Σ t = Thres M bitcount (t).

図9の例では、i=5のときにステップS34で計算されたbitsumが11となり、その後のi=4のときのステップS33ではbitsumがMaxbitの値10を超える。したがって、閾値Thresは、4+2=6となる。   In the example of FIG. 9, the bitsum calculated in step S <b> 34 is 11 when i = 5, and the bitsum exceeds the Maxbit value 10 in step S <b> 33 when i = 4 thereafter. Therefore, the threshold value Thres is 4 + 2 = 6.

なお、図4に破線で示すように、ステップS32の代わりに、ステップS31の後にiにi−1を代入するステップS321と、ステップS34の後にiにi−1を代入するステップS322とを閾値決定部30が実行してもよい。   As shown by a broken line in FIG. 4, instead of step S32, step S321 for substituting i-1 for i after step S31 and step S322 for substituting i-1 for i after step S34 are used as threshold values. The determination unit 30 may execute.

<ステップS4>
第一割当部40は、閾値Thres以上の指標を有する各サンプルiに対して、k(i)−Thres+1とLのうち小さい方の数のビットを割り当てる(ステップS4)。
<Step S4>
The first assigning unit 40 assigns the smaller number of bits of k (i) −Thres + 1 and L to each sample i having an index equal to or greater than the threshold Thres (step S4).

第一割当部40は、例えば図5に示すステップS41からステップS47を行うことにより、ステップS4を行う。   The first allocation unit 40 performs Step S4 by performing, for example, Step S41 to Step S47 illustrated in FIG.

第一割当部40は、iに0を代入し、bitalloc(0),bitalloc(1),…,bitalloc(N−1)に0を代入する(ステップS41)。bitalloc(i)は、サンプル番号iのサンプルに割り当てるビットの数を示す。   The first assigning unit 40 substitutes 0 for i, and substitutes 0 for bitalloc (0), bitalloc (1),..., Bitalloc (N−1) (step S41). bitalloc (i) indicates the number of bits assigned to the sample of sample number i.

第一割当部40は、exp(i)と閾値Thresとを比較する(ステップS42)。   The first allocation unit 40 compares exp (i) with a threshold value Thres (step S42).

exp(i)≦Thres−1であれば、ステップS4を終えて、後述するステップS6に進む。   If exp (i) ≦ Thres−1, step S4 is ended, and the process proceeds to step S6 described later.

exp(i)≦Thres−1でなければ、第一割当部40は、bitalloc(pos(i))にexp(i)−Thres+1とLのうち小さい方の数を代入する(ステップS43)。言い換えれば、第一割当部40は、サンプル番号pos(i)のサンプルに、min(exp(i)−Thres+1,L)個のビットを割り当てる。min(x,x)は、xとxのうち小さい方の数を出力する関数である。If exp (i) ≦ Thres−1 is not satisfied, the first assigning unit 40 substitutes the smaller number of exp (i) −Thres + 1 and L into bitalloc (pos (i)) (step S43). In other words, the first allocation unit 40 allocates min (exp (i) −Thres + 1, L) bits to the sample of the sample number pos (i). min (x 1 , x 2 ) is a function that outputs the smaller number of x 1 and x 2 .

第一割当部40は、bitsrvにbitsrv−bitalloc(pos(i))を代入する(ステップS44)。すなわち、第一割当部40は、割り当て可能なビットの数bitsrvから、サンプル番号pos(i)のサンプルに割り当てたビットの数bitalloc(pos(i))を差し引く。   The first allocation unit 40 substitutes bitsrv-bitalloc (pos (i)) for bitsrv (step S44). That is, the first allocating unit 40 subtracts the number of bits allocated to the sample of the sample number pos (i) bitloc (pos (i)) from the number of bits that can be allocated bitsrv.

第一割当部40は、bitalloc(pos(i))とLとを比較する(ステップS45)。   The first allocation unit 40 compares bitalloc (pos (i)) with L (step S45).

bitalloc(pos(i))<Lであれば、第一割当部40は、k(pos(i))にThres−1を代入する(ステップS46)。その後、ステップS47に進む。   If binaryloc (pos (i)) <L, the first allocation unit 40 substitutes Thres-1 for k (pos (i)) (step S46). Thereafter, the process proceeds to step S47.

bitalloc(pos(i))<Lでなければ、または、ステップS46の後に、第一割当部40はiにi+1を代入する(ステップS47)。その後、ステップS42に進む。   If binaryloc (pos (i)) <L, or after step S46, the first assigning unit 40 substitutes i + 1 for i (step S47). Thereafter, the process proceeds to step S42.

この例では、閾値Thres以上の値を有する各サンプルiに対してexp(i)−Thres+1とLのうち小さい方の数のビットを割り当てているが、exp(i)=k(pos(i))であることを考慮すれば、閾値Thres以上の値を有する各サンプルiに対してexp(i)−Thres+1とLのうち小さい方の数のビットを割り当てることと、閾値Thres以上の値を有する各サンプルiに対してk(i)−Thres+1とLのうち小さい方の数のビットを割り当てることは同義である。   In this example, the smaller number of bits of exp (i) −Thres + 1 and L is assigned to each sample i having a value equal to or greater than the threshold Thres, but exp (i) = k (pos (i) ), Assigning a smaller number of bits of exp (i) −Thres + 1 and L to each sample i having a value greater than or equal to the threshold Thres, and having a value greater than or equal to the threshold Thres Assigning the smaller number of bits of k (i) -Thres + 1 and L to each sample i is synonymous.

図7から図9の例に対応する第一割当部40によるビット割当の例を図10に示す。図10のように、閾値Thres=6以上の値を有する各サンプルiに対して、exp(i)−Thres+1とLのうち小さい方の数のビットを割り当てられる。閾値Thresの定義により、exp(i)≧ThresであればbitsumがMaxbitを超えることはないため、閾値Thres以上の指標を有する各サンプルiに対してビットを割り当てても問題はない。   An example of bit allocation by the first allocation unit 40 corresponding to the examples of FIGS. 7 to 9 is shown in FIG. As shown in FIG. 10, the smaller number of bits of exp (i) −Thres + 1 and L is assigned to each sample i having a value of threshold Thres = 6 or more. According to the definition of the threshold Thres, if exp (i) ≧ Thres, bitsum does not exceed Maxbit. Therefore, there is no problem even if bits are assigned to each sample i having an index equal to or greater than the threshold Thres.

<ステップS5>
第二割当部50は、閾値Thres−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうちMaxbit−Σt=Thres bitcount(t)個の各サンプルに対して、1個のビットを割り当てる(ステップS51)。
すなわち、第二割当部50は、閾値Thres−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうち下記式(2)で定義される個数のサンプルに対して、1個のビットを割り当てる。

Figure 2012002348
<Step S5>
The second assigning unit 50 has 1 for each Maxbit -Σt = Thres M bitcount (t) samples among samples having an index equal to or greater than the threshold Thres-1 and not yet assigned L bits. Bits are allocated (step S51).
That is, the second allocation unit 50 has one index for the number of samples defined by the following equation (2) among samples having an index equal to or greater than the threshold Thres-1 and not yet allocated L bits. Allocate bits.
Figure 2012002348

第二割当部50は、例えば図6に示すステップS51からステップS54を行うことにより、ステップS5を行う。   The second allocation unit 50 performs Step S5 by performing, for example, Step S51 to Step S54 illustrated in FIG.

第二割当部50は、iに0を代入する(ステップS51)
第二割当部50は、bitsrvと0とを比較する(ステップS52)。
The second allocation unit 50 substitutes 0 for i (step S51).
The second allocation unit 50 compares bitsrv with 0 (step S52).

bitsrv>0でなければ、第二割当部50は処理を終える。このときのbitalloc(i)の値が、最終的にサンプル番号iのサンプルに割り当てるビットの数となる。   If bitsrv> 0 is not satisfied, the second assignment unit 50 ends the process. The value of bit loc (i) at this time is the number of bits finally assigned to the sample of sample number i.

bitsrv>0であれば、第二割当部50は、k(i)=Thres−1かつbitalloc(i)<Lであるか判定する(ステップS53)。   If bitsrv> 0, the second allocation unit 50 determines whether k (i) = Thres−1 and bitalloc (i) <L (step S53).

k(i)=Thres−1かつbitalloc(i)<Lであれば、第二割当部50は、bitalloc(i)にbitalloc(i)+1を代入し、bitsrvにbitsrv−1を代入する(ステップS54)。その後、ステップS55に進む。   If k (i) = Thres−1 and bitalloc (i) <L, the second assigning unit 50 substitutes bitloc (i) +1 for bitloc (i) and bitsbit−1 for bitsrv (step) S54). Thereafter, the process proceeds to step S55.

k(i)=Thres−1かつbitalloc(i)<Lでなければ、または、ステップS54の後に、第二割当部50はiにi+1を代入する(ステップS55)。その後、ステップS52に進む。   If k (i) = Thres−1 and bitalloc (i) <L, or after step S54, the second assigning unit 50 substitutes i + 1 for i (step S55). Thereafter, the process proceeds to step S52.

図7から図10の例に対応する第二割当部50によるビット割当の例を図11に示す。図11のように、閾値Thres−1以上の指標(この例では5)を有しまだL個のビットが割り当てられていないサンプルのうち並び替え前のサンプル番号が小さい方からMaxbit−Σt=Thres bitcount(t)個(この例では5個)の各サンプルに対して、1個のビットが割り当てられる。
なお、それぞれに1個のビットを割り当てるサンプルは、閾値Thres−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうちのMaxbit−Σt=Thres bitcount(t)個のサンプルであれば、並び替え前のサンプル番号が小さい方からMaxbit−Σt=Thres bitcount(t)個のサンプルでなくてもよい。
An example of bit allocation by the second allocation unit 50 corresponding to the examples of FIGS. 7 to 10 is shown in FIG. As shown in FIG. 11, Maxbit−Σ t = from the sample having a smaller sample number before rearrangement among samples having an index equal to or greater than the threshold Thres−1 (5 in this example) and not yet assigned L bits. One bit is assigned to each of Thres M bitcount (t) samples (5 in this example).
Note that the samples to which one bit is assigned are Maxbit-Σt = Thres M bitcount (t) of samples having an index equal to or greater than the threshold Thres-1 and not yet assigned L bits. if the sample, may not be Maxbit-Σ t = Thres M bitcount (t) samples from people Sort front of the sample number is small.

このように、従来技術で用いた二次元の配列ではなく、一次元の配列であるビットカウンタbitcount(i)を用いてビット割り当てを行うことにより、G.711.1の低域拡張符号化で用いられているビット割当と同じビット割り当て結果を実現しつつ、従来よりもメモリの消費量を小さくすることができる。その効果は、M,L,Nの値が大きいほど大きい。   In this way, bit allocation is performed using the bit counter bitcount (i), which is a one-dimensional array, instead of the two-dimensional array used in the prior art. While realizing the same bit allocation result as the bit allocation used in the low-frequency extension encoding of 711.1, it is possible to reduce the memory consumption compared to the conventional one. The effect increases as the values of M, L, and N increase.

ビット割当装置及び方法は、コンピュータによって実現することができる。この場合、ビット割当装置の各部、及び、ビット割当方法の各ステップはプログラムによって記述される。そして、このプログラムをコンピュータで実行することにより、ビット割当装置の各部、及び、ビット割当方法の各ステップが、コンピュータ上で実現される。   The bit allocation apparatus and method can be realized by a computer. In this case, each part of the bit allocation device and each step of the bit allocation method are described by a program. Then, by executing this program on a computer, each part of the bit allocation device and each step of the bit allocation method are realized on the computer.

このプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、これらの装置を構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。   This program can be recorded on a computer-readable recording medium. In this embodiment, these devices are configured by executing a predetermined program on a computer. However, at least a part of these processing contents may be realized by hardware.

この発明は、上述の実施形態に限定されるものではなく、本発明の趣旨を逸脱しない範囲で適宜変更が可能である。   The present invention is not limited to the above-described embodiment, and can be modified as appropriate without departing from the spirit of the present invention.

例えば、上記の実施形態では、ステップS1においてサンプルを降順にソートしてから、ステップS2及びステップS3の処理により閾値Thresを計算しているが、このステップS1のソートは行わなくてもよい。   For example, in the above embodiment, after the samples are sorted in descending order in step S1, the threshold Thres is calculated by the processing in steps S2 and S3. However, the sorting in step S1 may not be performed.

20 ビットカウント部
30 閾値決定部
40 第一割当部
50 第二割当部
20 bit count unit 30 threshold determination unit 40 first allocation unit 50 second allocation unit

この発明の一態様によるビット割当装置によれば、1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てるために、N個のサンプルのサンプル番号を0,1,…,i,…,N−1とし、サンプル番号iのサンプルに与えられた重要度を表す指標をk(i)とし、指標k(i)の取り得る値の数+L−1個のビットカウンタの初期値を0として、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行う。指標k(i)の最大値をMとして、Σt=T−1 bitcount(t)>Maxbit≧Σt=T bitcount(t)という関係を満たす値T以上の指標を有する各サンプルiに対して、k(i)−T+1とLのうち小さい方の数のビットを割り当てる。値T−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうちMaxbit−Σt=T bitcount(t)個の各サンプルに対して、1個のビットを割り当てる。
この発明の他の一態様によるビット割当装置によれば、1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てるために、N個のサンプルに与えられた重要度を表す指標に基づいて、N個のサンプルを重要な順に並び替える。並び替えられたN個のサンプルのサンプル番号を新たに0,1,…,i,…,N−1とし、サンプル番号iのサンプルに与えられた重要度を表す指標をk(i)とし、指標k(i)の取り得る値の数+L−1個のビットカウンタbitcountの初期値を0として、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行う。指標k(i)の最大値をMとして、Σt=T−1 bitcount(t)>Maxbit≧Σt=T bitcount(t)という関係を満たす値T以上の指標を有する各サンプルiに対して、k(i)−T+1とLのうち小さい方の数のビットを割り当てる。値T−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうち上記並び替え前のサンプル番号が小さい方からMaxbit−Σt=T bitcount(t)個の各サンプルに対して、1個のビットを割り当てる。
この発明の他の一態様によるビット割当装置によれば、1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てるために、N個のサンプルに与えられた重要度を表す指標に基づいて、N個のサンプルを重要な順に並び替える。並び替えられたN個のサンプルのサンプル番号を新たに0,1,…,i,…,N−1とし、サンプル番号iのサンプルに与えられた重要度を表す指標をk(i)とし、指標k(i)の取り得る値の数+L−1個のビットカウンタの初期値を0として、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行う。指標k(i)の最大値をMとし、割り当て可能ビット数bitsrvの初期値をMaxbitとして、Σ t=T−1 bitcount(t)>Maxbit≧Σ t=T bitcount(t)という関係を満たす値T以上の指標を有する各サンプルiに対して、k(i)−T+1とLのうち小さい方の数のビットを割り当て、割り当て可能ビット数bitsrvから割り当てたビット数を差し引く。並び替え前のサンプル番号が小さい方から順に、割り当て可能ビット数bitsrvが0より大きく、かつ、値T−1以上の指標を有しまだL個のビットが割り当てられていないサンプルである場合に、各該サンプルに対する割り当てビット数に1を加算し、割り当て可能ビット数bitsrvから1を差し引く処理を行う。
According to the bit allocating device of one aspect of the present invention, the maximum number of bits that can be allocated to one sample is L, and in order to allocate Maxbit bits to N samples, the sample number of N samples is set to 0. , 1,..., I,..., N−1, an index representing the importance given to the sample of sample number i is k (i), and the number of possible values of index k (i) + L−1 the bit counter initial value 0, the index k (i), ..., k (i) - (L-1) to each corresponding bit counter bitcount (k (i)), ..., bitcount (k (i )-(L-1)) is added to each of i = 0, 1,..., N-1. For each sample i having an index greater than or equal to a value T satisfying the relationship Σ t = T−1 M bitcount (t)> Maxbit ≧ Σt = T M bitcount (t), where M is the maximum value of the index k (i). On the other hand, the smaller number of bits of k (i) -T + 1 and L are allocated. One bit is assigned to each Maxbit-Σt = T M bitcount (t) samples among samples having an index equal to or greater than the value T−1 and not yet assigned L bits.
According to the bit allocating device according to another aspect of the present invention, the maximum number of bits that can be allocated to one sample is L, and Maxbit bits are allocated to N samples. The N samples are rearranged in the order of importance based on the index indicating the degree of importance. The sample numbers of the rearranged N samples are newly set to 0, 1,..., I,..., N−1, and the index indicating the importance given to the sample with the sample number i is k (i). The number of possible values of the index k (i) + the initial value of the L−1 bit counter bitcount is 0, and each bit counter corresponding to the index k (i),..., K (i) − (L−1) .., bitcount (k (i) − (L−1)) is incremented by 1 for each of i = 0, 1,..., N−1. For each sample i having an index greater than or equal to a value T satisfying the relationship Σ t = T−1 M bitcount (t)> Maxbit ≧ Σt = T M bitcount (t), where M is the maximum value of the index k (i). On the other hand, the smaller number of bits of k (i) -T + 1 and L are allocated. Among samples having an index equal to or greater than the value T-1 and not yet assigned L bits, Maxbit-Σt = T M bitcount (t) samples from the one with the smaller sample number before rearrangement. On the other hand, one bit is allocated.
According to the bit allocating device according to another aspect of the present invention, the maximum number of bits that can be allocated to one sample is L, and Maxbit bits are allocated to N samples. The N samples are rearranged in the order of importance based on the index indicating the degree of importance. The sample numbers of the rearranged N samples are newly set to 0, 1,..., I,..., N−1, and the index indicating the importance given to the sample with the sample number i is k (i). The number of possible values of index k (i) + the initial value of L−1 bit counters is 0, and each bit counter bitcount corresponding to index k (i),..., K (i) − (L−1) The process of adding 1 to (k (i)),..., Bitcount (k (i) − (L−1)) is performed for each of i = 0, 1,. The maximum value of the index k (i) is M, as Maxbit the initial value of allocatable bits Bitsrv, the relationship of Σ t = T-1 M bitcount (t)> Maxbit ≧ Σ t = T M bitcount (t) For each sample i having an index equal to or greater than the value T to be satisfied, the smaller number of bits of k (i) −T + 1 and L is assigned, and the assigned number of bits is subtracted from the assignable number of bits bitsrv. In the order from the smallest sample number before rearrangement, when the number of bits that can be allocated bitsrv is larger than 0 and has an index equal to or greater than the value T-1, L bits are not yet allocated. A process of adding 1 to the number of allocated bits for each sample and subtracting 1 from the number of bits that can be allocated bitsrv is performed.

Claims (6)

1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てるビット割当装置において、
上記N個のサンプルのサンプル番号を0,1,…,i,…,N−1とし、サンプル番号iのサンプルに与えられた重要度を表す指標をk(i)とし、指標k(i)の取り得る値の数+L−1個のビットカウンタbitcountの初期値を0として、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行うビットカウント部と、
指標k(i)の最大値をMとして、下記式(1)で定義される値T以上の指標を有する各サンプルiに対して、k(i)−T+1とLのうち小さい方の数のビットを割り当てる第一割当部と、
Figure 2012002348

上記値T−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうち下記式(2)で定義される個数の各サンプルに対して、1個のビットを割り当てる第二割当部と、
Figure 2012002348

を含むビット割当装置。
In a bit allocation device that allocates Maxbit bits to N samples, where L is the maximum number of bits that can be allocated to one sample,
The sample numbers of the N samples are 0, 1,..., I,..., N−1, the index representing the importance given to the sample of the sample number i is k (i), and the index k (i). The initial value of the number of possible values + L−1 bit counter bitcount is 0, and each bit counter bitcount (k (i) corresponding to the index k (i),..., K (i) − (L−1) )),..., Bitcount (k (i) − (L−1)), and a bit count unit for performing processing for adding i = 0, 1,.
For each sample i having an index equal to or greater than the value T defined by the following equation (1), where M is the maximum value of the index k (i), the smaller number of k (i) −T + 1 and L A first allocator to allocate bits;
Figure 2012002348

Second allocation in which one bit is allocated to each of the number of samples defined by the following formula (2) among samples having an index equal to or greater than the value T-1 and not yet allocated L bits. And
Figure 2012002348

A bit allocation device including:
1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てるビット割当装置において、
上記N個のサンプルに与えられた重要度を表す指標に基づいて、上記N個のサンプルを重要な順に並び替えるソート部と、
上記並び替えられたN個のサンプルのサンプル番号を新たに0,1,…,i,…,N−1とし、サンプル番号iのサンプルに与えられた重要度を表す指標をk(i)とし、指標k(i)の取り得る値の数+L−1個のビットカウンタbitcountの初期値を0として、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行うビットカウント部と、
指標k(i)の最大値をMとして、下記式(1)で定義される値T以上の指標を有する各サンプルiに対して、k(i)−T+1とLのうち小さい方の数のビットを割り当てる第一割当部と、
Figure 2012002348

上記値T−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうち上記並び替えの前のサンプル番号が小さい方から下記式(2)で定義される個数の各サンプルに対して、1個のビットを割り当てる第二割当部と、
Figure 2012002348

を含むビット割当装置。
In a bit allocation device that allocates Maxbit bits to N samples, where L is the maximum number of bits that can be allocated to one sample,
A sorting unit for rearranging the N samples in an important order based on an index representing the importance given to the N samples;
The sample numbers of the rearranged N samples are newly set to 0, 1,..., I,..., N−1, and the index indicating the importance given to the sample with the sample number i is k (i). , The number of possible values of the index k (i) + the initial value of the L−1 bit counter bitcount is 0, and each bit corresponding to the index k (i),..., K (i) − (L−1) , Bit count (k (i)),..., Bitcount (k (i) − (L−1)) is incremented by 1 for each of i = 0, 1,. A counting section;
For each sample i having an index equal to or greater than the value T defined by the following equation (1), where M is the maximum value of the index k (i), the smaller number of k (i) −T + 1 and L A first allocator to allocate bits;
Figure 2012002348

Among the samples having an index equal to or greater than the value T-1 and not yet assigned L bits, each sample of the number defined by the following formula (2) is assigned to the sample having the smallest sample number before the rearrangement. On the other hand, a second allocation unit that allocates one bit;
Figure 2012002348

A bit allocation device including:
1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てるビット割当方法において、
ビットカウント部が、上記N個のサンプルのサンプル番号を0,1,…,i,…,N−1とし、サンプル番号iのサンプルに与えられた重要度を表す指標をk(i)とし、指標k(i)の取り得る値の数+L−1個のビットカウンタbitcountの初期値を0として、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行うビットカウントステップと、
第一割当部が、指標k(i)の最大値をMとして、下記式(1)で定義される値T以上の指標を有する各サンプルiに対して、k(i)−T+1とLのうち小さい方の数のビットを割り当てる第一割当ステップと、
Figure 2012002348

第二割当部が、上記値T−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうち下記式(2)で定義される個数の各サンプルに対して、1個のビットを割り当てる第二割当ステップと、
Figure 2012002348

を含むビット割当方法。
In the bit allocation method of allocating Maxbit bits to N samples, where L is the maximum number of bits that can be allocated to one sample,
The bit count unit sets the sample numbers of the N samples to 0, 1,..., I,..., N−1, and sets the index indicating the importance given to the sample of the sample number i as k (i). The number of possible values of the index k (i) + the initial value of the L−1 bit counter bitcount is 0, and each bit counter corresponding to the index k (i),..., K (i) − (L−1) Bit count (k (i)),..., bit count (k (i) − (L−1)) is incremented by 1 for each of i = 0, 1,. Steps,
The first allocator sets k (i) −T + 1 and L for each sample i having an index greater than or equal to the value T defined by the following equation (1), where M is the maximum value of the index k (i). A first allocation step of allocating the smaller number of bits,
Figure 2012002348

The second assigning unit has one index for each sample defined by the following equation (2) among samples having an index equal to or greater than the value T-1 and not yet assigned L bits. A second assignment step to assign bits;
Figure 2012002348

Bit allocation method including
1つのサンプルに割り当て可能な最大ビット数をLとして、N個のサンプルにMaxbit個のビットを割り当てるビット割当方法において、
ソート部が、上記N個のサンプルに与えられた重要度を表す指標に基づいて、上記N個のサンプルを重要な順に並び替えるソートステップと、
ビットカウント部が、上記並び替えられたN個のサンプルのサンプル番号を新たに0,1,…,i,…,N−1とし、サンプル番号iのサンプルに与えられた重要度を表す指標をk(i)とし、指標k(i)の取り得る値の数+L−1個のビットカウンタbitcountの初期値を0として、指標k(i),…,k(i)−(L−1)に対応する各ビットカウンタbitcount(k(i)),…,bitcount(k(i)−(L−1))に1を加算する処理を、i=0,1,…,N−1のそれぞれに対して行うビットカウントステップと、
第一割当部が、指標k(i)の最大値をMとして、下記式(1)で定義される値T以上の指標を有する各サンプルiに対して、k(i)−T+1とLのうち小さい方の数のビットを割り当てる第一割当ステップと、
Figure 2012002348

第二割当部が、上記値T−1以上の指標を有しまだL個のビットが割り当てられていないサンプルのうち上記並び替えの前のサンプル番号が小さい方から下記式(2)で定義される個数の各サンプルに対して、1個のビットを割り当てる第二割当ステップと、
Figure 2012002348

を含むビット割当方法。
In the bit allocation method of allocating Maxbit bits to N samples, where L is the maximum number of bits that can be allocated to one sample,
A sorting step in which the sorting unit sorts the N samples in an important order based on an index representing the importance given to the N samples;
The bit count unit newly sets the sample numbers of the rearranged N samples as 0, 1,..., I,..., N−1, and indicates an index indicating the importance given to the sample of the sample number i. k (i), the number of possible values of the index k (i) + the initial value of the L−1 bit counter bitcount is 0, and the index k (i),..., k (i) − (L−1) , Bitcount (k (i) − (L−1)) corresponding to each bit counter corresponding to 1 is added to each of i = 0, 1,..., N−1. A bit count step for
The first allocator sets k (i) −T + 1 and L for each sample i having an index greater than or equal to the value T defined by the following equation (1), where M is the maximum value of the index k (i). A first allocation step of allocating the smaller number of bits,
Figure 2012002348

The second allocating unit is defined by the following formula (2) from the sample having a smaller sample number before the reordering among samples having the index equal to or greater than the value T-1 and not yet allocated L bits. A second allocating step of allocating one bit for each number of samples;
Figure 2012002348

Bit allocation method including
請求項3又は4に記載されたビット割当方法の各ステップをコンピュータに実行させるためのプログラム。   The program for making a computer perform each step of the bit allocation method described in Claim 3 or 4. 請求項3又は4に記載されたビット割当方法の各ステップをコンピュータに実行させるためのプログラムが記録されたコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which a program for causing a computer to execute each step of the bit allocation method according to claim 3 is recorded.
JP2012522627A 2010-06-29 2011-06-28 Bit allocation apparatus, method, program, and recording medium thereof Active JP5191617B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012522627A JP5191617B2 (en) 2010-06-29 2011-06-28 Bit allocation apparatus, method, program, and recording medium thereof

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2010147769 2010-06-29
JP2010147769 2010-06-29
PCT/JP2011/064728 WO2012002348A1 (en) 2010-06-29 2011-06-28 Bit allocation device, method, program and recording medium thereof
JP2012522627A JP5191617B2 (en) 2010-06-29 2011-06-28 Bit allocation apparatus, method, program, and recording medium thereof

Publications (2)

Publication Number Publication Date
JP5191617B2 JP5191617B2 (en) 2013-05-08
JPWO2012002348A1 true JPWO2012002348A1 (en) 2013-08-22

Family

ID=45402056

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012522627A Active JP5191617B2 (en) 2010-06-29 2011-06-28 Bit allocation apparatus, method, program, and recording medium thereof

Country Status (3)

Country Link
JP (1) JP5191617B2 (en)
CN (1) CN102959619B (en)
WO (1) WO2012002348A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2981781A1 (en) * 2011-10-19 2013-04-26 France Telecom IMPROVED HIERARCHICAL CODING

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10016A (en) * 1853-09-13 Bootjack
JPH08167878A (en) * 1994-12-14 1996-06-25 Matsushita Electric Ind Co Ltd Digital audio signal coding device
EP2179415B1 (en) * 2007-08-16 2013-03-20 Electronics and Telecommunications Research Institute Apparatus and method for encoding an enhancement layer
KR101336891B1 (en) * 2008-12-19 2013-12-04 한국전자통신연구원 Encoder/Decoder for improving a voice quality in G.711 codec

Also Published As

Publication number Publication date
CN102959619A (en) 2013-03-06
JP5191617B2 (en) 2013-05-08
CN102959619B (en) 2014-06-11
WO2012002348A1 (en) 2012-01-05

Similar Documents

Publication Publication Date Title
KR101353216B1 (en) Arithmetic encoding for factorial pulse coder
KR101353170B1 (en) Encoder and decoder using arithmetic stage to compress code space that is not fully utilized
JP2021513284A5 (en)
JP6595050B2 (en) Signal processing method and apparatus
AU2018201468B2 (en) Audio decoding device, audio encoding device, audio decoding method, audio encoding method, audio decoding program, and audio encoding program
US10021405B2 (en) Encoding device, decoding device, and image processing device
CN103716623A (en) Video compression encoding-and-decoding method and encoder-decoder on the basis of weighting quantification
JPWO2013008370A1 (en) Image compression apparatus, image expansion apparatus, and image processing apparatus
JPH0851370A (en) Device and method for encoding
JP5191617B2 (en) Bit allocation apparatus, method, program, and recording medium thereof
JP2914549B2 (en) Image coding method
JP6289627B2 (en) Method and apparatus for signal encoding and decoding
JP5704018B2 (en) Audio signal encoding method and apparatus
KR960043914A (en) Variable bit rate video coding
JP4960791B2 (en) Vector quantization coding apparatus, vector quantization decoding apparatus, method thereof, program thereof, and recording medium thereof
JP6962445B2 (en) Encoding device, coding method, program, and recording medium
JP2005265865A (en) Method and device for bit allocation for audio encoding
CN113347438B (en) Intra-frame prediction method and device, video encoding device and storage medium
JP2022077134A (en) Neural network weight saving device, neural network weight saving method, and program
JP4971965B2 (en) Encoding device, decoding device, encoding method, decoding method, encoding program, decoding program, and recording medium
CN118283279A (en) Image compression method, system, electronic device and storage medium
JPS60217744A (en) Block encoding method accompanied by information assignment
JP2007324971A (en) Encoder, encoding method, and program

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130122

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130129

R150 Certificate of patent or registration of utility model

Ref document number: 5191617

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160208

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350