CN115002485A - Image encoding method, image decoding method and related device - Google Patents

Image encoding method, image decoding method and related device Download PDF

Info

Publication number
CN115002485A
CN115002485A CN202210664095.1A CN202210664095A CN115002485A CN 115002485 A CN115002485 A CN 115002485A CN 202210664095 A CN202210664095 A CN 202210664095A CN 115002485 A CN115002485 A CN 115002485A
Authority
CN
China
Prior art keywords
block
prediction
pixel
chroma component
filter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210664095.1A
Other languages
Chinese (zh)
Inventor
杨宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115002485A publication Critical patent/CN115002485A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Abstract

The embodiment of the application discloses an image coding method, an image decoding method and a related device, wherein the image decoding method comprises the following steps: dividing the image, and determining a chroma component intra-frame prediction mode of a current coding block; determining a prediction block of the chroma component of the current coding block according to the chroma component intra-frame prediction mode; and performing prediction correction on the prediction block of the chroma component of the current coding block to obtain a corrected prediction block of the chroma component of the current coding block. In the chroma component intra-frame prediction mode, the spatial correlation between the adjacent coding block and the current coding block is utilized to correct the prediction sample of the chroma component of the current coding block, so that the prediction accuracy and the coding efficiency are improved.

Description

Image encoding method, image decoding method and related device
Technical Field
The present application relates to the field of electronic device technologies, and in particular, to an image encoding method, an image decoding method, and a related apparatus.
Background
Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, Personal Digital Assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radio telephones, video conferencing devices, video streaming devices, and so forth.
Digital video devices implement video compression techniques such as those described in the standards and extensions of the standards defined by the MPEG-2, MPEG-4, ITU-t h.263, ITU-t h.264/MPEG-4 part 10 Advanced Video Coding (AVC), ITU-t h.265 High Efficiency Video Coding (HEVC) standards, to more efficiently transmit and receive digital video information. Video devices may more efficiently transmit, receive, encode, decode, and/or store digital video information by implementing these video codec techniques.
With the proliferation of internet video, even though digital video compression technology is continuously evolving, still higher requirements are put on video compression ratio.
Disclosure of Invention
The embodiment of the application provides an image coding method, an image decoding method and a related device, which aim to correct a prediction sample of a chrominance component of a current coding block by utilizing the spatial correlation between an adjacent coding block and the current coding block, and improve the prediction accuracy and the coding efficiency.
In a first aspect, an embodiment of the present application provides an image encoding method, including: dividing the image, and determining a chroma component intra-frame prediction mode of a current coding block; determining a prediction block of the chroma component of the current coding block according to the chroma component intra-frame prediction mode; and performing prediction correction on the prediction block of the chroma component of the current coding block to obtain a corrected prediction block of the chroma component of the current coding block.
Compared with the prior art, in the chroma component intra-frame prediction mode, the prediction sample of the chroma component of the current coding block is corrected by utilizing the spatial correlation between the adjacent coding block and the current coding block, and the prediction accuracy and the coding efficiency are improved.
In a second aspect, an embodiment of the present application provides an image decoding method, including: analyzing the code stream, and determining a chroma component intra-frame prediction mode of a current decoding block; determining a prediction block for a chroma component of the currently decoded block according to the chroma component intra prediction mode; and performing prediction correction on the prediction block of the chroma component of the current decoding block to obtain a corrected prediction block of the chroma component of the current decoding block.
Compared with the prior art, in the chroma component intra-frame prediction mode, the prediction sample of the chroma component of the current coding block is corrected by utilizing the spatial correlation between the adjacent coding block and the current coding block, and the prediction accuracy and the decoding efficiency are improved.
In a third aspect, an embodiment of the present application provides an image encoding apparatus, including:
the dividing unit is used for dividing the image and determining a chroma component intra-frame prediction mode of a current coding block;
a determining unit, configured to determine a prediction block of a chroma component of the current coding block according to the chroma component intra prediction mode;
and the correcting unit is used for predicting and correcting the prediction block of the chroma component of the current coding block to obtain a corrected prediction block of the chroma component of the current coding block.
In a fourth aspect, an embodiment of the present application provides an image decoding apparatus, including:
the analysis unit is used for analyzing the code stream and determining the chroma component intra-frame prediction mode of the current decoding block;
a determination unit for determining a prediction block of a chroma component of the current decoded block according to the chroma component intra prediction mode;
and the correction unit is used for predicting and correcting the prediction block of the chroma component of the current decoding block to obtain a corrected prediction block of the chroma component of the current decoding block.
In a fifth aspect, an embodiment of the present application provides an encoder, including: a processor and a memory coupled to the processor; the processor is configured to perform the method of the first aspect.
In a sixth aspect, an embodiment of the present application provides a decoder, including: a processor and a memory coupled to the processor; the processor is configured to perform the method of the second aspect.
In a seventh aspect, an embodiment of the present application provides a terminal, where the terminal includes: one or more processors, memory, and a communication interface; the memory, the communication interface and the one or more processors; the terminal communicates with other devices through the communication interface, and the memory is used for storing computer program code comprising instructions which, when executed by the one or more processors, cause the terminal to perform the method according to the first or second aspect.
In an eighth aspect, the present invention provides a computer-readable storage medium, having stored therein instructions, which, when executed on a computer, cause the computer to perform the method of the first or second aspect.
In a ninth aspect, embodiments of the present application provide a computer program product comprising instructions that, when executed on a computer, cause the computer to perform the method of the first or second aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic block diagram of a coding tree unit in an embodiment of the present application;
FIG. 2 is a schematic block diagram of a color format in an embodiment of the present application;
FIG. 3 is a schematic block diagram of a CTU and a coding unit CU in an embodiment of the present application;
FIG. 4 is a schematic block diagram of an associated pixel of an encoding unit in an embodiment of the present application;
FIG. 5A is a block diagram illustrating a luminance component intra prediction mode according to an embodiment of the present disclosure;
FIG. 5B is a diagram illustrating a chroma component normal intra prediction mode according to an embodiment of the present application;
FIG. 6 is a schematic block diagram of neighboring pixels used in the calculation of coefficients of a linear model in an embodiment of the present application;
FIG. 7 is a schematic block diagram of a down-sampling filter in an embodiment of the present application;
fig. 8 is a schematic block diagram of a change from a luma component reconstruction block to a chroma component prediction block in an embodiment of the present application;
FIG. 9 is a schematic block diagram of a video coding system in an embodiment of the present application;
FIG. 10 is a schematic block diagram of a video encoder in an embodiment of the present application;
FIG. 11 is a schematic block diagram of a video decoder in an embodiment of the present application;
FIG. 12A is a flowchart illustrating an image encoding method according to an embodiment of the present application;
FIG. 12B is a diagram illustrating a horizontal down-sampling process according to an embodiment of the present disclosure;
FIG. 12C is a diagram illustrating a vertical down-sampling process according to an embodiment of the present disclosure;
FIG. 12D is a diagram illustrating a bi-directional down-sampling process according to an embodiment of the present application;
FIG. 13 is a flowchart illustrating an image decoding method according to an embodiment of the present application;
FIG. 14 is a block diagram of a functional unit of an image encoding apparatus according to an embodiment of the present application;
FIG. 15 is a block diagram showing another functional unit of the image encoding apparatus according to the embodiment of the present application;
FIG. 16 is a block diagram of a functional unit of an image decoding apparatus according to an embodiment of the present application;
fig. 17 is a block diagram of another functional unit of the image decoding apparatus in the embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present invention. Both the first client and the second client are clients, but they are not the same client.
First, terms and related techniques used in the embodiments of the present application will be described.
For the partition of images, in order to more flexibly represent Video contents, a Coding Tree Unit (CTU), a Coding Unit (CU), a Prediction Unit (PU), and a Transform Unit (TU) are defined in the High Efficiency Video Coding (HEVC) technology. The CTU, CU, PU, and TU are all image blocks.
A coding tree unit CTU, an image being composed of a plurality of CTUs, a CTU generally corresponding to a square image area, containing luminance pixels and chrominance pixels (or may contain only luminance pixels, or may contain only chrominance pixels) in the image area; syntax elements are also included in the CTU that indicate how the CTU is divided into at least one Coding Unit (CU), and the method of decoding each coding unit resulting in a reconstructed picture. As shown in fig. 1, the picture 10 is composed of a plurality of CTUs (including CTU a, CTU B, CTU C, etc.). The encoded information corresponding to a CTU includes luminance values and/or chrominance values of pixels in a square image region corresponding to the CTU. Furthermore, the coding information corresponding to a CTU may also contain syntax elements indicating how to divide the CTU into at least one CU and the method of decoding each CU to get the reconstructed picture. The image area corresponding to one CTU may include 64 × 64, 128 × 128, or 256 × 256 pixels. In one example, a CTU of 64 × 64 pixels comprises a rectangular pixel lattice of 64 columns of 64 pixels each, each pixel comprising a luminance component and/or a chrominance component. The CTUs may also correspond to rectangular image regions or image regions with other shapes, and an image region corresponding to one CTU may also be an image region in which the number of pixels in the horizontal direction is different from the number of pixels in the vertical direction, for example, including 64 × 128 pixels.
The coding unit CU, which usually corresponds to an a × B rectangular area in the image, contains a × B luminance pixels and/or its corresponding chrominance pixels, a being the width of the rectangle and B being the height of the rectangle, a and B may be the same or different, and a and B usually take values to the power of 2, to the integer, e.g. 128, 64, 32, 16, 8, 4. Here, the width referred to in the embodiment of the present application refers to a length in the X-axis direction (horizontal direction) in the two-dimensional rectangular coordinate system XoY shown in fig. 1, and the height refers to a length in the Y-axis direction (vertical direction) in the two-dimensional rectangular coordinate system XoY shown in fig. 1. The reconstructed image of a CU may be obtained by adding a predicted image, which is generated by intra prediction or inter prediction, specifically, may be composed of one or more Predicted Blocks (PB), and a residual image, which is generated by inverse quantization and inverse transform processing on transform coefficients, specifically, may be composed of one or more Transform Blocks (TB). Specifically, one CU includes coding information including information such as a prediction mode and a transform coefficient, and performs decoding processing such as corresponding prediction, inverse quantization, and inverse transform on the CU according to the coding information to generate a reconstructed image corresponding to the CU.
The prediction unit PU is a basic unit of intra prediction and inter prediction. Defining motion information of an image block to include an inter-frame prediction direction, a reference frame, a motion vector, and the like, wherein the image block undergoing encoding processing is called a Current Coding Block (CCB), the image block undergoing decoding processing is called a Current Decoding Block (CDB), and for example, when one image block is undergoing prediction processing, the current coding block or the current decoding block is a prediction block; when an image block is being residual processed, the currently encoded block or the currently decoded block is a transform block. The picture in which the current coding block or the current decoding block is located is called the current frame. In the current frame, image blocks located on the left or upper side of the current block may be inside the current frame and have completed encoding/decoding processing, resulting in reconstructed images, which are referred to as reconstructed blocks; information of the coding mode, reconstructed pixels, etc. of the reconstructed block is available (available). A frame in which the encoding/decoding process has been completed before the encoding/decoding of the current frame is referred to as a reconstructed frame. When the current frame is a uni-directionally predicted frame (P-frame) or a bi-directionally predicted frame (B-frame), it has one or two reference frame lists, respectively, referred to as L0 and L1, each of which contains at least one reconstructed frame, referred to as the reference frame of the current frame. The reference frame provides reference pixels for inter-frame prediction of the current frame.
And a transform unit TU for processing the residual between the original image block and the predicted image block.
The pixel (also called as a pixel) refers to a pixel in an image, such as a pixel in a coding unit, a pixel in a luminance component pixel block (also called as a luminance pixel), a pixel in a chrominance component pixel block (also called as a chrominance pixel), and the like.
The samples (also referred to as pixel values) refer to pixel values of pixels, the pixel values refer to luminance (i.e., gray level) in a luminance component domain, and the pixel values refer to chrominance values (i.e., color and saturation) in a chrominance component domain.
And intra-frame prediction, namely generating a prediction image of the current block according to the spatial adjacent pixels of the current block. An intra prediction mode corresponds to a method of generating a prediction image. The division of the intra-frame prediction unit comprises a 2 Nx 2N division mode and an Nx N division mode, wherein the 2 Nx 2N division mode is that image blocks are not divided; the N × N division is to divide the image block into four equal-sized sub-image blocks.
Typically, digital video compression techniques work on video sequences whose color coding method is YCbCr, which may also be referred to as YUV, in a color format of 4:2:0, 4:2:2, or 4:4: 4. Where Y denotes brightness (Luma) that is a gray scale value, Cb denotes a blue Chrominance component, Cr denotes a red Chrominance component, and U and V denote Chrominance (Chroma) for describing color and saturation. In color format, 4:2:0 indicates 4 luminance components per 4 pixels, 2 chrominance components (yyycbcr), 4:2:2 indicates 4 luminance components per 4 pixels, 4 chrominance components (yyyycbcrcbccr), and 4:4:4 indicates full pixel display (yyycbcrcbcrcbcr), fig. 2 shows the component profiles for different color formats, where the circle is the Y component and the triangle is the UV component.
In a digital video encoding process, an encoder reads pixels and encodes raw video sequences in different color formats. A general digital encoder generally includes prediction, transformation and quantization, inverse transformation and inverse quantization, loop filtering, entropy coding, and the like, and is used to eliminate spatial, temporal, visual, and character redundancy. However, the human eye is more sensitive to changes in the luminance component and does not react strongly to changes in the chrominance component, so the original video sequence is typically encoded using YUV4:2:0 color format. Meanwhile, the digital video encoder adopts different prediction processes for the luminance component and the chrominance component in the intra-frame coding part, the prediction of the luminance component is more delicate and complex, and the prediction of the chrominance component is generally simpler. The Cross Component Prediction (CCP) mode is a technique of existing digital video coding that acts on a luminance Component and a chrominance Component to increase a video compression ratio.
A cross-component prediction mode implementation is used in intra coding, the method including determining a Linear Model (Linear Model) for predicting a chroma Block (chroma Block) using training samples of the luma Block (luma Block), and determining samples of the chroma Block using the samples of the luma Block and the Linear Model. The luma block and the chroma block are pixel blocks of the coding unit in the luma component and the chroma component, the digital video encoder usually reads an original video sequence into a frame-by-frame image and divides the image into coding tree units CTU, and the coding tree units can be continuously divided into coding units CU of different sizes and the same size, the specific coding process is performed in the coding units of different components, and the relationship between the coding tree units and the coding units is shown in fig. 3.
Example of Cross Component Prediction (CCP): in the latest Video Coding (VVC) standard, a Cross Component Linear Model (CCLM) is used to reduce redundancy between components. The linear model is obtained by training original samples and reconstructed samples of adjacent pixels of an original pixel block of a luminance component of a current coding unit, wherein the sample information of the adjacent pixels comprises the original samples and the reconstructed samples of adjacent pixels on the upper side of the original pixel block of the luminance component of the current coding unit, the original samples and the reconstructed samples of adjacent pixels on the upper right side of the original pixel block of the luminance component of the current coding unit, the original samples and the reconstructed samples of adjacent pixels on the left side of the original pixel block of the luminance component of the current coding unit, and the original samples and the reconstructed samples of adjacent pixels on the lower left side of the original pixel block of the luminance component of the current coding unit. Fig. 4 shows an example of the positional relationship of the original pixel block and the neighboring pixels of a luminance component of 8x8 and the original predicted pixel block and the neighboring pixels of a chrominance component of 4x4 under the color format YUV4:2:0, respectively.
In the current coding unit, the prediction samples of the pixels in the chroma component prediction block are obtained by performing linear model calculation and downsampling on reconstructed samples of the pixels in the original pixel block of the luminance component of the current coding unit, wherein the linear model calculation process is represented as follows:
Pred C (i,j)=α·Rec L (i,j)+β (1)
where (i, j) is the coordinate of the pixel, i specifically refers to the abscissa of the prediction block of the chroma component of the current coding unit, and is in the range of [0, width-1 ]]Step size is 1, width is the width of the prediction block of the chroma component of the current coding unit, and the values can be 4, 8, 16 and 32; j specifically refers to the ordinate of the prediction block of the chroma component of the current coding unit, which ranges from [0, height-1]Step size is 1, height is the height of the prediction block of the chroma component of the current coding unit, and can be 4, 8, 16 and 32, Rec L Being reconstructed samples of pixels in the original block of pixels of the luminance component, Pred c Alpha, beta are coefficients of a linear model, being prediction samples of pixels in a prediction block of a chroma component.
The CCLM technology of VVC includes LM, LM _ L, and LM _ a modes. Where LM _ L computes the linear model using only the left-hand neighboring sample, and LM _ A computes the linear model using only the upper-hand neighboring sample.
In another example of Cross-component Prediction, the Cross-component technical proposal M4612, which is newly adopted by the china digital Video coding Standard (AVS), is a Two-Step Cross-component Prediction Mode (TSCPM). In the encoding process, as shown in fig. 5A, Intra-coded luminance components are calculated for 65 Intra Prediction modes (Intra Prediction modes) at most, DC denotes a mean mode, Plane denotes a planar mode, Bilinear denotes a Bilinear mode, and Zone denotes an area. And selecting an optimal result according to the Rate Distortion (Rate distorsion) cost, and transmitting the intra-frame prediction mode, the corresponding prediction residual error and the like. The intra-coded chroma components in the current coding unit are subjected to calculation of at most 11 chroma component intra-frame prediction modes, wherein the calculation comprises calculation of 5 chroma component intra-frame prediction modes which refer to single chroma component information and calculation of 6 chroma component intra-frame prediction modes which refer to multi-component information, and the intra-frame chroma prediction mode which refers to the single chroma component information is a chroma component common intra-frame prediction mode.
When the chroma component normal intra-frame prediction mode is used for the pixels of the prediction block of the chroma components, the current chroma coding block calculates the prediction samples of the current chroma coding block according to the available information of the reconstruction samples of the adjacent prediction block of the chroma components and the corresponding chroma component intra-frame prediction mode. Reference pixels of adjacent prediction blocks selected by different prediction modes are not consistent, part of the prediction modes can directly use reconstructed samples of pixels of adjacent coding blocks to calculate prediction samples, and part of the prediction modes need to interpolate the reconstructed samples of the pixels of the adjacent coding blocks and then select the reference pixels to calculate the prediction samples of the current coding block. Fig. 5B shows a schematic diagram of intra prediction modes with a coding block size of 8X8, where (1) is a normal intra vertical type angle prediction mode that uses the reference pixels of the upper neighboring block to calculate the prediction samples of the current coding block, (2) is a normal intra horizontal type angle prediction mode that uses the reference pixels of the left neighboring block to calculate the prediction samples of the current coding block, and (3) is a normal intra non-angle prediction mode that uses the reference pixels of both the upper and left neighboring blocks to calculate the prediction samples of the current coding block.
When performing cross-component technique prediction on pixels of a prediction block of chrominance components, reconstructed samples of neighboring pixels of the original pixel block of the luminance component of the current coding unit and reconstructed samples of neighboring pixels of the original prediction pixel block of the chrominance components of the current coding unit are used for calculation of a linear model. The adjacent pixels of the original pixel block of the brightness component comprise an upper adjacent pixel and a left adjacent pixel of the original pixel block of the brightness component of the current coding unit; the above-mentioned neighboring pixels of the prediction block of the chroma component include upper neighboring pixels and left neighboring pixels of the prediction block of the current coding unit chroma component.
When a reconstructed sample is selected as a reference sample for calculating coefficients of the linear model, in combination with availability of reconstructed samples of adjacent pixels, a combination of reconstructed samples of two pixels in upper adjacent pixels and reconstructed samples of two pixels in left adjacent pixels may be adopted, reconstructed samples of four pixels in upper adjacent pixels may be adopted, and reconstructed samples of four pixels in left adjacent pixels may be adopted.
According to the above mentioned selection of the reference samples, the prediction mode includes, if the reconstructed samples of the upper side neighboring pixels of the original pixel block of the luminance component and the original pixel block of the chrominance component (referred to as the original pixel block collectively for convenience of description) corresponding to the current coding unit and the reconstructed samples of the left side neighboring pixels of the original pixel block of the current coding unit are available, and the reference samples used for the coefficient calculation of the linear model are from both the upper side and the left side neighboring pixels, or if the original pixel block corresponding to the current coding unit only has the reconstructed samples of the upper side neighboring pixels available, and the reference samples used for the coefficient calculation of the linear model only have the reconstructed samples of the upper side neighboring pixels available, or if the original pixel block corresponding to the current coding unit only has the reconstructed samples of the left side neighboring pixels available, and the reference samples used for the coefficient calculation of the linear model only have the reconstructed samples of the left side neighboring pixels available, are all TSCPM mode; if the reconstructed samples of the upper side adjacent pixels of the original pixel block corresponding to the current coding unit and the reconstructed samples of the left side adjacent pixels of the original pixel block corresponding to the current coding unit are available, and the reference sample adopted for calculating the coefficient of the linear model is the TSCPM _ T mode when only the reconstructed sample of the upper side adjacent pixels is selected; and if the reconstructed samples of the upper adjacent pixel of the original pixel block corresponding to the current coding unit and the reconstructed samples of the left adjacent pixel of the original pixel block corresponding to the current coding unit are available and the reference sample adopted for calculating the coefficient of the linear model only selects the reconstructed sample of the upper adjacent pixel, the model is in the TSCPM _ L mode.
In the reference samples used for calculating the coefficients of the linear model, as shown in fig. 6, if the reference samples are from adjacent pixels on both sides of the original pixel block corresponding to the current coding unit, the upper reference sample selects a reconstructed sample of a leftmost pixel in the upper adjacent pixels and a reconstructed sample of a rightmost pixel on the upper side of the width of the original pixel block corresponding to the current coding unit, and the left reference sample selects a reconstructed sample of a topmost pixel in the left adjacent pixels and a reconstructed sample of a bottommost pixel in the left adjacent pixels at the height of the original pixel block corresponding to the current coding unit; if the reference sample for calculating the coefficient of the linear model only comes from the upper side, selecting the reconstructed samples of the pixels with four continuous step lengths in the upper side adjacent pixels by taking the quarter distance of the width of the original pixel block corresponding to the current coding unit as the step length; if the reference sample only comes from the left side, the distance of one fourth of the height of the original pixel block corresponding to the current coding unit is taken as the step length, and the reconstructed samples of the pixels with four continuous step lengths in the four left-side adjacent pixels are selected.
That is, the neighboring pixels of the four luminance components and the neighboring pixels of the four chrominance components can be selected in three ways.
The first method is as follows: when two adjacent pixels are selected from the upper side adjacent coding block and the left side adjacent coding block respectively, the adjacent pixels can be determined to be selected by the following formula:
minStep=min(Width,Height);
TopIndex=(minStep–1)*Width/minStep;
LeftIndex=(minStep–1)*Height/minStep;
in the above equation, min (x, y) returns the smaller value of x and y, Width is the Width of the chrominance component of the current coding block, Height is the Height of the chrominance component of the current coding block, TopIndex is the index value of another adjacent pixel except the first adjacent pixel when the upper boundary adjacent pixel is selected, and LeftIndex is the index value of another adjacent pixel except the first adjacent pixel when the left boundary adjacent pixel is selected;
the second method comprises the following steps: when only four adjacent pixels are selected from the upper adjacent coding block, starting from the first adjacent pixel at the leftmost side, and taking the width of one fourth of the chrominance component of the current coding block as a step length, selecting four luminance component adjacent pixels and four chrominance component adjacent pixels;
the third method comprises the following steps: when only four adjacent pixels are selected from the left adjacent coding block, starting from the first adjacent pixel at the top, and taking the height of one fourth of the chroma component of the current coding block as a step length, selecting four adjacent pixels of the brightness component and four adjacent pixels of the chroma component;
in the above-mentioned specific example AVS3, the linear model calculation formula of the cross-component technique is the same as the above-mentioned formula (1), where α and β can be calculated by the following formula:
Figure BDA0003691739840000071
β=Y Min -α·X Min (3)
wherein, Y Max Is the average of two largest reconstructed samples among the reconstructed samples of a plurality of adjacent pixels of the original block of pixels of the calculated chrominance component of the coefficients of the linear model, Y Min Is the average of the two smallest reconstructed samples among the reconstructed samples of a plurality of adjacent pixels of the original block of pixels of the calculated chrominance component for the coefficients of the linear model. X Max Is the average of two largest reconstructed samples, X, of the reconstructed samples of a plurality of adjacent pixels of the original block of pixels of the calculated luminance component of the coefficients of the linear model Min Is the average of two smallest reconstructed samples among the reconstructed samples of a plurality of adjacent pixels of the original block of pixels of the calculated luminance component for the coefficients of the linear model.
And performing cross-component Prediction according to the calculated linear model, wherein a brightness component reconstruction Block of the current CU is used for generating a corresponding Chroma component Reference Prediction Block (Chroma Reference Prediction Pixel Block). Specifically, a reference prediction sample of a chroma component of each pixel of the current coding unit, which has the same size as the original pixel block of the luma component, is calculated according to equations (1)/(2) and (3). In a specific example, the input digital video color format is typically the YUV4:2:0 format, i.e., the chroma component predicts a block of one-fourth the size of the original block of pixels for the luma component. In order to obtain a corresponding chroma component prediction block with a correct size, the chroma component reference prediction block needs to perform half down-sampling on the horizontal direction and the vertical direction respectively, and the chroma component prediction block after down-sampling is one fourth of the original pixel block of the corresponding luminance component, so that the size requirement of color format constraint is met. The filter for downsampling the chrominance component reference prediction block adopts a two-tap downsampling filter with the same coefficient in the left boundary pixel region of the chrominance component reference prediction block, and adopts a six-tap downsampling filter with two different coefficients in other pixel regions.
The six-tap down-sampling filter with two different coefficients is shown in equation (4).
Figure BDA0003691739840000072
Wherein x, y are coordinates of pixel, P' C For a prediction sample of the luminance component of the current pixel, P 1 C And P 2 C Is a prediction sample of a chroma component of the current pixel.
The down-sampling filter with the same coefficient for the two taps is shown in equation (5).
Figure BDA0003691739840000073
Wherein x, y are coordinates of pixel, P' C For a prediction sample of the luminance component of the current pixel, P 1 C And P 2 C Is a prediction sample of a chroma component of the current pixel.
The downsampling filter is shown in fig. 7, where x1 represents multiplication by 1 and x2 represents multiplication by 2. Fig. 8 shows a schematic diagram of the cross-component technique from the luma component reconstruction block to the chroma component prediction block, where the luma component reconstruction block size of the coding unit is 8 × 8, the size of the corresponding chroma component reference prediction block is 8 × 8, and the size of the filtered chroma component prediction block is 4 × 4.
The AVS3 also adopts various cross-component prediction modes MCPM, wherein the three prediction modes MCPM are similar to the TSCPM prediction mode, the MCPM mode corresponds to the TSCPM mode, the MCPM _ T mode corresponds to the TSCPM _ T mode, and the MCPM _ L mode corresponds to the TSCPM _ L mode. However, the chroma component prediction process is different, the chroma U component prediction process of the three prediction modes of MCPM is consistent with the TSCPM mode, and the prediction block of the chroma V component is obtained by subtracting the reconstructed block of the U component from the temporary chroma prediction component block. The specific formula is as follows:
Pred C (x,y)=α′·Rec L (x,y)+β′ (6)
Pred Cr (x,y)=Pred C (x,y)-Rec Cb (x,y) (7)
in the above formulas (2) and (3), Pred C (x, y) is a prediction sample, Rec, located at pixel (x, y) in a prediction block of the chroma component L (x, y) is the reconstructed sample at pixel (x, y) in the reconstructed block of the luminance component, Pred C ' (x, y) is the prediction sample located at pixel (x, y) in the prediction block of the chroma component after downsampling, Rec cb (x, y) is the reconstructed sample of the U component at pixel (x, y) in the reconstructed block of the chrominance component, Pred Cr (x, y) are prediction samples of a V component located at a pixel (x, y) in a prediction block of the chrominance component, α 'and β' are linear parameter sums of U and V components, respectively, and the linear parameter calculations of the U and V components refer to equations (2) and (3). Currently, when an existing enhanced two-step cross-component prediction technology calculates a linear model by using all reconstructed samples from an upper side or a left side adjacent coding unit as reference information to obtain a reference prediction block of a chroma component of a current coding unit, if only reconstructed samples from an upper side adjacent pixel are taken, reference information of reconstructed samples from a left side adjacent pixel is lacked; if only reconstructed samples from the left side neighboring pixel are taken, reference information for reconstructed samples from the upper side neighboring pixel is lacking.
In the existing chroma component intra-frame prediction mode, when a pixel is selected as a reference pixel of the prediction mode, the relevance between some reference pixels and a current coding block is often ignored. The current coding block has spatial correlation with all adjacent pixels, and if only the upper adjacent pixel is taken, the reference information from the left adjacent pixel is lacked; if only from the left side neighboring pixel is taken, the reference information from the upper side neighboring pixel is lacking.
The existing chroma component common intra-frame prediction mode selects adjacent pixels in the corresponding direction as reference pixels according to the directionality of the prediction mode, however, a certain relevance exists between a current coding block and adjacent pixels which are not in the direction, the prediction effect of only referring to the adjacent pixels in a single direction is not good enough, and the reference information of other adjacent pixels is wasted. The existing cross-component chroma prediction mode singly selects upper side or left side adjacent pixels as reference pixels to calculate a linear model according to the prediction mode, and has some problems, if the upper side adjacent pixels are singly selected as the reference pixels, the spatial relevance of a current coding block and a left side coding block is ignored; if the left adjacent pixel is singly selected as the reference pixel, the spatial correlation between the current coding block and the upper coding block is ignored.
This prediction wastes a lot of available reference information and does not predict the sample values of the chroma components of the current coding unit well, and coding efficiency is lost.
In order to solve the above technical problems, the present application proposes the following design ideas,
and performing prediction correction on the prediction block obtained by calculating the chroma component common intra-frame prediction mode.
If the current coding block only selects the upper side chroma component adjacent pixel as the reference pixel to calculate the prediction sample of the current coding block, then the left side chroma component adjacent pixel is used as the reference pixel to carry out prediction correction on the prediction sample of the chroma component of the current coding block;
if the current coding block only selects the left side chroma component adjacent pixel as the reference pixel to calculate the prediction sample of the current coding block, the upper side chroma component adjacent pixel is adopted as the reference pixel to carry out prediction correction on the prediction sample of the chroma component of the current coding block;
if the current coding block adopts a chroma component common intra-frame non-angle prediction mode, prediction correction is carried out on prediction samples of the chroma component of the current coding block by adopting upper-side and left-side chroma component adjacent pixels as reference pixels.
And carrying out prediction correction on the prediction sample obtained by the calculation of the chrominance component cross-component prediction mode.
If the current coding block only selects the upper side brightness component adjacent pixel and the upper side chroma component adjacent pixel to calculate the linear model, then the left side chroma component adjacent pixel is used as a reference pixel to carry out prediction correction on a prediction sample of the chroma component of the current coding block;
if the current coding block only selects the left-side brightness component adjacent pixel and the left-side chroma component adjacent pixel to calculate the linear model, the upper-side chroma component adjacent pixel is used as a reference pixel to carry out prediction correction on the prediction sample of the chroma component of the current coding block.
The prediction sample prediction correction of the current coding block comprises the steps of using the distance between the current pixel and a reference adjacent pixel as a filter coefficient index value, using the size of the current coding block as a filter coefficient group index value, searching a chroma component intra-frame prediction filter coefficient group according to the filter coefficient group index value, finding a chroma component intra-frame prediction filter coefficient in the group according to the filter coefficient index value, and calculating a corrected prediction sample according to the searched filter coefficient and a prediction correction formula.
Specifically, at the encoding end, it is first determined whether the current encoding block can use the prediction correction technique for the chrominance component.
If the prediction correction of the chroma component is used, the intra-frame prediction is carried out on the brightness component of the current coding block, the prediction sample correction is carried out on the prediction sample after the prediction is finished, then the intra-frame prediction is carried out on the chroma component of the current coding block, and the prediction correction is carried out on the prediction sample after the prediction is finished.
The above prediction correction for the current coding block includes a transmission required flag and a transmission not required flag to indicate whether the current coding block uses the chroma component.
If the current prediction correction technology needs to transmit the identification bit, judging whether the prediction correction technology of intra-frame prediction is used or not according to the rate distortion cost calculated by the uncorrected prediction sample and the corrected prediction sample,
if the rate distortion cost calculated by aiming at the uncorrected prediction sample is low, the current coding block does not use the prediction correction technology of intra-frame prediction, and the flag bit is transmitted and expressed as no;
if the rate distortion cost calculated by aiming at the prediction sample after prediction correction is smaller, the current chroma component coding block uses the prediction correction technology of intra-frame prediction, and the flag bit is transmitted and expressed as true;
if the current prediction correction technology does not need to transmit the identification bit, the prediction correction is directly used for the prediction sample of the current coding block, and the corrected prediction sample is obtained.
Specifically, at the decoding end, whether the current code stream can use the prediction correction technology of the intra-frame prediction of the chroma component is firstly analyzed and obtained.
If the prediction correction technology can be used, analyzing the code stream to obtain the prediction mode of the current chrominance component of the current decoding block, and selecting a specific adjacent pixel as a reference pixel to perform prediction correction on the prediction sample of the current decoding block.
The above process of performing prediction correction on the prediction samples of the current decoding block includes that the current decoding block needs an identification bit to indicate whether the prediction correction technology is used and does not need the identification bit to indicate whether the prediction correction technology is used.
And if the current decoding block needs the identification bit to indicate whether a prediction correction technology is used, analyzing the code stream of the current decoding block to acquire the identification bit value and the prediction mode of the chrominance component.
If the value of the identification bit is true, a prediction sample is calculated according to the prediction mode of the current chroma component.
If the upper adjacent pixel is selected as the reference pixel in the calculation of the prediction sample, the left adjacent pixel is taken as the reference pixel to carry out prediction correction on the prediction sample;
if the left adjacent pixel is selected as the reference pixel in the calculation of the prediction sample, the upper adjacent pixel is taken as the reference pixel to carry out prediction correction on the prediction sample;
if the numerical value of the identification bit value is not, calculating to obtain a prediction sample according to the prediction mode of the current chrominance component, and not filtering the prediction sample;
if the current decoding block does not need the identification bit to indicate whether a prediction correction technology is used, analyzing the code stream of the current decoding block to obtain the prediction mode of the chrominance component, and calculating according to the prediction mode of the current chrominance component to obtain a prediction sample.
If the upper adjacent pixel of the calculation decoding block is selected as the reference pixel, the left adjacent pixel is taken as the reference pixel to carry out prediction correction on the prediction sample;
and if the left adjacent pixel is selected as the reference pixel by the calculation decoding block, the upper adjacent pixel is taken as the reference pixel to carry out prediction correction on the prediction sample.
According to the embodiment of the application, the prediction sample of the chroma component of the current coding block is corrected by utilizing the spatial correlation between the adjacent coding block and the current coding block, so that the prediction accuracy and the coding efficiency are improved.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
FIG. 9 is a block diagram of a video coding system 1 of one example described in an embodiment of the present application. As used herein, the term "video coder" generally refers to both video encoders and video decoders. In this application, the term "video coding" or "coding" may generally refer to video encoding or video decoding. The video encoder 100 and the video decoder 200 of the video coding system 1 are used to implement the cross-component prediction method proposed in the present application.
As shown in fig. 9, video coding system 1 includes a source device 10 and a destination device 20. Source device 10 generates encoded video data. Accordingly, source device 10 may be referred to as a video encoding device. Destination device 20 may decode the encoded video data generated by source device 10. Accordingly, the destination device 20 may be referred to as a video decoding device. Various implementations of source device 10, destination device 20, or both may include one or more processors and memory coupled to the one or more processors. The memory can include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures that can be accessed by a computer, as described herein.
Source device 10 and destination device 20 may comprise a variety of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
Destination device 20 may receive encoded video data from source device 10 via link 30. Link 30 may comprise one or more media or devices capable of moving encoded video data from source device 10 to destination device 20. In one example, link 30 may comprise one or more communication media that enable source device 10 to transmit encoded video data directly to destination device 20 in real-time. In this example, source device 10 may modulate the encoded video data according to a communication standard, such as a wireless communication protocol, and may transmit the modulated video data to destination device 20. The one or more communication media may include wireless and/or wired communication media such as a Radio Frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the internet). The one or more communication media may include a router, switch, base station, or other apparatus that facilitates communication from source device 10 to destination device 20. In another example, encoded data may be output from output interface 140 to storage device 40.
The image codec techniques of this application may be applied to video codecs to support a variety of multimedia applications, such as over-the-air television broadcasts, cable television transmissions, satellite television transmissions, streaming video transmissions (e.g., via the internet), encoding for video data stored on a data storage medium, decoding of video data stored on a data storage medium, or other applications. In some examples, video coding system 1 may be used to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
The video coding system 1 illustrated in fig. 9 is merely an example, and the techniques of this application may be applied to video coding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between an encoding device and a decoding device. In other examples, the data is retrieved from local storage, streamed over a network, and so forth. A video encoding device may encode and store data to a memory, and/or a video decoding device may retrieve and decode data from a memory. In many examples, the encoding and decoding are performed by devices that do not communicate with each other, but merely encode data to and/or retrieve data from memory and decode data.
In the example of fig. 9, source device 10 includes video source 120, video encoder 100, and output interface 140. In some examples, output interface 140 may include a regulator/demodulator (modem) and/or a transmitter. Video source 120 may comprise a video capture device (e.g., a video camera), a video archive containing previously captured video data, a video feed interface to receive video data from a video content provider, and/or a computer graphics system for generating video data, or a combination of such sources of video data.
Video encoder 100 may encode video data from video source 120. In some examples, source device 10 transmits the encoded video data directly to destination device 20 via output interface 140. In other examples, encoded video data may also be stored onto storage device 40 for later access by destination device 20 for decoding and/or playback.
In the example of fig. 9, destination device 20 includes input interface 240, video decoder 200, and display device 220. In some examples, input interface 240 includes a receiver and/or a modem. Input interface 240 may receive encoded video data via link 30 and/or from storage device 40. The display device 220 may be integrated with the destination device 20 or may be external to the destination device 20. In general, display device 220 displays decoded video data. The display device 220 may include a variety of display devices, such as a Liquid Crystal Display (LCD), a plasma display, an Organic Light Emitting Diode (OLED) display, or other types of display devices.
Although not shown in fig. 9, in some aspects, video encoder 100 and video decoder 200 may each be integrated with an audio encoder and decoder, and may include appropriate multiplexer-demultiplexer units or other hardware and software to handle encoding of both audio and video in a common data stream or separate data streams.
Video encoder 100 and video decoder 200 may each be implemented as any of a variety of circuits such as: one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic, hardware, or any combinations thereof. If the present application is implemented in part in software, a device may store instructions for the software in a suitable non-volatile computer-readable storage medium and may execute the instructions in hardware using one or more processors to implement the techniques of the present application. Any of the foregoing, including hardware, software, a combination of hardware and software, etc., may be considered one or more processors. Each of video encoder 100 and video decoder 200 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder/decoder (codec) in a respective device.
Fig. 10 is an exemplary block diagram of a video encoder 100 described in embodiments of the present application. The video encoder 100 is used to output the video to the post-processing entity 41. Post-processing entity 41 represents an example of a video entity, such as a media-aware network element (MANE) or a splicing/editing device, that may process the encoded video data from video encoder 100. In some cases, post-processing entity 41 may be an instance of a network entity. In some video encoding systems, post-processing entity 41 and video encoder 100 may be parts of separate devices, while in other cases, the functionality described with respect to post-processing entity 41 may be performed by the same device that includes video encoder 100. In some example, post-processing entity 41 is an example of storage 40 of FIG. 1.
In the example of fig. 10, the video encoder 100 includes a prediction processing unit 108, a filter unit 106, a memory 107, a summer 112, a transformer 101, a quantizer 102, and an entropy encoder 103. The prediction processing unit 108 includes an inter predictor 110 and an intra predictor 109. For image block reconstruction, the video encoder 100 further includes an inverse quantizer 104, an inverse transformer 105, and a summer 111. Filter unit 106 represents one or more loop filters, such as deblocking filters, Adaptive Loop Filters (ALF), and Sample Adaptive Offset (SAO) filters. Although filter unit 106 is shown in fig. 10 as an in-loop filter, in other implementations, filter unit 106 may be implemented as a post-loop filter. In one example, the video encoder 100 may further include a video data memory, a partitioning unit (not shown).
Video encoder 100 receives video data and stores the video data in a video data memory. The partitioning unit partitions the video data into image blocks and these image blocks may be further partitioned into smaller blocks, e.g. image block partitions based on a quadtree structure or a binary tree structure. Prediction processing unit 108 may select one of a plurality of possible coding modes for the current image block, such as one of a plurality of intra coding modes or one of a plurality of inter coding modes. Prediction processing unit 108 may provide the resulting intra, inter coded block to summer 112 to generate a residual block and to summer 111 to reconstruct the encoded block used as the reference picture. An intra predictor 109 within prediction processing unit 108 may perform intra-predictive encoding of the current block relative to one or more neighboring blocks in the same frame or slice as the current block to be encoded to remove spatial redundancy. Inter predictor 110 within prediction processing unit 108 may perform inter-predictive coding of the current tile relative to one or more prediction blocks in one or more reference pictures to remove temporal redundancy. The prediction processing unit 108 provides information indicating the selected intra or inter prediction mode of the current image block to the entropy encoder 103 so that the entropy encoder 103 encodes the information indicating the selected inter prediction mode.
After prediction processing unit 108 generates a prediction block for the current image block via inter/intra prediction, video encoder 100 forms a residual image block by subtracting the prediction block from the current image block to be encoded. Summer 112 represents one or more components that perform this subtraction operation. The residual video data in the residual block may be included in one or more TUs and applied to transformer 101. The transformer 101 transforms the residual video data into residual transform coefficients using a transform such as a Discrete Cosine Transform (DCT) or a conceptually similar transform. Transformer 101 may convert residual video data from a pixel value domain to a transform domain, e.g., the frequency domain.
The transformer 101 may send the resulting transform coefficients to the quantizer 102. Quantizer 102 quantizes the transform coefficients to further reduce the bit rate. In some examples, quantizer 102 may then perform a scan of a matrix that includes quantized transform coefficients. Alternatively, the entropy encoder 103 may perform a scan.
After quantization, the entropy encoder 103 entropy encodes the quantized transform coefficients. For example, the entropy encoder 103 may perform Context Adaptive Variable Length Coding (CAVLC), Context Adaptive Binary Arithmetic Coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), Probability Interval Partition Entropy (PIPE) coding, or another entropy encoding method or technique. After entropy encoding by the entropy encoder 103, the encoded codestream may be transmitted to the video decoder 200, or archived for later transmission or retrieved by the video decoder 200. The entropy encoder 103 may also entropy encode syntax elements of the current image block to be encoded.
Inverse quantizer 104 and inverse transformer 105 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain, e.g., for later use as a reference block for a reference image. The summer 111 adds the reconstructed residual block to the prediction block produced by the inter predictor 110 or the intra predictor 109 to produce a reconstructed image block. The filter unit 106 may be adapted to reconstruct the image block to reduce distortions, such as block artifacts. This reconstructed image block is then stored in memory 107 as a reference block, which may be used by inter predictor 110 as a reference block to inter predict a block in a subsequent video frame or image.
Specifically, the video encoder 100 specifically executes the image encoding method provided in the embodiment of the present application, and the input video is divided into a plurality of coding tree units, and each coding tree unit is further divided into a plurality of coding units in a rectangular or square shape. When the current coding unit selects the intra-frame prediction mode for coding, the luminance component of the current coding unit is subjected to calculation traversal of a plurality of prediction modes, the optimal prediction mode is selected according to the rate distortion cost, and the chrominance component of the current coding unit is subjected to calculation traversal of the plurality of prediction modes, and the optimal prediction mode is selected according to the rate distortion cost. And then, calculating a residual between the original video block and the prediction block, wherein one subsequent path of the residual forms an output code stream through change, quantization, entropy coding and the like, and the other path of the residual forms a reconstruction sample through inverse transformation, inverse quantization, loop filtering and the like to be used as reference information of subsequent video compression.
The intra predictor 109 may also provide information indicating the selected intra prediction mode of the current coding unit to the entropy encoder 103 so that the entropy encoder 103 encodes the information indicating the selected intra prediction mode.
Fig. 11 is an exemplary block diagram of a video decoder 200 described in the embodiments of the present application. In the example of fig. 11, the video decoder 200 includes an entropy decoder 203, a prediction processing unit 208, an inverse quantizer 204, an inverse transformer 205, a summer 211, a filter unit 206, and a memory 207. The prediction processing unit 208 may include an inter predictor 210 and an intra predictor 209. In some examples, video decoder 200 may perform a decoding process that is substantially reciprocal to the encoding process described with respect to video encoder 100 from fig. 10.
In the decoding process, video decoder 200 receives an encoded video bitstream representing an image block and associated syntax elements of an encoded video slice from video encoder 100. Video decoder 200 may receive video data from network entity 42 and, optionally, may store the video data in a video data store (not shown). The video data memory may store video data, such as encoded video streams, to be decoded by components of video decoder 200. The video data stored in the video data memory may be obtained, for example, from storage device 40, from a local video source such as a camera, via wired or wireless network communication of video data, or by accessing a physical data storage medium. The video data memory may serve as a decoded picture buffer (CPB) for storing encoded video data from the encoded video bitstream.
Network entity 42 may be, for example, a server, a MANE, a video editor/splicer, or other such device for implementing one or more of the techniques described above. Network entity 42 may or may not include a video encoder, such as video encoder 100. Network entity 42 may implement portions of the techniques described in this application before network entity 42 sends the encoded video bitstream to video decoder 200. In some video decoding systems, network entity 42 and video decoder 200 may be part of separate devices, while in other cases, the functionality described with respect to network entity 42 may be performed by the same device that includes video decoder 200.
The entropy decoder 203 of the video decoder 200 entropy decodes the bitstream to produce quantized coefficients and some syntax elements. The entropy decoder 203 forwards the syntax elements to the prediction processing unit 208. Video decoder 200 may receive syntax elements at the video slice level and/or the picture block level. When a video slice is decoded as an intra-decoded (I) slice, intra predictor 209 of prediction processing unit 208 generates a prediction block for an image block of the current video slice based on the signaled intra prediction mode and data from previously decoded blocks of the current frame or picture. When a video slice is decoded as an inter-decoded (i.e., B or P) slice, the inter predictor 210 of the prediction processing unit 208 may determine an inter prediction mode for decoding a current image block of the current video slice based on syntax elements received from the entropy decoder 203, decode the current image block (e.g., perform inter prediction) based on the determined inter prediction mode.
The inverse quantizer 204 inversely quantizes, i.e., dequantizes, the quantized transform coefficients provided in the code stream and decoded by the entropy decoder 203. The inverse quantization process may include: the quantization parameter calculated by the video encoder 100 for each image block in the video slice is used to determine the degree of quantization that should be applied and likewise the degree of inverse quantization that should be applied. Inverse transformer 205 applies an inverse transform, such as an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients in order to generate a block of residues in the pixel domain.
After the inter predictor 210 generates a prediction block for the current image block or a sub-block of the current image block, the video decoder 200 obtains a reconstructed block, i.e., a decoded image block, by summing the residual block from the inverse transformer 205 with the corresponding prediction block generated by the inter predictor 210. Summer 211 represents the component that performs this summation operation. A loop filter (in or after the decoding loop) may also be used to smooth pixel transitions or otherwise improve video quality, if desired. Filter unit 206 may represent one or more loop filters, such as deblocking filters, Adaptive Loop Filters (ALF), and Sample Adaptive Offset (SAO) filters. Although the filter unit 206 is shown in fig. 11 as an in-loop filter, in other implementations, the filter unit 206 may be implemented as a post-loop filter.
The image decoding method specifically performed by the video decoder 200 includes obtaining a prediction mode index of a current coding unit after an input code stream is analyzed, inversely transformed, and inversely quantized.
If the prediction mode index of the chroma component of the current coding unit is an enhanced two-step cross-component prediction mode, selecting only reconstructed samples from upper side or left side adjacent pixels of the current coding unit according to an index value to perform calculation of a linear model, obtaining a reference prediction block of the chroma component of the current coding unit according to the calculation of the linear model, performing down-sampling, and performing prediction correction based on the correlation of boundary adjacent pixels in the orthogonal direction on the down-sampled prediction block to obtain a final prediction block of the chroma component.
One path of the subsequent code stream is used as reference information of subsequent video decoding, and the other path of the subsequent code stream is subjected to post-filtering processing to output a video signal.
It should be understood that other structural variations of the video decoder 200 may be used to decode the encoded video stream. For example, the video decoder 200 may generate an output video stream without processing by the filter unit 206; alternatively, for some image blocks or image frames, the entropy decoder 203 of the video decoder 200 does not decode quantized coefficients and accordingly does not need to be processed by the inverse quantizer 204 and the inverse transformer 205.
Specifically, the intra predictor 209 may use the image decoding method described in the embodiment of the present application in the generation of the prediction block.
Fig. 12A is a flowchart illustrating an image encoding method according to an embodiment of the present application, where the image encoding method can be applied to the source device 10 in the video decoding system 1 shown in fig. 9 or the video encoder 100 shown in fig. 10. The flow shown in fig. 12A is explained by taking as an example the execution subject of the video encoder 100 shown in fig. 10. As shown in fig. 12A, the cross-component prediction method provided in the embodiment of the present application includes:
step 110, dividing the image, and determining the chroma component intra-frame prediction mode of the current coding block.
The color format of the video to which the image belongs includes, but is not limited to, 4:2:0, 4:2:2, and the like.
For example, when the color format is 4:2:0, as shown in (c) of fig. 2, the pixel ratio of the original pixel block of the luminance component to the original pixel block of the chrominance component of the current coding block is 4:1, and taking a forward pixel array of 8 × 8 as an example, the size of the original pixel block of the corresponding luminance component is 8 × 8, and the size of the original pixel block of the corresponding chrominance component is 4 × 4.
For another example, when the color format is 4:2:2, as shown in (b) of fig. 2, the pixel ratio of the original pixel block of the luminance component to the original pixel block of the chrominance component of the current coding block is 2:1, and taking a forward pixel array of 8 × 8 as an example, the size of the corresponding original pixel block of the luminance component is 8 × 8, and the size of the corresponding original pixel block of the chrominance component is 8 × 4.
The chroma component intra-frame prediction mode performs at most 11 chroma component intra-frame prediction modes, wherein the chroma component intra-frame prediction modes include 5 chroma component intra-frame prediction modes which refer to single chroma component information and 6 chroma component intra-frame prediction modes which refer to multi-component information, and the intra-frame chroma prediction mode which refers to the single chroma component information is a chroma component common intra-frame prediction mode.
And 120, determining a prediction block of the chroma component of the current coding block according to the chroma component intra-frame prediction mode.
In this possible example, the determining a prediction block for a chroma component of the current coding block according to the chroma component intra prediction mode comprises: determining a reference pixel according to available information of reconstructed samples of adjacent pixels of the current coding block and the chroma component intra-frame prediction mode; determining a prediction block for a chroma component of the current coding block from the reference pixels.
In a specific implementation, for a case that the chroma component intra prediction mode adopts a common intra prediction mode, the prediction block of the chroma component may be determined in a manner agreed by a protocol, which is described in detail in the foregoing description of the common intra prediction mode and is not described herein again.
In this possible example, the determining a prediction block for a chroma component of the current coding block according to the chroma component intra prediction mode comprises: determining a brightness component intra-frame prediction mode of the current coding block; when the chroma component intra prediction mode indicates that a predicted value of a chroma component of the current coding block is determined using a luma component of the current coding block, determining a predicted block of the chroma component of the current coding block according to the luma component intra prediction mode.
As shown in fig. 5A, the intra-frame coding luminance component calculates 65 intra-frame prediction modes at most, and in a specific implementation, the luminance component calculates 62 angular prediction modes and 3 non-angular prediction modes at most and selects an optimal intra-frame prediction mode for transmission. The intra-frame prediction mode of the brightness component of the current coding block is a prediction mode with the optimal code rate distortion cost in a plurality of intra-frame prediction modes, and the plurality of intra-frame prediction modes are intra-frame prediction modes used for intra-frame prediction of the brightness component of the current coding block.
In this possible example, the determining a prediction block for a chroma component of the current coding block according to the luma component intra prediction mode comprises: determining a reference prediction block of a chrominance component of the current coding block according to the luminance component intra-frame prediction mode; and filtering the reference prediction block of the chrominance component of the current coding block to obtain the prediction block of the chrominance component of the current coding block.
In a specific implementation, the device may determine, when the luma component intra prediction mode is determined to be the preset intra prediction mode, that the chroma component intra prediction mode indicates to determine the predicted value of the chroma component of the current coding block using the luma component of the current coding block. The predetermined intra-prediction mode is a luminance component intra-prediction mode with a predetermined direction, including but not limited to a horizontal direction (e.g., along the X-axis direction in the two-dimensional rectangular coordinate system XoY shown in fig. 1), and a vertical direction (e.g., along the Y-axis direction in the two-dimensional rectangular coordinate system XoY shown in fig. 1).
In this possible example, the filtering of the reference prediction block for chroma components of the current coding block comprises: filtering a reference prediction block for a chroma component of the current coding block using a third filter.
In this possible example, the third filter includes a filter for filtering a left boundary pixel region of the reference prediction block of the chroma component and a filter for filtering a non-left boundary pixel region of the reference prediction block of the chroma component.
In this possible example, the filter for filtering the left boundary pixel region of the reference prediction block of the chroma component comprises a third two-tap filter; the third two-tap filter comprises:
P C (x,y)=(P′ C (2x,2y)+P′ C (2x,2y+1)+1)>>1
wherein x, y are coordinates of pixel, P' c Prediction samples for pixels in a reference prediction block for the chroma component,P c a prediction sample of a chroma component of a current pixel in a prediction block for the chroma component.
In this possible example, the filter for filtering the non-left boundary pixel region of the reference prediction block of the chroma component comprises a first six-tap filter; the first sixth tap filter comprises:
Figure BDA0003691739840000141
wherein x, y are the coordinates of the current pixel, P' c Prediction samples, P, for pixels in a reference prediction block of the chroma component c A prediction sample of a chroma component of a current pixel in a prediction block for the chroma component.
In this possible example, the determining a reference prediction block for a chroma component of the current coding block according to the luma component intra prediction mode comprises: determining a reconstructed block of the brightness component of the current coding block according to the brightness component intra-frame prediction mode; and determining a reference prediction block of a chrominance component of the current coding block according to a reconstructed block of a luminance component of the current coding block.
Wherein a size of the reference prediction block of the chrominance component is the same as a size of the reconstructed block of the luminance component. For example, the reconstructed block of the luminance component and the reference prediction block of the chrominance component in the prediction process shown in fig. 8 are 8 × 8 pixel arrays.
In this possible example, the determining a reference prediction block for a chroma component of the current coding block from a reconstructed block for a luma component of the current coding block comprises: determining a linear model for performing cross-component prediction by using a reconstructed block of the brightness component of the current coding block; and calculating a reconstruction block of the brightness component according to the linear model to obtain a reference prediction block of the chrominance component of the current coding block.
The linear model may be, for example, a linear model of the foregoing formula (1) or (2) (3).
In this possible example, the determining a linear model for cross-component prediction using a reconstructed block of a luma component of the current coding block includes: determining a reference pixel for computing the linear model, the reference pixel comprising at least one neighboring pixel of the currently encoded block; the linear model is calculated from the reference pixels.
The selection of the reference pixel for calculating the linear model can be extended to the adjacent pixels at the lower left side, the upper side and the upper right side of the current coding block.
Optionally, if the current coding block is a partial image block in the current coding block, the device may select a linear model adapted to the current coding block from the plurality of linear models, and specifically may select the adapted linear model for the current coding block according to the image characteristic, and since the coefficient of the linear model is not determined yet, the linear model needs to be calculated according to the reference pixel. Therefore, the device can provide a more refined prediction mechanism relative to the coding block aiming at the chroma component prediction of the current coding block, and realize more refined image prediction.
In this possible example, the determining a reference pixel for computing the linear model comprises: and determining a reference pixel for calculating the linear model according to available information of reconstructed samples of adjacent pixels of the current coding block and the chroma component intra-frame prediction mode.
Wherein the chroma component intra prediction mode of the current coding block comprises any one of TSCPM _ T, TSCPM _ L, MCPM _ T, MCPM _ L. The availability information specifically includes both available on both sides and available on one side (e.g., left available and right available). The details will be described below.
If the chroma component intra prediction mode of the current coding block is TSCPM _ T or MCPM _ T and the reconstructed samples of the upper side neighboring pixels of the original pixel block corresponding to the current coding block and the reconstructed samples of the left side neighboring pixels of the original pixel block corresponding to the current coding block are available, the reference neighboring pixels used for calculating the coefficients of the linear model are 4 of the upper side neighboring pixels of the original pixel block, as shown in (b) of fig. 6.
If the chroma component intra prediction mode of the current coding block is TSCPM _ L or MCPM _ L, and the reconstructed samples of the upper side neighboring pixels of the original pixel block corresponding to the current coding block and the reconstructed samples of the left side neighboring pixels of the original pixel block corresponding to the current coding block are available, the reference neighboring pixels used for calculating the coefficients of the linear model are 4 of the left side neighboring pixels of the original pixel block, as shown in (c) of fig. 6.
It can be seen that, in the present example, the reference neighboring pixels used for calculating the coefficients of the linear model can be flexibly set according to the availability of reconstructed samples of the neighboring pixels and the chroma component intra prediction mode.
In this possible example, the determining a reference pixel for computing the linear model comprises: and determining a reference pixel for calculating the linear model according to the brightness component intra-frame prediction mode with the optimal code rate distortion cost of the adjacent coding block of the current coding block.
The intra-frame prediction mode with the optimal rate distortion cost of the brightness component of the adjacent coding block may be the same as or different from the intra-frame prediction mode with the optimal rate distortion cost of the brightness component of the current coding block.
Step 130, performing prediction correction on the prediction block of the chroma component of the current coding block to obtain a corrected prediction block of the chroma component of the current coding block.
In this possible example, the performing prediction modification on the prediction block of the chroma component of the current coding block includes: determining a filter according to the chroma component intra-prediction mode; and performing prediction correction on a prediction block of the chroma component of the current coding block by using the filter.
In this possible example, the determining a filter according to the chroma component intra prediction mode includes: and when the chroma component intra-frame prediction mode is TSCPM _ T or MCPM _ T or a normal intra-frame vertical angle prediction mode, setting the filter as a first filter.
In this possible example, the first filter is configured to filter a pixel region adjacent to a left side boundary of a prediction block of a chroma component of the current coding block and a pixel region of a prediction block of a chroma component of the current coding block.
In this possible example, the first filter comprises a first two-tap filter; the first two-tap filter comprises:
P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
wherein x, y is the coordinate of the current pixel, the value of x does not exceed the wide range of the current coding block, the value of y does not exceed the high range of the current coding block, P' (x, y) is the final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the current coding block, P (-1, y) is the reconstructed sample of the pixel adjacent to the left side boundary in the y row, f (x) is the horizontal filter coefficient of the pixel (x, y) reference pixel P (-1, y), and P (x, y) is the original prediction sample of the pixel (x, y).
For example, as shown in fig. 12B, in the 4 × 4 pixel array, taking the pixels in the prediction block of the chroma component and the left-side boundary neighboring pixels as an example, first, the pixels a and the left-side boundary neighboring pixels 1 are down-sampled by using the first two-tap filter to form the pixels a of the prediction block after the correction of the chroma component, the pixels B and the left-side boundary neighboring pixels 1 are down-sampled by using the first two-tap filter to form the pixels B of the prediction block after the correction of the chroma component in the horizontal direction, and the other columns are so repeated until the pixels P and the left-side boundary neighboring pixels 4 are down-sampled by using the first two-tap filter to form the pixels P of the prediction block after the correction of the chroma component.
In this possible example, the horizontal filter coefficients are determined by a first set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (-1, y).
The value of the horizontal filter coefficient is related to the size of the chroma component of the current coding block and the distance between the prediction pixel and the left adjacent pixel in the prediction block of the current chroma component.
Specifically, the filter coefficients are selected according to the size of the chroma components of the current coding block, and are divided into different filter coefficient sets according to the size of the prediction block of the chroma components of the current coding block, and the corresponding filter coefficient set is selected according to the size of the prediction block of the current chroma components. The selection of the horizontal filter coefficient is related to the distance from the predicted pixel to the left adjacent pixel, the distance from the current predicted pixel to the left adjacent pixel is used as an index value, and the corresponding filter coefficient is selected from the corresponding filter coefficient group. The intra chroma prediction filter coefficients are specifically shown in table 1, and it should be noted that all the coefficients in the table can be amplified and shifted during a specific encoding process to reduce the computational complexity.
Table 1 intra chroma prediction filter coefficients
Figure BDA0003691739840000161
Figure BDA0003691739840000171
In addition, the filter coefficients of the technique can reduce coefficient storage by adopting a coefficient truncation mode, namely, the filter coefficients of all pixels with the distance between the current predicted pixel and the left adjacent pixel being more than 10 are consistent.
In this possible example, the determining a filter according to the chroma component intra prediction mode includes: and when the chroma component intra-frame prediction mode is TSCPM _ L or MCPM _ L or a common intra-frame horizontal angle prediction mode, setting the filter as a second filter.
In this possible example, the second filter is configured to filter a pixel region adjacent to an upper boundary of a prediction block of a chroma component of the current coding block and a pixel region of a prediction block of a chroma component of the current coding block.
In this possible example, the second filter comprises a second two-tap filter; the second two-tap filter comprises:
P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)
wherein X, y is the coordinate of the current pixel, X does not exceed the wide range of the current coding block, y does not exceed the high range of the current coding block, P' (X, y) is the final prediction sample of the pixel (X, y) of the prediction block of the chroma component of the current coding block, P (X, -1) is the reconstructed sample of the pixel adjacent to the upper boundary in the X column, f (y) is the vertical filter coefficient of the pixel (X, y) reference pixel P (X, -1), and P (X, y) is the original prediction sample of the pixel (X, y).
For example, as shown in fig. 12C, in the 4 × 4 pixel array, taking the pixels in the prediction block of the chroma component and the upper boundary adjacent pixels as an example, first, the pixel a and the upper boundary adjacent pixel 1 are down-sampled by using the second two-tap filter to form the pixel a of the corrected prediction block of the chroma component, and in the vertical direction, the pixel E and the upper boundary adjacent pixel 1 are down-sampled by using the second two-tap filter to form the pixel E of the corrected prediction block of the chroma component, and the other columns are left until the pixel P and the upper boundary adjacent pixel 4 are down-sampled by using the second two-tap filter to form the pixel P of the corrected prediction block of the chroma component.
In this possible example, the vertical filter coefficients are determined by a second set of parameters comprising the size of the prediction block of the chroma component and the distance between pixel (x, y) and pixel P (x, -1).
The value of the vertical filter coefficient is related to the size of the chroma component of the current coding block and the distance between the predicted pixel and the left adjacent pixel in the prediction block of the current chroma component.
Specifically, the filter coefficients are selected according to the size of the chroma components of the current coding block, and are divided into different filter coefficient groups according to the size of the prediction block of the chroma components of the current coding block, and the corresponding filter coefficient group is selected according to the size of the prediction block of the current chroma components. The selection of the vertical filter coefficient is related to the distance from the predicted pixel to the upper adjacent pixel, the distance from the current predicted pixel to the upper adjacent pixel is used as an index value, and the corresponding filter coefficient is selected from the corresponding filter coefficient group. The intra chroma prediction filter coefficients are specifically shown in table 1.
In this possible example, the determining a filter according to the chroma component intra prediction mode includes: when the chroma component intra prediction mode is a normal intra non-angular prediction mode, the filter is set to a third filter.
In this possible example, the third filter is configured to filter a pixel region adjacent to a left side boundary of a prediction block of a chroma component of the current coding block, a pixel region adjacent to an upper side boundary of the prediction block of the chroma component of the current coding block, and a pixel region of the prediction block of the chroma component of the current coding block.
In this possible example, the third filter comprises a first three-tap filter; the first third tap filter comprises:
P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)
wherein X, y is a coordinate of the current pixel, X does not exceed a wide range of values of the current coding block, y does not exceed a high range of values of the current coding block, P' (X, y) is a final predicted sample of a pixel (X, y) of a predicted block of chrominance components of the current coding block, P (-1, y) is a reconstructed sample of a pixel located in a y row adjacent to a left side boundary, P (X, -1) is a reconstructed sample of a pixel located in an X column adjacent to an upper side boundary, f (X) is a horizontal filter coefficient of a pixel (X, y) reference pixel P (-1, y), f (y) is a vertical filter coefficient of a pixel (X, y) reference pixel P (X, -1), and P (X, y) is an original predicted sample of the pixel (X, y).
For example, as shown in fig. 12D, in the 4 × 4 pixel array, taking the pixels in the prediction block of the chroma component, the upper boundary adjacent pixel and the left boundary adjacent pixel as an example, first, the pixel a, the upper boundary adjacent pixel 1 and the left adjacent pixel 5 are down-sampled by using the first three-tap filter to form the pixel a of the corrected prediction block of the chroma component, the pixel E, the upper boundary adjacent pixel 1 and the left boundary adjacent pixel 6 are down-sampled by using the first three-tap filter to form the pixel E of the corrected prediction block of the chroma component in the vertical direction, and the other columns are so repeated until the pixel P, the upper boundary adjacent pixel 4 and the left boundary adjacent pixel 8 are down-sampled by using the first three-tap filter to form the pixel P of the corrected prediction block of the chroma component.
In this possible example, the horizontal filter coefficients are determined by a first set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (-1, y);
the vertical filter coefficients are determined by a second set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (x, -1).
The values of the vertical filter coefficient and the horizontal filter coefficient are related to the size of the chroma component of the current coding block and the distance between the predicted pixel and the left adjacent pixel in the prediction block of the current chroma component.
Specifically, the filter coefficients are selected according to the size of the chroma components of the current coding block, and are divided into different filter coefficient groups according to the size of the prediction block of the chroma components of the current coding block, and the corresponding filter coefficient group is selected according to the size of the prediction block of the current chroma components. The selection of the vertical filter coefficient is related to the distance from the predicted pixel to the upper adjacent pixel, the distance from the current predicted pixel to the upper adjacent pixel is used as an index value, and the corresponding filter coefficient is selected from the corresponding filter coefficient group. The intra chroma prediction filter coefficients are specifically shown in table 1.
In addition, the filter coefficients of the technique can reduce coefficient storage by adopting a coefficient truncation mode, namely, the filter coefficients of all pixels with the distance between the current predicted pixel and the upper adjacent pixel being more than 10 are consistent.
In a specific implementation, after the prediction block of the current coding block after the correction of the chroma component is determined, the device may further calculate a reconstructed block of the chroma component, and determine a reconstructed image block of the current coding block according to the reconstructed block of the chroma component and the reconstructed block of the luma component.
Therefore, compared with the prior art, the prediction sample of the chroma component of the current coding block is corrected by using the spatial correlation between the adjacent coding block and the current coding block in the scheme of the application, so that the prediction accuracy and the coding efficiency are improved.
In one possible example, the performing prediction modification on the prediction block of the chroma component of the current coding block includes: calculating a first rate distortion cost of the current coding block under the unmodified condition and calculating a second rate distortion cost of the current coding block under the modified condition; determining that the first rate-distortion cost is greater than the second rate-distortion cost; and performing prediction correction on the prediction block of the chroma component of the current coding block.
As can be seen, in this example, the number of times of rate distortion cost calculation is not increased, and additional rate distortion cost calculation is not required, thereby avoiding a large increase in calculation complexity.
In one possible example, the performing prediction modification on the prediction block of the chroma component of the current coding block includes: calculating a first rate distortion cost of the current coding block under the unmodified condition and calculating a second rate distortion cost of the current coding block under the modified condition; determining that the first rate distortion cost is greater than the second rate distortion cost, and setting a chrominance correction identification bit as a first numerical value, wherein the first numerical value is used for indicating that the prediction correction needs to be carried out; and performing prediction correction on the prediction block of the chroma component of the current coding block.
In this possible example, the method further comprises: and determining that the first rate distortion cost is less than or equal to the second rate distortion cost, and setting the chroma correction identification bit as a second numerical value, wherein the second numerical value is used for indicating that the prediction correction is not needed.
In a specific implementation, the chroma correction identification bit may be a single bit or multiple bits, for example, when the single bit is a single bit, the first value may be 1, and the second value may be 0, which is not limited herein.
In this possible example, the chroma correction flag is common to the luma correction flag.
In this possible example, the chroma correction flag is used independently.
In one possible example, the linear model applied to the current coding block may be exchanged for a linear model applied line by line.
In one possible example, the identification bit representation in the existing protocol is added to: each chrominance component is respectively indicated whether the prediction correction technology is used or not by an identification bit.
In one possible example, the prediction modification technique of the chrominance components of the present application may be used only for individual ones of the chrominance component prediction modes.
In one possible example, whether to cancel in advance or use the prediction correction technique directly may be determined based on the prediction correction technique usage information of the neighboring blocks of the current encoding block.
Fig. 13 is a flowchart illustrating an image encoding method according to an embodiment of the present application, corresponding to the image encoding method illustrated in fig. 12A, where the image encoding method can be applied to the destination device 20 in the video decoding system 1 illustrated in fig. 9 or the video decoder 200 illustrated in fig. 11. The flow shown in fig. 13 is described by taking as an example the video encoder 200 shown in fig. 11 as an execution subject. As shown in fig. 13, the cross-component prediction method provided in the embodiment of the present application includes:
step 210, parsing the code stream, and determining the chroma component intra-frame prediction mode of the current decoding block.
The color format of the video of the code stream includes, but is not limited to, 4:2:0, 4:2:2, and the like.
In a specific implementation, the code stream may obtain a syntax element through entropy decoding, where the syntax element is used to determine a luminance component intra-frame prediction mode and a chrominance component intra-frame prediction mode for predicting a current decoded block. The luminance component intra-frame prediction mode is the optimal luminance component intra-frame prediction mode in a plurality of intra-frame prediction modes, and the plurality of intra-frame prediction modes are intra-frame prediction modes used for intra-frame prediction of the luminance component.
Step 220, determining a prediction block of the chroma component of the current decoding block according to the chroma component intra-frame prediction mode;
in this possible example, the determining a prediction block of a chroma component of the currently decoded block according to the chroma component intra prediction mode comprises: determining a reference pixel according to available information of reconstructed samples of neighboring pixels of the current decoded block and the chroma component intra prediction mode; determining a prediction block for a chroma component of the currently decoded block according to the reference pixels.
In this possible example, the determining a prediction block for a chroma component of the currently decoded block according to the chroma component intra prediction mode comprises: determining a luma component intra prediction mode of the currently decoded block; determining a prediction block for a chroma component of the current decoded block according to the luma component intra prediction mode when the chroma component intra prediction mode indicates that a prediction value for a chroma component of the current decoded block is determined using a reconstructed block for a luma component of the current decoded block.
In this possible example, the determining a prediction block for a chroma component of the currently decoded block according to the luma component intra prediction mode comprises: determining a reference prediction block for a chroma component of the currently decoded block according to the luma component intra prediction mode; and filtering the reference prediction block of the chroma component of the current decoding block to obtain the prediction block of the chroma component of the current decoding block.
In a specific implementation, the device may determine that the chroma component intra-prediction mode indicates to determine the chroma component of the current decoded block using the luma component of the current decoded block, when the luma component intra-prediction mode is determined to be the preset intra-prediction mode. The predetermined intra-prediction mode is a luminance component intra-prediction mode in a predetermined direction, which includes but is not limited to a horizontal direction (e.g., along the X-axis in the two-dimensional rectangular coordinate system XoY shown in fig. 1) and a vertical direction (e.g., along the negative Y-axis in the two-dimensional rectangular coordinate system XoY shown in fig. 1).
In this possible example, the filtering of the reference prediction block of chroma components of the current decoded block comprises: filtering a reference prediction block for chroma components of the currently decoded block using a third filter.
In this possible example, the third filter includes a filter for filtering a left boundary pixel region of the reference prediction block of the chroma component and a filter for filtering a non-left boundary pixel region of the reference prediction block of the chroma component.
In this possible example, the filter for filtering the left boundary pixel region of the reference prediction block of the chroma component comprises a third two-tap filter; the third two-tap filter comprises:
P C (x,y)=(P′ C (2x,2y)+P′ C (2x,2y+1)+1)>>1
wherein x, y are coordinates of pixel, P' c Prediction samples, P, for pixels in a reference prediction block of the chroma component c A prediction sample of a chroma component of a current pixel in a prediction block for the chroma component.
In this possible example, the filter for filtering the non-left side boundary pixel region of the reference prediction block of the chroma component comprises a first six-tap filter; the first sixth tap filter comprises:
Figure BDA0003691739840000201
wherein x, y are the coordinates of the current pixel, P' c Prediction samples, P, for pixels in a reference prediction block of the chroma component c A prediction sample of a chroma component of a current pixel in a prediction block for the chroma component.
In this possible example, the determining a reference prediction block for a chroma component of the currently decoded block according to the luma component intra prediction mode comprises: determining a reconstructed block of a luminance component of the current decoded block according to the luminance component intra prediction mode; determining a reference prediction block for a chroma component of the current decoded block according to a reconstructed block of a luma component of the current decoded block.
Wherein a size of the reference prediction block of the chrominance component is the same as a size of the reconstructed block of the luminance component. For example, the reconstructed block of the luminance component and the reference prediction block of the chrominance component in the prediction process shown in fig. 8 are 8 × 8 pixel arrays.
In this possible example, said determining, from the reconstructed block of the luma component of the current decoded block, a reference prediction block of the chroma components of the current decoded block comprises: determining a linear model for cross-component prediction by using a reconstructed block of a luminance component of the current decoding block; and calculating a reconstructed block of the brightness component according to the linear model to obtain a reference prediction block of the chroma component of the current decoding block.
The linear model may be, for example, a linear model of the foregoing formula (1) or (2) (3).
In this possible example, the determining a linear model for cross-component prediction using a reconstructed block of a luma component of the current decoded block comprises: determining reference pixels for computing the linear model, the reference pixels comprising at least one neighboring pixel of the currently decoded block; the linear model is calculated from the reference pixels.
Wherein, the selection of the reference pixel for calculating the linear model can be extended to the adjacent pixels at the lower left side, the upper side and the upper right side of the current decoding block.
In this possible example, the determining a reference pixel for computing the linear model comprises: determining a reference pixel for calculating the linear model according to available information of reconstructed samples of neighboring pixels of the current decoded block and the chroma component intra prediction mode.
Wherein the chroma component intra prediction mode of the current decoded block comprises any one of TSCPM _ T, TSCPM _ L, MCPM _ T and MCPM L. The availability information specifically includes both available on both sides and available on one side (e.g., left available and right available). It can be seen that, in the present example, the reference neighboring pixels used for calculating the coefficients of the linear model can be flexibly set according to the availability of reconstructed samples of the neighboring pixels and the chroma component intra prediction mode.
In this possible example, the determining a reference pixel for computing the linear model comprises: and determining a reference pixel for calculating the linear model according to the brightness component intra-frame prediction mode with the optimal code rate distortion cost of the adjacent decoding block of the current decoding block. The intra-frame prediction mode with the optimal code rate distortion cost of the brightness component of the adjacent decoding block may be the same as or different from the intra-frame prediction mode with the optimal code rate distortion cost of the brightness component of the current decoding block.
Step 230, performing prediction correction on the prediction block of the chroma component of the current decoding block to obtain a corrected prediction block of the chroma component of the current decoding block.
In this possible example, the performing prediction correction on the prediction block of the chroma component of the current decoded block includes: determining a filter according to the chroma component intra prediction mode; performing prediction correction on a prediction block of a chroma component of the currently decoded block using the filter.
The filtering direction of the filter is orthogonal to the direction of the adjacent pixels of the linear model used by the chroma component intra-frame prediction mode to calculate the current coding block, and the prediction sample of the chroma component of each pixel can be predicted by synthesizing the correlation of the boundary adjacent pixels in the orthogonal direction.
In this possible example, the determining a filter according to the chroma component intra prediction mode includes: and when the chroma component intra-frame prediction mode is TSCPM _ T or MCPM T or a normal intra-frame vertical angle prediction mode, setting the filter as a first filter.
In this possible example, the first filter is configured to filter a pixel region adjacent to a left side boundary of a prediction block of chroma components of the current decoded block and a pixel region of a prediction block of chroma components of the current decoded block.
In this possible example, the first filter comprises a first two-tap filter; the first two-tap filter comprises:
P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
where x, y are coordinates of the current pixel, x does not exceed a wide value range of the current decoded block, y does not exceed a high value range of the current decoded block, P' (x, y) is a final prediction sample of a pixel (x, y) of a prediction block of chrominance components of the current decoded block, P (-1, y) is a reconstructed sample of a pixel located in a y row adjacent to a left side boundary, f (x) is a horizontal filter coefficient of a pixel (x, y) reference pixel P (-1, y), and P (x, y) is an original prediction sample of the pixel (x, y).
In this possible example, the horizontal filter coefficients are determined by a first set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (-1, y).
In this possible example, the determining a filter according to the chroma component intra prediction mode includes: and when the chroma component intra-frame prediction mode is TSCPM _ L or MCPM _ L or a common intra-frame horizontal angle prediction mode, setting the filter as a second filter.
In this possible example, the second filter is configured to filter a pixel region adjacent to an upper boundary of a prediction block of chroma components of the current decoded block and a pixel region of a prediction block of chroma components of the current decoded block.
In this possible example, the second filter comprises a second two-tap filter; the second two-tap filter comprises:
P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)
wherein X, y is the coordinate of the current pixel, X does not exceed the wide range of the current coding block, y does not exceed the high range of the current coding block, P' (X, y) is the final prediction sample of the pixel (X, y) of the prediction block of the chroma component of the current coding block, P (X, -1) is the reconstructed sample of the pixel adjacent to the upper boundary in the X column, f (y) is the vertical filter coefficient of the pixel (X, y) reference pixel P (X, -1), and P (X, y) is the original prediction sample of the pixel (X, y).
In this possible example, the vertical filter coefficients are determined by a second set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (x, -1).
The value of the vertical filter coefficient is related to the size of the chroma component of the current decoding block and the distance between the predicted pixel and the left adjacent pixel in the prediction block of the current chroma component.
Specifically, the filter coefficients are selected according to the size of the chroma components, and are divided into different filter coefficient sets according to the size of the prediction block of the chroma components of the current decoding block, and the corresponding filter coefficient set is selected according to the size of the prediction block of the current chroma components. The selection of the vertical filter coefficient is related to the distance from the predicted pixel to the upper adjacent pixel, the distance from the current predicted pixel to the upper adjacent pixel is used as an index value, and the corresponding filter coefficient is selected from the corresponding filter coefficient group. The intra chroma prediction filter coefficients are specifically shown in table 1.
In addition, the filter coefficients of the technique can reduce coefficient storage by adopting a coefficient truncation mode, namely, the filter coefficients of all pixels with the distance between the current predicted pixel and the upper adjacent pixel being more than 10 are consistent.
In a specific implementation, after the prediction block of the chroma component of the current decoding block is determined, the device may further calculate a reconstruction block of the chroma component, and determine a reconstructed image of the current decoding block according to the reconstruction block of the chroma component and the reconstruction block of the luma component.
In this possible example, the determining a filter according to the chroma component intra prediction mode includes: when the chroma component intra prediction mode is a normal intra non-angular prediction mode, the filter is set to a third filter.
In this possible example, the third filter is configured to filter a pixel region adjacent to a left boundary of a prediction block of a chroma component of the current decoded block, a pixel region adjacent to an upper boundary of a prediction block of a chroma component of the current decoded block, and a pixel region of a prediction block of a chroma component of the current decoded block.
In this possible example, the third filter comprises a first three-tap filter;
the first third tap filter comprises:
P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)
wherein X, y is a coordinate of the current pixel, X does not exceed a wide range of values of the current coding block, y does not exceed a high range of values of the current coding block, P' (X, y) is a final predicted sample of a pixel (X, y) of a predicted block of chrominance components of the current coding block, P (-1, y) is a reconstructed sample of a pixel located in a y row adjacent to a left side boundary, P (X, -1) is a reconstructed sample of a pixel located in an X column adjacent to an upper side boundary, f (X) is a horizontal filter coefficient of a pixel (X, y) reference pixel P (-1, y), f (y) is a vertical filter coefficient of a pixel (X, y) reference pixel P (X, -1), and P (X, y) is an original predicted sample of the pixel (X, y).
In this possible example, the horizontal filter coefficients are determined by a first set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (-1, y);
the vertical filter coefficients are determined by a second set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (x, -1).
Compared with the prior art, in the embodiment of the application, in the chroma component intra-frame prediction mode, the prediction sample of the chroma component of the current coding block is corrected by using the spatial correlation between the adjacent coding block and the current coding block, so that the prediction accuracy and the decoding efficiency are improved.
In one possible example, the prediction modifying the prediction block of the chroma component of the current decoded block comprises: analyzing the code stream to obtain a chroma correction flag bit; determining a value of the chroma correction flag bit to be a first value, the first value indicating that a filter is used for the prediction correction; performing the prediction correction on a prediction block of a chroma component of the currently decoded block. It can be seen that in this example, the prediction correction is indicated directly by the flag bit.
In this possible example, the method further comprises: determining a value of the chroma correction flag bit to be a second value indicating that no filter is used for the prediction correction.
In this possible example, the chroma correction flag bit is shared with the luma correction flag bit. And additional identification bits cannot be added, and transmission code streams are saved.
In this possible example, the chroma correction flag is used independently. The indication is more clear and efficient.
The proposed technique is implemented on AVS reference software HPM6.0 and performs 1 second sequence tests on the full intra mode and random access mode under the test-through condition and video sequence, and the specific performance is shown in tables 2 and 3.
TABLE 2 All internal All Intra test results
Figure BDA0003691739840000231
TABLE 3 Random Access test results
Figure BDA0003691739840000232
As can be seen from tables 2 and 3, the UV component of the test sequence has a relatively significant performance gain on average, the U component has an encoding performance improvement of 0.71% on average under the AI test condition, and the V component has an encoding performance improvement of 1.35% on average under the RA test condition.
The embodiment of the application provides an image coding device which can be a video decoder or a video encoder. In particular, the image encoding device is configured to perform the steps performed by the video decoder in the above decoding method. The image encoding device provided by the embodiment of the application can comprise modules corresponding to the corresponding steps.
The present embodiment may divide the functional modules of the image encoding apparatus according to the above method, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The division of the modules in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 14 shows a schematic diagram of a possible structure of the image encoding apparatus according to the above-described embodiment, in a case where each functional module is divided in correspondence with each function. As shown in fig. 14, the image encoding device 14 includes a dividing unit 140, a determining unit 141, and a correcting unit 142.
A dividing unit 140, configured to divide an image and determine a chroma component intra prediction mode of a current coding block;
a determining unit 141, configured to determine a prediction block of a chroma component of the current coding block according to the chroma component intra prediction mode;
and a correcting unit 142, configured to perform prediction correction on the prediction block of the chroma component of the current coding block to obtain a corrected prediction block of the chroma component of the current coding block.
In this possible example, in terms of the prediction modification of the prediction block of the chroma component of the current coding block, the modification unit 142 is specifically configured to determine a filter according to the chroma component intra prediction mode; and performing prediction correction on a prediction block of a chroma component of the current coding block using the filter.
In this possible example, in terms of determining a filter according to the chroma component intra prediction mode, the modification unit 142 is specifically configured to set the filter as a first filter when the chroma component intra prediction mode is a two-step cross component prediction mode TSCPM _ T or multiple cross component prediction modes MCPM _ T or a normal intra vertical type angle prediction mode.
In this possible example, the first filter is configured to filter a pixel region adjacent to a left side boundary of a prediction block of a chroma component of the current coding block and a pixel region of a prediction block of a chroma component of the current coding block.
In this possible example, the first filter comprises a first two-tap filter;
the first two-tap filter comprises:
P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
where x, y are coordinates of the current pixel, x does not exceed a wide value range of the current coding block, y does not exceed a high value range of the current coding block, P' (x, y) is a final prediction sample of a pixel (x, y) of a prediction block of a chrominance component of the current coding block, P (-1, y) is a reconstructed sample of a pixel adjacent to a left side boundary in a y row, f (x) is a horizontal filter coefficient of a pixel (x, y) reference pixel P (-1, y), and P (x, y) is an original prediction sample of the pixel (x, y).
In this possible example, the horizontal filter coefficients are determined by a first set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (-1, y).
In this possible example, in terms of determining the filter according to the chroma component intra prediction mode, the modification unit 142 is specifically configured to set the filter as a second filter when the chroma component intra prediction mode is TSCPM _ L or MCPM _ L or a normal intra horizontal class angle prediction mode.
In this possible example, the second filter is configured to filter a pixel region adjacent to an upper boundary of a prediction block of a chroma component of the current coding block and a pixel region of a prediction block of a chroma component of the current coding block.
In this possible example, the second filter comprises a second two-tap filter;
the second two-tap filter comprises:
P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)
wherein X, y is the coordinate of the current pixel, X does not exceed the wide range of the current coding block, y does not exceed the high range of the current coding block, P' (X, y) is the final prediction sample of the pixel (X, y) of the prediction block of the chroma component of the current coding block, P (X, -1) is the reconstructed sample of the pixel adjacent to the upper boundary in the X column, f (y) is the vertical filter coefficient of the pixel (X, y) reference pixel P (X, -1), and P (X, y) is the original prediction sample of the pixel (X, y).
In this possible example, the vertical filter coefficients are determined by a second set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (x, -1).
In this possible example, in terms of determining the filter according to the chroma component intra prediction mode, the modification unit 142 is specifically configured to set the filter as a third filter when the chroma component intra prediction mode is a normal intra non-angular prediction mode.
In this possible example, the third filter is configured to filter a pixel region adjacent to a left side boundary of a prediction block of a chroma component of the current coding block, a pixel region adjacent to an upper side boundary of the prediction block of the chroma component of the current coding block, and a pixel region of the prediction block of the chroma component of the current coding block.
In this possible example, the third filter comprises a first three-tap filter;
the first three-tap filter comprises:
P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)
wherein X, y is a coordinate of the current pixel, X does not exceed a wide range of values of the current coding block, y does not exceed a high range of values of the current coding block, P' (X, y) is a final predicted sample of a pixel (X, y) of a predicted block of chrominance components of the current coding block, P (-1, y) is a reconstructed sample of a pixel located in a y row adjacent to a left side boundary, P (X, -1) is a reconstructed sample of a pixel located in an X column adjacent to an upper side boundary, f (X) is a horizontal filter coefficient of a pixel (X, y) reference pixel P (-1, y), f (y) is a vertical filter coefficient of a pixel (X, y) reference pixel P (X, -1), and P (X, y) is an original predicted sample of the pixel (X, y).
In this possible example, the horizontal filter coefficients are determined by a first set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (-1, y);
the vertical filter coefficients are determined by a second set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (x, -1).
In this possible example, in terms of the prediction correction of the prediction block of the chroma component of the current coding block, the correction unit 142 is specifically configured to calculate a first rate-distortion cost of the current coding block in an unmodified case and calculate a second rate-distortion cost of the current coding block in a corrected case; and determining that the first rate-distortion cost is greater than the second rate-distortion cost; and performing prediction correction on the prediction block of the chroma component of the current coding block.
In this possible example, in terms of the prediction correction of the prediction block of the chroma component of the current coding block, the correction unit 142 is specifically configured to calculate a first rate-distortion cost of the current coding block in an unmodified case and calculate a second rate-distortion cost of the current coding block in a corrected case; determining that the first rate distortion cost is greater than the second rate distortion cost, and setting a chrominance correction identification bit as a first numerical value, wherein the first numerical value is used for indicating that the prediction correction is required; and performing prediction correction on the prediction block of the chroma component of the current coding block.
In this possible example, the determining unit 141 is further configured to determine that the first rate distortion cost is less than or equal to the second rate distortion cost, and set the chroma correction identification bit to a second value, where the second value is used to indicate that the prediction correction is not needed.
In this possible example, the chroma correction flag is common to the luma correction flag.
In this possible example, the chroma correction flag is used independently.
In this possible example, in said determining the prediction block of the chroma component of the current coding block according to the chroma component intra prediction mode, the determining unit 141 is specifically configured to determine the luma component intra prediction mode of the current coding block; and when the chroma component intra prediction mode indicates that a predicted value of a chroma component of the current coding block is determined by using a luma component of the current coding block, determining a predicted block of the chroma component of the current coding block according to the luma component intra prediction mode.
In this possible example, in said determining a prediction block for a chroma component of the current coding block according to the luma component intra prediction mode, the determining unit 141 is specifically configured to determine a reference prediction block for a chroma component of the current coding block according to the luma component intra prediction mode; and filtering the reference prediction block of the chrominance component of the current coding block to obtain the prediction block of the chrominance component of the current coding block.
In this possible example, in terms of the filtering of the reference prediction block for the chroma component of the current coding block, the determining unit 141 is specifically configured to filter the reference prediction block for the chroma component of the current coding block using a third filter.
In this possible example, the third filter includes a filter for filtering a left boundary pixel region of the reference prediction block of the chroma component and a filter for filtering a non-left boundary pixel region of the reference prediction block of the chroma component.
In this possible example, the filter for filtering the left boundary pixel region of the reference prediction block of the chroma component includes a third two-tap filter;
the third two-tap filter comprises:
P C (x,y)=(P′ C (2x,2y)+P′ C (2x,2y+1)+1)>>1
wherein x and y are coordinates of pixel P' c Prediction samples, P, for pixels in a reference prediction block of the chroma component c A prediction sample of a chroma component of a current pixel in a prediction block for the chroma component.
In this possible example, the filter for filtering the non-left boundary pixel region of the reference prediction block of the chroma component comprises a first six-tap filter;
the first sixth tap filter comprises:
Figure BDA0003691739840000261
wherein x, y are the coordinates of the current pixel, P' c Prediction samples, P, for pixels in a reference prediction block of the chroma component c A prediction sample of a chroma component of a current pixel in a prediction block for the chroma component.
In this possible example, in said determining a reference prediction block of a chroma component of the current coding block according to the luma component intra prediction mode, the determining unit 141 is specifically configured to determine a reconstructed block of a luma component of the current coding block according to the luma component intra prediction mode; and determining a reference prediction block of a chrominance component of the current coding block according to a reconstructed block of a luminance component of the current coding block.
In this possible example, in terms of determining the reference prediction block of the chroma component of the current coding block according to the reconstructed block of the luma component of the current coding block, the determining unit 141 is specifically configured to determine a linear model for performing cross-component prediction by using the reconstructed block of the luma component of the current coding block; and calculating a reconstructed block of the brightness component according to the linear model to obtain a reference prediction block of the chroma component of the current coding block.
In this possible example, in terms of the determining a linear model for cross-component prediction using a reconstructed block of a luma component of the current coding block, the determining unit 141 is specifically configured to determine a reference pixel for calculating the linear model, where the reference pixel includes at least one neighboring pixel of the current coding block; and computing the linear model from the reference pixels.
In this possible example, in terms of the determining the reference pixel for calculating the linear model, the determining unit 141 is specifically configured to determine the reference pixel for calculating the linear model according to the available information of the reconstructed samples of the neighboring pixels of the current coding block and the chroma component intra prediction mode.
In this possible example, in the aspect of determining the reference pixel for calculating the linear model, the determining unit 141 is specifically configured to determine the reference pixel for calculating the linear model according to the luma component intra prediction mode with the optimal rate-distortion cost of the neighboring coding blocks of the current coding block.
In this possible example, in terms of the determining a prediction block of a chroma component of the current coding block according to the chroma component intra prediction mode, the determining unit 141 is specifically configured to determine a reference pixel according to available information of reconstructed samples of neighboring pixels of the current coding block and the chroma component intra prediction mode; and determining a prediction block for a chroma component of the current coding block from the reference pixel.
All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again. Of course, the image encoding apparatus provided in the embodiments of the present application includes, but is not limited to, the above modules, for example: the image encoding apparatus may further include a storage unit 143. The storage unit 143 may be used to store program codes and data of the image encoding apparatus.
In the case of using an integrated unit, a schematic structural diagram of an image encoding device provided in an embodiment of the present application is shown in fig. 15. In fig. 15, the image encoding device 15 includes: a processing module 150 and a communication module 151. The processing module 150 is used for controlling and managing actions of the image encoding apparatus, for example, performing steps performed by the dividing unit 140, the determining unit 141, the correcting unit 142, and/or other processes for performing the techniques described herein. The communication module 151 is used to support interaction between the image encoding apparatus and other devices. As shown in fig. 15, the image encoding apparatus may further include a storage module 152, and the storage module 152 is used for storing program codes and data of the image encoding apparatus, for example, storing contents stored in the storage unit 143.
The Processing module 150 may be a Processor or a controller, and may be, for example, a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others. The communication module 151 may be a transceiver, an RF circuit or a communication interface, etc. The storage module 152 may be a memory.
All relevant contents of each scene related to the method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again. The image encoding device 14 and the image encoding device 15 can both perform the image encoding method shown in fig. 12A, and the image encoding device 14 and the image encoding device 15 can be specifically a video image encoding device or other devices with video encoding functions.
The application also provides a video encoder, which comprises a nonvolatile storage medium and a central processing unit, wherein the nonvolatile storage medium stores an executable program, and the central processing unit is connected with the nonvolatile storage medium and executes the executable program to realize the image encoding method of the embodiment of the application.
The embodiment of the application provides an image decoding device which can be a video decoder or a video decoder. Specifically, the image decoding apparatus is configured to perform the steps performed by the video decoder in the above decoding method. The image decoding device provided by the embodiment of the application can comprise modules corresponding to the corresponding steps.
In the embodiment of the present application, the image decoding apparatus may be divided into functional modules according to the above method, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The division of the modules in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 16 is a schematic diagram showing a possible configuration of the image decoding apparatus according to the above embodiment, in a case where each functional module is divided in correspondence with each function. As shown in fig. 16, image decoding apparatus 16 includes analyzing section 160, determining section 161, and correcting section 162.
An analysis unit 160, configured to analyze the code stream and determine a chroma component intra prediction mode of the current decoded block;
a determining unit 161, configured to determine a prediction block of a chroma component of the currently decoded block according to the chroma component intra prediction mode;
a correcting unit 162, configured to perform prediction correction on the prediction block of the chroma component of the current decoded block to obtain a corrected prediction block of the chroma component of the current decoded block.
In one possible example, in terms of the prediction modification of the prediction block of the chroma components of the current decoded block, the modification unit 162 is specifically configured to: determining a filter according to the chroma component intra prediction mode; and performing prediction correction on a prediction block of a chroma component of the currently decoded block using the filter.
In one possible example, in terms of determining a filter according to the chroma component intra prediction mode, the modification unit 162 is specifically configured to: and when the chroma component intra-frame prediction mode is TSCPM _ T or MCPM _ T or a normal intra-frame vertical angle prediction mode, setting the filter as a first filter.
In one possible example, the first filter is for filtering a pixel region adjacent to a left side boundary of a prediction block of chroma components of the current decoded block and a pixel region of a prediction block of chroma components of the current decoded block.
In one possible example, the first filter comprises a first two-tap filter;
the first two-tap filter comprises:
P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
where x, y are coordinates of the current pixel, x does not exceed a wide value range of the current decoded block, v does not exceed a high value range of the current decoded block, P' (x, y) is a final prediction sample of a pixel (x, y) of a prediction block of chrominance components of the current decoded block, P (-1, y) is a reconstructed sample of a pixel located in a y row adjacent to a left side boundary, f (x) is a horizontal filter coefficient of a pixel (x, y) reference pixel P (-1, y), and P (x, y) is an original prediction sample of the pixel (x, y).
In one possible example, the horizontal filter coefficients are determined by a first set of parameters including a size of a prediction block of the chroma component and a distance between pixel (x, y) and pixel P (-1, y).
In one possible example, the determining a filter according to the chroma component intra prediction mode includes:
and when the chroma component intra-frame prediction mode is TSCPM _ L or MCPM _ L or a common intra-frame horizontal angle prediction mode, setting the filter as a second filter.
In one possible example, the second filter is for filtering a region of pixels adjacent to an upper boundary of a prediction block of chroma components of the current decoded block and a region of pixels of the prediction block of chroma components of the current decoded block.
In one possible example, the second filter comprises a second two-tap filter;
the second two-tap filter comprises:
P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)
wherein X, y is the coordinate of the current pixel, X does not exceed the wide range of the current coding block, y does not exceed the high range of the current coding block, P' (X, y) is the final prediction sample of the pixel (X, y) of the prediction block of the chroma component of the current coding block, P (X, -1) is the reconstructed sample of the pixel adjacent to the upper boundary in the X column, f (y) is the vertical filter coefficient of the pixel (X, y) reference pixel P (X, -1), and P (X, y) is the original prediction sample of the pixel (X, y).
In one possible example, the vertical filter coefficients are determined by a second set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (x, -1).
In one possible example, in terms of determining a filter according to the chroma component intra prediction mode, the modification unit 162 is specifically configured to: when the chroma component intra prediction mode is a normal intra non-angular prediction mode, the filter is set to a third filter.
In one possible example, the third filter is configured to filter a pixel region adjacent to a left boundary of a prediction block of a chroma component of the current decoded block, a pixel region adjacent to an upper boundary of a prediction block of a chroma component of the current decoded block, and a pixel region of a prediction block of a chroma component of the current decoded block.
In one possible example, the third filter comprises a first three-tap filter;
the first three-tap filter comprises:
P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)
where X, y is the coordinates of the current pixel, X has a value not exceeding the wide range of values of the current coding block, v has a value not exceeding the high range of values of the current coding block, P' (X, y) is the final predicted sample of the pixel (X, y) of the predicted block of the chroma components of the current coding block, P (-1, y) is the reconstructed sample of the pixel located in the y row adjacent to the left side boundary, P (X, -1) is the reconstructed sample of the pixel located in the X column adjacent to the upper side boundary, f (X) is the horizontal filter coefficient of the pixel (X, y) reference pixel P (-1, y), f (y) is the vertical filter coefficient of the pixel (X, y) reference pixel P (X, -1), and P (X, y) is the original predicted sample of the pixel (X, y).
In one possible example, the horizontal filter coefficients are determined by a first set of parameters comprising a size of a prediction block of the chroma component and a distance between pixel (x, y) and pixel P (-1, y);
the vertical filter coefficients are determined by a second set of parameters comprising the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel P (x, -1).
In one possible example, in terms of the prediction modification of the prediction block of the chroma component of the current decoded block, the modification unit 162 is specifically configured to: analyzing the code stream to obtain a chroma correction zone bit; and determining a value of the chroma correction flag bit to be a first value, the first value indicating that a filter is used for the prediction correction; and performing prediction correction on a prediction block of the chroma component of the current decoding block.
In a possible example, the determining unit 161 is further configured to determine the value of the chroma correction flag to be a second value, where the second value is used to indicate that no filter is used for the prediction correction.
In one possible example, the chroma correction flag bit is shared with the luma correction flag bit.
In one possible example, the chroma fix flag is used independently.
In one possible example, in terms of the determining a prediction block of a chroma component of the currently decoded block according to the chroma component intra prediction mode, the determining unit 161 is specifically configured to determine a luma component intra prediction mode of the currently decoded block; and when the chroma component intra prediction mode indicates that a prediction value of a chroma component of the current decoded block is determined using a luma component of the current decoded block, determining a prediction block of the chroma component of the current decoded block according to the luma component intra prediction mode.
In one possible example, in said determining a prediction block of a chroma component of the currently decoded block according to the luma component intra prediction mode, the determining unit 161 is specifically configured to: determining a reference prediction block for a chroma component of the current decoded block according to the luma component intra prediction mode; and filtering the reference prediction block of the chrominance component of the current decoding block to obtain the prediction block of the chrominance component of the current decoding block.
In one possible example, in said filtering of the reference prediction block of the chroma components of the current decoded block, the determining unit 161 is specifically configured to: filtering a reference prediction block for chroma components of the currently decoded block using a third filter.
In one possible example, the third filter includes a filter for filtering a left boundary pixel region of the reference prediction block of the chroma component and a filter for filtering a non-left boundary pixel region of the reference prediction block of the chroma component.
In one possible example, the filter for filtering a left boundary pixel region of the reference prediction block of the chroma component comprises a third two-tap filter;
the third two-tap filter comprises:
P C (x,y)=(P′ C (2x,2y)+P′ C (2x,2y+1)+1)>>1
wherein x, y are coordinates of pixel, P' c Is a prediction sample of a pixel in a reference prediction block of the chroma component, P c A prediction sample of a chroma component of a current pixel in a prediction block for the chroma component.
In one possible example, the filter for filtering the non-left side boundary pixel region of the reference prediction block of the chroma component comprises a first six-tap filter;
the first sixth tap filter comprises:
Figure BDA0003691739840000291
wherein x, y are the coordinates of the current pixel, P' c Is a prediction sample of a pixel in a reference prediction block of the chroma component, P c A prediction sample of a chroma component of a current pixel in a prediction block for the chroma component.
In one possible example, in said determining a reference prediction block for a chroma component of the currently decoded block according to the luma component intra prediction mode, the determining unit 161 is specifically configured to: determining a reconstructed block of a luminance component of the current decoded block according to the luminance component intra prediction mode; and determining a reference prediction block for a chroma component of the current decoded block according to a reconstructed block of a luma component of the current decoded block.
In one possible example, in terms of said determining a reference prediction block for a chroma component of the current decoded block from the reconstructed block for a luma component of the current decoded block, the determining unit 161 is specifically configured to: determining a linear model for performing cross-component prediction by using a reconstructed block of a luminance component of the current decoding block; and calculating a reconstructed block of the luminance component according to the linear model to obtain a reference prediction block of the chrominance component of the current decoding block.
In one possible example, in terms of the determining a linear model for cross-component prediction using a reconstructed block of a luma component of the current decoded block, the determining unit 161 is specifically configured to: determining reference pixels for computing the linear model, the reference pixels comprising at least one neighboring pixel of the currently decoded block; and computing the linear model from the reference pixels.
In one possible example, in terms of the determining the reference pixels for computing the linear model, the determining unit 161 is specifically configured to: determining reference pixels for calculating the linear model according to available information of reconstructed samples of neighboring pixels of the current decoded block and the chroma component intra prediction mode.
In one possible example, in terms of determining the reference pixels for calculating the linear model, the determining unit 161 is specifically configured to: and determining a reference pixel for calculating the linear model according to the brightness component intra-frame prediction mode with the optimal code rate distortion cost of the adjacent decoding block of the current decoding block.
In one possible example, in terms of said determining a prediction block for a chroma component of the currently decoded block according to the chroma component intra prediction mode, the determining unit 161 is specifically configured to: determining a reference pixel according to available information of reconstructed samples of neighboring pixels of the current decoded block and the chroma component intra prediction mode; and determining a prediction block for a chroma component of the currently decoded block from the reference pixels.
All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again. Of course, the image decoding apparatus provided in the embodiments of the present application includes, but is not limited to, the above modules, for example: the image decoding apparatus may further include a storage unit 163. The storage unit 163 may be used to store program codes and data of the image decoding apparatus.
In the case of using an integrated unit, a schematic structural diagram of an image decoding apparatus provided in an embodiment of the present application is shown in fig. 17. In fig. 17, the image decoding device 17 includes: a processing module 170 and a communication module 171. The processing module 170 is used to control and manage the actions of the image decoding apparatus, for example, execute the steps performed by the parsing unit 160, the determining unit 161, the correcting unit 162, and/or other processes for performing the techniques described herein. The communication module 171 is used to support interaction between the image decoding apparatus and other devices. As shown in fig. 17, the image decoding apparatus may further include a storage module 172, and the storage module 172 is used to store program codes and data of the image decoding apparatus, for example, contents stored in the storage unit 163.
The Processing module 170 may be a Processor or a controller, and may be, for example, a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, and the like. The communication module 171 may be a transceiver, an RF circuit or a communication interface, etc. The storage module 172 may be a memory.
All relevant contents of each scene related to the method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again. Both the image decoding device 16 and the image decoding device 17 can execute the image decoding method shown in fig. 13, and the image decoding device 16 and the image decoding device 17 can be specifically a video image decoding device or other devices with video decoding functions.
The application also provides a video decoder, which comprises a nonvolatile storage medium and a central processing unit, wherein the nonvolatile storage medium stores an executable program, and the central processing unit is connected with the nonvolatile storage medium and executes the executable program to realize the image decoding method of the embodiment of the application.
The present application further provides a terminal, including: one or more processors, memory, a communication interface. The memory, communication interface, and one or more processors; the memory is used for storing computer program code comprising instructions which, when executed by the one or more processors, cause the terminal to perform the image encoding and/or image decoding methods of embodiments of the present application. The terminal can be a video display device, a smart phone, a portable computer and other devices which can process video or play video.
Another embodiment of the present application also provides a computer-readable storage medium including one or more program codes, where the one or more programs include instructions, and when a processor in a decoding apparatus executes the program codes, the decoding apparatus executes an image encoding method and an image decoding method of the embodiments of the present application.
In another embodiment of the present application, there is also provided a computer program product comprising computer executable instructions stored in a computer readable storage medium; the at least one processor of the decoding device may read the computer executable instructions from the computer readable storage medium, and the execution of the computer executable instructions by the at least one processor causes the terminal to implement the image encoding method and the image decoding method of the embodiments of the present application.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware or any combination thereof. When implemented using a software program, may take the form of a computer program product, either entirely or partially. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part.
The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.).
The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (37)

