Method and apparatus for candidate derivation of affine merge mode in video coding
By using motion information from non-adjacent neighboring blocks to derive motion vector candidates for affine merging patterns during video encoding and decoding, the problem of low efficiency in motion prediction patterns in existing technologies is solved, thereby improving encoding efficiency and compression performance.
Patent Information
- Application Number
- CN202380022068.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-02-16
- Filing Date
- 2023-02-16
- Publication Date
- 2024-09-24
AI Technical Summary
Existing video encoding and decoding technologies are inefficient in motion prediction modes, especially in affine motion prediction modes, resulting in low coding efficiency.
By utilizing motion information from non-adjacent neighboring blocks during video encoding and decoding, the scope of candidate derivation is expanded, including pruning of affine merging candidates, derivation of inherited affine merging candidates based on non-adjacent neighboring blocks, derivation of constructed affine merging candidates based on non-adjacent neighboring blocks, and derivation method of constructed affine merging candidates based on HMVP.
It improves the accuracy and coding efficiency of motion vectors in affine merging mode, reduces redundant information, and enhances the compression performance of video coding.
Smart Images

Figure CN118696539A
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on and claims priority from U.S. Provisional Application No. 63 / 311,035, filed on February 16, 2022, entitled “Methods and Devices for Candidate Derivation for Affine Merge Mode in Video Coding,” the entire text of which is incorporated by reference. Technical Field
[0003] The present disclosure relates to video coding and compression, and in particular but not limited to methods and apparatus for improving affine merging candidate derivation for affine motion prediction modes during video encoding or decoding. Background Art
[0004] Various video codec techniques can be used to compress video data. Video coding is performed according to one or more video codec standards. For example, today, some well-known video codec standards include Versatile Video Codec (VVC), High Efficiency Video Codec (HEVC, also known as H.265 or MPEG-H Part 2) and Advanced Video Codec (AVC, also known as H.264 or MPEG-4 Part 10), which are jointly developed by ISO / IEC MPEG and ITU-T VECG. AO Media Video 1 (AV1) was developed by the Alliance for Open Media (AOM) as a successor to its previous standard VP9. Audio and Video Codec (AVS) (which refers to digital audio and digital video compression standards) is another video compression series standard developed by the Audio and Video Coding Standard Workgroup of China. Most existing video coding standards are based on the well-known hybrid video coding framework, that is, using block-based prediction methods (e.g., inter-frame prediction, intra-frame prediction) to reduce the redundancy present in video images or sequences, and using transform coding to compress the energy of prediction errors. An important goal of video coding technology is to compress video data into a form that uses a lower bit rate while avoiding or minimizing video quality degradation.
[0005] The first generation of AVS standards includes the Chinese national standard "Information Technology Advanced Audio and Video Codec Part 2: Video" (referred to as AVS1) and "Information Technology Advanced Audio and Video Codec Part 16: Broadcasting and Television Video" (referred to as AVS+). Compared with the MPEG-2 standard, the first generation of AVS standards can provide about 50% bit rate savings at the same perceived quality. The video part of the AVS1 standard was promulgated as a Chinese national standard in February 2006. The second generation of AVS standards includes the Chinese national standard "Information Technology High Efficiency Multimedia Codec" (referred to as AVS2) series, which is mainly aimed at the transmission of additional HD TV programs. The codec efficiency of AVS2 is twice that of AVS+. In May 2016, AVS2 was released as a Chinese national standard. At the same time, the video part of the AVS2 standard was submitted by the Institute of Electrical and Electronics Engineers (IEEE) as an international application standard. The AVS3 standard is a new generation of video codec standards for UHD video applications, aiming to surpass the codec efficiency of the latest international standard HEVC. In March 2019, at the 68th AVS meeting, the AVS3-P2 baseline was completed, which provides about 30% bit rate savings over the HEVC standard. Currently, there is a reference software called High Performance Model (HPM) maintained by the AVS Working Group to demonstrate a reference implementation of the AVS3 standard. Summary of the invention
[0006] This disclosure provides examples of techniques related to improving motion vector candidate derivation for motion prediction modes in a video encoding or decoding process.
[0007] According to a first aspect of the present disclosure, a video decoding method is provided. In the video decoding method, a decoder may obtain a first restricted neighboring area of a current block as a first scanning area, and obtain a second restricted neighboring area of the current block as a second scanning area, wherein the first restricted neighboring area and the second restricted neighboring area are separate. In addition, the decoder may obtain one or more motion vector (MV) candidates from multiple non-adjacent neighboring blocks of the current block based on the first scanning area and the second scanning area. In addition, the decoder may obtain one or more control point motion vectors (CPMV) of the current block based on the one or more MV candidates.
[0008] According to a second aspect of the present disclosure, a video encoding method is provided. In the video encoding method, an encoder may obtain a first restricted neighboring area of a current block as a first scanning area, and obtain a second restricted neighboring area of the current block as a second scanning area, wherein the first restricted neighboring area and the second restricted neighboring area are separate. In addition, the encoder may obtain one or more MV candidates from multiple non-adjacent neighboring blocks of the current block based on the first scanning area and the second scanning area. In addition, the encoder may obtain one or more CPMVs of the current block based on the one or more MV candidates.
[0009] According to a third aspect of the present disclosure, a video decoding method is provided. In the video decoding method, a decoder may obtain a plurality of sub-blocks by dividing an affine coding block, wherein each of the plurality of sub-blocks has a minimum affine block size. In addition, the decoder may store motion information of the affine coding block at a granularity greater than the minimum affine block size.
[0010] According to a fourth aspect of the present disclosure, a video encoding method is provided. In the video encoding method, an encoder may obtain a plurality of sub-blocks by dividing an affine encoding block, wherein each of the plurality of sub-blocks has a minimum affine block size. In addition, the encoder may store motion information of the affine encoding block at a granularity greater than the minimum affine block size.
[0011] According to a fifth aspect of the present disclosure, a device for video decoding is provided. The device includes one or more processors and a memory, the memory is coupled to the one or more processors and is configured to store instructions executable by the one or more processors. In addition, when executing the instructions, the one or more processors are configured to perform the method according to the first aspect or the third aspect above.
[0012] According to a sixth aspect of the present disclosure, a device for video encoding is provided. The device includes one or more processors and a memory, the memory is coupled to the one or more processors and is configured to store instructions executable by the one or more processors. In addition, when executing the instructions, the one or more processors are configured to perform the method according to the second aspect or the fourth aspect above.
[0013] According to the seventh aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to receive a bit stream and execute the method according to the first aspect or the third aspect.
[0014] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by one or more computer processors, the one or more computer processors execute the method according to the second aspect or the fourth aspect to encode a current block into a bit stream and transmit the bit stream. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] A more specific description of examples of the present disclosure will be presented by reference to specific examples illustrated in the accompanying drawings. Given that these drawings depict only some examples and are therefore not to be considered limiting of scope, these examples will be described and explained in more detail and detail through the use of the accompanying drawings.
[0016] Figure 1A is a block diagram illustrating a system for encoding and decoding video blocks according to some examples of the present disclosure.
[0017] Figure 1B is a block diagram of an encoder according to some examples of the present disclosure.
[0018] Figure 1C to Figure 1F is a block diagram illustrating how a frame may be recursively partitioned into multiple video blocks of different sizes and shapes according to some examples of the present disclosure.
[0019] Figure 1G is a block diagram illustrating an exemplary video encoder according to some examples of the present disclosure.
[0020] Figure 2A is a block diagram of a decoder according to some examples of the present disclosure.
[0021] Figure 2B is a block diagram illustrating an exemplary video decoder according to some examples of the present disclosure.
[0022] Figure 3A is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0023] Figure 3B is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0024] Figure 3C is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0025] Figure 3D is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0026] Figure 3Eis a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0027] Figure 4A A 4-parameter affine model according to some examples of the present disclosure is illustrated.
[0028] Figure 4B A 4-parameter affine model according to some examples of the present disclosure is illustrated.
[0029] Figure 4C The locations of spatial merging candidates according to some examples of the present disclosure are illustrated.
[0030] Figure 4D Illustrated are candidate pairs considered for redundancy checking of spatial merging candidates according to some examples of the present disclosure.
[0031] Figure 4E Motion vector scaling of temporal merging candidates according to some examples of the present disclosure is illustrated.
[0032] Figure 4F Candidate positions of temporal merging candidates C0 and C1 according to some examples of the present disclosure are illustrated.
[0033] Figure 5 A 6-parameter affine model according to some examples of the present disclosure is illustrated.
[0034] Figure 6 Illustrated are neighboring neighboring blocks for inherited affine merging candidates according to some examples of the present disclosure.
[0035] Figure 7 Illustrated are neighboring neighboring blocks used to construct affine merging candidates according to some examples of the present disclosure.
[0036] Figure 8 Non-adjacent neighboring blocks for inherited affine merging candidates according to some examples of the present disclosure are illustrated.
[0037] Fig. 9 Derivation of affine merging candidates constructed using pairs of non-adjacent neighboring blocks according to some examples of the present disclosure is illustrated.
[0038] Fig.10 is an illustration of vertical scanning of non-adjacent neighboring blocks according to some examples of the present disclosure.
[0039] Fig.11 is an illustration of parallel scanning of non-adjacent neighboring blocks according to some examples of the present disclosure.
[0040] Fig.12 is an illustration of combined vertical and parallel scanning of non-adjacent neighboring blocks according to some examples of the present disclosure.
[0041] Fig.13A Neighboring blocks having the same size as a current block according to some examples of the present disclosure are illustrated.
[0042] Fig. 13B Neighboring blocks having different sizes from a current block according to some examples of the present disclosure are illustrated.
[0043] Fig.14A An example of using a lower left block of a bottommost block in a previous distance as a bottommost block in a current distance or using an upper right block of a rightmost block in a previous distance as a rightmost block in a current distance according to some examples of the present disclosure is illustrated.
[0044] Fig. 14B An example of using a left block of a bottommost block in a previous distance as a bottommost block in a current distance or using a top block of a rightmost block in a previous distance as a rightmost block in a current distance according to some examples of the present disclosure is illustrated.
[0045] Fig.15A Scanning positions at a lower left position for an upper non-adjacent neighboring block and at an upper right position for a left non-adjacent neighboring block according to some examples of the present disclosure are illustrated.
[0046] Fig. 15B Illustrated is a scanning position at a lower right position for both above and left non-adjacent neighboring blocks according to some examples of the present disclosure.
[0047] Fig. 15C Illustrated is a scanning position at a lower left position for both above and left non-adjacent neighboring blocks according to some examples of the present disclosure.
[0048] Fig.15D Illustrated is a scanning position at an upper right position for both above and left non-adjacent neighboring blocks according to some examples of the present disclosure.
[0049] Fig.16 A simplified scanning process for deriving constructed merge candidates according to some examples of the present disclosure is illustrated.
[0050] Fig.17A Illustrated are spatially neighboring blocks for deriving inherited affine merging candidates according to some examples of the present disclosure.
[0051] Fig. 17B Illustrated are spatially neighboring blocks for deriving constructed affine merging candidates according to some examples of the present disclosure.
[0052] Fig.18 An example of an inheritance-based derivation method for deriving constructed affine candidates according to some examples of the present disclosure is illustrated.
[0053] Fig.19 Templates according to some examples of the present disclosure and reference samples of the templates in reference list 0 and reference list 1 are illustrated.
[0054] Fig. 20 A template using motion information of a sub-block of a current block and a reference sample of the template for a block having a sub-block motion according to some examples of the present disclosure are illustrated.
[0055] Fig.21 An example is illustrated in which a spatially non-adjacent region is restricted to within half the CTU size of the region above and to the left of the current CTU according to some examples of the present disclosure.
[0056] Fig.22A A storage method for directly storing affine motion information about an affine coding block CTU according to some examples of the present disclosure is illustrated.
[0057] Fig. 22B A storage method of projecting and saving affine motion information at each sub-block according to some examples of the present disclosure is illustrated.
[0058] Fig.23 An example of using a center point to derive normal / translational motion at each 4×4 normal block according to some examples of the present disclosure is illustrated.
[0059] Fig.24 is a diagram illustrating a computing environment coupled with a user interface according to some examples of the present disclosure.
[0060] Fig.25 An example of storing motion information of an affine encoded block at a granularity greater than a minimum affine block size according to some examples of the present disclosure is illustrated.
[0061] Fig.26 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.
[0062] Fig. 27 is a diagram illustrating some examples according to the present disclosure corresponding to Fig.26 The video decoding method shown is a flowchart of a video encoding method.
[0063] Fig.28 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.
[0064] Fig.29 is a diagram illustrating some examples according to the present disclosure corresponding to Fig.28 The video decoding method shown is a flowchart of a video encoding method. DETAILED DESCRIPTION
[0065] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, many non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.
[0066] The terms used in this disclosure are only used for the purpose of describing specific embodiments and are not intended to limit the disclosure. The singular forms "a / an", "said" and "the" in this disclosure and the appended claims are also intended to include plural forms, unless otherwise clearly indicated throughout the disclosure. It should also be understood that the term "and / or" used in this disclosure refers to and includes one or any one or all possible combinations of the listed multiple related items.
[0067] References throughout this specification to "one embodiment," "an embodiment," "an example," "some embodiments," "some examples," or similar language mean that the particular feature, structure, or characteristic being described is included in at least one embodiment or example. Unless explicitly stated otherwise, features, structures, elements, or characteristics described in conjunction with one or some embodiments are also applicable to other embodiments.
[0068] Throughout this disclosure, the terms "first", "second", "third", etc. are used as nomenclatures and are only used to refer to related elements, such as devices, parts, components, steps, etc., and do not imply any spatial or temporal order unless otherwise explicitly stated. For example, "first device" and "second device" may refer to two separately formed devices, or two parts, components or working states of the same device, and may be named arbitrarily.
[0069] The terms "module", "sub-module", "circuit", "sub-circuit", "circuitry", "sub-circuitry", "unit", or "sub-unit" may include a memory (shared, dedicated, or group) that stores code or instructions that can be executed by one or more processors. A module may include one or more circuits with or without stored code or instructions. A module or circuit may include one or more components that are directly or indirectly connected. These components may or may not be physically attached to or adjacent to each other.
[0070] As used herein, the terms "if" or "when..." may be understood to mean "at" or "in response to" depending on the context. These terms, if they appear in a claim, may not indicate that the associated limitation or feature is conditional or optional. For example, a method may include the following steps: i) when or if condition X exists, perform function or action X', and ii) when or if condition Y exists, perform function or action Y'. The method may have the ability to perform function or action X' and the ability to perform function or action Y' at the same time. Therefore, functions X' and Y' may be performed at different times in multiple executions of the method.
[0071] The unit or module may be implemented in pure software, pure hardware, or a combination of hardware and software. For example, in a pure software implementation, the unit or module may include functionally related code blocks or software components that are linked together directly or indirectly to perform a specific function.
[0072] Figure 1A is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1A As shown, system 10 includes a source device 12 that generates and encodes video data to be decoded at a later time by a destination device 14. Source device 12 and destination device 14 may include any of a variety of electronic devices, including a desktop or laptop computer, a tablet computer, a smart phone, a set-top box, a digital television, a camera, a display device, a digital media player, a video game console, a video streaming device, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.
[0073] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium for enabling the source device 12 to transmit the encoded video data directly to the target device 14 in real time. The encoded video data may be modulated and transmitted to the target device 14 according to a communication standard such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include a router, a switch, a base station, or any other device that may be used to facilitate communication from the source device 12 to the target device 14.
[0074] In some other embodiments, the encoded video data may be transferred from the output interface 22 to the storage device 32. Subsequently, the target device 14 may access the encoded video data in the storage device 32 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a digital versatile disc (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile memory or a non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In a further example, the storage device 32 may correspond to a file server or another intermediate storage device that can save the encoded video data generated by the source device 12. The target device 14 may access the video data stored in the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing encoded video data and transmitting the encoded video data to the target device 14. Exemplary file servers include a web server (e.g., for a website), a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive. The target device 14 can access the encoded video data through any standard data connection, including a wireless channel suitable for accessing the encoded video data stored on the file server (e.g., a wireless fidelity (Wi-Fi) connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both. The transmission of the encoded video data from the storage device 32 can be a streaming transmission, a download transmission, or a combination of both.
[0075] like Figure 1A As shown, source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include a source such as a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video, or a combination of these sources. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in this application may be generally applicable to video encoding and decoding and may be applied to wireless and / or wired applications.
[0076] Captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be transmitted directly to target device 14 via output interface 22 of source device 12. The encoded video data may also (or alternatively) be stored on storage device 32 for later access by target device 14 or other devices for decoding and / or playback. Output interface 22 may further include a modem and / or a transmitter.
[0077] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use in decoding the video data by video decoder 30. Such syntax elements may be included within the encoded video data transmitted over a communication medium, stored on a storage medium, or stored on a file server.
[0078] In some implementations, the target device 14 may include a display device 34, which may be an integrated display device or an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to a user and may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0079] The video encoder 20 and the video decoder 30 can operate according to a proprietary or industry standard (such as VVC, HEVC, MPEG-4 Part 10, AVC, or an extension of such a standard). It should be understood that the present application is not limited to a specific video encoding / decoding standard and can be applied to other video encoding / decoding standards. It is generally envisioned that the video encoder 20 of the source device 12 can be configured to encode the video data according to any of these current or future standards. Similarly, it is also generally envisioned that the video decoder 30 of the target device 14 can be configured to decode the video data according to any of these current or future standards.
[0080] The video encoder 20 and the video decoder 30 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When implemented partially in software, the electronic device can store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 can be included in one or more encoders or decoders, either of which can be integrated as part of a combined encoder / decoder (CODEC) in a corresponding device.
[0081] Like HEVC, VVC is built on a block-based hybrid video codec framework. Figure 1B 1 is a block diagram illustrating a block-based video encoder according to some embodiments of the present disclosure. In the encoder 100, the input video signal is processed block by block (referred to as a coding unit (CU)). The encoder 100 may be as follows: Figure 1A Video encoder 20 shown. In VTM-1.0, a CU can be up to 128×128 pixels. However, unlike HEVC, which partitions blocks based solely on a quadtree, in VVC, a coding tree unit (CTU) is split into multiple CUs to accommodate different local characteristics based on quad / bin / ternary trees. In addition, the concept of multiple partition unit types in HEVC has been removed, that is, there is no longer a division of CU, prediction unit (PU), and transform unit (TU) in VVC; instead, each CU is always used as a basic unit for both prediction and transformation without further partitioning. In a multi-type tree structure, a CTU is first partitioned according to a quadtree structure. Then, each quadtree leaf node can be further partitioned according to a binary tree structure and a ternary tree structure.
[0082] FIG. 3A to FIG. 3E is a schematic diagram illustrating a multi-type tree partitioning mode according to some embodiments of the present disclosure. FIG. 3A to FIG. 3E Five partition types are shown, including quad partition ( Figure 3A ), vertical binary partition ( Figure 3B ), horizontal binary partitioning ( Figure 3C ), vertical expansion triangular partition ( Figure 3D ) and horizontally extended three-pronged partitioning ( Figure 3E ).
[0083] For each given video block, spatial prediction and / or temporal prediction can be performed. Spatial prediction (or "intra-frame prediction") uses pixels from samples (called reference samples) of already coded neighboring blocks in the same video picture / strip to predict the current video block. Spatial prediction reduces the spatial redundancy inherent in the video signal. Temporal prediction (also known as "inter-frame prediction" or "motion compensated prediction") uses reconstructed pixels from already coded video pictures to predict the current video block. Temporal prediction reduces the temporal redundancy inherent in the video signal. The temporal prediction signal for a given CU is typically represented by one or more motion vectors (MVs) that indicate the amount and direction of motion between the current CU and its temporal reference. Similarly, if multiple reference pictures are supported, a reference picture index is additionally sent, which is used to identify which reference picture in the reference picture storage the temporal prediction signal comes from.
[0084] After spatial prediction and / or temporal prediction, the intra / inter mode decision circuit 121 in the encoder 100 selects the best prediction mode, for example based on a rate-distortion optimization method. Then, the block prediction value 120 is subtracted from the current video block; and the resulting prediction residual is decorrelated using the transform circuit 102 and the quantization circuit 104. The resulting quantized residual coefficients are dequantized by the dequantization circuit 116, and the quantized residual coefficients are inversely transformed by the inverse transform circuit 118 to form a reconstructed residual, which is then added back to the prediction block to form a reconstructed signal of the CU. Further, before the reconstructed CU is placed in the reference picture storage of the picture buffer 117 and used for encoding and decoding future video blocks, loop filtering 115, such as a deblocking filter, sample adaptive offset (SAO) and / or adaptive loop filter (ALF), can be applied to the reconstructed CU. To form the output video bitstream 114, the coding mode (inter or intra), prediction mode information, motion information, and quantized residual coefficients are sent to the entropy coding unit 106 for further compression and packing to form a bitstream.
[0085] For example, a deblocking filter is available in the current version of VVC as well as AVC and HEVC. In HEVC, an additional loop filter called SAO is defined to further improve the coding efficiency. In the current version of the VVC standard, another loop filter called ALF is being actively studied and is likely to be included in the final standard.
[0086] These loop filter operations are optional. Performing these operations helps improve coding efficiency and visual quality. Encoder 100 can also decide to turn off these operations to save computational complexity.
[0087] It should be noted that if these filter options are turned on by the encoder 100, intra prediction is typically based on unfiltered reconstructed pixels, while inter prediction is based on filtered reconstructed pixels.
[0088] Figure 2A is a block diagram illustrating a block-based video decoder 200 that can be used in conjunction with many video codec standards. The decoder 200 is located at Figure 1B The block-based video decoder 200 may be similar to the reconstruction-related part in the encoder 100. Figure 1AThe video decoder 30 shown. In the decoder 200, the incoming video bitstream 201 is first decoded by entropy decoding 202 to obtain quantization coefficient levels and prediction related information. Then, the quantization coefficient levels are processed by inverse quantization 204 and inverse transform 206 to obtain reconstructed prediction residuals. The block prediction value mechanism implemented in the intra / inter mode selector 212 is configured to perform intra prediction 208 or motion compensation 210 based on the decoded prediction information. A set of unfiltered reconstructed pixels is obtained by summing the reconstructed prediction residual from the inverse transform 206 with the prediction output generated by the block prediction value mechanism using an adder 214.
[0089] The reconstructed block may further pass through the loop filter 209 and then be stored in the picture buffer 213 used as a reference picture storage. The reconstructed video in the picture buffer 213 may be sent to drive a display device and used to predict future video blocks. When the loop filter 209 is turned on, a filtering operation is performed on these reconstructed pixels to obtain a final reconstructed video output 222.
[0090] Figure 1G is a block diagram illustrating another exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 can perform intra-frame prediction coding and inter-frame prediction coding on video blocks within a video frame. Intra-frame prediction coding relies on spatial prediction to reduce or remove spatial redundancy of video data within a given video frame or picture. Inter-frame prediction coding relies on temporal prediction to reduce or remove temporal redundancy of video data within adjacent video frames or pictures of a video sequence. It should be noted that in the field of video coding and decoding, the term "frame" can be used as a synonym for the term "image" or "picture".
[0091] like Figure 1GAs shown in , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58 for video block reconstruction, an inverse transform processing unit 60, and an adder 62. A loop filter 63 such as a deblocking filter can be located between the adder 62 and the DPB 64 to filter the block boundaries to remove blocking artifacts from the reconstructed video. In addition to the deblocking filter, another loop filter (such as a sample adaptive offset (SAO) filter and / or an adaptive loop filter (ALF)) can also be used to filter the output of the adder 62. In some examples, the loop filter may be omitted and the decoded video blocks may be provided directly by adder 62 to DPB 64. Video encoder 20 may take the form of fixed or programmable hardware units, or may be partitioned among one or more of the illustrated fixed or programmable hardware units.
[0092] Video data memory 40 may store video data to be encoded by components of video encoder 20. For example, video data may be stored in memory 40. Figure 1A The video source 18 shown obtains video data in the video data memory 40. The DPB 64 is a buffer that stores reference video data (e.g., reference frames or pictures) for encoding the video data by the video encoder 20 (e.g., in an intra-frame prediction coding mode or an inter-frame prediction coding mode). The video data memory 40 and the DPB 64 can be formed by any of a variety of memory devices. In various examples, the video data memory 40 can be on-chip with other components of the video encoder 20, or off-chip relative to those components.
[0093] like Figure 1GAs shown in , after receiving the video data, the partition unit 45 within the prediction processing unit 41 partitions the video data into video blocks. The partitioning may also include partitioning the video frame into strips, tiles (e.g., video block sets), or other larger coding units (CUs) according to a predefined partitioning structure (e.g., a quadtree (QT) structure associated with the video data). A video frame is or may be viewed as a two-dimensional array or matrix of samples having sample values. The samples in the array may also be referred to as pixels (pixels or pels). Many samples in the horizontal and vertical directions (or axes) of the array or picture define the size and / or resolution of the video frame. For example, a video frame may be divided into multiple video blocks using QT partitioning. A video block is again or may be viewed as a two-dimensional array or matrix of samples having sample values, but its size is smaller than a video frame. Many samples in the horizontal and vertical directions (or axes) of a video block define the size of the video block. The video block can be further divided into one or more block partitions or sub-blocks (which can again form blocks) by, for example, iteratively using QT partitioning, binary tree (BT) partitioning or ternary tree (TT) partitioning or any combination thereof. It should be noted that the term "block" or "video block" used herein can be a part of a frame or picture, in particular a rectangular (square or non-square) part. For example, with reference to HEVC and VVC, a block or video block can be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU), and / or can be or correspond to a corresponding block (e.g., a coding tree block (CTB), a coding block (CB), a prediction block (PB) or a transform block (TB)) and / or corresponds to a sub-block.
[0094] Prediction processing unit 41 may select one of a plurality of possible prediction coding modes for the current video block based on the error results (e.g., coding rate and distortion level), such as one of a plurality of intra-frame prediction coding modes or one of a plurality of inter-frame prediction coding modes. Prediction processing unit 41 may provide the resulting intra-frame prediction coding block or inter-frame prediction coding block to adder 50 to generate a residual block, and to adder 62 to reconstruct the coded block for subsequent use as part of a reference frame. Prediction processing unit 41 also provides syntax elements such as motion vectors, intra-frame mode indicators, partition information, and other such syntax information to entropy coding unit 56.
[0095] In order to select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction coding of the current video block relative to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, for example, to select an appropriate coding mode for each block of video data.
[0096] In some embodiments, motion estimation unit 42 determines the inter-prediction mode for the current video frame according to a predetermined pattern within the sequence of video frames by generating a motion vector that indicates the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating motion vectors that estimates the motion of video blocks. The motion vectors may, for example, indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame associated with a current block encoded within the current frame. The predetermined pattern may designate video frames in the sequence as P frames or B frames. Intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC encoding in a manner similar to the manner in which motion estimation unit 42 determines motion vectors for inter prediction, or may utilize motion estimation unit 42 to determine the block vector.
[0097] The prediction block of the video block may be or may correspond to a block or reference block of a reference frame, which is considered to closely match the video block to be encoded in terms of pixel difference values, which may be determined by the sum of absolute differences (SAD), the sum of squared differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate the value of the sub-integer pixel position of the reference frame stored in the DPB 64. For example, the video encoder 20 may insert the value of a quarter pixel position, an eighth pixel position, or other fractional pixel position of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel position and the fractional pixel position and output a motion vector with fractional pixel accuracy.
[0098] Motion estimation unit 42 calculates a motion vector for a video block in an inter-prediction coded frame by comparing the position of the video block to the position of a prediction block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.
[0099] The motion compensation performed by the motion compensation unit 44 may involve obtaining or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector of the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, obtain the prediction block from the DPB 64 and forward the prediction block to the adder 50. The adder 50 then forms a residual video block with pixel difference values by subtracting the pixel values of the prediction block provided by the motion compensation unit 44 from the pixel values of the current video block being encoded. The pixel difference values forming the residual video block may include luminance component difference values or chrominance component difference values or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining a motion vector for identifying the prediction block, any flag indicating a prediction mode, or any other syntax information described herein. Note that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes.
[0100] In some embodiments, the intra BC unit 48 may generate a vector and obtain a prediction block in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but wherein the prediction block is in the same frame as the current block being encoded, and wherein the vector is referred to as a block vector relative to the motion vector. Specifically, the intra BC unit 48 may determine an intra prediction mode for encoding the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and test its performance through rate-distortion analysis. Next, the intra BC unit 48 may select an appropriate intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate a rate-distortion value using rate-distortion analysis for various tested intra prediction modes and select an intra prediction mode with the best rate-distortion characteristic among the tested modes as the appropriate intra prediction mode to be used. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original, uncoded block (coded to produce the coded block) and the bit rate (i.e., the number of bits) used to produce the coded block. Intra BC unit 48 may calculate a ratio based on the distortion and rate for each coded block to determine which intra-prediction mode exhibits the best rate-distortion value for the block.
[0101] In other examples, intra BC unit 48 may use motion estimation unit 42 and motion compensation unit 44 in whole or in part to perform these functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by SAD, SSD, or other difference metrics, and identification of the prediction block may include calculating values for sub-integer pixel positions.
[0102] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from different frames according to inter-frame prediction, video encoder 20 can form a residual video block by subtracting the pixel values of the prediction block from the pixel values of the current video block being encoded to form pixel difference values. The pixel difference values forming the residual video block may include luma component differences and chroma component differences.
[0103] As described above, the intra-prediction processing unit 46 may perform intra-prediction on the current video block as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44, or the intra-block copy prediction performed by the intra BC unit 48. Specifically, the intra-prediction processing unit 46 may determine an intra-prediction mode for encoding the current block. To this end, the intra-prediction processing unit 46 may encode the current block using various intra-prediction modes, for example, during a separate encoding pass, and the intra-prediction processing unit 46 (or a mode selection unit in some examples) may select an appropriate intra-prediction mode from the tested intra-prediction modes to use. The intra-prediction processing unit 46 may provide information indicating the selected intra-prediction mode of the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-prediction mode in the bitstream.
[0104] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform.
[0105] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan of the matrix including the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform the scan.
[0106] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioned entropy (PIPE) coding, or other entropy coding methods or techniques. The encoded bitstream may then be transmitted to a video bitstream such as Figure 1A The video decoder 30 shown, or archive it to Figure 1A The data is stored in the storage device 32 as shown for later transmission to or retrieval by the video decoder 30. The entropy coding unit 56 may also entropy encode the motion vectors and other syntax elements of the current video frame being encoded.
[0107] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain to generate a reference block for predicting other video blocks. As described above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values for use in motion estimation.
[0108] Adder 62 adds the reconstructed residual block to the motion compensated prediction block produced by motion compensation unit 44 to produce a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.
[0109] Figure 2B 1 is a block diagram illustrating another exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above-mentioned Figure 1G The decoding process is the reverse of the encoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.
[0110] In some examples, units of the video decoder 30 may be assigned to perform embodiments of the present application. Likewise, in some examples, embodiments of the present disclosure may be divided between one or more units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (such as the motion compensation unit 82).
[0111] The video data memory 79 may store video data to be decoded by other components of the video decoder 30, such as an encoded video bitstream. For example, the video data stored in the video data memory 79 may be obtained from a storage device 32, a local video source (such as a camera) via a wired or wireless network transmission of the video data or by accessing a physical data storage medium (e.g., a flash drive or a hard disk). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use in decoding the video data by the video decoder 30 (e.g., in an intra-frame prediction coding mode or an inter-frame prediction coding mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as a dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. 1 . Figure 2B 92 are depicted as two different components of the video decoder 30. However, it will be apparent to those skilled in the art that the video data memory 79 and the DPB 92 may be provided by the same memory device or by separate memory devices. In some examples, the video data memory 79 may be on-chip with other components of the video decoder 30, or off-chip relative to those components.
[0112] During the decoding process, the video decoder 30 receives an encoded video bitstream representing a video block of an encoded video frame and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantized coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators and other syntax elements to the prediction processing unit 81.
[0113] When a video frame is encoded as an intra-frame prediction coded (I) frame or for intra-frame coded prediction blocks in other types of frames, the intra-frame prediction unit 84 of the prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the signaled intra-frame prediction mode and reference data from a previously decoded block of the current frame.
[0114] When the video frame is encoded as an inter-frame prediction coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks of the video block of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80. Each prediction block can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can construct the reference frame lists: List 0 and List 1 based on the reference frames stored in the DPB 92 using a default construction technique.
[0115] In some examples, when a video block is encoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block defined by video encoder 20.
[0116] The motion compensation unit 82 and / or the intra BC unit 85 determine the prediction information of the video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate the prediction block of the decoded current video block. For example, the motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) used to encode the video block of the video frame, the inter prediction frame type (e.g., B or P), the construction information of one or more reference frame lists in the reference frame list of the frame, the motion vector of each inter prediction encoded video block of the frame, the inter prediction state of each inter prediction encoded video block of the frame, and other information for decoding the video block in the current video frame.
[0117] Similarly, the intra BC unit 85 may use some of the received syntax elements (e.g., flags) to determine that the current video block is predicted using the intra BC mode, construction information that video blocks of the frame are within the reconstructed region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding the video blocks in the current video frame.
[0118] Motion compensation unit 82 may also perform interpolation using interpolation filters to calculate interpolated values for sub-integer pixels of a reference block, as used by video encoder 20 during encoding of the video block. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use the interpolation filters to produce a prediction block.
[0119] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.
[0120] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block of the current video block by summing the residual block from the inverse transform processing unit 88 and the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (such as a deblocking filter, an SAO filter, and / or an ALF) can be positioned between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 can be omitted and the decoded video block can be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 can also store the decoded video for later presentation on a display such as a video player. Figure 1A On a display device such as display device 34.
[0121] In the current VVC and AVS3 standards, the motion information of the current coding block is either copied from the spatial or temporal neighboring blocks specified by the merge candidate index, or obtained through an explicit signal of motion estimation. The focus of the present disclosure is to improve the accuracy of the motion vector of the affine merge mode by improving the derivation method of the affine merge candidate. For the convenience of describing the present disclosure, the existing affine merge mode design in the VVC standard is used as an example to illustrate the proposed ideas. Please note that although the existing affine mode design in the VVC standard is used as an example throughout the disclosure, for technicians in the field of modern video coding and decoding technology, the proposed technology can also be applied to different designs of affine motion prediction modes or other coding and decoding tools with the same or similar design spirit.
[0122] In a typical video encoding and decoding process, a video sequence typically includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other examples, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.
[0123] like Figure 1C As shown, the video encoder 20 (or more specifically, a partition unit in a prediction processing unit of the video encoder 20) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs. A video frame may include an integer number of CTUs sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, i.e., one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 1D As shown, each CTU may include a luma sample CTB, two corresponding chroma sample coding tree blocks, and syntax elements for encoding and decoding the samples of the coding tree blocks. The syntax elements describe the properties of different types of units of pixel coding blocks and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding and decoding the samples of the coding tree block. The coding tree block may be an N×N sample block.
[0124] To achieve better performance, the video encoder 20 may recursively perform tree partitioning (such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination thereof) on the coding tree block of the CTU and divide the CTU into smaller CUs. Figure 1E As shown, a 64×64 CTU 400 is first divided into four smaller CUs, each with a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are each divided into four 16×16 CUs by block size. Two 16×16 CUs 430 and 440 are each further divided into four 8×8 CUs by block size. Figure 1F Depicted diagram Figure 1E The quadtree data structure of the final result of the partitioning process of the CTU 400 depicted in FIG. 4 is shown in FIG. 4 , with each leaf node of the quadtree corresponding to a CU having a corresponding size ranging from 32×32 to 8×8. Figure 1DEach CU may include a luma sample CB and two corresponding chroma sample coding blocks (with the same size of the frame), as well as syntax elements for encoding and decoding the samples of the coding blocks. In monochrome pictures or pictures with three separate color planes, a CU may include a single coding block and syntax structures for encoding and decoding the samples of the coding block. It should be noted that Figure 1E to Figure 1F The quadtree partitioning depicted in FIG is for illustration purposes only, and a CTU can be partitioned into multiple CUs to accommodate different local characteristics based on quadtree / ternary tree / binary tree partitioning. In the multi-type tree structure, a CTU is partitioned according to a quadtree structure, and each quadtree leaf CU can be further partitioned according to a binary tree structure or a ternary tree structure. FIG. 3A to FIG. 3E As shown, there are five possible partition types for a coding block with width W and height H, namely, quadrifugal partition, horizontal binary partition, vertical binary partition, horizontal trifugal partition and vertical trifugal partition.
[0125] In some embodiments, the video encoder 20 may further partition the coding block of the CU into one or more M×N PBs. A PB is a rectangular (square or non-square) sample block to which the same prediction (inter or intra) is applied. The PU of a CU may include a luma sample PB, two corresponding chroma sample PBs, and syntax elements for predicting the PBs. In a monochrome picture or a picture with three separate color planes, the PU may include a single PB and a syntax structure for predicting the PB. The video encoder 20 may generate predicted luma, Cb, and Cr blocks for the luma, Cb, and Cr PBs of each PU of the CU.
[0126] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.
[0127] After the video encoder 20 generates the predicted luma, Cb, and Cr blocks of one or more PUs of a CU, the video encoder 20 may generate a luma residual block of the CU by subtracting the predicted luma block of the CU from its original luma coding block, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block of the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.
[0128] In addition, if Figure 1E As illustrated, the video encoder 20 may use quadtree partitioning to decompose the luma, Cb, and Cr residual blocks of a CU into one or more luma, Cb, and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) block of samples to which the same transform is applied. A TU of a CU may include a luma sample transform block, two corresponding chroma sample transform blocks, and syntax elements for transforming transform block samples. Thus, each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block. In some examples, the luma transform block associated with a TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming samples of a transform block.
[0129] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block of the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block of the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block of the TU.
[0130] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to the process of quantizing transform coefficients to possibly reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After the video encoder 20 quantizes the coefficient block, the video encoder 20 may entropy encode the syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Ultimately, the video encoder 20 may output a bitstream including a sequence of bits forming a representation of a coded frame and associated data, which is stored in the storage device 32 or transmitted to the target device 14.
[0131] After receiving the bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may reconstruct a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing video data is generally the opposite of the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform an inverse transform on a coefficient block associated with a TU of the current CU to reconstruct a residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding the samples of the prediction block of the PU of the current CU to the corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block of each CU of the frame, the video decoder 30 may reconstruct the frame.
[0132] As mentioned above, video codecs mainly use two modes, i.e., intra-frame prediction (or intra-prediction) and inter-frame prediction (or inter-prediction) to achieve video compression. It should be noted that IBC can be considered as intra-frame prediction or a third mode. Between these two modes, inter-frame prediction contributes more to codec efficiency than intra-frame prediction because it uses motion vectors to predict the current video block from a reference video block.
[0133] However, with the continuous improvement of video data capture technology and finer video block sizes for retaining details in video data, the amount of data required to represent the motion vector of the current frame has also increased significantly. One way to overcome this challenge is to benefit from the fact that not only a group of neighboring CUs in the spatial and temporal domains have similar video data for prediction purposes, but also the motion vectors between these neighboring CUs are similar. Therefore, by exploring the spatial and temporal correlation of CUs, the motion information of spatially neighboring CUs and / or temporally co-located CUs can be used as an approximation of the motion information (e.g., motion vector) of the current CU, which is also called the "motion vector predictor" (MVP) of the current CU.
[0134] Instead, it will be combined as above Figure 1B The actual motion vector of the current CU determined by the motion estimation unit is encoded into a video bit stream, and the motion vector prediction value of the current CU is subtracted from the actual motion vector of the current CU to generate a motion vector difference (MVD) of the current CU. In this way, there is no need to encode the motion vector determined by the motion estimation unit for each CU of the frame into a video bit stream, and the amount of data used to represent the motion information in the video bit stream can be significantly reduced.
[0135] Like the process of selecting a prediction block in a reference frame during inter-frame prediction of a coding block, a set of rules need to be adopted by both the video encoder 20 and the video decoder 30 for constructing a motion vector candidate list (also referred to as a "merge list") of the current CU using those potential candidate motion vectors associated with spatially neighboring CUs and / or temporally co-located CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector prediction value of the current CU. In doing so, the motion vector candidate list itself does not need to be transmitted from the video encoder 20 to the video decoder 30, and the index of the selected motion vector prediction value within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector prediction value within the motion vector candidate list to encode and decode the current CU.
[0136] Affine Model
[0137] In HEVC, only the translational motion model is applied to motion compensated prediction. However, in the real world, there are many kinds of motion, such as zooming in / out, rotation, perspective motion, and other irregular motions. In VVC and AVS3, affine motion compensated prediction is applied by signaling a flag for each inter-frame coding block to indicate whether the translational motion model or the affine motion model is applied to inter-frame prediction. In the current VVC and AVS3 designs, one affine coding block supports two affine modes, including a 4-parameter affine mode and a 6-parameter affine mode.
[0138] The 4-parameter affine model has the following parameters: two parameters for translational motion in the horizontal and vertical directions, one parameter for scaling motion, and one parameter for rotational motion in both directions. In this model, the horizontal scaling parameter is equal to the vertical scaling parameter, and the horizontal rotation parameter is equal to the vertical rotation parameter. To better fit the motion vectors and affine parameters, these affine parameters are derived from two MVs (also called control point motion vectors (CPMVs)) located at the top left and top right corners of the current block. FIG. 4A to FIG. 4B As shown, the affine motion field of a block is described by two CPMVs (V0, V1). Based on the motion of the control points, an affine coded block motion field (v x , v y ) is described as:
[0139]
[0140] The 6-parameter affine model has the following parameters: two parameters for horizontal and vertical translation, two parameters for horizontal scaling and rotation, and two parameters for vertical scaling and rotation. The 6-parameter affine motion model is encoded and decoded using three CPMVs. Figure 5 As shown, the three control points of a 6-parameter affine block are located at the upper left, upper right, and lower left corners of the block. The motion at the upper left control point is associated with translational motion, and the motion at the upper right control point is associated with rotation and scaling motion in the horizontal direction, and the motion at the lower left control point is associated with rotation and scaling motion in the vertical direction. Compared with the 4-parameter affine motion model, the 6-parameter rotation and scaling motion in the horizontal direction may be different from those in the vertical direction. Assume that (V0, V1, V2) is Figure 5 The MVs of the upper left corner, upper right corner, and lower left corner of the current block in the control point are used. The motion vector (v x , v y )for:
[0141]
[0142] Affine merge mode
[0143] In the affine merge mode, the CPMV of the current block is not explicitly signaled, but is derived from neighboring blocks. Specifically, in this mode, the motion information of spatially neighboring blocks is used to generate the CPMV of the current block. The size of the affine merge mode candidate list is limited. For example, in the current VVC design, there may be up to five candidates. The encoder can evaluate and select the best candidate index based on the rate-distortion optimization algorithm. The selected candidate index is then signaled to the decoder side. Affine merge candidates can be determined in three ways. In the first way, affine merge candidates can be inherited from neighboring affine encoded blocks. In the second way, affine merge candidates can be constructed based on the translation MV from neighboring blocks. In the third way, zero MV is used as an affine merge candidate.
[0144] For the inherited method, there may be at most two candidates. These candidates are selected from the neighboring blocks located to the lower left of the current block (e.g. Figure 6 As shown, the scanning order is from A0 to A1) and from the neighboring block located to the upper right of the current block (for example, Figure 6 As shown, the scan order is from B0 to B2) (if available).
[0145] For the constructed method, the candidate is a combination of the translation MVs of neighboring blocks, which can be generated in two steps.
[0146] Step 1: Obtain four translation MVs from available neighboring blocks, including MV1, MV2, MV3, and MV4.
[0147] MV1: The MV from one of the three neighboring blocks near the upper left corner of the current block. Figure 7 As shown, the scanning order is B2, B3 and A2.
[0148] MV2: The MV from one of the two neighboring blocks near the upper right corner of the current block. Figure 7 As shown, the scanning order is B1 and B0.
[0149] MV3: The MV from one of the two neighboring blocks near the lower left corner of the current block. Figure 7 As shown, the scanning order is A1 and A0.
[0150] MV4: The MV of the temporal co-located block from the neighboring block near the lower right corner of the current block. As shown in the figure, the neighboring block is T.
[0151] Step 2: Derive a combination based on these four translation MVs from step 1.
[0152] Combination 1: MV1, MV2, MV3;
[0153] Combination 2: MV1, MV2, MV4;
[0154] Combination 3: MV1, MV3, MV4;
[0155] Combination 4: MV2, MV3, MV4;
[0156] Combination 5: MV1, MV2;
[0157] Combination 6:MV1, MV3.
[0158] When the merge candidate list is not full after being populated with inherited candidates and constructed candidates, a zero MV is inserted at the end of the list.
[0159] Affine AMVP mode
[0160] Affine Advanced Motion Vector Prediction (AMVP) mode can be applied to CUs whose width and height are both greater than or equal to 16. A CU-level affine flag is signaled in the bitstream to indicate whether the affine AMVP mode is used, and then another flag is signaled to indicate whether it is 4-parameter affine or 6-parameter affine. In this mode, the difference between the CPMV of the current CU and its CPMV prediction value (CPMVP) is signaled in the bitstream. The size of the affine AVMP candidate list is 2, and the affine AMVP candidate list is generated by using the following four types of CPMV candidates in the following order:
[0161] - Inherited affine AMVP candidates derived from the CPMV of neighboring CUs;
[0162] -Affine AMVP candidate CPMVP constructed using the translation MV of the neighboring CU;
[0163] -Translated MV from neighboring CU;
[0164] - Temporal MV from the co-located CU; and
[0165] -Zero MV.
[0166] The order in which inherited affine AMVP candidates are checked is the same as that of inherited affine merge candidates. The only difference is that for AMVP candidates, only affine CUs with the same reference picture as in the current block are considered. When an inherited affine motion prediction value is inserted into the candidate list, the pruning process is not applied.
[0167] The constructed AMVP candidates are derived from the same spatial neighboring blocks as the affine merge mode. The same check order as in the affine merge candidate construction is used. In addition, the reference picture index of the neighboring blocks is also checked. The first block in the check order that is inter-coded and has the same reference picture as the current CU is used. When the current CU is encoded using a 4-parameter affine mode and both mv0 and mv1 are available, mv0 and mv1 are added as a candidate to the affine AMVP candidate list. When the current CU is encoded using a 6-parameter affine mode and all three CPMVs are available, they are added as a candidate to the affine AMVP candidate list. Otherwise, the constructed AMVP candidate will be set to unavailable.
[0168] If after inserting valid inherited affine AMVP candidates and constructed AMVP candidates, the number of candidates in the affine AMVP list is still less than 2, then mv0, mv1, and mv2 will be added in order as translation MVs to predict all control point MVs of the current CU (if available). Finally, if the affine AMVP list is still not full, the list is filled with zero MVs.
[0169] Regular inter-frame merging mode
[0170] In some embodiments, a conventional inter-merge candidate list is constructed by including the following five types of candidates in order:
[0171] (1) Spatial MVP from spatially adjacent CUs;
[0172] (2) Temporal MVP from the co-located CU;
[0173] (3) history-based MVP from a first-in, first-out (FIFO) table;
[0174] (4) Pairwise average MVP; and
[0175] (5) Zero MV.
[0176] The size of the merge list is signaled in the sequence parameter set header, and the maximum allowed size of the merge list is 6. For each CU codec in merge mode, the index of the best merge candidate is encoded using truncated unary binarization (TU). The first binary bit of the merge index is coded using context, and the other binary bits are coded using bypass.
[0177] The above provides the derivation process of each type of merge candidate. In some embodiments, it can support parallel derivation of merge candidate lists for all CUs in a region of a specific size.
[0178] Spatial candidate derivation
[0179] The derivation of spatial merge candidates in VVC is the same as that in HEVC, except that the positions of the first two merge candidates are swapped. Figure 4C A maximum of four merge candidates are selected from the candidates at the depicted positions. The order of derivation is B0, A0, B1, A1 and B2. Position B2 is considered only when one or more CUs at positions B0, A0, B1, A1 are not available (for example, because it belongs to another slice or tile) or is intra-coded. After the candidate at position A1 is added, a redundancy check is required for the addition of the remaining candidates to ensure that candidates with the same motion information are excluded from the list, thereby improving encoding and decoding efficiency. In order to reduce computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Instead, only the possible candidate pairs are considered. Figure 4D The pairs linked by arrows in , and a candidate is added to the list only if the corresponding candidate for redundancy check does not have the same motion information. Figure 4D Illustrated are candidate pairs considered for redundancy checking of spatial merging candidates.
[0180] Time candidate derivation
[0181] In this step, only one candidate is added to the list. In particular, in the derivation of this temporal merge candidate, the scaled motion vector is derived based on the co-located CU belonging to the co-located reference picture. The reference picture list and reference index used to derive the co-located CU are explicitly signaled in the slice header. The scaled motion vector of the temporal merge candidate is as follows Figure 4E The scaled motion vector is obtained as shown by the dotted line in , and the scaled motion vector is scaled from the motion vector of the co-located CU using the POC distances tb and td, where tb is defined as the POC difference between the reference picture of the current picture and the current picture, and td is defined as the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of the temporal merge candidate is set equal to zero.
[0182] The position of the temporal candidate is selected between candidates C0 and C1, such as Figure 4F If the CU at position C0 is not available, is intra-coded, or is outside the current CTU row, then position C1 is used. Otherwise, position C0 is used to derive the temporal merge candidate.
[0183] History-based Merge Candidate Derivation
[0184] History-based MVP (HMVP) merge candidates are added to the merge list after spatial MVP and temporal motion vector prediction (TMVP). In this method, the motion information of previously coded blocks is stored in a table and used as the MVP of the current CU. A table with multiple HMVP candidates is maintained during the encoding / decoding process. The table is reset (cleared) when a new CTU row is encountered. Whenever there is a non-sub-block inter-coded CU, the associated motion information is added to the last entry of the table as a new HMVP candidate.
[0185] The size S of the HMVP table can be set to 6, which indicates that up to 5 historically based MVP (HMVP) candidates can be added to the table. When a new motion candidate is inserted into the table, a constrained first-in, first-out (FIFO) rule is used, where a redundancy check is first applied to find if the same HMVP exists in the table. If found, the same HMVP is removed from the table, and all subsequent HMVP candidates are moved forward and the same HMVP is inserted into the last entry of the table.
[0186] HMVP candidates can be used in the merge candidate list construction process. Check the latest few HMVP candidates in the table in order and insert them into the candidate list after the TMVP candidate. Apply redundancy check to HMVP candidates for spatial or temporal merge candidates.
[0187] In order to reduce the number of redundant check operations, the following simplifications are introduced. First, the last two entries in the table are checked for redundancy for the A1 and B1 spatial candidates, respectively. Second, once the total number of available merge candidates reaches the maximum allowed merge candidate minus 1, the process of building a merge candidate list from the HMVP is terminated.
[0188] Pairwise average merge candidate derivation
[0189] A pairwise average candidate is generated by averaging the predefined candidate pairs in the existing merge candidate list using the first two merge candidates. Accordingly, the first merge candidate is defined as p0Cand and the second merge candidate can be defined as p1Cand. For each reference list, the average motion vector is calculated separately according to the availability of the motion vectors of p0Cand and p1Cand. If two motion vectors are available in one list, the two motion vectors are averaged even when they point to different reference pictures, and their reference pictures are set to one of p0Cand; if only one motion vector is available, the motion vector is used directly; if no motion vector is available, the list is kept invalid. In addition, if the half-pixel interpolation filter index of p0Cand and p1Cand is different, it is set to 0.
[0190] When the merge list is not full after adding pairwise average merge candidates, zero MVPs are inserted to the end of the merge list until the maximum number of merge candidates is reached.
[0191] Adaptive Re-ranking of Merge Candidates Using Template Matching (ARMC)
[0192] The reordering method (named ARMC) is applied to the normal merge mode, template matching (TM) merge mode and affine merge mode (excluding SbTMVP candidates), where SbTMVP represents the sub-block based temporal motion vector prediction candidate. For TM merge mode, the merge candidates are reordered before the refinement process.
[0193] After constructing the merge candidate list, the merge candidates are divided into several subgroups. The subgroup size is set to 5. The merge candidates in each subgroup are reordered in ascending order according to the cost value based on template matching. For simplicity, the merge candidates in the last subgroup but not the first subgroup are not reordered.
[0194] The template matching cost is measured by the sum of absolute differences (SAD) between the samples of the template of the current block and its corresponding reference samples. The template includes a set of reconstructed samples adjacent to the current block. The reference samples of the template are located by the same motion information of the current block.
[0195] When the merge candidate uses bidirectional prediction, the reference sample points of the template of the merge candidate are also generated by bidirectional prediction, such as Fig.19 shown.
[0196] For a sub-block based merge candidate with a sub-block size equal to Wsub*Hsub, the template on the top includes several sub-templates of size Wsub×1, and the template on the left includes several sub-templates of size 1×Hsub. Wsub is the width of the sub-block, and Hsub is the height of the sub-block. Fig. 20 The motion information of the sub-blocks in the first row and first column of the current block is used to derive the reference samples of each sub-template.
[0197] The current video standards VVC and AVS only use adjacent neighboring blocks to derive affine merge candidates for the current block, such as Figure 6 and Figure 7 In order to increase the diversity of merged candidates and further explore spatial correlation, the coverage of neighboring blocks can be directly extended from adjacent areas to non-adjacent areas.
[0198] In the current video standards VVC and AVS, each inherited affine candidate is derived from one neighboring block with affine motion information. On the other hand, each constructed affine candidate is derived from two or three neighboring blocks with translational motion information. To further explore spatial correlation, a new candidate derivation method combining affine motion and translational motion can be studied.
[0199] The candidate derivation method proposed for the affine merge mode can be extended to other coding modes, such as the affine AMVP mode and the regular merge mode.
[0200] In the present disclosure, the candidate derivation process of the affine merge mode is extended by using not only adjacent neighboring blocks but also non-adjacent neighboring blocks. The specific method can be summarized as the following aspects, including: affine merge candidate pruning, inherited affine merge candidate derivation process based on non-adjacent neighboring blocks, constructed affine merge candidate derivation process based on non-adjacent neighboring blocks, constructed affine merge candidate derivation method based on inheritance, constructed affine merge candidate derivation method based on HMVP, candidate derivation method of affine AMVP mode and conventional merge mode, and motion information storage.
[0201] Affine Merge Candidate Pruning
[0202] Since the size of the affine merge candidate list in typical video codec standards is usually limited, candidate pruning is a necessary process to remove redundant affine merge candidates. This pruning process is required for both inherited affine merge candidates and constructed affine merge candidates. As explained in the introduction, the CPMV of the current block is not directly used for affine motion compensation. Instead, the CPMV needs to be converted into a translation MV at each sub-block position within the current block. The conversion process is performed by following the general affine model as shown below:
[0203]
[0204] Where (a, b) are differential translation parameters, (c, d) are differential scaling and rotation parameters in the horizontal direction, (e, f) are differential scaling and rotation parameters in the vertical direction, and (x, y) are the pivot position of the sub-block (e.g., center or top-left corner) relative to the top-left corner of the current block (e.g., Figure 5 The horizontal and vertical distances of the coordinates (x, y) shown, and (v x , v y ) is the target translation MV of the sub-block.
[0205] For the 6-parameter affine model, three CPMVs (called V0, V1, and V2) are available. Then the six model parameters a, b, c, d, e, and f can be calculated as
[0206]
[0207] For the 4-parameter affine model, if the CPMV of the upper left corner and the CPMV of the upper right corner (referred to as V0 and V1) are available, then the six parameters a, b, c, d, e, and f can be calculated as
[0208]
[0209] For the 4-parameter affine model, if the CPMV of the upper left corner and the CPMV of the lower left corner (referred to as V0 and V2) are available, then the six parameters a, b, c, d, e, and f can be calculated as
[0210]
[0211] In the above equations (4), (5) and (6), w and h represent the width and height of the current block, respectively.
[0212] When comparing two merged candidate sets of CPMV for redundancy checking, it is recommended to check the similarity of the six affine model parameters. Therefore, the candidate pruning process can be performed in two steps.
[0213] In step 1, given two candidate sets of CPMV, the corresponding affine model parameters of each candidate set are derived. More specifically, the two candidate sets of CPMV can be represented by two sets of affine model parameters, such as (a1, b1, c1, d1, e1, f1) and (a2, b2, c2, d2, e2, f2).
[0214] In step 2, the two sets of affine model parameters are checked for similarity based on one or more predefined thresholds. In one embodiment, when the absolute values of (a1-a2), (b1-b2), (c1-c2), (d1-d2), (e1-e2), and (f1-f2) are all below a positive threshold (such as a value of 1), the two candidates are considered similar and one of them can be pruned / removed and not put into the merge candidate list.
[0215] In some embodiments, the division or right shift operation in step 1 may be removed to simplify the calculations during the CPMV pruning process.
[0216] Specifically, the model parameters c, d, e and f can be calculated without dividing by the width w and height h of the current block. For example, taking the above equation (4) as an example, the approximate model parameters c', d', e' and f' can be calculated as follows (7).
[0217]
[0218] In the case where only two CPMVs are available, a portion of the model parameters is derived from another portion of the model parameters depending on the width or height of the current block. In this case, the model parameters can be converted to take into account the effects of width and height. For example, in the case of equation (5), the approximate model parameters c', d', e', and f' can be calculated based on the following equation (8). In the case of equation (6), the approximate model parameters c', d', e', and f' can be calculated based on the following equation (9).
[0219]
[0220] When the approximate model parameters c′, d′, e′ and f′ are calculated in step 1 above, the calculation of the absolute values required for the similarity check in step 2 above can be changed accordingly: (a1-a2), (b1-b2), (c1′-c2′), (d′1-d′2), (e1′-e2′) and (f1′-f2′).
[0221] In step 2 above, a threshold is required to evaluate the similarity between two candidate sets of CPMV. There are many ways to define the threshold. In one embodiment, a threshold can be defined for each comparable parameter. Table 1 is an example of this embodiment, showing the threshold defined for each comparable model parameter. In another embodiment, the threshold can be defined by considering the size of the current coding block. Table 2 is an example of this embodiment, showing the threshold defined by the size of the current coding block.
[0222] Table 1
[0223] Comparable parameters Threshold a 1 b 1 c 2 d 2 e 2 f 2
[0224] Table 2
[0225]
[0226]
[0227] In another embodiment, the threshold value may be defined by considering the weight or height of the current block. Table 3 and Table 4 are examples of this embodiment. Table 3 shows the threshold value defined by the width of the current coding block, and Table 4 shows the threshold value defined by the height of the current coding block.
[0228] Table 3
[0229] The width of the current block Threshold Width <= 8 pixels 1 8 pixels < width <= 32 pixels 2 32 pixels < width <= 64 pixels 4 64 pixels < width 8
[0230] Table 4
[0231] The current block height Threshold Height <= 8 pixels 1 8 pixels < height <= 32 pixels 2 32 pixels < height <= 64 pixels 4 64 pixels < height 8
[0232] In another embodiment, the threshold value may be defined as a set of fixed values. In another embodiment, the threshold value may be defined by any combination of the above embodiments. In one example, the threshold value may be defined by considering different parameters and the weight and height of the current block. Table 5 is an example of this embodiment, showing the threshold value defined by the height of the current coding block. Note that in any of the above-mentioned proposed embodiments, if necessary, the comparable parameters may represent any parameters defined in any equation from equation (4) to equation (9).
[0233] Table 5
[0234]
[0235]
[0236] The benefits of using the transformed affine model parameters for candidate redundancy checking include: it creates a unified similarity checking process for candidates with different affine model types, for example, one merge candidate may use a 6-parameter affine model with three CPMVs, while another candidate may use a 4-parameter affine model with two CPMVs; the different impacts of each CPMV in the merge candidate are considered when deriving the target MV for each sub-block; and it provides the similarity significance of two affine merge candidates with respect to the width and height of the current block.
[0237] Inherited affine merge candidate derivation process based on non-adjacent neighboring blocks
[0238] For inherited merge candidates, the derivation process based on non-adjacent neighboring blocks can be performed in three steps. Step 1 is candidate scanning. Step 2 is CPMV projection. Step 3 is candidate pruning.
[0239] In step 1, non-adjacent neighboring blocks are scanned and selected by the following method.
[0240] Scanning area and distance
[0241] In some examples, non-adjacent neighboring blocks may be scanned from the left and top regions of the current coding block. The scanning distance may be defined as the number of coding blocks from the scanning position to the left or top side of the current coding block.
[0242] like Figure 8 As shown in , multiple rows of non-adjacent adjacent blocks can be scanned on the left or above the current coding block. Figure 8 The distance shown indicates the number of coding blocks from each candidate position to the left or top side of the current block. For example, the area with "Distance 2 (D2)" on the left side of the current block indicates that the candidate neighboring blocks located in the area are 2 blocks away from the current block. Similar indications can be applied to other scanning areas with different distances.
[0243] In one or more embodiments, the non-adjacent neighboring blocks at each distance may have the same block size as the current coding block, such as Fig.13A As shown. Fig.13A As shown, the non-adjacent neighboring block 1301 on the left and the non-adjacent neighboring block 1302 on the upper side have the same size as the current block 1303. In some embodiments, the non-adjacent neighboring blocks at each distance may have a different block size from the current coding block, such as Fig. 13B As shown. The neighboring block 1304 is the adjacent neighboring block of the current block 1303. Fig. 13B As shown, the non-adjacent neighboring block 1305 on the left and the non-adjacent neighboring block 1306 on the upper side have the same size as the current block 1307. The neighboring block 1308 is an adjacent neighboring block of the current block 1307.
[0244] Note that when the non-adjacent neighboring blocks at each distance have the same block size as the current coding block, the value of the block size is adaptively changed according to the partition granularity at each different area in the image. Note that when the non-adjacent neighboring blocks at each distance have a different block size from the current coding block, the value of the block size can be predefined as a constant value, such as 4×4, 8×8, or 16×16. Fig.10 and Fig.12 The 4×4 non-contiguous motion fields shown in are examples of this case, where the motion fields can be considered as a special case of sub-blocks, but are not limited to this.
[0245] Similarly, Fig.11 The non-adjacent coding blocks shown in may also have different sizes. In one example, the non-adjacent coding blocks may have the same adaptively changeable size as the current coding block. In another example, the non-adjacent coding blocks may have a predefined size of a fixed value, such as 4×4, 8×8, or 16×16.
[0246] Based on the defined scanning distance, the total size of the scanning area to the left or above the current coding block can be determined by a configurable distance value. In one or more embodiments, the maximum scanning distances on the left and top sides can use the same value or different values. Figure 13 shows an example in which the maximum distances on the left and top sides share the same value 2. (Multiple) maximum scanning distance values can be determined by the encoder side and transmitted by signal in the bitstream. Alternatively, (multiple) maximum scanning distance values can be predefined as (multiple) fixed values, such as values 2 or 4. When the maximum scanning distance is predefined as a value of 4, this indicates that the scanning process terminates when the candidate list is full or all non-adjacent neighboring blocks with a maximum distance of 4 have been scanned (whichever comes first).
[0247] In one or more embodiments, within each scanning area of a specific distance, the start neighboring block and the end neighboring block may be position-dependent.
[0248] In some embodiments, for the left scanning area, the starting adjacent block may be a block adjacent to the lower left of the starting adjacent block in the adjacent scanning area with a smaller distance. Figure 8 As shown in FIG. 1 , the starting neighboring block of the “Distance 2” scanning area on the left side of the current block is the lower left neighboring block of the starting neighboring block of the “Distance 1 (D1)” scanning area. Figure 8 In FIG. 1 , D1, D2, and D3 respectively indicate distance 1, distance 2, and distance 3. The end neighboring block may be a block adjacent to the left side of the end neighboring block in the upper scanning area having a smaller distance. Figure 8 As shown, the ending neighboring block of the "Distance 2" scanning area on the left side of the current block is the neighboring block on the left side of the ending neighboring block of the "Distance 1" scanning area above the current block.
[0249] Similarly, for the upper scanning area, the start neighboring block may be a block adjacent to the upper right of the start neighboring block in the adjacent scanning area with a smaller distance, and the end neighboring block may be a block adjacent to the upper left of the end neighboring block in the adjacent scanning area with a smaller distance.
[0250] Scan Order
[0251] When scanning neighboring blocks in non-adjacent areas, a certain order and / or rule may be followed to determine the selection of the scanned neighboring blocks.
[0252] In some embodiments, the left area may be scanned first, and then the upper area may be scanned. Figure 8 As shown, three rows of non-adjacent areas on the left (eg, from distance 1 (D1) to distance 3 (D3)) may be scanned first, and then three rows of non-adjacent areas above the current block may be scanned.
[0253] In some embodiments, the left area and the upper area may be scanned alternately. Figure 8 As shown, the left scanning area with "distance 1" is scanned first, and then the upper area with "distance 1" is scanned.
[0254] For the scanning areas on the same side (e.g., the left area or the upper area), the scanning order is from the area with smaller distance to the area with larger distance. This order can be flexibly combined with other embodiments of the scanning order. For example, the left area and the upper area can be scanned alternately, and the order of the areas on the same side is arranged from the small distance to the large distance.
[0255] The scanning order within each scanning area at a specific distance can be defined. In one embodiment, for the left scanning area, the scanning can start from the bottom adjacent block to the top adjacent block. For the upper scanning area, the scanning can start from the right block to the left block.
[0256] Scan termination
[0257] For the inherited merge candidate, the neighboring blocks encoded with the affine mode are defined as qualified candidates. In some embodiments, the scanning process can be performed interactively. For example, the scanning performed in a specific area at a specific distance can be stopped at the moment when the first X qualified candidates are identified, where X is a predefined positive value. For example, Figure 8 As shown, the scanning in the left scanning area of distance 1 can be stopped when the first one or more qualified candidates are identified. Then, the next iteration of the scanning process is started by targeting another scanning area, which is regulated by the predefined scanning order / rule.
[0258] In one or more embodiments, X may be defined for each distance. For example, at each distance, X is set to 1, which means that for each distance, if the first qualified candidate is found, the scan is terminated and the scan process is restarted from a different distance of the same area or from the same or different distance of a different area. Note that the value of X may be set to the same value or different values for different distances. If the maximum number of qualified candidates is found from all allowed distances for a region (e.g., specified by the maximum distance), the scan process for that region is completely terminated.
[0259] In another embodiment, X can be defined for a region. For example, X is set to 3, which means that for the entire region (e.g., the left or upper region of the current block), if the first 3 qualified candidates are found, the scanning is terminated and the scanning process is restarted from the same or different distance of another region. Note that for different regions, the value of X can be set to the same value or different values. If the maximum number of qualified candidates is found from all regions, the entire scanning process is completely terminated.
[0260] The value of X can be defined for both distance and region. For example, for each region (e.g., the left or upper region of the current block), X is set to 3, and for each distance, X is set to 1. For different regions and distances, the value of X can be set to the same value or different values.
[0261] In some embodiments, the scanning process can be performed continuously. For example, a scan performed in a specific area at a specific distance can be stopped when all covered neighboring blocks are scanned and no more qualified candidates are identified or the maximum allowable number of candidates is reached.
[0262] In the candidate scanning process, each candidate non-adjacent neighboring block is determined and scanned by following the scanning method proposed above. For easier implementation, each candidate non-adjacent neighboring block can be indicated or located by a specific scanning position. Once the specific scanning area and distance are determined by following the method proposed above, the scanning position can be determined accordingly based on the following method.
[0263] In one approach, the lower left and upper right positions are used for the upper and left non-adjacent neighboring blocks, respectively, e.g. Fig.15A shown.
[0264] In another approach, the lower right position is used for both the upper and left non-adjacent neighboring blocks, e.g. Fig. 15B shown.
[0265] In another approach, the lower left position is used for both the upper and left non-adjacent neighboring blocks, e.g. Fig. 15C shown.
[0266] In another approach, the top right position is used for both the above and left non-adjacent neighboring blocks, e.g. Fig.15D shown.
[0267] To make it easier to explain, FIG. 15A to FIG. 15D In , it is assumed that each non-adjacent neighboring block has the same block size as the current block. Without loss of generality, this illustration can be easily extended to non-adjacent neighboring blocks with different block sizes.
[0268] Further, in step 2, the same CPMV projection process as used in the current AVS and VVC standards can be utilized. In this CPMV projection process, assuming that the current block shares the same affine model with the selected neighboring block, the coordinates of two or three corner pixels (for example, if the current block uses a 4-parameter model, two coordinates (upper left pixel / sample position and upper right pixel / sample position) are used; if the current block uses a 6-parameter model, three coordinates (upper left pixel / sample position, upper right pixel / sample position and lower left pixel / sample position) are used) are substituted into equation (1) or (2) (depending on whether the neighboring block is encoded using a 4-parameter affine model or a 6-parameter affine model) to generate two or three CPMVs.
[0269] In step 3, any qualifying candidate identified in step 1 and converted in step 2 can be checked for similarity against all existing candidates already in the merge candidate list. The details of the similarity check have been described in the "Affine Merge Candidate Pruning" section above. If a new qualifying candidate is found to be similar to any existing candidate in the candidate list, then the new qualifying candidate is removed / pruned.
[0270] The derivation process of constructed affine merge candidates based on non-adjacent neighboring blocks
[0271] In the case of derived inherited merge candidates, one neighboring block is identified at a time, where the single neighboring block needs to be encoded in affine mode and can contain two or three CPMVs. In the case of derived constructed merge candidates, two or three neighboring blocks can be identified at a time, where each identified neighboring block does not need to be encoded in affine mode and only one translation MV is obtained from the block.
[0272] Fig. 9 An example is presented in which affine merge candidates can be derived from the construction by using non-adjacent neighboring blocks. Fig. 9 In the figure, A, B, and C are the geographical locations of three non-adjacent neighboring blocks. A virtual coding block is formed by using the A position as the upper left corner, the B position as the upper right corner, and the C position as the lower left corner. If the virtual CU is regarded as an affine coded block, the MVs at positions A', B', and C' can be derived according to equation (3), where the model parameters (a, b, c, d, e, f) can be calculated by the translation MVs at positions A, B, and C. Once derived, the MVs at positions A', B', and C' can be used as the three CPMVs of the current block, and the existing process of generating constructed affine merge candidates (the process used in the AVS and VVC standards) can be used.
[0273] For the constructed merge candidates, the derivation process based on non-adjacent neighboring blocks can be performed in five steps. The derivation process based on non-adjacent neighboring blocks can be performed in five steps in a device such as an encoder or a decoder. Step 1 is candidate scanning. Step 2 is affine model determination. Step 3 is CPMV projection. Step 4 is candidate generation. And step 5 is candidate pruning. In step 1, non-adjacent neighboring blocks can be scanned and selected by the following method.
[0274] Scanning area and distance
[0275] In some embodiments, in order to maintain a rectangular coding block, the scanning process is performed only on two non-adjacent neighboring blocks.The third non-adjacent neighboring block may depend on the horizontal and vertical positions of the first non-adjacent neighboring block and the second non-adjacent neighboring block.
[0276] In some embodiments, Fig. 9 As shown, the scanning process is performed only for positions B and C. Position A can be uniquely determined by the horizontal position of C and the vertical position of B.
[0277] In order to form a valid virtual coding block, it may be necessary that at least the position A is valid. The validity of position A may be defined as whether motion information is available at position A. In one embodiment, the coding block at position A may need to be encoded in inter-frame mode so that motion information can be used to form a virtual coding block.
[0278] In some embodiments, the scanning area and distance may be defined according to a specific scanning direction.
[0279] In some embodiments, the scanning direction may be perpendicular to a side of the current block. Fig.10 An example is shown in , where the scan area is defined as a row of continuous motion fields to the left or above the current block. The scan distance is defined as the number of motion fields from the scan position to one side of the current block. Note that the size of the motion field may depend on the maximum granularity of the applicable video codec standard. Fig.10 In the example shown, it is assumed that the size of the motion field is consistent with the current VVC standard and is set to 4×4.
[0280] In some embodiments, the scanning direction may be parallel to a side of the current block. Fig.11 An example is shown in , where the scan area is defined as a row of consecutive coded blocks to the left or above the current block.
[0281] In some embodiments, the scanning direction may be a combination of scanning perpendicular and parallel to a side of the current block. Fig.12 An example is shown in FIG. Fig.12 As shown in , the scanning direction can also be a combination of parallel and diagonal. The scanning at position B starts from left to right and then scans diagonally to the upper left block. The scanning at position B will be repeated, as shown in Fig.12 Similarly, the scan at position C starts from top to bottom and then scans diagonally to the upper left block. The scan at position C will be repeated, as shown in Fig.12 shown.
[0282] Scan Order
[0283] In some embodiments, the scanning order may be defined as from a position with a smaller distance from the current coding block to a position with a larger distance from the current coding block. This order may be applied to the case of vertical scanning.
[0284] In some embodiments, the scanning order may be defined as a fixed pattern. This fixed pattern scanning order may be used for candidate positions with similar distances. An example is the case of parallel scanning. In one example, for the left scanning area, the scanning order may be defined as a top-to-bottom direction, and for the upper scanning area, the scanning order may be defined as a left-to-right direction, such as Fig.11 Example shown.
[0285] In the case of combined scanning methods, the scanning order can be a combination of fixed pattern and distance-dependent, e.g. Fig.12 Example shown.
[0286] Scan termination
[0287] For constructed merge candidates, eligible candidates do not need to be affine coded, since only the MV needs to be translated.
[0288] Depending on the desired number of candidates, the scanning process may be terminated when the first X qualified candidates are identified, where X is a positive value.
[0289] like Fig. 9 As shown, in order to form a virtual coding block, three corners named A, B and C are required. For easier implementation, the scanning process in step 1 can be used only to identify non-adjacent neighboring blocks located at corners B and C, and the coordinates of A can be accurately determined by taking the horizontal coordinate of C and the vertical coordinate of B. In this way, the formed virtual coding block is restricted to a rectangle. When point B or point C is not available (e.g., out of bounds), or when motion information at a non-adjacent neighboring block corresponding to B or C is not available (e.g., the block is encoded in intra mode or screen content mode), the horizontal coordinate or vertical coordinate of C can be defined as the horizontal coordinate or vertical coordinate of the upper left point of the current block, respectively.
[0290] In another embodiment, when the scanning process in step 1 first determines angle B and / or angle C, the non-adjacent neighboring blocks located at angles B and / or C can be identified accordingly. Second, the position(s) of angles B and / or C can be reset to a pivot point within the corresponding non-adjacent neighboring blocks, such as the centroid of each non-adjacent neighboring block. For example, the centroid can be defined as the geometric center of each neighboring block.
[0291] When Fig. 9 While the scanning process is shown to be performed on angles B and C, the process may be performed jointly or independently. In the example of independent scanning, the previously proposed scanning method may be applied to angles B and C, respectively. In the example of joint scanning, there may be different methods as follows.
[0292] In one embodiment, a pair scan may be performed. In one example of a pair scan, the candidate positions of corners B and C are advanced simultaneously. For easier explanation and without loss of generality, Fig. 17B For example. Fig. 17B As shown in FIG. 1 , the scanning of corner B starts from the first non-adjacent neighboring block located on the upper side of the current block and proceeds from bottom to top. The scanning of corner C starts from the first non-adjacent neighboring block located on the left side of the current block and proceeds from right to left. Fig. 17B In the example shown, a paired scan can be defined as the candidate positions of B and C are both advanced by a step of one unit, where the step of one unit is defined as the height of the current coding block of corner B and is defined as the width of the current coding block of corner C.
[0293] In another embodiment, an alternating scan may be performed. In one example of an alternating scan, the candidate positions of corners B and C are alternately advanced. In one step, only the position of B or C may be advanced, while the position of C or B remains unchanged. In one example, the position of corner B may be gradually increased from the first non-adjacent neighboring block to the distance of the maximum number of non-adjacent neighboring blocks, while the position of corner C remains at the first non-adjacent neighboring block. In the next round, the position of corner C is moved to the second non-adjacent neighboring block, and the position of corner B is again traversed from the first non-adjacent neighboring block to the maximum value. The loop is continued until all combinations are traversed.
[0294] For the purpose of unification, the proposed methods of defining scan areas and distances, scan orders, and scan terminations for deriving inherited merge candidates may be fully or partially reused for deriving constructed merge candidates. In one or more embodiments, the same methods defined for inherited merge candidate scans (including but not limited to scan areas and distances, scan orders, and scan terminations) may be fully reused for constructed merge candidate scans.
[0295] In some embodiments, the same methods defined for an inherited merge candidate scan may be partially reused for a constructed merge candidate scan. Fig.16 An example of this is shown in Fig.16 In , the block size of each non-adjacent neighbor block is the same as the current block, which is similar to the definition of the inherited candidate scan, but the whole process is a simplified version because the scan at each distance is restricted to only one block.
[0296] FIG. 17A to FIG. 17B Another example of this situation is presented. FIG. 17A to FIG. 17B In , both the inherited non-adjacent merging candidates and the constructed non-adjacent merging candidates are defined to have the same block size as the current coding block, while the scanning order, scanning area, and scanning termination condition may be defined differently.
[0297] exist Fig.17A In , the maximum distance of non-adjacent neighboring blocks on the left is 4 coding blocks, while the maximum distance of non-adjacent neighboring blocks on the upper side is 5 coding blocks. In addition, at each distance, the scanning direction on the left is from bottom to top, and the scanning direction on the upper side is from right to left. Fig. 17B In , the maximum distance of non-adjacent neighboring blocks on the left and top is 4. In addition, since there is only one block at each distance, it is not possible to scan at a specific distance. Fig.17A In the example, if M qualified candidates are identified, the scanning operation within each distance can be terminated. The value of M can be a predefined fixed value (e.g., a value of 1 or any other positive integer), a value determined by the encoder and transmitted by a signal, or a configurable value at the encoder or decoder. In one example, the value of M can be the same as the size of the merge candidate list.
[0298] exist FIG. 17A to FIG. 17B In the example, if N qualified candidates are identified, the scanning operation at different distances can be terminated. The value of N can be a predefined fixed value (e.g., a value of 1 or any other positive integer), a value determined by the encoder and transmitted by a signal, or a configurable value at the encoder or decoder. In one example, the value of N can be the same as the size of the merge candidate list. In another example, the value of N can be the same as the value of M.
[0299] exist FIG. 17A to FIG. 17B In the example, spatial non-adjacent neighboring blocks that are closer to the current block may be processed preferentially, which indicates that the scanning or checking of spatial non-adjacent neighboring blocks with a distance i is before the neighboring blocks with a distance i+1, where i may be a non-negative integer representing a specific distance.
[0300] At a certain distance, at most two spatially non-adjacent neighboring blocks are used, which means that at most one neighboring block on one side (e.g., left and above) of the current block is selected for candidate derivation (if available) for inheritance or construction. Fig.17A As shown in , the order of checking the left and upper neighboring blocks is from bottom to top and from right to left respectively. Fig. 17B , this rule can also be applied, where the difference can be that at any particular distance, there is only one option on each side of the current block.
[0301] For the constructed candidates, such as Fig. 17B As shown, firstly, the position of a spatially non-adjacent neighboring block on the left and above is independently determined. Then, the position of the upper left neighboring block can be determined accordingly, which can be surrounded by a rectangular virtual block together with the non-adjacent neighboring blocks on the left and above. Then, as Fig. 9 As shown, the motion information of three non-adjacent neighboring blocks is used to form the CPMVs at the upper left (A), upper right (B), and lower left (C) of the virtual block, which are finally projected to the current CU to generate the corresponding construction candidates.
[0302] In step 2, the translation MV at the candidate position selected after step 1 is evaluated, and an appropriate affine model can be determined. For easier explanation and without loss of generality, Fig. 9 Again used as an example.
[0303] Due to factors such as hardware limitations, implementation complexity and different reference indices, the scanning process may terminate before a sufficient number of candidates are identified. For example, motion information of the motion field at one or more of the candidates selected after step 1 may not be available.
[0304] If the motion information of all three candidates is available, the corresponding virtual coding block represents a 6-parameter affine model. If the motion information of one of the three candidates is not available, the corresponding virtual coding block represents a 4-parameter affine model. If the motion information of more than one of the three candidates is not available, the corresponding virtual coding block may not represent a valid affine model.
[0305] In some embodiments, if the upper left corner of the virtual coding block (e.g. Fig. 9 Motion information is not available at the corner A in the figure, or at the upper right corner (e.g. Fig. 9 B) and the lower left corner (e.g. Fig. 9 If the motion information of the corner C) in the image is not available, the virtual block can be set to invalid and cannot represent a valid model, then steps 3 and 4 can be skipped for the current iteration.
[0306] In some embodiments, if the upper right corner (e.g. Fig. 9 B) or the lower left corner (e.g. Fig. 9 If angle C) in is unavailable, but not both, then the virtual block can represent a valid 4-parameter affine model.
[0307] In step 3, if the virtual coded block is able to represent a valid affine model, the same projection process for inherited merging candidates can be used.
[0308] In one or more embodiments, the same projection process as for inherited merge candidates may be used. In this case, the 4-parameter model represented by the virtual coding block from step 2 is projected to the 4-parameter model of the current block, and the 6-parameter model represented by the virtual coding block from step 2 is projected to the 6-parameter model of the current block.
[0309] In some embodiments, the affine model represented by the dummy encoded block from step 2 is always projected to the 4-parameter model or the 6-parameter model of the current block.
[0310] Note that according to equations (5) and (6), there can be two types of 4-parameter affine models, where type A is that the upper left CPMV and the upper right CPMV (referred to as V0 and V1) are available, and type B is that the upper left CPMV and the lower left CPMV (referred to as V0 and V2) are available.
[0311] In one or more embodiments, the type of the projected 4-parameter affine model is the same as the type of the 4-parameter affine model represented by the virtual coding block. For example, if the affine model represented by the virtual coding block from step 2 is a 4-parameter affine model of type A or type B, then the projected affine model of the current block is also type A or type B, respectively.
[0312] In some embodiments, the 4-parameter affine model represented by the dummy coding block from step 2 is always projected to the 4-parameter model of the same type of the current block. For example, the 4-parameter affine model of type A or type B represented by the dummy coding block is always projected to the 4-parameter affine model of type A.
[0313] In step 4, in one example, the same candidate generation process used in the current VVC or AVS standard may be used based on the CPMV projected after step 3. In another embodiment, the derivation method based on non-adjacent neighboring blocks may not use the temporal motion vector used in the candidate generation process of the current VVC or AVS standard. When the temporal motion vector is not used, it indicates that the generated combination does not contain any temporal motion vector.
[0314] In step 5, any newly generated candidate after step 4 can be checked for similarity against all existing candidates already in the merge candidate list. The details of the similarity check have been described in the "Affine Merge Candidate Pruning" section. If the newly generated candidate is found to be similar to any existing candidate in the candidate list, the newly generated candidate is removed or pruned.
[0315] In some embodiments, a virtual coding block is formed by determining three corner points A, B, and C, and then the affine model of the virtual coding block is represented using the translation MV of the 4×4 block located at the three corners. Finally, the affine model of the virtual coding block is projected to the current coding block. This entire process can be used to derive a first type of affine candidate constructed from spatially non-adjacent neighboring blocks (for example, the sub-blocks located by the three corner points A, B, and C are spatially non-adjacent neighboring blocks). In some embodiments, this method can be applied to affine modes such as affine merge mode and affine AMVP mode, and this method can also be applied to regular modes such as regular merge mode and regular AMVP mode, because the projected affine model can be used to derive the translation MV based on a specific position (for example, a center position) inside the prediction block or coding block.
[0316] Inheritance-based inference method for constructing affine merge candidates
[0317] For each inherited affine candidate, all motion information is inherited from one selected spatial neighboring block coded in affine mode. The inherited information includes CPMV, reference index, prediction direction, affine model type, etc. On the other hand, for each constructed affine candidate, all motion information is constructed from two or three selected spatial or temporal neighboring blocks, while the selected neighboring blocks may not be coded in affine mode and only the translational motion information from the selected neighboring blocks is required.
[0318] In this section, a new candidate derivation method combining the features of inherited candidates and constructed candidates is disclosed.
[0319] In some embodiments, the combination of inheritance and construction can be achieved by dividing the affine model parameters into different groups, where one group of affine parameters is inherited from one neighboring block, and other groups of affine parameters are inherited from other neighboring blocks.
[0320] In one example, the parameters of an affine model can be constructed from two groups. As shown in equation (3), the affine model can contain 6 parameters, including a, b, c, d, e and f. The translation parameters {a, b} can represent one group, while the non-translation parameters {c, d, e, f} can represent another group. Using this grouping method, the two groups of parameters can be independently inherited from two different neighboring blocks in the first step, and then concatenated / constructed into a complete affine model in the second step. In this case, the group with non-translation parameters must be inherited from an affine-coded neighboring block, while the group with translation parameters can come from any inter-coded neighboring block, which may or may not be encoded in affine mode. Note that the scanning method for inherited affine candidates (such as Fig.17A The method shown in, i.e., the scanning method / rule including scanning area and distance, scanning order and scanning termination used in the section "deriving process of inherited affine merging candidates based on non-adjacent neighboring blocks", and the scanning method can be performed on adjacent neighboring blocks or non-adjacent neighboring blocks), selects affine-encoded neighboring blocks from adjacent affine neighboring blocks or non-adjacent affine neighboring blocks. Alternatively, the affine-encoded neighboring blocks may not exist physically, but may be virtually constructed from conventional inter-frame coded neighboring blocks, such as Fig. 17B The method shown, that is, the scanning method / rule including scanning area and distance, scanning order and scanning termination used in the section “Derivation process of constructed affine merging candidates based on non-adjacent neighboring blocks”.
[0321] In some examples, the neighboring blocks associated with each group can be determined in different ways. In one method, the neighboring blocks for different sets of parameters can all come from non-adjacent neighboring areas, and the design of the scanning method can be similar to the previously proposed method based on the derivation process of non-adjacent neighboring blocks. In another method, the neighboring blocks for different sets of parameters can all come from adjacent neighboring areas, and the scanning method can be the same as the current VVC or AVS video standard. In another method, the neighboring blocks for different sets of parameters can come partially from adjacent areas and partially from non-adjacent neighboring areas.
[0322] When scanning neighboring blocks from non-adjacent neighboring areas to construct candidates of the current type, the scanning process may be performed differently from the derivation process based on non-adjacent neighboring blocks for inherited affine candidates. In one or more embodiments, the scanning area, distance, and order may be defined similarly, but the scanning termination rule may be specified differently. For example, non-adjacent neighboring blocks within the maximum distance defined for each area may be scanned exhaustively. In this case, all non-adjacent neighboring blocks within a certain distance may be scanned in a scanning order. In some embodiments, the scanning area may be different. For example, in addition to the left and upper areas, the lower right adjacent and non-adjacent areas of the current coding block may be scanned to determine the neighboring blocks for generating translation or / and non-translation parameters. In addition, the neighboring blocks scanned in the lower right area may be used to find time co-located neighboring blocks instead of spatial neighboring blocks. A scanning criterion may be conditionally based on whether the lower right (multiple) time co-located neighboring blocks have been used to generate constructed affine neighboring blocks. If it has been used, the scan is not performed, otherwise the scan is performed. Alternatively, if it has been used, this means that the lower right (multiple) time co-located neighboring blocks are available, then the scan is performed, otherwise the scan is not performed.
[0323] When combining several sets of affine parameters to construct a new candidate, several rules may need to be followed. The first is the eligibility criteria. In one example, it can be checked whether the associated one or more neighboring blocks of each group use the same reference picture in at least one direction or two directions. In another example, it can be checked whether the associated one or more neighboring blocks of each group use the same precision / resolution for motion vectors.
[0324] When checking certain criteria, the first X associated neighboring blocks of each group may be used. The value of X may be defined as the same or different values for different groups of parameters. For example, the first 1 or 2 neighboring blocks containing non-translation affine parameters may be used, while the first 3 or 4 neighboring blocks containing translation affine parameters may be used.
[0325] The second step is to construct a formula. In one example, the CPMV of a new candidate can be derived as follows:
[0326]
[0327] where (x, y) is the angular position within the current coding block (e.g., (0, 0) represents the CPMV of the upper left corner, (width, 0) represents the CPMV of the upper right corner), {c, d, e, f} is a set of parameters from one neighboring block, and {a, b} is another set of parameters from another neighboring block.
[0328] In another example, the CPMV of the new candidate can be derived as follows:
[0329]
[0330] Where (Δw, Δh) is the distance between the upper left corner of the current coding block and the upper left corner of one of the (multiple) neighboring blocks associated with a set of parameters (e.g., the {a, b} group of associated neighboring blocks). The definitions of the other parameters in the equation are the same as in the example above. The parameters can be grouped in another way: (a, b, c, d, e, f) form one group and (Δw, Δh) form another group. And the two sets of parameters come from two different neighboring blocks. Alternatively, the value of (Δw, Δh) can be predefined as a fixed value, such as (0, 0) or any constant value that does not depend on the distance between the neighboring block and the current block.
[0331] Fig.18 An example of an inheritance-based inference method for inferring constructed affine candidates is shown. Fig.18 In , three steps are required to derive the constructed affine candidates. In step 1, according to a specific grouping strategy, the encoder or decoder can perform a scan on each group of adjacent neighboring blocks and non-adjacent neighboring blocks. Fig.18 In the case of , two groups are defined, where neighbor block 1 is coded in affine mode and provides non-translation affine parameters, while neighbor block 2 provides translation affine parameters. Neighbor block 1 can be encoded according to FIG. 15A to FIG. 15D and Fig.17A The process of the "derivation process of the inherited affine merge candidate based on non-adjacent neighboring blocks" section shown in the figure is obtained, and the neighboring block 1 can be an adjacent neighboring block or a non-adjacent neighboring block of the current block. In addition, the neighboring block 2 can be obtained according to Fig.16 and Fig. 17B The process shown is obtained.
[0332] In some embodiments, a neighboring block 1 encoded in an affine mode may be scanned from an adjacent or / and non-adjacent area by following the scanning method proposed above. In some embodiments, a neighboring block 2 encoded in an affine or non-affine mode may also be scanned from an adjacent or non-adjacent area. For example, if the motion information has not been used to derive some affine merge or AMVP candidates, the neighboring block 2 may come from one of the scanned adjacent or non-adjacent areas, or from the lower right position of the current block if a co-located TMVP candidate of the lower right position of the current block is available and / or has been used to derive some affine merge or AMVP candidates. Alternatively, when determining the position of the neighboring block 2, a small coordinate offset (e.g., +1 or +2 or -1 or -2 for vertical or / and horizontal coordinates) may be applied to provide slightly diverse motion information to construct new candidates.
[0333] In step 2, using the parameters and positions determined in step 1, a specific affine model can be defined, and the affine model can derive different CPMVs according to the coordinates (x, y) of the CPMV. Fig.18 As shown, the non-translation parameters {c, d, e, f} can be obtained based on the neighboring block 1 obtained in step 1, and the translation parameters {a, b} can be obtained based on the neighboring block 2 obtained in step 1. In addition, the distance parameters (Δw, Δh) can be obtained based on the position (x1, y1) of the current block and the position (x2, y2) of the neighboring block 2. The distance parameters Δw, Δh can respectively indicate the horizontal distance and vertical distance between the current block and the neighboring block 1 or the neighboring block 2. For example, the distance parameters Δw, Δh can respectively indicate the horizontal distance (x1-x2) between the current block and the neighboring block 2 and the vertical distance (y1-y2) between the current block and the neighboring block 2. Specifically, Δw=x1-x2 and Δh=y1-y2.
[0334] In step 3, two or three CPMVs are derived for the current coding block, which can be constructed to form new affine candidates.
[0335] In some embodiments, other prediction information may be further constructed. If a neighboring block is checked to have the same direction and / or reference picture, the prediction direction (e.g., bidirectional prediction or unidirectional prediction) and the reference picture index may be the same as the associated neighboring block. Alternatively, the prediction information is determined by reusing the minimum overlap information between associated neighboring blocks from different groups. For example, if only one neighboring block has a reference index in one direction that is the same as the reference index in the same direction of another neighboring block, the prediction direction of the new candidate is determined to be unidirectional prediction, and the same reference index and direction are reused.
[0336] In some embodiments, an affine model can be constructed by combining model parameters from different inheritances. In one example, the translation model parameters can be inherited from a translation block (e.g., from a 4×4 spatially adjacent or / and non-adjacent neighboring block), while the non-translation model parameters can be inherited from an affine coding block (e.g., from a spatially adjacent or / and non-adjacent affine coding neighboring block). Alternatively, the non-translation model parameters can be inherited from a historical affine coding block instead of an explicitly scanned spatially non-adjacent affine coding neighboring block, and the historical affine coding block can be a spatially adjacent or non-adjacent neighboring block. This entire process can be used to derive a second type of affine candidate constructed from a spatially non-adjacent neighboring block (e.g., the non-translation model parameters can be inherited from a spatially non-adjacent neighboring block). In some embodiments, this method can be applied to affine modes such as affine merge mode and affine AMVP mode, and this method can also be applied to regular modes such as regular merge mode and regular AMVP mode, because the generated affine model can be used to derive a translation MV based on a specific position (e.g., a center position) inside a prediction block or coding block.
[0337] HMVP-based derivation method for constructing affine merge candidates
[0338] In the case of a derivation process based on neighboring neighbor blocks (which is already defined in the current video standards VVC and AVS and described in the above sections and Figure 7 ), a fixed order scan is performed on adjacent neighboring blocks to identify two or three adjacent neighboring blocks. In the case of a derivation process based on non-adjacent neighboring blocks, as described in the previous section and Fig. 17B In the method proposed in , two non-adjacent neighboring blocks are identified during another fixed-order scanning. In other words, for both the derivation method based on adjacent neighboring blocks and the derivation method based on non-adjacent neighboring blocks, a certain depth of local scanning is inevitably required to identify multiple neighboring blocks. This scanning process depends on the local buffer around each current block and also generates a certain computational complexity.
[0339] On the other hand, the HMVP merge mode has been adopted in the current VVC and AVS, where the translational motion information from neighboring blocks has been stored in the history table, as described in the introduction. In this case, the scanning process can be replaced by searching the HMVP table.
[0340] Therefore, for the previously proposed derivation process based on non-adjacent neighboring blocks and the derivation process based on inheritance, the translation motion information can be obtained from the HMVP table instead of Fig. 17B and Fig.18 The scanning method shown. However, in order to derive the constructed affine candidates later, position information, width, height and reference information are also required, which can be accessed if the current HMVP table can be modified. Therefore, it is recommended to extend the HMVP table to store additional information in addition to the motion information of each historical neighboring block. In one embodiment, the additional information may include the position of affine or non-affine neighboring blocks, or affine motion information, such as CPMV or equivalent regular motion derived from CPMV (for example, the regular motion can come from an internal sub-block of an affine-coded neighboring block), reference index, etc.
[0341] Candidate derivation methods for affine AMVP and regular merge modes
[0342] As described in the above section, for the affine AMVP mode, an affine candidate list is also required to derive the CPMV prediction value. Therefore, all the derivation methods proposed above can be similarly applied to the affine AMVP mode. The only difference is that when the derivation methods proposed above are applied to AMVP, the selected neighboring block must have the same reference picture index as the current coding block.
[0343] For the regular merge mode, a candidate list is also constructed, but with only translation candidate MVs and no CPMVs. In this case, all the derivation methods proposed above can still be applied by adding an additional derivation step. In this additional derivation step, the translation MV of the current block will be derived, which can be achieved by selecting a specific pivot position (x, y) within the current block and then following the same equation (3). In other words, in order to derive the CPMV of the affine block, the three angular positions of the block are used as the pivot position (x, y) in equation (3), while in order to derive the translation MV of the regular inter-frame coded block, the center position of the block can be used as the pivot position (x, y) in equation (3). Once the translation MV of the current block is derived, it can be inserted into the candidate list as an additional candidate.
[0344] When new candidates are derived based on the above proposed methods of affine AMVP and regular merge mode, the placement of the new candidates may be reordered.
[0345] In one embodiment, the newly derived candidates may be inserted into the affine AMVP candidate list in the following order:
[0346] (1) inherited from spatially adjacent neighboring blocks;
[0347] (2) constructed from spatially adjacent neighboring blocks;
[0348] (3) inherited from spatially non-adjacent neighboring blocks;
[0349] (4) constructed from spatially non-adjacent neighboring blocks;
[0350] (5) translation MV from spatially adjacent neighboring blocks;
[0351] (6) Temporal MVs from temporally adjacent neighboring blocks; and
[0352] (7) Zero MV.
[0353] In another embodiment, the newly derived candidates may be inserted into the affine AMVP candidate list in the following order:
[0354] (1) inherited from spatially adjacent neighboring blocks;
[0355] (2) constructed from spatially adjacent neighboring blocks;
[0356] (3) inherited from spatially non-adjacent neighboring blocks;
[0357] (4) translation MV from spatially adjacent neighboring blocks;
[0358] (5) constructed from spatially non-adjacent neighboring blocks;
[0359] (6) Temporal MVs from temporally adjacent neighboring blocks; and
[0360] (7) Zero MV.
[0361] In another embodiment, the newly derived candidates may be inserted into the affine AMVP candidate list in the following order:
[0362] (1) inherited from spatially adjacent neighboring blocks;
[0363] (2) constructed from spatially adjacent neighboring blocks;
[0364] (3) translation MV from spatially adjacent neighboring blocks;
[0365] (4) inherited from spatially non-adjacent neighboring blocks;
[0366] (5) constructed from spatially non-adjacent neighboring blocks;
[0367] (6) Temporal MVs from temporally adjacent neighboring blocks; and
[0368] (7) Zero MV.
[0369] In another embodiment, the newly derived candidates may be inserted into the affine AMVP candidate list in the following order:
[0370] (1) inherited from spatially adjacent neighboring blocks;
[0371] (2) constructed from spatially adjacent neighboring blocks;
[0372] (3) translation MV from spatially adjacent neighboring blocks;
[0373] (4) Temporal MVs from temporally adjacent neighboring blocks;
[0374] (5) inherited from spatially non-adjacent neighboring blocks;
[0375] (6) constructed from spatially non-adjacent neighboring blocks; and
[0376] (7) Zero MV.
[0377] In another embodiment, the newly derived candidates may be inserted into the affine AMVP candidate list in the following order:
[0378] (1) inherited from spatially adjacent neighboring blocks;
[0379] (2) constructed from spatially adjacent neighboring blocks;
[0380] (3) translation MV from spatially adjacent neighboring blocks;
[0381] (4) Temporal MVs from temporally adjacent neighboring blocks;
[0382] (5) inherited from spatially non-adjacent neighboring blocks; and
[0383] (6) Zero MV.
[0384] In another embodiment, the newly derived candidates may be inserted into the affine AMVP candidate list in the following order:
[0385] (1) inherited from spatially adjacent neighboring blocks;
[0386] (2) constructed from spatially adjacent neighboring blocks;
[0387] (3) translation MV from spatially adjacent neighboring blocks;
[0388] (4) translation MV from temporally neighboring blocks;
[0389] (5) inherited from spatially non-adjacent neighboring blocks; and
[0390] (6) Zero MV.
[0391] Note that candidates constructed from spatially non-adjacent neighboring blocks may be referred to as first type or / and second type candidates constructed from spatially non-adjacent neighboring blocks.
[0392] In another embodiment, the newly derived candidates may be inserted into the regular merge candidate list in the following order:
[0393] (1) Spatial MVP from spatially adjacent neighboring blocks;
[0394] (2) Temporal MVP from co-located adjacent neighbor blocks;
[0395] (3) spatial MVP from spatially non-adjacent neighboring blocks;
[0396] (4) inherited MVP from spatially non-adjacent affine neighboring blocks;
[0397] (5) constructing MVP from spatially non-adjacent neighboring blocks;
[0398] (6) History-based MVP from FIFO table;
[0399] (7) Pairwise average MVP; and
[0400] (8)Zero MV.
[0401] Reordering of candidate lists for affine merge
[0402] In one embodiment, spatial non-adjacent merge candidates may be inserted into the affine merge candidate list in the following order: 1. Sub-block based temporal motion vector prediction (SbTMVP) candidate (if available); 2. Inherited from adjacent neighboring blocks; 3. Inherited from non-adjacent neighboring blocks; 4. Constructed from adjacent neighboring blocks; 5. Constructed from non-adjacent neighboring blocks; 6. Zero MV.
[0403] In another embodiment, the spatial non-adjacent merge candidates can be inserted into the affine merge candidate list in the following order: 1. SbTMVP candidate (if available); 2. inherited from adjacent neighboring blocks; 3. constructed by adjacent neighboring blocks; 4. inherited from non-adjacent neighboring blocks; 5. constructed by non-adjacent neighboring blocks; 6. zero MV.
[0404] In another embodiment, spatial non-adjacent merge candidates can be inserted into the affine merge candidate list in the following order: 1. SbTMVP candidates (if available); 2. inherited from adjacent neighboring blocks; 3. constructed by adjacent neighboring blocks; 4. a set of zero MVs; 5. inherited from non-adjacent neighboring blocks; 6. constructed by non-adjacent neighboring blocks; 7. remaining zero MVs (if the list is still not full).
[0405] In another embodiment, spatial non-adjacent merge candidates can be inserted into the affine merge candidate list in the following order: 1. SbTMVP candidate (if available); 2. inherited from adjacent neighboring blocks; 3. inherited from non-adjacent neighboring blocks with a distance less than X; 4. constructed by adjacent neighboring blocks; 5. constructed by non-adjacent neighboring blocks; 6. constructed by inherited translated and non-translated neighboring blocks; 7. zero MV (if the list is still not full).
[0406] In another embodiment, the spatial non-adjacent merge candidates may be inserted into the affine merge candidate list in the following order: 1. SbTMVP candidate (if available); 2. inherited from adjacent neighboring blocks; 3. inherited from non-adjacent neighboring blocks; 4. the first candidate constructed from adjacent neighboring blocks; 5. the first X candidates constructed from inherited translated and non-translated neighboring blocks; 6. constructed from non-adjacent neighboring blocks; 7. the other Y candidates constructed from inherited translated and non-translated neighboring blocks; 8. zero MV (if the list is still not full).
[0407] In some examples, the values of X and Y may be predefined fixed values (e.g., value 2), signaled values received by the decoder (signaled parameters at the sequence / slice / block / CTU level), or values configurable at the encoder / decoder, or values dynamically determined based on the number of available neighboring blocks to the left and above each individual coded block (e.g., X<=3, Y<=3), or any combination of methods for determining the values of X and Y. In one example, the value of X may be the same as the value of Y. In another example, the value of X may be different from the value of Y.
[0408] In another embodiment, the spatial non-adjacent merge candidates may be inserted into the affine merge candidate list in the following order: 1. SbTMVP candidate (if available); 2. inherited from adjacent neighboring blocks; 3. inherited from non-adjacent neighboring blocks with a distance less than X; 4. constructed from adjacent neighboring blocks; 5. constructed from non-adjacent neighboring blocks with a distance less than Y; 6. inherited from non-adjacent neighboring blocks with a distance greater than X; 7. constructed from non-adjacent neighboring blocks with a distance greater than Y; 8. zero MV. In this embodiment, the values of X and Y may be predefined fixed values (e.g., value 2), values determined by the encoder and transmitted by signal, or configurable values at the encoder or decoder. In one example, the value of X may be the same as the value of Y. In another example, the value of N may be different from the value of M.
[0409] In some embodiments, when a new candidate is derived by using an inheritance-based derivation method that constructs a CPMV by combining affine motion and translation MVs, the placement of the new candidate may depend on the placement of other constructed candidates.
[0410] In one embodiment, for different construction candidates, the affine merge candidate list may be reordered in the following order:
[0411] (1) constructed from spatially adjacent neighboring blocks;
[0412] (2) constructed by combining spatially adjacent affine neighbor patches and translating MVs;
[0413] (3) constructed from spatially non-adjacent neighboring blocks; and
[0414] (4) is constructed by combining spatially non-adjacent affine neighboring blocks and translation MVs.
[0415] In another embodiment, for different construction candidates, the affine merge candidate list may be reordered in the following order:
[0416] (1) constructed from spatially adjacent neighboring blocks;
[0417] (2) constructed from spatially non-adjacent neighboring blocks;
[0418] (3) constructed by combining spatially adjacent affine neighborhoods and translating MVs; and
[0419] (4) is constructed by combining spatially non-adjacent affine neighboring blocks and translation MVs.
[0420] In one or more further embodiments, the reordering of affine merge candidates may be partially or completely interleaved between candidates of different categories (e.g., the interleaving may indicate that candidates from the same category may be placed non-adjacently in the candidate list). In some embodiments, there may be seven categories of affine merge candidates placed in the affine merge candidate list:
[0421] (1) SbTMVP candidate (if available);
[0422] (2) candidates inherited from adjacent neighboring blocks;
[0423] (3) candidates inherited from non-adjacent neighboring blocks;
[0424] (4) Candidates constructed from adjacent neighboring blocks;
[0425] (5) a second type of constructed candidates from non-adjacent neighboring blocks;
[0426] (6) construction candidates of the first type from non-adjacent neighboring blocks; and
[0427] (7) Zero MV;
[0428] The specific order discussed above may be applied to any candidate list including the affine AMVP candidate list, the regular merge candidate list, and the affine merge candidate list.
[0429] Since candidates placed in the later positions of the affine merge list may cost higher signaling overhead when selected and signaled by the encoder, the order of the above different categories of candidates can be designed in different ways.
[0430] In one or more embodiments, the order of these candidates can remain the same as the insertion order above. An adaptive reordering method can then be applied to reorder these candidates; the adaptive reordering can be a template-based method (ARMC) or a non-template-based method, such as a bilateral matching-based method.
[0431] In one or more embodiments, the order of these candidates may be reordered in a specific pattern. The specific pattern may be applied to any candidate list including an affine AMVP candidate list, a regular merge candidate list, and an affine merge candidate list.
[0432] In some embodiments, the re-ranking mode may depend on the number of available candidates for each category.
[0433] In one example, the reordering pattern may be defined as follows:
[0434] (1) SbTMVP candidate (if available);
[0435] (2) candidates inherited from adjacent neighboring blocks;
[0436] (3) Candidates constructed from adjacent neighboring blocks;
[0437] (4) the top X successor candidates from non-adjacent neighboring blocks (e.g., X may be a pre-specified number such as 1 or a signaled number);
[0438] (5) the first Y construction candidates of the second type of construction candidates from non-adjacent neighboring blocks (e.g., Y can be defined similarly to X);
[0439] (6) the first Z construction candidates of the first type of construction candidates from non-adjacent neighboring blocks (eg, Z may be defined similarly to X);
[0440] (7) remaining successor candidates from non-adjacent neighboring blocks (e.g., X may be a pre-specified number such as 1 or a signaled number);
[0441] (8) remaining construction candidates of the second type of construction candidates from non-adjacent neighboring blocks (e.g., Y can be defined similarly to X);
[0442] (9) remaining construction candidates of the first type from non-adjacent neighboring blocks (eg, Z may be defined similarly to X); and
[0443] (10)Zero MV.
[0444] In one or more embodiments, the reordering mode may be an interleaving method, which may merge different candidates from different categories. In one example, the interleaving mode may be defined as follows:
[0445] (1) SbTMVP candidate (if available);
[0446] (2) candidates inherited from adjacent neighboring blocks;
[0447] (3) the first X1 construction candidates from adjacent neighboring blocks;
[0448] (4) the first Y1 construction candidates of the second type of construction candidates from non-adjacent neighboring blocks;
[0449] (5) the first Z1 successor candidates from non-adjacent neighboring blocks;
[0450] (6) the first K1 construction candidates of the first type of construction candidates from non-adjacent neighboring blocks;
[0451] (7) the first X2 construction candidates from adjacent neighboring blocks;
[0452] (8) the first Y2 construction candidates of the second type of construction candidates from non-adjacent neighboring blocks;
[0453] (9) the first Z2 successor candidates from non-adjacent neighboring blocks;
[0454] (10) the first K2 construction candidates of the first type of construction candidates from non-adjacent neighboring blocks;
[0455] (11)……
[0456] (12) The first Xi construction candidates from adjacent neighboring blocks;
[0457] (13) the previous construction candidate of the second type of construction candidate from a non-adjacent neighboring block;
[0458] (14) the first successor candidate from a non-adjacent neighboring block;
[0459] (15) the first Ki construction candidates of the first type of construction candidates from non-adjacent neighboring blocks; and
[0460] (16)Zero MV.
[0461] The value of (Xi, Yi, Zi, Ki) can be a pre-specified number (such as 1) or a signaled number. If the number of available candidates for one category is less than that for other categories, the position of the candidate of that category is skipped and the position is taken by the remaining available candidates of other categories.
[0462] In one or more embodiments, the reordering mode may be a combined version that takes into account both availability and interleaving methods. In one example, the combined mode may be defined as follows:
[0463] (1) SbTMVP candidate (if available);
[0464] (2) candidates inherited from adjacent neighboring blocks;
[0465] (3) the first X1 construction candidates from adjacent neighboring blocks;
[0466] (4) all available construction candidates of the second type from non-adjacent neighboring blocks;
[0467] (5) remaining construction candidates from adjacent neighboring blocks;
[0468] (6) the first Z1 successor candidates from non-adjacent neighboring blocks;
[0469] (7) the first K1 construction candidates of the first type of construction candidates from non-adjacent neighboring blocks;
[0470] (8)…
[0471] (9) the first successor candidate from a non-adjacent neighboring block;
[0472] (10) the first Ki construction candidates of the first type of construction candidates from non-adjacent neighboring blocks; and
[0473] (11)Zero MV.
[0474] Improved reordering of affine candidate lists
[0475] Based on the candidate derivation method proposed above, one or more candidates can be derived for an existing affine merge candidate list, or an affine AMVP candidate list, or a regular merge candidate list, where the size of the corresponding list can be static (e.g., a configurable size) or adaptively adjusted (e.g., dynamically changed according to the availability of the encoder and then transmitted to the decoder with a signal). Note that when one or more new candidates are derived for a regular merge candidate list, the new candidates are first derived as affine candidates, and then converted into translation motion vectors using the pivot position (e.g., center sample or pixel position) within the coding block and the associated affine model, and then inserted into the regular merge candidate list.
[0476] In one or more embodiments, after updating or constructing the candidate list by adding some new candidates derived by the candidate derivation method proposed above, an adaptive reordering method such as ARMC may be applied to one or more of the candidate lists.
[0477] In another embodiment, a temporal candidate list may be created first, wherein the temporal candidate list may have a larger size than an existing candidate list (e.g., an affine merge candidate list, an affine AMVP candidate list, a regular merge candidate list). Once the temporal candidate list is constructed by adding newly derived candidates and statically sorted using the insertion method proposed above, an adaptive reordering method such as ARMC may be applied to reorder the temporal candidate list. After the adaptive reordering, the first N candidates of the temporal candidate list are inserted into the existing candidate list, where the value of N may be a fixed or configurable value. In one example, the value of N may be the same size as the existing candidate list where the N candidates selected from the temporal candidate list are located.
[0478] In the above application scenarios where an adaptive reordering method such as ARMC is applied, the following method may be used to improve the performance of the applied reordering method and / or reduce its complexity.
[0479] In some embodiments, when reordering different candidates using template matching costs, a cost function such as the sum of absolute differences (SAD) between the samples of the template of the current block and its corresponding reference samples can be used. The reference samples of the template can be located by the same motion information of the current block. In the case where fractional motion information is used for the current block, an interpolation filtering process can be used to generate prediction samples of the template. Since the generated prediction samples are only used to compare the motion accuracy between different candidates and not for the final block reconstruction, the prediction accuracy of the template samples can be relaxed by using an interpolation filter with a smaller tap. For example, in the case of adaptively reordering the affine merge candidate list, an interpolation filter with 2 taps or 4 taps or any other shorter length (e.g., 6 taps, 8 taps) can be used to generate prediction samples of the selected template of the current block. Or even the closest integer number of samples (skipping the interpolation filtering process completely) can be used as the prediction samples of the template. When the template matching method is used to adaptively reorder candidates in other candidate lists such as the conventional merge candidate list or the affine AMVP candidate list, an interpolation filter with a smaller tap can be used similarly.
[0480] In some embodiments, when reordering different candidates using template matching costs, a cost function such as the SAD between the samples of the template of the current block and its corresponding reference samples can be used. The corresponding reference samples can be located at integer positions or fractional positions. When fractional positions are located, a certain level of prediction accuracy can be achieved by performing an interpolation filtering process. Due to the limited prediction accuracy, the matching costs calculated for different candidates may contain noise level differences. In order to reduce the impact of noise level cost differences, the calculated matching costs can be adjusted by removing a few of the least significant bits before the candidate sorting process.
[0481] In some embodiments, if not enough candidates are derived by using different derivation methods, the candidate lists can be filled with zero MVs at the end of each list. In this case, the candidate cost can be calculated only for the first zero MV, while the remaining zero MVs can be statically assigned arbitrarily large cost values, so that these repeated zero MVs are placed at the end of the corresponding candidate lists.
[0482] In some embodiments, all zero MVs may be statically assigned an arbitrarily large cost value so that all zero MVs are placed at the end of the corresponding candidate list.
[0483] In some embodiments, early termination methods may be applied to the reordering method to reduce the complexity on the decoder side.
[0484] In one or more embodiments, when building a candidate list, different types of candidates may be derived and inserted into the list. If a candidate or a type of candidate does not participate in the reordering process, but is selected and signaled to the decoder, the reordering process applied to other candidates may be terminated early. In one example, in the case where ARMC is applied to an affine merge candidate list, the SbTMVP candidate may be excluded from the reordering process. In this case, if at the decoder side, the signaled merge index value of the affine coded block indicates an SbTMVP candidate, the ARMC process may be skipped or terminated early for the affine block.
[0485] In another embodiment, if a candidate or a type of candidate does not participate in the reordering process, but is not selected and the signal is transmitted to the decoder, then for the particular candidate or the particular type of candidate, both the derivation process and the reordering process can be skipped. Note that skipping the derivation process and the reordering process is only applied to the particular candidate or the particular type of candidate, while the remaining candidates or the remaining types of candidates are still performed, wherein skipping the derivation process indicates that the relevant operations of deriving the particular candidate or the particular type of candidate are skipped, but the predefined list position of the particular candidate or the particular type of candidate (for example, according to a predefined insertion order) can still be retained, but the candidate content (such as motion information) may be invalid due to skipping the derivation process. Similarly, during the reordering process, the cost calculation of the particular candidate or the particular type of candidate can be skipped, and the list position of the particular candidate or the particular type of candidate may not change after reordering other candidates.
[0486] Motion information storage
[0487] When scanning spatial non-adjacent neighboring blocks based on the candidate derivation method proposed above, the selected spatial non-adjacent neighboring blocks may be affine coded blocks or non-affine coded blocks (e.g., conventional inter-frame AMVP or merged coded blocks). In the case of non-affine coded blocks, the motion information may include the translation MV and the corresponding reference index in each direction. In the case of affine coded blocks, the motion information may include the CPMV and the corresponding reference index in each direction, as well as the position and size of the affine coded blocks.
[0488] Regardless of whether the blocks are affine coded or non-affine coded, the motion information of these blocks may need to be stored in memory after the blocks are coded. In order to save memory usage, spatially non-adjacent neighboring blocks may be restricted to a certain region.
[0489] like Fig.21As shown, the allowed non-adjacent region for scanning spatially non-adjacent neighboring blocks may be restricted to a finite region size.
[0490] In one or more embodiments, the restricted region may be applied to affine or non-affine spatially neighboring blocks.
[0491] The size of the allowed non-adjacent region may be defined according to the size of the current CTU, such as an integer (eg, 1 or 2 or other integers) or a fraction (eg, 0.5 or 0.25 or other fractions) of the current CTU size.
[0492] The size of the allowed non-contiguous region may be defined based on a fixed number of pixels or samples, for example, 128 samples above the current CTU and / or to the left of the current CTU.
[0493] The size (eg, in terms of CTU size or number of samples) may be a pre-specified value or a signaled value determined at the encoder and carried in the bitstream.
[0494] In some other examples, the size of the restricted area may be defined separately for the top and left non-adjacent neighboring blocks.
[0495] In one example, the upper non-adjacent neighboring blocks may be limited to within the current CTU, or outside the current CTU but within a fixed number of samples / pixels from the top of the current CTU, so that no additional line buffer is required to store the motion information of the above non-adjacent neighboring blocks. For example, if the existing line buffer already covers the adjacent area of 8 sample rows from the top of the current CTU, the fixed number may be defined as 8.
[0496] In another example, the left non-adjacent neighboring blocks may be restricted to be within the current CTU, or outside the current CTU but within a predefined or signaled number of samples / pixels from the left boundary of the current CTU.
[0497] When the motion information of the affine coding block is stored in memory, the motion information (including CPMV, reference index, block size and position) can be stored at the granularity of the minimum affine block size (e.g., 8×8 block). In the case where the current affine coding block is a coding unit with a larger size than the minimum affine block, a different method can be used to store the motion information.
[0498] In one or more embodiments, the motion information stored at each minimum affine block (e.g., 8×8 block) within the current block is simply a duplicate copy of the motion information of the current block. FIG. 22A to FIG. 22B The position and size of each minimal affine block (called the parent block in FIG. 22A to FIG. 22B The blocks are saved repeatedly on the same node (called sub-blocks). Fig.22AAn example of this is shown, where the current block (called the parent block) has a size of 24×16 and the size of the smallest affine block (called the child block) is fixed to 8×8.
[0499] In another or more embodiments, in each minimum affine block (in FIG. 22A to FIG. 22B The motion information saved at the minimum affine block (called a sub-block in the example) is the motion information that has been projected to the minimum affine block. Since the position of each minimum affine block is known (the upper left corner of each minimum affine block) and the size of each minimum affine block is also known (the minimum size, 8×8), there is no need to save the current block (in the example). FIG. 22A to FIG. 22B The position and size information of the parent block. Fig. 22B An example of this is shown in .
[0500] When using Fig. 22B The conversion from affine motion to regular / translational motion can also be simplified as follows when using the storage method of .
[0501] In some examples, assuming the size of the smallest non-affine block is 4×4, for each 8×8 affine block, the normal / translational motion of each inner non-affine block can be calculated as follows.
[0502] by Fig.23 As an illustrative example. For this minimum affine block, it has three Fig. 22B Based on the affine model shown in equation (2), the normal / translational motion can be derived as follows (e.g., ignoring some precision-related offsets). The examples provided below are based on Fig.23 The center point of each 4×4 block is shown, but the present disclosure is not limited to using the center point to derive the translation MV of each block.
[0503] In some examples, for the top left sub-block B1, MV1_x=e+(a>>2)+(c>>2), and MV1_y=f+(b>>2)+(d>>2), where a=CPMV2_x–CPMV1_x, b=CPMV2_y–CPMV1_y, c=CPMV3_x–CPMV1_x, d=CPMV3_y–CPMV1_y, e=CPMV1_x, and f=CPMV1_y.
[0504] In some examples, for the top right sub-block B2, MV2_x=MV1_x+(a>>1), and MV2_y=MV1_y+(b>>1).
[0505] In some examples, for the bottom left sub-block B3, MV3_x=MV1_x+(c>>1), and MV3_y=MV1_y+(d>>1).
[0506] In some examples, for the bottom right sub-block B4, MV4_x=MV1_x+((a+c)>>1), and MV4_y=MV1_y+((b+d)>>1).
[0507] Alternatively or additionally, the motion information of the affine coded block can be stored at different granularities a×b (e.g., 16×16 or 16×32 or 32×16 or 32×32 granularity, etc.) instead of the minimum affine block size (e.g., 8×8 granularity), where the granularity values of a and b can be configurable or determined by the encoder and then transmitted to the decoder by signal. Without loss of generality, a granularity of 16×16 (e.g., a=b=16) is taken as an illustrative example. If it is further assumed that the minimum affine block size is 8×8, it means that each 16×16 block can only store one set of affine motion information, which includes two or three CPMVs and represents one affine model, even though the four 8×8 sub-blocks within this 16×16 block may come from more than one affine block, such as Fig.25 shown. Fig.25 In the example, the four 8×8 sub-blocks A, B, C, and D form a 16×16 block / region, which only stores one affine model information. However, the four 8×8 sub-blocks come from four different affine blocks, which represent four affine models and include four sets of affine motion information. In this case, there may be different ways to obtain and store a set of affine information.
[0508] In one or more examples, one of the multiple sets of available affine motion information can be selected and saved. In one example, affine motion information at a fixed or configurable position (e.g., the top left smallest affine block) is selected for motion storage. In another example, average affine motion information of multiple models can be calculated for motion storage.
[0509] In some examples, the affine motion information at the selected neighboring affine blocks may be simplified / compressed before storage.
[0510] In one example, it is suggested that the selected neighboring affine block is always a 4-parameter model and only two CPMVs are saved.
[0511] In another example, it is suggested that the selected neighboring affine blocks are always unidirectionally predicted and only one affine motion direction is saved.
[0512] In another example, it is suggested that instead of saving the CPMV directly, the affine model parameters converted from the corresponding CPMV are saved, so that the size information (such as width and height) of the neighboring blocks does not need to be saved. In this case, the upper left CPMV may still need to be saved to provide translation motion.
[0513] In another example, each saved CPMV can be compressed before storage to further reduce the memory size. One example is to use general techniques for data compression. For example, such a technique is provided to save a composite value consisting of an exponent and a mantissa to approximate each saved CPMV.
[0514] In the above examples, the methods may be applied in any combination for motion information storage. For example, the restricted area defined for non-adjacent neighboring blocks may be combined with the use of compressed affine motion information.
[0515] Fig.24 A computing environment (or computing device) 2410 coupled to a user interface 2460 is shown. The computing environment 2410 may be part of a data processing server. In some embodiments, the computing device 2410 may perform any of the various methods or processes (such as encoding / decoding methods or processes) described above according to various examples of the present disclosure. The computing environment 2410 may include a processor 2420, a memory 2440, and an I / O interface 2450.
[0516] The processor 2420 generally controls the overall operation of the computing environment 2410, such as operations associated with display, data acquisition, data communication, and image processing. The processor 2420 may include one or more processors to execute instructions to perform all or some steps in the above method. In addition, the processor 2420 may include one or more modules that facilitate the interaction between the processor 2420 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a GPU, etc.
[0517] The memory 2440 is configured to store various types of data to support the operation of the computing environment 2410. The memory 2440 may include predetermined software 2442. Examples of such data include instructions for any application or method operating on the computing environment 2410, video data sets, image data, etc. The memory 2440 may be implemented by using any type of volatile or non-volatile memory device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0518] I / O interface 2450 provides an interface between processor 2420 and peripheral interface modules (such as keyboard, click wheel, buttons, etc.). Buttons may include but are not limited to a home button, a start scan button, and a stop scan button. I / O interface 2450 may be coupled to an encoder and a decoder.
[0519] In some embodiments, a non-transitory computer-readable storage medium is also provided, the non-transitory computer-readable storage medium includes a plurality of programs, the programs are included in the memory 2440, and can be executed by the processor 2420 in the computing environment 2410 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0520] The non-transitory computer-readable storage medium stores a plurality of programs for execution by a computing device having one or more processors, wherein the plurality of programs, when executed by the one or more processors, causes the computing device to perform the above-mentioned motion prediction method.
[0521] In some embodiments, the computing environment 2410 may be implemented using one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), graphics processing units (GPUs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0522] Fig.26 is a flowchart illustrating a video decoding method according to an example of the present disclosure.
[0523] In step 2601, at the decoder side, the processor 2420 may obtain a first restricted neighboring area of the current block as a first scanning area, and obtain a second restricted neighboring area of the current block as a second scanning area, wherein the first restricted neighboring area and the second restricted neighboring area are separate.
[0524] In some examples, processor 2420 may obtain a first restricted neighboring area within a current coding tree unit (CTU).
[0525] In some other examples, processor 2420 may obtain a first restricted adjacent area within a first area outside the current CTU and above the top side of the current CTU, wherein the first area is within a first number of pixels from the top side of the current CTU. In some examples, the first number may be determined based on an existing line buffer.
[0526] For example, the first restricted neighboring area may be an upper non-adjacent neighboring block that is limited to within the current CTU, or outside the current CTU but within a fixed number of samples / pixels at most from the top of the current CTU, so that no additional line buffer is required to store the motion information of the above non-adjacent neighboring blocks. For example, if the existing line buffer already covers a neighboring area of 8 sample rows from the top of the current CTU, the fixed number may be defined as 8.
[0527] In some examples, processor 2420 may obtain a second restricted neighboring area within the CTU.
[0528] In some other examples, the processor 2420 may obtain a second restricted adjacent area outside the current CTU and within a second area to the left of the current CTU, wherein the second area is within a second number of pixels to the left of the current CTU. In some examples, the second number may be determined based on an existing line buffer.
[0529] For example, the second restricted neighboring area may be a left non-adjacent neighboring block that is restricted within the current CTU, or outside the current CTU but within a predefined or signaled number of samples / pixels from the left boundary of the current CTU.
[0530] In step 2602, the processor 2420 may obtain one or more MV candidates from a plurality of non-adjacent neighboring blocks of the current block based on the first scanning area and the second scanning area.
[0531] In step 2603 , the processor 2420 may obtain one or more CPMVs of the current block based on one or more MV candidates.
[0532] Fig. 27 is a diagram corresponding to Fig.26 The video decoding method shown is a flowchart of a video encoding method.
[0533] In step 2701, at the encoder side, the processor 2420 may obtain a first restricted neighboring area of the current block as a first scanning area, and obtain a second restricted neighboring area of the current block as a second scanning area, wherein the first restricted neighboring area and the second restricted neighboring area are separate.
[0534] In some examples, processor 2420 may obtain a first restricted neighboring area within a current coding tree unit (CTU).
[0535] In some other examples, processor 2420 may obtain a first restricted adjacent area within a first area outside the current CTU and above the top side of the current CTU, wherein the first area is within a first number of pixels from the top side of the current CTU. In some examples, the first number may be determined based on an existing line buffer.
[0536] For example, the first restricted neighboring area may be an upper non-adjacent neighboring block that is limited to within the current CTU, or outside the current CTU but within a fixed number of samples / pixels at most from the top of the current CTU, so that no additional line buffer is required to store the motion information of the above non-adjacent neighboring blocks. For example, if the existing line buffer already covers a neighboring area of 8 sample rows from the top of the current CTU, the fixed number may be defined as 8.
[0537] In some examples, processor 2420 may obtain a second restricted neighboring area within the CTU.
[0538] In some other examples, the processor 2420 may obtain a second restricted adjacent area outside the current CTU and within a second area to the left of the current CTU, wherein the second area is within a second number of pixels to the left of the current CTU. In some examples, the second number may be determined based on an existing line buffer.
[0539] For example, the second restricted neighboring area may be a left non-adjacent neighboring block that is restricted within the current CTU, or outside the current CTU but within a predefined or signaled number of samples / pixels from the left boundary of the current CTU.
[0540] In step 2702, the processor 2420 may obtain one or more MV candidates from a plurality of non-adjacent neighboring blocks of the current block based on the first scanning area and the second scanning area.
[0541] In step 2703 , the processor 2420 may obtain one or more CPMVs of the current block based on one or more MV candidates.
[0542] Fig.28 is a flowchart illustrating a video decoding method according to an example of the present disclosure.
[0543] In step 2801, at the decoder side, the processor 2420 may obtain a plurality of sub-blocks by dividing an affine coding block, wherein each of the plurality of sub-blocks has a minimum affine block size.
[0544] In step 2802, processor 2420 may store motion information of an affine encoded block at a granularity greater than a minimum affine block size.
[0545] In some examples, the granularity may be a×b, such as a granularity of 16×16, 16×32, 32×16, or 32×32, while the minimum affine block size is, for example, a granularity of 8×8.
[0546] In some examples, processor 2420 may obtain a value of granularity signaled by an encoder. For example, a or b above may be configurable, or determined at the encoder and then signaled to the decoder.
[0547] In some examples, processor 2420 may obtain a first block within the affine encoding block at the granularity, wherein the first block may include at least one sub-block, and store a set of affine motion information of the first block based on at least two sub-blocks.
[0548] In some examples, when storing the affine motion information of the first block, the block may cover one or more groups of affine models. If only one group is covered, only the one group is saved. If multiple groups are covered, one group is selected from the multiple groups and saved.
[0549] For example, the processor 2420 may obtain a set of affine motion information using the affine motion information of a sub-block among at least one sub-block, obtain a set of affine motion information using the affine motion information of a sub-block located at a fixed position among at least one sub-block, or obtain a set of affine motion information based on the average affine motion information of at least one sub-block.
[0550] In one example, if Fig.25 As shown, the first block may be a 16×16 block including four 8×8 sub-blocks A, B, C, and D.
[0551] In some examples, processor 2420 may obtain motion information compressed for a first block at the granularity. For example, the motion information may be compressed by obtaining two control point motion vectors (CPMVs) associated with one of the at least one sub-blocks, wherein a 4-parameter affine pattern is applied to one of the at least one sub-blocks; obtaining an affine motion direction associated with one of the at least one sub-blocks, wherein one of the at least one sub-blocks is unidirectionally predicted; obtaining affine model parameters converted from the CPMVs of one of the at least one sub-blocks; or compressing one or more CPMVs of one of the at least one sub-blocks.
[0552] In some examples, processor 2420 may obtain an upper-left CPMV of a sub-block of at least one sub-block, and store the affine model parameters and the upper-left CPMV as motion information of the first block at the granularity.
[0553] Fig.29 is a diagram corresponding to Fig.28 The video decoding method shown is a flowchart of a video encoding method.
[0554] In step 2901, at the encoder side, the processor 2420 may obtain a plurality of sub-blocks by dividing an affine coding block, wherein each of the plurality of sub-blocks has a minimum affine block size.
[0555] In step 2902, processor 2420 may store motion information of an affine encoded block at a granularity greater than a minimum affine block size.
[0556] In some examples, the granularity may be a×b, such as a granularity of 16×16, 16×32, 32×16, or 32×32, while the minimum affine block size is, for example, a granularity of 8×8.
[0557] In some examples, the processor 2420 may signal the value of the granularity. For example, a or b above may be configurable, or determined at the encoder and then signaled to the decoder.
[0558] In some examples, processor 2420 may obtain a first block within the affine encoding block at the granularity, wherein the first block may include at least one sub-block, and store a set of affine motion information of the first block based on at least two sub-blocks.
[0559] In some examples, when storing the affine motion information of the first block, the block may cover one or more groups of affine models. If only one group is covered, only the one group is saved. If multiple groups are covered, one group is selected from the multiple groups and saved.
[0560] For example, the processor 2420 may obtain a set of affine motion information using the affine motion information of a sub-block among at least one sub-block, obtain a set of affine motion information using the affine motion information of a sub-block located at a fixed position among at least one sub-block, or obtain a set of affine motion information based on the average affine motion information of at least one sub-block.
[0561] In one example, if Fig.25 As shown, the first block may be a 16×16 block including four 8×8 sub-blocks A, B, C, and D.
[0562] In some examples, processor 2420 may obtain motion information compressed for a first block at the granularity. For example, the motion information may be compressed by obtaining two control point motion vectors (CPMVs) associated with one of the at least one sub-blocks, wherein a 4-parameter affine pattern is applied to one of the at least one sub-blocks; obtaining an affine motion direction associated with one of the at least one sub-blocks, wherein one of the at least one sub-blocks is unidirectionally predicted; obtaining affine model parameters converted from the CPMVs of one of the at least one sub-blocks; or compressing one or more CPMVs of one of the at least one sub-blocks.
[0563] In some examples, processor 2420 may obtain an upper-left CPMV of a sub-block of at least one sub-block, and store the affine model parameters and the upper-left CPMV as motion information of the first block at the granularity.
[0564] In some examples, a device for video decoding is provided. The device includes a processor 2420 and a memory 2440, the memory being configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Fig.26 or Fig.28 Any of the methods shown in .
[0565] In some examples, a device for video encoding is provided. The device includes a processor 2420 and a memory 2440, the memory being configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Fig. 27 or Fig.29 Any of the methods shown in .
[0566] In some other examples, a non-transitory computer-readable storage medium having instructions stored therein is provided. When the instructions are executed by the processor 2420, the instructions cause the processor to perform the following steps: Figure 26 to Figure 29 In one example, multiple programs can be executed by processor 2420 in computing environment 2410 to receive (e.g., from Figure 1G The video encoder 20 in the embodiment includes a bit stream or data stream of encoded video information (e.g., video blocks representing encoded video frames and / or one or more associated syntax elements, etc.), and can also be executed by the processor 2420 in the computing environment 2410 to perform the above decoding method according to the received bit stream or data stream. In another example, multiple programs can be executed by the processor 2420 in the computing environment 2410 to perform the above encoding method to encode video information (e.g., video blocks representing video frames and / or one or more associated syntax elements, etc.) into a bit stream or data stream, and can also be executed by the processor 2420 in the computing environment 2410 to transmit the bit stream or data stream (e.g., to Figure 2B Alternatively, a non-transitory computer-readable storage medium may have stored therein a bitstream or data stream including a video decoder 30 in the encoder (e.g., Figure 1G The video encoder 20 in the embodiment uses the encoded video information (e.g., video blocks representing encoded video frames and / or one or more associated syntax elements, etc.) generated by the above encoding method for the decoder (e.g., Figure 2BThe video decoder 30 in the video decodes the video data. The non-transitory computer-readable storage medium may be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0567] Other examples of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any changes, uses or adaptations of the disclosure made in accordance with its general principles, including deviations from the present disclosure within known or customary practices in the art. It is intended that the specification and examples be considered exemplary only.
[0568] It should be understood that the present disclosure is not limited to the exact examples described above and shown in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A video decoding method, the method comprising: Obtaining, by a decoder, a first restricted neighboring area of a current block as a first scanning area, and obtaining a second restricted neighboring area of the current block as a second scanning area, wherein the first restricted neighboring area and the second restricted neighboring area are separate; obtaining, by the decoder, one or more motion vector (MV) candidates from a plurality of non-adjacent neighboring blocks of the current block based on the first scanning area and the second scanning area; and One or more control point motion vectors (CPMVs) of the current block are obtained by the decoder based on the one or more MV candidates.
2. The method of claim 1, further comprising: Obtaining, by the decoder, the first restricted neighboring area in a current coding tree unit (CTU); or The first restricted neighboring area is obtained by the decoder in a first area outside the current CTU and above the top side of the current CTU, wherein the first area is located within a range of a first number of pixels from the top side of the current CTU.
3. The method of claim 2, wherein: The first number is determined according to existing line buffers.
4. The method of claim 1, further comprising: Obtaining, by the decoder, the second restricted neighboring area in a current coding tree unit (CTU); or The second restricted neighboring area is obtained by the decoder in a second area outside the current CTU and to the left of the current CTU, wherein the second area is located within a range of a second number of pixels from the left side of the current CTU.
5. The method of claim 4, wherein: The second number is determined according to the existing line buffers.
6. A video encoding method, the method comprising: Obtaining, by an encoder, a first restricted neighboring area of a current block as a first scanning area, and obtaining a second restricted neighboring area of the current block as a second scanning area, wherein the first restricted neighboring area and the second restricted neighboring area are separate; Obtaining, by the encoder, one or more motion vector (MV) candidates from a plurality of non-adjacent neighboring blocks of the current block based on the first scanning area and the second scanning area; and One or more control point motion vectors (CPMVs) of the current block are obtained by the encoder based on the one or more MV candidates.
7. The method of claim 6, further comprising: Obtaining, by the encoder, the first restricted neighboring area in a current coding tree unit (CTU); or The first restricted neighboring area is obtained by the encoder in a first area outside the current CTU and above the top side of the current CTU, wherein the first area is located within a range of a first number of pixels from the top side of the current CTU.
8. The method of claim 7, wherein: The first number is determined according to the existing line buffers.
9. The method of claim 6, further comprising: Obtaining, by the encoder, the second restricted neighboring area in a current coding tree unit (CTU); or The second restricted neighboring area is obtained by the encoder in a second area outside the current CTU and to the left of the current CTU, wherein the second area is located within a range of a second number of pixels from the left side of the current CTU.
10. The method of claim 9, wherein: The second number is determined according to the existing line buffers.
11. A video decoding method, the method comprising: A decoder obtains a plurality of sub-blocks by dividing the affine coding block, wherein each of the plurality of sub-blocks has a minimum affine block size; and Motion information for the affine encoded block is stored by the decoder at a granularity greater than the minimum affine block size.
12. The method of claim 11, further comprising: The value of the granularity signaled by the encoder is obtained by the decoder.
13. The method of claim 11, further comprising: obtaining, by the decoder, a first block within the affine coded block at the granularity, wherein the first block includes at least one sub-block; and A set of affine motion information of the first block is stored by the decoder and based on the at least two sub-blocks.
14. The method of claim 13, further comprising: The set of affine motion information is obtained by the decoder based on one of the following: using affine motion information of one of the at least one sub-block to obtain the set of affine motion information, Using affine motion information of a sub-block located at a fixed position in the at least one sub-block to obtain the set of affine motion information, or The set of affine motion information is obtained based on average affine motion information of the at least one sub-block.
15. The method of claim 13, further comprising: The motion information compressed for the first block at the granularity is obtained by the decoder.
16. The method of claim 15, wherein: The motion information is compressed based on one of the following: obtaining two control point motion vectors (CPMVs) associated with one of the at least one sub-block, wherein a 4-parameter affine model is applied to the one of the at least one sub-block; Obtaining an affine motion direction associated with one of the at least one sub-blocks, wherein the one of the at least one sub-blocks is unidirectionally predicted; Obtaining affine model parameters converted from the CPMV of one of the at least one sub-block; or One or more CPMVs of a sub-block of the at least one sub-block are compressed.
17. The method of claim 16, further comprising: Obtaining, by the decoder, an upper left CPMV of the one sub-block of the at least one sub-block; as well as The affine model parameters and the top-left CPMV are stored by the decoder as the motion information of the first block at the granularity.
18. A video encoding method, the method comprising: An encoder obtains a plurality of sub-blocks by dividing the affine coding block, wherein each of the plurality of sub-blocks has a minimum affine block size; and Motion information of the affine encoded block is stored by the encoder at a granularity greater than the minimum affine block size.
19. The method of claim 18, further comprising: The value of the granularity is signaled by the encoder.
20. The method of claim 18, further comprising: obtaining, by the encoder, a first block within the affine coded block at the granularity, wherein the first block includes at least one sub-block; and A set of affine motion information of the first block is stored by the encoder and based on the at least one sub-block.
21. The method of claim 20, further comprising: The set of affine motion information is obtained by the encoder based on one of the following: using affine motion information of one of the at least one sub-block to obtain the set of affine motion information, Using affine motion information of a sub-block located at a fixed position in the at least one sub-block to obtain the set of affine motion information, or The set of affine motion information is obtained based on average affine motion information of the at least one sub-block.
22. The method of claim 20, further comprising: The motion information obtained for the first block is compressed by the encoder at the granularity prior to storage.
23. The method of claim 22, further comprising: The motion information is compressed based on one of: obtaining two control point motion vectors (CPMVs) associated with one of the at least two sub-blocks, wherein a 4-parameter affine model is applied to the one of the at least two sub-blocks; Obtaining an affine motion direction associated with one of the at least two sub-blocks, wherein the one of the at least one sub-block is unidirectionally predicted; Obtaining affine model parameters converted from the CPMV of one of the at least one sub-block; or One or more CPMVs of a sub-block of the at least one sub-block are compressed.
24. The method of claim 23, further comprising: Obtaining, by the encoder, an upper left CPMV of the one sub-block of the at least one sub-block; as well as The affine model parameters and the top-left CPMV are stored by the encoder as the motion information of the first block at the granularity.
25. An apparatus for video decoding, the apparatus comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, Wherein, when executing the instructions, the one or more processors are configured to perform the method as described in any one of claims 1 to 5 and 11 to 17.
26. An apparatus for video encoding, the apparatus comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, Wherein, the one or more processors are configured to perform the method as claimed in any one of claims 6 to 10 and 18 to 24 when executing the instructions.
27. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to receive a bit stream and perform the method of any one of claims 1 to 5 and 11 to 19 based on the bit stream.
28. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the method of any one of claims 6 to 10 and 18 to 24 to encode a current block into a bit stream and transmit the bit stream.
