CN111836043A - Code block prediction method, code block decoding method, code block prediction device, and code block decoding device - Google Patents

Code block prediction method, code block decoding method, code block prediction device, and code block decoding device Download PDF

Info

Publication number
CN111836043A
CN111836043A CN201910300253.3A CN201910300253A CN111836043A CN 111836043 A CN111836043 A CN 111836043A CN 201910300253 A CN201910300253 A CN 201910300253A CN 111836043 A CN111836043 A CN 111836043A
Authority
CN
China
Prior art keywords
block
prediction
coding
intra
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910300253.3A
Other languages
Chinese (zh)
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.)
ZTE Corp
Huazhong University of Science and Technology
Original Assignee
ZTE Corp
Huazhong University of Science and Technology
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 ZTE Corp, Huazhong University of Science and Technology filed Critical ZTE Corp
Priority to CN201910300253.3A priority Critical patent/CN111836043A/en
Priority to PCT/CN2020/082689 priority patent/WO2020211642A1/en
Publication of CN111836043A publication Critical patent/CN111836043A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides a code block prediction method, a code block decoding method and a code block prediction device. Specifically, the prediction of the code block includes: the coding device divides the coding block after intra-prediction and selects reference pixels from reconstructed pixels in the divided sub-blocks; the coding device performs iterative prediction on each subblock by using the reference pixel to obtain an iteratively predicted coding block; the coding device compares the distortion parameters of the coding block after intra-frame prediction and the coding block after iterative prediction, determines the prediction mode of the coding block and sets a corresponding flag bit; and the coding device sends the coding block corresponding to the prediction mode and the flag bit to decoding equipment. The invention achieves the effects of simple realization process, small coding complexity and improved prediction performance.

Description

