Deriving Chroma Sample Weights for Geometric Partitioning Mode
By deriving chroma sample weights from luma sample weights using geometric models and blending operations, the method addresses computational intensity in video coding, improving decoding speed and reducing hardware requirements.
Patent Information
- Application Number
- JP2021576115
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-06-21
- Filing Date
- 2020-06-19
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2040-06-19
AI Technical Summary
Existing video coding technologies face challenges in achieving high compression ratios with minimal image quality sacrifice, particularly in handling chroma sample weights during geometric splitting modes, which can be computationally intensive and require significant hardware resources.
A method for deriving chroma sample weights by leveraging relationships with luma sample weights, allowing for reduced computational complexity and increased decoding speed through software-based calculations, using geometric models and blending operations to combine prediction modes.
This approach reduces the need for hardware circuits to calculate chroma sample weights, decreases the number of operations required, and enhances the speed of decoding and encoding processes while maintaining image quality.
Smart Images

Figure 0007564132000015 
Figure 0007564132000016 
Figure 0007564132000017
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This patent application claims priority to International Patent Application No. PCT / EP2019 / 066516, filed June 21, 2019. The disclosures of the aforementioned patent applications are incorporated herein by reference in their entireties.
[0002] FIELD OF THE DISCLOSURE Embodiments of the present disclosure relate generally to the field of image processing, and more particularly to deriving weight values for segmentation. [Background technology]
[0003] Video coding (video encoding and decoding) is used in a wide range of digital video applications, such as broadcast digital TV, video transmission over the Internet and mobile networks, real-time conversational applications such as video chat, video conferencing, DVDs and Blu-ray Discs, video content acquisition and editing systems, and camcorders in security applications.
[0004] The amount of video data required to represent even a relatively short video can be substantial, which can present challenges when streaming data or transmitting data over communication networks with limited bandwidth capacity. For this reason, video data is typically compressed before being transmitted over today's communication networks. The size of the video can also be an issue when the video is stored on a storage device, where memory resources may be scarce. Video compression devices often use software and / or hardware to code the video data at the source prior to transmission or storage, thereby reducing the amount of data required to represent a digital video image. The compressed data is then received by a video decompression device, which decodes the video data at the destination. Due to limited network resources and an increasing demand for higher video quality, improved compression and decompression techniques are desired that increase compression ratios with little or no sacrifice in image quality. Summary of the Invention [Means for solving the problem]
[0005] Embodiments of the present disclosure provide apparatus and methods for encoding and decoding according to the independent claims.
[0006] The present disclosure provides a coding method implemented by a decoding device, the method comprising: obtaining a value of a parameter of the current block, the value of the parameter indicating a partition mode of the current block; obtaining a first prediction mode of a current block; obtaining a second prediction mode for the current block; generating a first prediction value for a chroma sample in a current block according to a first prediction mode; generating a second prediction value for the chroma sample in the current block according to a second prediction mode; and obtaining a composite value of the predicted sample by combining the first predicted value and the second predicted value.
[0007] In the above method, a composite value of the predicted sample may be obtained by combining the first predicted value and the second predicted value according to the division mode.
[0008] In the above method, a composite value of the predicted sample may be obtained by combining the first predicted value and the second predicted value according to a blending operation. Thus, a partitioning mode, i.e. its corresponding partitioning, may be understood to mark the boundary where the sample weights of a first prediction are higher than the sample weights of a second prediction, for example due to a blending operation.
[0009] In the above methods, the blending operation may be performed using a function or a look-up table.
[0010] The above method may further include a step of obtaining a weight value for the luma sample by calculating a weight value for the luma sample, and a step of obtaining a first weight value for the chroma sample by calculating a first weight value for the chroma sample.
[0011] In the above method, the step of obtaining a first weighting value of a chroma sample may be related to a step of obtaining a weighting value of a luma sample in the current block, and the method may further include a step of obtaining a composite predicted value of the chroma sample in the current block according to the first predicted value of the chroma sample and the first weighting value of the chroma sample.
[0012] In the above method, obtaining a first weight value for a chroma sample may involve obtaining a weight value for a luma sample in the current block as follows: sampleWeightC1(x,y)=sampleWeight1(2*x,2*y), where x and y are the coordinates of the chroma sample relative to the top-left coordinate of the chroma block of the coding block, sampleWeightC1(a,b) is the first weight value of the chroma sample located at sample coordinates (a,b) in the chroma block of the current block, where a and b are coordinate values, sampleWeight1(c,d) represents the weight value corresponding to the luma sample located at sample coordinates (c,d) in the luma block of the current block, where c and d are coordinate values, and K is an integer value.
[0013] It should be understood that expressions such as (2*x,2*y) and (2x,2y) are equivalent.
[0014] Therefore, according to the above method, the weight value of a chroma sample at a chroma sample position (x, y) may be equal to the weight value of a luma sample at a luma sample position (2x, 2y). This relationship between the luma sample weight and the chroma sample weight allows the calculation of the chroma sample weight to be skipped. In other words, due to the above relationship, i.e., sampleWeightC1(x, y) = sampleWeight1(2*x, 2*y), it is no longer necessary to calculate sampleWeightC1() after calculating sampleWeight1() for all luma samples in a luma block. For all chroma samples in a chroma block, sampleWeightC1() can be obtained using the calculated value for sampleWeight1(). Thus, the present disclosure allows an implementer to reduce the circuitry required to calculate sampleWeightC1. There is no need to implement a hardware circuit to calculate sampleWeightC1, and the value of sampleWeightC1() can be obtained by accessing the already calculated value of sampleWeight1(). Also, because sampleWeightC1() is calculated in software, the number of operations required to obtain sampleWeightC1() is reduced, resulting in faster decoding and encoding speeds.
[0015] In the above method, obtaining a first weight value for a chroma sample may involve obtaining a weight value for a luma sample in the current block as follows: sampleWeightC1(x,y)=sampleWeight1(2*x-1,2*y-1), or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+K)>>1, or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+sampleWeight1(2*x,2*y-1)+sampleWeight1(2*x-1,2*y)+K)>>2, or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+sampleWeight1(2*x,2*y-1)+sampleWeight1(2*x-1,2*y)+2)>>2, or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+1)>>1, where x and y are the coordinates of the chroma sample relative to the top-left coordinate of the chroma block of the coding block, sampleWeightC1(a,b) is the first weight value of the chroma sample located at sample coordinates (a,b) in the chroma block of the current block, where a and b are coordinate values, sampleWeight1(c,d) represents the weight value corresponding to the luma sample located at sample coordinates (c,d) in the luma block of the current block, where c and d are coordinate values, and K is an integer value.
[0016] In the above method, the division mode may be a geometric model.
[0017] In the above method, the parameter may be an angle parameter or a distance parameter.
[0018] In the above method, the first prediction mode and the second prediction mode do not have to be the same.
[0019] In the above method, the first prediction mode or the second prediction mode may be an inter prediction mode, and the information for the inter prediction mode may include a reference image index and / or a motion vector.
[0020] In the above method, the first prediction mode or the second prediction mode may be an intra prediction mode, and the information for the intra prediction mode may include an intra prediction mode index.
[0021] The present disclosure further provides a decoder including processing circuitry for performing the above-mentioned method.
[0022] The present disclosure further provides a computer program product comprising program code for performing the above-mentioned method.
[0023] The present disclosure further provides a decoder, the decoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the decoder to perform the method described above.
[0024] The present disclosure further provides a decoder, the decoder comprising: an obtaining unit for obtaining a value of a parameter of a current block, the value of the parameter indicating a division mode of the current block; a first prediction unit for obtaining a first prediction mode of a current block; a second prediction unit for obtaining a second prediction mode of the current block; a first generation unit for generating a first prediction value for a chroma sample in a current block according to a first prediction mode; a second generation unit for generating a second prediction value for a chroma sample in the current block according to a second prediction mode; a combination unit for obtaining a composite value of the predicted sample by combining the first predicted value and the second predicted value.
[0025] The above may also be applied to the encoding aspect.
[0026] Thus, the present disclosure may also provide a method of coding performed by an encoding device, the method comprising: obtaining a value of a parameter of the current block, the value of the parameter indicating a partition mode of the current block; obtaining a first prediction mode of a current block; obtaining a second prediction mode for the current block; generating a first prediction value for a chroma sample in a current block according to a first prediction mode; generating a second prediction value for the chroma sample in the current block according to a second prediction mode; and obtaining a composite value of the predicted sample by combining the first predicted value and the second predicted value.
[0027] In the above method, a composite value of the predicted sample may be obtained by combining the first predicted value and the second predicted value according to the division mode.
[0028] In the above method, a composite value of the predicted sample may be obtained by combining the first predicted value and the second predicted value according to a blending operation.
[0029] Thus, a partitioning mode, i.e. its corresponding partitioning, may be understood to mark the boundary where the sample weights of a first prediction are higher than the sample weights of a second prediction, for example due to a blending operation.
[0030] In the above methods, the blending operation may be performed using a function or a look-up table.
[0031] The above method may further include a step of obtaining a weight value for the luma sample by calculating a weight value for the luma sample, and a step of obtaining a first weight value for the chroma sample by calculating a first weight value for the chroma sample.
[0032] In the above method, the step of obtaining a first weighting value of a chroma sample may be related to a step of obtaining a weighting value of a luma sample in the current block, and the method may further include a step of obtaining a composite predicted value of the chroma sample in the current block according to the first predicted value of the chroma sample and the first weighting value of the chroma sample.
[0033] In the above method, obtaining a first weight value for a chroma sample may involve obtaining a weight value for a luma sample in the current block as follows: sampleWeightC1(x,y)=sampleWeight1(2*x,2*y), where x and y are the coordinates of the chroma sample relative to the top-left coordinate of the chroma block of the coding block, sampleWeightC1(a,b) is the first weight value of the chroma sample located at sample coordinates (a,b) in the chroma block of the current block, where a and b are coordinate values, sampleWeight1(c,d) represents the weight value corresponding to the luma sample located at sample coordinates (c,d) in the luma block of the current block, where c and d are coordinate values, and K is an integer value.
[0034] Therefore, according to the above method, the weight value of a chroma sample at a chroma sample position (x, y) may be equal to the weight value of a luma sample at a luma sample position (2x, 2y). This relationship between the luma sample weight and the chroma sample weight allows the calculation of the chroma sample weight to be skipped. In other words, due to the above relationship, i.e., sampleWeightC1(x, y) = sampleWeight1(2*x, 2*y), it is no longer necessary to calculate sampleWeightC1() after calculating sampleWeight1() for all luma samples in a luma block. For all chroma samples in a chroma block, sampleWeightC1() can be obtained using the calculated value for sampleWeight1(). Thus, the present disclosure allows an implementer to reduce the circuitry required to calculate sampleWeightC1. There is no need to implement a hardware circuit to calculate sampleWeightC1, and the value of sampleWeightC1() can be obtained by accessing the already calculated value of sampleWeight1(). Also, because sampleWeightC1() is calculated in software, the number of operations required to obtain sampleWeightC1() is reduced, resulting in faster decoding and encoding speeds.
[0035] In the above method, obtaining a first weight value for a chroma sample may involve obtaining a weight value for a luma sample in the current block as follows: sampleWeightC1(x,y)=sampleWeight1(2*x-1,2*y-1), or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+K)>>1, or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+sampleWeight1(2*x,2*y-1)+sampleWeight1(2*x-1,2*y)+K)>>2, or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+sampleWeight1(2*x,2*y-1)+sampleWeight1(2*x-1,2*y)+2)>>2, or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+1)>>1, where x and y are the coordinates of the chroma sample relative to the top-left coordinate of the chroma block of the coding block, sampleWeightC1(a,b) is the first weight value of the chroma sample located at sample coordinates (a,b) in the chroma block of the current block, where a and b are coordinate values, sampleWeight1(c,d) represents the weight value corresponding to the luma sample located at sample coordinates (c,d) in the luma block of the current block, where c and d are coordinate values, and K is an integer value.
[0036] In the above method, the division mode may be a geometric model.
[0037] In the above method, the parameter may be an angle parameter or a distance parameter.
[0038] In the above method, the first prediction mode and the second prediction mode do not have to be the same.
[0039] In the above method, the first prediction mode or the second prediction mode may be an inter prediction mode, and the information for the inter prediction mode may include a reference image index and / or a motion vector.
[0040] In the above method, the first prediction mode or the second prediction mode may be an intra prediction mode, and the information for the intra prediction mode may include an intra prediction mode index.
[0041] The present disclosure may also provide an encoder including processing circuitry for performing the above-described methods.
[0042] The present disclosure may further provide a computer program product comprising program code for performing the above-mentioned methods.
[0043] The present disclosure may further provide an encoder, the encoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the encoder to perform the method described above.
[0044] The present disclosure may further provide an encoder, the encoder comprising: an obtaining unit for obtaining a value of a parameter of a current block, the value of the parameter indicating a division mode of the current block; a first prediction unit for obtaining a first prediction mode of a current block; a second prediction unit for obtaining a second prediction mode of the current block; a first generation unit for generating a first prediction value for a chroma sample in a current block according to a first prediction mode; a second generation unit for generating a second prediction value for a chroma sample in the current block according to a second prediction mode; a combination unit for obtaining a composite value of the predicted sample by combining the first predicted value and the second predicted value.
[0045] These and other objects are achieved by the subject matter of the independent claims. Further embodiments are evident from the dependent claims, the description and the drawings.
[0046] In other words, according to the second aspect of the invention, an encoder includes processing circuitry for carrying out an embodiment of the method.
[0047] According to a third aspect of the invention, a decoder includes processing circuitry for carrying out an embodiment of the method.
[0048] According to a fourth aspect of the invention, a computer program product comprises program code for carrying out an embodiment of the method.
[0049] According to a fifth aspect of the present invention, there is provided a decoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the decoder to perform an embodiment of the method.
[0050] According to a sixth aspect of the present invention, there is provided an encoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the encoder to perform an embodiment of the method.
[0051] In one embodiment, a non-transitory storage medium is disclosed that includes an encoded bitstream decoded by an image decoding device, the bitstream being generated by dividing a frame of a video signal or an image signal into a plurality of blocks and including a plurality of syntax elements, the plurality of syntax elements including an indicator (syntax) according to any one of the above embodiments and implementations.
[0052] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims.
[0053] In the following, embodiments of the invention will be explained in more detail with reference to the accompanying drawings and figures. [Brief description of the drawings]
[0054] [Figure 1A] 1 is a block diagram illustrating an example of a video coding system configured to implement embodiments of the present invention. [Figure 1B] 2 is a block diagram illustrating another example of a video coding system configured to implement embodiments of the present invention. [Diagram 2] FIG. 1 is a block diagram illustrating an example of a video encoder configured to implement embodiments of the present invention. [Diagram 3] FIG. 2 is a block diagram illustrating an exemplary configuration of a video decoder configured to implement embodiments of the present invention. [Figure 4] 1 is a block diagram showing an example of an encoding device or a decoding device. [Diagram 5] FIG. 2 is a block diagram showing another example of an encoding device or a decoding device. [Figure 6a] FIG. 13 is a diagram illustrating an example of a collocated block. [Figure 6b] FIG. 2 is a diagram showing an example of spatially neighboring blocks. [Figure 7] FIG. 2 illustrates some examples of triangular prediction modes. [Figure 8] A diagram showing some examples of sub-block prediction modes. [Figure 9] FIG. 13 is a diagram showing an example of block division. [Figure 10] FIG. 13 is a diagram showing further examples of block division. [Figure 11]FIG. 13 is a diagram showing another example of block division. [Figure 12] FIG. 13 is a diagram showing further examples of block division. [Figure 13] FIG. 13 illustrates an example of values of weighting coefficients after processing of the blending function. [Figure 14] FIG. 13 illustrates another example of values of weighting coefficients after processing of the blending function. [Figure 15] FIG. 13 illustrates some examples of blending functions. [Figure 16] FIG. 2 illustrates the relationship between chroma and luma coordinates. [Figure 17] FIG. 1 illustrates a flow chart of one embodiment of a method according to the present disclosure. [Figure 18] FIG. 2 illustrates a decoder according to one embodiment of the present disclosure. [Figure 19] FIG. 31 is a block diagram showing an example of the configuration of a content supply system 3100 that realizes a content distribution service. [Figure 20] FIG. 2 is a block diagram illustrating the structure of an example terminal device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0055] In the following, the terms "co-located" and "collocated" should be understood to have the same meaning. In the following, identical reference signs refer to identical or at least functionally equivalent features, unless otherwise stated.
[0056] In the following description, reference is made to the accompanying drawings, which form a part of this disclosure and which show, by way of example, certain aspects of embodiments of the invention or in which embodiments of the invention may be used. It is understood that embodiments of the invention may be used in other ways and may include structural or logical changes not shown in the drawings. Therefore, the following detailed description should not be taken in a limiting sense, and the scope of the present invention is defined by the appended claims.
[0057] For example, it is understood that disclosure related to a described method also applies to a corresponding device or system configured to perform the method, and vice versa. For example, when one or more particular method steps are described, the corresponding device may include one or more units, e.g., functional units, for performing the described one or more method steps (e.g., one unit performing one or more steps, or multiple units each performing one or more of the multiple steps), even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, for example, when a particular apparatus is described based on one or more units, e.g., functional units, the corresponding method may include one step for performing the function of one or more units (e.g., one step performing the function of one or more units, or multiple steps each performing one or more functions of multiple units), even if such one or more steps are not explicitly described or illustrated in the drawings. Furthermore, it is understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless otherwise specified.
[0058] Video coding typically refers to the processing of a series of images forming a video or a video sequence. Instead of the term "image", the terms "frame" or "image" may be used as synonyms in the field of video coding. Video coding (or coding in general) includes two parts: video encoding and video decoding. Video encoding is performed at the sending side and typically involves processing (e.g., by compression) of the original video image to reduce the amount of data required to represent the video image (for more efficient storage and / or transmission). Video decoding is performed at the destination side and typically involves the reverse process compared to the encoder to reconstruct the video image. The embodiments referring to "coding" of a video image (or image in general) should be understood to relate to "encoding" or "decoding" of the video image or the respective video sequence. The combination of the encoding and decoding parts is also called CODEC (coding and decoding).
[0059] In the case of lossless video coding, the original video image can be reconstructed, i.e., the reconstructed video image has the same quality as the original video image (assuming no transmission losses or other data losses are lost during storage or transmission). In the case of lossy video coding, further compression is performed, for example by quantization, to reduce the amount of data representing the video image, which cannot be completely reconstructed at the decoder, i.e., the quality of the reconstructed video image is low or poor compared to the quality of the original video image.
[0060] Some video coding standards belong to the group of "lossy hybrid video codecs" (i.e., they combine spatial and temporal prediction in the sample domain with 2D transform coding to apply quantization in the transform domain). Each image of a video sequence is usually divided into a set of non-overlapping blocks, and coding is usually performed at the block level. In other words, at the encoder, a video is usually processed, i.e., encoded, at the block (video block) level, for example by generating a predictive block using spatial (intra-picture) and / or temporal (inter-picture) prediction, subtracting the predictive block from a current block (the block currently being / to be processed) to obtain a residual block, transforming the residual block, and quantizing the residual block in the transform domain to reduce (compress) the amount of data to be transmitted, while at the decoder, the inverse process is applied to the encoded or compressed block to reconstruct the current block for display. Furthermore, the encoder replicates the decoder processing loop so that both generate the same prediction (e.g., intra-prediction and inter-prediction) and / or processing of subsequent blocks, i.e., reconstruction for coding.
[0061] In the following embodiment of a video coding system 10, a video encoder 20 and a video decoder 30 are described based on FIGS. 1 to 3. FIG.
[0062] 1A is a schematic block diagram illustrating an example coding system 10, e.g., a video coding system 10 (or short coding system 10) that can utilize the techniques of this disclosure. A video encoder 20 (or short encoder 20) and a video decoder 30 (or short decoder 30) of the video coding system 10 illustrate examples of devices that can be configured to perform techniques according to various examples described in this disclosure.
[0063] As shown in FIG. 1A, coding system 10 includes a source device 12 configured to provide encoded image data 13 to, for example, a destination device 14 for decoding encoded image data 21.
[0064] The source device 12 includes an encoder 20 and may further, i.e. optionally, include an image source 16 , a pre-processor (or pre-processing unit) 18 , such as an image pre-processor 18 , and a communication interface or unit 22 .
[0065] Image source 16 may include or be any kind of image capture device, such as a camera for capturing real-world images, and / or any kind of image generation device, such as a computer graphics processor for generating computer animated images, or any kind of other device for obtaining and / or providing real-world images, computer-generated images (e.g., screen content, virtual reality (VR) images), and / or any combination thereof (e.g., augmented reality (AR) images). Image source may also be any kind of memory or storage device that stores any of the aforementioned images.
[0066] To distinguish between the pre-processor 18 and the processing performed by the pre-processing unit 18 , the image or image data 17 may also be referred to as raw image or raw image data 17 .
[0067] The pre-processor 18 is configured to receive the (raw) image data 17 and perform pre-processing on the image data 17 to obtain a pre-processed image 19 or pre-processed image data 19. The pre-processing performed by the pre-processor 18 may include, for example, cropping, color format conversion (e.g., from RGB to YCbCr), color correction, or noise removal. It may be understood that the pre-processing unit 18 may be an optional component.
[0068] Video encoder 20 is configured to receive pre-processed image data 19 and provide encoded image data 21 (further details are described below, eg, with reference to FIG. 2).
[0069] The communications interface 22 of the source device 12 may be configured to receive the encoded image data 21 and transmit the encoded image data 21 (or any further processed version thereof) via the communications channel 13 to another device, such as the destination device 14 or any other device, for storage or direct reconstruction.
[0070] The destination device 14 includes a decoder 30 (e.g., a video decoder 30) and may additionally, i.e. optionally, include a communications interface or unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.
[0071] The communications interface 28 of the destination device 14 is configured to receive the encoded image data 21 (or any further processed version thereof), for example directly from the source device 12 or from any other source, for example a storage device, for example an encoded image data storage device, and to provide the encoded image data 21 to a decoder 30.
[0072] The communication interface 22 and the communication interface 28 may be configured to transmit and receive the encoded image data 21 or the encoded data 13 via a direct communication link between the source device 12 and the destination device 14, for example, a direct wired or wireless connection, or via any type of network, for example a wired or wireless network or any combination thereof, or any type of private and public network, or any type of combination thereof.
[0073] The communications interface 22 may be configured, for example, to package the encoded image data 21 in an appropriate format, e.g., packets, and / or process the encoded image data using any type of transmission encoding or processing for transmission over a communications link or network.
[0074] The communications interface 22, which forms the counterpart to the communications interface 28, may be configured, for example, to receive the transmitted data and process the transmitted data using any type of corresponding transmission decoding or processing and / or depackaging to obtain the encoded image data 21.
[0075] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, as indicated by the arrows of communication channel 13 in FIG. 1A pointing from source device 12 to destination device 14, or as bidirectional communication interfaces, and may be configured, for example, to send and receive messages, for example, to set up connections, and to confirm and exchange any other information related to the communication link and / or data transmission, for example, the transmission of encoded image data.
[0076] The decoder 30 is arranged to receive the encoded image data 21 and to provide decoded image data 31 or a decoded image 31 (further details are explained below, for example on the basis of FIG. 3 or FIG. 5).
[0077] The post-processor 32 of the destination device 14 is configured to post-process the decoded image data 31 (also referred to as reconstructed image data), e.g., the decoded image 31, to obtain post-processed image data 33, e.g., the post-processed image 33. The post-processing performed by the post-processing unit 32 may include, e.g., color format conversion (e.g., from YCbCr to RGB), color correction, cropping or resampling, or any other processing, e.g., to prepare the decoded image data 31 for display, e.g., by a display device 34.
[0078] A display device 34 of destination device 14 is configured to receive the post-processed image data 33 in order to display the image, for example, to a user or viewer. The display device 34 may be or include any type of display, for presenting the reconstructed image, for example, an integrated or external display or monitor. The display may include, for example, 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 type of other display.
[0079] 1A illustrates source device 12 and destination device 14 as separate devices, an embodiment of the devices may include both source device 12 or corresponding functionality and destination device 14 or corresponding functionality, or both. In such an embodiment, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software or by separate hardware and / or software or any combination thereof.
[0080] As will be clear to one of ordinary skill in the art based on the description, the presence and (exact) division of different units or functions within the source device 12 and / or destination device 14 shown in FIG. 1A may vary depending on the actual device and application.
[0081] The encoder 20 (e.g., video encoder 20) or the decoder 30 (e.g., video decoder 30), or both the encoder 20 and the decoder 30, may be implemented via processing circuitry, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, hardware, dedicated to video coding, or any combination thereof, as shown in FIG. 1B. The encoder 20 may be implemented via processing circuitry 46 to embody various modules as described with respect to the encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. The decoder 30 may be implemented via processing circuitry 46 to embody various modules as described with respect to the decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. The processing circuitry may be configured to perform various operations as described below. As shown in FIG. 5, if the techniques are implemented partially in software, the device may store instructions of the software in a suitable non-transitory computer-readable storage medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Either video encoder 20 and video decoder 30 may be integrated as part of a combined encoder / decoder (CODEC) in a single device, for example, as shown in FIG. 1B.
[0082] The source device 12 and the destination device 14 may include any of a wide range of devices, including, for example, a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video gaming console, a video streaming device (such as a content service server or a content distribution server), a broadcast receiver device, a broadcast transmitter device, or any type of handheld or fixed device, and may use no operating system at all or any type of operating system. In some cases, the source device 12 and the destination device 14 may be equipped for wireless communication. Thus, the source device 12 and the destination device 14 may be wireless communication devices.
[0083] In some cases, the video coding system 10 shown in FIG. 1A is merely an example, and the techniques of this disclosure can be applied to video coding settings (e.g., video encoding or video decoding) that do not necessarily include data communication between an encoding device and a decoding device. In other examples, data may be retrieved from local memory, streamed over a network, etc. A video encoding device may encode data and store it in memory, and / or a video decoding device may retrieve data from memory and decode it. In some examples, encoding and decoding are performed by devices that simply encode data to memory and / or retrieve data from memory and decode it without communicating with each other.
[0084] For ease of explanation, embodiments of the present invention are described herein by reference to reference software for, for example, High Efficiency Video Coding (HEVC) or Versatile Video Coding (VVC), a next-generation video coding standard developed by the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG) Joint Collaboration Team on Video Coding (JCT-VC). Those skilled in the art will appreciate that embodiments of the present invention are not limited to HEVC or VVC.
[0085] Encoders and encoding methods FIG. 2 shows a schematic block diagram of an exemplary video encoder 20 configured to implement the techniques of this disclosure. In the example of FIG. 2, the video encoder 20 includes an input 201 (or an input interface 201), a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, and an inverse transform processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoded picture buffer (DPB) 230, a mode selection unit 260, an entropy encoding unit 270, and an output 272 (or an output interface 272). The mode selection unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a splitting unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 shown in FIG. 2 may also be referred to as a hybrid video encoder or a video encoder with a hybrid video codec.
[0086] The residual calculation unit 204, the transform processing unit 206, the quantization unit 208, and the mode selection unit 260 may be referred to as forming a forward signal path of the encoder 20, and 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, the inter prediction unit 244, and the intra prediction unit 254 may be referred to as forming a backward signal path of the video encoder 20, which corresponds to the signal path of a decoder (see video decoder 30 in FIG. 3). The inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may also be referred to as forming a “built-in decoder” of the video encoder 20.
[0087] Image and Image Segmentation (Image and Block) The encoder 20 may be configured to receive, for example via an input 201, an image 17 (or image data 17), for example an image of a sequence of images forming a video or a video sequence. The received image or image data may also be a preprocessed image 19 (or preprocessed image data 19). For simplicity, the following description refers to the image 17. The image 17 may also be called the current image or the image to be coded (especially in video coding to distinguish the current image from other images, for example previously encoded and / or decoded images of the same video sequence, i.e. a video sequence which also includes the current image).
[0088] A (digital) image is or can be considered as a two-dimensional array or matrix of samples with intensity values. The samples in the array may also be called pixels (short for picture element) or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or image defines the size and / or resolution of the image. For the representation of color, typically three color components are used, i.e. an image can represent or contain three sample arrays. In an RBG format or color space, an image contains an array of corresponding red, green, and blue samples. However, in video coding, each pixel is usually represented in a luminance and chrominance format or color space, for example YCbCr, which contains a luminance component denoted by Y (although in some cases L is used instead) and two chrominance components denoted by Cb and Cr. The luminance (or luma for short) component Y represents the brightness or gray level intensity (for example in the case of a grayscale image), and the two chrominance (or chroma for short) components Cb and Cr represent the chromaticity or color information components. Thus, an image in YCbCr format includes a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr). An image in RGB format may be converted or transformed into YCbCr format or vice versa, a process also known as color conversion or color transformation. If the image is monochrome, the image may only include a luminance sample array. Thus, an image may be, for example, an array of luma samples in monochrome format, or an array of luma samples and two corresponding arrays of chroma samples in 4:2:0, 4:2:2, and 4:4:4 color formats.
[0089] An embodiment of the video encoder 20 may include an image splitting unit (not shown in FIG. 2) configured to split the image 17 into multiple (usually non-overlapping) image blocks 203. These blocks may also be called root blocks, macroblocks (H.264 / AVC) or coding tree blocks (CTBs) or coding tree units (CTUs) (H.265 / HEVC and VVC). The image splitting unit may be configured to use the same block size for all images of the video sequence and the corresponding grid that defines the block size, or to vary the block size between images or subsets or groups of images, splitting each image into the corresponding blocks.
[0090] In a further embodiment, the video encoder may be configured to directly receive blocks 203 of image 17, such as one, some or all of the blocks forming image 17. Image block 203 may also be referred to as a current image block or an image block to be coded.
[0091] Similar to the image 17, the image block 203 is also or can be considered as a two-dimensional array or matrix of samples with intensity values (sample values), although with smaller dimensions than the image 17. In other words, the block 203 may contain one sample array (e.g., a luma array for a monochrome image 17, or a luma or chroma array for a color image) or three sample arrays (e.g., a luma and two chroma arrays for a color image 17) or any other number and / or type of arrays, depending for example on the color format applied. The number of samples in the horizontal and vertical directions (or axes) of the block 203 defines the size of the block 203. Thus, the block may be, for example, an MxN (M columns by N rows) array of samples, or an MxN array of transform coefficients.
[0092] An embodiment of a video encoder 20 such as that shown in FIG. 2 may be configured to encode an image 17 block-by-block, eg, encoding and prediction is performed for each block 203 .
[0093] Residual calculation The residual calculation unit 204 may be configured to calculate a residual block 205 (also referred to as residual 205) based on the image block 203 and the prediction block 265 (further details regarding the prediction block 265 are described below), for example, by subtracting sample values of the prediction block 265 from sample values of the image block 203 on a sample-by-sample (pixel-by-pixel) basis, to obtain the residual block 205 in the sample domain.
[0094] conversion The transform processing unit 206 may be configured to apply, for example, a discrete cosine transform (DCT) or a discrete sine transform (DST) on the sample values of the residual block 205 to obtain transform coefficients 207 in the transform domain. The transform coefficients 207 may be referred to as transform residual coefficients and represent the residual block 205 in the transform domain.
[0095] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as a transform specified for H.265 / HEVC. Compared to an orthogonal DCT transform, such an integer approximation is typically scaled by a particular factor. In order to preserve the norm of the residual block processed by the forward and inverse transforms, an additional scaling factor is applied as part of the transform process. The scaling factor is typically selected based on a particular constraint, such as a scaling factor of a shift operation being a power of two, the bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, etc. A particular scaling factor may be specified, for example, for the inverse transform by the inverse transform processing unit 212 (and a corresponding inverse transform, e.g., by the inverse transform processing unit 312 in the video decoder 30), and a corresponding scaling factor for the forward transform, e.g., by the transform processing unit 206 in the encoder 20, may be specified accordingly.
[0096] An embodiment of the video encoder 20 (respectively, the transform processing unit 206) may be configured to output transform parameters, e.g., the transform or the type of transform, either directly or encoded or compressed via the entropy encoding unit 270, such that, for example, the video decoder 30 can receive and use the transform parameters for decoding.
[0097] quantization The quantization unit 208 is configured to quantize the transform coefficients 207, for example by applying scalar quantization or vector quantization, to obtain quantized coefficients 209. The quantized coefficients 209 may also be referred to as quantized transform coefficients 209 or quantized residual coefficients 209.
[0098] 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 rounded to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be changed by adjusting a quantization parameter (QP). For example, in the case of scalar quantization, different scaling may be applied to achieve finer or coarser quantization. A small quantization step size corresponds to fine quantization and a large quantization step size corresponds to coarse quantization. The applicable quantization step sizes may be indicated by the quantization parameter (QP). The quantization parameter may, for example, be an index into a predefined set of applicable quantization step sizes. For example, a small quantization parameter corresponds to fine quantization (small quantization step size) and a large quantization parameter corresponds to coarse quantization (large quantization step size), or vice versa. Quantization may include division by the quantization step size, and corresponding inverse quantization and / or inverse-inverse quantization, for example by the inverse quantization unit 210, may include multiplication by the quantization step size. Some standards, for example, HEVC, embodiments may be configured to use a quantization parameter to determine the quantization step size. In general, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of an equation involving division. To recover the norm of the residual block, an additional scaling factor may be introduced in the quantization and inverse quantization, which may change due to the scaling used in the fixed-point approximation of the quantization step size and quantization parameter equations. In one exemplary implementation, the scaling of the inverse transform and the inverse quantization may be combined. Alternatively, customized quantization tables may be used and signaled from the encoder to the decoder, for example in the bitstream. Quantization is a lossy operation, and the loss increases with increasing quantization step size.
[0099] An embodiment of video encoder 20 (respectively quantization unit 208) may be configured to output a quantization parameter (QP), e.g., encoded directly or via entropy encoding unit 270, so that video decoder 30, for example, can receive and apply the quantization parameter for decoding.
[0100] inverse quantization Inverse quantization unit 210 is configured to apply the inverse quantization of quantization unit 208 to the quantized coefficients by applying the inverse of the quantization scheme applied by quantization unit 208, e.g., based on or using the same quantization step size as quantization unit 208, to obtain inverse quantized coefficients 211. The inverse quantized coefficients 211, which may also be referred to as dequantized residual coefficients 211, correspond to the transform coefficients 207, although they are typically not identical to the transform coefficients due to losses due to quantization.
[0101] Inverse transformation The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST) or other inverse transform, to obtain a reconstructed residual block 213 (or corresponding inverse quantized coefficients 213) in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 213.
[0102] Rebuild The reconstruction unit 214 (e.g., adder 214) is configured to add the transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 to obtain the reconstructed block 215 in the sample domain, for example, by adding sample values of the reconstructed residual block 213 and sample values of the prediction block 265 sample by sample.
[0103] filtering The loop filter unit 220 (or "loop filter" 220 for short) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or in general, to filter the reconstructed samples to obtain filtered samples. The loop filter unit is configured to, for example, smooth pixel transitions or otherwise improve video quality. The loop filter unit 220 may include one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening, smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 220 is illustrated in FIG. 2 as an in-loop filter, in other forms the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstructed block 221.
[0104] An embodiment of video encoder 20 (respectively loop filter unit 220) may be configured to output loop filter parameters (e.g., sample adaptive offset information), which may be encoded, e.g., directly or via entropy encoding unit 270, so that, for example, decoder 30 can receive and apply the same loop filter parameters or respective loop filters for decoding.
[0105] Decoded Image Buffer The decoded picture buffer (DPB) 230 may be a memory that stores reference pictures, typically reference image data, for encoding video data in the video encoder 20. The DPB 230 may be formed by any of a variety of memory devices, such as dynamic random access memories (DRAMs), including synchronous dynamic random access memories (SDRAMs), magnetoresistive RAMs (MRAMs), resistive random access memories (RRAMs), or other types of memory devices. The decoded picture buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The decoded picture buffer 230 may further be configured to store other previously filtered blocks, e.g. previously reconstructed and filtered blocks 221 of the same current picture or different pictures, e.g. previously reconstructed pictures, and may provide a fully previously reconstructed, i.e. decoded picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples), e.g. for inter prediction. The decoded image buffer (DPB) 230 may also be configured to store one or more unfiltered reconstructed blocks 215, or unfiltered reconstructed samples in general, e.g., in the case where the reconstructed blocks 215 have not been filtered by the loop filter unit 220, or any other further processed version of a reconstructed block or sample.
[0106] Mode Selection (Segmentation and Prediction) The mode selection unit 260 includes a division unit 262, an inter prediction unit 244, and an intra prediction unit 254, and is configured to receive or obtain original image data, e.g., original block 203 (current block 203 of current image 17), and reconstructed image data, e.g., reconstructed, filtered and / or unfiltered samples or blocks of the same (current) image and / or from one or more previously decoded images, e.g., from a decoded image buffer 230 or other buffer (e.g., a line buffer, not shown). The reconstructed image data is used as reference image data for prediction, e.g., inter prediction or intra prediction, to obtain a prediction block 265 or predictor 265.
[0107] The mode selection unit 260 may be configured to determine or select a partition for the current block prediction mode (including no partition) and a prediction mode (e.g., intra or inter prediction mode) and generate a corresponding prediction block 265 used in the calculation of the residual block 205 and the reconstruction of the reconstruction block 215.
[0108] An embodiment of the mode selection unit 260 may be configured to select a partitioning and prediction mode (e.g., from those supported by or available to the mode selection unit 260) that provides the best match or in other words the smallest residual (smallest residual means better compression for transmission or storage), or that provides the smallest signaling overhead (smallest signaling overhead means better compression for transmission or storage), or that considers or balances both. The mode selection unit 260 may be configured to determine the partitioning and prediction mode based on rate-distortion optimization (RDO), i.e., to select the prediction mode that provides the smallest rate-distortion. Terms such as "best," "minimum," "optimum," etc. in this context do not necessarily refer to an overall "best," "minimum," "optimum," etc., but may refer to the achievement of a termination or selection criterion, such as a value above or below a threshold or other constraint that potentially results in a "suboptimal selection" but reduces complexity and processing time.
[0109] In other words, the partitioning unit 262 may be configured to partition the block 203 into smaller block partitions or sub-blocks (which again form blocks), for example using quad-tree partitioning (QT), binary-tree partitioning (BT) or ternary-tree partitioning (TT) or any combination thereof, and to perform prediction for each of the block partitions or sub-blocks, for example, where the mode selection includes selecting a tree structure of the partitioned block 203, and a prediction mode is applied to each of the block partitions or sub-blocks.
[0110] The partitioning (eg, by partitioning unit 260) and prediction processes (by inter prediction unit 244 and intra prediction unit 254) performed by exemplary video encoder 20 are described in more detail below.
[0111] Split The partitioning unit 262 can partition (or split) the current block 203 into smaller partitions, e.g., smaller blocks of square or rectangular size. These smaller blocks (which may also be called sub-blocks) can be further partitioned into smaller partitions. This is also called tree partitioning or hierarchical tree partitioning, e.g., a root block at root tree level 0 (hierarchical level 0, depth 0) can be recursively partitioned, e.g., into two or more blocks at the next lower tree level, e.g., nodes at tree level 1 (hierarchical level 1, depth 1), and these blocks can be partitioned again into two or more blocks at the next lower level, e.g., tree level 2 (hierarchical level 2, depth 2), until the partitioning is terminated, e.g., a termination criterion is met, e.g., to reach a maximum tree depth or a minimum block size. Blocks that are not further partitioned are also called leaf blocks or leaf nodes of the tree. A tree used for partitioning into two partitions is called a binary tree (BT), a tree used for partitioning into three partitions is called a ternary tree (TT), and a tree used for partitioning into four partitions is called a quad tree (QT).
[0112] As mentioned above, the term "block" as used herein may be a portion of an image, particularly a square or rectangular portion. For example, referring to HEVC and VVC, a block may be or correspond to a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), and a transform unit (TU), and / or may be a corresponding block, such as a coding tree block (CTB), a coding block (CB), a transform block (TB), or a prediction block (PB).
[0113] For example, a coding tree unit (CTU) may be or include a CTB of luma samples, two corresponding CTBs of chroma samples of an image with three sample arrangements, or a CTB of samples of a monochrome image, or an image coded using three separate color planes and syntax structures used to code the samples. Correspondingly, a coding tree block (CTB) may be an NxN block of samples for some values of N, such that the division of the components into CTBs is a division. A coding unit (CU) may be or include a coding block of luma samples, two corresponding coding blocks of chroma samples of an image with three sample arrangements, or a coding block of samples of a monochrome image, or an image coded using three separate color planes and syntax structures used to code the samples. Correspondingly, a coding block (CB) may be an MxN block of samples for some values of M and N, such that the division of the CTB into coding blocks is a division.
[0114] In an embodiment, for example, according to HEVC, a coding tree unit (CTU) may be divided into CUs by using a quadtree structure, denoted as a coding tree. The decision of whether to code an image region with inter-image (temporal) prediction or intra-image (spatial) prediction is made at the CU level. Each CU may be further divided into one, two, or four PUs according to a PU partition type. Within one PU, the same prediction process is applied, and related information is also sent to the decoder on a PU basis. After obtaining a residual block by applying a prediction process based on a PU partition type, the CU may be divided into transform units (TUs) according to another quadtree structure similar to the coding tree of the CU.
[0115] In an embodiment, quad-tree and binary-tree (QTBT) partitioning is used to partition the coding block, for example according to the latest video coding standard currently under development, called Versatile Video Coding (VVC). In the QTBT block structure, the CU can have either a square or rectangular shape. For example, the coding tree unit (CTU) is first partitioned by a quad-tree structure. The quad-tree leaf node is further partitioned by a binary or ternary tree (or ternary tree) structure. The partition tree leaf node is called the coding unit (CU), and its segmentation is used for prediction and transformation processing without further partitioning. This means that the CU, PU, and TU have the same block size in the QTBT coding block structure. In parallel, multi-partitioning, for example triple-tree partitioning, has also been proposed to be used with the QTBT block structure.
[0116] In one example, mode selection unit 260 of video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.
[0117] As noted above, video encoder 20 may be configured to determine or select a best or optimal prediction mode from a (predetermined) set of prediction modes. The set of prediction modes may include, for example, intra-prediction modes and / or inter-prediction modes.
[0118] Intra prediction The set of intra prediction modes may include 35 different intra prediction modes, e.g., non-directional modes such as DC (or average) mode or planar mode, or directional modes, e.g., as defined in HEVC, or may include 67 different intra prediction modes, e.g., non-directional modes such as DC (or average) mode or planar mode, or directional modes, e.g., as defined in VVC.
[0119] The intra prediction unit 254 is configured to use reconstructed samples of neighboring blocks of the same current image to generate an intra prediction block 265 according to an intra prediction mode of the set of intra prediction modes.
[0120] The intra prediction unit 254 (or generally the mode selection unit 260) is further configured to output the intra prediction parameters (or general information indicating the intra prediction mode selected for the block) to the entropy encoding unit 270 in the form of a syntax element 266 for inclusion in the encoded image data 21, e.g., so that the video decoder 30 can receive the prediction parameters and use them for decoding.
[0121] Inter Prediction The set of (possible) inter prediction modes depends on the available reference images (i.e., images that have previously been at least partially decoded, e.g., stored in DBP230) and other inter prediction parameters, such as whether the entire reference image or only a portion of it is used to search for the best matching reference block, e.g., a search window region around the area of the current block in the reference image, and / or whether, e.g., pixel interpolation, e.g., half / semi-pel and / or quarter-pel interpolation, is applied.
[0122] In addition to the above prediction modes, skip mode and / or direct mode may be applied.
[0123] The inter prediction unit 244 may include a motion estimation (ME) unit and a motion compensation (MC) unit (both not shown in FIG. 2). The motion estimation unit is configured to receive or obtain the image block 203 (the current image block 203 of the current image 17) and the decoded image 231, or at least one or more already reconstructed blocks, e.g., reconstructed blocks of one or more other / different already decoded images 231, for motion estimation. For example, a video sequence may include the current image and the previously decoded image 231, in other words, the current image and the previously decoded image 231 may be part of or form a sequence of images forming a video sequence.
[0124] The encoder 20 may be configured to, for example, select a reference block from multiple reference blocks of the same or different images of multiple other images, and provide the reference image (or reference image index) and / or an offset (spatial offset) between the position (x, y coordinates) of the reference block and the position of the current block to the motion estimation unit as an inter-prediction parameter. This offset is also called a motion vector (MV).
[0125] The motion compensation unit is configured to obtain, e.g., receive, inter prediction parameters and perform inter prediction based on or using the inter prediction parameters to obtain inter prediction block 265. The motion compensation performed by the motion compensation unit may include fetching or generating a prediction block based on the motion / block vectors determined by motion estimation, and possibly performing interpolation to sub-pixel accuracy. Interpolation filtering may generate additional pixel samples from known pixel samples, thereby potentially increasing the number of candidate prediction blocks that may be used to code the image block. Upon receiving a motion vector for the PU of the current image block, the motion compensation unit may identify the prediction block to which the motion vector points in one of the reference image lists.
[0126] The motion compensation unit also generates syntax elements associated with the blocks and the video slice for use by video decoder 30 in decoding the image blocks of the video slice.
[0127] Entropy Coding The entropy encoding unit 270 is configured to apply, for example, an entropy encoding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context-adaptive VLC scheme (CAVLC), an arithmetic coding scheme, binarization, context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy encoding method or technique) or bypass (no compression) to the quantization coefficients 209, the inter-prediction parameters, the intra-prediction parameters, the loop filter parameters, and / or other syntax elements to obtain encoded image data 21 that can be output via an output 272 in the form of an encoded bitstream 21, for example, such that the video decoder 30 can receive the parameters and use them for decoding. The encoded bitstream 21 may be transmitted to the video decoder 30 or may be stored in a memory for later transmission or retrieval by the video decoder 30.
[0128] Other structural variations of the video encoder 20 may be used to encode the video stream. For example, a non-transform-based encoder 20 may directly quantize the residual signal for a particular block or frame without involving the transform processing unit 206. In another implementation, the encoder 20 may have the quantization unit 208 and the inverse quantization unit 210 combined into a single unit.
[0129] Decoder and decoding method 3 illustrates an example of a video decoder 30 configured to implement the techniques of this disclosure. The video decoder 30 is configured to receive encoded image data 21 (e.g., encoded bitstream 21), e.g., encoded by encoder 20, to obtain a decoded image 331. The encoded image data or bitstream includes information for decoding the encoded image data, e.g., data representing image blocks of encoded video slices and associated syntax elements.
[0130] In the example of Figure 3, the 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., summer 314), a loop filter 320, a decoded picture buffer (DBP) 330, an inter prediction unit 344, and an intra prediction unit 354. The inter prediction unit 344 may be or may include a motion compensation unit. The video decoder 30 may, in some examples, perform a decoding path that is generally the reverse of the encoding path described with respect to the video encoder 100 of Figure 2.
[0131] As described for the encoder 20, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 344, and the intra prediction unit 354 are also referred to as forming a "built-in decoder" of the video encoder 20. Thus, the function of the inverse quantization unit 310 may be the same as the inverse quantization unit 110, the function of the inverse transform processing unit 312 may be the same as the inverse transform processing unit 212, the function of the reconstruction unit 314 may be the same as the reconstruction unit 214, the function of the loop filter 320 may be the same as the loop filter 220, and the function of the decoded picture buffer 330 may be the same as the decoded picture buffer 230. Thus, the description provided for the respective units and functions of the video encoder 20 applies correspondingly to the respective units and functions of the video decoder 30.
[0132] Entropy Decoding The entropy decoding unit 304 is configured to analyze the bitstream 21 (or, in general, the encoded image data 21) and, e.g., perform entropy decoding on the encoded image data 21 to obtain, e.g., quantization coefficients 309 and / or decoded coding parameters (not shown in FIG. 3), e.g., any or all of inter prediction parameters (e.g., reference image index and motion vectors), intra prediction parameters (e.g., intra prediction mode or index), transform parameters, quantization parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 may be configured to apply a decoding algorithm or scheme corresponding to an encoding scheme as described with respect to the entropy encoding unit 270 of the encoder 20. The entropy decoding unit 304 may further be configured to provide the inter prediction parameters, intra prediction parameters, and / or other syntax elements to the mode selection unit 360 and other parameters to other units of the decoder 30. Video decoder 30 may receive the syntax elements at the video slice level and / or the video block level.
[0133] inverse quantization Inverse quantization unit 310 may be configured to receive a quantization parameter (QP) (or general information related to inverse quantization) and quantized coefficients from encoded image data 21 (e.g., by parsing and / or decoding, e.g., by entropy decoding unit 304) and apply inverse quantization to the decoded quantized coefficients 309 based on the quantization parameter to obtain inverse quantized coefficients 311, also referred to as transform coefficients 311. The inverse quantization process may include use of a quantization parameter determined by video encoder 20 for each video block in a video slice to determine the degree of quantization as well as the degree of inverse quantization to apply.
[0134] Inverse transformation The inverse transform processing unit 312 may be configured to receive the inverse quantized coefficients 311, also referred to as transform coefficients 311, and apply a transform to the inverse quantized coefficients 311 to obtain a reconstructed residual block 213 in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 313. The transform may be an inverse transform, e.g., an inverse DCT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may further be configured to receive transform parameters or corresponding information from the encoded image data 21 (e.g., by parsing and / or decoding, e.g., by the entropy decoding unit 304) to determine a transform to be applied to the inverse quantized coefficients 311.
[0135] Rebuild The reconstruction unit 314 (e.g., adder 314) may be configured to add the reconstructed residual block 313 to the prediction block 365 to obtain a reconstructed block 315 in the sample domain, for example, by adding sample values of the reconstructed residual block 313 and sample values of the prediction block 365.
[0136] filtering The loop filter unit 320 (either during the coding loop or after the coding loop) is configured to filter the reconstruction block 315 to obtain a filtered block 321, e.g., to smooth pixel transitions or improve video quality. The loop filter unit 320 may include one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening, smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 320 is illustrated in FIG. 3 as an in-loop filter, in other forms the loop filter unit 320 may be implemented as a post-loop filter.
[0137] Decoded Image Buffer The decoded video block 321 of the image is then stored in a decoded image buffer 330, where the decoded image 331 is stored as a reference image for subsequent motion compensation for other images and / or display output, respectively.
[0138] The decoder 30 is arranged to output the decoded image 311, for example via an output 312, for presentation or viewing to a user.
[0139] prediction The inter prediction unit 344 may be identical to the inter prediction unit 244 (in particular the motion compensation unit), and the intra prediction unit 354 may be functionally identical to the inter prediction unit 254, making the partitioning or partitioning decision and prediction based on partitioning parameters and / or prediction parameters or respective information received from the encoded image data 21 (e.g., by parsing and / or decoding, e.g., by the entropy decoding unit 304). The mode selection unit 360 may be configured to perform prediction (intra or inter prediction) for each block based on the reconstructed image, block, or respective samples (filtered or unfiltered) to obtain a prediction block 365.
[0140] When a video slice is coded as an intra-coded (I) slice, the intra prediction unit 354 of the mode selection unit 360 is configured to generate a prediction block 365 for an image block of the current video slice based on the signaled intra prediction mode and data from a previously decoded block of the current image. When a video image is coded as an inter-coded (i.e., B or P) slice, the inter prediction unit 344 (e.g., a motion compensation unit) of the mode selection unit 360 is configured to generate a prediction block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from the entropy decoding unit 304. For inter prediction, the prediction block may be produced from one of the reference images in one of the reference image lists. The video decoder 30 may construct the reference frame lists, i.e., list 0 and list 1, using a default construction technique based on the reference images stored in the DPB 330.
[0141] Mode selection unit 360 is configured to determine prediction information for video blocks of the current video slice by parsing the motion vectors and other syntax elements, and to use the prediction information to produce predictive blocks for the current video block to be decoded. For example, mode selection unit 360 uses some of the received syntax elements to identify a prediction mode (e.g., intra prediction or inter prediction) used to code the video blocks of the video slice, an inter prediction slice type (e.g., a B slice, a P slice, or a GPB slice), construction information for one or more of the reference picture lists for the slice, a motion vector for each inter encoded video block of the slice, an inter prediction state for each inter coded video block of the slice, and other information for decoding video blocks in the current video slice.
[0142] Other variations of the video decoder 30 may be used to decode the encoded image data 21. For example, the decoder 30 may generate an output video stream without the loop filter unit 320. For example, a non-transform-based decoder 30 may directly inverse quantize the residual signal for a particular block or frame without involving the inverse transform processing unit 312. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.
[0143] It should be understood that in the encoder 20 and the decoder 30, the processing result of the current step may be further processed and then output to the next step. For example, after the interpolation filtering, the motion vector derivation or the loop filtering, further operations such as clipping or shifting may be performed on the processing result of the interpolation filtering, the motion vector derivation or the loop filtering.
[0144] It should be noted that further operations can be applied to the derived motion vector of the current block (including but not limited to control point motion vector in affine mode, sub-block motion vector in affine mode, planar mode, ATMVP mode, temporal motion vector, etc.). For example, the value of the motion vector is constrained to a certain range according to its representation bit. If the representation bit of the motion vector is bitDepth, the range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means exponentiation. For example, if bitDepth is set equal to 16, the range is -32768 to 32767, and if bitDepth is set equal to 18, the range is -131072 to 131071. Here, we provide two methods for constraining the motion vector.
[0145] Method 1: Eliminate the overflow MSB (Most Significant Bit) by using flow arithmetic ux=(mvx+2 bitDepth )%2bitDepth (1) mvx=(ux>=2 bitDepth-1 )?(ux-2 bitDepth ):ux (2) uy=(mvy+2 bitDepth )%2 bitDepth (3) mvy=(uy>=2 bitDepth-1 )?(uy-2 bitDepth ):uy (4)
[0146] For example, if the value of mvx is -32769, then after applying equations (1) and (2), the resulting value is 32767. In computer systems, decimal numbers are stored as two's complement. Since the two's complement of -32769 is 1, 0111, 1111, 1111, 1111 (17 bits), the MSBs are discarded and the resulting two's complement numbers are 0111, 1111, 1111, 1111 (32767 in decimal), which is the same as the output of applying equations (1) and (2).
[0147] ux=(mvpx+mvdx+2 bitDepth )%2 bitDepth (5) mvx=(ux>=2 bitDepth-1 )?(ux-2 bitDepth ):ux (6) uy=(mvpy+mvdy+2 bitDepth )%2 bitDepth (7) mvy=(uy>=2 bitDepth-1 )?(uy-2 bitDepth ):uy (8) An operation may be applied between the sum of mvp and mvd as shown in equations (5) to (8).
[0148] Method 2: Eliminate the overflow MSB by clipping the value vx=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1,vx) vy=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1,vy) Here, the definition of the function Clip3 is as follows.
Number
[0149] The operation "?" is usually used as a shortcut for representing the "if...else" condition. For example, "X<K?X=1:X=0" can be interpreted as "If X is less than K, then X is set equal to 1, and if not (if X is not less than K), then X is set equal to 0."
[0150] FIG. 4 is a schematic diagram of a video coding device 400 according to an embodiment of the present disclosure. The video coding device 400 is suitable for implementing the disclosed embodiments described herein. In one embodiment, the video coding device 400 may be a decoder such as the video decoder 30 of FIG. 1A, or an encoder such as the video encoder 20 of FIG. 1A.
[0151] The video coding device 400 includes an inlet port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an outlet port 450 (or output port 450) for transmitting data, and a memory 460 for storing data. The video coding device 400 may also include opto - electrical (OE) components and electro - optical (EO) components coupled to the input port 410, the receiver unit 420, the transmitter unit 440, and the output port 450 for the output or input of optical or electrical signals.
[0152] The processor 430 is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), FPGA, ASIC, and DSP. The processor 430 communicates with the input port 410, the receiver unit 420, the transmitter unit 440, the output port 450, and the memory 460. The processor 430 includes a coding module 470. The coding module 470 implements the disclosed embodiments described above. For example, the coding module 470 implements, processes, prepares, or provides various coding operations. Thus, the inclusion of the coding module 470 provides substantial improvements in the functionality of the video coding device 400 and provides transformation of the video coding device 400 into different states. Alternatively, the coding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0153] Memory 460 may include one or more disks, tape drives, and solid state drives, and may be used as overflow data storage to store programs when such programs are selected for execution and to store instructions and data read during execution of programs. Memory 460 may be, for example, 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).
[0154] FIG. 5 is a simplified block diagram of an apparatus 500 that may be used as either or both of source device 12 and destination device 14 of FIG. 1, according to an example embodiment.
[0155] The processor 502 in the apparatus 500 may be a central processing unit, or the processor 502 may be any other type of device, or multiple devices, now existing or later developed, capable of manipulating or processing information. Although the disclosed embodiments may be implemented using a single processor, such as the processor 502, advantages in speed and efficiency may be achieved by using multiple processors.
[0156] In one embodiment, 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 is accessed by the processor 502 using a bus 512. The memory 504 may further include an operating system 508 and application programs 510, which include at least one program that enables the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1 through N, which further include a video coding application that performs the methods described herein.
[0157] The apparatus 500 may also include one or more output devices, such as a display 518. The display 518, in one example, may be a touch-sensitive display that combines a display with a touch-sensitive element operable to sense touch input. The display 518 may be coupled to the processor 502 via the bus 512.
[0158] Although shown here as a single bus, bus 512 of device 500 may be comprised of multiple buses. Additionally, secondary storage 514 may be directly coupled to other components of device 500 or may be accessed over a network, and may include a single integrated unit such as a memory card or multiple units, such as multiple memory cards. Thus, device 500 may be implemented in a wide variety of forms.
[0159] Typically, a video signal is represented using three channels: one luminance (luma) channel and two chrominance (chroma) channels. When a YCbCr color transform is used, the two chroma channels may be represented using the acronyms Cb and Cr, where Cb and Cr typically refer to blue and red color differences. Embodiments of the present invention relate to the case where a video signal is represented using three (or more broadly, signal) channels. For convenience, the chroma channels will be represented by the Cb and Cr channels, but embodiments of the present invention apply to other three signal channel scenarios as well.
[0160] When the video data is split into three signal channels, a coding block may have residual information related to each of the three signal channels (Luma, Cb, and Cr chroma channels). In FIG. 2, the residual data corresponds to 205 (residual block) or 207 (transform coefficients) or 209 (quantized transform coefficients). 205, 207, or 209 actually consists of three parts (when the video data is split into three channels) corresponding to the luma and three chroma channels. FIG. 2 represents the encoder's perspective.
[0161] Similarly, in a decoder, 309, 311, and 313 represent residual data (more specifically, quantized coefficients, dequantized coefficients, and reconstructed residual blocks), each of which consists of three parts (a portion of the luma channel and two chroma channels). The terms residual data, residual information, and quantized transform coefficients are used synonymously to refer to residual data.
[0162] In an example for ITU-T H.265 merging candidate list construction, a merging candidate list is constructed based on the following candidates: 1. Up to four spatial candidates derived from five spatial neighborhood blocks; 2. One temporal candidate derived from two temporally collocated blocks; 3. Additional candidates, including combined bi-predictive candidates; and 4. Zero motion vector candidates.
[0163] spatial candidate The motion information of the spatial neighboring blocks is first added to the merge candidate list (in one example, the merge candidate list may be an empty list before the first motion vector is added to the merge candidate list) as a motion information candidate. Here, the neighboring blocks that are considered to be inserted into the merge list are shown in FIG. 6b. In the case of inter-prediction block merging, a maximum of four candidates are inserted into the merge list by sequentially checking A1, B1, B0, A0, and B2 in this order.
[0164] The motion information may include information on whether one or two reference picture lists are used, as well as all the motion data including the reference index and motion vector for each reference picture list.
[0165] In one example, after checking whether the neighboring blocks are available and contain motion information, some additional redundancy checks are performed before obtaining all the motion data of the neighboring blocks as motion information candidates. These redundancy checks can be divided into two categories for two different purposes. Category 1, avoid having candidates with redundant motion data in the list; Category 2, preventing the merging of two splits that could be expressed by other means producing redundant syntax.
[0166] temporal candidate 6a shows the coordinates of the block from which the temporal motion information candidate is obtained. A collocated block is a block that has the same -x, -y coordinates as the current block, but is on a different image (one of the reference images). If the list is not full (in one example, the merge list is not full when the number of candidates in the merge list is less than a threshold, for example, the threshold may be 4, 5, 6, etc.), the temporal motion information candidate is added to the merge list.
[0167] Generated candidates If the merge list is not yet full after the insertion of the spatial and temporal motion information candidates, the generated candidates are added to fill the list. The list size is indicated in the sequence parameter set and is fixed throughout the entire coded video sequence.
[0168] Bi-prediction A special mode of inter prediction is called "bi-prediction", in which two motion vectors are used to predict a block. The motion vectors can point to the same or different reference images, which can be indicated by a reference image list ID and a reference image index. For example, a first motion vector can point to a first image in a reference image list L0, and a second motion vector can point to a first image in a reference image list L1. Two reference image lists (e.g., L0 and L1) may be maintained, and the image indicated by the first motion vector is selected from list L0, and the image indicated by the second motion vector is selected from list L1.
[0169] In one example, if the motion information indicates bi-prediction, the motion information includes two parts: · L0 part: Motion vector and reference picture index pointing to an entry in the reference picture list L0.
[0170] · L1 part: Motion vector and reference picture index pointing to an entry in the reference picture list L1.
[0171] Picture Order Count (POC): A variable associated with each picture that uniquely identifies the associated picture among all pictures in a CVS (Coded Video Sequence) and indicates, when the associated picture is output from the decoded picture buffer, the position of the associated picture in the output order relative to the output order positions of other pictures in the same CVS that are output from the decoded picture buffer.
[0172] Each of the reference image lists L0 and L1 may include one or more reference images, each identified with a POC. The association of each reference index with a POC value may be signaled in the bitstream. As an example, the L0 and L1 reference image lists may include the following reference images:
[0173] [Table 1]
[0174] In the above example, the first entry in the reference image list L1 (indicated by reference index 0) is a reference image with a POC value of 13. The second entry in the reference image list L1 (indicated by reference index 1) is a reference image with a POC value of 14.
[0175] The merge list construction process in ITU-T H.265 and VVC outputs a list of motion information candidates. The merge list construction process for VVC is described in the document JVET-L1001_v2 Versatile Video Coding (Draft 3), published at http: / / phenix.it-sudparis.eu / jvet / , section "8.3.2.2 Derivation process for luma motion vectors for merge mode". The term motion information refers to the motion data required to perform the motion compensation prediction process. Motion information typically refers to the following information: Whether the block is uni- or bi-predictive The ID of the reference image used for prediction (two IDs if the block applies bi-prediction). A motion vector (two motion vectors if the block is bi-predicted) ·Additional Information
[0176] In VVC and H.265, the list of candidates outputted from the merge list construction includes N candidate motion information. The number N is typically included in the bitstream and can be a positive integer, such as 5, 6, etc. The candidates included in the constructed merge list can include uni-predictive or bi-predictive information. This means that the candidates selected from the merge list may indicate bi-predictive operation.
[0177] Triangular prediction mode The concept of triangular prediction mode is to introduce a new triangular division for motion compensation prediction. As an example, as shown in FIG. 7, two triangular prediction units are used for a CU in either diagonal or anti-diagonal directions. Each triangular prediction unit in a CU is inter-predicted using a uni-predictive motion vector and a reference frame index derived from a uni-predictive candidate list. After the samples associated with each triangular prediction unit are predicted, for example by motion compensation or intra-picture prediction, an adaptive weighting process is performed on the diagonal edges. Then, the transform and quantization process is applied to the whole CU. Note that this mode only applies to skip and merge modes.
[0178] In triangular prediction mode, a block is divided into two triangular parts (as in FIG. 7), and each part can be predicted using one motion vector. The motion vector used to predict one triangular part (denoted by PU1) can be different from the motion vector used to predict the other triangular part (denoted by PU2). Note that in one example, to reduce the complexity of performing the triangular prediction mode, each part can be predicted using only a single motion vector (uni-prediction). In other words, PU1 and PU2 may not be predicted using bi-prediction involving two motion vectors.
[0179] Sub-block prediction mode The triangular prediction mode is a special case of sub-block prediction in which a block is divided into two blocks. In the above example, two block division directions (45 degree and 135 degree division) are shown. Other division angles and division ratios for sub-block prediction are also possible (for example, the example of FIG. 8).
[0180] In some examples, a block is split into two sub-blocks and each part (sub-block) is predicted uni-predictively.
[0181] In one example, the following steps are applied to obtain the prediction samples according to the used sub-block partitioning mode. Step 1: Split the coding block into two sub-blocks according to a geometric model. This model may result in the division of the block by a separation line (for example a straight line), as illustrated in Figures 9 to 12. Step 2: Obtain a first prediction mode of the first sub-block and a second prediction mode of the second sub-block. In one example, the first prediction mode is not the same as the second prediction mode. In one example, the prediction mode (the first prediction mode or the second prediction mode) may be an inter prediction mode, and the information of the inter prediction mode may include a reference image index and a motion vector. In another example, the prediction mode may be an intra prediction mode, and the information of the intra prediction mode may include an intra prediction mode index. Step 3: Generating a first predicted value and a second predicted value using the first prediction mode and the second prediction mode, respectively. Step 4: Obtain a composite value of the predicted sample by combining the first predicted value and the second predicted value according to the division disclosed in step 1.
[0182] In one example, in step 1, a coding block is divided into two sub-blocks in various ways. Figure 9 shows an example of the division of a coding block, where a separation line 1250 divides the block into two sub-blocks. To describe the line 1250, two parameters are signaled, one parameter is the angle α 1210 and the other parameter is the distance dist 1230.
[0183] In some embodiments, as shown in FIG. 9, the angle is measured between the x-axis and the separation line, and the distance is measured by the length of a vector that is perpendicular to the separation line and passes through the center of the current block.
[0184] In another example, FIG. 10 shows an alternative way of representing the separation line, with example angles and distances that differ from the example shown in FIG.
[0185] In some examples, in step 4, the segmentation disclosed in step 1 is used to combine the first and second predictions to obtain a composite prediction. In one example, a blending operation is applied in step 4 to eliminate any artifacts (sharp or meandering appearance along the separation line). The blending operation can be described as a filtering operation along the separation line.
[0186] At the encoder side, the separation line (parameters defining the line, e.g., angle and distance) is determined based on a rate-distortion based cost function. The determined line parameters are encoded into the bitstream. At the decoder side, the line parameters are decoded (obtained) according to the bitstream.
[0187] For example, for three video channels, such as a luma component and two chroma components, a first prediction and a second prediction are generated for each channel.
[0188] In step 4 above, we need to obtain three final predictions (one luma prediction and two chroma predictions) by combining the first and second predictions using a weighted average. This process is complicated because we need to solve the linear equations for each sample of the three final predictions to obtain the sample weights for the combination.
[0189] According to an embodiment of the present invention, the sample weights of the chroma prediction combination (to obtain the combined chroma prediction) are calculated according to the sample weights of the luma prediction combination. Using the concept of chroma subsampling is common in video applications, so a separate blending filter for chroma prediction needs to be calculated. Chroma subsampling is the process of using a lower spatial resolution for the two chrominance channels than for the luma channel. It exploits the characteristics of human visual perception, which is less sensitive to color changes compared to contrast changes, effectively lowering the data rate of the compressed video. The most common chroma subsampling scheme is denoted as "420" subsampling, which results in a chrominance component with half the vertical resolution and half the spatial resolution compared to the luma resolution. For video coding algorithms that typically operate at the block level, this means, for example, that a luma block of size 32 x 32 at a given luma location (x, y) relative to the top-left sample of the image is associated with two 16 x 16 chrominance blocks located at location (x / 2, y / 2).
[0190] Embodiment 1 (Decoder and Encoder Viewpoints): According to this embodiment, step 4 in the above process consists of the following sub-steps:
[0191] Step 4.1: For luma samples within a block, a sample distance (sample_dist) is calculated, which represents the distance of the luma sample to the block separation line.
[0192] Step 4.2: The calculated sample_dist is used to calculate weighting factors, which are used for combining the first and second luma predictors corresponding to the luma samples. In one example, the weighting factors are denoted as sampleWeight1 and sampleWeight2, referring to the weighting values corresponding to the first and second luma predictors.
[0193] In one example, a first weighting factor (sampleWeight1) is calculated according to the sample distance (sample_dist), and a second weighting factor (sampleWeight2) is calculated according to the formula sampleWeight2=T-sampleWeight1, where T is a predetermined constant.
[0194] Step 4.3: A weighting factor sampleWeightC1 (or sampleWeightC2) corresponding to a chroma sample at coordinates (x, y) is calculated, which has a relationship with the weighting factor sampleWeight1 (or sampleWeight2) for a luma sample at coordinates (x, y). Optionally, a second weighting factor sampleWeightC2 of a chroma sample is calculated according to the following formula: sampleWeightC2=T-sampleWeightC1, where T is a predetermined constant.
[0195] Step 4.4: A composite prediction value of a chroma sample at coordinates (x,y) is calculated according to the first chroma prediction value at coordinates (x,y), the second chroma prediction value at coordinates (x,y), the weighting factor sampleWeightC1, and the weighting factor sampleWeightC2, where (x,y) is the coordinate of the chroma sample in the chroma block of the coding block relative to the top-left coordinate of the chroma block.
[0196] In one example, the sample distance sample_dist is calculated according to the following formula: sample_dist=((x<<1)+1)*Dis[angleIdx1]+((y<<1)+1))*Dis[angleIdx2]-offset(distanceIdx)
[0197] The angleIdx1 value and the angleIdx2 value are either from the bitstream or are derived / calculated based on other information obtained from the bitstream, and angleIdx1 and angleIdx2 represent the quantized trigonometric parameters of the separating line, where the first trigonometric parameter is of cosine type and the second trigonometric parameter is of sine type.
[0198] In one example, x and y are the -x and -y coordinates of the sample relative to the top-left sample of the coding block.
[0199] offset(distanceIdx) is the offset value, which is a function of the index value (distanceIdx), which is obtained from the bitstream or derived / calculated based on other information obtained from the bitstream.
[0200] Dis[] is a lookup table. Dis[angleIdx1] describes the change in sample distance (sample_dist) for unit increments (increases of value 1) in the -x coordinate of the sample. Dis[angleIdx2] describes the change in sample distance (sample_dist) for unit increments (increases of value 1) in the -y coordinate of the sample. In one example, angleIdx1 is equal to angleIdx and angleIdx2 is equal to (displacementX+8)%32.
[0201] In one example, the predetermined constant T is equal to 8, which means that sampleWeight1 and sampleWeight2 can have values within the range of values from 0 to 8, inclusive. In another example, the predetermined constant T is equal to 16.
[0202] In another example, sample_dist and sampleWeight1 can be obtained according to the following formula: -nCbR=(W>H)?(W / H):(H / W) -sample_dist=(W>H)?(x / nCbR-y):(xy / nCbR) or -sample_dist=(W>H)?(H-1-x / nCbR-y):(W-1-xy / nCbR) -sampleWeight1=Clip3(0,8,sample_dist+4), where W is the width of the coding block and H is the height of the coding block. It should be noted that the above two examples show two methods of calculation with integer arithmetic, and embodiments of the present invention are not limited to those examples of calculating sample_dist.
[0203] The composite predicted value of the sample may be calculated according to multiplication of a first sample weight (sampleWeight1) value with a first predicted value at coordinates (x, y) and multiplication of a second sample weight (sampleWeight1) value with a second predicted value at coordinates (x, y).
[0204] According to one example, the first weighting factor sampleWeight1 is obtained according to sample_dist and a lookup table, and in one example, the lookup table is used to store the filter coefficients. In other words, the mixing operation is performed according to the lookup table. In such an example, a function of sample_dist can be used as an index value of the lookup table. The function can be a division or multiplication by a constant operation, a right shift by a constant amount operation, an absolute value taking or clipping operation, or a combination thereof.
[0205] In this example, the input of the blending operation is sample_dist (the dividing line, the vertical distance, the horizontal distance, or a combination of the vertical and horizontal distances to the line that divides the coding block into two sub-blocks), and the output of the blending operation is sampleWeight1 or sampleWeight2.
[0206] According to another example, the blending operation is implemented as a function with sample_dist as input and sampleWeight1 or sampleWeight2 as output. In one example, the blending operation can be implemented as sampleWeight1=Clip3(0,8,sample_dist+4). In another example, the blending operation can be implemented as sampleWeight1=Clip3(0,8,f(sample_dist)). The function f() can be, for example, a division / addition / multiplication by a constant operation, a right shift by a constant amount operation, an absolute value operation or a clip operation, or a combination thereof.
[0207] According to an embodiment of the present invention, a blending operation is applied to the samples according to the value of the instruction in the bitstream.
[0208] In one embodiment, the first mixing operation may be as follows. The first blending operation: "sampleWeight=Clip3(0,8,sample_dist+4)"
[0209] In one embodiment, the second mixing operation can be as follows. -”sampleWeight=sample_dist==0?4:sample_dist<0?0:8”, -”sampleWeight=Clip3(0,8,sample_dist*K+Clip3(0,8,sample_dist+4))”.
[0210] K is an integer with a value greater than 0. Note that the blending operation becomes shorter (and therefore sharper) as K increases. For example, for K=4, the second blending operation becomes: -"sampleWeight=sample_dist==0 ?4:sample_dist<0? 0:8"This is illustrated in FIG. 14.
[0211] According to one example, the value of the indicator in the bitstream indicates a value of K, where K can have a value of 0 (indicating that the selected blending operation is the first blending operation) or a different value of K (indicating a second or third... blending operation).
[0212] According to one embodiment of the present invention, the blending operation can be implemented as a lookup table, such as the table illustrated in FIG. 15. In one example, sampleWeight can be obtained as sampleWeight=geoFilter[idx], where idx is obtained as a function of sample_dist, and geoFilter is a one-dimensional linear array of filter weights. One such function can be idx=min((abs(sample_dist)+8)>>4,maxIdx), where maxIdx is the maximum value that idx can take. For example, for Table 17-2, maxIdx is 7.
[0213] According to an embodiment of the present invention, a chroma weight sampleWeightC1 corresponding to a chroma sample at a chroma position (x,y) may be calculated according to one or more sample weights sampleWeight1 corresponding to luma samples at different luma positions.
[0214] In some examples, a chroma sample at (x,y) and a luma sample at (x,y) are components of the same pixel at (x,y) when there is no chroma subsampling. With chroma subsampling, a chroma sample at (x / 2,y / 2) and a luma sample at (x,y) are part of the same pixel at (x,y).
[0215] In some examples, in the case of chroma subsampling where the chroma resolution is halved vertically and horizontally, the chroma weight value sampleWeightC1 can be calculated by combining, for example, the average or weighted average of the luma weights sampleWeight1 at different spatial locations, where a chroma sample at location (x,y) is associated with four luma samples at locations (2x,2y), (2x+1,2y), (2x,2y), and (2x,2y+1) in terms of chroma coordinates.
[0216] In another example, in the case of chroma subsampling, where the chroma resolution is halved vertically and horizontally, a luma sample at coordinates (x+1, y+1) and a chroma sample at (x / 2, y / 2) can be components of the same pixel. In the same example, a luma sample at coordinates (x+1, y) and a chroma sample at (x / 2, y / 2) can be components of the same pixel. This means that one chroma sample is used to determine four different pixels and one luma sample is used to determine one pixel.
[0217] For example, sampleWeightC1 can be obtained according to one of the following formulas: -Example 1: sampleWeightC1(x, y)=sampleWeight1(2*x,2*y); -Example 2: sampleWeightC1(x, y)=sampleWeight1(2*x-1, 2*y-1); -Example 3: sampleWeightC1(x, y)=(sampleWeight1(2*x-1, 2*y-1)+sampleWeight1(2*x,2*y)+K)>>1; -Example 4: sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+sampleWeight1(2*x,2*y-1)+sampleWeight1(2*x-1,2*y)+K)>>2; -Example 5: sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+sampleWeight1(2*x,2*y-1)+sampleWeight1(2*x-1,2*y)+2)>>2; - Example 6: sampleWeightC1(x, y)=(sampleWeight1(2*x-1, 2*y-1)+sampleWeight1(2*x,2*y)+1)>>1, where x and y are the coordinates of a chroma sample relative to the top-left coordinate of a chroma block of a coding block. sampleWeightC1(x,y) is the chroma sample weight corresponding to the chroma sample at coordinate (x,y), and sampleWeight1(x,y) is the sample weight corresponding to the luma sample at coordinate (x,y). K is an offset value. In one example, K may be 0. In another example, K may be a positive integer value.
[0218] This can also be formulated as follows, where x and y are the coordinates of a chroma sample relative to the top-left coordinate of a chroma block of a coding block, sampleWeightC1(a,b) is a first weight value of a chroma sample located at sample coordinate (a,b) in the chroma block of a current block, where a and b are coordinate values, sampleWeight1(c,d) represents a weight value corresponding to a luma sample located at sample coordinate (c,d) in the luma block of a current block, where c and d are coordinate values, and K is an integer value.
[0219] FIG. 16 specifically illustrates the relationship between chroma sample weights and luma sample weights. FIG. 16 illustrates the case of Example 1, namely, sampleWeightC1(x,y)=sampleWeight1(2*x,2*y). Note again that x and y are the coordinates of the chroma samples relative to the top-left coordinate of the chroma block of the coding block, sampleWeightC1(x,y) is the chroma sample weight corresponding to the chroma sample at coordinate (x,y), and sampleWeight1(x,y) is the sample weight corresponding to the luma sample at coordinate (x,y) in the luma block. As shown in FIG. 16, this means that the luma sample coordinates are (2x C ,2y C ), and x C = x and y C Then, to better distinguish, the coordinates of the luma samples can be written as sampleWeightC1(x,y)=sampleWeightC1(x C ,y C )sampleWeight1(2*x C ,2*y C )=sampleWeight1(x L ,y L ) so that x L and y L It may be written by
[0220] Fig. 17 is a diagram showing a method according to an embodiment of the present disclosure. Fig. 17 is a diagram showing a coding method implemented by a decoding device, including: (step 1601) obtaining a value of a parameter of a current block, the value of the parameter indicating a division mode of the current block; (step 1605) obtaining a first prediction mode of the current block; (step 1607) obtaining a second prediction mode of the current block; (step 1609) generating a first predicted value for a chroma sample in the current block according to the first prediction mode; (step 1611) generating a second predicted value for a chroma sample in the current block according to the second prediction mode; and (step 1613) obtaining a composite value of a predicted sample by combining the first predicted value and the second predicted value.
[0221] Figure 18 shows a decoder 30 according to an embodiment of the present disclosure. Figure 18 shows a decoder, which includes: an acquisition unit 3001 for acquiring a value of a parameter of a current block, where the value of the parameter indicates a division mode of the current block, a first prediction unit 3005 for acquiring a first prediction mode of the current block, a second prediction unit 3007 for acquiring a second prediction mode of the current block, a first generation unit 3009 for generating a first predicted value for a chroma sample in the current block according to the first prediction mode, a second generation unit 3011 for generating a second predicted value for a chroma sample in the current block according to the second prediction mode, and a combination unit 3013 for acquiring a composite value of a predicted sample by combining the first predicted value and the second predicted value.
[0222] It should be noted that in the above embodiment, the division mode may be a geometric model. Furthermore, in the above embodiment, the parameter may be an angle parameter or a distance parameter.
[0223] Next, application examples of the encoding method and decoding method shown in the above embodiment and a system using them will be described.
[0224] 19 is a block diagram showing a content supply system 3100 for realizing a content distribution service. The content supply system 3100 includes a capture device 3102, a terminal device 3106, and optionally a display 3126. The capture device 3102 communicates with the terminal device 3106 via 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, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any kind of combination thereof, etc.
[0225] The capture device 3102 may generate data and encode the data by the encoding method as shown in the above embodiment. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown in the figure), which 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 or Pad, a computer or laptop, a video conference system, a PDA, a vehicle-mounted device, or any combination thereof. For example, the capture device 3102 may include the source device 12 as described above. If the data includes video, the video encoder 20 included in the capture device 3102 may actually perform the video encoding process. If the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually perform the audio encoding process. In some practical scenarios, the capture device 3102 delivers the encoded video and audio data by multiplexing them together. In other practical scenarios, for example in a video conference system, the encoded audio data and the encoded video data are not multiplexed. The capture device 3102 delivers the encoded audio data and the encoded video data separately to the terminal device 3106 .
[0226] In the content supply system 3100, the terminal device 310 receives and plays the encoded data. The terminal device 3106 can be a device having a data receiving and restoring function capable of decoding the above-mentioned encoded data, such as a smartphone or Pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conference system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, a vehicle-mounted device 3124, or any combination thereof. For example, the terminal device 3106 can include the destination device 14 as described above. If the encoded data includes video, the video decoder 30 included in the terminal device is given priority for video decoding. If the encoded data includes audio, the audio decoder included in the terminal device is given priority for audio decoding.
[0227] In the case of a terminal device having a display, such as a smartphone or Pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or a vehicle-mounted device 3124, the terminal device can provide the decoded data to its display. In the case of a terminal device not equipped with a display, such as a STB 3116, a video conference system 3118, or a video surveillance system 3120, an external display 3126 is contacted thereto to receive and display the decoded data.
[0228] When each device in the system performs encoding or decoding, the image encoding device or image decoding device shown in the above-mentioned embodiment can be used.
[0229] 20 is a diagram illustrating an example of the structure of the terminal device 3106. The protocol progression unit 3202 analyzes the transmission protocol of the stream after the terminal device 3106 receives the stream from the capture device 3102. The protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), Hypertext Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real Time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof.
[0230] After the protocol proceeding unit 3202 processes the stream, a stream file is generated. The file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As mentioned above, in some practical scenarios, such as in a video conference system, the encoded audio data and the encoded video data are not multiplexed. At this time, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204.
[0231] This demultiplexing process generates a video elementary stream (ES), an audio ES, and optionally a subtitle. The video decoder 3206 has the video decoder 30 as described in the above embodiment, decodes the video ES in the decoding manner as shown in the above embodiment to generate video frames, and supplies the data to the synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio frames, and supplies the data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in FIG. 20) before being supplied to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in FIG. 20) before being supplied to the synchronization unit 3212.
[0232] The synchronization unit 3212 synchronizes the video and audio frames and provides the video audio to the video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information, which may be coded in a syntax using timestamps for the presentation of the coded audio and visual data, and for the delivery of the data stream itself.
[0233] The subtitle decoder 3210 decodes the subtitles, if any are included in the stream, synchronizes them with the video and audio frames, and provides the video / audio / subtitles to the video / audio / subtitle display 3216 .
[0234] It should be noted that the present invention is not limited to the above-mentioned system, and either the image encoding device or the image decoding device in the above-mentioned embodiments can be incorporated in other systems, for example, in a car system.
[0235] mathematical operators The mathematical operators used in this disclosure are similar to those used in the C programming language. However, the results of integer division and arithmetic shift operations are more precisely defined, and additional operations such as exponentiation and real-valued division are defined. The numbering and counting conventions generally start from 0, e.g., "first" corresponds to the 0th, "second" corresponds to the 1st, etc.
[0236] Arithmetic Operators The following operators are defined as follows:
[0237] [Table 2]
[0238] Logical Operators The following logical operators are defined as follows: x&&y Boolean logic "and" for x and y x||y Boolean logic "or" of x and y Boolean logic "negation" x?y:zIf x is TRUE or not equal to 0, then evaluate the value of y, else evaluate the value of z.
[0239] Relational Operators The following relational operators are defined as follows: > Greater than >= Greater than or equal to < Less than <= Less than or equal == Equal != Not equal
[0240] When a relational operator is applied to a syntax element or variable that has been assigned the value "na" (not applicable), the value "na" is treated as a separate value of the syntax element or variable. The value "na" is not considered equal to any other value.
[0241] Bitwise Operators The following bitwise operators are defined as follows: & is a bit "and". When operating on integer arguments, it operates on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than another argument, the shorter argument is extended by appending most significant bits equal to 0. Bitwise "or". When operating on integer arguments, operates on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than another argument, the shorter argument is extended by appending most significant bits equal to 0. ^ Bit "exclusive-or". When operating on integer arguments, operates on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than another argument, the shorter argument is extended by appending most significant bits equal to 0. Arithmetic right shift of the two's complement integer representation of x in binary by y. This function is defined only for non-negative integer values of y. The bit shifted into the most significant bit (MSB) by the right shift is equal to the value of the MSB of x before the shift operation. Arithmetic left shift of the two's complement integer representation of x in binary by y. This function is defined only for non-negative integer values of y. The bit shifted into the least significant bit (LSB) as a result of the left shift has a value equal to 0.
[0242] Assignment operators Define the following operators as follows. = Assignment operator ++ Increment, i.e., x++ is equivalent to x = x + 1. When used as an array index, the value of the variable is evaluated before the increment operation. -- Decrement, i.e., x-- is equivalent to x = x - 1. When used as an array index, the value of the variable is evaluated before the decrement operation. += Increase by the specified amount, i.e., x += 3 is equivalent to x = x + 3, x += (-3) is equivalent to x = x + (-3). -= Decrease by the specified amount, i.e., x -= 3 is equivalent to x = x - 3, and x -= (-3) is equivalent to x = x - (-3).
[0243] Range notation The following notation is used to specify a range of values. x = y..z x takes integer values greater than or equal to y and less than or equal to z, where x, y, and z are integers and z is greater than y.
[0244] Mathematical functions The following mathematical functions are defined. [Number]
[0245] Asin(x) is the trigonometric arcsine function that operates on the argument x, where The range is -1.0 to 1.0, and the output value is in the range of -π÷2 to π÷2 in radians. Atan(x) is the trigonometric arctangent function operating on the argument x, The output value is in radians and is in the range of -π÷2 to π÷2.
number
number
number
number
number
number
number
[0246] Operation priority When precedence in an expression is not explicitly indicated through the use of parentheses, the following rules apply: -An action with a higher priority is evaluated before any action with a lower priority. -Actions of equal priority are evaluated sequentially from left to right.
[0247] The table below specifies the priority of operations from highest to lowest, with a higher position in the table indicating a higher priority.
[0248] For operators that are also used in the C programming language, the precedence used herein is the same as that used in the C programming language.
[0249] Table: Operation precedence from highest (top of table) to lowest (bottom of table)
[0250] [Table 3]
[0251] Text description of logical operations In the text, logical statements are written mathematically in the following form: if(condition 0) Statement 0 else if(condition 1) Statement 1 ... else / *Informative notes about remaining conditions* / Statement n It can be written as follows: ...as follows / ...the following applies: -If condition 0, statement 0 -Otherwise,if condition1,statement1 -... -Otherwise (an informative note about the remaining conditions), statement n
[0252] Each "If...Otherwise, if...Otherwise,..." statement in the text is introduced by "...as follows" or "...the following applies" followed immediately by "If...". The last condition of an "If...Otherwise, if...Otherwise,..." is always "Otherwise,...". Interleaved "If...Otherwise, if...Otherwise,..." statements can be identified by matching the "...as follows" or "...the following applies" with the final "Otherwise,...".
[0253] In the text, logical statements are written mathematically in the following form: if(condition0a && condition0b) Statement 0 else if(condition 1a||condition 1b) Statement 1 ... else Statement n It can be written as follows: ...as follows / ...the following applies: -Statement 0 if all of the following conditions are true: -Condition 0a -condition 0b - Otherwise, statement 1 if one or more of the following conditions are true: -Condition 1a -Condition 1b -... - if not, statement n
[0254] In the text, logical statements are written mathematically in the following form: if(condition 0) Statement 0 if(condition1) Statement 1 It can be written as follows: If condition 0, then statement 0 If condition 1 then statement 1.
[0255] Although the embodiments of the present invention are described mainly based on video coding, it should be noted that the embodiments of the coding system 10, the encoder 20 and the decoder 30 (and correspondingly the system 10) as well as other embodiments described herein may also be configured for still image processing or coding, i.e., processing or coding of an individual image independent of preceding or successive images as in video coding. In general, when image processing coding is limited to a single image 17, only the inter prediction units 244 (encoder) and 344 (decoder) may not be available. All other functions (also called tools or techniques) of the video encoder 20 and the video decoder 30 may be equally used for still image processing, e.g., residual calculation 204 / 304, transform 206, quantization 208, inverse quantization 210 / 310, (inverse) transform 212 / 312, splitting 262 / 362, intra prediction 254 / 354, and / or loop filtering 220, 320, as well as entropy coding 270 and entropy decoding 304.
[0256] The embodiments of the encoder 20 and the decoder 30, and the functions described herein with reference to the encoder 20 and the decoder 30, for example, may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on a computer-readable medium or transmitted over a communication medium as one or more instructions or codes and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium, such as a data storage medium, or a communication medium including any medium that facilitates the transfer of a computer program from one place to another (e.g., according to a communication protocol). In this manner, the computer-readable medium may generally correspond to (1) a tangible computer-readable storage medium that is non-transitory, or (2) a communication medium such as a signal or carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to incorporate instructions, codes, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0257] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Additionally, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio waves, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio waves, and microwaves are included in the definition of media. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically and discs reproduce data optically using a laser. Combinations of the above should also be included within the scope of computer-readable media.
[0258] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, the term "processor" as used herein may refer to any of the foregoing structures, or any other structure suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. Furthermore, these techniques may be fully implemented in one or more circuits or logic elements.
[0259] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). In this disclosure, various components, modules, or units are described to highlight functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined into a codec hardware unit, along with appropriate software and / or firmware, or may be provided by a collection of interoperable hardware units including one or more processors as described above.
[0260] The present disclosure provides five further aspects:
[0261] A first aspect of a coding method implemented by a decoding device, comprising: Dividing a current block into at least two sub-blocks; obtaining a first prediction mode for a first sub-block in the at least two sub-blocks; obtaining a first predicted value of a chroma sample in a current block according to a first prediction mode; Obtaining a first weight value of a chroma sample according to a weight value of a luma sample in a current block; Obtaining a composite predicted value of the chroma sample in the current block according to the first predicted value of the chroma sample and the first weighted value of the chroma sample.
[0262] In a second aspect of the method according to the first aspect, the step of obtaining a first weight value of a chroma sample according to a weight value of a luma sample in a current block includes: sampleWeightC1(x,y)=sampleWeight1(2*x,2*y); or sampleWeightC1(x,y)=sampleWeight1(2*x-1,2*y-1), or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+K)>>1, or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+sampleWeight1(2*x,2*y-1)+sampleWeight1(2*x-1,2*y)+K)>>2, or sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+sampleWeight1(2*x,2*y-1)+sampleWeight1(2*x-1,2*y)+2)>>2, or It is implemented as follows: sampleWeightC1(x,y)=(sampleWeight1(2*x-1,2*y-1)+sampleWeight1(2*x,2*y)+1)>>1. Here, x and y are the coordinates of a chroma sample relative to the top-left coordinate of a chroma block of a coding block, sampleWeightC1(x,y) is the first weight value of a chroma sample located at coordinates (x,y) (which means the sample coordinate in the chroma block of the current block), sampleWeight1(x,y) represents the weight value corresponding to a luma sample located at coordinates (x,y) (which means the sample coordinate in the luma block of the current block), and K is an integer value.
[0263] A third aspect of a decoder (30) comprising processing circuitry for carrying out the method according to any one of the first or second aspects.
[0264] A fourth aspect of a computer program product, comprising program code for carrying out a method according to any one of the first or second aspects.
[0265] A fifth aspect of a decoder includes one or more processors and a non-transitory computer-readable storage medium coupled to the processors and storing programming for execution by the processors, the programming, when executed by the processor, configuring the decoder to perform a method according to any one of the first or second aspects. [Explanation of symbols]
[0266] 10. Video Coding System / Short Coding System 12 Source Device 13 Communication Channels 14 Destination Device 16 Image source 17 Image / Image data 18 Preprocessor / Preprocessing Unit 19 Preprocessed image data 20 Video Encoder / Short Encoder 21 Encoded image data / encoded bitstream 22 Communication Interface / Communication Unit 28 Communication Interface / Communication Unit 30 Video Decoder / Short Decoder 31 Decoded image data 32 Post-processor / Post-processing unit 33 Post-processed image data 34 Display Devices 46 Processing Circuit 100 Video Encoder 110 Inverse Quantization Unit 201 Input / Input Interface 203 Image Block 204 Residual Calculation Unit 205 Residual Blocks 206 Conversion Processing Unit 207 Conversion Factors 208 Quantization Units 209 Quantized coefficients / Quantized residual coefficients / Quantized transform coefficients 210 Inverse Quantization Unit 211 Inverse quantization coefficients / residual coefficients 212 Inverse Transformation Processing Unit 213 Reconstructed residual block / transform block 214 Reconstruction Unit / Adder 215 Reconstruction Blocks 216 Buffers 220 Loop Filter Unit 221 Filtered Blocks 230 Decoded Image Buffer 231 Decoded image data 244 Inter Prediction Units 254 intra prediction units 260 Mode Selection Unit 262 Split Unit 265 predicted blocks 266 Syntax Elements 270 Entropy Encoding Units 272 Output / Output Interface 304 Entropy Decoding Unit 309 Decoded Quantized Coefficients 310 Inverse Quantization Unit 311 Inverse quantization coefficients 312 Inverse Transformation Processing Unit 313 Reconstructed residual block / residual block 314 Reconstruction Unit / Adder 315 Reconstruction Block 320 Loop Filter Unit 321 Filtered Blocks 330 Decoded Image Buffer 331 Decoded Images 344 Inter Prediction Units 354 intra prediction units 360 Mode Selection Unit 365 predicted blocks 400 Video Coding Device 410 Input Port / Input Port 420 Receiver Unit 430 Processor 440 Transmitter Unit 450 output / exit ports 460 Memory 470 Coding Module 500 devices 502 processor 504 Memory 506 Code and Data 508 Operating Systems 510 Application Program 512 Bus 514 Secondary memory 518 Display 1250 Separation line 3001 Acquired Units 3005 First Prediction Unit 3007 Second Prediction Unit 3009 First Generation Unit 3011 Second generation unit 3013 Combination Unit 3100 Contents Supply System 3102 Capture Device 3104 Communication Links 3106 Terminal Device 3108 Smartphone / Pad 3110 Computer / Laptop 3112 Network Video Recorder (NVR) / Digital Video Recorder (DVR) 3114 TV 3116 Set-top box (STB) 3118 Video Conference System 3120 Video Surveillance System 3122 Personal digital assistant (PDA) 3124 Vehicle-mounted devices 3126 External Display 3202 Protocol Progression Unit 3204 Demultiplexing Unit 3206 Video Decoder 3208 Audio Decoder 3210 Subtitle Decoder 3212 Synchronous Unit 3214 Video / Audio Display 3216 Video / Audio / Subtitle Display
Claims
1. 1. A method of coding implemented by a decoding device, comprising: obtaining a value of a parameter of a current block, the value of the parameter indicating a partition mode of the current block; obtaining a first prediction mode of the current block; obtaining a second prediction mode of the current block; generating a first prediction value for a chroma sample in the current block according to the first prediction mode; generating a second prediction value for a chroma sample in the current block according to the second prediction mode; obtaining a composite value of a predicted sample by combining the first predicted value and the second predicted value; The method further includes obtaining the weight value for the luma sample by calculating a weight value for the luma sample; and obtaining the first weight value for the chroma sample by calculating a first weight value for the chroma sample; The first weight value is calculated according to a sample distance, the sample distance being calculated according to the formula: sample_dist=((x<<1)+1)*Dis[angleIdx1]+((y<<1)+1)*Dis[angleIdx2]-offset(distanceIdx) where x and y are the −x and −y coordinates of a sample relative to the top-left sample of a coding block, Dis[angleIdx1] describes the change in the sample distance for unit increments at the −x coordinate of the sample, Dis[angleIdx2] describes the change in the sample distance for unit increments at the −y coordinate of the sample, angleIdx1 and angleIdx2 are parameters based on the angle index of a separation line dividing the current block and are derived based on other information obtained from the bitstream, and offset(distanceIdx) is an offset value that is a function of an index value (distanceIdx) based on a length in a given direction from a given position of the current block to the separation line, The method further includes obtaining a composite predicted value of the chroma sample in the current block according to the first predicted value of the chroma sample and the first weighted value of the chroma sample.
2. The method of claim 1 , wherein the composite value of a predicted sample is obtained by combining the first predicted value and the second predicted value according to the partitioning mode.
3. The method according to claim 1 or 2, wherein the composite value of a prediction sample is obtained by combining the first prediction value and the second prediction value according to a blending operation.
4. The method of claim 3 , wherein the blending operation is performed using a function or a lookup table.
5. The step of obtaining the first weighting values for the chroma samples relates to obtaining the weighting values for the luma samples in the current block as follows: sampleWeightC1 (x, y) = sampleWeight1 (2*x, 2*y), where x and y are coordinates of a chroma sample relative to the top-left coordinate of a chroma block of a coding block; sampleWeightC1(a,b) is a first weight value of the chroma sample located at sample coordinate (a,b) in the chroma block of the current block, where a and b are coordinate values; sampleWeight1(c,d) represents a weight value corresponding to a luma sample located at sample coordinate (c,d) in a luma block of the current block, where c and d are coordinate values; and K is an integer value; sampleWeight1 is the formula: sampleWeight1=Clip3(0, 8, sample_dist+4) is obtained in accordance with Here, the function Clip3 is [0010] The method of claim 1, defined as follows:
6. The step of obtaining the first weighting values for the chroma samples relates to obtaining the weighting values for the luma samples in the current block as follows: sampleWeightC1 (x, y) = sampleWeight1 (2*x-1, 2*y-1), or sampleWeightC1 (x, y) = (sampleWeight1 (2*x-1, 2*y-1) + sampleWeight1 (2*x, 2*y) + K) >> 1, or sampleWeightC1 (x, y) = (sampleWeight1 (2*x-1, 2*y-1) + sampleWeight1 (2*x, 2*y) + sampleWeight1 (2*x, 2*y-1) + sampleWeight1 (2*x-1, 2*y) + K) >> 2, or sampleWeightC1 (x, y) = (sampleWeight1 (2*x-1, 2*y-1) + sampleWeight1 (2*x, 2*y) + sampleWeight1 (2*x, 2*y-1) + sampleWeight1 (2*x-1, 2*y) + 2) >> 2, or sampleWeightC1 (x, y) = (sampleWeight1 (2 * x - 1, 2 * y - 1) + sampleWeight1 (2 * x, 2 * y) + 1) >> 1, where x and y are coordinates of a chroma sample relative to the top-left coordinate of a chroma block of a coding block; sampleWeightC1(a,b) is a first weight value of the chroma sample located at sample coordinate (a,b) in the chroma block of the current block, where a and b are coordinate values; sampleWeight1(c,d) represents a weight value corresponding to a luma sample located at sample coordinate (c,d) in a luma block of the current block, where c and d are coordinate values; and K is an integer value; sampleWeight1 is the formula: sampleWeight1=Clip3(0, 8, sample_dist+4) is obtained in accordance with Here, the function Clip3 is [0025] The method of claim 1, defined as follows:
7. The method according to claim 1 , wherein the division mode is a geometric model.
8. The method according to claim 1 , wherein the parameter is an angle parameter or a distance parameter.
9. The method of claim 1 , wherein the first prediction mode and the second prediction mode are not identical.
10. 10. The method of claim 1, wherein the first prediction mode or the second prediction mode is an inter prediction mode, and information for the inter prediction mode includes a reference image index and / or a motion vector.
11. The method of claim 1 , wherein the first prediction mode or the second prediction mode is an intra prediction mode, and the information for the intra prediction mode includes an intra prediction mode index.
12. A decoder (30) comprising processing circuitry for carrying out the method according to any one of claims 1 to 11.
13. A computer program comprising a program code for carrying out the method according to any one of claims 1 to 11.
14. A decoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the decoder to perform the method of any one of claims 1 to 11.
15. A decoder comprising: An acquisition unit (3001) for acquiring a value of a parameter of a current block, the value of the parameter indicating a division mode of the current block; a first prediction unit (3005) for obtaining a first prediction mode of the current block; a second prediction unit (3007) for obtaining a second prediction mode of the current block; a first generation unit (3009) for generating first predicted values for chroma samples in the current block according to the first prediction mode; a second generation unit (3011) for generating second predicted values for chroma samples in the current block according to the second prediction mode; a combination unit (3013) for obtaining a composite value of a predicted sample by combining the first predicted value and the second predicted value, the combining unit is further configured to obtain the weighting value for the luma sample by calculating a weighting value for the luma sample, and to obtain the first weighting value for the chroma sample by calculating a first weighting value for the chroma sample; The first weight value is calculated according to a sample distance, the sample distance being calculated according to the formula: sample_dist=((x<<1)+1)*Dis[angleIdx1]+((y<<1)+1)*Dis[angleIdx2]-offset(distanceIdx) where x and y are the −x and −y coordinates of a sample relative to the top-left sample of a coding block, Dis[angleIdx1] describes the change in the sample distance for unit increments in the −x coordinate of the sample, Dis[angleIdx2] describes the change in the sample distance for unit increments in the −y coordinate of the sample, angleIdx1 and angleIdx2 are parameters based on the angle index of a separation line dividing the current block and derived based on other information obtained from the bitstream, and offset(distanceIdx) is an offset value that is a function of an index value (distanceIdx) based on a length in a given direction from a given position of the current block to the separation line, The combination unit is further configured to obtain a composite predicted value of the chroma sample in the current block according to the first predicted value of the chroma sample and the first weighted value of the chroma sample.
16. A method for decoding a bitstream according to the method of any one of claims 1 to 11.
