Image compression method and device using the nearest motion vector and the neighboring motion vector

By using predetermined rules in the data compression technology to select multiple encoding and decoding methods, the encoding parameters of the current primitives are coded, and the bit consumption problem caused by the large number of encoding parameters in the prior art is solved, and a higher encoding efficiency is achieved.

CN114501020BActive Publication Date: 2025-04-08SHANGHAI TIANHE ELECTRONIC INFORMATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111381577.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2016-08-21
Filing Date
2017-08-21
Publication Date
2025-04-08
Estimated Expiration
2037-08-21

AI Technical Summary

Technical Problem

In the existing data compression technology, especially in the matching method, there are many encoding parameters and consume a lot of bits to encode them, which affects the encoding efficiency.

Method used

A variety of encoding and decoding methods including proximity and proximity are selected according to predetermined rules to encode and decode the encoding parameters of the current primitives, making full use of the correlation between proximity and recent parameters and the current parameters, and reducing the number of bits required for data compression.

Benefits of technology

By choosing the optimal encoding and decoding method, the encoding efficiency is significantly improved, the number of bits required for data compression is reduced, and the overall performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114501020B_ABST
    Figure CN114501020B_ABST
Patent Text Reader

Abstract

The present invention provides an image compression method and device that uses at least one or more motion vectors (including but not limited to adjacent) in space (referred to as adjacent motion vectors or adjacent motion vectors) and / or one or more motion vectors (referred to as the nearest motion vector) that are closest in encoding and decoding time sequence to encode and decode the current motion vector according to a predetermined rule. The method and device make full use of the correlation between the adjacent motion vector and / or the nearest motion vector and the current motion vector, and select the optimal method according to the predetermined rule to achieve the overall least bit consumption to encode and decode the current motion vector, thereby fundamentally reducing the image compression, especially the number of bits required for the matching method, and greatly improving the encoding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the following original application:

[0002] Filing date of original application: 2017-08-21

[0003] Application number of the original application: 2017107158861

[0004] The name of the invention of the original application: Data compression method and device using adjacent coding parameters and recent coding parameters. Technical Field

[0005] 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

[0006] As human society enters the era of big data, cloud computing, mobile computing, cloud-mobile computing, ultra-high definition (4K) and ultra-ultra-high definition (8K) video image resolution, 4G / 5G communications, and virtual reality, ultra-high compression ratio and extremely high quality data compression for various data, including big data, image data, and video data has become an indispensable technology.

[0007] A data set is a set of finite data (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) composed of data sample values ​​(e.g., bytes, bits, pixels, pixel components, spatial sampling points, transform domain coefficients) arranged in a certain spatial (one-dimensional, two-dimensional, or multi-dimensional) shape. 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, taking the 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.

[0008] 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.

[0009] Examples of primitives include codec blocks (the entire block is considered a primitive), sub-blocks, micro-blocks, strings, pixel strings, sample string, index string, and lines.

[0010] 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. Simply put, 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.

[0011] 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: matching type, matching length, unmatched (predicted) sample value, etc.

[0012] Examples of matching primitives include codec block, sub-block, micro-block, string, pixel string, sample string, index string, and line.

[0013] Examples of matching methods (sometimes also called matching types or matching modes) include: block matching, sub-block matching, micro-block matching, string matching, pixel string matching, sample string matching, index string matching, and line matching.

[0014] The primitives in a matching method may be divided into several sub-types (sometimes called sub-modes) of primitives according to certain characteristics. For example, the primitives in the string matching method may be divided into the following sub-types of primitives (i.e. strings) according to the properties of their reference pixels:

[0015] Primary Reference Buffer string (PRB string for short),

[0016] Secondary Reference Buffer string (SRB string for short),

[0017] Offset string,

[0018] Coordinate string,

[0019] Unmatched pixels (also called unpredictable pixels),

[0020] Unmatched pixel strings (also called unpredictable pixel strings);

[0021] It is also possible to divide primitives (i.e. strings) into the following subtypes, depending on the nature of the string length:

[0022] General strings (i.e. strings of arbitrary length),

[0023] A string with a limited length (i.e., a string whose length can only take a certain predetermined value, such as a length equal to the number of pixels in a codec block or equal to half the number of pixels in a codec block).

[0024] In data compression, especially in matching mode, especially in the case of finer matching primitives, there are problems such as more encoding parameters and more bits consumed to encode them, which affects the encoding efficiency. Summary of the invention

[0025] In order to solve this problem in data compression, especially in matching mode, the present invention provides a data compression method and device for encoding and decoding the encoding parameters of the current primitive (called current parameter) according to a predetermined rule, using at least the encoding parameters of one or more primitives that are adjacent (including adjacent) in space (called adjacent parameters, sometimes also called adjacent parameters in the case of adjacent) and / or the encoding parameters of one or more primitives that are closest in the encoding and decoding time sequence (called the nearest parameters). The method and device make full use of the correlation between the adjacent parameters and / or the nearest parameters and the current parameters, and select the optimal method according to the predetermined rules to achieve the overall consumption of the least number of bits for encoding and decoding the current parameters, thereby fundamentally reducing the number of bits required for data compression, especially the matching mode, and greatly improving the encoding efficiency.

[0026] The primary technical feature of the present invention is to select one of a plurality of encoding and decoding modes including a neighboring mode and a nearest mode to encode and decode the encoding parameters according to a predetermined rule.

[0027] The most basic unique technical feature of the encoding method or device of the present invention is to select one of multiple encoding methods including adjacent methods and nearest methods to encode the encoding parameters according to predetermined rules, such as the number of bits consumed, and generate a compressed data code stream containing at least information representing the encoding and decoding method of the current encoding parameters (that is, whether the adjacent method, the nearest method or other methods are used). Figure 1 It is a schematic diagram of the encoding method or device of the present invention.

[0028] The most basic unique technical feature of the decoding method or device of the present invention is to parse the compressed data code stream, obtain information at least indicating the encoding and decoding method of the current encoding parameters (i.e., whether to use the adjacent method, the nearest method or other methods), and use the corresponding adjacent method, the nearest method or other methods to decode the current encoding parameters. Figure 2 It is a schematic diagram of the decoding method or device of the present invention.

[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] When encoding a current encoding parameter of a current primitive in a coding block, one of a plurality of encoding modes including a neighboring mode and / or a nearest mode is selected according to a predetermined rule to perform a coding parameter encoding operation on the current coding parameter, and a compressed data code stream containing at least information representing a coding and decoding mode of the current coding parameter is generated.

[0031] From a first perspective, the present invention provides a data compression encoding method, characterized in that it comprises at least the following steps:

[0032] 1) when encoding a current encoding parameter of a current primitive in a coding block, selecting one of a plurality of encoding modes including a neighboring mode and / or a nearest mode to perform a coding parameter encoding operation on the current encoding parameter according to a predetermined rule;

[0033] 2) Generate a compressed data code stream containing at least information indicating a coding and decoding method of the current coding parameter.

[0034] From a second perspective, the present invention provides a data compression encoding device, characterized in that it includes at least the following modules:

[0035] 1) A coding mode selection module, when encoding a current coding parameter of a current primitive in a coding block, selects one of a plurality of coding modes including a neighboring mode and / or a nearest mode according to a predetermined rule to perform a coding parameter coding operation on the current coding parameter;

[0036] 2) A compressed data code stream generation module generates a compressed data code stream containing at least information indicating a coding and decoding method of the current coding parameter.

[0037] 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:

[0038] When decoding a current encoding parameter of a current primitive in a decoding block, the compressed data code stream is parsed to obtain information at least representing the encoding and decoding mode of the current encoding parameter, and one of multiple decoding modes including a neighboring mode and / or a nearest mode is selected to perform an encoding parameter decoding operation on the current encoding parameter.

[0039] From a third perspective, the present invention provides a data compression decoding method, characterized in that it comprises at least the following steps:

[0040] 1) when decoding a current encoding parameter of a current primitive in a decoding block, parsing a compressed data bitstream to obtain information at least indicating a coding and decoding method of the current encoding parameter;

[0041] 2) Selecting one of a plurality of decoding modes including a neighboring mode and / or a nearest mode to perform a coding parameter decoding operation on the current coding parameter.

[0042] From a fourth perspective, the present invention provides a data compression decoding device, characterized in that it includes at least the following modules:

[0043] 1) A compressed data code stream parsing module, when decoding a current encoding parameter of a current primitive in a decoding block, parses the compressed data code stream to obtain information indicating at least the encoding and decoding mode of the current encoding parameter;

[0044] 2) A decoding module selects one of a plurality of decoding modes including a neighboring mode and / or a nearest mode to perform a coding parameter decoding operation on the current coding parameter.

[0045] The present invention is applicable to the encoding and decoding of lossy data compression, and is also applicable to the encoding and decoding of lossless data compression. The present invention is applicable to the encoding and decoding of image data, and is also applicable to the encoding and decoding of any one-dimensional, two-dimensional or multi-dimensional data.

[0046] In the present invention, the data involved in data compression includes one or a combination of the following types of data:

[0047] 1) One-dimensional data;

[0048] 2) Two-dimensional data;

[0049] 3) Multidimensional data;

[0050] 4) Image;

[0051] 5) Sequence of images;

[0052] 6) Video;

[0053] 7) Three-dimensional scene;

[0054] 8) Sequences of continuously changing three-dimensional scenes;

[0055] 9) Virtual reality scenes;

[0056] 10) Sequence of continuously changing virtual reality scenes

[0057] 11) Images in pixel form;

[0058] 12) Transform domain data of the image;

[0059] 13) A collection of bytes of two or more dimensions;

[0060] 14) A set of bits of two or more dimensions;

[0061] 15) A collection of pixels;

[0062] 16) A collection of pixel components.

[0063] 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 prediction unit PU, and a transform unit TU.

[0064] In the present invention, the primitives include one of the following situations or a combination thereof: codec block, sub-block, micro-block, string, pixel string, sample value string, index string, and line.

[0065] 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

[0066] Figure 1 It is a schematic diagram of the encoding method or device of the present invention.

[0067] Figure 2 It is a schematic diagram of the decoding method or device of the present invention. DETAILED DESCRIPTION

[0068] In order to make the technical means implemented by the present invention easier to understand, the present invention is further described below in conjunction with specific embodiments.

[0069] A data compression encoding method, characterized in that it comprises at least the following steps:

[0070] 1) when encoding a current encoding parameter of a current primitive in a coding block, selecting one of a plurality of encoding modes including a neighboring mode and / or a nearest mode to perform a coding parameter encoding operation on the current encoding parameter according to a predetermined rule;

[0071] 2) Generate a compressed data code stream containing at least information indicating a coding and decoding method of the current coding parameter.

[0072] A data compression encoding device, characterized in that it comprises at least the following modules:

[0073] 1) A coding mode selection module, when encoding a current coding parameter of a current primitive in a coding block, selects one of a plurality of coding modes including a neighboring mode and / or a nearest mode according to a predetermined rule to perform a coding parameter coding operation on the current coding parameter;

[0074] 2) A compressed data code stream generation module generates a compressed data code stream containing at least information indicating a coding and decoding method of the current coding parameter.

[0075] A data compression decoding method, characterized in that it comprises at least the following steps:

[0076] 1) when decoding a current encoding parameter of a current primitive in a decoding block, parsing a compressed data bitstream to obtain information at least indicating a coding and decoding method of the current encoding parameter;

[0077] 2) Selecting one of a plurality of decoding modes including a neighboring mode and / or a nearest mode to perform a coding parameter decoding operation on the current coding parameter.

[0078] A data compression decoding device, characterized by comprising at least the following modules:

[0079] 1) A compressed data code stream parsing module, when decoding a current encoding parameter of a current primitive in a decoding block, parses the compressed data code stream to obtain information indicating at least the encoding and decoding mode of the current encoding parameter;

[0080] 2) A decoding module selects one of a plurality of decoding modes including a neighboring mode and / or a nearest mode to perform a coding parameter decoding operation on the current coding parameter.

[0081] The following are more implementation details or variations of the present invention.

[0082] Implementation or variant example 1

[0083] In the encoding method or device or the decoding method or device, the encoding operation or the decoding operation (collectively referred to as encoding and decoding operation) includes one or a combination of the following operations:

[0084] Obtaining a coding parameter prediction value from coding parameters of one or more coded and decoded primitives through a predetermined operation, and using the coding parameter prediction value to predict a current coding parameter;

[0085] or

[0086] From the coding parameters of one or more encoded and decoded primitives, select one of the coding parameters as a coding parameter prediction value according to a predetermined rule, and use the coding parameter prediction value to predict a current coding parameter;

[0087] or

[0088] Determine a set of candidate coding parameters from one or more encoded and decoded primitives according to a predetermined rule, use an index to specify one of the candidate coding parameters as a coding parameter prediction value, and use the coding parameter prediction value to predict a current coding parameter;

[0089] or

[0090] A set of candidate coding parameters is determined from the coding parameters of one or more encoded and decoded primitives according to a predetermined rule, one of the candidate coding parameters is designated as a coding parameter prediction value using an index, and the coding parameter prediction value is copied as the current coding parameter.

[0091] Implementation or variant example 2

[0092] In the encoding method or device or decoding method or device described in implementation or variant example 1,

[0093] The one or more encoded primitives are encoded primitives adjacent to the current primitive in terms of spatial position;

[0094] and / or

[0095] The one or more encoded and decoded primitives are the most recent or most recent encoded and decoded primitives in terms of the encoding and decoding time sequence of the current primitive.

[0096] Implementation or variant example 3

[0097] In the encoding method or device or the decoding method or device described in implementation or variant example 1, the prediction error of using the encoding parameters of the encoded and decoded primitives to predict the current encoding parameters is zero.

[0098] Implementation or variant example 4

[0099] In the encoding method or device or the decoding method or device described in implementation or variant example 1, the prediction error of using the encoding parameters of the encoded and decoded primitives to predict the current encoding parameters is not zero, and the encoding and decoding operation includes encoding and decoding the prediction errors of the encoding parameters.

[0100] Implementation or variant example 5

[0101] In the encoding method or device or the decoding method or device, the information indicating the encoding and decoding mode of the current encoding parameter is a coding parameter encoding and decoding mode flag or identification code.

[0102] Implementation or Variation Example 6

[0103] In the encoding method or device or the decoding method or device described in implementation or variant example 5, a probability model is used to perform entropy encoding and decoding on the syntax elements of the encoding parameter encoding and decoding mode flag or identification code.

[0104] Implementation or variant example 7

[0105] In the encoding method or device or the decoding method or device, the information indicating the encoding and decoding mode of the current encoding parameter is a direct or indirect or direct and indirect mixed encoding parameter encoding and decoding mode identification code;

[0106] If the encoding parameter codec mode identification code takes a predetermined value, then

[0107] {

[0108] Adopting the neighboring method to encode and decode the coding parameters

[0109] }

[0110] Otherwise, if the encoding parameter codec mode identifier takes another predetermined value, then

[0111] {

[0112] Use the nearest method to encode and decode the encoding parameters

[0113] }

[0114] Otherwise, if the encoding parameter codec mode identification code takes other predetermined values, then

[0115] {

[0116] Use other methods to encode and decode encoding parameters

[0117] }

