Method and apparatus for image or video encoding and decoding

By selecting the most likely mode MPM according to the aspect ratio of the current encoding block and marking the same mode in the code stream, the problem of intra prediction mode redundancy in the prior art is solved, and the efficiency of image and video encoding and decoding is improved.

CN113259674BActive Publication Date: 2025-06-06BEIJING SAMSUNG TELECOM R&D CENT +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010089125.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-12
Publication Date
2025-06-06
Estimated Expiration
2040-02-12

AI Technical Summary

Technical Problem

Intra prediction for image/video encoding and decoding in the prior art has problems of redundancy and inefficiency.

Method used

By selecting the most likely mode MPM of intra prediction based on the width and height relative relationship of the current encoded block, when the intra prediction mode of the current encoded block is the same as the selected MPM, the same identification is written in the code stream and the mode is marked, thereby reducing the encoding of redundant information.

Benefits of technology

Effectively remove redundancy between intra prediction modes and improve the performance of image and video encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113259674B_ABST
    Figure CN113259674B_ABST
Patent Text Reader

Abstract

A method and apparatus for image / video encoding and decoding are provided. The encoding method includes: selecting the most probable mode MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block; when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, writing an identifier that the intra-frame prediction mode is the same as the MPM in the bitstream and marking the same MPM; and sending the bitstream. The decoding method includes: receiving the bitstream; selecting the most probable mode MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block; and when the intra-frame prediction mode information parsed from the bitstream indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, using the same MPM as the intra-frame prediction mode of the current coding block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image / video coding and decoding, and in particular to intra-frame prediction in coding and decoding. Background Art

[0002] In the existing video or image coding and decoding methods, an image is usually divided into multiple image blocks, and then each image block is encoded or decoded. For each image block, the coding steps can be divided into prediction, transformation, quantization and entropy coding, where prediction is to use the reconstructed pixel values ​​of the previously encoded image blocks (these pixels are called reference pixels) to predict the current image block to be encoded to derive the predicted value, and then encode the difference between the actual value and the predicted value of the current image block into the bitstream. When decoding, the decoder also needs to use the reconstructed pixel values ​​of the previously decoded image blocks (these pixels are called reference pixels) to predict the current image block to derive the predicted value, and then add the difference obtained by decoding from the bitstream to the predicted value to obtain the reconstructed value of the decoded image block. In order to ensure the consistency of coding and decoding, the codec must use the same reference pixels and the same prediction method when making predictions. There are many specific prediction methods. The encoder selects according to the current image block, and then writes the information about the selected prediction method into the bitstream to tell the decoder, so that the decoder can use the same prediction method to predict the current decoded block. Summary of the invention

[0003] Technical issues

[0004] There is a need for improved techniques for intra prediction in image / video codecs.

[0005] Solution

[0006] A method for encoding is provided, comprising: selecting a most probable mode (MPM) for intra-frame prediction according to a relative relationship between width and height of a current encoding block; when the intra-frame prediction mode of the current encoding block is the same as one of the selected MPMs, writing an identification that the intra-frame prediction mode is the same as the MPM in a bitstream, and marking the same MPM; and sending the bitstream.

[0007] Provided is a device for encoding, comprising: a memory storing a computer program, and a processor, which performs the following operations when running the computer program: selecting a most probable mode MPM for intra-frame prediction according to the relative relationship between the width and 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 an identification that the intra-frame prediction mode is the same as the MPM in a bitstream, and marking the same MPM; and sending the bitstream.

[0008] Provided is a device for encoding, comprising: a selection unit, configured to select a most likely mode MPM for intra-frame prediction according to the relative relationship between the width and height of a current coding block; a writing unit, configured to write an identification that the intra-frame prediction mode is the same as the MPM in a bitstream when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, and mark the same MPM; and a sending unit, configured to send the bitstream.

[0009] Selecting the MPM for intra-frame prediction based on the relative relationship between the width and height of the current coding block includes: when the aspect ratio of the current coding block is greater than a first threshold, selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or when the aspect ratio of the current coding block is greater than a second threshold, selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM.

