Transformation device, encoding device, decoding device, methods thereof, and recording medium
By transforming the integer value sequence through unary coding and bit inversion processing, it adapts to Glenbeam coding, which solves the problem of low coding efficiency of integer value sequence in the existing technology, and achieves more efficient bit number reduction and compression performance improvement.
Patent Information
- Application Number
- CN201980084188.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-12-21
- Filing Date
- 2019-12-09
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2039-12-09
AI Technical Summary
When the existing technology encodes integer value sequences, especially sequences containing zero values or biased towards small values, it is difficult to effectively reduce the average number of bits, resulting in reduced compression performance.
Using unary coding and bit inversion processing, the non-negative integer value sequence is transformed, and the transformed sequence is generated and subjected to Glenn cloth encoding or Glenn cloth-Rice encoding to adapt to highly biased distributions and achieve less averaging Bit number encoding.
Even integer value sequences that contain zero values or tend to be small values can be encoded with a smaller average number of bits, and the original integer value sequence can be restored after decoding, improving compression efficiency.
Smart Images

Figure CN113243085B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a technique for encoding and decoding a sample sequence composed of integer values, such as a sample sequence of a time series digital signal of sound or voice, and also relates to a transformation of a sequence of integer values used for encoding and decoding. Background Art
[0002] As a technique for encoding a sample sequence for the purpose of compression, there is a technique for reducing the bit length used in describing the sample sequence by reversibly encoding a finite precision value (hereinafter referred to as an integer value) obtained by quantizing the sample value. In this technique, which integer value is assigned a code of which length is directly related to the compression performance. This fact is also true in engineering applications of encoding and decoding of sample sequences, such as image encoding for encoding and decoding a sample sequence of an image signal, and sound encoding for encoding and decoding a sample sequence of an sound signal.
[0003] Generally, in variable-length reversible coding, there are constraints on the structure of the codes assigned to integer values due to the constraints of decodability. Specifically, the constraints are as follows: if a short code is assigned to a certain integer value, then in order to make it a decodable code, long codes must be assigned to other integer values. Therefore, in order to improve compression performance, it is necessary to make the structure of the code (the assignment of codes to each integer value) suitable for the distribution of values in the sequence of integer values. Specifically, by assigning short codes to integer values with a high probability of occurrence and assigning long codes to integer values with a low probability of occurrence, the expected value of the bit length of the sequence of integer values after compression can be reduced.
[0004] Golomb codes are used as one of the simplest variable length codes in reversible coding as described above. Golomb codes are known to achieve the minimum expected bit length (minimum bit length) when the sequence of integer values belongs to an exponential distribution, that is, when the probability of occurrence of integer values decreases exponentially with respect to the size of the value.
[0005] Since the Grumb code has a very simple structure, it is widely used. For example, when encoding a sequence of absolute values of integer values obtained by AD-converting an acoustic signal into a sequence of integer values of PCM or a sequence of spectrum converted into the sequence by Fourier transforming the sequence, the Grumb code is used. Alternatively, when encoding a sequence of non-negative integer values obtained by replacing each sample value x of the sequence of integer values with x' obtained by the following formula (1), the Grumb code is used.
[0006]
Mathematical formula 1
[0007]
[0008] Therefore, the following describes the case where non-negative integer values are encoded and decoded. However, based on the above-mentioned fact that integer values as a whole can be converted into non-negative integer values one-to-one by formula (1) or the like, by converting integer values as a whole into non-negative integer values by formula (1) or the like at the front stage of the encoding process, or by converting non-negative integer values into integer values as a whole by inverse conversion of formula (1) or the like at the back stage of the decoding process, it is also possible to apply to encoding and decoding of integer values as a whole.
[0009] In Golomb coding, the code for a non-negative integer input x is set to increase by 1 bit each time the value of the input x increases by s according to the value of the Golomb parameter s, so that a sequence of non-negative integer values that follows the exponential distribution (one-sided Laplace distribution) of the following formula (2) can be encoded to approximately provide the optimal expected bit length.
[0010]
Mathematical formula 2
[0011]
[0012] Here, the Golomb parameter s is a natural number. That is, if the Golomb parameter s is set to a small natural number, a sequence with a large bias in value can be encoded with a smaller average number of bits, and if s is set to a large natural number, a sequence with a small bias in value can be encoded with a smaller average number of bits. In addition, the Golomb code in which s is a power multiplier of 2 is particularly called the Golomb-Rice code. Specifically, the Golomb-Rice code is when the Rice parameter (Rice parameter) which is a non-negative integer value is set to r, and the Golomb parameter s=2 is used. r The Glenbow code at the time. Figure 1 is an example of a Glenburn-Rice code.
[0013] However, in the actual distribution of the sequence of non-negative integer values input, s in equation (2) can take any real value greater than 0. On the other hand, for Grumb codes, the Grumb parameter s cannot be made less than 1. r For r, in the actual distribution of the sequence of non-negative integer values input, r can take any real value, while for the Grumb-Rice code, the Rice parameter r cannot be negative. Therefore, for example, following the distribution p(x, 2 -2 ) values, the sequence of values of the same sequence is more biased than the distribution p(x, 2 -1 ) is large, no matter how the Glumb parameter s or the Rice parameter r is set, the compression efficiency is reduced.
[0014] For example, when an audio signal is converted into PCM by AD conversion, since the range of numerical values that can be expressed is set so that even a loud volume can be recorded, the values included in the sequence of most signals tend to be biased toward values with small absolute values in the range of numerical values that can be expressed. In particular, since there are time intervals in which no sound is emitted, the sound signal tends to be zero or a very small value with only background noise. Moreover, the sequence of integer values obtained by dividing each value included in the sequence of such a signal by the quantization value is further biased toward small values including zero values compared to the original sequence due to quantization.
[0015] As a prior art for encoding a sequence of integer values that is biased toward zero, there is the technology of non-patent document 1. In the technology of non-patent document 1, for a zero value included in a sequence of input integer values, the number of consecutive zero values is encoded with a predetermined fixed number of bits, and for a value other than a zero value included in the sequence of input integer values, a value obtained by subtracting 1 from the value (value -1) is subjected to Glenn-Rice encoding.
[0016] Furthermore, as a prior art for encoding a sequence of integer values that tends to include a small value of zero, there is the technology of non-patent document 2. The technology of non-patent document 2 is to associate a group of two integer values with an integer value in advance like a bijection, transform the group of two integer values included in the sequence of integer values into one integer value, and perform Glumb-Rice coding on the transformed sequence of integer values.
[0017] Prior art literature
[0018] Non-patent literature
[0019] Non-patent document 1: HSMalvar, "Adaptive Run-Length / Golomb-Rice Encoding ofQuantized Generalized Gaussian Sources with Unknown Statistics", in Proc.DataCompression Conference (DCC) 06, IEEE Computer Society, pp.23-32, Mar.2006.
[0020] Non-patent literature 2: Takamura Seiyuki, Yashima Yuyuki, "Symbolization of the efficiency of distribution of image information sources", Journal of the Image Information Society, Vol.61, No.9, pp.1357-1362, 2007. Summary of the invention
[0021] Problems to be solved by the invention
[0022] According to the technique of non-patent document 1, it is possible to encode zero values with a small average number of bits. However, in the technique of non-patent document 1, since encoding is performed on values other than zero values in a manner substantially similar to Glumb-Rice encoding, the distribution p(x, 2 -1 ) there is a problem of reduced compression performance.
[0023] Furthermore, the technique of non-patent document 1 is not a coding method corresponding to the distribution expressed mathematically. Therefore, in the technique of non-patent document 1, although the distribution of values in the sequence of integer values is known, there is still a problem that it is unknown which number of bits to select for encoding as the number of consecutive zero values to be expressed so that encoding can be performed with a smaller average number of bits.
[0024] On the other hand, according to the technology of Non-Patent Document 2, it is possible to -1 ) is encoded with a smaller average number of bits. However, the technique of non-patent document 2 has the following problem: the average number of bits for an integer value cannot be less than 0.5 bits, and the compression performance is reduced for a sequence of integer values with a large bias such that the theoretically optimal average number of bits is less than 0.5 bits.
[0025] Therefore, an object of the present invention is to provide a conversion technology for a sequence of integer values for encoding and decoding that can be encoded with a small average number of bits even if the sequence includes integer values that are small values other than zero and whose distribution is largely biased toward small values.
[0026] Means for solving problems
[0027] In the present invention, the following transformation process is performed on a sequence of non-negative integer values before a variable-length and reversible integer coding process such as Grumbue coding is performed, or a sequence of non-negative integer values obtained by a variable-length and reversible integer decoding process such as Grumbue decoding is performed: unary coding is performed on the sequence of non-negative integer values, and unary decoding is performed on a code string obtained by bit-reversing '0' and '1' of the code string obtained by the unary coding, thereby obtaining a transformed sequence of non-negative integer values.
[0028] Here, the unary code refers to a code composed of a rule that a non-negative integer value, a code consisting of a combination of a number of bit values '1' corresponding to the non-negative integer value, and a bit value '0', such as when the non-negative integer value is 0, the code is '0', when the non-negative integer value is 1, the code is '10', and when the non-negative integer value is 2, the code is '110'. That is, unary encoding refers to a process of obtaining a code string based on unary codes corresponding to each non-negative integer value included in a sequence of non-negative integer values inputted. In addition, unary decoding refers to a process of obtaining a sequence of non-negative integer values corresponding to each unary code included in a code string inputted.
[0029] In addition, a variable-length and reversible code such as a Grumb code used in an integer encoding process or an integer decoding process is a variable-length and reversible code in which the number of bits of a code corresponding to a non-negative integer value has a monotonically non-decreasing relationship with respect to the non-negative integer value. That is, a variable-length and reversible integer encoding process such as a Grumb code is a process of obtaining a code corresponding to an input non-negative integer value according to a variable-length and reversible encoding rule, wherein it is possible to assign a code with the same number of bits to a plurality of non-negative integer values, but a code with a small number of bits is not assigned to a larger value among the plurality of non-negative integer values. In addition, a variable-length and reversible integer decoding process such as a Grumb decoding is a process of obtaining a non-negative integer value corresponding to an input code according to a variable-length and reversible decoding rule, wherein it is possible to obtain different non-negative integer values from a plurality of codes with the same number of bits, but a non-negative integer value obtained from a code with a larger number of bits among a plurality of codes with different number of bits is always larger than a non-negative integer value obtained from a code with a smaller number of bits.
[0030] Alternatively, in the present invention, the following transformation process is performed on a sequence of non-negative integer values before a variable-length and reversible integer encoding process such as Grunbu coding is performed, or a sequence of non-negative integer values obtained by a variable-length and reversible integer decoding process such as Grunbu decoding is performed: a code string obtained by performing unary coding on the sequence of non-negative integer values is decoded using unary decoding with a rule in which bits of '0' and '1' are reversed compared to the rule of the unary coding, thereby obtaining a sequence of non-negative integer values after transformation. In the case of the above-mentioned unary code rule, the rule in which bits of '0' and '1' are reversed refers to the rule that if the non-negative integer value is 0, the code is '1', if the non-negative integer value is '1', the code is '01', and if the non-negative integer value is 2, the code is '001', so that the non-negative integer value corresponds to a code obtained by combining a number of bit values '0' corresponding to the non-negative integer value and a bit value '1'.
[0031] Effects of the Invention
[0032] According to the present invention, even a sequence of integer values that also includes a small value that is not a zero value and is greatly biased toward a small value, or a sequence of integer values that has a bias in value that cannot be fully handled by the technology of Non-Patent Document 2, can be encoded after performing the conversion processing of the present invention, thereby encoding with a small average number of bits. In addition, by decoding the code obtained in such encoding and then performing the conversion processing of the present invention, the original sequence of integer values can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a graph showing an example of a Glumb-Rice code for non-negative integer values.
[0034] Figure 2 This is a block diagram showing an example of the configuration of the encoding device 200 according to the first embodiment.
[0035] Figure 3 This is a flowchart showing an example of the operation of the encoding device 200 according to the first embodiment.
[0036] Figure 4 is a diagram showing examples of unary codes for non-negative integer values.
[0037] Figure 5 This is a block diagram showing an example of the configuration of the decoding device 300 according to the first embodiment.
[0038] Figure 6 This is a flowchart showing an example of the operation of the decoding device 300 according to the first embodiment.
[0039] Figure 7 It means to make Figure 4 A diagram of a regular unary code after the bit values of the unary code are reversed.
[0040] Figure 8 This is a block diagram showing an example of the structure of the encoding device 400 according to the second embodiment.
[0041] Fig. 9 This is a flowchart showing an example of the operation of the encoding device 400 according to the second embodiment.
[0042] Fig.10 This is a block diagram showing an example of the configuration of a decoding device 500 according to the second embodiment.
[0043] Fig.11 This is a flowchart showing an example of the operation of the decoding device 500 according to the second embodiment.
[0044] Fig.12 This is a block diagram showing an example of the structure of the encoding device 600 according to the third embodiment.
[0045] Fig.13 This is a flowchart showing an example of the operation of the encoding device 600 according to the third embodiment.
[0046] Fig.14 This is a block diagram showing an example of the structure of the decoding device 700 according to the third embodiment.
[0047] Fig.15 This is a flowchart showing an example of the operation of the decoding device 700 according to the third embodiment. DETAILED DESCRIPTION
[0048] Hereinafter, the embodiments of the present invention will be described in detail. In addition, the same reference numerals are given to components having the same functions, and repeated descriptions are omitted.
[0049] <First embodiment>
[0050] 《Encoding Device》
[0051] Reference Figure 2 as well as Figure 3 , the processing procedure of the encoding method performed by the encoding device 200 including the first embodiment of the transform device 100 of the present invention is described. Figure 2 As shown, the encoding device 200 of the first embodiment includes a transform device 100 and an integer encoding unit 210. The transform device 100 includes a unary encoding unit 110, a bit reversal processing unit 120, and a unary decoding unit 130. The encoding device 200 of the first embodiment performs Figure 3 The processing of each step shown realizes the encoding method of the first embodiment including the transformation method of the present invention.
[0052] A sequence of non-negative integer values is input to the encoding device 200 of the first embodiment. As the sequence of non-negative integer values, for example, a signal obtained by converting a sound or music picked up by a microphone into a digital signal, or a signal obtained by converting an image or video taken by a camera into a digital signal, a part of the signal or the whole signal may be quantized into a finite precision value by conventional technology, and the absolute value sequence of the integer value, or the sequence of x' obtained by using the integer value x and formula (1) may be used as input.
[0053] The encoding device 200 of the first embodiment transforms the sequence of integer values input to the encoding device 200 by the transform device 100 to obtain a sequence of transformed integer values, and performs integer encoding on the sequence of transformed integer values, thereby realizing encoding processing with a shorter bit length than the case where the sequence of integer values input to the encoding device 200 is directly integer encoded without using the transform device 100, for a sequence of non-negative integer values having a distribution with a larger bias than the distribution assumed by integer encoding such as Glumb encoding or Glumb-Rice encoding. In the following description, the non-negative integer value input to the encoding device 200 is simply referred to as an "integer value".
[0054] [Unary encoding unit 110]
[0055] The unary encoding unit 110 receives a sequence of integer values based on N samples (N is a natural number) at each time (hereinafter referred to as an input integer sequence) from among the sequence of integer values input to the encoding device 200. The unary encoding unit 110 performs unary encoding on the input integer sequence to obtain a code string of unary codes for the input integer sequence, and outputs the obtained code string of unary codes to the bit reversal processing unit 120 (step S110).
[0056] The code string of the unary code is obtained by the unary coding unit 110 for x when i=1, ..., N. i Each of them gets a unary code, that is, based on x i The integer value and the unary code corresponding to the integer value are obtained by concatenating the codes of 1 bit value '1' and 1 bit value '0'. Figure 4 shown.
[0057] [Bit inversion processing unit 120]
[0058] The bit inversion processing unit 120 receives the code string of the unary code output by the unary encoding unit 110, and replaces the bit value '0' with the bit value '1' and the bit value '1' with the bit value '0' for each bit of the code string of the unary code, respectively, to obtain the replaced code string (hereinafter referred to as the inverted unary code code string), and outputs the obtained inverted unary code code string to the unary decoding unit 130 (step S120).
[0059] [Unary decoding unit 130]
[0060] The unary decoding unit 130 receives the code string of the inverted unary code output by the bit reversal processing unit 120, performs unary decoding on the code string of the inverted unary code, obtains a sequence of integer values (hereinafter referred to as a transformed integer sequence), and outputs the obtained transformed integer sequence to the integer encoding unit 210 (step S130).
[0061] Unary decoding is performed by the unary decoding unit 130 as follows: the unary decoding unit 130 reads the code string of the inverted unary code until the bit '0' appears, obtains the number of bit values '1' that appear during the period as an integer value, and sequentially performs the above processing from the beginning to the end of the code string of the inverted unary code. In addition, the unary decoding unit 130 obtains the number of bit values '1' that appear during the period from the bit that has been read to the end of the code string of the inverted unary code after the integer value is obtained immediately before as an integer value only when the unary decoding unit 130 reads to the end of the code string of the inverted unary code.
[0062] Alternatively, the unary decoding unit 130 may first append a bit value '0' to the end of the code string of the inverted unary code, then read the code string of the inverted unary code with the bit value '0' appended until the bit value '0' appears, obtain the number of bit values '1' appearing during the reading as an integer value, and perform the above processing in sequence from the beginning to the end of the code string of the inverted unary code with the bit value '0' appended.
[0063] [Integer encoding unit 210]
[0064] The integer encoding unit 210 receives the transformed integer sequence output by the unary decoding unit 130, obtains integer codes by performing variable-length and reversible encoding such as Grunbuch encoding on the transformed integer sequence, and outputs the obtained integer codes (step S210).
[0065] The variable-length reversible encoding performed by the integer encoding unit 210 is a process of obtaining an integer code corresponding to an input integer value according to a variable-length reversible encoding rule such as Glumb encoding or Glumb-Rice encoding, in which a code having the same number of bits (code having the same length) may be assigned to a plurality of integer values, but a code having a smaller number of bits (a shorter code) may not be assigned to a larger value among the plurality of integer values. That is, the variable-length reversible encoding performed by the integer encoding unit 210 may be a variable-length reversible encoding such as Glumb encoding with a Glumb parameter of 1 or Glumb-Rice encoding with a Rice parameter of 0, in which a larger code having a larger number of bits (a longer code) is assigned to a larger integer value, or may be a variable-length reversible encoding such as Glumb encoding with a Glumb parameter of 2 or more or Glumb-Rice encoding with a Rice parameter of 1 or more, in which a code having the same number of bits may be assigned to a plurality of integer values, but a code having a smaller number of bits may not be assigned to a larger value among the plurality of integer values. In other words, the variable-length and reversible encoding performed by the integer encoding unit 210 can be said to be a process of obtaining an integer code corresponding to an input integer value according to a variable-length and reversible encoding rule in which the integer value and the code corresponding to the integer value have a monotonically non-decreasing relationship in the number of bits of the code with respect to the integer value.
[0066] The code '0' described above is an example of a bit value of either of the two-valued bit values, and the code '1' described above is an example of a bit value of the other of the two-valued bit values. That is, of course, the code '1' can be used instead of the code '0' described above, and the code '0' can be used instead of the code '1'.
[0067] [[Encoding Processing Example]]
[0068] As an example of encoding processing, the encoding processing is described in the case where the input integer sequence is 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, and the integer encoding unit 210 performs the Glenn-Rice encoding with the Rice parameter r=1. First, the unary encoding unit 110 performs unary encoding on the input integer sequence to obtain a code string of unary code '10001000001001010110000'. Next, the bit reversal processing unit 120 replaces the bit value '0' with the bit value '1' and the bit value '1' with the bit value '0' for each bit of the code string '10001000001001010110000', respectively, to obtain a code string of inverted unary code '01110111110110101001111'. Next, the unary decoding unit 130 performs unary decoding on the code string '01110111110110101001111' of the inverted unary code, and obtains a transformed integer sequence 0, 3, 5, 2, 1, 1, 0, 4. Next, the integer encoding unit 210 encodes the transformed integer sequence 0, 3, 5, 2, 1, 1, 0, 4 using the Glumb-Rice code with the Rice parameter r=1, and obtains an integer code '0010111011000101001100'.
[0069] Decoding Device
[0070] Reference Figure 5 as well as Figure 6 , the processing procedure of the decoding method executed by the decoding device 300 including the first embodiment of the transform device 100 of the present invention is described. Figure 5 As shown, the decoding device 300 of the first embodiment includes an integer decoding unit 310 and a transform device 100. The transform device 100 includes a unary encoding unit 110, a bit reversal processing unit 120, and a unary decoding unit 130. The decoding device 300 of the first embodiment performs Figure 6 The processing of each step shown realizes the decoding method of the first embodiment including the transformation method of the present invention.
[0071] The decoding device 300 of the first embodiment receives the integer code output by the encoding device 200 of the first embodiment. The decoding device 300 of the first embodiment performs integer decoding on the input integer code to obtain a sequence of integer values, and transforms the sequence of integer values obtained by integer decoding by the transformation device 100 to obtain a sequence of transformed integer values, thereby restoring the sequence of non-negative integer values input to the encoding device 200 of the first embodiment. In the following description, as in the description of the encoding device 200, non-negative integer values are simply referred to as "integer values".
[0072] [Integer decoding unit 310]
[0073] The integer decoding unit 310 receives the integer code input to the decoding device 300, performs variable-length and reversible decoding corresponding to the variable-length and reversible encoding performed by the integer encoding unit 210 of the encoding device 200, such as Grunb decoding, to obtain a sequence of integer values, and outputs the obtained sequence of integer values to the unary encoding unit 110 (step S310). The sequence of integer values obtained by the integer decoding unit 310 is a sequence obtained by restoring the transformed integer sequence itself input to the integer encoding unit 210 of the encoding device 200, and therefore the sequence of integer values obtained by the integer decoding unit 310 is called a decoded transformed integer sequence.
[0074] The variable-length and reversible decoding performed by the integer decoding unit 310 is, for example, a process such as Grumb decoding or Grumb-Rice decoding, in which an integer value corresponding to an input integer code is obtained according to the following variable-length and reversible decoding rule: different integer values may be obtained from a plurality of codes with the same number of bits, but the integer value obtained from the one with a larger number of bits among the plurality of codes with different number of bits is always greater than the integer value obtained from the one with a smaller number of bits. That is, the variable-length and reversible decoding performed by the integer decoding unit 310 may be, for example, a Glumb decoding with a Glumb parameter of 1 or a Glumb-Rice decoding with a Rice parameter of 0, in which a larger integer value is obtained for a code with a larger number of bits (a longer code). It may also be a variable-length and reversible decoding, for example, a Glumb decoding with a Glumb parameter of 2 or more or a Glumb-Rice decoding with a Rice parameter of 1 or more, in which, although different integer values can be obtained from a plurality of codes with the same number of bits, the integer value obtained from the code with a larger number of bits among the plurality of codes with different number of bits is always greater than the integer value obtained from the code with a smaller number of bits. However, it is also necessary to be a reversible decoding corresponding to the reversible encoding performed by the integer encoding unit 210 of the encoding device 200. In other words, the variable-length and reversible decoding performed by the integer decoding unit 310 is a reversible decoding corresponding to the reversible encoding performed by the integer encoding unit 210 of the encoding device 200, and can be said to be a process of obtaining an integer value corresponding to an input integer code according to a variable-length and reversible decoding rule in which a code and an integer value corresponding to the code have a monotonically non-decreasing relationship in which the number of bits of the code is monotonically non-decreasing with respect to the integer value.
[0075] [Unary encoding unit 110]
[0076] The unary coding unit 110 receives the decoded transformed integer sequence output by the integer decoding unit 310, performs unary coding on the decoded transformed integer sequence, obtains a code string of unary codes for the decoded transformed integer sequence, and outputs the obtained code string of unary codes (hereinafter referred to as a code string of decoding-side unary codes) to the bit reversal processing unit 120 (step S110). The unary coding performed by the unary coding unit 110 of the transform device 100 included in the decoding device 300 is the same as the unary coding performed by the unary coding unit 110 of the transform device 100 included in the encoding device 200.
[0077] [Bit inversion processing unit 120]
[0078] The bit inversion processing unit 120 receives the code string of the decoding side unary code output by the unary encoding unit 110, and replaces the bit value '0' with the bit value '1' and the bit value '1' with the bit value '0' for each bit of the code string of the decoding side unary code, respectively, to obtain the replaced code string (hereinafter referred to as the code string of the decoding side inverted unary code), and outputs the obtained code string of the decoding side inverted unary code to the unary decoding unit 130 (step S120).
[0079] [Unary decoding unit 130]
[0080] The unary decoding unit 130 receives the code string of the unary code inverted on the decoding side output by the bit inversion processing unit 120, performs unary decoding on the code string of the unary code inverted on the decoding side, obtains a sequence of integer values (hereinafter referred to as a decoded integer sequence), and outputs the obtained decoded integer sequence (step S130).
[0081] Unary decoding is performed by the unary decoding unit 130 of the conversion device 100 included in the decoding device 300 as follows: the unary decoding unit 130 reads the code string of the unary code inverted on the decoding side until the bit value '0' appears, obtains the number of bit values '1' that appear during this period as an integer value, and sequentially performs the above-mentioned processing from the beginning to the end of the code string of the unary code inverted on the decoding side. In addition, since the bit value at the end of the code string of the unary code inverted on the decoding side is '1' and the bit value immediately before it is '0', the unary decoding unit 130 of the conversion device 100 included in the decoding device 300 ignores the bit value '1' at the end of the code string of the unary code inverted on the decoding side, and takes the bit value '0' immediately before the bit at the end of the code string of the unary code inverted on the decoding side as the object of unary decoding.
[0082] Alternatively, the unary decoding unit 130 may also be performed as follows: first, the bit value '1' at the end of the code string of the unary code inverted on the decoding side is deleted, and then, for the code string of the unary code inverted on the decoding side after the bit value '1' is deleted, the code string is read until the bit value '0' appears, and the number of bit values '1' appearing in the meantime is obtained as an integer value, and the above processing is performed sequentially from the beginning to the end of the code string of the unary code inverted on the decoding side.
[0083] In addition, the code '0' described above is an example of a bit value of either of the two-value bit values, and the code '1' described above is an example of a bit value of the other of the two-value bit values. That is, of course, when the code '1' is used instead of the code '0' described above and the code '0' is used instead of the code '1' in the encoding device 200, the code '1' is also used instead of the code '0' described above in the decoding device 300, and the code '0' is used instead of the code '1'.
[0084] [[Decoding Processing Example]]
[0085] As an example of decoding processing, the integer code '0010111011000101001100' is input, and the integer decoding unit 310 performs a decoding process when performing Glumb-Rice decoding with a Rice parameter r=1. First, the integer decoding unit 310 decodes the integer code '0010111011000101001100' by Glumb-Rice decoding with a Rice parameter r=1, and obtains a decoded transformed integer sequence 0, 3, 5, 2, 1, 1, 0, 4. Next, the unary encoding unit 110 performs unary encoding on the decoded transformed integer sequence 0, 3, 5, 2, 1, 1, 0, 4, and obtains a code string '011101111101101010011110' of a decoded side unary code. Next, the bit reversal processing unit 120 replaces the bit value '0' with the bit value '1' and the bit value '1' with the bit value '0' for each bit of the code string '0111011111011010011110' of the decoding side unary code, and obtains the code string '100010000010010101100001' of the decoding side inverted unary code. Next, the unary decoding unit 130 performs unary decoding on the code string '100010000010010101100001' of the decoding side inverted unary code, and obtains the decoded integer sequence 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0.
[0086] <Description of the Principle of the Invention>
[0087] The principle of the present invention is explained here.
[0088] In the transformation performed by the transformation device 100 of the present invention, in particular, for an exponential distribution that is highly biased toward smaller values, that is, for a positive number θ that is sufficiently smaller than 0.5, for the conversion that follows the rule p(x, θ) = (1-θ)θ x The exponentially distributed integer sequence represented by θ is guaranteed to be transformed into an integer sequence that can be optimally encoded by the Grumb code. Generally, the Grumb code using the Grumb parameter s assumes that θ = 2- 1 / s Since s is greater than 1, the compression efficiency is reduced for the exponential distribution with θ less than 0.5. However, according to the following principle, by performing a transformation based on the transformation device 100 of the present invention, the integer sequence following the exponential distribution p(x, θ) can be transformed into an integer sequence following the exponential distribution p(x, 1-θ). Since (1-θ) is greater than 0.5, the distribution of the integer sequence after the transformation becomes a biased distribution that can be effectively encoded using the Grumman code, which originally has a large bias such as θ less than 0.5.
[0089] In the transformation performed by the transformation device 100 of the present invention, the input integer sequence is first univariately encoded. If the distribution followed by the integer sequence is the exponential distribution p(x, θ), then the probability of occurrence of the bit value '1' of the univariate code obtained by the univariate encoding is θ, and the probability of occurrence of the bit value '0' is (1-θ). By reversing the bit value '1' and the bit value '0' of the obtained univariate code, the probability of occurrence of each bit value is also reversed, and the probability of occurrence of the bit value '1' becomes (1-θ), and the probability of occurrence of the bit value '0' becomes θ. When the reversed univariate code is decoded, the obtained integer sequence follows the exponential distribution p(x, 1-θ) in which θ is replaced by (1-θ). Therefore, according to the transformation device 100 of the present invention, it is possible to transform an integer sequence with a large bias into an integer sequence with a small bias. That is, if the input integer sequence is transformed by the transformation device 100 of the present invention, and the transformed integer sequence is encoded by integer coding processing such as Grenbull coding, it is possible to transform a highly biased integer sequence that cannot be effectively encoded by Grenbull coding, etc. into a biased integer sequence within a range that can be effectively encoded by Grenbull coding, etc., and then encode it.
[0090] In addition, in implementation, as described in the first embodiment, although it is necessary to perform unary decoding including an exception process for the end of the code string, in principle, the transformed integer sequence obtained by the transformation device 100 of the present invention is transformed by the transformation device 100 of the present invention, and the integer sequence obtained by the transformation device 100 of the present invention after the transformation is further transformed by the transformation device 100 of the present invention becomes the input integer sequence. Therefore, according to the transformation device 100 of the present invention, it is possible to return the integer sequence with small bias obtained by the transformation of the integer sequence with large bias by the transformation device 100 of the present invention to the original integer sequence with large bias. That is, if the integer code input in the integer decoding process corresponding to the integer encoding process performed on the encoding side is decoded in the transformation device 100 of the present invention to obtain an integer sequence, and the integer sequence obtained in the integer decoding process is transformed to obtain a decoded integer sequence, then the decoded integer sequence is the same as the integer sequence input on the encoding side.
[0091] From the above, it can be said that the transformation device 100 of the present invention is a transformation device that can reversibly transform the bias of an integer sequence.
[0092] When the integer encoding unit 210 and the integer decoding unit 310 use the Glenbuch code, when performing Glenbuch coding on the integer sequence transformed by the transform device 100 of the present invention provided in the encoding device 200, an appropriate Glenbuch parameter s' is θ=2 obtained from the distribution of the original integer sequence before the transform device 100 of the present invention. -1 / s, according to 1-2 -1 / s =2 -1 / s’ The relationship between s' = -1 / log2(1-2 -1 / s ), or it can be obtained as its approximation s'=1 / s.
[0093] In addition, in the case of an integer sequence that follows an exponential distribution, as described above, the increase in compression efficiency due to the transformation can be theoretically guaranteed, but even an integer sequence that does not follow an exponential distribution can be transformed into an integer sequence with a distribution in which the probability of occurrence decreases as the integer value increases and the probability of occurrence increases as the integer value decreases, and if the distribution has a large bias in the probability of occurrence, the above-mentioned effect is approximately produced, and as a result, the probability of occurrence decreases as the integer value increases and the probability of occurrence increases as the integer value decreases, and the distribution has a small bias in the probability of occurrence. Therefore, the integer encoding unit 210 is not limited to the Grumman code, and a code with a larger number of bits (a longer code) allocated as the integer value increases, or a reversible code of another shape distribution in which the probability of occurrence is assumed to have a monotonically non-increasing relationship with respect to the integer value and is non-uniform, such as a Huffman code.
[0094] In addition, even in the case where the distribution of the numerical sequence input to the encoding device 200 does not have the above-mentioned monotonically non-increasing relationship, if the distribution of the input numerical sequence is known in advance, the numerical conversion unit 220 (not shown) also pre-stores each possible numerical value of the input numerical value in order from the numerical value with the highest probability of occurrence corresponding to numbers such as 0, 1, 2, ..., and is arranged before the conversion device 100 in the encoding device 200. The numerical sequence input to the encoding device 200 is converted by the numerical conversion unit 220 into a sequence based on the above-mentioned numbers, and the converted number sequence is used as an input integer sequence and encoded in the above-mentioned encoding device 200, so that the bias of the distribution of the numerical sequence can be approximately converted by the conversion device 100 of the present invention before encoding. In the decoding device 300, an unillustrated numerical inverse transformation unit 320 is arranged after the transformation device 100 of the decoding device 300. The unillustrated numerical inverse transformation unit 320 pre-stores the same correspondence between numerical values and numbers as the above-mentioned numerical transformation unit 220. The decoded integer sequence obtained by the transformation device 100 in the decoding device 300 is set to a sequence based on the above-mentioned numbers, and is transformed into a sequence of numerical values by the numerical inverse transformation unit 320, so that a sequence of numerical values that is the same as the numerical sequence input to the encoding device 200 can be obtained.
[0095] <Modification of First Embodiment>
[0096] In the first embodiment, a conversion process combining unary encoding, bit reversal processing, and unary decoding is performed, but a conversion process not using bit reversal processing may be performed. A method not using bit reversal processing will be described as a modified example of the first embodiment.
[0097] 《Encoding Device》
[0098] like Figure 2 As shown, the coding device 200 of the modified example of the first embodiment is the same as the coding device 200 of the first embodiment, and includes the transform device 100 and an integer coding unit 210. The operation of the integer coding unit 210 of the coding device 200 of the modified example of the first embodiment is the same as the operation of the integer coding unit 210 of the coding device 200 of the first embodiment. The transform device 100 included in the coding device 200 of the modified example of the first embodiment does not include Figure 2 The bit inversion processing unit 120 shown by the dotted line in the figure is replaced by a unary coding unit 110 and a unary decoding unit 130. The transform device 100 included in the coding device 200 of the modification of the first embodiment is the same as the transform device 100 included in the coding device 200 of the first embodiment in that the operation of the unary coding unit 110 is the same, but the operation of the unary decoding unit 130 is different. The following describes the differences between the coding device 200 of the modification of the first embodiment and the coding device 200 of the first embodiment.
[0099] [Unary decoding unit 130]
[0100] The unary decoding unit 130 of the transformation device 100 included in the encoding device 200 of the modified example of the first embodiment receives the code string of the unary code output by the unary encoding unit 110, decodes the code string of the unary code by unary decoding according to a rule in which the bit value ‘0’ and the bit value ‘1’ are opposite to the unary code of the unary encoding unit 110 included in the encoding device 200 of the modified example of the first embodiment, obtains a transformed integer sequence, and outputs the obtained transformed integer sequence to the integer encoding unit 210 (step S130).
[0101] Since the rule of the unary coding unit 110 of the transform device 100 included in the coding device 200 of the modified example of the first embodiment is Figure 4 Therefore, the rule that the bit value '0' and the bit value '1' are opposite to the unary coding of the unary coding unit 110 of the transform device 100 included in the coding device 200 of the modified example of the first embodiment is that Figure 4 The rules for replacing the bit value '0' with the bit value '1' and the bit value '1' with the bit value '0' are respectively followed, and are Figure 7 rules.
[0102] That is, the unary decoding unit 130 reads the code string of the unary code until the bit value '1' appears, obtains the number of bit values '0' that appear during the period as an integer value, and sequentially performs the above-mentioned processing from the beginning to the end of the code string of the unary code. In addition, the unary decoding unit 130 obtains the number of bit values '0' that appear during the period from the bit that has been read to the end of the code string of the unary code after the integer value is obtained immediately before as an integer value only when the code string of the unary code is read to the end.
[0103] Alternatively, the unary decoding unit 130 may also proceed as follows: first, a bit value '1' is appended to the end of the code string of the unary code, then, the code string of the unary code to which the bit value '1' is appended is read until the bit value '1' appears, and the number of bit values '0' appearing therein is obtained as an integer value, and the above processing is performed sequentially from the beginning to the end of the code string of the unary code to which the bit value '1' is appended.
[0104] Decoding Device
[0105] like Figure 5 As shown, the decoding device 300 of the modified example of the first embodiment is the same as the decoding device 300 of the first embodiment, and includes an integer decoding unit 310 and the transform device 100. The operation of the integer decoding unit 310 of the decoding device 300 of the modified example of the first embodiment is the same as the operation of the integer decoding unit 310 of the decoding device 300 of the first embodiment. The transform device 100 included in the decoding device 300 of the modified example of the first embodiment does not include Figure 5 The decoder 300 of the modification of the first embodiment includes a bit inversion processing unit 120 shown by the dotted line, and includes a unary coding unit 110 and a unary decoding unit 130. The transform device 100 included in the decoding device 300 of the modification of the first embodiment is the same as the transform device 100 included in the decoding device 300 of the first embodiment, and the operation of the unary coding unit 110 is different. The following describes the differences between the decoding device 300 of the modification of the first embodiment and the decoding device 300 of the first embodiment.
[0106] [Unary decoding unit 130]
[0107] The unary decoding unit 130 of the transformation device 100 included in the decoding device 300 of the variant example of the first embodiment receives the code string of the decoding-side unary code output by the unary encoding unit 110, decodes the code string of the decoding-side unary code by unary decoding according to a rule in which the bit value ‘0’ and the bit value ‘1’ are opposite to the unary code of the unary encoding unit 110 included in the decoding device 300 of the variant example of the first embodiment, obtains a decoded integer sequence, and outputs the obtained decoded integer sequence (step S130).
[0108] Since the rule of the unary encoding unit 110 of the transform device 100 included in the decoding device 300 of the modified example of the first embodiment is Figure 4 Therefore, the rule that the bit value '0' and the bit value '1' are opposite to the unary code of the unary coder 110 of the transform device 100 included in the decoding device 300 of the modified example of the first embodiment is that Figure 4 The rules for replacing the bit value '0' with the bit value '1' and the bit value '1' with the bit value '0' are respectively followed. Figure 7 rules.
[0109] That is, the unary decoding unit 130 performs the following steps: the code string of the unary code on the decoding side is read until the bit value '1' appears, the number of bit values '0' that appear during the reading is obtained as an integer value, and the above-mentioned processing is performed sequentially from the beginning to the end of the code string of the unary code on the decoding side. In addition, the unary decoding unit 130 ignores the bit value '0' at the end of the code string of the unary code on the decoding side, and takes the bit value '1' immediately before the bit at the end of the code string of the unary code on the decoding side as the object of unary decoding.
[0110] Alternatively, the unary decoding unit 130 may be performed as follows: first, the bit value '0' at the end of the code string of the unary code on the decoding side is deleted, and then the code string of the unary code on the decoding side with the bit value '0' deleted is read until the bit value '1' appears, and the number of bit values '0' appearing in between is obtained as an integer value, and the above processing is performed sequentially from the beginning to the end of the code string of the unary code on the decoding side.
[0111] <Second embodiment>
[0112] When the integer encoding unit uses the Glenbuch code, the Glenbuch parameters used can be used adaptively according to the distribution of the sequence of the input integer values. Therefore, the optimal Glenbuch parameters for the transformed integer sequence obtained by transforming the partial sequence based on the sequence of the input integer values by the transform device 100 of the present invention can be obtained according to the existing optimal Glenbuch parameter estimation method, and the transformed integer sequence can be encoded using the obtained Glenbuch parameters s, and decoding corresponding to the encoding can also be performed. This mode is described as the second embodiment.
[0113] 《Encoding Device》
[0114] Reference Figure 8 as well as Fig. 9 , the processing procedure of the encoding method performed by the encoding device 400 including the second embodiment of the transform device 100 of the present invention is described. Figure 8As shown, the encoding device 400 of the second embodiment includes a parameter determination unit 420, a transform device 100, and an integer encoding unit 410. The encoding device 400 of the second embodiment performs Fig. 9 The processing of each step shown realizes the encoding method of the second embodiment including the transformation method of the present invention.
[0115] In the encoding device 400 of the second embodiment, a sequence of non-negative integer values is inputted as in the first embodiment. The sequence of non-negative integer values inputted to the encoding device 400 of the second embodiment is inputted to the parameter determination unit 420 and the transformation device 100 for each N samples. That is, for example, sound or music picked up by a microphone is transformed into a digital signal and quantized, and the encoding device 400 of the second embodiment encodes a sequence of integer values such as a sequence of absolute values of integer values obtained by the quantization for each frame based on N samples.
[0116] In the following description, the non-negative integer value input to the encoding device 400 according to the present embodiment is simply referred to as an “integer value”.
[0117] [Parameter determination unit 420]
[0118] The parameter determination unit 420 is input with a sequence of integer values of N samples each time (hereinafter referred to as "input integer sequence") from the sequence of integer values input to the encoding device 400. The parameter determination unit 420 obtains and outputs a Glumb parameter s' for integer encoding and a parameter code which is a code representing the parameter based on the input integer sequence (step S420). The parameter code is obtained by encoding the Glumb parameter so that the same value as the Glumb parameter s' for integer encoding determined by the parameter determination unit 420, i.e., the Glumb parameter s' for integer decoding, can be obtained by decoding the parameter code by the decoding device 500.
[0119] The parameter determination unit 420 obtains the Glumb parameter s by equation (3), for example, using each integer value included in the input integer sequence.
[0120]
Mathematical formula 3
[0121]
[0122] The Glumb parameter s obtained by equation (3) is a parameter that minimizes the estimated value of the total bit length when Glumb coding without transformation is performed for the input integer sequence estimated by equation (2).
[0123] Then, the parameter determination unit 420 performs scalar quantization on the inverse of the Glumb parameter s obtained by equation (3), for example, to obtain a code, outputs the obtained code as a parameter code, and outputs the quantized value of the inverse of the Glumb parameter s corresponding to the parameter code as a Glumb parameter s' for integer coding.
[0124] [Conversion device 100]
[0125] The transform device 100 has the same configuration as the transform device 100 included in the encoding device 200 of the first embodiment, and is composed of a unary encoding unit 110, a bit reversal processing unit 120, and a unary decoding unit 130, or has the same configuration as the transform device 100 included in the encoding device 200 of the modification of the first embodiment, and is composed of the unary encoding unit 110 and the unary decoding unit 130. The transform device 100 inputs an integer sequence of N samples at a time from among the sequence of integer values input to the encoding device 400, that is, an input integer sequence. The transform device 100 performs the same processing as the transform device 100 included in the encoding device 200 of the first embodiment or the transform device 100 included in the encoding device 200 of the modification of the first embodiment on the input integer sequence, thereby obtaining a transformed integer sequence, and outputs the obtained transformed integer sequence to the integer encoding unit 410.
[0126] [Integer encoding unit 410]
[0127] The integer coding unit 410 receives the Glenbuch parameter s' for integer coding output by the parameter determination unit 420 and the transformed integer sequence output by the transform device 100. The integer coding unit 410 rounds the Glenbuch parameter s' for integer coding to an integer value ^s' by rounding the first decimal place of the Glenbuch parameter s' for integer coding, and then performs Glenbuch coding based on the integer value of the Glenbuch parameter ^s' on the input transformed integer sequence, and outputs the code obtained by the Glenbuch coding as an integer code (step S410). In addition, when the Glenbuch parameter s' for integer coding is less than 1, the Glenbuch parameter s' for integer coding is rounded to an integer value ^s'=1.
[0128] Decoding Device
[0129] Reference Fig.10 as well as Fig.11 The processing procedure of the decoding method executed by the decoding device 500 according to the second embodiment including the transform device 100 of the present invention will be described. Fig.10 As shown, the decoding device 500 of the second embodiment includes a parameter decoding unit 520, an integer decoding unit 510, and a transform device 100. The decoding device 500 of the second embodiment performs Fig.11The processing of each step shown realizes the decoding method of the second embodiment including the transformation method of the present invention.
[0130] The integer code and parameter code output by the encoding device 400 of the second embodiment are input to the decoding device 500 of the second embodiment. The integer code and parameter code input to the decoding device 500 are input for each code corresponding to N samples of the integer value sequence, the parameter code is input to the parameter decoding unit 520, and the integer code is input to the integer decoding unit 510. That is, the decoding device 500 performs the decoding process for each frame similar to the encoding device 400.
[0131] [Parameter decoding unit 520]
[0132] The parameter code input to the decoding device 500 is input to the parameter decoding unit 520. The parameter decoding unit 520 decodes the parameter code through a decoding process corresponding to the process by which the parameter determination unit 420 of the encoding device 400 of the second embodiment obtains the parameter code, obtains the Glumb parameter s' for integer decoding, and outputs it (step S520). The parameter decoding unit 520 obtains the Glumb parameter s' for integer decoding corresponding to the parameter code through a decoding process corresponding to scalar quantization performed by the parameter determination unit 420 of the encoding device 400 of the second embodiment, for example, and outputs it to the integer decoding unit 510.
[0133] [Integer decoding unit 510]
[0134] The integer decoding unit 510 receives the integer code input to the decoding device 500 and the Glumb parameter s′ for integer decoding output by the parameter decoding unit 520. The integer decoding unit 510 rounds the Glumb parameter s′ for integer decoding to an integer value ^s′ by the same method as that performed by the integer encoding unit 410 of the encoding device 400 of the second embodiment, and then performs Glumb decoding on the integer code based on the Glumb parameter ^s′ of the integer value to obtain a decoded transformed integer sequence, which is then output to the transform device 100 (step S510).
[0135] [Conversion device 100]
[0136] The transform device 100 has the same configuration as the transform device 100 included in the decoding device 300 of the first embodiment, and is composed of a unary coding unit 110, a bit reversal processing unit 120, and a unary decoding unit 130, or has the same configuration as the transform device 100 included in the decoding device 300 of the modification of the first embodiment, and is composed of a unary coding unit 110 and a unary decoding unit 130. The transform device 100 receives as input a decoded transformed integer sequence output by the integer decoding unit 510. The transform device 100 performs the same processing as the transform device 100 included in the decoding device 300 of the first embodiment or the transform device 100 included in the decoding device 300 of the modification of the first embodiment on the input decoded transformed integer sequence, thereby obtaining a decoded integer sequence, and outputs the obtained decoded integer sequence.
[0137] <Modification of Second Embodiment>
[0138] In the second embodiment, a parameter code representing a Glumb parameter s' corresponding to the reciprocal of the Glumb parameter s is obtained, but a parameter code representing the Glumb parameter s may be obtained. This method will be described as a modified example of the second embodiment.
[0139] 《Encoding Device》
[0140] The encoding device 400 of the modified example of the second embodiment is as follows: Figure 8 As shown in FIG. 1 , similarly to the coding device 400 of the second embodiment, the coding device 400 includes a parameter determination unit 420, a transform device 100, and an integer coding unit 410. The coding device 400 of the modification of the second embodiment is different from the coding device 400 of the second embodiment in the operations of the parameter determination unit 420 and the integer coding unit 410. The differences between the coding device 400 of the modification of the second embodiment and the coding device 400 of the second embodiment will be described below.
[0141] [Parameter determination unit 420]
[0142] The parameter determination unit 420 is input with an integer sequence of N samples each time (hereinafter referred to as "input integer sequence") from the sequence of integer values input to the encoding device 400. The parameter determination unit 420 obtains and outputs the Glumb parameter s corresponding to the integer sequence and the parameter code which is a code representing the Glumb parameter s based on the input integer sequence (step S420). The parameter code may be obtained by encoding the Glumb parameter s in such a way that the Glumb parameter s determined by the parameter determination unit 420 can be obtained by decoding the parameter code by the decoding device 500.
[0143] The parameter determination unit 420, for example, uses each integer value included in the input integer sequence to obtain a Glumb parameter s through formula (3), performs scalar quantization on the obtained Glumb parameter s to obtain a code, outputs the obtained code as a parameter code, and outputs the quantization value of the Glumb parameter s corresponding to the parameter code as the Glumb parameter s.
[0144] [Integer encoding unit 410]
[0145] The integer coding unit 410 receives the Glenbuch parameter s output by the parameter determination unit 420 and the transformed integer sequence output by the transform device 100. The integer coding unit 410 rounds the reciprocal of the Glenbuch parameter s to an integer value ^s' by rounding off the first decimal place, and then performs Glenbuch coding on the input transformed integer sequence using the integer value ^s' as the Glenbuch parameter, and outputs the code obtained by the Glenbuch coding as an integer code (step S410). In addition, when the reciprocal of the Glenbuch parameter s is less than 1, the reciprocal of the Glenbuch parameter s is rounded to an integer value ^s'=1.
[0146] Decoding Device
[0147] A decoding device 500 according to a variation of the second embodiment is as follows: Fig.10 As shown in FIG. 1 , similarly to the decoding device 500 of the second embodiment, the decoding device 500 includes a parameter decoding unit 520, an integer decoding unit 510, and the transform device 100. The decoding device 500 of the modified example of the second embodiment is different from the decoding device 500 of the second embodiment in the operations of the parameter decoding unit 520 and the integer decoding unit 510. The differences between the decoding device 500 of the modified example of the second embodiment and the decoding device 500 of the second embodiment will be described below.
[0148] [Parameter decoding unit 520]
[0149] The parameter code input to the decoding device 500 of the modification of the second embodiment is input to the parameter decoding unit 520. The parameter decoding unit 520 decodes the parameter code to obtain the Glenbuh parameter s through a decoding process corresponding to the process in which the parameter determination unit 420 of the encoding device 400 of the modification of the second embodiment obtains the parameter code, and outputs the obtained Glenbuh parameter s (step S520). The parameter decoding unit 520 obtains the quantized value of the Glenbuh parameter s corresponding to the parameter code as the Glenbuh parameter s, for example, through a decoding process corresponding to the scalar quantization performed by the parameter determination unit 420 of the encoding device 400 of the modification of the second embodiment.
[0150] [Integer decoding unit 510]
[0151] The integer code input to the decoding device 500 and the Glumb parameter s output by the parameter decoding unit 520 are input to the integer decoding unit 510. The integer decoding unit 510 rounds the reciprocal of the Glumb parameter s to an integer value ^s' by the same method as the method performed by the integer encoding unit 410 of the encoding device 400 of the modification of the second embodiment, and then performs Glumb decoding on the integer code using the integer value ^s' as the Glumb parameter ^s' to obtain a decoded value, and outputs the decoded value to the transform device 100 (step S510).
[0152] <Third Embodiment>
[0153] As described above, the fact that encoding can be efficiently performed by performing integer encoding after performing the transformation by the transformation device 100 of the present invention refers to the following case: if Glumb encoding is performed in the integer encoding unit, a sequence of integer values based on a distribution that should use a value greater than 0 and less than 1 as a Glumb parameter is input. Therefore, the optimal Glumb parameter s can be obtained for a partial series based on the series of input integer values according to the existing estimation method of the optimal Glumb parameter, and the obtained Glumb parameter s can be used to determine whether to use the transformation device 100 of the present invention, and the processing of encoding after transforming the series of input integer values and the processing of directly encoding without transforming the series of input integer values can be adaptively performed for each partial series, and decoding corresponding to the encoding can also be performed. This mode will be described as the third embodiment.
[0154] 《Encoding Device》
[0155] Reference Fig.12 as well as Fig.13 , the processing procedure of the encoding method performed by the encoding device 600 according to the third embodiment including the transform device 100 of the present invention is described. Fig.12 As shown, the encoding device 600 of the third embodiment includes a parameter determination unit 620, a determination unit 630, a transformation device 100, and an integer encoding unit 610. The encoding device 600 of the third embodiment performs Fig.13 The processing of each step shown realizes the encoding method of the third embodiment including the transformation method of the present invention.
[0156] In the encoding device 600 of the third embodiment, a sequence of non-negative integer values is inputted as in the first embodiment. The sequence of non-negative integer values inputted to the encoding device 600 of the third embodiment is inputted to the parameter determination unit 620 and the determination unit 630 for each N samples. That is, for example, sound or music picked up by a microphone is converted into a digital signal and quantized, and the encoding device 600 of the third embodiment encodes a sequence of integer values such as a sequence of absolute values of integer values obtained by the quantization for each frame based on N samples.
[0157] In the following description, the non-negative integer value input to the encoding device 600 according to the present embodiment is simply referred to as an “integer value”.
[0158] [Parameter determination unit 620]
[0159] The parameter determination unit 620 is input with an integer sequence of N samples each time from the sequence of integer values input to the encoding device 600 (hereinafter referred to as the "input integer sequence"). The parameter determination unit 620 obtains and outputs the Glumb parameter s corresponding to the integer sequence, the parameter code which is a code representing the Glumb parameter s, and the Glumb parameter s' for integer encoding based on the input integer sequence (step S620). The parameter code may be obtained by encoding the Glumb parameter s so that the Glumb parameter s determined by the parameter determination unit 620 can be obtained by decoding the parameter code by the decoding device 700.
[0160] The parameter determination unit 620, for example, uses each integer value included in the input integer sequence to obtain a Glumb parameter s through formula (3), performs scalar quantization on the obtained Glumb parameter s to obtain a code, outputs the obtained code as a parameter code, and outputs the quantization value of the Glumb parameter s corresponding to the parameter code as the Glumb parameter s.
[0161] In addition, when the value of the Glenbuh parameter s is greater than 1, the parameter determination unit 620 directly outputs the Glenbuh parameter s as the Glenbuh parameter s′ for integer coding to the integer coding unit 610, and when the value of the Glenbuh parameter s is less than 1, the parameter determination unit 620 outputs the reciprocal of the Glenbuh parameter s as the Glenbuh parameter s′ for integer coding to the integer coding unit 610.
[0162] [Determination unit 630]
[0163] The determination unit 630 receives as input an input integer sequence of N samples each time among the integer values input to the encoding device 600 and the Glumb parameter s output by the parameter determination unit 620. When the value of the input Glumb parameter s is 1 or more, the determination unit 630 outputs the input integer sequence to the integer encoding unit 610, and when the value of the input Glumb parameter s is less than 1, the determination unit 630 outputs the input integer sequence to the transform device 100 (step S630).
[0164] [Conversion device 100]
[0165] The transform device 100 has the same configuration as the transform device 100 included in the encoding device 200 of the first embodiment, and is composed of a unary encoding unit 110, a bit reversal processing unit 120, and a unary decoding unit 130, or has the same configuration as the transform device 100 included in the encoding device 200 of the modification of the first embodiment, and is composed of a unary encoding unit 110 and a unary decoding unit 130. The transform device 100 receives an input integer sequence output by the determination unit 630. When the transform device 100 receives an input integer sequence from the determination unit 630, the transform device 100 performs the same processing as the transform device 100 included in the encoding device 200 of the first embodiment or the transform device 100 included in the encoding device 200 of the modification of the first embodiment on the input integer sequence, obtains a transformed integer sequence, and outputs the obtained transformed integer sequence to the integer encoding unit 610. When no data is input from the determination unit 630, the transform device 100 does not perform any processing and does not output any data.
[0166] [Integer encoding unit 610]
[0167] The integer coding unit 610 receives the Glenbuh parameter s' for integer coding output by the parameter determination unit 620, and any one of the input integer sequence output by the determination unit 630 and the transformed integer sequence output by the transformation device 100. After rounding the Glenbuh parameter s' for integer coding to an integer value ^s' by rounding off the first decimal place of the Glenbuh parameter s' for integer coding, the integer coding unit 610 performs Glenbuh coding based on the Glenbuh parameter ^s' of the integer value on any one of the input integer sequence output by the determination unit 630 and the transformed integer sequence output by the transformation device 100, and outputs a code obtained by the Glenbuh coding as an integer code (step S610).
[0168] The encoding device 600 of the third embodiment performs the above operations. When the Glenbuh parameter s obtained by the parameter determination unit 620 is less than 1, the transform device 100 obtains a transformed integer sequence from the input integer sequence, and the integer encoding unit 610 uses the reciprocal of the Glenbuh parameter s as the Glenbuh parameter to perform Glenbuh encoding on the transformed integer sequence to obtain an integer code. When the Glenbuh parameter s obtained by the parameter determination unit 620 is greater than or equal to 1, the integer encoding unit 610 uses the Glenbuh parameter s obtained by the parameter determination unit 620 as the Glenbuh parameter to perform Glenbuh encoding on the input integer sequence to obtain an integer code.
[0169] Decoding Device
[0170] Reference Fig.14 as well as Fig.15, the processing procedure of the decoding method executed by the decoding device 700 according to the third embodiment including the transform device 100 of the present invention is described. Fig.14 As shown, the decoding device 700 of the third embodiment includes a parameter decoding unit 720, a determination unit 730, an integer decoding unit 710, and a transform device 100. The decoding device 700 of the third embodiment performs Fig.15 The processing of each step shown realizes the decoding method of the third embodiment including the transformation method of the present invention.
[0171] The integer code and parameter code output by the encoding device 600 of the third embodiment are input to the decoding device 700 of the third embodiment. The integer code and parameter code input to the decoding device 700 are input for each code corresponding to N samples of the integer value sequence, the parameter code is input to the parameter decoding unit 720, and the integer code is input to the integer decoding unit 710. That is, the decoding device 700 performs the decoding process for each frame similar to that of the encoding device 600.
[0172] [Parameter decoding unit 720]
[0173] The parameter code input to the decoding device 700 is input to the parameter decoding unit 720. The parameter decoding unit 720 decodes the parameter code to obtain the Glenbuh parameter s through a decoding process corresponding to the process in which the parameter determination unit 620 of the encoding device 600 of the third embodiment obtains the parameter code, and outputs the obtained Glenbuh parameter s to the determination unit 730. The parameter decoding unit 720 obtains the quantized value of the Glenbuh parameter s corresponding to the parameter code as the Glenbuh parameter s, for example, through a decoding process corresponding to the scalar quantization performed by the parameter determination unit 620 of the encoding device 600 of the third embodiment.
[0174] In addition, when the value of the Glumb parameter s is greater than 1, the parameter decoding unit 720 directly outputs the Glumb parameter s as the Glumb parameter s′ for integer decoding to the integer decoding unit 710, and when the value of the Glumb parameter s is less than 1, the reciprocal of the Glumb parameter s is output as the Glumb parameter s′ for integer decoding to the integer decoding unit 710. (above, step S720)
[0175] [Integer decoding unit 710]
[0176] The integer decoding unit 710 receives the integer code input to the decoding device 700 and the Glumb parameter s' for integer decoding output by the parameter decoding unit 720. The integer decoding unit 710 rounds the Glumb parameter s' for integer decoding to an integer value ^s' by the same method as the method performed by the integer encoding unit 610 of the encoding device 600 of the third embodiment, and then performs Glumb decoding on the integer code using the integer value ^s' as the Glumb parameter to obtain an integer sequence (hereinafter referred to as a "tentative decoded integer sequence") and outputs the obtained integer sequence to the determination unit 730 (step S710).
[0177] [Determination unit 730]
[0178] The determination unit 730 receives the input of the Glumb parameter s output by the parameter decoding unit 720 and the tentative decoded integer sequence output by the integer decoding unit 710. When the value of the Glumb parameter s is 1 or more, the determination unit 730 outputs the input tentative decoded integer sequence as a decoded integer sequence as it is, and when the value of the Glumb parameter s is less than 1, the determination unit 730 outputs the input tentative decoded integer sequence to the transform device 100 (step S730).
[0179] [Conversion device 100]
[0180] The transform device 100 has the same configuration as the transform device 100 included in the decoding device 300 of the first embodiment, and is composed of a unary coding unit 110, a bit reversal processing unit 120, and a unary decoding unit 130, or has the same configuration as the transform device 100 included in the decoding device 300 of the modification of the first embodiment, and is composed of a unary coding unit 110 and a unary decoding unit 130. The transform device 100 receives an input of the tentative decoded integer sequence output by the determination unit 730. When the tentative decoded integer sequence is received from the determination unit 730, the transform device 100 performs the same processing as the transform device 100 included in the decoding device 300 of the first embodiment or the transform device 100 included in the decoding device 300 of the modification of the first embodiment on the input tentative decoded integer sequence, obtains a decoded integer sequence, and outputs the obtained decoded integer sequence. When the tentative decoded integer sequence is not received from the determination unit 730, the transform device 100 does not perform any processing and does not output any data.
[0181] The decoding device 700 of the third embodiment performs the above operations. When the Glumb parameter s obtained by the parameter decoding unit 720 is less than 1, the integer decoding unit 710 uses the reciprocal of the Glumb parameter s obtained by the parameter decoding unit 720 as the Glumb parameter to perform Glumb decoding on the input integer code, and obtains a tentative decoded integer value sequence that is a sequence of non-negative integer values. The transformation device 100 obtains a decoded integer sequence that is a sequence of non-negative integer values from the tentative decoded integer value sequence and outputs it. When the Glumb parameter s obtained by the parameter decoding unit 720 is greater than or equal to 1, the integer decoding unit 710 uses the Glumb parameter s obtained by the parameter decoding unit 720 as the Glumb parameter to perform Glumb decoding on the input integer code, and obtains a sequence of non-negative integer values and outputs it as a decoded integer sequence.
[0182] <Supplementary Note>
[0183] The device of the present invention, for example, as a single hardware entity, has: an input unit that can be connected to a keyboard, etc., an output unit that can be connected to a liquid crystal display, etc., a communication unit that can be connected to a communication device (such as a communication cable) that can communicate with the outside of the hardware entity, a CPU (it can also have a central processing unit (Central Processing Unit), a flash memory or a register, etc.), a RAM or ROM as a memory, an external storage device as a hard disk, and a bus that connects to exchange data between these input units, output units, communication units, CPU, RAM, ROM, and external storage devices. In addition, as needed, a device (drive) that can read and write a recording medium such as a CD-ROM, etc., can also be set in the hardware entity. As a physical entity having such hardware resources, there are general-purpose computers, etc.
[0184] In the external storage device of the hardware entity, the programs required to realize the above functions and the data required in the processing of the programs are stored (not limited to the external storage device, for example, the programs can be read out in advance and stored in the ROM as a dedicated storage device). In addition, the data obtained by the processing of these programs is appropriately stored in the RAM or the external storage device.
[0185] In the hardware entity, each program stored in an external storage device (or ROM, etc.) and the data required for processing the program are read into the memory as needed, and are appropriately interpreted, executed and processed in the CPU. As a result, the CPU realizes the specified functions (represented as the various constituent elements such as the above-mentioned, ... parts, ... units, etc.).
[0186] The present invention is not limited to the above-described embodiments, and can be modified appropriately without departing from the spirit of the present invention.
[0187] For example, in the above-mentioned embodiment, it is described that the sequence of non-negative integer values input to the encoding device is an example of a sequence of absolute values of integer values obtained by quantizing signals obtained by converting sound, image, and video signals into digital signals into values of finite precision. However, the sequence of non-negative integer values input to the encoding device may also be a sequence of absolute values of integer values obtained by quantizing time series signals based on biological signals other than the above-mentioned signals, such as electrocardiograms or magnetocardiograms, electroencephalograms, surface electromyograms, skin potentials, etc., into values of finite precision.
[0188] Alternatively, the sequence of non-negative integer values input to the encoding device may not be a time series signal, but may be a sequence of absolute values of integer values obtained by quantizing a signal based on a medical image obtained from computer tomography, magnetic resonance imaging, ultrasonic tomography, angiography, etc. into finite precision values. Furthermore, the sequence of non-negative integer values input to the encoding device may be a sequence of absolute values of integer values obtained by quantizing a sequence of numerical values that are not signals into finite precision values, and the sequence of numerical values that are not signals may be, for example, a sequence of numerical values indicating a quality score of a measurement error related to each gene of a gene information sequence.
[0189] In addition, the sequence of non-negative integer values input to the encoding device may be, for example, a sequence based on the absolute values of integer values obtained by quantizing a signal obtained by converting a sound, image or video signal into a digital signal into a spectrum through a cosine transform or the like to obtain a value of finite precision. It may also be a sequence based on the absolute values of integer values obtained by quantizing a sequence of the above-mentioned signal or a sequence of numerical values that is not a signal through a filter such as a high-pass filter or a low-pass filter to obtain a value of finite precision.
[0190] In order to cope with these inputs, the coding device of the present invention may include a processing unit that converts a sequence of signals or numerical values input to the coding device into a sequence of non-negative integer values. Figure 2 , Figure 8 or Fig.12 Similarly, in the decoding device of the present invention, in order to obtain an output corresponding to the above input, as Figure 5 , Fig.10 or Fig.14 The processing unit for converting the sequence of non-negative integer values obtained by the decoding device into a sequence of signals or numerical values may also be Figure 5 , Fig.10 or Fig.14 The subsequent stage of the decoding device includes an inverse transformation unit not shown in the figure.
[0191] Furthermore, the processes described in the above embodiments are not only executed in time series according to the order described, but may also be executed in parallel or individually according to the processing capability or need of the device executing the processes.
[0192] As described above, when the processing functions in the hardware entity (device of the present invention) described in the above embodiment are implemented by a computer, the functional processing content that the hardware entity should have is described by a program. Then, by executing the program on a computer, the processing functions in the above hardware entity are implemented on the computer.
[0193] The program describing the processing content can be recorded in advance in a computer-readable recording medium. As a computer-readable recording medium, any device such as a magnetic recording device, an optical disc, an optical magneto-optical recording medium, a semiconductor memory, etc. can be used. Specifically, for example, as a magnetic recording device, a hard disk device, a flexible disk, a magnetic tape, etc. can be used, as an optical disc, a DVD (Digital Versatile Disc), a DVD-RAM (Random Access Memory), a CD-ROM (Compact Disc Read Only Memory), a CD-R (Recordable) / RW (ReWritable), etc. can be used, as an optical magneto-optical recording medium, an MO (Magneto-Optical disc) can be used, and as a semiconductor memory, an EEP-ROM (Electronically Erasable and Programmable-Read Only Memory) can be used.
[0194] Furthermore, the program can be circulated, for example, by selling, transferring, renting, etc. a portable recording medium such as a DVD or CD-ROM recording the program. Furthermore, the program can also be circulated by storing the program in advance in a storage device of a server computer and forwarding the program from the server computer to other computers via a network.
[0195] A computer that executes such a program, for example, first temporarily stores the program recorded in a portable recording medium or the program forwarded by a server computer in its own storage device. And, when executing the process, the computer reads the program stored in its own storage medium and executes the process according to the read program. In addition, as another execution method of the program, it is also possible that the computer directly reads the program from the portable recording medium and executes the process according to the program, and further, each time the program is forwarded from the server computer to the computer, the process according to the received program is sequentially executed. In addition, it is also possible that the program is not forwarded from the server computer to the computer, but only the so-called ASP (Application Service Provider) type service that realizes the processing function through its execution instruction and result acquisition is implemented, thereby executing the above-mentioned process. Moreover, it is assumed that the program in this method contains information for the process performed by the electronic computer, that is, information according to the program (although not a direct instruction to the computer, it has the nature of data that specifies the process of the computer, etc.).
[0196] Furthermore, in this method, a hardware entity is formed by executing a predetermined program on a computer, but at least a part of the processing contents may be realized by hardware.
[0197] The above-mentioned description of the embodiments of the present invention is provided for the purpose of illustration and description. There is no intention to be exhaustive, nor is there any intention to limit the invention to the strict form disclosed. Deformations and changes can be made according to the above teachings. The embodiments are selected and expressed in order to provide the best illustration of the principles of the present invention and to enable technicians in the field to utilize the present invention in various embodiments and with various modifications to suit the actual use of consideration. All such modifications or changes are within the scope of the present invention as determined by the attached claims, which are interpreted in accordance with the scope given by fairness, legality and equity.
Claims
1. A coding device comprising a transform device, a parameter determination unit, and an integer coding unit, The conversion device comprises: A unary encoding unit that performs unary encoding on a sequence of non-negative integer values inputted, that is, a first integer sequence, to obtain a code string of unary codes; a bit reversal processing unit that replaces the bit value '0' with the bit value '1' and the bit value '1' with the bit value '0' for each bit of the code string of the unary code, respectively, to obtain a replaced code string; and A unary decoding unit performs unary decoding on the replaced code string to obtain a sequence based on non-negative integer values, that is, a second integer sequence, The first integer sequence is a sequence based on non-negative integer values obtained by converting any one of sound, image, and video into a digital signal and quantizing it. The parameter determination unit obtains, for each predetermined sample included in the sequence based on the non-negative integer value input to the encoding device, a Glumb parameter s corresponding to the sequence of non-negative integer values based on the predetermined sample, that is, the non-negative integer value included in the input integer sequence, and a parameter code corresponding to the Glumb parameter s, When the Glumb parameter s is less than 1, The transforming device uses the input integer sequence as the first integer sequence to obtain the second integer sequence, The integer encoding unit uses the inverse of the Glenbuch parameter s obtained by the parameter determination unit as the Glenbuch parameter to perform Glenbuch encoding on the second integer sequence to obtain an integer code. When the Glumb parameter s is greater than 1, The integer encoding unit uses the Glenbuch parameter s obtained by the parameter determination unit as a Glenbuch parameter to perform Glenbuch encoding on the input integer sequence to obtain an integer code.
2. A coding device comprising a transform device, a parameter determination unit, and an integer coding unit, The conversion device comprises: a unary encoding unit that performs unary encoding on a sequence based on input non-negative integer values, that is, a first integer sequence, to obtain a code string of unary codes; and a unary decoding unit that decodes the code string of the unary code by unary decoding according to a rule that the bit value '0' and the bit value '1' are opposite to those of the unary code of the unary encoding unit, thereby obtaining a sequence based on non-negative integer values, that is, a second integer sequence; The first integer sequence is a sequence based on non-negative integer values obtained by converting any one of sound, image, and video into a digital signal and quantizing it. The parameter determination unit obtains, for each predetermined sample included in the sequence based on the non-negative integer value input to the encoding device, a Glumb parameter s corresponding to the sequence of non-negative integer values based on the predetermined sample, that is, the non-negative integer value included in the input integer sequence, and a parameter code corresponding to the Glumb parameter s, When the Glumb parameter s is less than 1, The transforming device uses the input integer sequence as the first integer sequence to obtain the second integer sequence, The integer encoding unit uses the inverse of the Glenbuch parameter s obtained by the parameter determination unit as the Glenbuch parameter to perform Glenbuch encoding on the second integer sequence to obtain an integer code. When the Glumb parameter s is greater than 1, The integer encoding unit uses the Glenbuch parameter s obtained by the parameter determination unit as a Glenbuch parameter to perform Glenbuch encoding on the input integer sequence to obtain an integer code.
3. A decoding device comprising a parameter decoding unit, an integer decoding unit, and a transforming device, The parameter decoding unit decodes the parameter code to obtain the Grunbu parameter s. The integer decoding unit decodes the input integer code to obtain a sequence based on non-negative integer values. The conversion device comprises: a unary encoding unit, which performs unary encoding on the sequence based on non-negative integer values obtained by the integer decoding unit, that is, the first integer sequence, to obtain a code string of unary code; a bit reversal processing unit, for each bit of the code string of the unary code, replacing the bit value '0' with the bit value '1', and replacing the bit value '1' with the bit value '0', to obtain a replaced code string; as well as A unary decoding unit performs unary decoding on the replaced code string to obtain a sequence based on non-negative integer values, that is, a second integer sequence, The first integer sequence is a sequence based on non-negative integer values obtained by decoding an integer code and representing a value obtained by converting any one of sound, image, and video into a digital signal and quantizing it. When the Glumb parameter s is less than 1, The integer decoding unit uses the inverse of the Glumb parameter s obtained by the parameter decoding unit as the Glumb parameter to perform Glumb decoding on the input integer code to obtain a sequence of non-negative integer values. The transforming device uses the sequence of non-negative integer values obtained by the integer decoding unit as the first integer sequence to obtain the second integer sequence, and outputs the obtained second integer sequence as a decoded integer sequence. When the Glumb parameter s is greater than 1, The integer decoding unit uses the Glumb parameter s obtained by the parameter decoding unit as a Glumb parameter to perform Glumb decoding on the input integer code to obtain a sequence of non-negative integer values, and outputs the obtained sequence of non-negative integer values as a decoded integer sequence.
4. A decoding device comprising a parameter decoding unit, an integer decoding unit, and a transforming device, The parameter decoding unit decodes the parameter code to obtain the Grunbu parameter s. The integer decoding unit decodes the input integer code to obtain a sequence based on non-negative integer values. The conversion device comprises: a unary encoding unit that performs unary encoding on the sequence based on non-negative integer values obtained by the integer decoding unit, that is, the first integer sequence, to obtain a code string of unary codes; and a unary decoding unit that decodes the code string of the unary code by unary decoding according to a rule that the bit value '0' and the bit value '1' are opposite to those of the unary code of the unary encoding unit, thereby obtaining a sequence based on non-negative integer values, that is, a second integer sequence; The first integer sequence is a sequence based on non-negative integer values obtained by decoding an integer code and representing a value obtained by converting any one of sound, image, and video into a digital signal and quantizing it. When the Glumb parameter s is less than 1, The integer decoding unit uses the inverse of the Glumb parameter s obtained by the parameter decoding unit as the Glumb parameter to perform Glumb decoding on the input integer code to obtain a sequence of non-negative integer values. The transforming device uses the sequence of non-negative integer values obtained by the integer decoding unit as the first integer sequence to obtain the second integer sequence, and outputs the obtained second integer sequence as a decoded integer sequence. When the Glumb parameter s is greater than 1, The integer decoding unit uses the Glumb parameter s obtained by the parameter decoding unit as a Glumb parameter to perform Glumb decoding on the input integer code to obtain a sequence of non-negative integer values, and outputs the obtained sequence of non-negative integer values as a decoded integer sequence.
5. A coding method, wherein a coding device performs a parameter determination step and an integer coding step, wherein the coding device comprises a transform device for performing a transform method, The transformation method include: A unary encoding step of performing unary encoding on a sequence based on input non-negative integer values, i.e., the first integer sequence, to obtain a code string of a unary code; a bit reversal processing step, for each bit of the code string of the unary code, replacing the bit value '0' with the bit value '1', and replacing the bit value '1' with the bit value '0', to obtain a replaced code string; as well as a unary decoding step of performing unary decoding on the replaced code string to obtain a sequence based on non-negative integer values, i.e., a second integer sequence, The first integer sequence is a sequence based on non-negative integer values obtained by converting any one of sound, image, and video into a digital signal and quantizing it. The parameter determination step obtains, for each specified sample included in the sequence based on the non-negative integer value input to the encoding device, a Glumb parameter s corresponding to the sequence of non-negative integer values based on the specified sample, that is, the non-negative integer value included in the input integer sequence, and a parameter code corresponding to the Glumb parameter s, When the Glumb parameter s is less than 1, The transformation method uses the input integer sequence as the first integer sequence to obtain the second integer sequence. The integer encoding step uses the inverse of the Glumb parameter s obtained in the parameter determination step as the Glumb parameter to perform Glumb encoding on the second integer sequence to obtain an integer code. When the Glumb parameter s is greater than 1, The integer encoding step uses the Glumb parameter s obtained in the parameter determination step as a Glumb parameter to perform Glumb encoding on the input integer sequence to obtain an integer code.
6. A coding method, wherein a coding device performs a parameter determination step and an integer coding step, wherein the coding device comprises a transform device for performing a transform method, The transformation method include: A unary encoding step of performing unary encoding on a sequence based on input non-negative integer values, i.e., the first integer sequence, to obtain a code string of a unary code; as well as a unary decoding step, decoding the code string of the unary code by unary decoding with a rule that the bit value '0' and the bit value '1' are opposite to those of the unary code of the unary encoding step, to obtain a sequence based on non-negative integer values, i.e., a second integer sequence, The first integer sequence is a sequence based on non-negative integer values obtained by converting any one of sound, image, and video into a digital signal and quantizing it. The parameter determination step obtains, for each specified sample included in the sequence based on the non-negative integer value input to the encoding device, a Glumb parameter s corresponding to the sequence of non-negative integer values based on the specified sample, that is, the non-negative integer value included in the input integer sequence, and a parameter code corresponding to the Glumb parameter s, When the Glumb parameter s is less than 1, The transformation method uses the input integer sequence as the first integer sequence to obtain the second integer sequence. The integer encoding step uses the inverse of the Glumb parameter s obtained in the parameter determination step as the Glumb parameter to perform Glumb encoding on the second integer sequence to obtain an integer code. When the Glumb parameter s is greater than 1, The integer encoding step uses the Glumb parameter s obtained in the parameter determination step as a Glumb parameter to perform Glumb encoding on the input integer sequence to obtain an integer code.
7. A decoding method, wherein a decoding device performs a parameter decoding step and an integer decoding step, wherein the decoding device comprises a transform device that performs a transform method, The parameter decoding step decodes the parameter code to obtain the Glenbow parameter s, The integer decoding step decodes the input integer code to obtain a sequence based on non-negative integer values. The transformation method include: a unary encoding step of performing unary encoding on the sequence based on non-negative integer values obtained in the integer decoding step, i.e., the first integer sequence, to obtain a code string of a unary code; a bit reversal processing step, for each bit of the code string of the unary code, replacing the bit value '0' with the bit value '1', and replacing the bit value '1' with the bit value '0', to obtain a replaced code string; as well as a unary decoding step of performing unary decoding on the replaced code string to obtain a sequence based on non-negative integer values, i.e., a second integer sequence, The first integer sequence is a sequence based on non-negative integer values obtained by decoding an integer code and representing a value obtained by converting any one of sound, image, and video into a digital signal and quantizing it. When the Glumb parameter s is less than 1, The integer decoding step uses the inverse of the Glumb parameter s obtained in the parameter decoding step as the Glumb parameter to perform Glumb decoding on the input integer code to obtain a sequence of non-negative integer values. The transformation method uses the sequence of non-negative integer values obtained in the integer decoding step as the first integer sequence to obtain the second integer sequence, and outputs the obtained second integer sequence as a decoded integer sequence. When the Glumb parameter s is greater than 1, The integer decoding step uses the Glumb parameter s obtained in the parameter decoding step as a Glumb parameter to perform Glumb decoding on the input integer code to obtain a sequence of non-negative integer values, and outputs the obtained sequence of non-negative integer values as a decoded integer sequence.
8. A decoding method, wherein a decoding device performs a parameter decoding step and an integer decoding step, wherein the decoding device comprises a transform device that performs a transform method, The parameter decoding step decodes the parameter code to obtain the Glenbow parameter s, The integer decoding step decodes the input integer code to obtain a sequence based on non-negative integer values. The transformation method include: a unary encoding step of performing unary encoding on the sequence based on non-negative integer values obtained in the integer decoding step, i.e., the first integer sequence, to obtain a code string of a unary code; as well as a unary decoding step, decoding the code string of the unary code by unary decoding with a rule that the bit value '0' and the bit value '1' are opposite to those of the unary code of the unary encoding step, to obtain a sequence based on non-negative integer values, i.e., a second integer sequence, The first integer sequence is a sequence based on non-negative integer values obtained by decoding an integer code and representing a value obtained by converting any one of sound, image, and video into a digital signal and quantizing it. When the Glumb parameter s is less than 1, The integer decoding step uses the inverse of the Glumb parameter s obtained in the parameter decoding step as the Glumb parameter to perform Glumb decoding on the input integer code to obtain a sequence of non-negative integer values. The transformation method uses the sequence of non-negative integer values obtained in the integer decoding step as the first integer sequence to obtain the second integer sequence, and outputs the obtained second integer sequence as a decoded integer sequence. When the Glumb parameter s is greater than 1, The integer decoding step uses the Glumb parameter s obtained in the parameter decoding step as a Glumb parameter to perform Glumb decoding on the input integer code to obtain a sequence of non-negative integer values, and outputs the obtained sequence of non-negative integer values as a decoded integer sequence.
9. A computer-readable recording medium storing a program for causing a computer to function as the encoding device according to claim 1 or 2. 10 . A computer-readable recording medium storing a program for causing a computer to function as the decoding device according to claim 3 or 4.
Citation Information
Patent Citations
Device for encoding and decoding
CN101601087A
Encoding method, encoding device, decoding method, decoding device, program, and recording medium
CN102171752A
Moving picture coding method, moving picture coding apparatus, moving picture decoding method, moving picture decoding apparatus, and moving picture coding and decoding apparatus
TW201401886A
