CN111800641B - Image coding and decoding method and device adopting different kinds of reconstructed pixels in same mode - Google Patents

Image coding and decoding method and device adopting different kinds of reconstructed pixels in same mode Download PDF

Info

Publication number
CN111800641B
CN111800641B CN202010704251.3A CN202010704251A CN111800641B CN 111800641 B CN111800641 B CN 111800641B CN 202010704251 A CN202010704251 A CN 202010704251A CN 111800641 B CN111800641 B CN 111800641B
Authority
CN
China
Prior art keywords
matching
pixel
current
reference pixel
pixels
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.)
Active
Application number
CN202010704251.3A
Other languages
Chinese (zh)
Other versions
CN111800641A (en
Inventor
林涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Tianhe Electronic Information Co ltd
Original Assignee
Shanghai Tianhe Electronic Information Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Tianhe Electronic Information Co ltd filed Critical Shanghai Tianhe Electronic Information Co ltd
Priority to CN202010704251.3A priority Critical patent/CN111800641B/en
Publication of CN111800641A publication Critical patent/CN111800641A/en
Application granted granted Critical
Publication of CN111800641B publication Critical patent/CN111800641B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The most basic technical feature of the present invention is that when the current coding unit is coded, searching is performed in a set of history pixels (reconstructed pixels) which have already completed coding according to a predetermined matching pattern, and a plurality of optimal reference pixel strings (blocks) which are matched with the current pixel string (block) of the coding unit in the current coding are found one by one. Each reference pixel string (block) is characterized by at least a matching position. The set of history pixels (reconstructed pixels) includes at least two kinds of reconstructed pixels: class I and class II. The matching position determines whether to use the reconstruction pixel of the type I or the type II as the reference pixel.

Description

Image coding and decoding method and device adopting different kinds of reconstructed pixels in same mode
Technical Field
The present invention relates to a digital video compression encoding and decoding system, and more particularly to a method and apparatus for encoding and decoding digital composite images and video including continuous tone images and discontinuous tone images.
Background
With the development and popularization of cloud-mobile computing, intelligent network televisions (IPTV), wireless Display connections (WIFI Display, etc.), interconnection between multiple computers, between a host computer and other digital devices (such as smart televisions, smart phones, tablet computers, etc.), and between various types of digital devices has become a reality and is becoming a mainstream trend. This makes real-time screen transmission from the server side ("cloud" or "cloud chip") to the user side a current urgent need. Because of the large amount of screen video data that needs to be transmitted, for example a 24-bit true color screen image at 2048x1536 pixel resolution and 60 frames/second refresh rate of a tablet computer, as much as 2048x1536x60x24 = 4320 megabits per second, which is not possible to achieve real-time transmission under current network conditions, efficient data compression is essential.
The digital composite image and video represented by computer screen image are characterized by that it contains characters, figures, line segments and natural image. The characters, graphics and line segments are generally generated by a computer and have the characteristic of discontinuous tone, while the natural image is shot by a camera and has the characteristic of continuous tone. Currently, compression coding of natural images and video is mature, and many established standards are available. These standards basically use a framework of hybrid coding, where predictive coding is combined with transform coding and quantization coding, but they have poor compression of the screen image, and an algorithm more suitable for the compression of the screen image must be sought to achieve efficient compression.
The characteristics of the computer screen image are fully utilized, and the computer screen image is compressed with ultra-high efficiency, so that the computer screen image is also a main target of the latest international video compression standard HEVC (High Efficiency Video Coding) in the establishment.
The natural form of the digital video signal of a screen image is a sequence of images. An image is typically a rectangular area of pixels and if a digital video signal has 50 images per second, a 30 minute digital video signal is a sequence of 30x60x50 = 90000 images, sometimes referred to simply as a video sequence or sequence. The encoding of digital video signals is to encode one image after another in a certain order. At any one time, the picture being encoded is referred to as the current encoded picture. Likewise, decoding the compressed code stream of the digital video signal is decoding the compressed code stream of each image in the same order. At any one time, the picture being decoded is referred to as the current decoded picture. The current encoded image or the current decoded image is collectively referred to as a current image.
In almost all international standards for video image coding, such as MPEG-1/2/4, H.264/AVC, and HEVC, a picture is coded by dividing it into several blocks M 1 xM 2 The sub-image of the pixel is called a Coding Unit (CU for short), and a block of the sub-image is coded by taking the CU as a basic Coding Unit. M in common use 1 Or M 2 8, 16, 32, 64. Thus, the encoding of a sequence of video images is performed by encoding the individual encoding units in sequence. Similarly, each coding unit is decoded in turn during decoding, and finally the whole video image sequence is reconstructed.
An image is encoded, i.e., one CU is encoded in sequence. At any instant, the CU being encoded is referred to as the current encoding CU. One picture is decoded, and also, one CU is decoded in the same order. At any instant, the CU being decoded is referred to as the current decoded CU. The current coded CU or the current decoded CU are collectively referred to as a current CU.
In the present patent application, "pixel sample", "pixel value", "sample" are synonymous, and depending on the context, it may be clear whether "pixel" or "one pixel component" or "index (i.e., sequence number)" or both are indicated. If it is not clear from the context, then the three are represented simultaneously.
With the popularity of multimedia technology in computers, today and in the future, in daily use of screen images of computers, a single image often contains bitmaps (bitmaps) composed of many letters, numbers, characters, menus, small icons, large graphics, charts, tables, and the like. One such image has many identical or similar patterns (patterns). For example, english has only 52 different letters (26 capital letters and 26 lowercase letters), and Chinese has only a few different strokes. Therefore, in the computer screen image, the matching pixel sample strings or matching pixel sample blocks with arbitrary shapes are found, and the two parameters of the size of the matching strings (blocks) and the distance (1-dimensional distance or 2-dimensional distance) between the matching strings (blocks) and the matching strings (blocks) can be used for representing all information of the matching strings (blocks), so that the redundancy existing in the image pixels is removed, and a remarkable image data compression effect is achieved.
However, in the prior art, both intra-prediction encoding based on neighboring pixel samples and inter-prediction encoding based on blocks (blocks) cannot effectively find any shape-matched pattern in an image, and the encoding efficiency for such images and patterns is low.
Disclosure of Invention
In order to solve the problem in the prior art of image video encoding and decoding, the invention provides a method and a device for image encoding and decoding based on arbitrary shape matching.
The main technical characteristics of the invention are shown in fig. 1 and 2.
The most basic characteristic technical feature of the coding method and device of the present invention is that when the current coding unit CU is coded, a scan format and a matching format (both are collectively referred to as a matching pattern) are arranged according to one or several predetermined pixel samples, searching is performed in a set of history pixels (reconstructed pixels) (also referred to as a reference pixel sample set) that have already been coded, and a plurality of optimal matching strings (blocks) that match with the pixel samples of the current coding unit CU are found one by one. Each matching string (block) may have any shape and may be characterized by two basic matching parameters, namely a matching position (also called matching distance) p and a matching size s:
1) The matching position p is the linear (1-dimensional) distance or planar (2-dimensional) distance, i.e. the relative position, between the first pixel sample of the corresponding matching string (block) found in the history of pixel sets and the first pixel sample of the matched string (block) in the current coding CU, in units of pixel samples. For example, p=125 pixel samples represents that the linear distance is 125 pixel samples, and p= (34, 12) pixel samples represent that the horizontal distance and the vertical distance are 34 pixel samples and 12 pixel samples, respectively.
2) The match size is the 1-dimensional length (or 2-dimensional area) of the matching string (or block). The unit of which is also a pixel sample. For example, s=100 pixel samples represents 100 pixel samples for the matching string and matched string, respectively, and s=8x12 pixel samples represents 8 x12=96 pixel samples for the matching block and matched block, respectively. Obviously, in the case of matching blocks, the size s of a block generally needs to be represented by a plurality of parameter components. For example, where the block is rectangular, s typically contains two components, namely the width and height (sometimes also referred to as length and width) of the rectangle. As another example, where the block is a parallelogram, s typically also contains two components, namely the bottom and the height of the parallelogram. Also for example, where the block is trapezoidal, s generally contains three components, namely the upper base, lower base and height of the trapezoid.
The seamless concatenation of the plurality of arbitrary shape matching strings (blocks) plus possibly unmatched pixel values forms exactly the complete square shape of the current coding CU. Fig. 1 shows an example of arbitrary shape matching for 3 matching modes (including pixel sample arrangement scan format and matching format). In the image shown in fig. 1, 3 CUs of CU m, CU m+1 and CU m+2 are arbitrarily shape-matched by using 3 matching modes, respectively. In general, in a current image, all CUs may use the same matching pattern, or different CUs may adaptively use different matching patterns.
The size of the set of reference pixel samples in which a matching string (block), also referred to as a matching reference string (block), is located is a predetermined encoding and decoding parameter. If the parameter is not written into the compressed code stream, the decoder must set the size of the reference pixel sample set to the whole current decoded image, reserve enough memory space, possibly exceeding the actual requirement, and increase the implementation cost of the decoder. Therefore, the encoder should transmit the actually used reference pixel sample set size written compressed code stream to the decoder, so that the decoder can reserve only the storage space of the reference pixel sample set with proper size, thereby achieving the highest working efficiency.
The reference pixel sample set stores reconstructed pixel values that have been encoded or decoded in the current image, and the reconstructed pixel values are typically fully reconstructed after a number of processing steps. Thus, the reconstructed pixel values stored within the set of reference pixel samples typically comprise different kinds of fully reconstructed pixels and different degrees of partially reconstructed pixels, i.e. reconstructed pixels that have undergone only a partial process. Different matching modes can adopt the reconstructed pixels of the same kind as reference pixels, and can also adopt the reconstructed pixels of different kinds as reference pixels. In the same matching mode, different kinds of reconstructed pixels can be adopted as reference pixels at different matching positions.
Example 1: arbitrary shape matching using a matching pattern of vertical scan 1-dimensional string matching
CU with a sequence number m (CU m) of fig. 1 performs arbitrary shape matching using a matching pattern of vertical scanning 1-dimensional string matching. In the matching mode of vertical scanning 1-dimensional string matching, the history pixels are arranged in the sequence of the LCU serial numbers, and in one LCU, the pixel samples are arranged column by column in a vertical scanning format, so that the history pixels are finally arranged into a one-dimensional pixel sample string. For example, in fig. 1, one LCU is 16x16 pixels in size, each pixel has 3 samples (components), and the depth is 1, so one CU is also 16x16 pixels in size. The first pixel sample in the one-dimensional string of pixel samples in which the history pixels are arranged is the top first pixel sample in column 1 of the LCU numbered 0, CU (CU 0). In a column of pixels, the pixels are arranged in a vertical scanning format from top to bottom. Thus, the second pixel sample in the one-dimensional string of pixel samples is the second next to the top of column 1 of CU 0. Column 1 is followed by column 2, and the pixel samples are also arranged in a vertical scan format from top to bottom. This is arranged column by column up to column 16 of CU 0, followed by the LCU numbered 1 in fig. 1, i.e., the first column of pixels of CU (CU 1), and so on. In one image shown in fig. 1, there are a total of h LCUs, i.e., CUs, in the horizontal direction. Thus, the 16 th column of pixels of the LCU numbered h-1, CU (CU h-1), is the last (rightmost) 1 column of pixels of the first LCU row (there are h LCUs, CU), followed by the 1 st column of pixels of the LCU numbered h, CU (CU h), i.e., the leftmost 1 column of pixels of the second LCU row. The first 3 matched strings in arbitrary shape matching are drawn in the LCU numbered m, CU m, of fig. 1:
1) The first matched string (the string of pixel samples numbered 1 in a circle in CU m of fig. 1) has 42 pixel samples (=14 pixels). The corresponding matching strings found in the history pixels are in LCU numbered 0, CU 0, and LCU numbered 1, CU 1 (the number is also in-circle 1), the first 5 pixels (15 pixel samples) being the last 5 pixels of column 16 of CU 0 and the last 9 pixels (27 pixel samples) being the first 9 pixels of column 1 of CU 1. The first pixel sample of the matching string is the 34 th pixel sample of column 16 of CU 0, so its linear (1-dimensional) address of its position is
The number of pixel samples of one LCU xLCU sequence number + the number of pixel samples of column x (column number-1) +the number of pixel samples in column = 768 x 0+48 x 15+34 = 754.
While the first pixel sample of the matched string is the 1 st pixel sample of column 1 of the LCU numbered m, CU m, so its linear (1-dimensional) address of position is
768 x m+48 x 0+1=768m+1。
So this matching position numbered 1 in the circle for any shape match is p=768 m+1-754=768 m-753. While its matching size (length) is obviously s=42. The units of p and s are both pixel samples.
2) The second matched string (the string of pixel samples numbered 2 within a circle in CU m of fig. 1) has 33 pixel samples (=11 pixels). The corresponding matching string found in the history pixels is in CU 0 (number is also 2 in the circle), the first 7 pixels (21 pixel samples) being the last 7 pixels of column 3 of CU 0, and the last 4 pixels (12 pixel samples) being the first 4 pixels of column 4 of CU 0. The first pixel sample of this matching string is the 28 th pixel sample of column 3 of CU 0, while the first pixel sample of the matched string is the 43 th pixel sample of column 1 of CU m, so the matching position for this arbitrary shape match numbered 2 in a circle is p= (768m+48 x 0+43) - (768 x 0+48 x 2+28) =768 m-81. While its matching size (length) is obviously s=33.
3) The third matched string (the string of pixel samples numbered 3 within a circle in CU m of fig. 1) has 45 pixel samples (=15 pixels). The corresponding matching strings found in the history pixels are in CU h-1 and CU h (numbering is also in-circle 3), the first 13 pixels (39 pixel samples) are the last 13 pixels of column 16 of CU h-1, and the last 2 pixels (6 pixel samples) are the first 2 pixels of column 1 of CU h. The first pixel sample of this matching string is the 10 th pixel sample of column 16 of CU h-1, while the first pixel sample of the matched string is the 28 th pixel sample of column 2 of CU m, so the matching position for this arbitrary shape match numbered 3 in a circle is p= (768m+48 x 1+28) - (768 x (h-1) +48 x 15+10) =768 (m-h+1) -654. While its matching size (length) is obviously s=45.
Example 2: arbitrary shape matching using a matching pattern of vertical scan 2-dimensional conformal (2D-shape-pre-determined) matching
The current encoded CU (CU m+1) numbered m+1 of fig. 1 performs arbitrary shape matching using a matching pattern of vertical scan 2-dimensional conformal matching. In the matching mode of vertical scanning 2-dimensional conformal matching, the history pixels preserve the 2-dimensional arrangement format of the original image, and in one pixel, 3 pixel components (samples) are vertically arranged, whereas in the current coding CU, the pixel samples are arranged column by column in the vertical scanning format and are uniformly arranged from top to bottom in each column. When searching for a matching pixel sample string in the history pixels, the matched pixel sample is moved from top to bottom in a vertical scanning format in the current coding CU, and after one column is scanned and matched, the next column adjacent to the right is scanned and matched. The string of matched pixel samples found in the history pixels must maintain a 2-dimensional shape that is exactly identical to the string of matched pixel samples in the current coding CU. The first 2 matched strings in arbitrary shape matching using the vertical scan 2-dimensional conformal matching pattern are depicted in CU m+1 of fig. 1:
1) The first matched string (the string of pixel samples numbered 4 in the circle in CU m +1 of fig. 1) has 45 pixel samples (=15 pixels). The corresponding matching strings found in the history pixels are in CU 1 and CU h+1 (the number is also in-circle 4). This matching string spans the boundary of 2 CUs, 3 pixels (9 pixel samples) in CU 1, and the other 12 pixels (36 pixel samples) in CU h+1. The matching strings in the history pixel set have exactly the same 2-dimensional shape as the matched strings in the current coding CU, i.e. the matching strings are 45 pixel samples forming 1 column, and the matched strings are also 45 pixel samples forming 1 column. The first pixel sample of the matching string is the 40 th pixel sample of column 3 of CU 1, so the plane (2-dimensional) coordinate address of its position is
Horizontal coordinates = number of columns of pixels to the left of this position = 18,
vertical coordinates = number of pixel samples above this position = 39.
While the first pixel sample of the matched string is the 1 st pixel sample of column 1 of CU m + 1. Assuming that the current encoded CU m+1 has h columns of pixels of the current frame image to the left and v pixel samples of the current frame image above, the plane (2-dimensional) coordinate address of the position of the first pixel sample of the matched string is
The horizontal coordinates=h+0=h,
vertical coordinates=v+0=v.
The matching position for this arbitrary shape match numbered in-circle 4 is p= (h-18, v-39), i.e. the horizontal distance between the matching string and any two corresponding pixel samples in the matched string is h-18 and the vertical distance is v-39. This arbitrary shape match numbered in-circle 4 obviously has a match size s=45. The units of p and s are both pixel samples.
2) The second matched string (the string of pixel samples numbered 5 in the circle in CU m +1 of fig. 1) has 60 pixel samples (=20 pixels). The corresponding matching strings found in the history pixels span the 4 CUs of CU 1,CU 2,CU h+1,CU h+2. This matching string (number is also 5 in circle) is 2 pixels (6 pixel samples) in CU 1, 2 pixels (6 pixel samples) in CU 2, 15 pixels (45 pixel samples) in CU h+1, and 1 pixel (3 pixel samples) in CU h+2. The matching strings in the history pixel set have exactly the same 2-dimensional shape as the matched strings in the current coding CU. That is, the matching string consists of 3 columns, column 1 having 3 pixel samples, column 2 having 48 pixel samples, column 3 having 9 pixel samples, column 1 being aligned with the bottom of column 2 and column 2 being aligned with the top of column 3, the vertical height (with upper and lower endpoint pixels) of this matching string being 16 pixels, equivalent to the height of the current coding CU m+1. The matched string is also composed of 3 columns exactly, column 1 has 3 pixel samples, column 2 has 48 pixel samples, column 3 has 9 pixel samples, column 1 is aligned with the bottom of column 2, and column 2 is aligned with the top of column 3, the vertical height (with upper and lower endpoint pixels) of this matched string is of course also the height of the current coding CU m +1, i.e. 16 pixels. The first pixel sample of the matching string is the 40 th pixel sample of the 15 th column of CU h+1, there are 30 columns of pixels of the present frame image to the left, there are 87 pixel samples of the present frame image above, and the first pixel sample of the matched string is the 46 th pixel sample of the 1 st column of CU m+1, there are the h+0 columns of pixels of the present frame image to the left, there are v+45 pixel samples of the present frame image above, so the arbitrary shape matching position numbered 5 in the circle is p= (h+0-30, v+45-87) = (h-30, v-42), i.e., the horizontal distance between any two corresponding pixel samples in the matching string and the matched string is h-30 and the vertical distance is v-42. This arbitrary shape match numbered 5 in a circle obviously has a match size s=60.
The feature of the matching pattern in this example is that the string of matching pixel samples and the string of matched pixel samples both form a 2-dimensional region in the current image, which is part of the current image, one in the history pixel and the other in the current CU, the two 2-dimensional regions have equal size and remain in a completely consistent 2-dimensional shape. Each 2-dimensional region is composed of columns formed by vertical arrangement of pixel values, and the middle columns except the first column and the last column have the same height, namely the height of the region, the first column is aligned with the bottom of the region, and the last column is aligned with the top of the region. The height of the region may be equal to the height of the current CU, or may be different from the height of the current CU by another arbitrary value or a value derived from the height of the current CU, such as one half or one quarter of the height of the current CU as shown in examples 6 and 7 below. The first and last columns may also have the same height as the middle columns, i.e. equal to the height of the area, which is then a rectangle or square, as shown in examples 6 and 7 below; the matching area in this example is a 2-dimensional area, the matching size generally needs to be represented by two or more parameter components, and in a special case where the height of the matching area can be derived from other parameters or variables in the encoding process and decoding process (e.g. equal to the height of the current CU or a half thereof), the matching size can also be represented by only one parameter component.
Example 3: arbitrary shape matching using a matching pattern of horizontal scanning 2-dimensional conformal (2D-shape-pre-determined) matching
The current encoded CU numbered m+2 of fig. 1 (CU m+2) performs arbitrary shape matching using a matching pattern of horizontal scan 2-dimensional conformal matching. In the matching mode of horizontal scanning 2-dimensional conformal matching, the history pixels preserve the 2-dimensional arrangement format of the original image, and in one pixel, 3 pixel components (samples) are also arranged horizontally, whereas in the current coding CU, the pixel samples are arranged row by row in the horizontal scanning format and are uniformly arranged from left to right in each row. When searching for a matching pixel sample string in a history of pixels, within the current encoding CU, the matched pixel samples are shifted from left to right in a horizontal scan format, and after one line has been scanned and matched, the next line below is scanned and matched. The string of matched pixel samples found in the history pixels must maintain a 2-dimensional shape that is exactly identical to the string of matched pixel samples in the current coding CU. The first 3 matched strings in arbitrary shape matching using the horizontal scan 2-dimensional conformal matching pattern are depicted in CU m+2 of fig. 1:
1) The first matched string (the string of pixel samples numbered 6 in circle in CU m +2 of fig. 1) has 72 pixel samples (=24 pixels). The corresponding matching strings found in the history pixels are in CU 1 and CU 2 (numbered also in-circle 6). This matching string spans the boundary of 2 CUs, 14 pixels (42 pixel samples) in CU 1 and another 10 pixels (30 pixel samples) in CU 2. The matching strings in the history pixel set have exactly the same 2-dimensional shape as the matched strings in the current coding CU. That is, the matching string is composed of 2 rows, with row 1 having 48 pixel samples and row 2 having 24 pixel samples, with row 1 aligned with the left end of row 2, and the horizontal width (including left and right endpoint pixels) of this matching string is 16 pixels, which is equivalent to the width of the current coding CU m+2. The matched string is also composed of 2 rows, row 1 having 48 pixel samples and row 2 having 24 pixel samples, row 1 being aligned with the left end of row 2, the horizontal width (with left and right end pixels) of the matched string being of course also the width of the current coding CU m +2, i.e. 16 pixels. The first pixel sample of the matching string is the 28 th pixel sample of line 2 of CU 1, so the plane (2-dimensional) coordinate address of its position is
Horizontal coordinates = number of pixel samples to the left of this position = 75,
vertical coordinates = number of rows of pixels above this position = 1.
While the first pixel sample of the matched string is the 1 st pixel sample of line 1 of CU m + 2. Assuming that there are h pixel samples of the current frame image to the left of the current encoding CU m+2 and v rows of pixels of the current frame image above, the plane (2-dimensional) coordinate address of the position of the first pixel sample of the matched string is
The horizontal coordinates=h+0=h,
vertical coordinates=v+0=v.
So this arbitrary shape matching position numbered 6 in a circle is p= (h-75, v-1), i.e. the horizontal distance between any two corresponding pixel samples in the matching string and the matched string is h-75 and the vertical distance is v-1. This arbitrary shape match numbered 6 within a circle obviously has a match size s=72. The units of p and s are both pixel samples.
2) The second matched string (the string of pixel samples numbered 7 in the circle in CU m +2 of fig. 1) has 45 pixel samples (=15 pixels). The corresponding matching strings found in the history pixels are in CU h and CU h +1 (the number is also in-circle 7). This matching string spans the boundary of 2 CUs, 6 pixels (18 pixel samples) in CU h, and the other 9 pixels (27 pixel samples) in CU h+1. The matching strings in the history pixel set have exactly the same 2-dimensional shape as the matched strings in the current coding CU. That is, the matching string is composed of 2 rows, with 24 pixel samples in row 1 and 21 pixel samples in row 2, and the horizontal width (including left and right endpoint pixels) of this matching string is 16 pixels, which is equivalent to the width of the current coding CU m+2. The matched string is also composed of 2 rows, row 1 having 24 pixel samples and row 2 having 21 pixel samples, the horizontal width (with left and right end pixels) of the matched string is of course also the width of the current coding CU m +2, i.e. 16 pixels. The first pixel sample of the matching string is the 7 th pixel sample of the 15 th row of CU h+1, there are 54 pixel samples of the present frame image to the left, there are 30 rows of pixels of the present frame image above, and the first pixel sample of the matched string is the 25 th pixel sample of the 2 nd row of CU m+2, there are h+24 pixel samples of the present frame image to the left, there are v+1 rows of pixels of the present frame image above, so the arbitrary shape matching position numbered 7 in the circle is p= (h+24-54, v+1-30) = (h-30, v-29), i.e., the horizontal distance between any two corresponding pixel samples in the matching string and the matched string is h-30 and the vertical distance is v-29. This arbitrary shape match numbered 7 within a circle obviously has a match size s=45.
3) The third matched string (the string of pixel samples numbered 8 in circle in CU m +2 of fig. 1) has 54 pixel samples (=18 pixels). The corresponding matching strings found in the history pixels are in CU 1 and CU 2 (numbered also in-circle 8). This matching string spans the boundary of 2 CUs, 3 pixels (9 pixel samples) in CU 1 and another 15 pixels (45 pixel samples) in CU 2. The matching strings in the history pixel set have exactly the same 2-dimensional shape as the matched strings in the current coding CU. That is, the matching string is composed of 2 rows, with row 1 having 27 pixel samples and row 2 having 27 pixel samples, and the horizontal width (including left and right endpoint pixels) of this matching string is 16 pixels, which is equivalent to the width of the current coding CU m+2. The matched string is also composed of 2 rows, row 1 having 27 pixel samples and row 2 having 27 pixel samples, the horizontal width (with left and right end pixels) of the matched string being of course the width of the current coding CU m +2, i.e. 16 pixels. The first pixel sample of the matching string is the 13 th pixel sample of the 11 th row of the CU 2, 108 pixel samples of the image of the present frame are arranged on the left side, 10 rows of pixels of the image of the present frame are arranged on the upper side, the first pixel sample of the matched string is the 22 th pixel sample of the 3 rd row of the CU m+2, h+21 pixel samples of the image of the present frame are arranged on the left side, v+2 rows of pixels of the image of the present frame are arranged on the upper side, so that the matching position of the arbitrary shape matching with the number of 8 in the circle is p= (h+21-108, v+2-10) = (h-87, v-8), namely the horizontal distance between any two corresponding pixel samples in the matching string and the matched string is h-87 and the vertical distance is v-8. This arbitrary shape match numbered 8 within a circle obviously has a match size s=54.
The feature of the matching pattern in this example is that the string of matching pixel samples and the string of matched pixel samples both form a 2-dimensional region in the current image, which is part of the current image, one in the history pixel and the other in the current CU, the two 2-dimensional regions have equal size and remain in a completely consistent 2-dimensional shape. Each 2-dimensional region is composed of rows formed by horizontally arranging pixel values, and the middle rows except for the first row and the last row have the same width, i.e., the width of the region, the first row being aligned with the right part of the region and the last row being aligned with the left part of the region. The width of the region may be equal to the width of the current CU, or may be different from the width of the current CU by another arbitrary value or a value derived from the width of the current CU, as shown in examples 6 and 7 below, which are one half or one quarter of the width of the current CU. The first and last rows may also have the same width as the middle rows, i.e. the width of the area, which is then a rectangle or square, as shown in examples 6 and 7 below; the matching area in this example is a 2-dimensional area, the matching size generally needs to be represented by two or more parameter components, and in the special case where the width of the matching area can be derived from other parameters or variables in the encoding process and decoding process (e.g. equal to the width of the current CU or a half thereof), the matching size can also be represented by only one parameter component.
Example 4: random shape matching using vertical scanning 2-dimensional conformal matching and column scanning direction alternating matching mode
The mode of vertical scan 2-dimensional conformal matching is essentially the same as that of example 2, except that: when searching for a matching pixel sample string in the history pixels, in the current coding CU, the matched pixel sample moves from top to bottom in the 1 st column, moves from bottom to top in the 2 nd column, moves from top to bottom in the 3 rd column, alternates the scanning direction, and scans and matches an adjacent right column after one column is scanned and matched. The vertical scanning direction of the matching strings in the history pixels is also synchronous and alternate with the matching strings, and is consistent with the scanning moving direction of the pixel sample values of the matching strings. Such scanning formats with adjacent columns having opposite directions are referred to as arcuate scanning or back-and-forth scanning formats.
Example 5: arbitrary shape matching using horizontal scanning 2-dimensional conformal matching and alternate line scanning direction matching pattern
The only difference is that the pattern is substantially the same as that of example 3, i.e. using horizontal scanning 2-dimensional conformal matching: when searching for a matching pixel sample string in the history pixels, in the current coding CU, the matched pixel sample is moved from left to right in the 1 st row, from right to left in the 2 nd row and from left to right in the 3 rd row in a horizontal scanning format, the scanning directions are alternately changed, and after one row is scanned and matched, next adjacent rows below are scanned and matched. The horizontal scanning direction of the matching strings in the history pixels is also synchronous and alternate with the matching strings, and is consistent with the scanning moving direction of the pixel sample values of the matching strings. Such scanning formats with adjacent rows having opposite directions are referred to as arcuate scanning or back-and-forth scanning formats.
Example 6: performing arbitrary shape matching by adopting a matching mode with horizontal scanning 2-dimensional conformal matching and a matching block with fixed matching size as a matching unit
The matching pattern is basically the same as that of example 3, namely, the horizontal scanning 2-dimensional conformal matching is adopted, and the unique 2 points are as follows:
1) When searching for the best match in the historical pixel set, the unit is not a string of pixel samples of arbitrary length, but a predetermined block of pixels of a fixed match size. For example, in units of squares of 4x4 pixels, or in units of rectangles of 8x4 pixels, or in units of rectangles of 4x8 pixels. That is, all the 2-dimensional areas formed by the arrangement of the pixel values in examples 2 and 3 are rectangular or square.
2) Since the matching sizes of all the matching blocks in a current coding CU are a predetermined fixed size, any matching block in the CU can be characterized by a parameter of the matching position p, and no two parameters of the matching position p and the matching size s are needed.
Example 7: performing arbitrary shape matching by adopting a matching mode of horizontal scanning 2-dimensional conformal matching and taking several matching blocks with fixed matching sizes as matching units
Substantially the same as in example 6, the only 2 points differing are:
1) In searching for the best match in the historical set of pixels, the unit is not a predetermined fixed match size block of pixels, but a predetermined number of fixed match sizes of blocks of pixels. For example, the unit is a square or rectangle of 3 predetermined matching sizes of 4x4 pixels, 8x4 pixels, and 4x8 pixels. That is, all the 2-dimensional areas formed by the arrangement of the pixel values in examples 2 and 3 are several kinds of predetermined rectangles or squares.
2) For these several fixed match sizes, the predetermined several match sizes may be represented by numbers. Any matching block in the CU can be characterized by two parameters, namely a matching position p and a number of preset matching sizes, and the two parameters, namely the matching position p and the matching size s, are not needed to be characterized; the number of the matching size typically occupies a smaller number of bits than the matching size itself.
In the decoding method and device of the present invention, the most basic characteristic technical features are that when decoding the compressed code stream data of the current decoding CU, firstly, the matching mode (such as the examples of the matching modes shown in examples 1 to 7 above) of any shape matching adopted by the CU is parsed from the code stream data, and then the characterization parameters of the matching strings (blocks), that is, the matching position and the matching size, are sequentially read from the code stream data. In some matching modes, a CU or LCU has only a predetermined number of even a fixed matching size, so that each matching string or matching block reads out from the code stream data not the matching size itself, but the number of the predetermined matching sizes, even if the code stream has no information of the respective matching size of each matching string or matching block at all, only the information of the matching size common to the CU or LCU. After the matching position and matching size of a matching string (block) are obtained, the decoding operation is to calculate the position of the first pixel sample of the matching string (block) in the history pixel set from the position and matching position of the first pixel sample of the currently decoded matched string (block) according to the matching pattern of arbitrary shape matching. Then, according to the matching mode of any shape matching, it is possible to copy all pixel sample numbers of the whole matching string (block) specified by the matching size from the history pixel set, and move and paste the whole matching string (block) whose size (length or area) is specified by the matching size to the position of the matched string (block) in the current decoding, restoring the whole matched string (block). This in turn copies, moves, pastes one matching string (block) by one, and finally restores all pixels of the entire current decoded CU. It can be seen that the decoding operations of the matching scheme include at least a "copy" operation, and from the decoding perspective, the matching, matching scheme, matching operation, matching string, string matching, matching block, block matching, matching location, matching length, etc. are also often referred to as copy, copy scheme, copy operation, copy string, string copy, copy block, block copy, copy location, copy length, etc.
Fig. 2 shows an arbitrary shape matching decoding example of 3 matching modes (including a pixel sample arrangement scan format and a matching format). In the image shown in fig. 2, 3 CUs of CU m, CU m+1 and CU m+2 are arbitrarily shape-matched by using the 3 matching modes, respectively.
CU m in fig. 2 performs arbitrary shape matching using a matching pattern of vertical scanning 1-dimensional string matching. Thus, the arrangement format of the history pixels is that the history pixels are arranged in the sequence of the LCU serial numbers, and the pixel samples are arranged in a vertical scanning format column by column in one LCU, so that the history pixels are finally arranged into a one-dimensional pixel sample string. At decoding time, the matching string numbered in-circle 1, the matching string numbered in-circle 2, the matching string numbered in-circle 3, … …, etc. are copied one by one from the history pixel set according to the matching position and the matching size obtained from the code stream data, and are moved and pasted to the positions of the matched string numbered in-circle 1, the matched string numbered in-circle 2, the matched string numbered in-circle 3, … …, etc. in the current decoding CU, to restore the matched string numbered in-circle 1, the matched string numbered in-circle 2, the matched string numbered in-circle 3, … …, etc. P=768 m-753, s=42 for the matching string numbered 1 in the circle, so that among the history pixels arranged in the 1-dimensional string format, 42 pixel samples are copied from a position distant from the position of the current matching string by 768m-753 pixel samples, and these 42 pixel samples are moved and pasted to the position of the matching string numbered 1 in the circle, restoring the entire matching string numbered 1 in the circle. Similarly, p=768 m-81 and s=33 of the matching string numbered 2 in the circle, so that among the history pixels arranged in the 1-dimensional string format, 33 pixel samples are copied from a position distant from the position of the current matching string by 768m-81 pixel samples, and the 33 pixel samples are moved and pasted to the position of the matching string numbered 2 in the circle, thereby restoring the entire matching string numbered 2 in the circle. In the same way, all matched strings in CU m, … …, etc., numbered in-circle 3, can be decoded and restored.
CU m +1 in fig. 2 performs arbitrary shape matching using a matching pattern of vertical scan 2-dimensional conformal matching, where (a) uses raster scanning and (b) uses arcuate scanning (also called back-and-forth scanning). Thus, the history pixels preserve the 2-dimensional arrangement format of the original image, and in one pixel, 3 pixel components (samples) are vertically arranged. At decoding, the matching string with number of in-loop 4, the matching string with number of in-loop 5, … …, etc. are copied one by one from the history pixel set according to the matching position and the matching size obtained from the code stream data, and are moved and pasted to the positions of the matched string with number of in-loop 4, the matched string with number of in-loop 5, … …, etc. in the current decoding CU, and the matched string with number of in-loop 4, the matched string with number of in-loop 5, … …, etc. are restored. P= (h-18, v-39) and s=45 of the matching string numbered in-circle 4, so that in the history pixels arranged in the 2-dimensional format of the image, 45 pixel samples are copied from the position of the matching string having a horizontal distance of h-18 pixel samples and a vertical distance of v-39 pixel samples, and the 45 pixel samples are moved and pasted to the position of the matching string numbered in-circle 4, thereby restoring the entire matching string numbered in-circle 4. Similarly, p= (h-30, v-42) of the matching string numbered in-circle 5, s=60, so in the history pixels arranged in the 2-dimensional format of the image, from the position of the current matching string having a horizontal distance of h-30 pixel samples and a vertical distance of v-42 pixel samples, 60 pixel samples are copied, and these 60 pixel samples are moved and pasted to the position of the matching string numbered in-circle 5, restoring the entire matching string numbered in-circle 5. In the same way, all matched strings in CU m+1 may be decoded and restored.
CU m +2 in fig. 2 performs arbitrary shape matching using a matching pattern of horizontal scan 2-dimensional conformal matching, where (a) raster scan and (b) arcuate scan (also referred to as back-and-forth scan) are used. Thus, the history pixels preserve the 2-dimensional arrangement format of the original image, and in one pixel, 3 pixel components (samples) are also horizontally arranged. At decoding time, the matching string with number of 6 in the circle, the matching string with number of 7 in the circle, the matching string with number of 8 in the circle, … …, etc. are copied one by one from the history pixel set according to the matching position and the matching size obtained from the code stream data, and are moved and pasted to the positions of the matched string with number of 6 in the circle, the matched string with number of 7 in the circle, the matching string with number of 8 in the circle, … …, etc. in the current decoding CU, and the matched string with number of 6 in the circle, the matched string with number of 7 in the circle, the matching string with number of 8 in the circle, … …, etc. are restored. P= (h-75, v-1) and s=72 of the matching string numbered 6 in the circle, so that in the history pixels arranged in the 2-dimensional format of the image, 72 pixel samples are copied from the position of the matching string having the horizontal distance of h-75 pixel samples and the vertical distance of v-1 pixel samples, and the 72 pixel samples are moved and pasted to the position of the matching string numbered 6 in the circle, thereby restoring the entire matching string numbered 6 in the circle. Similarly, p= (h-30, v-29) and s=45 of the matching string numbered 7 in the circle, so that in the history pixels arranged in the 2-dimensional format of the image, 45 pixel samples are copied from the position of the matching string having the horizontal distance of h-30 pixel samples and the vertical distance of v-29 pixel samples from the position of the current matching string, and the 45 pixel samples are moved and pasted to the position of the matching string numbered 7 in the circle, thereby restoring the matching string numbered 7 in the whole circle. In the same way, all matched strings in CU m+2, … …, etc., numbered in-circle 8, can be decoded and restored.
The technical features of the present invention are described above by means of several specific embodiments. Other advantages and effects of the present invention will be readily apparent to those skilled in the art from the present disclosure. The invention may be practiced or carried out in other embodiments that depart from the spirit and scope of the present invention, and the details of the present invention may be modified or changed from various points of view and applications.
The coding method of the invention comprises the following steps:
1) Pixel characteristic analysis and evaluation, preprocessing and coding mode selection; analyzing and evaluating the characteristics of pixel sample values of the current CU and the adjacent CU, carrying out necessary pretreatment on the input pixel sample values, and judging whether any shape matching coding mode is suitable for coding the current CU in advance, wherein the step is optional, namely the step can be skipped, and the next step can be directly carried out; examples of methods of the analytical evaluation: a method for calculating the number of pixels of different colors in the current CU according to or referring to the coding result of the adjacent CU; examples of the pretreatment: sample quantization, color quantization, and color-based pixel clustering, using palettes and indexes to accurately or approximately represent the colors of the input original pixels;
2) An arbitrary shape matching encoding step; performing arbitrary shape matching coding operation on the current CU by using an arbitrary shape matching coding mode and a coded history pixel (reconstruction pixel) temporary storage area (also called a reference pixel sample set); the input of the arbitrary shape matching code is an input original pixel or a pixel subjected to pretreatment; the output of the arbitrary shape matching coding is the matching position and matching size or the variation of the matching string (block), the unmatched pixel value or the variation thereof, the matching residual and other arbitrary shape matching coding result parameters and variables; the matching location is a variable parameter used to represent where within the set of reference pixel samples a matching reference pixel value that matches a matching current pixel value in the current CU; the arbitrary shape matching coding mode takes a pixel sample string or block with variable size (called a matching current string or matching current block, the position of the pixel sample string or block can be represented by either a 2-dimensional coordinate or a linear address), the matching reference pixel value forms a matching string or matching block in the reference pixel sample set, the position of the pixel sample string or matching block can be represented by either a 2-dimensional coordinate or a linear address, and therefore, in the arbitrary shape matching coding mode, the matching position can be represented by either the difference between the 2-dimensional coordinate of the matching reference string (block) and the 2-dimensional coordinate of the matching current string (block) or the difference between the linear address of the matching reference string (block) and the linear address of the matching current string (block), which is commonly called a displacement vector; since the size of the matching reference string (block) (equal to the size of the matching current string (block)) is variable, another variable parameter called the matching size is also required to represent its size; in the case of matching strings, the matching size is generally the length of the matching string; in the case of matching blocks, the size of a block generally needs to be represented by a plurality of parameter components; for example, where the block is rectangular, the matching size typically contains two components, namely the width and height (sometimes also referred to as length and width) of the rectangle; for another example, where the block is a parallelogram, the matching size typically also contains two components, namely the bottom and the height of the parallelogram; for another example, where the block is trapezoidal, the match size generally contains three components, namely the upper base, lower base and high of the trapezoid; the unmatched pixel values are input original pixel samples or preprocessed pixel samples thereof, which are not found to match within the set of reference pixel samples according to a predetermined matching criterion; the unmatched pixel value is an input original pixel sample or a preprocessed pixel sample thereof, and therefore, can be represented by its position in the current CU; the unmatched pixel values can also be approximated by a lossy or lossless simulated matching sample obtained by calculation; if the match size is 1, this matching string (block) can also be treated as an unmatched pixel value; the matching residual is the difference between the input original pixel sample value and the matching reference pixel value, if the predetermined matching criterion of the arbitrary shape matching coding mode is an absolute accurate lossless matching, the matching residual is zero, i.e. the arbitrary shape matching coding mode has no matching residual as output, if the predetermined matching criterion of one arbitrary shape matching coding mode is an approximate lossy matching, the matching residual may not be zero, and the other lossy matching situation is that the input original pixel sample value is subjected to sample quantization, color quantization or color-based pixel clustering, preprocessing of approximating the color of the input original pixel by using a palette and an index, and then subjected to arbitrary shape matching coding, in which case, due to sample quantization, color quantization or color-based pixel clustering, palette and index-represented pixel is lossy, even if the arbitrary shape matching coding itself is lossless, the matching residual (i.e. the difference between the input original pixel sample value and the matching reference pixel value) may not be zero; examples of the other arbitrary shape matching encoding results: a matching pattern, a rule for forming a block of an arbitrary shape by using a matching string, a type of a variation of a matching parameter, a calculation rule for a matching position, a calculation rule for a matching size, and the like; the most basic and essential results of performing arbitrary shape matching coding on the current CU are I (I is more than or equal to 0) matching strings (blocks) and J (J is more than or equal to 0) unmatched pixel values, and I pairs (matching positions, matching sizes) and J unmatched pixel values are output; the I matching strings (blocks) and J unmatched pixel values are seamlessly spliced to form a complete current CU;
3) The other matching modes and various common techniques encode and reconstruct operation steps, complete all other encoding and reconstruct operations of the current CU, perform other matching modes and various common techniques on input original pixels, various parameters and variables of the input video image, such as intra-frame prediction, inter-frame prediction, block matching, palette matching, stripe matching, micro-block string matching, pseudo-matching sample predictive interpolation, transformation, quantization, inverse transformation, inverse quantization, compensation corresponding to the predicted residual and the matched residual (i.e. inverse operation of the residual operation), prediction and residual calculation, DPCM, first-order and higher-order difference, mapping, run, index, deblocking filtering, sample adaptive compensation (Sample Adaptive Offset), encoding and reconstruct operations and entropy encoding operations; the rest matching modes are the matching modes of any shape matching codes which are different from those in the step 2) in the coding method; the input of this step is the output and input original pixels of steps 1) and 2) above and reference pixels from the set of reference pixel samples; the output of this step is reconstructed pixels (including fully reconstructed pixels and partially reconstructed pixels of varying degrees) and a compressed code stream containing any shape matching encoding results and other encoding results; the reconstructed pixel is put into the reference pixel sample value set and used as the reference pixel required by the following arbitrary shape matching coding operation, the rest matching modes and various common technology coding and reconstruction operation steps; the compressed code stream is the final output of the encoding method, and contains all syntax elements required by the decoding and reconstruction of the corresponding decoding method, in particular, the syntax elements such as the matching position, the matching size or the variant thereof, the unmatched pixel value or the variant thereof.
The decoding method of the present invention comprises the steps of:
1) A step of analyzing and partially decoding the compressed code stream data; entropy decoding is carried out on the input compressed code stream containing the compressed data of any shape matching coding matching position and matching size or the variation thereof, unmatched pixel values or the variation thereof and the compressed data of all other syntax elements, the meaning of various data obtained by the entropy decoding is analyzed, and partial decoding (such as transformation decoding, prediction and compensation, namely inverse operation of residual calculation, DPCM decoding, first-order and high-order differential decoding, mapping decoding, run decoding and index decoding) is carried out on a part of syntax elements, particularly syntax elements related to any shape matching coding; outputting the matching position, the matching size or the variation thereof, the unmatched pixel value or the variation thereof and other arbitrary shape matching parameters obtained after analysis and partial decoding to the subsequent arbitrary shape matching decoding step; outputting the output data of entropy decoding results (namely the result of entropy decoding) of all other syntax elements obtained through analysis, such as matching modes and matching parameters of any shape matching residual, other matching modes, coding results of various common technologies and the like, to the subsequent steps of decoding and reconstruction operation of the other matching modes and the various common technologies; in particular, whether to perform arbitrary shape matching decoding on the current CU is determined according to information parsed from the compressed code stream data or according to information parsed from the compressed code stream data and a result of performing analysis and evaluation on characteristics of the current CU and the neighboring CU; examples of methods of the analytical evaluation: according to or referring to a plurality of decoding results of adjacent CUs, a round of partial pre-decoding is firstly carried out on the current CU by using any shape matching decoding mode and other decoding modes, and partial pre-decoding results are evaluated; if the current CU is determined to be subjected to arbitrary shape matching decoding, sequentially executing the next step, otherwise, jumping to the step 3);
2) An arbitrary shape matching decoding step; performing arbitrary shape matching decoding operation on the current CU by using an arbitrary shape matching decoding mode and a history pixel (reconstruction pixel) temporary storage area (also called a reference pixel sample set) which is already decoded; the input of the arbitrary shape matching decoding operation is an I (I is more than or equal to 0) pair (matching position, matching size) or a variant thereof and J (J is more than or equal to 0) unmatched pixel values or variant thereof and other arbitrary shape matching parameters obtained by analyzing and decoding the compressed code stream data in the step 1); the matching location is a location for representing where the matching reference sample is copied from within the set of reference pixel samples and pasted to the matching current sample of the current CU; obviously, the matching current sample is a replica of the matching reference sample, both being equal in value; any shape matching decoding mode performs any shape matching decoding in units of a variable-sized string or block of pixel samples (referred to as a matching current string or matching current block, the position of which can be represented by either a 2-dimensional coordinate or a linear address), the matching reference sample forming a matching string (block) within the set of reference pixel samples, referred to as a matching reference string (block), the position of which can be represented by either a 2-dimensional coordinate or a linear address, so that in any shape matching decoding mode, the matching position can be represented by either a difference between the 2-dimensional coordinate of the matching reference string (block) and the 2-dimensional coordinate of the matching current string (block) or a difference between the linear address of the matching reference string (block) and the linear address of the matching current string (block), commonly referred to as a displacement vector, and another variable parameter called a matching size is required to represent the size of the matching reference string (block) because the size (equal to the size of the matching current string (block)) is variable; in the case of matching strings, the matching size is generally the length of the matching string; in the case of matching blocks, the size of a block generally needs to be represented by a plurality of parameter components; for example, where the block is rectangular, the matching size typically contains two components, namely the width and height (sometimes also referred to as length and width) of the rectangle; for another example, where the block is a parallelogram, the matching size typically also contains two components, namely the bottom and the height of the parallelogram; for another example, where the block is trapezoidal, the match size generally contains three components, namely the upper base, lower base and high of the trapezoid; the unmatched pixel value is a pixel value directly obtained by parsing and decoding the compressed code stream data and is pasted to the position of the pixel value in the current decoding of the current CU, and the unmatched pixel value is not normally existed in the reference pixel sample value set; if the position of the unmatched pixel value is not the unmatched pixel value itself but the unmatched pixel value is obtained through analysis and decoding from the compressed code stream data, outputting the position of the unmatched pixel value to the subsequent step 3) to calculate a simulated matched pixel value; the output of the arbitrary shape matching decoding operation is the matching current sample (equal in value to the matching reference sample) plus the unmatched pixel value (or its position); the matching current sample and the possibly present unmatched pixel values (or their positions) all together form a complete arbitrary shape matching decoded output of the current CU; the finally obtained I (I is more than or equal to 0) matching strings (blocks) and J (J is more than or equal to 0) unmatched pixel values are seamlessly spliced to just form a complete current CU; when performing arbitrary shape matching decoding operation, firstly determining the position of a matching reference sample in a history pixel (reconstruction pixel) temporary storage module (also called a reference pixel sample set) and determining the shape size of a matching area (the matching area can be a matching string or a matching block) formed by the matching reference sample, copying the matching reference sample in the matching area with the shape size from the position, and moving and pasting the matching reference sample to the position of a matching current sample in current decoding to restore the matching current sample; the output of this module is all the restored matching current sample values and possibly unmatched pixel values;
3) Decoding and reconstructing operation steps of other matching modes and various common technologies, namely, decoding and reconstructing operation steps of all other decoding and reconstructing operations of the current CU, and decoding and reconstructing operations of other matching modes and various common technologies of matching strings (or matching blocks) in the current decoding or various parameters and variables of the current CU in the current decoding, such as intra-frame prediction, inter-frame prediction, block matching, palette matching, stripe matching, micro-block string matching, imitation matching sample prediction interpolation, inverse transformation, inverse quantization, compensation corresponding to prediction residual and matching residual (namely, inverse operation of residual calculation), prediction and compensation (namely, inverse operation of residual calculation), DPCM, first-order and higher-order difference, mapping, run, index, deblocking effect filtering, sample self-adaptive compensation (Sample Adaptive Offset); the other matching modes refer to any shape matching decoding mode which is different from the step 2) in the decoding method; the inputs to this step are all other syntax elements output by step 1) above, such as entropy decoded output data of the matched residual, and the output of step 2), i.e. the matched current sample plus the possibly present unmatched pixel value (or its position), and reference pixels from within the set of reference pixel samples; the output of this step is reconstructed pixels (including fully reconstructed pixels and partially reconstructed pixels of varying degrees); the reconstructed pixel is put into the reference pixel sample value set and used as the reference pixel required by the following arbitrary shape matching decoding operation, other matching modes and various common technology decoding and reconstruction operation steps; the fully reconstructed pixels are also the final output of the present decoding method.
The coding device of the invention consists of the following modules:
1) Pixel preprocessing and arbitrary shape matching coding module: performing pixel preprocessing and arbitrary shape matching coding on input video image pixel values, generating and outputting matching positions and matching sizes of matching strings (blocks) or variants thereof, unmatched pixel values or variants thereof, matching residual errors and other arbitrary shape matching coding result parameters and variables; examples of the pixel preprocessing: sample quantization, color quantization, and color-based clustering of pixels, using palettes and indexes to accurately or approximately represent the colors of the input original pixels; the matching location is a variable parameter used to represent where in a history pixel (reconstruction pixel) temporary storage module (also referred to as a reference pixel sample set) a matching reference pixel value that matches a matching current pixel value in the current CU; the arbitrary shape matching coding mode takes a pixel sample string or block with variable size (called a matching current string or matching current block, the position of the pixel sample string or block can be represented by either a 2-dimensional coordinate or a linear address), the matching reference pixel value forms a matching string or matching block in the reference pixel sample set, the position of the pixel sample string or matching block can be represented by either a 2-dimensional coordinate or a linear address, and therefore, in the arbitrary shape matching coding mode, the matching position can be represented by either the difference between the 2-dimensional coordinate of the matching reference string (block) and the 2-dimensional coordinate of the matching current string (block) or the difference between the linear address of the matching reference string (block) and the linear address of the matching current string (block), which is commonly called a displacement vector; since the size of the matching reference string (block) (equal to the size of the matching current string (block)) is variable, another variable parameter called the matching size is also required to represent its size; in the case of matching strings, the matching size is generally the length of the matching string; in the case of matching blocks, the size of a block generally needs to be represented by a plurality of parameter components; for example, where the block is rectangular, the matching size typically contains two components, namely the width and height (sometimes also referred to as length and width) of the rectangle; for another example, where the block is a parallelogram, the matching size typically also contains two components, namely the bottom and the height of the parallelogram; for another example, where the block is trapezoidal, the match size generally contains three components, namely the upper base, lower base and high of the trapezoid; the unmatched pixel values are input original pixel samples or preprocessed pixel samples thereof, which are not found to match within the set of reference pixel samples according to a predetermined matching criterion; the unmatched pixel value is an input original pixel sample or a preprocessed pixel sample thereof, and therefore, can be represented by its position in the current CU; the unmatched pixel values can also be approximated by a lossy or lossless simulated matching sample obtained by calculation; if the match size is 1, this matching string (block) can also be treated as an unmatched pixel value; the matching residual is the difference between the input original pixel sample value and the matching reference pixel value, if the predetermined matching criterion of the arbitrary shape matching coding mode is an absolute accurate lossless matching, the matching residual is zero, i.e. the arbitrary shape matching coding mode has no matching residual as output, if the predetermined matching criterion of one arbitrary shape matching coding mode is an approximate lossy matching, the matching residual may not be zero, and the other lossy matching situation is that the input original pixel sample value is subjected to sample quantization, color quantization or color-based pixel clustering, preprocessing of approximating the color of the input original pixel by using a palette and an index, and then subjected to arbitrary shape matching coding, in which case, due to sample quantization, color quantization or color-based pixel clustering, palette and index-represented pixel is lossy, even if the arbitrary shape matching coding itself is lossless, the matching residual (i.e. the difference between the input original pixel sample value and the matching reference pixel value) may not be zero; examples of the other arbitrary shape matching encoding results: a matching pattern, a rule for forming a block of an arbitrary shape by using a matching string, a type of a variation of a matching parameter, a calculation rule for a matching position, a calculation rule for a matching size, and the like; the most basic and essential results of performing arbitrary shape matching coding on the current CU are I (I is more than or equal to 0) matching strings (blocks) and J (J is more than or equal to 0) unmatched pixel values, and I pairs (matching positions, matching sizes) and J unmatched pixel values are output; the I matching strings (blocks) and J unmatched pixel values are seamlessly spliced to form a complete current CU;
2) The other matching modes and various common technical coding and reconstruction modules: performing other matching modes and various common techniques on the input video pixels, various parameters and variables, such as intra prediction, inter prediction, block matching, palette matching, stripe matching, microblock string matching, simulated matching sample prediction interpolation, transformation, quantization, inverse transformation, inverse quantization, compensation corresponding to prediction residual and matching residual (i.e. inverse operation of residual fetching operation), prediction and residual calculation, DPCM, first-order and higher-order difference, mapping, run, indexing, deblocking filtering, sample adaptive compensation (Sample Adaptive Offset), coding and reconstruction operation, and entropy coding operation; the rest matching modes are matching modes of any shape matching coding performed by the coding device and are different from the module 1); the inputs to this module are the output of said module 1), the original said input video pixel and a reference pixel from the set of reference pixel samples; the output of the module is a reconstructed pixel value (comprising a complete reconstructed pixel and partial reconstructed pixels with different degrees) and a compressed code stream containing any shape matching coding result and other coding results; the reconstructed pixel value is put into a history pixel (reconstructed pixel) temporary storage module and used as a reference pixel value required by subsequent arbitrary shape matching coding operation, other matching modes and various common technical coding and reconstruction operations; the compressed code stream is the final output of the encoding device and contains all syntax elements required by decoding and reconstruction by a corresponding decoding method, in particular syntax elements such as matching positions, matching sizes or variants thereof, unmatched pixel values or variants thereof;
3) History pixel (reconstruction pixel) temporary storage module: also called reference pixel sample value set, temporarily storing the reconstructed pixel value, namely, the reconstructed pixel value from the current CU in coding or from the beginning position of the matching region (which may be a matching string or a matching block) in current coding in the coding process, which is used as the reference pixel value of the current and subsequent arbitrary shape matching codes and is also used as the reference pixel value required when the current and subsequent CUs are subjected to the coding and reconstruction operation of the other matching modes and various common technologies; the reconstructed pixel values are typically fully reconstructed after a number of processing steps; thus, the reconstructed pixel values stored within the set of reference pixel samples typically include different kinds of fully reconstructed pixels and different degrees of partially reconstructed pixels, i.e., reconstructed pixels that have undergone only a partial process; different matching modes can adopt the reconstructed pixels of the same kind as reference pixels, and can also adopt the reconstructed pixels of different kinds as reference pixels; in the same matching mode, different kinds of reconstructed pixels can be adopted as reference pixels at different matching positions.
The decoding device of the invention consists of the following modules:
1) And the code stream data analysis and partial decoding module is used for: performing entropy decoding on the input compressed code stream containing the compressed data of any shape matching coding matching position and matching size or the variant thereof, unmatched pixel values or the variant thereof and compressed data of all other syntax elements, analyzing the meaning of various data obtained by the entropy decoding, and performing entropy decoding on a part of syntax elements, particularly syntax elements related to any shape matching coding (such as transformation decoding, prediction and compensation, namely inverse operation of residual calculation, DPCM decoding, first-order and high-order differential decoding, mapping decoding, run decoding and index decoding); the matching position, matching size or its variant, unmatched pixel value or its variant and other arbitrary shape matching parameters obtained after analysis and partial decoding are sent to an arbitrary shape matching decoding module; the output data of entropy decoding results (namely, the result of entropy decoding) of grammar elements such as the matching coding result of other arbitrary shapes such as the matching residual error obtained by analysis, the matching modes and the matching parameters of other matching modes, the coding result of various common technologies and the like are sent to the decoding and reconstruction module of other matching modes and various common technologies; other examples of the partial decoding: determining whether to perform arbitrary shape matching decoding on the current CU according to information obtained by parsing the compressed code stream data or according to the information obtained by parsing the compressed code stream data and the result of analyzing and evaluating the characteristics of the current CU and the adjacent CU; examples of methods of the analytical evaluation: according to or referring to a plurality of decoding results of adjacent CUs, a round of partial pre-decoding is firstly carried out on the current CU by using any shape matching decoding mode and other decoding modes, and partial pre-decoding results are evaluated;
2) Arbitrary shape matching decoding module: performing arbitrary shape matching decoding operation according to the arbitrary shape matching parameters such as the matching position, the matching size or the variation thereof, the unmatched pixel value or the variation thereof and the like; the input of the module is any shape matching parameters such as I (I is more than or equal to 0) pairs (matching positions, matching sizes) or variants thereof and J (J is more than or equal to 0) unmatched pixel values or variants thereof, which are output by the module 1) and are obtained by analyzing and decoding compressed code stream data; the matching location is a location for representing where the matching reference sample is copied from within the set of reference pixel samples and pasted to the matching current sample of the current CU; obviously, the matching current sample is a replica of the matching reference sample, both being equal in value; any shape matching decoding mode performs any shape matching decoding in units of a variable-sized string or block of pixel samples (referred to as a matching current string or matching current block, the position of which can be represented by either a 2-dimensional coordinate or a linear address), the matching reference sample forming a matching string (block) within the set of reference pixel samples, referred to as a matching reference string (block), the position of which can be represented by either a 2-dimensional coordinate or a linear address, so that in any shape matching decoding mode, the matching position can be represented by either a difference between the 2-dimensional coordinate of the matching reference string (block) and the 2-dimensional coordinate of the matching current string (block) or a difference between the linear address of the matching reference string (block) and the linear address of the matching current string (block), commonly referred to as a displacement vector, and another variable parameter called a matching size is required to represent the size of the matching reference string (block) because the size (equal to the size of the matching current string (block)) is variable; in the case of matching strings, the matching size is generally the length of the matching string; in the case of matching blocks, the size of a block generally needs to be represented by a plurality of parameter components; for example, where the block is rectangular, the matching size typically contains two components, namely the width and height (sometimes also referred to as length and width) of the rectangle; for another example, where the block is a parallelogram, the matching size typically also contains two components, namely the bottom and the height of the parallelogram; for another example, where the block is trapezoidal, the match size generally contains three components, namely the upper base, lower base and high of the trapezoid; the unmatched pixel value is a pixel value directly obtained by parsing and decoding the compressed code stream data and is pasted to the position of the pixel value in the current decoding of the current CU, and the unmatched pixel value is not normally existed in the reference pixel sample value set; if the position of the unmatched pixel value is not the unmatched pixel value itself but the unmatched pixel value is obtained through analysis and decoding from the compressed code stream data, outputting the position of the unmatched pixel value to the subsequent step 3) to calculate a simulated matched pixel value; the output of the arbitrary shape matching decoding operation is the matching current sample (equal in value to the matching reference sample) plus the unmatched pixel value (or its position); the matching current sample and the possibly present unmatched pixel values (or their positions) all together form a complete arbitrary shape matching decoded output of the current CU; the finally obtained I (I is more than or equal to 0) matching strings (blocks) and J (J is more than or equal to 0) unmatched pixel values are seamlessly spliced to just form a complete current CU; when performing arbitrary shape matching decoding operation, firstly determining the position of a matching reference sample in a history pixel (reconstruction pixel) temporary storage module (also called a reference pixel sample set) and determining the shape size of a matching area (the matching area can be a matching string or a matching block) formed by the matching reference sample, copying the matching reference sample in the matching area with the shape size from the position, and moving and pasting the matching reference sample to the position of a matching current sample in current decoding to restore the matching current sample; the output of this module is all the restored matching current sample values and possibly unmatched pixel values;
3) The rest of the matching modes and various common technologies decode and reconstruct modules: performing other matching modes and various common techniques on various parameters and variables of a matching string (or a matching block) in the current decoding or a CU in the current decoding, such as intra prediction, inter prediction, inverse transformation, inverse quantization, compensation corresponding to a prediction residual and a matching residual (i.e. inverse operation of taking residual operation), DPCM, first-order and higher-order difference, mapping, run, indexing, deblocking filtering, sample adaptive compensation (Sample Adaptive Offset), decoding and reconstruction operations; the other matching modes refer to any shape matching decoding mode which is performed by the decoding device and is different from the module 2); the output of this module is the reconstructed pixel values (including fully reconstructed pixel values and partially reconstructed pixel values of varying degrees); the reconstructed pixel value is put into a history pixel (reconstructed pixel) temporary storage module and used as a reference pixel value required by subsequent matching decoding operation, other matching modes and various common technical decoding and reconstruction operations; the fully reconstructed pixel value is also the final output of the present decoding means;
4) History pixel (reconstruction pixel) temporary storage module: also referred to as a reference pixel sample set, temporarily storing reconstructed pixel values, i.e., reconstructed pixel values up to the start position of a CU in current decoding or a matching region (which may be a matching string or a matching block) in current decoding during decoding, which are used as reference pixel values for current and subsequent arbitrary shape matching decoding, and also used as reference pixel values required when performing decoding and reconstruction operations of the current and subsequent CUs in the remaining matching manner and various general techniques; the reconstructed pixel values are typically fully reconstructed after a number of processing steps; thus, the reconstructed pixel values stored within the set of reference pixel samples typically include different kinds of fully reconstructed pixels and different degrees of partially reconstructed pixels, i.e., reconstructed pixels that have undergone only a partial process; different matching modes can adopt the reconstructed pixels of the same kind as reference pixels, and can also adopt the reconstructed pixels of different kinds as reference pixels; in the same matching mode, different kinds of reconstructed pixels can be adopted as reference pixels at different matching positions.
Preferably, the samples are index values when the pixel values are represented by palettes and indexes, and the reference samples, the current samples, the reference sample set, the reference sample temporary storage module, the matched reference sample string (block), and the matched current sample string (block) are respectively reference indexes, current indexes, reference index sets, reference index temporary storage modules, matched reference index strings (blocks), and matched current index strings (blocks).
The drawings provided above merely illustrate the basic idea of the present invention by way of illustration, only, and only the components related to the present invention are shown in the drawings, not according to the number, shape and size of the components in actual implementation, the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complex.
Drawings
Fig. 1 is a diagram showing a case of arbitrary shape matching encoding, in which a plurality of pieces of arbitrary shape matching strings are searched for in a history pixel for a current encoding CU.
Fig. 2 is a diagram showing a case where a plurality of pieces of arbitrary shape matching strings are copied from history pixels and pasted to a current decoded CU in arbitrary shape matching decoding.
Description of the embodiments
Further details and variations of the invention are set forth below.
One embodiment of a decoding method
The embodiment comprises the following steps:
1) And performing post-processing of deblocking filtering and pixel compensation operation on the preliminary reconstructed pixels in the prediction mode or the preliminary reconstructed pixels in the matching mode, and then placing all reconstructed pixels of the current CU subjected to the post-processing into a historical pixel (reconstructed pixel) temporary storage area to be used as reference pixels for subsequent arbitrary shape matching decoding and predictive decoding.
One embodiment of a decoding apparatus
The embodiment consists of the following modules:
1) And a post-processing module: and performing post-processing of deblocking filtering and pixel compensation operation on the primary reconstructed pixels, and then placing the post-processed reconstructed pixels into a history pixel (reconstructed pixels) temporary storage module to be used as reference pixels for subsequent arbitrary shape matching decoding and predictive decoding.
Several embodiments of matching patterns for arbitrary shape matching
In the matching mode, a pixel value vertical arrangement format is adopted, namely, the pixel values of one 2-dimensional area are firstly vertically arranged, one column is arranged and then the other column is arranged, and a string matching format is adopted, namely, the current pixel value and the reference pixel value are matched to form strings of the pixel values, wherein the two strings have equal lengths, but the same 2-dimensional shape is not necessarily maintained;
Or alternatively
In the matching mode, a pixel value horizontal arrangement format is adopted, namely, the pixel values of one 2-dimensional area are firstly horizontally arranged, one row is arranged and then the other row is arranged, and a string matching format is adopted, namely, the current pixel value is matched with the reference pixel value to form a string of the pixel values, and the two strings have equal lengths but do not necessarily keep the same 2-dimensional shape;
or alternatively
In the matching mode, a pixel value vertical arrangement format is adopted, namely, pixel values of one 2-dimensional area are firstly vertically arranged, one column is arranged and then the other column is arranged, and a 2-dimensional conformal matching format is adopted, namely, the current pixel value is matched with the reference pixel value to form a 2-dimensional area, and the two areas have the same size and keep the same 2-dimensional shape; the 2-dimensional region is composed of columns formed by vertically arranging pixel values, wherein each column in the middle except the first column and the last column has the same height, namely the height of the region, the first column is aligned with the bottom of the region, and the last column is aligned with the top of the region; the height of the region may be equal to the height of the current CU, or may be different from the height of the current CU by another arbitrary value or a value derived from the height of the current CU, such as one half or one quarter of the height of the current CU; the first and last columns may also have the same height as the middle columns, i.e. equal to the height of the area, which is then a rectangle or square of arbitrary size; in the present matching mode, the matching area is a 2-dimensional area, the matching size generally needs to be represented by two or more parameter components, and in the special case where the height of the matching area can be derived from other parameters or variables in the encoding process and decoding process (for example, equal to the height of the current CU or a half thereof), the matching size can also be represented by only one parameter component;
Or alternatively
In the matching mode, a pixel value horizontal arrangement format is adopted, namely, pixel values of one 2-dimensional area are firstly horizontally arranged, one row is arranged and then the other row is arranged, and a 2-dimensional conformal matching format is adopted, namely, the current pixel value is matched with the reference pixel value to form a 2-dimensional area, and the two areas have the same size and keep the same 2-dimensional shape; the 2-dimensional area is formed by rows formed by horizontally arranging pixel values, wherein the middle rows except the first row and the last row have the same width, namely the width of the area, the first row is aligned with the right part of the area, and the last row is aligned with the left part of the area; the width of the region may be equal to the width of the current CU, or may be different from the width of the current CU by another arbitrary value or a value derived from the width of the current CU, such as one half or one quarter of the width of the current CU; the first and last rows may also have the same width as the middle rows, i.e. the width of the area, which is then a rectangle or square of arbitrary size; in the present matching mode, the matching area is a 2-dimensional area, the matching size generally needs to be represented by two or more parameter components, and in the special case where the width of the matching area can be derived from other parameters or variables in the encoding process and decoding process (for example, equal to the width of the current CU or a half thereof), the matching size can also be represented by only one parameter component;
Or alternatively
In the matching mode, a pixel value horizontal arrangement format is adopted, namely, pixel values of one 2-dimensional area are firstly horizontally arranged, one row is arranged and then the other row is arranged, and a 2-dimensional conformal matching format is adopted, namely, the current pixel value is matched with the reference pixel value to form a 2-dimensional area, and the two areas have the same size and keep the same 2-dimensional shape; the 2-dimensional area is formed by rows formed by horizontally arranging pixel values, and all the rows have the same width; the left end points of all the rows can form a vertical straight line, and the area is a rectangle or square, or a non-vertical oblique line, and the area is a parallelogram;
or alternatively
In the matching mode, a pixel value horizontal arrangement format is adopted, namely, pixel values of one 2-dimensional area are firstly horizontally arranged, one row is arranged and then the other row is arranged, and a 2-dimensional conformal matching format is adopted, namely, the current pixel value is matched with the reference pixel value to form a 2-dimensional area, and the two areas have the same size and keep the same 2-dimensional shape; the 2-dimensional area is composed of rows formed by horizontally arranging pixel values, the left end points of all the rows form a straight line, and the right end points of all the rows form another straight line; the two lines may be parallel, in which case the region is a parallelogram, or non-parallel, in which case the region is a trapezoid;
In a current image, all CUs may use the same matching mode, or different CUs may adaptively use different matching modes.
Embodiments of matching locations of matching regions
The matching position of the matching region (which may be a string or a block) is the relative position between the first matching current sample in the matching current region and the first matching reference sample in the matching reference region.
Example 1 of the representation of the matching position
The image being 2-dimensional data, matching stringsThe method is a special case of a matching block, namely a special case that one dimension of 2 dimensions takes a value of 1; the matching position is essentially a 2-dimensional natural number variable, which can be represented by a natural number pair (X, Y); mathematically, however, the maximum values of X and Y are represented by Xmax and Ymax, respectively, and any 2-dimensional natural number pair (X, Y) can be converted into a 1-dimensional natural number L: l=x+w X Y, wherein W is a predetermined natural number greater than Xmax; there may be another calculation method for L: l=y+h X, where H is a predetermined natural number greater than Ymax; obviously, (X, Y) can also be calculated from L: dividing L by W, X and Y are the remainder and quotient of the division, respectively; likewise, X and Y are the quotient and remainder of L divided by H, respectively; thus, the matching position can be represented by a natural number pair (X, Y); or a natural number L, and (X, Y) and L can be converted from each other by a natural number W or H determined according to a rule in the encoding process and the decoding process; one way of calculating the matching position (X, Y) is to match the 2-dimensional coordinates (X) of the reference sample 1 ,Y 1 ) And 2-dimensional coordinates (X) matching the current sample 2 ,Y 2 ) The difference is then added (image width, image height), and X 1 And X 2 Are smaller than the image width, Y 1 And Y 2 Are smaller than the image height, so X and Y are smaller than 2 times the image width and 2 times the image height, respectively; the example of W can be seen here: 2 times the image width, examples of H: 2 times the image height.
Example 2 of the representation of the matching position
The current image is divided into one CU (or LCU), each CU (or LCU) is assigned a sequence number, and the sequence numbers are gradually increased from zero; each pixel value in the current image is also assigned a number (or linear address), and the number is gradually increased from zero; the arrangement sequence of the pixel value numbers is that the pixel values of the CU (or LCU) with the next sequence number are arranged after all the pixel values of the CU (or LCU) with one sequence number are arranged from the beginning of the sequence number of the CU (or LCU) with the small sequence number; inside a CU (or LCU), the pixel samples are arranged column by column in a vertical format (or row by row in a horizontal format); the matching location of the matching region is the difference between the linear address (i.e., number) of the first matching reference pixel value in the matching reference region and the linear address (i.e., number) of the first matching current pixel value in the matching current region.
Embodiments of restricted representation of matching locations
If the position of the matching reference sample is limited to have the same horizontal or vertical position as the matching current sample, then one of the matching positions (X, Y) is zero (or other constant); the matching position can be represented by a natural number and a flag bit indicating whether it is a horizontal or vertical position.
Different matching modes employ different kinds of embodiments of reconstructed pixels
There are two types of reconstructed pixels: class I and class II, there are 3 matching modes: mode a, mode B, mode C; mode a and mode B employ type I reconstructed pixels, while mode C employs type II reconstructed pixels; that is, when performing arbitrary shape matching encoding or decoding on the current CU, it is determined which reconstructed pixel is adopted as a reference pixel by the current CU according to the following logical relationship according to the matching mode of the current CU:
if (match mode= mode a) then use the reconstructed pixel of class I as the reference pixel;
if (match mode= mode B) then use the reconstructed pixel of class I as the reference pixel;
if (match mode= mode C) then use the reconstructed pixel of class II as the reference pixel;
The above symbol "=" means "equal".
In the same matching mode, different kinds of reconstructed pixels are adopted at different matching positions
There are two types of reconstructed pixels: class I and class II, the reference pixel sample set is divided into 3 parts: part a, part B and part C; a class I reconstructed pixel is used when the matching reference pixel value is in part a and part B, and a class II reconstructed pixel is used when the matching reference pixel value is in part C; that is, when performing arbitrary shape matching encoding or decoding on the current CU, it is determined which reconstructed pixel is adopted as a reference pixel for the current matching string (block) according to the following logical relationship according to the matching position of the current matching string (block):
if (the matching reference pixel value specified by the matching location is located in part a) then use the class I reconstructed pixel as the reference pixel;
if (the matching reference pixel value specified by the matching location is located in part B) then use the reconstructed pixel of class I as the reference pixel;
if (the matching reference pixel value specified by the matching location is located in part C) then a class II reconstructed pixel is used as the reference pixel.
Embodiments of the number of types and sizes of sets of sequence parameters in compressed code streams containing reference pixel sample sets
The sequence parameter set of the compressed code stream contains syntax elements loaded with the following information:
… … number of types P of reference pixel sample sets, size of 1 st type reference pixel sample set, size of 2 nd type reference pixel sample set, … …, size of P th type reference pixel sample set, … …
Alternatively, in the case where only one kind of reference pixel sample set size needs to be written into the sequence parameter set (no other kind of reference pixel sample set or no other kind of reference pixel sample set size needs to be written into the sequence parameter set), the sequence parameter set of the compressed code stream contains syntax elements loaded with the following information:
… …, size of the set of reference pixel samples, … ….

Claims (12)

1. An image encoding method, characterized by comprising the steps of:
step 1) arbitrary shape matching encoding step: using an arbitrary shape matching coding mode and a coded historical pixel temporary storage area as a reference pixel sample set to perform arbitrary shape matching coding on the pixel sample of the current CU;
the input of the arbitrary shape matching code comprises original pixels or pixels subjected to pretreatment;
the output of the arbitrary shape matching code includes a matching position;
The matching position is a variable parameter indicating where in the set of reference pixel samples a reference pixel sample that matches a current pixel sample in the current CU is;
the arbitrary shape matching coding mode performs matching coding by taking a pixel sample string or a pixel sample block in the current CU, which is called a current string or a current block, as a unit, and a reference pixel sample matched with the pixel sample of the current string or the current block forms a reference string or a reference block in the reference pixel sample set;
the history pixel temporary storage area temporarily stores at least different kinds of completely reconstructed pixels and/or different kinds of partially reconstructed pixels with different degrees, and at least comprises two kinds of reconstructed pixels: class I and class II; the reference pixel sample set is divided into 3 parts according to the positions of the reference pixel samples: part a, part B and part C, the union of part a and part B being noted as subset 1 of the set of reference pixel samples and part C being noted as subset 2 of the set of reference pixel samples;
the correspondence between the class I and class II and the subset 1 and subset 2 is:
a class I reconstructed pixel is used as a reference pixel when the reference pixel sample is in subset 1 and a class II reconstructed pixel is used as a reference pixel when the reference pixel sample is in subset 2;
Step 2) a compressed code stream generating step: a compressed code stream is generated containing at least syntax elements for arbitrary shape matching decoding required to derive the matching locations.
2. An image decoding method characterized by comprising the steps of:
step 1) a compressed code stream analyzing step: at least comprises analyzing the compressed code stream, and at least obtaining the matching position needed by any shape matching decoding;
step 2) arbitrary shape matching decoding step: using an arbitrary shape matching decoding mode and a decoded historical pixel temporary storage area as a reference pixel sample set to perform arbitrary shape matching decoding on the pixel sample of the current CU;
the arbitrary shape matching decoded input includes the matching location;
the matching position is a variable parameter indicating where in the set of reference pixel samples a reference pixel sample that matches a current pixel sample in the current CU is located, for copying the reference pixel sample from within the set of reference pixel samples to reconstruct the current pixel sample of the current CU;
the arbitrary shape matching decoding mode performs matching decoding by taking a pixel sample string or a pixel sample block in the current CU, called a current string or a current block, as a unit, and the copied reference pixel samples form a reference string or a reference block in the reference pixel sample set;
The history pixel temporary storage area temporarily stores at least different kinds of completely reconstructed pixels and/or different kinds of partially reconstructed pixels with different degrees, and at least comprises two kinds of reconstructed pixels: class I and class II; the reference pixel sample set is divided into 3 parts according to the positions of the reference pixel samples: part a, part B and part C, the union of part a and part B being noted as subset 1 of the set of reference pixel samples and part C being noted as subset 2 of the set of reference pixel samples;
the correspondence between the class I and class II and the subset 1 and subset 2 is:
the type I reconstructed pixels are used as reference pixels when the reference pixel sample is in subset 1 and the type II reconstructed pixels are used as reference pixels when the reference pixel sample is in subset 2.
3. The decoding method according to claim 2, characterized in that:
one implementation form of the corresponding relation is that when any shape matching decoding is carried out on the current CU, according to the matching position of the current string, which reconstruction pixel is adopted as a reference pixel by the current string is determined according to the following logic relation:
if the reference pixel sample specified by the matching location is located in subset 1, then use the class I reconstructed pixel as the reference pixel;
If the reference pixel sample specified by the matching location is located in subset 2, then a class II reconstructed pixel is used as the reference pixel.
4. A decoding method according to claim 2 or 3, characterized in that: in the same matching mode, different kinds of reconstructed pixels are used as reference pixels for the current pixel when the reference pixel samples are at different matching positions, i.e. at different parts of the set of reference pixel samples.
5. A decoding method according to claim 2 or 3, characterized in that:
the type I reconstructed pixels are partially reconstructed pixels i.e. reconstructed pixels having undergone only a partial process,
the class II reconstructed pixels are fully reconstructed pixels,
the fully reconstructed pixels are reconstructed pixels that have undergone a process including deblocking filtering and pixel compensation,
the deblocking filtering is one of the post-processing of the preliminary reconstructed pixels,
the partially reconstructed pixels, that is, the reconstructed pixels subjected to only the processing of the partial process are the reconstructed pixels not subjected to the processing of the processes of the past block effect filtering and the pixel compensation.
6. The decoding method of claim 5, wherein: in the same matching mode, different kinds of reconstructed pixels are used as reference pixels for the current pixel when the reference pixel samples are at different matching positions, i.e. at different parts of the set of reference pixel samples.
7. An image encoding device, characterized by comprising the following modules:
module 1) arbitrary shape matching encoding module: performing arbitrary shape matching coding on the pixel sample value of the current CU by using an arbitrary shape matching coding mode and a reference pixel sample value set formed by pixels in the coded history pixel temporary storage module;
the input of the arbitrary shape matching code comprises original pixels or pixels subjected to pretreatment;
the output of the arbitrary shape matching code includes a matching position;
the matching position is a variable parameter indicating where in the set of reference pixel samples a reference pixel sample that matches a current pixel sample in the current CU is;
the arbitrary shape matching coding mode performs matching coding by taking a pixel sample string or a pixel sample block in the current CU, which is called a current string or a current block, as a unit, and a reference pixel sample matched with the pixel sample of the current string or the current block forms a reference string or a reference block in the reference pixel sample set;
the history pixel temporary storage area temporarily stores at least different kinds of completely reconstructed pixels and/or different kinds of partially reconstructed pixels with different degrees, and at least comprises two kinds of reconstructed pixels: class I and class II; the reference pixel sample set is divided into 3 parts according to the positions of the reference pixel samples: part a, part B and part C, the union of part a and part B being noted as subset 1 of the set of reference pixel samples and part C being noted as subset 2 of the set of reference pixel samples;
The correspondence between the class I and class II and the subset 1 and subset 2 is:
a class I reconstructed pixel is used as a reference pixel when the reference pixel sample is in subset 1 and a class II reconstructed pixel is used as a reference pixel when the reference pixel sample is in subset 2;
module 2) compressed code stream generation module: generating a compressed code stream containing at least syntax elements for arbitrary shape matching decoding required to derive the matching locations;
module 3) history pixel temporary storage module: at least different kinds of fully reconstructed pixels and/or different kinds of partially reconstructed pixels of different degrees are registered.
8. An image decoding device characterized by comprising the following modules:
module 1) compressed code stream parsing module: at least comprises analyzing the compressed code stream, and at least obtaining the matching position needed by any shape matching decoding;
module 2) arbitrary shape matching decoding module: performing arbitrary shape matching decoding on the pixel sample value of the current CU by using an arbitrary shape matching decoding mode and a reference pixel sample value set formed by pixels in the decoded history pixel temporary storage module;
the arbitrary shape matching decoded input includes the matching location;
The matching position is a variable parameter indicating where in the set of reference pixel samples a reference pixel sample that matches a current pixel sample in the current CU is located, for copying the reference pixel sample from within the set of reference pixel samples to reconstruct the current pixel sample of the current CU;
the arbitrary shape matching decoding mode performs matching decoding by taking a pixel sample string or a pixel sample block in the current CU, called a current string or a current block, as a unit, and the copied reference pixel samples form a reference string or a reference block in the reference pixel sample set;
the history pixel temporary storage area temporarily stores at least different kinds of completely reconstructed pixels and/or different kinds of partially reconstructed pixels with different degrees, and at least comprises two kinds of reconstructed pixels: class I and class II; the reference pixel sample set is divided into 3 parts according to the positions of the reference pixel samples: part a, part B and part C, the union of part a and part B being noted as subset 1 of the set of reference pixel samples and part C being noted as subset 2 of the set of reference pixel samples;
the correspondence between the class I and class II and the subset 1 and subset 1 is:
a class I reconstructed pixel is used as a reference pixel when the reference pixel sample is in subset 1 and a class II reconstructed pixel is used as a reference pixel when the reference pixel sample is in subset 2;
Module 3) history pixel temporary storage module: at least different kinds of fully reconstructed pixels and/or different kinds of partially reconstructed pixels of different degrees are registered.
9. The decoding apparatus according to claim 8, wherein:
one implementation form of the corresponding relation is that when any shape matching decoding is carried out on the current CU, according to the matching position of the current string, which reconstruction pixel is adopted as a reference pixel by the current string is determined according to the following logic relation:
if the reference pixel sample specified by the matching location is located in subset 1, then use the class I reconstructed pixel as the reference pixel;
if the reference pixel sample specified by the matching location is located in subset 2, then a class II reconstructed pixel is used as the reference pixel.
10. The decoding apparatus according to claim 8 or 9, wherein: in the same matching mode, different kinds of reconstructed pixels are used as reference pixels for the current pixel when the reference pixel samples are at different matching positions, i.e. at different parts of the set of reference pixel samples.
11. The decoding apparatus according to claim 8 or 9, wherein:
the type I reconstructed pixels are partially reconstructed pixels i.e. reconstructed pixels having undergone only a partial process,
The class II reconstructed pixels are fully reconstructed pixels,
the fully reconstructed pixels are reconstructed pixels that have undergone a process including deblocking filtering and pixel compensation,
the deblocking filtering is one of the post-processing of the preliminary reconstructed pixels,
the partially reconstructed pixels, that is, the reconstructed pixels subjected to only the processing of the partial process are the reconstructed pixels not subjected to the processing of the processes of the past block effect filtering and the pixel compensation.
12. The decoding apparatus according to claim 11, wherein: in the same matching mode, different kinds of reconstructed pixels are used as reference pixels for the current pixel when the reference pixel samples are at different matching positions, i.e. at different parts of the set of reference pixel samples.
CN202010704251.3A 2013-06-13 2014-06-12 Image coding and decoding method and device adopting different kinds of reconstructed pixels in same mode Active CN111800641B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010704251.3A CN111800641B (en) 2013-06-13 2014-06-12 Image coding and decoding method and device adopting different kinds of reconstructed pixels in same mode

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201310236800 2013-06-13
CN2013102368009 2013-06-13
CN202010704251.3A CN111800641B (en) 2013-06-13 2014-06-12 Image coding and decoding method and device adopting different kinds of reconstructed pixels in same mode
CN201410259514.9A CN104244007B (en) 2013-06-13 2014-06-12 Image coding method and device and decoding method and device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201410259514.9A Division CN104244007B (en) 2013-06-13 2014-06-12 Image coding method and device and decoding method and device

Publications (2)

Publication Number Publication Date
CN111800641A CN111800641A (en) 2020-10-20
CN111800641B true CN111800641B (en) 2023-08-25

Family

ID=52231222

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202010704251.3A Active CN111800641B (en) 2013-06-13 2014-06-12 Image coding and decoding method and device adopting different kinds of reconstructed pixels in same mode
CN202010703211.7A Active CN111800640B (en) 2013-06-13 2014-06-12 Method and device for encoding and decoding image by alternately changing direction and back-and-forth scanning string matching
CN201410259514.9A Active CN104244007B (en) 2013-06-13 2014-06-12 Image coding method and device and decoding method and device

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN202010703211.7A Active CN111800640B (en) 2013-06-13 2014-06-12 Method and device for encoding and decoding image by alternately changing direction and back-and-forth scanning string matching
CN201410259514.9A Active CN104244007B (en) 2013-06-13 2014-06-12 Image coding method and device and decoding method and device

Country Status (1)

Country Link
CN (3) CN111800641B (en)

Families Citing this family (50)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3058736B1 (en) 2013-10-14 2019-02-27 Microsoft Technology Licensing, LLC Encoder-side options for intra block copy prediction mode for video and image coding
JP6336058B2 (en) 2013-10-14 2018-06-06 マイクロソフト テクノロジー ライセンシング,エルエルシー Features of base color index map mode for video and image encoding and decoding
AU2013403224B2 (en) 2013-10-14 2018-10-18 Microsoft Technology Licensing, Llc Features of intra block copy prediction mode for video and image coding and decoding
KR102258427B1 (en) 2014-01-03 2021-06-01 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 Block vector prediction in video and image coding/decoding
US10390034B2 (en) 2014-01-03 2019-08-20 Microsoft Technology Licensing, Llc Innovations in block vector prediction and estimation of reconstructed sample values within an overlap area
US11284103B2 (en) 2014-01-17 2022-03-22 Microsoft Technology Licensing, Llc Intra block copy prediction with asymmetric partitions and encoder-side search patterns, search ranges and approaches to partitioning
WO2015120823A1 (en) * 2014-02-16 2015-08-20 同济大学 Image compression method and device using reference pixel storage space in multiple forms
US10542274B2 (en) 2014-02-21 2020-01-21 Microsoft Technology Licensing, Llc Dictionary encoding and decoding of screen content
CN104935945B (en) * 2014-03-18 2019-11-08 上海天荷电子信息有限公司 The image of extended reference pixel sample value collection encodes or coding/decoding method
EP4354856A2 (en) 2014-06-19 2024-04-17 Microsoft Technology Licensing, LLC Unified intra block copy and inter prediction modes
RU2679201C2 (en) 2014-09-30 2019-02-06 МАЙКРОСОФТ ТЕКНОЛОДЖИ ЛАЙСЕНСИНГ, ЭлЭлСи Rules for intra-picture prediction modes when wavefront parallel processing is enabled
CN105828080B (en) 2015-01-26 2020-02-14 同济大学 Image coding and decoding method and device
WO2016119666A1 (en) * 2015-01-26 2016-08-04 同济大学 Image coding/decoding method and apparatus
WO2016119746A1 (en) * 2015-01-29 2016-08-04 同济大学 Image coding method and apparatus, and image decoding method and apparatus
CN106688236B (en) * 2015-01-30 2019-06-21 富士通株式会社 Image encoding method, device and image processing equipment
US9900624B2 (en) 2015-02-05 2018-02-20 Mediatek Inc. Methods and apparatus of decoding process for palette syntax
WO2016124154A1 (en) * 2015-02-08 2016-08-11 同济大学 Image coding method and apparatus, and image decoding method and apparatus
CN105872539B (en) 2015-02-08 2020-01-14 同济大学 Image encoding method and apparatus, and image decoding method and apparatus
US20160234494A1 (en) * 2015-02-10 2016-08-11 Qualcomm Incorporated Restriction on palette block size in video coding
US10819990B2 (en) * 2015-02-16 2020-10-27 Hfi Innovation Inc. Method and apparatus for palette predictor initialization for palette coding in video and image compression
WO2016146076A1 (en) 2015-03-18 2016-09-22 Mediatek Inc. Method and apparatus for index map coding in video and image compression
US9460365B1 (en) * 2015-03-24 2016-10-04 Intel Corporation Clustered palette compression
US9819962B2 (en) * 2015-04-06 2017-11-14 Ati Technologies Ulc Efficient low-complexity video compression
GB2536734B (en) * 2015-04-17 2017-08-02 Imagination Tech Ltd Image synthesis
WO2016192055A1 (en) * 2015-06-03 2016-12-08 富士通株式会社 Image coding method and apparatus using prediction information and image processing device
CN106254865B (en) * 2015-06-08 2020-06-09 同济大学 Image encoding and decoding method and image processing equipment
WO2016197893A1 (en) * 2015-06-08 2016-12-15 同济大学 Image encoding and decoding method, image processing device, and computer storage medium
WO2016197317A1 (en) * 2015-06-09 2016-12-15 富士通株式会社 Copy information encoding and decoding method and apparatus, and image processing device
EP3308540B1 (en) 2015-06-09 2020-04-15 Microsoft Technology Licensing, LLC Robust encoding/decoding of escape-coded pixels in palette mode
CN106341622B (en) * 2015-07-06 2020-01-24 阿里巴巴集团控股有限公司 Method and device for encoding multi-channel video stream
CN107431809B (en) 2015-07-27 2020-02-14 华为技术有限公司 Image processing method and device
WO2017108550A1 (en) * 2015-12-24 2017-06-29 Koninklijke Philips N.V. Device for and method of determining a length of a relevant history
WO2017137006A1 (en) * 2016-02-10 2017-08-17 同济大学 Encoding and decoding method and device for data compression
CN107071450B (en) 2016-02-10 2021-07-27 同济大学 Coding and decoding method and device for data compression
CN107770553B (en) * 2016-08-21 2023-06-27 上海天荷电子信息有限公司 Data compression method and device adopting multiple types of matching parameters and parameter storage addresses
CN107770543B (en) * 2016-08-21 2023-11-10 上海天荷电子信息有限公司 Data compression method and device for sequentially increasing cutoff values in multiple types of matching parameters
CN107770544B (en) * 2016-08-21 2023-12-08 上海天荷电子信息有限公司 Data compression method and device adopting multiple types of matching parameters and pre-parameter buffer areas
CN106788447B (en) * 2016-11-29 2020-07-28 苏州浪潮智能科技有限公司 Matching length output method and device for L Z77 compression algorithm
CN107682707B (en) * 2017-10-23 2023-06-09 福州大学 Image dividing system conforming to H.265 standard and based on quadtree structure
CN108171662B (en) * 2017-12-18 2020-08-07 珠海全志科技股份有限公司 Method for reading image compression data and anti-distortion method comprising same
US10986349B2 (en) 2017-12-29 2021-04-20 Microsoft Technology Licensing, Llc Constraints on locations of reference blocks for intra block copy prediction
CN110087073B (en) * 2019-05-13 2021-01-26 绍兴文理学院 Multi-threshold string matching data compression method
CN112543333B (en) * 2020-06-02 2021-08-24 腾讯科技(深圳)有限公司 Video decoding method, video encoding method and related equipment
CN112532974A (en) * 2020-11-24 2021-03-19 浙江大华技术股份有限公司 Encoding method, apparatus and storage medium for string encoding technique
CN114615498A (en) * 2020-12-05 2022-06-10 腾讯科技(深圳)有限公司 Video decoding method, video encoding method, related device and storage medium
CN113347437B (en) * 2021-04-15 2022-09-06 浙江大华技术股份有限公司 Encoding method, encoder, decoder and storage medium based on string prediction
CN112565748B (en) * 2020-12-06 2022-08-09 浙江大华技术股份有限公司 Video coding method, device and system and computer readable storage medium
WO2022117113A1 (en) * 2020-12-06 2022-06-09 Zhejiang Dahua Technology Co., Ltd. Systems and methods for video encoding
CN113365080B (en) * 2021-03-19 2023-02-28 浙江大华技术股份有限公司 Encoding and decoding method, device and storage medium for string coding technology
CN115622570B (en) * 2022-12-14 2023-02-21 山东融汇通达网络科技有限公司 Efficient data storage method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469310A (en) * 2010-11-19 2012-05-23 深圳市融创天下科技股份有限公司 Sub-pixel interpolation method and system
CN102497546A (en) * 2011-11-28 2012-06-13 同济大学 Screen image compression device and compression method thereof
CN102611884A (en) * 2011-01-19 2012-07-25 华为技术有限公司 Image encoding and decoding method and encoding and decoding device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1985124B1 (en) * 2006-02-17 2010-09-01 Thomson Licensing Process for coding images using intra prediction mode
CN101394565B (en) * 2008-10-20 2011-08-17 成都九洲电子信息系统有限责任公司 Intra-frame prediction method
CN101594533B (en) * 2009-06-30 2010-12-29 华中科技大学 Method suitable for compressing sequence images of unmanned aerial vehicle
CN102917225B (en) * 2012-10-25 2015-10-28 电子科技大学 HEVC intraframe coding unit fast selecting method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469310A (en) * 2010-11-19 2012-05-23 深圳市融创天下科技股份有限公司 Sub-pixel interpolation method and system
CN102611884A (en) * 2011-01-19 2012-07-25 华为技术有限公司 Image encoding and decoding method and encoding and decoding device
CN102497546A (en) * 2011-11-28 2012-06-13 同济大学 Screen image compression device and compression method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"AHGR: P2M haled dual-cnder extension of HEVC";Tao Lin;《Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISOIIEC JTC 11SC 291WG 11 12th Meeting: Geneva, CH, 14-23 Jan. 2013》;20130121;正文第1-5页 *

Also Published As

Publication number Publication date
CN111800640A (en) 2020-10-20
CN104244007B (en) 2020-09-01
CN111800640B (en) 2023-11-10
CN111800641A (en) 2020-10-20
CN104244007A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN111800641B (en) Image coding and decoding method and device adopting different kinds of reconstructed pixels in same mode
CN112383780B (en) Encoding and decoding method and device for point matching reference set and index back and forth scanning string matching
KR102071764B1 (en) Picture coding and decoding methods and devices
CN103636215B (en) Video data application non-square is converted
CN105491376B (en) Image coding and decoding method and device
KR101868247B1 (en) Image encoding and decoding method and device
CN108028940A (en) The limitation of escape pixel signal values in pallet mode video coding
CN106559669A (en) The method and device of image prediction
CN105704491A (en) Image encoding method, decoding method, encoding device and decoding device
CN108141605A (en) Intra block replicates merging patterns and unavailable intra block replicates the filling of reference zone
CN107113436A (en) Toner pattern for sub-sampling form
CN110691250B (en) Image compression apparatus combining block matching and string matching
CN104853211A (en) Image compression method and apparatus employing various forms of reference pixel storage spaces
CN104754362B (en) Image compression method using fine-divided block matching
CN105100814B (en) Image coding and decoding method and device
CN106797468A (en) Improved pallet mode in efficient video coding (HEVC) screen content coding (SCC)
CN105847842A (en) Image encoding method and apparatus and image decoding method and apparatus
CN110505488B (en) Image coding or decoding method for expanding prediction pixel array
CN106254878B (en) Image encoding and decoding method and image processing equipment
CN104811731A (en) Multilayer sub-block matching image compression method
WO2016202189A1 (en) Image coding and decoding methods, image processing device, and computer storage medium

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
GR01 Patent grant
GR01 Patent grant