Decoder, encoder, decode method, and encode method

JP2025024868APending Publication Date: 2025-02-21AKUSERU KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023129213
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-08-08
Publication Date
2025-02-21

AI Technical Summary

Benefits of technology

【0010】 本発明によれば、データの圧縮効率を向上することができる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025024868000001_ABST
    Figure 2025024868000001_ABST
Patent Text Reader

Abstract

To improve compression efficiency of data.SOLUTION: An encoder 10 which encodes encoding target data including a plurality of integer values comprises an encoding section 13 which identifies block data, in which a plurality of integer values is arranged side by side, from among the encoding target data and encodes the block data into a coupled code for which a plurality of alpha codes is coupled with a CBT code. The encoding section 13 may also encode a plurality of kinds of block data into coupled codes for which values of a plurality of alpha codes are equal and values of CBT codes are different.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a technique for compressing data. [Background technology]

[0002] Conventionally, compression processing has been performed to reduce the amount of data. For example, Golomb coding (see, for example, Non-Patent Document 1) is known as a technique for coding an integer data string that follows a geometric distribution with a small amount of code.

[0003] Furthermore, when encoding an information source that is an integer data string, a technique is known in which the information source is expanded to encode an expanded information source in order to improve encoding efficiency (see, for example, Non-Patent Document 2). [Prior art documents] [Non-patent literature]

[0004] [Non-Patent Document 1] SW Golomb, “Run-Length Encodings,” IEEE Transactions on Information Theory, vol. IT-12, no. 3, pp. 399-401, July 1966. [Non-Patent Document 2] Hiroshi Miyagawa, "Information Theory", edited by the Institute of Electrical Communication Engineers, Corona Publishing, 1979 Summary of the Invention [Problem to be solved by the invention]

[0005] According to Shannon's source coding theorem, the average code length per symbol can be reduced to the entropy of the source. In this way, when reduced to the entropy, the average code length per symbol is often not an integer.

[0006] For example, when encoding using Golomb coding, which assigns one code to one symbol, the code length for each symbol cannot be a non-integer, so the average code length cannot be made as short as possible, and it is often impossible to get close enough to the entropy of the information source.

[0007] On the other hand, methods of bringing the amount of code per symbol closer to the entropy include Huffman coding of the extended information source and arithmetic coding. However, these methods involve a lot of additional information other than the codes describing each symbol, and as a result, there are cases where the compression efficiency cannot be improved.

[0008] The present invention has been made in consideration of the above circumstances, and an object of the present invention is to provide a technique capable of improving the efficiency of data compression. [Means for solving the problem]

[0009] In order to achieve the above-mentioned object, an encoder according to one aspect is an encoder that encodes encoding target data including a plurality of integer values, and includes an identification unit that identifies block data containing a plurality of integer values ​​from the encoding target data, and an encoding unit that encodes the block data into a combined code that combines a plurality of alpha codes and a CBT code. Effect of the Invention

[0010] According to the present invention, it is possible to improve the data compression efficiency. [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 is a diagram showing the overall configuration of a processing system according to an embodiment. [Diagram 2] FIG. 2 is a diagram illustrating a first example of Golomb coding. [Diagram 3] FIG. 3 is a diagram illustrating a second example of Golomb coding. [Figure 4] FIG. 4 is a diagram illustrating group numbers according to one embodiment. [Diagram 5] FIG. 5 is a diagram illustrating symbols belonging to a group where g3=2 according to an embodiment. [Figure 6] FIG. 6 is a diagram illustrating a one-dimensional index tn according to an embodiment. [Figure 7] FIG. 7 is a diagram illustrating symbols belonging to a group where g3=2 when m3=2 according to an embodiment. [Figure 8] FIG. 8 is a diagram showing the relationship between a0, a1, a2 and tg'3 according to an embodiment. [Figure 9] FIG. 9 is a diagram illustrating a local index tg'2 according to an embodiment. [Figure 10] FIG. 10 is a diagram illustrating a local index tg'1 according to an embodiment. [Figure 11] FIG. 11 is a diagram illustrating the index t'2 when m2=2 according to one embodiment. [Figure 12] FIG. 12 is a diagram showing the relationship between a0, a1 and t'2 according to one embodiment. [Figure 13] FIG. 13 is a diagram showing the relationship between a0, a1 and t2 according to an embodiment. [Figure 14] FIG. 14 is a flowchart of an encoding process according to an embodiment. [Figure 15] FIG. 15 is a flowchart of a decoding process according to an embodiment. [Figure 16] FIG. 16 is a diagram illustrating an average code length by encoding according to an embodiment. [Figure 17] FIG. 17 is a diagram illustrating the configuration of a computer device according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] The following embodiments will be described with reference to the drawings. Note that the following embodiments do not limit the scope of the invention, and not all of the elements and combinations thereof described in the embodiments are necessarily essential to the solution of the invention.

[0013] First, a processing system according to an embodiment will be described.

[0014] FIG. 1 is a diagram showing the overall configuration of a processing system according to an embodiment.

[0015] The processing system 1 includes an encoder 10 and a decoder 30. The encoder 10 and the decoder 30 are connected via a network 50. The network 50 is, for example, a Local Area Network (LAN) or a Wide Area Network (WAN).

[0016] The encoder 10 includes a target data input unit 11, a prediction difference calculation unit 12, an encoding unit 13, and a compressed data output unit 14. Here, the encoding unit 13 is an example of a determination unit, and the compressed data output unit 14 is an example of a transmission unit.

[0017] The target data input unit 11 inputs data to be compressed. The target data may be, for example, audio data converted by PCM (Pulse Code Modulation). The target data may be obtained from the auxiliary storage device 106 (see FIG. 17) in the encoder 10, or may be obtained from a recording device (not shown).

[0018] The prediction difference calculation unit 12 performs a process of calculating a prediction difference for each data element (data at a predetermined point in time) of the audio data. An example of the process of calculating the prediction difference will be described below.

[0019] Here, the data string of the voice data is denoted by x[t], where t=0, 1, 2, . . . , n-1, and x[t] is an integer. When the prediction difference x'[t] of x[t] is predicted using the previous data x[t-1], the prediction difference x'[t] can be expressed as shown in the following equation (1).

[0020]

number

[0021] The encoding unit 13 converts the prediction difference x'[t] calculated by the prediction difference calculation unit 12 into conversion target data p[t] (data to be processed) to be encoded, using the following equation (2). p[t] = g(x'[t]) (2) Here, g() is a function that maps positive and negative integers to non-negative integers, and can be expressed as shown in equation (3).

[0022]

number

[0023] The encoding unit 13 divides each value of p[t] into n blocks to generate a blocked time series p n Generate [t]. p n [t]=(p[nt]p[nt+1]...p[nt+n-1])...(4)

[0024] Next, the encoding unit 13 n The encoding according to the present embodiment is performed on [t] (data to be encoded) as described below. Note that the encoding according to the present embodiment uses encoding similar to Golomb encoding as described later, and the encoding unit 13 uses a parameter m n Determine the parameter m n may be estimated based on the average value of p[t], or the parameter m n Alternatively, the value of may be changed and actual coding may be performed to search for parameters with the highest coding efficiency.

[0025] Next, encoding according to this embodiment will be described.

[0026] In this embodiment, for example, a data string output from an information source S that outputs data having a stationary distribution according to a geometric distribution is to be encoded. Here, the probability mass function for element i of the data string can be expressed as shown in the following formula (5).

[0027]

number

[0028] Here, θ means the probability that P[i] outputs a value other than 0, and 0<θ<1.

[0029] In this embodiment, an n-th order expanded information source S outputs blocks obtained by dividing a data string output from the information source S into n blocks. n Considering the expanded information source S n Each block output from is treated as a symbol to be coded.

[0030] For example, if the data sequence output from the information source S is {0, 1, 0, 0, 2, 3, 0, 0, 1, 0, 2, 1, 0, 0}, then the extended information source S 2 will output the symbols {01,00,23,00,10,21,00}.

[0031] Here, the augmented information source S 2 Consider the occurrence probability (probability of occurrence) of each symbol output from First, according to equation (5), the probability that the information source S generates the symbol "0" is (1-θ). Also, the probability that the information source S generates the symbol "0" followed by another symbol "0" is (1-θ). 2 Similarly, the probability of generating the symbol "1" following the symbol "0" is (1-θ) 2 The angle is θ. Therefore, the probability P(i0)P(i1) that the information source S generates the symbol "i0" followed by the symbol "i1" can be expressed as shown in the following equation (6).

[0032]

number

[0033] The occurrence probability P(i0)P(i1) is the extended information source S 2 is the same as the probability P(i0i1) of generating the symbol "i0i1". In addition, by generalizing equation (6), the n-th order extended information source S n The probability of generating a symbol output from P(i0,i1,...,i n-1 ) can be expressed as shown in the following equation (7).

[0034]

number

[0035] For example, when θ=1 / 2, the code length of each symbol output from the information source S is an integer when the symbol is most efficiently encoded by Golomb coding. 2 When applied to the symbol "i0i1" output from, the symbols i0 and i1 are each coded with the Golomb parameter m=1, and the amount of code remains the same, allowing for the most efficient coding. Here, the Golomb code for m=1 in Golomb coding is the alpha code itself, without the CBT code. In other words, it is a combination of the alpha code for i0 and the alpha code for i1.

[0036] Incidentally, Golomb coding can be seen as a coding method that combines alpha coding and CBT coding, and can be interpreted as expressing a geometric distribution corresponding to θ=1 / 2 in the alpha coding part, and then stretching this by a factor of m using CBT coding to effectively set θ.

[0037] Here, Golomb coding will be explained with reference to the drawings.

[0038] FIG. 2 is a diagram for explaining a first example of Golomb coding. FIG. 3 is a diagram for explaining a second example of Golomb coding. FIG. 2 shows Golomb coding that is optimal when the Golomb parameter m=1, and FIG. 3 shows Golomb coding that is optimal when the Golomb parameter m=2. In FIG. 2 and FIG. 3, rectangles indicate symbols, and the numbers in the rectangles indicating each symbol indicate the symbol number. In addition, below the rectangles, alpha codes and CBT codes when the symbols are coded are shown. In addition, the numbers (1 / 2) on the arrows between the rectangles indicate the relationship of occurrence probability between symbols (symbol groups).

[0039] When m=1, as shown in Figure 2, the code for the symbols is only the alpha code, there is no CBT code, and symbol 0 is coded as "1", symbol 1 is coded as "01", symbol 2 is coded as "001", ... In this case, it indicates that the occurrence probability of the right symbol is 1 / 2 compared to the left symbol.

[0040] For m=2, as shown in Figure 3, the code for the symbols is a code that includes one alpha code and a CBT code, where symbol 0 is encoded as "10", symbol 1 is encoded as "11", symbol 2 is encoded as "010", ...

[0041] When m=1, the occurrence probability for every symbol is 1 / 2, which corresponds to θ=1 / 2 in accordance with equation (5). When m=2, the occurrence probability for every two symbols is 1 / 2, which corresponds to θ=√(1 / 2) in accordance with equation (5) (in this specification, this notation indicates that √ is crossed over 1 / 2).

[0042] In this embodiment, the Golomb coding method is developed to obtain an extended information source S 2 Each symbol output from is encoded by a combined code that combines a plurality of alpha codes and a CBT code.