[0118] The direct coding parameter codec mode identification code is composed of one or more bit strings in the compressed data code stream. The indirect coding parameter codec mode identification code is a coding parameter codec mode identification code derived from other coding parameters and / or codec variables and / or other syntax elements of the compressed data code stream or a predetermined identification code default value. The direct-indirect mixed coding parameter codec mode identification code is a mixed coding parameter codec mode identification code that is partially direct (i.e., composed of one or more bit strings in the compressed data code stream) and partially indirect (i.e., derived from other coding parameters and / or codec variables and / or other syntax elements of the compressed data code stream).

[0119] Implementation or variant example 8

[0120] In the encoding method or device or the decoding method or device, the information representing the encoding and decoding mode of the current encoding parameter in the encoding and decoding block exists in the compressed data code stream in one of the following forms or a combination thereof:

[0121] The information indicating the codec mode of each current coding parameter is concentrated in the compressed data bitstream: ... ..., the information of the codec mode of coding parameter 1, the information of the codec mode of coding parameter 2, the information of the codec mode of coding parameter 3, ... ..., the information of the codec mode of coding parameter N, ... ...;

[0122] or

[0123] The information representing the coding and decoding mode of the current coding parameters are scattered in the compressed data bitstream:... ..., information on the coding and decoding mode of coding parameter 1,... ..., information on the coding and decoding mode of coding parameter 2,... ..., information on the coding and decoding mode of coding parameter 3,... ..., information on the coding and decoding mode of coding parameter M,... ... ....

[0124] Implementation or variant example 9

[0125] In the encoding method or device or the decoding method or device, the data is image data or video data;

[0126] The primitive is a matching (also known as prediction or compensation or replication) primitive, including one of the following types or a combination thereof: matching block, matching sub-block, matching micro-block, matching string, matching pixel string, matching sample string, matching index string, matching bar, matching line; the encoding parameter is a displacement vector;

[0127] The adjacent method is a method of using one or more primitives that are adjacent in spatial position;

[0128] The most recent method is a method of using one or more valid primitives that are most recent in the coding and decoding time sequence;

[0129] Other methods besides the neighboring method and the nearest method include a direct method and a transformation method.

[0130] Embodiment or variation 10

[0131] In the encoding method or apparatus or the decoding method or apparatus described in implementation or variant example 9, the one or more primitives adjacent to the spatial position of the current primitive include one of the following primitives or a combination thereof:

[0132] The leftmost primitive at the top, the left primitive at the top, the middle primitive at the top, the right primitive at the top, the rightmost primitive at the top,

[0133] Top left primitive, top left primitive, middle left primitive, bottom left primitive, bottom left primitive.

[0134] Implementation or variant example 11

[0135] In the encoding method or apparatus or the decoding method or apparatus described in implementation or variant example 9, the one or more primitives adjacent to the spatial position of the current primitive include one of the following primitives or a combination thereof:

[0136] Primitive A in the left and middle positions

[0137] Primitive B in the middle and upper positions

[0138] The rightmost and topmost primitive C

[0139] Left•Top position primitive D

[0140] Left•lower position primitive F

[0141] Primitive G in the right and upper position

[0142] Left • Primitive H in the lowermost position.

[0143] Implementation or variant example 12

[0144] In the encoding method or device or the decoding method or device, one of the following rules is used to select and specify a neighboring primitive and / or neighboring coding parameter as a selected neighboring primitive and / or a selected neighboring coding parameter, and at least the selected neighboring primitive and / or the selected neighboring coding parameter is used to perform a coding parameter encoding operation or a decoding operation (collectively referred to as a coding and decoding operation) on the current coding parameter:

[0145] Rule 1

[0146] A maximum candidate neighbor primitive group is predetermined, which is composed of some or all of the 7 neighbor primitives A, B, C, D, F, G, H, such as {A, B, D} or {A, B, C, D, F, G} or {A, B, C, D, F, G, H},

[0147] The available candidate neighboring primitive group of the current primitive is composed of the M "available" primitives in the maximum candidate neighboring primitive group, referred to as the current candidate neighboring primitive group.

[0148] If M is equal to 0, there is no available neighboring primitive, and the current coding parameter (that is, the coding parameter of the current primitive) cannot be encoded or decoded using the neighboring method.

[0149] Otherwise, if M is equal to 1, then the only available primitive is selected as the selected neighboring primitive,

[0150] Otherwise, an index is used to specify a primitive in the current set of candidate neighbor primitives as the selected neighbor primitive;

[0151] or

[0152] Rule 2

[0153] A maximum candidate neighbor primitive ordered group is predetermined, which is composed of some or all of the 7 neighbor primitives A, B, C, D, F, G, H in a predetermined order, such as {A, B, D} or {A, D, B} or {B, A, D} or {D, B, A, C, G, F} or {A, C, G, F, D, B},

[0154] In the maximum ordered group of candidate neighboring primitives, find the first "available" neighboring primitive U and its neighboring coding parameter offsetU in a predetermined order, find the first available neighboring primitive V and its neighboring coding parameter offsetV in a reverse order of the predetermined order,

[0155] If no available adjacent coding parameters are found (i.e., they do not exist), the current coding parameters (i.e., the coding parameters of the current primitive) cannot be encoded or decoded using the adjacent method.

[0156] Otherwise, if the available neighboring coding parameter offsetU is equal to the available neighboring coding parameter offsetV, then this unique available neighboring coding parameter is used as the selected neighboring coding parameter.

[0157] Otherwise, a neighboring coding parameter flag bit neighboring_offset_flag is used to specify the neighboring coding parameter offsetU or the neighboring coding parameter offsetV as the selected neighboring coding parameter;

[0158] or

[0159] Rule 3

[0160] A maximum candidate neighbor primitive ordered group is predetermined, which is composed of some or all of the 7 neighbor primitives A, B, C, D, F, G, H in a predetermined order, such as {A, B, D} or {A, D, B} or {B, A, D} or {D, B, A, C, G, F} or {A, C, G, F, D, B},

[0161] In the maximum ordered group of candidate neighboring primitives, find the first "available" neighboring primitive U and its neighboring coding parameter offsetU in a predetermined order, find the first available neighboring primitive V and its neighboring coding parameter offsetV in a reverse order of the predetermined order,

[0162] If no available adjacent coding parameters are found (i.e., they do not exist), the current coding parameters (i.e., the coding parameters of the current primitive) are encoded or decoded without using the adjacent method.

[0163] Otherwise, regardless of whether the available neighboring coding parameter offsetU is equal to the available neighboring coding parameter offsetV, a neighboring coding parameter flag bit neighboring_offset_flag is always used to specify the neighboring coding parameter offsetU or the neighboring coding parameter offsetV as the selected neighboring coding parameter;

[0164] or

[0165] Rule 4

[0166] A maximum candidate neighbor primitive ordered group is predetermined, which is composed of some or all of the 7 neighbor primitives A, B, C, D, F, G, H in a predetermined order, such as {A, B, D} or {A, D, B} or {B, A, D} or {D, B, A, C, G, F} or {A, C, G, F, D, B},

[0167] In the maximum ordered set of candidate neighbor primitives, find the first "available" neighbor primitive U in a predetermined order, find the first available neighbor primitive V in the reverse order of the predetermined order,

[0168] If no available neighboring primitive is found (i.e., does not exist), the current coding parameters (i.e., the coding parameters of the current primitive) are encoded and decoded without using the neighboring method.

[0169] Otherwise, if the available neighboring primitive U coincides with the available neighboring primitive V, then this unique available neighboring primitive is selected as the selected neighboring primitive.

[0170] Otherwise, a neighboring primitive flag bit neighboring_bu_flag is used to specify the available neighboring primitive U or the available neighboring primitive V as the selected neighboring primitive;

[0171] or

[0172] Rule 5

