CN115174929A - Method and device for decoding serial prediction by sharing one buffer area by serial vectors and pixel values - Google Patents
Method and device for decoding serial prediction by sharing one buffer area by serial vectors and pixel values Download PDFInfo
- Publication number
- CN115174929A CN115174929A CN202210521675.5A CN202210521675A CN115174929A CN 115174929 A CN115174929 A CN 115174929A CN 202210521675 A CN202210521675 A CN 202210521675A CN 115174929 A CN115174929 A CN 115174929A
- Authority
- CN
- China
- Prior art keywords
- string
- spos
- cidx
- current
- compression unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 239000000872 buffer Substances 0.000 title claims abstract description 47
- 239000013598 vector Substances 0.000 title claims abstract description 30
- 238000006073 displacement reaction Methods 0.000 claims abstract description 26
- 238000007906 compression Methods 0.000 claims description 92
- 230000006835 compression Effects 0.000 claims description 92
- 238000005070 sampling Methods 0.000 description 12
- 238000013144 data compression Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000007547 defect Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/44—Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a string prediction decoding method and a device for sharing a buffer area by a string vector and a pixel value, wherein the method comprises the following steps: inputting a compressed data code stream; using a string prediction type buffer array of each element for representing the string prediction type of each element, wherein the string prediction type of the element takes a first preset value, a second preset value and a third preset value to respectively represent that the element is an element of an offset string and is not an element which is copied once or many times of an existing unpredictable element, an element of a coordinate string and other elements; using a set of string prediction parameter buffers for each element for holding a string displacement vector for each element or holding an element component for each element: if the string prediction type of a certain element takes a first preset value, the string displacement vector is stored, otherwise, the element component is stored; and outputting the reconstruction elements. The method of the invention can realize that the string displacement vector and the element component share the same buffer zone array, and can greatly reduce the space occupied by the buffer zone array.
Description
Technical Field
The invention relates to the technical field of image coding and decoding, in particular to a decoding method and a device thereof for compressing images and videos by adopting universal string prediction, and particularly relates to a method and a device thereof which can save string displacement vectors and element components of each current element in the same buffer array in the analysis stage of the universal string prediction so as to save the space of the buffer array and further reduce the cost.
Background
With the human society entering the era of artificial intelligence, big data, virtual reality, augmented reality, mixed reality, cloud computing, mobile computing, cloud-mobile computing, ultra-high definition (4K) and ultra-high definition (8K) video image resolution, 4G/5G communication, it becomes an indispensable technology to perform ultra-high compression ratio and extremely high quality data compression on various data including big data, image sequence data, i.e. video data, and various new-state data, such as data including mixed video (including image, i.e. single frame video) content of computer-generated content and photoelectric sensor-captured content.
A data set is a set of data elements (e.g., bytes, bits, pixels, pixel components, spatial sampling points, transform domain coefficients).
In data compression, an encoder encodes an input data set, also called an original data set, to generate a compressed data code stream; and the decoder decodes the compressed data code stream to generate an output data set and a reconstructed data set. Compression in which the input data set is identical to the output data set, i.e. without distortion, is referred to as lossless compression. Compression in which the input data set is not identical to the output data set, i.e., distorted, is referred to as lossy compression.
When encoding or decoding a data set (simply referred to as "encoding/decoding"), data elements are generally ordered according to a predetermined rule, that is, a predetermined sequence, and encoded/decoded in the sequence.
When encoding (and correspondingly decoding) data compression of a data set (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, a plurality of transform blocks, a three-dimensional scene, a sequence of continuously-changing three-dimensional scenes) arranged in a certain spatial (one-dimensional, two-dimensional, or multi-dimensional) shape, especially a two-dimensional or more data sets, the data set is generally divided into a plurality of subsets having predetermined shapes and/or sizes (i.e., the number of elements), which are referred to as whole compression units, and the data set is encoded or decoded in units of whole compression units in a predetermined order, one whole compression unit. At any one time, the integer compression unit being encoded or decoded is referred to as the current integer compression unit. A data element (also sometimes simply referred to as an element) being encoded or decoded is referred to as a currently encoded data element or a currently decoded data element, collectively referred to as a current data element, simply referred to as a current element. An element consists of N components (typically 1 ≦ N ≦ 5), so both the data set and the entire compression unit consist of N components. The components of an element are also referred to as component elements.
For example, elements of one frame image, i.e., pixels, are arranged in a rectangular shape, have a size (resolution) of 1920 (width) x 1080 (height), and are composed of 3 components: g (green), B (blue), R (red) or Y (luminance), U (Cb), V (Cr).
The relationship between the multi-component data set as an encoding object and the sampling rate of each component of the integral compression unit is generally expressed in a sampling format. Data in which the N components all have the same sampling rate and size (i.e., the number of component samples) is referred to as full sample format data. The N components have different sampling rates and sizes, wherein the sampling rate and size of N1 components, called primary components, are integral multiples of the sampling rate and size of the remaining N-N1 components, called secondary components, are called downsampled format data. The integer multiple is typically 2 times, 4 times, 8 times, 2x2 times, 4x2 times, etc. In full-sample format data, all components are considered to be primary components, with no secondary components. At least one component of the downsampled formatted data is a primary component and at least one component of the downsampled formatted data is a secondary component. For example, for an array of two-dimensional data elements of the type comprising computer-generated graphics and text-containing images, a sampling format called 4. For another type of two-dimensional data element array, including natural images and videos captured by a camera, a sampling format called 4. 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 2 mx 2N (2M component elements horizontally, 2N component elements vertically), i.e., 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 and E components are each M × N (horizontal M component elements, vertical N component elements), i.e., the D and E components of the dataset are each D = { D [ M ] [ N ]: m =0 to M-1, N =0 to N-1} and E = { E [ M ] [ N ]: m = 0-M-1, N = 0-N-1 }. Where higher quality is also required for the secondary components, a sampling format called 4. In this case, in one direction (e.g., horizontal direction) of a data set (e.g., image or video), one D component D [ i ] [ j ] and one 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, i.e., the F component of the data set is F = { F [ M ] [ N ]: m = 0-2M-1, N = 0-N-1 }, then the resolutions of the D and E components are each M × N, respectively, i.e., the D and E components of the dataset are each D = { D [ M ] [ N ]: m =0 to M-1, N =0 to N-1} and E = { E [ M ] [ N ]: m = 0-M-1, N = 0-N-1 }. In images and video in YUV or YCbCr or YCgCo color formats, the F, D, E components described above are typically Y, U, V components or Y, cb, cr components or Y, cg, co components, respectively. In images and video in RGB color format, the F, D, E components described above are typically G, B, R components or G, R, B components, respectively. Where the data is an image or video, the sampling format is also often referred to as a chroma format. The chroma format in which the components all have the same sampling rate is referred to as the panchromatic format. A chroma format having a downsampled relationship between a portion of components and another portion of components is referred to as a downsampled chroma format.
In the case of a data set divided into whole compression units, one predetermined rule of ordering is to first order the whole compression units, and then order the elements within each whole compression unit.
One effective means of data compression is universal string prediction, also known as universal string matching. The general string prediction divides an element of a current whole compression unit into element strings with variable length after being arranged according to a preset scanning mode, and obtains a reference element string, called a reference string or a prediction string or a matching string of the current string, which has the same or similar numerical value with the current string, in a set or a subset of elements called a reference set and subjected to coding and decoding with preset degree, wherein the set or the subset is called the reference set. For a reference string of a current string, only a plurality of coding parameters are needed to record the position and/or shape and/or size and/or dimension of the reference string in a reference set, and the numerical value of each element in the current string is not needed to be recorded one by one, so that all elements of the current string and the numerical value thereof can be completely represented, and the purpose of data compression is achieved.
For example, if a current string ordered according to a predetermined scanning manner can find a corresponding reference string in the reference set, only two encoding parameters, namely, the position 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, and the numerical value of each element in the current string itself is not required to be recorded one by one, so that all elements of the current string and the numerical value thereof can be completely represented. The number of bits consumed by recording the two encoding parameters is often much less than the number of bits consumed by recording the numerical value of each element in the current string one by one, so that the purpose of data compression is achieved.
In general string prediction, unpredictable elements may also be present in the reference set for which no reference element is found. The components, principal components, and secondary components of the unpredictable element are referred to as unpredictable components, unpredictable principal components, and unpredictable secondary components, respectively.
Scanning methods often used in generic string prediction include:
horizontal raster scanning: the elements in the whole compression unit are arranged one by one along the horizontal direction, the next row is arranged after one row is arranged, and all the in-row scanning directions are arranged from left to right or all the in-row scanning directions are arranged from right to left;
or
Horizontal back and forth scanning is also known as reciprocating scanning or arcuate scanning: the elements in the whole compression unit are arranged one by one along the horizontal direction, the next row is arranged after the row is arranged, the in-row scanning direction of one row in any two adjacent rows is arranged from left to right, the in-row scanning direction of the other row is arranged from right to left, the row arranged from left to right is called a forward row, and the row arranged from right to left is called a reverse row;
or
Vertical raster scanning: the elements in the whole compression unit are arranged one by one along the vertical direction, the next column is arranged after one column is arranged, and all in-column scanning directions are arranged from top to bottom or all in-column scanning directions are arranged from bottom to top;
or
The vertical back and forth scan is also called a back and forth scan or an arcuate scan: the elements in one whole compression unit are arranged one by one along the vertical direction, the next column is arranged after one column is arranged, the in-column scanning direction of one column in any two adjacent columns is arranged from top to bottom, the in-column scanning direction of the other column is arranged from bottom to top, the columns arranged from top to bottom are called positive columns, and the columns arranged from bottom to top are called reverse columns.
The first element in the scan, i.e., the permutation, of the string is called the starting element and the last element in the scan, i.e., the permutation, of the string is called the terminating element.
The horizontal raster scan and the horizontal back-and-forth scan are collectively called a horizontal scan, and the vertical raster scan and the vertical back-and-forth scan are collectively called a vertical scan. Horizontal raster scanning and vertical raster scanning are collectively referred to as raster scanning. The horizontal and vertical back and forth scans are collectively referred to as back and forth scans. The elements in a whole compression unit have a unique serial number called element serial number after being arranged according to the sequence of a preset scanning mode. The position of the element in the whole compression unit can be represented by the coordinate of the element in the whole compression unit or the element serial number of the element.
The whole compression unit of the generic string prediction coding mode consists of the following three types of strings:
1) And a coordinate string, wherein the reference elements of all current elements on the string are the same element in the reference set, the position of the reference element in the reference set is represented by a coordinate, and the value of the current element is derived according to the coordinate.
2) Strings of unpredictable elements, a string consisting of one or more unpredictable elements; the unpredictable element is a current element without a reference element, and the encoder writes the value of the unpredictable element into a compressed data code stream according to a preset mode and transmits the compressed data code stream to the decoder.
3) And shifting the string, wherein the position of the reference element of all current elements on the string in the reference set relative to the current element is represented by a string shift vector. Therefore, the position of the reference element can be calculated according to the position of the current element and the string displacement vector, the numerical value of the reference element is taken out, and then the numerical value of the reference element is assigned to the current element; that is, each current element on the offset string is a duplicate of its reference element. Obviously, if the reference element itself is an existing unpredictable element, then the current element is a duplicate of the existing unpredictable element; if the reference element is itself a duplicate of an existing unpredictable element, then the current element is a duplicate of the existing unpredictable element.
The process of generic string prediction decoding is divided into 2 stages: parsing and decoding. The analysis stage comprises analyzing the compressed data code stream, obtaining values of various syntax elements from the code stream, deriving a plurality of string prediction parameters of each current element, and storing the derived plurality of string prediction parameters in a string prediction parameter buffer area array. The decoding stage includes taking out 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 reconstruction elements, and placing the reconstruction elements in a reconstruction data set storage space.
The string prediction parameters include: 1) A string displacement vector of the current element, consisting of a horizontal component and a vertical component; 2) The respective element components of the current element, such as Y component, U component, V component.
In the prior art, a buffer array is used to store string displacement vectors for elements of an entire compressed unit: another buffer array is used to hold the components of the elements of one entire compression unit.
However, in practice, it is not always necessary to store all the string displacement vectors and element components of each current element in the parsing stage of the generic string prediction. The total saving wastes part of the buffer array space and increases the implementation cost of the decoder.
Therefore, it is very practical to develop a method capable of storing the string displacement vector and the element component of the element in the same buffer array.
Disclosure of Invention
Because the prior art has the defects, the invention provides the method and the device which can save the string displacement vector and the element component of each current element in the same buffer area array in the analysis stage of the universal string prediction so as to save the buffer area array space and further reduce the cost, thereby overcoming the defects that the string displacement vector and the element component need to be saved in different buffer area arrays to cause the waste of the buffer area array space to a certain extent in the prior art and increasing the realization cost.
In order to achieve the purpose, the invention provides the following technical scheme:
a method for decoding a whole compression unit in a generic string prediction coding mode, comprising at least the steps of:
(1) Inputting at least one compressed data code stream of an integral compression unit;
(2) Using an array of string prediction type buffers for each element, representing the string prediction type for each element:
the string prediction type of an element takes a first predetermined value to indicate that the element is an element of an offset string and is not a copy-once or copy-many element of an existing unpredictable element,
the string prediction type of an element takes a second predetermined value to indicate that the element is an element of a coordinate string,
the string prediction type of an element takes a third predetermined value to indicate that the element is an element of an unpredictable string of elements or is an element of an offset string and is a copy-once or-many element of an existing unpredictable element;
(3) Using a set of string prediction parameter buffers for each element for holding a string displacement vector for each element or holding an element component for each element: if the string prediction type of an element takes a first preset value, saving the string displacement vector of the element, otherwise, saving the element component of the element;
(4) And outputting at least one reconstruction element of the whole compression unit.
By applying the method, the string displacement vector and the element component can share the same buffer area array, and compared with the prior art, the method can effectively and greatly reduce the space occupied by the buffer area array and reduce the implementation cost of a decoder.
As a preferred technical scheme:
the decoding method as described above, the original data being a sequence comprising an image, a sequence of images, an array or array of two-dimensional data elements of video;
the whole compression unit comprises 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.
In the decoding method, the string prediction type buffer number group of each element is denoted as StrType [ sPos ], the string prediction parameter buffer number group of each element has at least 3 components, which are denoted as StrPara [ sPos ] [0], strPara [ sPos ] [1], strPara [ sPos ] [2], 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, an element is composed of 3 components, which are denoted as Y, U, V, respectively, and the scanning manner is back and forth scanning.
In the decoding method described above, the syntax description definition table, in which the current string is an offset string of strLength, the element number of the start element is sPos, the reference element of the current element is an element located above the current element and is referred to as an upper element, the difference between the element number of the current element and the element number of the reference element is offsetacover, and the StrType [ sPos ], strPara [ sPos ] [0], strPara [ sPos ] [1], strPara [ sPos ] [2] is assigned, includes:
in the above syntax description definition table, expressa: b is the conditional assignment operator: if the result of the expression express is true or not 0, using a to carry out assignment; otherwise, b is used for assignment.
In the decoding method as described above, the current string is a coordinate string with a length of strLength, the element number of the starting element is sPos, the x-coordinate and the 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 an address having coordinates in the array, and the syntax description definition table for assigning values to StrType [ sPos ], strpara [ sPos ] [0], strpara [ sPos ] [1], and StrsPos [2] includes:
in the above syntax description definition table, cIdx is 0, 1, 2 respectively representing Y, U, V components.
In the decoding method described above, the current string is an unpredictable element string with a length of strLength, the element number of the starting element is sPos, three component values of the unpredictable element exist in the compressed data code stream, and the syntax description definition table for assigning values to StrType [ sPos ], strPara [ sPos ] [0], strPara [ sPos ] [1], strPara [ sPos ] [2] includes:
in the above syntax description definition table, unpredictable _ pixel _ val indicates syntax elements existing in the bitstream, and cIdx is 0, 1, and 2 respectively indicate Y, U, V components.
In the decoding method described above, the coordinates of the top left corner element of the current entire compression unit in the compensated sample data set denoted as curI are (x 0, y 0);
the horizontal and vertical dimensions of the current full compression unit are both CuSize = (1 < < SizeInBit);
the scanning mode flag of the current integral compression unit is UpScanModeFlag, the value of 1 indicates that the current integral compression unit adopts a vertical scanning mode, and the value of 0 indicates that the current integral compression unit adopts a horizontal scanning mode;
the value of an element curI [ x0+ x ] [ y0+ y ] [ cIdx ] of the current whole compression unit, which is subjected to the general string prediction decoding, is obtained according to the following operation steps, wherein x = 0-CuSize-1, y = 0-CuSize-1, and cIdx = 0-2:
1) The initial sPos is set to 0 and,
2) If sPos is less than CuSize × CuSize, repeating the following operation steps 3) to 6) in sequence,
3) Calculating coordinates x and y of the current element in the current whole compression unit from the current element sequence number sPos:
x=TravScan[SizeInBit-3][sPos][UspScanModeFlag]
y=TravScan[SizeInBit-3][sPos][1-UspScanModeFlag]
4) If StrType [ sPos ] is equal to 0, then the current element curI [ x0+ x ] [ y0+ y ] [ cIdx ] is calculated as follows:
for(cIdx=0;cIdx<3;cIdx++)
curI[x0+x][y0+y][cIdx]=curI[x0+x-StrPara[sPos][0]][y0+y-StrPara[sPos][1]][cIdx]
5) Otherwise, the current element curI [ x0+ x ] [ y0+ y ] [ cIdx ] is computed as follows:
for(cIdx=0;cIdx<3;cIdx++)
curI[x0+x][y0+y][cIdx]=StrPara[sPos][cIdx]
6) Updating the sPos: sPos + =1.
The invention provides a decoding device of a whole compression unit of a general string prediction coding mode, which comprises a module for realizing the decoding method of the whole compression unit of the general string prediction coding mode.
Specifically, the decoding apparatus includes at least modules that perform the following functions and operations:
(1) Inputting at least one compressed data code stream of an integral compression unit;
(2) Using an array of string prediction type buffers for each element to represent the string prediction type for each element:
the string prediction type of an element takes a first predetermined value to indicate that the element is an element of an offset string and is not a copy-once or copy-many element of an existing unpredictable element,
the string prediction type of an element takes a second predetermined value to indicate that the element is an element of a coordinate string,
the string prediction type of an element takes a third predetermined value to indicate that the element is an element of an unpredictable string of elements or is an element of an offset string and is a copy-once or-many element of an existing unpredictable element;
(3) Using a set of string prediction parameter buffers for each element for holding a string displacement vector for each element or holding an element component for each element: if the string prediction type of an element takes a first preset value, saving the string displacement vector of the element, otherwise, saving the element component of the element;
(4) And outputting at least one reconstruction element of the whole compression unit.
The present invention also provides an electronic device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement any one of the following methods:
a method for decoding an entire compressed unit of a generic string prediction coding mode as described above.
Furthermore, the present invention also provides a computer-readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded by a processor and executes any one of the following methods:
a method for decoding the whole compression unit of the generic string prediction coding mode as described above.
The present invention is applicable to encoding and decoding for lossy compression of data, and is also applicable to encoding and decoding for lossless compression of data. The invention is suitable for encoding and decoding one-dimensional data such as character string data or byte string data or one-dimensional graphics or fractal graphics, and is also suitable for encoding and decoding data with two or more dimensions such as images, image sequences or video data.
In the present invention, the data involved in data compression includes one or a combination of the following types of data:
one-dimensional data;
two-dimensional data;
multidimensional data;
a graph;
dimension division graphics;
an image;
a sequence of images;
video;
audio frequency;
a file;
a byte;
a bit;
a pixel;
a three-dimensional scene;
a sequence of continuously changing three-dimensional scenes;
a virtual reality scene;
sequence of scenes of continuously changing virtual reality
An image in the form of pixels;
transform domain data of the image;
a set of bytes in two or more dimensions;
a set of bits in two or more dimensions;
a set of pixels;
a set of single component pixels;
a set of three-component pixels (R, G, B, A);
a set of three-component pixels (Y, U, V);
a set of three-component pixels (Y, cb, cr);
a set of three-component pixels (Y, cg, co);
a set of four component pixels (C, M, Y, K);
a set of four component pixels (R, G, B, A);
a set of four component pixels (Y, U, V, A);
a set of four component pixels (Y, cb, cr, A);
a set of four component pixels (Y, cg, co, a).
The technical features of the present invention are explained above by specific embodiments. Other advantages and effects of the present invention will be readily apparent to those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention.
Detailed Description
The structure of the present invention will be further described with reference to specific examples, but the present invention is not limited thereto.
The following units and the like involved in the method and apparatus are specifically as follows:
the raw data is a sequence comprising an image, a sequence of images, an array or array of two-dimensional data elements of a video;
the whole compression unit comprises one of the following coding units or the combination thereof: 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.
Example 1
A method for decoding an entire compression unit in a generic string prediction coding mode, comprising the steps of:
(1) Inputting at least one compressed data code stream of an integral compression unit;
(2) Using an array of string prediction type buffers for each element to represent the string prediction type for each element:
the string prediction type of an element takes a first predetermined value to indicate that the element is an element of an offset string and is not a copy-once or-many element of an existing unpredictable element,
the string prediction type of an element takes a second predetermined value to indicate that the element is an element of a coordinate string,
the string prediction type of an element takes a third predetermined value to indicate that the element is an element of an unpredictable string of elements or is an element of an offset string and is a copy-once or-many element of an existing unpredictable element;
the string prediction type buffer number group of each element is marked as StrType [ sPos ], the string prediction parameter buffer number group of each element has at least 3 components which are respectively marked as StrPara [ sPos ] [0], strPara [ sPos ] [1] and StrPara [ sPos ] [2], wherein sPos is the element number of each element, the first preset value, the second preset value and the third preset value are respectively 0, 1 and 2, the elements are respectively marked as 3 components of Y, U, V, and the scanning mode is back and forth scanning;
the syntax description definition table for assigning values to StrType [ sPos ], strPara [ sPos ] [0], strPara [ sPos ] [1], strPara [ sPos ] [2] is defined as follows:
in the above syntax description definition table, expressa: b is the conditional assignment operator: if the result of the expression express is true or not 0, using a to carry out assignment; otherwise, assigning value by using b;
(3) Using a set of string prediction parameter buffers for each element for holding a string displacement vector for each element or holding an element component for each element: if the string prediction type of an element takes a first preset value, saving the string displacement vector of the element, otherwise, saving the element component of the element;
(4) And outputting at least one reconstruction element of the whole compression unit.
Example 2
A method for decoding an entire compression unit in a generic string prediction coding mode, comprising the steps of:
(1) Inputting at least one compressed data code stream of an integral compression unit;
(2) Using an array of string prediction type buffers for each element to represent the string prediction type for each element:
the string prediction type of an element takes a first predetermined value to indicate that the element is an element of an offset string and is not a copy-once or copy-many element of an existing unpredictable element,
the string prediction type of an element takes a second predetermined value to indicate that the element is an element of a coordinate string,
the string prediction type of an element takes a third predetermined value to indicate that the element is an element of an unpredictable string of elements or is an element of an offset string and is a copy-once or-many element of an existing unpredictable element;
the string prediction type buffer number group of each element is marked as StrType [ sPos ], the string prediction parameter buffer number group of each element has at least 3 components which are respectively marked as StrPara [ sPos ] [0], strPara [ sPos ] [1] and StrPara [ sPos ] [2], wherein sPos is the element number of each element, the first preset value, the second preset value and the third preset value are respectively 0, 1 and 2, the elements are respectively marked as 3 components of Y, U, V, and the scanning mode is back and forth scanning;
the current string is a coordinate string with a length of strLength, the element serial number of the initial element is sPos, the x coordinate and the y coordinate which represent 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, wherein PCA [ ] is an array for storing the coordinates, and PCA _ address is the address of the coordinates in the array, and the syntax description definition table for assigning values to StrType [ sPos ], strPara [ sPos ] [0], strPara [ sPos ] [1] and StrPara [ sPos ] [2] comprises:
in the above syntax description definition table, cIdx is 0, 1, 2 respectively representing Y, U, V components;
(3) Using a set of string prediction parameter buffers for each element for holding a string displacement vector for each element or holding an element component for each element: if the string prediction type of an element takes a first preset value, saving the string displacement vector of the element, otherwise, saving the element component of the element;
(4) And outputting at least one reconstruction element of the whole compression unit.
Example 3
A method for decoding an entire compression unit in a generic string prediction coding mode, comprising the steps of:
(1) Inputting at least one compressed data code stream of an integral compression unit;
(2) Using an array of string prediction type buffers for each element to represent the string prediction type for each element:
the string prediction type of an element takes a first predetermined value to indicate that the element is an element of an offset string and is not a copy-once or copy-many element of an existing unpredictable element,
the string prediction type of an element takes a second predetermined value to indicate that the element is an element of a coordinate string,
the string prediction type of an element takes a third predetermined value to indicate that the element is an element of an unpredictable string of elements or is an element of an offset string and is a copy-once or-many element of an existing unpredictable element;
the string prediction type buffer number group of each element is marked as StrType [ sPos ], the string prediction parameter buffer number group of each element has at least 3 components which are respectively marked as StrPara [ sPos ] [0], strPara [ sPos ] [1] and StrPara [ sPos ] [2], wherein sPos is the element number of each element, the first preset value, the second preset value and the third preset value are respectively 0, 1 and 2, the elements are respectively marked as 3 components of Y, U, V, and the scanning mode is back and forth scanning;
the current string is an unpredictable element string with the length of strLength, the element sequence number of the initial element is sPos, three component values of the unpredictable element exist in a compressed data code stream, and a syntax description definition table for assigning StrType [ sPos ], strpara [ sPos ] [0], strpara [ sPos ] [1] and Strpara [ sPos ] [2] comprises:
in the above syntax description definition table, unpredictable _ pixel _ val represents syntax elements existing in the code stream, and cIdx is 0, 1, 2 respectively representing Y, U, V components;
(3) Using a set of string prediction parameter buffers for each element for holding a string displacement vector for each element or holding an element component for each element: if the string prediction type of an element takes a first preset value, saving the string displacement vector of the element, otherwise, saving the element component of the element;
(4) And outputting at least one reconstruction element of the whole compression unit.
Example 4
A method for decoding an entire compression unit in a generic string prediction coding mode, comprising the steps of:
(1) Inputting at least one compressed data code stream of an integral compression unit;
(2) Using an array of string prediction type buffers for each element to represent the string prediction type for each element:
the string prediction type of an element takes a first predetermined value to indicate that the element is an element of an offset string and is not a copy-once or copy-many element of an existing unpredictable element,
the string prediction type of an element takes a second predetermined value to indicate that the element is an element of a coordinate string,
the string prediction type of the element takes a third predetermined value to indicate that the element is an element of an unpredictable element string or is an element of an offset string and is a copy-once or-copy-many element of an existing unpredictable element;
the string prediction type buffer number group of each element is marked as StrType [ sPos ], the string prediction parameter buffer number group of each element has at least 3 components which are respectively marked as StrPara [ sPos ] [0], strPara [ sPos ] [1] and StrPara [ sPos ] [2], wherein sPos is the element number of each element, the first preset value, the second preset value and the third preset value are respectively 0, 1 and 2, the elements are respectively marked as 3 components of Y, U, V, and the scanning mode is back and forth scanning;
the coordinates of the upper left corner element of the current whole compression unit in the compensated sample data set marked as curI are (x 0, y 0);
the horizontal and vertical dimensions of the current full compression unit are both CuSize = (1 < < SizeInBit);
the scanning mode flag of the current integral compression unit is UpScanModeFlag, a value of 1 indicates that the current integral compression unit adopts a vertical scanning mode, and a value of 0 indicates that the current integral compression unit adopts a horizontal scanning mode;
the value of an element curI [ x0+ x ] [ y0+ y ] [ cIdx ] of the current whole compression unit, which is subjected to the general string prediction decoding, is obtained according to the following operation steps, wherein x = 0-CuSize-1, y = 0-CuSize-1, and cIdx = 0-2:
1) The initial sPos is set to 0 and,
2) If sPos is less than CuSize × CuSize, repeating the following steps 3) to 6) in sequence,
3) Calculating coordinates x and y of the current element in the current whole compression unit from the current element sequence number sPos:
x=TravScan[SizeInBit-3][sPos][UspScanModeFlag]
y=TravScan[SizeInBit-3][sPos][1-UspScanModeFlag]
4) If StrType [ sPos ] is equal to 0, then the current element curI [ x0+ x ] [ y0+ y ] [ cIdx ] is calculated as follows:
for(cIdx=0;cIdx<3;cIdx++)
curI[x0+x][y0+y][cIdx]=curI[x0+x-StrPara[sPos][0]][y0+y-StrPara[sPos][1]][cIdx]
5) Otherwise, the current element curI [ x0+ x ] [ y0+ y ] [ cIdx ] is computed as follows:
for(cIdx=0;cIdx<3;cIdx++)
curI[x0+x][y0+y][cIdx]=StrPara[sPos][cIdx]
6) Updating the sPos: sPos + =1;
(3) Using a string prediction parameter buffer array of elements for holding a string displacement vector for each element or holding an element component for each element: if the string prediction type of an element takes a first preset value, saving the string displacement vector of the element, otherwise, saving the element component of the element;
(4) And outputting at least one reconstruction element of the whole compression unit.
Example 5
An apparatus for decoding an integer compression unit of a generic string prediction coding mode, comprising means for implementing the method for decoding an integer compression unit of a generic string prediction coding mode as described in embodiment 1.
Example 6
An apparatus for decoding an integer compression unit of a generic string prediction coding mode, comprising means for implementing the method for decoding an integer compression unit of a generic string prediction coding mode as described in embodiment 2.
Example 7
An apparatus for decoding an integer compression unit of a generic string prediction coding mode, comprising means for implementing the method for decoding an integer compression unit of a generic string prediction coding mode as described in embodiment 3.
Example 8
An apparatus for decoding an integer compression unit of a generic string prediction coding mode, comprising means for implementing the method for decoding an integer compression unit of a generic string prediction coding mode as described in embodiment 4.
Example 9
An electronic device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, code set, or set of instructions, the at least one instruction, at least one program, code set, or set of instructions being loaded and executed by the processor to implement a method of decoding an entire compression unit for a generic string prediction encoding mode as described in embodiment 1.
Example 10
An electronic device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, code set, or set of instructions, the at least one instruction, at least one program, code set, or set of instructions being loaded and executed by the processor to implement the method of decoding an entire compression unit for a generic string prediction coding mode as described in embodiment 2.
Example 11
An electronic device comprising a processor and a memory, the memory having at least one instruction, at least one program, code set, or set of instructions stored therein, the at least one instruction, at least one program, code set, or set of instructions being loaded and executed by the processor to implement the method for decoding an entire compressed unit of a generic string prediction coding mode as in embodiment 3.
Example 12
An electronic device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, code set, or set of instructions, the at least one instruction, at least one program, code set, or set of instructions being loaded and executed by the processor to implement the method of decoding an entire compression unit for a generic string prediction coding mode as described in embodiment 4.
Example 13
A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or set of instructions that is loaded by a processor and that performs a method for decoding an entire compression unit for a generic string prediction coding mode as described in embodiment 1.
Example 14
A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or set of instructions that is loaded by a processor and that performs a method for decoding an entire compression unit for a generic string prediction coding mode as described in embodiment 2.
Example 15
A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or set of instructions that is loaded by a processor and that performs a method for decoding an entire compression unit for a generic string prediction coding mode as described in embodiment 3.
Example 16
A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or set of instructions that is loaded by a processor and that performs a method for decoding an entire compression unit for a generic string prediction coding mode as described in embodiment 4.
Those skilled in the art will appreciate that variations may be implemented by those skilled in the art in combination with the prior art and the above-described embodiments, and will not be described herein in detail. Such variations do not affect the essence of the present invention and are not described herein.
The above description is of the preferred embodiment of the invention. It is to be understood that the invention is not limited to the particular embodiments described above, in that devices and structures not described in detail are understood to be implemented in a manner common in the art; those skilled in the art can make many possible variations and modifications to the disclosed embodiments, or modify equivalent embodiments to equivalent variations, without departing from the spirit of the invention, using the methods and techniques disclosed above. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.
Claims (10)
1. A method for decoding a whole compressed unit in a generic string prediction coding mode, comprising at least the steps of:
(1) Inputting at least one compressed data code stream of an integral compression unit;
(2) Using an array of string prediction type buffers for each element to represent the string prediction type for each element:
the string prediction type of an element takes a first predetermined value to indicate that the element is an element of an offset string and is not a copy-once or copy-many element of an existing unpredictable element,
the string prediction type of an element takes a second predetermined value to indicate that the element is an element of a coordinate string,
the string prediction type of an element takes a third predetermined value to indicate that the element is an element of an unpredictable string of elements or is an element of an offset string and is a copy-once or-many element of an existing unpredictable element;
(3) Using a set of string prediction parameter buffers for each element for holding a string displacement vector for each element or holding an element component for each element: if the string prediction type of an element takes a first preset value, saving the string displacement vector of the element, otherwise, saving the element component of the element;
(4) And outputting at least one reconstruction element of the whole compression unit.
2. The decoding method according to claim 1, wherein the raw data is a sequence comprising an image, a sequence of images, an array or array of two-dimensional data elements of a video;
the whole compression unit comprises 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, wherein the string prediction type buffer number group of each element is denoted as StrType [ sPos ], the string prediction parameter buffer number group of each element has at least 3 components, which are denoted as StrPara [ sPos ] [0], strPara [ sPos ] [1], strPara [ sPos ] [2], 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, an element is composed of 3 components denoted as Y, U, V, and the scanning manner is scanning back and forth.
4. The decoding method according to claim 3, wherein the current string is an offset string of length strLength, the element number of the start element is sPos, the reference element of the current element is an element located above the current element, referred to as the above element, the difference between the element number of the current element and the element number of the reference element is offsetave, and the syntax description definition table for assigning values to StrType [ sPos ], strpara [ sPos ] [0], strpara [ sPos ] [1], strpara [ sPos ] [2] comprises:
in the above syntax description definition table, expressa: b is the conditional assignment operator: if the result of the expression express is true or not 0, using a to carry out assignment; otherwise, b is used for assignment.
5. The decoding method according to claim 3, wherein the current string is a string of coordinates of length strLength, the element number of its starting element is sPos, the x-and y-coordinates representing the position of the reference element within the reference set curI [ x ] [ y ] [ cIdx ] are PCA [ PCA _ address ] [0] and PCA [ PCA _ address ] [1], respectively, where PCA [ ] [ ] is an array of deposit coordinates, and PCA _ address is the address of the coordinates within the array, and the syntax description definition tables assigning values to StrType [ sPos ], strpara [ sPos ] [0], strpara [ sPos ] [1], stra [ sPos ] [2] include:
in the above syntax description definition table, cIdx is 0, 1, 2 respectively representing Y, U, V components.
6. The decoding method according to claim 3, wherein the current string is an unpredictable element string with a length of strLength, the element number of the starting element is sPos, three component values of the unpredictable element exist in the compressed data code stream, and the syntax description definition table for assigning values to StrType [ sPos ], strpara [ sPos ] [0], strpara [ sPos ] [1], strpara [ sPos ] [2] comprises:
in the above syntax description definition table, unpredictable _ pixel _ val indicates syntax elements existing in the bitstream, and cIdx is 0, 1, and 2 respectively indicate Y, U, V components.
7. The decoding method according to claim 3, wherein the coordinates of the top left corner element of the current integer compression unit in the compensated sample data set denoted as curI is (x 0, y 0);
the horizontal and vertical dimensions of the current full compression unit are both CuSize = (1 < < SizeInBit);
the scanning mode flag of the current integral compression unit is UpScanModeFlag, the value of 1 indicates that the current integral compression unit adopts a vertical scanning mode, and the value of 0 indicates that the current integral compression unit adopts a horizontal scanning mode;
the value of an element curI [ x0+ x ] [ y0+ y ] [ cIdx ] of the current whole compression unit, which is subjected to the general string prediction decoding, is obtained according to the following operation steps, wherein x = 0-CuSize-1, y = 0-CuSize-1, and cIdx = 0-2:
1) The initial sPos is set to 0 and,
2) If sPos is less than CuSize × CuSize, repeating the following steps 3) to 6) in sequence,
3) Calculating coordinates x and y of the current element in the current whole compression unit from the current element sequence number sPos:
x=TravScan[SizeInBit-3][sPos][UspScanModeFlag]
y=TravScan[SizeInBit-3][sPos][1-UspScanModeFlag]
4) If StrType [ sPos ] is equal to 0, then the current element curI [ x0+ x ] [ y0+ y ] [ cIdx ] is calculated as follows:
for(cIdx=0;cIdx<3;cIdx++)
curI[x0+x][y0+y][cIdx]=curI[x0+x-StrPara[sPos][0]][y0+y-StrPara[sPos][1]][cIdx]
5) Otherwise, the current element curI [ x0+ x ] [ y0+ y ] [ cIdx ] is computed as follows:
for(cIdx=0;cIdx<3;cIdx++)
curI[x0+x][y0+y][cIdx]=StrPara[sPos][cIdx]
6) Updating the sPos: sPos + =1.
8. An apparatus for decoding a global compression unit of a generic prediction coding mode, comprising means for implementing a method for decoding a global compression unit of a generic prediction coding mode according to any one of claims 1 to 7.
9. An electronic device, comprising a processor and a memory, wherein at least one instruction, at least one program, set of codes, or set of instructions is stored in the memory, and wherein the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement any one of the following methods:
the method according to any of claims 1-7, wherein said decoding method comprises using a whole compression unit of a generic string prediction coding mode.
10. A computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded by a processor and performs any one of the following methods:
the method according to any of claims 1-7, wherein said decoding method comprises using a whole compression unit of a generic string prediction coding mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210521675.5A CN115174929A (en) | 2022-05-13 | 2022-05-13 | Method and device for decoding serial prediction by sharing one buffer area by serial vectors and pixel values |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210521675.5A CN115174929A (en) | 2022-05-13 | 2022-05-13 | Method and device for decoding serial prediction by sharing one buffer area by serial vectors and pixel values |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115174929A true CN115174929A (en) | 2022-10-11 |
Family
ID=83482522
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210521675.5A Pending CN115174929A (en) | 2022-05-13 | 2022-05-13 | Method and device for decoding serial prediction by sharing one buffer area by serial vectors and pixel values |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115174929A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013138386A (en) * | 2011-12-28 | 2013-07-11 | Jvc Kenwood Corp | Moving image encoder, moving image encoding method and moving image encoding program |
EP3306931A1 (en) * | 2015-06-08 | 2018-04-11 | Tongji University | Image encoding and decoding method, image processing device, and computer storage medium |
CN113938683A (en) * | 2021-10-13 | 2022-01-14 | 同济大学 | Coding and decoding method and device for point prediction chroma reconstruction value from multiple reference positions |
-
2022
- 2022-05-13 CN CN202210521675.5A patent/CN115174929A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013138386A (en) * | 2011-12-28 | 2013-07-11 | Jvc Kenwood Corp | Moving image encoder, moving image encoding method and moving image encoding program |
EP3306931A1 (en) * | 2015-06-08 | 2018-04-11 | Tongji University | Image encoding and decoding method, image processing device, and computer storage medium |
CN113938683A (en) * | 2021-10-13 | 2022-01-14 | 同济大学 | Coding and decoding method and device for point prediction chroma reconstruction value from multiple reference positions |
Non-Patent Citations (2)
Title |
---|
林涛等: "基于通用串预测算法的AVS2屏幕混合内容帧间编码优化", 《计算机学报》, 20 March 2019 (2019-03-20) * |
赵利平等: "通用串预测算法及在AVS2屏幕与混合内容视频编码中的应用", 《计算机学报》, 3 April 2019 (2019-04-03) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104378644B (en) | Image compression method and device for fixed-width variable-length pixel sample string matching enhancement | |
US10341651B2 (en) | Image coding method, decoding method, coding device and decoding device | |
CN105491376B (en) | Image coding and decoding method and device | |
US20220417535A1 (en) | Image encoding and decoding methods, image processing device, and computer storage medium | |
CN104754362B (en) | Image compression method using fine-divided block matching | |
EP3310059B1 (en) | Image encoding and decoding method, image processing device, and computer storage medium | |
CN107770540B (en) | Data compression method and device for fusing multiple primitives with different reference relations | |
US11653019B2 (en) | Image coding and decoding methods, image processing device and computer storage medium | |
EP3253061A1 (en) | Image coding method and apparatus, and image decoding method and apparatus | |
CN112565790B (en) | Method and device for encoding and decoding string prediction by using minimum base vector mark | |
CN111757117A (en) | Data coding and decoding method for performing serial prediction on component down-sampling format data | |
CN113365074B (en) | Encoding and decoding method and device for limiting point prediction frequent position and point vector number thereof | |
CN113395515B (en) | Coding and decoding method and device for point prediction of component down-sampling format data | |
CN107770543B (en) | Data compression method and device for sequentially increasing cutoff values in multiple types of matching parameters | |
CN115174929A (en) | Method and device for decoding serial prediction by sharing one buffer area by serial vectors and pixel values | |
CN113452995A (en) | Data coding and decoding method and device with different scanning directions of current string and reference string | |
CN113938683A (en) | Coding and decoding method and device for point prediction chroma reconstruction value from multiple reference positions | |
CN115134605B (en) | Image encoding and decoding method and device using limited universal string prediction encoding mode | |
CN108989820B (en) | Data compression method and device adopting respective corresponding chroma sampling formats at all stages | |
CN113518222B (en) | Coding and decoding method and device for different types of strings by adopting different length binarization schemes | |
CN114245130A (en) | Data coding and decoding method and device for multiplexing point vector by using historical point prediction information table | |
CN115190316A (en) | Data coding and decoding method and device for sealing and activating out-of-range equivalent string normal position | |
CN115037927A (en) | Image coding and decoding method fusing full chroma and mixed chroma and application thereof | |
CN117319665A (en) | Encoding and decoding method and device for representing unmatched element strings by aid of point vector index values | |
CN117319663A (en) | Encoding and decoding method and device for multiplexing normal-present position with main component coming from point prediction |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |