Data compression method and device for fixed-length code unit containing multiple encoding parameter variable-length codes
By adopting a code unit with a predetermined integer constant length, combined with the characteristics of variable length code and fixed length code, the problem of low computing efficiency in data compression in the prior art is solved, and a higher coding efficiency and calculation efficiency are achieved.
Patent Information
- Application Number
- CN201811289956.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-10-31
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2038-10-31
AI Technical Summary
In the existing data compression technology, the matching method has the problem of low computational efficiency in the encoding and decoding process, especially when there are many primitives, the computational efficiency of variable-length code encoder and decoder is very low, and Although fixed-length code improves the calculation efficiency, the encoding efficiency is greatly reduced.
Using a code unit with a predetermined integer constant length, one code unit contains a variable length code of the syntax element of multiple encoding parameters or a fixed length code of the syntax element of the encoding parameters to ensure that the compressed data stream length of the encoded parameters is always the length of the code unit. Integer multiples, thereby achieving consistent generation and analysis of code units.
Through this method, the encoding efficiency can be improved without significantly reducing the computing efficiency, or the computing efficiency can be greatly improved without significantly reducing the encoding efficiency, solving the problem of low encoding and decoding speeds in the prior art.
Smart Images

Figure CN111131826B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a coding and decoding system for lossy or lossless compression of data, in particular to a method and device for coding and decoding image and video data. Background Art
[0002] As human society enters the era of artificial intelligence, big data, virtual reality, augmented reality, mixed reality, cloud computing, mobile computing, cloud-mobile computing, ultra-high definition (4K) and ultra-ultra-high definition (8K) video image resolution, and 4G / 5G communications, ultra-high compression ratio and extremely high quality data compression for various data, including big data, image data, video data, and various new forms of data has become an indispensable technology.
[0003] A data set is a set of finite data arranged in a certain spatial (one-dimensional, two-dimensional, or multi-dimensional) shape, composed of data sample values, also known as elements (e.g., bytes, bits, pixels, pixel components, spatial sampling points, transform domain coefficients) (e.g., a one-dimensional data queue, a two-dimensional data file, a frame of image, a video sequence, a transform domain, a transform block, multiple transform blocks, a three-dimensional scene, a sequence of continuously changing three-dimensional scenes). When encoding (and correspondingly decoding) a data set, especially a two-dimensional or larger data set, for data compression, the data set is usually divided into several subsets with a predetermined shape, called coding blocks (from the perspective of decoding, they are also decoding blocks, collectively referred to as coding and decoding blocks), and the coding or decoding is performed one by one in a predetermined time sequence, with coding and decoding blocks as units. At any time, the coding block being encoded is called the current coding block. At any time, the decoding block being decoded is called the current decoding block. The current coding block or the current decoding block is collectively referred to as the current coding and decoding block or simply the current block. The sample value being encoded or decoded is called the current coding sample value or the current decoding sample value, or simply the current sample value.
[0004] For a codec block with a certain shape (not necessarily limited to square or rectangle, it can be any other reasonable shape), it is necessary to divide it into finer primitives (basic units) in many cases, and encode or decode one primitive at a time in a predetermined order. For all sample values in a primitive, the same type of encoding or decoding operation is usually performed. At any time, the primitive being encoded or decoded is called the current primitive. The result of encoding a primitive is one or more encoding parameters, and finally a compressed data code stream containing these encoding parameters is generated. Decoding a primitive is to parse the compressed data code stream to obtain one or more encoding parameters, and restore the sample values of the reconstructed data from the one or more encoding parameters.
[0005] Examples of primitives include codec blocks (the entire block is considered a primitive), sub-blocks, micro-blocks, strings, byte strings, alpha strings, pixel strings, sample strings, index strings, and lines.
[0006] A notable feature of many common data sets is that they have many matching (i.e., similar or even identical) patterns. For example, there are usually many matching pixel patterns in images and video sequences. Therefore, existing data compression technologies usually adopt a matching (also called prediction or compensation) method, that is, using a "prediction value" (also called "compensation value" or "reference sample value", such as "reference pixel") to match (also called prediction, representation, representation, compensation, approximation, approximation, etc.) the sample value in the current encoding or decoding (referred to as "current sample value") to achieve the effect of lossless or lossy compression of data. In many cases, the basic operation of the matching method is to copy the reference sample value, that is, the sample value at the reference position to the position of the current sample value. Therefore, the matching method or prediction method is also called the copying method. In the matching method, the reconstructed (also called reconstruction or restoration) sample values that have undergone at least part of the encoding operation and at least part of the decoding operation constitute a reference set (also called reference set space or reference space or reference cache). The reconstructed sample values and their positions in the reference set correspond one-to-one to the original sample values and their positions in the original data set.
[0007] When encoding and decoding a current block, the matching method divides the current block into several matching (also called prediction) primitives. A matching primitive has one or more matching (coding) parameters (also called matching relationship or copy parameter or copy relationship or reference relationship) to represent its characteristics. The most important parameter in the matching parameters is the displacement vector (also called motion vector, position offset, offset, relative position, position, relative address, address, relative coordinate, coordinate, relative index, index, etc.). The displacement vector represents the relative displacement between the sample value of the current primitive and its reference sample value, which is equivalent to the one-dimensional offset after the data sample value is arranged into one-dimensional data. Obviously, the reference position of the reference sample value can be derived from the displacement vector. The displacement vector of the current primitive is called the current displacement vector. Other examples of matching parameters: primitive mode, scanning mode, matching type, matching length, unmatched (predicted) sample value, etc.
[0008] Examples of matching primitives include codec block, sub-block, micro-block, string, pixel string, sample string, index string, and line.
[0009] In data compression, the compressed data (also commonly referred to as data stream) generated after compression consists of syntax element codes representing syntax elements one by one. A syntax element represents a coding parameter or a part thereof such as a prefix, infix, suffix, etc. A syntax element code consists of one bit (0 or 1, also often called a binary symbol or binary code), such as 3 bits 010, and the number of bits is called the code length, such as the code length of 010 is 3. All these bits constitute a bit stream, also called a code stream or bit stream.
[0010] In existing data compression technologies, from the perspective of code length, syntax element codes and the code streams composed of them have the following two composition modes:
[0011] 1) Variable length code: The code length is variable. For example, the four syntax element codes representing a syntax element are {0, 10, 110, 111}, and the code length is variable from 1 to 3. In this case, the length of the code stream, that is, the number of bits N, is also an arbitrary positive integer.
[0012] 2) Fixed-length code: The code length is a predetermined constant. For example, the four syntax element codes representing a syntax element are {00, 01, 10, 11}, and its code length is a predetermined constant 2. In this case, the length of the code stream, that is, the number of bits N, is not an arbitrary positive integer, but an integer multiple of a predetermined constant C.
[0013] The advantage of variable-length codes is that they have high coding efficiency, i.e., they compress data with fewer bits. Their disadvantage is that the encoder must generate bits of syntax elements one by one to form a code stream, while the decoder needs to read the bits of syntax elements in the code stream one by one to parse and obtain each syntax element. This disadvantage comes from the fact that every instruction and every data of a modern general-purpose 64-bit computer is 64 bits (i.e., 64 bits), and every computer clock cycle processes at least one byte (8 bits) and up to eight bytes (64 bits). The encoder or decoder implemented by a software program on a computer can only generate or parse the code stream one bit at a time, using 64 bits of processing power to process one bit, which has very low computational efficiency, resulting in very time-consuming encoding and decoding, and low encoding and decoding speeds. In particular, in matching methods with a large number of primitives, the number of coding parameters (such as coding mode, primitive mode, scanning mode, matching parameters including matching type, matching length, unmatched (predicted) sample values, etc.) and their corresponding syntax elements is large, and this disadvantage of very low computational efficiency is more obvious.
[0014] On the other hand, the advantage of fixed-length codes is that the encoder or decoder can generate or parse the bit stream with a predetermined number of fixed bits, such as 8 or 16, which greatly improves the computing efficiency. However, its disadvantage is that the coding efficiency is greatly reduced, that is, the number of bits of the compressed data is greatly increased.
[0015] Neither variable-length codes nor fixed-length codes can take into account both coding efficiency and computational efficiency. How to improve existing data compression technology to significantly improve coding efficiency without significantly reducing computational efficiency, or significantly improve computational efficiency without significantly reducing coding efficiency, is a very challenging problem in the field of data compression. Summary of the invention
[0016] In order to solve this problem in data compression, especially in matching mode, the present invention provides a data compression method and device using a code unit with a predetermined integer constant length, i.e., a constant number of bits, denoted as C, a code unit containing a variable-length code of a syntax element of multiple coding parameters or a fixed-length code of a syntax element of a coding parameter, the compressed data code stream length of the coding parameter is always an integer multiple of the code unit length, and the encoder or decoder generates or parses the code stream one code unit at a time. In the method and device, both the encoder and the decoder can encode and decode the coding parameters in code units instead of bits, and a plurality of variable-length codes whose sum of lengths is a predetermined integer constant and have a predetermined association with each other are allowed in the code unit, so as to achieve the purpose of taking into account both coding efficiency and computational efficiency.
[0017] The most basic unique technical feature of the encoding method or device of the present invention is to generate code units with the following characteristics:
[0018] 1) The code unit has a predetermined integer fixed length, i.e., a constant number of bits C;
[0019] 2) A code unit contains K syntax element codes of K (1 ≤ K < C) syntax elements, whose lengths, i.e., code lengths, are V1, …, V K ;
[0020] 3) Determine the value range of V2 from the value of the syntax element code with code length V1, determine the value range of V3 from the value of the syntax element code with code lengths V1 and V2, and so on, determine the value range of V4 from the value of the syntax element code with code lengths V1, V2, … …, V K-1 The value of the syntax element code, i.e., the codeword, determines V K The value range of
[0021] 4) V1 + V2 + ... ... + V K = C;
[0022] And write such code units into the compressed data code stream.
[0023] The most basic unique technical feature of the decoding method or device of the present invention is to parse the compressed data code stream composed of code units having the following characteristics to obtain the value of each syntax element:
[0024] 1) The code unit has a predetermined integer fixed length, i.e., a constant number of bits C;
[0025] 2) A code unit contains K syntax element codes of K (1 ≤ K < C) syntax elements, whose lengths, i.e., code lengths, are V1, …, V K ;
[0026] 3) Determine the value range of V2 from the value of the syntax element code with code length V1, determine the value range of V3 from the value of the syntax element code with code lengths V1 and V2, and so on, determine the value range of V4 from the value of the syntax element code with code lengths V1, V2, … …, V K-1 The value of the syntax element code, i.e., the codeword, determines V K The value range of
[0027] 4) V1 + V2 + ... ... + V K = C.
[0028] Figure 1 It is a schematic diagram of a fixed-length code unit in a compressed data code stream of the encoding method or device or the decoding method or device of the present invention having multiple variable-length syntax element codes.
[0029] According to one aspect of the present invention, a data compression encoding method or device is provided, which at least includes steps or modules for performing the following functions and operations:
[0030] Generate code units with the following characteristics and write them into the compressed data stream:
[0031] 1) The code unit has a predetermined integer fixed length, i.e., a constant number of bits C;
[0032] 2) A code unit contains K (1 ≤ K < C) syntax elements, K syntax element codes, denoted as S k , where 1≤ k ≤ K, and its length, i.e., the code length, i.e., the number of bits of the K syntax element codes, is V k , where 1 ≤ k ≤ K;
[0033] 3) Determine the value range of S2 and V2 from the value of the first syntax element code S1 with length V1, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1 and / or V2, and so on, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1, V2, ..., V K-1 The syntax element codes S1, S2, ..., S K-1 One, some or all of the values of S K and V K The value range of
[0034] 4) V1 + V2 + ... ... + V K= C.
[0035] From a first perspective, the present invention provides a coding method for compressing data, characterized in that it comprises at least the following steps:
[0036] 1) Determine an integer constant denoted as C as the fixed length of the code unit, i.e., the constant number of bits;
[0037] 2) Set the code length to V k , where 1 ≤ k ≤ K and 1 ≤ K < C, the K syntax element codes S of the K syntax elements k , where 1 ≤ k ≤ K, are connected one by one to form a code unit, where K V k , 1 ≤ k≤ K’s values add up to C;
[0038] 3) Write the code unit into the compressed data stream.
[0039] From a second perspective, the present invention provides a coding device for compressing data, characterized in that it includes at least the following modules:
[0040] 1) A code unit fixed length determination module determines an integer constant denoted as C as the fixed length of the code unit, i.e., the constant number of bits;
[0041] 2) Code units form modules, and the code lengths are V k , where 1 ≤ k ≤ K and 1 ≤ K < C, the K syntax element codes S of the K syntax elements k , where 1 ≤ k ≤ K, are connected one by one to form a code unit, where K V k , the sum of the values of 1 ≤ k ≤ K is equal to C;
[0042] 3) A compressed data code stream generation module writes the code units into the compressed data code stream.
[0043] According to another aspect of the present invention, a data compression decoding method or device is also provided, which at least includes steps or modules for performing the following functions and operations:
[0044] Parse code units with the following characteristics from the compressed data code stream:
[0045] 1) The code unit has a predetermined integer fixed length, i.e., a constant number of bits C;
[0046] 2) A code unit contains K (1 ≤ K < C) syntax elements, K syntax element codes, denoted as S k , where 1≤ k ≤ K, and its length, i.e., the code length, i.e., the number of bits of the K syntax element codes, is Vk , where 1 ≤ k ≤ K;
[0047] 3) Determine the value range of S2 and V2 from the value of the first syntax element code S1 with length V1, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1 and / or V2, and so on, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1, V2, ..., V K-1 The syntax element codes S1, S2, ..., S K-1 One, some or all of the values of S K and V K The value range of
[0048] 4) V1 + V2 + ... ... + V K = C.
[0049] From a third perspective, the present invention provides a method for decoding compressed data, characterized in that it comprises at least the following steps:
[0050] The step of parsing the code units having a predetermined integer fixed length, i.e., a constant number of bits C, in the compressed data code stream includes at least the following functions and operations:
[0051] 1) Starting from the boundary of the code unit, that is, the boundary of the entire C bits, parse the compressed data code stream to obtain the value of the first syntax element code S1 with a code length of V1 in at least one code unit, where V1 satisfies the condition that V1 is not greater than C;
[0052] 2) If V1 is equal to C, then the parsing of the compressed data code stream of the code unit is terminated; otherwise, V1 must be less than C, and the compressed data code stream of the code unit is continued to be parsed to at least obtain the value of the second syntax element code S2 with a code length of V2 in the code unit, where V2 satisfies the condition that the sum of V1 and V2 is not greater than C;
[0053] 3) If the sum of V1 and V2 is equal to C, then the parsing of the compressed data code stream of the code unit is terminated; otherwise, the sum of V1 and V2 must be less than C, and the compressed data code stream of the code unit is continued to be parsed to at least obtain the value of the third syntax element code S3 with a code length of V3 in the code unit, where V3 satisfies the condition that the sum of V1 plus V2 plus V3 is not greater than C;
[0054] 4) Similarly, if the sum of the code lengths of the grammatical element codes obtained after parsing is equal to C, the parsing of the compressed data code stream of the code unit is terminated; otherwise, the sum of the code lengths of the grammatical element codes obtained after parsing must be less than C, and the parsing of the compressed data code stream of the code unit is continued to obtain at least the value of the next grammatical element code, until the sum of the code lengths of the grammatical element codes obtained after parsing is exactly equal to C.
[0055] From a fourth perspective, the present invention provides a decoding device for compressing data, characterized in that it includes at least the following modules:
[0056] The code unit parsing module is used to parse the code units with a predetermined integer fixed length, i.e., a constant number of bits C, in the compressed data code stream. The module includes at least the following functions and operations:
[0057] 1) Starting from the boundary of the code unit, that is, the boundary of the entire C bits, parse the compressed data code stream to obtain the value of the first syntax element code S1 with a code length of V1 in at least one code unit, where V1 satisfies the condition that V1 is not greater than C;
[0058] 2) If V1 is equal to C, then the parsing of the compressed data code stream of the code unit is terminated; otherwise, V1 must be less than C, and the compressed data code stream of the code unit is continued to be parsed to at least obtain the value of the second syntax element code S2 with a code length of V2 in the code unit, where V2 satisfies the condition that the sum of V1 and V2 is not greater than C;
[0059] 3) If the sum of V1 and V2 is equal to C, then the parsing of the compressed data code stream of the code unit is terminated; otherwise, the sum of V1 and V2 must be less than C, and the compressed data code stream of the code unit is continued to be parsed to at least obtain the value of the third syntax element code S3 with a code length of V3 in the code unit, where V3 satisfies the condition that the sum of V1 plus V2 plus V3 is not greater than C;
[0060] 4) Similarly, if the sum of the code lengths of the grammatical element codes obtained after parsing is equal to C, the parsing of the compressed data code stream of the code unit is terminated; otherwise, the sum of the code lengths of the grammatical element codes obtained after parsing must be less than C, and the parsing of the compressed data code stream of the code unit is continued to obtain at least the value of the next grammatical element code, until the sum of the code lengths of the grammatical element codes obtained after parsing is exactly equal to C.
[0061] The present invention is applicable to encoding and decoding of lossy compressed data, and the present invention is also applicable to encoding and decoding of lossless compressed data. The present invention is applicable to encoding and decoding of one-dimensional data such as string data or byte string data or one-dimensional graphics or fractal graphics, and the present invention is also applicable to encoding and decoding of two-dimensional or more data such as image or video data.
[0062] In the present invention, the data involved in data compression includes one or a combination of the following types of data:
[0063] 1) One-dimensional data;
[0064] 2) Two-dimensional data;
[0065] 3) Multidimensional data;
[0066] 4) Graphics;
[0067] 5) Fractal graphics;
[0068] 6) Image;
[0069] 7) Sequence of images;
[0070] 8) Video;
[0071] 9) Three-dimensional scene;
[0072] 10) Sequences of continuously changing three-dimensional scenes;
[0073] 11) Virtual reality scenes;
[0074] 12) Sequence of continuously changing virtual reality scenes
[0075] 13) Images in pixel form;
[0076] 14) Transform domain data of the image;
[0077] 15) A collection of bytes of two or more dimensions;
[0078] 16) A set of bits of two or more dimensions;
[0079] 17) A collection of pixels;
[0080] 18) A collection of pixel components.
[0081] In the present invention, the syntax element includes one of the following coding parameters or coding parameter components or a combination thereof or a prefix, infix or suffix thereof:
[0082] 1) Coding mode;
[0083] 2) Encoding sub-mode;
[0084] 3) Primitive mode;
[0085] 4) Primitive sub-pattern;
[0086] 5) Scanning mode;
[0087] 6) Scan sub-mode;
[0088] 7) Matching mode;
[0089] 8) Matching subpatterns;
[0090] 9) Matching type;
[0091] 10) Match subtype;
[0092] 11) Block or sub-block mode;
[0093] 12) block or sub-block sub-mode;
[0094] 13) Block or sub-block type;
[0095] 14) block or sub-block subtype;
[0096] 15) String mode;
[0097] 16) String mode;
[0098] 17) string type;
[0099] 18) String type;
[0100] 19) Displacement vector type;
[0101] 20) Displacement vector subtype;
[0102] 21) Displacement vector;
[0103] 22) Motion vector type;
[0104] 23) Motion vector subtype;
[0105] 24) Motion vector;
[0106] 25) Offset type;
[0107] 26) Offset subtype;
[0108] 27) Offset;
[0109] 28) Offset minus constant;
[0110] 29) Image coordinates;
[0111] 30) Number of pixels;
[0112] 31) Number of primitives;
[0113] 32) Primitive length;
[0114] 33) Number of strings (including data element strings, byte strings, alpha strings, pixel strings, sample value strings, index strings, unpredictable element strings, primitive strings, sub-block strings, micro-block strings, etc.);
[0115] 34) Length of strings (including data element strings, byte strings, alpha strings, pixel strings, sample value strings, index strings, unpredictable element strings, primitive strings, sub-block strings, micro-block strings, etc.);
[0116] 35) Length of a string (including data element string, byte string, alpha string, pixel string, sample value string, index string, unpredictable element string, primitive string, sub-block string, micro-block string, etc.) minus a constant;
[0117] 36) String (including data element string, byte string, alpha string, pixel string, sample value string, index string, unpredictable element string, primitive string, sub-block string, micro-block string, etc.) length type;
[0118] 37) The number of consecutive unpredictable samples is also called unmatched samples or unmatched samples or mismatched samples;
[0119] 38) The length of the unpredictable sample value string is also called the unmatched sample value string or the unmatched sample value string or the unmatched string or the unmatched string.
[0120] In the present invention, when the data is an image, a sequence of images, a video, etc., a coding block or a decoding block is a coding area or a decoding area of an image, including at least one of the following: an entire image, a sub-image of an image, a macroblock, a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-area of a CU, a sub-coding unit SubCU, a prediction unit PU, and a transform unit TU.
[0121] In the present invention, the primitives of the codec block involved in data compression include one of the following situations or a combination thereof: codec block, sub-block, micro-block, string, byte string, alpha string, pixel string, sample string, index string, line, matching block, matching sub-block, matching micro-block, matching string, matching pixel string, matching sample string, matching index string, matching bar, matching line, offset string, coordinate string, unpredictable pixel, unpredictable pixel string, coordinate or unpredictable pixel string.
[0122] The technical features of the present invention are described above by using several specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0123] Figure 1 It is a schematic diagram of a fixed-length code unit in a compressed data code stream of the encoding method or device or the decoding method or device of the present invention having multiple variable-length syntax element codes. DETAILED DESCRIPTION
[0124] The following are more implementation details or variations of the present invention.
[0125] Implementation or variant example 1
[0126] In the encoding method or device or the decoding method or device, the fixed length of the code unit is 8.
[0127] Implementation or variant example 2
[0128] In the encoding method or device or the decoding method or device, the code unit is a byte.
[0129] Implementation or variant example 3
[0130] In the encoding method or device or the decoding method or device, the syntax element represents the following coding parameters or variants thereof, including a part thereof, a prefix thereof, a suffix thereof, a suffix thereof, a minus a constant thereof, a plus a constant thereof, a multiplication of a constant thereof, or a division of a constant, one or a combination thereof:
[0131] 1) Encoding mode,
[0132] 2) Encoding sub-mode,
[0133] 3) Primitive mode,
[0134] 4) Primitive sub-pattern,
[0135] 5) Scan mode,
[0136] 6) Scan sub-mode,
[0137] 7) Matching mode,
[0138] 8) Matching subpatterns,
[0139] 9) Match type,
[0140] 10) Matching subtype,
[0141] 11) Block or sub-block mode,
[0142] 12) Block or sub-block sub-mode,
[0143] 13) Block or sub-block type,
[0144] 14) Block or sub-block subtype,
[0145] 15) String mode,
[0146] 16) String mode,
[0147] 17) String type,
[0148] 18) String type,
[0149] 19) Displacement vector type,
[0150] 20) Displacement vector subtype,
[0151] 21) Displacement vector,
[0152] 22) Motion vector type,
[0153] 23) Motion vector subtype,
[0154] 24) Motion vector,
[0155] 25) Offset type,
[0156] 26) Offset subtype,
[0157] 27) Offset,
[0158] 28) Image coordinates,
[0159] 29) Length type,
[0160] 30) Length subtype,
[0161] 31) Length,
[0162] 32) String (including data element string, byte string, alpha string, pixel string, sample value string, index string, unpredictable element string, primitive string, sub-block string, micro-block string, etc.) length type,
[0163] 33) String (including data element string, byte string, alpha string, pixel string, sample value string, index string, unpredictable element string, primitive string, sub-block string, micro-block string, etc.) length subtype,
[0164] 34) Length of strings (including data element strings, byte strings, alpha strings, pixel strings, sample value strings, index strings, unpredictable element strings, primitive strings, sub-block strings, micro-block strings, etc.),
[0165] 35) Matching string (including matching data element string, matching byte string, matching alpha string, matching pixel string, matching sample value string, matching index string, matching primitive string, matching sub-block string, matching micro-block string, etc.) length type, where the matching string includes the reference string or prediction string and / or current string,
[0166] 36) Matching string (including matching data element string, matching byte string, matching alpha string, matching pixel string, matching sample value string, matching index string, matching primitive string, matching sub-block string, matching micro-block string, etc.) length subtype, where the matching string includes the reference string or prediction string and / or the current string,
[0167] 37) Length of the matching string (including matching data element string, matching byte string, matching alpha string, matching pixel string, matching sample value string, matching index string, matching primitive string, matching sub-block string, matching micro-block string, etc.), where the matching string includes the reference string or prediction string and / or the current string,
[0168] 38) Unpredictable samples are also called unmatched samples or unmatched samples or mismatched samples.
[0169] 39) The number of consecutive unpredictable samples is also called unmatched samples or unmatched samples or mismatched samples.
[0170] 40) The length of the unpredictable sample value string is also called the unmatched sample value string or the unmatched sample value string or the unmatched string or the unmatched string.
[0171] Implementation or variant example 4
[0172] In the encoding method or device or the decoding method or device,
[0173] The fixed length of the code unit is 8;
[0174] The value range of the first syntax element code S1 of the code unit is {0, 10, 11}, so the value range of the length V1 of the first syntax element code is {1, 2};
[0175] When the value of the first syntax element code S1 is 0, the value range of the second syntax element code S2 of the code unit is {0, 10, 110, 111}, and thus the value range of the length V2 of the second syntax element code is {1, 2, 3};
[0176] When the value of the first syntax element code S1 is 0 and the value of the second syntax element code S2 is 10, the value range of the third syntax element code S3 of the code unit is a 5-bit fixed-length code, and thus the value range of the length V3 of the third syntax element code is {5}. In this case, the value of the total number K of syntax element codes of the code unit is equal to 3;
[0177] When the value of the first syntax element code S1 is 10, the value range of the second syntax element code S2 is {0, 10, 110, 1110, 11110, 111110, 111111}, and thus the value range of the length V2 of the second syntax element code is {1, 2, 3, 4, 5, 6};
[0178] When the value of the first syntax element code S1 is 10 and the value of the second syntax element code S2 is 10, the value range of the third syntax element code S3 is a 4-bit fixed-length code, and thus the value range of the length V3 of the third syntax element code is {4}, in which case the value of the total number K of syntax element codes of the code unit is equal to 3;
[0179] When the value of the first syntax element code S1 is 10 and the value of the second syntax element code S2 is 111110 or 111111, there are only 2 syntax element codes in the code unit. In this case, the value of the total number K of syntax element codes in the code unit is equal to 2.
[0180] Implementation or variant example 5
[0181] In the encoding method or device or the decoding method or device,
[0182] The fixed length of the code unit is 8;
[0183] The value range of the first syntax element code S1 of the code unit is {X, Y, Z}, where the length of X is 1, i.e., 1 bit, the length of Y is 2, i.e., 2 bits, and the length of Z is also 2, i.e., 2 bits;
[0184] When the value of the first syntax element code S1 is X, the sum of the code lengths V2 of the value of the second syntax element code S2, the code length V3 of the value of the third syntax element code S3, the code length V4 of the value of the fourth syntax element code S2, and the code length V5 of the value of the fifth syntax element code S5 is equal to 7, wherein V5 takes the value 0 to indicate that there is no fifth syntax element code, and thus the sum of the values of V2 to V4 is equal to 7-V5=7-0=7 and the total number of syntax element codes of the code unit is The value of the number K is equal to 4, V4 and V5 are both 0, indicating that there are no 4th and 5th syntax element codes, so the sum of the values of V2 to V3 is equal to 7-V4-V5=7-0-0=7, and the value of the total number of syntax element codes K of the code unit is equal to 3, V3 to V5 are all 0, indicating that there are no 3rd to 5th syntax element codes, so the value of V2 is equal to 7-V3-V4-V5=7-0-0-0=7, and the value of the total number of syntax element codes K of the code unit is equal to 2;
[0185] When the value of the first syntax element code S1 is Y or Z, the code length V2 of the value of the second syntax element code S2, the code length V3 of the value of the third syntax element code S3, the code length V4 of the value of the fourth syntax element code S2, and the code length V5 of the value of the fifth syntax element code S5 add up to 6, wherein V5 takes the value 0 to indicate that there is no fifth syntax element code, and thus the values of V2 to V4 add up to 6-V5=6-0=6 and the total syntax element code of the code unit is The value of the number K is equal to 4, V4 and V5 both take the value 0, indicating that there are no 4th and 5th syntax element codes, so the sum of the values of V2 to V3 is equal to 6-V4-V5=6-0-0=6 and the value of the total number K of syntax element codes of the code unit is equal to 3, V3 to V5 both take the value 0, indicating that there are no 3rd to 5th syntax element codes, so the value of V2 is equal to 6-V3-V4-V5=6-0-0-0=6 and the value of the total number K of syntax element codes of the code unit is equal to 2.
[0186] Implementation or Variation Example 6
[0187] In the encoding method or device or the decoding method or device,
[0188] The fixed length of the code unit is 8;
[0189] The first syntax element code S1 of the code unit is a variable length code, i.e., its code length V1 is variable;
[0190] The code length V2 of the second syntax element code S2 of the code unit is determined by the value of S1, that is, V2 is a function of S1 V2= V2(S1), that is, when the value of S1 is determined, the code length of S2 is also fixed;
[0191] The code length V3 of the third syntax element code S3 of the code unit is determined by the value of S1 and / or S2, that is, V3 is a function of S1 and / or S2 V3= V3 (S1, S2), that is, when the values of S1 and S2 are determined, the code length of S3 is also fixed;
[0192] The code length V4 of the fourth syntax element code S4 of the code unit is determined by the values of S1 and / or S2 and / or S3, that is, V4 is a function of S1 and / or S2 and / or S3 V4= V4 (S1, S2, S3), that is, when the values of S1 to S3 are determined, the code length of S4 is also fixed;
[0193] The code length V5 of the 5th syntax element code S5 of the code unit is determined by the values of S1 and / or S2 and / or S3 and / or S4, that is, V4 is a function of S1 and / or S2 and / or S3 and / or S4, V4= V4 (S1, S2, S3, S4), that is, when the values of S1~S4 are determined, the code length of S5 will also remain fixed.
[0194] Implementation or variant example 7 (more effective for single-channel image data such as alpha channel data)
[0195] In the encoding method or device or the decoding method or device,
[0196] The fixed length of the code unit is 8;
[0197] The value range of the first syntax element code S1 of the code unit is {1, 00, 01}, so the value range of the length V1 of the first syntax element code is {1, 2};
[0198] When the value of the first syntax element code S1 is 1, the value range of the second syntax element code S2 is a 2-bit fixed-length code, and the value range of the third syntax element code S3 is a 5-bit fixed-length code;
[0199] When the value of the first syntax element code S1 is 01, the value range of the second syntax element code S2 is a 2-bit fixed-length code, and the value range of the third syntax element code S3 is a 4-bit fixed-length code;
[0200] When the value of the first syntax element code S1 is 00, the value range of the second syntax element code S2 is a fixed-length code of 1 bit, and the value range of the third syntax element code S3 is a fixed-length code of 5 bits.
[0201] Implementation or variant example 8 (a specific example of implementation or variant example 7)
[0202] In the encoding method or device or the decoding method or device,
[0203] The fixed length of the code unit is 8, usually referred to as a byte;
[0204] The first syntax element of the code unit represents a combination of the following coding parameters or a part thereof or a prefix thereof:
[0205] 1) The length of the unmatched string is the number of consecutive unmatched sample values uml, where uml is a non-negative integer, and uml=0 means that the unmatched string is actually an empty string, that is, there is no unmatched sample value.
[0206] 2) The offset of the matching string following the unmatched string (which may be an empty string), where offset is a positive integer;
[0207] The value range of the first syntax element code S1 is {1, 00, 01}, and thus the value range of the length V1 of the first syntax element code is {1, 2};
[0208] The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml.
[0209] The value of S1 is 00, which means uml=0 and offset=1 or offset=image width w. In this case, S1 is a composite of uml and the first part of offset, i.e., the prefix. An additional syntax element is needed to indicate the value of offset.
[0210] The value of S1 is 01, which means uml=0 and offset≠1 and offset≠w. In this case, S1 is also a compound of uml and the first part of offset, i.e., prefix. At least one additional syntax element is needed to indicate the value of offset.
[0211] When the value of S1 is 1,
[0212] The value range of the second syntax element code S2 is a 2-bit fixed-length code, and S2 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof.
[0213] The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3.
[0214] The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer.
[0215] The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4.
[0216] The value of S3 is 00000 (corresponding to the decimal number 0) to 11101 (corresponding to the decimal number 29), which means ml=4 to 33 respectively.
[0217] The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value ml is equal to between 34 and 289.
[0218] The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml - 290, where the value range of the parameter mlMinus290 is a non-zero integer.
[0219] When the value of S1 is 00,
[0220] The value range of the second syntax element code S2 is a fixed-length code of 1 bit, and the value of S2 is 0 and 1, respectively indicating offset=1 and offset=w.
[0221] The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4.
[0222] The value of S3 is 00000 (corresponding to the decimal number 0) to 11101 (corresponding to the decimal number 29), which means ml=4 to 33 respectively.
[0223] The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value ml is equal to between 34 and 289.
[0224] The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml - 290, where the value range of the parameter mlMinus290 is a non-zero integer.
[0225] When the value of S1 is 01,
[0226] The value range of the second syntax element code S2 is a 2-bit fixed-length code, S2 represents offset or a part thereof,
[0227] The values of S2 are 00 and 01, which respectively represent offset = w - 1 and offset = w + 1.
[0228] The value of S2 is 10, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value between 2 and 257 the offset is equal to.
[0229] The value of S2 is 11, indicating that offset ≥ 258. In this case, S2 is only the first part of the offset, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to indicate the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer.
[0230] The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4.
[0231] The value of S3 is 0000 (corresponding to decimal number 0) to 1101 (corresponding to decimal number 13), which means ml=4 to 17, respectively.
[0232] The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value ml is equal to between 34 and 289.
[0233] The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to represent the value of ml ≥ 274, that is, the value of mlMinus274 = ml - 274, where the value range of the parameter mlMinus274 is a non-zero integer.
[0234] Implementation or variant example 9 (more effective for single-channel image data such as alpha channel data)
[0235] In the encoding method or device or the decoding method or device,
[0236] The fixed length of the code unit is 8;
[0237] The value range of the first syntax element code S1 of the code unit is {0, 1}, and thus the value range of the length V1 of the first syntax element code is {1};
[0238] When the value of the first syntax element code S1 is 0, the value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, and thus the value range of the length V2 of the second syntax element code is {2, 3}.
[0239] When the value of V2 is 2, that is, the value of S2 is 00 or 01, the value range of the third syntax element code S3 is a fixed-length code of 5 bits;
[0240] When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, the value range of the third syntax element code S3 is a 4-bit fixed-length code;
[0241] When the value of the first syntax element code S1 is 1, the value range of the second syntax element code S2 is a fixed-length code of 2 bits, and the value range of the third syntax element code S3 is a fixed-length code of 5 bits.
[0242] Implementation or variant example 10 (a specific example of implementation or variant example 9, essentially equivalent to implementation or variant example 8)
[0243] In the encoding method or device or the decoding method or device,
[0244] The fixed length of the code unit is 8, usually referred to as a byte;
[0245] The value range of the first syntax element code S1 of the code unit is {0, 1}, so the value range of the length V1 of the first syntax element code is {1}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there are no unmatched sample values;
[0246] The value of S1 is 0, which means uml=0.
[0247] The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset or a part of the matching string following the unmatched string (which may be an empty string), where offset is a positive integer,
[0248] The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w.
[0249] When the value of V2 is 2, that is, the value of S2 is 00 or 01,
[0250] The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string (which may be an empty string), that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4.
[0251] The value of S3 is 00000 (corresponding to the decimal number 0) to 11101 (corresponding to the decimal number 29), which means ml=4 to 33 respectively.
[0252] The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value ml is equal to between 34 and 289.
[0253] The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml - 290, where the value range of the parameter mlMinus290 is a non-zero integer.
[0254] The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively.
[0255] The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value between 2 and 257 the offset is equal to.
[0256] The value of S2 is 111, indicating that offset ≥ 258. In this case, S2 is only the first part of the offset, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to indicate the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer.
[0257] When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111,
[0258] The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string (which may be an empty string), that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4.
[0259] The value of S3 is 0000 (corresponding to decimal number 0) to 1101 (corresponding to decimal number 13), which means ml=4 to 17, respectively.
[0260] The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value ml is equal to between 34 and 289.
[0261] The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are needed to represent the value of ml ≥ 274, that is, mlMinus274 = ml - 274, where the value range of the parameter mlMinus274 is a non-zero integer.
[0262] The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml.
[0263] The value range of the second syntax element code S2 is a 2-bit fixed-length code, and S2 also represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof.
[0264] The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3.
[0265] The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer.
[0266] The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string (which may be an empty string), that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4.
[0267] The value of S3 is 00000 (corresponding to the decimal number 0) to 11101 (corresponding to the decimal number 29), which means ml=4 to 33 respectively.
[0268] The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value ml is equal to between 34 and 289.
[0269] The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml - 290, where the value range of the parameter mlMinus290 is a non-zero integer.
[0270] Implementation or variant example 11 (more effective for single-channel image data such as alpha channel data)
[0271] In the encoding method or device or the decoding method or device, if Figure 1 As shown,
[0272] The fixed length of the code unit is 8;
[0273] The value range of the first syntax element code S1 of the code unit is {0, 100, 101, 110, 111}, so the value range of the length V1 of the first syntax element code is {1, 3};
[0274] When the value of the first syntax element code S1 is 0, the value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, and thus the value range of the length V2 of the second syntax element code is {2, 3}.
[0275] When the value of V2 is 2, that is, the value of S2 is 00 or 01, the value range of the third syntax element code S3 is a fixed-length code of 5 bits;
[0276] When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, the value range of the third syntax element code S3 is a 4-bit fixed-length code;
[0277] When the value of the first syntax element code S1 is 100 or 101 or 110 or 111, the value range of the second syntax element code S2 is a fixed-length code of 5 bits.
[0278] Implementation or variant example 12 (a specific example of implementation or variant example 11, essentially equivalent to implementation or variant examples 8 and 10)
[0279] In the encoding method or device or the decoding method or device,
[0280] The fixed length of the code unit is 8, usually referred to as a byte;
[0281] The value range of the first syntax element code S1 of the code unit is {0, 100, 101, 110, 111}, so the value range of the length V1 of the first syntax element code is {1, 3}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there is no unmatched sample value;
[0282] The value of S1 is 0, which means uml=0.
[0283] The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset or a part of the matching string following the unmatched string (which may be an empty string), where offset is a positive integer,
[0284] The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w.
[0285] When the value of V2 is 2, that is, the value of S2 is 00 or 01,
[0286] The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string (which may be an empty string), that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4.
[0287] The value of S3 is 00000 (corresponding to the decimal number 0) to 11101 (corresponding to the decimal number 29), which means ml=4 to 33 respectively.
[0288] The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value ml is equal to between 34 and 289.
[0289] The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml - 290, where the value range of the parameter mlMinus290 is a non-zero integer.
[0290] The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively.
[0291] The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value between 2 and 257 the offset is equal to.
[0292] The value of S2 is 111, indicating that offset ≥ 258. In this case, S2 is only the first part of the offset, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to indicate the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer.
[0293] When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111,
[0294] The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string (which may be an empty string), that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4.
[0295] The value of S3 is 0000 (corresponding to decimal number 0) to 1101 (corresponding to decimal number 13), which means ml=4 to 17, respectively.
[0296] The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value ml is equal to between 34 and 289.
[0297] The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are needed to represent the value of ml ≥ 274, that is, mlMinus274 = ml - 274, where the value range of the parameter mlMinus274 is a non-zero integer.
[0298] The values of S1 are 100, 101, and 110, respectively, indicating that uml=1, 2, and 3.
[0299] The value of S1 is 111, which means uml≥4. In this case, S1 is only the first part of uml, i.e., the prefix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer.
[0300] When the value of V1 is 3, that is, the value of S1 is 100, 101, 110, or 111,
[0301] The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string (which may be an empty string), that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4.
[0302] The value of S3 is 00000 (corresponding to the decimal number 0) to 11101 (corresponding to the decimal number 29), which means ml=4 to 33 respectively.
[0303] The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit (8 bits) and syntax element are required to indicate which value ml is equal to between 34 and 289.
[0304] The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units (at least 16 bits) and syntax elements are required to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml - 290, where the value range of the parameter mlMinus290 is a non-zero integer.
Claims
1. A data compression encoding method, characterized in that At least include the following steps to complete the following functions and operations: Generate code units with the following characteristics and write them into the compressed data stream: 1) The code unit has a predetermined integer fixed length, i.e., a constant number of bits C; 2) A code unit contains K syntax elements, denoted by S k , whose lengths are V k , where 1 ≤ K< C, 1 ≤ k ≤ K; 3) Determine the value range of S2 and V2 from the value of the first syntax element code S1 with length V1, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1 and / or V2, and so on, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1, V2, … …, V K-1 The syntax element codes S1, S2, ..., S K-1 One, some or all of the values of S K and V K The value range of 4)V1+V2+… …+V K = C; 5) Also has one of the following characteristics: Feature 1: The fixed length of the code unit is the number of bits in a byte; The first syntax element of the code unit represents the following coding parameters or a part thereof: 1) The length of the unmatched string is the number of consecutive unmatched sample values uml, where uml is a non-negative integer, and uml=0 means that the unmatched string is actually an empty string, that is, there is no unmatched sample value. 2) The offset of the matching string following the unmatched string, where offset is a positive integer; The value range of the first syntax element code S1 is {1, 00, 01}, and thus the value range of the length V1 of the first syntax element code is {1, 2}; The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml. The value of S1 is 00, which means uml=0 and offset=1 or offset=image width w. In this case, S1 is a composite of uml and the first part of offset, i.e., the prefix. An additional syntax element is needed to indicate the value of offset. The value of S1 is 01, which means uml=0 and offset≠1 and offset≠w. In this case, S1 is also a compound of uml and the first part of offset, i.e., prefix. At least one additional syntax element is needed to indicate the value of offset. When the value of S1 is 1, The value range of the second syntax element code S2 is a 2-bit fixed-length code. S2 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof. The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3. The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. When the value of S1 is 00, The value range of the second syntax element code S2 is a fixed-length code of 1 bit, and the value of S2 is 0 and 1, respectively indicating offset=1 and offset=w. The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. When the value of S1 is 01, The value range of the second syntax element code S2 is a 2-bit fixed-length code, S2 represents offset or a part thereof, The values of S2 are 00 and 01, which respectively represent offset = w - 1 and offset = w + 1. The value of S2 is 10, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 11, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. Feature 2: The fixed length of the code unit is the number of bits in a byte; The value range of the first syntax element code S1 of the code unit is {0, 1}, so the value range of the length V1 of the first syntax element code is {1}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there are no unmatched sample values; The value of S1 is 0, which means uml=0. The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset of the matching string following the unmatched string or a part thereof, where offset is a positive integer, The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w. When the value of V2 is 2, that is, the value of S2 is 00 or 01, The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively. The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 111, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml. The value range of the second syntax element code S2 is a 2-bit fixed-length code, and S2 also represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof. The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3. The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. Feature 3: The fixed length of the code unit is the number of bits in a byte; The value range of the first syntax element code S1 of the code unit is {0, 100, 101, 110, 111}, so the value range of the length V1 of the first syntax element code is {1, 3}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there is no unmatched sample value; The value of S1 is 0, which means uml=0. The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset of the matching string following the unmatched string or a part thereof, where offset is a positive integer, The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w. When the value of V2 is 2, that is, the value of S2 is 00 or 01, The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively. The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 111, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. The values of S1 are 100, 101, and 110, respectively, indicating that uml=1, 2, and 3. The value of S1 is 111, which means uml≥4. In this case, S1 is only the first part of uml, i.e., the prefix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. When the value of V1 is 3, that is, the value of S1 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer.
2. A data compression encoding device, characterized in that At least include modules that complete the following functions and operations: Generate code units with the following characteristics and write them into the compressed data stream: 1) The code unit has a predetermined integer fixed length, i.e., a constant number of bits C; 2) A code unit contains K syntax elements, denoted by S k , whose lengths are V k , where 1 ≤ K< C, 1 ≤ k ≤ K; 3) Determine the value range of S2 and V2 from the value of the first syntax element code S1 with length V1, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1 and / or V2, and so on, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1, V2, … …, V K-1 The syntax element codes S1, S2, ..., S K-1 One, some or all of the values of S K and V K The value range of 4)V1+V2+… …+V K = C; 5) Also has one of the following characteristics: Feature 1: The fixed length of the code unit is the number of bits in a byte; The first syntax element of the code unit represents a combination of the following coding parameters or a part thereof or a prefix thereof: 1) The length of the unmatched string is the number of consecutive unmatched sample values uml, where uml is a non-negative integer, and uml=0 means that the unmatched string is actually an empty string, that is, there is no unmatched sample value. 2) The offset of the matching string following the unmatched string, where offset is a positive integer; The value range of the first syntax element code S1 is {1, 00, 01}, and thus the value range of the length V1 of the first syntax element code is {1, 2}; The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml. The value of S1 is 00, which means uml=0 and offset=1 or offset=image width w. In this case, S1 is a composite of uml and the first part of offset, i.e., the prefix. An additional syntax element is needed to indicate the value of offset. The value of S1 is 01, which means uml=0 and offset≠1 and offset≠w. In this case, S1 is also a compound of uml and the first part of offset, i.e., prefix. At least one additional syntax element is needed to indicate the value of offset. When the value of S1 is 1, The value range of the second syntax element code S2 is a 2-bit fixed-length code. S2 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof. The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3. The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. When the value of S1 is 00, The value range of the second syntax element code S2 is a fixed-length code of 1 bit, and the value of S2 is 0 and 1, respectively indicating offset=1 and offset=w. The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. When the value of S1 is 01, The value range of the second syntax element code S2 is a 2-bit fixed-length code, S2 represents offset or a part thereof, The values of S2 are 00 and 01, which respectively represent offset = w - 1 and offset = w + 1. The value of S2 is 10, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 11, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. Feature 2: The fixed length of the code unit is the number of bits in a byte; The value range of the first syntax element code S1 of the code unit is {0, 1}, so the value range of the length V1 of the first syntax element code is {1}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there are no unmatched sample values; The value of S1 is 0, which means uml=0. The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset of the matching string following the unmatched string or a part thereof, where offset is a positive integer, The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w. When the value of V2 is 2, that is, the value of S2 is 00 or 01, The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively. The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 111, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml. The value range of the second syntax element code S2 is a 2-bit fixed-length code, and S2 also represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof. The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3. The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. Feature 3: The fixed length of the code unit is the number of bits in a byte; The value range of the first syntax element code S1 of the code unit is {0, 100, 101, 110, 111}, so the value range of the length V1 of the first syntax element code is {1, 3}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there is no unmatched sample value; The value of S1 is 0, which means uml=0. The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset of the matching string following the unmatched string or a part thereof, where offset is a positive integer, The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w. When the value of V2 is 2, that is, the value of S2 is 00 or 01, The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively. The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 111, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. The value of S1 is 100, 101, 110, which means uml=1, 2, 3, respectively. The value of S1 is 111, which means uml≥4. In this case, S1 is only the first part of uml, i.e., the prefix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. When the value of V1 is 3, that is, the value of S1 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer.
3. A data compression decoding method, characterized in that it includes at least the steps of performing the following functions and operations: Parse code units with the following characteristics from the compressed data code stream: 1) The code unit has a predetermined integer fixed length, i.e., a constant number of bits C; 2) A code unit contains K syntax elements, denoted by S k , whose lengths are V k , where 1 ≤ K< C, 1 ≤ k ≤ K; 3) Determine the value range of S2 and V2 from the value of the first syntax element code S1 with length V1, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1 and / or V2, and so on, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1, V2, … …, V K-1 The syntax element codes S1, S2, ..., S K-1 One, some or all of the values of S K and V K The value range of 4)V1+V2+… …+V K = C; 5) Also has one of the following characteristics: Feature 1: The fixed length of the code unit is the number of bits in a byte; The first syntax element of the code unit represents a combination of the following coding parameters or a part thereof or a prefix thereof: 1) The length of the unmatched string is the number of consecutive unmatched sample values uml, where uml is a non-negative integer, and uml=0 means that the unmatched string is actually an empty string, that is, there is no unmatched sample value. 2) The offset of the matching string following the unmatched string, where offset is a positive integer; The value range of the first syntax element code S1 is {1, 00, 01}, and thus the value range of the length V1 of the first syntax element code is {1, 2}; The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml. The value of S1 is 00, which means uml=0 and offset=1 or offset=image width w. In this case, S1 is a composite of uml and the first part of offset, i.e., the prefix. An additional syntax element is needed to indicate the value of offset. The value of S1 is 01, which means uml=0 and offset≠1 and offset≠w. In this case, S1 is also a compound of uml and the first part of offset, i.e., prefix. At least one additional syntax element is needed to indicate the value of offset. When the value of S1 is 1, The value range of the second syntax element code S2 is a 2-bit fixed-length code. S2 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof. The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3. The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. When the value of S1 is 00, The value range of the second syntax element code S2 is a fixed-length code of 1 bit, and the value of S2 is 0 and 1, respectively indicating offset=1 and offset=w. The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. When the value of S1 is 01, The value range of the second syntax element code S2 is a 2-bit fixed-length code, S2 represents offset or a part thereof, The values of S2 are 00 and 01, which respectively represent offset = w - 1 and offset = w + 1. The value of S2 is 10, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 11, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. Feature 2: The fixed length of the code unit is the number of bits in a byte; The value range of the first syntax element code S1 of the code unit is {0, 1}, so the value range of the length V1 of the first syntax element code is {1}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there are no unmatched sample values; The value of S1 is 0, which means uml=0. The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset of the matching string following the unmatched string or a part thereof, where offset is a positive integer, The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w. When the value of V2 is 2, that is, the value of S2 is 00 or 01, The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively. The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 111, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml. The value range of the second syntax element code S2 is a 2-bit fixed-length code, and S2 also represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof. The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3. The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. Feature 3: The fixed length of the code unit is the number of bits in a byte; The value range of the first syntax element code S1 of the code unit is {0, 100, 101, 110, 111}, so the value range of the length V1 of the first syntax element code is {1, 3}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there is no unmatched sample value; The value of S1 is 0, which means uml=0. The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset of the matching string following the unmatched string or a part thereof, where offset is a positive integer, The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w. When the value of V2 is 2, that is, the value of S2 is 00 or 01, The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively. The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 111, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 4-bit fixed-length code. S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of consecutive matching samples or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. The values of S1 are 100, 101, and 110, respectively, indicating that uml=1, 2, and 3. The value of S1 is 111, which means uml≥4. In this case, S1 is only the first part of uml, i.e., the prefix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. When the value of V1 is 3, that is, the value of S1 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer.
4. A data compression decoding device, characterized in that At least include modules that complete the following functions and operations: Parse code units with the following characteristics from the compressed data code stream: 1) The code unit has a predetermined integer fixed length, i.e., a constant number of bits C; 2) A code unit contains K syntax elements, denoted by S k , whose lengths are V k , where 1 ≤ K< C, 1 ≤ k ≤ K; 3) Determine the value range of S2 and V2 from the value of the first syntax element code S1 with length V1, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1 and / or V2, and so on, determine the value range of S3 and V3 from the value of the syntax element code S1 and / or S2 with length V1, V2, … …, V K-1 The syntax element codes S1, S2, ..., S K-1 One, some or all of the values of S K and V K The value range of 4)V1+V2+… …+V K = C; 5) Also has one of the following characteristics: Feature 1: The fixed length of the code unit is the number of bits in a byte; The first syntax element of the code unit represents a combination of the following coding parameters or a part thereof or a prefix thereof: 1) The length of the unmatched string is the number of consecutive unmatched sample values uml, where uml is a non-negative integer, and uml=0 means that the unmatched string is actually an empty string, that is, there is no unmatched sample value. 2) The offset of the matching string following the unmatched string, where offset is a positive integer; The value range of the first syntax element code S1 is {1, 00, 01}, and thus the value range of the length V1 of the first syntax element code is {1, 2}; The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml. The value of S1 is 00, which means uml=0 and offset=1 or offset=image width w. In this case, S1 is a composite of uml and the first part of offset, i.e., the prefix. An additional syntax element is needed to indicate the value of offset. The value of S1 is 01, which means uml=0 and offset≠1 and offset≠w. In this case, S1 is also a compound of uml and the first part of offset, i.e., prefix. At least one additional syntax element is needed to indicate the value of offset. When the value of S1 is 1, The value range of the second syntax element code S2 is a 2-bit fixed-length code. S2 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof. The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3. The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. When the value of S1 is 00, The value range of the second syntax element code S2 is a fixed-length code of 1 bit, and the value of S2 is 0 and 1, respectively indicating offset=1 and offset=w. The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. When the value of S1 is 01, The value range of the second syntax element code S2 is a 2-bit fixed-length code, S2 represents offset or a part thereof, The values of S2 are 00 and 01, which respectively represent offset = w - 1 and offset = w + 1. The value of S2 is 10, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 11, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the length of the matching string, that is, the number ml of consecutive matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. Feature 2: The fixed length of the code unit is the number of bits in a byte; The value range of the first syntax element code S1 of the code unit is {0, 1}, so the value range of the length V1 of the first syntax element code is {1}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there are no unmatched sample values; The value of S1 is 0, which means uml=0. The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset of the matching string following the unmatched string or a part thereof, where offset is a positive integer, The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w. When the value of V2 is 2, that is, the value of S2 is 00 or 01, The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively. The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 111, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. The value of S1 is 1, which means that uml>0. In this case, S1 is only the first part of uml, i.e., the prefix. One or more additional syntax elements are needed to represent the value of uml. The value range of the second syntax element code S2 is a 2-bit fixed-length code, and S2 also represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof. The values of S2 are 00, 01, and 10, which respectively represent uml=1, 2, and 3. The value of S2 is 11, which means uml≥4. In this case, S2 is only the second part of uml, i.e., the infix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. Feature 3: The fixed length of the code unit is the number of bits in a byte; The value range of the first syntax element code S1 of the code unit is {0, 100, 101, 110, 111}, so the value range of the length V1 of the first syntax element code is {1, 3}, S1 represents the length of the unmatched string, that is, the number of consecutive unmatched sample values uml or a part thereof or a prefix thereof, where uml is a non-negative integer, and uml=0 represents that the unmatched string is actually an empty string, that is, there is no unmatched sample value; The value of S1 is 0, which means uml=0. The value range of the second syntax element code S2 is {00, 01, 100, 101, 110, 111}, so the value range of the length V2 of the second syntax element code is {2, 3}, S2 represents the offset offset of the matching string following the unmatched string or a part thereof, where offset is a positive integer, The values of S2 are 00 and 01, which respectively represent offset=1 and offset=w. When the value of V2 is 2, that is, the value of S2 is 00 or 01, The value range of the third syntax element code S3 is a 5-bit fixed-length code. S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, i.e., the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer. The values of S2 are 100 and 101, which means offset = w - 1 and offset = w + 1, respectively. The value of S2 is 110, which means that offset satisfies 2 ≤ offset ≤ 2 + 255 = 257. In this case, S2 is only the first part of the offset, i.e., the prefix. An additional code unit and syntax element are required to indicate which value between 2 and 257 the offset is equal to. The value of S2 is 111, which means offset ≥ 258. In this case, S2 is only the first part of offset, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of offset ≥ 258, i.e., the value of offsetMinus258 = offset - 258, where the value range of the parameter mlMinus258 is a non-zero integer. When the value of V2 is 3, that is, the value of S2 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 4-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 0000 to 1101, corresponding to the decimal numbers 0 to 13, which means ml = 4 to 17, respectively. The value of S3 is 1110, which means that ml satisfies 18 ≤ ml ≤ 18+255=273. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 1111, which means ml ≥ 274. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 274, i.e., the value of mlMinus274 = ml -274, where the value range of the parameter mlMinus274 is a non-zero integer. The values of S1 are 100, 101, and 110, respectively, indicating that uml=1, 2, and 3. The value of S1 is 111, which means uml≥4. In this case, S1 is only the first part of uml, i.e., the prefix. At least one additional code unit and syntax element is needed to represent the value of uml≥4, i.e., the value of umlMinus4 = uml - 4, where the value range of the parameter umlMinus4 is a non-zero integer. When the value of V1 is 3, that is, the value of S1 is 100, 101, 110, or 111, The value range of the third syntax element code S3 is a 5-bit fixed-length code, S3 represents the matching length of the matching string following the unmatched string, that is, the number ml of continuous matching sample values or a part thereof, where ml is an integer equal to or greater than 4. The value of S3 is 00000 to 11101, corresponding to the decimal numbers 0 to 29, which means ml = 4 to 33, respectively. The value of S3 is 11110, which means that ml satisfies 34 ≤ ml ≤ 34+255=289. In this case, S3 is only the first part of ml, i.e., the prefix. An additional code unit and syntax element are required to indicate which value ml is equal to between 34 and 289. The value of S3 is 11111, which means ml ≥ 290. In this case, S3 is only the first part of ml, i.e., the prefix. At least two additional code units and syntax elements are needed to represent the value of ml ≥ 290, that is, the value of mlMinus290 = ml- 290, where the value range of the parameter mlMinus290 is a non-zero integer.
Citation Information
Patent Citations
Method and device for image compression, having enhanced matching of fixed-width, variable-length pixel sample strings
CN105745926A
Video coding with network abstraction layer units that include multiple encoded picture partitions
EP2774366A1