CN113259674A - Method and apparatus for image or video encoding and decoding - Google Patents
Method and apparatus for image or video encoding and decoding Download PDFInfo
- Publication number
- CN113259674A CN113259674A CN202010089125.1A CN202010089125A CN113259674A CN 113259674 A CN113259674 A CN 113259674A CN 202010089125 A CN202010089125 A CN 202010089125A CN 113259674 A CN113259674 A CN 113259674A
- Authority
- CN
- China
- Prior art keywords
- coding block
- mpm
- intra
- prediction mode
- current
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Methods and apparatus for image/video coding are provided. The method for encoding includes: selecting a most probable mode MPM of intra-frame prediction according to the relative relation of the width and the height of a current coding block; when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, writing the identifier of the intra-frame prediction mode, which is the same as the MPM, into the code stream, and marking the MPM; and transmitting the code stream. The method for decoding includes: receiving a code stream; selecting a most probable mode MPM of intra-frame prediction according to the relative relation of the width and the height of a current coding block; and when the intra-frame prediction mode information analyzed from the code stream indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, taking the same MPM as the intra-frame prediction mode of the current coding block.
Description
Technical Field
The present invention relates to the field of image/video coding and decoding, and more particularly, to intra prediction in coding and decoding.
Background
In the conventional video or image encoding and decoding method, an image is usually divided into a plurality of image blocks, and then each image block is encoded or decoded. For each image block, the encoding step can be divided into prediction, transformation, quantization and entropy encoding, wherein the prediction is to predict the current image block to be encoded by using the reconstructed pixel values (these pixels are referred to as reference pixels) of the image block that has been encoded before to derive a predicted value, and then encode the difference between the actual value and the predicted value of the current image block into the code stream. During decoding, the decoder also needs to predict the current image block to be decoded by using the reconstructed pixel values (these pixels are referred to as reference pixels) of the image block that has been decoded before to derive a prediction value, and then add the difference value decoded from the code stream to the prediction value to obtain the reconstructed value of the decoded image block. In order to ensure the consistency of encoding and decoding, encoding and decoding codes must use the same reference pixels and the same prediction method when performing prediction. There are many specific prediction methods, and the encoder selects a current image block and then writes information about the selected prediction method into the code stream to tell the decoder, so that the decoder can predict the current decoded block using the same prediction method.
Disclosure of Invention
Technical problem
There is a need for improved techniques for intra prediction in image/video coding.
Solution scheme
There is provided a method for encoding, comprising: selecting a most probable mode MPM of intra-frame prediction according to the relative relation of the width and the height of a current coding block; when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, writing the identifier of the intra-frame prediction mode, which is the same as the MPM, into the code stream, and marking the MPM; and transmitting the code stream.
There is provided an apparatus for encoding, comprising: a memory having stored therein a computer program, and a processor that, when running the computer program, performs the following operations: selecting a most probable mode MPM of intra-frame prediction according to the relative relation of the width and the height of a current coding block; when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, writing the identifier of the intra-frame prediction mode, which is the same as the MPM, into the code stream, and marking the MPM; and transmitting the code stream.
There is provided an apparatus for encoding, comprising: the selecting unit is configured to select the MPM of the intra-frame prediction according to the width-height relative relation of the current coding block; a writing unit configured to write an identifier of the intra prediction mode being the same as the MPM in the code stream and mark the same MPM when the intra prediction mode of the current coding block is the same as one of the selected MPMs; and a transmitting unit configured to transmit the code stream.
The method for selecting the MPM of the intra-frame prediction according to the width-height relative relation of the current coding block comprises the following steps: when the aspect ratio of the current coding block is larger than a first threshold value, selecting at least one coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the at least one coding block as MPM; or when the aspect ratio of the current coding block is larger than a second threshold value, selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM.
Selecting at least one coding block from coding blocks above a current coding block, wherein taking an intra prediction mode of the at least one coding block as MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking W/(N-1) as an interval from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein W is the width of the current coding block.
Selecting at least one coding block from coding blocks on the left of a current coding block, wherein the MPM of the intra-frame prediction mode of the at least one coding block comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding block on the left of the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking H/(N-1) as an interval from the coding blocks at the left of the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein H is the height of the current coding block.
A computer readable storage medium is provided for storing non-transitory computer readable instructions which, when executed by a computer, cause the computer to perform the method as previously described.
There is provided a method for decoding, comprising: receiving a code stream; selecting a most probable mode MPM of intra-frame prediction according to the relative relation of the width and the height of a current coding block; and when the intra-frame prediction mode information analyzed from the code stream indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, taking the same MPM as the intra-frame prediction mode of the current coding block.
There is provided an apparatus for decoding, comprising: a memory having stored therein a computer program, and a processor that, when running the computer program, performs the following operations: receiving a code stream; selecting a most probable mode MPM of intra-frame prediction according to the relative relation of the width and the height of a current coding block; and when the intra-frame prediction mode information analyzed from the code stream indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, taking the same MPM as the intra-frame prediction mode of the current coding block.
There is provided an apparatus for decoding, comprising: a receiving unit configured to receive a code stream; an analysis unit configured to analyze intra prediction mode information from the code stream; and a derivation unit configured to select a most probable mode MPM for intra prediction according to a height-width relative relationship of the current encoding block, and when the intra prediction mode information indicates that the intra prediction mode of the current encoding block is the same as one of the selected MPMs, take the same MPM as the intra prediction mode of the current encoding block.
The method for selecting the MPM of the intra-frame prediction according to the width-height relative relation of the current coding block comprises the following steps: when the aspect ratio of the current coding block is larger than a first threshold value, selecting at least one coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the at least one coding block as MPM; or when the aspect ratio of the current coding block is larger than a second threshold value, selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM.
Selecting at least one coding block from coding blocks above a current coding block, wherein taking an intra prediction mode of the at least one coding block as MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking W/(N-1) as an interval from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein W is the width of the current coding block.
Selecting at least one coding block from coding blocks on the left of a current coding block, wherein the MPM of the intra-frame prediction mode of the at least one coding block comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding block on the left of the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking H/(N-1) as an interval from the coding blocks at the left of the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein H is the height of the current coding block.
A computer readable storage medium is provided for storing non-transitory computer readable instructions which, when executed by a computer, cause the computer to perform the method as previously described.
Advantageous effects
The present invention provides improved techniques for intra prediction in image/video coding. Other aspects, advantages and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention.
Drawings
Fig. 1 is a diagram illustrating an existing intra prediction mode and two MPMs.
Fig. 2 shows a flow chart of a method for image and/or video coding according to the invention.
Fig. 3 is a diagram illustrating a selection manner of an MPM when an aspect ratio of a current coding block is greater than a first threshold according to an embodiment of the present invention.
Fig. 4 is a diagram illustrating a selection manner of an MPM when an aspect ratio of a current coding block is greater than a second threshold according to an embodiment of the present invention.
Fig. 5 shows a block diagram of an apparatus for encoding according to the present invention.
Fig. 6 shows a flow chart of a method for image and/or video decoding according to the invention.
Fig. 7 shows an apparatus for image and/or video decoding according to the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The terms and words used in the following description are not intended to be limited to the literal meanings, but are merely used to enable a clear and consistent understanding of the invention. Accordingly, one skilled in the art would understand that: the following description of exemplary embodiments of the present invention is provided for the purpose of illustration only and not for the purpose of limiting the invention as defined by the claims and their equivalents.
It should be understood that: the singular forms "a", "an" and "the" include plural referents unless the context clearly dictates otherwise.
With the development of image and/or video coding and decoding technology, the prediction directions in the intra prediction technology are correspondingly increased, from the maximum 9 intra prediction modes in h.264, to 35 intra prediction modes in HEVC, and to 67 intra prediction modes in VVC at the present stage. With the increase of intra-frame prediction modes, researchers have found that the intra-frame prediction Mode of a current coding block has high similarity to the intra-frame prediction modes of neighboring blocks, and a Most Probable Mode (MPM) technique should be developed to remove redundancy between the intra-frame prediction modes of neighboring blocks. As shown in FIG. 1, the intra prediction mode of the current block is horizontal mode, and the intra prediction modes (i.e., MPMs) of two adjacent blocks of the current block are horizontal mode and horizontal up mode, so that the encoder only needs to tell the decoder that the intra prediction mode of the current block is consistent with the intra prediction mode of the left block, and does not need to spend a large number of bits to encode the intra prediction mode of the current block.
Fig. 1 is a diagram illustrating an existing intra prediction mode and two MPMs. With the development of image and/or video coding and decoding technology, especially after various partitioning methods with different sizes are adopted in the new generation coding technology, a coding block may have a non-square size, and when the aspect ratio of the coding block is relatively large, as shown in fig. 1, two MPMs may be the same, for which case, a more accurate MPM needs to be obtained to remove redundancy between intra prediction modes.
In order to make the MPMs selected under the condition of different partition sizes of the coding block as different as possible so as to achieve the effect of removing redundancy among intra-frame prediction modes, the invention improves the MPM selection method. When the aspect ratio of the current coding block is larger than a first threshold (for example, the first threshold is larger than or equal to 1), the encoder and/or the decoder selects at least one coding block from the coding blocks above the current coding block, and the intra-frame prediction mode of the at least one coding block is used as the MPM; when the aspect ratio of the current coding block is larger than a second threshold (for example, the second threshold is larger than or equal to 1), the encoder and/or the decoder selects at least one coding block from the coding blocks on the left side of the current coding block, and takes the intra prediction mode of the at least one coding block as the MPM. Therefore, for coding blocks with different sizes, more MPMs can be selected as much as possible to remove redundancy among the intra-frame prediction modes, and finally, the performance of image and/or video coding and decoding is improved.
Fig. 2 shows a flow chart of a method for image and/or video coding according to the invention. The method comprises the following steps: selecting MPMs for intra-frame prediction according to the relative relation of width and height of the current coding block (S201); when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, writing the same identifier of the intra-frame prediction mode and the MPM in the code stream, and marking the same MPM (S202); and transmitting the codestream (S203).
According to the embodiment of the present invention, the selecting the MPM for intra prediction according to the aspect-to-height relative relationship of the current coding block in S201 includes: when the aspect ratio of the current coding block is larger than a first threshold (for example, the first threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the at least one coding block as MPM; or when the aspect ratio of the current coding block is larger than a second threshold (for example, the second threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM. In this way, for coding blocks with different width-height relative relations, as many MPMs as possible can be selected for the coding blocks to remove redundancy between intra-prediction modes, and finally improve the performance of image and/or video coding and decoding.
Fig. 3 is a diagram illustrating a selection manner of an MPM when an aspect ratio of a current coding block is greater than a first threshold according to an embodiment of the present invention. Fig. 4 is a diagram illustrating a selection manner of an MPM when an aspect ratio of a current coding block is greater than a second threshold according to an embodiment of the present invention.
According to the embodiment of the invention, selecting at least one coding block from coding blocks above a current coding block, and taking an intra prediction mode of the at least one coding block as MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking W/(N-1) as an interval from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein W is the width of the current coding block. For example, when N is 3, 3 MPMs are equidistantly selected from the top of the current coding block at an interval of W/(3-1) ═ W/2, as shown in fig. 3.
According to the embodiment of the invention, selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding block on the left of the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking H/(N-1) as an interval from the coding blocks at the left of the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein H is the height of the current coding block. For example, when N is 3, 3 MPMs are equidistantly selected from the left of the current coding block at intervals of H/(3-1) ═ H/2, as shown in fig. 4.
According to the embodiment of the invention, when the intra-frame prediction mode of the current coding block is different from the selected MPM, the intra-frame prediction mode of the current coding block is written in the code stream. For example, the intra prediction mode of the current coding block is written in the code stream according to the used method.
According to the embodiment of the invention, the intra-frame prediction mode of the current coding block is the intra-frame prediction mode with the lowest corresponding rate-distortion cost. For example, the encoder traverses all intra-frame prediction modes of a current coding block to obtain corresponding prediction pixel values, performs operations such as transformation and quantization on the current coding block according to the prediction pixel values, calculates rate-distortion cost corresponding to each intra-frame prediction mode, and finally selects the intra-frame prediction mode with the lowest rate-distortion cost according to the rate-distortion cost of each intra-frame prediction mode.
Fig. 5 shows a block diagram of an apparatus for encoding according to the present invention. The means 501 for encoding comprises: a memory 502 in which a computer program is stored, and a processor 503 which, when running the computer program, performs the following operations: selecting a most probable mode MPM of intra-frame prediction according to the relative relation of the width and the height of a current coding block; when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, writing the identifier of the intra-frame prediction mode, which is the same as the MPM, into the code stream, and marking the MPM; and transmitting the code stream.
According to the embodiment of the invention, the selecting the MPM of the intra-frame prediction according to the width-height relative relation of the current coding block comprises the following steps: when the aspect ratio of the current coding block is larger than a first threshold (for example, the first threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the at least one coding block as MPM; or when the aspect ratio of the current coding block is larger than a second threshold (for example, the second threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM.
According to the embodiment of the invention, selecting at least one coding block from coding blocks above a current coding block, and taking an intra prediction mode of the at least one coding block as MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking W/(N-1) as an interval from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein W is the width of the current coding block.
According to the embodiment of the invention, selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding block on the left of the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking H/(N-1) as an interval from the coding blocks at the left of the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein H is the height of the current coding block.
The invention also provides a device for encoding. The apparatus for encoding includes: the selecting unit is configured to select the MPM of the intra-frame prediction according to the width-height relative relation of the current coding block; a writing unit configured to write an identifier of the intra prediction mode being the same as the MPM in the code stream and mark the same MPM when the intra prediction mode of the current coding block is the same as one of the selected MPMs; and a transmitting unit configured to transmit the code stream.
According to the embodiment of the invention, the selecting the MPM of the intra-frame prediction according to the width-height relative relation of the current coding block comprises the following steps: when the aspect ratio of the current coding block is larger than a first threshold (for example, the first threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the at least one coding block as MPM; or when the aspect ratio of the current coding block is larger than a second threshold (for example, the second threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM.
According to the embodiment of the invention, selecting at least one coding block from coding blocks above a current coding block, and taking an intra prediction mode of the at least one coding block as MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking W/(N-1) as an interval from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein W is the width of the current coding block.
According to the embodiment of the invention, selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding block on the left of the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking H/(N-1) as an interval from the coding blocks at the left of the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein H is the height of the current coding block.
Fig. 6 shows a flow chart of a method for image and/or video decoding according to the invention. The method comprises the following steps: receiving a code stream (S601); selecting MPMs for intra-frame prediction according to the relative relation of width and height of the current coding block (S602); and when the intra prediction mode information parsed from the code stream indicates that the intra prediction mode of the current coding block is the same as one of the selected MPMs, taking the same MPM as the intra prediction mode of the current coding block (S603).
According to the embodiment of the invention, the selecting the MPM of the intra-frame prediction according to the width-height relative relation of the current coding block comprises the following steps: when the aspect ratio of the current coding block is larger than a first threshold (for example, the first threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the at least one coding block as MPM; or when the aspect ratio of the current coding block is larger than a second threshold (for example, the second threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM.
According to the embodiment of the invention, selecting at least one coding block from coding blocks above a current coding block, and taking an intra prediction mode of the at least one coding block as MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking W/(N-1) as an interval from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein W is the width of the current coding block. For example, when N is 3, 3 MPMs are equidistantly selected from the top of the current coding block at an interval of W/(3-1) ═ W/2, as shown in fig. 3.
According to the embodiment of the invention, selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding block on the left of the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking H/(N-1) as an interval from the coding blocks at the left of the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein H is the height of the current coding block. For example, when N is 3, 3 MPMs are equidistantly selected from the left of the current coding block at intervals of H/(3-1) ═ H/2, as shown in fig. 4.
According to an embodiment of the invention, the method further comprises: when the parsed intra prediction mode information does not indicate that the intra prediction mode of the current encoding block is the same as one of the selected MPMs, the intra prediction mode of the current encoding block is derived from the intra prediction mode information. For example, the intra prediction mode is analyzed in a used method.
According to an embodiment of the invention, the method further comprises: and predicting the predicted value of the current coding block according to the intra-frame prediction mode of the current coding block. And reconstructing the image according to the prediction value to obtain a final decoded image.
Fig. 7 shows an apparatus for decoding according to the present invention. The apparatus for decoding 701 includes: a memory 702 in which a computer program is stored, and a processor 703 which, when running the computer program, performs the following operations: receiving a code stream; selecting a most probable mode MPM of intra-frame prediction according to the relative relation of the width and the height of a current coding block; and when the intra-frame prediction mode information analyzed from the code stream indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, taking the same MPM as the intra-frame prediction mode of the current coding block.
According to the embodiment of the invention, the selecting the MPM of the intra-frame prediction according to the width-height relative relation of the current coding block comprises the following steps: when the aspect ratio of the current coding block is larger than a first threshold (for example, the first threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the at least one coding block as MPM; or when the aspect ratio of the current coding block is larger than a second threshold (for example, the second threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM.
According to the embodiment of the invention, selecting at least one coding block from coding blocks above a current coding block, and taking an intra prediction mode of the at least one coding block as MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking W/(N-1) as an interval from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein W is the width of the current coding block. For example, when N is 3, 3 MPMs are equidistantly selected from the top of the current coding block at an interval of W/(3-1) ═ W/2, as shown in fig. 3.
According to the embodiment of the invention, selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding block on the left of the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking H/(N-1) as an interval from the coding blocks at the left of the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein H is the height of the current coding block. For example, when N is 3, 3 MPMs are equidistantly selected from the left of the current coding block at intervals of H/(3-1) ═ H/2, as shown in fig. 4.
The present invention also provides an apparatus for decoding, comprising: a receiving unit configured to receive a code stream; an analysis unit configured to analyze intra prediction mode information from the code stream; and a derivation unit configured to select a most probable mode MPM for intra prediction according to a height-width relative relationship of the current encoding block, and when the intra prediction mode information indicates that the intra prediction mode of the current encoding block is the same as one of the selected MPMs, take the same MPM as the intra prediction mode of the current encoding block.
According to the embodiment of the invention, the selecting the MPM of the intra-frame prediction according to the width-height relative relation of the current coding block comprises the following steps: when the aspect ratio of the current coding block is larger than a first threshold (for example, the first threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the at least one coding block as MPM; or when the aspect ratio of the current coding block is larger than a second threshold (for example, the second threshold is larger than or equal to 1), selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM.
According to the embodiment of the invention, selecting at least one coding block from coding blocks above a current coding block, and taking an intra prediction mode of the at least one coding block as MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking W/(N-1) as an interval from the coding blocks above the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein W is the width of the current coding block.
According to the embodiment of the invention, selecting at least one coding block from the coding blocks on the left of the current coding block, and taking the intra-frame prediction mode of the at least one coding block as the MPM comprises the following steps: when the number N of the selected MPMs is 1, selecting 1 coding block from the coding block on the left of the current coding block, and taking the intra-frame prediction mode of the selected coding block as the MPM; or when the number N of the selected MPMs is more than or equal to 2, selecting N coding blocks at equal intervals by taking H/(N-1) as an interval from the coding blocks at the left of the current coding block, and taking the intra-frame prediction mode of the N coding blocks as the MPM, wherein H is the height of the current coding block.
The present invention also provides a computer readable storage medium for storing non-transitory computer readable instructions which, when executed by a computer, cause the computer to perform a method as described above.
The example embodiments described herein are not meant to be limiting. The aspects of the present disclosure, as generally described herein, and illustrated in the figures, can be arranged, substituted, combined, separated, and designed in a wide variety of different configurations, all of which are contemplated herein. Furthermore, the features shown in each figure may be used in combination with each other, unless the context indicates otherwise. Thus, the drawings are to be generally regarded as forming a part of one or more general embodiments, but it is to be understood that not all illustrated features are required for each embodiment.
While the invention has been shown and described with reference to certain embodiments thereof, it will be understood by those skilled in the art that various changes and modifications in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010089125.1A CN113259674B (en) | 2020-02-12 | 2020-02-12 | Method and apparatus for image or video encoding and decoding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010089125.1A CN113259674B (en) | 2020-02-12 | 2020-02-12 | Method and apparatus for image or video encoding and decoding |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113259674A true CN113259674A (en) | 2021-08-13 |
CN113259674B CN113259674B (en) | 2025-06-06 |
Family
ID=77220417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010089125.1A Active CN113259674B (en) | 2020-02-12 | 2020-02-12 | Method and apparatus for image or video encoding and decoding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113259674B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104869420A (en) * | 2011-06-28 | 2015-08-26 | 三星电子株式会社 | Method for decoding video data |
US20160373742A1 (en) * | 2015-06-18 | 2016-12-22 | Qualcomm Incorporated | Intra prediction and intra mode coding |
WO2018202558A1 (en) * | 2017-05-04 | 2018-11-08 | Interdigital Vc Holdings, Inc. | Method and apparatus for most probable mode (mpm) reordering for intra prediction |
CN108886617A (en) * | 2016-04-06 | 2018-11-23 | 株式会社Kt | Method and device for processing video signals |
CN110546957A (en) * | 2017-06-22 | 2019-12-06 | 华为技术有限公司 | Intra-frame prediction method and device |
-
2020
- 2020-02-12 CN CN202010089125.1A patent/CN113259674B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104869420A (en) * | 2011-06-28 | 2015-08-26 | 三星电子株式会社 | Method for decoding video data |
US20160373742A1 (en) * | 2015-06-18 | 2016-12-22 | Qualcomm Incorporated | Intra prediction and intra mode coding |
CN108886617A (en) * | 2016-04-06 | 2018-11-23 | 株式会社Kt | Method and device for processing video signals |
WO2018202558A1 (en) * | 2017-05-04 | 2018-11-08 | Interdigital Vc Holdings, Inc. | Method and apparatus for most probable mode (mpm) reordering for intra prediction |
CN110546957A (en) * | 2017-06-22 | 2019-12-06 | 华为技术有限公司 | Intra-frame prediction method and device |
Non-Patent Citations (1)
Title |
---|
DILLON2015: "VVC帧内预测(一)", pages 3, Retrieved from the Internet <URL:https://blog.csdn.net/Dillon2015/article/details/103395945/> * |
Also Published As
Publication number | Publication date |
---|---|
CN113259674B (en) | 2025-06-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6059384B2 (en) | Method and apparatus for encoding or decoding | |
US10070126B2 (en) | Method and apparatus of intra mode coding | |
TWI528791B (en) | An image predictive coding method, a video predictive coding apparatus, a computer-readable recording medium on which an image predictive coding program is recorded, a video prediction decoding apparatus, and a computer-recording medium on which a Video prediction decoding program is recorded | |
KR102304446B1 (en) | Method of encoding intra mode by choosing most probable mode with high hit rate and apparatus for the same, and method of decoding and apparatus for the same | |
JP2019110591A (en) | Image decoding method | |
KR20110019855A (en) | Method and apparatus for encoding intra prediction mode using variable length code, and recording medium therefor | |
KR20110066109A (en) | Encoding / Decoding Method and Device Using Tree Structure | |
JP2015233306A (en) | Video encoding method and apparatus, and video decoding method and apparatus | |
CN103238333A (en) | Method and apparatus for encoding/decoding images to minimize redundancy of intra-rediction mode | |
CN102939752A (en) | Method and apparatus for encoding video by performing loop filtering based on tree-structured data units, and method and apparatus for decoding video by performing loop filtering based on tree-structured data units | |
KR20110045908A (en) | Method and device for motion vector coding / decoding using spatial segmentation and method and device for image coding / decoding using the same | |
US9326011B2 (en) | Method and apparatus for generating bitstream based on syntax element | |
KR102038901B1 (en) | Apparatus and method for intra prediction coding/decoding based on adaptive candidate modes | |
CN102685477A (en) | Method and device for obtaining image blocks for merging mode | |
TWI804999B (en) | Encoding and decoding a picture | |
CN103596003B (en) | Interframe predication quick mode selecting method for high-performance video coding | |
JP2022526276A (en) | Methods and devices for image encoding and decoding | |
CN102118615A (en) | Video encoding/decoding method and device using variable block size skip mode | |
JP2014011726A (en) | Image encoder, image encoding method and program, image decoder, and image decoding method and program | |
TWI387349B (en) | Encoding method of digital media data, decoding method of encoded digital media data, and processing method of bit stream of digital media data | |
CN104104956B (en) | For layered video coding and the method for decoding, encoding apparatus and decoding apparatus | |
JP7194539B2 (en) | Encoding device, decoding device and program | |
CN113259674B (en) | Method and apparatus for image or video encoding and decoding | |
US10750168B2 (en) | Image encoding and decoding method, encoding and decoding device and corresponding computer programs | |
KR20130070618A (en) | Coding method and apparatus by using tree structure |
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 |