Data compression method apparatus for selecting one of a plurality of low frequency transform matrix candidate sets
By using a candidate set selection method that correlates specific encoding parameters, the problem of low encoding efficiency caused by multiple candidate sets is solved, and more efficient data compression is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-23
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, when using multiple candidate sets for data compression, the more candidate sets there are, the more bits are required to represent which candidate set and index value to select, thus affecting encoding efficiency.
Multiple candidate sets that are interconnected by specific coding parameters are used. The candidate set is selected based on the specific coding parameter value corresponding to the current data unit. The optimal data unit is derived or selected as the prediction data unit according to a predetermined scheme to generate a compressed data bitstream.
It improves encoding efficiency, reduces the number of bits consumed in representing candidate set selection, and enhances the data compression effect.
Smart Images

Figure CN116320485B_ABST
Abstract
Description
[0001] This application is a divisional application of the following original application:
[0002] The original application was filed on September 23, 2019.
[0003] Original application number: 2019109018338
[0004] Original invention title: Data compression method and apparatus using multiple candidate sets associated with encoding parameters (Name during registration: Encoding method and apparatus for data compression, decoding method and apparatus) Technical Field
[0005] This invention relates to an encoding and decoding system for lossy or lossless compression of data, particularly a method and apparatus for encoding and decoding image and video data. Background Technology
[0006] As human society enters the era of big data, cloud computing, mobile computing, cloud-mobile computing, ultra-high definition (4K) and ultra-high definition (8K) video image resolution, 4G / 5G communication, and virtual reality, ultra-high compression ratio and extremely high quality data compression for various types of data, including big data, image data, and video data, has become an indispensable technology.
[0007] A dataset is a finite collection of data (e.g., a one-dimensional data queue, a two-dimensional data file, a single image frame, a video sequence, a transform domain, a transform block, multiple transform blocks, a three-dimensional scene, or a sequence of continuously changing three-dimensional scenes) arranged in a certain spatial (one-dimensional, two-dimensional, or multi-dimensional) shape, consisting of sample values (e.g., bytes, bits, pixels, pixel components, spatial sampling points, transform domain coefficients). When encoding (and corresponding decoding) a dataset, especially a two-dimensional or higher-dimensional dataset, for data compression, the dataset is typically divided into several subsets with predetermined shapes, called encoding blocks (or decoding blocks from a decoding perspective, collectively referred to as encoding / decoding blocks). Encoding or decoding is performed block by block in a predetermined time sequence. At any given moment, the encoding block being encoded is called the current encoding block. At any given moment, the decoding block being decoded is called the current decoding block. The current encoding block or current decoding block is collectively referred to as the current encoding / decoding block or simply the current block. The sample value being encoded or decoded is called the current encoded sample value or the current decoded sample value, or simply the current sample value.
[0008] For an encoding / decoding block with a certain shape (not necessarily limited to a square or rectangle, but can be any other reasonable shape), in many cases it is necessary to divide it into finer primitives (basic units), and encode or decode one primitive at a time according to a predetermined time sequence. For all samples within a primitive, the same type of encoding or decoding operation is usually performed. At any given moment, the primitive being encoded or decoded is called the current primitive. Encoding a primitive results in one or more encoding parameters, ultimately producing a compressed data bitstream containing these encoding parameters. Decoding a primitive involves parsing the compressed data bitstream to obtain one or more encoding parameters, and then reconstructing the reconstructed data samples from these one or more encoding parameters.
[0009] Examples of primitives include codec blocks (the entire codec block is considered as a primitive), sub-blocks of various shapes such as squares, rectangles, triangles, or trapezoids, micro-blocks, strings, pixel strings, sample strings, index strings, and lines.
[0010] The data and datasets involved in this invention include raw state data and datasets collected or generated, intermediate state data and datasets after several processing steps, and encoding parameter data and datasets generated during the encoding and decoding process, such as various encoding modes, multi-dimensional or three-dimensional or two-dimensional motion vectors, matching lengths, etc.
[0011] One method of data compression is to explore the correlation between data units at different levels and in different aspects, and use data units commonly referred to as reference data units (also known as prediction data units, compensation data units, matching data units, matched data units, predicted values, compensation values, reference values, etc.) to match (also known as prediction, representation, representation, compensation, approximation, etc.) the current data units, so as to achieve the effect of lossless or lossy data compression.
[0012] A prediction candidate set (also called a prediction value candidate set or reference candidate set, etc.) is composed of one or more data units that have completed at least partial encoding and decoding operations and can be used as prediction data units (also commonly referred to as reference data units, compensation data units, matching data units, matched data units, predicted values, compensation values, reference values, etc.). When a candidate set has multiple data units, using a data unit in the candidate set to predict (also commonly referred to as matching, representing, representing, compensating, approximating, etc.) a current data unit requires an index (also commonly referred to as an address, index, etc.) to specify which data unit in the candidate set the predicted data unit belongs to.
[0013] In existing technologies, multiple candidate sets are often used to increase the number of prediction data units, thereby improving the probability of finding good prediction data units and thus enhancing compression performance. However, on the other hand, the more candidate sets there are, the more bits are required to represent which candidate set and which index value to select as the prediction data unit for the current data unit, thus affecting compression performance and reducing coding efficiency. Summary of the Invention
[0014] To address this problem in data compression, the present invention provides a data compression method and apparatus using multiple candidate sets interconnected by specific coding parameters. These candidate sets are interconnected by a predetermined specific coding parameter, existing during the encoding and decoding process, corresponding to a current data unit. When encoding and decoding the current data unit, one of the multiple candidate sets is selected as the current candidate set for the current data unit based on the value of the specific coding parameter corresponding to the current data unit. This eliminates the need to consume any bits to indicate which candidate set to select, thereby improving coding efficiency.
[0015] The primary technical feature of this invention is that it has multiple candidate sets that are interconnected by specific coding parameters, and each current data unit corresponds to the value of a specific coding parameter. Based on the value of this specific coding parameter, one of the multiple candidate sets is selected as the current candidate set of the current data unit.
[0016] The most fundamental and unique technical feature of the encoding method or apparatus of the present invention is that, when encoding a current data unit, one of a plurality of candidate sets is selected as the current candidate set of the current data unit based on the value of a specific encoding parameter corresponding to the current data unit. Among at least the current candidate set, an optimal data unit is derived or selected as the predicted data unit of the current data unit according to a predetermined scheme, such as the number of bits consumed and / or the magnitude of the encoding error, thereby generating a compressed data bitstream containing at least the information of the predicted data unit representing the current data unit. Figure 1 This is a schematic diagram of the encoding method or apparatus of the present invention.
[0017] The most fundamental and unique technical feature of the decoding method or apparatus of the present invention is to parse the compressed data bitstream, obtain information of at least the predicted data unit representing the current data unit, select one of a plurality of candidate sets as the current candidate set of the current data unit according to the value of a specific encoding parameter corresponding to the current data unit, and decode the predicted data unit of the current data unit from at least the current candidate set according to the information of the predicted data unit of the current data unit. Figure 2 This is a schematic diagram of the decoding method or apparatus of the present invention.
[0018] According to one aspect of the present invention, a data compression encoding method or apparatus is provided, comprising at least the steps or modules that perform the following functions and operations:
[0019] When encoding a current data unit in a coding block, at least based on the value of a specific coding parameter corresponding to the current data unit, one of a plurality of candidate sets is selected as the current candidate set for the current data unit. From at least the current candidate set, at least according to a predetermined scheme, a data unit called a selected data unit is derived or selected as the predicted data unit of the current data unit (the predicted data unit is a selected data unit that is close to or completely identical to the current data unit). A special case of the predicted data unit is an equivalent data unit (the equivalent data unit is a selected data unit that is completely identical to the current data unit). A compressed data bitstream containing at least some or all of the information of the predicted data unit representing the current data unit is generated.
[0020] According to another aspect of the present invention, a data compression decoding method or apparatus is also provided, comprising at least the steps or modules that perform the following functions and operations:
[0021] When decoding a current data unit in a decoding block, the compressed data stream is parsed to obtain at least some or all of the information of the predicted data unit that represents the current data unit. At least based on the value of a specific encoding parameter corresponding to the current data unit, one of a plurality of candidate sets is selected as the current candidate set of the current data unit. From at least the current candidate set, at least according to a predetermined scheme, a data unit called the selected data unit is derived or selected as the predicted data unit of the current data unit (the predicted data unit is the selected data unit that is close to or completely identical to the current data unit). A special case of the predicted data unit is the equivalent data unit (the equivalent data unit is the selected data unit that is completely identical to the current data unit).
[0022] From a first perspective, the present invention provides an encoding method for compressing datasets and their data, characterized by comprising at least the following steps:
[0023] 1) When encoding a current data unit in a coding block, at least one of a plurality of candidate sets is selected as the current candidate set of the current data unit based on the value of a specific coding parameter corresponding to the current data unit;
[0024] 2) From at least the current candidate set, according to at least a predetermined scheme, derive or select a data unit called the selected data unit as the predicted data unit of the current data unit (the predicted data unit is the selected data unit that is close to or exactly the same as the current data unit). A special case of the predicted data unit is the equivalent data unit (the equivalent data unit is the selected data unit that is exactly the same as the current data unit).
[0025] 3) Generate a compressed data stream containing at least some or all of the information of the predicted data units representing the current data unit.
[0026] From a second perspective, the present invention provides a decoding method for compressing datasets and their data, characterized by comprising at least the following steps:
[0027] 1) When decoding a current data unit in a decoding block, parse the compressed data stream to obtain at least some or all of the information of the predicted data unit that represents the current data unit;
[0028] 2) Select one of a plurality of candidate sets as the current candidate set for the current data unit, based at least on the value of a specific encoding parameter corresponding to the current data unit;
[0029] 3) From at least the current candidate set, according to at least a predetermined scheme, derive or select a data unit called the selected data unit as the predicted data unit of the current data unit (the predicted data unit is the selected data unit that is close to or exactly the same as the current data unit). A special case of the predicted data unit is the equivalent data unit (the equivalent data unit is the selected data unit that is exactly the same as the current data unit).
[0030] From a third perspective, the present invention provides an encoding apparatus for compressing datasets and their data, characterized by comprising at least the following modules:
[0031] 1) The current candidate set selection module, when encoding a current data unit in a coding block, selects one of a plurality of candidate sets as the current candidate set of the current data unit based at least on the value of a specific coding parameter corresponding to the current data unit;
[0032] 2) The prediction data unit selection module, from at least the current candidate set, according to at least a predetermined scheme, derives or selects a data unit called the selected data unit as the prediction data unit of the current data unit (the prediction data unit is the selected data unit that is close to or completely identical to the current data unit). A special case of the prediction data unit is the equivalent data unit (the equivalent data unit is the selected data unit that is completely identical to the current data unit).
[0033] 3) Compressed data stream generation module, which generates a compressed data stream containing at least some or all of the information of the predicted data unit representing the current data unit.
[0034] From a fourth perspective, the present invention provides a decoding apparatus for compressing datasets and their data, characterized by comprising at least the following modules:
[0035] 1) The compressed data stream parsing module parses the compressed data stream when decoding a current data unit in a decoding block to obtain at least some or all of the information of the predicted data unit that represents the current data unit;
[0036] 2) The current candidate set selection module selects one of a plurality of candidate sets as the current candidate set of the current data unit, based at least on the value of a specific encoding parameter corresponding to the current data unit;
[0037] 4) The prediction data unit decoding module, from at least the current candidate set, according to at least a predetermined scheme, derives or selects a data unit called the selected data unit as the prediction data unit of the current data unit (the prediction data unit is the selected data unit that is close to or completely identical to the current data unit). A special case of the prediction data unit is the equivalent data unit (the equivalent data unit is the selected data unit that is completely identical to the current data unit).
[0038] This invention is applicable to the encoding and decoding of lossy data compression, and it is also applicable to the encoding and decoding of lossless data compression. This invention is applicable to the encoding and decoding of image data, and it is also applicable to the encoding and decoding of any one-dimensional, two-dimensional, or multi-dimensional data.
[0039] In this invention, the data compression involves one or a combination of the following types of data.
[0040] 1) One-dimensional data;
[0041] 2) Two-dimensional data;
[0042] 3) Multidimensional data;
[0043] 4) Images;
[0044] 5) Image sequences;
[0045] 6) Video;
[0046] 7) Three-dimensional scene;
[0047] 8) A sequence of continuously changing 3D scenes;
[0048] 9) Virtual reality scenarios;
[0049] 10) A sequence of continuously changing virtual reality scenes
[0050] 11) Images in pixel format;
[0051] 12) Transform domain data of the image;
[0052] 13) A collection of bytes with two or more dimensions;
[0053] 14) A set of two or more bits;
[0054] 15) A collection of pixels;
[0055] 16) A set of pixel components.
[0056] In this invention, when the data is generated from images, image sequences, videos, etc., the coding block or decoding block is a coding region or a decoding region of an image, including at least one of the following: a whole image, a sub-image of an image, a slice, a tile, a macroblock, a maximum coding unit (LCU), a coding tree unit (CTU), a coding unit (CU), a sub-region of a CU, a sub-coding unit (SubCU), a prediction unit (PU), a sub-region of a PU, a sub-prediction unit (SubPU), a prediction block, a prediction sub-block, a sub-prediction block, a transform unit (TU), a sub-region of a TU, a sub-transform unit (SubTU), a transform block, a transform sub-block, and a sub-transform block.
[0057] In this invention, the primitive includes one or a combination of the following: codec block, sub-region of codec block, sub-block of various shapes such as square, rectangle, triangle or trapezoid, micro-block, string, pixel string, sample string, index string, and line.
[0058] The technical features of the present invention have been illustrated above through several specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. Attached Figure Description
[0059] Figure 1 This is a schematic diagram of the encoding method or apparatus of the present invention.
[0060] Figure 2 This is a schematic diagram of the decoding method or apparatus of the present invention. Detailed Implementation
[0061] The following are further implementation details or variations of the present invention.
[0062] Implementation or variant example 1
[0063] In the encoding method or apparatus or the decoding method or apparatus
[0064] In the inter-frame coding of video encoding and decoding (including cases where the current image is allowed to be used as a reference image), the data unit is the motion vector of the encoding and decoding block or sub-block, including at least a two-dimensional vector (mv[0], mv[1]) representing the difference between the two (coordinates) of the current block or sub-block in its image, i.e., the current image, and the two (coordinates) of the corresponding reference block or sub-block in its image, i.e., the reference image, i.e., the offset.
[0065] The specific encoding parameter is the reference image index ref_idx of the inter-frame encoded code block or sub-block, which indicates the position or address of the reference image in the reference image queue, i.e., the frame in the reference image queue in which the reference block or sub-block is located.
[0066] The candidate set is a candidate set of the most recent motion vector prediction values in history, which consists of the motion vectors of the most recent codec blocks or sub-blocks that have appeared in the codec order during the codec history and adopt the inter-frame coding mode.
[0067] Historical recent motion vectors that share the same set (i.e., one or more) of reference image index values constitute a candidate set of historical recent motion vector prediction values;
[0068] The multiple candidate sets are respectively associated with multiple groups, each of which has one or more candidate sets of historical recent motion vector prediction values corresponding to the reference image index values.
[0069] Implementation or variant example 2
[0070] In the encoding method or apparatus or the decoding method or apparatus
[0071] In the inter-frame coding of video encoding and decoding (including cases where the current image is allowed to be used as a reference image), the data unit is the motion vector of the encoding and decoding block or sub-block, including at least a two-dimensional vector (mv[0], mv[1]) representing the difference between the two (coordinates) of the current block or sub-block in its image, i.e., the current image, and the two (coordinates) of the corresponding reference block or sub-block in its image, i.e., the reference image, i.e., the offset.
[0072] The motion vector prediction values for the motion vectors of the inter-frame coded code blocks or sub-blocks are derived from at least the mergeCandList candidate list;
[0073] The merge candidate list includes at least the following motion vectors as predicted motion vector values for the current block:
[0074] In-frame adjacency, also known as spatial adjacency, refers to the motion vectors of a codec block or its sub-blocks, which are called in-frame adjacency motion vectors.
[0075] and / or
[0076] The motion vectors of a codec block or its sub-blocks, also known as temporal neighboring, are called the previous frame neighboring motion vectors.
[0077] and / or
[0078] A portion or all of the motion vectors belonging to a candidate set of historical most recent motion vector prediction values corresponding to a selected set (i.e., one or more) of specific reference image index values are called historical most recent motion vectors.
[0079] The merged candidate list has MaxNumMergeCand candidate motion vector prediction values, which are represented by the index i from 0 to MaxNumMergeCand-1 respectively;
[0080] If the motion vector prediction value with sequence number 0 is not the most recent historical motion vector, then the selected set of specific reference image index values includes at least the reference image index of the motion vector prediction value with sequence number 0; otherwise, the selected set of specific reference image index values includes at least 0.
[0081] Implementation or variant example 3
[0082] In the implementation of the encoding method or apparatus or decoding method or apparatus described in variant example 2,
[0083] The process of constructing the candidate list for merging includes at least the following operations:
[0084] First, non-repeating adjacent motion vectors within the same frame are added to the merging candidate list.
[0085] Next, the non-repeating adjacent motion vectors from the previous frame are added to the merging candidate list.
[0086] Then, the most recent historical motion vectors that are not repeated and have the same reference image index value are added to the merge candidate list.
[0087] Implementation or variant example 4
[0088] In the implementation of the encoding method or apparatus or decoding method or apparatus described in variant example 2,
[0089] The process of constructing the candidate list for merging includes at least the following operations:
[0090] Initialize the index i to 0.
[0091] If an adjacent left-hand block or sub-block in the same frame is available and valid, then the motion vector of the left-hand block or sub-block is assigned to the candidate motion vector prediction value with index i, and index i is incremented by one.
[0092] If an adjacent block or sub-block above in the same frame is available and valid, then the motion vector of the block or sub-block above is assigned to the candidate motion vector prediction value with index i, and index i is incremented by one.
[0093] If an adjacent upper-right block or sub-block in the same frame is available and valid, then the motion vector of the upper-right block or sub-block is assigned to the candidate motion vector prediction value with index i, and index i is incremented by one.
[0094] If an adjacent lower-left block or sub-block in the same frame is available and valid, then the motion vector of the lower-left block or sub-block is assigned to the candidate motion vector prediction value with index i, and index i is incremented by one.
[0095] If the block or sub-block of the previous frame adaptive position is available and valid, then the motion vector of the block or sub-block of the previous frame adaptive position is assigned to the candidate motion vector prediction value with index i and index i is incremented by one (only applicable to the AMVPcand list).
[0096] If the adjacent upper-left block or sub-block in the same frame is available and valid, then the motion vector of the upper-left block or sub-block is assigned to the motion vector prediction value with index i, and index i is incremented by one.
[0097] If a block at the same position in the previous frame is available and valid, then the motion vector of that block at the same position in the previous frame is assigned to the predicted value of the candidate motion vector with index i, and index i is incremented by one.
[0098] Motion vectors from the historical set of most recent motion vector prediction values that have a reference image index value equal to at least one of the reference image index values with a predetermined constant (e.g., 0) are repeatedly assigned their motion vector values and / or reference image index values to the candidate motion vector prediction value with the index i in sequence, provided that the motion vector value and / or reference image index value is not equal to the motion vector value and / or reference image index value of the motion vector that has already been added to the merged candidate list during the construction of the merged candidate list, i.e., it does not repeat the motion vector value and / or reference image index value of the motion vector with a smaller index in the merged candidate list. The index i is incremented by one until the index i equals MaxNumMergeCand.
[0099] Implementation or variant example 5
[0100] In the implementation or variation of Example 4, the encoding method or apparatus, or the decoding method or apparatus, is defined as "useful" when the block or sub-block exists, has completed at least part of the encoding / decoding operation, and is in the same stripe as the current block in the case of being adjacent in the same frame, while "effective" is defined as one or a combination of the following:
[0101] 1) It has a motion vector.
[0102] 2) It has a motion vector and its motion vector value and / or reference image index value are not equal to the motion vector value and / or reference image index value of the motion vector that has already been added to the merge candidate list during the construction of the merge candidate list, i.e., it does not repeat the motion vector value and / or reference image index value of the motion vector with a smaller sequence number in the merge candidate list.
[0103] 3) Employ coding modes with at least one motion vector, including: inter-frame prediction mode, inter-frame prediction mode that allows the current image to be used as a reference image, intra-frame block matching mode, intra-frame block prediction mode, string matching mode, string prediction mode, micro-block matching mode, micro-block prediction mode, line matching mode, and line prediction mode.
[0104] 3) Possesses predetermined characteristics.
[0105] 4) Meets the predetermined conditions.
[0106] 5) Has a motion vector of a predetermined type,
[0107] 6) A motion vector whose values fall within a predetermined range.
[0108] 7) A motion vector whose value falls outside a predetermined range.
[0109] Implementation or variant example 6
[0110] In the encoding method or apparatus or the decoding method or apparatus, when a candidate set has more than one element (i.e., a data unit), the index Idx is used to represent the element of the candidate set. Therefore, the selected data unit is represented by a selected index.
[0111] Implementation or variant example 7
[0112] In the encoding method or apparatus or the decoding method or apparatus
[0113] The data unit is the motion vector of the encoding / decoding block or sub-block in video encoding / decoding, including at least a two-dimensional vector (mv[0], mv[1]) representing the difference between the two (coordinates) of the current block or sub-block in its image (i.e., the current image) and the two (coordinates) of the corresponding reference block or sub-block in its image (i.e., the reference image), which is the offset.
[0114] The prediction data unit is the predicted motion vector value of the current motion vector;
[0115] The information of the predicted data unit representing the current data unit is part or all of the information of the predicted value of the motion vector representing the current motion vector;
[0116] The specific encoding parameter is the encoding mode of the encoding / decoding block or sub-block, and its values include at least the following: Intra-block copy pre Intra Block Copy (IBC) prediction model and Inter-frame prediction, also known as inter-prediction mode ;
[0117] The candidate set is the historical recent motion vector prediction candidate set, which consists of the motion vectors of the most recent codec blocks or sub-blocks that appeared in the coding and decoding history in the coding and decoding order and adopted the inter-frame prediction mode and / or IBC prediction mode. The motion vectors of codec blocks or sub-blocks that adopted the IBC prediction mode are also called block vectors, abbreviated as bv.
[0118] The historical most recent motion vectors with IBC prediction patterns constitute the IBC historical most recent motion vector prediction candidate set. HmvpIbcCandList = {HmvpIbcCandList[i], 0 ≤ i ≤ I1-1}, whose elements, i.e., the stored block vectors, are block vectors that have completed at least partial encoding and decoding operations and at least conform to the first type of predetermined rules, and further satisfy the first type of selection conditions, where I1 is HmvpIbcCandList The number of block vectors stored in I1 is less than or equal to a predetermined first maximum value;
[0119] The historical most recent motion vectors with inter-frame prediction modes constitute the inter-frame historical most recent motion vector prediction candidate set. HmvpCandList = {HmvpCandList[i], 0 ≤ i ≤ I2-1}, whose elements, i.e., the stored motion vectors, are motion vectors that have completed at least partial encoding and decoding operations and at least conform to the second type of predetermined rules, and further satisfy the second type of selection conditions, where I2 is HmvpCandList The number of motion vectors stored in I2 is less than or equal to a predetermined second maximum value;
[0120] The multiple candidate sets are HmvpIbcCandList and HmvpCandList .
[0121] Implementation or variant example 8 (example of predefined rules and selection conditions)
[0122] In the implementation or variation of Example 7, the encoding method or apparatus, or the decoding method or apparatus,
[0123] The first type of predetermined rule includes at least the encoding mode of the encoding / decoding block or sub-block that has completed at least part of the encoding / decoding operation. Intra-block copy prediction mode The first type of selection condition includes at least that the reference block or sub-block represented by the motion vector involved is within a predetermined reference range;
[0124] The second type of predetermined rule includes at least the encoding mode of the encoding / decoding block or sub-block that has completed at least part of the encoding / decoding operation. Inter-frame prediction mode The second type of selection condition includes at least that the reference block or sub-block represented by the motion vector involved is within a predetermined reference range.
[0125] Implementation or variant example 9 (example of a predetermined maximum value)
[0126] In the implementation or variation of Example 7, the encoding method or apparatus, or the decoding method or apparatus,
[0127] The first maximum value is an integer between 4 and 12;
[0128] The second maximum value is an integer between 4 and 12.
[0129] Implementation or variant example 10 (example of a candidate list for motion vector prediction)
[0130] In the implementation or variation of Example 7, the encoding method or apparatus, or the decoding method or apparatus,
[0131] When the encoding mode is an IBC prediction mode, at least from the HmvpIbcCandList Following a predetermined method, a predetermined number K1 HmvpIbcCandList[i] are selected and placed into a block vector candidate list for block vector prediction. bvCandList ={bvCandList[j], 0 ≤ j ≤ J1-1}, then from the above bvCandList Select a block vector bvCandList[mvIdx] as the block vector prediction value of the current block vector, where J1 is... bvCandList The number of motion vectors stored in J1 is less than or equal to a predetermined maximum value (usually an integer between 4 and 16), and mvIdx satisfies 0 ≤ mvIdx ≤ J1-1;
[0132] When the coding mode is an inter-frame prediction mode, at least from the HmvpCandList Following a predetermined method, a predetermined number K2 HmvpCandList[i] are selected and placed into a merged candidate list for motion vector prediction. mergeCandList ={mergeCandList[j], 0 ≤ j ≤ J2-1}, then from the above mergeCandListSelect a motion vector mergeCandList[merge_idx] as the predicted motion vector value of the current motion vector, where J2 is... mergeCandList The number of motion vectors stored in J2 is less than or equal to a predetermined maximum value (usually an integer between 4 and 16), and merge_idx satisfies 0 ≤ merge_idx ≤ J2-1.
[0133] Implementation or variant example 11 (example of a candidate list for motion vector prediction)
[0134] In the implementation or variation of Example 10, the encoding method or apparatus or the decoding method or apparatus,
[0135] The mvIdx exists in some or all of the information representing the motion vector prediction value of the current motion vector or is derived from at least some or all of the information representing the motion vector prediction value of the current motion vector.
[0136] The merge_idx exists in some or all of the information representing the motion vector prediction value of the current motion vector, or is derived from at least some or all of the information representing the motion vector prediction value of the current motion vector.
[0137] Implementation or variant example 12 (example of the composition of elements in the candidate set of the most recent historical motion vector prediction)
[0138] In the implementation or variation of Example 7, the encoding method or apparatus, or the decoding method or apparatus,
[0139] The HmvpIbcCandList The elements of the block vector consist of at least the horizontal and vertical components.
[0140] The HmvpCandList The elements of the CU consist of at least one or two horizontal and vertical components of motion vectors, a reference image index indicating which frame in the reference image queue the reference image is, and at most one bidirectional prediction CU hierarchical weight.
[0141] Implementation or variant example 13 (Example of constructing and updating the candidate set of recent historical motion vector predictions)
[0142] In the implementation or variation of Example 7, the encoding method or apparatus, or the decoding method or apparatus,
[0143] The HmvpIbcCandList and / or HmvpCandList It is reset to an empty set at the moment when the encoding and decoding of a frame begins.
[0144] Implementation or variant example 14 (Example of constructing and updating the candidate set of recent historical motion vector predictions)
[0145] In the implementation or variation of Example 7, the encoding method or apparatus, or the decoding method or apparatus,
[0146] The HmvpIbcCandList and / or HmvpCandList It is reset to an empty set at the moment when a stripe encoding / decoding begins.
[0147] Implementation or variant example 15 (Example of constructing and updating the candidate set of recent historical motion vector predictions)
[0148] In the implementation or variation of Example 7, the encoding method or apparatus, or the decoding method or apparatus,
[0149] When a reference image is obtained during encoding and decoding as a new motion vector for the current image, the image is updated according to the first predetermined scheme. HmvpIbcCandList ;
[0150] When a new motion vector is obtained in the reference image that is not the current image during encoding and decoding, the second predetermined scheme is updated. HmvpCandList .
[0151] Implementation or variant example 16 (Example of constructing and updating the candidate set of recent historical motion vector predictions)
[0152] In the implementation or variation of Example 15, the encoding method or apparatus or the decoding method or apparatus,
[0153] The first predetermined scheme includes at least 1) the above HmvpIbcCandList It is a first-in-first-out (FIFO) buffer, 2) delete the above HmvpIbcCandList The motion vector that is identical to the new motion vector and all subsequent motion vectors are shifted forward by one position, 3) when the HmvpIbcCandList When the space inside is full, the first motion vector put in is removed according to the first-in-first-out rule, and the remaining motion vectors are moved forward one position and then moved into the new motion vector.
[0154] The second predetermined scheme includes at least 1) the above HmvpCandList It is a first-in-first-out (FIFO) buffer, 2) delete the above HmvpCandList The motion vector that is identical to the new motion vector and all subsequent motion vectors are shifted forward by one position, 3) when the HmvpCandList When the space inside is full, the first motion vector placed in is removed according to the first-in-first-out rule, and the remaining motion vectors are moved forward one position and moved into the new motion vector.
[0155] Implementation or variant example 17
[0156] In the encoding method or apparatus or the decoding method or apparatus, the plurality of candidate sets are multiple distinct proper subsets of a total candidate set whose number of elements is greater than 1.
[0157] Implementation or variant example 18
[0158] In the encoding method or apparatus or the decoding method or apparatus
[0159] In video encoding and decoding, during encoding, after performing the main transform on the prediction residuals of the coded block or sub-block to obtain the main transform coefficients, optional low-frequency sub-transforms are often performed on the low-frequency components of the main transform coefficients to obtain the final transform coefficients. To improve encoding efficiency, the low-frequency sub-transform is usually performed by selecting the most suitable positive sub-transform matrix from a number of predetermined sub-transform positive matrices, or no low-frequency sub-transform is performed (in which case, the transform coefficients are equal to the main transform coefficients). For non-low-frequency coefficients, no sub-transform is performed, meaning the transform coefficients are equal to the main transform coefficients. Correspondingly, during decoding, optional inverse low-frequency sub-transforms are performed on the low-frequency components of the reconstructed (also called rebuilt) transform coefficients of the decoded block or sub-block to obtain the reconstructed main transform coefficients. Correspondingly, the inverse low-frequency sub-transform is usually performed by selecting a corresponding inverse sub-transform matrix from a number of predetermined inverse sub-transform matrices, or no inverse low-frequency sub-transform is performed (in which case, the reconstructed main transform coefficients are equal to the reconstructed transform coefficients). For non-low-frequency coefficients, no sub-transform is performed, meaning the reconstructed main transform coefficients are equal to the reconstructed transform coefficients.
[0160] When performing a transformation (forward or inverse transformation) on an M×N block or sub-block, where M = m×L and N = n×L are both integer multiples of L (L is usually 4), the M×N transformation coefficients of the block or sub-block are generally divided into m×n coefficient groups. Each coefficient group consists of L×L transformation coefficients of an L×L minimum block. The coefficient group consisting of the top-leftmost L×L transformation coefficients represents the lowest frequency part of the transformation coefficients, and its group number is set to 0.
[0161] The data unit is a transformation matrix (including the positive transformation matrix and the inverse transformation matrix) used in video encoding and decoding to perform optional low-frequency transformation and inverse low-frequency transformation on encoding and decoding blocks or sub-blocks.
[0162] The specific coding parameters include at least the intra-prediction mode used by the codec block or sub-block during the prediction phase, and their values include at least integers from -14 to 83;
[0163] The plurality of candidate sets are K (K is usually less than 16) candidate sets: candidate set k, 0 ≤ k ≤ K-1;
[0164] The prediction data unit is an equivalent data unit, that is, the current transformation matrix is exactly the same as the selected transformation matrix selected from the candidate set;
[0165] The information representing the predicted data unit of the current data unit, in part or all, includes what is denoted as the low-frequency transformation index. LowFreqSecTransIdx Parameters; LowFreqSecTransIdx A value of 0 indicates that low-frequency transformations are not performed; LowFreqSecTransIdx A non-zero value indicates a low-frequency transformation and LowFreqSecTransIdx The value indicates which matrix in the current candidate set the selected transformation matrix is;
[0166] When a codec block or sub-block that is a transform block or transform sub-block has a non-zero top-left corner coefficient group, that is, when it is not only the top-left corner coefficient group that has non-zero transform coefficients, LowFreqSecTransIdx It does not exist in the compressed data stream;
[0167] when LowFreqSecTransIdx When it does not exist in the compressed data bitstream, LowFreqSecTransIdx It is assumed to take the default value of 0, meaning that low-frequency transformations are not performed.
[0168] Implementation or variant example 19
[0169] In the implementation or variation of Example 18, when the main transform does not use DCT-2 (also known as DCT-II) but uses other types of transform, LowFreqSecTransIdx It does not exist in the compressed data stream.
[0170] Implementation or variant example 20
[0171] In the implementation or variation of Example 18, when the primary transform uses an implicit multiple transform selection, LowFreqSecTransIdx It does not exist in the compressed data stream.
[0172] Implementation or variant example 21
[0173] In the implementation or variation of Example 18, the encoding method or apparatus or the decoding method or apparatus,
[0174] The range of values for the intra-prediction mode is divided into K non-overlapping sub-ranges: sub-range k, 0 ≤ k ≤ K-1;
[0175] When the value of the intra-frame prediction mode belongs to the sub-value range k, candidate set k is selected as the current candidate set.
[0176] Implementation or variant example 22
[0177] In the implementation or variation of Example 18, the encoding method or apparatus or the decoding method or apparatus,
[0178] The value of K is 4;
[0179] The range of values for the intra-prediction mode is divided into four non-overlapping sub-ranges:
[0180] The value range 0 consists of the following integers: 0, 1, 81, 82, 83.
[0181] The value range 1 consists of the following integers: less than 0, greater than or equal to 2 and less than or equal to 12, greater than or equal to 56 and less than or equal to 80.
[0182] The value range 2 consists of the following integers: greater than or equal to 13 and less than or equal to 23, greater than or equal to 45 and less than or equal to 55.
[0183] The value range 3 consists of the following integers: greater than or equal to 24 and less than or equal to 44;
[0184] When the value of the intra-frame prediction mode belongs to the sub-value range k, candidate set k is selected as the current candidate set.
[0185] Implementation or variant example 23
[0186] In the implementation or variation of Example 18, the encoding method or apparatus or the decoding method or apparatus,
[0187] The value of K is 3;
[0188] The range of values for the intra-prediction mode is divided into three non-overlapping sub-ranges:
[0189] The value range 0 consists of the following integers: 0, 1, 81, 82, 83.
[0190] The value range 1 consists of the following integers: less than 0, greater than or equal to 2 and less than or equal to 18, greater than or equal to 50 and less than or equal to 80.
[0191] The value range 2 consists of the following integers: greater than or equal to 19 and less than or equal to 49;
[0192] When the value of the intra-frame prediction mode belongs to the sub-value range k, candidate set k is selected as the current candidate set.
[0193] Implementation or variant example 24
[0194] In the implementation or variation of Example 18, the encoding method or apparatus or the decoding method or apparatus,
[0195] The K=2;
[0196] The range of values for the intra-prediction mode is divided into two non-overlapping sub-ranges:
[0197] The value range 0 consists of the following integers: even numbers greater than or equal to -14 and less than or equal to 34, and odd numbers greater than or equal to 35 and less than or equal to 83.
[0198] The range of values for sub-value 1 consists of the following integers: odd numbers greater than or equal to -14 and less than or equal to 34, and even numbers greater than or equal to 35 and less than or equal to 83;
[0199] When the value of the intra-frame prediction mode belongs to the sub-value range k, candidate set k is selected as the current candidate set.
[0200] Implementation or variant example 25
[0201] In the implementation or variation of the encoding method or apparatus described in examples 19, 20, 21, 22, 23, or 24, or in the decoding method or apparatus,
[0202] Each candidate set k consists of two disjoint subsets, subset k1 and subset k2;
[0203] The specific encoding parameters also include at least the size of the encoding / decoding block or sub-block;
[0204] The range of values for the size and shape of the encoder / decoder block or sub-block that serves as the transform block is divided into two non-overlapping sub-ranges: sub-range 1 and sub-range 2.
[0205] When the size of the codec block or sub-block falls within the sub-value range 1, subset k1 is selected as the current candidate set, and the selected transformation matrix is selected from subset k1; otherwise, subset k2 is selected as the current candidate set, and the selected transformation matrix is selected from subset k2.
[0206] Implementation or variant example 26
[0207] In the encoding method or apparatus or the decoding method or apparatus
[0208] The data unit is a motion vector of a codec block or sub-block that uses inter-frame prediction mode in video encoding and decoding and whose reference image is not the current image. It includes at least one two-dimensional vector (mv[0], mv[1]) representing the difference between the two (coordinates) of the current block or sub-block in its image (i.e., the current image) and the two (coordinates) of the corresponding reference block or sub-block in its image (i.e., the reference image), which is the offset.
[0209] The prediction data unit is the predicted motion vector value of the current motion vector;
[0210] The information of the predicted data unit representing the current data unit is part or all of the information of the predicted value of the motion vector representing the current motion vector;
[0211] The specific encoding parameters include at least the inter-frame affine flag, the merge triangle partition flag, and the merge sub-block partition flag for the encoding / decoding block or sub-block;
[0212] The plurality of candidate sets includes at least three candidate sets: a general merge candidate list, a sub-block merge candidate list, and a triangular merge candidate set;
[0213] If the three flags—the inter-frame affine flag, the merge triangle partitioning flag, and the merge sub-block partitioning flag—are all 0, the general merge candidate list can be selected as the current candidate set; otherwise, if the merge triangle partitioning flag is 1 and both the inter-frame affine flag and the merge sub-block partitioning flag are 0, the triangle merge candidate set can be selected as the current candidate set; otherwise, the sub-block merge candidate list can be selected as the current candidate set.
[0214] Implementation or variant example 27
[0215] In the implementation or variation of Example 26, the encoding method or apparatus or the decoding method or apparatus,
[0216] The maximum number of elements in the candidate list for merging in a single image frame is determined by the image parameter set or image header present in the compressed data bitstream. Maximum number of elements in a typical merge candidate list Syntax element specifications;
[0217] When the Maximum number of elements in a typical merge candidate list When the value of the syntax element is 0, each strip header of the image has a syntax element in the compressed data bitstream that specifies the maximum number of elements in the general merge candidate list in that strip;
[0218] The maximum number of elements in the candidate list for merging sub-blocks in a single frame of an image is determined by the image parameter set or image header present in the compressed data bitstream. Maximum number of elements in the candidate list for merging sub-blocks Syntax element specifications;
[0219] When the Maximum number of elements in the candidate list for merging sub-blocks When the value of the syntax element is 0 and at least inter-frame affine is allowed in the sequence, each strip header of the image has a syntax element in the compressed data bitstream that specifies the maximum number of elements in the candidate list of sub-block merging in that strip.
[0220] The maximum number of elements in the candidate set of triangular merging in a frame of an image is determined by the image parameter set or image header present in the compressed data bitstream. Maximum number of elements in the candidate set of the triangular merge Syntax element specifications;
[0221] When the Maximum number of elements in the candidate set of the triangular mergeWhen the value of the syntax element is 0 and triangular prediction is allowed in the sequence, and the maximum number of elements in the general merge candidate list is greater than or equal to 2, each strip header of the image has a syntax element in the compressed data bitstream that specifies the maximum number of elements in the triangular merge candidate set in that strip.
[0222] Implementation or variant example 28
[0223] In the implementation or variation of Example 26, the encoding method or apparatus or the decoding method or apparatus,
[0224] The maximum number of elements in the general candidate list for merging in a single frame of an image is specified by the following syntax elements present in the image parameter set or image header of the compressed data bitstream:
[0225] pps_six_minus_max_num_merge_cand_plus1
[0226] When the value of pps_six_minus_max_num_merge_cand_plus1 is 0, each strip header of the image contains the following syntax elements in the compressed data bitstream, specifying the maximum number of elements in the general merge candidate list for that strip:
[0227] six_minus_max_num_merge_cand
[0228] The maximum number of elements in the candidate list for merging sub-blocks in a frame of an image is specified by the following syntax elements present in the image parameter set or image header of the compressed data bitstream:
[0229] pps_five_minus_max_num_subblock_merge_cand_plus1
[0230] When the value of pps_five_minus_max_num_subblock_merge_cand_plus1 is 0 and inter-frame affine mapping is allowed in the sequence, each strip header of the image contains the following syntax elements in the compressed data bitstream, specifying the maximum number of elements in the sub-block merge candidate list for that strip:
[0231] five_minus_max_num_subblock_merge_cand
[0232] The maximum number of elements in the candidate set of triangular merging in a frame of an image is specified by the following syntax elements present in the image parameter set or image header of the compressed data bitstream:
[0233] pps_max_num_merge_cand_minus_max_num_triangle_cand_minus1
[0234] When the value of pps_max_num_merge_cand_minus_max_num_triangle_cand_minus1 is 0, triangular prediction is allowed in the sequence, and the maximum number of elements in the general merge candidate list is greater than or equal to 2, each strip header of the image contains the following syntax elements in the compressed data bitstream that specify the maximum number of elements in the triangular merge candidate set of that strip:
[0235] max_num_merge_cand_minus_max_num_triangle_cand.
[0236] Implementation or variant example 29
[0237] In the implementation or variation of Example 26, the encoding method or apparatus or the decoding method or apparatus,
[0238] The candidate set for triangle merging is denoted as TriangleMergeCand={TriangleMergeCand[i], 0 ≤ i ≤ I-1}, where each element TriangleMergeCand[i] includes at least the unidirectional motion vector TriangleMergeMv0[i].
[0239] The general candidate list for merging is denoted as mergeCandList = {mergeCandList[j], 0 ≤ j ≤ J-1}, where each element mergeCandList[j] includes at least the bidirectional motion vector mergeMv0[j] and / or mergeMv1[j].
[0240] The predefined mapping J(i) is used to compute j = J(i) from i; a special case of the predefined mapping is j = i; another special case of the predefined mapping is j = i + 1; the predefined mapping can also be defined using a predefined mapping table;
[0241] TriangleMergeMv0[i] is derived from mergeMv0[j] and / or mergeMv1[j], where j=J(i), according to a predetermined rule.
[0242] Implementation or variant example 30
[0243] In the implementation or variation of Example 29, the encoding method or apparatus or the decoding method or apparatus,
[0244] The predefined rules for deriving TriangleMergeMv0[i] from mergeMv0[j] and / or mergeMv1[j] include at least determining how to derive TriangleMergeMv0[i] based on the parity of j and the existence of mergeMv0[j] and / or mergeMv1[j].
[0245] Implementation or variant example 31
[0246] In the implementation or variation of Example 29, the encoding method or apparatus or the decoding method or apparatus,
[0247] The predefined rules for deriving TriangleMergeMv0[i] from mergeMv0[j] and / or mergeMv1[j] include at least the following operations:
[0248] If j is even, when mergeMv0[j] exists, TriangleMergeMv0[i] is derived from or equal to mergeMv0[j]; otherwise, TriangleMergeMv0[i] is derived from or equal to mergeMv1[j].
[0249] If j is odd, when mergeMv1[j] exists, TriangleMergeMv0[i] is derived from or equal to mergeMv1[j], otherwise, TriangleMergeMv0[i] is derived from or equal to mergeMv0[j].
[0250] Implementation or variant example 32
[0251] In the implementation or variation of the encoding method or apparatus described in Example 29, 30, or 31, or in the decoding method or apparatus,
[0252] The encoding / decoding block or sub-block is divided into two triangles. Therefore, two selected unidirectional motion vectors are derived or selected from the triangle merging candidate set TriangleMergeCand, and are respectively denoted as the first unidirectional motion vector TriangleMergeMv0[i1] and the second unidirectional motion vector TriangleMergeMv0[i2].
[0253] The first unidirectional motion vector TriangleMergeMv0[i1] is derived from mergeMv0[j] and / or mergeMv1[j], where j=J1(i1);
[0254] The second unidirectional motion vector TriangleMergeMv0[i2] is also derived from mergeMv0[j] and / or mergeMv1[j], where j=J2(i2).
[0255] Implementation or variant example 33
[0256] In the implementation or variation of the encoding method or apparatus described in Example 32, or in the decoding method or apparatus,
[0257] Maps J1 and J2 are defined as follows:
[0258] If i2 < i1, then J1(i1) = i1, J2(i2) = i2; otherwise, J1(i1) = i1, J2(i2) = i2 + 1.
Claims
1. A data compression decoding device, characterized in that... It should include at least the following modules that perform the following functions or operations: 1) When decoding a decoding block or sub-block in video decoding, the compressed data bitstream is parsed to obtain at least some or all information of the inverse sub-transform matrix used when performing optional inverse low-frequency transformation of the decoding block or sub-block, so as to at least perform optional inverse low-frequency transformation on the low-frequency part of the reconstructed transform coefficients of the decoding block or sub-block to obtain the reconstructed main transform coefficients. 2) Select one of four candidate sets k, 0 ≤ k ≤ 3, as the current candidate set of the current subtransform inverse matrix of the inverse low-frequency transform, based at least on the intra-prediction mode used by the decoded block or sub-block in the prediction stage. The inverse low-frequency transformation selects a corresponding inverse subtransform matrix from a plurality of predetermined inverse subtransform matrices to perform the inverse low-frequency transformation, or selects not to perform the inverse low-frequency transformation, that is, the reconstructed principal transformation coefficients are equal to the reconstructed transformation coefficients; for non-low-frequency coefficients, no subtransformation is performed, that is, the reconstructed principal transformation coefficients are equal to the reconstructed transformation coefficients. When transforming a decoding block or sub-block of size and shape M×N, where M=m×L and N=n×L are both integer multiples of L, the M×N transform coefficients of the decoding block or sub-block are divided into m×n coefficient groups. Each coefficient group consists of L×L transform coefficients of an L×L minimum block. The coefficient group consisting of the top-leftmost L×L transform coefficients is the lowest frequency part of the transform coefficients, and the group number of the top-leftmost coefficient group is set to 0. The range of values for the intra-frame prediction mode is divided into four non-overlapping sub-ranges: sub-range k, 0 ≤ k ≤ 3; When the value of the intra-frame prediction mode belongs to the sub-value range k, candidate set k is selected as the current candidate set; 3) From at least the current candidate set, according to at least a predetermined scheme, derive or select a subtransformation inverse matrix as the current subtransformation inverse matrix; The predetermined plan includes at least: At least one parameter, denoted as LowFreqSecTransIdx, is used: LowFreqSecTransIdx being 0 indicates that no inverse low-frequency transformation is performed; LowFreqSecTransIdx being non-zero indicates that an inverse low-frequency transformation is performed and the value of LowFreqSecTransIdx indicates which matrix in the current candidate set the inverse matrix of the current transformation is. When LowFreqSecTransIdx does not exist in the compressed data bitstream, no inverse low-frequency transformation is performed; It also includes the following features: Each candidate set k consists of two disjoint subsets, subset k1 and subset k2; The range of values for the size and shape of the decoder block or sub-block that serves as the transform block is divided into two non-overlapping sub-ranges: sub-range I and sub-range II. When the size of the decoded block or sub-block is within the range I of the sub-values, the inverse of the next transformation is selected from the subset k1 of the current candidate set; otherwise, the inverse of the next transformation is selected from the subset k2 of the current candidate set. LowFreqSecTransIdx does not exist in the compressed data stream when a decoder block or subblock that is a transform block or transform subblock has a non-zero top-left coefficient group, i.e., it is not only the top-left coefficient group that has non-zero transform coefficients.
2. A decoding method for data compression, characterized in that... It should include at least the steps to complete the following functions or operations: 1) When decoding a decoding block or sub-block in video decoding, the compressed data bitstream is parsed to obtain at least some or all information of the inverse sub-transform matrix used when performing optional inverse low-frequency transformation of the decoding block or sub-block, so as to at least perform optional inverse low-frequency transformation on the low-frequency part of the reconstructed transform coefficients of the decoding block or sub-block to obtain the reconstructed main transform coefficients. 2) Select one of four candidate sets k, 0 ≤ k ≤ 3, as the current candidate set of the current subtransform inverse matrix of the inverse low-frequency transform, based at least on the intra-prediction mode used by the decoded block or sub-block in the prediction stage. The inverse low-frequency transformation selects a corresponding inverse subtransform matrix from a plurality of predetermined inverse subtransform matrices to perform the inverse low-frequency transformation, or selects not to perform the inverse low-frequency transformation, that is, the reconstructed principal transformation coefficients are equal to the reconstructed transformation coefficients; for non-low-frequency coefficients, no subtransformation is performed, that is, the reconstructed principal transformation coefficients are equal to the reconstructed transformation coefficients. When transforming a decoding block or sub-block of size and shape M×N, where M=m×L and N=n×L are both integer multiples of L, the M×N transform coefficients of the decoding block or sub-block are divided into m×n coefficient groups. Each coefficient group consists of L×L transform coefficients of an L×L minimum block. The coefficient group consisting of the top-leftmost L×L transform coefficients is the lowest frequency part of the transform coefficients, and the group number of the top-leftmost coefficient group is set to 0. The range of values for the intra-frame prediction mode is divided into four non-overlapping sub-ranges: sub-range k, 0 ≤ k ≤ 3; When the value of the intra-frame prediction mode belongs to the sub-value range k, candidate set k is selected as the current candidate set; 3) From at least the current candidate set, according to at least a predetermined scheme, derive or select a subtransformation inverse matrix as the current subtransformation inverse matrix; The predetermined plan includes at least: At least one parameter, denoted as LowFreqSecTransIdx, is used: LowFreqSecTransIdx being 0 indicates that no inverse low-frequency transformation is performed; LowFreqSecTransIdx being non-zero indicates that an inverse low-frequency transformation is performed and the value of LowFreqSecTransIdx indicates which matrix in the current candidate set the inverse matrix of the current transformation is. When LowFreqSecTransIdx does not exist in the compressed data bitstream, no inverse low-frequency transformation is performed; It also includes the following features: Each candidate set k consists of two disjoint subsets, subset k1 and subset k2; The range of values for the size and shape of the decoder block or sub-block that serves as the transform block is divided into two non-overlapping sub-ranges: sub-range I and sub-range II. When the size of the decoded block or sub-block is within the range I of the sub-values, the inverse of the next transformation is selected from the subset k1 of the current candidate set; otherwise, the inverse of the next transformation is selected from the subset k2 of the current candidate set. LowFreqSecTransIdx does not exist in the compressed data stream when a decoder block or subblock that is a transform block or transform subblock has a non-zero top-left coefficient group, i.e., it is not only the top-left coefficient group that has non-zero transform coefficients.