String prediction decoding method and device for sharing a buffer by a string vector and pixel values

By storing the string displacement vector and element components in the same buffer array in the parsing stage of general string prediction, the problem of waste of buffer array space in the prior art is solved, achieving more efficient data compression and reducing costs.

CN115174929BActive Publication Date: 2025-06-13TONGJI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210521675.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2025-06-13
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

In the analysis stage of general string prediction, the prior art needs to save the string displacement vector and element components of each current element separately, resulting in wasting buffer array space and increasing implementation costs.

Method used

During the parsing phase of universal string prediction, the string displacement vector and element components of each current element are saved in the same buffer array to save buffer array space and reduce costs.

Benefits of technology

It effectively reduces the space occupied by buffer arrays, reduces the implementation cost of decoders, and improves the efficiency of data compression.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0003643725130000101
    Figure BDA0003643725130000101
  • Figure BDA0003643725130000111
    Figure BDA0003643725130000111
  • Figure BDA0003643725130000112
    Figure BDA0003643725130000112
Patent Text Reader

Abstract

The present invention discloses a string prediction decoding method and apparatus that share a buffer for string vectors and pixel values. The method includes: inputting a compressed data bitstream; using an array of string prediction type buffers for each element to represent the string prediction type of each element, where the string prediction type of an element taking the first predetermined value, the second predetermined value, and the third predetermined value respectively indicates that the element is an element of an offset string and not a one-time or multiple-copy element of an existing unpredictable element, an element of a coordinate string, or other elements; using an array of string prediction parameter buffers for each element to save the string displacement vector of each element or save the element components of each element: if the string prediction type of a certain element takes the first predetermined value, then save its string displacement vector, otherwise save its element components; and outputting reconstructed elements. The method of the present invention can achieve sharing the same buffer array for string displacement vectors and element components, and can greatly reduce the space occupied by the buffer array.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image coding and decoding, and relates to a decoding method and device for compressing images and videos using general string prediction. In particular, it relates to a method and device that can save buffer array space and reduce costs by storing the string displacement vector and element components of each current element in the same buffer array during the parsing stage of general string prediction. Background Art

[0002] As human society enters the era of artificial intelligence, big data, virtual reality, augmented reality, mixed reality, cloud computing, mobile computing, cloud-mobile computing, ultra-high definition (4K) and extra-ultra-high definition (8K) video image resolution, and 4G / 5G communication, it has become an essential technology to perform data compression with ultra-high compression ratios and extremely high quality on various data, including big data, image data, image sequence data (i.e., video data), and various new forms of data, such as data containing a mixture of computer-generated content and content captured by optoelectronic sensors (including images, i.e., single-frame videos).

[0003] A data set is a collection composed of data elements (e.g., bytes, bits, pixels, pixel components, spatial sampling points, transform domain coefficients).

[0004] In data compression, an encoder encodes an input data set (also referred to as an original data set) to generate a compressed data bitstream; while a decoder decodes the compressed data bitstream to generate an output data set (also referred to as a reconstructed data set or a rebuilt data set). A compression where the input data set and the output data set are exactly the same, i.e., without distortion, is called lossless compression. A compression where the input data set and the output data set are not exactly the same, i.e., with distortion, is called lossy compression.

[0005] When encoding or decoding a data set (abbreviated as coding and decoding), the data elements are usually sorted according to a predetermined rule, i.e., the front-back order is specified, and the coding and decoding are performed in the front-back order.

[0006] When encoding (and corresponding decoding) data compression for a dataset arranged in a certain spatial (one-dimensional, two-dimensional, or multi-dimensional) shape (such as a one-dimensional data queue, a two-dimensional data file, a frame of an 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), especially for datasets with two or more dimensions, this dataset is generally divided into several subsets with a predetermined shape and / or size (i.e., the number of elements), called integral compression units. Encoding or decoding is performed one integral compression unit by one in a predetermined order. At any given moment, the integral compression unit being encoded or decoded is called the current integral compression unit. The data elements being encoded or decoded (sometimes also simply referred to as elements) are called the current encoded data elements or the current decoded data elements, collectively referred to as the current data elements, simply called the current elements. An element consists of N components (usually 1 ≤ N ≤ 5), so the dataset and the integral compression unit also consist of N components. The components of an element are also called component elements.

[0007] For example, the elements of a frame of an image, i.e., pixels, are arranged in a rectangular shape with a size (resolution) of 1920 (width) x 1080 (height) and consist of 3 components: the G (green) component, the B (blue) component, the R (red) component or the Y (luminance) component, the U (Cb chrominance) component, and the V (Cr chrominance) component.