Code block prediction method, code block decoding method, code block prediction device, and code block decoding device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for predicting and decoding a code block.
Background
Video coding is a video compression technology, and achieves the purpose of compressing video by eliminating redundant information such as time redundancy, space redundancy, coding redundancy and the like in a video sequence.
Prediction techniques are important components of video coding techniques and are classified into intra-frame prediction and inter-frame prediction. The intra-frame prediction is mainly used for eliminating spatial redundant information in a video sequence, when the intra-frame prediction is carried out on a current block, adjacent reconstructed pixels of the current block are firstly obtained to be used as reference pixels, then pixel values of the current block are obtained from the reference pixels according to different prediction modes, an optimal prediction mode is selected by calculating rate distortion costs under different prediction modes, and finally a prediction residual block of the current block is transmitted to a decoding end after being subjected to transformation quantization entropy coding. The decoding end can obtain the prediction mode adopted by the encoding end and the corresponding residual block by decoding the code stream, then the prediction block can be obtained according to the prediction mode, the residual block is further added to obtain a reconstruction block, and finally the whole video sequence can be reconstructed by reconstructing all the encoding blocks. However, the intra prediction method in the related art causes inaccurate prediction and large prediction residual due to the limitation of the reference pixel.
Disclosure of Invention
The embodiment of the invention provides a method and a device for predicting and decoding a code block, which are used for at least solving the problems of inaccurate prediction and large prediction residual error caused by the limitation of reference pixels in an intra-frame prediction method in the related art.
According to an embodiment of the present invention, there is provided a prediction method of a code block, including: the coding device divides the coding block after intra-prediction and selects reference pixels from reconstructed pixels in the divided sub-blocks; the coding device performs iterative prediction on each subblock by using the reference pixel to obtain an iteratively predicted coding block; the coding device compares the distortion parameters of the coding block after intra-frame prediction and the coding block after iterative prediction, determines the prediction mode of the coding block and sets a corresponding flag bit; and the coding device sends the coding block corresponding to the prediction mode and the flag bit to decoding equipment.
According to another embodiment of the present invention, there is provided a code block decoding method including: the decoding device receives the prediction block and the flag bit sent by the coding device; the decoding device decodes the prediction block according to a prediction mode carried in the flag bit, wherein the prediction mode comprises: intra prediction mode and iterative prediction mode.
According to another embodiment of the present invention, there is provided a prediction apparatus for a code block, located in an encoding apparatus, including: the selecting module is used for dividing the coding block after intra-frame prediction and selecting reference pixels from reconstructed pixels in the divided sub-blocks; the prediction module is used for carrying out iterative prediction on each subblock by utilizing the reference pixel to obtain an iteratively predicted coding block; the determining module is used for comparing the distortion parameters of the intra-frame predicted coding block and the iterative predicted coding block, determining the prediction mode of the coding block and setting a corresponding flag bit; and the sending module is used for sending the coding block corresponding to the prediction mode and the zone bit to decoding equipment. According to another embodiment of the present invention, there is provided a code block decoding apparatus including: a receiving module, configured to receive a prediction block and a flag bit sent by an encoding apparatus; a decoding module, configured to decode the prediction block according to a prediction mode carried in the flag bit, where the prediction mode includes: intra prediction mode and iterative prediction mode.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
By the invention, an iterative prediction mode is provided on the basis of a traditional prediction mode, and the prediction mode selects reference pixels as required in a divided part of the current block instead of using adjacent reconstructed pixels of the current block as reference pixels in the traditional prediction mode. Therefore, the problems of inaccurate prediction and large prediction residual error caused by the limitation of reference pixels in the intra-frame prediction method in the related technology can be solved, and the effects of simple implementation process, low coding complexity and improvement on the prediction performance are achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a prediction method of a code block according to an embodiment of the present invention;
fig. 2 is a schematic diagram of division of a coding block according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a sub-block according to an embodiment of the invention;
FIG. 4 is a schematic diagram of bi-directional prediction according to an embodiment of the present invention;
fig. 5 is a flowchart of a method of decoding a code block according to an embodiment of the present invention;
fig. 6 is a block diagram of a prediction apparatus of a code block according to an embodiment of the present invention;
fig. 7 is a block diagram of a decoding apparatus for a code block according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
In the present embodiment, a method for predicting a code block is provided, and fig. 1 is a flowchart of a method for predicting a code block according to an embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
step S102, the coding device divides the coding block after intra-prediction, and selects reference pixels from reconstructed pixels in the divided sub-blocks;
step S104, the coding device uses the reference pixel to carry out iterative prediction on each subblock so as to obtain an iterative predicted coding block;
step S106, the coding device compares the distortion parameters of the coding block after intra-frame prediction and the coding block after iterative prediction, determines the prediction mode of the coding block and sets a corresponding flag bit;
step S108, the coding apparatus sends the coding block corresponding to the prediction mode and the flag bit to a decoding device.
Specifically, when performing intra prediction, the encoding apparatus performs intra prediction and reconstruction on an encoded block using original reference pixels of the encoded block.
Optionally, the dividing manner includes one of the following: and dividing the coding blocks by N forks without dividing the coding blocks, wherein N is a positive integer greater than or equal to 2.
Specifically, fig. 2 is a schematic diagram of division of an encoding block according to an embodiment of the present invention. As shown in fig. 2, fig. 2 gives examples of several N-ary divisions.
Of course, other dividing manners are also within the protection scope of the present embodiment, for example, dividing according to a non-equal square, dividing according to a certain special proportion, dividing according to a certain pattern, and the like are also within the protection scope of the present embodiment, and are not described in detail herein.
Optionally, the selecting, by the encoding apparatus, a reference pixel from the divided sub-blocks includes: the encoding device selects boundary pixels in the sub-block as the reference pixels.
Specifically, fig. 3 is a schematic diagram of a sub-block according to an embodiment of the present invention. As shown in fig. 3, the outermost pixels of the sub-block are regarded as reference pixels (lattice regions) of the sub-block. Taking fig. 3 as an example, in the case of the subblock of W × H size in fig. 3, the pixel set of the upper boundary and the lower boundary whose width is 1 and whose length is W is 1 is regarded as the boundary pixel of the subblock, and the pixel set of the left boundary and the right boundary whose length is 1 and whose width is H is regarded as the boundary pixel of the subblock.
Optionally, the encoding apparatus performs iterative prediction on each sub-block by using the reference pixel to obtain an iteratively predicted encoded block, including: the encoding device performs iterative prediction on an internal pixel in the reconstructed pixels in each sub-block by using the reference pixel to obtain a predicted value of the internal pixel.
Specifically, still taking fig. 3 as an example, all the reconstructed pixels excluding the boundary pixels in the sub-block are inner pixels.
Optionally, the iteratively predicting, by the encoding device, an intra pixel in each of the sub-blocks by using the reference pixel to obtain a predicted value of the intra pixel, includes: the coding device determines a predicted value of the predicted pixel according to the numerical value of the reference pixel and the distance between the predicted pixel and the reference pixel in the internal pixel; the encoding device arranges the prediction results of the prediction pixels in the order of the pixels of the intra pixels to obtain the prediction values of the intra pixels.
Optionally, the first reference pixel is a reference pixel at the upper left corner, and the second reference pixel is a reference pixel at the lower right corner. The prediction value of the prediction pixel is realized by at least the following formula: p ═ α × dβ+β×dα)÷(dα+dβ) Where α is the value of a first one of the reference pixels, β is the value of a second one of the reference pixels, dαIs the predicted pixel and the first pixelDistance between reference pixels, dβIs the distance between the prediction pixel and the second reference pixel, and P is the prediction value of the prediction pixel.
Fig. 4 is a schematic diagram of bi-directional prediction according to an embodiment of the present invention. As shown in fig. 4, in the sub-block in fig. 4, horizontal line filled regions are predicted pixels, white pixels are not predicted pixels, diagonal line filled regions are reference pixels, and vertical line filled regions are predicted pixels. For the convenience of calculation, in selecting the first reference pixel and the second reference pixel, a manner of placing the prediction pixel on a connecting line between the two reference pixels may be considered. In this case, it is only necessary to calculate the distance between the vertical direction or the horizontal direction, i.e., the prediction pixel in fig. 4 and the first reference pixel (pixel value is α) and the second reference pixel (pixel value is β). In addition, taking fig. 4 as an example, in the subsequent calculation process, if the non-predicted pixel corresponding to white on the right side of the vertical line filling area in fig. 4 is calculated, then only the pixel on the right side of the current first reference pixel (with the pixel value of α) needs to be selected as the new first reference pixel, and then the pixel on the upper side of the current second reference pixel (with the pixel value of β) needs to be selected as the new second reference pixel. However, the distance between the predicted pixel and the new first reference pixel and the new second reference pixel in the vertical or horizontal direction may be calculated. The prediction calculation methods corresponding to other pixels are also similar, and are not described in detail.
Specifically, the bidirectional prediction used in fig. 4 is only one of the methods of calculating the prediction value of the prediction pixel in the present embodiment. Other prediction methods, such as a method of learning through a neural network to realize prediction, are also within the scope of the present embodiment, and are not described herein in detail.
It should be noted that, as for the manner of selecting the reference pixel, the manner of utilizing the boundary pixel in the reconstructed pixel is given in the above embodiment. Of course, other ways to select a part of pixels from the reconstructed pixels as the reference pixels are within the protection scope of the present embodiment. For example, since the sub-blocks are derived by division. Therefore, there tend to be adjacent pixels between adjacent sub-blocks. It is within the scope of the present embodiment to select a common pixel from these neighboring pixels as a reference pixel. For example, take the binary division example of FIG. 2. The lowest boundary pixel of the upper sub-block may be utilized as a reference pixel of the lower sub-block. Conversely, the uppermost boundary pixel of the lower sub-block may alternatively be used as the reference pixel of the upper sub-block. Therefore, for the whole coding block, the boundary pixel of each sub-block does not need to be selected completely, so that the time for determining the reference pixel can be saved, and the operation efficiency is improved. Meanwhile, in each sub-block individual, the selected reference pixels except the common pixel are different, so that the matching of the encoding device is facilitated in the subsequent splicing process according to the positions of the other reference pixels.
Of course, other reference pixel selection methods capable of overcoming the disadvantage of inaccurate prediction of the part of the coding block farther from the reference pixel in the intra-frame prediction technology are also within the protection scope of the present embodiment, and are not described herein in detail.
Optionally, the method further comprises: the encoding device determines that the predicted value of the boundary pixel after iterative prediction is the predicted value of the boundary pixel after intra-frame prediction; and the coding device generates an iterative prediction block of the sub-block according to the pixel position relation of the sub-block through the prediction value of the boundary pixel and the prediction value of the internal pixel.
Optionally, the encoding device concatenates the iterative prediction blocks of the sub-blocks according to the position relationship between the sub-blocks to obtain the iteratively predicted encoding block.
Optionally, the distortion parameters include at least: a rate distortion cost, wherein the rate distortion cost is determined by adding bits and distortion of the code block after the flag bit.
It should be noted that the rate-distortion cost is only one distortion parameter listed in this embodiment, and other distortion parameters, for example, the size of the coding block and the distortion size of the intra prediction mode, are also within the message range of this embodiment.
Optionally, calculating bits of the iteratively predicted coding block after adding the flag bit includes: the coding device calculates the bits corresponding to the coding blocks after iterative prediction according to the bits required by the coefficient blocks, the bits required by the zone bits and the bits required by the coding blocks after intra-frame prediction; wherein the coefficient block is determined from an uncoded code block and the iteratively predicted coded block.
Specifically, the coefficient block is determined by: and subtracting the coding block subjected to iterative prediction from the uncoded code block to obtain a residual block. However, a transform block is obtained by performing a transform operation (for example, a transform mode determined by a coding frame such as DCT transform) on the residual block. And obtaining a transformation block of the coefficient block, and then performing quantization operation on the transformation block, namely dividing the numerical value in the transformation block by the quantization step size to obtain the coefficient block. The bits required for the coefficient block are bits required for entropy coding of the coefficient block.
Optionally, calculating the distortion of the iteratively predicted coding block after adding the flag bit includes: the coding device obtains a distortion residual block by carrying out quantization operation on a difference value of a code block before coding and the code block after iterative prediction; the coding device determines a middle reconstruction block according to the distortion residual block and the intra-frame predicted coding block; the coding device carries out iterative prediction on the intermediate reconstruction block to obtain an intermediate prediction block, and determines a final reconstruction block together with the distortion residual block; and the coding device calculates the distortion between the final reconstruction block and the code block before coding according to a preset distortion calculation criterion.
In particular, the intermediate reconstructed block may be determined by a sum of the distortion residual block and the intra-predicted encoded block.
It should be noted that the determination method of the intermediate reconstruction block and the final reconstruction block is not limited to the above-mentioned method, and other obtaining methods are also within the protection scope of this embodiment, and are not described herein again. Specifically, the predetermined distortion calculation criterion includes, but is not limited to, a Mean Squared Error (MSE) criterion.
Optionally, calculating distortion of the intra-predicted coding block after adding the flag bit includes: and the coding device calculates the distortion between the coded block after intra-frame prediction and the code block before coding according to a preset distortion calculation criterion.
Optionally, when the encoding device determines that the rate-distortion cost corresponding to the intra-frame predicted encoding block is not less than the rate-distortion cost corresponding to the iterative predicted encoding block, the encoding device determines that the prediction mode of the encoding block is intra-frame prediction, and sets the flag position as a numerical value corresponding to the intra-frame prediction; and when the coding device judges that the rate distortion cost corresponding to the intra-frame predicted coding block is smaller than the rate distortion cost corresponding to the iterative predicted coding block, the coding device determines that the prediction mode of the coding block is the iterative prediction mode, and sets the flag bit as a numerical value corresponding to the iterative prediction mode.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In the present embodiment, a method for predicting a code block is provided, and fig. 5 is a flowchart of a method for decoding a code block according to an embodiment of the present invention, and as shown in fig. 5, the flowchart includes the following steps:
step S502, the decoding device receives the prediction block and the flag bit sent by the coding device;
step S504, the decoding device decodes the prediction block according to the prediction mode carried in the flag bit, where the prediction mode includes: intra prediction mode and iterative prediction mode.
Optionally, the decoding device decodes the prediction block according to the prediction mode carried in the flag bit, and includes: and the decoding device determines a final reconstruction block according to the residual block acquired from the code stream and the prediction mode and decodes the final reconstruction block.
Optionally, the determining, by the decoding apparatus, a final reconstructed block according to the residual block obtained from the code stream and the prediction mode includes: and when the prediction mode is an intra-frame prediction mode, acquiring a prediction block by using the intra-frame prediction mode, and acquiring the final reconstruction block by the decoding device according to the residual block acquired from the code stream and the prediction block corresponding to the intra-frame prediction mode.
Optionally, the decoding apparatus determines a final reconstructed block according to the residual block obtained from the code stream and the prediction mode, and further includes: when the prediction mode is an iterative prediction mode, the decoding device acquires an intermediate reconstruction block according to a residual block acquired from a code stream and a prediction block generated by using an intra-frame prediction mode; the decoding device performs iterative prediction on the intermediate reconstruction block to obtain an intermediate prediction block; the decoding device determines the final reconstructed block from the inter-predicted block.
Optionally, the iterative prediction of the intermediate reconstructed block by the decoding apparatus includes: the decoding device divides the middle reconstruction block and selects reference pixels from the divided sub-blocks; the coding device performs iterative prediction on each subblock by using the reference pixel to obtain an iteratively predicted coding block.
In order to better understand the scheme described in the above embodiments, the following scenario is also provided in the present embodiment. In the following scenario, the length and the width are both 4, and a coding block of a diagonal prediction method is taken as an example without division. Of course, coding blocks with other sizes and using other prediction methods are also within the protection scope of the present embodiment, and will not be described in detail herein.
Table 1 describes an original encoded block. As shown in table 1, the pixels on the left and top in the coding block are taken as reference pixels (gray areas). While the other areas are the values of the original coded block (white areas).
TABLE 1
Figure BDA0002028003910000091
Figure BDA0002028003910000101
Tables 2-5 are procedures for performing conventional prediction and reconstruction.
First, as shown in table 2, the value of the original coding block is intra-predicted by the conventional intra 45 degree prediction mode, and the corresponding prediction block is obtained.
TABLE 2
132 130 110 120
137 132 130 118
140 137 132 130
144 140 137 132
Then, the intra-predicted prediction block is subtracted from the value of the original block to obtain a residual block, as shown in table 3:
TABLE 3
4 -26 -20 -3
-1 -4 -17 -12
-1 3 4 0
-5 -7 6 8
The residual block is then subjected to a series of quantization operations (e.g., inverse quantization after transform quantization) to obtain a distorted residual block, as shown in table 4:
TABLE 4
11 -25 -35 -11
-8 -5 -9 -18
-18 5 9 8
-11 -1 9 11
Finally, a reconstructed block after intra prediction is obtained by adding the distortion residual block to the prediction block. As shown in table 5:
TABLE 5
143 105 83 109
129 127 121 100
122 142 141 122
133 139 146 143
Tables 6-12 are performed for the iterative prediction and reconstruction process.
Firstly, after the intra-frame prediction test block and the intra-frame prediction reconstruction block are obtained, iterative prediction needs to be performed next. Note that the external pixel prediction values are the same as in the conventional intra mode. That is, as shown in table 6, the part not shown in table 6 is an internal pixel in the subsequent iteration prediction.
TABLE 6
120
118
130
144 140 137 132
Secondly, when performing 45-degree bidirectional prediction on the inner pixels, all the reference pixels around are available (gray area), wherein the lower right reference pixel is a reconstructed pixel obtained by conventional intra mode prediction. The middle part is the internal prediction value. As shown in table 7:
TABLE 7
Figure BDA0002028003910000131
After the intra pixels and the pixels are spliced, the prediction block after iterative prediction is obtained, as shown in table 8:
TABLE 8
135 127 109 120
140 138 125 118
140 139 140 130
144 140 137 132
During the reconstruction process, firstly, the prediction block after iterative prediction is subtracted from the value of the original coding block to obtain a residual block. As shown in table 9:
TABLE 9
1 -23 -11 -3
-4 -10 -12 -12
-1 1 4 0
-5 -7 6 8
The residual block is then subjected to a series of quantization operations (e.g., inverse quantization after transform quantization) to obtain a distorted residual block, as shown in table 10:
watch 10
-15 -15 -15 -15
-10 -10 -10 -10
-3 -3 -3 -3
2 2 2 2
Then, unlike reconstruction in intra prediction, in the iterative prediction process, the distorted reference block needs to be added to the predicted block after intra prediction to obtain an intermediate reconstructed block. As shown in table 11:
TABLE 11
117 115 103 105
127 122 120 108
137 134 129 127
146 142 139 134
The intermediate reconstructed block is then iteratively predicted. The outer predictor remains the same as the intra mode, but when the inner is predicted, the lower right reference pixel is the lower right boundary pixel from the middle reconstructed block, and the final inner predictor is shown in table 12:
TABLE 12
Figure BDA0002028003910000151
Finally, the internal predicted value and the external predicted value are spliced and then added to the distortion residual block in table 10 to obtain a final reconstruction block, as shown in table 13:
watch 13
118 114 98 105
128 123 118 108
138 135 131 127
146 142 139 134
And when the selected test mode is determined, calculating the distortion and the code rate of the intra-frame prediction mode and the iterative prediction mode.
If the MSE criterion is adopted, the distortion of the conventional intra mode is the MSE value of the corresponding pixel block in table 5 and table 1, which is 60.06, and the distortion of the iterative prediction mode is the MSE value of the corresponding pixel block in table 13 and table 1, which is 58.00, so that the iterative prediction mode has smaller distortion.
When calculating the code rate, the coefficient block of the residual block in the conventional intra mode after transform quantization is shown in table 14:
TABLE 14
-1 0 0 0
-1 1 1 0
0 0 1 0
0 0 0 0
The number of bits required for entropy coding the coefficient block in the scanning order is 12, and 13 bits are required by adding the flag bits.
The coefficient block of the residual block corresponding to the iterative prediction mode after transform quantization is shown in table 15:
watch 15
-1 0 0 0
-1 0 0 0
0 0 0 0
0 0 0 0
Only 2 bits are needed for entropy coding of the coefficient block, and 3 bits are needed in total by adding the flag bit.
It can be seen that the MSE distortion of iterative prediction is smaller than that of the conventional mode, and the required code rate is also smaller than that of the conventional mode. The resulting rate-distortion cost is also less than in the conventional mode.
Example 3
In this embodiment, a code block prediction apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description of the apparatus is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a prediction apparatus for a code block according to an embodiment of the present invention, as shown in fig. 6, the apparatus including:
a selecting module 62, configured to divide the intra-frame predicted coding block, and select a reference pixel from reconstructed pixels in the divided sub-blocks;
a prediction module 64, configured to perform iterative prediction on each sub-block by using the reference pixel to obtain an iteratively predicted coding block;
a determining module 66, configured to compare distortion parameters of the intra-frame predicted coding block and the iterative predicted coding block, determine a prediction mode of the coding block, and set a corresponding flag bit;
a sending module 68, configured to send the coding block corresponding to the prediction mode and the flag to a decoding device.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 4
In this embodiment, a code block prediction apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description of the apparatus is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 7 is a block diagram of a decoding apparatus for a code block according to an embodiment of the present invention, as shown in fig. 7, the apparatus including:
a receiving module 72, configured to receive a prediction block and a flag bit sent by an encoding apparatus;
a decoding module 74, configured to decode the prediction block according to a prediction mode carried in the flag bit, where the prediction mode includes: intra prediction mode and iterative prediction mode.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 5
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, the coding device divides the coded block after intra prediction, and selects reference pixels from reconstructed pixels in the divided sub blocks;
s2, the encoding device performs iterative prediction on each sub-block by using the reference pixel to obtain an iteratively predicted encoded block;
s3, the coding device compares the distortion parameters of the coding block after the intra-frame prediction and the coding block after the iterative prediction, determines the prediction mode of the coding block and sets the corresponding flag bit;
and S4, the coding device sends the coding block corresponding to the prediction mode and the flag bit to a decoding device.
Or the like, or, alternatively,
s1, the decoding apparatus receives the prediction block and the flag bit sent by the encoding apparatus;
s1, the decoding device decodes the prediction block according to the prediction mode carried in the flag bit, wherein the prediction mode includes: intra prediction mode and iterative prediction mode.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, the coding device divides the coded block after intra prediction, and selects reference pixels from reconstructed pixels in the divided sub blocks;
s2, the encoding device performs iterative prediction on each sub-block by using the reference pixel to obtain an iteratively predicted encoded block;
s3, the coding device compares the distortion parameters of the coding block after the intra-frame prediction and the coding block after the iterative prediction, determines the prediction mode of the coding block and sets the corresponding flag bit;
and S4, the coding device sends the coding block corresponding to the prediction mode and the flag bit to a decoding device.
Or the like, or, alternatively,
s1, the decoding apparatus receives the prediction block and the flag bit sent by the encoding apparatus;
s1, the decoding device decodes the prediction block according to the prediction mode carried in the flag bit, wherein the prediction mode includes: intra prediction mode and iterative prediction mode.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (22)