[0173] A maximum candidate neighbor primitive ordered group is predetermined, which is composed of some or all of the 7 neighbor primitives A, B, C, D, F, G, H in a predetermined order, such as {A, B, D} or {A, D, B} or {B, A, D} or {D, B, A, C, G, F} or {A, C, G, F, D, B},

[0174] In the maximum ordered set of candidate neighbor primitives, find the first "available" neighbor primitive U in a predetermined order, find the first available neighbor primitive V in the reverse order of the predetermined order,

[0175] If no available neighboring primitive is found (i.e., does not exist), the current coding parameters (i.e., the coding parameters of the current primitive) are encoded and decoded without using the neighboring method.

[0176] Otherwise, regardless of whether the available neighboring primitive U and the available neighboring primitive V overlap, a neighboring primitive flag bit neighboring_bu_flag is always used to specify the available neighboring primitive U or the available neighboring primitive V as the selected neighboring primitive;

[0177] or

[0178] Rule 6

[0179] A maximum candidate neighbor primitive group is predetermined, which is composed of some or all of the 9 neighbor primitives A, B, C, D, E, F, G, H, I, such as {A, B, D, H} or {A, B, C, D, E, F, G} or {A, B, C, D, F, G, H},

[0180] The available candidate neighboring primitive group of the current primitive is composed of the M "available" primitives in the maximum candidate neighboring primitive group, referred to as the current candidate neighboring primitive group.

[0181] If M is equal to 0, there is no available neighboring primitive, and the current coding parameter (that is, the coding parameter of the current primitive) is not encoded or decoded using the neighboring method.

[0182] Otherwise, a neighboring primitive index neighboring_bu_index is used to specify a primitive in the current candidate neighboring primitive group as the selected neighboring primitive.

[0183] Implementation or variant example 13

[0184] In the encoding method or apparatus or the decoding method or apparatus described in implementation or variant example 9, the one or more primitives closest in the encoding and decoding time sequence of the current primitive with valid primitive time sequence number n include one or a combination of the following K (usually K ≤ 20) primitives:

[0185] The valid primitive R1 whose valid primitive time sequence number is n - 1

[0186] The valid primitive R2 whose valid primitive time sequence number is n - 2

[0187] Valid primitive R3 with valid primitive time serial number n - 3

[0188] … … … …

[0189] The valid primitive R whose valid primitive time sequence number is n - K + 1 K-1

[0190] The valid primitive R whose valid primitive time sequence number is n - K K

[0191] The effective primitive time serial number is a time serial number assigned only to the effective primitive in the order of the encoding and decoding time of the effective primitive.

[0192] Implementation or variant example 14

[0193] In the encoding method or apparatus or decoding method or apparatus described in implementation or variant example 13, the definition of a valid primitive is

[0194] Decoded primitives with displacement vectors;

[0195] or

[0196] A primitive having a displacement vector of a predetermined type and having been encoded;

[0197] or

[0198] A primitive which has been encoded and has a displacement vector whose value falls within a predetermined value range;

[0199] or

[0200] primitives which have been encoded and have displacement vectors whose values ​​fall outside a predetermined range of values;

[0201] or

[0202] Decoded primitives with displacement vectors and not using neighbor mode;

[0203] or

[0204] primitives that have been encoded and have a displacement vector whose value is not equal to the value of the displacement vector of the most recent K valid primitives;

[0205] or

[0206] primitives that have been coded and have a displacement vector and do not use the neighboring method and whose displacement vector values ​​are not equal to the values ​​of the displacement vectors of the most recent K valid primitives;

[0207] or

[0208] A combination of two or more of the above.

[0209] Implementation or variant example 15

[0210] In the encoding method or device or the decoding method or device described in implementation or variant example 13, an index recent_offset_index is used to specify the use of the displacement vector of the valid primitive with the valid primitive time sequence number n-1-recent_offset_index to encode and decode the displacement vector of the current primitive.

[0211] Implementation or variant example 16

[0212] In the encoding method or device or decoding method or device described in implementation or variant example 12, rule 2 is adopted to select a neighboring method or a nearest method or other methods to perform encoding and decoding operations on the current encoding parameter (for example, a displacement vector) in the following manner and the parameters or syntax elements indicated in italics:

[0213] Use neighboring or recent coding parameter flag use_neighboring_or_recent_cp_flag

[0214] If the value of the Use Neighbor or Nearest Encoding parameter flag indicates that the Neighbor or Nearest mode is used, then

[0215] {

[0216] If there are two unequal available neighboring coding parameters cpU and cpV, then

[0217] {

[0218] Neighbouring_cp_flag

[0219] At least the neighboring coding parameter (one of cpU and cpV) indicated by the neighboring coding parameter flag is used as the selected neighboring coding parameter

[0220] }

[0221] Otherwise, if no available neighbor encoding parameters are found (i.e., do not exist), then

[0222] {

[0223] Recent encoding parameter index recent_cp_index

[0224] Use the most recent encoding parameter indicated by the most recent encoding parameter index to encode and decode the current encoding parameter

[0225] }

[0226] otherwise

[0227] {

[0228] Use the only available neighboring coding parameter cpU (equivalent to cpV) as the selected neighboring coding parameter

[0229] }

[0230] }

[0231] otherwise

[0232] {

[0233] Use other methods to encode and decode the current encoding parameters

[0234] }.

[0235] Implementation or variant example 17

[0236] In the encoding method or device or the decoding method or device, the encoding parameter is a displacement vector, and the following method and the parameters or syntax elements indicated in italics are used to select or indicate the use of a neighboring method, a nearest method or other methods to perform encoding and decoding operations on the current displacement vector:

[0237] Use the neighboring offset vector flag use_neighboring_offset_flag

[0238] If the value of the Use Contiguous Displacement Vector flag indicates that the adjacent mode is used, then

[0239] {

[0240] Neighbouring_offset_flag

[0241] Use the adjacent displacement vector (one of offsetU and offsetV) represented by the adjacent displacement vector flag as the current displacement vector

[0242] }

[0243] otherwise

[0244] {

[0245] Parameters or syntax elements related to the most recent mode and / or other modes

[0246] Performs encoding and decoding operations on the current displacement vector using the nearest method and / or other methods

[0247] }.

[0248] Implementation or variant example 18

[0249] In the encoding method or device or decoding method or device described in implementation or variant example 12, rule 4 is adopted to select a neighboring method or a nearest method or other methods to perform encoding and decoding operations on the current encoding parameter (for example, a displacement vector) in the following manner and the parameters or syntax elements indicated in italics:

[0250] Use Nearest or Nearest Encoding parameters Flag use_neighboring_or_recent_cp_flag

[0251] If the value of the Use Neighbor or Nearest Encoding parameter flag indicates that the Neighbor or Nearest mode is used, then

[0252] {

[0253] If there are two different available neighboring primitives U and V, then

[0254] {

[0255] Neighbouring_bu_flag

[0256] Use the neighboring primitive (one of U and V) indicated by the neighboring primitive flag as the selected neighboring primitive

[0257] }

[0258] Otherwise, if no available neighboring primitive is found (i.e., does not exist) (neither U nor V exists), then

[0259] {

[0260] Recent encoding parameter index recent_cp_index

[0261] Use the most recent encoding parameter indicated by the most recent encoding parameter index to encode and decode the current encoding parameter

[0262] }

[0263] otherwise

[0264] {

[0265] Use the only available neighboring primitive U (coincident with V) as the chosen neighboring primitive

[0266] }

[0267] }

[0268] otherwise

[0269] {

[0270] Use other methods to encode and decode the current encoding parameters

[0271] }.

[0272] Implementation or variant example 19

[0273] In the encoding method or device or decoding method or device described in implementation or variant example 12, rule 5 is adopted to select a neighboring method or a nearest method or other methods to perform encoding and decoding operations on the current encoding parameter (for example, a displacement vector) in the following manner and the parameters or syntax elements indicated in italics:

[0274] Use neighboring coding parameter flag use_neighboring_cp_flag

[0275] If the value of the Use Contiguous Coding Parameter Flag indicates that the contiguous mode is used, then

[0276] {

[0277] Neighbouring_bu_flag

[0278] Use the neighboring primitive (one of U and V) indicated by the neighboring primitive flag as the selected neighboring primitive

[0279] }

[0280] otherwise

[0281] {

[0282] Parameters or syntax elements related to the most recent mode and / or other modes

[0283] Use the most recent method and / or other methods to encode and decode the current encoding parameters

[0284] }.

[0285] Implementation or variation example 20

[0286] In the encoding method or device or decoding method or device described in implementation or variant example 12, rule 5 is adopted, the encoding parameter is a displacement vector, and the neighboring mode, the nearest mode or other mode is selected to perform encoding and decoding operations on the current displacement vector in the following manner and the parameters or syntax elements indicated in italics:

[0287] Use the neighboring offset vector flag use_neighboring_offset_flag

[0288] If the value of the Use Contiguous Displacement Vector flag indicates that the adjacent mode is used, then

[0289] {

[0290] Neighbouring_bu_flag

[0291] Use the displacement vector of the neighboring primitive (one of U and V) indicated by the neighboring primitive flag as the current displacement vector

[0292] }

[0293] otherwise

[0294] {

[0295] Parameters or syntax elements related to the most recent mode and / or other modes

[0296] Performs encoding and decoding operations on the current displacement vector using the nearest method and / or other methods

[0297] }.

[0298] Implementation or variant example 21

[0299] In the encoding method or apparatus or decoding method or apparatus described in implementation or variant example 12, the definition of the "available" primitive is

[0300] A primitive that has been decoded and has a displacement vector as one of its matching parameters

[0301] or

[0302] Primitives that have been encoded and decoded and use one or more predetermined matching methods (such as block matching method and string matching method);

[0303] or

[0304] A primitive that has been encoded and decoded and uses one or more predetermined seed patterns (sometimes also called subtypes) in one or more predetermined matching methods;

[0305] or

[0306] A primitive which has been encoded and has a displacement vector whose value falls within a predetermined value range;

[0307] or

[0308] primitives which have been encoded and have displacement vectors whose values ​​fall outside a predetermined range of values;

[0309] or

[0310] A primitive of a displacement vector which has been encoded and has predetermined characteristics;

[0311] or

[0312] A primitive having a decoded displacement vector of a predetermined type;

[0313] or

[0314] A combination of two or more of the above.

[0315] Implementation or variant example 22

[0316] In the encoding method or apparatus or decoding method or apparatus described in embodiments or variants 12 to 21, the definition of the “available” primitive is

[0317] The encoded and decoded length-restricted string;

[0318] or

[0319] A string that has been encoded and decoded and can only take a certain number of predetermined values;

[0320] or

[0321] a string that has been coded and has a length equal to the number of pixels of a coded block or equal to half the number of pixels of a coded block;

[0322] or

[0323] A combination of two or more of the above.

[0324] Implementation or variant example 23

[0325] In the encoding method or device or the decoding method or device, the information indicating the encoding and decoding mode of the current encoding parameter is two direct or indirect encoding parameter encoding and decoding mode flags;

[0326] If the first encoding parameter codec mode flag takes a predetermined value, then

[0327] {

[0328] Adopting the neighboring method to encode and decode the coding parameters

[0329] }

[0330] otherwise

[0331] {

[0332] If the second encoding parameter codec mode flag takes a predetermined value, then

[0333] {

[0334] Use the nearest method to encode and decode the encoding parameters

[0335] }

[0336] otherwise

[0337] {

[0338] Use other methods to encode and decode encoding parameters

[0339] }

[0340] }

[0341] The direct coding parameter codec mode flag is a bit in the compressed data code stream. The indirect coding parameter codec mode flag is a coding parameter codec mode flag derived from other coding parameters and / or codec variables and / or other syntax elements of the compressed data code stream or a predetermined flag default value.

[0342] Implementation or variant example 24

[0343] In the encoding method or device or the decoding method or device, the encoding parameter is a displacement vector, and the following method and the parameters or syntax elements indicated in italics are used to select or indicate the use of a neighboring method, a nearest method or other methods to perform encoding and decoding operations on the current displacement vector:

[0344] Use the neighboring offset vector flag use_neighboring_offset_flag

[0345] If the value of the Use Contiguous Displacement Vector flag indicates that the adjacent mode is used, then

[0346] {

[0347] Parameters or syntax elements related to neighboring displacement vectors

[0348] Get the current displacement vector from the neighboring displacement vectors

[0349] }

[0350] otherwise

[0351] {

[0352] Use the recent displacement vector flag use_recent_offset_flag

[0353] If the value of the Use Nearest Displacement Vector flag indicates that the nearest mode is used, then

[0354] {

[0355] Parameters or syntax elements related to the nearest displacement vector

[0356] Get the current displacement vector from the most recent displacement vector

[0357] }

[0358] otherwise

[0359] {

[0360] Parameters or syntax elements related to other methods

[0361] Use other methods to encode and decode the current displacement vector

[0362] }

[0363] }.

[0364] Implementation or variant example 25

[0365] In the encoding method or device or the decoding method or device, the multiple encoding and decoding modes include a mode of directly performing encoding and decoding operations on the current encoding parameter itself (ie, not involving related encoding parameters of other primitives).

[0366] Implementation or variant example 26

[0367] In the encoding method or device or the decoding method or device, the information indicating the encoding and decoding mode of the current encoding parameter is a direct or indirect or direct and indirect mixed encoding parameter encoding and decoding mode identification code;

[0368] When the encoding parameter codec identification code is equal to the first predetermined value

[0369] {

[0370] Use the neighboring method to encode and decode the current encoding parameters

[0371] }

[0372] When the encoding parameter codec identification code is equal to the second predetermined value

[0373] {

[0374] Use the most recent method to encode and decode the current encoding parameters

[0375] }

[0376] When the encoding parameter codec identification code is equal to the third predetermined value

[0377] {

[0378] Use other methods to encode and decode the current encoding parameters

[0379] }

[0380] The direct coding parameter codec mode identification code is composed of one or more bit strings in the compressed data code stream. The indirect coding parameter codec mode identification code is a coding parameter codec mode identification code derived from other coding parameters and / or codec variables and / or other syntax elements of the compressed data code stream or a predetermined identification code default value. The direct-indirect mixed coding parameter codec mode identification code is a mixed coding parameter codec mode identification code that is partially direct (i.e., composed of one or more bit strings in the compressed data code stream) and partially indirect (i.e., derived from other coding parameters and / or codec variables and / or other syntax elements of the compressed data code stream).

[0381] Implementation or variant example 27

[0382] In the encoding method or device or decoding method or device described in Implementation or Variant Example 12, Rule 6 is adopted to select a neighboring method or a nearest method or other methods to perform encoding and decoding operations on the current encoding parameter (for example, a displacement vector) in the following manner and the parameters or syntax elements indicated in italics:

[0383] Use neighboring coding parameter flag use_neighboring_cp_flag

[0384] If the value of the Use Contiguous Coding Parameter Flag indicates that the contiguous mode is used, then

[0385] {

[0386] Neighbouring_bu_index

[0387] Use the primitive in the current candidate neighboring primitive group specified by the neighboring primitive index as the selected neighboring primitive

[0388] }

[0389] otherwise

[0390] {

[0391] Parameters or syntax elements related to the most recent mode and / or other modes

[0392] Use the most recent method and / or other methods to encode and decode the current encoding parameters

[0393] }.

[0394] Implementation or variant example 28

[0395] In the encoding method or device or decoding method or device described in implementation or variant example 12, rule 6 is adopted, the encoding parameter is a displacement vector, and the neighboring mode, the nearest mode, or other mode is selected to perform encoding and decoding operations on the current displacement vector in the following manner and the parameters or syntax elements indicated in italics:

[0396] Use the neighboring offset vector flag use_neighboring_offset_flag

[0397] If the value of the Use Contiguous Displacement Vector flag indicates that the adjacent mode is used, then

[0398] {

[0399] Neighbouring_bu_index

[0400] Use the displacement vector of a primitive in the current candidate neighboring primitive group specified by the neighboring primitive index as the current displacement vector

[0401] }

[0402] otherwise

[0403] {

[0404] Parameters or syntax elements related to the most recent mode and / or other modes

[0405] Performs encoding and decoding operations on the current displacement vector using the nearest method and / or other methods

[0406] }.

[0407] Implementation or variant example 29

[0408] In the encoding method or device or decoding method or device described in implementation or variant example 12, rule 6 is adopted, the encoding parameter is a displacement vector, and the neighboring mode, the nearest mode, or other mode is selected to perform encoding and decoding operations on the current displacement vector in the following manner and the parameters or syntax elements indicated in italics:

[0409] Use the neighboring offset vector flag use_neighboring_offset_flag

[0410] If the value of the Use Contiguous Displacement Vector flag indicates that the adjacent mode is used, then

[0411] {

[0412] Neighbouring_bu_index

[0413] Use the displacement vector of a primitive in the current candidate neighboring primitive group specified by the neighboring primitive index as the current displacement vector

[0414] }

[0415] otherwise

[0416] {

[0417] Use the recent displacement vector flag use_recent_offset_flag

[0418] If the value of the Use Nearest Displacement Vector flag indicates that the nearest mode is used, then

[0419] {

[0420] recent_offset_index

[0421] Use a displacement vector from the candidate nearest displacement vector group specified by the nearest displacement vector index as the current displacement vector

[0422] }

[0423] otherwise

[0424] {

[0425] Parameters or syntax elements related to other methods

[0426] Use other methods to encode and decode the current displacement vector

[0427] }

[0428] }.

[0429] Implementation or variant example 30

[0430] In the encoding method or device or decoding method or device described in implementation or variant example 12, rule 6 is adopted, the encoding parameter is a displacement vector, and the neighboring mode, the nearest mode, or other mode is selected to perform encoding and decoding operations on the current displacement vector in the following manner and the parameters or syntax elements indicated in italics:

[0431] Use the recent displacement vector flag use_recent_offset_flag

[0432] If the value of the Use Nearest Displacement Vector flag indicates that the nearest mode is used, then

[0433] {

[0434] recent_offset_index

[0435] Use the displacement vector in the candidate nearest displacement vector group specified by the nearest displacement vector index as the current displacement vector

[0436] }

[0437] otherwise

[0438] {

[0439] Use the neighboring offset vector flag use_neighboring_offset_flag

[0440] If the value of the Use Contiguous Displacement Vector flag indicates that the adjacent mode is used, then

[0441] {

[0442] Neighbouring_bu_index

[0443] Use the displacement vector of the primitive in the current candidate neighboring primitive group specified by the neighboring primitive index as the current displacement vector

[0444] }

[0445] otherwise

[0446] {

[0447] Parameters or syntax elements related to other methods

[0448] Use other methods to encode and decode the current displacement vector

[0449] }

[0450] }.

[0451] Implementation or variant example 31

[0452] In the encoding method or device or the decoding method or device, the information indicating the encoding and decoding mode of the current encoding parameter is a direct or indirect or direct and indirect mixed encoding parameter encoding and decoding mode identification code;

[0453] When the encoding parameter codec identification code is equal to the first predetermined value

[0454] {

[0455] Neighbouring_bu_index

[0456] Use the encoding parameters of the neighboring primitive in the current candidate neighboring primitive group specified by the neighboring primitive index to encode and decode the current encoding parameters

[0457] }

[0458] When the encoding parameter codec identification code is equal to the second predetermined value

[0459] {

[0460] Recent encoding parameter index recent_cp_index

[0461] Use the encoding parameter in the candidate most recent encoding parameter group specified by the most recent encoding parameter index to encode and decode the current encoding parameter

[0462] }

[0463] When the encoding parameter codec identification code is equal to the third predetermined value

[0464] {

[0465] Parameters or syntax elements related to other methods

[0466] Use other methods to encode and decode the current encoding parameters

[0467] }

[0468] The direct coding parameter codec mode identification code is composed of one or more bit strings in the compressed data code stream. The indirect coding parameter codec mode identification code is a coding parameter codec mode identification code derived from other coding parameters and / or codec variables and / or other syntax elements of the compressed data code stream or a predetermined identification code default value. The direct-indirect mixed coding parameter codec mode identification code is a mixed coding parameter codec mode identification code that is partially direct (i.e., composed of one or more bit strings in the compressed data code stream) and partially indirect (i.e., derived from other coding parameters and / or codec variables and / or other syntax elements of the compressed data code stream).

[0469] Implementation or variant example 32

[0470] In the encoding method or device or the decoding method or device, the encoding parameter is a displacement vector, and the information indicating the encoding and decoding mode of the current encoding parameter is a direct or indirect or direct and indirect mixed displacement vector encoding and decoding mode identification code;

[0471] When the displacement vector encoding and decoding mode identification code is equal to the first predetermined value

[0472] {

[0473] Neighbouring_bu_index

[0474] Use the displacement vector of the neighboring primitive in the current candidate neighboring primitive group specified by the neighboring primitive index as the current displacement vector

[0475] }

[0476] When the displacement vector encoding and decoding mode identification code is equal to the second predetermined value

[0477] {

[0478] recent_offset_index

[0479] Use the displacement vector in the candidate nearest displacement vector group specified by the nearest displacement vector index as the current displacement vector

[0480] }

[0481] When the displacement vector encoding and decoding mode identification code is equal to the third predetermined value

[0482] {

[0483] Parameters or syntax elements related to other methods

[0484] Use other methods to encode and decode the current displacement vector

[0485] }

[0486] The direct displacement vector codec mode identification code is composed of one or more bit strings in the compressed data code stream. The indirect displacement vector codec mode identification code is a displacement vector codec mode identification code derived from other coding parameters and / or codec variables and / or other syntax elements of the compressed data code stream or a predetermined identification code default value. The direct-indirect mixed displacement vector codec mode identification code is a displacement vector codec mode identification code that is partially direct (i.e., composed of one or more bit strings in the compressed data code stream) and partially indirect (i.e., derived from other coding parameters and / or codec variables and / or other syntax elements of the compressed data code stream).

[0487] Implementation or variant example 33

[0488] In the encoding method or device or the decoding method or device described in implementation or variant example 26 or 31 or 32,

[0489] One of the three predetermined values, the first predetermined value, the second predetermined value, and the third predetermined value, is a 1-bit binary symbol string (e.g., the first example: '0'; the second example: '1'), and the other two predetermined values ​​are two 2-bit binary symbol strings (e.g., the first example: '10' and '11'; the second example: '01' and '00').

[0490] First example:

[0491] The first predetermined value, the second predetermined value, and the third predetermined value are respectively the following binary symbol strings:

[0492] 0, 10, 11;

[0493] Second example:

[0494] The first predetermined value, the second predetermined value, and the third predetermined value are respectively the following binary symbol strings:

[0495] 1, 01, 00;

[0496] The third example:

[0497] The first predetermined value, the third predetermined value, and the second predetermined value are respectively the following binary symbol strings:

[0498] 0, 10, 11;

[0499] The fourth example:

[0500] The first predetermined value, the third predetermined value, and the second predetermined value are respectively the following binary symbol strings:

[0501] 1, 01, 00;

[0502] The fifth example:

[0503] The second predetermined value, the first predetermined value, and the third predetermined value are respectively the following binary symbol strings:

[0504] 0, 10, 11;

[0505] The sixth example:

[0506] The second predetermined value, the first predetermined value, and the third predetermined value are respectively the following binary symbol strings:

[0507] 1, 01, 00;

[0508] The seventh example:

[0509] The second predetermined value, the third predetermined value, and the first predetermined value are respectively the following binary symbol strings:

[0510] 0, 10, 11;

[0511] The eighth example:

[0512] The second predetermined value, the third predetermined value, and the first predetermined value are respectively the following binary symbol strings:

[0513] 1, 01, 00;

[0514] Ninth example:

[0515] The third predetermined value, the first predetermined value, and the second predetermined value are respectively the following binary symbol strings:

[0516] 0, 10, 11;

[0517] The tenth example:

[0518] The third predetermined value, the first predetermined value, and the second predetermined value are respectively the following binary symbol strings:

[0519] 1, 01, 00;

[0520] The eleventh example:

[0521] The third predetermined value, the second predetermined value, and the first predetermined value are respectively the following binary symbol strings:

[0522] 0, 10, 11;

[0523] The twelfth example:

[0524] The third predetermined value, the second predetermined value, and the first predetermined value are respectively the following binary symbol strings:

[0525] 1, 01, 00.

[0526] Implementation or variant example 34

[0527] In the encoding method or device or the decoding method or device, the encoding parameter is a displacement vector, and other methods at least include a direct method of directly encoding and decoding the horizontal component and the vertical component of the displacement vector.

[0528] Implementation or variant example 35

[0529] In the encoding method or device or the decoding method or device described in implementation or variant example 34, the direct method at least includes encoding and decoding the following parameters:

[0530] Whether the horizontal component is a zero flag;

[0531] and / or

[0532] the horizontal component sign bit;

[0533] and / or

[0534] The absolute value of the horizontal component;

[0535] and / or

[0536] The absolute value of the horizontal component is reduced by one;

[0537] and / or

[0538] Whether the vertical component is a zero flag;

[0539] and / or

[0540] the vertical component sign bit;

[0541] and / or

[0542] The absolute value of the vertical component;

[0543] and / or

[0544] The absolute value of the vertical component is reduced by one;

[0545] and / or

[0546] Whether the adjustment value of the horizontal component is a zero flag;

[0547] and / or

[0548] a sign bit of the adjustment value of the horizontal component;

[0549] and / or

[0550] the absolute value of the adjustment value of the horizontal component;

[0551] and / or

[0552] The absolute value of the adjustment value of the horizontal component is reduced by one;

[0553] and / or

[0554] Whether the adjustment value of the vertical component is a zero flag;

[0555] and / or

[0556] a sign bit of the adjustment value of the vertical component;

[0557] and / or

[0558] the absolute value of the adjustment value of the vertical component;

[0559] and / or

[0560] The absolute value of the adjustment value of the vertical component is reduced by one.

Claims

1. A coding method for image compression, characterized in that: At least the following steps are included: 1) When encoding a current motion vector in a coding block, according to a predetermined rule, one of a plurality of encoding modes including a nearest mode or one of a plurality of encoding modes including a nearest mode and a neighboring mode is selected to perform a motion vector encoding operation on the current motion vector; the neighboring mode is a mode of encoding the current motion vector by using at least one or more motion vectors that are adjacent or neighboring to the current motion vector in spatial position, referred to as adjacent motion vectors or neighboring motion vectors; the nearest mode is a mode of encoding the current motion vector by using at least one or more motion vectors that are closest to the current motion vector in encoding time sequence, referred to as the nearest motion vector, and the representation form of the encoding time sequence includes a valid motion vector time sequence number, the valid motion vector time sequence number of the current motion vector is j0, and the valid motion vector time sequence numbers of the one or more nearest motion vectors are j0-j, where j is a positive integer less than a predetermined positive integer J that is not greater than 20; 2) Generate a compressed data code stream containing at least information indicating the encoding method of the current motion vector.

2. An encoding device for image compression, characterized in that: Includes at least the following modules: 1) A coding mode selection module, when encoding a current motion vector in a coding block, selects one of a plurality of coding modes including a nearest mode or one of a plurality of coding modes including a nearest mode and a neighboring mode according to a predetermined rule to perform a motion vector coding operation on the current motion vector; the neighboring mode is a mode of encoding the current motion vector by using at least one or more motion vectors that are adjacent or neighboring to the current motion vector in spatial position, referred to as adjacent motion vectors or neighboring motion vectors; the nearest mode is a mode of encoding the current motion vector by using at least one or more motion vectors that are closest to the current motion vector in coding time sequence, referred to as the nearest motion vector, and the representation form of the coding time sequence includes a valid motion vector time sequence number, the valid motion vector time sequence number of the current motion vector is j0, and the valid motion vector time sequence numbers of the one or more nearest motion vectors are j0-j, where j is a positive integer less than a predetermined positive integer J and not greater than 20; 2) A compressed data code stream generation module generates a compressed data code stream containing at least information indicating a coding method of the current motion vector.

3. A method for decoding image compression, characterized in that: At least the following steps are included: 1) when decoding a current motion vector in a decoding block, parsing a compressed data code stream to obtain information indicating at least a decoding method of the current motion vector; 2) Select one of multiple decoding modes including the nearest mode or select one of multiple decoding modes including the nearest mode and the adjacent mode to perform motion vector decoding operation on the current motion vector; the adjacent mode is a mode of decoding the current motion vector by using at least one or more motion vectors that are adjacent or neighboring to the current motion vector in spatial position, referred to as adjacent motion vectors or neighboring motion vectors; the nearest mode is a mode of decoding the current motion vector by using at least one or more motion vectors that are closest to the current motion vector in decoding time sequence, referred to as the nearest motion vector, and the representation of the decoding time sequence includes a valid motion vector time sequence number, the valid motion vector time sequence number of the current motion vector is j0, and the valid motion vector time sequence number of the one or more nearest motion vectors is j0-j, where j is a positive integer less than a predetermined positive integer J that is not greater than 20.

4. The decoding method according to claim 3, characterized in that The decoding block is a decoding area of ​​an image and / or a sequence of images and / or a video, including at least one of the following situations or a combination thereof: a macroblock, a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-area of ​​a CU, a prediction unit PU, and a transform unit TU.

5. The decoding method according to claim 3 or 4, characterized in that: The decoding operation includes the following operations: Determine a group of candidate motion vectors from one or more decoded motion vectors according to a predetermined rule, use an index to specify one of the candidate motion vectors as a motion vector prediction value, and use the motion vector prediction value as a prediction value of a current motion vector; and / or Determine a group of candidate motion vectors from one or more decoded motion vectors according to a predetermined rule, specify one of the candidate motion vectors as a motion vector prediction value using an index, and copy the motion vector prediction value as the current motion vector; The set of candidate motion vectors includes at least One or more decoded motion vectors that are adjacent or neighboring to the current motion vector in spatial position; and / or One or more decoded motion vectors that are closest to the current motion vector in decoding time order.

6. The decoding method according to claim 3 or 4, characterized in that Includes one or any combination of the following features, Feature 1: The information indicating the decoding mode of the current motion vector includes a direct, indirect, or direct-indirect mixed motion vector decoding mode identification code; If the motion vector decoding mode identification code takes a predetermined value, then, The motion vector is decoded using a neighboring method; If the motion vector decoding mode identification code takes another predetermined value, then Decode the motion vector using the nearest method; If the motion vector decoding mode identification code takes other predetermined values, then Decoding the motion vectors in other ways; The direct motion vector decoding mode identification code is composed of one or more bit strings or bit strings in the compressed data code stream, the indirect motion vector decoding mode identification code is a motion vector decoding mode identification code derived from other encoding parameters and / or decoding variables and / or other syntax elements of the compressed data code stream or a predetermined identification code default value, and the direct-indirect mixed motion vector decoding mode identification code is a partially direct and partially indirect mixed motion vector decoding mode identification code; Feature 2: The effectiveness includes: Decoded; or Decoded and of a predetermined type; or has been decoded and its value falls within a predetermined value range; or has been decoded and its value falls outside a predetermined value range; or Decoded and not using neighboring methods; or Decoded and the value of its motion vector is not equal to the value of its K most recent valid motion vectors; or Decoded and not using the neighboring method and the value of its motion vector is not equal to the value of its nearest K valid motion vectors; or A combination of two or more of the above; Feature 3: The one or more motion vectors closest in decoding time sequence to the current motion vector with valid motion vector time sequence number n include one or a combination of the following K motion vectors: The valid motion vector R1 whose time sequence number is n - 1 The valid motion vector R2 whose time sequence number is n - 2 The valid motion vector R3 whose time sequence number is n - 3 … … … … The valid motion vector R whose time sequence number is n - K + 1 K-1 The valid motion vector R whose time sequence number is n - K K The effective motion vector time serial number is a time serial number assigned only to the effective motion vector according to the decoding time sequence of the effective motion vector; Feature 4: In addition to feature 3, the present invention also has the following features: Use an index recentMvIdx greater than or equal to 0 to specify the use of the valid motion vector with the valid motion vector time sequence number n - 1- recentMvIdx to decode the current motion vector; feature 5: The neighboring mode, the nearest mode or other mode is selected to decode the current motion vector in the following manner and parameters and / or syntax elements: There is a set of parameters and / or syntax elements, If the value of the parameter and / or syntax element indicates that the neighboring method is used, then perform operation 1; Operation 1: There are neighbor-wise related indices and candidate motion vector groups, using that one adjacent or neighboring motion vector in the set of candidate motion vectors specified by the index as the current motion vector or a predicted value of the current motion vector; If the value of the parameter and / or syntax element indicates to use the most recent mode, then perform operation 2; Operation 2: There is an index and a set of candidate motion vectors associated with the most recent mode, using the nearest motion vector in the set of candidate motion vectors specified by the index as the current motion vector or a predicted value of the current motion vector; If the value of the parameter and / or syntax element indicates that other methods are used, perform operation 3; Operation 3: There are parameters or syntax elements related to other modes, Use other methods to decode the current motion vector.

7. A decoding device for image compression, characterized in that: Includes at least the following modules: 1) A compressed data code stream parsing module, when decoding a current motion vector in a decoding block, parses the compressed data code stream to obtain information indicating at least a decoding method of the current motion vector; 2) A decoding module, which selects one of multiple decoding modes including a nearest mode or one of multiple decoding modes including a nearest mode and a neighboring mode to perform a motion vector decoding operation on the current motion vector; the neighboring mode is a mode of decoding the current motion vector by using at least one or more motion vectors that are adjacent or neighboring to the current motion vector in spatial position, referred to as adjacent motion vectors or neighboring motion vectors; the nearest mode is a mode of decoding the current motion vector by using at least one or more motion vectors that are closest to the current motion vector in decoding time sequence, referred to as nearest motion vectors, and the representation of the decoding time sequence includes a valid motion vector time sequence number, where the valid motion vector time sequence number of the current motion vector is j0, and the valid motion vector time sequence number of the one or more nearest motion vectors is j0-j, where j is a positive integer less than a predetermined positive integer J that is not greater than 20.

8. The decoding device according to claim 7, characterized in that The decoding block is a decoding area of ​​an image and / or a sequence of images and / or a video, including at least one of the following situations or a combination thereof: a macroblock, a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-area of ​​a CU, a prediction unit PU, and a transform unit TU.

9. The decoding device according to claim 7 or 8, characterized in that: The decoding operation includes the following operations: Determine a group of candidate motion vectors from one or more decoded motion vectors according to a predetermined rule, use an index to specify one of the candidate motion vectors as a motion vector prediction value, and use the motion vector prediction value as a prediction value of a current motion vector; and / or Determine a group of candidate motion vectors from one or more decoded motion vectors according to a predetermined rule, specify one of the candidate motion vectors as a motion vector prediction value using an index, and copy the motion vector prediction value as the current motion vector; The set of candidate motion vectors includes at least One or more decoded motion vectors that are adjacent or neighboring to the current motion vector in spatial position; and / or One or more decoded motion vectors that are closest to the current motion vector in decoding time order.

10. The decoding device according to claim 7 or 8, characterized in that Includes one or any combination of the following features, Feature 1: The information indicating the decoding mode of the current motion vector includes a direct, indirect, or direct-indirect mixed motion vector decoding mode identification code; If the motion vector decoding mode identification code takes a predetermined value, then, The motion vector is decoded using a neighboring method; If the motion vector decoding mode identification code takes another predetermined value, then Decode the motion vector using the nearest method; If the motion vector decoding mode identification code takes other predetermined values, then Decoding the motion vectors in other ways; The direct motion vector decoding mode identification code is composed of one or more bit strings or bit strings in the compressed data code stream, the indirect motion vector decoding mode identification code is a motion vector decoding mode identification code derived from other encoding parameters and / or decoding variables and / or other syntax elements of the compressed data code stream or a predetermined identification code default value, and the direct-indirect mixed motion vector decoding mode identification code is a partially direct and partially indirect mixed motion vector decoding mode identification code; Feature 2: The effectiveness includes: Decoded; or Decoded and of a predetermined type; or has been decoded and its value falls within a predetermined value range; or has been decoded and its value falls outside a predetermined value range; or Decoded and not using neighboring methods; or Decoded and the value of its motion vector is not equal to the value of its K most recent valid motion vectors; or Decoded and not using the neighboring method and the value of its motion vector is not equal to the value of its nearest K valid motion vectors; or A combination of two or more of the above; Feature 3: The one or more motion vectors closest in decoding time sequence to the current motion vector with valid motion vector time sequence number n include one or a combination of the following K motion vectors: The valid motion vector R1 whose time sequence number is n - 1 The valid motion vector R2 whose time sequence number is n - 2 The valid motion vector R3 whose time sequence number is n - 3 … … … … The valid motion vector R whose time sequence number is n - K + 1 K-1 The valid motion vector R whose time sequence number is n - K K The effective motion vector time serial number is a time serial number assigned only to the effective motion vector according to the decoding time sequence of the effective motion vector; Feature 4: In addition to feature 3, the present invention also has the following features: Use an index recentMvIdx greater than or equal to 0 to specify the use of the valid motion vector with the valid motion vector time sequence number n - 1- recentMvIdx to decode the current motion vector; feature 5: The neighboring mode, the nearest mode or other mode is selected to decode the current motion vector in the following manner and parameters and / or syntax elements: There is a set of parameters and / or syntax elements, If the value of the parameter and / or syntax element indicates that the neighboring method is used, then perform operation 1; Operation 1: There are neighbor-wise related indices and candidate motion vector groups, using that one adjacent or neighboring motion vector in the set of candidate motion vectors specified by the index as the current motion vector or a predicted value of the current motion vector; If the value of the parameter and / or syntax element indicates to use the most recent mode, then perform operation 2; Operation 2: There is an index and a set of candidate motion vectors associated with the most recent mode, using the nearest motion vector in the set of candidate motion vectors specified by the index as the current motion vector or a predicted value of the current motion vector; If the value of the parameter and / or syntax element indicates that other methods are used, perform operation 3; Operation 3: There are parameters or syntax elements related to other modes, Use other methods to decode the current motion vector.

Citation Information

Patent Citations

  • Image encoding method, image decoding method, image encoding device and image decoding device

    CN104683805A

  • Image coding and decoding method and device

    CN104853209A