Coding method and apparatus
By utilizing left, right, or both sides of the reference information of the current block for intra-frame prediction and filtering during video encoding and decoding, the coding order is optimized, solving the problem of insufficient utilization of right-side reference information in existing technologies and improving coding efficiency.
Patent Information
- Application Number
- CN201910792560.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-26
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2039-08-26
AI Technical Summary
Existing video encoding and decoding technologies fail to fully utilize the reference information on the right side of the current block, resulting in suboptimal encoding efficiency.
Intra-frame prediction is performed based on the availability of reference pixels in the current coding block, including the construction of intra-frame prediction modes, filtering, and linear models. Weighting and padding are performed using left, right, or both-sided reference information to optimize the coding order.
It improves the efficiency of intra-frame coding by making full use of surrounding reference pixel information, thereby enhancing coding efficiency.
Smart Images

Figure CN112437298B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of video coding technology. More specifically, the present disclosure relates to a coding method and apparatus. BACKGROUND
[0002] In the existing video or image coding method, an image is generally divided into multiple image blocks, and then each image block is encoded or decoded. The steps for encoding each image block can include prediction, transformation, quantization and entropy coding, wherein prediction is to use the reconstructed pixel values (these pixels are referred to as reference pixels) of the image blocks that have been encoded before to predict the current image block to be encoded to derive the predicted pixel values, and then the difference between the actual values of the current image block and the predicted pixel values is encoded into a code stream. When decoding, the decoder also needs to use the reconstructed pixel values (these pixels are referred to as reference pixels) of the image blocks that have been decoded before to predict the current image block to be decoded to derive the predicted pixel values, and then add the difference decoded from the code stream to the predicted pixel values to obtain the reconstructed values of the decoded image block. In order to ensure the consistency of coding and decoding, the same reference pixels and the same prediction method must be used when the coding and decoding code is predicted. There are many specific prediction methods, and the encoder generally selects the prediction method according to the current image block, and then writes the information about the selected prediction method into the code stream to tell the decoder, so that the decoder can use the same prediction method to predict the current coding block.
[0003] With the development of video coding technology, new intra prediction methods are introduced, including Intra Prediction Filter (IPF), Two Step Cross Component Prediction Mode (TSCPM), and Derived Tree (DT). IPF is to weight the part of the intra-predicted pixel values in the current coding block and the predicted pixel values on the left side or on the top side of the current coding block to obtain new predicted pixel values, which are used as the final predicted pixel values for intra prediction, as shown in FIG. 1. Figure 1 TSCPM is to find two reference samples from the reference pixels on the left side and on the top side of the current block respectively, and construct a linear model of the luminance component and the chrominance component according to these reference samples, and finally the linear model is used to predict the chrominance component, as shown in FIG. 2. Figure 2 DT is to divide the current coding block into multiple prediction units (PUs), predict each prediction unit, and divide the prediction unit into transform units (TUs) for transformation and quantization operations, as shown in FIG. 3. Figure 3
[0004] With the development of video coding technology, in addition to the common left-to-right coding order, right-to-left coding order also appears, which means that the current coding block or prediction block can obtain reference information of the right side of the current block in addition to the left side and the top side of the current block (including the intra prediction direction, reference pixel value, etc.). The new intra prediction technology (IPF, TSCPM and DT, etc.) does not consider how to use the information to further improve the coding efficiency under the condition that more reference information can be obtained.
[0005] In addition to the traditional left-to-right coding order of image blocks, the right-to-left coding order is proposed in MPEG EVC, which can make the encoder obtain the reference pixel of the right side of the current block when encoding the current block. The existing intra prediction technology only considers the case that the reference information of the left side and the top side of the current block is available, and does not consider the case that the reference information of the right side of the current block is available and the reference information of the left and right sides of the current block is available. SUMMARY
[0006] The exemplary embodiments of the present disclosure aim to provide a coding method and device to maximize the use of surrounding reference pixel information and improve the efficiency of intra coding.
[0007] According to the exemplary embodiments of the present disclosure, a coding method is provided, which comprises: performing intra prediction on a current coding block based on the availability of reference pixels of the current coding block; and writing information for the intra prediction into a bitstream, wherein the information for the intra prediction at least comprises information about an intra prediction mode of the current coding block.
[0008] Optionally, the step of performing intra prediction on the current coding block can comprise: traversing all intra prediction modes for the current coding block to obtain prediction pixel values corresponding to each intra prediction mode, and performing intra prediction filtering on the prediction pixel values to obtain final prediction pixel values corresponding to each intra prediction mode; calculating rate-distortion cost corresponding to each intra prediction mode according to the final prediction pixel values; and taking the intra prediction mode with the lowest rate-distortion cost as the intra prediction mode of the current coding block according to the rate-distortion cost of each intra prediction mode.
[0009] Optionally, the step of performing the intra prediction filtering on the predicted pixel values can comprise: when the reference pixel values on the left side of the current coding block are available and the reference pixel values on the right side are not available, performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel values on the left side of the current coding block; when the reference pixel values on the left side of the current coding block are not available and the reference pixel values on the right side are available, performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel values on the right side of the current coding block; when the reference pixel values on the left side and the right side of the current coding block are both available, performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel values on the left side of the current coding block and / or the reference pixel values on the right side of the current coding block; when the reference pixel values on the left side and the right side of the current coding block are both not available, padding the reference pixel values on the left side or the right side, and performing the intra prediction filtering according to the case that the reference pixel values on the left side of the current coding block are available and the reference pixel values on the right side are not available, or the case that the reference pixel values on the right side of the current coding block are available and the reference pixel values on the left side are not available.
[0010] Optionally, the step of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel values on the right side of the current coding block can comprise: when the intra prediction mode of the current coding block is not an angular prediction mode, weighting the predicted pixel values on the upper side and the right side of the current coding block with the reference pixel values on the upper side and the right side to obtain the final predicted pixel values; when the intra prediction mode of the current coding block is an angular prediction mode, calculating the final predicted pixel values according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction.
[0011] Optionally, the step of calculating the final predicted pixel values according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction can comprise: when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, weighting the predicted pixel values on the upper side of the current coding block with the reference pixel values on the upper side to obtain the final predicted pixel values; when the included angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, weighting the predicted pixel values on the right side of the current coding block with the reference pixel values on the right side to obtain the final predicted pixel values.
[0012] Optionally, the step of performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block can comprise: performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, or performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, or performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block, or selecting the intra filtering mode with the lowest rate-distortion cost from the following intra filtering modes: the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, and the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block.
[0013] Optionally, the step of performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block can comprise: when the intra prediction mode of the current coding block is not an angular prediction mode, weighting the prediction pixel value on the top-left side of the current coding block with the reference pixel value on the top side and the reference pixel value on the left side to obtain the final prediction pixel value on the top-left side of the current coding block, weighting the prediction pixel value on the left side of the current coding block with the reference pixel value on the top side and the reference pixel value on the left side to obtain the final prediction pixel value on the left side of the current coding block, weighting the prediction pixel value on the top-right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain the final prediction pixel value on the top-right side of the current coding block, and weighting the prediction pixel value on the right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, determining whether the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle; when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a third angle, weighting the prediction pixel value on the top side of the current coding block with the reference pixel value on the top side to obtain the final prediction pixel value on the top side of the current coding block; and when the included angle between the prediction direction of the current coding block and the vertical direction is less than a fourth angle, weighting the prediction pixel value on the left side of the current coding block with the reference pixel value on the left side to obtain the final prediction pixel value on the left side of the current coding block, and weighting the prediction pixel value on the right side of the current coding block with the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block.
[0014] Optionally, when both the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are available, the information for the intra prediction further comprises information about an intra filter mode of the current coding block.
[0015] According to an exemplary embodiment of the present disclosure, a decoding method is provided, comprising: parsing information for intra prediction from a bitstream, the information for intra prediction comprising at least information about an intra prediction mode of a current coding block; calculating, according to the parsed information for intra prediction, a prediction pixel value of the current coding block based on availability of reference pixels of the current coding block; and reconstructing the image according to the prediction pixel value to obtain a decoded image.
[0016] Optionally, when both the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are available, the information for the intra prediction further comprises information about an intra filter mode of the current coding block.
[0017] Optionally, the step of calculating the prediction pixel value of the current coding block comprises: when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block; when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block; when both the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are available, performing intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block; and when both the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are unavailable, padding the reference pixel value on the left side or the reference pixel value on the right side and performing intra prediction filtering according to the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, or the case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is unavailable.
[0018] Optionally, the step of performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block comprises: when the intra prediction mode of the current coding block is not an angular prediction mode, weighting the prediction pixel value on the top side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain a final prediction pixel value on the top side of the current coding block, and weighting the prediction pixel value on the right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain a final prediction pixel value on the right side of the current coding block; and when the intra prediction mode of the current coding block is an angular prediction mode, calculating the final prediction pixel value according to an included angle between a prediction direction of the current coding block and a horizontal direction or a vertical direction.
[0019] Optionally, the step of calculating the final prediction pixel value according to the angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction can comprise: when the angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, weighting the prediction pixel value on the upper side of the current coding block and the reference pixel value on the upper side to obtain the final prediction pixel value on the upper side of the current coding block; and when the angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, weighting the prediction pixel value on the right side of the current coding block and the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block.
[0020] Optionally, the step of performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block can comprise: performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, or performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, or performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block, or performing the intra prediction filtering according to the parsed intra filtering mode.
[0021] Optionally, the step of performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block can comprise: when the intra prediction mode of the current coding block is not an angular prediction mode, weighting the prediction pixel value on the top-left side of the current coding block with the reference pixel value on the left side and the reference pixel value on the top side to obtain the final prediction pixel value on the top-left side of the current coding block, weighting the prediction pixel value on the left side of the current coding block with the reference pixel value on the left side and the reference pixel value on the top side to obtain the final prediction pixel value on the left side of the current coding block, weighting the prediction pixel value on the top-right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain the final prediction pixel value on the top-right side of the current coding block, and weighting the prediction pixel value on the right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, determining whether the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle; when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a third angle, weighting the prediction pixel value on the top side of the current coding block with the reference pixel value on the top side to obtain the final prediction pixel value on the top side of the current coding block; and when the included angle between the prediction direction of the current coding block and the vertical direction is less than a fourth angle, weighting the prediction pixel value on the left side of the current coding block with the reference pixel value on the left side to obtain the final prediction pixel value on the left side of the current coding block, and weighting the prediction pixel value on the right side of the current coding block with the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block.
[0022] According to an example embodiment of the present disclosure, an encoding method is provided, comprising: determining reference samples for constructing a linear model based on the availability of reference pixels of a current coding block, and constructing the linear model according to the determined reference samples; calculating prediction pixel values of a chroma component of the current coding block according to the constructed linear model, and determining an intra prediction mode of the current coding block; and writing information for intra prediction into a bitstream, the information for intra prediction at least including information about whether the intra prediction mode of the current coding block is a TSCPM mode.
[0023] Optionally, the step of determining the reference samples for constructing the linear model can comprise: when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, selecting two reference samples from the reference pixel on the upper side and the reference pixel on the left side, respectively; when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, selecting two reference samples from the reference pixel on the upper side and the reference pixel on the right side, respectively; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, obtaining the reference samples according to the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, or obtaining the reference samples according to the case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is unavailable, or selecting the case of obtaining the reference samples according to the rate-distortion cost in the above two cases.
[0024] Optionally, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for intra prediction can further comprise reference sample construction information.
[0025] According to an exemplary embodiment of the present disclosure, a decoding method is provided, comprising: parsing information for intra prediction from a bitstream, the information for intra prediction comprising at least information about whether an intra prediction mode of a current coding block is a TSCPM mode; determining reference samples for constructing a linear model based on availability of reference pixels of the current coding block, and constructing the linear model according to the determined reference samples; calculating predicted pixel values of a chroma component of the current coding block according to the constructed linear model; and reconstructing the chroma component of the current coding block according to the predicted pixel values of the chroma component of the current coding block to obtain a decoded image.
[0026] Optionally, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for intra prediction can further comprise reference sample construction information.
[0027] Optionally, the step of determining the reference samples for constructing the linear model can comprise: when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, selecting two reference samples from the reference pixels on the upper side and the left side, respectively; when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, selecting two reference samples from the reference pixels on the upper side and the right side, respectively; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, obtaining the reference samples according to the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, or obtaining the reference samples according to the case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is unavailable, or obtaining the reference samples according to the parsed reference sample construction information.
[0028] According to an example embodiment of the present disclosure, an encoding method is provided, comprising: determining an encoding order of a prediction block in a current coding block based on a partition mode of the block and availability of reference pixels of the current coding block; determining an encoding order of a transform block in each prediction block of the current coding block based on the partition mode of the block and the availability of the reference pixels of the current coding block; and writing extension DT mode information of the current coding block into a bitstream based on the determined encoding order of the prediction block in the current coding block and the encoding order of the transform block in the prediction block, wherein the DT mode information at least comprises information about the partition mode of the block in the current coding block.
[0029] Optionally, when the partition mode of the block is vertical partition, the step of determining the encoding order of the prediction block in the current coding block can comprise: when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, the encoding order of the prediction block is from left to right; when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, the encoding order of the prediction block is from right to left; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both unavailable, the encoding order of the prediction block is from left to right; and when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the encoding order of the prediction block is one of the following encoding orders: the encoding order from left to right, the encoding order from right to left, and the encoding order with a smaller rate-distortion cost between the encoding order from left to right and the encoding order from right to left.
[0030] Optionally, when the partition mode of the block is vertical partition, the step of determining the coding order of the transform blocks in each prediction block of the current coding block can comprise: when reference pixel values on the left of the current prediction block are available and reference pixel values on the right are unavailable, the coding order of the transform blocks in the prediction block is from left to right; when reference pixel values on the left of the current prediction block are unavailable and reference pixel values on the right are available, the coding order of the transform blocks in the prediction block is from right to left; when reference pixel values on the left and on the right of the current prediction block are both unavailable, the coding order of the transform blocks in the prediction block is from left to right; when reference pixel values on the left and on the right of the current prediction block are both available, the coding order of the transform blocks in the prediction block is one of the following coding orders: the coding order from left to right, the coding order from right to left, the coding order with a smaller rate-distortion cost between from left to right and from right to left.
[0031] Optionally, when reference pixel values on the left and on the right of the current coding block are both available, the DT mode information can further comprise information about the decoding order of the prediction blocks in the current coding block and / or information about the decoding order of the transform blocks in each prediction block of the current coding block.
[0032] According to an exemplary embodiment of the present disclosure, a decoding method is provided, comprising: parsing DT mode information from a bitstream, wherein the DT mode information comprises at least information about a partition mode of a block in a current coding block; determining a decoding order of prediction blocks in the current coding block based on the partition mode of the block and availability of reference pixels of the current coding block; determining a decoding order of transform blocks in each prediction block of the current coding block based on the partition mode of the block and availability of reference pixels of the current coding block; and decoding according to the determined decoding order of the prediction blocks in the current coding block and the determined decoding order of the transform blocks in the prediction blocks.
[0033] Optionally, the DT mode information can further comprise information about the decoding order of the prediction blocks in the current coding block and / or information about the decoding order of the transform blocks in each prediction block of the current coding block.
[0034] Optionally, when the partition mode of the block is vertical partition, the step of determining the decoding order of the prediction block in the current coding block can comprise: when reference pixel values on the left of the current coding block are available and reference pixel values on the right are unavailable, the decoding order of the prediction block is from left to right; when reference pixel values on the left of the current coding block are unavailable and reference pixel values on the right are available, the decoding order of the prediction block is from right to left; when reference pixel values on the left and on the right of the current coding block are both unavailable, the decoding order of the prediction block is from left to right; when reference pixel values on the left and on the right of the current coding block are both available, the decoding order of the prediction block is one of the following decoding orders: the decoding order from left to right, the decoding order from right to left, the decoding order of the prediction block determined according to the information about the decoding order of the prediction block.
[0035] Optionally, when the partition mode of the block is vertical partition, the step of determining the decoding order of the transform block in each prediction block of the current coding block can comprise: when reference pixel values on the left of the current prediction block are available and reference pixel values on the right are unavailable, the decoding order of the transform block in the prediction block is from left to right; when reference pixel values on the left of the current prediction block are unavailable and reference pixel values on the right are available, the decoding order of the transform block in the prediction block is from right to left; when reference pixel values on the left and on the right of the current prediction block are both unavailable, the decoding order of the transform block in the prediction block is from left to right; when reference pixel values on the left and on the right of the current prediction block are both available, the decoding order of the transform block in the prediction block is one of the following decoding orders: the decoding order from left to right, the decoding order from right to left, the decoding order of the transform block in the prediction block determined according to the information about the decoding order of the transform block in the prediction block.
[0036] According to an example embodiment of the present disclosure, an encoding apparatus is provided, comprising: an intra prediction unit configured to perform intra prediction on a current coding block based on availability of reference pixels of the current coding block; and an information writing unit configured to write information used for the intra prediction into a bitstream, the information used for the intra prediction comprising at least information about an intra prediction mode of the current coding block.
[0037] Optionally, the intra prediction unit can be configured to: for the current coding block, iterate through all the intra prediction modes, obtain prediction pixel values corresponding to each of the intra prediction modes, and perform intra prediction filtering on the prediction pixel values to obtain final prediction pixel values corresponding to each of the intra prediction modes; calculate rate-distortion costs corresponding to each of the intra prediction modes according to the final prediction pixel values; and select, as the intra prediction mode of the current coding block, the intra prediction mode with the lowest rate-distortion cost among the rate-distortion costs of the intra prediction modes.
[0038] Optionally, the intra prediction unit is further configured to: when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, perform the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block; when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, perform the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, perform the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both unavailable, fill the reference pixel value on the left side or the reference pixel value on the right side, and perform the intra prediction filtering according to the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, or the case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is unavailable.
[0039] Optionally, the intra prediction unit is further configured to: when the intra prediction mode of the current coding block is not the angular prediction mode, weight the prediction pixel value on the upper side and the prediction pixel value on the right side of the current coding block with the reference pixel value on the upper side and the reference pixel value on the right side to obtain the final prediction pixel value; when the intra prediction mode of the current coding block is the angular prediction mode, calculate the final prediction pixel value according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction.
[0040] Optionally, the intra prediction unit is further configured to: when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, weight the prediction pixel value on the upper side of the current coding block with the reference pixel value on the upper side to obtain the final prediction pixel value; when the included angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, weight the prediction pixel value on the right side of the current coding block with the reference pixel value on the right side to obtain the final prediction pixel value.
[0041] Optionally, the intra prediction unit is further configured to perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, or according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, or according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block, or select an intra filtering mode with the lowest rate-distortion cost from the following intra filtering modes: the intra filtering mode of performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, the intra filtering mode of performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, and the intra filtering mode of performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block.
[0042] Optionally, the intra prediction unit is further configured to, when the intra prediction mode of the current coding block is not an angular prediction mode, weight the prediction pixel value on the top-left side of the current coding block with the reference pixel value on the top side and the reference pixel value on the left side to obtain a final prediction pixel value on the top-left side of the current coding block, weight the prediction pixel value on the left side of the current coding block with the reference pixel value on the top side and the reference pixel value on the left side to obtain a final prediction pixel value on the left side of the current coding block, weight the prediction pixel value on the top-right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain a final prediction pixel value on the top-right side of the current coding block, and weight the prediction pixel value on the right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain a final prediction pixel value on the right side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, determine whether the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle; when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a third angle, weight the prediction pixel value on the top side of the current coding block with the reference pixel value on the top side to obtain a final prediction pixel value on the top side of the current coding block; and when the included angle between the prediction direction of the current coding block and the vertical direction is less than a fourth angle, weight the prediction pixel value on the left side of the current coding block with the reference pixel value on the left side to obtain a final prediction pixel value on the left side of the current coding block, and weight the prediction pixel value on the right side of the current coding block with the reference pixel value on the right side to obtain a final prediction pixel value on the right side of the current coding block.
[0043] Optionally, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for intra prediction further comprises information about the intra filtering mode of the current coding block.
[0044] According to an example embodiment of the present disclosure, a decoding apparatus is provided, comprising: a prediction mode parsing unit configured to parse information for intra prediction from a bitstream, the information for intra prediction comprising at least information about an intra prediction mode of a current coding block; a pixel value prediction unit configured to calculate predicted pixel values of the current coding block according to the parsed information for intra prediction based on availability of reference pixel values of the current coding block; and an image reconstruction unit configured to reconstruct an image according to the predicted pixel values to obtain a decoded image.
[0045] Optionally, when the reference pixel values on the left and on the right of the current coding block are both available, the information for intra prediction further comprises information about an intra filter mode of the current coding block.
[0046] Optionally, the pixel value prediction unit can be configured to, when the reference pixel value on the left of the current coding block is available and the reference pixel value on the right is unavailable, perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left of the current coding block; when the reference pixel value on the left of the current coding block is unavailable and the reference pixel value on the right is available, perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right of the current coding block; when the reference pixel values on the left and on the right of the current coding block are both available, perform intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left of the current coding block and / or the reference pixel value on the right of the current coding block; and when the reference pixel values on the left and on the right of the current coding block are both unavailable, perform padding on the reference pixel value on the left or on the right and perform intra prediction filtering according to the case that the reference pixel value on the left of the current coding block is available and the reference pixel value on the right is unavailable, or the case that the reference pixel value on the right of the current coding block is available and the reference pixel value on the left is unavailable.
[0047] Optionally, the pixel value prediction unit can be further configured to, when the intra prediction mode of the current coding block is not an angular prediction mode, weight the predicted pixel value on the top of the current coding block with the reference pixel value on the top and the reference pixel value on the right to obtain a final predicted pixel value on the top of the current coding block, and weight the predicted pixel value on the right of the current coding block with the reference pixel value on the top and the reference pixel value on the right to obtain a final predicted pixel value on the right of the current coding block; and when the intra prediction mode of the current coding block is an angular prediction mode, calculate the final predicted pixel value according to an included angle between a prediction direction of the current coding block and a horizontal direction or a vertical direction.
[0048] Optionally, the pixel value prediction unit is further configured to: when the angle between the prediction direction of the current coding block and the horizontal direction is smaller than a first angle, weight the prediction pixel value on the top side of the current coding block and the reference pixel value on the top side to obtain a final prediction pixel value on the top side of the current coding block; and when the angle between the prediction direction of the current coding block and the vertical direction is smaller than a second angle, weight the prediction pixel value on the right side of the current coding block and the reference pixel value on the right side to obtain a final prediction pixel value on the right side of the current coding block.
[0049] Optionally, the pixel value prediction unit is further configured to: perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, or perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, or perform intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block, or perform intra prediction filtering according to the parsed intra filtering mode.
[0050] Optionally, the pixel value prediction unit is further configured to: when the intra prediction mode of the current coding block is not an angular prediction mode, weight the prediction pixel value on the top-left side of the current coding block and the reference pixel value on the left side and the reference pixel value on the top side to obtain a final prediction pixel value on the top-left side of the current coding block, weight the prediction pixel value on the left side of the current coding block and the reference pixel value on the left side and the reference pixel value on the top side to obtain a final prediction pixel value on the left side of the current coding block, weight the prediction pixel value on the top-right side of the current coding block and the reference pixel value on the top side and the reference pixel value on the right side to obtain a final prediction pixel value on the top-right side of the current coding block, and weight the prediction pixel value on the right side of the current coding block and the reference pixel value on the top side and the reference pixel value on the right side to obtain a final prediction pixel value on the right side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, determine whether the angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is smaller than a preset angle; when the angle between the prediction direction of the current coding block and the horizontal direction is smaller than a third angle, weight the prediction pixel value on the top side of the current coding block and the reference pixel value on the top side to obtain a final prediction pixel value on the top side of the current coding block; and when the angle between the prediction direction of the current coding block and the vertical direction is smaller than a fourth angle, weight the prediction pixel value on the left side of the current coding block and the reference pixel value on the left side to obtain a final prediction pixel value on the left side of the current coding block, and weight the prediction pixel value on the right side of the current coding block and the reference pixel value on the right side to obtain a final prediction pixel value on the right side of the current coding block.
[0051] According to an example embodiment of the present disclosure, an encoding apparatus is provided, comprising: a model construction unit configured to determine reference samples for constructing a linear model based on availability of reference pixels of a current coding block, and construct the linear model according to the determined reference samples; a mode determination unit configured to calculate predicted pixel values of a chroma component of the current coding block according to the constructed linear model, and determine an intra prediction mode of the current coding block; and a TSCPM mode writing unit configured to write information for intra prediction into a bitstream, the information for intra prediction comprising at least information about whether the intra prediction mode of the current coding block is a TSCPM mode.
[0052] Optionally, the model construction unit can be configured to: when reference pixel values on the left side of the current coding block are available and reference pixel values on the right side are unavailable, select two reference samples from reference pixels on the upper side and reference pixels on the left side, respectively; when reference pixel values on the left side of the current coding block are unavailable and reference pixel values on the right side are available, select two reference samples from reference pixels on the upper side and reference pixels on the right side, respectively; and when reference pixel values on the left side and reference pixel values on the right side of the current coding block are both available, obtain the reference samples according to the case that reference pixel values on the left side of the current coding block are available and reference pixel values on the right side are unavailable, or obtain the reference samples according to the case that reference pixel values on the right side of the current coding block are available and reference pixel values on the left side are unavailable, or select the reference samples obtained according to the case that rate-distortion cost is smaller in the two cases.
[0053] Optionally, when reference pixel values on the left side and reference pixel values on the right side of the current coding block are both available, the information for intra prediction can further comprise reference sample construction information.
[0054] An encoding apparatus is provided, comprising: a TSCPM mode analysis unit configured to analyze information for intra prediction from a bitstream, the information for intra prediction comprising at least information about whether an intra prediction mode of a current coding block is a TSCPM mode; a model construction unit configured to determine reference samples for constructing a linear model based on availability of reference pixels of the current coding block, and construct the linear model according to the determined reference samples; a chroma prediction unit configured to calculate predicted pixel values of a chroma component of the current coding block according to the constructed linear model; and a chroma reconstruction unit configured to reconstruct the chroma component of the current coding block according to the predicted pixel values of the chroma component of the current coding block, to obtain a decoded image.
[0055] Optionally, when reference pixel values on the left side and reference pixel values on the right side of the current coding block are both available, the information for intra prediction can further comprise reference sample construction information.
[0056] Optionally, the model constructing unit can be configured to: when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, select two reference samples from the reference pixel on the upper side and the reference pixel on the left side, respectively; when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, select two reference samples from the reference pixel on the upper side and the reference pixel on the right side, respectively; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, obtain the reference samples according to the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, or obtain the reference samples according to the case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is unavailable, or obtain the reference samples according to the parsed reference sample constructing information.
[0057] According to an example embodiment of the present disclosure, an encoding apparatus is provided, comprising: a first encoding order determining unit configured to determine an encoding order of a prediction block in a current coding block based on a partition mode of the block and availability of reference pixels of the current coding block; a second encoding order determining unit configured to determine an encoding order of a transform block in each prediction block of the current coding block based on the partition mode of the block and the availability of the reference pixels of the current coding block; and an encoding unit configured to write extension tree (DT) mode information into a bitstream based on the determined encoding order of the prediction block in the current coding block and the encoding order of the transform block in the prediction block, wherein the DT mode information comprises at least information about the partition mode of the block in the current coding block.
[0058] Optionally, the first encoding order determining unit can be configured to: when the partition mode of the block is vertical partition, when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, the encoding order of the prediction block is from left to right; when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, the encoding order of the prediction block is from right to left; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both unavailable, the encoding order of the prediction block is from left to right; and when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the encoding order of the prediction block is one of the following encoding orders: the encoding order from left to right, the encoding order from right to left, and the encoding order with a smaller rate-distortion cost between the encoding order from left to right and the encoding order from right to left.
[0059] Optionally, the second coding order determination unit can be configured to: when the partition mode of the block is vertical partition, when reference pixel values on the left of the current prediction block are available and reference pixel values on the right are unavailable, the coding order of the transform blocks in the prediction block is from left to right; when reference pixel values on the left of the current prediction block are unavailable and reference pixel values on the right are available, the coding order of the transform blocks in the prediction block is from right to left; when reference pixel values on the left and on the right of the current prediction block are both unavailable, the coding order of the transform blocks in the prediction block is from left to right; when reference pixel values on the left and on the right of the current prediction block are both available, the coding order of the transform blocks in the prediction block is one of the following coding orders: coding order from left to right, coding order from right to left, coding order with smaller rate-distortion cost in coding order from left to right and coding order from right to left.
[0060] Optionally, when reference pixel values on the left and on the right of the current coding block are both available, the DT mode information can further comprise information about the coding order of the prediction blocks in the current coding block and / or information about the coding order of the transform blocks in each prediction block of the current coding block.
[0061] According to an exemplary embodiment of the present disclosure, a decoding apparatus is provided, comprising: a DT information parsing unit configured to parse DT mode information from a bitstream, wherein the DT mode information comprises at least information about a partition mode of a block in a current coding block; a first decoding order determination unit configured to determine a decoding order of prediction blocks in the current coding block based on the partition mode of the block and availability of reference pixels of the current coding block; a second decoding order determination unit configured to determine a decoding order of transform blocks in each prediction block of the current coding block based on the partition mode of the block and availability of reference pixels of the current coding block; and a decoding unit configured to decode according to the determined decoding order of the prediction blocks in the current coding block and the determined decoding order of the transform blocks in the prediction blocks.
[0062] Optionally, the DT mode information can further comprise information about the decoding order of the prediction blocks in the current coding block and / or information about the decoding order of the transform blocks in each prediction block of the current coding block.
[0063] Optionally, the first decoding order determination unit can be configured to: when the partition mode of the block is vertical partition, when reference pixel values on the left of the current coding block are available and reference pixel values on the right are unavailable, the decoding order of the prediction block is from left to right; when reference pixel values on the left of the current coding block are unavailable and reference pixel values on the right are available, the decoding order of the prediction block is from right to left; when reference pixel values on the left and on the right of the current coding block are both unavailable, the decoding order of the prediction block is from left to right; when reference pixel values on the left and on the right of the current coding block are both available, the decoding order of the prediction block is one of the following decoding orders: the decoding order from left to right, the decoding order from right to left, the decoding order of the prediction block determined according to the information about the decoding order of the prediction block.
[0064] Optionally, the second decoding order determination unit can be configured to: when the partition mode of the block is vertical partition, when reference pixel values on the left of the current prediction block are available and reference pixel values on the right are unavailable, the decoding order of the transform block in the prediction block is from left to right; when reference pixel values on the left of the current prediction block are unavailable and reference pixel values on the right are available, the decoding order of the transform block in the prediction block is from right to left; when reference pixel values on the left and on the right of the current prediction block are both unavailable, the decoding order of the transform block in the prediction block is from left to right; when reference pixel values on the left and on the right of the current prediction block are both available, the decoding order of the transform block in the prediction block is one of the following decoding orders: the decoding order from left to right, the decoding order from right to left, the decoding order of the transform block in the prediction block determined according to the information about the decoding order of the transform block in the prediction block.
[0065] According to an example embodiment of the present disclosure, a computer readable storage medium is provided, which stores a computer program, when the computer program is executed by a processor, an encoding method and a decoding method according to an example embodiment of the present disclosure are implemented.
[0066] According to an example embodiment of the present disclosure, a computing device is provided, comprising: a processor; a memory storing a computer program, when the computer program is executed by the processor, an encoding method and a decoding method according to an example embodiment of the present disclosure are implemented.
[0067] According to the coding method and device of the exemplary embodiments of the present disclosure, flexible coding order is adopted, spatial reference information is extended, and intra prediction filtering technology (IPF), trans-component prediction technology (TSCPM) and extended tree technology (DT) are designed according to the availability of the left and right neighboring reference pixels of the current coding or decoding image block, so that the surrounding reference pixel information is maximally utilized, thereby improving the efficiency of intra coding. When the left pixel of the current image block is available and the right pixel is unavailable, the various intra prediction technologies are consistent with the prior art, so that the compatibility between the technologies is maximally retained. When the right pixel of the image block is available, for the IPF technology, the right and upper pixels are used as the filtering pixels, that is, a new prediction value is obtained by weighting the right and upper pixels and the prediction value. For the TSCPM technology, the right and upper pixels are used to derive the linear model of the luminance component and the chrominance component, and the chrominance component is predicted according to the linear model. For the DT technology, when the right pixel is available, the prediction block and the transform block are coded in the right-to-left order, so that when the right-to-left coding order is adopted, the pixel information of the image block that has been coded or decoded around the image block can still be maximally used, thereby improving the intra prediction efficiency and further improving the performance of video coding.
[0068] Additional aspects and / or advantages of the general inventive concept will be set forth in part in the description that follows, and in part will be obvious from the description, or can be learned by practice of the general inventive concept. BRIEF DESCRIPTION OF DRAWINGS
[0069] The foregoing and other objects and features of the exemplary embodiments of the present disclosure will become more fully apparent from the following description and appended claims, taken in conjunction with the accompanying drawings. Description of Embodiments
[0070] Figure 1 A schematic diagram showing that the reference pixels on the upper side and the left side of the current coding block are available in the IPF technology;
[0071] Figure 2 A schematic diagram showing that two reference samples are found from the reference pixels on the left side and the upper side of the current coding block in the TSCPM technology;
[0072] Figure 3 A schematic diagram showing that the coding block is divided into a prediction block in the DT technology;
[0073] Figure 4 A flowchart showing the coding method according to one exemplary embodiment of the present disclosure;
[0074] Figure 5 A schematic diagram showing that the reference pixels on the upper side and the right side of the current coding block are available according to the exemplary embodiments of the present disclosure;
[0075] Figure 6 A diagram showing available reference pixels for the top, left, and right of a current coding block according to an example embodiment of the disclosure;
[0076] Figure 7 A flowchart showing a decoding method according to an example embodiment of the disclosure;
[0077] Figure 8 A flowchart showing an encoding method according to another example embodiment of the disclosure;
[0078] Figure 9 A diagram showing reference samples in a TSCPM technique according to an example embodiment of the disclosure;
[0079] Figure 10 A flowchart showing a decoding method according to another example embodiment of the disclosure;
[0080] Figure 11 A flowchart showing an encoding method according to another example embodiment of the disclosure;
[0081] Figure 12 A diagram showing an encoding order of prediction blocks according to an example embodiment of the disclosure;
[0082] Figure 13 A diagram showing an encoding order of prediction blocks according to another example embodiment of the disclosure;
[0083] Figure 14 A diagram showing an encoding order of prediction blocks according to another example embodiment of the disclosure;
[0084] Figure 15 A diagram showing an encoding order of transform blocks in a prediction block according to another example embodiment of the disclosure;
[0085] Figure 16 A diagram showing an encoding order of transform blocks in a prediction block according to another example embodiment of the disclosure;
[0086] Figure 17 A diagram showing an encoding order of transform blocks in a prediction block according to another example embodiment of the disclosure;
[0087] Figure 18 A flowchart showing a decoding method according to another example embodiment of the disclosure;
[0088] Figure 19 A block diagram showing an encoding apparatus according to an example embodiment of the disclosure;
[0089] Figure 20A block diagram showing a decoding apparatus according to one example embodiment of the present disclosure;
[0090] Figure 21 A block diagram showing an encoding apparatus according to another example embodiment of the present disclosure;
[0091] Figure 22 A block diagram showing a decoding apparatus according to another example embodiment of the present disclosure;
[0092] Figure 23 A block diagram showing an encoding apparatus according to another example embodiment of the present disclosure;
[0093] Figure 24 A block diagram showing a decoding apparatus according to another example embodiment of the present disclosure; and
[0094] Figure 25 A schematic diagram showing a computing apparatus according to an example embodiment of the present disclosure. DETAILED DESCRIPTION
[0095] Reference will now be made in detail to the example embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout. The embodiments will be explained by referring to the drawings, in order to explain the present disclosure.
[0096] Figure 4 A flowchart showing an encoding method according to one example embodiment of the present disclosure. Figure 4 The encoding method in the method can be applied to an encoder using an intra prediction filtering (IPF) technique.
[0097] Referring to Figure 4 At step S401, the current coding block is intra-predicted based on the availability of reference pixels of the current coding block.
[0098] In the example embodiments of the present disclosure, when intra-predicting the current coding block, all the intra-prediction modes can be first traversed for the current coding block to obtain the prediction pixel values corresponding to each of the intra-prediction modes, and the prediction pixel values are intra-prediction filtered to obtain the final prediction pixel values corresponding to each of the intra-prediction modes, then the rate-distortion cost corresponding to each of the intra-prediction modes is calculated according to the final prediction pixel values, and thereafter, the intra-prediction mode with the lowest rate-distortion cost is taken as the intra-prediction mode of the current coding block according to the rate-distortion cost of each of the intra-prediction modes.
[0099] In the exemplary embodiments of the present disclosure, when performing intra prediction filtering on the predicted pixel value, when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, the intra prediction filtering is performed according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block; when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, the intra prediction filtering is performed according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the intra prediction filtering is performed according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both unavailable, the reference pixel value on the left side or the reference pixel value on the right side is padded, and the intra prediction filtering is performed according to the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, or the case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is unavailable.
[0100] In the exemplary embodiments of the present disclosure, when performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, when the intra prediction mode of the current coding block is not an angle prediction mode, the predicted pixel value on the upper side and the predicted pixel value on the right side of the current coding block are weighted with the reference pixel value on the upper side and the reference pixel value on the right side to obtain the final predicted pixel value; when the intra prediction mode of the current coding block is an angle prediction mode, the final predicted pixel value is calculated according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction.
[0101] In the exemplary embodiments of the present disclosure, when calculating the final predicted pixel value according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction, when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, the predicted pixel value on the upper side of the current coding block is weighted with the reference pixel value on the upper side to obtain the final predicted pixel value; when the included angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, the predicted pixel value on the right side of the current coding block is weighted with the reference pixel value on the right side to obtain the final predicted pixel value.
[0102] In exemplary embodiments of this disclosure, when performing intra-prediction filtering based on the intra-prediction mode of the current coding block, the reference pixel value to the left of the current coding block, and / or the reference pixel value to the right of the current coding block, intra-prediction filtering can be performed based on the intra-prediction mode of the current coding block and the reference pixel value to the left of the current coding block, or, intra-prediction filtering can be performed based on the intra-prediction mode of the current coding block and the reference pixel value to the right of the current coding block, or, intra-prediction filtering can be performed based on the intra-prediction mode of the current coding block, the reference pixel value to the left of the current coding block, and the reference pixel value to the right of the current coding block. Intra-prediction filtering can be performed using prime values, or the intra-prediction filtering mode with the lowest rate-distortion cost among the following intra-prediction modes can be selected: an intra-prediction filtering mode based on the intra-prediction mode of the current coding block and the reference pixel value to the left of the current coding block; an intra-prediction filtering mode based on the intra-prediction mode of the current coding block and the reference pixel value to the right of the current coding block; and an intra-prediction filtering mode based on the intra-prediction mode of the current coding block and the reference pixel values to the left and right of the current coding block.
[0103] In an exemplary embodiment of this disclosure, when performing intra-prediction filtering based on the intra-prediction mode of the current coding block, the reference pixel value to the left of the current coding block, and the reference pixel value to the right of the current coding block, if the intra-prediction mode of the current coding block is not the angle prediction mode, the predicted pixel value to the upper left of the current coding block can be weighted with the reference pixel value to the upper side and the reference pixel value to the left to obtain the final predicted pixel value to the upper left of the current coding block; the predicted pixel value to the left of the current coding block can be weighted with the reference pixel value to the upper side and the reference pixel value to the left to obtain the final predicted pixel value to the left of the current coding block; the predicted pixel value to the upper right of the current coding block can be weighted with the reference pixel value to the upper side and the reference pixel value to the right to obtain the final predicted pixel value to the right of the current coding block; and the predicted pixel value to the right of the current coding block can be weighted with the reference pixel value to the upper side and the reference pixel value to the right to obtain the final predicted pixel value to the right of the current coding block. When the intra-frame prediction mode of the current coding block is angle prediction mode, it can be confirmed whether the angle between the prediction direction of the current coding block and the horizontal or vertical direction is less than a preset angle. When the angle between the prediction direction of the current coding block and the horizontal direction is less than a third angle, the predicted pixel value on the upper side of the current coding block can be weighted with the reference pixel value on the upper side to obtain the final predicted pixel value on the upper side of the current coding block. When the angle between the prediction direction of the current coding block and the vertical direction is less than a fourth angle, the predicted pixel value on the left side of the current coding block can be weighted with the reference pixel value on the left side to obtain the final predicted pixel value on the left side of the current coding block, and the predicted pixel value on the right side of the current coding block can be weighted with the reference pixel value on the right side to obtain the final predicted pixel value on the right side of the current coding block. It should be understood that the first to fourth angles can be the same or different.
[0104] In the exemplary embodiments of the present disclosure, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for the intra prediction further includes information about the intra filtering mode of the current coding block.
[0105] Specifically, the encoder, when performing the intra prediction on the current coding block, can first traverse all the intra prediction modes on the current coding block to obtain the corresponding prediction pixel values, and perform the intra prediction filtering on the prediction pixel values to obtain the final prediction pixel values. Then, the encoder calculates the rate-distortion cost corresponding to each intra prediction mode according to the final prediction pixel values, and selects the intra prediction mode with the lowest rate-distortion cost according to the rate-distortion cost of each intra prediction mode.
[0106] For example, Figure 1 A schematic diagram showing that the reference pixel on the upper side and the reference pixel on the left side of the current coding block are available in the IPF technology is shown in FIG. 2. Figure 1 As shown in FIG. 2, when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available, filtering is performed according to the intra prediction mode (PredMode) of the current coding block. When the intra prediction mode of the current coding block is not an angular prediction mode (for example, the prediction mode is a direct current mode (DC), a planar mode (Planar), a bilinear interpolation mode (Bilinear), etc.), the prediction pixel value close to the upper side of the current coding block is weighted with the corresponding reference pixel value on the upper side and the corresponding reference pixel value on the left side to obtain the final prediction pixel value close to the upper side of the current coding block, and the prediction pixel value close to the left side of the current coding block is weighted with the corresponding reference pixel value on the upper side and the corresponding reference pixel value on the left side to obtain the final prediction pixel value close to the left side of the current coding block. When the intra prediction mode of the current coding block is an angular prediction mode, and the prediction direction of the current coding block is less than 45° with the horizontal direction, the prediction pixel value close to the upper side of the current coding block is weighted with the corresponding reference pixel value on the upper side to obtain the final prediction pixel value close to the upper side of the current coding block. When the intra prediction mode of the current coding block is an angular prediction mode, and the prediction direction of the current coding block is less than 45° with the vertical direction, the prediction pixel value close to the left side of the current coding block is weighted with the corresponding reference pixel value on the left side to obtain the final prediction pixel value close to the left side of the current coding block.
[0107] For example, Figure 5 A schematic diagram showing that the reference pixel on the upper side and the reference pixel on the right side of the current coding block are available according to the exemplary embodiments of the present disclosure is shown in FIG. 3. Figure 5As shown, when the pixel value on the left side of the current coding block is not available and the pixel value on the right side is available, then filtering is performed according to the intra prediction mode of the current coding block. Specifically, when the intra prediction mode of the current coding block is not an angular prediction mode (for example, the prediction mode is DC, Planar, Bilinear, etc.), the predicted pixel value close to the top side of the current coding block is weighted with the corresponding top side reference pixel value and the corresponding right side reference pixel value to obtain the final predicted pixel value close to the top side of the current coding block, and the predicted pixel value close to the right side of the current coding block is weighted with the corresponding top side reference pixel value and the corresponding right side reference pixel value to obtain the final predicted pixel value close to the right side of the current coding block. When the intra prediction mode of the current coding block is an angular prediction mode, and the included angle between the prediction direction of the current coding block and the horizontal direction is less than 45°, the predicted pixel value close to the top side of the current coding block is weighted with the corresponding top side reference pixel value to obtain the final predicted pixel value close to the top side of the current coding block. When the intra prediction mode of the current coding block is an angular prediction mode, and the included angle between the prediction direction of the current coding block and the vertical direction is less than 45°, the predicted pixel value close to the right side of the current coding block is weighted with the corresponding right side reference pixel value to obtain the final predicted pixel value close to the right side of the current coding block.
[0108] In addition, when the reference pixel value on the left side of the current coding block is not available and the reference pixel value on the right side is not available, one possible implementation method is to fill the reference pixel value on the left side, and then perform intra filtering in the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available; one possible implementation method is to fill the reference pixel value on the right side, and then perform intra filtering in the case that the reference pixel value on the left side of the current coding block is not available and the reference pixel value on the right side is available.
[0109] In addition, when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is available, one possible method is to perform intra filtering in the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available. Another possible method is to perform intra filtering in the case that the reference pixel value on the left side of the current coding block is not available and the reference pixel value on the right side is available. Another possible method is, for example, Figure 6 A schematic diagram showing that the reference pixel on the top side, the reference pixel on the left side and the reference pixel on the right side of the current coding block are available according to an exemplary embodiment of the present disclosure. As shown in FIG. 6, the reference pixel on the top side of the current coding block is available, the reference pixel on the left side of the current coding block is available, and the reference pixel on the right side of the current coding block is available. Figure 6As shown, when the intra prediction mode of the current coding block is not an angular prediction mode (for example, the prediction mode is DC, Planar, Bilinear, or the like), the prediction pixel value close to the top-left side of the current coding block is weighted with the corresponding reference pixel value of the top side and the corresponding reference pixel value of the left side to obtain the final prediction pixel value close to the top-left side of the current coding block, the prediction pixel value close to the left side of the current coding block is weighted with the corresponding reference pixel value of the top side and the corresponding reference pixel value of the left side to obtain the final prediction pixel value close to the left side of the current coding block, the prediction pixel value close to the top-right side of the current coding block is weighted with the corresponding reference pixel value of the top side and the corresponding reference pixel value of the right side to obtain the final prediction pixel value close to the top-right side of the current coding block, and the prediction pixel value close to the right side of the current coding block is weighted with the corresponding reference pixel value of the top side and the corresponding reference pixel value of the right side to obtain the final prediction pixel value close to the right side of the current coding block. When the intra prediction mode of the current coding block is an angular prediction mode, and the included angle between the prediction direction of the current coding block and the horizontal direction is less than 45°, the prediction pixel value close to the top side of the current coding block is weighted with the corresponding reference pixel value of the top side to obtain the final prediction pixel value close to the top side of the current coding block. When the intra prediction mode of the current coding block is an angular prediction mode, and the included angle between the prediction direction of the current coding block and the vertical direction is less than 45°, the prediction pixel value close to the left side of the current coding block is weighted with the corresponding reference pixel value of the left side to obtain the final prediction pixel value close to the left side of the current coding block, and the prediction pixel value close to the right side of the current coding block is weighted with the corresponding reference pixel value of the right side to obtain the final prediction pixel value close to the right side of the current coding block. One possible method is to traverse the intra filtering modes in the above three methods, and select the intra filtering mode with the lowest rate-distortion cost for intra filtering. When the intra filtering mode with the lowest rate-distortion cost is selected for intra filtering, information about the selected intra filtering mode needs to be written into the bitstream. Here, the information about the intra filtering mode can be a filtering mode index value, which is not limited herein.
[0110] In step S402, information for intra prediction is written into the bitstream, wherein the information for intra prediction at least includes information about the intra prediction mode of the current coding block.
[0111] Specifically, when the information for intra prediction is written into the bitstream, one possible method is to write the intra prediction mode into the bitstream according to the prior art, and another possible method is to first write the intra prediction mode into the bitstream according to the prior art, and then write the filtering mode information into the bitstream when the reference pixel value of the left side and the reference pixel value of the right side of the current coding block are both available.
[0112] Figure 7 A flowchart of a decoding method according to one example embodiment of the present disclosure is shown.Figure 7 The decoding method in the method can be applied to a decoder using an intra prediction filtering (IPF) technology.
[0113] With reference to Figure 7 In step S701, information for intra prediction is parsed from the bitstream, the information for intra prediction at least including information about an intra prediction mode of the current coding block.
[0114] In an exemplary embodiment of the present disclosure, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for intra prediction further includes information about an intra filtering mode of the current coding block.
[0115] Specifically, when the information for intra prediction is parsed from the bitstream, one possible method is to parse the intra prediction mode from the bitstream according to the prior art; another possible method is to first parse the intra prediction mode from the bitstream according to the prior art, obtain the current coding reference pixel information, and then parse the filtering mode information when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available.
[0116] In step S702, based on the availability of the reference pixels of the current coding block, the predicted pixel value of the current coding block is calculated according to the parsed information for intra prediction.
[0117] In an exemplary embodiment of the present disclosure, when the predicted pixel value of the current coding block is calculated, when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, intra prediction filtering can be performed according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block; when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, intra prediction filtering is performed according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, intra prediction filtering is performed according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both unavailable, the reference pixel value on the left side or the reference pixel value on the right side is padded, and intra prediction filtering is performed according to the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, or the case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is unavailable.
[0118] In the exemplary embodiments of the present disclosure, when performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel values on the right side of the current coding block, when the intra prediction mode of the current coding block is not an angular prediction mode, the final prediction pixel value on the top side of the current coding block can be obtained by weighting the prediction pixel value on the top side of the current coding block and the reference pixel value on the top side and the reference pixel value on the right side, and the final prediction pixel value on the right side of the current coding block can be obtained by weighting the prediction pixel value on the right side of the current coding block and the reference pixel value on the top side and the reference pixel value on the right side; when the intra prediction mode of the current coding block is an angular prediction mode, the final prediction pixel value can be calculated according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction.
[0119] In the exemplary embodiments of the present disclosure, when calculating the final prediction pixel value according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction, when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, the final prediction pixel value on the top side of the current coding block can be obtained by weighting the prediction pixel value on the top side of the current coding block and the reference pixel value on the top side; and when the included angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, the final prediction pixel value on the right side of the current coding block can be obtained by weighting the prediction pixel value on the right side of the current coding block and the reference pixel value on the right side.
[0120] In the exemplary embodiments of the present disclosure, when performing intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block, the intra prediction filtering can be performed according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, or the intra prediction filtering can be performed according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, or the intra prediction filtering can be performed according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block, or the intra prediction filtering can be performed according to the parsed intra filtering mode.
[0121] In the exemplary embodiments of the present disclosure, when performing intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block, the final prediction pixel value on the upper left side of the current coding block can be obtained by weighting the prediction pixel value on the upper left side of the current coding block, the reference pixel value on the left side and the reference pixel value on the upper side, the final prediction pixel value on the left side of the current coding block can be obtained by weighting the prediction pixel value on the left side of the current coding block, the reference pixel value on the left side and the reference pixel value on the upper side, the final prediction pixel value on the upper right side of the current coding block can be obtained by weighting the prediction pixel value on the upper right side of the current coding block, the reference pixel value on the upper side and the reference pixel value on the right side, and the final prediction pixel value on the right side of the current coding block can be obtained by weighting the prediction pixel value on the right side of the current coding block, the reference pixel value on the upper side and the reference pixel value on the right side; when the intra prediction mode of the current coding block is an angular prediction mode, it is determined whether the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle; when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a third angle, the final prediction pixel value on the upper side of the current coding block can be obtained by weighting the prediction pixel value on the upper side of the current coding block and the reference pixel value on the upper side; when the included angle between the prediction direction of the current coding block and the vertical direction is less than a fourth angle, the final prediction pixel value on the left side of the current coding block can be obtained by weighting the prediction pixel value on the left side of the current coding block and the reference pixel value on the left side, and the final prediction pixel value on the right side of the current coding block can be obtained by weighting the prediction pixel value on the right side of the current coding block and the reference pixel value on the right side.
[0122] Specifically, when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is unavailable, the decoder filters according to the intra prediction mode of the current coding block. That is, when the intra prediction mode of the current coding block is not an angular prediction mode (for example, the prediction mode is DC, Planar, Bilinear, etc.), the prediction pixel value close to the top side of the current coding block is weighted with the corresponding reference pixel value on the top side and the corresponding reference pixel value on the left side to obtain the final prediction pixel value close to the top side of the current coding block, and the prediction pixel value close to the left side of the current coding block is weighted with the corresponding reference pixel value on the top side and the corresponding reference pixel value on the left side to obtain the final prediction pixel value close to the left side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, and the included angle between the prediction direction of the current coding block and the horizontal direction is less than 45°, the prediction pixel value close to the top side of the current coding block is weighted with the corresponding reference pixel value on the top side to obtain the final prediction pixel value close to the top side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, and the included angle between the prediction direction of the current coding block and the vertical direction is less than 45°, the prediction pixel value close to the left side of the current coding block is weighted with the corresponding reference pixel value on the left side to obtain the final prediction pixel value close to the left side of the current coding block.
[0123] In addition, when the reference pixel value on the left side of the current coding block is unavailable and the reference pixel value on the right side is available, the decoder filters according to the intra prediction mode of the current coding block. Specifically, when the intra prediction mode of the current coding block is not an angular prediction mode (for example, the prediction mode is DC, Planar, Bilinear, etc.), the prediction pixel value close to the top side of the current coding block is weighted with the corresponding reference pixel value on the top side and the corresponding reference pixel value on the right side to obtain the final prediction pixel value close to the top side of the current coding block, and the prediction pixel value close to the right side of the current coding block is weighted with the corresponding reference pixel value on the top side and the corresponding reference pixel value on the right side to obtain the final prediction pixel value close to the right side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, and the included angle between the prediction direction of the current coding block and the horizontal direction is less than 45°, the prediction pixel value close to the top side of the current coding block is weighted with the corresponding reference pixel value on the top side to obtain the final prediction pixel value close to the top side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, and the included angle between the prediction direction of the current coding block and the vertical direction is less than 45°, the prediction pixel value close to the right side of the current coding block is weighted with the corresponding reference pixel value on the right side to obtain the final prediction pixel value close to the right side of the current coding block.
[0124] Furthermore, when the reference pixel values on both the left and right sides of the current coding block are unavailable, one possible implementation is to pad the reference pixel values on the left side, and then perform intra-frame filtering with the reference pixel values on the left side of the current coding block being available but those on the right side being unavailable. Another possible implementation is to pad the reference pixel values on the right side, and then perform intra-frame filtering with the reference pixel values on the left side of the current coding block being unavailable but those on the right side being available.
[0125] Furthermore, when both the left and right reference pixel values of the current coding block are available, one possible approach is to perform intra-frame filtering if the left reference pixel values are available but the right reference pixel values are not. Another possible approach is to perform intra-frame filtering if the left reference pixel values are unavailable but the right reference pixel values are available. Yet another possible approach is... Figure 6 As shown, when the intra-frame prediction mode of the current coding block is not the angle prediction mode (for example, when the prediction mode is DC, Planar, Bilinear, etc.), the predicted pixel value near the upper left of the current coding block is weighted with the corresponding upper reference pixel value and the corresponding left reference pixel value to obtain the final predicted pixel value near the upper left of the current coding block; the predicted pixel value near the left of the current coding block is weighted with the corresponding upper reference pixel value and the corresponding left reference pixel value to obtain the final predicted pixel value near the left side of the current coding block; the predicted pixel value near the upper right of the current coding block is weighted with the corresponding upper reference pixel value and the corresponding right reference pixel value to obtain the final predicted pixel value near the upper right of the current coding block; and the predicted pixel value near the right of the current coding block is weighted with the corresponding upper reference pixel value and the corresponding left reference pixel value to obtain the final predicted pixel value near the upper right of the current coding block. The corresponding reference pixel values on the right are weighted to obtain the final predicted pixel value closest to the right side of the current coding block. When the intra-frame prediction mode of the current coding block is angle prediction mode, and the angle between the prediction direction of the current coding block and the horizontal direction is less than 45°, the predicted pixel values closest to the top of the current coding block are weighted with the corresponding reference pixel values on the top side to obtain the final predicted pixel value closest to the top of the current coding block. When the intra-frame prediction mode of the current coding block is angle prediction mode, and the angle between the prediction direction of the current coding block and the vertical direction is less than 45°, the predicted pixel values closest to the left side of the current coding block are weighted with the corresponding reference pixel values on the left side to obtain the final predicted pixel value closest to the left side of the current coding block, and the predicted pixel values closest to the right side of the current coding block are weighted with the corresponding reference pixel values on the right side to obtain the final predicted pixel value closest to the right side of the current coding block. Another possible method is to perform intra-frame filtering on the current coding block according to the filtering mode information obtained in step S702 to obtain the final predicted pixel value.
[0126] At step S703, the image is reconstructed according to the predicted pixel values to obtain a decoded image.
[0127] Specifically, the decoder can reconstruct the image according to the final predicted pixel values to obtain a final decoded image.
[0128] Figure 8 A flow chart of an encoding method according to another example embodiment of the present disclosure is shown. Figure 8 The encoding method in the above embodiment can be applied to an encoder using the technique of intra cross-component prediction (TSCPM).
[0129] With reference to Figure 8 At step S801, reference samples for constructing a linear model are determined based on the availability of reference pixels of a current coding block, and the linear model is constructed according to the determined reference samples.
[0130] In the example embodiments of the present disclosure, when determining the reference samples for constructing the linear model, two reference samples can be selected from the reference pixels on the left and the reference pixels on the top, respectively, when the reference pixel values on the left of the current coding block are available and the reference pixel values on the right are not available; the two reference samples can be selected from the reference pixels on the top and the reference pixels on the right, respectively, when the reference pixel values on the left of the current coding block are not available and the reference pixel values on the right are available; when the reference pixel values on the left and the reference pixel values on the right of the current coding block are both available, the reference samples can be obtained according to the case that the reference pixel values on the left of the current coding block are available and the reference pixel values on the right are not available, or the reference samples can be obtained according to the case that the reference pixel values on the right of the current coding block are available and the reference pixel values on the left are not available, or the reference samples can be obtained according to the case that the rate-distortion cost is smaller according to the rate-distortion cost in the above two cases.
[0131] In the example embodiments of the present disclosure, when the reference pixel values on the left and the reference pixel values on the right of the current coding block are both available, the information for intra prediction can further include reference sample construction information.
[0132] Specifically, for example, Figure 2 A schematic diagram showing the selection of two reference samples from the reference pixels on the left and the reference pixels on the top of a current block in the TSCPM technique is shown as follows, Figure 2As shown, when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available, two reference samples (including chroma component and luma component) are selected from the reference pixel on the upper side and the reference pixel on the left side, respectively. The first position of the reference pixel on the upper side is 2, i.e., the second reference sample of the reference pixel on the upper side. The first position of the reference pixel on the left side is 2, i.e., the second reference sample of the reference pixel on the left side. When the width of the current coding block is greater than or equal to the height, the second position of the reference pixel on the upper side is width-width / height+2, and the second position of the reference pixel on the left side is height, otherwise, the second position of the reference pixel on the upper side is width, and the second position of the reference pixel on the left side is height-height / width+2.
[0133] For example, Figure 9 A schematic diagram of reference samples in the TSCPM technique according to an exemplary embodiment of the present disclosure is shown as follows: Figure 9 As shown, when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available, two reference samples (including chroma component and luma component) are selected from the reference pixel on the upper side and the reference pixel on the left side, respectively. The first position of the reference pixel on the upper side is 2, i.e., the second reference sample of the reference pixel on the upper side. The first position of the reference pixel on the left side is 2, i.e., the second reference sample of the reference pixel on the left side. When the width of the current coding block is greater than or equal to the height, the second position of the reference pixel on the upper side is width-width / height+2, and the second position of the reference pixel on the left side is height, otherwise, the second position of the reference pixel on the upper side is width, and the second position of the reference pixel on the left side is height-height / width+2.
[0134] In addition, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, a possible method is to obtain the reference samples according to the case that the reference pixel value on the left side is available and the reference pixel value on the right side is not available. Another possible method is to obtain the reference samples according to the case that the reference pixel value on the right side is available and the reference pixel value on the left side is not available. Another possible method is to traverse the two cases that the reference pixel value on the left side is available and the reference pixel value on the right side is not available, and the reference pixel value on the left side is not available and the reference pixel value on the right side is available, to select the case with smaller rate-distortion cost as the optimal case according to the rate-distortion cost, and write the reference sample construction information of the case into the code stream.
[0135] Further, after the reference samples for constructing the linear model are determined, the four reference samples can be classified into two categories according to the prior art, and a and b in the linear model predChroma=a x recLuma+b are calculated, where predChroma is the predicted pixel value of the chroma component, and recLuma is the reconstructed value of the luma component.
[0136] At step S802, the predicted pixel value of the chroma component of the current coding block is calculated according to the constructed linear model, and the intra prediction mode of the current coding block is determined.
[0137] At step S803, the information for intra prediction is written into the bitstream. Here, the information for intra prediction at least includes information about whether the intra prediction mode of the current coding block is the TSCPM mode.
[0138] Specifically, when the information for intra prediction is written into the bitstream, one possible method is to write the identification of whether it is the TSCPM mode into the bitstream. Another possible method is to write the identification of whether it is the TSCPM mode into the bitstream, and when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the reference sample construction information is written into the bitstream.
[0139] Figure 10 A flow chart of a decoding method according to another example embodiment of the present disclosure is shown. Figure 10 The decoding method in the present disclosure can be applied to a decoder using the intra cross-component prediction technology (TSCPM).
[0140] Reference is made to Figure 10 At step S1001, the information for intra prediction is parsed from the bitstream. Here, the information for intra prediction at least includes information about whether the intra prediction mode of the current coding block is the TSCPM mode.
[0141] In the example embodiments of the present disclosure, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for intra prediction can further include the reference sample construction information.
[0142] Specifically, when the information for intra prediction is parsed from the bitstream, one possible method is to parse the prediction mode from the bitstream, and if the identification is the TSCPM mode, the chroma component is predicted using the TSCPM, otherwise, the intra prediction is performed according to the prior art. Another possible method is to parse the prediction mode from the bitstream, and if the identification is the TSCPM mode, the chroma component is predicted using the TSCPM, otherwise, the intra prediction is performed according to the prior art. If the chroma component is predicted using the TSCPM, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the reference sample construction information is further parsed from the bitstream.
[0143] At step S1002, reference samples for constructing the linear model are determined based on the availability of the reference pixels of the current coding block, and the linear model is constructed according to the determined reference samples.
[0144] In the example embodiments of the present disclosure, when determining the reference samples for constructing the linear model, two reference samples can be selected from the reference pixels on the upper side and the left side, respectively, when the reference pixel values on the left side of the current coding block are available and the reference pixel values on the right side are not available; the two reference samples can be selected from the reference pixels on the upper side and the right side, respectively, when the reference pixel values on the left side of the current coding block are not available and the reference pixel values on the right side are available; when the reference pixel values on the left side and the right side of the current coding block are both available, the reference samples can be obtained according to the case that the reference pixel values on the left side of the current coding block are available and the reference pixel values on the right side are not available, or the case that the reference pixel values on the right side of the current coding block are available and the reference pixel values on the left side are not available, or the reference samples can be obtained according to the parsed reference sample construction information.
[0145] Specifically, when the reference pixel values on the left side of the current coding block are available and the reference pixel values on the right side are not available, two reference samples (including chroma components and luma components) are selected from the reference pixels on the upper side and the left side, respectively. The first position of the reference pixels on the upper side is 2, i.e., the second reference sample of the reference pixels on the upper side; the first position of the reference pixels on the left side is 2, i.e., the second reference sample of the reference pixels on the left side; when the width of the coding block is greater than or equal to the height, the second position of the reference pixels on the upper side is width–width / height+2, and the second position of the reference pixels on the left side is height, otherwise, the second position of the reference pixels on the upper side is width, and the second position of the reference pixels on the left side is height–height / width+2.
[0146] In addition, when the left side pixel value of the current coding block is not available and the right side pixel value is available, two reference samples (including chroma component and luma component) are selected from the reference pixel on the upper side and the reference pixel on the right side, respectively. The first position of the reference pixel on the upper side is width-1; the first position of the reference pixel on the right side is 2, i.e. the second reference sample of the reference pixel on the left side; when the length of the coding block is greater than or equal to the height, the second position of the reference pixel on the upper side is width / height-2, and the second position of the reference pixel on the left side is height, otherwise, the second position of the reference pixel on the upper side is 1, i.e. the first reference sample of the reference pixel on the upper side, and the second position of the reference pixel on the right side is height-height / width+2.
[0147] In addition, when the left side reference pixel value of the current coding block is available and the right side reference pixel value is available, a possible method is to obtain the reference sample according to the case that the left side reference pixel value of the current coding block is available and the right side reference pixel value is not available. Another possible method is to obtain the reference sample according to the case that the right side reference pixel value of the current coding block is available and the left side reference pixel value is not available. Another possible method is to obtain the reference sample according to the case that the left side reference pixel value and the right side reference pixel value of the current coding block are both available and the case that the left side reference pixel value and the right side reference pixel value of the current coding block are both not available, according to the parsing of the reference sample construction information in the code stream, i.e. which side of the reference pixel is used.
[0148] In addition, after the reference sample used for constructing the linear model is determined, the above-mentioned four reference samples are divided into two categories according to the prior art, and a and b in the linear model predChroma=a×recLuma+b are calculated, where predChroma is the predicted pixel value of the chroma component, and recLuma is the reconstructed value of the luma component.
[0149] In step S1003, the predicted pixel value of the chroma component of the current coding block is calculated according to the constructed linear model.
[0150] In step S1004, the chroma component of the current coding block is reconstructed according to the predicted pixel value of the chroma component of the current coding block, to obtain a decoded image.
[0151] Figure 11 A flow chart of an encoding method according to another example embodiment of the present disclosure is shown. Figure 11 The encoding method in the above-mentioned embodiments can be applied to an encoder using the extended tree technology (DT).
[0152] Reference is made to Figure 11At step S1101, the encoding order of the prediction block in the current encoding block is determined based on the block partition mode and the availability of the reference pixels of the current encoding block.
[0153] In an example embodiment of the present disclosure, when the partition mode of the block is vertical partition, in determining the encoding order of the prediction block in the current encoding block, when the reference pixel value on the left side of the current encoding block is available and the reference pixel value on the right side is unavailable, the encoding order of the prediction block is from left to right; when the reference pixel value on the left side of the current encoding block is unavailable and the reference pixel value on the right side is available, the encoding order of the prediction block is from right to left; when the reference pixel value on the left side and the reference pixel value on the right side of the current encoding block are both unavailable, the encoding order of the prediction block is from left to right; when the reference pixel value on the left side and the reference pixel value on the right side of the current encoding block are both available, the encoding order of the prediction block is one of the following encoding orders: the encoding order from left to right, the encoding order from right to left, the encoding order with smaller rate-distortion cost from left to right and from right to left.
[0154] Specifically, Figure 12 A schematic diagram of the encoding order of the prediction block according to one example embodiment of the present disclosure is shown. As shown in Figure 12 When the reference pixel value on the left side of the current encoding block is available and the reference pixel value on the right side is unavailable, when the current encoding block is vertically partitioned, the prediction block is encoded in the order from left to right. Figure 13 A schematic diagram of the encoding order of the prediction block according to another example embodiment of the present disclosure is shown. As shown in Figure 13 When the reference pixel value on the left side of the current encoding block is unavailable and the reference pixel value on the right side is available, when the current encoding block is vertically partitioned, the prediction block is encoded in the order from right to left. Figure 14 A schematic diagram of the encoding order of the prediction block according to another example embodiment of the present disclosure is shown. As shown in Figure 14 When the reference pixel value on the left side and the reference pixel value on the right side of the current encoding block are both unavailable, when the current encoding block is vertically partitioned, the prediction block is encoded in the order from left to right.
[0155] In addition, when the reference pixel value on the left side and the reference pixel value on the right side of the current encoding block are both available, one possible implementation method is that when the current encoding block is vertically partitioned, the prediction block is encoded in the order from left to right. Another possible implementation method is that when the current encoding block is vertically partitioned, the prediction block is encoded in the order from right to left. Another possible implementation method is to compare the rate-distortion costs of the two orders from left to right and from right to left, select the prediction block encoding order with the smallest rate-distortion cost, and determine the identification of the prediction block encoding order corresponding to the prediction block encoding order.
[0156] At step S1102, the coding order of the transform blocks in each prediction block of the current coding block is determined based on the partition mode of the current coding block and the availability of the reference pixels of the current coding block.
[0157] In an exemplary embodiment of the present disclosure, when the partition mode of the block is vertical partition, in determining the coding order of the transform blocks in the prediction block, the coding order of the transform blocks in the prediction block can be left-to-right when the reference pixel value on the left of the current prediction block is available and the reference pixel value on the right is unavailable; the coding order of the transform blocks in the prediction block can be right-to-left when the reference pixel value on the left of the current prediction block is unavailable and the reference pixel value on the right is available; the coding order of the transform blocks in the prediction block can be left-to-right when the reference pixel value on the left and the reference pixel value on the right of the current prediction block are both unavailable; and the coding order of the transform blocks in the prediction block can be one of the following coding orders: left-to-right coding order, right-to-left coding order, and the coding order with smaller rate-distortion cost among left-to-right and right-to-left, when the reference pixel value on the left and the reference pixel value on the right of the current prediction block are both available.
[0158] Specifically, Figure 15 A schematic diagram showing the coding order of the transform blocks in a prediction block according to another exemplary embodiment of the present disclosure is shown. As shown in Figure 15 When the reference pixel value on the left of the current prediction block is available and the reference pixel value on the right is unavailable, the transform blocks are coded in left-to-right order when the current prediction block is vertically partitioned. Figure 16 A schematic diagram showing the coding order of the transform blocks in a prediction block according to another exemplary embodiment of the present disclosure is shown. As shown in Figure 16 When the reference pixel value on the left of the current prediction block is unavailable and the reference pixel value on the right is available, the transform blocks are coded in right-to-left order when the current prediction block is vertically partitioned. Figure 17 A schematic diagram showing the coding order of the transform blocks in a prediction block according to another exemplary embodiment of the present disclosure is shown. As shown in Figure 17 When the reference pixel value on the left of the current prediction block is unavailable and the reference pixel value on the right is available, the transform blocks are coded in right-to-left order when the current prediction block is vertically partitioned.
[0159] In addition, when the reference pixel value on the left side and the reference pixel value on the right side of the current prediction block are both available, a possible implementation method is that, when the current prediction block is vertically divided, the transform block is encoded in a left-to-right order. Another possible implementation method is that, when the current prediction block is vertically divided, the transform block is encoded in a right-to-left order. Another possible implementation method is that, the left-to-right encoding and the right-to-left encoding of the transform block are both traversed, and the encoding order with the lowest rate-distortion cost is selected, and the identifier of the encoding order of the transform block corresponding to the encoding order of the transform block is determined.
[0160] At step S1103, the extended tree DT mode information is written into the bitstream based on the determined encoding order of the prediction block in the current coding block and the encoding order of the transform block in the prediction block, wherein the DT mode information at least includes information about the partition mode of the block in the current coding block.
[0161] In the example embodiment of the present disclosure, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the DT mode information can further include information about the encoding order of the prediction block in the current coding block and / or information about the encoding order of the transform block in each prediction block of the current coding block.
[0162] Specifically, when the extended tree DT mode information is written into the bitstream, a possible implementation method is that the partition mode adopted by the DT is written into the bitstream. Another possible implementation method is that the partition mode adopted by the DT is written into the bitstream, the identifier of the encoding order of the prediction block is written into the bitstream when the reference pixel on the left side and the reference pixel on the right side of the prediction block are both available, and the identifier of the encoding order of the transform block in the prediction block is written into the bitstream when the reference pixel on the left side and the reference pixel on the right side of the transform block are both available.
[0163] Figure 18 A flowchart of a decoding method according to another example embodiment of the present disclosure is shown. Figure 18 The decoding method in the present disclosure can be applied to a decoder using the extended tree technology (DT).
[0164] Reference is made to Figure 18 At step S1801, the DT mode information is parsed from the bitstream, wherein the DT mode information at least includes information about the partition mode of the block in the current coding block.
[0165] In the example embodiment of the present disclosure, the DT mode information can further include information about the decoding order of the prediction block in the current coding block and / or information about the decoding order of the transform block in each prediction block of the current coding block.
[0166] Specifically, when parsing the DT mode information from the bitstream, one possible implementation method is to parse the partition mode used by the DT from the bitstream; another possible implementation method is to parse the partition mode used by the DT from the bitstream, and parse the decoding order identifier of the prediction block from the bitstream when both the reference pixels on the left and the reference pixels on the right of the prediction block are available, and parse the decoding order identifier of the transform block in the prediction block from the bitstream when both the reference pixels on the left and the reference pixels on the right of the transform block are available.
[0167] At step S1802, the decoding order of the prediction block in the current coding block is determined based on the partition mode of the block and the availability of the reference pixels of the current coding block.
[0168] In the example embodiments of the present disclosure, when the partition mode of the block is vertical partition, when determining the decoding order of the prediction block in the current coding block, the decoding order of the prediction block can be left-to-right when the reference pixel value on the left of the current coding block is available and the reference pixel value on the right is unavailable, right-to-left when the reference pixel value on the left of the current coding block is unavailable and the reference pixel value on the right is available, left-to-right when both the reference pixel value on the left and the reference pixel value on the right of the current coding block are unavailable, and one of the following decoding orders when both the reference pixel value on the left and the reference pixel value on the right of the current coding block are available: left-to-right decoding order, right-to-left decoding order, and the decoding order of the prediction block determined according to the information about the decoding order of the prediction block.
[0169] Specifically, when the reference pixel value on the left of the current coding block is available and the reference pixel value on the right is unavailable, the prediction block is in left-to-right decoding order when the current coding block is vertically partitioned. When the reference pixel value on the left of the current coding block is unavailable and the reference pixel value on the right is available, the prediction block is in right-to-left decoding order when the current coding block is vertically partitioned. When both the reference pixel value on the left and the reference pixel value on the right of the current coding block are unavailable, the prediction block is in left-to-right decoding order when the current coding block is vertically partitioned. When both the reference pixel value on the left and the reference pixel value on the right of the current coding block are available, one possible implementation method is that the prediction block is in left-to-right decoding order when the current coding block is vertically partitioned. Another possible implementation method is that the prediction block is in right-to-left decoding order when the current coding block is vertically partitioned. Another possible implementation method is to select the left-to-right or right-to-left decoding order according to the prediction block decoding order identifier.
[0170] At step S1803, the decoding order of the transform blocks in the prediction block is determined based on the block-based partition mode and the availability of the reference pixels of the current coding block.
[0171] In the example embodiments of the present disclosure, when the partition mode of the block is vertical partition, in determining the decoding order of the transform blocks in the prediction block, the decoding order of the transform blocks in the prediction block can be left-to-right when the reference pixel values on the left of the current prediction block are available and the reference pixel values on the right are not available; the decoding order of the transform blocks in the prediction block can be right-to-left when the reference pixel values on the left of the current prediction block are not available and the reference pixel values on the right are available; the decoding order of the transform blocks in the prediction block can be left-to-right when the reference pixel values on the left and on the right of the current prediction block are not available; and the decoding order of the transform blocks in the prediction block can be one of the following decoding orders when the reference pixel values on the left and on the right of the current prediction block are available: left-to-right decoding order, right-to-left decoding order, decoding order of the transform blocks in the prediction block determined according to the information about the decoding order of the transform blocks in the prediction block.
[0172] Specifically, when the reference pixel values on the left of the current prediction block are available and the reference pixel values on the right are not available, the transform blocks are decoded in left-to-right order when the current prediction block is vertically partitioned. When the reference pixel values on the left of the current prediction block are not available and the reference pixel values on the right are available, the transform blocks are decoded in right-to-left order when the current prediction block is vertically partitioned. When the reference pixel values on the left and on the right of the current prediction block are not available, the transform blocks are decoded in left-to-right order when the current prediction block is vertically partitioned. When the reference pixel values on the left and on the right of the current prediction block are available, one possible implementation is that the transform blocks are decoded in left-to-right order when the current prediction block is vertically partitioned. Another possible implementation is that the transform blocks are decoded in right-to-left order when the current prediction block is vertically partitioned; and another possible implementation is that the left-to-right or right-to-left decoding order is selected according to the transform block decoding order identifier.
[0173] At step S1804, the decoding is performed according to the determined decoding order of the prediction blocks in the current coding block and the determined decoding order of the transform blocks in the prediction block.
[0174] The above has been described in combination with Figures 1 to 18 The coding and decoding method according to the example embodiments of the present disclosure is described. In the following, the coding and decoding apparatus and units thereof according to the example embodiments of the present disclosure will be described with reference to Figures 19 to 24 The coding and decoding apparatus and units thereof according to the example embodiments of the present disclosure are described.
[0175] Figure 19A block diagram of an encoding apparatus according to one example embodiment of the present disclosure is shown.
[0176] Referring to Figure 19 The encoding apparatus includes an intra prediction unit 191 and an information writing unit 192.
[0177] The intra prediction unit 191 is configured to perform intra prediction on the current coding block based on the availability of reference pixels of the current coding block.
[0178] In an example embodiment of the present disclosure, the intra prediction unit 191 can be configured to: iterate through all intra prediction modes for the current coding block, obtain prediction pixel values corresponding to each intra prediction mode, and perform intra prediction filtering on the prediction pixel values to obtain final prediction pixel values corresponding to each intra prediction mode; calculate rate-distortion costs corresponding to each intra prediction mode according to the final prediction pixel values; and select an intra prediction mode with the lowest rate-distortion cost as the intra prediction mode of the current coding block according to the rate-distortion costs of each intra prediction mode.
[0179] In an example embodiment of the present disclosure, the intra prediction unit 191 can be further configured to: when reference pixel values on the left side of the current coding block are available and reference pixel values on the right side are unavailable, perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel values on the left side of the current coding block; when reference pixel values on the left side of the current coding block are unavailable and reference pixel values on the right side are available, perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel values on the right side of the current coding block; when reference pixel values on the left side and the right side of the current coding block are both available, perform intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel values on the left side of the current coding block, and / or the reference pixel values on the right side of the current coding block; and when reference pixel values on the left side and the right side of the current coding block are both unavailable, perform padding on the reference pixel values on the left side or the right side and perform intra prediction filtering according to the case that the reference pixel values on the left side of the current coding block are available and the reference pixel values on the right side are unavailable, or the case that the reference pixel values on the right side of the current coding block are available and the reference pixel values on the left side are unavailable.
[0180] In an example embodiment of the present disclosure, the intra prediction unit 191 can be further configured to: when the intra prediction mode of the current coding block is not an angular prediction mode, weight the prediction pixel values on the upper side and the right side of the current coding block with the reference pixel values on the upper side and the reference pixel values on the right side to obtain final prediction pixel values; and when the intra prediction mode of the current coding block is an angular prediction mode, calculate the final prediction pixel values according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction.
[0181] In the example embodiments of the present disclosure, the intra prediction unit 191 can be further configured to: when an included angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, weight the prediction pixel value on the upper side of the current coding block and the reference pixel value on the upper side to obtain a final prediction pixel value; and when an included angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, weight the prediction pixel value on the right side of the current coding block and the reference pixel value on the right side to obtain a final prediction pixel value.
[0182] In the example embodiments of the present disclosure, the intra prediction unit 191 can be further configured to: perform the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, or perform the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, or perform the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block, and the reference pixel value on the right side of the current coding block, or select the intra filtering mode with the lowest rate-distortion cost from the following intra filtering modes: the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, and the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block, and the reference pixel value on the right side of the current coding block.
[0183] In the example embodiment of the present disclosure, the intra prediction unit 191 can be further configured to: when the intra prediction mode of the current coding block is not an angular prediction mode, weight the prediction pixel value of the top-left side of the current coding block with the reference pixel value of the top side and the reference pixel value of the left side to obtain the final prediction pixel value of the top-left side of the current coding block, weight the prediction pixel value of the left side of the current coding block with the reference pixel value of the top side and the reference pixel value of the left side to obtain the final prediction pixel value of the left side of the current coding block, weight the prediction pixel value of the top-right side of the current coding block with the reference pixel value of the top side and the reference pixel value of the right side to obtain the final prediction pixel value of the top-right side of the current coding block, and weight the prediction pixel value of the right side of the current coding block with the reference pixel value of the top side and the reference pixel value of the right side to obtain the final prediction pixel value of the right side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, determine whether the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle; when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a third angle, weight the prediction pixel value of the top side of the current coding block with the reference pixel value of the top side to obtain the final prediction pixel value of the top side of the current coding block; and when the included angle between the prediction direction of the current coding block and the vertical direction is less than a fourth angle, weight the prediction pixel value of the left side of the current coding block with the reference pixel value of the left side to obtain the final prediction pixel value of the left side of the current coding block, and weight the prediction pixel value of the right side of the current coding block with the reference pixel value of the right side to obtain the final prediction pixel value of the right side of the current coding block.
[0184] The information writing unit 192 is configured to write information for intra prediction into a bitstream, the information for intra prediction at least including information about the intra prediction mode of the current coding block.
[0185] In the example embodiment of the present disclosure, when the reference pixel value of the left side and the reference pixel value of the right side of the current coding block are both available, the information for intra prediction can further include information about the intra filtering mode of the current coding block.
[0186] Figure 20 A block diagram of a decoding apparatus according to one example embodiment of the present disclosure is shown.
[0187] With reference to Figure 20 The encoding apparatus includes a prediction mode parsing unit 201, a pixel value prediction unit 202, and an image reconstruction unit 203.
[0188] The prediction mode parsing unit 201 is configured to parse information for intra prediction from a bitstream, the information for intra prediction at least including information about the intra prediction mode of the current coding block.
[0189] In an exemplary embodiment of the present disclosure, when the reference pixel values on the left and on the right of the current coding block are both available, the information for intra prediction further comprises information about an intra filtering mode of the current coding block.
[0190] The pixel value prediction unit 202 is configured to calculate the predicted pixel values of the current coding block according to the parsed information for intra prediction based on the availability of the reference pixels of the current coding block.
[0191] In an exemplary embodiment of the present disclosure, the pixel value prediction unit 202 can be configured to, when the reference pixel value on the left of the current coding block is available and the reference pixel value on the right is not available, perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left of the current coding block; when the reference pixel value on the left of the current coding block is not available and the reference pixel value on the right is available, perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right of the current coding block; when the reference pixel values on the left and on the right of the current coding block are both available, perform intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left of the current coding block and / or the reference pixel value on the right of the current coding block; when the reference pixel values on the left and on the right of the current coding block are both not available, perform padding on the reference pixel value on the left or on the right and perform intra prediction filtering according to the case that the reference pixel value on the left of the current coding block is available and the reference pixel value on the right is not available, or the case that the reference pixel value on the right of the current coding block is available and the reference pixel value on the left is not available.
[0192] In an exemplary embodiment of the present disclosure, the pixel value prediction unit 202 can be configured to, when the intra prediction mode of the current coding block is not an angular prediction mode, weight the predicted pixel value on the top of the current coding block with the reference pixel value on the top and the reference pixel value on the right to obtain the final predicted pixel value on the top of the current coding block, and weight the predicted pixel value on the right of the current coding block with the reference pixel value on the top and the reference pixel value on the right to obtain the final predicted pixel value on the right of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, calculate the final predicted pixel value according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction.
[0193] In the example embodiment of the present disclosure, the pixel value prediction unit 202 can be configured to: when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, weight the prediction pixel value on the upper side of the current coding block with the reference pixel value on the upper side to obtain the final prediction pixel value on the upper side of the current coding block; and when the included angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, weight the prediction pixel value on the right side of the current coding block with the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block.
[0194] In the example embodiment of the present disclosure, the pixel value prediction unit 202 can be configured to: perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, or perform intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, or perform intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block, or perform intra prediction filtering according to the parsed intra filtering mode.
[0195] In the example embodiment of the present disclosure, the pixel value prediction unit 202 can be configured to: when the intra prediction mode of the current coding block is not an angular prediction mode, weight the prediction pixel value on the upper left side of the current coding block with the reference pixel value on the left side and the reference pixel value on the upper side to obtain the final prediction pixel value on the upper left side of the current coding block, weight the prediction pixel value on the left side of the current coding block with the reference pixel value on the left side and the reference pixel value on the upper side to obtain the final prediction pixel value on the left side of the current coding block, weight the prediction pixel value on the upper right side of the current coding block with the reference pixel value on the upper side and the reference pixel value on the right side to obtain the final prediction pixel value on the upper right side of the current coding block, and weight the prediction pixel value on the right side of the current coding block with the reference pixel value on the upper side and the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block; when the intra prediction mode of the current coding block is an angular prediction mode, determine whether the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle; when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a third angle, weight the prediction pixel value on the upper side of the current coding block with the reference pixel value on the upper side to obtain the final prediction pixel value on the upper side of the current coding block; and when the included angle between the prediction direction of the current coding block and the vertical direction is less than a fourth angle, weight the prediction pixel value on the left side of the current coding block with the reference pixel value on the left side to obtain the final prediction pixel value on the left side of the current coding block, and weight the prediction pixel value on the right side of the current coding block with the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block.
[0196] The image reconstruction unit 203 is configured to reconstruct an image according to the prediction pixel value, to obtain a decoded image.
[0197] Figure 21 A block diagram of an encoding apparatus according to another exemplary embodiment of the present disclosure is shown.
[0198] Referring to Figure 21 , the encoding apparatus includes a model construction unit 211, a mode determination unit 212, and a TSCPM mode writing unit 213.
[0199] The model construction unit 211 is configured to determine reference samples for constructing a linear model based on availability of reference pixels of a current coding block, and to construct the linear model according to the determined reference samples.
[0200] In an exemplary embodiment of the present disclosure, the model construction unit 211 can be configured to select two reference samples from reference pixels on the upper side and the left side, respectively, when reference pixel values on the left side of the current coding block are available and reference pixel values on the right side are not available; to select two reference samples from reference pixels on the upper side and the right side, respectively, when reference pixel values on the left side of the current coding block are not available and reference pixel values on the right side are available; to select reference samples according to the case where reference pixel values on the left side of the current coding block are available and reference pixel values on the right side are not available, or to select reference samples according to the case where reference pixel values on the right side of the current coding block are available and reference pixel values on the left side are not available, or to select reference samples according to the case where rate-distortion cost is smaller according to the rate-distortion cost in the above two cases, when reference pixel values on the left side and the right side of the current coding block are both available.
[0201] The mode determination unit 212 is configured to calculate predicted pixel values of a chroma component of the current coding block according to the constructed linear model, and to determine an intra prediction mode of the current coding block.
[0202] The TSCPM mode writing unit 213 is configured to write information for intra prediction into a bitstream, the information for intra prediction including at least information about whether the intra prediction mode of the current coding block is a TSCPM mode.
[0203] In an exemplary embodiment of the present disclosure, when reference pixel values on the left side and the right side of the current coding block are both available, the information for intra prediction can further include reference sample construction information.
[0204] Figure 22 A block diagram of a decoding apparatus according to another exemplary embodiment of the present disclosure is shown.
[0205] Referring to Figure 22 , the decoding apparatus includes a TSCPM mode parsing unit 221, a model construction unit 222, a chroma prediction unit 223, and a chroma reconstruction unit 224.
[0206] The TSCPM mode parsing unit 221 is configured to parse, from the bitstream, information for intra prediction, the information for intra prediction comprising at least information about whether the intra prediction mode of the current coding block is the TSCPM mode.
[0207] In an exemplary embodiment of the present disclosure, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for intra prediction can further comprise reference sample construction information.
[0208] The model construction unit 222 is configured to determine reference samples for constructing the linear model based on the availability of the reference pixels of the current coding block, and construct the linear model according to the determined reference samples.
[0209] In an exemplary embodiment of the present disclosure, the model construction unit 222 can be configured to: when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available, select two reference samples from the reference pixels on the upper side and the left side, respectively; when the reference pixel value on the left side of the current coding block is not available and the reference pixel value on the right side is available, select two reference samples from the reference pixels on the upper side and the right side, respectively; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, obtain the reference samples according to the case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available, or obtain the reference samples according to the case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is not available, or obtain the reference samples according to the parsed reference sample construction information.
[0210] The chroma prediction unit 223 is configured to calculate the predicted pixel value of the chroma component of the current coding block according to the constructed linear model.
[0211] The chroma reconstruction unit 224 is configured to reconstruct the chroma component of the current coding block according to the predicted pixel value of the chroma component of the current coding block, to obtain a decoded image.
[0212] Figure 23 A block diagram of an encoding apparatus according to another exemplary embodiment of the present disclosure is shown.
[0213] With reference to Figure 23 , the encoding apparatus comprises a first encoding order determination unit 231, a second encoding order determination unit 232, and an encoding unit 233.
[0214] The first encoding order determination unit 231 is configured to determine the encoding order of the prediction block in the current coding block based on the partition mode of the block and the availability of the reference pixels of the current coding block.
[0215] In the example embodiment of the present disclosure, the first coding order determination unit 231 can be configured to, when the partition mode of the block is vertical partition, when the reference pixel value on the left of the current coding block is available and the reference pixel value on the right is unavailable, the coding order of the prediction block is left-to-right; when the reference pixel value on the left of the current coding block is unavailable and the reference pixel value on the right is available, the coding order of the prediction block is right-to-left; when the reference pixel value on the left and the reference pixel value on the right of the current coding block are both unavailable, the coding order of the prediction block is left-to-right; when the reference pixel value on the left and the reference pixel value on the right of the current coding block are both available, the coding order of the prediction block is one of the following coding orders: left-to-right coding order, right-to-left coding order, and the coding order with smaller rate-distortion cost between left-to-right and right-to-left.
[0216] The second coding order determination unit 232 is configured to determine the coding order of the transform block in each prediction block of the current coding block based on the partition mode of the block and the availability of the reference pixels of the current coding block.
[0217] In the example embodiment of the present disclosure, the second coding order determination unit 232 can be configured to, when the partition mode of the block is vertical partition, when the reference pixel value on the left of the current prediction block is available and the reference pixel value on the right is unavailable, the coding order of the transform block in the prediction block is left-to-right; when the reference pixel value on the left of the current prediction block is unavailable and the reference pixel value on the right is available, the coding order of the transform block in the prediction block is right-to-left; when the reference pixel value on the left and the reference pixel value on the right of the current prediction block are both unavailable, the coding order of the transform block in the prediction block is left-to-right; when the reference pixel value on the left and the reference pixel value on the right of the current prediction block are both available, the coding order of the transform block in the prediction block is one of the following coding orders: left-to-right coding order, right-to-left coding order, and the coding order with smaller rate-distortion cost between left-to-right and right-to-left.
[0218] The coding unit 233 is configured to write the extension tree DT mode information into the bitstream based on the determined coding order of the prediction block in the current coding block and the coding order of the transform block in the prediction block, wherein the DT mode information at least includes information about the partition mode of the block in the current coding block.
[0219] In the example embodiment of the present disclosure, when the reference pixel value on the left and the reference pixel value on the right of the current coding block are both available, the DT mode information can further include information about the coding order of the prediction block in the current coding block and / or information about the coding order of the transform block in each prediction block of the current coding block.
[0220] Figure 24A block diagram of a decoding apparatus according to another exemplary embodiment of the present disclosure is shown.
[0221] Referring to Figure 24 The encoding apparatus includes a DT information parsing unit 241, a first decoding order determination unit 242, a second decoding order determination unit 243, and a decoding unit 244.
[0222] The DT information parsing unit 241 is configured to parse DT mode information from the bitstream, wherein the DT mode information includes at least information about a partition mode of a block in a current coding block.
[0223] In exemplary embodiments of the present disclosure, the DT mode information further includes information about a decoding order of a prediction block in the current coding block and / or information about a decoding order of a transform block in each prediction block of the current coding block.
[0224] The first decoding order determination unit 242 is configured to determine a decoding order of a prediction block in the current coding block based on the partition mode of the block and availability of reference pixels of the current coding block.
[0225] In exemplary embodiments of the present disclosure, the first decoding order determination unit 242 can be configured to, when the partition mode of the block is vertical partitioning, when reference pixel values on the left of the current coding block are available and reference pixel values on the right are not available, the decoding order of the prediction block is from left to right; when reference pixel values on the left of the current coding block are not available and reference pixel values on the right are available, the decoding order of the prediction block is from right to left; when reference pixel values on the left and on the right of the current coding block are not available, the decoding order of the prediction block is from left to right; when reference pixel values on the left and on the right of the current coding block are available, the decoding order of the prediction block is one of the following decoding orders: a decoding order from left to right, a decoding order from right to left, a decoding order of the prediction block determined according to the information about the decoding order of the prediction block.
[0226] The second decoding order determination unit 243 is configured to determine a decoding order of a transform block in the prediction block based on the partition mode of the block and availability of reference pixels of the current coding block.
[0227] In the example embodiment of the present disclosure, the second decoding order determination unit 243 can be configured to: when the partition mode of the block is vertical partition, when the reference pixel value on the left side of the current prediction block is available and the reference pixel value on the right side is unavailable, the decoding order of the transform block in the prediction block is from left to right; when the reference pixel value on the left side of the current prediction block is unavailable and the reference pixel value on the right side is available, the decoding order of the transform block in the prediction block is from right to left; when the reference pixel value on the left side and the reference pixel value on the right side of the current prediction block are both unavailable, the decoding order of the transform block in the prediction block is from left to right; when the reference pixel value on the left side and the reference pixel value on the right side of the current prediction block are both available, the decoding order of the transform block in the prediction block is one of the following decoding orders: the decoding order from left to right, the decoding order from right to left, the decoding order of the transform block in the prediction block determined according to the information about the decoding order of the transform block in the prediction block.
[0228] The decoding unit 244 is configured to decode according to the determined decoding order of the prediction block in the current coding block and the determined decoding order of the transform block in the prediction block.
[0229] In addition, according to the example embodiment of the present disclosure, a computer readable storage medium is also provided, which stores a computer program, when the computer program is executed, the encoding method or the decoding method according to the example embodiment of the present disclosure is implemented.
[0230] In the example embodiment of the present disclosure, the computer readable storage medium can carry one or more programs, when the computer program is executed, the following steps can be implemented: performing intra prediction on the current coding block based on the availability of the reference pixel of the current coding block; and writing the information for intra prediction into the bitstream, wherein the information for intra prediction at least includes information about the intra prediction mode of the current coding block.
[0231] In the example embodiment of the present disclosure, the computer readable storage medium can carry one or more programs, when the computer program is executed, the following steps can be implemented: parsing the information for intra prediction from the bitstream, wherein the information for intra prediction at least includes information about the intra prediction mode of the current coding block; calculating the prediction pixel value of the current coding block according to the parsed information for intra prediction based on the availability of the reference pixel of the current coding block; and reconstructing the image according to the prediction pixel value to obtain a decoded image.
[0232] In the example embodiments of the present disclosure, the computer readable storage medium can carry one or more programs, which when executed can implement the following steps: determining reference samples for constructing a linear model based on availability of reference pixels of a current coding block, and constructing the linear model according to the determined reference samples; calculating predicted pixel values of a chroma component of the current coding block according to the constructed linear model, and determining an intra prediction mode of the current coding block; and writing information for intra prediction into a bitstream, wherein the information for intra prediction at least includes information about whether the intra prediction mode of the current coding block is a TSCPM mode.
[0233] In the example embodiments of the present disclosure, the computer readable storage medium can carry one or more programs, which when executed can implement the following steps: determining reference samples for constructing a linear model based on availability of reference pixels of a current coding block, and constructing the linear model according to the determined reference samples; calculating predicted pixel values of a chroma component of the current coding block according to the constructed linear model, and determining an intra prediction mode of the current coding block; and writing information for intra prediction into a bitstream, wherein the information for intra prediction at least includes information about whether the intra prediction mode of the current coding block is a TSCPM mode.
[0234] In the example embodiments of the present disclosure, the computer readable storage medium can carry one or more programs, which when executed can implement the following steps: determining an encoding order of a prediction block in a current coding block based on a partition mode of the block and availability of reference pixels of the current coding block; determining an encoding order of a transform block in each prediction block of the current coding block based on the partition mode of the block and the availability of the reference pixels of the current coding block; and writing extension tree (DT) mode information into a bitstream based on the determined encoding order of the prediction block in the current coding block and the determined encoding order of the transform block in the prediction block, wherein the DT mode information at least includes information about the partition mode of the block in the current coding block.
[0235] In the example embodiments of the present disclosure, the computer readable storage medium can carry one or more programs, which when executed can implement the following steps: determining an encoding order of a prediction block in a current coding block based on a partition mode of the block and availability of reference pixels of the current coding block; determining an encoding order of a transform block in each prediction block of the current coding block based on the partition mode of the block and the availability of the reference pixels of the current coding block; and writing extension tree (DT) mode information into a bitstream based on the determined encoding order of the prediction block in the current coding block and the determined encoding order of the transform block in the prediction block, wherein the DT mode information at least includes information about the partition mode of the block in the current coding block.
[0236] Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In embodiments of this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a computer program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof. A computer-readable storage medium can be included in any apparatus; it can also exist independently without being assembled into that apparatus.
[0237] The above has been combined Figures 19 to 24 An encoding / decoding apparatus according to exemplary embodiments of the present disclosure has been described. Next, in conjunction with… Figure 25 A computing device according to exemplary embodiments of the present disclosure will be described.
[0238] Figure 25 A schematic diagram of a computing device according to an exemplary embodiment of the present disclosure is shown.
[0239] Reference Figure 25 The computing device 25 according to an exemplary embodiment of the present disclosure includes a memory 261 and a processor 252. The memory 251 stores a computer program, which, when executed by the processor 252, implements an encoding method or a decoding method according to an exemplary embodiment of the present disclosure.
[0240] In an exemplary embodiment of this disclosure, when the computer program is executed by the processor 252, the following steps can be implemented: performing intra-frame prediction on the current coding block based on the availability of reference pixels of the current coding block; writing information for intra-frame prediction into the bitstream, wherein the information for intra-frame prediction includes at least information about the intra-frame prediction mode of the current coding block.
[0241] In the example embodiment of the present disclosure, when the computer program is executed by the processor 252, the following steps can be implemented: parsing information for intra prediction from a bitstream, wherein the information for intra prediction at least includes information about an intra prediction mode of a current coding block; calculating a predicted pixel value of the current coding block according to the parsed information for intra prediction based on availability of reference pixels of the current coding block; and reconstructing the image according to the predicted pixel value to obtain a decoded image.
[0242] In the example embodiment of the present disclosure, when the computer program is executed by the processor 252, the following steps can be implemented: determining reference samples for constructing a linear model based on availability of reference pixels of the current coding block, and constructing the linear model according to the determined reference samples; calculating a predicted pixel value of a chroma component of the current coding block according to the constructed linear model, and determining an intra prediction mode of the current coding block; and writing information for intra prediction into a bitstream, wherein the information for intra prediction at least includes information about whether the intra prediction mode of the current coding block is a TSCPM mode.
[0243] In the example embodiment of the present disclosure, when the computer program is executed by the processor 252, the following steps can be implemented: parsing information for intra prediction from a bitstream, wherein the information for intra prediction at least includes information about whether an intra prediction mode of a current coding block is a TSCPM mode; determining reference samples for constructing a linear model based on availability of reference pixels of the current coding block, and constructing the linear model according to the determined reference samples; calculating a predicted pixel value of a chroma component of the current coding block according to the constructed linear model; and reconstructing the chroma component of the current coding block according to the predicted pixel value of the chroma component of the current coding block to obtain a decoded image.
[0244] In the example embodiment of the present disclosure, when the computer program is executed by the processor 252, the following steps can be implemented: determining an encoding order of a prediction block in a current coding block based on a partition mode of the block and availability of reference pixels of the current coding block; determining an encoding order of a transform block in each prediction block of the current coding block based on the partition mode of the block and the availability of the reference pixels of the current coding block; and writing extended tree DT mode information into a bitstream based on the determined encoding order of the prediction block in the current coding block and the encoding order of the transform block in the prediction block, wherein the DT mode information at least includes information about the partition mode of the block in the current coding block.
[0245] In the exemplary embodiments of the present disclosure, when the computer program is executed by the processor 252, the following steps can be implemented: parsing DT mode information from a bitstream, wherein the DT mode information comprises at least information about a partition mode of a block in a current coding block; determining a decoding order of a prediction block in the current coding block based on the partition mode of the block and availability of reference pixels of the current coding block; determining a decoding order of a transform block in the prediction block based on the partition mode of the block and the availability of the reference pixels of the current coding block; and decoding according to the determined decoding order of the prediction block in the current coding block and the determined decoding order of the transform block in the prediction block.
[0246] Figure 25 The illustrated computing device is merely one example, and should not be construed as limiting the scope of functionality or use of embodiments of the present disclosure.
[0247] The above has been described with reference to Figures 1 to 25 The coding method and apparatus according to exemplary embodiments of the present disclosure have been described. However, it should be understood that: Figures 19 to 24 The coding apparatus and units shown in the above Figure 25 The computing device shown in the above is not limited to comprising the components shown above, but some components can be added or deleted as needed, and the above components can also be combined.
[0248] The coding method and apparatus according to exemplary embodiments of the present disclosure adopt flexible coding order, expand spatial reference information, and design intra prediction filtering technology (IPF), trans-component prediction technology (TSCPM), and extended tree technology (DT) according to availability of neighboring reference pixels on the left and right sides of a current coding or decoding image block, maximize the use of surrounding reference pixel information, and thus improve the efficiency of intra coding. When the left side pixels of the current image block are available and the right side pixels are not available, various intra prediction technologies are consistent with the prior art, which maximizes the compatibility between technologies. When the right side pixels of the image block are available, for the IPF technology, the right side and the upper side pixels are used as filtering pixels, that is, a new prediction value is obtained by weighting the right side and the upper side pixels and the prediction value. For the TSCPM technology, the right side and the upper side pixels are used to derive a linear model of the luminance component and the chrominance component, and the chrominance component is predicted according to the linear model. For the DT technology, when the right side pixels are available, the prediction block and the transform block are coded in a right-to-left order, which enables the use of the maximum amount of pixel information around the image block that has been coded or decoded when the right-to-left coding order is used, thereby improving the efficiency of intra prediction and the performance of video coding.
[0249] While the present disclosure has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details can be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims.
Claims
1. A coding method, comprising: determining reference pixel values based on availability of reference pixels of a current coding block, wherein the availability of the reference pixels of the current coding block indicates whether reference pixel values on a left side of the current coding block are available and whether reference pixel values on a right side of the current coding block are available; iterating through all intra prediction modes for the current coding block based on the determined reference pixel values, obtaining prediction pixel values corresponding to each of the intra prediction modes, and performing intra prediction filtering on the prediction pixel values to obtain final prediction pixel values corresponding to each of the intra prediction modes; calculating rate-distortion costs corresponding to each of the intra prediction modes according to the final prediction pixel values; determining an intra prediction mode with a lowest rate-distortion cost as the intra prediction mode of the current coding block according to the rate-distortion costs of each of the intra prediction modes; performing intra prediction on the current coding block based on the determined intra prediction mode; writing information for the intra prediction into a bitstream, the information for the intra prediction including at least information about the intra prediction mode of the current coding block, wherein the performing intra prediction filtering on the prediction pixel values comprises at least one of: when the reference pixel values on the left side of the current coding block are available and the reference pixel values on the right side are not available, performing intra prediction filtering on the prediction pixel values according to the intra prediction mode of the current coding block and the reference pixel values on the left side of the current coding block; when the reference pixel values on the left side of the current coding block are not available and the reference pixel values on the right side are available, performing intra prediction filtering on the prediction pixel values according to the intra prediction mode of the current coding block and the reference pixel values on the right side of the current coding block; when the reference pixel values on the left side and the right side of the current coding block are available, performing intra prediction filtering on the prediction pixel values according to the intra prediction mode of the current coding block, the reference pixel values on the left side of the current coding block, and / or the reference pixel values on the right side of the current coding block; when the reference pixel values on the left side and the right side of the current coding block are not available, padding the reference pixel values on the left side and / or the right side, and performing intra prediction filtering on the prediction pixel values as if the reference pixel values on the left side of the current coding block are available and the reference pixel values on the right side are not available, and / or as if the reference pixel values on the right side of the current coding block are available and the reference pixel values on the left side are not available.
2. The encoding method of claim 1, wherein, the performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel values on the right side of the current coding block comprises at least one of: when the intra prediction mode of the current coding block is not an angular prediction mode, weighting the prediction pixel values on the upper side and the right side of the current coding block with the reference pixel values on the upper side and the right side to obtain the final prediction pixel values; when the intra prediction mode of the current coding block is an angular prediction mode, calculating the final prediction pixel values according to an included angle between a prediction direction of the current coding block and a horizontal direction or a vertical direction.
3. The encoding method of claim 2, wherein, the calculating the final prediction pixel values according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction comprises at least one of: When the angle between the prediction direction of the current coding block and the horizontal direction is less than the first angle, the prediction pixel value above the current coding block is weighted with the reference pixel value above the current coding block to obtain a final prediction pixel value; When the angle between the prediction direction of the current coding block and the vertical direction is less than the second angle, the prediction pixel value right to the current coding block is weighted with the reference pixel value right to the current coding block to obtain a final prediction pixel value.
4. The encoding method of claim 1, wherein, The step of performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value left to the current coding block and / or the reference pixel value right to the current coding block comprises: performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value left to the current coding block, or, performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value right to the current coding block, or, performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value left to the current coding block and the reference pixel value right to the current coding block, or, selecting the intra filtering mode with the lowest rate-distortion cost from the following intra filtering modes: the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value left to the current coding block, the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value right to the current coding block, and the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value left to the current coding block and the reference pixel value right to the current coding block.
5. The encoding method of claim 4, wherein, The step of performing the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value left to the current coding block and the reference pixel value right to the current coding block comprises at least one of: When the intra prediction mode of the current coding block is not the angular prediction mode, weighting the prediction pixel value above-left to the current coding block with the reference pixel value above and the reference pixel value left to obtain a final prediction pixel value above-left to the current coding block, weighting the prediction pixel value left to the current coding block with the reference pixel value above and the reference pixel value left to obtain a final prediction pixel value left to the current coding block, weighting the prediction pixel value above-right to the current coding block with the reference pixel value above and the reference pixel value right to obtain a final prediction pixel value above-right to the current coding block, and weighting the prediction pixel value right to the current coding block with the reference pixel value above and the reference pixel value right to obtain a final prediction pixel value right to the current coding block; When the intra prediction mode of the current coding block is the angular prediction mode, confirming whether the angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle; When the angle between the prediction direction of the current coding block and the horizontal direction is less than the third angle, weighting the prediction pixel value above the current coding block with the reference pixel value above the current coding block to obtain a final prediction pixel value above the current coding block; When the included angle between the prediction direction of the current coding block and the vertical direction is less than the fourth angle, the prediction pixel value on the left side of the current coding block is weighted with the reference pixel value on the left side to obtain the final prediction pixel value on the left side of the current coding block, and the prediction pixel value on the right side of the current coding block is weighted with the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block.
6. The encoding method of claim 1, wherein, When the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for the intra prediction further includes information about the intra filtering mode of the current coding block.
7. A decoding method, comprising: parsing information for intra prediction from a bitstream, the information for intra prediction including at least information about an intra prediction mode of a current coding block; determining reference pixel values for intra prediction filtering based on availability of reference pixels of the current coding block, and calculating prediction pixel values of the current coding block by performing intra prediction filtering based on the reference pixel values for intra prediction filtering according to the parsed information for intra prediction, wherein the availability of the reference pixels of the current coding block indicates whether a reference pixel value on a left side of the current coding block is available and whether a reference pixel value on a right side of the current coding block is available; reconstructing an image according to the prediction pixel values to obtain a decoded image, wherein the step of calculating the prediction pixel values of the current coding block comprises at least one of: when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available, performing intra prediction filtering on the prediction pixel values according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block; when the reference pixel value on the left side of the current coding block is not available and the reference pixel value on the right side is available, performing intra prediction filtering on the prediction pixel values according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, performing intra prediction filtering on the prediction pixel values according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both not available, performing padding on the reference pixel value on the left side or the reference pixel value on the right side, and performing intra prediction filtering on the prediction pixel values according to a case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available, or a case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is not available.
8. The decoding method of claim 7, wherein, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for the intra prediction further includes information about the intra filtering mode of the current coding block.
9. The decoding method of claim 7, wherein, the step of performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block comprises at least one of: When the intra prediction mode of the current coding block is not the angular prediction mode, the final prediction pixel value of the top side of the current coding block is obtained by weighting the prediction pixel value of the top side of the current coding block and the reference pixel value of the top side and the reference pixel value of the right side, and the final prediction pixel value of the right side of the current coding block is obtained by weighting the prediction pixel value of the right side of the current coding block and the reference pixel value of the top side and the reference pixel value of the right side; When the intra prediction mode of the current coding block is the angular prediction mode, the final prediction pixel value is calculated according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction.
10. The decoding method of claim 9, wherein, The step of calculating the final prediction pixel value according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction comprises at least one of the following: When the included angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, the final prediction pixel value of the top side of the current coding block is obtained by weighting the prediction pixel value of the top side of the current coding block and the reference pixel value of the top side; When the included angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, the final prediction pixel value of the right side of the current coding block is obtained by weighting the prediction pixel value of the right side of the current coding block and the reference pixel value of the right side.
11. The decoding method of claim 7, wherein, The step of performing intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value of the left side of the current coding block and / or the reference pixel value of the right side of the current coding block comprises: performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value of the left side of the current coding block, or, performing intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value of the right side of the current coding block, or, performing intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value of the left side of the current coding block and the reference pixel value of the right side of the current coding block, or, performing intra prediction filtering according to the parsed intra filtering mode.
12. The decoding method of claim 11, wherein, The step of performing intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value of the left side of the current coding block and the reference pixel value of the right side of the current coding block comprises at least one of the following: When the intra prediction mode of the current coding block is not the angular prediction mode, the final prediction pixel value of the top-left side of the current coding block is obtained by weighting the prediction pixel value of the top-left side of the current coding block and the reference pixel value of the left side and the reference pixel value of the top side, the final prediction pixel value of the left side of the current coding block is obtained by weighting the prediction pixel value of the left side of the current coding block and the reference pixel value of the left side and the reference pixel value of the top side, the final prediction pixel value of the top-right side of the current coding block is obtained by weighting the prediction pixel value of the top-right side of the current coding block and the reference pixel value of the top side and the reference pixel value of the right side, and the final prediction pixel value of the right side of the current coding block is obtained by weighting the prediction pixel value of the right side of the current coding block and the reference pixel value of the top side and the reference pixel value of the right side; When the intra prediction mode of the current coding block is the angular prediction mode, it is determined whether the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle. when the angle between the prediction direction of the current coding block and the horizontal direction is less than the third angle, performing weighting on the prediction pixel value of the upper side of the current coding block and the reference pixel value of the upper side to obtain the final prediction pixel value of the upper side of the current coding block; when the angle between the prediction direction of the current coding block and the vertical direction is less than the fourth angle, performing weighting on the prediction pixel value of the left side of the current coding block and the reference pixel value of the left side to obtain the final prediction pixel value of the left side of the current coding block, and performing weighting on the prediction pixel value of the right side of the current coding block and the reference pixel value of the right side to obtain the final prediction pixel value of the right side of the current coding block.
13. An encoding apparatus, comprising: an intra prediction unit configured to determine reference pixel values based on availability of reference pixels of a current coding block, wherein the availability of the reference pixels of the current coding block indicates whether a reference pixel value of a left side of the current coding block is available and whether a reference pixel value of a right side of the current coding block is available, based on the determined reference pixel values, to traverse all intra prediction modes for the current coding block, to obtain a prediction pixel value corresponding to each of the intra prediction modes, to perform intra prediction filtering on the prediction pixel value to obtain a final prediction pixel value corresponding to each of the intra prediction modes, to calculate a rate-distortion cost corresponding to each of the intra prediction modes according to the final prediction pixel value, to determine an intra prediction mode with a lowest rate-distortion cost as an intra prediction mode of the current coding block according to the rate-distortion cost of each of the intra prediction modes, and to perform intra prediction on the current coding block based on the determined intra prediction mode; and an information writing unit configured to write information for intra prediction into a bitstream, wherein the information for intra prediction at least includes information about the intra prediction mode of the current coding block, wherein the intra prediction unit is further configured to perform at least one of the following: when the reference pixel value of the left side of the current coding block is available and the reference pixel value of the right side is not available, performing intra prediction filtering on the prediction pixel value according to the intra prediction mode of the current coding block and the reference pixel value of the left side of the current coding block; when the reference pixel value of the left side of the current coding block is not available and the reference pixel value of the right side is available, performing intra prediction filtering on the prediction pixel value according to the intra prediction mode of the current coding block and the reference pixel value of the right side of the current coding block; when the reference pixel values of the left side and the right side of the current coding block are both available, performing intra prediction filtering on the prediction pixel value according to the intra prediction mode of the current coding block, the reference pixel value of the left side of the current coding block, and / or the reference pixel value of the right side of the current coding block; when the reference pixel values of the left side and the right side of the current coding block are both not available, performing padding on the reference pixel value of the left side and / or the reference pixel value of the right side, and performing intra prediction filtering on the prediction pixel value according to a case that the reference pixel value of the left side of the current coding block is available and the reference pixel value of the right side is not available, and / or a case that the reference pixel value of the right side of the current coding block is available and the reference pixel value of the left side is not available.
14. The apparatus of claim 13, wherein, The intra prediction unit is further configured to perform at least one of the following when performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block: when the intra prediction mode of the current coding block is not the angular prediction mode, weighting the prediction pixel value on the top side of the current coding block and the prediction pixel value on the right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain the final prediction pixel value; when the intra prediction mode of the current coding block is the angular prediction mode, calculating the final prediction pixel value according to the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction.
15. The apparatus of claim 14, wherein, The intra prediction unit is further configured to perform at least one of the following when performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block: when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, weighting the prediction pixel value on the top side of the current coding block with the reference pixel value on the top side to obtain the final prediction pixel value; when the included angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, weighting the prediction pixel value on the right side of the current coding block with the reference pixel value on the right side to obtain the final prediction pixel value.
16. The apparatus of claim 13, wherein, The intra prediction unit is further configured to: perform the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, or, perform the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, or, perform the intra prediction filtering according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block, or, select the intra filtering mode with the lowest rate-distortion cost from the following intra filtering modes to perform the intra prediction filtering: the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, and the intra filtering mode of performing the intra prediction filtering according to the intra prediction mode of the current coding block and the reference pixel value on the left side and the reference pixel value on the right side of the current coding block.
17. The apparatus of claim 16, wherein, The intra prediction unit is further configured to perform at least one of the following: when the intra prediction mode of the current coding block is not the angular prediction mode, weighting the prediction pixel value on the top-left side of the current coding block with the reference pixel value on the top side and the reference pixel value on the left side to obtain the final prediction pixel value on the top-left side of the current coding block, weighting the prediction pixel value on the left side of the current coding block with the reference pixel value on the top side and the reference pixel value on the left side to obtain the final prediction pixel value on the left side of the current coding block, weighting the prediction pixel value on the top-right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain the final prediction pixel value on the top-right side of the current coding block, and weighting the prediction pixel value on the right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block. confirming whether an included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle when the intra prediction mode of the current coding block is an angular prediction mode; when the included angle between the prediction direction of the current coding block and the horizontal direction is less than a third angle, weighting the prediction pixel value on the upper side of the current coding block and the reference pixel value on the upper side to obtain a final prediction pixel value on the upper side of the current coding block; when the included angle between the prediction direction of the current coding block and the vertical direction is less than a fourth angle, weighting the prediction pixel value on the left side of the current coding block and the reference pixel value on the left side to obtain a final prediction pixel value on the left side of the current coding block, and weighting the prediction pixel value on the right side of the current coding block and the reference pixel value on the right side to obtain a final prediction pixel value on the right side of the current coding block.
18. The apparatus of claim 16, wherein, when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, the information for intra prediction further comprises information about an intra filter mode of the current coding block.
19. A decoding apparatus, comprising: a prediction mode parsing unit configured to parse information for intra prediction from a bitstream, the information for intra prediction comprising at least information about an intra prediction mode of a current coding block; a pixel value prediction unit configured to determine reference pixel values for intra prediction filtering based on availability of reference pixels of the current coding block, and calculate prediction pixel values of the current coding block by performing intra prediction filtering based on the reference pixel values for intra prediction filtering according to the parsed information for intra prediction, wherein the availability of the reference pixels of the current coding block indicates whether a reference pixel value on a left side of the current coding block is available and whether a reference pixel value on a right side of the current coding block is available; an image reconstruction unit configured to reconstruct an image according to the prediction pixel values to obtain a decoded image, wherein the pixel value prediction unit is further configured to perform at least one of: when the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available, performing intra prediction filtering on the prediction pixel values according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block; when the reference pixel value on the left side of the current coding block is not available and the reference pixel value on the right side is available, performing intra prediction filtering on the prediction pixel values according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both available, performing intra prediction filtering on the prediction pixel values according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and / or the reference pixel value on the right side of the current coding block; when the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are both not available, padding the reference pixel value on the left side or the reference pixel value on the right side, and performing intra prediction filtering on the prediction pixel values according to a case that the reference pixel value on the left side of the current coding block is available and the reference pixel value on the right side is not available, or a case that the reference pixel value on the right side of the current coding block is available and the reference pixel value on the left side is not available.
20. The apparatus of claim 19, wherein, When both the reference pixel value on the left side and the reference pixel value on the right side of the current coding block are available, the information for the intra prediction further comprises information about an intra filter mode of the current coding block.
21. The apparatus of claim 19, wherein, The pixel value prediction unit is further configured to perform at least one of: When the intra prediction mode of the current coding block is not an angular prediction mode, weighting the predicted pixel value on the top side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain a final predicted pixel value on the top side of the current coding block, and weighting the predicted pixel value on the right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain a final predicted pixel value on the right side of the current coding block; When the intra prediction mode of the current coding block is an angular prediction mode, calculating the final predicted pixel value according to an included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction.
22. The apparatus of claim 21, wherein, The pixel value prediction unit is further configured to perform at least one of: When the included angle between the prediction direction of the current coding block and the horizontal direction is less than a first angle, weighting the predicted pixel value on the top side of the current coding block with the reference pixel value on the top side to obtain a final predicted pixel value on the top side of the current coding block; When the included angle between the prediction direction of the current coding block and the vertical direction is less than a second angle, weighting the predicted pixel value on the right side of the current coding block with the reference pixel value on the right side to obtain a final predicted pixel value on the right side of the current coding block.
23. The apparatus of claim 19, wherein, The pixel value prediction unit is further configured to: perform an intra prediction filter according to the intra prediction mode of the current coding block and the reference pixel value on the left side of the current coding block, or, perform an intra prediction filter according to the intra prediction mode of the current coding block and the reference pixel value on the right side of the current coding block, or, perform an intra prediction filter according to the intra prediction mode of the current coding block, the reference pixel value on the left side of the current coding block and the reference pixel value on the right side of the current coding block, or, perform an intra prediction filter according to the parsed intra filter mode.
24. The apparatus of claim 23, wherein, The pixel value prediction unit is further configured to perform at least one of: When the intra prediction mode of the current coding block is not an angular prediction mode, weighting the predicted pixel value on the top side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain a final predicted pixel value on the top side of the current coding block, and weighting the predicted pixel value on the right side of the current coding block with the reference pixel value on the top side and the reference pixel value on the right side to obtain a final predicted pixel value on the right side of the current coding block; When the intra prediction mode of the current coding block is an angular prediction mode, confirming whether the included angle between the prediction direction of the current coding block and the horizontal direction or the vertical direction is less than a preset angle; When the included angle between the prediction direction of the current coding block and the horizontal direction is less than a third angle, weighting the predicted pixel value on the top side of the current coding block with the reference pixel value on the top side to obtain a final predicted pixel value on the top side of the current coding block. When the included angle between the prediction direction of the current coding block and the vertical direction is less than the fourth angle, the prediction pixel value on the left side of the current coding block is weighted with the reference pixel value on the left side to obtain the final prediction pixel value on the left side of the current coding block, and the prediction pixel value on the right side of the current coding block is weighted with the reference pixel value on the right side to obtain the final prediction pixel value on the right side of the current coding block.
25. A computer readable storage medium storing a computer program, wherein, When the computer program is executed by the processor, the encoding method or the decoding method in any one of claims 1 to 12 is implemented.
26. A computing device comprising: a processor; a memory storing a computer program, when the computer program is executed by the processor, the encoding method or the decoding method in any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Method and apparatus for intra prediction mode using intra prediction filter in video and image compression
CN109076237A
Image Decoding Apparatus and Image Decoding Method
US20090141798A1
Encoding method and device therefor, and decoding method and device therefor
WO2018124627A1
Method and device for processing video signal
WO2019107998A1