[0043] Here, as described above, when θ=1 / 2, to efficiently encode the symbol "i0i1", it is sufficient to add the alpha code for i1 following the alpha code for i0. By expressing the symbol as a combined code of alpha code + alpha code + CBT code, which is obtained by combining this code with a CBT code, it is possible to realize encoding suitable for θ larger than 1 / 2.

[0044] Let m be the types of inputs to be coded using CBT code. 2 Then, m 2 If m = 1, no CBT code is required and θ = 1 / 2. 2 In the case of =2, this means that the entire P(i0)P(i1) in equation (6) is stretched by a factor of two, so when θ is the same for P(i0) and P(i1), the expansion rate in the random variable direction of the probability mass function for each symbol "i0" and "i1" is √(2). Therefore, according to this encoding, θ=2 -1 / √(2) Therefore, we can realize coding suitable for the geometric distribution of the parameter m 2 Generalizing this, according to this encoding, θ=2 -1 / m It is possible to realize coding suitable for the geometric distribution of

[0045] [Extended Source S n Encoding of output data (symbols) from Below is the nth order symbol "i0i1i2...i n-1 " is the object to be coded, and parameters m n The encoding procedure (steps E1 to E8) by the encoding unit 13 when is given will be described. In this embodiment, the encoding unit 13 determines the values ​​of multiple alpha codes to be assigned to symbols based on the occurrence probability of a sequence of multiple integer values ​​of an n-th order symbol, for example, by the following procedure. At this time, the encoding unit 13 performs encoding so that the multiple alpha codes assigned to symbols with a high occurrence probability tend to be short. The encoding unit 13 may also perform encoding so that the CBT codes assigned to symbols with a high occurrence probability tend to be short.

[0046] [Step E1] The encoding unit 13 encodes i0, i1, i2, ..., i n-1 from the one-dimensional index of the symbol t n Here, the one-dimensional index t n This is the order of the target symbols when all symbols that can be used as symbols of block data are sorted in order of decreasing probability calculated by a model based on the probability mass function shown in equation (7).

[0047] Here, the one-dimensional index t n An example of a method for calculating Σ k=0 n-1 i k =g n Far away. g n g stands for a group. n Among symbols with equal one-dimensional index t n The minimum value of η n (g n ) can be expressed as shown in the following formula (8). The derivation of formula (8) will be described later.

[0048]

number

[0049] Here, Π is the symbol for multiplication.

[0050] η n (g n ) can be expanded as shown in the following formulas (9) to (12) when n=1 to 4, for example.

[0051]

number

[0052] Here, g n The symbols that are equal are g nAccording to equation (7), the same g n Symbols belonging to g have the same probability of appearing. n Even if you decide the information of which symbol is which in the one-dimensional index t n However, in order to ensure that decoding can be performed, it is necessary to make it possible to uniquely identify the encoder and the decoder. For example, g n The number of the symbol in n-2 Since the degree has been reduced by one, g n-1 Index t for n-1 can be used as is.

[0053] To give a specific example, the extended source S 3 g3 for "i0, i1, i2" in is the numerical value written in the rectangle in FIG. 4(C). If we focus only on the symbols with g3=2, we get the result shown in FIG. 5. Referring to FIG. 5, we can see that for each symbol, even if any one of i0, i1, and i2 is missing, the symbol can be identified. Therefore, the symbol can be identified using i0 and i1. Furthermore, a method of making i0 and i1 into one-dimensional indexes is to calculate the one-dimensional index t2 and repeat a similar calculation, and by repeatedly calculating the one-dimensional index of the dimension one level lower, the one-dimensional index of each symbol can be calculated. In this way, the index t n When determining the one-dimensional index t n As shown in equation (13), η in equation (8) n (g n ) and g n-1 Index t for n-1 It can be expressed as the sum of

[0054]

number

[0055] Here, t0=0. According to formula (13), when n=1, 2, 3, it can be expressed as shown in the following formulas (14) to (16). That is, formula (13) can be expressed as shown in the following formula (17).

[0056]

number

[0057] Information source S 1 ,S 2 ,S 3 The values ​​of the one-dimensional indexes t1, t2, and t3 calculated by equation (17) in each case can be expressed as shown in FIG. 2 In this case, according to formula (6), the occurrence probability is determined by i0+i1, and the larger i0+i1 is, the lower the occurrence probability is. Therefore, when considering a two-variable plane of i0 and i1, the occurrence probability monotonically decreases as the Manhattan distance from the origin increases. Therefore, if the indexes are determined in order of occurrence probability, the one-dimensional index t2 will be as shown in Figure 6(B).

[0058] [Step E2] The encoding unit 13 encodes the index t' using n alpha codes. n In addition, when encoding with n alpha codes, it corresponds to encoding each symbol when θ=1 / 2. Here, the index t' n is the index t n is a quantized value as shown in the following equation (18).

[0059]

number

[0060] [Step E3] The encoding unit 13 determines the index t'n The index g' of the group n Request. Specifically, first, the smallest index t n In other words, when n=2, use the following formula (19), when n=3, use the following formula (20), and when n=4, use the following formula (21). n Solve and choose a solution that is zero or a positive number. The same applies when n is other than 2, 3, or 4.

[0061]

number

[0062] Here, g' n is g^' n Index t' belongs to n Since g^' is the smallest value of n g' by truncating the decimal part n can be calculated.

[0063] For example, g' n When n=2, it can be calculated by the following formula (22) based on formula (19), when n=3, it can be calculated by the following formula (23) based on formula (20), and when n=4, it can be calculated by the following formula (24) based on formula (21).

[0064]

number

[0065] In addition, g' n may be calculated by a method other than the above, for example, by a numerical calculation method capable of solving a high-order algebraic equation, and the index t' n By counting up the corresponding g' n You may ask for t' n and g' nAlternatively, a table of the correspondence between the number of pixels and the number of pixels may be prepared in advance, and the number of pixels may be determined based on the table.

[0066] [Step E4] The encoding unit 13 uses the index t n g' n The sequence number t indicates the number of the symbol in the group. g Request.

[0067] For example, g' n The smallest index of the group is calculated in the same manner as in equation (8), and the smallest index is m n By multiplying by t n and restore this value to the same scale as the index t n Specifically, it is calculated using the following formula (25).

[0068] t g =t n -η n (g' n )m n ···(twenty five)

[0069] [Step E5] The encoding unit 13 converts g' n The type number s of the CBT code in the group is calculated using the following formula (26).

[0070]

number

[0071] Here, g' n In the group, the smallest index number of n, which is one smaller, is used (η n-1 (g' n +1))m n Since it contains symbols, 0≦s <m n Figure 7 shows the 3 7 is a diagram showing symbols belonging to a group of g'3=2 when (η n-1 (g' n +1))mn =(η 3-1 It can be seen that it contains (2+1)2 = 12 symbols (shown as circles in the diagram).

[0072] [Step E6] The encoding unit 13 converts g' n The index t in the group g’n is calculated using the following formula (27).

[0073] t g‘n =t g mod ( n-1 (g' n +1)) ···(27) where mod denotes the modulus operation and index t g’n t g’n <(η n-1 (g' n +1).

[0074] [Step E7] The encoding unit 13 uses the index t g’n a0, a1, . . . , a n-1 Determine. In this embodiment, g' n Since the probability of all symbols in the group is equal, a0, a1, . . . , a n-1 is Σ k=0 n-1 a k =g' n It is sufficient if the symbol in the group can be uniquely identified. For example, the symbol is g’n =Σ k=1 n η k (g' k ), a0, a1, , a n-1 The method for determining is as follows: First, the index t g’n The local index tg' in the group g'k in which n-1 is calculated using the following equation (28).

[0075] tg' n-1 =tg' n -η n (g' k ) ···(28)

[0076] Then, the index t g’n-1 Group g' contains n-1 is calculated in the same manner as in step E3. That is, g^' is calculated by solving the following equation (29). n-1 Find g' by truncating the decimal part. n―1 Here, we calculate g' by solving equation (29) and choosing the solution that is zero or a positive number. n―1 It will be selected as.

[0077]

number

[0078] Next, a n-1 is calculated using the following formula (30).

[0079] a n-1 =g' n -g' n-1 (30)

[0080] a n-1 is the maximum value of g' n From the local group g' n-1 It can be identified as being shifted by the number of .

[0081] By repeating the same process, a n-2 ,...a1 is specified, and a0 is as shown in the following equation (31).

[0082] a0=g'1=t g’1 (31)

[0083] This allows a0, a1, . . . , a n-1 All of the above can be determined.

[0084] Here, S3 For the case of encoding the symbol of group g'3=3 and index t g’3 An example of determining a0, a1, and a2 when a0=18 will be described.

[0085] If group g'3=3, then a0, a1, a2 and t g’3 The relationship between the index t g’3 =18, it can be seen that (a0, a1, a2) = (2, 1, 0). For example, the relationship diagram shown in FIG. 8 shows that the index t g’n Since it can be created by counting up n and t g’n When is small, a relationship diagram as shown in FIG. 8 may be created and (a0, a1, a2) may be determined based on this diagram. An example in which (a0, a1, a2) is determined by calculation rather than from a relationship diagram will be described below.

[0086] Index t in group g'3 g’3 As shown in Figure 9, the local index t g’2 can be calculated as "8" by using equation (28) as shown in the following equation (32), and can be expressed as shown in FIG.

[0087]

number

[0088] Next, the index t g’2 Group g'2 including the symbol with 8 is calculated as "3" according to equation (22), as shown in the following equation (33).

[0089]

number

[0090] As a result, a2 can be calculated from equation (30) as shown in the following equation (34).

[0091] a2=g'3-g'2=0 (34)

[0092] Next, the index t included in the group g'2=3 g’2 As shown in Figure 10, the local index t g’2 can be calculated as "2" by using equation (28), as shown in the following equation (35), and can be expressed as shown in FIG. 10.

[0093]

number

[0094] Next, the index t g’1 The group g'1 including the symbol with 2 is calculated as shown in the following equation (36).

[0095] g'1 = tg'1 = 2 (36)

[0096] As a result, a1 can be calculated from equation (30) as shown in the following equation (37).

[0097] a1=g'2-g'1=1 (37)

[0098] Finally, a0 can be calculated from equation (31) as shown in the following equation (38).

[0099] a0=g'1=2 (38)

[0100] This results in (a0,a1,a2)=(2,1,0).

[0101] [Step E8] The encoding unit 13 encodes the a0, a1, . . . , a n-1 By encoding each of these into an alpha code in order, we obtain n alpha codes, and furthermore, m nA CBT code is calculated by performing CBT encoding for symbols, and a combined code is created by combining n alpha codes and the CBT code. n One of the n-th order blocks output from can be encoded into a joint code.

[0102] This allows multiple alpha codes assigned to n-th order symbols to be coded so as to be short, and allows the CBT codes assigned to symbols with high occurrence probabilities to be short.

[0103] [Derivation of Equation (8)] Here, the derivation of equation (8) will be explained.

[0104] In the case of n=1, S in Fig. 4 1 As shown in the above, the number of symbols belonging to g1 is always 1, so the minimum value η1(g1) of the one-dimensional index t1 in the group can be expressed as shown in the following equation (39).

[0105] Also, when n=2, S in Fig. 4 2 As shown in the above, the number of each group is the sum of numbers that change from 0, 1, 2, ..., so the minimum value η2(g2) of the one-dimensional index t2 in the group can be expressed as shown in the following equation (40).

[0106] Also, when n=3, S in Fig. 4 3 As shown in the figure, the number of groups is the sum of the numbers that change from 0, 3, 6, 10, ..., so S 2 Since this means taking the sum over g2 in , the minimum value η3(g3) of the one-dimensional index t3 in the group can be expressed as shown in the following equation (41).

[0107]

number

[0108] Thus, the one-dimensional index t in the group for nn The minimum value of η n (g n ) can be recursively calculated from the number of each group in the next lower order, leading to equation (8).

[0109] [Extended Source S 2 Encoding output data from In the above example, the extended information source S n We have explained the coding for the extended source S 2 Specifically, the second-order symbol "i0i1" is to be encoded, and the parameter m 2 The encoding procedure (steps E1 to E8) by the encoding unit 13 when the above equation is given will be described.

[0110] [Step E1] The encoding unit 13 obtains a one-dimensional index t2 of the symbol from i0, i1 in the symbol to be encoded (referred to as the target symbol in the explanation of this process).

[0111] First, let i0+i1=g2. g2 represents a group. η2(g2), which indicates the minimum value of the one-dimensional index t2 among the symbols belonging to g2, can be expressed as shown in the above formula (10). Furthermore, taking into account the order of the symbols in the group g2, it can be expressed as shown in the following formula (42).

[0112]

number

[0113] [Step E2] The encoding unit 13 obtains index t'2 when encoding with two alpha codes. Note that encoding with two alpha codes corresponds to encoding each symbol when θ=1 / 2. Here, index t'2 is a value obtained by quantizing index t2 as shown in the following equation (43).

[0114]

number

[0115] For example, when the index t2 is as shown in FIG. 2 If = 2, the index t'2 will be as shown in FIG.

[0116] [Step E3] The encoding unit 13 obtains a group g'2 of the index t'2. Specifically, first, the calculation is performed inversely to that used to find the minimum index t2 belonging to the group in equation (10). That is, in equation (19), g^'2 is solved and a solution that satisfies g^'2 ≧ 0 is selected. Here, g'2 is the minimum value of index t'2 belonging to g^'2 and is an integer value, so g'2 can be calculated by truncating the decimal part from g^'2.

[0117] Therefore, g'2 can be calculated by equation (22).

[0118] [Step E4] The encoding unit 13 determines whether the index t2 is g' n The sequence number t indicates the number of the symbol in the group. g Request.

[0119] For example, g' n The minimum index of the group is calculated in the same manner as in equation (10), and the minimum index is m 2 The index t2 is calculated by multiplying the index by t2 to restore it to the same scale as t2, and subtracting this value from the index t2. Specifically, the calculation is performed using the following equation (44).

[0120]

number

[0121] [Step E5] The encoding unit 13 calculates the type number s of the CBT code in the group g'2 by the following equation (45).

[0122]

number

[0123] Here, in the group of g'2, there is (g2+1)m 2 Since it contains symbols, 0≦s <m 2 It becomes.

[0124] [Step E6] The encoding unit 13 selects an index t g’2 is calculated using the following equation (46).

[0125] t g’2 =t g mod (g'2+1) (46) where mod denotes the modulus operation and index t g’2 t g’2 <(g'2+1).

[0126] [Step E7] The encoding unit 13 uses the index t g’2 Determine a0 and a1, which are the inputs when converting from In this embodiment, since the probability of all symbols in group g'2 is equal, it is sufficient that a0+a1=g'2 is satisfied and the symbols in the group can be uniquely identified. For example, a0 and a1 may be determined by the following equations (47) and (48).

[0127] a0=t g’1 (47) a1=g'2-t g’1 (48)

[0128] [Step E8] The encoding unit 13 encodes a0 and a1 obtained in step E7 into alpha codes in order to obtain two alpha codes, and further encodes m 2 A CBT code is calculated by performing CBT encoding for the symbols, and a combined code is created by combining the two alpha codes and the CBT code. 2 One of the quadratic blocks output from can be encoded into a joint code.

[0129] According to the above-mentioned encoding process, for the symbol represented by index t2 as shown in FIG. 6, (a0, a1) as shown in FIG. 13 is determined. 1,··· For multiple types of symbols determined by m 2 (When m is not a power of 2.) For example, 2 In the case of index t = 3, the length of the CBT code is different in binary format, such as 0, 10, and 11. In this embodiment, as shown in FIG. n Since (a0, a1,...) is determined for each symbol, for example, the lengths of multiple alpha codes can be made the same for symbols belonging to the same group, and symbols with small indices (with the same or high probability of occurrence) can be encoded into CBT codes as short as possible. This allows symbols with small indices to be encoded into shorter combined codes, improving compression efficiency.

[0130] [Extended Source S 2 Encoding of output data from: Without considering the code length of CBT code] In the above example, for symbols belonging to the same group, processing was performed so that symbols with smaller indexes (with the same or higher occurrence probability) could be encoded into shorter CBT codes, but for symbols belonging to the same group, the length of the CBT codes may not be taken into consideration. Even in this case, the length of the multiple alpha codes can be made shorter for symbols with higher occurrence probability, improving compression efficiency.

[0131] Below, we consider the extended information source S 2 Specifically, the second-order symbol "i0i1" is to be encoded, and the parameter m 2 The encoding procedure (steps E1' to E6') by the encoding unit 13 when the above equation is given will be described.

[0132] [Step E1'] The encoding unit 13 executes the same process as in step E1. [Step E2'] The encoding unit 13 executes the same process as in step E2. [Step E3'] The encoding unit 13 executes a process similar to that of step E3.

[0133] [Step E4'] The encoding unit 13 determines a0 and a1 that are to be input when converting from index t'2 to alpha code. In this embodiment, since the probability of all symbols in group g'2 is equal, it is sufficient that a0+a1=g'2 is satisfied and the symbols in the group can be uniquely identified. For example, a0 and a1 may be determined by the following equations (49) and (50).

[0134] a0 = t'2 (49) a1 = g'2 - t'2 (50)

[0135] In this example, according to equations (49) and (50), a0 and a1 are determined for index t'2 as shown in FIG.

[0136] [Step E5'] The encoding unit 13 uses a CBT code type number s to identify symbols encoded to the same (a0, a1). m2 Calculate the identification number S m2 is calculated using the following equation (51).

[0137] s m2 =t mod m 2 (51)

[0138] [Step E6'] The encoding unit 13 encodes a0 and a1 obtained in step E5' into alpha codes in order to obtain two alpha codes, and further encodes the type number s m2 For m 2 A CBT code is calculated by performing CBT encoding for the symbols, and a combined code is created by combining the two alpha codes and the CBT code. 2 One of the quadratic blocks output from the CBT code can be encoded into a joint code. 2 According to the coding for , the processing can be simplified compared to the case where the code length of the CBT code is taken into consideration.

[0139] Returning to the explanation of FIG. 1, the compressed data output unit 14 outputs a combined code obtained by encoding each block (symbol) and a parameter m n The compressed data (encoded data) in a file format is created by combining the above and the above, and is output to the decoder 30. Here, the parameter m n may be set.

[0140] The decoder 30 includes a compressed data input unit 31, an encoding / decoding unit 32, a target data calculation unit 33, and a target data processing unit 34. Here, the compressed data input unit 21 is an example of a receiving unit, and the encoding / decoding unit 32 is an example of a decoding unit.

[0141] The compressed data input unit 31 inputs compressed data (data to be processed) transmitted from the encoder 10 via the network 50.

[0142] The coder / decoder 32 generates a parameter m corresponding to each symbol in the combined code for each block (symbol) included in the compressed data. n The decoding according to this embodiment is performed using the following:

[0143] Next, the decoding according to this embodiment will be described.

[0144] [Decoding a joint code in which n-th symbol is encoded] Below is the nth order symbol "i0i1i2...i n-1 The target of decoding is the joint code in which "" is encoded, and the parameter m n The decoding procedure (steps D1 to D6) performed by the code-decoding unit 32 when the following formula is given will be described.

[0145] [Step D1] The code decoder 32 decodes a combined code including n alpha codes and a CBT code to obtain a0, a1, . . . , a n-1 ,s is found.

[0146] [Step D2] The codec 32 encodes each local group {g'1, g'2, . . . , g' n} is calculated according to the following formula (52).

[0147] {g'1,g'2,...,g' n}={a0,Σ k=0 2-1 a k , ,Σ k=0n-1 a k} ···(52)

[0148] [Step D3] The codec 32 determines g' n The index t corresponding to θ=1 / 2 in the group g’n is calculated using the following equation (53).

[0149] t g’n =Σ k=1 n η k (g' k ) ···(53)

[0150] [Step D4] The codec 32 detects that the symbol to be decoded is g' n The sequence number t indicates the number of the symbol in the group. g is calculated using equation (54).

[0151] t g =s(η n-1 (g n +1))+t g’n (54)

[0152] [Step D5] The codec 32 receives the index t of the symbol to be decoded. n is calculated based on equation (25).

[0153] [Step D6] The codec 32 receives the index t of the symbol to be decoded. n Then, by the following process, i0, i1, i2, …, i n-1 Restore. First, the codec 32 calculates g^ by the same calculation as in equation (29), that is, by solving the following equation (55): n Find and truncate the decimal part to g n Calculate.

[0154]

number

[0155] Next, the coder / decoder 32 calculates the group g n The local index t in n-1 is calculated using the following equation (56).

[0156] t n-1 =t n -η n (g n ) ···(56)

[0157] Next, the codec 32 converts the index t gn-1 The group g to which n-1 is calculated using equation (57), which is similar to equation (30).

[0158] i n-1 =g n -g n-1 (57)

[0159] Next, the codec 32 repeatedly uses the relational expression (57) to obtain i n-2 ,...,i1 are calculated, and for i0, i0=g1=t1 is set. This gives the nth symbol (i0i1i2...i n-1 ) can be restored. This allows each symbol, i.e., the blocked time series p n [t] can be obtained.

[0160] [Decoding a joint code in which secondary symbols are encoded] In the following, we consider the joint code in which the secondary symbol "i0i1" is encoded, and the parameter m 2 The decoding procedure (steps D1 to D6) performed by the code-decoding unit 32 when the following formula is given will be described.

[0161] [Step D1] The code decoder 32 decodes the combined code including the two alpha codes and the CBT code to obtain a0, a1, and s.

[0162] [Step D2] The codec 32 calculates each local group g'2 of the group corresponding to θ=1 / 2 by the following equation (58).

[0163] g'2 = a0 + a1 (58)

[0164] [Step D3] The codec 32 selects the index t corresponding to θ=1 / 2 in the group g′2. g’1 Let a0.

[0165] [Step D4] The codec 32 receives a sequence number t , which indicates the ordinal number of the symbol to be decoded in the group g′2. g is calculated using equation (59).

[0166] t g =s(g n +1)+tg'1···(59)

[0167] [Step D5] The codec 32 calculates the index t2 of the symbol to be decoded based on equation (44).

[0168] [Step D6] The codec 32 restores i0 and i1 from the index t2 of the symbol to be decoded by the following process. First, the coder / decoder 32 calculates g2 by the same calculation as in equation (22), that is, by solving the following equation (60).

[0169]

number

[0170] Next, the codec 32 calculates i0 using the relationship in equation (42).

[0171] Next, the codec 32 calculates i1 from the relationship i0+i1=g2. This makes it possible to restore the secondary symbol (i0i1). As a result, each symbol, that is, the blocked time series p 2 [t] can be obtained.

[0172] Returning to the explanation of FIG. 1, the target data calculation unit 33 calculates the blocked time series p n The prediction difference x'[t] is calculated by dividing the values ​​of each element of the n-th symbol of [t] into the conversion target data p[t], and performing the inverse mapping of the process of mapping positive and negative integers to non-negative integers using equation (3) using the following equation (60), i.e., by converting the non-negative integers back to the original positive and negative integers. x'[t]=g - (p[t]) (60) Here, g - () is a function that converts a non-negative integer into a positive or negative integer, and can be expressed as shown in equation (61).

[0173]

number

[0174] The target data calculation unit 33 performs the process shown in equation (62) on the prediction difference x'[t] to restore the data string x[t] of the voice data and create the original voice data (data to be compressed).

[0175]

number

[0176] The target data processing unit 34 processes the created voice data to output voice.

[0177] Next, the processing operation in the processing system 1 will be described.

[0178] First, the encoding process by the encoder 10 will be described.

[0179] FIG. 14 is a flowchart of an encoding process according to an embodiment.

[0180] In the encoding process, first, the target data input unit 11 accepts audio data to be encoded (S11).

[0181] Next, the prediction difference calculation unit 12 performs a process of calculating a prediction difference x'[t] for each data element (data at each point in time) of the audio data (S12).

[0182] Next, the encoding unit 13 converts the prediction difference x'[t] calculated by the prediction difference calculation unit 12 into conversion target data p[t] (data to be processed) to be encoded, and blocks each value of the conversion target data p[t] in units of n to generate a blocked time series p n Generate [t] (S13).

[0183] Next, the encoding unit 13 calculates a parameter m n is estimated (determined) (S14).

[0184] Next, the encoding unit 13 encodes the estimated parameters m n Blocked time series p according to n An encoding process is performed to encode each block of [t] into a combined code (S15).

[0185] Next, the compressed data output unit 14 outputs the combined code obtained by encoding all the blocks and the parameter m n The compressed data is generated by combining the above and the above, and is output (transmitted) to the decoder 30.

[0186] In this encoding process, the code length when the audio data is encoded can be shortened, and the compression efficiency of the audio data can be improved.

[0187] Next, the decoding process by the decoder 30 will be described.

[0188] FIG. 15 is a flowchart of a decoding process according to an embodiment.

[0189] The compressed data input unit 31 inputs compressed data (an example of data to be processed) transmitted from the encoder 10 via the network 50 (step S31).

[0190] Next, the coder / decoder 32 calculates a corresponding parameter m n By performing the decoding process using n [t] is obtained, and the blocked time series p n The values ​​of n elements included in each block of [t] are divided to obtain data p[t] to be transformed (S32).

[0191] Next, the target data calculation unit 33 converts each element of the conversion target data p[t] into a prediction difference x'[t], and restores each element of the prediction difference x'[t] to the original data string x[t] (S33).

[0192] Next, the target data calculation unit 33 puts all the data strings x[t] together to create voice data, and the target data processing unit 34 performs voice output processing using the created voice data (S34), and the process ends.

[0193] According to the above-described decoding process, it is possible to appropriately output audio based on the compressed data created by the encoder 10.

[0194] Next, the average code length of the combined code obtained by the above encoding will be described.

[0195] 16A and 16B are diagrams illustrating an average code length by encoding according to an embodiment. 2 The parameter m used in the encoding of this embodiment when θ of the geometric distribution for is changed 216(B) shows the average code length of the joint code obtained by encoding, and the average code length of the code obtained by Golomb encoding when the parameter m is set to 1, 2, and 3. FIG. 16(C) shows the average code length of the joint code obtained by encoding, and the average code length of the code obtained by Golomb encoding when the parameter m is set to 1, 2, and 3. 3 16(C) shows the average code length for each encoding when the geometric distribution θ of 4 The average code length for each encoding is shown when θ of the geometric distribution for is changed.

[0196] For example, as shown in FIG. 16(A), θ=2 -1 / √(5) An augmented information source S that follows a geometric distribution 2 In the encoding of this embodiment, 2 When m=5, the average code length of the combined code is 3.154 bits, whereas when m=1, 2, 3, the average code lengths of the codes based on Golomb coding are 3.753, 3.164, and 3.211 bits, respectively.

[0197] Expanded Source S 2 As shown in FIG. 16A, the average code length of the combined code of this embodiment is -1 / 2 When m=1, the average code length is the same as that of the Golomb coding code when m=2, but otherwise, the average code length can be made shorter than that of any of the Golomb coding codes, thereby improving the data compression efficiency.

[0198] Also, the expanded information source S 3 For this, as shown in FIG. 16B, the average code length of the combined code of this embodiment can be made shorter than the average code length of any code based on Golomb coding, thereby improving the data compression efficiency.

[0199] Also, the expanded information source S 4 For this, as shown in FIG. 16C, the average code length of the combined code of this embodiment can be made shorter than the average code length of any code based on Golomb coding, thereby improving the data compression efficiency.

[0200] The above-mentioned encoder 10 and decoder 30 can each be configured by a computer device.

[0201] Fig. 17 is a configuration diagram of a computer device according to an embodiment. In this embodiment, the encoder 10 and the decoder 30 are configured as separate computer devices, but these computer devices may have the same configuration. Therefore, in the following description, for convenience, the computer device shown in Fig. 17 will be used to describe the computer device that configures the encoder 10 and the decoder 30.

[0202] The computer device 100 includes, for example, a central processing unit (CPU) 101, a main memory 102, a graphics processing unit (GPU) 103, a reader / writer 104, a communication interface (communication I / F) 105, an auxiliary storage device 106, an input / output interface (input / output I / F) 107, an output device 108, and an input device 109. The CPU 101, the main memory 102, the GPU 103, the reader / writer 104, the communication I / F 105, the auxiliary storage device 106, the input / output I / F 107, and the output device 108 are connected via a bus 110. The encoder 10 and the decoder 30 are each configured by appropriately selecting a part or all of the components described in the computer device 100.

[0203] In the computer device 100 constituting the encoder 10, a CPU 101 executes a processing program stored in an auxiliary storage device 106 to constitute, for example, a target data input unit 11, a prediction difference calculation unit 12, an encoding unit 13, and a compressed data output unit 14.

[0204] In the computer device 100 constituting the decoder 30, the CPU 101 executes a processing program stored in the auxiliary storage device 106 to constitute, for example, a compressed data input unit 31, an encoding / decoding unit 32, a target data calculation unit 33, and a target data processing unit 34.

[0205] The main memory 102 is, for example, a RAM, a ROM, etc., and stores programs (processing programs, etc.) executed by the CPU 101 and various information. The auxiliary storage device 106 is, for example, a non-temporary storage device (non-volatile storage device) such as a Hard Disk Drive (HDD) or a Solid State Drive (SSD), and stores the programs executed by the CPU 101 and various information.

[0206] The GPU 103 is a processor that is suitable for executing a specific process, for example, a process that is performed in parallel. In this embodiment, the GPU 103 executes a predetermined process according to an instruction from the CPU 101.

[0207] The reader / writer 104 is detachably attached to the recording medium 111, and reads data from the recording medium 111 and writes data to the recording medium 111. The recording medium 111 may be, for example, a non-temporary recording medium (non-volatile recording medium) such as an SD memory card, an FD (floppy disk: registered trademark), a CD, a DVD, a BD (registered trademark), or a flash memory. In this embodiment, a processing program may be stored in the recording medium 111, and the reader / writer 104 may read and use the processing program. In the computer device 100 constituting the encoder 10, audio data to be processed may be stored in the recording medium 111, and the reader / writer 104 may read and use the processing program. In the computer device 100 constituting the encoder 10, the reader / writer 104 may store compressed data in the recording medium 111. In the computer device 100 constituting the decoder 30, the reader / writer 104 may read and use the compressed data from the recording medium 111.

[0208] The communication I / F 105 is connected to a network 50 , and transmits and receives data to and from other devices connected to the network 50 .

[0209] The input / output I / F 107 is connected to an input device 109 such as a mouse or a keyboard. In the computer device 100 constituting the encoder 10, the input / output I / F 107 accepts operation input by a user of the encoder 10 using the input device 109. Also, in the computer device 100 constituting the decoder 30, the input / output I / F 107 accepts operation input by a user of the decoder 30 using the input device 109.

[0210] The output device 108 is, for example, a display device such as a liquid crystal display or a speaker device, and outputs various types of information for display and sound. The output device 108 is used, for example, in the decoder 30, for outputting sound by the target data processing unit 34.

[0211] The present invention is not limited to the above-described embodiment and modified examples, and can be appropriately modified and implemented without departing from the spirit of the present invention.

[0212] For example, in the above embodiment, the encoder 10 creates a file for the entire target data and transmits the file to the decoder 30. The present invention is not limited to this, and the encoder 10 may transmit, for example, compressed data for each block sequentially.

[0213] Furthermore, in the above embodiment, the original data is encoded without distortion, but the present invention is not limited to this, and the original data may be encoded after distortion processing such as quantization.

[0214] Furthermore, in the above embodiment, the target of encoding is audio data, but the present invention is not limited to this, and the target of encoding may be data other than audio, for example, image data.

[0215] In the above embodiment, an example has been shown in which the computer device 100 includes either the encoder 10 or the decoder 30. The present invention is not limited to this, and the computer device 100 may include both the encoder 10 and the decoder 30. [Explanation of symbols]

[0216] 1... processing system, 10... encoder, 11... target data input unit, 12... predicted difference calculation unit, 13... encoding unit, 14... compressed data output unit, 30... decoder, 31... compressed data input unit, 32... encoding / decoding unit, 33... target data calculation unit, 34... target data processing unit, 50... network, 100... computer device, 101... CPU, 102... main memory, 108... output device, 111... recording medium

Claims

1. 1. An encoder for encoding encoding target data including a plurality of integer values, comprising: an identification unit that identifies block data in which a plurality of integer values ​​are arranged from the encoding target data; An encoding unit that encodes the block data into a combined code that combines a plurality of alpha codes and a CBT code. Encoder.

2. The encoding unit encodes a plurality of types of block data into a combined code in which the plurality of alpha codes have the same value and the CBT code has a different value. The encoder of claim 1 .

3. The encoding unit determines the values ​​of the alpha codes to be assigned to the block data based on the occurrence probability of the sequence of the integer values ​​of the block data. The encoder of claim 2 .

4. The encoding unit performs encoding such that the plurality of alpha codes assigned to the block data having a high occurrence probability tend to be short. The encoder of claim 3.

5. The encoding unit performs encoding so that the CBT code assigned to the block data having a high occurrence probability becomes shorter. The encoder of claim 3.

6. A transmitter for transmitting the combined code to an encoder. The encoder of claim 1 .

7. A decoder for decoding encoded data, comprising: The encoded data includes a combined code obtained by encoding block data in which a plurality of integer values ​​are arranged, the combined code being a combination of a plurality of alpha codes and a CBT code, A reception unit that receives the encoded data; a decoding unit that decodes a combined code included in the encoded data into the plurality of integer values. decoder.

8. An encoding method for encoding target data including a plurality of integer values, comprising: Identifying a block of data in which a plurality of integer values ​​are arranged from the encoding target data; The block data is encoded into a combined code that combines a plurality of alpha codes and a CBT code. The encoding method.

9. A decoding method for decoding encoded data, comprising: The encoded data includes a combined code obtained by encoding block data in which a plurality of integer values ​​are arranged, the combined code being a combination of a plurality of alpha codes and a CBT code, Accepts the encoded data, Decoding a combined code included in the encoded data into the plurality of integer values. How to decode.