[0008] The relationship between a multi-component data set as an encoding object and the sampling rates of the components of an entire compression unit is usually represented by a sampling format. Data in which all N components have the same sampling rate and size (i.e., the number of component samples) is called full-sampling format data. Data in which the N components have different sampling rates and sizes, and the sampling rate and size of N1 of the components, called the main components, are integer multiples of the sampling rate and size of the remaining N−N1 components, called the secondary components, is called sub-sampled format data. The integer multiple is usually 2 times, 4 times, 8 times, 2×2 times, 4×2 times, etc. In full-sampling format data, all components are considered main components and there are no secondary components. In sub-sampled format data, at least one component is a main component and at least one component is a secondary component. For example, for an array of a type of two-dimensional data elements including computer-generated images with graphics and text, a sampling format called 4:4:4 (abbreviated as 444) is usually adopted, that is, the 3 components of the data set all have the same sampling rate and size (i.e., the number of component samples). For another array of two-dimensional data elements including natural images and videos captured by a camera, a sampling format called 4:2:0 (abbreviated as 420) is usually adopted, that is, the sampling rates and sizes of 2 components (D component and E component), called secondary components, of a data set (such as an image or video) with a rectangular shape and 3 components are one-fourth of those of another component, called the main component (F component), that is, there is a 4:1 sub-sampling relationship between the main component and the secondary components. In this case, one D component D[i][j] and one E component E[i][j] correspond to four (2×2) F components F[2i][2j], F[2i + 1][2j], F[2i][2j + 1], F[2i + 1][2j + 1]. If the resolution of the F component is 2M×2N (2M component elements horizontally and 2N component elements vertically), that is, the F component of the data set is F = {F[m][n]: m = 0~2M−1, n = 0~2N−1}, then the resolutions of the D component and the E component are both M×N (M component elements horizontally and N component elements vertically), that is, the D component and the E component of the data set are D = {D[m][n]: m = 0~M−1, n = 0~N−1} and E = {E[m][n]: m = 0~M−1, n = 0~N−1}, respectively. In cases where higher quality is also required for the secondary components, a sampling format called 4:2:2 (abbreviated as 422) is often used, that is, the sampling rates and sizes of 2 secondary components (D component and E component) of a data set (such as an image or video) with a rectangular shape and 3 components are one-half of those of another main component (F component), that is, there is a 2:1 sub-sampling relationship between the main component and the secondary components.In this case, in one direction (e.g., the horizontal direction) of a data set (such as an image or a video), a D component D[i][j] and an E component E[i][j] correspond to two (2×1) F components F[2i][j] and F[2i + 1][j]. If the resolution of the F component is 2M×N, that is, the F component of the data set is F = {F[m][n]: m = 0 to 2M - 1, n = 0 to N - 1}, then the resolutions of the D component and the E component are both M×N, that is, the D component and the E component of the data set are respectively D = {D[m][n]: m = 0 to M - 1, n = 0 to N - 1} and E = {E[m][n]: m = 0 to M - 1, n = 0 to N - 1}. In images and videos using the YUV or YCbCr or YCgCo color format, the above-mentioned F, D, and E components are usually the Y, U, V components or the Y, Cb, Cr components or the Y, Cg, Co components respectively. In images and videos using the RGB color format, the above-mentioned F, D, and E components are usually the G, B, R components or the G, R, B components respectively. In the case where the data is an image or a video, the sampling format is also often referred to as the chrominance format. The chrominance format in which all components have the same sampling rate is called the full chrominance format. The chrominance format in which there is a downsampling relationship between one part of the components and another part of the components is called the downsampling chrominance format.

[0009] In the case where the data set is divided into integral compression units, a predetermined rule for sorting is to first sort the integral compression units and then sort the elements within each integral compression unit.

[0010] An effective means of data compression is universal string prediction, also known as universal string matching. Universal string prediction arranges the elements of a current integral compression unit in a predetermined scanning manner and then divides them into variable-length element strings. For a current element string, simply referred to as the current string, among a set or a subset of elements that have completed a predetermined degree of encoding and decoding, called the reference set, a reference element string with the same or similar value as the current string, simply referred to as the reference string, is also called the reference string or prediction string or matching string of the current string. For the reference string of a current string, only a few encoding parameters are needed to record the position and / or shape and / or size and / or dimensions of the reference string in the reference set, rather than recording the values of each element in the current string one by one, so as to completely represent all the elements and their values of the current string, thus achieving the purpose of data compression.

[0011] For example, for a current string sorted in a predetermined scanning manner, if a corresponding reference string can be found in the reference set, only two coding parameters, namely the positional relationship between the first element (i.e., the starting element) of the current string and the first element (i.e., the starting element) of the reference string, and the string length (the number of elements in the string), are required to record the position and size of the reference string in the reference set, without the need to record the values of each element in the current string one by one. In this way, all elements of the current string and their values can be completely represented. The number of bits consumed for recording the two coding parameters is often much less than the number of bits consumed for recording the values of each element in the current string one by one, thus achieving the purpose of data compression.

[0012] In general string prediction, there may also be unpredictable elements for which no reference elements can be found in the reference set. The components, main components, and secondary components of unpredictable elements are respectively called unpredictable components, unpredictable main components, and unpredictable secondary components.

[0013] Scanning methods often used in general string prediction include:

[0014] Horizontal raster scanning: The elements within a whole compression unit are arranged one by one along the horizontal direction. After arranging one row, the next row is arranged. The scanning direction within all rows is from left to right or from right to left;

[0015] Or

[0016] Horizontal back-and-forth scanning, also known as shuttle scanning or bow scanning: The elements within a whole compression unit are arranged one by one along the horizontal direction. After arranging one row, the next row is arranged. In any two adjacent rows, the scanning direction within one row is from left to right and the scanning direction within the other row is from right to left. The row with the scanning direction from left to right is called the forward row, and the row with the scanning direction from right to left is called the reverse row;

[0017] Or

[0018] Vertical raster scanning: The elements within a whole compression unit are arranged one by one along the vertical direction. After arranging one column, the next column is arranged. The scanning direction within all columns is from top to bottom or from bottom to top;

[0019] Or

[0020] Vertical back-and-forth scanning, also known as shuttle scanning or bow scanning: The elements within a whole compression unit are arranged one by one along the vertical direction. After arranging one column, the next column is arranged. In any two adjacent columns, the scanning direction within one column is from top to bottom and the scanning direction within the other column is from bottom to top. The column with the scanning direction from top to bottom is called the forward column, and the column with the scanning direction from bottom to top is called the reverse column.

[0021] The scanning of a string, where the first element in the permutation is called the starting element, and the scanning of a string, where the last element in the permutation is called the ending element.

[0022] Horizontal raster scanning and horizontal back-and-forth scanning are collectively referred to as horizontal scanning, and vertical raster scanning and vertical back-and-forth scanning are collectively referred to as vertical scanning. Horizontal raster scanning and vertical raster scanning are collectively referred to as raster scanning. Horizontal back-and-forth scanning and vertical back-and-forth scanning are collectively referred to as back-and-forth scanning. After the elements within a whole compression unit are arranged in the order of a predetermined scanning method, each has a unique serial number, called the element serial number. The position of an element within a whole compression unit can be represented either by its coordinates within the whole compression unit or by its element serial number.

[0023] The whole compression unit of the general string prediction coding mode consists of the following three types of strings:

[0024] 1) Coordinate string. For all current elements on a string, the reference element is the same element within the reference set, and its position within the reference set is represented by a coordinate. The value of the current element is derived according to the coordinate.

[0025] 2) Unpredictable element string. A string consists of one or more unpredictable elements; an unpredictable element is a current element without a reference element, and the encoder writes its value into the compressed data bitstream in a predetermined manner and transmits it to the decoder.

[0026] 3) Offset string. For all current elements on the string, the position of the reference element within the reference set relative to the current element is represented by a string displacement vector. Therefore, according to the position of the current element and the string displacement vector, the position of the reference element can be calculated and the value of the reference element can be retrieved, and then the value of the reference element is assigned to the current element; that is to say, each current element on the offset string is a copy element of its reference element. Obviously, if the reference element itself is an existing unpredictable element, then this current element is a copy element of the existing unpredictable element; if the reference element itself is a copy element of an existing unpredictable element, then this current element is a secondary copy element of the existing unpredictable element.

[0027] The process of general string prediction decoding is divided into two stages: parsing and decoding. The parsing stage includes parsing the compressed data bitstream, obtaining the values of various syntax elements from the bitstream and deriving multiple string prediction parameters for each current element, and storing the derived various string prediction parameters in the string prediction parameter buffer array. The decoding stage includes taking out the string prediction parameters from the string prediction parameter buffer array, performing various operations including general string prediction decoding according to the string prediction parameters, obtaining at least the reconstructed elements, and putting the reconstructed elements into the reconstructed data set storage space.

[0028] The string prediction parameters include: 1) the string displacement vector of the current element, which consists of a horizontal component and a vertical component; 2) each element component of the current element, such as the Y component, U component, and V component.

[0029] In the prior art, a buffer array is used to save the string displacement vector of the elements of a whole compression unit; another buffer array is used to save each component of the elements of a whole compression unit.

[0030] However, in fact, in the parsing stage of general string prediction, it is not necessarily required to save all the string displacement vectors and element components of each current element. The way of saving all wastes part of the space of the buffer array and increases the implementation cost of the decoder.

[0031] Therefore, it is of great practical significance to develop a method that can save the string displacement vector and element components of elements in the same buffer array. Summary of the Invention

[0032] Due to the above-mentioned defects in the prior art, the present invention provides a method and device that can save the string displacement vector and element components of each current element in the same buffer array in the parsing stage of general string prediction to save the space of the buffer array and thus reduce the cost, overcoming the defect that the string displacement vector and element components in the prior art need to be saved in different buffer arrays, resulting in a certain degree of waste of the buffer array space and increasing the implementation cost.

[0033] To achieve the above object, the present invention provides the following technical solutions:

[0034] A decoding method for a whole compression unit of a general string prediction coding mode, at least including steps to complete the following functions and operations:

[0035] (1) Input at least the compressed data stream of a whole compression unit;

[0036] (2) Use a buffer array of string prediction types for each element to represent the string prediction type of each element:

[0037] When the string prediction type of an element takes the first predetermined value, it means that the element is an element of an offset string and is not a one-time or multiple-copy element of an existing unpredictable element.

[0038] When the string prediction type of an element takes the second predetermined value, it means that the element is an element of a coordinate string.

[0039] When the string prediction type of an element takes the third predetermined value, it means that the element is an element of an unpredictable element string or an element of an offset string and is a one-time or multiple-copy element of an existing unpredictable element.

[0040] (3) Use an array of string prediction parameter buffers for each element to save the string displacement vector of each element or save the element components of each element: If the string prediction type of an element takes the first predetermined value, save the string displacement vector of the element; otherwise, save the element components of the element.

[0041] (4) Output at least the reconstructed elements of one integer compression unit.

[0042] After applying the above method, it is possible to share the same buffer array for the string displacement vector and the element components. Compared with the prior art, it can effectively and significantly reduce the space occupied by the buffer array and reduce the implementation cost of the decoder.

[0043] As a preferred technical solution:

[0044] For the decoding method as described above, the original data is an array or a sequence of arrays including images, sequences of images, two-dimensional data elements of videos.

[0045] The integer compression unit includes one or a combination of the following coding units: macroblock, coding unit CU, sub-region of CU, sub-coding unit SubCU, prediction block, prediction unit PU, sub-region of PU, sub-prediction unit SubPU, transform block, transform unit TU, sub-region of TU, sub-transform unit SubTU.

[0046] For the decoding method as described above, the string prediction type buffer array of each element is denoted as StrType[sPos], and the string prediction parameter buffer array of each element has at least 3 components, denoted as StrPara[sPos][0], StrPara[sPos][1], StrPara[sPos][2] respectively, where sPos is the element number of each element, the first predetermined value, the second predetermined value, and the third predetermined value are 0, 1, and 2 respectively, and the element consists of 3 components denoted as Y, U, and V respectively, and the scanning method is a back-and-forth scan.

[0047] For the decoding method as described above, the current string is an offset string with a length of strLength, the element number of its starting element is sPos, the reference element of the current element is the element above the current element, called the upper element, and the difference between the element number of the current element and the element number of the reference element is denoted as offsetAbove. The syntax description definition table for assigning values to StrType[sPos], StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] includes:

[0048]

[0049]

[0050] In the above syntax description definition table, express? a:b is a conditional assignment operator: if the result of the expression express is true or not 0, then a is used for assignment; otherwise, b is used for assignment.

[0051] In the decoding method as described above, the current string is a coordinate string with a length of strLength, the element number of its starting element is sPos, and the x coordinate and y coordinate representing the position of the reference element in the reference set curI[x][y][cIdx] are PCA[pca_address][0] and PCA[pca_address][1] respectively, where PCA[][] is an array storing coordinates, and pca_address is the address of the coordinates in this array. The syntax description definition table for assigning values to StrType[sPos], StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] includes:

[0052]

[0053] In the above syntax description definition table, when cIdx is 0, 1, and 2, they represent the Y, U, and V components respectively.

[0054] In the decoding method as described above, the current string is an unpredictable element string with a length of strLength, the element number of its starting element is sPos, and the three component values of the unpredictable element exist in the compressed data bitstream. The syntax description definition table for assigning values to StrType[sPos], StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] includes:

[0055]

[0056]

[0057] In the above syntax description definition table, unpredictable_pixel_val represents a syntax element existing in the bitstream, and when cIdx is 0, 1, and 2, they represent the Y, U, and V components respectively.

[0058] In the decoding method as described above, the coordinates of the upper left corner element of the current entire compression unit in the compensated sample data set denoted as curI are (x0, y0);

[0059] The horizontal size and vertical size of the current entire compression unit are both CuSize = (1 << SizeInBit);

[0060] The scan mode flag of the current entire compression unit is UspScanModeFlag. A value of 1 indicates that the current entire compression unit uses the vertical scan mode, and a value of 0 indicates that the current entire compression unit uses the horizontal scan mode;

[0061] The element curI[x0 + x][y0 + y][cIdx] of the current entire compression unit after general string prediction decoding, where x = 0 to CuSize - 1, y = 0 to CuSize - 1, and cIdx = 0 to 2, is obtained according to the following operation steps:

[0062] 1) Initialize sPos to 0.

[0063] 2) If sPos is less than CuSize × CuSize, repeat the following operation steps 3) to 6) in sequence:

[0064] 3) Calculate the coordinates x and y of the current element in the current entire compression unit from the current element number sPos:

[0065] x = TravScan[SizeInBit - 3][sPos][UspScanModeFlag]

[0066] y = TravScan[SizeInBit - 3][sPos][1 - UspScanModeFlag]

[0067] 4) If StrType[sPos] is equal to 0, calculate the current element curI[x0 + x][y0 + y][cIdx] as follows:

[0068] for (cIdx = 0; cIdx < 3; cIdx++)

[0069] curI[x0 + x][y0 + y][cIdx] = curI[x0 + x - StrPara[sPos][0]][y0 + y - StrPara[sPos][1]][cIdx]

[0070] 5) Otherwise, calculate the current element curI[x0 + x][y0 + y][cIdx] as follows:

[0071] for (cIdx = 0; cIdx < 3; cIdx++)

[0072] curI[x0 + x][y0 + y][cIdx] = StrPara[sPos][cIdx]

[0073] 6) Update sPos: sPos += 1.

[0074] The present invention provides a decoding device for an integer compression unit of a general string prediction coding mode, which includes a module for implementing the decoding method of an integer compression unit of a general string prediction coding mode as described above.

[0075] Specifically, the decoding device at least includes modules for completing the following functions and operations:

[0076] (1) Input at least the compressed data stream of one integer compression unit;

[0077] (2) Use an array of string prediction type buffers for each element to represent the string prediction type of each element:

[0078] When the string prediction type of an element takes the first predetermined value, it indicates that the element is an element of an offset string and is not a replicated element of an existing unpredictable element one or more times.

[0079] When the string prediction type of an element takes the second predetermined value, it indicates that the element is an element of a coordinate string.

[0080] When the string prediction type of an element takes the third predetermined value, it indicates that the element is an element of an unpredictable element string or an element of an offset string and is a replicated element of an existing unpredictable element one or more times;

[0081] (3) Use an array of string prediction parameter buffers for each element to save the string displacement vector of each element or save the element components of each element: If the string prediction type of an element takes the first predetermined value, save the string displacement vector of the element, otherwise, save the element components of the element;

[0082] (4) Output at least the reconstructed elements of one integer compression unit.

[0083] The present invention also provides an electronic device, which includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement any one of the following methods:

[0084] The decoding method of an integer compression unit of a general string prediction coding mode as described above.

[0085] In addition, the present invention also provides a computer-readable storage medium. At least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement any one of the following methods:

[0086] The decoding method of an integer compression unit of a general string prediction coding mode as described above.

[0087] The present invention is applicable to the encoding and decoding of lossy compression of data, and is also applicable to the encoding and decoding of lossless compression of data. The present invention is applicable to the encoding and decoding of one-dimensional data such as string data or byte string data or one-dimensional graphics or fractal graphics, and is also applicable to the encoding and decoding of two-dimensional or higher-dimensional data such as images, image sequences or video data.

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

[0089] One-dimensional data;

[0090] Two-dimensional data;

[0091] Multi-dimensional data;

[0092] Graphics;

[0093] Fractal graphics;

[0094] Images;

[0095] Sequences of images;

[0096] Videos;

[0097] Audio;

[0098] Files;

[0099] Bytes;

[0100] Bits;

[0101] Pixels;

[0102] Three-dimensional scenes;

[0103] Sequences of continuously changing three-dimensional scenes;

[0104] Virtual reality scenes;

[0105] Sequences of continuously changing virtual reality scenes

[0106] Images in pixel form;

[0107] Transformed domain data of images;

[0108] Sets of two-dimensional or more two-dimensional bytes;

[0109] Sets of two-dimensional or more two-dimensional bits;

[0110] Sets of pixels;

[0111] Sets of single-component pixels;

[0112] Sets of three-component pixels (R, G, B, A);

[0113] Set of three-component pixels (Y, U, V);

[0114] Set of three-component pixels (Y, Cb, Cr);

[0115] Set of three-component pixels (Y, Cg, Co);

[0116] Set of four-component pixels (C, M, Y, K);

[0117] Set of four-component pixels (R, G, B, A);

[0118] Set of four-component pixels (Y, U, V, A);

[0119] Set of four-component pixels (Y, Cb, Cr, A);

[0120] Set of four-component pixels (Y, Cg, Co, A).

[0121] The technical features of the present invention are illustrated by a number of specific examples as above. 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 implementation manners, 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. Specific Embodiments

[0122] The following further describes the structure of the present invention in conjunction with specific embodiments, but it is not a limitation of the present invention.

[0123] The units involved in the following methods and apparatuses are specifically as follows:

[0124] The original data is an array or sequence of arrays of two-dimensional data elements including images, sequences of images, and videos;

[0125] The integer compression unit includes one or a combination of the following coding units: macroblock, coding unit CU, sub-region of CU, sub-coding unit SubCU, prediction block, prediction unit PU, sub-region of PU, sub-prediction unit SubPU, transform block, transform unit TU, sub-region of TU, sub-transform unit SubTU.

[0126] Embodiment 1

[0127] A decoding method for an integer compression unit of a general string prediction coding mode, including steps of performing the following functions and operations:

[0128] (1) Input at least the compressed data bitstream of one integer compression unit;

[0129] (2) Use an array of string prediction type buffers for each element to represent the string prediction type of each element:

[0130] When the string prediction type of an element takes the first predetermined value, it indicates that the element is an element of an offset string and is not an element that is a copy of an existing unpredictable element one or more times.

[0131] When the string prediction type of an element takes the second predetermined value, it indicates that the element is an element of a coordinate string.

[0132] When the string prediction type of an element takes the third predetermined value, it indicates that the element is an element of an unpredictable element string or an element of an offset string and is an element that is a copy of an existing unpredictable element one or more times;

[0133] The array of string prediction type buffers for each element is denoted as StrType[sPos]. The array of string prediction parameter buffers for each element has at least 3 components, denoted as StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] respectively, where sPos is the element serial number of each element. The first predetermined value, the second predetermined value, and the third predetermined value are 0, 1, and 2 respectively. The element consists of 3 components denoted as Y, U, and V respectively, and the scanning method is back-and-forth scanning;

[0134] The current string is an offset string with a length of strLength, the element serial number of its starting element is sPos, the reference element of the current element is the element located above the current element, called the upper element, and the difference between the element serial number of the current element and the element serial number of the reference element is denoted as offsetAbove. The syntax description definition table for assigning values to StrType[sPos], StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] includes:

[0135]

[0136] In the above syntax description definition table, express?a:b is a conditional assignment operator: if the result of the expression express is true or not 0, then use a for assignment; otherwise, use b for assignment;

[0137] (3) Use an array of string prediction parameter buffers for each element to save the string displacement vector of each element or save the element components of each element: If the string prediction type of an element takes the first predetermined value, then save the string displacement vector of the element; otherwise, save the element components of the element.

[0138] (4) Output at least one reconstructed element of an integer compression unit.

[0139] Example 2

[0140] A decoding method for an integer compression unit of a general string prediction coding mode, including steps to complete the following functions and operations:

[0141] (1) Input at least the compressed data stream of one integer compression unit;

[0142] (2) Use an array of string prediction type buffers for each element to represent the string prediction type of each element:

[0143] When the string prediction type of an element takes the first predetermined value, it means that the element is an element of an offset string and is not a replicated element of an existing unpredictable element one or more times.

[0144] When the string prediction type of an element takes the second predetermined value, it means that the element is an element of a coordinate string.

[0145] When the string prediction type of an element takes the third predetermined value, it means that the element is an element of an unpredictable element string or an element of an offset string and is a replicated element of an existing unpredictable element one or more times.

[0146] The array of string prediction type buffers for each element is denoted as StrType[sPos]. The array of string prediction parameter buffers for each element has at least 3 components, denoted as StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] respectively, where sPos is the element sequence number of each element. The first predetermined value, the second predetermined value, and the third predetermined value are 0, 1, and 2 respectively. The element consists of 3 components denoted as Y, U, and V respectively, and the scanning method is back-and-forth scanning.

[0147] The current string is a coordinate string with a length of strLength, and the element sequence number of its starting element is sPos. The x coordinate and y coordinate representing the position of the reference element in the reference set curI[x][y][cIdx] are PCA[pca_address][0] and PCA[pca_address][1] respectively, where PCA[][] is an array for storing coordinates and pca_address is the address of the coordinate in this array. The syntax description definition table for assigning values to StrType[sPos], StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] includes:

[0148]

[0149] In the above syntax description definition table, cIdx being 0, 1, and 2 represents the Y, U, and V components respectively.

[0150] (3) Use an array of string prediction parameter buffers for each element to save the string displacement vector of each element or save the element components of each element: If the string prediction type of an element takes the first predetermined value, save the string displacement vector of the element; otherwise, save the element components of the element.

[0151] (4) Output at least the reconstructed elements of one integer compression unit.

[0152] Embodiment 3

[0153] A decoding method for an integer compression unit of a general string prediction coding mode, including steps to complete the following functions and operations:

[0154] (1) Input at least the compressed data bitstream of one integer compression unit.

[0155] (2) Use an array of string prediction type buffers for each element to represent the string prediction type of each element:

[0156] The string prediction type of an element taking the first predetermined value indicates that the element is an element of an offset string and is not a replicated element of an existing unpredictable element one or more times.

[0157] The string prediction type of an element taking the second predetermined value indicates that the element is an element of a coordinate string.

[0158] The string prediction type of an element taking the third predetermined value indicates that the element is an element of an unpredictable element string or an element of an offset string and is a replicated element of an existing unpredictable element one or more times.

[0159] The array of string prediction type buffers for each element is denoted as StrType[sPos]. The array of string prediction parameter buffers for each element has at least 3 components, denoted as StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] respectively, where sPos is the element serial number of each element. The first predetermined value, the second predetermined value, and the third predetermined value are 0, 1, and 2 respectively. An element consists of 3 components denoted as Y, U, and V respectively, and the scanning method is a back-and-forth scan.

[0160] The current string is an unpredictable element string with a length of strLength, and the element serial number of its starting element is sPos. The three component values of the unpredictable element exist in the compressed data bitstream. The syntax description definition table for assigning values to StrType[sPos], StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] includes:

[0161]

[0162] In the above syntax description definition table, unpredictable_pixel_val represents a syntax element existing in the bitstream, and cIdx being 0, 1, or 2 represents the Y, U, and V components respectively;

[0163] (3) Use an array of string prediction parameter buffers for each element to save the string displacement vector of each element or save the element components of each element: If the string prediction type of an element takes the first predetermined value, save the string displacement vector of the element; otherwise, save the element components of the element;

[0164] (4) Output at least the reconstructed elements of one integer compression unit.

[0165] Embodiment 4

[0166] A decoding method for an integer compression unit of a general string prediction coding mode, including steps to complete the following functions and operations:

[0167] (1) Input at least the compressed data bitstream of one integer compression unit;

[0168] (2) Use an array of string prediction type buffers for each element to represent the string prediction type of each element:

[0169] The string prediction type of an element taking the first predetermined value indicates that the element is an element of an offset string and not a replicated element of an existing unpredictable element one or more times,

[0170] The string prediction type of an element taking the second predetermined value indicates that the element is an element of a coordinate string,

[0171] The string prediction type of an element taking the third predetermined value indicates that the element is an element of an unpredictable element string or an element of an offset string and is a replicated element of an existing unpredictable element one or more times;

[0172] The array of string prediction type buffers for each element is denoted as StrType[sPos], and the array of string prediction parameter buffers for each element has at least 3 components, denoted as StrPara[sPos][0], StrPara[sPos][1], and StrPara[sPos][2] respectively, where sPos is the element sequence number of each element, the first predetermined value, the second predetermined value, and the third predetermined value are 0, 1, and 2 respectively, the element consists of 3 components denoted as Y, U, and V respectively, and the scanning method is a back-and-forth scan;

[0173] The coordinates of the upper left corner element of the current integer compression unit in the compensated sample data set denoted as curI are (x0, y0);

[0174] The horizontal and vertical dimensions of the current entire compression unit are both CuSize = (1 << SizeInBit);

[0175] The scan mode flag of the current entire compression unit is UspScanModeFlag. A value of 1 indicates that the current entire compression unit uses the vertical scan mode, and a value of 0 indicates that the current entire compression unit uses the horizontal scan mode;

[0176] The elements curI[x0 + x][y0 + y][cIdx] of the current entire compression unit that have undergone general string prediction decoding, where x = 0 to CuSize - 1, y = 0 to CuSize - 1, and cIdx = 0 to 2, are obtained according to the following operation steps:

[0177] 1) Initialize sPos to 0,

[0178] 2) If sPos is less than CuSize × CuSize, then repeatedly execute the following operation steps 3) to 6) in sequence,

[0179] 3) Calculate the coordinates x and y of the current element in the current entire compression unit from the current element number sPos:

[0180] x = TravScan[SizeInBit - 3][sPos][UspScanModeFlag]

[0181] y = TravScan[SizeInBit - 3][sPos][1 - UspScanModeFlag]

[0182] 4) If StrType[sPos] is equal to 0, then calculate the current element curI[x0 + x][y0 + y][cIdx] as follows:

[0183] for (cIdx = 0; cIdx < 3; cIdx++)

[0184] curI[x0 + x][y0 + y][cIdx] = curI[x0 + x - StrPara[sPos][0]][y0 + y - StrPara[sPos][1]][cIdx]

[0185] 5) Otherwise, calculate the current element curI[x0 + x][y0 + y][cIdx] as follows:

[0186] for (cIdx = 0; cIdx < 3; cIdx++)

[0187] curI[x0 + x][y0 + y][cIdx] = StrPara[sPos][cIdx]

[0188] 6) Update sPos: sPos += 1;

[0189] (3) Use an array of string prediction parameter buffers for each element to save the string displacement vector of each element or save the element components of each element: If the string prediction type of an element takes the first predetermined value, then save the string displacement vector of the element; otherwise, save the element components of the element.

[0190] (4) Output at least the reconstructed elements of one integer compression unit.

[0191] Embodiment 5

[0192] A decoding device for an integer compression unit of a general string prediction coding mode, which includes a module for implementing the decoding method of an integer compression unit of a general string prediction coding mode as described in Embodiment 1.

[0193] Embodiment 6

[0194] A decoding device for an integer compression unit of a general string prediction coding mode, which includes a module for implementing the decoding method of an integer compression unit of a general string prediction coding mode as described in Embodiment 2.

[0195] Embodiment 7

[0196] A decoding device for an integer compression unit of a general string prediction coding mode, which includes a module for implementing the decoding method of an integer compression unit of a general string prediction coding mode as described in Embodiment 3.

[0197] Embodiment 8

[0198] A decoding device for an integer compression unit of a general string prediction coding mode, which includes a module for implementing the decoding method of an integer compression unit of a general string prediction coding mode as described in Embodiment 4.

[0199] Embodiment 9

[0200] An electronic device, which includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory. The at least one instruction, at least one program, the code set or the instruction set is loaded and executed by the processor to implement the decoding method of an integer compression unit of a general string prediction coding mode as described in Embodiment 1.

[0201] Embodiment 10

[0202] An electronic device includes a processor and a memory. At least one instruction, at least one program, a code set, or an instruction set is stored in the memory, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement a decoding method for an integer compression unit of a general string prediction coding mode as described in Embodiment 2.

[0203] Embodiment 11

[0204] An electronic device includes a processor and a memory. At least one instruction, at least one program, a code set, or an instruction set is stored in the memory, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement a decoding method for an integer compression unit of a general string prediction coding mode as described in Embodiment 3.

[0205] Embodiment 12

[0206] An electronic device includes a processor and a memory. At least one instruction, at least one program, a code set, or an instruction set is stored in the memory, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement a decoding method for an integer compression unit of a general string prediction coding mode as described in Embodiment 4.

[0207] Embodiment 13

[0208] A computer-readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement a decoding method for an integer compression unit of a general string prediction coding mode as described in Embodiment 1.

[0209] Embodiment 14

[0210] A computer-readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement a decoding method for an integer compression unit of a general string prediction coding mode as described in Embodiment 2.

[0211] Embodiment 15

[0212] A computer-readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement a decoding method for an integer compression unit of a general string prediction coding mode as described in Embodiment 3.

[0213] Embodiment 16

[0214] A computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to perform a decoding method of an integer compression unit of a general string prediction coding mode as described in Embodiment 4.

[0215] Those skilled in the art should understand that those skilled in the art can implement variations in combination with the prior art and the above embodiments, which will not be elaborated here. Such variations do not affect the essence of the present invention and will not be elaborated here.

[0216] The above describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and the devices and structures not described in detail should be understood to be implemented in a common manner in the art; any person skilled in the art can make many possible changes and modifications to the technical solution of the present invention, or modify it into an equivalent embodiment with equivalent changes, without departing from the scope of the technical solution of the present invention, which does not affect the essence of the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the protection of the technical solution of the present invention.

Claims

1. A decoding method for an integer compression unit of a general string prediction coding mode, characterized in that, it at least includes steps to complete the following functions and operations: (1) Input at least the compressed data stream of an integer compression unit; (2) Use an array of string prediction type buffers for each element to represent the string prediction type of each element: When the string prediction type of an element takes the first predetermined value, it means that the element is an element of an offset string and is not a replicated element of an existing unpredictable element one or more times, When the string prediction type of an element takes the second predetermined value, it means that the element is an element of a coordinate string, When the string prediction type of an element takes the third predetermined value, it means that the element is an element of an unpredictable element string or an element of an offset string and is a replicated element of an existing unpredictable element one or more times; (3) Use an array of string prediction parameter buffers for each element to save the string displacement vector of each element or save the element components of each element: If the string prediction type of an element takes the first predetermined value, save the string displacement vector of the element, otherwise, save the element components of the element; (4) Output at least the reconstructed elements of an integer compression unit.

2. The decoding method according to claim 1, characterized in that, the original data is an array or a sequence of arrays of two-dimensional data elements including images, sequences of images, or videos; the integer compression unit includes one or a combination of the following coding units: macroblock, coding unit CU, sub-region of CU, sub-coding unit SubCU, prediction block, prediction unit PU, sub-region of PU, sub-prediction unit SubPU, transform block, transform unit TU, sub-region of TU, sub-transform unit SubTU.

3. The decoding method according to claim 1, characterized in that, the array of string prediction type buffers for each element is denoted as StrType[sPos], the array of string prediction parameter buffers for each element has at least 3 components, which are denoted as StrPara[sPos][0], StrPara[sPos][1], StrPara[sPos][2] respectively, where sPos is the element serial number of each element, the first predetermined value, the second predetermined value, and the third predetermined value are 0, 1, and 2 respectively, and the element consists of 3 components denoted as Y, U, and V respectively, and the scanning method is back-and-forth scanning.

4. A decoding device for an integer compression unit of a general string prediction coding mode, characterized in that, it includes a module for implementing the decoding method for an integer compression unit of a general string prediction coding mode according to any one of claims 1 to 3.

5. An electronic device, characterized in that, the electronic device includes a processor and a memory, and at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement any one of the following methods: the decoding method for an integer compression unit of a general string prediction coding mode according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, At least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to perform any one of the following methods: A decoding method for an integer compression unit of a general string prediction coding mode according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Coding and decoding method and device with point prediction chroma reconstruction values from multiple reference positions

    CN113938683A

  • Image encoding and decoding method, image processing device, and computer storage medium

    EP3306931A1