Method and apparatus for affine-based inter prediction of chroma sub-blocks
The method for affine-based inter-prediction of chroma sub-blocks addresses the challenge of supporting various chroma formats by accurately deriving motion vectors, enhancing coding performance through reduced prediction errors and improved compression.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2026-03-03
AI Technical Summary
Current video coding technologies struggle with supporting chroma formats other than 4:2:0, leading to crashes when encountering formats like 4:4:4 or 4:2:2, necessitating improved methods for motion vector derivation to enhance coding performance.
A method and apparatus for affine-based inter-prediction of chroma sub-blocks that determine horizontal and vertical chroma scaling factors based on chroma format, using these factors to derive motion vectors from luma sub-blocks, thereby improving accuracy and reducing prediction errors.
This approach enhances coding performance by accurately deriving chroma motion vectors, leading to improved compression and reduced prediction errors, particularly when handling diverse chroma formats.
Smart Images

Figure 0007823167000022 
Figure 0007823167000023 
Figure 0007823167000024
Abstract
Description
[Technical Field]
[0001] [CROSS-REFERENCE TO RELATED APPLICATIONS] This patent application is a divisional application of Japanese Patent Application No. 2023-130773 filed on August 10, 2023, which is a divisional application of Japanese Patent Application No. 2021-549409 filed on February 24, 2020, which claims priority to U.S. Provisional Patent Application No. 62 / 809,551 filed on February 22, 2019, U.S. Provisional Patent Application No. 62 / 823,653 filed on March 25, 2019, and U.S. Provisional Patent Application No. 62 / 824,302 filed on March 26, 2019. The disclosures of the above patent applications are incorporated by reference in their entirety.
[0002] [Technical field] Embodiments of the present disclosure relate generally to the field of picture processing, and more particularly to affine-based inter-prediction (affine motion compensation), and in particular to a method and apparatus for motion vector derivation for affine-based inter-prediction of chroma sub-blocks based on a chroma format, and a method and apparatus for affine-based inter-prediction of chroma sub-blocks. [Background technology]
[0003] Video coding (video encoding and / or 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 conversation applications such as video chat, video conferencing, DVD and Blu-ray discs, video content acquisition and editing systems, and camcorders in security applications.
[0004] The amount of video data required to render even a relatively short video can be substantial, which can create difficulties when the data is streamed or communicated across communication networks with limited bandwidth capacity. Therefore, video data is typically compressed before being communicated across modern telecommunications networks. Because memory resources may be limited, video size can also be an issue when the video is stored on a storage device. Video compression devices often use software and / or hardware at the source to code the video data before transmission or storage, thereby reducing the amount of data needed to represent a digital video image. The compressed data is then received at the destination by a video decompression device, which decodes the video data. Due to limited network resources and ever-increasing demands for higher video quality, improved compression and decompression techniques with higher compression ratios and little or no sacrifice in picture quality are desirable.
[0005] In particular, current Versatile Video Coding and Test Model (VTM) coders mainly support the chroma format 4:2:0 as the input picture format. If the input chroma format becomes 4:4:4, the VTM coder may crash. To avoid such problems, a coder that supports other chroma formats (e.g., 4:4:4 or 4:2:2) is highly desirable and even essential for a wide range of applications. Summary of the Invention
[0006] In consideration of the above problems, modifications to a video coding process for supporting multiple chroma formats are proposed in this disclosure. In particular, embodiments of the present application aim to provide an apparatus, an encoder, a decoder, and corresponding methods for motion vector derivation for affine-based inter prediction of chroma sub-blocks based on a chroma format that may be one of multiple supported chroma formats, so as to improve coding performance.
[0007] Embodiments of the invention are defined by the features of the independent claims, further advantageous realisations of the embodiments are defined by the features of the dependent claims.
[0008] Particular embodiments are outlined in the accompanying independent claims, while other embodiments are outlined in the dependent claims.
[0009] These and other objects are achieved by the subject matter of the independent claims. Further realisations are evident from the dependent claims, the description and the drawings.
[0010] According to a first aspect of the present disclosure, there is provided a method for chroma motion vector derivation for use in affine-based inter prediction of a current image block including a luma block and a co-located chroma block, the method comprising: determining horizontal and vertical chroma scaling factors (i.e., values of chroma scaling factors) based on chroma format information, where the chroma format information indicates the chroma format of a current picture to which the current image block belongs; determining a set (S) of luma sub-blocks of the luma block based on values of the chroma scaling factor; determining a motion vector for a chroma sub-block of the chroma block based on the motion vectors of one or more luma sub-blocks (e.g., one or two luma sub-blocks) in the set (S) of luma sub-blocks; Includes.
[0011] In this disclosure, a (luma or chroma) block or sub-block can be represented by its location, position or index, so selecting / determining a block or sub-block means selecting or determining the position, location or index of the block or sub-block.
[0012] It should be noted that the terms "block," "coding block," or "image block" used in this disclosure may refer to a transform unit (TU), a prediction unit (PU), a coding unit (CU), etc. In Versatile Video Coding (VVC), transform units and coding units are generally aligned with each other, except when TU tiling or sub-block transform (SBT) is used. Thus, the terms "block," "image block," "coding block," and "transform block" may be used interchangeably in this disclosure, and the terms "block size" and "transform block size" may be used interchangeably in this disclosure. The terms "sample" and "pixel" may also be used interchangeably in this disclosure.
[0013] This disclosure is directed to a method for taking the chroma format of a picture into consideration when obtaining chroma motion vectors from luma motion vectors. Averaging luma motion vectors performs linear subsampling of the luma motion field. It turns out that when a chroma color plane has the same height as the luma plane, it is more appropriate to select a motion vector from a horizontally adjacent luma block, so that they have the same vertical position. Selecting a luma motion vector depending on the picture chroma format results in a more accurate chroma motion field due to more accurate luma motion vector field subsampling. This dependence on the chroma format enables the selection of the most appropriate luma block when averaging luma motion vectors to generate a chroma motion vector. As a result of more accurate motion field interpolation, prediction errors are reduced, which has the technical result of improved compression performance and, therefore, improved coding performance.
[0014] In a possible realization of the method according to the first aspect, the set of luma sub-blocks (S) is determined based on the values of the horizontal and vertical chroma scaling factors, i.e., one or more luma sub-blocks (such as one or two luma sub-blocks) are determined based on the values of the horizontal and vertical chroma scaling factors.
[0015] In a possible realization of the method according to the first aspect, the horizontal and vertical chroma scaling factors are represented by the variables SubWidthC and SubHeightC.
[0016] In a possible realization of the method according to the first aspect, the position of each of the luma sub-blocks is represented by a horizontal sub-block index and a vertical sub-block index, and the position of each of the chroma sub-blocks is represented by a horizontal sub-block index and a vertical sub-block index.
[0017] In a possible implementation of the method according to the first aspect, the position of each of one or more luma sub-blocks (such as one or two luma sub-blocks) in the set (S) is represented by a horizontal sub-block index and a vertical sub-block index.
[0018] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, when both variables SubWidthC and SubHeightC are equal to 1, the set of luma sub-blocks (S) is S0=(xSbIdx, ySbIdx), If at least one of SubWidthC and SubHeightC is not equal to 1, the set of luma sub-blocks (S) is The first luma sub-block indexed by S0=((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1)),(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and Second luma sub-block indexed by S1=((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)) Including, SubWidthC and SubHeightC represent the horizontal and vertical chroma scaling factors, respectively. xSbIdx and ySbIdx represent the horizontal and vertical sub-block indices for the luma sub-blocks in set (S), respectively, where "<<" represents a left arithmetic shift and ">>" represents a right arithmetic shift, where xSbIdx=0..numSbX-1 and ySbIdx=0..numSbY-1, where numSbX indicates the number of luma sub-blocks in the luma block along the horizontal direction and numSbY indicates the number of luma sub-blocks in the luma block along the vertical direction.
[0019] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, the number of chroma sub-blocks in the horizontal and vertical directions is the same as the number of luma sub-blocks in the horizontal and vertical directions, respectively.
[0020] In a possible implementation of any of the preceding implementations of the first aspect or the method according to the first aspect itself, when both SubWidthC and SubHeightC are equal to 1, the set of luma sub-blocks (S) is S0=(xCSbIdx, yCSbIdx), If at least one of SubWidthC and SubHeightC is not equal to 1, the set of luma sub-blocks (S) is The first luma sub-block indexed by S0=((xCSbIdx>>(SubWidthC-1)<<(SubWidthC-1)),(yCSbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and Second luma sub-block indexed by S1=(xCSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(yCSbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)) Including, The variables SubWidthC and SubHeightC represent the horizontal and vertical chroma scaling factors, respectively, and xCSbIdx and yCSbIdx represent the horizontal and vertical sub-block indices, respectively, for the luma sub-blocks in set (S), where xCSbIdx=0..numCSbX-1 and yCSbIdx=0..numCSbY-1, where numCSbX indicates the number of chroma sub-blocks in the chroma block along the horizontal direction and numCSbY indicates the number of chroma sub-blocks in the chroma block along the vertical direction.
[0021] In a possible implementation of any preceding implementation of the first aspect or the method according to the first aspect itself, the size of each of the chroma sub-blocks is the same as the size of each of the luma sub-blocks. When the number of chroma sub-blocks is defined as equal to the number of luma sub-blocks, and when the chroma color plane size is equal to the luma plane size (such as when the chroma format of the input picture is 4:4:4), it is allowed that the motion vectors of adjacent chroma sub-blocks may assume the same value. When implementing this processing step, optimization may be performed by skipping the iterative value calculation step.
[0022] The proposed invention discloses a method for defining the size of a chroma sub-block equal to that of a luma sub-block, in which case the implementation scheme may be simplified by unifying luma and chroma processing, and redundant motion vector calculations are naturally avoided.
[0023] In any of the preceding implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, when the size of each of the chroma sub-blocks is the same as the size of each of the luma sub-blocks, the number of chroma sub-blocks in the horizontal direction depends on the number of luma sub-blocks in the horizontal direction and the value of the horizontal chroma scaling factor, and the number of chroma sub-blocks in the vertical direction depends on the number of luma sub-blocks in the vertical direction and the value of the vertical chroma scaling factor.
[0024] In a possible implementation form of the method according to any of the preceding implementation schemes of the first aspect or the first aspect itself, xCSbIdx is obtained based on the step values of xSbIdx and SubWidth, and yCSbIdx is obtained based on the step values of ySbIdx and SubHeightC.
[0025] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, numCSbX=numSbX>>(SubWidthC-1) numCSbY=numSbY>>(SubHeightC-1) and numCSbX and numCSbY represent the number of chroma sub-blocks in the horizontal and vertical directions, respectively; numSbX and numSbY represent the number of luma sub-blocks in a luma block in the horizontal and vertical directions, respectively.
[0026] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, for a chroma block, the set of luma sub-blocks (S) is S0=(xSbIdxL,ySbIdxL) S1=(xSbIdxL,ySbIdxL+(SubHeightC-1)) S2=(xSbIdxL+(SubWidthC-1),ySbIdxL) S3=(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) one or more of the sub-blocks indexed by The luma block position or index S0 is represented by the horizontal sub-block index xSbIdxL and the vertical sub-block index ySbIdxL, Regarding the chroma block position (e.g., [xSbIdxL][ySbIdxL] in mvCLX[xSbIdxL][ySbIdxL]), The luma block position or index S1 is represented by the horizontal sub-block index xSbIdxL and the vertical sub-block index ySbIdxL+(SubHeightC-1), The luma block position or index S2 is represented by the horizontal sub-block index xSbIdxL+(SubWidthC-1) and the vertical sub-block index ySbIdxL, The luma block position or index S3 is represented by a horizontal sub-block index xSbIdxL+(SubWidthC-1) and a vertical sub-block index ySbIdxL+(SubHeightC-1).
[0027] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, the set of luma sub-blocks (S) comprises: S0=(xSbIdxL,ySbIdxL) S1=(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) and two luma sub-blocks indexed by The luma block position or index S0 is represented by the horizontal sub-block index xSbIdxL and the vertical sub-block index ySbIdxL, The luma block position or index S1 is represented by a horizontal sub-block index xSbIdxL+(SubWidthC-1) and a vertical sub-block index ySbIdxL+(SubHeightC-1).
[0028] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, If the chroma format is 4:4:4, the set (S) comprises (consists of) one luma sub-block co-located with the chroma sub-blocks, If the chroma format is 4:2:2, the set (S) includes two horizontally adjacent luma sub-blocks; If the chroma format is 4:2:0, the set (S) includes two diagonally aligned luma sub-blocks.
[0029] In any of the preceding implementations of the first aspect or a possible implementation of the method according to the first aspect itself, when there is more than one luma sub-block in the set (S), determining a motion vector for a chroma sub-block based on a motion vector of at least one luma sub-block in the set (S) of luma sub-blocks may include: averaging the motion vectors of the luma sub-blocks in the set S; Deriving motion vectors for chroma sub-blocks based on average luma motion vector Includes.
[0030] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, averaging the motion vectors of the luma sub-blocks in the set S comprises: averaging the horizontal components of the motion vectors of the luma sub-blocks in the set S, and / or averaging the vertical components of the motion vectors of the luma sub-blocks in set S Includes.
[0031] In a possible implementation form of the method according to any of the preceding implementation schemes of the first aspect or the first aspect itself, averaging the motion vectors of the luma sub-blocks in the set S includes checking whether the sum of the motion vectors of the luma sub-blocks in the set S is greater than or equal to 0.
[0032] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, averaging the motion vectors of the luma sub-blocks in the set S comprises: mvAvgLX=Σ i mvLX[S i x ][S i y ] If mvAvgLX[0] is greater than or equal to 0, mvAvgLX[0]=(mvAvgLX[0]+(N>>1)-1)>>log2(N), otherwise mvAvgLX[0]=-((-mvAvgLX[0]+(N>>1)-1)>>log2(N)) If mvAvgLX[1] is greater than or equal to 0, mvAvgLX[1]=(mvAvgLX[1]+(N>>1)-1)>>log2(N), otherwise mvAvgLX[1]=-((-mvAvgLX[1]+(N>>1)-1)>>log2(N)) where mvAvgLX is the result of the averaging, mvAvgLX[0] is the horizontal component of the motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the motion vector mvAvgLX, and S i x and S i y are the horizontal and vertical indices of sub-block Si in the set of luma sub-blocks (S) in the motion vector array, and mvLX[S i x ][S i y ] is the index S i x and S i y where N is the number of elements (e.g., luma sub-blocks) in the set of luma sub-blocks (S), log2(N) represents the logarithm of N to the base 2, the power to which the number 2 is raised to obtain the value N, and ">>" is a right arithmetic shift.
[0033] In a possible implementation of the method according to any preceding implementation of the first aspect or the first aspect itself, N is equal to 2.
[0034] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, averaging the motion vectors of the luma sub-blocks in the set S comprises: mvAvgLX=mvLX[(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))][(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))]+mvLX[(xSbI dx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1)][(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)] If mvAvgLX[0]>=0, mvAvgLX[0]=(mvAvgLX[0]+1-(mvAvgLX[0]>=0))>>1 If mvAvgLX[1]>=0, mvAvgLX[1]=(mvAvgLX[1]+1-(mvAvgLX[1]>=0))>>1 Including, mvAvgLX[0] is the horizontal component of the averaged motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the averaged motion vector mvAvgLX, SubWidthC and SubHeightC represent the horizontal and vertical chroma scaling factors, respectively, xSbIdx and ySbIdx represent the horizontal and vertical sub-block indices, respectively, for the luma sub-blocks in set (S), "<<" is a left arithmetic shift, and ">>" is a right arithmetic shift.
[0035] In a possible implementation form of any of the preceding implementation schemes of the first aspect or the method according to the first aspect itself, case 1: if mvAvgLX[0]>=0, then the value of "(mvAvgLX[0]>=0)"=1, and case 2: if mvAvgLX[0]<0, then the value of "(mvAvgLX[0]>=0)"=0.
[0036] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, averaging the motion vectors of the luminance sub-blocks in the set S comprises: When the sum of the motion vectors of the luma sub-blocks in the set S is greater than or equal to 0, the sum of the motion vectors of the luma sub-blocks in the set S includes dividing by a right shift operation depending on the number of elements (e.g., luma sub-blocks) in the set (S) of luma sub-blocks.
[0037] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, determining horizontal and vertical chroma scaling factors based on chroma format information comprises: Determining horizontal and vertical chroma scaling factors based on a mapping between the chroma format information and the horizontal and vertical chroma scaling factors.
[0038] A possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself further comprises generating a prediction of the chroma sub-block based on the determined motion vector.
[0039] In a possible implementation of the method according to any preceding implementation of the first aspect or the first aspect itself, the chroma format comprises one of the following formats: YUV4:2:2 format, YUV4:2:0 format or YUV4:4:4 format.
[0040] The method according to any preceding implementation of the first aspect or the first aspect itself is implemented by an encoding device.
[0041] The method according to any preceding implementation of the first aspect or the first aspect itself is implemented by a decoding device.
[0042] According to a second aspect of the present invention, there is provided an apparatus for affine-based inter prediction of a current image block comprising co-located luma and chroma blocks, the apparatus comprising: a determining module configured to determine horizontal and vertical chroma scaling factors based on chroma format information, the chroma format information indicating a chroma format of a current picture to which the current image block belongs, and configured to determine a set (S) of luma sub-blocks of the luma block based on values of the chroma scaling factors; a motion vector derivation module configured to determine a motion vector for a chroma sub-block of the chroma block based on a motion vector of one or more luma sub-blocks in the set (S) of luma sub-blocks; Includes.
[0043] The method according to the first aspect of the invention can be performed by an apparatus according to the second aspect of the invention. Further features and implementations of the apparatus according to the second aspect of the invention correspond to the features and implementations of the method according to the first aspect of the invention.
[0044] According to a third aspect, the present invention relates to an apparatus for decoding a video stream, comprising a processor and a memory, the memory storing instructions for causing the processor to carry out the method according to the first aspect.
[0045] According to a fourth aspect, the present invention relates to an apparatus for encoding a video stream, comprising a processor and a memory, the memory storing instructions for causing the processor to carry out the method according to the first aspect.
[0046] According to a fifth aspect, there is proposed a computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors configured to code video data, the instructions causing the one or more processors to perform a method according to the first aspect or any possible embodiment of the first aspect.
[0047] According to a sixth aspect, the present invention relates to a computer program comprising a program code for performing, when the computer program is run on a computer, the method according to the first aspect or the second aspect or any possible embodiment of the first one.
[0048] 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. [Brief explanation of the drawings]
[0049] In the following, embodiments of the invention will be described in more detail with reference to the accompanying figures and drawings. [Figure 1A] 1 is a block diagram illustrating an example of a video coding system configured to implement embodiments presented herein. [Figure 1B] FIG. 2 is a block diagram illustrating another example of a video coding system configured to implement embodiments presented herein. [Figure 2] 1 is a block diagram illustrating an example of a video encoder configured to implement embodiments presented herein. [Figure 3] 1 is a block diagram illustrating an exemplary structure of a video decoder configured to implement the embodiments presented herein. [Figure 4] FIG. 1 is a block diagram illustrating an example of an encoding device or a decoding device. [Figure 5] FIG. 10 is a block diagram showing another example of an encoding device or a decoding device. [Figure 6a] 1 shows examples of control point motion vector positions for a four-parameter affine motion model. [Figure 6b] 1 shows an example of control point motion vector positions for a six-parameter affine motion model. [Figure 7] 1 shows an example of a sub-block motion vector field for an affine motion model. [Figure 8] FIG. 1 is a block diagram illustrating motion compensation using an affine motion model. [Figure 9A] An example is given for the nominal vertical and horizontal positions of 4:2:0 luma and chroma samples within a picture. [Figure 9B]Illustrates examples of nominal vertical and horizontal positions of 4:2:2 luma and chroma samples within a picture. [Figure 9C] Illustrates examples of nominal vertical and horizontal positions of 4:4:4 luma and chroma samples within a picture. [Figure 9D] Various sampling patterns are shown. [Figure 10A] 10 shows an example showing co-located luma and chroma blocks contained in a current image block of a current picture, where the chroma format of the current picture is 4:2:0. [Figure 10B] 10 shows an example showing co-located luma and chroma blocks contained in a current image block of a current picture, where the chroma format of the current picture is 4:2:2. [Figure 10C] 10 shows an example showing co-located luma and chroma blocks contained in a current image block of a current picture, where the chroma format of the current picture is 4:4:4. [Figure 11A] 10B is an example illustrating the positions of two luma sub-blocks for a given position of a chroma sub-block during chroma motion vector derivation from a luma motion vector when the chroma format of the current picture is 4:2:0 as shown in FIG. 10A. [Figure 11B] 10B is an example illustrating the positions of two luma sub-blocks for a given position of a chroma sub-block during chroma motion vector derivation from a luma motion vector when the chroma format of the current picture is 4:2:2 as shown in FIG. 10B. [Figure 11C] 10C is an example illustrating the position of a luma sub-block for a given position of a chroma sub-block during chroma motion vector derivation from a luma motion vector when the chroma format of the current picture is 4:4:4 as shown in FIG. 10C. [Figure 12A] 10 shows various examples of subsets S containing the positions of luma sub-blocks for given positions of chroma sub-blocks when the chroma format is set to 4:4:4. [Figure 12B]Various examples of subsets S are shown, where chroma sub-blocks located on the boundaries of chroma blocks have corresponding positions within the luma block, such as the fourth case "D" shown in FIG. 12A. [Figure 13A] 10 shows an example illustrating the selection of two luma sub-blocks for deriving a motion vector for a given chroma sub-block during chroma motion vector derivation from a luma motion vector when the chroma format of the current picture is 4:2:0. [Figure 13B] 10 shows an example illustrating the selection of two luma sub-blocks for a given chroma sub-block during chroma motion vector derivation from a luma motion vector when the chroma format of the current picture is 4:2:2. [Figure 13C] 10 shows an example illustrating the selection of luma sub-blocks for a given chroma sub-block during chroma motion vector derivation from a luma motion vector when the chroma format of the current picture is 4:4:4. [Figure 14A] 10 shows an example of subdivision of a 16x16 luma block into sub-blocks and subdivision of chroma blocks co-located with the luma block when the chroma format is YUV4:2:0. [Figure 14B] 10 shows an example of subdivision of a 16x16 luma block into sub-blocks and subdivision of chroma blocks co-located with the luma block when the chroma format is YUV4:2:2. [Figure 14C] 10 shows an example of subdivision of a 16x16 luma block into sub-blocks and subdivision of chroma blocks co-located with the luma block when the chroma format is YUV4:4:4. [Figure 15] 1 shows a flow diagram illustrating an example process for motion vector derivation for affine-based inter prediction of chroma sub-blocks based on a chroma format in accordance with certain aspects of the present disclosure. [Figure 16] 10 shows a flow diagram illustrating another example process for motion vector derivation for affine-based inter prediction of chroma sub-blocks based on a chroma format in accordance with some aspects of the present disclosure. [Figure 17] 1 illustrates a schematic diagram of a device for affine-based inter prediction in accordance with certain aspects of the present disclosure. [Figure 18] 1 is a block diagram illustrating an exemplary structure of a content supply system for implementing a content distribution service. [Figure 19] FIG. 2 is a block diagram illustrating the structure of an example terminal device.
[0050] In the following, identical reference signs, unless expressly specified otherwise, denote identical or at least functionally equivalent features. DETAILED DESCRIPTION OF THE INVENTION
[0051] In the following description, reference is made to the accompanying drawings which form a part of this disclosure and which show, by way of illustration, specific 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. The following detailed description, therefore, is not to be taken in a limiting sense, and the scope of the present invention is defined by the appended claims.
[0052] For example, it is understood that disclosure related to a described method may also apply 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, a corresponding device may include one or more units, e.g., functional units, for performing the described one or more method steps, even if such one or more units are not explicitly described or shown in the drawings (e.g., one unit performs one or more steps, or multiple units each perform one or more of the steps). On the other hand, for example, when a particular apparatus is described based on one or more units, e.g., functional units, a corresponding method may include a step for performing the function of one or more units, even if such one or more steps are not explicitly described or shown in the drawings (e.g., one step performs the function of one or more units, or multiple steps each perform the function of one or more of the units). Furthermore, it is understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless otherwise specified.
[0053] Typically, video coding refers to the processing of a sequence of pictures forming a video or a video sequence. Instead of the term "picture," the terms "frame" or "image" may be used synonymously in the field of video coding. Video coding (or coding in general) includes two parts: video encoding and video decoding. Video encoding is performed on the source side and typically involves processing the original video picture (e.g., by compression) to reduce the amount of data needed to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed on the destination side and typically involves the reverse processing compared to the encoder to reconstruct the video picture. Embodiments referring to "coding" of a video picture (or pictures in general) shall be understood to relate to "encoding" or "decoding" of the video picture or the respective video sequence. The combination of the encoder and decoder is also called a CODEC (Coding and Decoding).
[0054] In the case of lossless video coding, the original video picture can be reconstructed, i.e., the reconstructed video picture has the same quality as the original video picture (assuming there is no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression, e.g., by quantization, is performed to reduce the amount of data representing the video picture, which cannot be fully reconstructed at the decoder, i.e., the quality of the reconstructed video picture is low or poor compared to the quality of the original video picture.
[0055] 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 picture of a video sequence is typically partitioned into a set of non-overlapping blocks, and coding is typically performed at the block level. In other words, at an encoder, video is typically processed, i.e., encoded, at the block (video block) level, for example, by generating a predictive block using spatial (intra-picture) prediction and / or temporal (inter-picture) prediction, subtracting the predictive block from a current block (the block currently being processed / to be processed) to obtain a residual block, transforming the residual block, and quantizing the residual block in the transform domain to reduce the amount of data to be transmitted (compression). Meanwhile, at a decoder, an inverse process compared to the encoder is applied to the coded or compressed block to reconstruct the current block for representation. Furthermore, the encoder replicates the decoder processing loop, so that both generate the same predictions (e.g., intra- and inter-predictions) and / or reconstructions for processing, i.e., coding, subsequent blocks.
[0056] The present disclosure relates to improvements in the process of inter prediction. In particular, the present disclosure relates to improvements in the derivation process for chroma motion vectors. In particular, the present disclosure relates to improvements in the process of motion vector derivation for affine chroma blocks (such as chroma sub-blocks). More particularly, the present disclosure relates to improvements in the process of motion vector derivation for affine-based inter prediction of chroma sub-blocks based on chroma formats.
[0057] Disclosed herein is an improved mechanism for supporting multiple chroma formats for the derivation process for chroma motion vectors.
[0058] In the following embodiment of the video coding system 10, a video encoder 20 and a video decoder 30 will be described with reference to FIGS.
[0059] 1A is a schematic block diagram illustrating an example coding system 10, e.g., video coding system 10 (or coding system 10 for short), that may utilize the techniques of the present application. A video encoder 20 (or encoder 20 for short) and a video decoder 30 (or decoder 30 for short) of video coding system 10 represent examples of devices that may be configured to perform techniques according to various examples described herein.
[0060] As shown in FIG. 1A, coding system 10 includes a source device 12 configured to provide encoded picture data 21 to, for example, a destination device 14 for decoding the encoded picture data 21.
[0061] The source device 12 includes an encoder 20 and may further, i.e. optionally, include a picture source 16 , a pre-processor (or pre-processing unit) 18 , for example a picture pre-processor 18 , and a communication interface or unit 22 .
[0062] Picture source 16 may be or include any kind of picture capture device, e.g., a camera for capturing real-world pictures, and / or any kind of picture generation device, e.g., a computer graphics processor for generating computer-animated pictures, or any kind of other device for obtaining and / or providing real-world pictures, computer-generated pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). Picture source may also be any kind of memory or storage that stores any of the above pictures.
[0063] In contrast to the pre-processor 18 and the processing performed by the pre-processing unit 18 , the pictures or picture data 17 may also be referred to as raw pictures or raw picture data 17 .
[0064] The pre-processor 18 is configured to receive (raw) picture data 17 and perform pre-processing on the picture data 17 to obtain a pre-processed picture 19 or pre-processed picture 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 will be understood that the pre-processing unit 18 may be an optional component.
[0065] Video encoder 20 is configured to receive pre-processed picture data 19 and provide coded picture data 21 (described in further detail below, eg, with reference to FIG. 2).
[0066] The communication interface 22 of the source device 12 may be configured to receive the encoded picture data 21 and transmit the encoded picture data 21 (or any further processed version thereof) over the communication channel 13 to another device, such as the destination device 14 or any other device, for storage or direct reconstruction.
[0067] The destination device 14 includes a decoder 30 (e.g., a video decoder 30), and may further, i.e. optionally, include a communication interface or communication unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.
[0068] The communications interface 28 of the destination device 14 is configured to receive the coded picture 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, a coded picture data storage device, and to provide the coded picture data 21 to the decoder 30.
[0069] The communication interface 22 and the communication interface 28 may be configured to transmit or receive the encoded picture data 21 or the encoded data 21 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 combination thereof.
[0070] The communications interface 22 may be configured, for example, to package the coded picture data 21 into a suitable format, e.g., packets, and / or process the coded picture data using any type of transmission coding or processing for transmission over a communications link or network.
[0071] The communications interface 28, which forms the counterpart of the communications interface 22, may for example be configured to receive transmitted data and process the transmitted data using any type of corresponding transmission decoding or processing and / or unpackaging to obtain the coded picture data 21.
[0072] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, as indicated by the arrow for communication channel 13 pointing from source device 12 to destination device 14 in FIG. 1A, or as bidirectional communication interfaces, e.g., configured to send and receive messages to authorize and exchange communication links and / or any other information related to data transmission, e.g., coded picture data transmission, for example, to set up a connection.
[0073] The decoder 30 is arranged to receive the coded picture data 21 and to provide decoded picture data 31 or decoded pictures 31 (as will be explained in further detail below, for example with reference to FIG. 3 or FIG. 5).
[0074] Post-processor 32 of destination device 14 is configured to post-process decoded picture data 31 (also called reconstructed picture data), e.g., decoded picture 31, to obtain post-processed picture data 33, e.g., post-processed picture 33. The post-processing performed by 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 decoded picture data 31 for display, e.g., by display device 34.
[0075] Display device 34 of destination device 14 is configured to receive the post-processed picture data 33 and, for example, display the picture to a user or viewer. Display device 34 may be or include any type of display, such as an integrated or external display or monitor, that presents the reconstructed picture. The display may include, for example, a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a microLED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.
[0076] 1A depicts source device 12 and destination device 14 as separate devices, device embodiments may also include the functionality of source device 12 or corresponding functionality and / or destination device 14 or corresponding functionality. In such embodiments, 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.
[0077] As will be apparent to those skilled in the art based on the description, the presence and (exact) division of different units or functions within source device 12 and / or destination device 14 as shown in FIG. 1A may vary depending on the actual device and application.
[0078] Encoder 20 (e.g., video encoder 20) or decoder 30 (e.g., video decoder 30), or both encoder 20 and decoder 30, may be implemented via processing circuitry as shown in FIG. 1B , such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, dedicated video coding, or any combination thereof. Encoder 20 may be implemented via processing circuitry 46 to embody various modules as described with respect to encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. Decoder 30 may be implemented via processing circuitry 46 to embody various modules as described with respect to 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. 5, where the techniques are implemented partially in software, a device may store instructions for 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) within a single device, for example, as shown in FIG. 1B.
[0079] Source device 12 and destination device 14 may include any of a wide variety of devices, including any type of handheld or stationary device, e.g., 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 game console, a video streaming device (such as a content service server or content distribution server), a broadcast receiver device, a broadcast transmitter device, etc., and may or may not use any type of operating system. In some cases, source device 12 and destination device 14 may be equipped for wireless communication. Thus, source device 12 and destination device 14 may be wireless communication devices.
[0080] 1A is merely an example, and the techniques herein may be applied to video coding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between an encoding device and a decoding device. In other examples, 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 do not communicate with each other but simply encode data to memory and / or retrieve data from memory and decode it.
[0081] For ease of explanation, embodiments of the present invention are described herein with reference to, for example, High-Efficiency Video Coding (HEVC) or Versatile Video Coding (VVC) reference software, next-generation video coding standards developed by the ITU-T Video Coding Experts Group (VCEG) and the Joint Collaboration Team on Video Coding (JCT-VC) of the ISO / IEC Motion Picture Experts Group (MEPEG). Those skilled in the art will understand that embodiments of the present invention are not limited to HEVC or VVC.
[0082] Encoder and encoding method FIG. 2 shows a schematic block diagram of an exemplary video encoder 20 configured to implement the techniques of the present application. In the example of FIG. 2, the video encoder 20 includes an input 201 (or input interface 201), a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoded picture buffer (DPB) 230, a mode selection unit 260, an entropy coding unit 270, and an output 272 (or output interface 272). The mode selection unit 260 may include an inter prediction unit 244, an intra prediction processing unit 254, and a partition 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 using a hybrid video codec.
[0083] 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. Meanwhile, 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 the decoder (see 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.
[0084] Pictures and picture partitions (pictures and blocks) The encoder 20 may be configured to receive, for example, via input 201, a picture 17 (or picture data 17), e.g., a picture of a video or a sequence of pictures forming a video sequence. The received picture or picture data may also be a preprocessed picture 19 (preprocessed picture data 19). For simplicity, the following description refers to the picture 17. The picture 17 may also be called a current picture or a picture to be coded (particularly in video coding, to distinguish the current picture from other pictures, e.g., pictures that have been previously coded and / or decoded in the same video sequence, i.e., the video sequence that also includes the current picture).
[0085] A (digital) picture can be thought of as or be 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 picture defines the size and / or resolution of the picture. For color representation, three color components are typically used, i.e., a picture may be represented by or contain three sample arrays. In an RGB format or color space, a picture contains corresponding red, green, and blue sample arrays. However, in video coding, each pixel is typically represented in a luminance and chrominance format or color space, e.g., YCbCr, which contains a luminance component denoted by Y (sometimes L is used instead) and two chrominance components denoted by Cb and Cr. The luminance (or luma for short) component Y represents brightness or gray-level intensity (e.g., as in a grayscale picture). On the other hand, the two chrominance (or chroma for short) components Cb and Cr represent chromaticity or color information components. Thus, a picture in YCbCr format includes a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr). A picture in RGB format may be converted or transformed to YCbCr format, or vice versa; the process is also known as color conversion or translation. If a picture is monochrome, the picture may include only a luminance sample array. Thus, a picture 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.
[0086] Embodiments of video encoder 20 may include a picture partition unit (not shown in FIG. 2) configured to partition picture 17 into multiple (typically non-overlapping) picture 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 picture partition unit may be configured to use the same block size for all pictures of a video sequence and a corresponding grid that defines the block size, or to vary the block size among pictures or subsets or groups of pictures and partition each picture into corresponding blocks.
[0087] In further embodiments, the video encoder may be configured to directly receive blocks 203 of picture 17, e.g., one, some, or all of the blocks that form picture 17. Picture blocks 203 may also be referred to as current picture blocks or picture blocks to be coded.
[0088] Similar to picture 17, picture block 203 can again be considered as or be a two-dimensional array or matrix of samples having intensity values (sample values), but with smaller dimensions than picture 17. In other words, block 203 may, for example, include one sample array (e.g., a luma array in the case of a monochrome picture 17, or a luma or chroma array in the case of a color picture) or three sample arrays (e.g., a luma and two chroma arrays in the case of a color picture 17), or any other number and / or type of arrays depending on the applied color format. The number of samples in the horizontal and vertical directions (or axes) of block 203 defines the size of block 203. Thus, a block may, for example, be an M×N (M columns by N rows) array of samples, or an M×N array of transform coefficients.
[0089] An embodiment of video encoder 20 such as that shown in FIG. 2 may be configured to encode picture 17 on a block-by-block basis, eg, encoding and prediction is performed on a block-by-block basis.
[0090] An embodiment of video encoder 20 such as that shown in FIG. 2 may be further configured to partition and / or encode a picture using slices (also called video slices), where a picture may be partitioned into or encoded using one or more (typically non-overlapping) slices, each of which may include one or more blocks (e.g., CTUs).
[0091] An embodiment of video encoder 20 such as that shown in FIG. 2 may be further configured to partition and / or encode a picture using tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be partitioned into or encoded using one or more (typically non-overlapping) tile groups, each of which may, for example, include one or more blocks (e.g., CTUs) or one or more tiles, and each tile may, for example, be rectangular in shape and include one or more blocks (e.g., CTUs), e.g., full or partial blocks.
[0092] Residual calculation The residual calculation unit 204 is configured to calculate the residual block 205 based on the picture block 203 and the prediction block 265 (further details regarding the prediction block 265 are provided below), for example, by subtracting sample values of the prediction block 265 from sample values of the picture block 203 on a sample-by-sample (pixel-by-pixel) basis to obtain the residual block 205 in the sample domain.
[0093] conversion The transform processing unit 206 is configured to apply a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients in a transform domain 207. The transform coefficients 207 may also be called transform residual coefficients and represent the residual block 205 in the transform domain.
[0094] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as the transform specified for H.265 / HEVC. Compared to an orthogonal DCT transform, such an integer approximation is typically scaled by a specific factor. To maintain 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 specific constraints, such as the scaling factor being a power of two due to shift operations, the bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, etc. A specific scaling factor may be specified, for example, for the inverse transform by the inverse transform processing unit 212 (and the corresponding inverse transform by the inverse transform processing unit 312 in the video decoder 30), and a corresponding scaling factor for the forward transform by the transform processing unit 206 in the encoder 20 may be specified accordingly.
[0095] An embodiment of video encoder 20 (respectively, transform processing unit 206) may be configured to output transform parameters, e.g., a type of transform or multiple transforms, that are encoded or compressed, e.g., directly or via entropy coding unit 270, so that, for example, video decoder 30 may receive and use the transform parameters for decoding.
[0096] quantization The quantization unit 208 may be 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.
[0097] The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be truncated to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be changed by adjusting a quantization parameter (QP). For example, in scalar quantization, different scaling may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. The applicable quantization step may be indicated by the quantization parameter (QP). The quantization parameter may, for example, be an index into a predetermined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to finer quantization (smaller quantization step size), and a large quantization parameter may correspond to coarser quantization (larger quantization step size), or vice versa. Quantization may include division by a quantization step size, and corresponding dequantization and / or inverse quantization by, for example, the inverse quantization unit 210 may include multiplication by the quantization step size. Some standards, such as HEVC, may be configured to use a quantization parameter to determine the quantization step size. Generally, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of a formula that includes division. Due to the scaling used in the fixed-point approximation of the formula for the quantization step size and the quantization parameter, additional scaling factors for quantization and dequantization may be introduced to restore the norm of the residual block, which may change. In one exemplary implementation, the scaling of the inverse transform and dequantization may be combined. Alternatively, customized quantization tables may be used, e.g., signaled from the encoder to the decoder in the bitstream. Quantization is a lossy operation, and loss increases with increasing quantization step size.
[0098] Embodiments of video encoder 20 (respectively, quantization unit 208) may be configured to output a quantization parameter (QP), e.g., encoded directly or via entropy coding unit 270, so that, for example, video decoder 30 may receive and apply the quantization parameter for decoding.
[0099] inverse quantization The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 to the quantized coefficients, e.g., by applying the inverse of the quantization scheme applied by the quantization unit 208, based on or using the same quantization step size as the quantization unit 208, to obtain dequantized coefficients 211. The dequantized coefficients 211 are also referred to as dequantized residual coefficients 211 and may correspond to the transform coefficients 207, although they are typically not identical to the transform coefficients due to loss due to quantization.
[0100] 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 dequantized coefficients 213) in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 213.
[0101] Reconstruction The reconstruction unit 214 (e.g., an adder or summer 214) is configured to add the transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265, e.g., by adding the sample values of the reconstructed residual block 213 and the sample values of the prediction block 265 sample by sample, to obtain the reconstructed block 215 in the sample domain.
[0102] 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 generally, to filter reconstructed samples to obtain filtered samples. The loop filter unit is configured, for example, to smooth pixel transitions or 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 filter, a smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 220 is illustrated in FIG. 2 as being an in-loop filter, in other configurations, 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 reconstruction block 221.
[0103] Embodiments of video encoder 20 (respectively, loop filter unit 220) may be configured to output loop filter parameters (e.g., sample adaptive offset information), e.g., encoded directly or via entropy coding unit 220, so that, for example, decoder 30 may receive and apply the same loop filter parameters or respective loop filters for decoding.
[0104] Decoded Picture Buffer The decoded picture buffer (DPB) 230 may be a memory that stores reference pictures, or reference picture data in general, for encoding video data by the video encoder 20. The DPB 230 may be formed from any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), 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 be further configured to store other previously filtered blocks, e.g., previously reconstructed filtered blocks 221, of the same current picture or a different picture, e.g., a previously reconstructed picture, and may provide a complete 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 picture buffer (DPB) 230 may also be configured to store one or more unfiltered reconstructed blocks 215, or in general, unfiltered reconstructed samples, e.g., if the reconstructed blocks 215 are not filtered by the loop filter unit 220, or other further processed versions of any of the reconstructed blocks or samples.
[0105] Mode selection (partition and prediction) The mode selection unit 260 includes a partition unit 262, an inter prediction unit 244, and an intra prediction unit 254, and is configured to receive or obtain original picture data, e.g., original block 203 (current block 203 of current picture 17), and reconstructed picture data, e.g., filtered and / or unfiltered reconstructed samples or blocks of the same (current) picture and / or from one or more previously decoded pictures, e.g., from the decoded picture buffer 230 or another buffer (e.g., a line buffer, not shown). The reconstructed picture data is used as reference picture data for prediction, e.g., inter prediction or intra prediction, to obtain a prediction block 265 or predictor 265. As described in detail below, the embodiments presented herein provide an improvement to the inter prediction unit 244 by providing more accurate motion vector prediction, e.g., affine-based inter prediction or sub-block-based inter prediction, for use by the inter prediction unit when performing inter prediction.
[0106] The mode selection unit 260 may be configured to determine or select a partition (including no partition) and a prediction mode (e.g., intra or inter prediction mode) for the current block prediction mode, and generate a corresponding prediction block 265 used for calculating the residual block 205 and for reconstructing the reconstruction block 215.
[0107] Embodiments of mode selection unit 260 may be configured to select partitions and prediction modes (e.g., from those supported or available by mode selection unit 260) that provide the best fit, or in other words, the smallest residual (smallest residual means better compression for transmission or storage) or the smallest signaling overhead (smallest signaling overhead means better compression for transmission or storage), or that consider or balance both. Mode selection unit 260 may also be configured to determine partitions and prediction modes based on rate distortion optimization (RDO), i.e., to select a prediction mode that provides the smallest rate distortion. Terms such as “best,” “minimum,” “optimum,” etc. in this context do not necessarily indicate an overall “best,” “minimum,” “optimum,” etc., but may indicate the satisfaction of termination or selection criteria, such as values above or below a threshold, or other constraints that potentially result in a “suboptimal selection,” but reduce complexity and processing time.
[0108] In other words, the partition unit 262 may be configured to partition the block 203 into smaller block partitions or sub-blocks (which also form blocks), e.g., using quad-tree partitioning (QT), binary partitioning (BT), or triple-tree partitioning (TT), or any combination thereof, repeatedly, and to perform prediction on each of the block partitions or sub-blocks, e.g., wherein 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.
[0109] The partitioning (eg, by partition unit 260) and prediction processes (by inter prediction unit 244 and intra prediction unit 254) performed by exemplary video encoder 20 are described in further detail below.
[0110] partition The partition unit 262 may partition (or divide) 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) may be further partitioned into even smaller partitions. This is also called tree partitioning or hierarchical tree partitioning; for example, a root block at root tree level 0 (hierarchical level 0, depth 0) may be recursively partitioned, e.g., into two or more blocks at the next lower tree level, e.g., into nodes at tree level 1 (hierarchical level 1, depth 1), which may again be partitioned into two or more blocks at the next lower tree level, e.g., tree level 2 (hierarchical level 2, depth 2), until partitioning is terminated, e.g., because a termination criterion is met, e.g., a maximum tree depth or a minimum block size is reached. Blocks that are not further partitioned are also called leaf blocks or leaf nodes of the tree. A tree that uses a partition into two partitions is called a binary tree (BT), a tree that uses a partition into three partitions is called a ternary tree (TT), and a tree that uses a partition into four partitions is called a quad tree (QT).
[0111] As mentioned above, the term "block" as used herein may refer to a portion of a picture, in particular a square or rectangular portion. For example, with reference 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 a corresponding block, such as a coding tree block (CTB), a coding block (CB), a transform block (TB), or a prediction block (PB).
[0112] For example, a coding tree unit (CTU) may be or include a CTB of luma samples, two corresponding CTBs of chroma samples for a picture with a three-sample arrangement, or a CTB of samples for a monochrome picture or a picture coded using a syntax structure used for coding three separate color planes and samples. Correspondingly, a coding tree block (CTB) may be an N×N block of samples, for some value of N, whereby the division of the components into CTBs is a partition. A coding unit (CU) may be or include a coding block of luma samples, two corresponding coding blocks of chroma samples for a picture with a three-sample arrangement, or a coding block of samples for a monochrome picture or a picture coded using a syntax structure used for coding three separate color planes and samples. Correspondingly, a coding block (CB) may be an M×N block of samples, for some values of M and N, whereby the division of the CTB into coding blocks is a partition.
[0113] For example, in an HEVC-based embodiment, 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 a picture region using inter-picture (temporal) prediction or intra-picture (spatial) prediction is made at the CU level. Each CU can 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 sent to the decoder for each PU. After obtaining residual blocks by applying a prediction process based on the PU partition type, the CU can be partitioned into transform units (TUs) according to another quadtree structure similar to the coding tree for the CU.
[0114] For example, in an embodiment according to the latest video coding standard currently under development, called Versatile Video Coding (VVC), a combined quad-tree and binary tree (QTBT) partition is used, for example, to partition coding blocks. In the QTBT block structure, CUs can have either a square or rectangular shape. For example, coding tree units (CTUs) are first partitioned using a quad-tree. The quad-tree leaf nodes are further partitioned using a binary tree or ternary (ternary) tree structure. The partition tree leaf nodes are called coding units (CUs), and their segmentation is used for prediction and transform processing without further partitioning. This means that CUs, PUs, and TUs have the same block size in the QTBT coding block structure. In parallel, multiple partitions, for example, ternary tree partitions, may be used with the QTBT block structure.
[0115] In one example, mode select unit 260 of video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.
[0116] As described above, video encoder 20 is configured to determine or select a best or optimal prediction mode from a (e.g., predetermined) set of prediction modes, which may include, for example, intra-prediction modes and / or inter-prediction modes.
[0117] 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 and planar mode, or directional modes as defined for example in HEVC, or may include 67 different intra prediction modes, e.g., non-directional modes such as DC (or average) mode and planar mode, or directional modes as defined for example in VVC.
[0118] The intra prediction unit 254 is configured to use reconstructed samples of neighboring blocks of the same current picture to generate an intra prediction block 265 according to an intra prediction mode from a set of intra prediction modes.
[0119] The intra prediction unit 254 (or generally the mode selection unit 260) is further configured to output the intra prediction parameters (or generally information indicating the selected intra prediction mode for the block) to the entropy coding unit 270 in the form of a syntax element 226 for inclusion in the coded picture data 21, so that, for example, the video decoder 30 may receive and use the prediction parameters for decoding.
[0120] Inter Prediction The set (or possibilities) of inter prediction modes depends on the available reference pictures (i.e., previous at least partially decoded pictures, e.g., stored in DPB230) and other inter prediction parameters, such as whether the entire reference picture is used to search for the best matching reference block, or whether only a portion of the reference picture, e.g., a search window area around the area of the current block, is used, and / or whether pixel interpolation, e.g., half / semi-pel and / or quarter-pel interpolation, is applied.
[0121] In addition to the above prediction modes, skip mode and / or direct mode may also be applied.
[0122] The inter prediction unit 244 may include a motion estimation (ME) unit and a motion compensation (ME) unit (both not shown in FIG. 2 ). The motion estimation unit may be configured to receive or obtain, for motion estimation, a picture block 203 (current block 203 of current picture 17) and a decoded picture 231, or at least one or more previously reconstructed blocks, e.g., reconstructed blocks of one or more other / different previous decoded pictures 231. For example, a video sequence may include the current picture and the previous decoded picture 231, or in other words, the current picture and the previous decoded picture 231 may be part of or form a sequence of pictures that form a video sequence.
[0123] The encoder 20 may be configured to, for example, select a reference block from multiple reference blocks of the same or different pictures and provide the reference picture (or reference picture 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).
[0124] The motion compensation unit is configured to obtain, for example, receive inter prediction parameters and perform inter prediction based on or using the inter prediction parameters to obtain an inter prediction block 265. The motion compensation performed by the motion compensation unit may include fetching or generating a prediction block based on a motion / block vector determined by motion estimation, and possibly performing interpolation to sub-pixel accuracy. Interpolation filtering may generate additional pixel samples from known pixel samples, thus potentially increasing the number of candidate prediction blocks that can be used to code the picture block. Upon receiving the motion vector of the PU of the current picture block, the motion compensation unit may find the prediction block to which the motion vector points in one of the reference picture lists. In this disclosure, improvements are made to inter prediction (particularly, affine-based inter prediction or sub-block-based inter prediction) by supporting multiple chroma formats and improving the affine sub-block motion vector derivation process. In particular, an improved method and apparatus for motion vector derivation for affine-based inter prediction of a chroma sub-block based on a chroma format is introduced as follows.
[0125] The motion compensation unit may also generate syntax elements associated with the blocks and video slices for use by video decoder 30 in decoding picture blocks of the video slices. In addition to or as an alternative to slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be generated or used.
[0126] Entropy Coding The entropy coding unit 270 is configured to, for example, apply or bypass (uncompress) an entropy coding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context adaptive VLC (CAVLC) scheme, 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 other entropy coding method or technique) to the quantized coefficients 209, the inter-prediction parameters, the intra-prediction parameters, the loop filter parameters, and / or other syntax elements to obtain coded picture data 21 that can be output via output 272, for example, in the form of coded bitstream 21, so that, for example, video decoder 30 may receive and use the parameters for decoding. Encoded bitstream 21 may be transmitted to video decoder 39 or may be stored in memory for later transmission or retrieval by video decoder 30 .
[0127] Other structural variations of the video encoder 20 can be used to encode the video stream. For example, a non-transform-based encoder 20 can directly quantize the residual signal for a particular block or frame, without the transform processing unit 206. In other implementations, the encoder 20 can have the quantization unit 208 and the inverse quantization unit 210 combined into a single unit.
[0128] Decoder and decoding method 3 shows an example of a video decoder 30 configured to implement the techniques of the present application. The video decoder 30 is configured to receive coded picture data 21 (e.g., coded bitstream 21), for example, coded by encoder 20, to obtain a decoded picture 331. The decoded picture data or bitstream includes information for decoding the coded picture data, for example, data representing picture blocks of coded video slices (and / or tile groups or tiles) and associated syntax elements.
[0129] 3, decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., summer 314), a loop filter 320, a decoded picture buffer (DPB) 330, a mode application unit 360, an inter prediction unit 344, and an intra prediction unit 354. Inter prediction unit 344 may be or include a motion compensation unit. Video decoder 30, in some examples, may perform a decoding path that is generally inverse to the encoding path described with respect to video encoder 100 from FIG. 2.
[0130] As described with respect to encoder 20, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, loop filter 220, decoded picture buffer (DPB) 230, inter prediction unit 344, and intra prediction unit 354 may also be referred to as forming a “built-in decoder” of video encoder 20. Accordingly, inverse quantization unit 310 may be functionally identical to inverse quantization unit 110, inverse transform processing unit 312 may be functionally identical to inverse transform processing unit 212, reconstruction unit 314 may be functionally identical to reconstruction unit 214, loop filter 320 may be functionally identical to loop filter 220, and decoded picture buffer 330 may be functionally identical to decoded picture buffer 230. Accordingly, the descriptions provided for the respective units and functions of video encoder 20 also apply correspondingly to the respective units and functions of video decoder 30.
[0131] Entropy Decoding The entropy decoding unit 304 is configured to parse the bitstream 21 (or coded picture data 21 in general), e.g., perform entropy decoding on the coded picture data 21 to obtain, e.g., quantized coefficients 309 and / or decoded coding parameters (not shown in FIG. 3 ), e.g., any or all of inter-prediction parameters (e.g., reference picture indexes and motion vectors), intra-prediction parameters (e.g., intra-prediction modes or indices), 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 such as those described with respect to the entropy coding unit 270 of the encoder 20. The entropy decoding unit 304 may be further configured to provide the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to the mode application unit 360 and to provide other parameters to other units of the decoder 30. The video decoder 30 may receive video slice-level and / or video block-level syntax elements. In addition to or as an alternative to slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be received and / or used.
[0132] inverse quantization Inverse quantization unit 310 may be configured to receive a quantization parameter (QP) (or generally, information regarding inverse quantization) and quantized coefficients from coded picture data 21 (e.g., by parsing and / or decoding by entropy decoding unit 304, for example), and apply inverse quantization to the decoded quantized coefficients 309 based on the quantization parameter to obtain dequantized coefficients 311, which may also be referred to as transform coefficients 311. The inverse quantization process may involve using the quantization parameter determined by video encoder 20 for each video block within a video slice (or tile or tile group) to determine the degree of quantization, and similarly the degree of inverse quantization, to be applied.
[0133] Inverse transformation The inverse transform processing unit 312 may be configured to receive the dequantized coefficients 311, also referred to as transform coefficients 311, and apply a transform to the dequantized coefficients 311 to obtain the reconstructed residual block 213 in the sample domain. The reconstructed residual block 213 may also be referred to as the 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 coded picture data 21 (e.g., by parsing and / or decoding by the entropy decoding unit 304) to determine the transform to be applied to the dequantized coefficients 311.
[0134] Reconstruction The reconstruction unit 314 (e.g., an adder or summer 314) may be configured to add the reconstructed residual block 313 to the prediction block 365, e.g., by adding sample values of the reconstructed residual block 313 and sample values of the prediction block 365, to obtain a reconstructed block 315 in the sample domain.
[0135] filtering Loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter reconstructed block 315 to obtain filtered block 321, e.g., to smooth pixel transitions or improve video quality. 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, e.g., a bilateral filter, an adaptive loop filter (ALF), a sharpening filter, a smoothing filter, or a collaborative filter, or any combination thereof. Although loop filter unit 320 is shown in FIG. 3 as being an in-loop filter, in other configurations, loop filter unit 320 may be implemented as a post-loop filter.
[0136] Decoded Picture Buffer The decoded video blocks 321 of the picture are then stored in a decoded picture buffer 330, which stores the decoded picture as a reference picture for later motion compensation for other pictures and / or for output to a respective display.
[0137] The decoder 30 is arranged to output the decoded pictures 331, for example via output 312, for presentation or viewing to a user.
[0138] 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, and performs the division or partition decision and prediction based on the partition and / or prediction parameters or respective information received from the coded picture data 21 (e.g., by parsing and / or decoding by the entropy decoding unit 304). The mode application unit 360 may be configured to perform prediction (intra or inter prediction) for each block based on the reconstructed picture, block or respective (filtered or unfiltered) samples to obtain a prediction block 365.
[0139] When a video slice is coded as an intra-coded (I) slice, intra prediction unit 354 of mode application unit 360 is configured to generate a predictive block 365 for a picture block of the current video slice based on a signaled intra prediction mode and data from a previously decoded block of the current picture. When a video picture is coded as an inter-coded (i.e., B or P) slice, inter prediction unit 344 (e.g., a motion compensation unit) of mode application unit 360 is configured to generate a predictive block 365 for a video block of the current video slice based on a motion vector and other syntax elements received from entropy decoding unit 304. In inter prediction, the predictive block may be generated from one of the reference pictures in one of the reference picture lists. Video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference pictures stored in DPB 330. The same or similar may apply to or with embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or as an alternative to slices (e.g., video slices), e.g., video may be coded using I, P, or B tile groups and / or tiles.
[0140] Mode application unit 360 is configured to determine prediction information for video blocks of the current video slice by parsing motion vectors or related information and other syntax elements, and uses the prediction information to generate predictive blocks for the current video block being decoded. For example, mode application unit 360 uses some of the received syntax elements to determine the prediction mode (e.g., intra or inter prediction) to be used for coding the video blocks of the video slice, the inter-prediction slice type (e.g., B slice, P slice, or GPB slice), configuration information for one or more of the slice's reference picture lists, motion vectors for each inter-coded video block of the slice, inter-prediction states for each inter-coded video block of the slice, and other information for decoding video blocks in the current video slice. The same or similar may apply to or with embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or as an alternative to slices (e.g., video slices), e.g., video may be coded using I, P, or B tile groups and / or tiles.
[0141] An embodiment of video decoder 30 such as that shown in FIG. 3 may be configured to partition and / or decode pictures using slices (also called video slices), where a picture may be partitioned into or decoded using one or more (typically non-overlapping) slices, each of which may include one or more blocks (e.g., CTUs).
[0142] An embodiment of video decoder 30 such as that shown in FIG. 3 may be configured to partition and / or decode a picture using tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be partitioned into or decoded using one or more (typically non-overlapping) tile groups, each of which may, for example, include one or more blocks (e.g., CTUs) or one or more tiles, and each tile may, for example, be rectangular in shape and include one or more blocks (e.g., CTUs), e.g., full or partial blocks.
[0143] Other variations of the video decoder 30 may be used to decode the coded picture data 21. For example, the decoder 30 may generate the 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 the inverse transform processing unit 312. In other implementations, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.
[0144] 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 interpolation filtering, motion vector derivation or loop filtering, further operations such as clipping or shifting may be performed on the processing result of the interpolation filtering, motion vector derivation or loop filtering.
[0145] It should be noted that further operations may be applied to the derived motion vector of the current block (including, but not limited to, control point motion vectors in affine mode, sub-block motion vectors in affine, planar, and ATMVP modes, temporal motion vectors, etc.). For example, the value of the motion vector is constrained to a predetermined range according to its representation bits. If the representation bits of the motion vector are bitDepth, the range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" denotes exponential calculation. 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. For example, the value of the derived motion vector (e.g., the MVs of four 4x4 sub-blocks in one 8x8 block) is constrained so that the maximum difference between the integer parts of the MVs of the four 4x4 sub-blocks is less than or equal to N pixels, where N is less than or equal to 1 pixel. Here, we provide two methods for constraining motion vectors according to bitDepth.
[0146] Method 1: Remove the overflow most significant bit (MSB) by the following operation: ux=(mvx+2 bitDepth )%2 bitDepth (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) where mvx is the horizontal component of the motion vector of the image block or sub-block, mvy is the vertical component of the motion vector of the image block or sub-block, and ux and uy denote intermediate values.
[0147] For example, if the value of mvx is -32769, after applying equations (1) and (2), the resulting value is 32767. In computer systems, decimal numbers are stored as two's complement numbers. The two's complement of -32769 is 1, 0111, 1111, 1111, 1111 (17 bits), and in that case, since the MSB is discarded, the resulting two's complement is 0111, 1111, 1111, 1111 (decimal number 32767), which is the same as the output by applying equations (1) and (2). 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) The operation may be applied between the sum of mvp and mvd as shown in equations (5) to (8).
[0148] Method 2: Remove 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) where vx is the horizontal component of the motion vector of the image block or sub-block, vy is the vertical component of the motion vector of the image block or sub-block, x, y and z correspond to the three input values of the MV clipping process respectively, and the definition of the function Clip3 is as follows:
number
[0149] 4 is a schematic diagram of a video coding device 400 according to an embodiment of the present disclosure. Video coding device 400 is suitable for implementing embodiments of the disclosure as described herein. In an embodiment, video coding device 400 may be a decoder, such as video decoder 30 of FIG. 1A, or an encoder, such as video encoder 20 of FIG. 1A.
[0150] Video coding device 400 includes an ingress 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 egress port 450 (or output port 450) for transmitting data, and a memory 460 for storing data. Video coding device 400 may also include optical-to-electrical (OE) and electrical-to-optical (EO) components coupled to ingress port 410, receiver unit 420, transmitter unit 440, and egress port 450 for the egress or ingress of optical or electrical signals.
[0151] The processor 430 is implemented in hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. The processor 430 communicates with the ingress port 410, the receiver unit 420, the transmitter unit 440, the egress port 450, and the memory 460. The processor 430 includes a coding module 470. The coding module 470 implements the above-disclosed embodiments. For example, the coding module 470 implements, processes, prepares, or provides various coding operations. Thus, what is included in the coding module 470 provides substantial improvements to the functionality of the video coding device 400 and results in the transformation of the video coding device 400 into a different state. Alternatively, the coding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0152] Memory 460 may include one or more disks, tape drives, and solid-state drives, and may be used for storing programs when such programs are selected for execution and as an overflow data storage device for storing instructions and data read during the execution of the 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).
[0153] FIG. 5 is a simplified block diagram of an apparatus 500 that may be used as one or both of source device 12 and destination device 14 from FIG. 1 according to an example embodiment.
[0154] Processor 502 in device 500 may be a central processing unit. Alternatively, processor 502 may be any other type of device or devices, now existing or later developed, that can manipulate or process information. While the disclosed implementations may be implemented with a single processor, such as processor 502, as shown, advantages in speed and efficiency may be achieved using more than one processor.
[0155] The memory 504 in the apparatus 500 may, in some implementations, 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 methods described herein. For example, the application programs 510 may include applications 1-N, which may further include a video coding application that performs methods described herein.
[0156] The apparatus 500 may also include one or more output devices, such as a display 518. The display 518 may, in one example, 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.
[0157] 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 accessible 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 configurations.
[0158] The embodiments presented here are described in more detail as follows: A video source represented by a bitstream may contain a sequence of pictures in decoding order, each of which (which may be a source picture or a decoded picture) contains one or more of the following sample sequences: - Luma (Y) only (monochrome) -Luma and two chromas (YCbCr or YCgCo) -Green, Blue and Red (GBR, also known as RGB) - Arrays representing other unspecified monochrome or tristimulus color samplings (e.g., YZX, also known as XYZ)
[0159] For convenience of notation and terminology in this disclosure, the variables and terms associated with these arrays will be referred to as luma (or L or Y) and chroma, and the two chroma arrays will be referred to as Cb and Cr.
[0160] Figure 9A shows the location of the chroma components for a 4:2:0 sampling scheme. Examples of other sampling schemes are shown in Figures 9B and 9C.
[0161] As shown in Figure 9A, in the 4:2:0 sampling scheme, there may be a shift between the grid of luma components and the grid of chroma components. In a 2x2 pixel block, the chroma components are actually shifted vertically by half a pixel compared to the luma components (see Figure 9A). Such a shift may have an effect on the interpolation filters when downsampling or upsampling a picture. In Figure 9D, various sampling patterns for an interlaced image are represented. This means that parity, i.e., whether the pixel is in the top or bottom field of an interlaced image, is also taken into account.
[0162] According to the Versatile Video Coding (VVC) specification draft, a special flag "sps_cclm_colocated_chroma_flag" is signaled at the sequence parameter level. The "sps_cclm_colocated_chroma_flag" flag equal to 1 specifies that the top-left downsampled luma sample in cross-component linear model intra prediction is co-located with the top-left luma sample. The "sps_cclm_colocated_chroma_flag" flag equal to 0 specifies that the top-left downsampled luma sample in cross-component linear model intra prediction is horizontally co-located with the top-left luma sample but is vertically shifted by 0.5 luma sample units relative to the top-left luma sample.
[0163] Affine motion compensation prediction In the real world, there are many kinds of motion, such as zoom in / out, rotation, perspective motion, translational motion, and other irregular motions. In HEVC (ITU-T H.265), only the translational motion model is used for motion compensation prediction (MCP). In VVC, affine transformation motion compensation prediction is applied. The affine motion field of a block is described by two or three control point motion vectors (CPMVs), which correspond to a four-parameter affine motion model and a six-parameter affine motion model, respectively. The CPMV positions for the four-parameter affine motion model are shown in Figure 6a, and the CPMV positions for the six-parameter affine motion model are shown in Figure 6b.
[0164] For a four-parameter motion model, the motion vector field (MVF) of a block is described by the following equation:
number
[0165] CPMV can be derived based on motion information of neighboring blocks (e.g., in the process of sub-block merging mode). Alternatively or additionally, CPMV can be derived by deriving a CPMV predictor (CPMVP) and obtaining the difference between CPMV and CPMVP from the bitstream.
[0166] To simplify motion compensation prediction, block-based affine transformation prediction is applied. For example, to derive the motion vector for each 4x4 sub-block, as shown in Figure 7, the motion vector of the center sample of each sub-block is calculated according to Equation (1) above and rounded to 1 / 16 fractional precision. A motion compensation interpolation filter is applied to generate a prediction for each sub-block using the derived motion vector.
[0167] After motion compensation prediction (MCP), the higher precision motion vectors for each sub-block are rounded and stored at quarter precision as the normal motion vectors.
[0168] 8 shows an example of a flowchart illustrating a process 800 for affine-based inter prediction (i.e., motion compensation using an affine motion model). The process 800 may include the following blocks:
[0169] At block 810, control point motion vector derivation is performed to generate a control point motion vector cpMvLX[cpIdx].
[0170] In block 830, motion vector array derivation is performed to generate a luma sub-block motion vector array mvLX[xSbIdx][ySbIdx] and a chroma sub-block motion vector array mvCLX[xSbIdx][ySbIdx]. Block 830 may include:
[0171] Block 831: Luma motion vector array derivation is performed to generate a luma sub-block motion vector array mvLX[xSbIdx][ySbIdx].
[0172] Block 833: Chroma motion vector array derivation is performed to generate a chroma sub-block motion vector array mvCLX[xSbIdx][ySbIdx].
[0173] At block 850, an interpolation process is performed to generate a prediction, i.e., an array of prediction samples, predSamples, for each sub-block with the derived motion vector.
[0174] The embodiment presented here focuses primarily on block 833 for chroma motion vector array derivation (this block is shown in bold in FIG. 8).
[0175] The details of the derivation process for chroma motion vectors in previous designs (in the conventional manner) are described as follows.
[0176] The inputs for this process (chroma motion vector array derivation) include: - the luma sub-block motion vector array mvLX[xSbIdx][ySbIdx], where xSbIdx=0..numSbX-1, ySbIdx=0..numSbY-1 and X is 0 or 1 - Horizontal chroma sampling ratio SubWidthC - Vertical chroma sampling ratio SubHeightC output: - Chroma sub-block motion vector array mvCLX[xSbIdx][ySbIdx], where xSbIdx=0..numSbX-1, ySbIdx=0..numSbY-1 and X is 0 or 1
[0177] This process is accomplished as follows: - The average luma motion vector mvAvgLX is derived as follows: mvAvgLX=mvLX[(xSbIdx>>1<<1)][(ySbIdx>>1<<1)]+mvLX[(xSbIdx>>1<<1)+1][(ySbIdx>>1<<1)+1] (2) mvAvgLX[0]=(mvAvgLX[0]>=0?(mvAvgLX[0]+1)>>1:-((-mvAvgLX[0]+1)>>1)) (3) mvAvgLX[1]=(mvAvgLX[1]>=0?(mvAvgLX[1]+1)>>1:-((-mvAvgLX[1]+1)>>1)) (4) - Scale mvAvgLX according to the reference index value refIdxLX. Specifically, If the reference picture corresponding to refIdxLX for the current coding unit is not the current picture, the following applies: mvCLX[0]=mvLX[0]*2 / SubWidthC mvCLX[1]=mvLX[1]*2 / SubHeightC Otherwise (if the reference picture corresponding to refIdxLX for the current coding unit is the current picture), the following applies: mvCLX[0]=((mvLX[0]>>(3+SubWidthC))*32 mvCLX[1]=((mvLX[1]>>(3+SubHeightC))*32
[0178] In the above design, the calculation of mvAvgLX does not take into account chroma subsampling, which leads to an inaccurate estimation of the motion field when one of the variables SubWidthC and SubHeightC is equal to 1.
[0179] Embodiments of the present invention solve this problem by subsampling the luma motion field based on the chroma format of the picture, thereby improving the accuracy of the chroma motion field. More specifically, embodiments of the present invention disclose a method for taking the chroma format of a picture into account when obtaining chroma motion vectors from luma motion vectors. Linear subsampling of the luma motion field is performed by averaging the luma motion vectors. Selecting a luma motion vector based on the picture chroma format results in a more accurate chroma motion field due to more accurate luma motion vector field subsampling. This dependence on the chroma format enables the selection of an optimal luma block when averaging the luma motion vectors. As a result of more accurate motion field interpolation, prediction errors are reduced, which has the technical consequence of improved compression performance.
[0180] In one example implementation, Table 1-1 shows chroma formats that can be supported in this disclosure. Chroma format information such as chroma_format_idc and / or separate_colour_plane_flag may be used to determine the values of the variables SubWidthC and SubHeightC. [Table 1]
[0181] chroma_format_idc specifies the chroma sampling relative to the luma sampling. The value of chroma_format_idc must be between 0 and 3 inclusive.
[0182] separate_colour_plane_flag equal to 1 specifies that the three color components of the 4:4:4 chroma format are coded separately. separate_colour_plane_flag equal to 0 specifies that the color components are not coded separately. When separate_colour_plane_flag is not present, it is inferred to be equal to 0. When separate_colour_plane_flag is equal to 1, the coded picture consists of three separate components, each of which consists of coded samples of one color plane (Y, Cb, or Cr), and uses the monochrome coding syntax.
[0183] The chroma format determines the priority and subsampling of the chroma ordering.
[0184] In monochrome sampling, there is only one sample array, nominally considered the luma array.
[0185] In 4:2:0 sampling, each of the two chroma arrays has half the height and half the width of the luma array, as shown in FIG. 9A.
[0186] In 4:2:2 sampling, each of the two chroma arrays has the same height and half the width of the luma array, as shown in Figure 9B.
[0187] For 4:4:4 sampling, the following applies depending on the value of separate_colour_plane_flag: - If separate_colour_plane_flag is equal to 0, each of the two chroma arrays has the same height and width as the luma array, as shown in Figure 9C. - Otherwise (separate_colour_plane_flag equals 1), the three colour planes are treated separately as a monochrome sampled picture.
[0188] In another exemplary implementation, Table 1-2 also shows chroma formats that can be supported in the present disclosure. Chroma format information such as chroma_format_idc and / or separate_colour_plane_flag may be used to determine the values of the variables SubWidthC and SubHeightC. [Table 2]
[0189] The number of bits required to represent each of the samples in the luma and chroma arrays in a video sequence is in the range of 8 to 16, and the number of bits used in the luma array may be different from the number of bits used in the chroma array.
[0190] When the value of chroma_format_idc is equal to 1, the nominal relative vertical and horizontal positions of the luma and chroma samples within a picture are shown in Figure 9A. Alternative relative positions of the chroma samples may be indicated in the video usability information.
[0191] When the value of chroma_format_idc is equal to 2, the chroma samples coexist with the corresponding luma samples, and their nominal positions within the picture are as shown in Figure 9B.
[0192] When the value of chroma_format_idc is equal to 3, all array samples coexist for all cases of the picture, and their nominal positions within the picture are as shown in Figure 9C.
[0193] In one exemplary implementation, the variables SubWidthC and SubHeightC are specified in Table 1-1 or Table 1-2 depending on the chroma format sampling structure specified through chroma_format_idc and separate_colour_plane_flag. It can be understood that chroma format information such as chroma format sampling structure is specified through chroma_format_idc and separate_colour_plane_flag.
[0194] Unlike previous designs, in this disclosure, the derivation of the position in the luma sub-block motion vector array may be applied for different chroma formats and depends on the values of the chroma scaling factors (e.g., SubWidthC and SubHeightC). It should be understood that the "horizontal and vertical chroma scaling factors" can also be referred to as "horizontal and vertical chroma sampling ratios."
[0195] Alternatively, in another exemplary implementation, SubWidthC and SubHeightC are expressed as: SubWidthC=(1+log2(w luma )-log2(w chroma )) and SubHeightC=(1+log2(h luma )-log2(h chroma )), and w luma and h luma are the width and height of the luma array, respectively, and w chroma and h chroma are the width and height of the chroma array, respectively.
[0196] In a possible implementation of some embodiments of the present disclosure, for a given chroma format, the process of determining the position or index in the luma motion vector array for a given index of a co-located chroma sub-block may be performed as follows:
[0197] First, the values of SubWidthC and SubHeightC are determined based on the chroma format of the picture (or frame) currently being coded or decoded.
[0198] Then, for each chroma space location specified by index xSbIdx=0..numSbX-1, ySbIdx=0..numSbY-1, where X is 0 or 1, the value of the chroma motion vector is stored as the corresponding mvCLX element. The steps for determining the chroma motion vector are as follows:
[0199] The first step is to perform the rounding and determine the x and y indices of the co-located luma sub-block. xSbIdx L =(xSbIdx>>(SubWidthC-1))<<(SubWidthC-1); ySbIdx L =(ySbIdx>>(SubHeightC-1))<<(SubHeightC-1)
[0200] The second step is to determine a set of luma sub-block positions that are further in the determination of the chroma motion vectors. A possible example for defining such a set S may be written as follows: S0=(xSbIdx L ,ySbIdx L ) S1=(xSbIdx L +(SubWidthC-1),ySbIdx L +(SubHeightC-1))
[0201] The third step is to calculate the mean vector mvAvgLX.
[0202] When the set S contains N elements, where N is a power of two, in one exemplary implementation, the motion vector mvAvgLX is determined as follows: - mvAvgLX=Σ i mvLX[Si x ][S i y ] - mvAvgLX[0]=(mvAvgLX[0]+N>>1)>>log2(N) - mvAvgLX[1]=(mvAvgLX[1]+N>>1)>>log2(N) where S i x and S i y is position S i are the x and y coordinates of
[0203] In summary, in one exemplary implementation, the determination of the mean vector mvAvgLX for averaging can be formulated as follows: mvAvgLX=mvLX[(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))] [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))]+ mvLX[(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1)] [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)] (Formula 1) - mvAvgLX[0]=(mvAvgLX[0]+N>>1)>>log2(N) (Formula 2) - mvAvgLX[1]=(mvAvgLX[1]+N>>1)>>log2(N) (Equation 3)
[0204] It is noted that the method for averaging luma motion vectors presented herein is not limited as described above, and the averaging function in this disclosure can be implemented in different implementation manners.
[0205] Although the above describes the process as a three-step process, it should be understood that the determination of the mean vector mvAvgLX formulated above in equations 1-3 can be performed in any order.
[0206] In another exemplary implementation, the third step can also be implemented as follows: - mvAvgLX=Σ i mvLX[S i x ][S i y ] - mvAvgLX[0]=(mvAvgLX[0]>=0?(mvAvgLX[0]+N>>1)>>log2(N): -((-mvAvgLX[0]+N>>1)>>log2(N)) (5) - mvAvgLX[1]=(mvAvgLX[1]>=0?(mvAvgLX[1]+N>>1)>>log2(N): -((-mvAvgLX[1]+N>>1)>>log2(N))) (6) where S i x and S i y is position S i are the x and y coordinates of
[0207] It should be noted that the method for averaging luma motion vectors presented herein is not limited as described above, and the averaging function in this disclosure can be implemented in different implementation manners.
[0208] The next step is to scale mvAvgLX according to the reference index value refIdxLX. In some examples, the scaling process is performed by replacing mvLX with mvAvgLX as follows (i.e., mvLX[0] is replaced with mvAvgLX[0], and mvLX[1] is replaced with mvAvgLX[1]): If the reference picture corresponding to refIdxLX for the current coding unit is not the current picture, the following applies: mvCLX[0]=mvLX[0]*2 / SubWidthC mvCLX[1]=mvLX[1]*2 / SubHeightC Otherwise (if the reference picture corresponding to refIdxLX for the current coding unit is the current picture), the following applies: mvCLX[0]=((mvLX[0]>>(3+SubWidthC))*32 mvCLX[1]=((mvLX[1]>>(3+SubHeightC))*32
[0209] Similarly, the derivation process for chroma motion vectors in Section 8.5.2.13 described below can be called with mvAvgLX and refIdxLX as inputs and the chroma motion vector array mvCLXSub[xCSbIdx][yCSbIdx] as output. In the process described in Section 8.5.2.13, mvLX is replaced by mvAvgLX, specifically mvLX[0] is replaced by mvAvgLX[0] and mvLX[1] is replaced by mvAvgLX[1].
[0210] The details of a possible implementation of the average vector mvAvgLX calculation in the derivation process for chroma motion vectors in the proposed method are described below in the format of an amendment to the VVC draft specification: There are several variations of the process.
[0211] 1. One of the variations of the average vector mvAvgLX calculation in the derivation process for chroma motion vectors of the proposed method may be written as follows in the format of the amendment to the VVC draft specification: … [Table 3]
[0212] Note: The above equations show examples of selecting luma motion vectors for average motion vector calculation (e.g., selecting luma subblock positions for a given chroma subblock position). The selected luma subblocks (and therefore their respective positions) are represented by their respective subblock indices in the horizontal and vertical directions. For example, as described above, for a given chroma subblock (xSbIdx, ySbIdx), if xSbIdx and ySbIdx are subblock indices of chroma subblocks in the horizontal and vertical directions, respectively, then two luma subblocks (and therefore their respective positions, e.g., their respective subblock indices) can be selected. One of the two selected luma subblocks can be represented by the subblock indices in the horizontal direction as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))] and the subblock indices in the vertical direction as [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))]. The other selected luma sub-blocks can be represented by horizontal sub-block indices as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(1>>(2-SubWidthC))] and vertical sub-block indices as [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(1>>(2-SubHeightC))]). Thus, the selection of luma blocks for averaging luma motion vectors depends on the picture chroma format. In particular, the selection of luma blocks for averaging luma motion vectors depends on chroma scaling factors SubWidthC and SubHeightC, which are determined based on the picture chroma format.
[0213] The mvAvgLX obtained above can be further processed as follows: mvAvgLX[0]=(mvAvgLX[0]>=0?(mvAvgLX[0]+1)>>1:-((-mvAvgLX[0]+1)>>1)) mvAvgLX[1]=(mvAvgLX[1]>=0?(mvAvgLX[1]+1)>>1:-((-mvAvgLX[1]+1)>>1))
[0214] It is noted that the methods for averaging luma motion vectors presented herein are not limited as described above, and the averaging function in this disclosure can be implemented in different ways. The derivation process for chroma motion vectors in Section 8.5.2.13, presented later in this disclosure, is called with mvAvgLX and refIdxLX as inputs and the chroma motion vector mvCLX[xSbIdx][ySbIdx] as output. …
[0215] 2. Another variation of the average vector mvAvgLX calculation in the derivation process for chroma motion vectors of the proposed method may be written as follows in the format of an amendment to the VVC draft specification: … [Table 4]
[0216] / / Note: The above equation shows an example of selecting luma motion vectors for average motion vector calculation (e.g., selecting luma subblock positions for a given chroma subblock position). The selected luma subblocks (and therefore their respective positions) are represented by their respective subblock indices in the horizontal and vertical directions. For example, as above, for a given chroma subblock (xSbIdx, ySbIdx), if xSbIdx and ySbIdx are subblock indices of chroma subblocks in the horizontal and vertical directions, respectively, then two luma subblocks (and therefore their respective positions, e.g., their respective subblock indices) can be selected. One of the two selected luma subblocks can be represented by the subblock indices in the horizontal direction as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))] and the subblock indices in the vertical direction as [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))]. The other selected luma sub-blocks can be represented by horizontal sub-block indices as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(1>>(4-SubWidthC-SubHeightC))] and vertical sub-block indices as [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(1>>(4-SubWidthC-SubHeightC))]). Thus, the selection of luma blocks for averaging luma motion vectors depends on the picture chroma format. In particular, the selection of luma blocks for averaging luma motion vectors depends on chroma scaling factors SubWidthC and SubHeightC, which are determined based on the picture chroma format.
[0217] Compared with the first variant, this variant uses a different method for determining the set of luma sub-blocks. In particular, 1>>(4-SubWidthC-SubHeightC) is used to determine the index of the second luma sub-block (the neighboring luma sub-block of the first luma sub-block) in this variant, while 1>>(2-SubWidthC) and 1>>(2-SubHeightC) are used in the first variant. In the first variant, the first luma sub-block itself, its diagonal neighbor, or its horizontal neighbor may be used as the second sub-block. In the second variant, either the first luma sub-block itself or its diagonal neighbor can be used as the second luma sub-block depending on the value of the chroma scaling factor.
[0218] The mvAvgLX obtained above can be further processed as follows: mvAvgLX[0]=(mvAvgLX[0]>=0?(mvAvgLX[0]+1)>>1:-((-mvAvgLX[0]+1)>>1)) mvAvgLX[1]=(mvAvgLX[1]>=0?(mvAvgLX[1]+1)>>1:-((-mvAvgLX[1]+1)>>1)) - The derivation process for chroma motion vectors in section 8.5.2.13 is called with mvAvgLX and refIdxLX as inputs and the chroma motion vector mvCLX[xSbIdx][ySbIdx] as output. …
[0219] It is noted that the methods for averaging luma motion vectors presented herein are not limited as described above, and the averaging function in this disclosure can be implemented in different ways.
[0220] 3. Another variation of the derivation process for chroma motion vectors of the proposed method may be described as follows in the format of an amendment to the VVC draft specification: ... [Table 5]
[0221] - The derivation process for chroma motion vectors in section 8.5.2.13 is called with mvAvgLX and refIdxLX as inputs and the chroma motion vector mvCLX[xSbIdx][ySbIdx] as output. …
[0222] 4. Another variation of the derivation process for chroma motion vectors of the proposed method may be described as follows in the format of an amendment to the VVC draft specification: … [Table 6]
[0223] / / Note: The above equation shows an example of selecting luma motion vectors for average motion vector calculation (e.g., selecting luma subblock positions for a given chroma subblock position). The selected luma subblocks (and therefore their respective positions) are represented by their respective subblock indices in the horizontal and vertical directions. For example, as above, for a given chroma subblock (xSbIdx, ySbIdx), if xSbIdx and ySbIdx are subblock indices of chroma subblocks in the horizontal and vertical directions, respectively, then two luma subblocks (and therefore their respective positions, e.g., their respective subblock indices) can be selected. One of the two selected luma subblocks can be represented by the subblock indices in the horizontal direction as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))] and the subblock indices in the vertical direction as [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))]. The other selected luma sub-blocks can be represented by horizontal sub-block indices as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1)] and vertical sub-block indices as [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)]). Thus, the selection of luma blocks for averaging luma motion vectors depends on the picture chroma format. In particular, the selection of luma blocks for averaging luma motion vectors depends on chroma scaling factors SubWidthC and SubHeightC, which are determined based on the picture chroma format.
[0224] The mvAvgLX obtained above can be further processed as follows: mvAvgLX[0]=mvAvgLX[0]>=0?mvAvgLX[0]>>1:-((-mvAvgLX[0])>>1) mvAvgLX[1]=mvAvgLX[1]>=0?mvAvgLX[1]>>1:-((-mvAvgLX[1])>>1)
[0225] It is noted that the methods for averaging luma motion vectors presented herein are not limited as described above, and the averaging function in this disclosure can be implemented in different ways.
[0226] Further details of determining certain luma sub-block positions when determining chroma motion vectors for different chroma formats are described below in conjunction with FIGS. 10A-10C and 11A-11C.
[0227] 10A shows an example illustrating co-located luma and chroma blocks included in a current image block (e.g., a coding block) of a current picture, where the chroma format of the current picture is 4:2:0. As shown in FIG. 10A and Table 1-1, when the chroma format of the current picture is 4:2:0, SubWidthC=2 and SubHeightC=2. If the width of a luma block is W and the height of the luma block is H, the width of the corresponding chroma block is W / SubWidthC and the height of the corresponding chroma block is H / SubHeightC. Specifically, for a current image block including co-located luma and chroma blocks, the luma block generally includes four times as many samples as the corresponding chroma block.
[0228] 10B is an example showing co-located luma and chroma blocks included in a current image block of a current picture, where the chroma format of the current picture is 4:2:2. As shown in FIG. 10B and Table 1-1 or 1-2, when the chroma format of the current picture is 4:2:2, SubWidthC=2 and SubHeightC=1. If the width of a luma block is W and the height of a luma block is H, the width of the corresponding chroma block is W / SubWidthC and the height of the corresponding chroma block is H / SubHeightC. Specifically, for a current image block that includes co-located luma and chroma blocks, the luma block generally includes twice the number of samples as the corresponding chroma block.
[0229] 10C is an example showing co-located luma and chroma blocks included in a current image block of a current picture, where the chroma format of the current picture is 4:4:4. As shown in FIG. 10C and Table 1-1 or 1-2, when the chroma format of the current picture is 4:4:4, SubWidthC=1 and SubHeightC=1. If the width of a luma block is W and the height of a luma block is H, the width of the corresponding chroma block is W / SubWidthC and the height of the corresponding chroma block is H / SubHeightC. Specifically, for a current image block that includes co-located luma and chroma blocks, the luma block generally includes the same number of samples as the corresponding chroma block.
[0230] FIG. 11A is an example showing the positions of two luma sub-blocks for a given position of a chroma sub-block during chroma motion vector derivation from a luma motion vector when the chroma format of the current picture is 4:2:0 as shown in FIG. 10A.
[0231] The x and y indices of the co-located luma sub-blocks are determined using the corresponding x and y indices of the chroma sub-blocks (denoted as xSbIdx, ySbIdx). xSbIdx L=(xSbIdx>>(SubWidthC-1))<<(SubWidthC-1); ySbIdx L =(ySbIdx>>(SubHeightC-1))<<(SubHeightC-1)
[0232] Two affine luma sub-blocks are selected for further averaging of these motion vectors. The positions of these two sub-blocks are defined as follows: - (xSbIdxL,ySbIdxL) and - (xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1))
[0233] As shown in Figure 11A, for the YUV4:2:0 format, the motion vectors of two luma sub-blocks of a diagonal luma block 1010 (8x8 luma size) are used for averaging, and the averaged MV is used in the affine sub-block motion vector derivation process for the chroma sub-blocks. In particular, Luma sub-block or chroma sub-block index 0: xSbIdx=0, ySbIdx=0 Luma or chroma sub-block index 1: xSbIdx=1, ySbIdx=0 Luma or chroma sub-block index 2: xSbIdx=0, ySbIdx=1 Luma or chroma sub-block index 3: xSbIdx=1, ySbIdx=1
[0234] According to the design of variant 4, the motion vector of each chroma subblock is derived based on the average value, which is obtained based on the motion vectors of the diagonal luma subblock 0 (mvLX[0][0]) and luma subblock 3 (mvLX[1][1]).
[0235] 11B is an example showing the positions of two luma sub-blocks for a given position of a chroma sub-block during chroma motion vector derivation from a luma motion vector when the chroma format of the current picture is 4:2:2 as shown in FIG. 10B. As shown in FIG. 11B, for the YUV 4:2:2 format, the motion vectors of two horizontally adjacent luma sub-blocks of a luma block 1010 (8x8 luma size) are used for averaging, and the averaged MV is used in the affine sub-block motion vector derivation process for the chroma sub-block. In particular, Luma sub-block or chroma sub-block index 0: xSbIdx=0, ySbIdx=0 Luma or chroma sub-block index 1: xSbIdx=1, ySbIdx=0 Luma or chroma sub-block index 2: xSbIdx=0, ySbIdx=1 Luma or chroma sub-block index 3: xSbIdx=1, ySbIdx=1
[0236] According to the design of Variation 4 above, the motion vector of each chroma sub-block on the first row of chroma blocks 920 is derived based on an average value, where the average value is obtained based on the motion vectors of horizontally adjacent luma sub-block 0 (mvLX[0][0]) and luma sub-block 1 (mvLX[1][0]). The motion vector of each chroma sub-block on the second row of chroma blocks 920 is derived based on an average value, where the average value is obtained based on the motion vectors of horizontally adjacent luma sub-block 2 (mvLX[0][1]) and luma sub-block 3 (mvLX[1][1]).
[0237] FIG. 11C is an example showing the position of the luma sub-block for a given position of the chroma sub-block during chroma motion vector derivation from the luma motion vector when the chroma format of the current picture is 4:4:4 as shown in FIG. 10C.
[0238] As shown in Figure 11C, for the YUV 4:4:4 format, the motion vector of the co-located luma sub-block of the luma block 1010 (8x8 luma size) is used for each chroma sub-block to perform affine prediction, i.e., the affine sub-block motion vector derivation process for chroma is the same as that for luma.
[0239] It should be understood that no averaging is required, i.e., the motion vector can be determined by using the motion vector of the co-located luma sub-block, or this averaging operation takes the same MV twice as input and produces the same motion vector as output. The luma or chroma sub-block size may be 4x4 size.
[0240] 12A shows some examples of subsets S containing the positions of luma sub-blocks for given positions of chroma sub-blocks when the chroma format is set to 4:4:4. In this example, four cases of subset S derivation are considered.
[0241] In the first case, chroma position "A" (1201) has a corresponding neighboring luma block located at position "A" (1202).
[0242] In the second case, chroma position "B" (1203) is selected on the bottom boundary of the chroma block, in which case (except for the bottom-right position) the corresponding position 1204 of the luma sub-block belonging to S is selected to be horizontally adjacent.
[0243] In the third case, a chroma position "C" (1205) is selected on the right boundary of the chroma block, in which case (except for the bottom-right position) the corresponding position 1206 of the luma sub-block belonging to S is selected to be vertically adjacent.
[0244] In the fourth case, chroma position "D" (1207) is selected at the bottom right corner of the chroma block, in which case set S includes a single luma sub-block located at the bottom right corner of the luma block.
[0245] 12B shows another embodiment of obtaining subset S. In this embodiment, chroma blocks located on the boundary of chroma blocks have corresponding positions within the luma block, such as the fourth case "D" shown in FIG. 12A.
[0246] In the above embodiment of the present disclosure, when chroma subsampling is used, the number of chroma subblocks is the same as the number of co-located luma subblocks. In particular, the number of horizontal luma subblocks numSbX is the same as the number of horizontal chroma subblocks numSbX, and the number of vertical luma subblocks numSbY is the same as the number of vertical chroma subblocks numSbY. Therefore, when chroma subsampling is used, the chroma subblock size is different from the size of the co-located luma subblocks.
[0247] In other scenarios, the sizes of the chroma and luma sub-blocks are kept the same regardless of the chroma format. In these scenarios, the number of chroma sub-blocks in a chroma block may be different from the number of luma sub-blocks in the co-located luma block. The following embodiments are directed to chroma motion vector derivation for sub-blocks of the same size for chroma and luma components. That is, for a current picture including a current image block including co-located luma and chroma blocks, the luma block of the current picture includes a set of luma sub-blocks of equal size, and the chroma block of the current picture includes a set of chroma sub-blocks of equal size, with the size of the chroma sub-blocks set equal to the size of the luma sub-block. It can be understood that if chroma subsampling is used, the number of chroma sub-blocks may be different from the number of co-located luma sub-blocks. In particular, the number of luma sub-blocks along the horizontal direction, numSbX, is different from the number of chroma sub-blocks along the horizontal direction, and the number of luma sub-blocks along the vertical direction, numSbY, is different from the number of chroma sub-blocks along the vertical direction, numSbY.
[0248] As shown in FIG. 13A, for the YUV4:2:0 format, for example, the luma block of the current picture has a size of 8x8, four equally sized luma sub-blocks are included in the luma block, and a set of equally sized chroma sub-blocks is included in the chroma block of the current picture (chroma sub-block = chroma block), with the size of the chroma sub-block set equal to the size of the luma sub-block. The motion vectors of two diagonally aligned luma sub-blocks are averaged, and the averaged motion vector is used in the affine sub-block motion vector derivation process for the chroma sub-block. In particular, since the number of sub-blocks is different, xSbIdx (the sub-block index of the luma sub-block in the horizontal direction) changes with the step size of SubWidth, and ySbIdx (the sub-block index of the luma sub-block in the vertical direction) changes with the step size of SubHeightC. For example, for the 4:2:0 format, xSbIdx = 0, 2, 4, 6... and ySbIdx = 0, 2, 4, 6...
[0249] As shown in Figure 13B, for the YUV4:2:2 format, to generate a motion vector for a chroma sub-block, the motion vectors of two horizontally adjacent luma sub-blocks are averaged according to the formula in Variation 4 above. The averaged MV is used in the affine sub-block motion vector derivation process for the chroma sub-block. In particular, since the number of sub-blocks is different, xSbIdx changes with the step size of SubWidth, and ySbIdx changes with the step size of SubHeightC. For example, for 4:2:2, xSbIdx = 0, 2, 4, 8... and ySbIdx = 0, 1, 2, 3...
[0250] As shown in FIG. 13C , in the YUV 4:4:4 format, both the number and size of the luma sub-blocks and the chroma sub-blocks are equal. In this case, for each chroma sub-block, the motion vector of the co-located luma sub-block is used to perform affine prediction. In other words, the affine sub-block motion vector derivation process for chroma blocks is the same as that for luma blocks. For example, for the 4:4:4 format, xSbIdx = 0, 1, 2, 3... and ySbIdx = 0, 1, 2, 3.... It should be noted that in this case, the averaging operation specified in the equations of Variation 4 above does not need to be performed because the two sub-blocks used for averaging are the same and the averaging operation outputs the same value as the input. Therefore, in this case, the motion vector of the luma sub-block can be selected for the chroma sub-block without undergoing the averaging operation formulated in the equations of any of the previous variations.
[0251] From the above, it can be seen that when SubWidthC is greater than 1 or SubHeightC is greater than 1, the block has a number of chroma sub-blocks that differs from the number of luma sub-blocks. Figure 14A shows an example of subdivision of a 16x16 luma block and co-located chroma blocks for the YUV4:2:0 chroma format. In this example, the luma block is divided into 16 sub-blocks, each having a size of 4x4. The chroma block has a size of 8x8 samples and is subdivided into a total of four sub-blocks, each having a size of 4x4 samples. These four chroma sub-blocks are grouped into two rows, each having two sub-blocks. The letters "A," "B," "C," and "D" indicate which luma sub-block is used to derive the motion vector for the corresponding chroma sub-block indicated by the same letter.
[0252] Figure 14B shows the subdivision of a 16x16 luma block and its co-located chroma block in a picture having a YUV4:2:2 chroma format. In this case, the chroma block has a size of 8x16 samples and is subdivided into a total of eight sub-blocks grouped into four rows with each row having two sub-blocks. Each luma and chroma sub-block has a size of 4x4 samples. The letters "A," "B," "C," "D," "E," "F," "G," and "H" indicate which luma sub-block is used to derive the motion vector of the corresponding chroma sub-block indicated by the same letter.
[0253] Assuming that a luma block is subdivided into numSbY rows of sub-blocks, each row having numSbX sub-blocks, and a motion vector is specified or obtained for each of the luma sub-blocks, the embodiment presented here may be specified as follows:
[0254] 1. The first step is to determine the values of SubWidthC and SubHeightC based on the chroma format information indicating the chroma format of the picture (or frame) currently being coded or decoded. For example, the chroma format information may include the information presented in Table 1-1 or Table 1-2 above.
[0255] 2. The second step may include obtaining the number of chroma sub-blocks along the horizontal direction, numCSbX, and the number of chroma sub-blocks along the vertical direction, numCSbY, as follows: numCSbX=numSbX>>(SubWidthC-1), where numSbX is the number of luma sub-blocks in a luma block along the horizontal direction; numCSbY=numSbY>>(SubHeightC-1), where numSbY is the number of luma sub-blocks in the luma block along the vertical direction.
[0256] The luma block may be the currently coded or decoded block of the currently coded or decoded picture.
[0257] 3. Use spatial index (xCSbIdx, yCSbIdx) to indicate a chroma sub-block located at row yCSbIdx and column xCSbIdx, where xCSbIdx=0,...,numCSbX-1 and yCSbIdx=0..numCSbY-1, and the value of the chroma motion vector for the chroma sub-block can be determined as follows:
[0258] The spatial index of the co-located luma sub-block (xSbIdx L, ySbIdx L ) is determined as follows: xSbIdx L =xCSbIdx<<(SubWidthC-1); ySbIdx L =yCSbIdx<<(SubHeightC-1)
[0259] The spatial position (sbX, sbY) of a chroma sub-block within a chroma block may be derived using the spatial index (xCSbIdx, yCSbIdx) as follows: sbX=xCSbIdx*sbX; sbY=yCSbIdx*sbY
[0260] The same applies to determining the spatial position for a luma sub-block within the luma block spatial index (xSbIdx, ySbIdx) of the luma sub-block. sbX=xSbIdx*sbX; sbY=ySbIdx*sbY
[0261] Co-located luma sub-blocks (xSbIdx L ,ySbIdx L ) can be further used in determining the chroma motion vector. For example, the set of luma sub-blocks can be defined as follows: S0=(xSbIdx L ,ySbIdx L ) S1=(xSbIdx L +(SubWidthC-1),ySbIdx L +(SubHeightC-1))
[0262] In this example, the set of luma sub-blocks includes two sub-blocks indexed by S0 and S1 calculated above, each of which includes a pair of spatial indices that define the sub-block position.
[0263] The set of luma sub-blocks is used to calculate an average motion vector mvAvgLX, where in the motion vector notation used below, X can be either 0 or 1, correspondingly indicating that the reference list index for the motion vector is either L0 or L1, where L0 indicates reference list 0 and L1 indicates reference list 1. It is assumed that the motion vector calculation is performed by independently applying the corresponding equation to the horizontal component mvAvgLX[0] and vertical component mvAvgLX[1] of the motion vector.
[0264] Spatial Index (xSbIdx L ,ySbIdx L ) is the luma motion vector of the sub-block with mvLX[xSbIdx L ][ySbIdx L ], the average motion vector mvAvgLX may be obtained as follows: mvAvgLX=Σ i mvLX[S i x ][S i y ] mvAvgLX=mvAvgLX>=0?mvAvgLX>>1:-((-mvAvgLX)>>1) Here, as above, S i x and S i y is element S iare the horizontal and vertical spatial indices of the
[0265] The motion vector of the chroma sub-block mvCLX with spatial index (xCSbIdx, yCSbIdx) is obtained from the average motion vector mvAvgLX as follows: mvCLX[0]=mvAvgLX[0]*2 / SubWidthC mvCLX[1]=mvAvgLX[1]*2 / SubHeightC
[0266] The details of the derivation process for luma and chroma motion vectors according to the embodiment presented here are described below in the format of part of the VVC draft specification. [Table 7] TIFF0007823167000010.tif130169
[0267] It should be noted that this embodiment differs from the previous embodiment. In the previous embodiment, the number of luma sub-blocks in a luma block is the same as the number of chroma sub-blocks in the co-located chroma block. However, in this embodiment, for chroma formats 4:2:0 and 4:2:2, the number of luma sub-blocks in a luma block is different from the number of chroma sub-blocks in the co-located chroma block. Because the number of sub-blocks is different in the chroma block and the luma block, xSbIdx changes with the step size of SubWidth, and ySbIdx changes with the step size of SubHeightC, as can be seen below. [Table 8]
[0268] It should be noted that the averaging operations presented above are for illustrative purposes and should not be construed as limiting. Various other methods are available for performing the averaging operation in determining chroma motion vectors from luma motion vectors. [Table 9]
[0269] The behavior of this derivation process depends on how it is called. For example, it was previously stated that "the derivation process for chroma motion vectors in Section 8.5.2.13 is called with mvAvgLX and refIdxLX as inputs and the chroma motion vector array mvCLXSub[xCSbIdx][yCSbIdx] as output." In this example, mvLX in Section 8.5.2.13 described here is replaced with mvAvgLX to perform the behavior when called.
[0270] There are further aspects to the embodiment that consider the offset between the sub-sampling positions of the chroma samples with respect to the position of the luma samples.
[0271] An exemplary embodiment is to define or determine the set S of luma sub-blocks according to the value of "sps_cclm_colocated_chroma_flag". Specifically, - When SubHeightC=1 and SubWidthC=2 and sps_cclm_colocated_chroma_flag is set equal to 1, the set S has a single element S0=(xSbIdx L ,ySbIdx L ) Otherwise, the set S contains: S0=(xSbIdx L ,ySbIdx L ) S1=(xSbIdx L +(SubWidthC-1),ySbIdx L+(SubHeightC-1))
[0272] Another example embodiment introduces a dependency between the determination of the average motion vector and the value of "sps_cclm_colocated_chroma_flag." In particular, weights are introduced into the averaging operation and may be specified differently for different luma sub-blocks. An example process for average motion vector derivation is as follows: -xSbIdx L =xCSbIdx<<(SubWidthC-1) - ySbIdx L =yCSbIdx<<(SubHeightC-1) sps_cclm_colocated_chroma_flag is set equal to 1, and the weighting factors w0 and w1 are set as follows: w0=5, w1=3. mvAvgLX=w0*mvLX[xSbIdx L ][ySbIdx L ]+ +w1*mvLX[xSbIdx L +(SubWidthC-1)][ySbIdx L +(SubHeightC-1)] mvAvgLX[0]=mvAvgLX[0]>=0?(mvAvgLX[0]+3)>>3:-((-mvAvgLX[0]+3)>>3) mvAvgLX[1]=mvAvgLX[1]>=0?(mvAvgLX[1]+3)>>3:-((-mvAvgLX[1]+3)>>3)
[0273] It should be noted that the averaging operation presented in this example is for illustrative purposes and should not be construed as limiting. Various other methods are available for performing the averaging operation in determining chroma motion vectors from luma motion vectors.
[0274] FIG. 15 is a flowchart of an example method 1300 for affine-based inter prediction of chroma sub-blocks, the method including:
[0275] In step 1501, determine horizontal and vertical chroma scaling factors based on chroma format information, where the chroma format information indicates the chroma format of the current picture to which the current image block belongs.
[0276] In step 1503, a set (S) of luma sub-blocks of the luma block is determined based on the value of the chroma scaling factor.
[0277] In step 1505, a motion vector for a chroma sub-block of the chroma block is determined based on the motion vectors of one or more luma sub-blocks in the set (S) of luma sub-blocks.
[0278] FIG. 16 is a flowchart of another example method 1300 for affine-based inter prediction of chroma sub-blocks, which includes:
[0279] In step 1601, determine horizontal and vertical chroma scaling factors based on chroma format information, where the chroma format information indicates the chroma format of the current picture to which the current image block belongs.
[0280] In step 1603, a value of a motion vector for each luma sub-block in the plurality of luma sub-blocks is determined, where N luma sub-blocks are included in the luma block.
[0281] In step 1605, the motion vectors of the luma sub-blocks within a set S of luma sub-blocks are averaged, where the set (S) is determined based on the chroma scaling factor.
[0282] In step 1607, for a chroma sub-block in the plurality of chroma sub-blocks, derive a motion vector for the chroma sub-block based on an average luma motion vector, where the chroma sub-block is included in the chroma block.
[0283] The present invention discloses a method for taking the chroma format of a picture into account when obtaining chroma motion vectors from luma motion vectors. By averaging luma motion vectors, linear subsampling of the luma motion field is performed. It turns out that when a chroma color plane has the same height as the luma plane, it is more appropriate to select a motion vector from a horizontally adjacent luma block. The selection of luma motion vectors that depends on the picture chroma format results in a more accurate chroma motion field due to more accurate luma motion vector field subsampling. This dependence on the chroma format enables the selection of an optimal luma block position when averaging luma motion vectors. As a result of more accurate motion field interpolation, prediction errors are reduced, which has technical consequences in improving compression performance.
[0284] Furthermore, when the number of chroma sub-blocks is defined as equal to the number of luma sub-blocks, and the chroma color plane size is not equal to the luma plane size, the motion vectors of adjacent chroma sub-blocks may assume the same value. When implementing this processing step, optimization may be performed by skipping the iterative value calculation step. The proposed invention discloses a method for defining the size of chroma sub-blocks equal to the size of luma sub-blocks. In this case, the implementation method may be simplified by unifying luma and chroma processing, and redundant motion vector calculations are naturally avoided.
[0285] 17 shows a device 1700 for affine-based inter prediction according to another embodiment of the present invention. a determining module 1701 configured to determine horizontal and vertical chroma scaling factors based on chroma format information, the chroma format information indicating a chroma format of a current picture to which the current image block belongs, and configured to determine a set (S) of luma sub-blocks of the luma block based on values of the chroma scaling factors; a motion vector derivation module 1703 configured to determine a motion vector for a chroma sub-block of the chroma block based on the motion vector of one or more luma sub-blocks in the set (S) of luma sub-blocks; Includes.
[0286] In one example, the motion vector derivation module 1703 a luma motion vector derivation module 1703a configured to determine a value of a motion vector for each luma sub-block in a plurality of luma sub-blocks, the plurality of luma sub-blocks being included in a luma block; and a chroma motion vector derivation module 1703b configured to determine, for a chroma sub-block within the plurality of chroma sub-blocks, a motion vector for the chroma sub-block based on a motion vector of at least one luma sub-block within a set (S) of luma sub-blocks, wherein the set (S) is determined based on a chroma scaling factor, and the chroma sub-block is included within the chroma block; and In an equal size design, multiple chroma sub-blocks may include only one chroma sub-block.
[0287] The device 1700 further includes a motion compensation module 1705 configured to generate a prediction of the chroma sub-block based on the determined motion vector.
[0288] Correspondingly, in one example, the exemplary structure of the device 1700 may correspond to the encoder 200 in Figure 2. In another example, the exemplary structure of the device 1700 may correspond to the decoder 300 in Figure 3.
[0289] In other examples, the exemplary structure of the device 1700 may correspond to the inter prediction unit 244 in Figure 2. In other examples, the exemplary structure of the device 1700 may correspond to the inter prediction unit 344 in Figure 3.
[0290] The present disclosure provides the following further aspects.
[0291] According to a first aspect of the present invention, there is provided a method for chroma motion vector derivation used in affine motion compensation of an inter prediction unit (PU), where the PU includes co-located luma and chroma blocks, the method comprising: determining chroma scaling factors in the horizontal and vertical directions (SubWidthC and SubHeightC) based on the chroma format of a current picture (e.g., a picture currently being coded or decoded); dividing a luma block of a current picture into a first set of luma sub-blocks; obtaining a motion vector value for each luma sub-block in the first set of luma sub-blocks; Dividing chroma blocks (in one example, chroma blocks and luma blocks are included in the same PU) of a current picture into a set of chroma sub-blocks; determining a second set (S) of luma sub-blocks for the chroma sub-blocks in the set of chroma sub-blocks, the positions of the luma sub-blocks in the second set being determined by the chroma format of the current picture; deriving motion vectors for the chroma sub-blocks based on the motion vectors of the luma sub-blocks in the second set S; Includes.
[0292] In a possible realization of the method according to the first aspect itself, the second set of luma sub-blocks (S) comprises the following sub-blocks: S0=(xSbIdxL,ySbIdxL) S1=(xSbIdxL,ySbIdxL+(SubHeightC-1)) S2=(xSbIdxL+(SubWidthC-1),ySbIdxL) S3=(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) Includes any combination of:
[0293] In a possible implementation of any of the preceding implementations of the first aspect or of the method according to the first aspect itself, the second set of luma sub-blocks (S) comprises two sub-blocks: S0=(xSbIdxL,ySbIdxL) S1=(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) Includes.
[0294] In a possible implementation form of the method according to any of the preceding implementation schemes of the first aspect or the first aspect itself, deriving motion vectors for chroma sub-blocks based on motion vectors of luma sub-blocks in the second set S includes averaging the motion vectors of luma sub-blocks in the second set S.
[0295] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, averaging the motion vectors of the luma sub-blocks in the second set S comprises the following steps: mvAvgLX=Σ i mvLX[S i x ][S i y ] mvAvgLX[0]=(mvAvgLX[0]+N>>1)>>log2(N) mvAvgLX[1]=(mvAvgLX[1]+N>>1)>>log2(N) where mvAvgLX is the result of the averaging, mvAvgLX[0] is the horizontal component of the motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the motion vector mvAvgLX, and S i x and S i y are the horizontal and vertical indices of the sub-block Si in the motion vector array, and mvLX[S i x ][S iy ] is the index S i x and S i y where N is the number of elements in the second set (S) of luma sub-blocks, log2(N) is the power to which the number 2 must be raised to obtain the value N, and ">>" is a right arithmetic shift.
[0296] In a possible implementation of the method according to any of the preceding implementations of the first aspect or the first aspect itself, averaging the motion vectors of the luma sub-blocks in the second set S comprises the following steps: mvAvgLX=Σ i mvLX[S i x ][S i y ] If mvAvgLX[0] is greater than or equal to 0, mvAvgLX[0]=(mvAvgLX[0]+N>>1)>>log2(N), otherwise mvAvgLX[0]=-((-mvAvgLX[0]+N>>1)>>log2(N)) If mvAvgLX[1] is greater than or equal to 0, mvAvgLX[1]=(mvAvgLX[1]+N>>1)>>log2(N), otherwise mvAvgLX[1]=-((-mvAvgLX[1]+N>>1)>>log2(N)) where mvAvgLX is the result of the averaging, mvAvgLX[0] is the horizontal component of the motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the motion vector mvAvgLX, and S i x and S i y are the horizontal and vertical indices of the sub-block Si in the motion vector array, and mvLX[S i x ][S i y ] is the index S i x and Si y where N is the number of elements in the second set (S) of luma sub-blocks, log2(N) is the power to which the number 2 must be raised to obtain the value N, and ">>" is a right arithmetic shift.
[0297] According to a second aspect of the present invention, there is provided a method for chroma motion vector derivation used in affine motion compensation of an inter prediction unit (PU), where the PU includes co-located luma and chroma blocks, the method comprising: obtaining a first set of luma sub-blocks, the first set of luma sub-blocks being included in a luma block of a current picture (e.g., a picture currently being coded or decoded); obtaining a motion vector value for each luma sub-block in the first set of luma sub-blocks; obtaining a set of chroma sub-blocks, the set of chroma sub-blocks being included in a chroma block of the current picture (in one example, the chroma block and the luma block are included in the same PU); deriving motion vectors for chroma sub-blocks based on motion vectors of luma sub-blocks in a second set (S) of luma sub-blocks, for which the second set (S) of luma sub-blocks is determined from the first set of luma sub-blocks according to a chroma format of the current picture; Includes.
[0298] In a possible realization of the method according to the second aspect itself, the second set of luma sub-blocks (S) comprises the following sub-blocks: S0=(xSbIdxL,ySbIdxL) S1=(xSbIdxL,ySbIdxL+(SubHeightC-1)) S2=(xSbIdxL+(SubWidthC-1),ySbIdxL) S3=(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) Includes any combination of:
[0299] In a possible implementation of any of the preceding implementations of the second aspect or of the method according to the second aspect itself, the second set of luma sub-blocks (S) comprises two sub-blocks: S0=(xSbIdxL,ySbIdxL) S1=(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) Includes.
[0300] In a possible implementation of the method according to any of the preceding implementations of the second aspect or the second aspect itself, deriving motion vectors for chroma sub-blocks based on motion vectors of luma sub-blocks in the second set S comprises: Averaging the motion vectors of the luma sub-blocks in the second set S.
[0301] In a possible implementation of the method according to any of the preceding implementations of the second aspect or the second aspect itself, averaging the motion vectors of the luma sub-blocks in the second set S comprises: averaging the horizontal components of the motion vectors of the luma sub-blocks in the second set S, and / or Averaging the vertical components of the motion vectors of the luma sub-blocks in the second set S.
[0302] In a possible implementation of the method according to any of the preceding implementations of the second aspect or the second aspect itself, averaging the elements may be performed by averaging the elements (mvLX[S i x ][S i y ], etc.) is greater than or equal to zero; If the sum of the elements is greater than or equal to 0, the sum of the elements is divided by a shift operation that depends on the number of elements, Otherwise, the absolute value of the sum of the elements is divided by a shift operation that depends on the number of elements, and a negative value is obtained from the shift result.
[0303] In a possible implementation of the method according to any of the preceding implementations of the second aspect or the second aspect itself, the step of dividing by shifting operations comprises: Rounding towards 0, Rounding away from 0, rounding away from infinity, or Rounding to infinity Includes.
[0304] In a possible implementation of the method according to any preceding implementation of the second aspect or the second aspect itself, the averaging step comprises averaging or rounding away from zero.
[0305] In a possible implementation of the method according to any preceding implementation of the second aspect or the second aspect itself, the averaging step comprises averaging or rounding towards zero.
[0306] In a possible implementation of the method according to any preceding implementation of the second aspect or the second aspect itself, the averaging step comprises averaging or rounding away from infinity.
[0307] In a possible implementation of the method according to any preceding implementation of the second aspect or the second aspect itself, the averaging step comprises averaging or rounding towards infinity.
[0308] In a possible implementation of the method according to any of the preceding implementations of the second aspect or the second aspect itself, averaging the motion vectors of the luma sub-blocks in the second set S comprises the following steps: mvAvgLX=Σ i mvLX[S i x ][S i y ] mvAvgLX[0]=(mvAvgLX[0]+N>>1)>>log2(N) mvAvgLX[1]=(mvAvgLX[1]+N>>1)>>log2(N) where mvAvgLX is the result of the averaging, mvAvgLX[0] is the horizontal component of the motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the motion vector mvAvgLX, and S i x and S i y are the horizontal and vertical indices of the sub-block Si in the motion vector array, and mvLX[S i x ][S i y ] is the index S i x and S i y where N is the number of elements in the second set (S) of luma sub-blocks, log2(N) is the power to which the number 2 must be raised to obtain the value N, and ">>" is a right arithmetic shift.
[0309] In a possible implementation of the method according to any of the preceding implementations of the second aspect or the second aspect itself, averaging the motion vectors of the luma sub-blocks in the second set S comprises the following steps: mvAvgLX=Σ i mvLX[S i x ][S i y ] If mvAvgLX[0] is greater than or equal to 0, mvAvgLX[0]=(mvAvgLX[0]+N>>1)>>log2(N), otherwise mvAvgLX[0]=-((-mvAvgLX[0]+N>>1)>>log2(N)) If mvAvgLX[1] is greater than or equal to 0, mvAvgLX[1]=(mvAvgLX[1]+N>>1)>>log2(N), otherwise mvAvgLX[1]=-((-mvAvgLX[1]+N>>1)>>log2(N)) where mvAvgLX is the result of the averaging, mvAvgLX[0] is the horizontal component of the motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the motion vector mvAvgLX, and S i x and S i y are the horizontal and vertical indices of the sub-block Si in the motion vector array, and mvLX[S i x ][S i y ] is the index S i x and S i y where N is the number of elements in the second set (S) of luma sub-blocks, log2(N) is the power to which the number 2 must be raised to obtain the value N, and ">>" is a right arithmetic shift.
[0310] In a possible implementation of the method according to any of the preceding implementations of the second aspect or the second aspect itself, averaging the motion vectors of the luma sub-blocks in the second set S comprises the following steps: mvAvgLX=Σ i mvLX[S i x ][S i y ] If mvAvgLX[0] is greater than or equal to 0, mvAvgLX[0]=(mvAvgLX[0]+(N>>1)-1)>>log2(N), otherwise mvAvgLX[0]=-((-mvAvgLX[0]+(N>>1)-1)>>log2(N)) If mvAvgLX[1] is greater than or equal to 0, mvAvgLX[1]=(mvAvgLX[1]+(N>>1)-1)>>log2(N), otherwise mvAvgLX[1]=-((-mvAvgLX[1]+(N>>1)-1)>>log2(N)) where mvAvgLX is the result of the averaging, mvAvgLX[0] is the horizontal component of the motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the motion vector mvAvgLX, and S i x and S i y are the horizontal and vertical indices of the sub-block Si in the motion vector array, and mvLX[S i x ][S i y ] is the index S i x and S i y where N is the number of elements in the second set (S) of luma sub-blocks, log2(N) is the power to which the number 2 is raised to obtain the value N, and ">>" is a right arithmetic shift.
[0311] According to a third aspect of the present invention, there is provided a method for affine motion compensation of a current picture, the method comprising: dividing a luma block of a current picture into a set of luma sub-blocks of equal size; dividing the chroma blocks of the current picture into a set of equally sized chroma sub-blocks, the size of the chroma sub-blocks being set equal to the size of the luma sub-blocks; Includes.
[0312] In a possible realisation of the method according to the third aspect itself, said method comprises: The method further includes determining the number of chroma sub-blocks in the horizontal and vertical directions based on the value of the chroma scaling factor.
[0313] In a possible implementation of any of the preceding implementations of the third aspect or the method according to the third aspect itself, the horizontal and vertical chroma scaling factors (SubWidthC and SubHeightC) are determined based on the chroma format of the current picture (e.g., the picture currently being coded or decoded).
[0314] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, numCSbX=numSbX>>(SubWidthC-1), and numCSbY=numSbY>>(SubHeightC-1), numCSbX and numCSbY represent the number of chroma sub-blocks in the horizontal and vertical directions, respectively.
[0315] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, splitting the chroma blocks of the current picture comprises: This includes dividing the chroma blocks of the current picture (in one example, the chroma blocks and luma blocks are in the same PU) into numCSbY rows, with each row having numCSbX chroma sub-blocks.
[0316] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, the method comprises: determining, for each chroma sub-block, a set (S) of luma sub-blocks, the position of the luma sub-block within the set being determined by the chroma format of the current picture; deriving motion vectors for the chroma sub-blocks based on the motion vectors of the luma sub-blocks in the set S; Further includes:
[0317] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, a motion vector is defined for each of the luma sub-blocks belonging to the set S.
[0318] In a possible implementation of any of the preceding implementations of the third aspect or of the method according to the third aspect itself, the set of luma sub-blocks (S) comprises the following sub-blocks: S0=(xSbIdxL,ySbIdxL) S1=(xSbIdxL,ySbIdxL+(SubHeightC-1)) S2=(xSbIdxL+(SubWidthC-1),ySbIdxL) S3=(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) Includes any combination of:
[0319] In a possible implementation of any of the preceding implementations of the third aspect or of the method according to the third aspect itself, the set of luma sub-blocks (S) is divided into two sub-blocks: S0=(xSbIdxL,ySbIdxL) S1=(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) Includes.
[0320] In a possible implementation form of the method according to any of the preceding implementation schemes of the third aspect or the third aspect itself, deriving motion vectors for chroma sub-blocks based on motion vectors of luma sub-blocks in set S includes averaging the motion vectors of luma sub-blocks in set S.
[0321] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, averaging the motion vectors of the luma sub-blocks in the set S comprises: averaging the horizontal components of the motion vectors of the luma sub-blocks in the set S; It includes averaging the vertical components of the motion vectors of the luma sub-blocks in the set S.
[0322] In a possible implementation of the method according to any preceding implementation of the third aspect or the third aspect itself, averaging the elements comprises checking whether the sum of the elements is greater than or equal to zero.
[0323] In any preceding implementation of the third aspect or in a possible implementation of the method according to the third aspect itself, averaging means averaging away from zero.
[0324] In any preceding implementation of the third aspect or in a possible implementation of the method according to the third aspect itself, averaging means averaging towards zero.
[0325] In any preceding realization of the third aspect or in a possible realization of the method according to the third aspect itself, averaging means averaging away from infinity.
[0326] In any preceding realization of the third aspect or in a possible realization of the method according to the third aspect itself, averaging means averaging towards infinity.
[0327] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, averaging the motion vectors of the luma sub-blocks in the set S comprises the following steps: mvAvgLX=Σ i mvLX[S i x ][S i y ] mvAvgLX[0]=(mvAvgLX[0]+N>>1)>>log2(N) mvAvgLX[1]=(mvAvgLX[1]+N>>1)>>log2(N) where mvAvgLX is the result of the averaging, mvAvgLX[0] is the horizontal component of the motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the motion vector mvAvgLX, and S i x and S i y are the horizontal and vertical indices of the sub-block Si in the motion vector array, and mvLX[S i x ][S i y ] is the index Si x and S i y where N is the number of elements in the second set (S) of luma sub-blocks, log2(N) is the power to which the number 2 must be raised to obtain the value N, and ">>" is a right arithmetic shift.
[0328] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, averaging the motion vectors of the luma sub-blocks in the set S comprises the following steps: mvAvgLX=Σ i mvLX[S i x ][S i y ] If mvAvgLX[0] is greater than or equal to 0, mvAvgLX[0]=(mvAvgLX[0]+N>>1)>>log2(N), otherwise mvAvgLX[0]=-((-mvAvgLX[0]+N>>1)>>log2(N)) If mvAvgLX[1] is greater than or equal to 0, mvAvgLX[1]=(mvAvgLX[1]+N>>1)>>log2(N), otherwise mvAvgLX[1]=-((-mvAvgLX[1]+N>>1)>>log2(N)) where mvAvgLX is the result of the averaging, mvAvgLX[0] is the horizontal component of the motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the motion vector mvAvgLX, and S i x and S i y are the horizontal and vertical indices of the sub-block Si in the motion vector array, and mvLX[S i x ][S i y ] is the index S i x and S i ywhere N is the number of elements in the second set (S) of luma sub-blocks, log2(N) is the power to which the number 2 must be raised to obtain the value N, and ">>" is a right arithmetic shift.
[0329] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, averaging the motion vectors of the luma sub-blocks in the set S comprises the following steps: mvAvgLX=Σ i mvLX[S i x ][S i y ] If mvAvgLX[0] is greater than or equal to 0, mvAvgLX[0]=(mvAvgLX[0]+(N>>1)-1)>>log2(N), otherwise mvAvgLX[0]=-((-mvAvgLX[0]+(N>>1)-1)>>log2(N)) If mvAvgLX[1] is greater than or equal to 0, mvAvgLX[1]=(mvAvgLX[1]+(N>>1)-1)>>log2(N), otherwise mvAvgLX[1]=-((-mvAvgLX[1]+(N>>1)-1)>>log2(N)) where mvAvgLX is the result of the averaging, mvAvgLX[0] is the horizontal component of the motion vector mvAvgLX, mvAvgLX[1] is the vertical component of the motion vector mvAvgLX, and S i x and S i y are the horizontal and vertical indices of the sub-block Si in the motion vector array, and mvLX[S i x ][S i y ] is the index S i x and S i ywhere N is the number of elements in the second set (S) of luma sub-blocks, log2(N) is the power to which the number 2 must be raised to obtain the value N, and ">>" is a right arithmetic shift.
[0330] In a possible implementation of the method according to any preceding implementation of the third aspect or the third aspect itself, N is equal to 1.
[0331] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, the set S is determined based on the value of sps_cclm_colocated_chroma_flag.
[0332] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, the average motion vector derivation is performed based on the value of sps_cclm_colocated_chroma_flag.
[0333] In a possible implementation of the method according to any preceding implementation of the third aspect or the third aspect itself, the chroma format is defined as YUV4:2:2.
[0334] In a possible implementation of the method according to any of the preceding implementations of the third aspect or the third aspect itself, the chroma block and the luma block are included in the same PU, and the luma block and the chroma block are co-located.
[0335] A fourth aspect of the encoder (20) includes a processing circuit for carrying out the method according to any one of the first to third aspects.
[0336] A fifth aspect of the decoder (30) includes a processing circuit for carrying out the method according to any one of the first to third aspects.
[0337] A sixth aspect of a computer program product includes program code for executing the method according to any one of the first to third aspects.
[0338] A seventh aspect of the decoder is 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 processors, configuring the decoder to perform a method according to any one of the first to third aspects.
[0339] An eighth aspect of the encoder is 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 processors, configuring the encoder to perform a method according to any one of the first to third aspects.
[0340] Based on the above, the present disclosure is directed to disclosing a method for taking the chroma format of a picture into consideration when obtaining chroma motion vectors from luma motion vectors. By averaging the luma motion vectors, linear subsampling of the luma motion field is performed. When a chroma color plane has the same height as the luma plane, it is found to be more appropriate to select a motion vector from a horizontally adjacent luma block, so that they have the same vertical position. Selecting a luma motion vector depending on the picture chroma format results in a more accurate chroma motion field due to more accurate luma motion vector field subsampling. This dependence on the chroma format enables the selection of the most appropriate luma block when averaging the luma motion vectors to generate a chroma motion vector. As a result of more accurate motion field interpolation, prediction errors are reduced, which results in technical improvements in compression performance.
[0341] The following is a description of the application of the encoding and decoding methods as shown in the above embodiments and the systems using them.
[0342] 18 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 over a communication link 3104. The communication link may include the above-mentioned communication channel 13. The communication link 3104 includes, but is not limited to, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any combination thereof.
[0343] The capture device 3102 may generate data and encode the data using the encoding method described in the above embodiment. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown in the drawings), which then encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 may include, but is not limited to, a camera, a smartphone or pad, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, the capture device 3102 may include the source device 12 described above. When the data includes video, the video encoder 20 included in the capture device 3102 may actually perform video encoding processing. When the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually perform audio encoding processing. 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 conferencing 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 .
[0344] In the content delivery system 3100, a terminal device 3106 receives and plays the encoded data. The terminal device 3106 may be a device capable of receiving and restoring 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 conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination thereof, capable of decoding the encoded data. For example, the terminal device 3106 may include the destination device 14 described above. When the encoded data includes video, the video decoder 30 included in the terminal device is prioritized to perform video decoding. When the encoded data includes audio, the audio decoder included in the terminal device is prioritized to perform audio decoding.
[0345] In a terminal device having its own display, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video decoder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122 or an in-vehicle device 3124, the terminal device can provide the decoded data to its own display. In a terminal device without a display, such as an STB 3116, a video conferencing system 3118 or a video surveillance system 3120, an external display 3126 is brought into contact with it to receive and display the decoded data.
[0346] When each device in this system performs encoding or decoding, it can use a picture encoding device or a picture decoding device as shown in the above embodiment.
[0347] 19 is a diagram illustrating an example structure of the terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, the protocol processing unit 3202 analyzes the transmission protocol of the stream. The protocol may include, but is not limited to, Real Time Streaming Protocol (RTSP), Hyper Text Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real-time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any type of combination thereof.
[0348] After the protocol processing 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, for example, in a video conferencing system, the encoded audio data and encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204.
[0349] Through the demultiplexing process, a video elementary stream (ES), an audio ES, and optional subtitles are generated. A video decoder 3206, which includes the video decoder 30 as described in the above embodiment, decodes the video ES using the decoding method as shown in the above embodiment to generate video frames and supplies this data to a synchronization unit 3212. An audio decoder 3208 decodes the audio ES to generate audio frames and supplies this data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in Figure Y) before being supplied to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in Figure Y) before being supplied to the synchronization unit 3212.
[0350] 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. The information may be coded in the syntax using timestamps for the presentation of the coded audio and visual data and timestamps for the delivery of the data stream itself.
[0351] If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes them with the video and audio frames, and provides the video / audio / subtitles to the video / audio / subtitle display 3216 .
[0352] The present invention is not limited to the above system, and either the picture encoding device or the picture decoding device in the above embodiments can be incorporated into other systems, for example, vehicle systems.
[0353] Mathematical Operators The mathematical operators used in this application 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 operators such as exponentiation and division of real values are defined. Numbering and counting conventions generally start from 0, e.g., "first" is equivalent to 0th, "second" is equivalent to 1st, etc.
[0354] Logical operators The following logical operators are defined as follows: [Table 10]
[0355] Logical operators The following logical operators are defined as follows: x&&y The Boolean logic "product" of x and y x||y Boolean logic "union" of x and y Boolean logic "negation" x?y:z Evaluates to the value of y if x is true or not equal to 0, otherwise evaluates to the value of z
[0356] Relational operators The following relational operators are defined as follows: > greater than >= Greater than or equal to < Less than <= Less than or equal to == Equal to != Not equal to
[0357] 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 considered not equal to any other value.
[0358] Bitwise Operators The following bitwise operators are defined as follows: & Bitwise "product". When operating on integer arguments, the operation is performed on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than the other arguments, the shorter argument is extended by adding higher bits equal to 0. | Bitwise "sum". When operating on integer arguments, the operation is performed on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than the other arguments, the shorter argument is extended by adding higher bits equal to 0. ^ Bitwise "exclusive sum". When operating on integer arguments, the operation is performed on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than the other arguments, the shorter argument is extended by adding higher bits equal to 0. x>>y Arithmetic right shift of the two's complement integer representation of x by y binary digits. This function is defined only for non - negative integer values of y. The most significant bit (MSB) shifted into the result of the right shift has a value equal to the MSB of x before the shift operation. x<<y Arithmetic left shift of the two's complement integer representation of x by y binary digits. This function is defined only for non - negative integer values of y. The least significant bit (LSB) shifted into the result of the left shift has a value equal to 0.
[0359] Assignment operators The following assignment operators are defined as follows. = Assignment operator ++ Increment. That is, x++ is equal to x=x + 1. When used in an array index, it is evaluated as the value of the variable before the increment operation. -- Decrement. That is, x-- is equal to x=x - 1. When used in an array index, it is evaluated as the value of the variable before the decrement operation. += increment by the specified amount, i.e. x+=3 is equal to x=x+3, and x+=(-3) is equal to x=x+(-3). -= Decrement by the specified amount, i.e. x-=3 is equal to x=x-3, and x-=(-3) is equal to x=x-(-3).
[0360] Range Notation The following notation is used to specify a range of values: x=y..zx takes an integer value 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.
[0361] Mathematical Functions The following mathematical functions are defined:
number
number
number
number
number
number
number
[0362] Operation precedence When the precedence of an expression is not explicitly indicated by the use of parentheses, the following rules apply: An operation with a higher priority is evaluated before any operation with a lower priority. -Operations of equal precedence are evaluated sequentially from left to right.
[0363] The table below specifies the priority of operations from highest to lowest, with higher positions in the table indicating higher priority.
[0364] For operators that are also used in the C programming language, the precedence used herein is the same as the precedence used in the C programming language. [Table 11]
[0365] Text description of logical operations In text, the format is: if(condition 0) Statement 0 else(condition 1) Statement 1 ... else / *Reference notes for remaining conditions* / Statement n A statement of logical operation such as mathematically described in may be written in the following manner: ...as / ...the following applies: -If condition 0, then statement 0 - Otherwise, if condition 1, then statement 1 -... - Otherwise (reference notes for the remaining conditions), statement n
[0366] Each "if... otherwise, if... otherwise" statement in the text is introduced by "as" or "the following applies" immediately followed by "if...". The final condition of an "if... otherwise, if... otherwise, if..." is always "otherwise". Alternating "if... otherwise, if... otherwise, if..." statements can be identified by matching the "as" or "the following applies" that ends with "otherwise".
[0367] In text, the following format: if(condition0a&&condition0b) Statement 0 else if(condition 1a||condition 1b) Statement 1 ... else Statement n A statement of logical operation such as mathematically described in may be written in the following manner: ...as / ...the following applies: -Statement 0 if all of the following conditions are true: -Condition 0a -condition 0b - Otherwise, if one or more of the following conditions are true, then statement 1: -Condition 1a -Condition 1b -… - Otherwise, statement n
[0368] In text, the following format: if(condition 0) Statement 0 if(condition1) Statement 1 A statement of logical operation such as mathematically described in may be written in the following manner: If condition 0, then statement 0 If condition 1 is true, then statement 1
[0369] The present invention has been described in connection with various embodiments herein. However, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a study of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the indefinite articles "a" or "an" do not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain means are typically recited in different dependent claims does not indicate that a combination of these means cannot be used to advantage. A computer program may be stored / distributed on a suitable medium, such as an optical storage medium or a solid-state medium, supplied together with or as part of other hardware, or may also be distributed in other forms, such as via the Internet or other wired or wireless communication systems.
[0370] Those skilled in the art will appreciate that the "blocks" ("units") of the various figures (method and apparatus) represent or describe functions of embodiments of the present invention (not necessarily individual "units" in hardware or software), and thus equally describe functions or features of apparatus embodiments as well as method embodiments (unit = step).
[0371] The term "unit" is used merely for purposes of describing the functionality of the encoder / decoder embodiments and is not intended to limit the present disclosure.
[0372] In some embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the described device embodiments are merely exemplary. For example, the unit division is merely a logical functional division, and other divisions may be used in actual implementations. For example, multiple units or components may be combined or integrated into other systems, or some features may be omitted or not implemented. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be realized using some interfaces. Indirect couplings or communication connections between devices or units may be realized in electronic, mechanical, or other forms.
[0373] Units described as separate parts may or may not be physically separated, and parts shown as units may or may not be physical units, may be located in one location, or may be distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
[0374] Furthermore, the functional units in the embodiments of the present invention may be integrated into one processing unit, or each of the units may exist physically alone, or two or more units may be integrated into one unit.
[0375] Embodiments of the present invention may further include apparatus, such as an encoder and / or decoder, including processing circuitry configured to perform any of the methods and / or processes described herein.
[0376] Although embodiments of the present invention have been described primarily in the context of video coding, it should be noted that embodiments of coding system 10, encoder 20 and decoder 30 (and correspondingly system 10), as well as other embodiments described herein, may also be configured for still picture processing or coding, i.e., processing or coding of individual pictures independent of any previous or subsequent pictures, as in video coding. In general, when picture processing coding is limited to a single picture 17, only 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 picture processing, e.g., residual calculation 204 / 304, transform 206, quantization 208, inverse quantization 210 / 310, (inverse) transform 212 / 312, partitioning 262 / 362, intra prediction 254 / 354, and / or loop filtering 220, 320, as well as entropy coding 270 and entropy decoding 304.
[0377] For example, embodiments of the encoder 20 and the decoder 30, and the functions described herein with respect to the encoder 20 and the decoder 30, 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 code and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which correspond to tangible media such as data storage media, or communication media, including any medium that facilitates transfer of a computer program from one place to another, for example, according to a communication protocol. Thus, computer-readable media may generally correspond to (1) tangible computer-readable storage media that are non-transitory, or (2) communication media such as a signal or carrier wave. Data storage media may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0378] 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. Also, any connection is properly termed 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, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included within the definition of medium. 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 with a laser. Combinations of the above should also be included within the scope of computer-readable media.
[0379] 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. Accordingly, the term "processor," as used herein, may refer to any of the above structures or any other structure suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. Alternatively, the techniques may be implemented entirely in one or more circuit or logic elements.
[0380] The techniques of this disclosure may be implemented in a wide range of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the techniques of the disclosure, but do not necessarily require implementation by different hardware units. Rather, as noted above, the various units may be combined with a codec hardware unit in combination with appropriate software and / or firmware, or may be provided by a collection of interoperating hardware units including one or more processors as described above.
Claims
1. 1. An image encoding method, comprising: performing an image encoding process for an image block coded in an inter prediction mode to output an encoded bitstream, the image block including a luma block and a co-located chroma block; The step of performing the image encoding process comprises: determining horizontal and vertical chroma scaling factors based on chroma format information indicating a chroma format of a current picture to which the image block belongs, the chroma format including one of a YUV 4:2:2 format, a YUV 4:2:0 format, and a YUV 4:4:4 format; determining a set (S) of luma sub-blocks of the luma block based on the value of the chroma scaling factor; If there is more than one sub-block in the set (S), generate an averaged luma motion vector mvAvgLX by averaging the motion vectors of the luma sub-blocks in the set (S). obtaining the averaged luma motion vector mvAvgLX by deriving a chroma motion vector mvCLX[xSbIdx][ySbIdx] for a chroma sub-block of the chroma block based on the averaged luma motion vector mvAvgLX, the process of deriving the chroma motion vector taking the mvAvgLX as an input and the chroma motion vector mvCLX[xSbIdx][ySbIdx] as an output, If the reference picture corresponding to refIdxLX for the image block is not the current picture, mvCLX[0]=mvLX[0]*2 / SubWidthC mvCLX[1]=mvLX[1]*2 / SubHeightC or If the reference picture corresponding to the refIdxLX for the image block is the current picture, mvCLX[0]=((mvLX[0]>>(3+SubWidthC))*32 mvCLX[1]=((mvLX[1]>>(3+SubHeightC))*32 and mvLX[0] corresponds to the horizontal component of the mvAvgLX, and mvLX[1] corresponds to the vertical component of the mvAvgLX. When both SubWidthC and SubHeightC are equal to 1, the set of luma sub-blocks (S) is S 0 = (xSbIdx, ySbIdx), When at least one of SubWidthC and SubHeightC is not equal to 1, the set of luma sub-blocks (S) is 0 = ((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1)), (ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and S 1 =((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)), SubWidthC and SubHeightC represent the chroma scaling factors in the horizontal and vertical directions, respectively; xSbIdx and ySbIdx represent the horizontal sub-block index and the vertical sub-block index for the luma sub-block in the set (S), respectively; "<<" represents a left arithmetic shift, ">>" represents a right arithmetic shift, xSbIdx is an integer value ranging from 0 to numSbX-1, ySbIdx is an integer value ranging from 0 to numSbY-1, numSbX indicates the number of luma sub-blocks in the luma block along the horizontal direction, numSbY indicates the number of luma sub-blocks in the luma block along the vertical direction; The steps are called like this:
2. A method comprising a chroma motion vector derivation process comprising:
2. The method of claim 1 , wherein each of the one or more luma sub-blocks in the set (S) is represented by a horizontal sub-block index and a vertical sub-block index.
3. 2. The method of claim 1 , wherein the number of chroma sub-blocks in the chroma block along the horizontal and vertical directions is the same as the number of luma sub-blocks in the luma block along the horizontal and vertical directions, respectively.
4. When the chroma format is 4:4:4, the set (S) is one luma sub-block co-located with the chroma sub-block; When the chroma format is 4:2:2, the set (S) is two luma sub-blocks that are horizontally adjacent to each other; The method of claim 1 , wherein when the chroma format is 4:2:0, the set (S) is two diagonally aligned luma sub-blocks.
5. Averaging the motion vectors of the luma sub-blocks in the set (S) comprises: averaging the horizontal components of the motion vectors of the luma sub-blocks in the set (S); or averaging vertical components of the motion vectors of the luma sub-blocks in the set (S); The method of claim 1 , comprising one or more of:
6. generating an averaged luma motion vector by averaging the motion vectors of the luma sub-blocks in the set (S), formula: mvAvgLX=Σ i mvLX[S i x ][S i y ] When mvAvgLX[0] is greater than or equal to 0, mvAvgLX[0]=(mvAvgLX[0]+(N>>1)-1)>>log2(N), Otherwise, mvAvgLX[0]=-((-mvAvgLX[0]+(N>>1)-1)>>log2(N)) When mvAvgLX[1] is greater than or equal to 0, mvAvgLX[1]=(mvAvgLX[1]+(N>>1)-1)>>log2(N), Otherwise, mvAvgLX[1]=-((-mvAvgLX[1]+(N>>1)-1)>>log2(N)) and calculating the averaged luma motion vector based on mvAvgLX is the motion vector resulting from the averaging, S i x and S i y are the horizontal and vertical indices of sub-blocks Si in said set (S) of luma sub-blocks in the motion vector array, mvLX[S i x ][S i y ] is the index S i x and S i y 2. The method of claim 1 , wherein N is the number of elements in the set (S) of luma sub-blocks, and log2(N) represents the logarithm of N to the base 2, which is the power to which the number 2 is raised to obtain the value N.
7. Averaging the motion vectors of the luma sub-blocks in the set (S) comprises: mvAvgLX=mvLX[(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))][(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))]+mvLX[(xSbI dx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1)][(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)] If mvAvgLX[0]>=0, mvAvgLX[0]=(mvAvgLX[0]+1-(mvAvgLX[0]>=0))>>1 If mvAvgLX[1]>=0, mvAvgLX[1]=(mvAvgLX[1]+1-(mvAvgLX[1]>=0))>>1 The method of claim 1 , comprising:
8. Determining horizontal and vertical chroma scaling factors based on the chroma format information, 2. The method of claim 1, comprising determining the horizontal and vertical chroma scaling factors based on a mapping between the chroma format information and each pair of the horizontal and vertical chroma scaling factors.
9. The step of performing the image encoding process comprises: generating a prediction of the chroma sub-block based on the determined chroma motion vector; obtaining residuals of the chroma sub-blocks according to predictions of the chroma sub-blocks, where the residuals of the image blocks include the residuals of the chroma sub-blocks of the chroma blocks; performing a transform, a quantization and an entropy coding on the residual of the image block to output the encoded bitstream; The method of claim 1 further comprising:
10. The method of claim 1 , wherein the image block is coded in an affine-based inter-prediction mode.
11. 1. An encoding device including a video data memory and a video encoder, The video encoder configured to perform an image encoding process for an image block coded in an inter prediction mode to output an encoded bitstream, the image block including a luma block and a co-located chroma block; performing the image encoding process determining horizontal and vertical chroma scaling factors based on chroma format information, the chroma format information indicating a chroma format of a current picture to which the image block belongs, the chroma format including one of a YUV 4:2:2 format, a YUV 4:2:0 format, or a YUV 4:4:4 format; determining a set (S) of luma sub-blocks of the luma block based on the value of the chroma scaling factor; If there is more than one sub-block in the set (S), generate an averaged luma motion vector mvAvgLX by averaging the motion vectors of the luma sub-blocks in the set (S). to obtain the averaged luma motion vector mvAvgLX; Derive a chroma motion vector mvCLX[xSbIdx][ySbIdx] for a chroma sub-block of the chroma block based on the averaged luma motion vector mvAvgLX, the process of deriving the chroma motion vector taking the mvAvgLX as an input and the chroma motion vector mvCLX[xSbIdx][ySbIdx] as an output: If the reference picture corresponding to refIdxLX for the image block is not the current picture, mvCLX[0]=mvLX[0]*2 / SubWidthC mvCLX[1]=mvLX[1]*2 / SubHeightC or If the reference picture corresponding to the refIdxLX for the image block is the current picture, mvCLX[0]=((mvLX[0]>>(3+SubWidthC))*32 mvCLX[1]=((mvLX[1]>>(3+SubHeightC))*32 and mvLX[0] corresponds to the horizontal component of the mvAvgLX, and mvLX[1] corresponds to the vertical component of the mvAvgLX. When both SubWidthC and SubHeightC are equal to 1, the set of luma sub-blocks (S) is S 0 = (xSbIdx, ySbIdx), When at least one of SubWidthC and SubHeightC is not equal to 1, the set of luma sub-blocks (S) is 0 = ((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1)), (ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and S 1 =((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)), SubWidthC and SubHeightC represent the chroma scaling factors in the horizontal and vertical directions, respectively; xSbIdx and ySbIdx represent the horizontal sub-block index and the vertical sub-block index for the luma sub-block in the set (S), respectively; "<<" represents a left arithmetic shift, ">>" represents a right arithmetic shift, xSbIdx is an integer value ranging from 0 to numSbX-1, ySbIdx is an integer value ranging from 0 to numSbY-1, numSbX indicates the number of luma sub-blocks in the luma block along the horizontal direction, numSbY indicates the number of luma sub-blocks in the luma block along the vertical direction; It is called like this:
11. An apparatus comprising a chroma motion vector derivation process comprising:
12. The apparatus of claim 11 , wherein each of the one or more luma sub-blocks in the set (S) is represented by a horizontal sub-block index and a vertical sub-block index.
13. 12. The apparatus of claim 11, wherein the number of chroma sub-blocks in the chroma block along the horizontal and vertical directions is the same as the number of luma sub-blocks in the luma block along the horizontal and vertical directions, respectively.
14. When the chroma format is 4:4:4, the set (S) is one luma sub-block co-located with the chroma sub-block; When the chroma format is 4:2:2, the set (S) is two luma sub-blocks that are horizontally adjacent to each other; The apparatus of claim 11 , wherein when the chroma format is 4:2:0, the set (S) is two diagonally aligned luma sub-blocks.
15. The video encoder averaging the horizontal components of the motion vectors of the luma sub-blocks in the set (S), or The apparatus of claim 11 , further configured to average vertical components of the motion vectors of the luma sub-blocks in the set (S).
16. The video encoder mvAvgLX=Σ i mvLX[S i x ][S i y ] When mvAvgLX[0] is greater than or equal to 0, mvAvgLX[0]=(mvAvgLX[0]+(N>>1)-1)>>log2(N), Otherwise, mvAvgLX[0]=-((-mvAvgLX[0]+(N>>1)-1)>>log2(N)) When mvAvgLX[1] is greater than or equal to 0, mvAvgLX[1]=(mvAvgLX[1]+(N>>1)-1)>>log2(N), Otherwise, mvAvgLX[1]=-((-mvAvgLX[1]+(N>>1)-1)>>log2(N)) and further configured to generate an averaged luma motion vector by averaging the motion vectors of the luma sub-blocks in the set (S), such that mvAvgLX is the motion vector resulting from the averaging, S i x and S i y are the horizontal and vertical indices of sub-blocks Si in said set (S) of luma sub-blocks in the motion vector array, mvLX[S i x ][S i y ] is the index S i x and S i y 12. The apparatus of claim 11, wherein N is the number of elements in the set (S) of luma sub-blocks, and log2(N) represents the logarithm of N to the base 2, which is the power to which the number 2 is raised to obtain the value N.
17. The video encoder mvAvgLX=mvLX[(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))][(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))]+mvLX[(xSbI dx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1)][(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)] If mvAvgLX[0]>=0, mvAvgLX[0]=(mvAvgLX[0]+1-(mvAvgLX[0]>=0))>>1 If mvAvgLX[1]>=0, mvAvgLX[1]=(mvAvgLX[1]+1-(mvAvgLX[1]>=0))>>1 12. The apparatus of claim 11, further configured to generate an averaged luma motion vector by averaging motion vectors of the luma sub-blocks in the set (S) such that:
18. The video encoder The apparatus of claim 11 , further configured to determine the chroma scaling factors in the horizontal and vertical directions based on a mapping between the chroma format information and each pair of the horizontal and vertical chroma scaling factors.
19. The video encoder generating a prediction of the chroma sub-block based on the determined chroma motion vector; Obtaining residuals of the chroma sub-blocks according to prediction of the chroma sub-blocks, the residuals of the image block including the residuals of the chroma sub-blocks of the chroma block; The apparatus of claim 11 , further configured to perform a transform, a quantization, and an entropy coding on the residual of the image block to output the encoded bitstream.
20. The apparatus of claim 11 , wherein the image block is coded in an affine-based inter-prediction mode.
21. 1. A non-transitory computer-readable storage medium having stored thereon program instructions that, when executed by one or more processors, cause the one or more processors to perform operations of deriving a chroma motion vector for use in affine-based inter prediction of a current image block that includes a luma block and a co-located chroma block, the program instructions comprising: The operation is performing an image encoding process for an image block coded in an inter prediction mode to output an encoded bitstream, the image block including a luma block and a co-located chroma block; The step of performing the image encoding process comprises: determining horizontal and vertical chroma scaling factors based on chroma format information, the chroma format information indicating a chroma format of a current picture to which the image block belongs, the chroma format including one of a YUV 4:2:2 format, a YUV 4:2:0 format, or a YUV 4:4:4 format; determining a set (S) of luma sub-blocks of the luma block based on the value of the chroma scaling factor; If there is more than one sub-block in the set (S), generate an averaged luma motion vector mvAvgLX by averaging the motion vectors of the luma sub-blocks in the set (S). obtaining the averaged luma motion vector mvAvgLX by deriving a chroma motion vector mvCLX[xSbIdx][ySbIdx] for a chroma sub-block of the chroma block based on the averaged luma motion vector mvAvgLX, the process of deriving the chroma motion vector taking the mvAvgLX as an input and the chroma motion vector mvCLX[xSbIdx][ySbIdx] as an output, If the reference picture corresponding to refIdxLX for the image block is not the current picture, mvCLX[0]=mvLX[0]*2 / SubWidthC mvCLX[1]=mvLX[1]*2 / SubHeightC or If the reference picture corresponding to the refIdxLX for the image block is the current picture, mvCLX[0]=((mvLX[0]>>(3+SubWidthC))*32 mvCLX[1]=((mvLX[1]>>(3+SubHeightC))*32 and mvLX[0] corresponds to the horizontal component of the mvAvgLX, and mvLX[1] corresponds to the vertical component of the mvAvgLX. When both SubWidthC and SubHeightC are equal to 1, the set of luma sub-blocks (S) is S 0 = (xSbIdx, ySbIdx), When at least one of SubWidthC and SubHeightC is not equal to 1, the set of luma sub-blocks (S) is 0 = ((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1)), (ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and S 1 =((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)), SubWidthC and SubHeightC represent the chroma scaling factors in the horizontal and vertical directions, respectively; xSbIdx and ySbIdx represent the horizontal sub-block index and the vertical sub-block index for the luma sub-block in the set (S), respectively; "<<" represents a left arithmetic shift, ">>" represents a right arithmetic shift, xSbIdx is an integer value ranging from 0 to numSbX-1, ySbIdx is an integer value ranging from 0 to numSbY-1, numSbX indicates the number of luma sub-blocks in the luma block along the horizontal direction, numSbY indicates the number of luma sub-blocks in the luma block along the vertical direction; The steps are called like this:
16. A non-transitory computer-readable storage medium comprising a chroma motion vector derivation process, the process comprising:
22. A method for storing an encoded bitstream, comprising: generating the encoded bitstream according to an operation; storing the encoded bitstream on a non-transitory computer-readable storage medium; Including, The operation is performing an image encoding process for an image block coded in an inter prediction mode to output an encoded bitstream, the image block including a luma block and a co-located chroma block; The step of performing the image encoding process comprises: determining horizontal and vertical chroma scaling factors based on chroma format information, the chroma format information indicating a chroma format of a current picture to which the image block belongs, the chroma format including one of a YUV 4:2:2 format, a YUV 4:2:0 format, or a YUV 4:4:4 format; determining a set (S) of luma sub-blocks of the luma block based on the value of the chroma scaling factor; If there is more than one sub-block in the set (S), generate an averaged luma motion vector mvAvgLX by averaging the motion vectors of the luma sub-blocks in the set (S). obtaining the averaged luma motion vector mvAvgLX by deriving a chroma motion vector mvCLX[xSbIdx][ySbIdx] for a chroma sub-block of the chroma block based on the averaged luma motion vector mvAvgLX, the process of deriving the chroma motion vector taking the mvAvgLX as an input and the chroma motion vector mvCLX[xSbIdx][ySbIdx] as an output, If the reference picture corresponding to refIdxLX for the image block is not the current picture, mvCLX[0]=mvLX[0]*2 / SubWidthC mvCLX[1]=mvLX[1]*2 / SubHeightC or If the reference picture corresponding to the refIdxLX for the image block is the current picture, mvCLX[0]=((mvLX[0]>>(3+SubWidthC))*32 mvCLX[1]=((mvLX[1]>>(3+SubHeightC))*32 and mvLX[0] corresponds to the horizontal component of the mvAvgLX, and mvLX[1] corresponds to the vertical component of the mvAvgLX. When both SubWidthC and SubHeightC are equal to 1, the set of luma sub-blocks (S) is S 0 = (xSbIdx, ySbIdx), When at least one of SubWidthC and SubHeightC is not equal to 1, the set of luma sub-blocks (S) is 0 = ((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1)), (ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and S 1 =((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)), SubWidthC and SubHeightC represent the chroma scaling factors in the horizontal and vertical directions, respectively; xSbIdx and ySbIdx represent the horizontal sub-block index and the vertical sub-block index for the luma sub-block in the set (S), respectively; "<<" represents a left arithmetic shift, ">>" represents a right arithmetic shift, xSbIdx is an integer value ranging from 0 to numSbX-1, ySbIdx is an integer value ranging from 0 to numSbY-1, numSbX indicates the number of luma sub-blocks in the luma block along the horizontal direction, numSbY indicates the number of luma sub-blocks in the luma block along the vertical direction; The steps are called like this:
2. A method comprising a chroma motion vector derivation process comprising:
Citation Information
Patent Citations
JPP7332703B
JPP7615243B