1. A method for predicting a code block, the method comprising:
the coding device divides the coding block after intra-prediction and selects reference pixels from reconstructed pixels in the divided sub-blocks;
the coding device performs iterative prediction on each subblock by using the reference pixel to obtain an iteratively predicted coding block;
the coding device compares the distortion parameters of the coding block after intra-frame prediction and the coding block after iterative prediction, determines the prediction mode of the coding block and sets a corresponding flag bit;
and the coding device sends the coding block corresponding to the prediction mode and the flag bit to decoding equipment.
2. The method of claim 1, wherein the partitioning comprises one of: and dividing the coding blocks by N forks without dividing the coding blocks, wherein N is a positive integer greater than or equal to 2.
3. The method of claim 1, wherein the encoding device selects the reference pixel from the divided sub-blocks, and comprises:
the encoding device selects boundary pixels in the sub-block as the reference pixels.
4. The method of claim 1, wherein the encoding apparatus performs iterative prediction on each of the sub-blocks by using the reference pixel to obtain an iteratively predicted encoded block, comprising:
the encoding device performs iterative prediction on an internal pixel in the reconstructed pixels in each sub-block by using the reference pixel to obtain a predicted value of the internal pixel.
5. The method according to claim 4, wherein the encoding device performs iterative prediction on the intra pixel in each of the sub-blocks by using the reference pixel to obtain a predicted value of the intra pixel, and comprises:
the coding device determines a predicted value of the predicted pixel according to the numerical value of the reference pixel and the distance between the predicted pixel and the reference pixel in the internal pixel;
the encoding device arranges the prediction results of the prediction pixels in the order of the pixels of the intra pixels to obtain the prediction values of the intra pixels.
6. The method of claim 5, wherein the prediction value of the prediction pixel is implemented by at least the following formula:
P=(α×dβ+β×dα)÷(dα+dβ)
wherein α is a value of a first one of the reference pixels, β is a value of a second one of the reference pixels, dαIs the distance between the prediction pixel and the first reference pixel, dβIs the distance between the prediction pixel and the second reference pixel, and P is the prediction value of the prediction pixel.
7. The method of claim 4, further comprising:
the encoding device determines that the predicted value of the boundary pixel after iterative prediction is the predicted value of the boundary pixel after intra-frame prediction;
and the coding device generates an iterative prediction block of the sub-block according to the pixel position relation of the sub-block through the prediction value of the boundary pixel and the prediction value of the internal pixel.
8. The method of claim 7, further comprising:
and the coding device splices the iterative prediction blocks of the sub-blocks according to the position relation between the sub-blocks so as to obtain the coding blocks subjected to iterative prediction.
9. The method of claim 1, wherein the distortion parameters comprise at least: a rate distortion cost, wherein the rate distortion cost is determined by adding bits and distortion of the code block after the flag bit.
10. The method of claim 9, wherein calculating the bits of the iteratively predicted encoded block after adding the flag bit comprises:
the coding device calculates the bits corresponding to the coding blocks after iterative prediction according to the bits required by the coefficient blocks, the bits required by the zone bits and the bits required by the coding blocks after intra-frame prediction; wherein the coefficient block is determined from an uncoded code block and the iteratively predicted coded block.
11. The method of claim 9, wherein calculating the distortion of the iteratively predicted encoded block after adding the flag bit comprises:
the coding device obtains a distortion residual block by carrying out quantization operation on a difference value of a code block before coding and the code block after iterative prediction;
the coding device determines a middle reconstruction block according to the distortion residual block and the intra-frame predicted coding block;
the coding device carries out iterative prediction on the intermediate reconstruction block to obtain an intermediate prediction block, and determines a final reconstruction block together with the distortion residual block;
and the coding device calculates the distortion between the final reconstruction block and the code block before coding according to a preset distortion calculation criterion.
12. The method of claim 9, wherein calculating the distortion of the intra-predicted coded block after adding the flag bit comprises:
and the coding device calculates the distortion between the coded block after intra-frame prediction and the code block before coding according to a preset distortion calculation criterion.
13. The method of claim 9, further comprising:
when the coding device judges that the rate distortion cost corresponding to the coding block after intra-frame prediction is not less than the rate distortion cost corresponding to the coding block after iterative prediction, the coding device determines that the prediction mode of the coding block is intra-frame prediction, and sets the flag bit as a numerical value corresponding to the intra-frame prediction;
and when the coding device judges that the rate distortion cost corresponding to the intra-frame predicted coding block is smaller than the rate distortion cost corresponding to the iterative predicted coding block, the coding device determines that the prediction mode of the coding block is the iterative prediction mode, and sets the flag bit as a numerical value corresponding to the iterative prediction mode.
14. A method for decoding a code block, comprising:
the decoding device receives the prediction block and the flag bit sent by the coding device;
the decoding device decodes the prediction block according to a prediction mode carried in the flag bit, wherein the prediction mode comprises: intra prediction mode and iterative prediction mode.
15. The method of claim 1, wherein a decoding device decodes the prediction block according to the prediction mode carried in the flag bit, and comprises:
and the decoding device determines a final reconstruction block according to the residual block acquired from the code stream and the prediction mode and decodes the final reconstruction block.
16. The method of claim 15, wherein the determining, by the decoding apparatus, a final reconstructed block according to the residual block obtained from the code stream and the prediction mode comprises:
and when the prediction mode is an intra-frame prediction mode, acquiring a prediction block by using the intra-frame prediction mode, and acquiring the final reconstruction block by the decoding device according to the residual block acquired from the code stream and the prediction block corresponding to the intra-frame prediction mode.
17. The method of claim 15, wherein the decoding apparatus determines a final reconstructed block according to the residual block obtained from the code stream and the prediction mode, further comprising:
when the prediction mode is an iterative prediction mode, the decoding device acquires an intermediate reconstruction block according to a residual block acquired from a code stream and a prediction block generated by using an intra-frame prediction mode;
the decoding device performs iterative prediction on the intermediate reconstruction block to obtain an intermediate prediction block;
and the decoding device determines the final reconstruction block according to the intermediate prediction block and the residual block acquired from the code stream.
18. The method of claim 17, wherein the decoding device iteratively predicts the intermediate reconstructed block, and comprises:
the decoding device divides the middle reconstruction block and selects reference pixels from the divided sub-blocks;
the coding device performs iterative prediction on each subblock by using the reference pixel to obtain an iteratively predicted coding block.
19. An apparatus for predicting a code block, the apparatus being located in an encoding apparatus, the apparatus comprising:
the selecting module is used for dividing the coding block after intra-frame prediction and selecting reference pixels from reconstructed pixels in the divided sub-blocks;
the prediction module is used for carrying out iterative prediction on each subblock by utilizing the reference pixel to obtain an iteratively predicted coding block;
the determining module is used for comparing the distortion parameters of the intra-frame predicted coding block and the iterative predicted coding block, determining the prediction mode of the coding block and setting a corresponding flag bit;
and the sending module is used for sending the coding block corresponding to the prediction mode and the zone bit to decoding equipment.
20. An apparatus for decoding a code block, comprising:
a receiving module, configured to receive a prediction block and a flag bit sent by an encoding apparatus;
a decoding module, configured to decode the prediction block according to a prediction mode carried in the flag bit, where the prediction mode includes: intra prediction mode and iterative prediction mode.
21. A storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the method of any of claims 1-13,14-18 when executed.
22. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1-13, 14-18.
CN201910300253.3A 2019-04-15 2019-04-15 Code block prediction method, code block decoding method, code block prediction device, and code block decoding device Pending CN111836043A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910300253.3A CN111836043A (en) 2019-04-15 2019-04-15 Code block prediction method, code block decoding method, code block prediction device, and code block decoding device
PCT/CN2020/082689 WO2020211642A1 (en) 2019-04-15 2020-04-01 Code block prediction method and apparatus, and code block decoding method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910300253.3A CN111836043A (en) 2019-04-15 2019-04-15 Code block prediction method, code block decoding method, code block prediction device, and code block decoding device

Publications (1)

Publication Number Publication Date
CN111836043A true CN111836043A (en) 2020-10-27

Family

ID=72838066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910300253.3A Pending CN111836043A (en) 2019-04-15 2019-04-15 Code block prediction method, code block decoding method, code block prediction device, and code block decoding device

Country Status (2)

Country Link
CN (1) CN111836043A (en)
WO (1) WO2020211642A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201119407A (en) * 2009-11-19 2011-06-01 Thomson Licensing Method for coding and method for reconstruction of a block of an image
KR101383775B1 (en) * 2011-05-20 2014-04-14 주식회사 케이티 Method And Apparatus For Intra Prediction
CN103650496B (en) * 2011-07-12 2018-09-21 华为技术有限公司 Intra prediction pixel-based for being encoded in HEVC
CN117615132A (en) * 2016-10-14 2024-02-27 世宗大学校产学协力团 Video encoding/decoding method and bit stream transmission method
WO2018141385A1 (en) * 2017-02-02 2018-08-09 Huawei Technologies Co., Ltd. Image and video processing apparatuses and methods
US10750181B2 (en) * 2017-05-11 2020-08-18 Mediatek Inc. Method and apparatus of adaptive multiple transforms for video coding

Also Published As

Publication number Publication date
WO2020211642A1 (en) 2020-10-22

Similar Documents

Publication Publication Date Title
US11265555B2 (en) Video encoding and decoding method
US20200177889A1 (en) Transform method in image coding system and apparatus for same
US11979609B2 (en) Method for performing transform index coding on basis of intra prediction mode, and device therefor
US9307250B2 (en) Optimization of intra block size in video coding based on minimal activity directions and strengths
EP3442231A2 (en) Image encoding/decoding method and apparatus using intra-screen prediction
US20130003855A1 (en) Processing method and device for video signals
US20180213224A1 (en) Intra prediction method and device in video coding system
US11758159B2 (en) Image decoding method/device, image encoding method/device, and recording medium in which bitstream is stored
US11259052B2 (en) Transform variations of multiple separable transform selection
US20230345034A1 (en) Image decoding method/apparatus, image encoding method/apparatus, and recording medium storing bitstream
JP2021523604A (en) Motion compensation for video coding and decoding
TWI833073B (en) Coding using intra-prediction
US20180302620A1 (en) METHOD FOR ENCODING AND DECODING VIDEO SIGNAL, AND APPARATUS THEREFOR (As Amended)
EP3706421A1 (en) Method and apparatus for video encoding and decoding based on affine motion compensation
CN116980594A (en) Intra-frame prediction method, encoder, decoder, and storage medium
KR20210044760A (en) Method and apparatus for video encoding/decoding using image analysis
US11140415B2 (en) Method and device for processing video signal
JP2011082722A (en) Image-encoding method using structural tree, image encoding apparatus, image-decoding method, image decoding apparatus, automatic generation method of image encoding structure, automatic generator of image-encoding structure, and program for the same
CN111836043A (en) Code block prediction method, code block decoding method, code block prediction device, and code block decoding device
JP6992825B2 (en) Video coding device, video coding method, video decoding device, video decoding method, and video coding system
US20240022740A1 (en) Image decoding method/device, image encoding method/device, and recording medium in which bitstream is stored
CN110446048B (en) Method and device for selecting prediction mode in intra-frame prediction scene

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