[0010] Selecting at least one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding block above the current coding block with an interval of W / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where W is the width of the current coding block.

[0011] Selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding blocks to the left of the current coding block with an interval of H / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where H is the height of the current coding block.

[0012] A computer-readable storage medium is provided for storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the computer is caused to execute the method as described above.

[0013] A method for decoding is provided, comprising: receiving a bitstream; selecting a most probable mode (MPM) for intra-frame prediction according to the relative relationship between the width and height of a current coding block; and when intra-frame prediction mode information parsed from the bitstream indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, using the same MPM as the intra-frame prediction mode of the current coding block.

[0014] A device for decoding is provided, comprising: a memory storing a computer program, and a processor, which performs the following operations when running the computer program: receiving a bit stream; selecting a most probable mode (MPM) for intra-frame prediction according to the relative relationship between the width and height of a current coding block; and when the intra-frame prediction mode information parsed from the bit stream indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, using the same MPM as the intra-frame prediction mode of the current coding block.

[0015] A device for decoding is provided, comprising: a receiving unit configured to receive a code stream; a parsing unit configured to parse intra-frame prediction mode information from the code stream; and an exporting unit configured to select a most likely mode MPM for intra-frame prediction according to the relative relationship between the width and height of a current coding block, and when the intra-frame prediction mode information indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, the same MPM is used as the intra-frame prediction mode of the current coding block.

[0016] Selecting the MPM for intra-frame prediction based on the relative relationship between the width and height of the current coding block includes: when the aspect ratio of the current coding block is greater than a first threshold, selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or when the aspect ratio of the current coding block is greater than a second threshold, selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM.

[0017] Selecting at least one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding block above the current coding block with an interval of W / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where W is the width of the current coding block.

[0018] Selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding blocks to the left of the current coding block with an interval of H / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where H is the height of the current coding block.

[0019] A computer-readable storage medium is provided for storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the computer is caused to execute the method as described above.

[0020] Beneficial Effects

[0021] The present invention provides an improved technique for intra-frame prediction in image / video coding and decoding. For those skilled in the art, other aspects, advantages and salient features of the present invention will become clear from the following detailed description which discloses exemplary embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic diagram of an existing intra prediction mode and two MPMs is shown.

[0023] Figure 2 A flow chart of a method for image and / or video encoding according to the present invention is shown.

[0024] Figure 3 A schematic diagram shows a method of selecting an MPM when the aspect ratio of a current coding block is greater than a first threshold according to an embodiment of the present invention.

[0025] Figure 4 A schematic diagram shows a method of selecting an MPM when the aspect ratio of a current coding block is greater than a second threshold according to an embodiment of the present invention.

[0026] Figure 5 A block diagram of an apparatus for encoding according to the present invention is shown.

[0027] Figure 6 A flow chart of a method for image and / or video decoding according to the present invention is shown.

[0028] Figure 7 An apparatus for image and / or video decoding according to the present invention is shown. DETAILED DESCRIPTION

[0029] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0030] The terms and words used in the following specification are not limited to the literal meanings, but are only used to enable a clear and consistent understanding of the present invention. Accordingly, it should be understood by those skilled in the art that the following description of the exemplary embodiments of the present invention is provided for illustrative purposes only, and not for the purpose of limiting the present invention, which is defined by the claims and their equivalents.

[0031] It is to be understood that the singular forms "a", "an" and "the" include plural referents unless the context clearly dictates otherwise.

[0032] With the development of image and / or video coding technology, the prediction directions in intra-frame prediction technology have also increased accordingly, from a maximum of 9 intra-frame prediction modes in H.264, to 35 intra-frame prediction modes in HEVC, and then to 67 intra-frame prediction modes in the current VVC. With the increase of intra-frame prediction modes, some researchers have found that the intra-frame prediction mode of the current coding block has a high similarity with the intra-frame prediction mode of the surrounding blocks. In order to remove the redundancy between the intra-frame prediction modes of adjacent blocks, the Most Probable Mode (MPM) technology came into being. Figure 1 As shown, the intra-frame prediction mode of the current block is the horizontal mode, and the intra-frame prediction modes (i.e., MPM) of the two adjacent blocks of the current block are the horizontal mode and the horizontal upward mode. Therefore, at this time, the encoder only needs to tell the decoder that the intra-frame prediction mode of the current block is consistent with the intra-frame prediction mode of the left block, and there is no need to spend a large number of bits to encode the intra-frame prediction mode of the current block.

[0033] Figure 1 Schematic diagram of existing intra prediction modes and two MPMs is shown. With the development of image and / or video coding technology, especially after the new generation of coding technology adopts various different size division methods, the coding block may have a non-square size. When the aspect ratio of the coding block is quite different, such as Figure 1 The two MPMs shown may be the same. In this case, a more accurate MPM needs to be obtained to remove the redundancy between intra-frame prediction modes.

[0034] In order to make the MPM selected when the coding block is divided into different sizes as different as possible, so as to achieve the effect of removing redundancy between intra-frame prediction modes, the present invention improves the method for selecting MPM. When the aspect ratio of the current coding block is greater than the first threshold (for example, the first threshold ≥ 1), the encoder and / or decoder will select at least one coding block from the coding block above the current coding block, and use the intra-frame prediction mode of the at least one coding block as the MPM; when the aspect ratio of the current coding block is greater than the second threshold (for example, the second threshold ≥ 1), the encoder and / or decoder will select at least one coding block from the coding block to the left of the current coding block, and use the intra-frame prediction mode of the at least one coding block as the MPM. In this way, for coding blocks of different sizes, more MPMs can be selected as much as possible to remove redundancy between intra-frame prediction modes, and ultimately improve the performance of image and / or video encoding and decoding.

[0035] Figure 2A flow chart of a method for image and / or video encoding according to the present invention is shown. The method comprises: selecting an intra-frame prediction MPM according to the relative relationship between the 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 an identification that the intra-frame prediction mode is the same as the MPM in the bitstream, and marking the same MPM (S202); and sending the bitstream (S203).

[0036] According to an embodiment of the present invention, selecting the intra-frame prediction MPM according to the relative relationship between the width and height of the current coding block in S201 includes: when the aspect ratio of the current coding block is greater than a first threshold (for example, the first threshold ≥ 1), selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or when the aspect ratio of the current coding block is greater than a second threshold (for example, the second threshold ≥ 1), selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM. In this way, for coding blocks with different relative relationships between width and height, as many MPMs as possible can be selected for the coding blocks to remove redundancy between intra-frame prediction modes, and ultimately improve the performance of image and / or video encoding and decoding.

[0037] Figure 3 A schematic diagram shows a method of selecting an MPM when the aspect ratio of a current coding block is greater than a first threshold according to an embodiment of the present invention. Figure 4 A schematic diagram shows a method of selecting an MPM when the aspect ratio of a current coding block is greater than a second threshold according to an embodiment of the present invention.

[0038] According to an embodiment of the present invention, selecting at least one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting 1 coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding block above the current coding block at intervals of W / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where W is the width of the current coding block. For example, when N=3, 3 MPMs are equidistantly selected from the top of the current coding block at intervals of W / (3-1)=W / 2, such as Figure 3 shown.

[0039] According to an embodiment of the present invention, selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting 1 coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding blocks to the left of the current coding block at intervals of H / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where H is the height of the current coding block. For example, when N=3, 3 MPMs are equidistantly selected from the left of the current coding block at intervals of H / (3-1)=H / 2, such as Figure 4 shown.

[0040] According to an embodiment of the present invention, when the intra prediction mode of the current coding block is different from the selected MPM, the intra prediction mode of the current coding block is written into the bitstream. For example, the intra prediction mode of the current coding block is written into the bitstream according to the method used.

[0041] According to an embodiment of the present 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 for the current coding block to obtain corresponding predicted pixel values, and performs operations such as transformation and quantization on the current coding block based on the predicted pixel values, calculates the rate-distortion cost corresponding to each intra-frame prediction mode, and finally selects the intra-frame prediction mode with the lowest rate-distortion cost based on the rate-distortion cost of each intra-frame prediction mode.

[0042] Figure 5 A block diagram of a device for encoding according to the present invention is shown. The device for encoding 501 comprises: a memory 502, in which a computer program is stored, and a processor 503, which performs the following operations when running the computer program: selecting the most likely mode MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block; when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, writing an identification that the intra-frame prediction mode is the same as the MPM in the bitstream, and marking the same MPM; and sending the bitstream.

[0043] According to an embodiment of the present invention, selecting an intra-frame prediction MPM based on the relative relationship between the width and height of the current coding block includes: when the aspect ratio of the current coding block is greater than a first threshold (for example, the first threshold ≥ 1), selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or when the aspect ratio of the current coding block is greater than a second threshold (for example, the second threshold ≥ 1), selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM.

[0044] According to an embodiment of the present invention, selecting at least one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding block above the current coding block with an interval of W / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where W is the width of the current coding block.

[0045] According to an embodiment of the present invention, selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding blocks to the left of the current coding block with an interval of H / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where H is the height of the current coding block.

[0046] The present invention also provides a device for encoding. The device for encoding includes: a selection unit, configured to select the most likely mode MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block; a writing unit, configured to write an identification that the intra-frame prediction mode is the same as the MPM in the code stream when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, and mark the same MPM; and a sending unit, configured to send the code stream.

[0047] According to an embodiment of the present invention, selecting an intra-frame prediction MPM based on the relative relationship between the width and height of the current coding block includes: when the aspect ratio of the current coding block is greater than a first threshold (for example, the first threshold ≥ 1), selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or when the aspect ratio of the current coding block is greater than a second threshold (for example, the second threshold ≥ 1), selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM.

[0048] According to an embodiment of the present invention, selecting at least one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding block above the current coding block with an interval of W / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where W is the width of the current coding block.

[0049] According to an embodiment of the present invention, selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding blocks to the left of the current coding block with an interval of H / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where H is the height of the current coding block.

[0050] Figure 6 A flowchart of a method for image and / or video decoding according to the present invention is shown. The method comprises: receiving a code stream (S601); selecting an intra-frame prediction MPM according to the relative relationship between the width and height of the current coding block (S602); and when the intra-frame prediction mode information parsed 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, using the same MPM as the intra-frame prediction mode of the current coding block (S603).

[0051] According to an embodiment of the present invention, selecting an intra-frame prediction MPM based on the relative relationship between the width and height of the current coding block includes: when the aspect ratio of the current coding block is greater than a first threshold (for example, the first threshold ≥ 1), selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or when the aspect ratio of the current coding block is greater than a second threshold (for example, the second threshold ≥ 1), selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM.

[0052] According to an embodiment of the present invention, selecting at least one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting 1 coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding block above the current coding block at intervals of W / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where W is the width of the current coding block. For example, when N=3, 3 MPMs are equidistantly selected from the top of the current coding block at intervals of W / (3-1)=W / 2, such as Figure 3 shown.

[0053] According to an embodiment of the present invention, selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting 1 coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding blocks to the left of the current coding block at intervals of H / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where H is the height of the current coding block. For example, when N=3, 3 MPMs are equidistantly selected from the left of the current coding block at intervals of H / (3-1)=H / 2, such as Figure 4 shown.

[0054] According to an embodiment of the present invention, the method further comprises: when the parsed intra-frame prediction mode information does not indicate that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, deriving the intra-frame prediction mode of the current coding block from the intra-frame prediction mode information. For example, the intra-frame prediction mode is parsed according to the used method.

[0055] According to an embodiment of the present invention, the method further comprises: predicting a prediction 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.

[0056] Figure 7 The device for decoding according to the present invention is shown. The device for decoding 701 includes: a memory 702, in which a computer program is stored, and a processor 703, which performs the following operations when running the computer program: receiving a code stream; selecting the most likely mode MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block; and when the intra-frame prediction mode information parsed 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, using the same MPM as the intra-frame prediction mode of the current coding block.

[0057] According to an embodiment of the present invention, selecting an intra-frame prediction MPM based on the relative relationship between the width and height of the current coding block includes: when the aspect ratio of the current coding block is greater than a first threshold (for example, the first threshold ≥ 1), selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or when the aspect ratio of the current coding block is greater than a second threshold (for example, the second threshold ≥ 1), selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM.

[0058] According to an embodiment of the present invention, selecting at least one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting 1 coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding block above the current coding block at intervals of W / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where W is the width of the current coding block. For example, when N=3, 3 MPMs are equidistantly selected from the top of the current coding block at intervals of W / (3-1)=W / 2, such as Figure 3 shown.

[0059] According to an embodiment of the present invention, selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting 1 coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding blocks to the left of the current coding block at intervals of H / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where H is the height of the current coding block. For example, when N=3, 3 MPMs are equidistantly selected from the left of the current coding block at intervals of H / (3-1)=H / 2, such as Figure 4 shown.

[0060] The present invention also provides a device for decoding, comprising: a receiving unit, configured to receive a code stream; a parsing unit, configured to parse intra-frame prediction mode information from the code stream; and an exporting unit, configured to select the most likely mode MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block, and when the intra-frame prediction mode information indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, use the same MPM as the intra-frame prediction mode of the current coding block.

[0061] According to an embodiment of the present invention, selecting an intra-frame prediction MPM based on the relative relationship between the width and height of the current coding block includes: when the aspect ratio of the current coding block is greater than a first threshold (for example, the first threshold ≥ 1), selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or when the aspect ratio of the current coding block is greater than a second threshold (for example, the second threshold ≥ 1), selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM.

[0062] According to an embodiment of the present invention, selecting at least one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding block above the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding block above the current coding block with an interval of W / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where W is the width of the current coding block.

[0063] According to an embodiment of the present invention, selecting at least one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM includes: when the number of selected MPMs N=1, selecting one coding block from the coding blocks to the left of the current coding block, and using the intra-frame prediction mode of the selected coding block as the MPM; or when the number of selected MPMs N≥2, selecting N coding blocks equidistantly from the coding blocks to the left of the current coding block with an interval of H / (N-1), and using the intra-frame prediction modes of the N coding blocks as the MPM, where H is the height of the current coding block.

[0064] The present invention also provides a computer-readable storage medium for storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the computer is caused to execute the method described above.

[0065] The example embodiments described herein are not meant to be limiting. The various aspects of the present disclosure as generally described herein and illustrated in the accompanying drawings may be arranged, substituted, combined, separated, and designed in a variety of different configurations, all of which are contemplated herein. In addition, unless the context indicates otherwise, the features shown in each of the accompanying drawings may be used in conjunction with each other. Therefore, the accompanying drawings should be considered as Figure 1 The illustrated features are generally considered as part of one or more overall embodiments, but it should be understood that not all illustrated features are required for each embodiment.

[0066] Although the present invention has been illustrated and described above with reference to specific embodiments thereof, it will be understood by those skilled in the art that various changes and modifications in form and details may be made to the present invention without departing from the spirit and scope of the invention as defined by the claims.

Claims

1. A method for encoding, include: According to the relative relationship between the width and height of the current coding block, the intra-frame prediction mode of the coding block above or to the left of the current coding block is selected as the most probable mode MPM of intra-frame prediction; When the intra prediction mode of the current coding block is the same as one of the selected MPMs, an identifier indicating that the intra prediction mode is the same as the MPM is written into the bitstream, and the same MPM is marked; as well as Send the code stream. Among them, selecting the intra-frame prediction mode of the coding block above or to the left of the current coding block as the MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block includes: When the aspect ratio of the current coding block is greater than the first threshold, selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or When the aspect ratio of the current coding block is greater than the second threshold, at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra prediction mode of the at least one coding block is used as the MPM.

2. The method of claim 1, wherein at least one coding block is selected 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 include: When the number of selected MPMs N=1, one coding block is selected from the coding blocks above the current coding block, and the intra-frame prediction mode of the selected coding block is used as the MPM; or When the number of selected MPMs N ≥ 2, N coding blocks are equally spaced from the coding blocks above the current coding block at intervals of W / (N-1), and the intra-frame prediction modes of the N coding blocks are used as MPMs, where W is the width of the current coding block.

3. The method of claim 1, wherein at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra-frame prediction mode of the at least one coding block is used as the MPM include: When the number of selected MPMs N=1, one coding block is selected from the coding block to the left of the current coding block, and the intra-frame prediction mode of the selected coding block is used as the MPM; or When the number of selected MPMs N≥2, N coding blocks are equally spaced from the coding blocks to the left of the current coding block at intervals of H / (N-1), and the intra-frame prediction modes of the N coding blocks are used as MPMs, where H is the height of the current coding block.

4. A device for encoding, include: a memory having a computer program stored therein, and The processor, when running the computer program, performs the following operations: According to the relative relationship between the width and height of the current coding block, the intra-frame prediction mode of the coding block above or to the left of the current coding block is selected as the most probable mode MPM of intra-frame prediction; When the intra prediction mode of the current coding block is the same as one of the selected MPMs, an identifier indicating that the intra prediction mode is the same as the MPM is written into the bitstream, and the same MPM is marked; as well as Send the code stream. Among them, selecting the intra-frame prediction mode of the coding block above or to the left of the current coding block as the MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block includes: When the aspect ratio of the current coding block is greater than the first threshold, selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or When the aspect ratio of the current coding block is greater than the second threshold, at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra prediction mode of the at least one coding block is used as the MPM.

5. The apparatus as claimed in claim 4, wherein at least one coding block is selected 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 include: When the number of selected MPMs N=1, one coding block is selected from the coding blocks above the current coding block, and the intra-frame prediction mode of the selected coding block is used as the MPM; or When the number of selected MPMs N ≥ 2, N coding blocks are equally spaced from the coding blocks above the current coding block at intervals of W / (N-1), and the intra-frame prediction modes of the N coding blocks are used as MPMs, where W is the width of the current coding block.

6. The apparatus of claim 4, wherein at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra-frame prediction mode of the at least one coding block is used as the MPM include: When the number of selected MPMs N=1, one coding block is selected from the coding block to the left of the current coding block, and the intra-frame prediction mode of the selected coding block is used as the MPM; or When the number of selected MPMs N≥2, N coding blocks are equally spaced from the coding blocks to the left of the current coding block at intervals of H / (N-1), and the intra-frame prediction modes of the N coding blocks are used as MPMs, where H is the height of the current coding block.

7. A device for encoding, include: A selection unit is configured to select, according to a relative relationship between a width and a height of a current coding block, an intra-frame prediction mode of a coding block above or to the left of the current coding block as a most probable mode MPM for intra-frame prediction; A writing unit, configured to write an identification that the intra-frame prediction mode is the same as the MPM in the bitstream when the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, and mark the same MPM; as well as A sending unit is configured to send the code stream, Among them, selecting the intra-frame prediction mode of the coding block above or to the left of the current coding block as the MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block includes: When the aspect ratio of the current coding block is greater than the first threshold, selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or When the aspect ratio of the current coding block is greater than the second threshold, at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra prediction mode of the at least one coding block is used as the MPM.

8. A computer-readable storage medium for storing non-transitory computer-readable instructions, which, when executed by a computer, causes the computer to perform the method according to any one of claims 1 to 3.

9. A method for decoding, include: Receive code stream; According to the relative relationship between the width and height of the current coding block, the intra-frame prediction mode of the coding block above or to the left of the current coding block is selected as the most probable mode MPM of intra-frame prediction; as well as When the intra-frame prediction mode information parsed 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, the same MPM is used as the intra-frame prediction mode of the current coding block. Among them, selecting the intra-frame prediction mode of the coding block above or to the left of the current coding block as the MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block includes: When the aspect ratio of the current coding block is greater than the first threshold, selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or When the aspect ratio of the current coding block is greater than the second threshold, at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra prediction mode of the at least one coding block is used as the MPM.

10. The method of claim 9, wherein at least one coding block is selected 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 include: When the number of selected MPMs N=1, one coding block is selected from the coding blocks above the current coding block, and the intra-frame prediction mode of the selected coding block is used as the MPM; or When the number of selected MPMs N ≥ 2, N coding blocks are equally spaced from the coding blocks above the current coding block at intervals of W / (N-1), and the intra-frame prediction modes of the N coding blocks are used as MPMs, where W is the width of the current coding block.

11. The method of claim 9, wherein at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra-frame prediction mode of the at least one coding block is used as the MPM include: When the number of selected MPMs N=1, one coding block is selected from the coding block to the left of the current coding block, and the intra-frame prediction mode of the selected coding block is used as the MPM; or When the number of selected MPMs N≥2, N coding blocks are equally spaced from the coding blocks to the left of the current coding block at intervals of H / (N-1), and the intra-frame prediction modes of the N coding blocks are used as MPMs, where H is the height of the current coding block.

12. A device for decoding, include: a memory having a computer program stored therein, and The processor, when running the computer program, performs the following operations: Receive code stream; According to the relative relationship between the width and height of the current coding block, the intra-frame prediction mode of the coding block above or to the left of the current coding block is selected as the most probable mode MPM of intra-frame prediction; as well as When the intra-frame prediction mode information parsed 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, the same MPM is used as the intra-frame prediction mode of the current coding block. Among them, selecting the intra-frame prediction mode of the coding block above or to the left of the current coding block as the MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block includes: When the aspect ratio of the current coding block is greater than the first threshold, selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or When the aspect ratio of the current coding block is greater than the second threshold, at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra prediction mode of the at least one coding block is used as the MPM.

13. The apparatus of claim 12, wherein at least one coding block is selected 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 include: When the number of selected MPMs N=1, one coding block is selected from the coding blocks above the current coding block, and the intra-frame prediction mode of the selected coding block is used as the MPM; or When the number of selected MPMs N ≥ 2, N coding blocks are equally spaced from the coding blocks above the current coding block at intervals of W / (N-1), and the intra-frame prediction modes of the N coding blocks are used as MPMs, where W is the width of the current coding block.

14. The apparatus of claim 12, wherein at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra-frame prediction mode of the at least one coding block is used as the MPM include: When the number of selected MPMs N=1, one coding block is selected from the coding block to the left of the current coding block, and the intra-frame prediction mode of the selected coding block is used as the MPM; or When the number of selected MPMs N≥2, N coding blocks are equally spaced from the coding blocks to the left of the current coding block at intervals of H / (N-1), and the intra-frame prediction modes of the N coding blocks are used as MPMs, where H is the height of the current coding block.

15. A device for decoding, include: A receiving unit, configured to receive a code stream; A parsing unit, configured to parse intra-frame prediction mode information from a bit stream; and a deriving unit configured to select, according to the relative relationship between the width and height of the current coding block, the intra-frame prediction mode of the coding block above or to the left of the current coding block as the most probable mode MPM for intra-frame prediction, and when the intra-frame prediction mode information indicates that the intra-frame prediction mode of the current coding block is the same as one of the selected MPMs, use the same MPM as the intra-frame prediction mode of the current coding block, Among them, selecting the intra-frame prediction mode of the coding block above or to the left of the current coding block as the MPM for intra-frame prediction according to the relative relationship between the width and height of the current coding block includes: When the aspect ratio of the current coding block is greater than the first threshold, selecting at least one coding block from the coding blocks above the current coding block, and using the intra-frame prediction mode of the at least one coding block as the MPM; or When the aspect ratio of the current coding block is greater than the second threshold, at least one coding block is selected from the coding blocks to the left of the current coding block, and the intra prediction mode of the at least one coding block is used as the MPM. 16 . A computer-readable storage medium for storing non-transitory computer-readable instructions, which, when executed by a computer, causes the computer to perform the method according to claim 9 .

Citation Information

Patent Citations

  • Method and apparatus for processing video signal

    CN108886617A