Decoding device, decoding method, and program
The decoding device addresses the limitations of fixed-length codeword techniques by switching between codebooks or parse trees, enabling efficient decoding from intermediate codewords and improving compression efficiency.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2026-04-02
AI Technical Summary
Conventional reversible compression encoding techniques with fixed codeword lengths face challenges in improving compression efficiency and allow decoding only from the beginning of a codeword sequence, limiting flexibility and efficiency.
A decoding device that switches between multiple codebooks or parse trees based on a predetermined switching rule, allowing decoding to start from any intermediate codeword by using a delimiter codeword to determine the appropriate codebook or parse tree for subsequent decoding.
Enables efficient decoding from any point in the codeword sequence, enhancing compression efficiency and flexibility without requiring decoding from the start, while maintaining unique encoding of symbol sequences.
Smart Images

Figure JP2024033930_02042026_PF_FP_ABST
Abstract
Description
Decryption device, decryption method, and program
[0001] This invention relates to a technique for decoding losslessly compressed codewords.
[0002] Currently, technologies are being developed to reversibly compress and encode finite-precision digital signals and digital data, such as audio signals, image signals, time-series signals obtained from various sensors including brightness sensors, acceleration sensors, and seismometers, as well as strings of characters and word sequences. Some reversible compression and encoding technologies maintain a constant length for the output codewords corresponding to the input symbol sequence. In this case, since the codewords can be decoded at fixed lengths, there is an advantage in that data handling becomes easier when performing calculations, searches, and other processing on the codewords without decoding them.
[0003] When designing a reversible compression encoding technique, the rules that specify which codeword to output for which symbol sequence (hereinafter referred to as encoding rules) are represented using a codebook or parse tree. For example, in the case of an encoding rule that outputs a 3-bit codeword for a symbol sequence consisting of a combination of three symbols a, b, and c, it is desirable to assign a symbol sequence to each of the eight codewords that can be represented by 3 bits, and maximize the expected value of the length of the symbol sequence encoded by 3 bits for a randomly given symbol sequence. To achieve this, it is effective to design the encoding rule by assigning a 3-bit codeword to a symbol sequence that contains as many symbols as possible that have a high probability of appearing among symbols a, b, and c. Figures 1A and 1B show examples of parse trees and codebooks. Figure 1A is a parse tree representing an effective encoding rule when the symbol a has a high probability of appearing, and the codebook in Figure 1B is equivalent to the parse tree in Figure 1A. In the parse tree in Figure 1A, the 3-bit codeword is assigned to the leaf nodes, which are the terminal nodes, and each symbol that makes up the symbol sequence is assigned to an edge. To construct a code that is more efficient in terms of compression, it is necessary to ensure that any sequence of symbols input can be uniquely encoded. In order to construct such a code, each node must either have no child nodes (i.e., be a leaf node), as shown in the parse tree in Figure 1A, or have child nodes equal to the number of symbols (in this example, three: a, b, and c).
[0004] However, the constraints on the nodes mentioned above are strict, and it tends to be difficult to improve compression efficiency with codes that have a constant codeword length. For example, in the example in Figure 1, suppose that the symbol a has a much higher probability of appearing than symbols b and c. In this case, in order to increase the expected value of the code word length that can be encoded, it is efficient to assign a codeword to the symbol sequence aaa, which consists of consecutive symbols a. However, in order to satisfy the above constraints, it is necessary to assign a codeword to the symbol sequences aab and aac even if their probability of appearance is not very high. If the probability of appearance of the symbol sequences ba and ca is higher than that of aab and aac, the word length for each probability of appearance may become shorter. As a result, a limited number of codewords are wasted, and the compression efficiency decreases.
[0005] Therefore, the technology described in Non-Patent Document 1 relaxes the above constraints by using multiple parse trees. Figures 2A and 2B show examples of parse trees and codebooks. Figure 2A is a parse tree equivalent to that in Figure 1A, and the codebook in Figure 2B is equivalent to the parse tree in Figure 2A. In the parse tree of Figure 2A, two parse trees T0 and T1 represent one coding rule. In parse trees T0 and T1, codewords are assigned to nodes other than leaves. By defining a parse tree switching rule such that when a codeword assigned to a node other than a leaf is output, the next symbol sequence is coded using parse tree T1, and when a codeword assigned to a leaf is output, the next symbol sequence is coded using parse tree T0, the compression efficiency is increased while ensuring that any symbol sequence can be uniquely coded regardless of the input. In the parse tree of Figure 2A, since codewords are assigned to nodes other than leaves, a node does not need to have as many child nodes as there are types of symbols. Therefore, as can be seen in Figures 2A and 2B, there is no need to assign codewords to the symbol sequences aab and aac, and instead it is possible to assign codewords to the symbol sequences ba and ca.
[0006] H. Yamamoto, H. Yokoo, “Average-Sense Optimality and Competitive Optimality for Almost Instantaneous VF Codes,” in IEEE Transactions on Information Theory, vol.47, no.6, pp.2174-2184, Sep. 2001.
[0007] On the other hand, the former, the conventional method in which codewords have a fixed length and coding rules are represented by a single codebook or parse tree, has the important property that decoding is possible even if decoding starts from an intermediate codeword in the input codeword sequence.
[0008] In contrast, the latter, conventional method, in which coding rules are represented by multiple codebooks and parse trees, offers high compression efficiency, but it has the drawback that decoding cannot be started from an intermediate codeword in the input codeword sequence. That is, in order to decode using the latter conventional method, it is necessary to identify the codebook and parse tree corresponding to each codeword in the input codeword sequence. Here, the codebook and parse tree corresponding to the first codeword are predetermined, but the codebooks and parse trees corresponding to subsequent codewords are identified based on the decoding of the immediately preceding codeword. Therefore, in order to decode an intermediate codeword, it is necessary to start decoding from the first codeword and track the switching of the codebook and parse tree corresponding to each codeword. For this reason, it is not possible to simply start decoding from an intermediate codeword.
[0009] Therefore, the present invention provides a technique that allows decoding to begin from a codeword in the middle of a codeword sequence in an encoding scheme in which encoding rules are represented by multiple codebooks or parse trees.
[0010] The decoding device has a decoding processing unit that decodes multiple codewords included in the input codeword sequence by switching between multiple codebooks or parse trees used for decoding. The decoding processing unit determines the codebook or parse tree to be used for decoding the second codeword, which follows the first codeword, according to the first codeword included in the input codeword sequence and the codebook or parse tree used for decoding the first codeword. However, if the first codeword is a delimiter codeword that is a specific codeword, the decoding processing unit determines the codebook or parse tree to be used for decoding the second codeword to be the specific codebook or parse tree corresponding to that delimiter codeword, regardless of the codebook or parse tree used for decoding the first codeword.
[0011] This allows decoding to begin from a codeword in the middle of a codeword sequence in encoding schemes where encoding rules are represented by multiple codebooks or parse trees.
[0012] Figure 1A shows an example of a parse tree. Figure 1B shows an example of a codebook. Figure 2A shows an example of a parse tree. Figure 2B shows an example of a codebook. Figure 3 is a block diagram illustrating the configuration of an encoding device. Figure 4 is a block diagram illustrating the configuration of a decoding device. Figures 5A and 5B show examples of codebooks. Figure 6 is a flowchart illustrating the operation of an encoding device. Figure 7 is a flowchart illustrating the operation of a decoding device. Figure 8 shows an example of a codebook. Figure 9 shows an example of a parse tree. Figure 10 shows an example of a codebook. Figures 11A to 11C show examples of codebooks. Figure 12 shows an example of the functional configuration of a computer that implements each device in the embodiment.
[0013] Embodiments of the present invention will be described below with reference to the drawings.
[0014] [First Embodiment] The first embodiment will now be described. The encoding device of this embodiment encodes multiple symbol sequences contained in an input symbol sequence using multiple codebooks or parse trees in which correspondences between symbol sequences and codewords are recorded. The encoding device of this embodiment encodes each of the multiple symbol sequences while switching the codebooks or parse trees used for encoding according to a predetermined switching rule. The codewords in each codebook and parse tree correspond to the codebook and parse tree to be switched to when encoded with that codeword. The switching rule during encoding determines the codebook or parse tree to be used to encode the second symbol sequence following the first symbol sequence to obtain the second codeword, depending on the first codeword obtained by encoding the first symbol sequence contained in the input symbol sequence and the codebook or parse tree used to obtain the first codeword. Here, the first symbol sequence and the second symbol sequence are symbol sequences contained in the input symbol sequence. "The second symbol sequence following the first symbol sequence" represents the order of the encoding process. That is, the second symbol sequence is the symbol sequence encoded after the first symbol sequence. The relative positions of the first and second symbol sequences in the input symbol sequence can be anything, as long as the second symbol sequence is encoded after the first symbol sequence. For example, the second symbol sequence is the sequence immediately following the first symbol sequence, but this does not limit the present invention. However, the switching rule stipulates that when the first symbol sequence is encoded into a delimiter codeword, regardless of the codebook or parse tree used to encode the first symbol sequence, the codebook or parse tree used to encode the second symbol sequence following the first symbol sequence will be the specific codebook or parse tree corresponding to the delimiter codeword. In other words, when the first symbol sequence is encoded into a delimiter codeword, regardless of which codebook or parse tree was used to encode the first symbol sequence into the delimiter codeword, the codebook or parse tree used to encode the second symbol sequence following the first symbol sequence will be the specific codebook or parse tree corresponding to the delimiter codeword. That is, a delimiter codeword means a codeword whose switching destination for the codebook or parse tree is common to all codebooks or parse trees. The encoding device of this embodiment outputs the codeword sequence obtained in this manner.
[0015] The decoding device of this embodiment decodes multiple codewords included in the input codeword sequence by switching the codebook or parse tree used for decoding from among multiple codebooks or parse trees according to a predetermined switching rule. The multiple codebooks or parse trees of this embodiment are the same as the multiple codebooks or parse trees used in the encoding device, and the correspondence between symbol sequences and codewords is recorded. The codewords in each codebook and parse tree correspond to the codebook and parse tree to which the device should switch when that codeword is decoded. The switching rule during decoding corresponds to the switching rule during encoding, and makes the codebook or parse tree used to obtain the codeword the same as the codebook or parse tree used to decode the codeword. In other words, the switching rule during decoding determines the codebook or parse tree to be used for decoding the second codeword, which follows the first codeword, according to the first codeword included in the input codeword sequence and the codebook or parse tree used to decode the first codeword. Here, the first codeword and the second codeword are codewords included in the input codeword sequence. "The second codeword following the first codeword" refers to the sequential relationship of the encoding process by the encoding device described above. That is, in the encoding process, the second codeword is the codeword obtained after the first codeword. As long as the second codeword is obtained after the first codeword, the positional relationship between the first and second codewords in the input codeword sequence can be anything. For example, the second codeword is the codeword located immediately after the first codeword, but this does not limit the present invention. For example, if it is possible to specify the order in which the multiple codewords included in the input codeword sequence were obtained, the second codeword does not necessarily have to be the codeword located immediately after the first codeword. However, this switching rule specifies that, when the first codeword is a delimiter codeword that is a specific codeword, the codebook or parse tree used to decode the second codeword following the first codeword will be the specific codebook or parse tree corresponding to the delimiter codeword, regardless of the codebook or parse tree used to decode the first codeword. In other words, if the first codeword is a delimiter codeword, then regardless of which codebook or parse tree is used to decode the first codeword, the codebook or parse tree used to decode the second codeword following the first codeword will be the specific codebook or parse tree corresponding to the delimiter codeword.In other words, the decoding device of this embodiment switches the codebook or parse tree used to decode the second codeword following the first codeword, depending on the first codeword included in the input codeword sequence and the codebook or parse tree used to decode the first codeword. If the first codeword is a delimiter codeword that is a specific codeword, the codebook or parse tree used to decode the second codeword following the first codeword is set to the specific codebook or parse tree corresponding to that delimiter codeword, regardless of the codebook or parse tree used to decode the first codeword.
[0016] Here, the specific codebook or parse tree used to decode the second codeword following the first codeword, which is a delimiter codeword, is the same regardless of which codebook or parse tree is used to decode the first codeword. Therefore, if the input codeword sequence contains a delimiter codeword, the decoding device of this embodiment can identify the codebook or parse tree used to decode the second codeword following the first codeword, even if it cannot identify the codebook or parse tree used to decode the first codeword, which is a delimiter codeword. For example, the decoding device of this embodiment can extract a delimiter codeword from the input codeword sequence based on the input information, and determine the codebook or parse tree used to decode the second codeword following the extracted first codeword, which is a delimiter codeword, to be a specific codebook or parse tree corresponding to that delimiter codeword. Therefore, the decoding device of this embodiment can start the decoding process from the second codeword following the first codeword, which is a delimiter codeword, without performing decoding processing on codewords prior to the delimiter codeword included in the input codeword sequence. As a result, the decoding device of this embodiment can start decoding from a codeword in the middle of the input codeword sequence. In other words, in this embodiment, the coding rule is represented by a combination of multiple codebooks or parse trees representing codewords of a predetermined length, and the switching rule for the codebooks or parse trees depends on the codeword. Here, the multiple codebooks or parse trees include a delimiter codeword, which is a specific codeword, and regardless of which codebook or parse tree is used to decode the delimiter codeword, a switch is made to the specific codebook or parse tree corresponding to that delimiter codeword. As a result, the decoding device of this embodiment can, for example, extract a delimiter codeword from the input codeword sequence based on the input information and switch to the specific codebook or parse tree corresponding to that delimiter codeword, thereby enabling decoding to begin from a codeword in the middle of the input codeword sequence.
[0017] A symbol is an element of a set consisting of a finite number of elements, and can be a text composed of letters or words, such as a, b, c, which are elements of the alphabet set {a, b, c}. A symbol sequence is a sequence formed by arranging one or more symbols in a line, for example, baaa is a symbol sequence with length 4 for two symbols {a, b}. For example, a symbol sequence is a sequence of digital signals or digital data, which has been converted into a finite-precision numerical value through quantization or other means. Examples of symbol sequences are listed below. (1) Time-series signals obtained from audio signals, image signals, and various sensors such as luminance sensors, acceleration sensors, and seismometers. (2) A series of spectral values obtained by performing discrete Fourier transforms, discrete cosine transforms, and modified discrete cosine transforms on the signals in (1). (3) A series of linear prediction coefficients, line spectral pairs (LSPs), immitance spectral pairs (ISPs), and partial autocorrelation coefficients (PARCOR coefficients) obtained by performing linear predictive analysis on the signals in (1). (4) A series of feature quantities obtained by inputting the signals in (1) into a neural network. In other words, a sequence of symbols is, for example, a sequence of finite-precision digital signals or a sequence of digital data. The input sequence of symbols input to the encoding device of this embodiment is the sequence of symbols to be encoded. The input sequence of symbols of this embodiment includes a plurality of sequence of symbols.
[0018] A codeword is a sequence formed by arranging at least one of two codes (for example, the codes {0, 1}). For example, 001 is a codeword with a length (code length) of 3. The length of a codeword in this embodiment is constant. A codeword sequence is a sequence formed by arranging one or more codewords. For example, 001101111110 is a sequence formed by arranging four codewords 001, 101, 111, and 110. The input codeword sequence input to the decoding device in this embodiment is the codeword sequence to be decoded. The input codeword sequence in this embodiment includes multiple codewords.
[0019] The codebook and parse tree represent the correspondence between symbol sequences and codewords. This allows the encoding device to identify the codeword corresponding to a symbol sequence, and the decoding device to identify the symbol sequence corresponding to a codeword. The encoding and decoding devices must use the same codebook or parse tree.
[0020] This embodiment will be described below with reference to the drawings. The following description will focus on examples where coding rules are represented using a codebook, but representing coding rules using a parse tree will not result in any difference in the coding / decoding procedure. In other words, the codebook in the coding / decoding procedure described below may be replaced with a parse tree.
[0021] <Configuration> As illustrated in Figure 3, the encoding device 11 of this embodiment has an encoding processing unit 111 and a storage unit 119. As illustrated in Figure 4, the decoding device 12 of this embodiment has a decoding processing unit 121 and a storage unit 129.
[0022] <Preprocessing> As mentioned above, each codeword in each codebook corresponds to the codebook to which the codeword should be switched when it is encoded or decoded. Therefore, if the same codeword (delimiter codeword) that leads to the same codebook is assigned to all of the multiple codebooks used for encoding and decoding, it becomes obvious which codebook should be used to decode the next codeword (second codeword) after the codeword that is this delimiter codeword (first codeword). Various methods can be considered for assigning such codewords. Preferably, it is desirable that as many delimiter codewords as possible be assigned to each codebook. Below, as an example, we will illustrate the case in which encoding and decoding are performed by switching between two codebooks T0 and T1.
[0023] Figures 5A and 5B illustrate codebooks T0 and T1, to which such delimiter codewords are assigned. In this example, the following switching rule is assumed to be used. <Switching rule during encoding> Codebook T k Other symbol sequences that begin with a symbol sequence encoded using ∈{T0, T1} (k∈{0, 1}) are in the codebook T k If it is not recorded, switch to codebook T0; if it is recorded, switch to codebook T1. <Decoding switching rules> Codebook T k The codebook T is a set of symbols whose beginning is the symbol sequence obtained by decoding a codeword using ∈{T0, T1}. kIf the data is not recorded, switch to codebook T0; if it is recorded, switch to codebook T1.
[0024] In this case, for codewords 000, 010, 011, 100, and 111, the codebook switching target will be T0 regardless of whether codebook T0 or codebook T1 is used. For codewords 001 and 110, the codebook switching target will be T1 regardless of whether codebook T0 or codebook T1 is used. In other words, codewords 000, 010, 011, 100, and 111, as well as codewords 001 and 110, are delimiter codewords. That is, codebook T is used for encoding and decoding codewords that are delimiter codewords (first codewords). k Regardless of ∈{T0, T1}, the codebook used for encoding and decoding the codeword following the first codeword (the second codeword) is the specific codebook corresponding to the delimiter codeword. Therefore, during decoding, even if the codebook used for decoding the delimiter codeword (the first codeword) cannot be identified, the codebook used for decoding the next codeword (the second codeword) can be identified. Consequently, decoding can begin from the codeword to be decoded after the delimiter codeword (the second codeword), even if it is in the middle of the codeword sequence.
[0025] In the preprocessing of this embodiment, such codebooks T0 and T1 are stored in the storage unit 119 of the encoding device 11 (Figure 3) and the storage unit 129 of the decoding device 12 (Figure 4).
[0026] <Encoding Process> The encoding process (step S111) of this embodiment will be illustrated using Figures 3 and 6. The encoding processing unit 111 of the encoding device 11 (Figure 3) of this embodiment receives an input symbol sequence, which is the symbol sequence to be encoded. The input symbol sequence of this embodiment includes multiple symbol sequences. The encoding processing unit 111 uses multiple codebooks T0, T1 (Figures 5A and 5B) stored in the storage unit 119 to encode the multiple symbol sequences included in the input symbol sequence to obtain and output a codeword sequence. At this time, the encoding processing unit 111 uses the codebook T kEncode each of the plurality of symbol sequences while switching ∈{T0, T1} according to a predetermined switching rule. That is, the encoding processing unit 111 encodes a symbol sequence (first symbol sequence) included in the input symbol sequence to obtain a codeword (first codeword) and a codebook T used to obtain the codeword (first codeword). k According to, determine a codebook T for encoding the next symbol sequence (second symbol sequence) of the codeword (first codeword) to obtain a codeword (second codeword). However, when the symbol sequence (first symbol sequence) is encoded into a delimiter codeword, regardless of the codebook T used for encoding the symbol sequence (first symbol sequence), the codebook used for encoding the next symbol sequence (second symbol sequence) of the codeword (first codeword) is a specific codebook T corresponding to the delimiter codeword. k Becomes. The encoding processing unit 111 performs this process until all the symbol sequences included in the input symbol sequence are encoded. k k k The encoding processing unit 111 performs this process until all the symbol sequences included in the input symbol sequence are encoded.
[0027] <Specific Example of Encoding Process> The following shows a specific example of the encoding process in this embodiment. This encoding process includes the following three steps.
[0028] (Step S111a) The encoding processing unit 111 of the encoding device 11 (FIG. 3) starts encoding using a predetermined codebook T among the plurality of codebooks T0 and T1 stored in the storage unit 129 as the current codebook. For example, the codebook T0 may be used as the current codebook. Also, the encoding processing unit 111 uses the input symbol sequence as the current symbol sequence. Here, the current symbol sequence refers to the symbol sequence that is the target of the encoding process at the current time. k Encode each of the plurality of symbol sequences while switching ∈{T0, T1} according to a predetermined switching rule. That is, the encoding processing unit 111 encodes a symbol sequence (first symbol sequence) included in the input symbol sequence to obtain a codeword (first codeword) and a codebook T used to obtain the codeword (first codeword).
[0029] (Step S111b) The encoding processing unit 111 compares the current symbol sequence with the symbol sequences included in the current codebook using the current codebook. The encoding processing unit 111 obtains a codeword corresponding to a symbol sequence (hereinafter referred to as symbol sequence σ) included in the current codebook that most closely matches the beginning of the current symbol sequence, and further switches the current codebook according to the switching rule during encoding. That is, the encoding processing unit 111 uses the current codebook T k ∈{T0, T1} to use the symbol sequence σ encoded as the beginning of other symbol sequences for the codebook Tk If it is not recorded, the new current codebook is set to codebook T0; if it is recorded, the new current codebook is set to codebook T1. For example, in the case of codebooks T0 and T1 illustrated in Figures 5A and 5B, if the encoding processing unit 111 has encoded the symbol sequence aaa into codeword 000 (delimited codeword) using codebook T0, then since there are no other symbol sequences in codebook T0 that begin with the symbol sequence aaa, the new current codebook is set to codebook T0. Also, if the encoding processing unit 111 has encoded the symbol sequence baaa into codeword 000 (delimited codeword) using codebook T1, then since there are no other symbol sequences in codebook T1 that begin with the symbol sequence baaa, the new current codebook is set to codebook T0. Thus, when a sequence of symbols (first sequence of symbols) is encoded into a delimiter codeword, the codebook used to encode the next sequence of symbols (second sequence of symbols) becomes the specific codebook corresponding to the delimiter codeword, regardless of the codebook used to encode the first sequence of symbols. On the other hand, if the encoding processing unit 111 encodes the sequence of symbols b into codeword 101 using codebook T0, then since codebook T0 contains ba, which begins with b, the new current codebook is set to codebook T1. Also, if the encoding processing unit 111 encodes the sequence of symbols bc into codeword 101 using codebook T1, then since codebook T1 does not contain a sequence of symbols beginning with bc, the new current codebook is set to codebook T0. In this way, when a sequence of symbols (first sequence of symbols) is encoded into a codeword other than a delimiter codeword, the codebook used to encode the next sequence of symbols (second sequence of symbols) is determined according to the resulting codeword and the codebook used to encode the sequence of symbols. Furthermore, the encoding processing unit 111 removes the initial word that matches the symbol sequence σ from the current symbol sequence and uses that as the new current symbol sequence.
[0030] (Step S111c) If the length of the current symbol sequence obtained by the process in step S111b is 0, the encoding processing unit 111 outputs a codeword sequence obtained by concatenating all the codewords obtained in step S111b and terminates the encoding process. Otherwise, the encoding processing unit 111 returns to the process in step S111b.
[0031] <Example of Encoding Process> Using the codebooks T0 and T1 illustrated in Figures 5A and 5B, we illustrate the process of encoding the input symbol sequence aaabbbccaab. In this example, the arrangement of the symbols in the input symbol sequence aaabbbccaab represents the order of the encoding process, and encoding is performed sequentially from the first symbol sequence. The encoding processing unit 111 first sets T0 as the current codebook and the current symbol sequence as aaabbbccaab (step S111a).
[0032] The encoding processing unit 111 obtains a codeword 000 that corresponds to the symbol sequence aaa in the current codebook T0, which has the longest match to the beginning of the current symbol sequence aaabbbccaab. Also, since no other symbol sequences beginning with aaa are recorded in the current codebook T0, the encoding processing unit 111 sets the new current codebook to T0. Furthermore, the encoding processing unit 111 sets the symbol sequence bbbccaab, obtained by removing the beginning that matches the symbol sequence aaa from the current symbol sequence aaabbbccaab, as the new current symbol sequence (step S111b).
[0033] Since the length of the current symbol sequence bbbccaab is not zero (step S111c), the encoding processing unit 111 obtains a codeword 101 corresponding to the symbol sequence b contained in the current codebook T0 that has the longest match to the beginning of the current symbol sequence bbbccaab. Also, since another symbol sequence ba that begins with symbol sequence b is recorded in the current codebook T0, the encoding processing unit 111 sets the new current codebook to T1. Furthermore, the encoding processing unit 111 sets the symbol sequence bbccaab, obtained by removing the beginning that matches symbol sequence b from the current symbol sequence bbbccaab, as the new current symbol sequence (step S111b).
[0034] Since the length of the current symbol sequence bbccaab is not zero (step S111c), the encoding processing unit 111 obtains a codeword 100 corresponding to the symbol sequence bb contained in the current codebook T1 that has the longest match to the beginning of the current symbol sequence bbccaab. Also, since no other symbol sequences beginning with the symbol sequence bb are recorded in the current codebook T1, the encoding processing unit 111 sets the new current codebook to T0. Furthermore, the encoding processing unit 111 sets the symbol sequence ccaab, obtained by removing the beginning that matches the symbol sequence bb from the current symbol sequence bbccaab, as the new current symbol sequence (step S111b).
[0035] Since the length of the current symbol sequence ccaab is not zero (step S111c), the encoding processing unit 111 obtains a codeword 110 corresponding to the symbol sequence c contained in the current codebook T0 that has the longest match to the beginning of the current symbol sequence ccaab. Also, since another symbol sequence ca that begins with symbol sequence c is recorded in the current codebook T0, the encoding processing unit 111 sets the new current codebook to T1. Furthermore, the encoding processing unit 111 sets the symbol sequence caab, obtained by removing the beginning that matches symbol sequence c from the current symbol sequence ccaab, as the new current symbol sequence (step S111b).
[0036] Since the length of the current symbol sequence caab is not zero (step S111c), the encoding processing unit 111 obtains a codeword 111 corresponding to the symbol sequence ca contained in the current codebook T1 that has the longest match to the beginning of the current symbol sequence caab. Also, since no other symbol sequences beginning with symbol sequence ca are recorded in the current codebook T1, the encoding processing unit 111 sets the new current codebook to T0. Furthermore, the encoding processing unit 111 sets the symbol sequence a, obtained by removing the beginning that matches the symbol sequence ca from the current symbol sequence caab, as the new current symbol sequence (step S111b).
[0037] Since the length of the current symbol sequence ab is not zero (step S111c), the encoding processing unit 111 obtains codeword 010, which corresponds to the symbol sequence ab contained in the current codebook T0 and is the longest match to the beginning of the current symbol sequence ab. Also, since no other symbol sequences beginning with symbol sequence ab are recorded in the current codebook T0, the encoding processing unit 111 sets the new current codebook to T0. Furthermore, the encoding processing unit 111 sets the symbol sequence ε, obtained by removing the beginning that matches symbol sequence ab from the current symbol sequence ab, as the current symbol sequence. Note that ε represents a symbol sequence of length 0 (step S111b).
[0038] Since the length of the current symbol sequence ε is 0, the encoding processing unit 111 outputs the codeword sequence 000101100110111010 obtained by concatenating all the obtained codewords (step S111c).
[0039] <Decoding Process> The encoding process (step S121) of this embodiment will be illustrated using Figures 4 and 7. The decoding processing unit 121 of the decoding device 12 (Figure 4) of this embodiment receives the input codeword sequence, which is the codeword sequence to be decoded. The input codeword sequence of this embodiment is the codeword sequence output from the encoding device 11 and contains multiple codewords. The decoding processing unit 121 uses multiple codebooks T0 and T1 stored in the storage unit 119 to decode the multiple codewords included in the input codeword sequence to obtain and output a symbol sequence (output symbol sequence). At this time, the decoding processing unit 121 uses the codebook T k The decoding process 121 decodes each of the multiple codewords by switching between ∈{T0, T1} according to a predetermined switching rule. That is, the decoding processing unit 121 selects the codebook T to be used for decoding from among the multiple codebooks T0, T1. k While switching according to a predetermined switching rule, the system decodes multiple codewords included in the input codeword sequence to obtain a symbol sequence and outputs it. Here, the decoding processing unit 121 outputs a codeword (first codeword) included in the input codeword sequence and a codebook T used to decode the codeword (first codeword). k Accordingly, the codebook T used to decode the next codeword (second codeword) following the first codeword (first codeword) is used. kThe following is determined. However, if the codeword (first codeword) is a delimiter codeword, the decoding processing unit 121 will determine the codebook T used for decoding the codeword (first codeword). k Regardless of the codebook T used to decode the next codeword (second codeword) following the first codeword, k This can be defined in a specific codebook corresponding to the delimiter codeword. The decoding processing unit 121 performs this process until all codewords included in the input codeword sequence are decoded.
[0040] <Specific Example of Decryption Process> The following is a specific example of the decoding process in this embodiment. In the following, the codeword sequence obtained in step S111c is used as the input codeword sequence. Decryption can be started from the first codeword in the input codeword sequence, or from an intermediate codeword. The decoding process in this embodiment includes the following three steps.
[0041] (Step S121a) Input information for identifying the decoding start position in the input codeword sequence is input to the decoding processing unit 121 of the decoding device 12 (Figure 4). The decoding start position may be the position of the first codeword in the input codeword sequence, or it may be the position of the codeword following any delimiter codeword (first codeword) (second codeword) (intermediate codeword) among the multiple codewords included in the input codeword sequence. Note that "the first codeword in the input codeword sequence" means the first codeword to be encoded among the codewords included in the input codeword sequence. The positional relationship of the first codeword in the input codeword sequence may be anything. For example, the first codeword is the codeword located at the beginning of the input codeword sequence, but this does not limit the present invention. For example, if it is possible to identify the order in which the multiple codewords included in the input codeword sequence were obtained, then "the first codeword in the input codeword sequence" does not necessarily have to be the codeword located at the beginning of the input codeword sequence. The input information may be anything as long as it is information for identifying the decoding start position. For example, the input information may represent (1) a reference position which is the decoding start position, or (2) a reference position that represents the decoding start position or a position near the decoding start position (a reference position that roughly represents the decoding start position). The reference position may be represented, for example, by the number of codewords from the beginning of the input codeword sequence, by the number of bits from the beginning of the input codeword sequence, or by the number of participle codewords present from the beginning of the input codeword sequence to the delimiter codeword immediately preceding the decoding start position. The reference position expressed in bits may be represented, for example, by the number of bits from the beginning of the input codeword sequence to the first bit of the codeword, or by the number of bits other than the first bit. Alternatively, for example, the input information may represent (3) information representing a predetermined position in the input codeword sequence and the number of participle codewords present from that predetermined position to the delimiter codeword immediately preceding the decoding start position. The predetermined position may be represented, for example, by the number of codewords from the beginning of the input codeword sequence, or by the number of bits. A predetermined position, represented by a number of bits, may be represented, for example, by the number of bits from the beginning of the input codeword sequence to the first bit of the codeword, or by the number of bits other than the first bit.In addition, the input information may also be information representing the participle codeword immediately preceding the decoding start position (4).
[0042] Based on the input information, the decoding processing unit 121 selects the codebook T0, T1 (Figures 5A and 5B) stored in the storage unit 129 to be used for decoding the first codeword to be decoded. k Set ∈{T0, T1} as the current codebook and begin decoding the first codeword to be decoded.
[0043] If the decoding start position identified by the input information is the position of the first codeword in the input codeword sequence, then the codebook T used to decode that first codeword is used. k k is known and is used as the current codebook. For example, k is the same as the codebook number used when the encoding process of the input symbol sequence was started, so codebook T0 can be used as the current codebook. In this case, the decoding processing unit 121 uses the input codeword sequence as the current codeword. Here, the current codeword is the codeword that is currently being decoded.
[0044] If the decoding start position identified by the input information is the position of the next codeword (second codeword) (intermediate codeword) after any delimiter codeword (first codeword), the decoding processing unit 121 extracts a delimiter codeword from the input codeword sequence based on the input information and uses a codebook T to decode the next codeword (second codeword) after the extracted delimiter codeword (first codeword). k This codeword is assigned to a specific codebook corresponding to the delimiter, and this becomes the current codebook. Specific examples are shown below.
[0045] (1) If the input information is a reference position representing the decoding start position, the decoding processing unit 121 selects one of the codebooks T stored in the storage unit 129. k' Referencing ∈{T0, T1}(k'∈{0,1}), a specific codebook T corresponds to the delimiter codeword corresponding to the decoding start position (where the decoding start position is the codeword following the delimiter codeword). k This is specified in the codebook used for decoding the codeword (second codeword) at the decoding start position. As mentioned above, the codebook T used for decoding the codeword following the delimiter codeword is specified. kRegardless of the codebook or parse tree used to decode the delimited codeword, the specific codebook T corresponding to the delimited codeword is used. k For example, in the case of codebooks T0 and T1 illustrated in Figures 5A and 5B, the codebook T used to decode the delimiter codewords 000,010,011,100,111,001,110 is T k In either case, the codebook used to decode the codeword following the delimiter codewords 000,010,011,100,111 is T0, and the codebook used to decode the codeword following the delimiter codewords 001,110 is T1. That is, in the examples of Figures 5A and 5B, the specific codebook corresponding to the delimiter codewords 000,010,011,100,111 is T0, and the specific codebook corresponding to the delimiter codewords 001,110 is T1.
[0046] (2) If the input information is a reference position representing the decoding start position or a position near the decoding start position, the decoding processing unit 121 reads the codewords of the input codeword sequence in order from the codeword encoded before the codeword at the reference position, and determines whether the read codeword is a delimiter codeword. There is no limit to the order in which the codewords are read and the determination is made. For example, the reading and determination may start from the codeword encoded immediately before the codeword at the reference position of the input codeword sequence, and the reading and determination of codewords may be performed in the order they were encoded until the read codeword is determined to be a delimiter codeword, or the reading and determination of codewords may be performed in reverse order of encoding. If the read codeword is a delimiter codeword, the decoding processing unit 121 reads one of the codebooks T stored in the storage unit 129. k' Refer to ∈{T0, T1} and specify the codebook T corresponding to the delimiter codeword. k This is specified in the codebook used for decoding the next codeword (second codeword) (the codeword at the decoding start position) following the delimiter codeword.
[0047] (3) If the input information is information representing the number of participle codewords (specified number) present at a predetermined position in the input codeword sequence and from that predetermined position to the delimiter codeword immediately preceding the decoding start position, the decoding processing unit 121 reads the codewords of the input codeword sequence in order from the reference position, determines whether the read codeword is a delimiter codeword, and counts the number of delimiter codewords. There is no limitation on the order in which the codewords are read and the determination is made. If the number of delimiter codewords reaches the specified number, the decoding processing unit 121 uses one of the codebook T stored in the storage unit 129. k' Referencing ∈{T0, T1}, a specific codebook T corresponds to the delimiter codeword when the specified number is reached. k This is specified in the codebook used for decoding the next codeword (second codeword) (the codeword at the decoding start position) following the delimiter codeword.
[0048] (4) If the input information is information representing the partition codeword immediately preceding the decoding start position, the decoding processing unit 121 reads the codewords of the input codeword sequence in order and determines whether the read codeword is a delimiter codeword represented by the input information. There is no limitation on the order in which the codewords are read and the determination is made. If the read codeword is a delimiter codeword represented by the input information, the decoding processing unit 121 selects one of the codebooks T stored in the storage unit 129. k' Refer to ∈{T0, T1} and specify the codebook T corresponding to the delimiter codeword. k This is specified in the codebook used for decoding the next codeword (second codeword) (the codeword at the decoding start position) following the delimiter codeword.
[0049] If the decoding start position identified by the input information is at the position of the next codeword (second codeword) (intermediate codeword) after any delimiter codeword (first codeword), the decoding processing unit 121 takes the codewords obtained by removing the codewords from the input codeword sequence from the first codeword to the delimiter codeword (first codeword) as the current codeword. In other words, the decoding processing unit 121 first decodes the codeword (second codeword) that follows the delimiter codeword (first codeword).
[0050] (Step S121b) The decoding processing unit 121 processes the current codebook T kUsing the current codeword and the codebook T k The codewords contained in are compared. The decoding processing unit 121 finds the current codeword that matches the beginning of the current codeword in the current codebook T. k The decryption processing unit 121 obtains a symbol sequence corresponding to the codeword (hereinafter referred to as codeword w) contained in the codebook, and further switches the current codebook according to the decryption switching rule. That is, the decryption processing unit 121 switches the current codebook T k The codebook T is a set of symbols whose beginning is the symbol sequence obtained by decoding a codeword using ∈{T0, T1}. kIf the code is not recorded, the new current codebook is set to codebook T0; if it is recorded, the new current codebook is set to codebook T1. For example, in the case of codebooks T0 and T1 illustrated in Figures 5A and 5B, if the decoding processing unit 121 decodes the codeword 000 (delimited codeword) using codebook T0 and obtains the symbol sequence aaa, then since there are no other symbol sequences in codebook T0 that begin with the symbol sequence aaa, the new current codebook is set to codebook T0. Similarly, if the decoding processing unit 121 decodes the codeword 000 (delimited codeword) using codebook T1 and obtains the symbol sequence bc, then since there are no other symbol sequences in codebook T1 that begin with the symbol sequence bc, the new current codebook is set to codebook T0. In this way, when a codeword that is a delimited codeword (first codeword) is decoded, regardless of the codebook used to decode the delimited codeword, the codebook used to decode the next codeword (second codeword) is determined to be a specific codebook corresponding to the delimited codeword. On the other hand, if the decoding processing unit 121 decodes the codeword 101 using codebook T0 and obtains the symbol sequence b, then codebook T0 contains ba, which begins with b, and the new current codebook is set to codebook T1. Also, if the decoding processing unit 121 decodes the codeword 101 using codebook T1 and obtains the symbol sequence bb, then codebook T1 does not contain a symbol sequence that begins with bb, and the new current codebook is set to codebook T0. In this way, when a codeword other than a delimiter codeword (first codeword) is decoded, the codebook to be used to decode the next codeword (second codeword) is determined according to the codeword (first codeword) and the codebook used to decode the codeword (first codeword). Furthermore, the decoding processing unit 121 sets the codeword obtained by removing the beginning that matches the codeword w from the current codeword as the new current codeword.
[0051] (Step S121c) If the length of the current codeword obtained in step S121b is 0, the decoding processing unit 121 outputs the symbol sequence obtained by concatenating all the symbol sequences obtained in step S121b as the output symbol sequence and terminates the decoding process. Otherwise, the decoding processing unit 121 returns to the process in step S121b.
[0052] <Example of Decoding Process 1> Using the codebooks T0 and T1 illustrated in Figures 5A and 5B, we illustrate a process that starts decoding from the first codeword of the input codeword sequence 000101100110111010. In this example, the arrangement of codewords in the input codeword sequence 000101100110111010 represents the sequential relationship of the encoding process, and it is assumed that they are encoded in order from the first codeword. The decoding processing unit 121 first sets T0 as the current codebook and the current codeword as 000101100110111010 (step S121a).
[0053] The decoding processing unit 121 obtains the symbol sequence aaa, which corresponds to the codeword 000 contained in the current codebook T0 and matches the beginning 000 of the current codeword 000101100110111010. Furthermore, since the current codebook T0 does not contain any other symbol sequences that begin with the symbol sequence aaa, the decoding processing unit 121 sets T0 as the new current codebook. The decoding processing unit 121 also sets the codeword 101100110111010, obtained by removing the beginning 000 that matched the codeword 000 from the current codeword 000101100110111010, as the new current codeword (step S121b).
[0054] Since the length of the current codeword 101100110111010 is not zero (step S121c), the decoding unit 121 obtains a symbol sequence b that matches the beginning 101 of the current codeword 101100110111010 and corresponds to the codeword 101 contained in the current codebook T0. Since the current codebook T0 contains another symbol sequence ba that begins with symbol sequence b, the decoding unit 121 sets the new current codebook to T1. The decoding unit 121 also sets the codeword 100110111010 obtained by removing the beginning 101 that matches the codeword 101 from the current codeword 101100110111010 as the new current codeword (step S121b).
[0055] Since the length of the current codeword 100110111010 is not zero (step S121c), the decoding unit 121 obtains a symbol sequence bb that matches the beginning 100 of the current codeword 100110111010 and corresponds to the codeword 100 included in the current codebook T1. Also, since the current codebook T1 does not contain any other symbol sequences that begin with the symbol sequence bb, the decoding unit 121 sets the new current codebook to T0. Furthermore, the decoding unit 121 sets the codeword 110111010 obtained by removing the beginning 100 that matches the codeword 100 from the current codeword 100110111010 as the new current codeword (step S121b).
[0056] Since the length of the current codeword 110111010 is not zero (step S121c), the decoding unit 121 obtains a symbol sequence c that matches the beginning 110 of the current codeword 110111010 and corresponds to the codeword 110 contained in the current codebook T0. Since the current codebook T0 contains another symbol sequence ca that begins with symbol sequence c, the decoding unit 121 sets the new current codebook to T1. The decoding unit 121 also sets the codeword 111010 obtained by removing the beginning 110 that matches the codeword 110 from the current codeword 110111010 as the new current codeword (step S121b).
[0057] Since the length of the current codeword 111010 is not zero (step S121c), the decoding unit 121 obtains a symbol sequence ca that matches the beginning 111 of the current codeword 111 and corresponds to the codeword 111 contained in the current codebook T1. Also, since the current codebook T1 does not contain any other symbol sequences that begin with symbol sequence ca, the decoding unit 121 sets the new current codebook to T0. Furthermore, the decoding unit 121 sets the codeword 010 obtained by removing the beginning 111 that matches the codeword 111 from the current codeword 111010 as the new current codeword (step S121b).
[0058] Since the current codeword 010 has a length of 0 (step S121c), the decoding unit 121 obtains a symbol sequence ab that matches the beginning 010 of the current codeword 010 and corresponds to the codeword 010 contained in the current codebook T0. Furthermore, since the current codebook T0 does not contain any other symbol sequences that begin with symbol sequence ab, the decoding unit 121 sets the new current codebook to T0. The decoding unit 121 also sets the codeword λ obtained by removing the beginning 010 that matches the codeword 010 from the current codeword 010 as the new current codeword. Note that codeword λ represents a codeword with a length of 0 (step S121b).
[0059] Since the length of the current codeword λ is 0 (step S121c), the decoding unit 121 outputs the symbol sequence aaabbbccaab, obtained by concatenating all the symbol sequences obtained in step S121b, as the output symbol sequence, and terminates the decoding process.
[0060] <Example 2 of Decoding Process> Next, (2) when the input information represents the reference position of the 7th bit, which represents the decoding start position or a position near the decoding start position, an example of a process in which decoding starts from a codeword in the middle of the input codeword sequence 000101100110111010 is shown, using the codebooks T0 and T1 illustrated in Figures 5A and 5B. In this example, the arrangement of codewords in the input codeword sequence 000101100110111010 represents the sequential relationship of the encoding process, and they are encoded in order from the first codeword. The decoding processing unit 121 starts reading from, for example, the codeword 101 encoded immediately before the 7th bit codeword 100 of the input codeword sequence 000101100110111010, and continues reading and determining codewords in the encoded order until it is determined that the read codeword is a delimiter codeword. In other words, the decoding processing unit 121 reads the codeword 101 from bits 4 to 6, confirms that it is not a delimiter codeword, and then reads the next codeword 100 from bits 7 to 9. Since codeword 100 is a delimiter codeword, the decoding processing unit 121 reads one of the codebooks T stored in the storage unit 129. k'Referencing ∈{T0, T1}, the codebook T0 corresponding to the delimiter codeword 100 is set as the codebook to be used for decoding the next 10 to 12 bits of codeword 110 following the delimiter codeword 100. The decoding processing unit 121 also sets the codeword 110111010, obtained by removing the codeword 000101100 from the input codeword sequence 000101100110111010, as the current codeword (step S121a).
[0061] The decoding unit 121 obtains a symbol sequence c that matches the beginning 110 of the current codeword 110111010 and corresponds to the codeword 110 included in the current codebook T0. Since the current codebook T0 contains another symbol sequence ca that begins with symbol sequence c, the decoding unit 121 sets the new current codebook to T1. The decoding unit 121 also sets the codeword 111010 obtained by removing the beginning 110 that matches the codeword 110 from the current codeword 110111010 as the new current codeword (step S121b).
[0062] Since the length of the current codeword 111010 is not zero (step S121c), the decoding unit 121 obtains a symbol sequence ca that matches the beginning 111 of the current codeword 111 and corresponds to the codeword 111 contained in the current codebook T1. Also, since the current codebook T1 does not contain any other symbol sequences that begin with symbol sequence ca, the decoding unit 121 sets the new current codebook to T0. Furthermore, the decoding unit 121 sets the codeword 010 obtained by removing the beginning 111 that matches the codeword 111 from the current codeword 111010 as the new current codeword (step S121b).
[0063] Since the length of the current codeword 010 is not zero (step S121c), the decoding unit 121 obtains a symbol sequence ab that matches the beginning 010 of the current codeword 010 and corresponds to the codeword 010 contained in the current codebook T0. Also, since the current codebook T0 does not contain any other symbol sequences that begin with symbol sequence ab, the decoding unit 121 sets the new current codebook to T0. Furthermore, the decoding unit 121 sets the codeword λ obtained by removing the beginning 010 that matches the codeword 010 from the current codeword 010 as the new current codeword (step S121b).
[0064] Since the length of the current codeword λ is 0 (step S121c), the decoding processing unit 121 outputs the symbol sequence ccaab, obtained by concatenating all the symbol sequences obtained in step S121b, as the output symbol sequence, and terminates the decoding process. In this embodiment, delimiter codewords are extracted from the input codeword sequence 000101100110111010, and a specific codebook T corresponding to the extracted delimiter codeword is selected from the codeword following the extracted delimiter codeword. k By using this method for decoding, it is possible to correctly decode even from the middle of the input codeword sequence 000101100110111010.
[0065] <Features of this embodiment> As described above, the decoding processing unit 121 of the decoding device 12 of this embodiment decodes multiple codewords included in the input codeword sequence by switching between multiple codebooks or parse trees used for decoding. The decoding processing unit 121 determines the codebook or parse tree to be used for decoding the second codeword following the first codeword, according to the first codeword included in the input codeword sequence and the codebook or parse tree used for decoding the first codeword. However, if the first codeword is a delimiter codeword which is a specific codeword, the decoding processing unit 121 determines the codebook or parse tree to be used for decoding the second codeword to be a specific codebook or parse tree corresponding to the delimiter codeword, regardless of the codebook or parse tree used for decoding the first codeword. This makes it possible to decode the second codeword following the first codeword which is a delimiter codeword first, and to start decoding from a codeword in the middle of the input codeword sequence.
[0066] Furthermore, the decoding processing unit 121 of this embodiment extracts delimiter codewords from the input codeword sequence based on the input information, and specifies a particular codebook or parse tree to be used for decoding the second codeword following the first codeword, which is the extracted delimiter codeword. This allows decoding to start from a desired position in the input codeword sequence or its vicinity. However, this does not limit the present invention, and it is also possible to extract delimiter codewords from the input codeword sequence without relying on the input information, and specify a particular codebook or parse tree to be used for decoding the second codeword following the first codeword, which is the extracted delimiter codeword. For example, the decoding start position may be fixed.
[0067] [Modification of the First Embodiment] In the first embodiment, decoding can be started from a codeword in the middle of the input codeword sequence. In other words, it is not necessary to decode sequentially from the first codeword in the input codeword sequence. Therefore, it is also possible to divide the input codeword sequence into multiple codeword sequences and execute the decoding process of these multiple codeword sequences in parallel. That is, the decoding processing unit 121 can be divided into multiple calculation units 1210 1 , ..., 1210 R and has a coupling portion 1211, and a plurality of calculation units 1210 1 , ..., 1210 R The unit performs the decoding process of multiple codeword sequences in parallel, and the coupling unit 1211 performs the decoding process of multiple calculation units 1210 1 , ..., 1210 R The output symbol sequence may be a symbol sequence obtained by concatenating multiple partial symbol sequences (sub-symbol sequences) obtained in this way. The decoding process of this modified example includes the following four steps. The processing in the following steps S121a' to S121c' is performed by multiple calculation units 1210 1 , ..., 1210 R These processes are executed in parallel.
[0068] (Step S121a') The decoding processing unit 121 of the decoding device 12 (Figure 4) receives R (or more) decoding start positions SP in the input codeword sequence. 1 , ..., SP R Input information to identify IN 1 , ..., IN R The following is input. Here, R is an integer greater than or equal to 2. Decryption start position SP 1 , ..., SP R This may be the position of the first codeword in the input codeword sequence, or it may be the position of the codeword following any delimiter codeword among the multiple codewords included in the input codeword sequence. Decoding start position SP 1 , ..., SP R Each of these is the decryption start position SP r This is expressed as follows: Here, r = 1, ..., R. The input codeword sequence is codeword sequence CS 1 , ..., CS R Includes. Codeword sequence CS r The decryption start position SP rIt is a sequence containing one or more codewords, starting with the codeword . r' = 1, ..., R-1, and the codeword sequence CS r’ The last codeword is a delimiter codeword, and the codeword following that delimiter codeword is the decoding start position SP. r’+1 This is the codeword. Codeword sequence CS R The last codeword is the last codeword in the input codeword sequence. Each calculation unit 1210 of the decoding processing unit 121 r (r=1, ..., R) represents the input information IN r Based on this, the decryption start position SP r Codebook T used to decode the codeword k Define ∈{T0, T1} and use it as the codeword sequence CS r The current codebook is defined, and the codeword sequence CS of the decoding processing unit 121 r Decryption begins. Codebook T used for decrypting the codeword. k The method for determining this is as described in the first embodiment. That is, the decoding start position SP r If this is the position of the first codeword in the input codeword sequence, then the codebook T used to decode that codeword will be used. k This is known, and for example, we can use codebook T0 as the current codebook. Decoding start position SP r If is the codeword (second codeword) following any delimiter codeword (first codeword), then the codebook T used to decode the codeword (second codeword) k This is defined in a specific code book corresponding to the delimiter code word. Also, each calculation unit 1210 r is the codeword sequence CS r This will be the current code word.
[0069] (Step S121b') Each calculation unit 1210 r This is the current code book T k Using the current codeword and the codebook T k The codewords contained within are compared. Each calculation unit 1210 r This matches the beginning of the current codeword, the current codebook T k The codewords included in (hereinafter, codeword w) r The symbol sequence corresponding to (assuming) is obtained, and further, the current codebook is switched according to the switching rule during decoding. Also, each calculation unit 1210 ris the code word obtained by removing the word head that matches the current code word from the current code word to the code word w r The code word obtained by removing the word head that matches the current code word is used as the new current code word. These processes are the same as the processes in step S121b described in the first embodiment.
[0070] (Step S121c') If the length of the current code word obtained by the calculation unit 1210 in the process of step S121b' r is 0, the calculation unit 1210 r outputs the symbol string obtained by concatenating all the symbol strings obtained in step S121b' as the partial symbol string SS r and ends the process. Otherwise, the calculation unit 1210 r returns to the process of step S121b'. Note that the last code word of the code word sequence CS r’ (where r' = 1,..., R - 1) is the delimiter code word, and the code word next to the delimiter code word is the code word at the decoding start position SP r’+1 . Therefore, the length of the current code word obtained by the calculation unit 1210 r’ becomes 0 when the calculation unit 1210 r’ decodes the delimiter code word immediately before the next decoding start position SP r’+1 . On the other hand, the last code word of the code word sequence CS R is the last code word of the input code word sequence. Therefore, the length of the current code word obtained by the calculation unit 1210 R becomes 0 when the calculation unit 1210 R decodes the last code word of the input code word sequence. When the partial symbol strings SS 1 ,..., 1210[[ID="""32]] R are output from all the calculation units 1210 1 ,..., SS R , the process proceeds to step S121d'.
[0071] (Step S121d') The combining unit 1211 of the decoding processing unit 121 outputs the symbol string obtained by concatenating the partial symbol strings SS 1 ,..., SS R as the output symbol string and ends the decoding process. As described above, the input code word sequence is divided into a plurality of code word sequences CS 1 ,..., CS R and those multiple code word sequences CS1 , ..., CS R The decoding process can be executed in parallel.
[0072] <Example of Decoding Process> Using the codebooks T0 and T1 illustrated in Figures 5A and 5B, we illustrate a process in which the decoding of the input codeword sequence 000101100110111010 is performed in parallel. In this example, the arrangement of codewords in the input codeword sequence 000101100110111010 represents the sequential relationship of the encoding process, and it is assumed that the codewords are encoded in order from the first codeword. Here, R = 3, and the input information IN 1 This represents the starting position of the input codeword sequence 000101100110111010, and the input information IN 2 This represents the reference position of the 7th bit of the input codeword sequence 000101100110111010, and input information IN 3 SP represents the reference position of the 13th bit of the input codeword sequence 000101100110111010. As mentioned above, among the codewords of codebook T0 and codebook T1, codewords 000, 010, 011, 100, 111 and codewords 001, 110 are delimiter codewords, except for codeword 101. Therefore, the decoding start position SP 1 This is the position of the first code sequence 000 in the input codeword sequence 000101100110111010, and the decoding start position SP 2 This is the position of codeword 110, bits 10 to 12 of the input codeword sequence 000101100110111010, and the decoding start position SP 3 This is the position of codeword 111, bits 13 to 15 of the input codeword sequence 000101100110111010. In this case, codeword sequence CS 1 This becomes 000101100, and the codeword sequence CS 2 This becomes 110, and the codeword sequence CS 3 This becomes 111010. Calculation unit 1210 1 ,1210 2 ,1210 3 The following decoding processes are executed in parallel.
[0073] <Calculation unit 1210 1 Decryption process > Calculation unit 1210 1 The input information is IN 1Based on this, the codeword sequence CS is processed in the same manner as in step S121a of the aforementioned <Example of Decoding Process 1>. 1 Decryption start position SP 1 A codebook T0 is defined to be used to decode codeword 000, and this is used as the codeword sequence CS. 1 It is determined in the current code book. Also, the calculation unit 1210 1 is the codeword sequence CS 1 This is the current code word (step S121a').
[0074] Calculation section 1210 1 This obtains the symbol sequence aaa, which corresponds to the codeword 000 in the current codebook T0 and matches the beginning 000 of the current codeword 000101100. Also, since the current codebook T0 does not contain any other symbol sequences that begin with the symbol sequence aaa, the calculation unit 1210 1 The new current code book is set to T0. Also, the calculation unit 1210 1 The code word 101100 is obtained by removing the initial 000 that matches the current code word 000101100, and this code word 101100 is then set as the new current code word (step S121b').
[0075] Since the current codeword 101100 has a length of 0 (step S121c'), the calculation unit 1210 1 This obtains a symbol sequence b corresponding to the codeword 101 included in the current codebook T0, which matches the beginning 101 of the current codeword 101100. Since the current codebook T0 contains another symbol sequence ba that begins with symbol sequence b, the calculation unit 1210 1 The new current code book is set to T1. Also, the calculation unit 1210 1 The code word 100 obtained by removing the initial 101 that matches the code word 101 from the current code word 101100 is made the new current code word (step S121b').
[0076] Since the current codeword 100 has a length of 0 (step S121c'), the calculation unit 1210 1 This obtains a symbol sequence bb that matches the beginning 100 of the current codeword 100 and corresponds to the codeword 100 included in the current codebook T1. Also, since the current codebook T1 does not contain any other symbol sequences that begin with the symbol sequence bb, the calculation unit 1210 1The new current code book is set to T0. Also, the calculation unit 1210 1 The codeword λ obtained by removing the initial character 100 that matches the current codeword 100 is set as the new current codeword (step S121b').
[0077] Since the length of the current codeword λ is 0, the calculation unit 1210 1 The symbol sequence aaabbb obtained by concatenating all the symbol sequences obtained in step S121b' is then used as a subsequence SS. 1 Output as (step S121c').
[0078] <Calculation unit 1210 2 Decryption process > Calculation unit 1210 2 The input information is IN 2 Based on this, the codeword sequence CS is processed in the same manner as in step S121a of the aforementioned <Example 2 of Decoding Process>. 2 Decryption start position SP 2 A codebook T0 is defined to be used for decoding codeword 110, and this is the codeword sequence CS 2 It is determined in the current code book. Also, the calculation unit 1210 2 is the codeword sequence CS 2 This is the current code word (step S121a').
[0079] Calculation section 1210 2 This obtains a symbol sequence c corresponding to the codeword 110 included in the current codebook T0, which matches the beginning 110 of the current codeword 110. Since the current codebook T0 contains other symbol sequences ca that begin with symbol sequence c, the calculation unit 1210 2 The new current code book is set to T1. Also, the calculation unit 1210 2 The codeword λ obtained by removing the beginning 110 that matches the current codeword 110 is made the new current codeword (step S121b').
[0080] Since the length of the current codeword λ is 0, the calculation unit 1210 2 The symbol sequence c obtained by concatenating all the symbol sequences obtained in step S121b' is a subsymbol sequence SS 2 Output as (step S121c').
[0081] <Calculation unit 12103 Decryption process > Calculation unit 1210 3 The input information is IN 2 Based on, codeword sequence CS 3 Decryption start position SP 3 The codebook to be used for decoding codeword 111 is determined. That is, the calculation unit 1210 3 The decoding process begins by reading codeword 110, which is encoded immediately before the 13th bit codeword 111 of the input codeword sequence 000101100110111010, and continues reading and determining codewords in the encoded order until it is determined that the read codeword is a delimiter codeword. That is, the decoding processing unit 121 reads codeword 110 from the 10th to the 12th bits, and since this is a delimiter codeword, it reads one of the codebooks T stored in the storage unit 129. k' Referencing ∈{T0, T1}, the codebook T1 corresponding to the delimiter codeword 110 is decoded at the next 10 to 12 bits SP of the delimiter codeword 110. 2 The codebook used for decoding codeword 110 is specified. Also, the calculation unit 1210 3 is the codeword sequence CS 3 This is the current code word (step S121a').
[0082] Since the current codeword 111010 has a length of 0 (step S121c'), the calculation unit 1210 3 This obtains a symbol sequence ca corresponding to the codeword 111 included in the current codebook T1, which matches the beginning 111 of the current codeword 111010. Also, since the current codebook T1 does not contain any other symbol sequences that begin with symbol sequence ca, the calculation unit 1210 3 The new current code book is set to T0. Also, the calculation unit 1210 3 The code word 010, obtained by removing the initial 111 that matches the code word 111 from the current code word 111010, is set as the new current code word (step S121b').
[0083] Since the current codeword 010 has a length of 0 (step S121c'), the calculation unit 1210 3This obtains a symbol sequence ab that matches the beginning 010 of the current code word 010 and corresponds to the code word 010 contained in the current code book T0. Also, since the current code book T0 does not contain any other symbol sequences that begin with symbol sequence ab, the calculation unit 1210 3 The new current code book is set to T0. Also, the calculation unit 1210 3 The codeword λ obtained by removing the initial 010 that matches the current codeword 010 is set as the new current codeword (step S121b').
[0084] Since the length of the current codeword λ is 0, the decoding unit 121 concatenates all the symbol sequences obtained in step S121b' to obtain the symbol sequence caab as a subsequence SS 3 Output as (step S121c').
[0085] All calculation units 1210 1 ,1210 2 ,1210 3 From the partial symbol sequence SS 1 SS 2 SS 3 If this is output, the coupling unit 1211 of the decoding processing unit 121 will output the partial symbol sequence SS 1 SS 2 SS 3 The symbol sequence aaabbbccaab, formed by concatenating the symbols, is output as the output symbol sequence. In this modified form, the decoding of the input codeword sequence 000101100110111010 is divided into multiple codeword sequences 000101100, 110, and 111010, and the decoding process of these multiple codeword sequences can be executed in parallel.
[0086] In other words, the decoding processing unit 121 of this modified example processes a codeword sequence CS that includes one or more codewords contained in multiple codewords of the input codeword sequence. r’ A decoding process (first decoding process) that decodes (first codeword sequence), and a codeword sequence CS that includes one or more codewords contained in the plurality of codewords. r’+1 The decoding process (second decoding process) that decodes (second codeword sequence) is executed in parallel. Here, the codeword sequence CS r’ The (first codeword sequence) includes the delimiter codeword (first codeword), and the codeword sequence CS r’+1The (second codeword sequence) includes the codeword (second codeword) that follows the codeword (first codeword). The decoding processing unit 121 of this modified example is the codeword sequence CS r’+1 In the decoding process (second decoding process) that decodes the (second codeword sequence), the codeword following the delimiter codeword (first codeword) (second codeword) is set to codeword sequence CS r’+1 It is the first to decode in the (second codeword sequence). As mentioned above, the codebook used to decode the codeword following the delimiter codeword (first codeword) (second codeword) is a specific codebook corresponding to the delimiter codeword, regardless of the codebook used to decode the delimiter codeword (first codeword). Therefore, the decoding processing unit 121 of this modified example decodes the codeword sequence CS r’ Decoding process of (first codeword sequence) and codeword sequence CS r’+1 The decoding process of the codeword sequence (second codeword sequence) can be performed independently and in parallel. For example, the decoding processing unit 121 of this modified example can perform the decoding of the codeword sequence CS r’ In the decoding process (first decoding process) that decodes the codeword (first codeword) which is the delimiter codeword, the codeword sequence CS r’+1 In the decoding process (second decoding process) that decodes the (second codeword sequence), it is also possible to decode the codeword following the codeword (first codeword) that is the delimiter codeword (second codeword).
[0087] [Second Embodiment] In the first embodiment and its modified form, encoding and decoding were performed by switching between two codebooks. However, this does not limit the present invention, and encoding and decoding may be performed by switching between three or more codebooks. This can further improve compression efficiency. In the following, the differences from the first embodiment will be explained in detail, and components having the same function will be given the same numbers, and redundant explanations will be omitted.
[0088] Before describing this embodiment, the notation method used in this embodiment will be explained.
[0089] ^ (caret) represents a superscript. For example, x y^z is y z is a superscript to x, and x y^z is y zThis indicates that it is a subscript for x. Also, _ (underscore) represents a subscript. For example, x y_z is y z is a superscript to x, and x y_z is y z This indicates that it is a subscript for x.
[0090] The superscripts "^" and "~" such as ^x and ~x for a given character x should ideally be placed directly above "x", but due to the constraints of notation in the specification, they are written as ^x and ~x.
[0091] <Technical Background> In the encoding / decoding of this embodiment, multiple codebooks having a predetermined structure are used to represent encoding rules that satisfy the condition that they can be uniquely encoded (hereinafter referred to as the unique encoding condition). Note that a parse tree may be used instead of a codebook, and there will be no difference in the encoding / decoding procedure.
[0092] <Codebook / Analysis Tree> First, we will explain the concept of modes, which is necessary for describing the codebook in the second embodiment. A mode is defined as a set of symbol sequences for a codebook. A mode is assigned to each of the multiple codebooks used for encoding / decoding. Since the modes assigned to a codebook are defined as a set of symbol sequences, it is assumed that there are no duplicate symbol sequences included in a mode. It is preferable that the modes satisfy the word-first condition. Here, the word-first condition is the condition that for any symbol sequence included in a set whose elements are symbol sequences, that symbol sequence does not become the word-first of any other symbol sequence included in that set. For example, if there are two codebooks, codebook T0 and codebook T1, the modes assigned to codebook T0 and codebook T1 can be defined as {aab, abc, aca} and {ac, ba}, respectively.
[0093] In the second embodiment, the codebook consists of a set of three components during encoding: an input symbol sequence, an output codeword of a predetermined length, and the next codebook to be used (hereinafter referred to as the linked codebook). In other words, in the second embodiment, the codebook consists of a set of three components during decoding: an input codeword of a predetermined length, an output symbol sequence, and the next codebook to be used (the linked codebook). Figure 8 shows an example of a codebook. The codebook in Figure 8 is used to encode a symbol sequence, which is a sequence of symbols {a, b, c}, into a codeword, which is a sequence of codes {0, 1}, and consists of five codebooks: T0, T1, T2, T3, and T4. Note that the length of the output codeword in codebooks T0, T1, T2, T3, and T4 is 2. In Figure 8, ε represents a symbol sequence of length 0. Note that the symbol sequence ε can be the beginning of any symbol sequence. Mode {ε} is assigned to codebook T0, and mode {a, b} is assigned to codebook T1. Furthermore, codebook T0 indicates that, during encoding, if codeword 00 is output for symbol sequence a, the next codebook to be used will be T1; if codeword 01 is output for symbol sequence ε, the next codebook to be used will be T2; if codeword 10 is output for symbol sequence b, the next codebook to be used will be T3; and if codeword 11 is output for symbol sequence c, the next codebook to be used will be T0. Here, codewords 10 and 11 are delimiter codewords. Therefore, codebooks T1, T2, T3, and T4 other than codebook T0 also indicate that, during encoding, if codeword 10 is output, the next codebook to be used will be T3, and if codeword 11 is output, the next codebook to be used will be T0. In other words, codebook T0 indicates that, during decoding, if symbol sequence a is output for codeword 00, the next codebook to be used will be T1; if symbol sequence ε is output for codeword 01, the next codebook to be used will be T2; if symbol sequence b is output for codeword 10, the next codebook to be used will be T3; and if symbol sequence c is output for codeword 11, the next codebook to be used will be T0. Since codewords 00 and 10 are delimiter codewords, codebooks T1, T2, T3, and T4 other than codebook T0 also indicate that, during decoding, if codeword 10 is decoded, the next codebook to be used will be T3; and if codeword 11 is output, the next codebook to be used will be T0.
[0094] Next, we will explain the conditions required for a codebook in order for the encoding / decoding in the second embodiment to satisfy the unique codeability condition. To this end, we define the concept of an expanded symbol sequence. A symbol sequence is an expanded symbol sequence of a codebook if it is obtained by concatenating a symbol sequence contained in the codebook with a symbol sequence that is an element of the mode assigned to the next codebook to be used, corresponding to the symbol sequence in question. Here, a symbol sequence contained in a codebook refers to a symbol sequence that is a triplet of elements that constitutes the codebook. For example, the expanded symbol sequences of codebook T2 in Figure 8 are the symbol sequence aca obtained by concatenating the symbol sequence aca with the symbol sequence ε, which is an element of mode {ε} assigned to the next codebook T0 that corresponds to the symbol sequence aca; the symbol sequence baa obtained by concatenating the symbol sequence baa with the symbol sequence ε, which is an element of mode {ε} assigned to the next codebook T0 that corresponds to the symbol sequence baa; the symbol sequences acb and acc obtained by concatenating the symbol sequence ac with the symbol sequences b and c, which are elements of modes {b, c} assigned to the next codebook T3 that corresponds to the symbol sequence ac; and the symbol sequences bab and bac obtained by concatenating the symbol sequence ba with the symbol sequences b and c, which are elements of modes {b, c} assigned to the next codebook T3 that corresponds to the symbol sequence ba.
[0095] The following two conditions are required of a codebook for encoding / decoding to satisfy the unique codeability condition: (1) For any codebook included in multiple codebooks, the set of all expanded symbol sequences in that codebook satisfies the word-first condition. (2) For any codebook included in multiple codebooks, the expanded symbol sequence of that codebook begins with any symbol sequence included in the mode assigned to that codebook.
[0096] Note that even if the multiple codebooks used for encoding / decoding do not satisfy the unique codeability condition, the codeword encoded using those multiple codebooks can be uniquely decoded into a sequence of symbols. However, from the viewpoint of compression efficiency, it is preferable that the multiple codebooks used for encoding / decoding satisfy the unique codeability condition. Condition (2) is a sufficient condition for the absence of unencoded codewords, and this is called the codeability condition.
[0097] Furthermore, as mentioned above, coding rules can also be represented using parse trees. Figure 9 shows an example of a parse tree, and the parse tree in Figure 9 is equivalent to the code book in Figure 8. The above explanation regarding the code book is also valid for parse trees by simply replacing "code book" with "parse tree". By making this substitution, the following explanation regarding parse trees can be obtained.
[0098] A set of symbol sequences is defined as a mode for a parse tree. A mode is assigned to each of the multiple parse trees used for encoding / decoding.
[0099] A parse tree consists of a set of three elements: an input sequence of symbols, an output codeword of a predetermined length, and the next parse tree to be used (hereinafter referred to as the "linked tree").
[0100] A sequence of symbols is said to be an expanded sequence of symbols of a parse tree if it is obtained by concatenating a sequence of symbols contained in that parse tree with a sequence of symbols that is an element of the mode assigned to the next parse tree to be used, which corresponds to that sequence of symbols. Here, a sequence of symbols contained in a parse tree refers to a sequence of symbols that is a triplet element constituting that parse tree.
[0101] The following two conditions are required for a parse tree to satisfy the unique codeword condition for encoding / decoding: (1) For any parse tree included in multiple parse trees, the set of all expanded symbol sequences of that parse tree satisfies the word-first condition. (2) For any parse tree included in multiple parse trees, the expanded symbol sequence of that parse tree begins with one of the symbol sequences included in the mode assigned to that parse tree. Note that condition (2) is a sufficient condition for there to be no unencoded codewords, and this is called the codeword-encodeable condition.
[0102] The following examples primarily focus on representing coding rules using a codebook, but representing coding rules with a parse tree does not result in any difference in the coding / decoding procedure. In other words, the codebook in the coding / decoding procedure described below may be replaced with a parse tree.
[0103] <Configuration> As illustrated in Figure 3, the encoding device 21 of this embodiment has an encoding processing unit 211 and a storage unit 119. As illustrated in Figure 4, the decoding device 22 of this embodiment has a decoding processing unit 221 and a storage unit 129.
[0104] <Preprocessing> In the preprocessing of this embodiment, multiple codebooks {T k} k=0 K-1 (wherein K is an integer greater than or equal to 2) is stored in the memory unit 219 of the encoding device 21 (Figure 3) and the memory unit 229 of the decoding device 22 (Figure 4). As described above, the codebook in the second embodiment consists of a set of three: an input symbol sequence, an output codeword of a predetermined length, and the next codebook to be used (link destination) during encoding. In other words, the codebook in the second embodiment consists of a set of three: an input codeword of a predetermined length, an output symbol sequence, and the next codebook to be used (link destination) during decoding. However, multiple codebooks {T k} k=0 K-1 This includes the delimiter codewords mentioned above. For example, the codebooks T0, T1, T2, T3, and T4 exemplified in Figure 8 are stored in the storage unit 219 of the encoding device 21 (Figure 3) and the storage unit 229 of the decoding device 22 (Figure 4).
[0105] <Encoding Process> The encoding process (step S211) of this embodiment will be illustrated using Figures 3 and 6. The encoding processing unit 211 of the encoding device 21 (Figure 3) of this embodiment receives an input symbol sequence, which is the symbol sequence to be encoded. The encoding processing unit 211 processes a plurality of codebooks {T k} k=0 K-1 Using (where K is an integer greater than or equal to 2), codewords corresponding to the symbol sequences that make up the input symbol sequence are obtained, and a codeword obtained by concatenating all the obtained codewords (hereinafter referred to as the output codeword) is output. Multiple codebooks {T k} k=0 K-1In the process of obtaining a codeword corresponding to the sequence of symbols that constitute the input sequence of symbols, if there exists a sequence of symbols included in the current codebook (hereinafter referred to as sequence σ) that matches the beginning of the current sequence of symbols, and there exists a sequence of symbols included in the mode assigned to the next codebook to be used that corresponds to sequence σ, that matches the beginning of the sequence of symbols obtained by removing the beginning of the symbol that matches sequence σ from the current sequence of symbols, then a codeword corresponding to sequence σ is obtained, the next codebook to be used that corresponds to sequence σ is set as the current codebook, and the sequence of symbols obtained by removing the beginning of the symbol that matches sequence σ from the current sequence is set as the current sequence, and this process is repeated until the length of the current sequence of symbols becomes 0. Here, the current sequence of symbols is the sequence of symbols that is the target of the encoding process at the present moment, and the current sequence of symbols at the time encoding started is the input sequence of symbols.
[0106] In other words, the encoding processing unit 211 processes multiple codebooks stored in the storage unit 119 {T k} k=0 K-1 Using this, multiple symbol sequences included in the input symbol sequence are encoded to obtain a codeword sequence, which is then output. In this process, the encoding processing unit 211 uses the codebook T to encode the code. k ∈{T k} k=0 K-1 The encoding process 211 encodes each of the multiple symbol sequences by switching between (k∈{0,...,K-1}) according to a predetermined switching rule. In other words, the encoding processing unit 211 encodes the symbol sequence (first symbol sequence) contained in the input symbol sequence to obtain a codeword (first codeword) and a codebook T used to obtain the codeword (first codeword). k Accordingly, a codebook T is used to encode the next sequence of symbols (second sequence of symbols) following the codeword (first codeword) to obtain a codeword (second codeword). k The following is determined. However, if the symbol sequence (first symbol sequence) is encoded into a delimiter codeword, the codebook T used for encoding the symbol sequence (first symbol sequence) shall be determined. k Regardless, the codebook used to encode the next sequence of symbols (second sequence of symbols) following the codeword (first codeword) is the specific codebook T corresponding to the delimiter codeword. k The encoding processing unit 211 performs this process until all the symbols in the input symbol sequence are encoded.
[0107] <Specific Example of Encoding Process> The following is a specific example of the encoding process in this embodiment. This encoding process includes the following three steps.
[0108] (Step S211a) The encoding processing unit 211 of the encoding device 21 (Figure 3) processes a plurality of codebooks {T} stored in the storage unit 129. k} k=0 K-1 Among them, a predetermined code book T k ∈{T k} k=0 K-1 Encoding begins using the current codebook. For example, codebook T0 can be used as the current codebook. The encoding processing unit 111 also uses the input symbol sequence as the current symbol sequence.
[0109] (Step S211b) The encoding processing unit 211 processes the current codebook T k The current symbol sequence is compared with the symbol sequence contained in the codebook. The encoding processing unit 211 finds the current codebook T that matches the beginning of the current symbol sequence. k If a sequence of symbols (hereinafter referred to as sequence σ) exists, and there exists a sequence of symbols in the mode assigned to the next codebook to be used that corresponds to sequence σ, which matches the beginning of the sequence of symbols obtained by removing the beginning of the word that matches sequence σ from the current sequence of symbols, then a codeword corresponding to sequence σ is obtained, the next codebook to be used that corresponds to sequence σ is set as the current codebook, and the sequence of symbols obtained by removing the beginning of the word that matches sequence σ from the current sequence of symbols is set as the current sequence of symbols.
[0110] (Step S211c) If the length of the current symbol sequence obtained by the process in step S211b is 0, the encoding processing unit 211 outputs a codeword sequence obtained by concatenating all the codewords obtained by the process in step S211b and terminates the encoding process. Otherwise, the encoding processing unit 111 returns to the process in step S211b.
[0111] <Example of Encoding Process> Using the codebooks T0, T1, T2, T3, and T4 illustrated in Figure 8, we will illustrate the process of encoding the input symbol sequence accba. In this example, the arrangement of the symbol sequences in the input symbol sequence accba represents the order of the encoding process, and encoding is performed sequentially from the first symbol sequence. The encoding processing unit 211 first sets T0 as the current codebook and the current symbol sequence as accba (step S211a).
[0112] The encoding processing unit 211 compares the current symbol sequence accba with the symbol sequences contained in the current codebook T0. The encoding processing unit 211 finds that symbol sequence a is contained in the current codebook T0 and matches the beginning of the current symbol sequence accba, but there is no symbol sequence in the mode assigned to the next codebook T1 to be used that matches symbol sequence a and matches the beginning of symbol sequence ccba, which is obtained by removing the beginning of symbol sequence a from the current symbol sequence accba, so symbol sequence a is not encoded into codeword 00. Next, the encoding processing unit 211 determines that there is a symbol sequence ε included in the current codebook T0 that matches the beginning of the current symbol sequence accba, and there is a symbol sequence ac included in the mode assigned to the next codebook T2 corresponding to symbol sequence ε that matches the beginning of the symbol sequence accba obtained by removing the beginning of the symbol sequence ε from the current symbol sequence accba, so it encodes the symbol sequence ε into codeword 01, sets the next codebook T2 corresponding to symbol sequence ε as the current codebook, and sets the symbol sequence accba obtained by removing the beginning of the symbol sequence ε from the current symbol sequence accba as the current symbol sequence (step S211b).
[0113] Since the length of the current symbol sequence accba is not zero (step S211c), the encoding processing unit 211 compares the current symbol sequence accba with the symbol sequences contained in the current codebook T2 using the current codebook T2. There is a symbol sequence ac in the current codebook T2 that matches the beginning of the current symbol sequence accba, and there is a symbol sequence c in the mode assigned to the next codebook T3 to be used that corresponds to symbol sequence ac, which matches the beginning of the symbol sequence cba obtained by removing the beginning of symbol sequence ac from the current symbol sequence accba. Therefore, symbol sequence ac is encoded into codeword 10, the next codebook T3 to be used that corresponds to symbol sequence ac is set as the current codebook, and the symbol sequence cba obtained by removing the beginning of symbol sequence ac from the current symbol sequence accba is set as the current symbol sequence (step S211b).
[0114] Since the length of the current symbol sequence accba is not zero (step S211c), the encoding processing unit 211 compares the current symbol sequence cba with the codeword contained in the current codebook T3 using the current codebook T3. There is a symbol sequence ε in the current codebook T3 that matches the beginning of the current symbol sequence cba, but there is no symbol sequence in the mode assigned to the next codebook T4 that corresponds to symbol sequence ε and matches the beginning of the symbol sequence cba obtained by removing the beginning of symbol sequence cba that matches symbol sequence ε, so symbol sequence ε is not encoded into codeword 01. Next, there is a symbol sequence c that matches the beginning of the current symbol sequence cba and is included in the current codebook T3, and there is a symbol sequence b that matches the beginning of the symbol sequence ba obtained by removing the beginning of the symbol sequence c that matches symbol sequence c and is included in the mode assigned to the next codebook T3 to be used corresponding to symbol sequence c. Therefore, symbol sequence c is encoded into codeword 10, the next codebook T3 to be used corresponding to symbol sequence c is set as the current codebook, and symbol sequence ba obtained by removing the beginning of the symbol sequence c that matches symbol sequence c from the current symbol sequence cba is set as the current codeword (step S211b).
[0115] Since the length of the current symbol sequence accba is not zero (step S211c), the encoding processing unit 211 compares the current symbol sequence ba with the symbol sequences contained in the current codebook T3 using the current codebook T3. There is a symbol sequence ba in the current codebook T3 that matches the beginning of the current symbol sequence ba, and there is a symbol sequence ε in the mode assigned to the next codebook T0 corresponding to symbol sequence ba that matches the beginning of the symbol sequence ε obtained by removing the beginning of the symbol sequence ba that matches symbol sequence ba, so symbol sequence ba is encoded into codeword 00, the next codebook T0 corresponding to symbol sequence ba is set as the current codebook, and the symbol sequence ε obtained by removing the beginning of the symbol sequence ba that matches symbol sequence ba is set as the current symbol sequence (step S211b).
[0116] Since the current symbol sequence ε is a symbol sequence of length 0, the encoding processing unit 211 outputs the codeword sequence 01101000 (step S211c).
[0117] <Decoding Process> The encoding process (step S221) of this embodiment will be illustrated using Figures 4 and 7. The decoding processing unit 221 of the decoding device 22 (Figure 4) of this embodiment receives an input codeword sequence, which is a sequence of codewords to be decoded. This is a codeword sequence output from the encoding device 11 and contains multiple codewords. The decoding processing unit 121 processes multiple codewords {T k} k=0 K-1 (However, multiple codebooks {T k} k=0 K-1 The decoding processing unit 221 uses a codebook (used in the encoding procedure) to obtain symbol sequences corresponding to the codewords that make up the input codeword sequence, and outputs a symbol sequence obtained by concatenating all the obtained symbol sequences (hereinafter referred to as the output symbol sequence). k} k=0 K-1In the process of obtaining symbol sequences corresponding to the codewords that make up the input codeword sequence using the following method, a symbol sequence corresponding to a codeword (hereinafter referred to as codeword w) included in the current codebook that matches the beginning of the current codeword is obtained. The next codebook to be used corresponding to codeword w is set as the current codebook, and the codeword obtained by removing the beginning that matches codeword w from the current codeword is set as the current codeword. This process is repeated until the length of the current codeword becomes 0. Here, the current codeword is the codeword that is currently the target of the decoding process. If the decoding process starts from the first codeword in the input codeword sequence, the current codeword at the time decoding starts is the input codeword sequence. On the other hand, if the decoding process starts from a codeword in the middle of the input codeword sequence, the current codeword at the time decoding starts is the codeword sequence from the codeword following any delimiter codeword (first codeword) (second codeword) onward. The next codebook to be used corresponding to codeword w is determined according to codeword w and the codebook used to decode codeword w (Figure 8). However, if codeword w is a delimiter codeword, the next codebook used corresponding to codeword w will be the specific codebook corresponding to codeword w, regardless of the codebook used to decode codeword w. For example, in the case of the codebook in Figure 8, codewords 10 and 11 are delimiter codewords, and regardless of which of the codebooks T0, T1, T2, T3, or T4 is used to decode codeword w, if codeword 10 is decoded, the next codebook used will be codebook T3, and if codeword 11 is output, the next codebook used will be T0. In other words, this form of decoding process also decodes multiple codewords included in the input codeword sequence by switching the codebook used for decoding among multiple codebooks. Here, the codebook used to decode the second codeword following the first codeword is determined according to the first codeword included in the input codeword sequence and the codebook used to decode the first codeword. However, if the first codeword is a delimiter codeword that is a specific codeword, then regardless of the codebook used to decode the first codeword, the codebook used to decode the second codeword shall be specified in the specific codebook or parse tree corresponding to the delimiter codeword.
[0118] A specific example of the decoding process in this embodiment is shown below. In the following, the codeword sequence obtained in step S211c is used as the input codeword sequence. Decoding can be started from the first codeword in the input codeword sequence, or from an intermediate codeword. The decoding process in this embodiment includes the following three steps.
[0119] (Step S221a) Input information for identifying the decoding start position in the input codeword sequence is input to the decoding processing unit 221 of the decoding device 12 (Figure 4). The decoding start position may be the position of the first codeword in the input codeword sequence, or it may be the position of the codeword following any delimiter codeword (first codeword) (second codeword) (intermediate codeword) among the multiple codewords included in the input codeword sequence. The input information may be any information for identifying the decoding start position. A specific example is as described in step S121a of the first embodiment. Based on the input information, the decoding processing unit 221 inputs a plurality of codewords stored in the storage unit 129 {T k} k=0 K-1 (Figure 8) Codebook T used for decoding the first codeword to be decoded k (k∈{T k} k=0 K-1 The codeword is then assigned to the current codebook, and the decoding of the first codeword to be decoded is started. A specific example of this process is as described in step S121a of the first embodiment.
[0120] (Step S221b) The decoding processing unit 221 processes the current codebook T k The current codeword is compared with the codewords included in the codebook. The decoding processing unit 121 finds the current codeword that matches the beginning of the codeword in the current codebook T. k Obtain the symbol sequence corresponding to the codeword (codeword w) contained in the codebook, set the next codebook to be used corresponding to the codeword w as the current codebook, and set the codeword obtained by removing the beginning of the word that matches the codeword w from the current codeword as the current codeword.
[0121] (Step S221c) If the length of the current codeword obtained in step S221b is 0, the decoding processing unit 221 outputs the symbol sequence obtained by concatenating all the symbol sequences obtained in step S121b as the output symbol sequence and terminates the decoding process. Otherwise, the decoding processing unit 221 returns to the process in step S221b.
[0122] <Example of Decoding Process 1> Using the codebooks T0, T1, T2, T3, and T4 illustrated in Figure 8, and using codebooks T0 and T1 illustrated in Figure 8, we illustrate a process that starts decoding from the first codeword of the input codeword sequence 01101000. In this example, the arrangement of codewords in the input codeword sequence 01101000 represents the sequential relationship of the encoding process, and it is assumed that they are encoded in order from the first codeword. The decoding processing unit 221 first sets T0 as the current codebook and the current codeword as 01101000 (step S221a).
[0123] The decoding processing unit 221 obtains a symbol sequence ε as the symbol sequence corresponding to the first two bits of codeword 01 of the current codeword 01101000 using the current codebook T0, sets the next codebook to be used corresponding to codeword 01 to the current codebook T2, and sets the codeword 101000 obtained by removing the first two bits of codeword 01 from the current codeword 01101000 to be the current codeword (step S221b).
[0124] Since the length of the current codeword 101000 is not zero (step S221c), the decoding processing unit 221 obtains the symbol sequence ac as the symbol sequence corresponding to the first two bits of codeword 10 of the current codeword 101000 using the current codebook T2, sets the next codebook to be used corresponding to codeword 10 to the current codebook T3, and sets the codeword 1000 obtained by removing the first two bits of codeword 10 from the current codeword 101000 to be the current codeword (step S221b).
[0125] Since the length of the current codeword 1000 is not zero (step S221c), the decoding processing unit 221 obtains a symbol sequence c as the symbol sequence corresponding to the first two bits of codeword 10 of the current codeword 1000 using the current codebook T3, sets the next codebook T3 to be used corresponding to codeword 10 as the current codebook, and sets the codeword 00 obtained by removing the first two bits of codeword 10 from the current codeword 1000 as the current codeword (step S221b).
[0126] Since the length of the current codeword 00 is not zero (step S221c), the decoding processing unit 221 obtains a symbol sequence ba as the symbol sequence corresponding to the codeword 00 using the current codebook T3 for the first two bits of codeword 00 of the current codeword 00, sets the next codebook to be used corresponding to codeword 00 T0 as the current codebook, and sets the codeword λ obtained by removing the first two bits of codeword 00 from the current codeword 00 as the current codeword (step S221b).
[0127] Since the current codeword λ is a codeword of length 0 (step S221c), the decoding unit 221 outputs the symbol sequence accba, obtained by concatenating all the symbol sequences obtained in step S221b, as the output symbol sequence, and terminates the decoding process.
[0128] <Example 2 of Decoding Process> Next, (2) when the input information represents the reference position of the 5th bit, which represents the decoding start position or a position near the decoding start position, an example of a process in which decoding starts from a codeword in the middle of the input codeword sequence 01101000 is shown, using the codebooks T0, T1, T2, T3, T4 illustrated in Figure 8. In this example, the arrangement of codewords in the input codeword sequence 01101000 represents the sequential relationship of the encoding process, and they are encoded in order from the first codeword. The decoding processing unit 221 starts reading from the codeword encoded immediately before the 5th bit codeword 10 of the input codeword sequence 01101000, and continues reading and determining codewords in the encoded order until it is determined that the read codeword is a delimiter codeword. That is, the decoding processing unit 221 reads the 4th and 5th bit codewords 10, and since these are delimiter codewords, the decoding processing unit 221 reads one of the codebooks T stored in the memory unit 129. k' ∈{T k} k=0 4 Referring to the above, the codebook T3 corresponding to the delimiter codeword 10 is designated as the codebook to be used for decoding the next 6th and 7th bits of the codeword 10 of the delimiter codeword 10. The decoding processing unit 221 also sets the codeword 1000 obtained by removing the codeword 0110 from the input codeword sequence 01101000 as the current codeword (step S221a).
[0129] Since the length of the current codeword 1000 is not zero (step S221c), the decoding processing unit 221 obtains a symbol sequence c as the symbol sequence corresponding to the first two bits of codeword 10 of the current codeword 1000 using the current codebook T3, sets the next codebook T3 to be used corresponding to codeword 10 as the current codebook, and sets the codeword 00 obtained by removing the first two bits of codeword 10 from the current codeword 1000 as the current codeword (step S221b).
[0130] Since the length of the current codeword 00 is not zero (step S221c), the decoding processing unit 221 obtains a symbol sequence ba as the symbol sequence corresponding to the codeword 00 using the current codebook T3 for the first two bits of codeword 00 of the current codeword 00, sets the next codebook to be used corresponding to codeword 00 T0 as the current codebook, and sets the codeword λ obtained by removing the first two bits of codeword 00 from the current codeword 00 as the current codeword (step S221b).
[0131] Since the current codeword λ is a codeword of length 0 (step S221c), the decoding processing unit 221 outputs the symbol sequence cba, obtained by concatenating all the symbol sequences obtained in step S221b, as the output symbol sequence, and terminates the decoding process. In this way, in this embodiment, delimiter codewords are extracted from the input codeword sequence 01101000, and a specific codebook T corresponding to the extracted delimiter codeword is selected from the codeword following the delimiter codeword. k By using this method for decoding, decoding can be performed correctly even if the input codeword sequence 01101000 starts from the middle.
[0132] <Features of this embodiment> As described above, the decoding processing unit 221 of the decoding device 22 of this embodiment decodes multiple codewords included in the input codeword sequence by switching between multiple codebooks or parse trees used for decoding. The decoding processing unit 221 determines the codebook or parse tree to be used for decoding the second codeword following the first codeword, according to the first codeword included in the input codeword sequence and the codebook or parse tree used for decoding the first codeword. However, if the first codeword is a delimiter codeword which is a specific codeword, the decoding processing unit 221 determines the codebook or parse tree to be used for decoding the second codeword to be a specific codebook or parse tree corresponding to the delimiter codeword, regardless of the codebook or parse tree used for decoding the first codeword. This makes it possible to decode the second codeword following the first codeword which is a delimiter codeword first, and to start decoding from a codeword in the middle of the input codeword sequence.
[0133] Furthermore, the decoding processing unit 221 of this embodiment extracts delimiter codewords from the input codeword sequence based on the input information, and specifies a particular codebook or parse tree to be used for decoding the second codeword following the first codeword, which is the extracted delimiter codeword. This allows decoding to start from a desired position in the input codeword sequence or its vicinity. However, this does not limit the present invention, and it is also possible to extract delimiter codewords from the input codeword sequence without relying on the input information, and specify a particular codebook or parse tree to be used for decoding the second codeword following the first codeword, which is the extracted delimiter codeword. For example, the decoding start position may be fixed.
[0134] [Modification 1 of the Second Embodiment] In the second embodiment, multiple codebooks that can be uniquely encoded (satisfying the unique codeability condition) were given as examples. However, even if a code cannot be uniquely encoded, it is sufficient as long as it can be uniquely decoded. Here, multiple codebooks that satisfy the sufficient condition (codeability condition) for the absence of unencoded codewords are given as examples.
[0135] The codebook in Modification 1 of the second embodiment also consists of a set of three: a sequence of symbols that serves as input during encoding, a codeword of a predetermined length that serves as output, and the next codebook to be used (link destination), and a mode is assigned to it. In other words, the codebook in this modification also consists of a set of three: a codeword of a predetermined length that serves as input during decoding, a sequence of symbols that serves as output, and the next codebook to be used (link destination), and a mode is assigned to it. However, the codebook in Modification 1 of the second embodiment differs from the codebook in the second embodiment in that it satisfies condition (2) (encodeable condition) among the conditions required for the codebook in order for encoding / decoding to satisfy the unique codeability condition, but does not satisfy condition (1).
[0136] For example, among the codebooks T0, T1, T2, T3, and T4 illustrated in Figure 8, if the link destination for the symbol sequence ε in codebook T0 is replaced from T2 to T1, then condition (2) is satisfied, but condition (1) is no longer satisfied, which are conditions required for a codebook to satisfy the unique codeability condition for encoding / decoding. That is, the set of all expanded symbol sequences in codebook T0 becomes {aa, ab, a, b, bb, bc, c}, and since element a is the beginning of a word, for example, element aa, condition (1) is not satisfied. On the other hand, since all expanded symbol sequences in codebook T0 begin with the symbol sequence ε included in the mode {ε} assigned to codebook T0, condition (2) is satisfied.
[0137] [Modification 2 of the Second Embodiment] The multiple codebooks shown in Figure 8 of the Second Embodiment and Modification 1 of the Second Embodiment are examples, and other multiple codebooks having at least one participle codeword may be used. Here, we illustrate a method for constructing multiple codebooks (a set of multiple codebooks) having at least one participle codeword.
[0138] Here, we assume that the length of all symbol sequences that are elements of a mode is at most 1. Furthermore, while mode {ε} is a set whose elements are symbol sequences ε of length 0, replacing mode {ε} in the codebook with a mode that is a set of all symbol sequences to be encoded does not change the correspondence between the input symbol sequence and the output codeword sequence. That is, using the set of all symbol sequences to be encoded as a mode is equivalent to using {ε} as a mode. Therefore, here we will treat mode {ε} as the set of all symbol sequences to be encoded as its elements.
[0139] For a given set of codebooks, the set of modes from all of those codebooks is defined as the mode set for that set of codebooks. If a mode set satisfies the dichotomy condition, it becomes easy to construct multiple codebooks that each have at least one piecewise codeword. A mode set satisfies the dichotomy condition if it contains a set of all symbols (modes), and a partition can be constructed for any set contained in the mode set by selecting two sets from the sets that are elements of the mode set and any single-symbol set. Here, a partition for a set A means a set of sets that do not have common elements and whose union coincides with A. A single-symbol set refers to a set that has one symbol as its element. For example, the mode set S consisting of {a, b, c, d}, {a, b, c}, {a, b} satisfies the dichotomy condition. Mode set S includes the set {a, b, c, d} consisting of all symbols, and partitions {a, b, c} and {d} can be constructed for the set {a, b, c, d} by selecting two sets {a, b, c} and the single symbol set {d} from the sets and single symbol sets that are elements of mode set S. Similarly, partitions {a, b} and the single symbol set {c} can be constructed for the set {a, b, c} by selecting the sets {a, b} and the single symbol set {c} that are elements of mode set S, and partitions {a} and the single symbol set {b} can be constructed for the set {a, b} by selecting the single symbol sets {a} and {b}. Similarly, the mode sets {a, b, c, d} (equivalent to {ε}), {a, b}, and {c, d} in the multiple codebooks T0, T1, and T2 illustrated in Figure 10 also satisfy the bidivisibility condition.
[0140] An example of a method for constructing a codebook while satisfying the codeability condition by utilizing the bipartite condition is shown below. However, this is not the only way to construct a codebook. In the following method, a codebook with a larger number of codewords is constructed by concatenating codebooks with a smaller number of codewords. In the following example, single-digit integers are used as codewords, but of course, they can be replaced with binary codewords as long as the number of codewords is the same.
[0141] (Procedure 1) The number of codebooks K and the mode set of size K that satisfies the bipartite condition are predetermined, and each mode within the mode set is assigned to each codebook T k (W) The modes are (k=0,1,...,K-1). However, T k (W) represents each codebook when the number of codewords is W, and the mode is constant regardless of W.
[0142] (Step 2) All symbol sequences corresponding to codewords are ε, and the link in each codebook is the codebook itself, i.e., T k (1) A codebook T with a code word count of 1 k (1)
[0143] (Procedure 3) Using codebooks with codeword counts W1 and W2 such that W = W1 + W2, construct a codebook with codeword count W as follows: 3-1. Codebook T with codeword count W k If mode A of (W) can form a partition with elements A1 and A2 of the mode set, then the code book T of mode A1 k (W1) and code book T in mode A2 k Use (W2). Code book T k '(W1) and code book T k For each symbol sequence stored in both (W2), assign a total of W different codewords to T k Construct (W). k The links corresponding to each sequence of symbols in (W) are T k '(W1) and T k Use the codebook T with only the number of codewords of the link stored in (W2) changed to W. 3-2. Codebook T with codeword count W k If mode A of (W) can form a partition with mode set element A1 and single symbol set {a}, then the codebook T of mode A1 k '(W1) and the codebook T of all symbols that make up the set of modes k Use (W2). k For each symbol sequence stored in (W2), the above symbol sequence a is added to the beginning of the word, and T k For each symbol sequence stored in (W1), assign a total of W different codewords to T k Construct (W).k The links corresponding to each sequence of symbols in (W) are T k '(W1) and T k Use the codebook T with only the number of codewords of the link stored in (W2) changed to W. 3-3. Codebook T with codeword count W k If mode A of (W) can form a partition with single symbol sets {a} and {b}, then the codebook T of the set whose mode consists of all symbols k '(W1) and T k Using (W2), T k For each sequence of symbols stored in (W1), the above sequence of symbols a is added to the beginning of the word, and T k For each symbol sequence stored in (W2), the above b is added to the beginning of the symbol sequence, and a total of W different codewords are arbitrarily assigned to each of these sequences, T k Construct (W). k The links corresponding to each sequence of symbols in (W) are T k '(W1) and T k "(W2) uses only the number of codewords in the link, with only the number of codewords changed to W."
[0144] Specific examples are shown in Figures 11A to 11C. For any number of codewords W, the modes of T0(W), T1(W), and T2(W) are predetermined sets {a, b, c, d}, {a, b}, and {c, d}, respectively. Note that using {a, b, c, d} as a mode is equivalent to using {ε} as a mode. In other words, even if the mode {ε} in the codebook is replaced with the mode {a, b, c, d}, the correspondence between the input symbol sequence and the output codeword sequence remains unchanged before and after the replacement.
[0145] As illustrated in Figure 11A, T0(1), T1(1), and T2(1) are uniquely determined by the above steps 1 and 2.
[0146] In step 3, as illustrated in Figure 11B, for T0(2), the division of modes {a, b, c, d} can be composed of {a, b} and {c, d} (3-1). Therefore, the symbol sequences and links stored in T1(1), which has modes {a, b} and one codeword, and T2(1), which has modes {c, d} and one codeword, are placed side by side. Only the number of codewords of the links T1(1) and T2(1) is changed to become T1(2) and T2(2), and two codewords 0 and 1 are assigned to each. For T1(2), since the division of mode {a,b} can be composed of {a} and {b} (3-3), the symbol sequences stored in T0(1), which has modes {a, b, c, d} and codewords of 1, are given a and a b added to the beginning, and the corresponding links are arranged. Only the codeword count of the links in T0(1) is changed to create T0(2), and the two codewords 0 and 1 are assigned to these symbol sequences. T2(2) is constructed in the same way.
[0147] In step 3, as illustrated in Figure 11C, T0(3) is constructed using T1(2) and T2(1), and T1(3) and T2(3) are constructed using T0(1) and T0(2) (3-1). Note that the modes {a, b, c, d} of T0(1) are treated as equivalent to the mode {ε}. T0(3) may also be constructed using T1(1) and T2(2), and the choice is arbitrary. By making this choice, for example, in a way that increases the expected value of the length of the symbol sequence that can be encoded for each codebook, it is possible to improve the compression efficiency.
[0148] As long as the number of codewords is correct, the assignment of codewords can be arbitrary. Therefore, if there are links common to all codebooks, assigning the same codeword to them will make that codeword a delimiter codeword. Furthermore, in the above codebook construction, the arbitrariness of selecting the base codebook (for example, selecting T1(2) and T2(1) for T0(3)) allows us to determine the links we want to correspond to delimiter codewords, and by constructing codebooks based on the codebook containing those links, it is possible to always have at least one delimiter codeword if there are enough codewords.
[0149] Furthermore, the above method makes it possible to construct a codebook while guaranteeing the codeability condition. For example, T0(3) in Figure 11C is constructed based on T1(2) and T2(1). If we assume that T1(2) and T2(1) satisfy the codeability condition, then the symbol sequence stored in T1(2) has an expanded symbol sequence that starts with a or b, and the symbol sequence stored in T2(1) has an expanded symbol sequence that starts with c or d. Therefore, the expanded symbol sequence of T0(3), which is formed by arranging these, will start with one of {a, b, c, d}. Thus, T0(3) satisfies the codeability condition. T1(3) is constructed by arranging the symbol sequences obtained by adding a to the beginning of the symbol sequence of T0(2) and adding b to the beginning of the symbol sequence of T0(1). The expanded symbol sequence obtained by adding a to the beginning of the symbol sequence of T0(2) starts with a, and the expanded symbol sequence obtained by arranging the symbol sequences obtained by adding b to the beginning of T0(1) starts with b. Therefore, T1(3) has an expanded symbol sequence that begins with a or b and satisfies the codeable condition.
[0150] The same results can be obtained by using a parsing tree instead of a code book.
[0151] [Modification 3 of the Second Embodiment] Similar to Modification 1 of the First Embodiment, in the Second Embodiment, decoding can also be started from a codeword in the middle of the input codeword sequence. In other words, it is not necessary to decode sequentially from the first codeword of the input codeword sequence. Therefore, it is also possible to divide the input codeword sequence into multiple codeword sequences and execute the decoding process of these multiple codeword sequences in parallel. That is, the decoding processing unit 221 can be divided into multiple calculation units 2210 1 , ..., 2210 R and has a coupling portion 2211, and a plurality of calculation units 2210 1 , ..., 2210 R The unit 2211 performs the decoding process of multiple codeword sequences in parallel, and the coupling unit 2211 performs the decoding process of multiple calculation units 2210 1 , ..., 2210 R The resulting sequence of subsequences can be concatenated and output as the output sequence.
[0152] [Hardware Configuration] The functions realized by the components described herein may be implemented in a circuitry or processing circuitry, including a general-purpose processor, an application-specific processor, an integrated circuit, an ASIC (Application Specific Integrated Circuit), a CPU (a Central Processing Unit), conventional circuits, and / or a combination thereof, programmed to realize the functions described herein. A processor includes transistors and other circuits and is considered a circuitry or processing circuitry. A processor may be a programmed processor that executes a program stored in memory.
[0153] In this specification, circuitry, unit, and means are hardware programmed to perform or execute the functions described herein. Such hardware may be any hardware disclosed herein, or any hardware known to be programmed to perform or execute the functions described herein.
[0154] If the hardware is a processor that is considered to be a type of circuitry, then the circuitry, means, or unit is a combination of hardware and software used to constitute the hardware and / or processor.
[0155] For example, the encoding devices 11, 21 and decoding devices 12, 22 in each embodiment are devices configured by a general-purpose or dedicated computer, which is equipped with a processor (hardware processor) such as a CPU (central processing unit) and memory such as RAM (random-access memory) and ROM (read-only memory), executing a predetermined program. That is, the encoding devices 11, 21 and decoding devices 12, 22 in each embodiment have, for example, processing circuits configured to implement the respective parts they each possess. This computer may have one processor and memory, or it may have multiple processors and memories. This program may be installed on the computer, or it may be pre-recorded in ROM, etc. Furthermore, some or all of the processing units may be configured using electronic circuits that realize processing functions independently, rather than electronic circuits that realize the functional configuration by loading a program, such as a CPU. Also, the electronic circuits that constitute one device may include multiple CPUs.
[0156] For example, the various processes described above can be carried out by loading a program that executes each step of the above method into the recording unit 2020 of the computer 2000 shown in Figure 12, and then causing the control unit 2010, input unit 2030, output unit 2040, display unit 2050, etc. to operate.
[0157] The program describing this process can be recorded on a computer-readable recording medium. Examples of computer-readable recording media are non-transitory recording media. Examples of such recording media include magnetic recording devices, optical discs, magneto-optical recording media, and semiconductor memory.
[0158] Furthermore, this program may be distributed, for example, by selling, transferring, or lending portable recording media such as DVDs or CD-ROMs on which the program is recorded. Alternatively, the program may be stored in the storage device of a server computer and distributed by transferring the program from the server computer to other computers via a network.
[0159] A computer executing such a program may, for example, first store the program recorded on a portable storage medium or a program transferred from a server computer in its own storage device. Then, when processing is to be executed, the computer reads the program stored on its own storage medium and executes the processing according to the read program. Alternatively, the computer may directly read the program from the portable storage medium and execute the processing according to that program, or it may sequentially execute the processing according to the received program each time a program is transferred to it from a server computer. Furthermore, the processing may be executed using a so-called ASP (Application Service Provider) type service, where the processing function is realized only by issuing execution instructions and obtaining results, without transferring the program from the server computer to this computer.In addition, the processing may be executed using a so-called SaaS (Software as a Service) type service, where a part of the server computer is made available to the user along with the program. In this embodiment, the program includes information used for processing by an electronic computer that is equivalent to a program (data, etc., that is not a direct instruction to the computer but has the property of defining the processing of the computer).
[0160] Furthermore, in this configuration, the device is configured by executing a predetermined program on a computer, but at least a part of these processes may be implemented in hardware.
[0161] [Other variations] The present invention is not limited to the embodiments described above.
[0162] Furthermore, the various processes described above may not only be executed in chronological order as described, but may also be executed in parallel or individually as needed, depending on the processing capacity of the device performing the processes. It goes without saying that other modifications can be made as appropriate without departing from the spirit of the present invention.
[0163] 11,21 Encoding device 111,211 Encoding processing unit 12,22 Decoding device 121,221 Decoding processing unit
Claims
1. A decoding device having a decoding processing unit that decodes multiple codewords included in an input codeword sequence while switching between multiple codebooks or parse trees used for decoding, wherein the decoding processing unit determines a codebook or parse tree to be used for decoding a second codeword following the first codeword, depending on a first codeword included in the input codeword sequence and the codebook or parse tree used for decoding the first codeword, and when the first codeword is a delimiter codeword which is a specific codeword, the decoding device determines the codebook or parse tree to be used for decoding the second codeword to be a specific codebook or parse tree corresponding to the delimiter codeword, regardless of the codebook or parse tree used for decoding the first codeword.
2. A decoding device according to claim 1, wherein the decoding processing unit extracts the delimiter codeword from the input codeword sequence based on input information, and specifies a codebook or parse tree in the specific codebook or parse tree to be used for decoding the second codeword following the first codeword which is the extracted delimiter codeword.
3. A decoding device according to claim 1, wherein the decoding processing unit first decodes the second codeword that follows the first codeword which is the delimiter codeword.
4. A decoding device according to claim 1, wherein the decoding processing unit performs in parallel a first decoding process for decoding a first codeword sequence including one or more codewords included in the plurality of codewords, and a second decoding process for decoding a second codeword sequence including one or more codewords included in the plurality of codewords, wherein the first codeword sequence includes the first codeword which is the delimiter codeword, and the second codeword sequence includes the second codeword which is the second codeword following the first codeword which is the delimiter codeword.
5. A decoding device according to claim 4, wherein the decoding processing unit decodes the second codeword following the first codeword which is the delimiter codeword first in the second codeword sequence in the second decoding process.
6. A decoding device according to claim 4, wherein the decoding processing unit decodes the second codeword following the first codeword which is the delimiter codeword in the second decoding process, before decoding the first codeword which is the delimiter codeword in the first decoding process.
7. A decoding method by a decoding device, comprising a decoding processing step in which a decoding processing unit decodes a plurality of codewords included in an input codeword sequence while switching between a plurality of codebooks or parse trees used for decoding, wherein the decoding processing step includes a step of determining a codebook or parse tree to be used for decoding a second codeword following a first codeword, depending on a first codeword included in the input codeword sequence and the codebook or parse tree used for decoding the first codeword, and in the case where the first codeword is a delimiter codeword which is a specific codeword, the decoding method further includes determining the codebook or parse tree used for decoding the second codeword to be a specific codebook or parse tree corresponding to the delimiter codeword, regardless of the codebook or parse tree used for decoding the first codeword.
8. A program for causing a computer to function as a decoding device according to any one of claims 1 to 6.