1. An image encoding method, comprising:
dividing the image, and determining a chroma component intra-frame prediction mode of a current coding block;
determining a prediction block of the chroma component of the current coding block according to the chroma component intra-frame prediction mode;
and correcting the prediction block of the chroma component of the current coding block to obtain the corrected prediction block of the chroma component of the current coding block.
2. The method of claim 1, wherein modifying the prediction block for the chroma component of the current coding block comprises:
determining a filter according to the chroma component intra prediction mode;
filtering a prediction block of a chroma component of the current coding block using the filter.
3. The method of claim 2, wherein the determining a filter according to the chroma component intra prediction mode comprises:
the filter is a first filter when the chroma component intra prediction mode is a two-step cross component prediction mode TSCPM _ T or an intra vertical class angle prediction mode.
4. The method of claim 3, wherein the first filter is configured to filter a pixel region adjacent to a left boundary of a chroma component of the current coding block and a prediction value of a prediction block of the chroma component of the current coding block.
5. The method of claim 4, wherein the pixel region adjacent to the left boundary of a chroma component of the current coding block contains chroma reconstruction pixels left adjacent to the current coding block.
6. The method of claim 4, wherein the first filter comprises a first two-tap filter;
the first two-tap filter comprises:
P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
wherein x, y is the coordinate of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, P' (x, y) is the final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the current coding block, P (-1, y) is the reconstruction sample of the pixel adjacent to the left side boundary in the y row, f (x) is the horizontal filter coefficient of the pixel (x, y) reference reconstruction sample P (-1, y), and P (x, y) is the original prediction sample of the pixel (x, y).
7. The method of claim 6, wherein the filter coefficients of the first filter are determined by a look-up table in which filter coefficients are indexed by the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel (-1, y).
8. The method of claim 2, wherein determining a filter according to the chroma component intra prediction mode comprises:
the filter is a second filter when the chroma component intra prediction mode is TSCPM L or intra horizontal class angular prediction mode.
9. The method of claim 8, wherein the second filter is configured to filter a pixel region adjacent to an upper boundary of a chroma component of the current coding block and a prediction value of a prediction block of the chroma component of the current coding block.
10. The method of claim 9, wherein the pixel region adjacent to the upper boundary of a chroma component of the current coding block contains chroma reconstructed pixels adjacent to the current coding block.
11. The method of claim 9, wherein the second filter comprises a second two-tap filter;
the second two-tap filter comprises:
P(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)
where X, y is the coordinate of the current pixel, X does not exceed the wide value range of the current coding block, y does not exceed the high value range of the current coding block, P' (X, y) is the final prediction sample of the pixel (X, y) of the prediction block of the chroma component of the current coding block, P (X, -1) is the reconstructed sample of the pixel adjacent to the upper boundary in the X column, f (y) is the vertical filter coefficient of the pixel (X, y) reference reconstructed sample P (X, -1), and P (X, y) is the original prediction sample of the pixel (X, y).
12. The method according to claim 11, wherein the filter coefficients of the second filter are determined by a look-up table in which filter coefficients are indexed by the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel (x, -1).
13. The method of claim 1, wherein the performing prediction correction on the prediction block of the chroma component of the current coding block comprises:
calculating a first rate distortion cost of the current coding block under the unmodified condition and calculating a second rate distortion cost of the current coding block under the modified condition;
determining that the first rate distortion cost is greater than the second rate distortion cost, and setting a chrominance correction identification bit as a first numerical value, wherein the first numerical value is used for indicating that the prediction correction needs to be carried out;
and performing prediction correction on the prediction block of the chroma component of the current coding block.
14. The method of claim 1, wherein the performing prediction correction on the prediction block of the chroma component of the current coding block comprises:
calculating a first rate distortion cost of the current coding block under the unmodified condition and calculating a second rate distortion cost of the current coding block under the modified condition;
and determining that the first rate distortion cost is less than or equal to the second rate distortion cost, and setting the chroma correction identification bit as a second numerical value, wherein the second numerical value is used for indicating that the prediction correction is not needed.
15. The method according to claim 13 or 14, wherein the chroma correction flag is common to the luma correction flag.
16. An image decoding method, comprising:
analyzing the code stream, and determining a chroma component intra-frame prediction mode of a current decoding block;
determining a prediction block for a chroma component of the currently decoded block according to the chroma component intra prediction mode;
and correcting the prediction block of the chroma component of the current decoding block to obtain the corrected prediction block of the chroma component of the current decoding block.
17. The method of claim 16, wherein modifying the prediction block for the chroma components of the currently decoded block comprises:
determining a filter according to the chroma component intra prediction mode;
filtering a prediction block of chroma components of the currently decoded block using the filter.
18. The method of claim 17, wherein the determining a filter according to the chroma component intra prediction mode comprises:
the filter is a first filter when the chroma intra prediction mode is TSCPM _ T or intra vertical class angular prediction mode.
19. The method of claim 18, wherein the first filter is configured to filter a region of pixels adjacent to a left boundary of chroma components of the current decoded block and predictors of a prediction block for chroma components of the current decoded block.
20. The method of claim 19, wherein the pixel region adjacent to the left boundary of a chroma component of the current coding block contains chroma reconstruction pixels left adjacent to the current coding block.
21. The method of claim 19, wherein the first filter comprises a first two-tap filter;
the first two-tap filter comprises:
P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
where x, y are coordinates of the current pixel, the value of x does not exceed the wide range of the current decoded block, the value of y does not exceed the high range of the current decoded block, P' (x, y) is the final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the current decoded block, P (-1, y) is the reconstructed sample of the pixel located in the y row adjacent to the left side boundary, f (x) is the horizontal filter coefficient of the pixel (x, y) reference reconstructed sample P (-1, y), and P (x, y) is the original prediction sample of the pixel (x, y).
22. The method of claim 21, wherein the filter coefficients of the first filter are determined by a look-up table in which the filter coefficients are indexed by the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel (-1, y).
23. The method of claim 17, wherein the determining a filter according to the chroma component intra prediction mode comprises:
the filter is a second filter when the chroma component intra prediction mode is TSCPM _ L or intra horizontal class angular prediction mode.
24. The method of claim 23, wherein the second filter is configured to filter a region of pixels adjacent to an upper boundary of a chroma component of the current decoded block and a prediction value of a prediction block of the chroma component of the current decoded block.
25. The method of claim 24, wherein the pixel region adjacent to the upper boundary of a chroma component of the current coding block contains chroma reconstructed pixels adjacent to the current coding block.
26. The method of claim 24, wherein the second filter comprises a second two-tap filter;
the second two-tap filter comprises:
P′(x,y)=f(y).P(x,-1)+(1-f(y)).P(x,y)
where X, y is the coordinate of the current pixel, X does not exceed the wide value range of the current coding block, y does not exceed the high value range of the current coding block, P' (X, y) is the final prediction sample of the pixel (X, y) of the prediction block of the chroma component of the current coding block, P (X, -1) is the reconstructed sample of the pixel adjacent to the upper boundary in the X column, f (y) is the vertical filter coefficient of the pixel (X, y) reference reconstructed sample P (X, -1), and P (X, y) is the original prediction sample of the pixel (X, y).
27. The method according to claim 26, wherein the filter coefficients of the second filter are determined by a look-up table in which filter coefficients are indexed by the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel (x, -1).
28. The method of claim 16, wherein said predictively modifying the prediction block for the chroma components of the currently decoded block comprises:
analyzing the code stream to obtain a chroma correction flag bit;
determining a value of the chroma correction flag bit to be a first value, the first value indicating that a filter is used for the prediction correction;
performing the prediction correction on a prediction block of a chroma component of the currently decoded block.
29. The method of claim 28, wherein said predictively modifying the prediction block for the chroma components of the currently decoded block comprises:
analyzing the code stream to obtain a chroma correction flag bit;
determining a value of the chroma correction flag bit to be a second value indicating that no filter is used for the prediction correction.
30. The method of claim 28 or 29, wherein the chroma correction flag bit is common to the luma correction flag bit.
31. An image encoding device characterized by comprising:
the dividing unit is used for dividing the image and determining a chroma component intra-frame prediction mode of a current coding block;
a determining unit, configured to determine a prediction block of a chroma component of the current coding block according to the chroma component intra prediction mode;
and the correcting unit is used for correcting the prediction block of the chroma component of the current coding block to obtain the corrected prediction block of the chroma component of the current coding block.
32. An image decoding apparatus, comprising:
the analysis unit is used for analyzing the code stream and determining the chroma component intra-frame prediction mode of the current decoding block;
a determination unit for determining a prediction block of a chroma component of the current decoded block according to the chroma component intra prediction mode;
and the correction unit is used for correcting the prediction block of the chroma component of the current decoding block to obtain the corrected prediction block of the chroma component of the current decoding block.
33. An encoder comprising a non-volatile storage medium and a central processing unit, wherein the non-volatile storage medium stores an executable program, and wherein the central processing unit is coupled to the non-volatile storage medium, and wherein the encoder performs the method of any one of claims 1-15 when the executable program is executed by the central processing unit.
34. A decoder comprising a non-volatile storage medium and a central processor, wherein the non-volatile storage medium stores an executable program, wherein the central processor is coupled to the non-volatile storage medium, wherein the decoder performs the method of any one of claims 16-30 when the executable program is executed by the central processor.
35. A terminal, characterized in that the terminal comprises: one or more processors, memory, and a communication interface; the memory, the communication interface and the one or more processors; the terminal communicating with other devices via the communication interface, the memory for storing computer program code, the computer program code comprising instructions,
the instructions, when executed by the one or more processors, cause the terminal to perform the method of any of claims 1-30.
36. A computer program product comprising instructions for causing a terminal to perform the method according to any one of claims 1-30 when the computer program product is run on the terminal.
37. A computer-readable storage medium comprising instructions that, when executed on a terminal, cause the terminal to perform the method of any one of claims 1-30.
CN202210664095.1A 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device Pending CN115002485A (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010510423.3A CN113766246A (en) 2020-06-05 2020-06-05 Image encoding method, image decoding method and related device
CN2020105104233 2020-06-05
CN202180005833.5A CN114514748A (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device
PCT/CN2021/090909 WO2021244197A1 (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method, and related apparatuses

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202180005833.5A Division CN114514748A (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device

Publications (1)

Publication Number Publication Date
CN115002485A true CN115002485A (en) 2022-09-02

Family

ID=78785271

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202010510423.3A Withdrawn CN113766246A (en) 2020-06-05 2020-06-05 Image encoding method, image decoding method and related device
CN202180005833.5A Pending CN114514748A (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device
CN202210664095.1A Pending CN115002485A (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device

Family Applications Before (2)

Application Number Title Priority Date Filing Date
CN202010510423.3A Withdrawn CN113766246A (en) 2020-06-05 2020-06-05 Image encoding method, image decoding method and related device
CN202180005833.5A Pending CN114514748A (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device

Country Status (4)

Country Link
CN (3) CN113766246A (en)
MX (1) MX2022009939A (en)
TW (1) TW202147844A (en)
WO (1) WO2021244197A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024078416A1 (en) * 2022-10-12 2024-04-18 维沃移动通信有限公司 Chromaticity component prediction method and apparatus, and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023197191A1 (en) * 2022-04-12 2023-10-19 Oppo广东移动通信有限公司 Coding method and apparatus, decoding method and apparatus, coding device, decoding device, and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003248913A1 (en) * 2003-01-10 2004-08-10 Thomson Licensing S.A. Defining interpolation filters for error concealment in a coded image
US8472527B2 (en) * 2006-09-13 2013-06-25 Texas Instruments Incorporated Hierarchical motion estimation using original frame for sub-sampled reference
US9008175B2 (en) * 2010-10-01 2015-04-14 Qualcomm Incorporated Intra smoothing filter for video coding
US10362314B2 (en) * 2015-11-27 2019-07-23 Mediatek Inc. Apparatus and method for video coding by intra-prediction
US20170302965A1 (en) * 2016-04-15 2017-10-19 Google Inc. Adaptive directional loop filter

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024078416A1 (en) * 2022-10-12 2024-04-18 维沃移动通信有限公司 Chromaticity component prediction method and apparatus, and device

Also Published As

Publication number Publication date
WO2021244197A1 (en) 2021-12-09
CN114514748A (en) 2022-05-17
CN113766246A (en) 2021-12-07
TW202147844A (en) 2021-12-16
MX2022009939A (en) 2022-09-12

Similar Documents

Publication Publication Date Title
US10244262B2 (en) Pixel-based intra prediction for coding in HEVC
CN113891076A (en) Method and apparatus for filtering decoded blocks of video data and storage medium
JP2020501434A (en) Indication of the use of bilateral filters in video coding
WO2020220884A1 (en) Intra-frame prediction method and apparatus for video sequence
CN114501010B (en) Image encoding method, image decoding method and related devices
WO2021238540A1 (en) Image encoding method, image decoding method, and related apparatuses
CN113497937B (en) Image encoding method, image decoding method and related devices
CN115002485A (en) Image encoding method, image decoding method and related device
WO2021135856A1 (en) Video coding method and apparatus, video decoding method and apparatus, device, and storage medium
US11917152B2 (en) Position dependent spatial varying transform for video coding
WO2022022622A1 (en) Image coding method, image decoding method, and related apparatus
CN114071161B (en) Image encoding method, image decoding method and related devices
WO2022037300A1 (en) Encoding method, decoding method, and related devices
CN112055211B (en) Video encoder and QP setting method
CN113965764B (en) Image encoding method, image decoding method and related device
US11985309B2 (en) Picture coding method, picture decoding method, and related apparatuses
WO2022117036A1 (en) Quantization parameter decoding method and device
WO2020259330A1 (en) Non-separable transformation method and device
WO2020007187A1 (en) Image block decoding method and device
WO2023154359A1 (en) Methods and devices for multi-hypothesis-based prediction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination