Method and device for affine-based inter prediction of chroma subblock
By deriving motion vectors for affine-based interprediction of chroma subblocks based on chroma formats, the method addresses the challenge of supporting multiple chroma formats in video coding, resulting in improved compression performance and reduced prediction errors.
Patent Information
- Application Number
- JP2024231590
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-03-26
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-10
- Estimated Expiration
- 2040-02-24
AI Technical Summary
Current video coding technologies face challenges in supporting multiple chroma formats, particularly leading to issues such as coder crashes when dealing with formats like 4:4:4, and inefficient compression performance.
The proposed solution involves a method for deriving motion vectors for affine-based interprediction of chroma subblocks, which takes into account the chroma format of the picture. This method determines horizontal and vertical chroma scale factors based on the chroma format, and uses these scale factors to select appropriate luma subblocks for averaging luma motion vectors, thereby improving the accuracy of chroma motion field interpolation.
This approach enhances compression performance by reducing prediction errors and improving the accuracy of motion field interpolation, leading to better coding efficiency across various chroma formats.
Smart Images

Figure 2025060932000001_ABST
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] The 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, DVDs 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 telecommunication networks. The size of the video can also be an issue when the video is stored on a storage device, since memory resources may be limited. 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 required 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 chroma format 4:2:0 as the input picture format. If the input chroma format becomes 4:4:4, it may cause the VTM coder to 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, the 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 a chroma sub-block based on a chroma format which may be one of multiple supported chroma formats, 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 a 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 a value of a 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 that the position or location or index of the block or sub-block is selected or determined.
[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] The present disclosure is directed to a method for taking into account the chroma format of a picture when obtaining chroma motion vectors from luma motion vectors. By averaging the luma motion vectors, a linear subsampling of the luma motion field is performed. It turns out that when the chroma color plane has the same height as the luma plane, it is more appropriate to select motion vectors from horizontally adjacent luma blocks, so that they have the same vertical position. Selecting luma motion vectors depending on the picture chroma format results in a more accurate chroma motion field, due to the more accurate luma motion vector field subsampling. This dependency on the chroma format allows the selection of the most appropriate luma block when averaging the luma motion vectors to generate the chroma motion vectors. As a result of the more accurate motion field interpolation, the prediction error is 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 realisation 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 form 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 realization form 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 realization of the method according to any of the preceding realizations 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 realization format of the method according to any preceding realization scheme 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 realization of the method according to any of the preceding realizations of the first aspect or 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 realization form of the method according to any of the preceding realizations of the first aspect or 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 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 realizing this processing step, the optimization may be performed by skipping the iterative value calculation step.
[0022] The proposed invention discloses a method to define 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 a possible realization form of any of the preceding realization manners of the first aspect or the method according to the first aspect itself, when the size of each of the chroma subblocks is the same as the size of each of the luma subblocks, the number of chroma subblocks in the horizontal direction depends on the number of luma subblocks in the horizontal direction and the value of the horizontal chroma scaling factor, and the number of chroma subblocks in the vertical direction depends on the number of luma subblocks 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 xSbIdx and a step value of SubWidth, and yCSbIdx is obtained based on ySbIdx and a step value of SubHeightC.
[0025] In a possible realisation of the method according to any of the preceding realisations of the first aspect or according to 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 numbers of luma sub-blocks in a luma block in the horizontal and vertical directions, respectively.
[0026] In a possible realization of the method according to any of the preceding realizations of the first aspect or according to 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, For chroma block position ([xSbIdxL][ySbIdxL] in mvCLX[xSbIdxL][ySbIdxL], etc.), 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 the horizontal sub-block index xSbIdxL+(SubWidthC-1) and the vertical sub-block index ySbIdxL+(SubHeightC-1).
[0027] In a possible realization of the method according to any of the preceding realizations of the first aspect or according to the first aspect itself, the set of luma sub-blocks (S) is 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 the horizontal sub-block index xSbIdxL+(SubWidthC-1) and the vertical sub-block index ySbIdxL+(SubHeightC-1).
[0028] In a possible realisation of the method according to any of the preceding realisations of the first aspect or according to 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 a possible realization of the method according to any of the preceding realizations of the first aspect or 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: Average 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 realization of the method according to any of the preceding realizations 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 the 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 zero.
[0032] In a possible realization of the method according to any of the preceding realizations 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 subblock Si in the set of luma subblocks (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 subblocks) in the set of luma subblocks (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 realisation of the method according to any preceding realisation of the first aspect or according to the first aspect itself, N is equal to 2.
[0034] In a possible realization of the method according to any of the preceding realizations 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 the method according to any preceding implementation scheme of the first aspect or 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 may include: 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 being divided 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] In a possible implementation form of the method according to any of the preceding implementations of the first aspect or according to the first aspect itself, the method 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, YUV4:2:0 or YUV4:4:4.
[0040] The method according to any preceding implementation of the first aspect or the first aspect itself may be 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 including 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 a 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 may 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 invention relates to an apparatus for decoding a video stream, comprising a processor and a memory, the memory storing instructions causing the processor to carry out the method according to the first aspect.
[0045] According to a fourth aspect, the 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, a computer-readable storage medium is proposed having stored thereon instructions which, 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 the method according to the first aspect or the second aspect or any possible embodiment of the first one, when the computer program is executed on a computer.
[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 description of the drawings]
[0049] In the following, embodiments of the invention will be explained 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] 2 is a block diagram illustrating another example of a video coding system configured to implement embodiments presented herein. [Diagram 2] FIG. 2 is a block diagram illustrating an example of a video encoder configured to implement the embodiments presented herein. [Diagram 3] 1 is a block diagram illustrating an example structure of a video decoder configured to implement the embodiments presented herein. [Figure 4] FIG. 2 is a block diagram showing an example of an encoding device or a decoding device. [Diagram 5] FIG. 13 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 examples of control point motion vector positions for a six-parameter affine motion model. [Figure 7] 4 shows an example of a sub-block motion vector field for an affine motion model. [Figure 8] FIG. 2 is a block diagram illustrating motion compensation using an affine motion model. [Figure 9A] 1 shows an example of the nominal vertical and horizontal positions of 4:2:0 luma and chroma samples within a picture. [Figure 9B]1 shows an example of the nominal vertical and horizontal positions of 4:2:2 luma and chroma samples within a picture. [Figure 9C] 1 shows an example of the 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] 13 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] 13 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] 13 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 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. [Figure 11B] 10C 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. [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] 1 shows various examples of subsets S that include the positions of luma sub-blocks for a given position of a chroma sub-block when the chroma format is set to 4:4:4. [Figure 12B]Various examples of subsets S are shown, where chroma sub-blocks that lie on the border of a chroma block have corresponding positions within the luma block, such as the fourth case "D" shown in FIG. 12A. [Figure 13A] 13 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 a current picture is 4:2:0. [Figure 13B] 13 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 a current picture is 4:2:2. [Figure 13C] 13 shows an example illustrating the selection of a luma sub-block for a given chroma sub-block during chroma motion vector derivation from a luma motion vector when the chroma format of a current picture is 4:4:4. [Figure 14A] 13 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] 13 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] 13 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] 4 shows a flow diagram illustrating an example process for motion vector derivation for affine-based inter prediction of chroma sub-blocks based on chroma format in accordance with certain aspects of the present disclosure. [Figure 16] 13 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 certain 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 showing 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 denote identical or at least functionally equivalent features, unless expressly specified otherwise. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[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 example, certain aspects of embodiments of the invention or in which embodiments of the invention may be used. It is understood that embodiments of the invention may be used in other ways and may include structural or logical changes not shown in the drawings. Therefore, the following detailed description 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 specific method steps are described, the corresponding device may include one or more units, e.g., functional units, for performing the described one or more method steps, 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 multiple steps). On the other hand, for example, when a particular apparatus is described based on one or more units, e.g., functional units, the corresponding method may include one step for performing the function of one or more units, 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 multiple units). Furthermore, it is understood that the 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 at the source side and typically involves processing the original video picture (e.g., by compression) to reduce the amount of data required to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed at the destination side and typically involves the reverse processing compared to the encoder to reconstruct the video picture. The 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 encoding and decoding parts 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, in an encoder, a 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 / 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, in a decoder, the inverse processing 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 that may utilize techniques of the present application, such as video coding system 10 (or coding system 10 for short). 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] The picture source 16 may be or may 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). The 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 can 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 to provide encoded picture data 21 (further details are described below, eg with reference to FIG. 2).
[0066] The communications interface 22 of the source device 12 may be configured to receive the encoded picture data 21 and to transmit the encoded picture data 21 (or any further processed version thereof) over the communications 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 communications interface or 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 encoded 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 an encoded picture data storage device, and to provide the encoded picture data 21 to a decoder 30.
[0069] The communications interface 22 and the communications interface 28 may be configured to transmit or receive the encoded picture data 21 or the encoded data 21 via a direct communications link between the source device 12 and the destination device 14, e.g., a direct wired or wireless connection, or via any type of network, e.g., a wired or wireless network or any combination thereof, or any type of private and public network, or any combination of any type thereof.
[0070] The communications interface 22 may be configured, for example, to package the encoded picture data 21 into a suitable format, e.g. packets, and / or process the encoded picture data using any type of transmission encoding or processing, for transmission over a communications link or network.
[0071] The communications interface 28, forming the counterpart to 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 encoded 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 a communication link and / or any other information related to data transmission, e.g., encoded picture data transmission, for example, to set up a connection.
[0073] The decoder 30 is arranged to receive the encoded 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] The post-processor 32 of the destination device 14 is configured to post-process the decoded picture data 31 (also called reconstructed picture data), e.g., the decoded picture 31, to obtain post-processed picture data 33, e.g., a post-processed picture 33. The post-processing performed by the post-processing unit 32 may include, e.g., color format conversion (e.g., from YCbCr to RGB), color correction, cropping or resampling, or any other processing, e.g., to prepare the decoded picture data 31 for display, e.g., by a display device 34.
[0075] A 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, for example 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 micro LED display, liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.
[0076] 1A illustrates source device 12 and destination device 14 as separate devices, an embodiment of the devices may also include both or both the functionality of source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such an embodiment, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software or by separate hardware and / or software or any combination thereof.
[0077] As will be clear to one of ordinary skill in the art based on the description, the presence and (exact) division of different units or functions within 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 in part 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) in a single device, for example, as shown in FIG. 1B.
[0079] Source device 12 and destination device 14 may include any of a wide range of devices, including any type of handheld or stationary device, such as 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 a content delivery server), a broadcast receiver device, a broadcast transmitter device, and the like, 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] In some cases, the video coding system 10 shown in FIG. 1A is merely an example, and the techniques of the present application may be applied to video coding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between an encoding device and a decoding device. In other examples, 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 by 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 appreciate 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 an 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 an 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 as shown in FIG. 2 may also be referred to as a hybrid video encoder or a video encoder with 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 the 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 arranged to receive, for example, via an input 201, a picture 17 (or picture data 17), for example a picture of a sequence of pictures forming a video or a video sequence. The received picture or picture data may also be a preprocessed picture 19 (preprocessed picture data 19). For the sake of brevity, 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, for example previously coded and / or decoded pictures of the same video sequence, i.e. a video sequence that also includes the current picture).
[0085] A (digital) picture can be or be considered as a two-dimensional array or matrix of samples with intensity values. The samples in the array may also be called pixels (short for picture element) or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. For color representation, typically three color components are 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 also used instead) and two chrominance components denoted by Cb and Cr. The luminance (or luma for short) component Y represents the brightness or gray level intensity (such 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 into YCbCr format and vice versa, a process also known as color conversion or transformation. If the 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] An embodiment 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 a subset or group of pictures, and to partition each picture into corresponding blocks.
[0087] In further embodiments, the video encoder may be configured to directly receive block 203 of picture 17, e.g., one, some or all of the blocks forming picture 17. Picture block 203 may also be referred to as a current picture block or a picture block to be coded.
[0088] Similar to the picture 17, the picture block 203 can again be considered as or be a two-dimensional array or matrix of samples with intensity values (sample values), but with smaller dimensions than the picture 17. In other words, the block 203 may, for example, contain one sample array (e.g. a luma array in case of a monochrome picture 17, or a luma or chroma array in case of a color picture) or three sample arrays (e.g. a luma and two chroma arrays in 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 the block 203 defines the size of the block 203. Thus, the block may, for example, be an M×N (M columns×N rows) array of samples, or an M×N array of transform coefficients.
[0089] An embodiment of video encoder 20 as shown in FIG. 2 may be configured to encode picture 17 on a block-by-block basis, eg, encoding and prediction is performed for each block 203.
[0090] An embodiment of video encoder 20 as shown in FIG. 2 may be further configured to partition and / or encode a picture using slices (also referred to as 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 as shown in FIG. 2 may be further configured to partition and / or encode a picture by 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., complete 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 transformed 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 certain factor. In order to maintain the norm of the residual block processed by the forward transform and the inverse transform, a further scaling factor is applied as part of the transform process. The scaling factor is typically selected based on certain 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 certain 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, for example, in the video decoder 30), and a corresponding scaling factor for the forward transform by the transform processing unit 206, for example, 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 a finer quantization, while a larger quantization step size corresponds to a coarser quantization. The applicable quantization steps may be indicated by a quantization parameter (QP). The quantization parameter may, for example, be an index to a predefined 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 the 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, for example, HEVC, embodiments may be configured to use a quantization parameter to determine the quantization step size. In general, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of a formula that includes a 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 that may change. In one exemplary implementation, the scaling of the inverse transform and dequantization may be combined. Alternatively, customized quantization tables may be used, for example signaled in the bitstream from the encoder to the decoder. Quantization is a lossy operation, and the 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 encoding unit 270, such that video decoder 30 may receive and apply the quantization parameter for decoding, for example.
[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] Reverse 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 sample values of the reconstructed residual block 213 and the prediction block 265 sample by sample, to obtain a 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 in general, to filter the reconstructed samples to obtain filtered samples. The loop filter unit is configured to, for example, 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, 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 realized as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstruction block 221.
[0103] An embodiment of video encoder 20 (respectively, loop filter unit 220) may be configured to output loop filter parameters (e.g., sample adaptive offset information), e.g., encoded directly or via entropy encoding unit 220, such that 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 of 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 further be 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., in case 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 other buffers (e.g., line buffers, 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 a more accurate motion vector prediction, e.g., affine-based inter prediction or sub-block-based inter prediction, used 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 calculation of the residual block 205 and for reconstruction of the reconstruction block 215.
[0107] An embodiment of the mode selection unit 260 may be configured to select a partition and prediction mode (e.g., from those supported or available by the mode selection unit 260) that provides 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 considers or balances both. The mode selection unit 260 may be configured to determine the partition and prediction mode based on rate distortion optimization (RDO), i.e., to select the prediction mode that provides the smallest rate distortion. Terms such as "best", "minimum", "optimum", etc. in this context do not necessarily indicate an overall "best", "minimum", "optimum", etc., but may indicate the satisfaction of a termination or selection criterion, such as a value above or below a threshold, or other constraint that potentially results in a "suboptimal selection" but reduces complexity and processing time.
[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 for each of the block partitions or sub-blocks, e.g., where the mode selection includes selecting a tree structure of the partitioned block 203, and a prediction mode is applied to each of the block partitions or sub-blocks.
[0109] The partitioning (eg, by partition unit 260) and prediction processes (by inter prediction unit 244 and intra prediction unit 254) performed by example video encoder 20 are described in further detail below.
[0110] partition The partition unit 262 may partition (or split) the current block 203 into smaller partitions, e.g., smaller blocks of square or rectangular size. These smaller blocks (which may also be called sub-blocks) may be further partitioned into even smaller partitions. This is also called tree partitioning or hierarchical tree partitioning, e.g., a root block at root tree level 0 (hierarchical level 0, depth 0) may be recursively partitioned, e.g., into two or more blocks at the next lower tree level, e.g., nodes at tree level 1 (hierarchical level 1, depth 1), 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), etc., 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), coding unit (CU), prediction unit (PU) and transform unit (TU) and / or corresponding block, such as a coding tree block (CTB), coding block (CB), transform block (TB) or prediction block (PB).
[0112] For example, a coding tree unit (CTU) may be or may 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 may 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 embodiment, a coding tree unit (CTU) may be partitioned 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 partitioned into one, two or four PUs according to the 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 the residual block by applying the 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 the coding blocks. In the QTBT block structure, the CUs can have either a square or a rectangular shape. For example, a coding tree unit (CTU) is first partitioned by a quad-tree. The quad-tree leaf nodes are further partitioned by a binary tree or a ternary (ternary) tree structure. The partition tree leaf nodes are called coding units (CUs), and their segmentation is used for prediction and transformation processes 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 selection 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 may be 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, e.g., as defined in HEVC, or may include 67 different intra prediction modes, e.g., non-directional modes such as DC (or average) mode and planar mode, or directional modes, e.g., as defined for 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) may be further configured to output intra prediction parameters (or generally information indicating the selected intra prediction mode for the block) to the entropy encoding unit 270 in the form of a syntax element 226 for inclusion in the encoded 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 only a portion of the reference picture, e.g., a search window area around the area of the current block, is used, and / or, for example, 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 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., a reconstructed block of one or more other / different previous decoded pictures 231, for motion estimation. 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 forming 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 of multiple other 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 as an inter prediction parameter to the motion estimation unit, which 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, an improvement is made to inter prediction (particularly, affine-based inter prediction or sub-block-based inter prediction) by supporting multiple chroma formats and by 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 apply, for example, 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 or to obtain coded picture data 21 which can be output via an output 272, for example in the form of a coded bitstream 21, so that, for example, the 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), e.g., coded by encoder 20, to obtain a decoded picture 331. The decoded picture data or bitstream includes information for decoding the coded picture data, e.g., data representing picture blocks of coded video slices (and / or tile groups or tiles) and associated syntax elements.
[0129] In the example of Figure 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 Figure 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. Thus, 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. Thus, the descriptions provided for the respective units and functions of video encoder 20 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 the coded picture data 21 in general) and, 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 as 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 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 encoded picture data 21 (e.g., by parsing and / or decoding by entropy decoding unit 304), 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 use of the quantization parameter determined by video encoder 20 for each video block in a video slice (or tile or group of tiles) to determine the degree of quantization, and thus the degree of inverse quantization to be applied.
[0133] Reverse 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 a reconstructed residual block 213 in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 313. The transform may be an inverse transform, e.g., an inverse DCT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may be further 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 a 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 A loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter the reconstructed block 315 to obtain a filtered block 321, e.g., to smooth pixel transitions or improve video quality. The loop filter unit 320 may include one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or one or more other filters, e.g., a bilateral filter, an adaptive loop filter (ALF), a sharpening, a smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 320 is shown in FIG. 3 as being an in-loop filter, in other configurations, the 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 subsequent 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, performing the splitting 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 the video slice is coded as an intra coded (I) slice, intra prediction unit 354 of mode application unit 360 is configured to generate a prediction block 365 for a picture block of the current video slice based on the signaled intra prediction mode and data from a block decoded prior to the current picture. When the 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 prediction block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from entropy decoding unit 304. In inter prediction, the prediction 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 the 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 a prediction mode (e.g., intra or inter prediction) used to code the video blocks of the video slice, an inter prediction slice type (e.g., B slice, P slice, or GPB slice), configuration information for one or more of the reference picture lists of the slice, motion vectors for each inter coded video block of the slice, an inter prediction state for each inter coded video block of the slice, and other information for decoding video blocks in the current video slice. 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 a picture using slices (also referred to as 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 as shown in FIG. 3 may be configured to partition and / or decode a picture by using tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), and a picture may be partitioned into or decoded using one or more (typically non-overlapping) tile groups, each of which may include, for example, one or more blocks (e.g., CTUs) or one or more tiles, and each tile may be, for example, rectangular in shape and may include one or more blocks (e.g., CTUs), e.g., complete or partial blocks.
[0143] Other variations of the video decoder 30 may be used to decode the encoded picture data 21. For example, the decoder 30 may generate an output video stream without a 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 an 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 the interpolation filtering, the motion vector derivation or the loop filtering, further operations such as clipping or shifting may be performed on the processing result of the interpolation filtering, the motion vector derivation or the loop filtering.
[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, ATMVP modes, temporal motion vectors, etc.). For example, the value of the motion vector is constrained to a predefined range according to its representation bit. If the representation bit of the motion vector is bitDepth, the range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means 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., MV of four 4x4 sub-blocks in one 8x8 block) is constrained such that the maximum difference between the integer parts of the MV of the four 4x4 sub-blocks is less than or equal to N pixels, which 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) using 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, then 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), in which case the MSB is discarded, so the resulting two's complement is 0111, 1111, 1111, 1111 (decimal number is 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) An 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 respectively correspond to the three input values of the MV clipping process, 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. The video coding device 400 is suitable for implementing embodiments of the disclosure as described herein. In an embodiment, the video coding device 400 may be a decoder, such as the video decoder 30 of FIG. 1A, or an encoder, such as the video encoder 20 of FIG. 1A.
[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, central processing unit) 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 the ingress port 410, the receiver unit 420, the transmitter unit 440, and the egress port 450 for the egress or ingress of optical or electrical signals.
[0151] The processor 430 is implemented by 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 to 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 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] The processor 502 in the device 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of device or devices, now existing or later developed, that can manipulate or process information. Although the disclosed implementations may be implemented with a single processor, such as the 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 be a read only memory (ROM) device or a random access memory (RAM) device in an implementation. Any other suitable type of storage device may be used as the memory 504. The memory 504 may include code and data 506 that is accessed by the processor 502 using a bus 512. The memory 504 may further include an operating system 508 and application programs 510, which include at least one program that enables the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1-N, which may further include a video coding application that performs the 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 the pictures (which may be source pictures or decoded pictures) 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) - an array representing a sampling of other unspecified monochrome or tristimulus colors (e.g., also known as YZX, XYZ)
[0159] For convenience of notation and terminology in this disclosure, the variables and terms associated with these arrays are referred to as luma (or L or Y) and chroma, and the two chroma arrays are referred to as Cb and Cr.
[0160] Figure 9A shows the location of the chroma components for the 4:2:0 sampling scheme. Examples of other sampling schemes are shown in Figures 9B and 9C.
[0161] As shown in Fig. 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 block of 2x2 pixels, the chroma components are actually shifted vertically by half a pixel compared to the luma components (see Fig. 9A). Such a shift may have an effect on the interpolation filters when downsampling a picture or when upsampling a picture. In Fig. 9D, various sampling patterns are represented in the case of an interlaced image. This means that the 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 level of sequence parameters. "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. sps_cclm_colocated_chroma_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 with respect to the top-left luma sample.
[0163] Affine motion compensation prediction In the real world, there are many kinds of motions, such as zoom in / out, rotation, perspective motion, translational motion and other irregular motions. In HEVC (ITU-T H.265), only translational motion model is utilized 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 (CPMV), 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 Fig. 6a, and the CPMV positions for the six-parameter affine motion model are shown in Fig. 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 the 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 the motion compensation prediction, a block-based affine transformation prediction is applied. For example, to derive the motion vector of each 4×4 subblock, as shown in FIG. 7, the motion vector of the center sample of each subblock is calculated according to the above formula (1) and rounded to 1 / 16 fractional precision. A motion compensation interpolation filter is applied to generate a prediction of each subblock with the derived motion vector.
[0167] After motion compensation prediction (MCP), the higher precision motion vectors for each subblock are rounded and stored at 1 / 4 the precision as the normal motion vectors.
[0168] 8 shows an example of a flow chart 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, a 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 the following:
[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, ie, an array of prediction samples, predSamples, for each subblock 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 method) 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] An embodiment of the present invention solves 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, an embodiment of the present invention discloses a method for taking the chroma format of a picture into account when obtaining a chroma motion vector from a luma motion vector. By averaging the luma motion vectors, a linear subsampling of the luma motion field is performed. Selecting the luma motion vector based on the picture chroma format results in a more accurate chroma motion field due to the more accurate luma motion vector field subsampling. This dependency on the chroma format allows the selection of the optimal luma block when averaging the luma motion vectors. As a result of the more accurate motion field interpolation, the prediction error is reduced, which has the technical consequence of improved compression performance.
[0180] In one exemplary 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 should be in the range 0 to 3 inclusive.
[0182] separate_colour_plane_flag equal to 1 specifies that the three colour components of the 4:4:4 chroma format are coded separately. separate_colour_plane_flag equal to 0 specifies that the colour 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 colour 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 alignment, nominally considered the luma alignment.
[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 FIG. 9B.
[0187] For 4:4:4 sampling, depending on the value of separate_colour_plane_flag the following applies: - If separate_colour_plane_flag is equal to 0, then 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 is equal to 1), the three colour planes are processed separately as a monochrome sampled picture.
[0188] In another exemplary implementation, Table 1-2 also 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 2]
[0189] The number of bits required to represent each of the samples in the luma and chroma arrays in a video sequence ranges from 8 to 16, inclusive, and the number of bits used in the luma array may differ from the number of bits used in the chroma array.
[0190] The nominal vertical and horizontal relative positions of the luma and chroma samples within a picture are shown in Figure 9A when the value of chroma_format_idc is equal to 1. 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 FIG. 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 )), where 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 vector. A possible example for defining such a set S may be described 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) Here, 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 above, and the averaging function in this disclosure can be realized 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 average 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) Here, 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 above, and the averaging function in this disclosure can be realized 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, in particular 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 of 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 described in the format of the amendment of the VVC draft specification as follows: … [Table 3]
[0212] 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 thus 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), where xSbIdx and ySbIdx are subblock indices of chroma subblocks in the horizontal and vertical directions, respectively, two luma subblocks (and thus 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 index in the horizontal direction as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))] and the subblock index 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 the luma block for averaging the luma motion vectors depends on the picture chroma format. In particular, the selection of the luma block for averaging the luma motion vectors depends on the chroma scaling factors SubWidthC and SubHeightC, which are determined based on the picture chroma format.
[0213] The mvAvgLX obtained above can be further processed by: 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 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 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 vectors 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 described as follows in the format of an amendment to the VVC draft specification: … [Table 4]
[0216] / / Note: The above formula 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 thus 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), where xSbIdx and ySbIdx are subblock indices of chroma subblocks in the horizontal and vertical directions, respectively, two luma subblocks (and thus 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 index in the horizontal direction as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))] and the subblock index in the vertical direction as [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))]. The other selected luma sub-blocks can be represented by the horizontal sub-block index as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(1>>(4-SubWidthC-SubHeightC))] and the vertical sub-block index as [(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(1>>(4-SubWidthC-SubHeightC))]). Thus, the selection of the luma block for averaging the luma motion vectors depends on the picture chroma format. In particular, the selection of the luma block for averaging the luma motion vectors depends on the 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 by: 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 vectors mvCLX[xSbIdx][ySbIdx] as output. …
[0219] 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 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 vectors 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 formula 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 thus 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), where xSbIdx and ySbIdx are subblock indices of chroma subblocks in the horizontal and vertical directions, respectively, two luma subblocks (and thus 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 index in the horizontal direction as [(xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))] and the subblock index 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 the luma block for averaging the luma motion vectors depends on the picture chroma format. In particular, the selection of the luma block for averaging the luma motion vectors depends on the chroma scaling factors SubWidthC and SubHeightC, which are determined based on the picture chroma format.
[0224] The mvAvgLX obtained above can be further processed by: 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 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 ways.
[0226] Further details of determining certain luma sub-block positions during chroma motion vector determination for different chroma formats are described below in conjunction with FIGS. 10A-10C and 11A-11C.
[0227] FIG. 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 the luma block is W and the height of the luma block is H, then 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 typically includes four times as many samples as the corresponding chroma block.
[0228] FIG. 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, then 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, a luma block generally includes twice as many samples as a corresponding chroma block.
[0229] FIG. 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, then 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 blocks generally include the same number of samples of the corresponding chroma blocks.
[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 FIG. 11A, for the YUV4:2:0 format, the motion vectors of two luma sub-blocks of a diagonal luma block 1010 (8×8 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 or chroma subblock index 0: xSbIdx=0, ySbIdx=0 Luma or chroma subblock index 1: xSbIdx=1, ySbIdx=0 Luma or chroma subblock index 2: xSbIdx=0, ySbIdx=1 Luma or chroma subblock index 3: xSbIdx=1, ySbIdx=1
[0234] According to the design of variant 4, the motion vector for each chroma subblock is derived based on an average value, which is obtained based on the motion vectors of diagonal luma subblock 0 (mvLX[0][0]) and luma subblock 3 (mvLX[1][1]).
[0235] Figure 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 Figure 10B. As shown in Figure 11B, for 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 or chroma subblock index 0: xSbIdx=0, ySbIdx=0 Luma or chroma subblock index 1: xSbIdx=1, ySbIdx=0 Luma or chroma subblock index 2: xSbIdx=0, ySbIdx=1 Luma or chroma subblock index 3: xSbIdx=1, ySbIdx=1
[0236] According to the design of Variation 4 above, the motion vector of each chroma subblock 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 subblock 0 (mvLX[0][0]) and luma subblock 1 (mvLX[1][0]). The motion vector of each chroma subblock 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 subblock 2 (mvLX[0][1]) and luma subblock 3 (mvLX[1][1]).
[0237] FIG. 11C is an example illustrating the position of 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:4:4 as shown in FIG. 10C.
[0238] As shown in FIG. 11C, for the YUV 4:4:4 format, the motion vectors of the co-located luma sub-blocks of the luma block 1010 (8×8 luma size) are 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 in size.
[0240] 12A shows some examples of subsets S that include the positions of luma sub-blocks for a given position of a chroma sub-block 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 adjacent 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 this 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 this 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 this case, set S includes a single luma sub-block located at the bottom right corner of the luma block.
[0245] Figure 12B illustrates another embodiment of obtaining the subset S. In this embodiment, chroma blocks located on the border of chroma blocks have a corresponding position in the luma block, such as the fourth case "D" shown in Figure 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 luma subblocks in the horizontal direction, numSbX, is the same as the number of chroma subblocks in the horizontal direction, and the number of luma subblocks in the vertical direction, numSbY, is the same as the number of chroma subblocks in the vertical direction, 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 and the number of luma sub-blocks in a co-located luma block may be different. 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, and the size of the chroma sub-blocks is set to be equal to the size of the luma sub-blocks. 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, differs from the number of chroma sub-blocks along the horizontal direction, numSbX, and the number of luma sub-blocks along the vertical direction, numSbY, differs 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 8×8, four equal-sized luma sub-blocks are included in the luma block, a set of equal-sized chroma sub-blocks is included in the chroma block of the current picture (chroma sub-block=chroma block), and the size of the chroma sub-block is set to be equal to the size of the luma sub-block. The motion vectors of two diagonal luma sub-blocks are averaged, and 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 (sub-block index of the luma sub-block in the horizontal direction) changes with the step size of SubWidth, and ySbIdx (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 FIG. 13B, for 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 used to average according to the formula of 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 case of YUV 4:4:4 format, both the number and size of luma sub-blocks and 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 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 above formula of Variation 4 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 going through the averaging operation formulated in the formula of any previous variant.
[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 different from the number of luma sub-blocks. FIG. 14A shows an example of subdivision of a 16×16 luma block and subdivision of co-located chroma blocks for YUV4:2:0 chroma format. In this example, the luma block is divided into 16 sub-blocks, each having a size of 4×4. The chroma block has a size of 8×8 samples and is subdivided into a total of four sub-blocks, each having a size of 4×4 samples. These four chroma sub-blocks are grouped into two rows, each row having two sub-blocks. The letters "A", "B", "C" and "D" indicate which luma sub-block is used to derive a motion vector for the corresponding chroma sub-block indicated with the same letter.
[0252] Figure 14B shows a subdivision of a 16x16 luma block and its co-located chroma block in a picture with 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 with 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 herein 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 a currently coded or decoded block of a currently coded or decoded picture.
[0257] 3. Using 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, 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 may 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. We assume that the motion vector calculation is performed by independently applying the corresponding equation to the horizontal component mvAvgLX[0] and the vertical component mvAvgLX[1] of the motion vector.
[0264] Spatial Index (xSbIdx L ,ySbIdx L ) is the luma motion vector of the sub-block having 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 pixel, i=0,1....
[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 herein are described as follows in a part format of the VVC draft specification. [Table 7] TIFF2025060932000011.tif130169
[0267] It should be noted that this embodiment is different 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. Since 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 the chroma motion vectors from the luma motion vectors. [Table 9]
[0269] The operation 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 with the chroma motion vector array mvCLXSub[xCSbIdx][yCSbIdx] as output." In this example, mvLX in section 8.5.2.13 described herein is replaced with mvAvgLX to perform the operation when called.
[0270] There are further aspects related to the embodiment that take into account the offset between the sub-sampling positions of the chroma samples with respect to the position of the luma samples.
[0271] An example embodiment is to define or determine the set S of luma sub-blocks according to the value of "sps_cclm_colocated_chroma_flag". - 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 of 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 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 for performing the averaging operation in determining the chroma motion vector from the luma motion vector are available.
[0274] FIG. 15 is a flowchart of an example method 1300 for affine-based inter prediction of chroma sub-blocks, which includes:
[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 a current picture to which a 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 a current picture to which a 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 luma sub-blocks within a set S of luma sub-blocks are averaged, where the set (S) is determined based on a 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 into account the chroma format of a picture when obtaining chroma motion vectors from luma motion vectors. By averaging the luma motion vectors, a linear subsampling of the luma motion field is performed. It turns out that when the 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 leads to a more accurate chroma motion field because of the more accurate luma motion vector field subsampling. This dependency on the chroma format allows the selection of the optimal luma block position when averaging the luma motion vectors. As a result of the more accurate motion field interpolation, the prediction error is reduced, which has technical consequences in improving the compression performance.
[0284] Furthermore, 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 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 scheme may be simplified by unifying luma and chroma processing, and redundant motion vector calculation is naturally avoided.
[0285] FIG. 17 illustrates a device for affine-based inter prediction according to another embodiment of the present invention. The device 1700 includes: 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 a current image block belongs, and configured to determine a set (S) of luma sub-blocks of a 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 a chroma block based on a 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 includes: 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; a chroma motion vector derivation module 1703b configured to determine, for a chroma subblock in the plurality of chroma subblocks, a motion vector for the chroma subblock based on a motion vector of at least one luma subblock in a set (S) of luma subblocks, the set (S) being determined based on a chroma scaling factor, and the chroma subblock being included in the chroma block; In an equal size design, the 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 another example, the exemplary structure of the device 1700 may correspond to the inter prediction unit 244 in FIG. 2. In another example, the exemplary structure of the device 1700 may correspond to the inter prediction unit 344 in FIG.
[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, the PU including co-located luma and chroma blocks, the method comprising: determining chroma scaling factors in horizontal and vertical directions (SubWidthC and SubHeightC) based on a 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 a chroma block (in one example, a chroma block and a luma block 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 a 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 realisation 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)) Any combination of the above is included.
[0293] In a possible realization of the method according to any of the preceding realizations of the first aspect or according to the first aspect itself, the second set of luma sub-blocks (S) comprises two sub-blocks, namely: 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 realization form of the method according to any of the preceding realizations of the first aspect or according to 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 subblock 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 realization form of the method according to any of the preceding realizations of the first aspect or according to 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 subblock 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, the PU including 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 a 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 realisation 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)) Any combination of the above is included.
[0299] In a possible realization of the method according to any of the preceding realizations of the second aspect or according to the second aspect itself, the second set of luma sub-blocks (S) comprises two sub-blocks, namely: 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 may include: 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 form 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 according to the second aspect itself, the step of dividing by shifting operations comprises: Round towards 0, Round 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 realisation of the method according to any preceding realisation of the second aspect or the second aspect itself, the averaging step comprises averaging or rounding away from infinity.
[0307] In a possible realisation of the method according to any preceding realisation of the second aspect or the second aspect itself, the averaging step comprises averaging or rounding towards infinity.
[0308] In a possible realization form of the method according to any of the preceding realizations of the second aspect or according to 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 subblock 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 realization form of the method according to any of the preceding realizations of the second aspect or according to 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 subblock 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 realization form of the method according to any of the preceding realizations of the second aspect or according to 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 subblock 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 the steps of: dividing a luma block of a current picture into a set of equal sized luma sub-blocks; Dividing the chroma blocks of the current picture into a set of equal-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 form of the method according to any of the preceding implementation schemes of the third aspect or 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 realisation of the method according to any of the preceding realisations of the third aspect or according to the third aspect itself, numCSbX=numSbX>>(SubWidthC-1), and numCSbY=numSbY>>(SubHeightC-1), numCSbX and numCSbY represent the numbers of chroma sub-blocks in the horizontal and vertical directions, respectively.
[0315] In a possible implementation form 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 realisation of the method according to any of the preceding realisations of the third aspect or according to 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 realization form of the method according to any of the preceding realizations 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 realization of the method according to any of the preceding realizations of the third aspect or according to the third aspect itself, the set of luma sub-blocks (S) may include the following sub-blocks: S0 = (xSbIdxL, ySbIdxL) S1=(xSbIdxL,ySbIdxL+(SubHeightC-1)) S2=(xSbIdxL+(SubWidthC-1),ySbIdxL) S3=(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) Any combination of the above is included.
[0319] In a possible realization of the method according to any of the preceding realizations of the third aspect or according to the third aspect itself, the set of luma sub-blocks (S) is divided into two sub-blocks, namely: 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 a motion vector for a chroma sub-block based on the motion vectors of the luma sub-blocks in the set S includes averaging the motion vectors of the luma sub-blocks in the set S.
[0321] In a possible realization form of the method according to any of the preceding realizations 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 involves averaging the vertical components of the motion vectors of the luma sub-blocks in the set S.
[0322] In a possible implementation form 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 a possible realisation of the method according to any preceding realisation of the third aspect or the third aspect itself, averaging means averaging away from zero.
[0324] In a possible realisation of the method according to any of the preceding realisations of the third aspect or the third aspect itself, averaging means averaging towards zero.
[0325] In a possible realisation of the method according to any preceding realisation of the third aspect or 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 realization form of the method according to any of the preceding realizations of the third aspect or according to 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 subblock 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 realization form of the method according to any of the preceding realizations of the third aspect or according to 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 subblock 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 realization form of the method according to any of the preceding realizations of the third aspect or according to 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 subblock 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 realisation of the method according to any preceding realisation 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 realization of the method according to any preceding realization of the third aspect or the third aspect itself, the chroma format is defined as YUV4:2:2.
[0334] In a possible realization format of the method according to any of the preceding realizations 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 carrying out a method according to any one of the first to third aspects.
[0338] A seventh aspect of the decoder is The decoder includes one or more processors and a non-transitory computer readable storage medium coupled to the processors and storing programming for execution by the processors, the programming, when executed by the 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 The encoder includes one or more processors and a non-transitory computer-readable storage medium coupled to the processors and storing programming for execution by the processors, the programming, when executed by the 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 into account the chroma format of a picture when obtaining chroma motion vectors from luma motion vectors. By taking the average of the luma motion vectors, a linear subsampling of the luma motion field is performed. It turns out that when the chroma color plane has the same height as the luma plane, it is more appropriate to select motion vectors from horizontally adjacent luma blocks, so that they have the same vertical position. Selecting luma motion vectors depending on the picture chroma format results in a more accurate chroma motion field, due to the more accurate luma motion vector field subsampling. This dependency on the chroma format allows the selection of the most appropriate luma block when averaging the luma motion vectors to generate the chroma motion vectors. As a result of the more accurate motion field interpolation, the prediction error is reduced, which results in a technical result of improved compression performance.
[0341] The following is a description of the application of the encoding and decoding methods as illustrated 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 type of combination thereof, etc.
[0343] The capture device 3102 may generate data and encode the data by the encoding method as shown in the above embodiment. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown in the drawing), which encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone or pad, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, the capture device 3102 may include the source device 12 as described above. When the data includes video, the video encoder 20 included in the capture device 3102 may actually perform the video encoding process. When the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually perform the audio encoding process. In some practical scenarios, the capture device 3102 delivers the encoded video and audio data by multiplexing them together. In other practical scenarios, for example, in a video 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 supply system 3100, a terminal device 3106 receives and plays the encoded data. The terminal device 3106 may be a device having data receiving and recovering capabilities, 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, that can decode the encoded data. For example, the terminal device 3106 may include a destination device 14 as described above. When the encoded data includes video, a video decoder 30 included in the terminal device is prioritized to perform video decoding. When the encoded data includes audio, an audio decoder included in the terminal device is prioritized to perform audio decoding processing.
[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 a 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 the 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 showing an example structure of a terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, the protocol processing unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), Hyper Text Transfer Protocol (HTTP), HTTP Live streaming protocol (HLS), MPEG-DASH, Real-time Transport protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof, etc.
[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 conference 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 including the video decoder 30 as described in the above embodiment decodes the video ES by the decoding method as shown in the above embodiment to generate video frames, and supplies the data to a synchronization unit 3212. An audio decoder 3208 decodes the audio ES to generate audio frames, and supplies the data to a synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in FIG. Y) before being supplied to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in FIG. 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 a video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information. The information may be coded in a 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 embedded in other systems, for example a vehicle system.
[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 The 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 == Equal != Not equal
[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 argument, the shorter argument is extended by adding higher-order 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 argument, the shorter argument is extended by adding higher-order 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 argument, the shorter argument is extended by adding higher-order 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 as a 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 as a 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 to 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 to 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 ranges 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 through 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 following table specifies the priority of operations from highest to lowest, with a higher position in the table indicating a 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 / *Notes regarding remaining conditions* / Statement n A statement of logical operation as mathematically described in may be written in the following manner: ...as / ...the following applies: -If condition 0, then statement 0 - Else, if condition 1, then statement 1 -... - otherwise (reference note for remaining conditions), statement n
[0366] Each "if..., else, if..., otherwise" statement in the text is introduced by "as" or "if... holds" immediately followed by "if...". The final condition of an "if..., else, if..., otherwise" is always "otherwise". Alternating "if..., else, if..., otherwise" statements can be identified by matching the "as" or "if... holds" that ends with "otherwise".
[0367] In the text, the following forms: if(condition0a&&condition0b) Statement 0 else if(condition 1a||condition 1b) Statement 1 ... else Statement n A statement of logical operation 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 -… - if not, statement n
[0368] In the text, the following forms: if(condition 0) Statement 0 if(condition1) Statement 1 A statement of logical operation 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 relation to 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 term "comprising" does not exclude other elements or steps, and the indefinite article "a" or "an" does 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. The 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, but 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 in the present application, it should be understood that the disclosed system, device, and method may be realized in other ways. For example, the described device embodiment is merely exemplary. For example, the unit division is merely a logical functional division, and may be divided in other ways in actual implementation. For example, multiple units or components may be combined or integrated into other systems, or some features may be ignored or not implemented. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be realized by using some interfaces. Indirect couplings or communication connections between devices or units may be realized in electronic, mechanical, or other forms.
[0373] The units described as separate parts may or may not be physically separated, and the parts shown as units may or may not be physical units, may be located in one location, or may be distributed among 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 encoders and / or decoders, that include 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 image 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 codes and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium, such as a data storage medium, or a communication medium, including, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communication protocol. Thus, a computer-readable medium may generally correspond to (1) a tangible computer-readable storage medium that is non-transitory, or (2) a communication medium, such as a signal or carrier wave. A data storage medium 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 implementation of 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 referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, 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. Thus, 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 incorporated into a combined codec. Additionally, the techniques may be fully implemented in one or more circuit or logic elements.
[0380] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC) or a set of ICs (e.g., a chipset). Various components, modules or units are described in this disclosure to highlight 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 interoperable hardware units including one or more processors as described above.
Claims
1. 1. 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, comprising: 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 current image block belongs; determining a set (S) of luma sub-blocks of the luma block based on the value of the chroma scaling factor; determining 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; The method includes:
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. 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 S 0 = ((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1)), (ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and S 1 Second luma sub-block indexed by =((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)) Including, SubWidthC and SubHeightC represent the chroma scaling factors in the horizontal and vertical directions, respectively; xSbIdx and ySbIdx represent the horizontal and vertical sub-block indices, respectively, for luma sub-blocks in the set (S); "<<" represents a left arithmetic shift, ">>" represents a right arithmetic shift, xSbIdx=0..numSbX−1 and ySbIdx=0..numSbY−1, numSbX indicates the number of the luma sub-blocks in the luma block along the horizontal direction; The method of claim 1 or 2, wherein numSbY indicates the number of luma sub-blocks in the luma block along the vertical direction.
4. The method of claim 3 , wherein the number of the chroma sub-blocks in the chroma block along the horizontal and vertical directions is the same as the number of the luma sub-blocks in the luma block along the horizontal and vertical directions, respectively.
5. When both SubWidthC and SubHeightC are equal to 1, the set of luma sub-blocks (S) is S 0 = (xCSbIdx, yCSbIdx), When at least one of SubWidthC and SubHeightC is not equal to 1, the set of luma sub-blocks (S) is S 0 = ((xCSbIdx>>(SubWidthC-1)<<(SubWidthC-1)), (yCSbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and S 1 Second luma sub-block indexed by =(xCSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(yCSbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)) Including, SubWidthC and SubHeightC represent the chroma scaling factors in the horizontal and vertical directions, respectively; xCSbIdx and yCSbIdx represent the horizontal and vertical sub-block indices, respectively, for luma sub-blocks in the set (S); 3. The method of claim 1, wherein xCSbIdx=0..numCSbX-1 and yCSbIdx=0..numCSbY-1, where numCSbX indicates the number of chroma sub-blocks in the horizontal direction and numCSbY indicates the number of chroma sub-blocks in the vertical direction.
6. The method of claim 5 , wherein a size of each of the chroma sub-blocks is the same as a size of each of the luma sub-blocks.
7. a number of chroma sub-blocks in the chroma block along the horizontal direction depends on the number of luma sub-blocks in the luma block along the horizontal direction and the value of the chroma scaling factor in the horizontal direction; 6. The method of claim 5, wherein a number of chroma sub-blocks in the chroma block along the vertical direction depends on a number of the luma sub-blocks in the luma block along the vertical direction and a value of the chroma scaling factor in the vertical direction.
8. For the chroma sub-blocks indexed by the horizontal sub-block index xSbIdxL and the vertical sub-block index ySbIdxL, the set of luma sub-blocks (S) is S 0 =(xSbIdxL,ySbIdxL)、 S 1 =(xSbIdxL,ySbIdxL+(SubHeightC-1))、 S 2 = (xSbIdxL + (SubWidthC-1), ySbIdxL), or S 3 =(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) one or more of the sub-blocks indexed by The luma subblock index S 0 is represented by the sub-block index xSbIdxL in the horizontal direction and the sub-block index ySbIdxL in the vertical direction, The luma block index S 1 is represented by the horizontal sub-block index xSbIdxL and the vertical sub-block index ySbIdxL+(SubHeightC-1), The luma block index S 2 is represented by the horizontal sub-block index xSbIdxL+(SubWidthC-1) and the vertical sub-block index ySbIdxL, The luma block index S 3 8. The method according to claim 1, wherein C is represented by the horizontal sub-block index xSbIdxL+(SubWidthC-1) and the vertical sub-block index ySbIdxL+(SubHeightC-1).
9. The set of luma sub-blocks (S) may include S 0 = (xSbIdxL, ySbIdxL), S 1 = (xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) Including, The luma block position S 0 is represented by the horizontal sub-block index xSbIdxL and the vertical sub-block index ySbIdxL, The luma block position S 1 9. The method according to claim 1, wherein C is represented by the horizontal sub-block index xSbIdxL+(SubWidthC-1) and the vertical sub-block index ySbIdxL+(SubHeightC-1).
10. When the chroma format is 4:4:4, the set (S) includes one luma sub-block that is co-located with the chroma sub-block; When the chroma format is 4:2:2, the set (S) includes two luma sub-blocks that are horizontally adjacent to each other, 10. The method according to claim 1, wherein when the chroma format is 4:2:0, the set (S) comprises two diagonal luma sub-blocks.
11. determining a motion vector for the chroma sub-block based on the motion vectors of one or more luma sub-blocks in the set (S) of luma sub-blocks when there is more than one luma sub-block in the set (S), averaging the motion vectors of the luma sub-blocks in the set S to generate an averaged luma motion vector; deriving the motion vector for the chroma sub-block based on the averaged luma motion vector. The method of any one of claims 1 to 10, comprising:
12. Averaging the motion vectors of the luma sub-blocks in the set S comprises: averaging 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 11 , comprising one or more of:
13. averaging the motion vectors of the luma sub-blocks in the set S to generate an averaged luma motion vector, 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 0 or more, mvAvgLX[1]=(mvAvgLX[1]+(N>>1)-1)>>log2(N), Otherwise, mvAvgLX[1] = -((-mvAvgLX[1] + (N>>1)-1)>>log2(N)). Including, mvAvgLX is the motion vector resulting from the averaging, mvAvgLX[0] is the horizontal component of the resulting motion vector mvAvgLX, and mvAvgLX[1] is the vertical component of the resulting motion vector mvAvgLX; S i x and S i y are the horizontal and vertical indices of the sub-block S i 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 13. The method of claim 11 or 12, wherein N is the number of elements in the set (S) of luma sub-blocks, log2(N) denotes the logarithm of N to the base 2, the power to which the number 2 is raised to obtain the value N, and ">>" denotes a right arithmetic shift.
14. 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, 14. The method of claim 11, wherein 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 chroma scaling factors in the horizontal and vertical directions, respectively, xSbIdx and ySbIdx represent the horizontal and vertical sub-block indices, respectively, for luma sub-blocks in the set (S), and "<<" is a left arithmetic shift and ">>" is a right arithmetic shift.
15. Determining horizontal and vertical chroma scaling factors based on chroma format information includes:
15. The method of claim 1, comprising determining the chroma scaling factors in the horizontal and vertical directions based on a mapping between the chroma format information and pairs of chroma scaling factors in the horizontal and vertical directions.
16. The method of claim 1 , further comprising the step of generating a prediction of the chroma sub-block based on the determined motion vector.
17. 17. The method of claim 1, wherein the chroma format comprises one of a YUV 4:2:2 format, a YUV 4:2:0 format, or a YUV 4:4:4 format.
18. 18. The method of any one of claims 1 to 17, implemented by an encoding device.
19. 18. The method of any one of claims 1 to 17, implemented by a decoding device.
20. An encoder (20) including processing circuitry for carrying out the method of any one of claims 1 to 18.
21. A decoder (30) including processing circuitry for carrying out the method according to any one of claims 1 to 17 and 19.
22. A computer program product comprising program code for carrying out the method according to any one of claims 1 to 19.
23. one or more processors; a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor; 1. A decoder comprising:
20. A decoder, wherein the programming, when executed by the processor, configures the decoder to perform a method according to any one of claims 1 to 17 and 19.
24. one or more processors; a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor; An encoder comprising: An encoder, wherein the programming, when executed by the processor, configures the encoder to perform a method according to any one of claims 1 to 18.
25. A non-transitory computer readable medium carrying program code which, when executed by a computing device, causes the computing device to perform the method of any one of claims 1 to 19.
26. A bitstream for a video signal by including a plurality of syntax elements, comprising:
20. A bitstream, wherein the plurality of syntax elements comprises a first flag, and the method of any one of claims 1 to 19 is performed based on a value of the first flag.
27. 1. An apparatus for affine based inter prediction of a current image block including co-located luma and chroma blocks, 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; An apparatus comprising:
28. 28. The apparatus of claim 27, 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.
29. 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 S 0 = ((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1)), (ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and S 1 Second luma sub-block indexed by =((xSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(ySbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)) Including, SubWidthC and SubHeightC represent the chroma scaling factors in the horizontal and vertical directions, respectively; xSbIdx and ySbIdx represent the horizontal and vertical sub-block indices, respectively, for luma sub-blocks in the set (S); "<<" represents a left arithmetic shift, ">>" represents a right arithmetic shift, xSbIdx=0..numSbX−1 and ySbIdx=0..numSbY−1, numSbX indicates the number of the luma sub-blocks in the luma block along the horizontal direction; The apparatus of claim 27 or 28, wherein numSbY indicates the number of luma sub-blocks in the luma block along the vertical direction.
30. 30. The apparatus of claim 29, wherein a number of the chroma sub-blocks in the chroma block along the horizontal and vertical directions is the same as a number of the luma sub-blocks in the luma block along the horizontal and vertical directions, respectively.
31. When both SubWidthC and SubHeightC are equal to 1, the set of luma sub-blocks (S) is S 0 = (xCSbIdx, yCSbIdx), When at least one of SubWidthC and SubHeightC is not equal to 1, the set of luma sub-blocks (S) is S 0 = ((xCSbIdx>>(SubWidthC-1)<<(SubWidthC-1)), (yCSbIdx>>(SubHeightC-1)<<(SubHeightC-1))), and S 1 Second luma sub-block indexed by =(xCSbIdx>>(SubWidthC-1)<<(SubWidthC-1))+(SubWidthC-1),(yCSbIdx>>(SubHeightC-1)<<(SubHeightC-1))+(SubHeightC-1)) Including, SubWidthC and SubHeightC represent the chroma scaling factors in the horizontal and vertical directions, respectively; xCSbIdx and yCSbIdx represent the horizontal and vertical sub-block indices, respectively, for luma sub-blocks in the set (S); 29. The apparatus of claim 27 or 28, wherein xCSbIdx=0..numCSbX-1 and yCSbIdx=0..numCSbY-1, where numCSbX indicates the number of chroma sub-blocks in the horizontal direction and numCSbY indicates the number of chroma sub-blocks in the vertical direction.
32. 32. The apparatus of claim 31, wherein a size of each of the chroma sub-blocks is the same as a size of each of the luma sub-blocks.
33. a number of chroma sub-blocks in the chroma block along the horizontal direction depends on the number of luma sub-blocks in the luma block along the horizontal direction and the value of the chroma scaling factor in the horizontal direction; 32. The apparatus of claim 31 , wherein a number of chroma sub-blocks in the chroma block along the vertical direction depends on a number of luma sub-blocks in the luma block along the vertical direction and a value of the chroma scaling factor in the vertical direction.
34. For the chroma sub-blocks indexed by the horizontal sub-block index xSbIdxL and the vertical sub-block index ySbIdxL, the set of luma sub-blocks (S) is S 0 =(xSbIdxL,ySbIdxL)、 S 1 =(xSbIdxL,ySbIdxL+(SubHeightC-1))、 S 2 = (xSbIdxL + (SubWidthC-1), ySbIdxL), or S 3 =(xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) one or more of the sub-blocks indexed by The luma subblock index S 0 is represented by the sub-block index xSbIdxL in the horizontal direction and the sub-block index ySbIdxL in the vertical direction, The luma block index S 1 is represented by the horizontal sub-block index xSbIdxL and the vertical sub-block index ySbIdxL+(SubHeightC-1), The luma block index S 2 is represented by the horizontal sub-block index xSbIdxL+(SubWidthC-1) and the vertical sub-block index ySbIdxL, The luma block index S 3 34. The apparatus of claim 27, wherein: xSbIdxL+(SubWidthC-1) is represented by the horizontal sub-block index and ySbIdxL+(SubHeightC-1) is the vertical sub-block index.
35. The set of luma sub-blocks (S) may include S 0 = (xSbIdxL, ySbIdxL), S 1 = (xSbIdxL+(SubWidthC-1),ySbIdxL+(SubHeightC-1)) Including, The luma block position S 0 is represented by the horizontal sub-block index xSbIdxL and the vertical sub-block index ySbIdxL, The luma block position S 1 35. The apparatus of claim 27, wherein: xSbIdxL+(SubWidthC-1) is represented by the horizontal sub-block index and ySbIdxL+(SubHeightC-1) is the vertical sub-block index.
36. When the chroma format is 4:4:4, the set (S) includes one luma sub-block that is co-located with the chroma sub-block; When the chroma format is 4:2:2, the set (S) includes two luma sub-blocks that are horizontally adjacent to each other, 36. The device according to claim 27, wherein when the chroma format is 4:2:0, the set (S) comprises two diagonal luma sub-blocks.
37. When there is more than one luma sub-block in the set (S), the motion vector derivation module: averaging the motion vectors of the luma sub-blocks in the set S to generate an averaged luma motion vector; 37. The apparatus of claim 27, configured to derive the motion vector for the chroma sub-block based on the averaged luma motion vector.
38. The motion vector derivation module includes: averaging the horizontal components of the motion vectors of the luma sub-blocks in the set S, or 38. The apparatus of claim 37, configured to average vertical components of the motion vectors of the luma sub-blocks in the set S.
39. The motion vector derivation module is as follows: 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 0 or more, mvAvgLX[1]=(mvAvgLX[1]+(N>>1)-1)>>log2(N), Otherwise, mvAvgLX[1] = -((-mvAvgLX[1] + (N>>1)-1)>>log2(N)). and configured to average the motion vectors of the luma sub-blocks in the set S to generate an averaged luma motion vector, such that mvAvgLX is the motion vector resulting from the averaging, mvAvgLX[0] is the horizontal component of the resulting motion vector mvAvgLX, and mvAvgLX[1] is the vertical component of the resulting motion vector mvAvgLX; S i x and S i y are the horizontal and vertical indices of the sub-block S i 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 39. The apparatus of claim 37 or 38, wherein N is the number of elements in the set (S) of luma sub-blocks, 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 ">>" represents a right arithmetic shift.
40. The motion vector derivation module is as follows: 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 and configured to average the motion vectors of the luma sub-blocks in the set S to generate an averaged luma motion vector, such that 40. The apparatus of claim 37, wherein 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 chroma scaling factors in the horizontal and vertical directions, respectively, xSbIdx and ySbIdx represent the horizontal and vertical sub-block indices, respectively, for luma sub-blocks in the set (S), and "<<" is a left arithmetic shift and ">>" is a right arithmetic shift.
41. The decision module:
41. The apparatus of claim 27, configured to determine the chroma scaling factors in the horizontal and vertical directions based on a mapping between the chroma format information and pairs of chroma scaling factors in the horizontal and vertical directions.
42. 42. The apparatus of claim 27, further comprising a motion compensation module configured to generate a prediction of the chroma sub-block based on the determined motion vector.
43. 43. The apparatus of claim 27, wherein the chroma format comprises one of a YUV 4:2:2 format, a YUV 4:2:0 format, or a YUV 4:4:4 format.
Citation Information
Patent Citations
Method and apparatus for affine-based inter prediction of chroma sub-blocks
JP7332703B2
METHOD AND APPARATUS FOR AFFINE-BASED INTER PREDICTION OF CHROMA SUB-BLOCKS - Patent application
JP7615243B2
Cited By
Chroma block decoding method and apparatus, and computer-readable medium and electronic device
US12756850B2