Chromatic block prediction method and device
The chroma block prediction method using a linear model mode addresses inefficiencies in chroma component coding within video coding standards, improving accuracy and efficiency by aligning filter types across encoder and decoder sides.
Patent Information
- Application Number
- JP2023045823
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-09-05
- Filing Date
- 2023-03-22
- Publication Date
- 2025-07-24
- Estimated Expiration
- 2039-09-05
AI Technical Summary
Current video coding standards, such as H.264/AVC and H.265/HEVC, face inefficiencies in coding the chroma component during intra prediction, which affects the overall compression efficiency of high-definition video data.
A chroma block prediction method using a linear model mode (LM mode) is employed, where the encoder determines a filter type based on the sample position type of the chroma block, encoding this information into a bitstream to ensure both encoder and decoder sides use consistent filters, improving coding accuracy and efficiency.
This approach enhances coding accuracy and efficiency by ensuring consistent filter application for different chroma sample positions across various video sequences, thereby optimizing the compression process.
Smart Images

Figure 0007712973000005 
Figure 0007712973000006 
Figure 0007712973000007
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video coding, and more particularly, to a chroma block prediction method and device.
Background Art
[0002] As Internet technology has developed rapidly and the material and spiritual cultures of humans have become increasingly rich, the demand for video applications, especially high-definition video applications, on the Internet has been increasing. However, high-definition video contains an extremely large amount of data. In order to transmit high-definition video over the Internet with limited bandwidth, it is necessary to first perform compression coding of high-definition video. Currently, two international organizations, namely MPEG in ISO / IEC and VCEG in ITU-T, are dedicated to formulating video coding standards. MPEG, established in 1986, specializes in formulating relevant standards mainly used in the multimedia field, such as storage, broadcast television, streaming media on the Internet or wireless networks. ITU-T mainly formulates video coding standards for the field of real-time video communication, such as video telephony, video conferencing, or other applications. Over the past few decades, video coding standards have been formulated for various applications, including MPEG-1 for VCD, MPEG-2 for DVD and DVB, H.261, H.263, and H.264 for video conferencing, MPEG-4 and HEVC that enable coding of objects in any form, and so on.
[0003] In currently widely used video coding standards H.264 / AVC (denoted as H.264) and H.265 / HEVC (denoted as H.265), various types of coding operations, such as prediction, transformation, and entropy coding, are performed by using image blocks as the basic unit. An image block is a two-dimensional sample array, that is, an array of size W*H samples (where W may or may not be equal to H). In addition, the sample values at each sample position are known.
[0004] A general video encoding process mainly includes the following stages, namely, Intra Prediction, Inter Prediction, Transform, Quantization, Entropy encoding, in-loop filtering, etc. After an image is divided into image blocks, Intra Prediction and Inter Prediction are performed. Then, after the residuals are obtained, Transform and Quantization are performed. Finally, Entropy encoding is performed to output a bitstream.
[0005] Intra Prediction means that the sample values of samples in the reconstructed region in the current image are used to predict the sample values of samples in the current block. Generally, the predicted values of samples in the current block are derived based on the samples in the reconstructed adjacent blocks around the current block. For example, in H.264 or H.265, the boundary (the boundary near the current block) samples of adjacent blocks are generally used as the reference samples of the current block, and the predicted values of samples in the current block are derived based on these reference samples by using a specific method. The Intra Prediction mode is, for example, an omni-directional mode such as the DC (or average) mode or the planar mode, or a directional mode as defined in H.265.
[0006] After prediction information is obtained through intra prediction, residual information is obtained by subtracting the corresponding prediction information from the sample values of the samples in the current coding block. Next, the residual information is transformed by using a method such as Discrete Cosine Transformation (DCT). Finally, a bitstream is obtained through quantization and entropy coding. After the predicted signal and the reconstructed residual signal are added together, a filtering operation needs to be further performed to obtain the reconstructed signal. The reconstructed signal is used as a reference signal for subsequent coding.
[0007] Decoding is a process inverse to encoding. Entropy decoding, dequantization, and inverse transformation are first performed to obtain residual information. The bitstream is decoded to determine whether intra prediction or inter prediction is used for the current block. If intra coding is used, prediction information is constructed based on the sample values of the samples in the reconstructed region around the current image by using the intra prediction method. After the prediction information and the residual information are added together, reconstructed information can be obtained by performing a filtering operation.
[0008] Existing videos are generally color videos. In addition to the luma component, the images in color videos further include chroma components. Therefore, the luma component needs to be coded, and the chroma component also needs to be coded. How to improve the coding efficiency for the chroma component in intra prediction remains a technical problem at present. Summary of the Invention Means for Solving the Problems
[0009] Embodiments of the present invention provide a chroma block prediction method and device to improve the coding efficiency for the chroma component (chroma block) in intra prediction.
[0010] According to a first aspect, an embodiment of the present invention provides a chroma block prediction method. The method is described from the perspective of the encoder side. The method may be used in intra prediction for a current chroma block, and the intra prediction mode used is a linear model mode (abbreviated as LM mode). The method is to determine a filter type based on the sample position type of the current chroma block, where the filter type is determined based on the sample position type of the current chroma block, and each sample position type of the current chroma block corresponds to the filter type to be determined, and to set first display information, where the first display information is used to indicate the filter type, and to encode the first display information into a bitstream, and as a result, the bitstream is later sent to the decoder side.
[0011] In this embodiment of the present invention, it can be known that the encoder can determine the luma downsampling filter used for the current luma block based on the sample position type of the current chroma sample, and can specify the type of the downsampling filter for the decoder through the display information. This ensures that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position, thereby improving the coding accuracy and coding efficiency of the encoder side.
[0012] Based on the first aspect, in a possible embodiment, six sample position types, namely type0, type1, type2, type3, type4, and type5, can be designed. Accordingly, there are six types of luma downsampling filters corresponding to the six sample position types, namely filter0, filter1, filter2, filter3, filter4, and filter5. In other words, the current sample position type of the chroma block may be one of the six sample position types. By setting these filters, it is ensured that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position. This takes into account the case where different chroma sample positions may actually exist in different video sequences, thereby improving the coding accuracy and coding efficiency on the encoder side.
[0013] Based on the first aspect, in a possible embodiment, it is considered that chroma sample positions type0 and type2 are currently the most common, and two sample position types may be designed as alternatives. In other words, the two sample position types only include type0 and type2. Accordingly, there are two types of luma downsampling filters, namely filter0 and filter2 corresponding to the two sample position types. In other words, the current sample position type of the chroma block may be one of the two sample position types. By setting these filters, the coding accuracy and coding efficiency on the encoder side can be improved while meeting the most common coding requirements.
[0014] Based on the first aspect, in a possible embodiment, sequence parameter set (SPS) parameters may be newly added, and the values of the SPS parameters are used to indicate the type of the luma downsampling filter in the LM mode during the encoding or decoding of the current video sequence. On the encoder side, this parameter may be set based on the chroma sample positions in the current sequence. Specifically, the first display information may be set based on the filter type. The first display information may include the value of the SPS parameter, where the value is used to indicate the type of the luma downsampling filter used for prediction of chroma blocks during encoding or decoding.
[0015] Based on the first aspect, in a possible embodiment, a plurality of intra prediction modes may be preset on the encoder side. The plurality of intra prediction modes includes the LM mode. The encoder side carefully considers the plurality of intra prediction modes and determines that the optimal intra prediction mode for the current chroma block is the LM mode. In addition, the encoder side may further set second display information, where the second display information is used to indicate the LM mode, and may perform the setting and encoding the second display information into the bitstream, so that the decoder side also performs intra prediction in the LM mode to improve the coding efficiency.
[0016] Based on the first aspect, in a possible embodiment, during the configuration of the prediction block, on the encoder side, determine a filter corresponding to the filter type based on the first display information, and downsample the first luma block by using the filter corresponding to the filter type to obtain a second luma block, where the first luma block is the luma block corresponding to the current chroma block; obtain template chroma samples and template luma samples, where the template chroma samples include a plurality of adjacent chroma samples of the current chroma block, and the template luma samples are obtained by downsampling a plurality of adjacent luma samples of the first luma block; obtain linear model coefficients based on the template chroma samples and the template luma samples; and further obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficients.
[0017] According to a second aspect, an embodiment of the present invention provides a chroma block prediction method. The method may be used in intra prediction for a current chroma block, and the intra prediction mode used is the LM mode. The method is to parse a bitstream to obtain first display information, where parsing the bitstream is used to indicate a filter type, and to perform a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is the luma block corresponding to the current chroma block, and the position of the luma samples of the second luma block is aligned with the position of the chroma samples of the current chroma block; to obtain template chroma samples and template luma samples, where the template chroma samples include a plurality of adjacent chroma samples of the current chroma block, and the template luma samples are obtained by performing a downsampling operation on a plurality of adjacent luma samples of the first luma block; to obtain linear model coefficients based on the template chroma samples and the template luma samples; and to obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficients.
[0018] In this embodiment of the present invention, it can be known that for the LM mode, the decoder side can determine, based on the display information in the bitstream during downsampling of the current block, the filter used for downsampling the luma block corresponding to the current chroma block. In this way, a filter corresponding to the chroma sample position can be obtained. This takes into account cases where different chroma sample positions may exist in different video sequences, thereby improving coding accuracy and coding efficiency.
[0019] Specifically, in this embodiment of the present invention, the adjacent upper side and the adjacent left side used for calculating the linear model coefficients are sometimes referred to as a template. A template is a set of luma samples or a set of chroma samples used for calculating the linear model coefficients. A set of luma samples used for calculating the linear model coefficients is sometimes also referred to as template luma samples. The template luma samples are obtained by performing a downsampling operation on a plurality of adjacent luma samples of a luma block (since there may be no luma sample value at the position corresponding to the template chroma samples in the luma image). A set of chroma samples used for calculating the linear model coefficients is sometimes also referred to as template chroma samples. The template chroma samples include a plurality of adjacent chroma samples reconstructed from the current chroma block.
[0020] Based on the second aspect, in a possible embodiment, the template chroma samples specifically include one or more rows of adjacent chroma samples above the current chroma block and one or more columns of adjacent chroma samples to the left of the current chroma block. The template luma samples have a one-to-one correspondence with the template chroma samples, and the values of the samples in the template luma samples and the values of the samples in the template chroma samples form a value pair.
[0021] Based on the second aspect, in a possible embodiment, the template chroma samples include one row of adjacent chroma samples above the current chroma block and one column of adjacent chroma samples to the left of the current chroma block. Therefore, the template luma samples include one row of luma samples and one column of left luma samples, where one row of luma samples and one column of left luma samples correspond to the chroma sample positions in the template chroma samples.
[0022] Based on the second aspect, in a possible embodiment, the template chroma sample includes two rows of the adjacent chroma sample above the current chroma block and two columns of the adjacent chroma sample to the left. Thus, the template luma sample includes two rows of the luma sample and two columns of the luma sample, where the two rows of the luma sample and the two columns of the luma sample correspond to the chroma sample positions in the template chroma sample.
[0023] Based on the second aspect, in a possible embodiment, the template chroma sample may alternatively include only one or more columns of the adjacent chroma sample to the left of the current chroma block. The template luma sample includes only one or more columns of the luma sample, and the template luma sample has a one-to-one correspondence with the template chroma sample.
[0024] Based on the second aspect, in a possible embodiment, the template chroma sample may alternatively include only one or more rows of the adjacent chroma sample above the current chroma block. The template luma sample includes only one or more rows of the luma sample, and the template luma sample has a one-to-one correspondence with the template chroma sample.
[0025] Based on the second aspect, in a possible embodiment, since the first display information indicates the filter type for the template luma sample, in order to obtain the template luma sample, a downsampling operation may be performed on a plurality of adjacent luma samples of the first luma block by using a filter corresponding to the filter type. In this way, on the decoder side, the same filter is used in the downsampling process for deriving the template luma sample and the downsampling process for the current block, thereby improving the processing efficiency.
[0026] For example, if six filter types are designed for the decoder side and the value currently shown by the first display information is 0, the used luma downsampling filter is filter 0. To obtain the value of each luma sample in the template luma samples, a downsampling operation may be performed on a plurality of adjacent luma samples of the first luma block by using filter 0.
[0027] Based on the second aspect, in a possible embodiment, during the syntax analysis of the bitstream, second display information may be further obtained by syntax analyzing the bitstream. The second display information is used to indicate that the intra prediction mode used by the decoder side for decoding the current chroma block is the LM mode. As a result, the decoder side should determine to use the LM mode for intra prediction for the current image in the video sequence.
[0028] Based on the second aspect, in a possible embodiment, the method is used for decoding a current image block in a video sequence. The current image block includes a first luma block and a current chroma block, and the images in the video sequence are in 4:2:0 format or 4:2:2 format.
[0029] Based on the second aspect, in a possible embodiment, the encoder side and the decoder side may use filter types of the same design. For example, six filter types (corresponding to six chroma sample positions) are designed for the encoder side, and six filter types are also designed for the decoder side. In addition, the downsampling algorithms for the six filter types on the decoder side respectively match the downsampling algorithms for the six filter types on the encoder side. In another example, two filter types (corresponding to two chroma sample positions) are designed for the encoder side, and two filter types are also designed for the decoder side. In addition, the downsampling algorithms for the two filter types on the decoder side respectively match the downsampling algorithms for the two filter types on the encoder side.
[0030] Based on the second aspect, in a possible embodiment, the first display information includes the value of the SPS parameter, where the value is used to indicate the type of the luma downsampling filter used for prediction of the chroma block during encoding or decoding.
[0031] Based on the second aspect, in a possible embodiment, obtaining the linear model coefficients based on the template chroma samples and the template luma samples includes obtaining the linear model coefficients α and β based on the template chroma samples and the template luma samples by using the least squares method.
[0032] Based on the second aspect, in a possible embodiment, obtaining the linear model coefficients based on the template chroma samples and the template luma samples includes obtaining the linear model coefficients α and β based on the template chroma samples and the template luma samples by using the extreme value method.
[0033] According to a third aspect, the method may be used in intra prediction for a current chroma block. The method may be described from the perspective of the decoder side, and the intra prediction mode used may be, for example, the LM mode. The method includes determining a filter type based on the sample position of the current chroma block, and performing a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is the luma block corresponding to the current chroma block; obtaining template chroma samples and template luma samples, where the template chroma samples include a plurality of adjacent chroma samples of the current chroma block, and the template luma samples are obtained by performing a downsampling operation on a plurality of adjacent luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; and obtaining a predicted value of the current chroma block based on the second luma block and the linear model coefficients.
[0034] In this embodiment of the present invention, it can be known that the encoder can determine the luma downsampling filter used for the current luma block based on the sample position of the current chroma block to obtain a filter corresponding to the chroma sample position. This takes into account the case where different chroma sample positions may exist in different video sequences in practice, thereby improving coding accuracy and coding efficiency.
[0035] Based on the third aspect, in a possible embodiment, before determining the filter type based on the sample position of the current chroma block, the method includes parsing a bitstream to obtain first display information, where the first display information is used to indicate the sample position of the current chroma block. The sample position of the current chroma block may be associated with the filter type.
[0036] In this embodiment of the present invention, it can be known that the encoder can determine the sample position of the current chroma sample based on the first display information in order to obtain a filter corresponding to the chroma sample position. Both the encoder side and the decoder side can obtain a filter corresponding to the chroma sample position, thereby improving the coding accuracy and coding efficiency on the encoder side.
[0037] Based on the third aspect, in a possible embodiment, the sample position of the current chroma block may be determined, for example, based on the sample position type of the current chroma block. The sample position type of the current chroma block may be associated with the filter type.
[0038] In one implementation form, the sample position type of the current chroma block is at least one of the following sample position types, that is, sample position type type0 and sample position type type2.
[0039] In another implementation form, the sample position type of the current chroma block is at least one of the following sample position types, that is, sample position type type0, sample position type type1, sample position type type2, sample position type type3, sample position type type4, and sample position type type5.
[0040] Based on the third aspect, in a possible embodiment, syntax-analyzing the bitstream to obtain the first display information includes syntax-analyzing the sequence parameter set (SPS) parameters in the bitstream to obtain the first display information. During the implementation of this embodiment, the encoder side may indicate the sample position type of the current chroma block to the decoder side through specific SPS parameters. This is equivalent to specifying the type of the downsampling filter for the decoder side, thereby ensuring that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position.
[0041] According to a fourth aspect, an embodiment of the present invention provides a video data encoding device. The device includes a memory and an encoder coupled to the memory. The memory is configured to store video data in bitstream format. The encoder is configured to determine a filter type based on the sample position type of the current chroma block, set the first display information, where the first display information is used to indicate the filter type, and encode the first display information into the bitstream. Specifically, the device may be configured to implement the method described in the first aspect.
[0042] According to a fifth aspect, an embodiment of the present invention provides a video data decoding device. The device includes a memory and a decoder coupled to the memory. The memory is configured to store video data in bitstream format. The decoder is configured to parse the bitstream to obtain first display information, where parsing the bitstream is used to indicate a filter type, and to perform a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to a current chroma block, and to obtain template chroma samples and template luma samples, where the template chroma samples include a plurality of adjacent chroma samples of the current chroma block, and the template luma samples are obtained by performing a downsampling operation on a plurality of adjacent luma samples of the first luma block, and to obtain linear model coefficients based on the template chroma samples and the template luma samples, and to obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficients. Specifically, the device may be configured to implement the method described in the second aspect.
[0043] According to a sixth aspect, an embodiment of the present invention provides a video data decoding device. The device includes a memory and a decoder coupled to the memory. The memory is configured to store video data in bitstream format. The decoder is configured to determine a filter type based on the sample position type of the current chroma block, and perform a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is the luma block corresponding to the current chroma block; obtain template chroma samples and template luma samples, where the template chroma samples include a plurality of adjacent chroma samples of the current chroma block, and the template luma samples are obtained by performing a downsampling operation on a plurality of adjacent luma samples of the first luma block; obtain linear model coefficients based on the template chroma samples and the template luma samples; and obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficients. Specifically, the device may be configured to implement the method described in the third aspect.
[0044] According to a seventh aspect, an embodiment of the present invention provides an encoding device. The encoding device includes a non-volatile memory and a processor coupled to each other. The processor calls program code stored in the memory to execute the method described in the first aspect.
[0045] According to an eighth aspect, an embodiment of the present invention provides a decoding device. The decoding device includes a non-volatile memory and a processor coupled to each other. The processor calls program code stored in the memory to execute the method described in the second aspect.
[0046] According to a ninth aspect, an embodiment of the present invention provides a decoding device. The decoding device includes a non-volatile memory and a processor coupled to each other. The processor calls program code stored in the memory to execute the method described in the third aspect.
[0047] According to a tenth aspect, an embodiment of the present invention provides a system. The system includes the device described in the fourth aspect and the device described in the fifth aspect, or the system includes the device described in the fourth aspect and the device described in the sixth aspect.
[0048] According to an eleventh aspect, an embodiment of the present invention provides another system. The system includes the encoding device described in the seventh aspect and the decoding device described in the eighth aspect, or the system includes the encoding device described in the seventh aspect and the decoding device described in the ninth aspect.
[0049] According to a twelfth aspect, an embodiment of the present invention provides a non-volatile computer-readable storage medium. The computer-readable storage medium is configured to store program code of the method described in the first aspect. When the program code is executed by a computing device, the computing device is configured to execute the method described in the first aspect.
[0050] According to a thirteenth aspect, an embodiment of the present invention provides another non-volatile computer-readable storage medium. The computer-readable storage medium is configured to store program code of the method described in the second aspect or the third aspect. When the program code is executed by a computing device, the computing device is configured to execute the method described in the second aspect or the third aspect.
[0051] According to a 14th aspect, an embodiment of the present invention provides a computer program product. The computer program product includes program instructions. When the computer program product is executed by a computing device, the computing device executes the method described in the 1st aspect. The computer program product may be a software installation package. When the method provided in any possible design of the 1st aspect needs to be used, the computer program product may be downloaded and executed on the computing device to implement the method described in the 1st aspect.
[0052] According to a 15th aspect, an embodiment of the present invention provides another computer program product. The computer program product includes program instructions. When the computer program product is executed by a computing device, the computing device executes the method provided in any possible design of the 2nd or 3rd aspect. The computer program product may be a software installation package. When the method provided in any possible design of the 2nd or 3rd aspect needs to be used, the computer program product may be downloaded and executed on the computing device to implement the method described in the 2nd or 3rd aspect.
[0053] In an embodiment of the present invention, for the LM mode, the encoder can determine the luma downsampling filter used for the current luma block based on the sample position of the current chroma block, and can specify the type of the downsampling filter for the decoder through display information (for example, the value of the newly added SPS parameter). It can be known that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position, which ensures that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position. Considering the case where different chroma sample positions may exist in different video sequences in practice, this guarantees the consistency between the downsampled luma sample position and the chroma sample position, and improves the coding accuracy and coding efficiency on the encoder side.
[0054] To more clearly explain the technical solutions in the embodiments or the background art of the present invention, the following describes the accompanying drawings used in the embodiments or the background art of the present invention.
Brief Description of the Drawings
[0055]
Figure 1A
Figure 1B
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Embodiments for Carrying Out the Invention
[0056] The following will describe embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. The terms used in the implementation forms of the present invention are only intended to describe specific embodiments of the present invention and are not intended to limit the present invention.
[0057] Video coding generally refers to the processing of a sequence of pictures that form a video or video sequence. In the field of video coding, the terms "picture", "frame", and "image" may be used interchangeably. As used herein, video coding refers to video encoding or video decoding. Video encoding is performed on the source side and generally involves processing the original video picture (e.g., by compressing) to reduce the amount of data required to depict the video picture for more efficient storage and / or transmission. Video decoding is performed on the destination side and generally involves performing the reverse process compared to the encoder's processing to reconstruct the video picture. The "coding" of a video picture in this embodiment should be understood as the "encoding" or "decoding" of a video sequence. The combination of the encoding part and the decoding part is also called a codec (encoding and decoding).
[0058] Each of the multiple pictures in a video sequence is typically divided into a set of non-overlapping blocks, and coding is typically performed at the block level. In other words, on the encoder side, the video is typically processed or encoded at the block level (also called an image block or video block) by generating prediction blocks using, for example, spatial (intrapicture) prediction and / or temporal (interpicture) prediction, subtracting the prediction block from the current block (the block being currently processed / to be processed) to obtain a residual block, and transforming and quantizing the residual block in the transform domain to reduce the amount of data to be transmitted (compressed). On the other hand, on the decoder side, the reverse process compared to the encoder's processing is applied to the encoded or compressed block to reconstruct the current block for depiction. Further, the encoder replicates the decoder processing loop, such that both generate the same prediction (e.g., intra prediction and inter prediction) and / or reconstruction for processing or coding subsequent blocks.
[0059] The term "block" is part of a picture or a frame. In this specification, the current block is the block currently being processed. For example, during encoding, the current block is the block currently being encoded, and during decoding, the current block is the block currently being decoded. If the block currently being processed is a chroma component block, that block is called the current chroma block. The luma block corresponding to the current chroma block may be called the current luma block. A reference block is a block that provides a reference signal for the current block. The reference signal represents sample values, sample values, or sample signals within an image block. A prediction block is a block that provides a prediction signal for the current block. The prediction signal represents sample values, sample values, or sample signals within the prediction block. For example, after a plurality of reference blocks are considered in detail, an optimal reference block is found. The optimal reference block provides a prediction for the current block, and this block is called the prediction block.
[0060] In addition, in this specification, a sample (or pel) may also be called a sample. Correspondingly, a sample value may also be called the value of a sample (or sample value). If the samples included in the current block are luma samples, the current block may be called the current luma block (or the current luma image block). If the samples included in the current image block are chroma samples, the current image block may be called the current chroma block (or the current chroma image block).
[0061] The following describes a system architecture to which an embodiment of the present invention is applied. FIG. 1A is a block diagram of an exemplary video coding system 10 described in an embodiment of the present invention. As used herein, the term "video codec" generally refers to both a video encoder and a video decoder. As used herein, the terms "video coding" or "coding" may generally refer to video encoding or video decoding. As shown in FIG. 1A, the video coding system 10 may include a source device 12 and a destination device 14. The source device 12 generates encoded video data, and thus, the source device 12 may be referred to as a video encoding device. The destination device 14 may decode the encoded video data generated by the source device 12, and thus, the destination device 14 may be referred to as a video decoding device. The source device 12, the destination device 14, or various implementation solutions of the source device 12 or the destination device 14 may include one or more processors and a memory coupled to the one or more processors. The memory may be used to store desired program code in the form of, but not limited to, RAM, ROM, EEPROM, flash memory, or any other medium that can store instructions or data structures accessible by a computer, including any other medium that can be used for this purpose. The source device 12 and the destination device 14 may include various devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handheld telephones such as "smartphones", television sets, cameras, display devices, digital media players, video game consoles, in-vehicle computers, and similar devices.
[0062] The communication connection between the source device 12 and the destination device 14 may be implemented through the link 13, and the destination device 14 may receive the encoded video data from the source device 12 through the link 13. The link 13 may include one or more media or devices capable of moving the encoded video data from the source device 12 to the destination device 14. In one example, the link 13 may include one or more communication media that enable the source device 12 to immediately transmit the encoded video data to the destination device 14 in real time. In this example, the source device 12 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated video data to the destination device 14. The one or more communication media may include wireless communication media and / or wired communication media, such as the 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, which may be, for example, a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices that facilitate communication from the source device 12 to the destination device 14.
[0063] The source device 12 includes an encoder 20, and optionally, the source device 12 may further include a picture source 16, a picture pre-processor 18, and a communication interface 22. In certain embodiments, the encoder 20, the picture source 16, the picture pre-processor 18, and the communication interface 22 may be hardware components within the source device 12 or may be software programs on the source device 12. The individual descriptions are as follows.
[0064] The picture source 16 may include, or be, for example, any type of picture capture device configured to capture real-world pictures, and / or any type of device for generating pictures or comments (in the case of screen content encoding, a part of a picture or image for which some text on the screen should also be encoded), such as a computer graphics processor configured to generate computer animation pictures, or a real-world picture or computer animation picture (for example, screen content or virtual reality (VR) picture), and / or any type of device configured to acquire and / or provide any combination thereof (for example, augmented reality (AR) picture). The picture source 16 may be a camera configured to capture pictures, or a memory configured to store pictures. The picture source 16 may further include any type of (internal or external) interface for storing previously captured or generated pictures and / or for acquiring or receiving pictures. When the picture source 16 is a camera, the picture source 16 may be, for example, a local camera or an integrated camera integrated in the source device. When the picture source 16 is a memory, the picture source 16 may be, for example, a local memory or an integrated memory integrated in the source device. When the picture source 16 includes an interface, the interface may be, for example, an external interface for receiving pictures from an external video source. The external video source may be, for example, an external picture capture device such as a camera, an external memory, or an external picture generation device. The external picture generation device may be, for example, an external computer graphics processor, a computer, or a server.The interface may be a wired or wireless interface or an optical interface according to any type of interface, for example, any proprietary interface protocol or a standardized interface protocol.
[0065] A picture may be regarded as a two-dimensional array or matrix of samples having luma values. Samples in the array may also be called samples (a shortened form of picture elements) or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. For color depiction, three color components are generally used. For example, a picture may be depicted as or may include three sample arrays. In the RGB format or color space, a picture includes corresponding red, green, and blue sample arrays. However, in video coding, each sample is typically depicted in a luminance / chrominance format or luminance / chrominance color space. For example, a picture in the YUV format includes a luminance component indicated by Y (sometimes L is used instead), and two chrominance components indicated by U and V. The luminance (shortened to luma) component Y represents luminance or gray level intensity (for example, in a grayscale picture, the two are the same), and the two chrominance (shortened to chroma) components U and V represent chrominance or color information components. Thus, a picture in the YUV format includes a luma sample array of luma sample values (Y), and two chroma sample arrays of chroma values (U and V). A picture in the RGB format may be converted or transformed into a picture in the YUV format, and vice versa, and the process is also called color transformation or color conversion. If a picture is monochrome, the picture may include only a luma sample array. In this embodiment of the present invention, the picture transmitted by the picture source 16 to the picture processor may also be called raw picture data 17. In a possible embodiment of the present invention, the picture source 16 may be further configured to determine the chroma sample positions of each picture in the current video sequence.
[0066] The picture preprocessor 18 is configured to receive the raw picture data 17 and preprocess the raw picture data 17 in order to obtain the preprocessed picture 19 or preprocessed picture data 19. For example, the preprocessing performed by the picture preprocessor 18 may include trimming, color format conversion (e.g., from RGB format to YUV format), color correction, or noise removal. In a possible embodiment, the picture preprocessor 18 may be further configured to determine the chroma sample position in the current video sequence.
[0067] The encoder 20 (also referred to as the video encoder 20) is configured to receive the preprocessed picture data 19 and process the preprocessed picture data 19 in a related prediction mode (e.g., the intra prediction mode in this embodiment of the present specification) in order to provide the encoded picture data 21. (The structural details of the encoder 20 will be further described below based on FIGS. 2, 4, or 5.) In some embodiments, the encoder 20 may be configured to execute the embodiments described below in order to implement the application of the chroma block prediction method on the encoder side described in the present invention.
[0068] The communication interface 22 may be configured to receive the encoded picture data 21 and transmit the encoded picture data 21 to the destination device 14 or any other device (e.g., a memory) through the link 13 for storage or direct reconstruction. Any other device may be any device used for decoding or storage. The communication interface 22 may be configured to package the encoded picture data 21 into an appropriate format, e.g., a data packet, for transmission through the link 13.
[0069] The destination device 14 includes a decoder 30 and optionally, the destination device 14 may further include a communication interface 28, a picture post-processor 32, and a display device 34. The individual descriptions are as follows.
[0070] The communication interface 28 may be configured to receive the encoded picture data 21 from the source device 12 or any other source. Any other source may be, for example, a storage device, and the storage device may be, for example, an encoded picture data storage device. The communication interface 28 may be configured to transmit or receive the encoded picture data 21 through the link 13 between the source device 12 and the destination device 14 or through any type of network. The link 13 may be, for example, a direct wired connection or a wireless connection, and any type of network may be, for example, a wired network or a wireless network, or any combination thereof, or any type of private network or public network, or any combination thereof. The communication interface 28 may be configured to depackage the data packets transmitted through the communication interface 22 to obtain the encoded picture data 21, for example.
[0071] Both the communication interface 28 and the communication interface 22 may be configured as a unidirectional communication interface or a bidirectional communication interface, for example, to send and receive messages for setting up a connection and to recognize responses and exchange any other information related to the communication link and / or data transmissions such as the encoded picture data transmission.
[0072] Decoder 30 (also referred to as video decoder 30) is configured to receive encoded picture data 21 and provide decoded picture data 31 or decoded picture 31 (structural details of decoder 30 will be further described below based on FIGS. 3, 4, or 5). In some embodiments, decoder 30 may be configured to execute the embodiments described below to implement the application of the chroma block prediction method on the decoder side described in the present invention.
[0073] Picture post-processor 32 is configured to post-process decoded picture data 31 (also referred to as reconstructed picture data) to obtain post-processed picture data 33. The post-processing performed by picture post-processor 32 may include color format conversion (e.g., from YUV format to RGB format), color correction, trimming, resampling, or any other processing. Picture post-processor 32 may be further configured to transmit post-processed picture data 33 to display device 34.
[0074] Display device 34 is configured to receive post-processed picture data 33, for example, to display a picture to a user or viewer. Display device 34 may be any type of display configured to present a reconstructed picture, or may include such a display, for example, an integrated or external display or monitor. For example, the display may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.
[0075] FIG. 1A shows the source device 12 and the destination device 14 as separate devices, but embodiments of the device may also include both the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality, or both of their functions. In such embodiments, the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality may be implemented by using the same hardware and / or software, or by using separate hardware and / or software or any combination thereof.
[0076] Based on this description, it may be known to those skilled in the art that the presence and (exact) division of the functions of various units or the functions of the source device 12 and / or the destination device 14 shown in FIG. 1A may vary according to the actual device and application example. Each of the source device 12 and the destination device 14 may be any one of a wide range of devices, including any type of handheld or fixed device, such as a notebook or laptop computer, a mobile phone, a smartphone, a pad or tablet computer, a video camera, a desktop computer, a set-top box, a television, a camera, an in-vehicle device, a display device, a digital media player, a video game console, a video streaming device (such as a content service server or a content delivery server), a broadcast receiver device or a broadcast transmitter device, and may or may not use any type of operating system.
[0077] Encoder 20 and decoder 30 may each be implemented as any of a variety of suitable 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 combination thereof. If the technology is implemented using software in part, the device may store software instructions in a suitable non-transitory computer-readable storage medium and execute the instructions by using hardware such as one or more processors to perform the techniques of this disclosure. Any of the foregoing (including hardware, software, combinations of hardware and software, etc.) may be regarded as one or more processors.
[0078] In some cases, the video coding system 10 shown in FIG. 1A is merely an example, and the techniques in this application are applicable to video coding settings (e.g., video encoding or video decoding) that do not necessarily involve any data communication between the encoding device and the decoding device. In other examples, the data may be retrieved from local memory and may be streamed over a network, etc. The video encoding device may encode the data, store the encoded data in memory, and / or the video decoding device may retrieve the data from memory and decode the data. In some examples, encoding and decoding are performed by devices that do not communicate with each other but simply encode data to memory and / or retrieve data from memory and decode the data.
[0079] Figure 1B is an exemplary diagram of an example of a video coding system 40 including the encoder 20 in FIG. 2 and / or the decoder 30 in FIG. 3 according to an exemplary embodiment. The video coding system 40 can implement combinations of various techniques in embodiments of the present invention. In the illustrated implementation, the video coding system 40 may include an imaging device 41, an antenna 42, a decoder 30 (and / or a video encoder / decoder implemented by the logic circuit 47 of the processing unit 46), one or more processors 43, one or more memories 44, and / or a display device 45.
[0080] As shown in FIG. 1B, the imaging device 41, the antenna 42, the processing unit 46, the logic circuit 47, the encoder 20, the decoder 30, the processor 43, the memory 44, and / or the display device 45 can communicate with each other. As described, the video coding system 40 is illustrated using the encoder 20 and the decoder 30, but the video coding system 40 may include only the encoder 20 or only the decoder 30 in various examples.
[0081] In some examples, the antenna 42 may be configured to transmit or receive an encoded bitstream of video data. Further, in some examples, the display device 45 may be configured to present video data. In some examples, the logic circuit 47 may be implemented by the processing unit 46. The processing unit 46 may include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, and the like. The video coding system 40 may also include an optional processor 43. The optional processor 43 may similarly include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, and the like. In some examples, the logic circuit 47 may be implemented by hardware, such as hardware dedicated to video coding, and the processor 43 may be implemented by general-purpose software, an operating system, and the like. Additionally, the memory 44 may be any type of memory, such as volatile memory (e.g., Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM)), or non-volatile memory (e.g., flash memory). In a non-limiting example, the memory 44 may be implemented by cache memory. In some examples, the logic circuit 47 may access the memory 44 (e.g., for implementation of an image buffer). In other examples, the logic circuit 47 and / or the processing unit 46 may include a memory (e.g., cache) for implementation of an image buffer or the like.
[0082] In some examples, the encoder 20 implemented by a logic circuit may include an image buffer (implemented, for example, by the processing unit 46 or the memory 44), and a graphics processing unit (implemented, for example, by the processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the encoder 20 implemented by the logic circuit 47 to implement various modules described with reference to FIG. 2 and / or any other encoder system or subsystem described herein. The logic circuit may be configured to perform various operations described herein.
[0083] In some examples, the decoder 30 may be implemented in a similar manner by the logic circuit 47 to implement various modules described with reference to the decoder 30 in FIG. 3 and / or any other decoder system or subsystem described herein. In some examples, the decoder 30 implemented by a logic circuit may include an image buffer (implemented, for example, by the processing unit 46 or the memory 44), and a graphics processing unit (implemented, for example, by the processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the decoder 30 implemented by the logic circuit 47 to implement various modules described with reference to FIG. 3 and / or any other decoder system or subsystem described herein.
[0084] In some examples, the antenna 42 may be configured to receive an encoded bitstream of video data. As described, the encoded bitstream may include data, indicators, index values, mode selection data, etc. related to the video frame coding described herein, for example, data related to coding partitions (e.g., transform coefficients or quantized transform coefficients, optional indicators (as described), and / or data defining coding partitions). The video coding system 40 may further include a decoder 30 coupled to the antenna 42 and configured to decode the encoded bitstream. The display device 45 is configured to present video frames.
[0085] In this embodiment of the present invention, it should be understood that for the examples described with reference to the encoder 20, the decoder 30 may be configured to perform the reverse process. Regarding the signaling syntax elements, the decoder 30 may be configured to receive and parse such syntax elements and decode the related video data accordingly. In some examples, the encoder 20 may entropy encode the syntax elements into the encoded video bitstream. In such examples, the decoder 30 may parse such syntax elements and decode the related video data accordingly.
[0086] Note that the chroma block prediction method described in the embodiments of the present invention is mainly used in the intra prediction process and there are processes in both the encoder 20 and the decoder 30. The encoder 20 / decoder 30 in the embodiments of the present invention may be an encoder / decoder that conforms to a video standard protocol such as H.263, H.264, HEVC, MPEG-2, MPEG-4, VP8, or VP9, or conforms to a next-generation video standard protocol (such as H.266).
[0087] FIG. 2 is a schematic / conceptual block diagram of an exemplary encoder 20 configured to implement an embodiment of the present invention. In the example of FIG. 2, encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB) 230, a prediction processing unit 260, and an entropy encoding unit 270. The prediction processing unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a mode selection unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown in the figure). The encoder 20 shown in FIG. 2 may also be referred to as a hybrid video encoder or a video encoder based on a hybrid video codec.
[0088] For example, the residual calculation unit 204, the transform processing unit 206, the quantization unit 208, the prediction processing unit 260, and the entropy encoding unit 270 form the forward signal path of the encoder 20, while on the other hand, for example, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, and the prediction processing unit 260 form the reverse signal path of the encoder. The reverse signal path of the encoder corresponds to the signal path of the decoder (see decoder 30 in FIG. 3).
[0089] The encoder 20 receives, for example, through the input unit 202, the picture 201 or an image block 203 of the picture 201, for example, a picture in a sequence of pictures forming a video or a video sequence. The image block 203 may also be referred to as the current picture block or the picture block to be encoded. The picture 201 may be referred to as the current picture or the picture to be encoded (especially in video coding, in order to distinguish the current picture from other pictures, other pictures are, for example, previously encoded and / or decoded pictures in the same video sequence, i.e., the video sequence including the current picture).
[0090] An embodiment of the encoder 20 may include a partitioning unit (not shown in FIG. 2) configured to partition the picture 201 into a plurality of blocks such as the image block 203. The picture 201 is typically partitioned into a plurality of non-overlapping blocks. The partitioning unit may use the same block size for all pictures in the video sequence and a corresponding grid defining the block size, or may be configured to change the block size between pictures or subsets or groups of pictures and partition each picture into corresponding blocks.
[0091] In one example, the prediction processing unit 260 of the encoder 20 may be configured to perform any combination of the partitioning techniques described above.
[0092] Similar to picture 201, image block 203 is also a two-dimensional array or matrix of samples having luma values (sample values), or may be regarded as such, but the size of image block 203 is smaller than the size of picture 201. In other words, image block 203 may include, for example, one sample array (e.g., the luma array in the case of a monochrome picture 201), three sample arrays (e.g., one luma array and two chroma arrays in the case of a color picture), or any other quantity and / or type of array according to the applicable color format. The quantity of samples in the horizontal and vertical directions (or axes) of image block 203 defines the size of image block 203.
[0093] The encoder 20 shown in FIG. 2 is configured to encode picture 201 in block units, for example, to encode and predict each image block 203.
[0094] The residual calculation unit 204 calculates a residual block 205 based on the picture image block 203 and the prediction block 265 (further details about the prediction block 265 are provided below), and is configured to obtain the residual block 205 in the sample region, for example, by subtracting the sample values of the prediction block 265 from the sample values of the picture image block 203 in sample units (in sample units).
[0095] The conversion processing unit 206 is configured to apply a conversion, for example, a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain conversion coefficients 207 in the conversion region. The conversion coefficients 207 may also be called conversion residual coefficients and represent the residual block 205 in the conversion region.
[0096] The conversion processing unit 206 may be configured to apply integer approximations of DCT / DST such as the conversion specified in HEVC / H.265. Compared with the orthogonal DCT transform, such integer approximations are typically scaled by specific coefficients. To maintain the norm of the residual block processed by using the forward and inverse transforms, applying additional scale factors is part of the conversion process. The scale factors are typically selected based on several constraints. For example, the scale factors are powers of two for shift operations, the bit depth of the conversion coefficients, the trade-off between accuracy and implementation cost, etc. A specific scaling factor may be specified for, for example, the inverse conversion by the inverse conversion processing unit 212 on the decoder side 30 (and, for example, the corresponding inverse conversion by the inverse conversion processing unit 212 on the encoder side 20), and the corresponding scaling factor for the forward conversion by the conversion processing unit 206 on the encoder side 20 may be specified accordingly.
[0097] The quantization unit 208 is configured to obtain quantized transform coefficients 209 by quantizing the transform coefficients 207, for example, by applying scalar quantization or vector quantization. The quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be truncated to an m-bit transform coefficient during quantization, provided that n is greater than m. The quantization degree may be adjusted by adjusting a quantization parameter (QP). For example, in the case of scalar quantization, different scales may be applied to achieve finer or coarser quantization. Smaller quantization steps correspond to finer quantization, and larger quantization steps correspond to coarser quantization. An appropriate quantization step size may be indicated by the quantization parameter (QP). The quantization parameter may be, for example, an index to a predefined set of appropriate quantization step sizes. For example, a smaller quantization parameter may correspond to finer quantization (smaller quantization step size), a larger quantization parameter may correspond to coarser quantization (larger quantization step size), or vice versa. Quantization may include division by a quantization step size and corresponding quantization and / or inverse quantization performed, for example, by the inverse quantization unit 210, or may include multiplication by a quantization step size. In embodiments according to some standards such as HEVC, the quantization parameter may be used to determine the quantization step size. Generally, the quantization step size may be calculated based on the quantization parameter by using a fixed-point approximation of an expression including division. Additional scaling factors may be introduced for quantization and dequantization to restore the norm of the residual block, where the norm of the residual block may be modified due to the scale used in the fixed-point approximation of the expression for obtaining the quantization step size and the quantization parameter. In an exemplary implementation, the scales for inverse transform and dequantization may be combined.Alternatively, a customized quantization table may be used, for example, signaled from an encoder to a decoder within a bitstream. Quantization is a lossy operation, where increasing the quantization step size increases the loss.
[0098] The inverse quantization unit 210 applies the inverse quantization of the quantization unit 208 to the quantization coefficients to obtain the dequantized coefficients 211, and is configured to apply an inverse quantization method of the quantization method applied by the quantization unit 208, for example, based on the same quantization step as the quantization unit 208 or by using such a quantization step. The dequantized coefficients 211 may also be referred to as dequantized residual coefficients 211 and usually are not the same as the transform coefficients due to the loss caused by quantization, but may correspond to the transform coefficients 207.
[0099] The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, for example, an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST), to obtain an inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as an inverse transform dequantized block 213 or an inverse transform residual block 213.
[0100] The reconstruction unit 214 (e.g., adder 214) is configured to add the inverse transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265, for example, by adding the sample values of the reconstructed residual block 213 and the sample values of the prediction block 265, to obtain a reconstructed block 215 in the sample domain.
[0101] Optionally, for example, buffer unit 216 of line buffer 216 (abbreviated as "buffer" 216) is configured to buffer, i.e., store, the reconstructed block 215 and corresponding sample values for intra prediction, for example. In other embodiments, the encoder may be configured to use the unfiltered reconstructed blocks and / or corresponding sample values stored in buffer unit 216 for any type of estimation and / or prediction, for example, intra prediction.
[0102] For example, one embodiment of encoder 20 may be configured such that buffer unit 216 is used not only to store the reconstructed block 215 for intra prediction unit 254, but also for loop filter unit 220 (not shown in FIG. 2), and / or, for example, buffer unit 216 and decoded picture buffer unit 230 may be configured to form one buffer. In other embodiments, the filtered block 221, and / or blocks or samples from decoded picture buffer 230 (which are not shown in FIG. 2) are used as input or reference for intra prediction unit 254.
[0103] The loop filter unit 220 (briefly referred to as the "loop filter" 220) is configured to filter the reconstructed block 215 to obtain a filtered block 221 in order to smooth sample transitions or improve video quality. The loop filter unit 220 is intended to represent one or more loop filters, including, for example, a deblocking filter, a sample-adaptive offset (SAO) filter, or another filter such as a bidirectional filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a collaborative filter. The loop filter unit 220 is shown in FIG. 2 as an in-loop filter, but in another configuration, the loop filter unit 220 may be implemented as an after-loop filter. The filtered block 221 may also be referred to as the filtered reconstructed block 221. The decoded picture buffer 230 may store the reconstructed coded block after the loop filter unit 220 executes a filtering operation on the reconstructed coded block.
[0104] One embodiment of the encoder 20 (and correspondingly, the loop filter unit 220) may be configured to output loop filter parameters (such as sample-adaptive offset information), for example, immediately or after entropy coding performed by the entropy coding unit 270 or any other entropy coding unit, such that, for example, the decoder 30 may receive the same loop filter parameters and apply the same loop filter parameters to decoding.
[0105] The decoded picture buffer (DPB) 230 may be a reference picture memory that stores reference picture data for encoding video data by the encoder 20. The DPB 230 may be formed by any one of various memory devices, such as a dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), and resistive RAM (RRAM)) or another type of memory device. The DPB 230 and the buffer 216 may be provided by the same memory device or separate memory devices. In one example, the decoded picture buffer (DPB) 230 is configured to store the filtered block 221. The decoded picture buffer 230 may be further configured to store another block that has been previously filtered, either of the same current picture or a different picture, for example, the block 221 that has been previously reconstructed and filtered, for example, a previously reconstructed picture, for example, a complete, i.e., decoded, picture (and corresponding reference blocks and samples) for inter prediction, and / or a partially reconstructed current picture (and corresponding reference blocks and samples). In one example, when the reconstructed block 215 is reconstructed without using in-loop filtering, the decoded picture buffer (DPB) 230 is configured to store the reconstructed block 215.
[0106] The prediction processing unit 260, also referred to as the block prediction processing unit 260, receives or obtains an image block 203 (the current image block 203 of the current picture 201), and reconstructed picture data, for example, reference samples of the same (current) picture from the buffer 216 and / or reference picture data 231 of one or more previously decoded pictures from the decoded picture buffer 230, processes such data for prediction, that is, is configured to provide a prediction block 265 which may be an inter prediction block 245 or an intra prediction block 255.
[0107] The mode selection unit 262 is configured to calculate the residual block 205 and reconstruct the reconstructed block 215, and to select a prediction mode (for example, an intra prediction mode or an inter prediction mode), and / or a corresponding prediction block 245 or 255 to be used as the prediction block 265.
[0108] One embodiment of the mode selection unit 262 may be configured to select a prediction mode (from, for example, the prediction modes supported by the prediction processing unit 260), where the prediction mode results in an optimal match or a minimum residual (the minimum residual means better compression for transmission or storage), or a minimum signaling overhead (the minimum signaling overhead means better compression for transmission or storage), or takes both into account or balances both. The mode selection unit 262 is configured to determine the prediction mode based on rate distortion optimization (RDO), that is, to select a prediction mode that results in a minimum rate distortion optimization, or to select a prediction mode for which the relevant rate distortion at least meets the prediction mode selection criteria.
[0109] The prediction processing unit 260 may be further configured to, for example, partition the image block 203 into smaller block partitions or sub-blocks by repeatedly using a quad-tree (QT) partition, a binary-tree (BT) partition, a triple-tree (TT) partition, or any combination thereof, and to perform, for example, prediction for each of the block partitions or sub-blocks, where the mode selection includes selection of the tree structure of the partitioned image block 203 and selection of the prediction mode applied to each of the block partitions or sub-blocks.
[0110] The inter prediction unit 244 may include a motion estimation (ME) unit (not shown in FIG. 2) and a motion compensation (MC) unit (not shown in FIG. 2). The motion estimation unit is configured to receive or acquire, for motion estimation, the picture image block 203 (the current picture image block 203 of the current picture 201), and the decoded picture 231, or at least one or more blocks previously reconstructed, for example, one or more reconstructed blocks of one or more other / different pictures 231 previously decoded. For example, the video sequence may include the current picture and the previously decoded picture 31. In other words, the current picture and the previously decoded picture 31 may be part of or may form a sequence of pictures forming the video sequence.
[0111] For example, the encoder 20 may be configured to select a reference block from multiple reference blocks of the same or different pictures among a plurality of other pictures, provide the reference picture to a motion estimation unit (not shown in FIG. 2), and / or provide an offset (spatial offset) between the position (coordinates X and Y) of the reference block and the position of the current block as an inter prediction parameter. This offset is also referred to as a motion vector (MV).
[0112] The motion compensation unit is configured to perform inter prediction to obtain an inter prediction parameter and an inter prediction block 245, based on or by using the inter prediction parameter. Motion compensation performed by the motion compensation unit (not shown in FIG. 2) may include fetching or generating a prediction block based on the motion / block vector determined through motion estimation (and in some cases performing interpolation to obtain sub-sample accuracy). Interpolation filtering may generate additional sample samples from known sample samples, thereby potentially increasing the number of candidate prediction blocks that can be used to code picture blocks. When receiving the motion vector for the current picture block's PU, the motion compensation unit 246 may identify the position of the prediction block pointed to by the motion vector within one reference picture list. The motion compensation unit 246 may further generate syntax elements related to the block and the video slice for decoding the picture block of the video slice by the decoder 30.
[0113] The intra prediction unit 254 is configured to obtain the picture image block 203 (current picture block) and one or more previously reconstructed blocks of the same picture for intra prediction, such as reconstructed adjacent blocks. For example, the encoder 20 may be configured to select an intra prediction mode (such as the LM prediction mode) from a plurality of intra prediction modes.
[0114] For example, for the chroma component of an image in a video sequence, in H.265, there can be five intra prediction modes for the chroma component of an image, namely, planar mode, vertical mode, horizontal mode, DC mode, and derived mode (DM). In the next-generation video coding standard (e.g., H.266), the intra prediction mode for the chroma component of an image further includes a cross component prediction (CCP) mode, where the cross component prediction (CCP) mode is also called a cross component intra prediction (CCIP) mode or a cross component linear mode (CCLM) prediction mode. The CCLM prediction mode may also be simply called a linear model mode (LM mode). The LM mode is a chroma intra prediction method that uses the texture correlation between luma and chroma.
[0115] In another example, for the luma component of an image in a video sequence, in H.265, there are a total of 35 intra prediction modes for the luma component, where the 35 intra prediction modes include 33 directional prediction modes, a DC prediction mode, and a planar prediction mode. The directional prediction mode maps a reference sample to the position of a sample in the current block in a specific direction (using the intra mode index flag) to obtain the predicted value of the current sample, or maps the position of each sample in the current block to the reference sample in the reverse direction in a specific direction (using the intra mode index flag), where the sample value of the corresponding reference sample is the predicted value of the current sample. Different from the directional prediction mode, the DC prediction mode uses the average of the reference samples as the predicted value of the samples in the current block, and the planar mode jointly derives the predicted value of the current sample using the sample values of the reference samples above and to the left of the current sample, as well as the sample values of the reference samples in the upper right and lower left of the current block.
[0116] The intra prediction unit 254 is further configured to determine an intra prediction block 255, for example, based on the intra prediction parameters of the selected intra prediction mode. In any case, after selecting the intra prediction mode for a block, the intra prediction unit 254 is further configured to provide the intra prediction parameters, that is, the information indicating the selected intra prediction mode for the block, to the entropy encoding unit 270.
[0117] In this embodiment of the present invention, the intra prediction unit 254 may further include a filter set. The filter set includes a plurality of filter types, and different filter types each represent a different luma block downsampling algorithm, and each filter type corresponds to one chroma sample position. The intra prediction unit 254 may be further configured to determine the chroma sample position of the current video sequence, determine the filter type to be used for the current encoding based on the chroma sample position, and generate display information based on the filter type. The display information is used to indicate the filter type used in the downsampling process of the luma image in the LM prediction mode during the encoding or decoding of the current video sequence (for example, during the encoding or reconstruction of picture 201 or image block 203). The intra prediction unit 254 is further configured to provide the display information of the filter type to the entropy encoding unit 270.
[0118] Specifically, the intra prediction unit 254 may send the syntax element to the entropy coding unit 270, where the syntax element includes intra prediction parameters (for example, after a plurality of intra prediction modes are carefully considered, the intra prediction mode selected for prediction of the current block, for example, the display information of the LM mode), and the display information of the filter type. In a possible application scenario, when there is only one intra prediction mode, that is, only the LM prediction mode, the intra prediction parameter may not be carried in the syntax element. In this case, the decoder side 30 may immediately use the LM prediction mode by default for decoding. In one example, the intra prediction unit 254 may be configured to perform any combination of the following inter prediction techniques.
[0119] The entropy encoding unit 270 is configured to apply (or bypass), for example, an entropy encoding algorithm or method (e.g., variable length coding (VLC) method, context adaptive VLC (CAVLC) method, arithmetic coding method, context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique) to one or all of the following, namely, quantization coefficients 209, inter prediction parameters, intra prediction parameters, and / or loop filter parameters, in order to obtain encoded picture data 21 that can be output through the output unit 272 in the form of an encoded bitstream. The encoded bitstream may be transmitted to the decoder 30 or may be archived for later transmission or retrieval by the decoder 30. The entropy encoding unit 270 may be further configured to entropy encode another syntax element for the currently encoded video slice.
[0120] Other structural variations of the encoder 20 may be configured to encode a video stream. For example, the non-transform-based encoder 20 may directly quantize the residual signal without using the transform processing unit 206 for some blocks or frames. In another implementation, the encoder 20 may have a quantization unit 208 and an inverse quantization unit 210 combined in a single unit.
[0121] Specifically, in one embodiment of the present invention, the encoder 20 sets the value of the filter type based on the sample position type of the chroma block, and generates first display information used to indicate the filter type based on the value, where the filter type corresponds to a filter in the filter set, generates, and encodes the first display information as information in the syntax element into the bitstream, where the first display information is conveyed in the encoded picture data 21, and may be configured to perform encoding.
[0122] In one embodiment of the present invention, the encoder 20 selects the LM mode from a plurality of intra prediction modes, and generates second display information, where the second display information is used to indicate the linear model mode, generates, and encodes the second display information as information in the syntax element into the bitstream, where the second display information is conveyed in the encoded picture data 21, and may be further configured to perform encoding.
[0123] In one embodiment of the present invention, during the configuration of the prediction block, the encoder 20, in the LM mode, determines a filter corresponding to the filter type and within the filter set based on the first display information, and downsamples the first luma block by using the filter to obtain a second luma block, where the first luma block is the luma block corresponding to the current chroma block, downsamples, obtains template chroma samples and template luma samples, where the template chroma samples include a plurality of adjacent chroma samples of the current chroma block, and the template luma samples are obtained by downsamping a plurality of adjacent luma samples of the first luma block, obtains, obtains linear model coefficients based on the template chroma samples and the template luma samples, and further may be configured to obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficients.
[0124] FIG. 3 is a schematic / conceptual block diagram of an exemplary decoder 30 configured to implement an embodiment of the present invention. The decoder 30 is configured to receive encoded picture data 21, obtained, for example, through encoding by the encoder 20, in order to obtain a decoded picture 231. During decoding, the decoder 30 receives video data from the encoder 20, for example, an encoded video bitstream representing a picture block of an encoded video slice and associated syntax elements.
[0125] In the example of FIG. 3, decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., adder 314), a buffer 316, a loop filter 320, a decoded picture buffer 330, and a prediction processing unit 360. The prediction processing unit 360 may include an inter prediction unit 344, an intra prediction unit 354, and a mode selection unit 362. In some examples, decoder 30 may perform a decoding process that is approximately the reverse of the encoding process described with reference to encoder 20 in FIG. 2.
[0126] Entropy decoding unit 304 is configured to perform entropy decoding on the encoded picture data 21 to obtain, for example, quantization coefficients 309 and / or decoded coding parameters (not shown in FIG. 3), such as any one or all of inter prediction parameters, intra prediction parameters, loop filter parameters, and / or (decoded) other syntax elements. Entropy decoding unit 304 is further configured to transfer inter prediction parameters, intra prediction parameters, and / or other syntax elements to prediction processing unit 360. Decoder 30 may receive syntax elements at the video slice level and / or the video block level.
[0127] Inverse quantization unit 310 may have the same function as inverse quantization unit 210. Inverse transform processing unit 312 may have the same function as inverse transform processing unit 212. Reconstruction unit 314 may have the same function as reconstruction unit 214. Buffer 316 may have the same function as buffer 216. Loop filter 320 may have the same function as loop filter 220. Decoded picture buffer 330 may have the same function as decoded picture buffer 230.
[0128] The prediction processing unit 360 may include an inter-prediction unit 344 and an intra-prediction unit 354. The inter-prediction unit 344 may be similar in function to the inter-prediction unit 244, and the intra-prediction unit 354 may be similar in function to the intra-prediction unit 254. The prediction processing unit 360 is typically configured to perform block prediction and / or obtain a prediction block 365 from the encoded data 21, for example, from the entropy decoding unit 304, to receive or obtain (explicitly or implicitly) prediction-related parameters and / or information about the selected prediction mode.
[0129] When the video slice is encoded as an intra-coded (I) slice, the intra-prediction unit 354 of the prediction processing unit 360 is configured to generate a prediction block 365 for a picture block of the current video slice based on the signaled intra-prediction mode and data from previously decoded blocks of the current frame or current picture. When the video frame is encoded as an inter-coded (B or P) slice, the inter-prediction unit 344 (e.g., a motion compensation unit) of the prediction processing unit 360 is configured to generate a prediction block 365 for a video block of the current video slice based on a motion vector and other syntax elements received from the entropy decoding unit 304. In the case of inter-prediction, the prediction block may be generated from one of the reference pictures in one of the reference picture lists. The decoder 30 may construct the reference frame lists, i.e., list 0 and list 1, by using a default construction technique based on the reference pictures stored in the DPB 330.
[0130] The prediction processing unit 360 is configured to determine prediction information for a video block of the current video slice by syntax-analyzing a motion vector and other syntax elements, and to generate a prediction block for the current video block being decoded using the prediction information. For example, the prediction processing unit 360 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) used to code a video block of the video slice, an inter prediction slice type (e.g., B slice, P slice, or GPB slice), configuration information for one or more of the reference picture lists for the slice, a motion vector for each inter-coded video block of the slice, an inter prediction status for each inter-coded video block of the slice, and other information for decoding the video block of the current video slice.
[0131] The inverse quantization unit 310 may be configured to inverse quantize (i.e., dequantize) the quantized transform coefficients provided in the bitstream and decoded by the entropy decoding unit 304. The inverse quantization process may include determining the degree of quantization to be applied using the quantization parameter calculated by the encoder 20 for each video block in the video slice, and similarly determining the degree of inverse quantization to be applied.
[0132] The inverse transform processing unit 312 is configured to apply an inverse transform (e.g., inverse DCT, inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to generate a residual block in the sample domain.
[0133] The reconstruction unit 314 (e.g., adder 314) is configured to add the inverse transform block 313 (i.e., the reconstructed residual block 313) to the prediction block 365 by adding, for example, the sample values of the reconstructed residual block 313 and the sample values of the prediction block 365, to obtain the reconstructed block 315 in the sample domain.
[0134] (During or after the coding loop) The loop filter unit 320 is configured to filter the reconstructed block 315 to obtain the filtered block 321, to smooth sample transitions or improve video quality. In one example, the loop filter unit 320 can be configured to perform any combination of the filter processing techniques described below. The loop filter unit 320 is intended to represent one or more loop filters, including, for example, a deblocking filter, a sample-adaptive offset (SAO) filter, or another filter such as a bidirectional filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a collaborative filter. The loop filter unit 320 is shown in FIG. 3 as an in-loop filter, but in another configuration, the loop filter unit 320 may be implemented as an after-loop filter.
[0135] The decoded video block 321 in a given frame or picture is then stored in a decoded picture buffer 330 that stores reference pictures for subsequent motion compensation.
[0136] The decoder 30 is configured to output the decoded picture 31, for example, through the output unit 332, for presentation to the user or viewing by the user.
[0137] Another variation of the decoder 30 may be configured to decode the compressed bitstream. For example, the decoder 30 may generate an output video stream without using the loop filter unit 320. For example, the non-transform-based encoder 30 may directly inverse quantize the residual signal without using the inverse transform processing unit 312 for some blocks or frames. In another implementation, the decoder 30 may have an inverse quantization unit 310 and an inverse transform processing unit 312 combined in a single unit.
[0138] Specifically, in one embodiment of the present invention, the decoder 30 is configured to parse the bitstream to obtain first display information and second display information, where the second display information is used to indicate that the intra prediction mode used to decode the current chroma block is the LM mode, and the first display information is used to indicate the filter type; parsing the bitstream; downsampling a first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is the luma block corresponding to the current chroma block; obtaining template chroma samples and template luma samples, where the template chroma samples include a plurality of adjacent chroma samples of the current chroma block, and the template luma samples are obtained by downsampling a plurality of adjacent luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; and obtaining a predicted value of the current chroma block based on the second luma block and the linear model coefficients.
[0139] FIG. 4 is a schematic structural diagram of a video coding device 400 (e.g., a video encoding device 400 or a video decoding device 400) according to an embodiment of the present invention. The video coding device 400 is suitable for implementing an embodiment described herein. In one embodiment, the video coding device 400 may be a video decoder (e.g., decoder 30 in FIG. 1A) or a video encoder (e.g., encoder 20 in FIG. 1A). In another embodiment, the video coding device 400 may be one or more components of decoder 30 in FIG. 1A or encoder 20 in FIG. 1A.
[0140] The video coding device 400 includes an inlet port 410 and a receiver unit (Rx) 420 configured to receive data, a processor, a logic unit, or a central processing unit (CPU) 430 configured to process data, a transmitter unit (Tx) 440 and an outlet port 450 configured to transmit data, and a memory 460 configured to store data. The video coding device 400 may further include optoelectronic components and electro-optical (EO) components coupled to the inlet port 410, the receiver unit 420, the transmitter unit 440, and the outlet port 450 for an outlet or inlet of an optical signal or an electrical signal.
[0141] Processor 430 is implemented by using hardware and software. Processor 430 can be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. Processor 430 communicates with an input port 410, a receiver unit 420, a transmitter unit 440, an output port 450, and a memory 460. Processor 430 includes a coding module 470 (e.g., an encoding module 470 or a decoding module 470). The encoding / decoding module 470 implements the embodiments disclosed herein to implement the chroma block prediction method provided in embodiments of the present invention. For example, the encoding / decoding module 470 performs, processes, or provides various coding operations. Therefore, including the encoding / decoding module 470 brings a significant improvement to the function of the video coding device 400 and affects the switching of the video coding device 400 to different states. Alternatively, the encoding / decoding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0142] Memory 460 includes one or more disks, tape drives, and solid state drives and can be used as an overflow data storage device for storing programs when such programs are selectively executed and for storing instructions and data read during program execution. Memory 460 may be volatile and / or non-volatile and may be read-only memory (ROM), random access memory (RAM), ternary content-addressable memory (TCAM), and / or static random access memory (SRAM).
[0143] FIG. 5 is a simplified block diagram of an apparatus 500 that can be used as either or both of the source device 12 and the destination device 14 in FIG. 1A according to an exemplary embodiment. The apparatus 500 can implement the technology in the present application. The apparatus 500 for chroma block prediction may be in the form of a computing system including a plurality of computing devices, or may be in the form of a single computing device such as a mobile phone, a tablet computer, a laptop computer, or a desktop computer.
[0144] The processor 502 in the apparatus 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of one or more existing / future-developed devices capable of controlling or processing information. As shown in the figure, the disclosed implementation may be practiced by using a single processor such as the processor 502, but advantages in speed and efficiency can be achieved by using two or more processors.
[0145] In one implementation, the memory 504 in the device 500 may be a read only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may be used as the memory 504. The memory 504 may include code and data 506 that are accessed by the processor 502 through the bus 512. The memory 504 may further include an operating system 508 and an application program 510. The application program 510 includes at least one program that enables the processor 502 to execute the methods described herein. For example, the application program 510 may include applications 1 to N, and the applications 1 to N may further include video coding applications that execute the methods described herein. The device 500 may further include additional memory in the form of secondary memory 514. The secondary memory 514 may be, for example, a memory card used with a mobile computing device. Since a video communication session may contain a large amount of information, all or part of the information may be stored in the secondary memory 514 and loaded into the memory 504 for processing as needed.
[0146] Device 500 may further include one or more output devices, such as display 518. In one example, display 518 may be a touch-sensitive display that combines a display and a touch-sensitive element that operably senses touch input. Display 518 may be coupled to processor 502 through bus 512. In addition to or instead of display 518, another output device may be provided that enables a user to program device 500 or use device 500 in another manner. When the output device is or includes a display, the display may be implemented in various ways, including by using a light emitting diode (LED) display such as a liquid crystal display (LCD), a cathode-ray tube (CRT) display, a plasma display, or an organic LED (OLED) display.
[0147] Device 500 may further include or communicate with an image sensing device 520. Image sensing device 520 may be, for example, a camera or any other existing / future-developed image sensing device 520 capable of sensing an image. The image may be, for example, an image of the user operating device 500. Image sensing device 520 may be positioned to directly face the user operating device 500. In one example, the position and optical axis of image sensing device 520 may be configured such that the field of view of image sensing device 520 includes an area adjacent to display 518 and display 518 is visible from that area.
[0148] Device 500 may further include, or communicate with, a sound sensing device 522. The sound sensing device 522 may be, for example, a microphone, or any other existing / future-developed sound sensing device capable of sending sounds near the device 500. The sound sensing device 522 may be directly arranged to face the user operating the device 500 and may be configured to receive sounds made when the user operates the device 500, such as voices or other sounds.
[0149] FIG. 5 shows the processor 502 and the memory 504 of the device 500 integrated into a single unit, but other configurations are possible. The implementation of the processor 502 may be distributed among a plurality of machines (each machine having one or more processors) directly coupled to each other, or may be distributed within a local area or another network. The memory 504 may be distributed across a plurality of machines. For example, the memory 504 may be network-based memory, or memory within a plurality of machines in which the device 500 operates. Although only a single bus is shown herein, the bus 512 of the device 500 may include a plurality of buses. Further, the secondary memory 514 may be directly coupled to other components of the device 500 or may be accessed via a network. The secondary memory 514 may include a single integrated unit such as a memory card, or a plurality of units such as a plurality of memory cards. Thus, the device 500 may be implemented in a wide variety of configurations.
[0150] To better understand the technical solutions in the embodiments of the present invention, the following further describes YUV images (also called YCbCr images) and the LM mode for intra prediction for chroma components in the embodiments of the present invention.
[0151] Existing videos are generally color videos. In addition to the luma (Y) component, color videos further include chroma components (U, V). Therefore, such images are also called YUV images. In this case, the coding of the YUV image includes not only the coding of the luma component but also the coding of the chroma components. Research shows that the human eye is more sensitive to luminance than to color. Therefore, during coding, in order to save memory space and improve coding efficiency, the luma component is sampled at full resolution, and the chroma components do not need to be sampled at full resolution. According to various sampling methods for the luma and chroma components in color videos, generally, in a video sequence, there are YUV images in 4:4:4 format, YUV images in 4:2:2 format, YUV images in 4:2:0 format, etc. FIG. 6 shows examples of 4:4:4 format, 4:2:2 format, and 4:2:0 format, where the cross symbols (×) in the figure represent luma component samples, and the circular symbols (○) in the figure represent chroma component samples.
[0152] The 4:4:4 format indicates that no downsampling is performed on the chroma components, and the 4:4:4 format is the format with the highest resolution of the chroma components. In other words, the data in four adjacent samples includes four Y components, four U components, and four V components.
[0153] The 4:2:2 format indicates that 2:1 horizontal downsampling is performed on the chroma components compared to the luma component, and no vertical downsampling is performed. For every two U samples or every two V samples, each row includes four Y samples. In other words, the data in four adjacent samples includes four Y components, two U components, and two V components.
[0154] The 4:2:0 format indicates that 2:1 horizontal downsampling and 2:1 vertical downsampling are performed on the chroma component compared to the luma component. The 4:2:0 format has the lowest resolution for the chroma component and is also the most common format. In the 4:2:0 format, the number of chroma samples is only half the number of luma samples in each row (i.e., horizontally) and only half the number of luma samples in each column (i.e., vertically). When a video image uses the 4:2:0 format, if the luma component of an image block has a size of 2M*2N, the chroma component of the image block has a size of M*N. For example, when the resolution of an image block is 720*480, the resolution of the luma component of the image block is 720*480, and the resolution of the chroma component of the image block is 360*240.
[0155] In the case of the 4:2:0 format, there can be six different chroma sample position types based on different chroma sample positions. FIG. 7 shows an exemplary relationship between the luma sample positions of luma samples and the six different chroma sample position types of chroma samples. The six different chroma sample position types are type0, type1, type2, type3, type4, and type5.
[0156] In this specification, as an example for explaining the technical solution in the embodiments of the present invention, a YUV image in the 4:2:0 format is used. In this specification, the luma component of the currently processed image block may be called a luma block (or a luma block corresponding to the current chroma block, the first luma block, the luma component block, or a luma block), and the chroma component of the currently processed image block may be called the current chroma block (or a chrominance block, a chroma component block, or a chroma block).
[0157] Similar to the intra prediction for the luma component, for the chroma component, the intra prediction uses the boundary samples of the reconstructed adjacent blocks around the current chroma block as the reference samples of the current chroma block, maps the reference samples to the samples in the current chroma block in a specific prediction mode, and uses the values of the mapped reference samples as the predicted values of the samples in the current chroma block. Since the texture of the chroma component is generally relatively simple, there is a difference in that the number of intra prediction modes for the chroma component is generally smaller than the number of intra prediction modes for the luma component. For example, in H.265, there can only be five intra prediction modes for the chroma component, namely, the planar mode, the vertical mode, the horizontal mode, the DC mode, and the derived mode (DM). In the next-generation video coding standard (e.g., H.266), the intra prediction mode for the chroma component further includes the cross component prediction (CCP) mode.
[0158] It should be understood that in different application scenarios, the CCP mode may also be referred to as the cross component intra prediction (CCIP) mode or the cross component linear mode (CCLM), or simply the linear model mode (LM mode). For the purpose of the description in this specification, the LM mode is used as an example.
[0159] The LM mode is a chroma intra prediction method that uses the texture correlation between luma and chroma. The LM mode uses the reconstructed luma component to derive the predicted value of the current chroma block based on a linear model, thereby providing a more accurate predicted value for the chroma component. The LM mode can be expressed by the following formula. pred C (i,j)=α*rec L '(i,j)+β
[0160] α and β represent linear model coefficients, and pred C (i,j) represents the predicted value of the chroma sample at position (i,j), and rec L '(i,j) represents the value of the reconstructed luma sample at position (i,j) obtained after the luma block corresponding to the current chroma block is downsampled to the resolution of the chroma component. For a video sequence in 4:2:0 format, the resolution of the luma component is 4 times that of the chroma component. In order to obtain the luma block with the same resolution as the chroma block, the luma component needs to be downsampled to the resolution of the chroma component by using the same downsampling method as the chroma component before it is used.
[0161] As an example, FIG. 8 is used. FIG. 8 shows, in a YUV image in 4:2:0 format, the luma block corresponding to the current chroma block (i.e., the luma component of the image block), as well as the adjacent upper reference sample and the adjacent left reference sample of the luma block, the downsampled luma block (i.e., the downsampled luma component of the image block, or called the second luma block), as well as the adjacent upper reconstructed reference sample and the adjacent left reconstructed reference sample of the downsampled luma block, and the current chroma block (i.e., the chroma component of the image block), as well as the adjacent upper reconstructed reference sample and the adjacent left reconstructed reference sample of the current chroma block. The resolution of the luma block corresponding to the current chroma block is 2W*2H, the resolution of the downsampled luma block is W*H, and the resolution of the current chroma block is W*H. In other words, the luma block and the adjacent reference samples of the luma block are downsampled to the resolution of the chroma component, and as a result, a downsampled luma block can be obtained. There is a one-to-one correspondence between the adjacent reference samples of the downsampled luma block and the adjacent reference samples of the current chroma block.
[0162] Please refer to FIGS. 9 and 10. In this embodiment of the present invention, for ease of understanding, the adjacent upper side and adjacent left side used for calculating the linear model coefficients are sometimes referred to as a template. A template is a set of luma samples or a set of chroma samples used for calculating the linear model coefficients. A set of luma samples used for calculating the linear model coefficients is sometimes referred to as template luma samples. Template luma samples are obtained by performing a downsampling operation on a plurality of adjacent luma samples of a luma block (since there may be no luma sample value at the position corresponding to the template chroma sample in the luma image). A set of chroma samples used for calculating the linear model coefficients is sometimes referred to as template chroma samples. Template chroma samples include a plurality of adjacent chroma samples of the currently reconstructed chroma block.
[0163] In a possible embodiment, the template chroma samples particularly include one or more rows of adjacent chroma samples above the currently chroma block and one or more columns of adjacent chroma samples to the left of the currently chroma block. The template luma samples are in one-to-one correspondence with the template chroma samples, and the values of the samples in the template luma samples and the values of the samples in the template chroma samples form a value pair.
[0164] For example, in FIG. 9, the template chroma samples include one row of adjacent chroma samples above the currently chroma block and one column of adjacent chroma samples to the left. Accordingly, the template luma samples include one row of luma samples and one column of left luma samples, where one row of luma samples and one column of left luma samples correspond to the chroma sample positions in the template chroma samples.
[0165] For example, as shown in FIG. 10, in one example, the template chroma sample includes two rows of the adjacent chroma sample above the current chroma block and two columns of the adjacent chroma sample to the left of the current chroma block. Thus, the template luma sample includes two rows of the luma sample and two columns of the luma sample, where the two rows of the luma sample and the two columns of the luma sample correspond to the chroma sample positions in the template chroma sample.
[0166] Certainly, there can be various specific implementations of the template chroma sample and the template luma sample. In another example, the template chroma sample may include only one or more columns of the adjacent chroma sample to the left of the current chroma block. The template luma sample includes only one or more columns of the luma sample, and the template luma sample has a one-to-one correspondence with the template chroma sample. In yet another example, alternatively, the template chroma sample may include only one or more rows of the adjacent chroma sample above the current chroma block. The template luma sample includes only one or more rows of the luma sample, and the template luma sample has a one-to-one correspondence with the template chroma sample.
[0167] As described above, the template luma sample is obtained by performing a downsampling operation on a plurality of adjacent luma samples of the luma block. The following describes an example of a method for performing a downsampling operation on the template luma sample.
[0168] FIG. 11 is an exemplary diagram of the relationship between several chroma sample positions and several luma sample positions. For a YUV image in 4:2:0 format, when the top left vertex of the luma image is used as the coordinate origin of the luma samples and the top left vertex of the chroma image is used as the coordinate origin of the chroma samples, the sample position (xb, yb) in the chroma image corresponding to a position in the luma image is (2*xb, 2*yb + 0.5). To obtain the value of the luma sample in the template luma sample, i.e., the luma sample value corresponding to the sample position (xb, yb), a plurality of adjacent luma samples in the luma block may be selected first. For example, the sample positions of a plurality of adjacent luma samples in the luma block are (2*xb, 2*yb), (2*xb - 1, 2*yb), (2*xb + 1, 2*yb), (2*xb, 2*yb + 1), (2*xb - 1, 2*yb + 1), and (2*xb + 1, 2*yb + 1), and the value at the position (2*xb, 2*yb + 0.5) is derived based on the luma sample values in the luma image corresponding to these positions, and that value is used as the value of the luma sample corresponding to the sample position (xb, yb).
[0169] For example, in one example, the luma sample value L C corresponding to the sample position (xb, yb) in the template luma sample may be obtained by performing a downsampling calculation on a plurality of luma samples according to the following formula. LC(xb, yb) = (2*L(2*xb, 2*yb) + L(2*xb - 1, 2*yb) + L(2*xb + 1, 2*yb) + 2*L(2*xb, 2*yb + 1) + L(2*xb - 1, 2*yb + 1) + L(2*xb + 1, 2*yb + 1) + 4) >> 3 However, the symbol ">>" represents a right shift.
[0170] It can be understood that downsampling may also be performed for the values of other luma samples (xb + 1, yb - 1),..., (xb + i, yb - 1),... and (xb - 1, yb),..., and (xb - 1, yb + j) in the template luma sample of the current block by using the same downsampling method.
[0171] Note that downsampling in the existing sampling method is performed based on a fixed filter. Specifically, for images in various video sequences, in the existing LM mode, regardless of the chroma sample position, a fixed downsampling filter is used. However, in fact, there may be cases where different chroma sample positions exist in different video sequences, and the influence caused by different chroma sample positions on the luma downsampling filter is not considered. When the luma downsampling position does not match the chroma sample position, the LM model coefficients α and β derived according to the LM model formula are inaccurate, and rec L '(i, j) and the chroma sample position are not aligned. Therefore, the coding efficiency decreases.
[0172] To overcome the above drawbacks, improve the prediction accuracy for chroma blocks in the LM mode, and improve the coding efficiency, an embodiment of the present invention provides a chroma block prediction method used in the LM mode based on the above-described system and device. First, the method is described from the perspective of the encoder side. Referring to FIG. 12, the method includes, but is not limited to, the following steps.
[0173] Step 701: Determine that the intra prediction mode used for predicting the current chroma block is the LM mode.
[0174] In a specific implementation form, the encoder side may only preset the LM mode for intra prediction. In other words, in this case, the encoder side immediately determines that the currently used intra prediction mode is the LM mode, and then continues to execute steps 702 to 704.
[0175] In another specific implementation form, the encoder side may preset multiple intra prediction modes, where the multiple intra prediction modes include the LM mode, and the encoder side carefully examines the multiple intra prediction modes and determines that the optimal intra prediction mode for the current chroma block is the LM mode. In this case, the encoder side starts to execute subsequent steps such as steps 702 to 704.
[0176] In addition, the encoder side may further set second display information, where the second display information is used to indicate the LM mode, and as a result, the second display information is encoded into the bitstream in subsequent step 704.
[0177] Step 702: Determine the filter type based on the sample position type of the current chroma block.
[0178] In other words, in the design of this embodiment of the present invention, when the current chroma block is predicted in the LM mode, the used luma downsampling filter is not determined, but is determined based on the sample position type of the current chroma block. Each sample position type of the current chroma block corresponds to a filter type.
[0179] In certain embodiments of the present invention, six sample position types may be designed (such a design may be referred to as Design 1). As shown in FIG. 7, the six sample position types include type0, type1, type2, type3, type4, and type5. Accordingly, there are six types of lumadownsampling filters corresponding to the six sample position types, namely, Filter 0, Filter 1, Filter 2, Filter 3, Filter 4, and Filter 5. In one example, the downsampling algorithms of these filters may be separately set as follows.
[0180] For Filter 0: LC(xb,yb)=(2*L(2*xb,2*yb)+L(2*xb-1,2*yb)+L(2*xb+1,2*yb)+2*L(2*xb,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3
[0181] For Filter 1: LC(xb,yb)=(L(2*xb,2*yb)+L(2*xb+1,2*yb)+L(2*xb,2*yb+1)+L(2*xb+1,2*yb+1)+2)>>2
[0182] For Filter 2: LC(xb,yb)=(4*L(2*xb,2*yb) +2*L(2*xb,2*yb+1)+2*L(2*xb,2*yb-1)+2*L(2*xb-1,2*yb)+2*L(2*xb+1,2*yb) +L(2*xb+1,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb-1,2*yb-1)+L(2*xb+1,2*yb-1)+8)>>4
[0183] For Filter 3: LC(xb,yb)=(2*L(2*xb,2*yb)+2*L(2*xb+1,2*yb)+L(2*xb,2*yb-1)+L(2*xb+1,2*yb-1)+L(2*xb,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3
[0184] For filter 4: LC(xb, yb) = (4 * L(2 * xb, 2 * yb + 1) + 2 * L(2 * xb, 2 * yb + 2) + 2 * L(2 * xb, 2 * yb) + 2 * L(2 * xb - 1, 2 * yb + 1) + 2 * L(2 * xb + 1, 2 * yb + 1) + L(2 * xb + 1, 2 * yb + 2) + L(2 * xb - 1, 2 * yb + 2) + L(2 * xb - 1, 2 * yb) + L(2 * xb + 1, 2 * yb) + 8) >> 4
[0185] For filter 5: LC(xb, yb) = (2 * L(2 * xb, 2 * yb + 1) + 2 * L(2 * xb + 1, 2 * yb + 1) + L(2 * xb, 2 * yb) + L(2 * xb + 1, 2 * yb) + L(2 * xb, 2 * yb + 2) + L(2 * xb + 1, 2 * yb + 2) + 4) >> 3
[0186] It should be noted that the filter downsampling algorithm is only an example and not a limitation.
[0187] In another specific embodiment of the present invention, considering that chroma sample positions type0 and type2 are currently the most common, two sample position types may be designed as alternatives (such a design may be called Design 2). In other words, the two sample position types only include type0 and type2. Therefore, there are two types of luma downsampling filters corresponding to the two sample position types, namely, Filter 0 and Filter 2. In one example, the downsampling algorithms of these filters may be set separately as follows.
[0188] For filter 0: LC(xb, yb) = (2 * L(2 * xb, 2 * yb) + L(2 * xb - 1, 2 * yb) + L(2 * xb + 1, 2 * yb) + 2 * L(2 * xb, 2 * yb + 1) + L(2 * xb - 1, 2 * yb + 1) + L(2 * xb + 1, 2 * yb + 1) + 4) >> 3
[0189] For the filter 2: LC(xb, yb) = (4 * L(2 * xb, 2 * yb) + 2 * L(2 * xb, 2 * yb + 1) + 2 * L(2 * xb, 2 * yb - 1) + 2 * L(2 * xb - 1, 2 * yb) + 2 * L(2 * xb + 1, 2 * yb) + L(2 * xb + 1, 2 * yb + 1) + L(2 * xb - 1, 2 * yb + 1) + L(2 * xb - 1, 2 * yb - 1) + L(2 * xb + 1, 2 * yb - 1) + 8) >> 4
[0190] Note that the downsampling algorithm of the filter is only an example and not a limitation.
[0191] In addition to the above two designs, it should be further noted that this embodiment of the present invention may alternatively include another design. For example, three chroma sample positions are designed, and the three chroma sample positions respectively correspond to three types of filters. This is not limited in this specification.
[0192] In this way, the encoder side may first determine the sample position type of the current chroma block, and then determine the corresponding filter type based on the sample position type of the current chroma block, that is, determine the lumina downsampling filter used for prediction of the current chroma block in the LM mode.
[0193] Step 703: Set the first display information, where the first display information is used to indicate the filter type.
[0194] In this embodiment of the present invention, a sequence parameter set (SPS) parameter is newly added, and the value of the SPS parameter is used to indicate the type of luma downsampling filter in the LM mode during the encoding or decoding of the current video sequence. On the encoder side, this parameter may be set based on the chroma sample position in the current sequence. Specifically, the first display information may be set based on the filter type. The first display information includes the value of the SPS parameter, where the value is used to indicate the type of luma downsampling filter used for prediction of chroma blocks during encoding or decoding.
[0195] In a specific implementation form of the present invention, the syntax element of the newly added SPS parameter may be named "lm_mode_downsampling_filter_type_idc", where lm_mode_downsampling_filter_type_idc is used to specify the downsampling filter type in the LM mode.
[0196] For example, in the case of Design 1 described in Step 702, six filter types, namely Filter 0, Filter 1, Filter 2, Filter 3, Filter 4, and Filter 5, are designed. In this case, the sequence parameter set may be designed as follows.
[0197] [Table 1]
[0198] The value of lm_mode_downsampling_filter_type_idc ranges from 0 to 5, and different values correspond to different filters. For example, value 0 corresponds to filter 0, value 1 corresponds to filter 1, value 2 corresponds to filter 2, value 3 corresponds to filter 3, value 4 corresponds to filter 4, and value 5 corresponds to filter 5. Certainly, the above settings of the values and the correspondence between each value and the filter are only examples and not limitations.
[0199] In another example, for design 2 described in step 702, two filter types, namely filter 0 and filter 2, are designed. In this case, the sequence parameter set may be designed as follows.
[0200] [Table 2]
[0201] The value of lm_mode_downsampling_filter_type_idc may be 0 or 1, and different values correspond to different filters. For example, value 0 corresponds to filter 0, and value 1 corresponds to filter 2. Certainly, the above settings of the values and the correspondence between each value and the filter are only examples and not limitations.
[0202] Step 704: Encode the first display information into the bitstream and send the bitstream to the decoder side. In a specific implementation, the second display information set in step 701 above may be further encoded into the bitstream, and then the bitstream is sent to the decoder side. The second display information is used to indicate the LM mode, and as a result, it is indicated to the decoder side that the LM mode should be used.
[0203] Note that the above embodiments only describe that the encoder side performs the encoding process and the bitstream transmission process. Those skilled in the art will understand from the above description that the encoder side may further perform another method described in the embodiments of the present invention in another procedure. For example, in chroma block prediction, for the specific implementation of the reconstruction of chroma blocks executed by the encoder side, refer to the related method described from the perspective of the decoder side below. Details are not described in this specification.
[0204] In this embodiment of the present invention, for the LM mode, it can be known that the encoder may determine the luma downsampling filter used for the current luma block based on the sample position type of the current chroma sample, and specify the type of the downsampling filter for the decoder through display information (for example, the value of the newly added SPS parameter). This ensures that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position. Considering the case where different chroma sample positions may exist in different video sequences in practice, this guarantees the consistency between the downsampled luma sample position and the chroma sample position, and improves the coding accuracy and coding efficiency of the encoder side.
[0205] Based on the above system and device, an embodiment of the present invention provides another chroma block prediction method. The method is described from the perspective of the decoder side. Referring to FIG. 13, the method includes, but is not limited to, the following steps.
[0206] Step 801: Parse the bitstream to obtain the first display information.
[0207] Specifically, the decoder side can obtain the first display information by syntax-analyzing the sequence parameter set (SPS) parameters in the bitstream. For example, the SPS parameters in the bitstream may specifically be newly added SPS parameters.
[0208] In one embodiment, the first display information is used to indicate the filter type.
[0209] Specifically, the decoder side syntax-analyzes the bitstream transmitted from the encoder side to obtain the first display information used to indicate the filter type. For details of the specific content of the first display information, refer to the description in step 703 in the embodiment of FIG. 12.
[0210] The encoder side and the decoder side may use filter types of the same design. For example, six filter types (corresponding to six chroma sample positions) are designed for the encoder side, and six filter types are also designed for the decoder side. In addition, the downsampling algorithms of the six filter types on the decoder side respectively match the downsampling algorithms of the six filter types on the encoder side. The six filter types are filter 0, filter 1, filter 2, filter 3, filter 4, and filter 5. In this case, the first display information received by the decoder side is used to indicate one of the six filter types. For example, when the first display information is the SPS parameter lm_mode_downsampling_filter_type_idc and the value of the SPS parameter is 2, this indicates that the first display information indicates that the filter type is filter 2.
[0211] In another example, two filter types (corresponding to two chroma sample positions) are designed for the encoder side, and two filter types are also designed for the decoder side. In addition, the downsampling algorithms for the two filter types on the decoder side respectively match the downsampling algorithms for the two filter types on the encoder side. The two filter types are filter 0 and filter 2. In this case, the first display information received by the decoder side is used to indicate one of the two filter types. For example, when the first display information is the SPS parameter lm_mode_downsampling_filter_type_idc and the value of the SPS parameter is 0, this indicates that the first display information indicates that the filter type is filter 0.
[0212] In another embodiment, the first display information is used to indicate the sample position of the current chroma block, and the sample position of the current chroma block is associated with the filter type. Therefore, the decoder side may determine the filter type based on the sample position of the current chroma block.
[0213] Furthermore, the first display information may be specifically used to indicate the sample position type of the current chroma block, and thus the sample position type of the current chroma block is associated with the filter type. Therefore, the decoder side may determine the filter type based on the sample position type of the current chroma block.
[0214] For example, two filter types (corresponding to two chroma sample positions) are designed for the encoder side, and two filter types are also designed for the decoder side. In addition, the downsampling algorithms of the two filter types on the decoder side respectively match the downsampling algorithms of the two filter types on the encoder side. The two filter types are filter 0 and filter 2. In this case, the first display information received by the decoder side is used to indicate one of the two chroma sample positions. For example, when the first display information is the SPS parameter lm_mode_downsampling_filter_type_idc and the value of the SPS parameter is 0, the first chroma sample position, for example, type0, is indicated. Since the sample position type is associated with the filter type, the decoder side may immediately determine that the filter type is filter 0 based on the first sample position type type0. In another example, when the value of the SPS parameter is 1, the second chroma sample position, for example, type2, is indicated. Since the sample position type is associated with the filter type, the decoder side may immediately determine that the filter type is filter 2 based on the second sample position type type2.
[0215] In addition, in a specific embodiment, during the syntax analysis of the bitstream, second display information may be further obtained by syntax analyzing the bitstream. The second display information is used to indicate that the intra prediction mode used by the decoder side to decode the current chroma block is the LM mode. As a result, the decoder side determines that the LM mode should be used for intra prediction for the current image in the video sequence. Further, the decoder side continues to execute the related steps 802 to 805.
[0216] Step 802: To obtain the second luma block, perform a downsampling operation on the first luma block by using a filter corresponding to the filter type, where the first luma block is the luma block corresponding to the current chroma block.
[0217] In certain embodiments, the filter corresponding to the first display information may be used to downsample the luma block corresponding to the current chroma block of the current image (i.e., the first luma block) in order to obtain the value of each luma sample in the downsampled luma block (i.e., the second luma block). In this way, rec L '(i,j) of the LM mode algorithm formula is obtained.
[0218] For example, if six filter types are designed for the decoder side and the value currently shown by the first display information is 0, the luma downsampling filter used is filter 0, and the sampling algorithm is as follows. LC(xb,yb)=(2*L(2*xb,2*yb)+L(2*xb-1,2*yb)+L(2*xb+1,2*yb)+2*L(2*xb,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3
[0219] In this case, filter 0 may be used to downsample the first luma block in order to obtain the value of each luma sample in the second luma block.
[0220] In another example, if two filter types (e.g., filter 0 and filter 2) are designed for the decoder side and the value currently shown by the first display information is 1, the luma downsampling filter used is filter 2, and the sampling algorithm is as follows. LC(xb,yb)=(4*L(2*xb,2*yb) +2*L(2*xb,2*yb+1)+2*L(2*xb,2*yb-1)+2*L(2*xb-1,2*yb)+2*L(2*xb+1,2*yb) +L(2*xb+1,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb-1,2*yb-1)+L(2*xb+1,2*yb-1)+8)>>4
[0221] In this case, filter 2 can be used to downsample the first luma block in order to obtain the value of each luma sample in the second luma block.
[0222] Step 803: Obtain a template chroma sample and a template luma sample. The template chroma sample includes a plurality of adjacent chroma samples of the current chroma block, and the template luma sample is obtained by performing a downsampling operation on a plurality of adjacent luma samples of the first luma block. For the specific implementation form of step 803, please refer to the relevant descriptions in the embodiments in FIGS. 9 and 10. For the sake of brevity of this specification, the details will not be described again in this specification.
[0223] Note that step 802 and step 803 are not consecutive, that is, step 802 may be executed before or after step 803, or step 802 and step 803 may be executed simultaneously.
[0224] Step 804: Obtain linear model coefficients α and β based on the template chroma sample and the template luma sample.
[0225] For example, in one implementation, the linear model coefficients α and β may be calculated by using the least squares method. Specifically, for example, a system of linear equations can be constructed by using the template luma samples and the template chroma samples shown in FIG. 9. The number of adjacent reference samples of the template chroma samples or the template luma samples is shown as N, and L(n) and C(n) represent the value of the n-th luma sample and the value of the n-th chroma sample, respectively. In this case, the linear model coefficients α and β are as follows.
[0226] [Number]
[0227] In the case of another example, in another implementation, the linear model coefficients α and β may be calculated by using the extreme value method. Specifically, the number of adjacent reference samples of the template chroma samples or the template luma samples is shown as N, and L(n) and C(n) represent the value of the n-th luma sample and the value of the n-th chroma sample, respectively, and L(n) and C(n) form a sample value pair. A set of sample value pairs may be obtained as follows, that is, {(L0, C0), (L1, C1), (L2, C2)...(L n , C n ),...(LN-1, CN-1)}, where N represents the number of adjacent samples of the current chroma block used to determine the linear model coefficients. FIG. 14 shows the distribution of a set of sample value pairs in the luma-chroma coordinate system. The value pairs corresponding to the maximum luma value L max and the minimum luma value L min are found in the set of sample value pairs. Assuming that the i-th sample B corresponds to the maximum luma value, that is, L i = L max , and the j-th sample A corresponds to the minimum luma value, that is, L j = L min , the linear model coefficients α and β are, respectively,
[0228]
Number
[0229] β = C j -α * L j becomes as follows.
[0230] It should be understood that the above is only an example and not a limitation. After the values of each chroma sample of the template chroma sample and the values of each luma sample of the template luma sample are obtained, the method of deriving the linear model coefficients α and β in the LM mode based on the template chroma sample and the template luma sample is not limited in this embodiment of the present invention.
[0231] Step 805: Obtain the predicted value of the current chroma block based on the second luma block and the linear model coefficients.
[0232] rec L ' (i, j) and the linear model coefficients α and β are obtained, then according to the algorithm formula in the LM mode, that is, pred C (i, j) = α * rec L ' (i, j) + β, it can be understood that the predicted value pred of each chroma sample in the current chroma block C (i, j) can be obtained.
[0233] In this embodiment of the present invention, it can be known that the decoder side can determine a filter used for downsampling a luma block corresponding to a current chroma block in the LM mode based on display information (for example, the value of a newly added SPS parameter) in the bitstream. In this way, a filter corresponding to the chroma sample position can be obtained. This takes into account the case where different chroma sample positions may actually exist in different video sequences, thereby ensuring the consistency between the downsampled luma sample position and the chroma sample position.
[0234] Based on the above-described system and device, an embodiment of the present invention further provides another chroma block prediction method. The method is described from the perspective of the decoder side. Refer to FIG. 15. Compared with FIG. 13, step 903 in the embodiment of FIG. 15 is different from step 803 in the embodiment of FIG. 13. The method is briefly described as follows.
[0235] Step 901: Parse the bitstream to obtain first display information, where the first display information is used to indicate a filter type. For a specific implementation form, refer to the description of step 801 in the embodiment of FIG. 13. Details will not be described again in this specification.
[0236] Step 902: Perform a downsampling operation on the first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to the current chroma block, and the second luma block represents a set of downsampled luma samples in the first luma block. For a specific implementation form, refer to the description of step 802 in the embodiment of FIG. 13. Details will not be described again in this specification.
[0237] Step 903: Obtain a template chroma sample and obtain a template luma sample based on the first display information.
[0238] In this embodiment of the present invention, since the first display information indicates the filter type for the template luma sample, the downsampling operation may be performed on a plurality of adjacent luma samples of the first luma block by using a filter corresponding to the filter type in order to obtain the template luma sample.
[0239] For example, if six filter types are designed for the decoder side and the value currently indicated by the first display information is 0, the luma downsampling filter used is filter 0, and the sampling algorithm is as follows. LC(xb,yb)=(2*L(2*xb,2*yb)+L(2*xb-1,2*yb)+L(2*xb+1,2*yb)+2*L(2*xb,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3
[0240] In this case, filter 0 can be used to perform a downsampling operation on a plurality of adjacent luma samples of the first luma block in order to obtain the value of each luma sample in the template luma sample.
[0241] In the case of another example, two filter types (for example, filter 0 and filter 2) are designed for the decoder side, the value currently indicated by the first display information is 1, the luma downsampling filter used is filter 2, and the sampling algorithm is as follows. LC(xb,yb)=(4*L(2*xb,2*yb) +2*L(2*xb,2*yb+1)+2*L(2*xb,2*yb-1)+2*L(2*xb-1,2*yb)+2*L(2*xb+1,2*yb) +L(2*xb + 1, 2*yb + 1)+L(2*xb - 1, 2*yb + 1)+L(2*xb - 1, 2*yb - 1)+L(2*xb + 1, 2*yb - 1)+8) >> 4
[0242] In this case, filter 2 can be used to perform a downsampling operation on a plurality of adjacent luma samples of the first luma block in order to obtain the value of each luma sample in the template luma samples.
[0243] It should be noted that the above is only an example and not a limitation.
[0244] In this embodiment of the present invention, for the template chroma samples, the template chroma samples include a plurality of adjacent chroma samples of the current chroma block. For the specific method of obtaining the template chroma samples, refer to the related descriptions in the embodiments in FIGS. 9 and 10. Details will not be described again in this specification.
[0245] Step 904: Obtain the linear model coefficients α and β based on the template chroma samples and the template luma samples. For the specific implementation form, refer to the description of step 804 in the embodiment in FIG. 13. Details will not be described again in this specification.
[0246] Step 905: Obtain the predicted value of the current chroma block based on the second luma block and the linear model coefficients. For the specific implementation form, refer to the description of step 805 in the embodiment in FIG. 13. Details will not be described again in this specification.
[0247] In particular, the following embodiments are provided in this specification.
[0248] Embodiment 1. A chroma block prediction method, comprising: Parsing a bitstream to obtain first display information, wherein the first display information is used to indicate a filter type; Performing a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, wherein the first luma block is a luma block corresponding to a current chroma block; Obtaining template chroma samples and template luma samples, wherein the template chroma samples include a plurality of adjacent chroma samples of the current chroma block, and the template luma samples are obtained by performing a downsampling operation on a plurality of adjacent luma samples of the first luma block; Obtaining linear model coefficients based on the template chroma samples and the template luma samples; Obtaining a predicted value of the current chroma block based on the second luma block and the linear model coefficients. A method comprising the above steps.
[0249] Embodiment 2. The step of obtaining the template luma samples comprises: Performing the downsampling operation on the plurality of adjacent luma samples of the first luma block by using the filter corresponding to the filter type to obtain the template luma samples. The method according to Embodiment 1.
[0250] Embodiment 3. The template chroma samples include: One or more columns of adjacent chroma samples to the left of the current chroma block. The method according to Embodiment 1 or 2.
[0251] Embodiment 4. The template chroma samples include: One or more rows of adjacent chroma samples above the current chroma block. The method according to Embodiment 1 or 2.
[0252] Embodiment 5. The template chroma sample includes one or more rows of the adjacent chroma sample above the current chroma block and one or more columns of the adjacent chroma sample to the left of the current chroma block, The method according to any one of Embodiments 1 to 4.
[0253] Embodiment 6. Before the step of obtaining the template chroma sample and the template luma sample, The method further includes a step of parsing the bitstream to obtain second display information, and the second display information is used to indicate that the intra prediction mode used for current decoding is the linear model LM mode. The method according to any one of Embodiments 1 to 5.
[0254] Embodiment 7. The method is used to decode a current image block in a video sequence, the current image block includes the first luma block and the current chroma block, and the images in the video sequence are in 4:2:0 format or 4:2:2 format. The method according to any one of Embodiments 1 to 6.
[0255] Embodiment 8. A chroma block prediction method, a step of determining a filter type based on the sample position of the current chroma block; a step of performing a downsampling operation on the first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is the luma block corresponding to the current chroma block. A step of obtaining a template chroma sample and a template luma sample, wherein the template chroma sample includes a plurality of adjacent chroma samples of the current chroma block, and the template luma sample is obtained by performing a downsampling operation on a plurality of adjacent luma samples of the first luma block, the step; A step of obtaining linear model coefficients based on the template chroma sample and the template luma sample; A step of obtaining a predicted value of the current chroma block based on the second luma block and the linear model coefficients A method comprising:
[0256] Embodiment 9. Before the step of determining a filter type based on a sample position of a current chroma block, Further comprising a step of parsing a bitstream to obtain first display information, wherein the first display information is used to indicate the sample position of the current chroma block, The method according to Embodiment 8.
[0257] Embodiment 10. The step of parsing a bitstream to obtain first display information is Comprising a step of parsing sequence parameter set (SPS) parameters in the bitstream to obtain the first display information, The method according to Embodiment 9.
[0258] Embodiment 11. A chroma block prediction method, comprising: A step of determining a filter type based on a sample position type of a current chroma block; A step of setting first display information, wherein the first display information is used to indicate the filter type; A step of encoding the first display information into a bitstream A method comprising:
[0259] Embodiment 12. The sample position type of the current chroma block is at least one of the following sample position types, namely, sample position type type0, sample position type type1, sample position type type2, sample position type type3, sample position type type4, and sample position type type5, the method according to Embodiment 11.
[0260] Embodiment 13. The sample position type of the current chroma block is at least one of the following sample position types, namely, sample position type type0 and sample position type type2, the method according to Embodiment 11.
[0261] Embodiment 14. A step of selecting a linear model LM mode from a plurality of intra prediction modes, a step of setting second display information, wherein the second display information is used to indicate the linear model LM mode, a step of encoding the second display information into the bitstream, and The method according to any one of Embodiments 11 to 13, further comprising.
[0262] Embodiment 15. A step of determining a filter corresponding to the filter type based on the first display information, a step of downsampling a first luma block by using the filter corresponding to the filter type to obtain a second luma block, wherein the first luma block is a luma block corresponding to the current chroma block, Obtaining a template chroma sample and a template luma sample, wherein the template chroma sample comprises a plurality of adjacent chroma samples of the current chroma block, and the template luma sample is obtained by downsampling a plurality of adjacent luma samples of the first luma block; Obtaining linear model coefficients based on the template chroma sample and the template luma sample; Obtaining a predicted value of the current chroma block based on the second luma block and the linear model coefficients; The method according to any one of Embodiments 11 to 14, further comprising.
[0263] In this embodiment of the present invention, for the LM mode, in the downsampling process for deriving the template luma sample and the downsampling process for the current block, it can be known that the decoder side can determine the filter used to downsample the luma block corresponding to the current chroma block in the LM mode based on the display information in the bitstream (for example, the value of the newly added SPS parameter). In this way, the filter corresponding to the chroma sample position can be obtained. This takes into account the case where different chroma sample positions may exist in different video sequences, thereby ensuring the consistency between the downsampled luma sample position and the chroma sample position.
[0264] The following describes application examples of the encoding method and the decoding method described in the above embodiments, as well as the system in which the encoding method and the decoding method are used.
[0265] FIG. 16 is a block diagram of a content supply system 3100 for implementing a content delivery service. The content supply system 3100 includes a capture device 3102 and a terminal device 3106, and optionally includes a display 3126. The capture device 3102 communicates with the terminal device 3106 through a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, Wi-Fi, Ethernet (registered trademark), cable, wireless (3G / 4G / 5G), USB, any combination of these types, and the like.
[0266] The capture device 3102 may generate data and encode the data by using an encoding method as described in the above embodiments. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown in the figure), and the server encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone, a tablet computer, a computer, a notebook computer, a video conferencing system, a PDA, an in-vehicle device, a combination thereof, and the like. For example, the capture device 3102 may include the source device 12 as described above. When the data includes video, a video encoder 20 included in the capture device 3102 may actually perform video encoding processing. When the data includes audio (for example, voice), an audio encoder included in the capture device 3102 may actually perform audio encoding processing. In some practical scenarios, the capture device 3102 distributes the encoded video data and the encoded audio data by multiplexing them together. In other practical scenarios, for example, in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. The capture device 3102 distributes the encoded audio data and the encoded video data to the terminal device 3106 separately.
[0267] In the content supply system 3100, the terminal device 310 receives and plays back the encoded data. The terminal device 3106 may be a device having data reception and restoration capabilities, such as a smartphone or tablet computer 3108, a computer or notebook computer 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination of these types capable of decrypting the above encoded data. For example, the terminal device 3106 may include the destination device 14 as described above. When the encoded data includes video, the video decoder 30 included in the terminal device is prioritized to perform video decoding. When the encoded data includes audio, the audio decoder included in the terminal device is prioritized to perform audio decoding processing.
[0268] In the case of a terminal device equipped with a display, such as a smartphone or tablet computer 3108, a computer or notebook computer 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or an in-vehicle device 3124, the terminal device may supply the decoded data to the display of the terminal device. In the case of a terminal device not equipped with a display, such as an STB 3116, a video conferencing system 3118, or a video surveillance system 3120, an external display 3126 is connected to receive and display the decoded data.
[0269] When each device in this system performs encoding or decoding, an image encoding device or an image decoding device as described in the above-described embodiments may be used.
[0270] FIG. 17 is a diagram of an exemplary structure of a terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, the protocol processing unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), Hyper Text Transfer Protocol (HTTP), HTTP Live streaming protocol (HLS), MPEG-DASH, Real-time Transport protocol (RTP), Real Time Messaging Protocol (RTMP), any combination of these types, and the like.
[0271] After processing the stream, the protocol progress unit 3202 generates a stream file. The file is output to the demultiplexer unit 3204. The demultiplexer unit 3204 may separate the multiplexed data into encoded audio data and encoded video data. As described above, in other practical scenarios, for example, in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexer unit 3204.
[0272] A video elementary stream (ES), an audio ES, and optionally subtitles are generated through demultiplexing. The video decoder 3206 includes the video decoder 30 described in the above embodiments, decodes the video ES by using the decoding method shown in the above embodiments to generate video frames, and supplies data to the synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio frames and supplies data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in the figure) before being supplied to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in the figure) before being supplied to the synchronization unit 3212.
[0273] The synchronization unit 3212 synchronizes the video frames and the audio frames and provides video / audio to the video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video information and audio information. The information may be encoded in the syntax elements by using time stamps related to the presentation of the encoded audio and video data and time stamps related to the delivery of the data stream.
[0274] If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes the subtitles with the video frames and the audio frames, and provides video / audio / subtitles to the video / audio / subtitle display 3216.
[0275] The present invention is not limited to the above system, and the image encoding device or the image decoding device in the above embodiments may be incorporated into another system, for example, a vehicle system.
[0276] All or part of the above embodiments may be implemented by software, hardware, firmware, or any combination thereof. When software is used for implementation, the present embodiment may be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the procedures or functions according to the embodiments of the present invention are generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or another programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by means of wire (such as coaxial cable, optical fiber, or digital subscriber line) or wireless (such as infrared, microwave, etc.). The computer-readable storage medium may be any usable medium accessible by a computer or a data storage device such as a server or data center integrating one or more usable media. The usable media may be magnetic media (such as floppy (registered trademark) disk, hard disk, or magnetic tape), optical media (such as DVD), semiconductor media (such as solid state drive), etc.
[0277] In the above embodiments, the descriptions in the present embodiment have their respective focuses. For parts not described in detail in a certain embodiment, please refer to the related descriptions in other embodiments.
Description of Reference Signs
[0278] 10 Video coding system 12 Source device 13 Link 14 Destination device 16 Picture source 17 Raw picture data 18 Picture preprocessor 19 Preprocessed picture data, preprocessed picture 20 Encoder 21 Encoded picture data 22 Communication interface 28 Communication interface 30 Decoder 31 Decoded picture data, decoded picture 32 Picture postprocessor 33 Postprocessed picture data 34 Display device 40 Video coding system 41 Imaging device 42 Antenna 43 Processor 44 Memory 45 Display device 46 Processing unit 47 Logic circuit 201 Picture 202 Input section 203 Image block, picture image block 204 Residual calculation unit 205 Residual block 206 Transformation processing unit 207 Transformation coefficient 208 Quantization unit 209 Quantized transformation coefficient, quantized residual coefficient 210 Inverse quantization unit 211 Dequantized coefficient, dequantized residual coefficient 212 Inverse transformation processing unit 213 Inverse transformation block, inverse transformation dequantized block, inverse transformation residual block, reconstructed residual block 214 Reconstruction unit, adder 215 Reconstructed block 216 Buffer, line buffer, buffer unit 220 Loop filter unit 221 Filter-processed block 230 Decoded picture buffer 231 Reference picture data, decoded picture 244 Inter prediction unit 245 Inter prediction block 246 Motion compensation unit 254 Intra prediction unit 255 Intra prediction block 260 Block prediction processing unit, prediction processing unit 262 Mode selection unit 265 Prediction block 270 Entropy encoding unit 272 Output section 304 Entropy decoding unit 309 Quantization coefficient 310 Inverse quantization unit 312 Inverse transform processing unit 313 Reconstructed residual block, inverse transform block 314 Reconstruction unit, adder 315 Reconstructed block 316 Buffer 320 Loop filter 321 Filter-processed block, decoded video block 330 Decoded picture buffer 332 Output section 344 Inter prediction unit 354 Intra prediction unit 360 Prediction processing unit 362 Mode selection unit 365 Prediction block 400 Video coding device, video encoding device, video decoding device 410 Input port 420 Receiver unit 430 Processor, Logic Unit, Central Processing Unit 440 Transmitter Unit 450 Outlet Port 460 Memory 470 Coding Module, Encoding Module, Decoding Module 500 Device 502 Processor 504 Memory 506 Data 508 Operating System 510 Application Program 512 Bus 514 Secondary Memory 518 Display 520 Image Sensing Device 522 Sound Sensing Device 3100 Content Supply System 3102 Capture Device 3104 Communication Link 3106 Terminal Device 3108 Smartphone, Tablet Computer 3110 Computer, Notebook Computer 3112 Network Video Recorder, Digital Video Recorder 3114 TV 3116 Set-Top Box 3118 Video Conference System 3120 Video Surveillance System 3122 Portable Information Terminal 3124 In-Vehicle Device 3126 Display 3202 Protocol Processing Unit 3204 Demultiplexer Unit 3206 Video Decoder 3208 Audio Decoder 3210 Subtitle Decoder 3212 Synchronization Unit 3214 Video / Audio Display 3216 Video / Audio / Subtitle Display
Claims
Claim 1 A symbolization method, comprising: determining whether a sample position of a current chroma block is inconsistent with a sample position of a first luma block corresponding to the current chroma block; setting first instruction information to a first value or a second value, where the first value indicates that when the sample position of the current chroma block is inconsistent with the sample position of the first luma block, a filter type of a luma downsampling filter used for prediction of the current chroma block is a first type, the second value indicates that the filter type is a second type, the sample position of the current chroma block is (xb, yb), and when a sample position (xb, yb) in a chroma image corresponding to a position in a luma image is (2*xb, 2*yb + 0.5), the sample position of the current chroma block is inconsistent with the sample position of the first luma block; encoding the first instruction information into a bit stream; A symbolization method characterized by comprising the above steps. Claim 2 The first type is LC(xb, yb) = (2*L(2*xb, 2*yb) + L(2*xb - 1, 2*yb) + L(2*xb + 1, 2*yb) + 2*L(2*xb, 2*yb + 1) + L(2*xb - 1, 2*yb + 1) + L(2*xb + 1, 2*yb + 1)+4)>>3 a filter 0 defined as such, where LC(xb, yb) represents a value of a second luma block corresponding to the sample position (xb, yb) of the current chroma block, and L(,) represents a value of a luma sample of the first luma block. The symbolization method according to claim 1. Claim 3 The symbolization method according to claim 1 or 2, wherein the first instruction information is encoded into a sequence parameter set (SPS) parameter of the bit stream. Claim 4 The symbolization method according to claim 3, wherein when a value of the SPS parameter is 0, the first type of filter is used for performing a downsampling operation, and when the value of the SPS parameter is 1, the second type of filter is used for performing the downsampling operation. Claim 5 The method for encoding according to any one of claims 1 to 4, wherein the current chroma block is included in an image block of a video sequence, and the image of the video sequence is in a 4:2:0 format or a 4:2:2 format.
6. A program including computer-executable instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 5.
7. A device having a storage, wherein the storage is an encoded bitstream including a plurality of syntax elements, and the plurality of syntax elements include first indication information, wherein the first indication information has a first value when the sample position of the current chroma block has a mismatch with the sample position of a first luma block corresponding to the current chroma block, the first indication information has a second value when the sample position of the current chroma block has no mismatch with the sample position of the first luma block, and the first indication information indicates a filter type of a filter used for downsampling of the first luma block, the first indication information, and second indication information indicating that the intra prediction mode of the current chroma block is a linear model (LM) mode, and comprises the first indication information exists when the second indication information indicates that the intra prediction mode of the current chroma block is the LM mode, the encoded bitstream is decoded by a decoder, and based on the syntax element, the decoder is caused to perform a downsampling operation on the first luma block by using a first filter (filter 0) when the first indication information has the second value, or perform a downsampling operation on the first luma block by using a second filter (filter 2) when the first indication information has the second value, to obtain a second luma block, the value of the first indication information is a first value indicating that the sample position of the current chroma block is (xb, yb), and is a first value indicating that the sample position of the first luma block is (2*xb, 2*yb + 0.5), obtain a predicted value of the current chroma block based on the second luma block and linear model coefficients A device configured to store an encoded bitstream configured to cause such a thing.
8. The first type is LC(xb,yb) = (2*L(2*xb, 2*yb) + L(2*xb-1, 2*yb) + L(2*xb+1, 2*yb) + 2* L(2*xb, 2*yb+1) + L(2*xb-1, 2*yb+1) + L(2*xb+1, 2*yb+1)+4)>>3 Filter 0 defined as The device according to claim 7, wherein LC(xb,yb) represents the value of the second luma block corresponding to the sample position (xb,yb) of the current chroma block, and L(,) represents the value of the luma sample of the first luma block.
9. The device according to claim 7 or 8, wherein the first indication information is encoded in the sequence parameter set (SPS) parameter of the encoded bitstream.
10. When the value of the SPS parameter is 0, the filter type of the filter used for downsampling the first luma block is the first type (filter 0), When the value of the SPS parameter is 1, the filter type of the filter used for downsampling the first luma block is the second type (filter 2), the device according to claim 9.
11. The device according to any one of claims 7 to 10, wherein the current chroma block corresponding to the first luma block is included in an image block of a video sequence, and the image of the video sequence is in 4:2:0 format or 4:2:2 format.
12. An encoding device, A non-transitory computer-readable storage medium for storing instructions, One or more processors communicating with the medium, Comprising When the instructions are executed by the one or more processors, the encoding device is caused to Determine whether the sample position of the current chroma block is inconsistent with the sample position of the first luma block corresponding to the current chroma block A step of setting the first instruction information to a first value or a second value, where the first value indicates that when the sample position of the current chroma block has a mismatch with the sample position of the first luma block, the filter type of the luma downsampling filter used for prediction of the current chroma block is the first type, the second value indicates that the filter type is the second type, the sample position of the current chroma block is (xb, yb), and when the sample position (xb, yb) in the chroma image corresponding to the position in the luma image is (2*xb, 2*yb + 0.5), the sample position of the current chroma block is inconsistent with the sample position of the first luma block, and the step is as follows: A step of encoding the first instruction information into a bitstream An encoding device for causing the above to be executed.
13. The first type is LC(xb,yb) = (2*L(2*xb, 2*yb) + L(2*xb-1, 2*yb) + L(2*xb+1, 2*yb) + 2* L(2*xb, 2*yb+1) + L(2*xb-1, 2*yb+1) + L(2*xb+1, 2*yb+1)+4)>>3 And it is filter 0 defined as The encoding device according to claim 12, wherein LC(xb, yb) represents the value of the second luma block corresponding to the sample position (xb, yb) of the current chroma block, and L(,) represents the value of the luma sample of the first luma block.
14. The encoding device according to claim 12 or 13, wherein the first instruction information is encoded into the sequence parameter set (SPS) parameter of the bitstream.
15. When the value of the SPS parameter is 0, the filter of the first type is used for performing the downsampling operation, and when the value of the SPS parameter is 1, the filter of the second type is used for performing the downsampling operation. The encoding device according to claim 14.
16. The encoding device according to any one of claims 12 to 15, wherein the current chroma block is included in an image block of a video sequence, and the image of the video sequence is in a 4:2:0 format or a 4:2:2 format.
Citation Information
Patent Citations
Image coding device and image decoding device
JP2021005741A
Image processing device and method
WO2019054200A1