Constrained affine motion inheritance for video codecs

By determining and cropping incremental motion vectors from the control point motion vectors of adjacent blocks for video encoding and decoding, the problem of inefficient processing of complex affine motion in the prior art is solved, and more efficient encoding and decoding performance is achieved.

CN113632483BActive Publication Date: 2025-02-25QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080012139.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-02-06
Filing Date
2020-02-07
Publication Date
2025-02-25
Estimated Expiration
2040-02-07

AI Technical Summary

Technical Problem

When existing video encoding and decoding technologies deal with complex affine motions, it is difficult to effectively utilize the motion information of adjacent blocks, resulting in ineffective encoding and decoding.

Method used

The incremental motion vector is determined from the control point motion vector of adjacent blocks of the current block of the video data and cropped to a predetermined range, and the cropped incremental motion vector is used for encoding and decoding.

Benefits of technology

Improves the efficiency of video encoding and decoding, especially when handling non-translational motion, reduces the bit requirement and improves the codec performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113632483B_ABST
    Figure CN113632483B_ABST
Patent Text Reader

Abstract

An example device for encoding and decoding video data may include a memory configured to store a current block of video data and one or more processors implemented in a circuit coupled to the memory. The one or more processors may be configured to determine an incremental motion vector from control point motion vectors of neighboring blocks of the current block. The one or more processors may also be configured to clip the incremental motion vector to a predetermined range. The one or more processors may also be configured to use the clipped incremental motion vector to encode and decode the current block of video data.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the benefit of U.S. Application No. 16 / 783,697, filed on February 6, 2020, and U.S. Provisional Application No. 62 / 803,236, filed on February 8, 2019, both of which are hereby incorporated by reference in their entireties. Technical Field

[0002] The present disclosure relates to video encoding and video decoding. Background Art

[0003] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones (so-called "smart phones"), video teleconferencing equipment, video streaming equipment, etc. Digital video devices implement video coding and decoding technologies, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Codec (AVC), ITU-T H.265 / High Efficiency Video Codec (HEVC), and extensions of such standards. By implementing such video coding technologies, video devices can more efficiently send, receive, encode, decode and / or store digital video information.

[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (i.e., a video picture or a portion of a video picture) can be partitioned into video blocks, which can also be referred to as codec tree units (CTUs), codec units (CUs), and / or codec nodes. Video blocks in an intra-frame coded (I) slice of a picture are encoded using spatial predictions of reference samples in neighboring blocks in the same picture. Video blocks in an inter-frame coded (P or B) slice of a picture can use spatial predictions of reference samples in neighboring blocks in the same picture, or temporal predictions of reference samples in other reference pictures. Pictures can be referred to as frames, and reference pictures can be referred to as reference frames. Summary of the invention

[0005] In general, the present disclosure describes techniques for inter-frame prediction in video codecs. More specifically, the present disclosure describes methods and apparatus for performing techniques related to affine motion prediction, including constrained affine motion inheritance. With affine motion inheritance, a current block of video data can inherit two or more motion vectors representing non-translational motion, such as enlargement or reduction, rotation, perspective motion, or other irregular motion types, from a neighboring block of video data.

[0006] In one example, a method includes determining an incremental motion vector from control point motion vectors of neighboring blocks of a current block of video data, clipping the incremental motion vector to a predetermined range, and encoding and decoding the current block of video data using the clipped incremental motion vector.

[0007] In another example, a device includes: a memory and one or more processors implemented in a circuit coupled to the memory, the one or more processors configured to determine an incremental motion vector from control point motion vectors of neighboring blocks of a current block of video data, clip the incremental motion vector to a predetermined range, and encode and decode the current block of video data using the clipped incremental motion vector.

[0008] In another example, a device includes: a component for determining an incremental motion vector from control point motion vectors of neighboring blocks of a current block of video data, a component for clipping the incremental motion vector to a predetermined range, and a component for encoding and decoding the current block of video data using the clipped incremental motion vector.

[0009] In another example, a non-transitory computer-readable storage medium encoded with instructions that, when executed, cause a programmable processor to determine an incremental motion vector from control point motion vectors of neighboring blocks of a current block of video data, clip the incremental motion vector to a predetermined range, and use the clipped incremental motion vector to encode and decode the current block of video data.

[0010] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.

[0012] Figure 2A and Figure 2B is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure and a corresponding codec tree unit (CTU).

[0013] Figure 3is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.

[0014] Figure 4 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.

[0015] Figure 5 is a conceptual diagram illustrating control points for a six-parameter affine motion model.

[0016] Figure 6 is a conceptual diagram illustrating another example of control points for an affine motion model.

[0017] Figure 7 is a conceptual diagram illustrating control points for a current block and candidate blocks.

[0018] Figure 8 is a conceptual diagram illustrating example candidate blocks.

[0019] Fig. 9 is a flow chart illustrating an example technique according to the present disclosure.

[0020] Fig.10 is a flow chart illustrating an example encoding method.

[0021] Fig.11 is a flow chart illustrating an example decoding method. DETAILED DESCRIPTION

[0022] Figure 1 1 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of the present disclosure. The techniques of the present disclosure generally relate to encoding and decoding (encoding and / or decoding) video data. Generally, video data includes any data used to process video. Therefore, video data can include original, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaled data.

[0023] like Figure 1 As shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. In particular, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may include any of a wide range of devices, including: desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication, and thus may be referred to as wireless communication devices.

[0024] exist Figure 1 In the example of, source device 102 comprises video source 104, memory 106, video encoder 200 and output interface 108. Destination device 116 comprises input interface 122, video decoder 300, memory 120 and display device 118. According to the present disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply the technology for constrained affine motion inheritance. Therefore, source device 102 represents an example of video encoding device, and destination device 116 represents an example of video decoding device. In other examples, source device and destination device can include other components or arrangements. For example, source device 102 can receive video data from an external video source such as an external camera. Similarly, destination device 116 can be docked with an external display device, rather than including an integrated display device.

[0025] like Figure 1 The system 100 shown is only an example. Generally, any digital video encoding and / or decoding device can perform the technology for constrained affine motion inheritance. The source device 102 and the destination device 116 are only examples of such codec devices, wherein the source device 102 generates the encoded and decoded video data to be transmitted to the destination device 116. The disclosure refers to the "codec" device as a device for performing the encoding and decoding (encoding and / or decoding) of data. Therefore, the video encoder 200 and the video decoder 300 represent examples of codec devices, in particular, video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 can operate in a substantially symmetrical manner so that each of the source device 102 and the destination device 116 includes a video encoding and decoding component. Therefore, the system 100 can, for example, support one-way or two-way video transmission between the source device 102 and the destination device 116 for video streaming, video playback, video broadcasting or video telephony.

[0026] Typically, video source 104 represents the source of video data (i.e., original, unencoded video data), and provides a continuous series of pictures (also referred to as "frames") of video data to video encoder 200, which encodes the data for pictures. Video source 104 of source device 102 may include a video capture device, such as a video camera, a video archive containing previously captured original video, and / or a video feed interface receiving video from a video content provider. As a further alternative, video source 104 may generate computer graphics-based data as source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 encodes captured, pre-captured, or computer-generated video data. Video encoder 200 may rearrange pictures from a received order (sometimes referred to as a "display order") into a codec order for encoding and decoding. Video encoder 200 may generate a bitstream comprising encoded video data. Source device 102 may then output the encoded video data via output interface 108 onto computer-readable medium 110 for receipt and / or retrieval by, for example, input interface 122 of destination device 116 .

[0027] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memories. In some examples, the memory 106 and the memory 120 can store original video data, such as original video from the video source 104 and original, decoded video data from the video decoder 300. Additionally or alternatively, the memory 106 and the memory 120 can store software instructions that can be executed by, for example, the video encoder 200 and the video decoder 300, respectively. Although shown separately from the video encoder 200 and the video decoder 300 in this example, it should be understood that the video encoder 200 and the video decoder 300 can also include internal memories for functionally similar or equivalent purposes. In addition, the memory 106 and the memory 120 can store encoded video data, such as data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memory 106 and the memory 120 can be allocated as one or more video buffers, for example, to store original, decoded and / or encoded video data.

[0028] The computer-readable medium 110 may represent any type of medium or device capable of transmitting the encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium so that the source device 102 can send the encoded video data to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. According to a communication standard, such as a wireless communication protocol, the output interface 108 can modulate a transmission signal including the encoded video data, and the input interface 122 can modulate the received transmission signal. 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 helps facilitate communication from the source device 102 to the destination device 116.

[0029] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access the encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0030] In some examples, source device 102 may output encoded video data to file server 114 or another intermediate storage device that may store the encoded video generated by source device 102. Destination device 116 may access the stored video data from file server 114 via streaming or downloading. File server 114 may be any type of server device that can store encoded video data and send the encoded video data to destination device 116. File server 114 may represent a web server (e.g., for a website), a file transfer protocol (FTP) server, a content delivery network device, or a network attached storage (NAS) device. Destination device 116 may access the encoded video data from file server 114 via any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, a cable modem, etc.), or a combination of the two, which are suitable for accessing the encoded video data stored on file server 114. File server 114 and input interface 122 may be configured to operate according to a streaming protocol, a downloading transmission protocol, or a combination thereof.

[0031] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired network components (e.g., Ethernet cards), wireless communication components that operate according to any of a variety of IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to transmit data, such as encoded video data, according to a cellular communication standard, such as 4G, 4G-LTE (Long Term Evolution), Advanced LTE, 5G, or the like. In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to transmit data, such as encoded video data, according to other wireless standards, such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee TM ),Bluetooth TM Standard or similar standards to transmit data, such as encoded video data. In some examples, source device 102 and / or destination device 116 may include respective system-on-chip (SoC) devices. For example, source device 102 may include a SoC device that performs functionality belonging to video encoder 200 and / or output interface 108, and destination device 116 may include a SoC device that performs functionality belonging to video decoder 300 and / or input interface 122.

[0032] The techniques disclosed herein can be applied to video encoding and decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission (such as Dynamic Adaptive Streaming over HTTP (DASH)), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0033] The input interface 122 of the destination device 116 can receive an encoded video bitstream from the computer-readable medium 110 (e.g., the storage device 112, the file server 114, etc.). The encoded video bitstream from the computer-readable medium 110 may include signaling information defined by the video encoder 200, such as syntax elements with values ​​describing characteristics and / or processing of video blocks or other coded and decoded units (e.g., slices, pictures, groups of pictures, sequences, etc.), which is also used by the video decoder 300. The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 can represent any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0034] Although Figure 1200 and 300 may each be integrated with an audio encoder and / or an audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process multiplexed streams including both audio and video in a common data stream. If applicable, the MUX-DEMUX units may conform to the ITU H.223 multiplexer protocol, or other protocols such as the User Datagram Protocol (UDP).

[0035] The video encoder 200 and the video decoder 300 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 these techniques are partially implemented in software, the device can store instructions for the software in a suitable non-transitory computer-readable medium, and use one or more processors in hardware to run these instructions to perform the techniques of the present disclosure. Each of the video encoder 200 and the video decoder 300 can be included in one or more encoders or decoders, any of which can be integrated as part of a combined encoder / decoder (codec (CODEC)) in a corresponding device. The device including the video encoder 200 and / or the video decoder 300 may include an integrated circuit, a microprocessor, and / or a wireless communication device, such as a cellular phone.

[0036] The video encoder 200 and the video decoder 300 may operate according to a video codec standard, such as ITU-T H.265, also known as High Efficiency Video Coding (HEVC) or an extension thereof, such as a multi-view and / or scalable video codec extension. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards, such as the Joint Exploration Test Model (JEM) or ITU-T H.266, also known as the Versatile Video Codec (VVC). The latest draft of the VVC standard was described in "Versatile Video Coding (Draft 3)" (hereinafter referred to as "VVC Draft 3") proposed by Bross et al. at the 12th meeting of the Joint Video Experts Group (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 held in Macau, China from October 3 to 12, 2018. However, the technology disclosed herein is not limited to any particular codec standard.

[0037] Typically, the video encoder 200 and the video decoder 300 can perform block-based encoding and decoding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or other forms of data used in the encoding process and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Typically, the video encoder 200 and the video decoder 300 can encode and decode video data represented in YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and the video decoder 300 can encode and decode luminance and chrominance components instead of encoding and decoding red, green, and blue (RGB) data for samples of pictures, where the chrominance components may include two types of red-tone and blue-tone chrominance components. In some examples, the video encoder 200 converts the received RGB formatted data into a YUV representation before encoding, and the video decoder 300 converts the YUV representation into an RGB format. Alternatively, a pre-processing and post-processing unit (not shown) can perform these conversions.

[0038] The present disclosure may generally relate to the encoding and decoding of pictures (e.g., encoding and decoding) to include the process of encoding or decoding picture data. Similarly, the present disclosure may relate to the encoding and decoding of blocks of pictures to include the process of encoding or decoding data for blocks, such as prediction and / or residual encoding and decoding. The encoded video bitstream generally includes a series of values ​​of syntax elements representing codec decisions (e.g., codec mode) and the partitioning of pictures into blocks. Therefore, references to codec pictures or blocks should generally be understood as codec values ​​of syntax elements used to form pictures or blocks.

[0039] HEVC defines various blocks, including codec units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video codec (such as the video encoder 200) partitions a codec tree unit (CTU) into CUs according to a quadtree structure. That is, the video codec partitions the CTU and CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node", and the CU of this leaf node may include one or more PUs and / or one or more TUs. The video codec may also partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of a TU. In HEVC, a PU represents inter-frame prediction data, and a TU represents residual data. An intra-predicted CU includes intra-frame prediction information, such as an intra-frame mode indication.

[0040] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video codec (such as the video encoder 200) partitions a picture into CTUs. The video encoder 200 may partition the CTUs according to a tree structure, such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure removes the concept of multiple partition types, such as the separation between CU, PU, ​​and TU of HEVC. The QTBT structure includes two layers: a first layer partitioned according to quadtree partitioning and a second layer partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to the CU.

[0041] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning. Ternary tree partitioning is a partitioning that divides a block into three sub-blocks. In some examples, ternary tree partitioning divides a block into three sub-blocks without dividing the original block by the center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.

[0042] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma component and the chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for corresponding chroma components).

[0043] The video encoder 200 and the video decoder 300 may be configured to use per-HEVC quadtree segmentation, QTBT segmentation, or MTT segmentation or other segmentation structures. For purposes of explanation, the description of the disclosed techniques is presented with respect to QTBT segmentation. However, it should be understood that the disclosed techniques may also be applied to video codecs configured to use quadtree segmentation or other types of segmentation.

[0044] The present disclosure may use "N×N" and "N by N" interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in the vertical and horizontal dimensions, for example, 16×16 samples or 16 by 16 samples. Typically, a 16×16 CU has 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an N×N CU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. In addition, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include N×M samples, where M is not necessarily equal to N.

[0045] The video encoder 200 encodes video data for a CU representing prediction and / or residual information and other information. The prediction information indicates how to predict the CU in order to form a prediction block for the CU. The residual information typically represents the sample-by-sample difference between the CU samples before encoding and the prediction block.

[0046] In order to predict a CU, the video encoder 200 can generally form a prediction block for the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU from data of a previously coded picture, while intra-frame prediction generally refers to predicting a CU from previously coded data of the same picture. In order to perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate a prediction block. The video encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, for example, in terms of the difference between the CU and the reference block. The video encoder 200 can calculate a difference metric using the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean square difference (MSD), or other such difference calculations to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 can use unidirectional prediction or bidirectional prediction to predict the current CU.

[0047] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered an inter-prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion, such as enlargement or reduction, rotation, perspective motion, or other irregular motion types.

[0048] To perform intra prediction, the video encoder 200 can select an intra prediction mode to generate a prediction block. Some examples of JEM and VVC provide sixty-seven intra prediction modes, including modes for various directions, as well as a planar mode and a DC mode. Typically, the video encoder 200 selects an intra prediction mode that describes samples adjacent to a current block (e.g., a block of a CU) and predicts the samples of the current block according to the mode. Assuming that the video encoder 200 encodes and decodes CTUs and CUs in a raster scan order (from left to right, from top to bottom), such samples can typically be above the current block in the same picture as the current block, above to the left of the current block, or to the left of the current block.

[0049] The video encoder 200 encodes data representing a prediction mode for the current block. For example, for an inter-frame prediction mode, the video encoder 200 may encode data representing which of the various available inter-frame prediction modes is used, and encode motion information for the corresponding mode. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 may encode motion vectors using Advanced Motion Vector Prediction (AMVP) or Merge mode. The video encoder 200 may use a similar mode to encode motion vectors for affine motion compensation mode.

[0050] After prediction, such as intra-prediction or inter-prediction of a block, the video encoder 200 may calculate residual data for the block. The residual data, such as a residual block, represents the sample-by-sample difference between the block and the predicted block for the block, which is formed by using the corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to produce transformed data in a transform domain rather than a sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, the video encoder 200 may apply a secondary transform after the first transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc. The video encoder 200 generates transform coefficients after applying one or more transforms.

[0051] As described above, after any transforms that produce transform coefficients, the video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to minimize the amount of data used to represent the coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all coefficients. For example, the video encoder 200 can round down an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 can perform a bitwise right shift on the value to be quantized.

[0052] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place coefficients of higher energy (and therefore lower frequency) in front of the vector and transform coefficients of lower energy (and therefore higher frequency) in the back of the vector. In some examples, the video encoder 200 can scan the quantized transform coefficients using a predetermined scanning order to generate a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 can perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy encode the one-dimensional vector, for example, according to context adaptive binary arithmetic coding (CABAC). The video encoder 200 can also entropy encode the values ​​of the syntax elements used to describe the metadata associated with the encoded video data for use by the video decoder 300 when decoding the video data.

[0053] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be transmitted. The context may relate to, for example, whether neighboring values ​​of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.

[0054] The video encoder 200 may also generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, for the video decoder 300, for example in a picture header, a block header, a slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS). The video decoder 300 may also decode this syntax data to determine how to decode the corresponding video data.

[0055] In this way, the video encoder 200 can generate a bitstream that includes the encoded video data, such as syntax elements describing the partitioning of the picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.

[0056] In general, the video decoder 300 performs a process that is the reverse of the process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may decode values ​​for syntax elements of the bitstream using CABAC in a manner substantially similar to but reverse to the CABAC encoding process of the video encoder 200. The syntax elements may define partitioning information of a picture into CTUs, and partitioning of each CTU according to a corresponding partitioning structure (such as a QTBT structure) to define CUs of the CTUs. The syntax elements may also define prediction and residual information for a block (e.g., CU) of video data.

[0057] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to regenerate a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-frame prediction or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to regenerate the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.

[0058] According to the technology of the present disclosure, as will be explained in more detail below, the video encoder 200 and the video decoder 300 can be configured to encode and decode a block of video data using an affine encoding and decoding mode and a constrained affine motion inheritance. For example, the video encoder 200 and the video decoder 300 can be configured to determine an incremental motion vector from the control point motion vectors of neighboring blocks of a current block of video data, clip the incremental motion vector to a predetermined range, and use the clipped incremental motion vector to encode and decode the current block of video data.

[0059] The present disclosure may generally relate to "signaling" certain information, such as syntax elements. The term "signaling" may generally refer to the transmission of values ​​for syntax elements and / or other data used to decode encoded video data. That is, the video encoder 200 may signal values ​​for syntax elements in a bitstream. Typically, signaling refers to generating values ​​in a bitstream. As described above, the source device 102 may transmit the bitstream to the destination device 116 substantially in real time or in non-real time, such as may occur when the syntax elements are stored to the storage device 112 for later retrieval by the destination device 116.

[0060] Figure 2A and Figure 2Bis a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure 130 and a corresponding codec tree unit (CTU) 132. Solid lines represent quadtree partitions, and dashed lines indicate binary tree partitions. In each partition node (i.e., non-leaf node) of the binary tree, a flag is signaled to indicate which partition type (i.e., horizontal or vertical) is used, where in this example, 0 indicates horizontal partitioning and 1 indicates vertical partitioning. For quadtree partitioning, there is no need to indicate the partition type because the quadtree node divides the block horizontally and vertically into 4 equally sized sub-blocks. Accordingly, the video encoder 200 can encode syntax elements (such as partition information) for the regional tree layer (i.e., solid line) of the QTBT structure 130 and syntax elements (e.g., partition information) for the prediction tree layer (i.e., dashed line) of the QTBT structure 130, and the video decoder 300 can decode these syntax elements. The video encoder 200 may encode video data (such as prediction and transform data) for a CU represented by a terminal leaf node of the QTBT structure 130 , and the video decoder 300 may decode the video data.

[0061] generally, Figure 2B The CTU 132 of the first and second layers may be associated with parameters defining the size of blocks corresponding to nodes of the QTBT structure 130 of the first and second layers. These parameters may include a CTU size (indicating the size of the CTU 132 in samples), a minimum quadtree size (MinQTSize, indicating the minimum allowed quadtree leaf node size), a maximum binary tree size (MaxBTSize, indicating the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, indicating the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, indicating the minimum allowed binary tree leaf node size).

[0062] The root node of the QTBT structure corresponding to the CTU may have four child nodes at the first layer of the QTBT structure, each of which may be partitioned according to a quadtree partition. That is, the nodes of the first layer are either leaf nodes (without child nodes) or have four child nodes. The example of the QTBT structure 130 represents such nodes as including a parent node and child nodes with solid lines for branching. If the nodes of the first layer are not larger than the maximum allowed binary tree root node size (MaxBTSize), they may be further partitioned by the corresponding binary tree. The binary tree partitioning of a node may be iterated until the node obtained by the partitioning reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). The example of the QTBT structure 130 represents such nodes as having a dotted line for branching. The binary tree leaf node is called a CU, which is used for prediction (e.g., intra-frame picture prediction or inter-frame picture prediction) and transformation without any further partitioning. As discussed above, a CU may also be referred to as a "video block" or "block".

[0063] In one example of a QTBT partitioning structure, the CTU size is set to 128×128 (luminance sample and two corresponding 64×64 chrominance samples), MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate quadtree leaf nodes. The quadtree leaf nodes can have sizes from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). If the leaf quadtree node is 128×128, the leaf quadtree node will not be further divided by the binary tree because its size exceeds MaxBTSize (i.e., 64×64 in this example). Otherwise, the leaf quadtree node will be further divided by the binary tree. Therefore, the quadtree leaf node is also the root node for the binary tree, and the binary tree depth is 0. When the binary tree depth reaches MaxBTDepth (4 in this example), no further partitioning is allowed. When the width of the binary tree node is equal to MinBTSize (4 in this example), it means that no further horizontal partitioning is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further vertical partitioning is allowed for the binary tree node. As described above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without further segmentation.

[0064] Figure 3 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Figure 3The above description is provided for the purpose of explanation and should not be considered as limiting the techniques broadly illustrated and described in this disclosure. For the purpose of explanation, this disclosure describes the video encoder 200 in the context of video codec standards such as the HEVC video codec standard and the H.266 video codec standard being developed. However, the techniques of this disclosure are not limited to these video codec standards and are generally applicable to video encoding and decoding.

[0065] exist Figure 3 In the example of , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 may be implemented in one or more processors or in processing circuits. In addition, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions.

[0066] Video data memory 230 may store video data to be encoded by components of video encoder 200. Video encoder 200 may receive video data from, for example, video source 104 ( Figure 1 ) receives video data stored in video data memory 230. DPB218 can be used as a reference picture memory that stores reference video data for use by the video encoder 200 in prediction of subsequent video data. Video data memory 230 and DPB 218 can be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 230 and DPB 218 can be provided by the same memory device or different memory devices. In various examples, video data memory 230 can be on-chip with other components of video encoder 200, as illustrated, or off-chip relative to those components.

[0067] In the present disclosure, references to the video data memory 230 should not be interpreted as limited to memory internal to the video encoder 200, unless specifically described as such, or to memory external to the video encoder 200, unless specifically described as such. Rather, references to the video data memory 230 should be understood as a reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data for a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage of outputs from the various units of the video encoder 200 .

[0068] Picture shows Figure 3 Various units of the video encoder 200 are provided to help understand the operations performed by the video encoder 200. These units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide specific functionality and are preset on operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in operations that can be performed. For example, a programmable circuit can run software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. Fixed-function circuits can run software instructions (e.g., to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.

[0069] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where software executed by a programmable circuit is used to perform the operation of the video encoder 200, the memory 106 ( Figure 1 ) may store object code for software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.

[0070] The video data memory 230 is configured to store the received video data. The video encoder 200 may retrieve the picture of the video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be the original video data to be encoded.

[0071] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units to perform video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit (AU) 223, a linear model (LM) unit, etc.

[0072] The mode selection unit 202 generally coordinates multiple encoding processes to test combinations of encoding parameters and the resulting rate-distortion values ​​for such combinations. The encoding parameters may include the partitioning of CTUs into CUs, the prediction mode for the CUs, the transform type for the CU residual data, the quantization parameter for the CU residual data, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than other tested combinations.

[0073] The video encoder 200 may partition a picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a slice. The mode selection unit 202 may partition the CTUs of the picture according to a tree structure, such as the QTBT structure or quadtree structure of HEVC described above. As described above, the video encoder 200 may form one or more CUs by partitioning the CTUs according to the tree structure. This CU may also be generally referred to as a "video block" or "block".

[0074] Typically, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for a current block (e.g., a current CU, or in HEVC, the overlapping portion of a PU and a TU). For inter prediction of the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). In particular, the motion estimation unit 222 may calculate values ​​indicating how similar potential reference blocks are to the current block, for example, based on the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), and the like. The motion estimation unit 222 may typically perform these calculations using the sample-by-sample differences between the current block and the reference block under consideration. The motion estimation unit 222 may identify the reference block having the lowest value obtained from these calculations, indicating the reference block that most closely matches the current block.

[0075] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate values ​​for the prediction block according to one or more interpolation filters. In addition, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the corresponding motion vectors and combine the retrieved data, for example, by sample-by-sample averaging or weighted averaging.

[0076] As another example, for intra prediction or intra prediction codec, the intra prediction unit 226 can generate a prediction block from samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 can generally mathematically combine the values ​​of the adjacent samples and pad these calculated values ​​in a defined direction across the current block to generate a prediction block. As another example, for DC mode, the intra prediction unit 226 can calculate the average of the adjacent samples for the current block and generate a prediction block to include the obtained average for each sample of the prediction block.

[0077] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original, uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine the difference between the sample values ​​in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.

[0078] In the example where the mode selection unit 202 partitions the CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As indicated above, the size of the CU may refer to the size of the luma codec block of the CU, and the size of the PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, the video encoder 200 may support PU sizes of 2N×2N or N×N for intra-frame prediction, and symmetric PU sizes of 2N×2N, 2N×N, N×2N, N×N or the like for inter-frame prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning of PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-frame prediction.

[0079] In an example where the mode selection unit does not further partition the CU into PUs, each CU may be associated with a luma codec block and a corresponding chroma codec block. As above, the size of a CU may refer to the size of the luma codec block of the CU. The video encoder 200 and the video decoder 300 may support a CU size of 2N×2N, 2N×N, or N×2N.

[0080] For other video codec techniques, such as intra block copy mode codec, affine mode codec, and linear model (LM) mode codec, as a few examples, the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the codec technique. For example, in the case of affine mode codec, the affine unit 223 can determine an incremental motion vector from a control point motion vector (CPMV) of a neighboring block of the current block of video data, scale the incremental motion vector, and crop the incremental motion vector when generating a prediction block for the current block of video data being encoded. In some examples, such as palette mode codec, the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating a manner in which the block is to be reconstructed based on a selected palette. In such a mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 to be encoded.

[0081] As described above, the residual generation unit 204 receives video data for a current block and a corresponding prediction block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.

[0082] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 can apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 can apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 can perform multiple transforms on the residual block, such as a primary transform and a secondary transform, such as a rotation transform. In some examples, the transform processing unit 206 does not apply a transform to the residual block.

[0083] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may introduce information loss, and therefore, the quantized transform coefficients may have lower precision than the original transform coefficients produced by the transform processing unit 206.

[0084] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although possibly with a certain degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples from the prediction block generated by the mode selection unit 202 to generate a reconstructed block.

[0085] Filter unit 216 may perform one or more filtering operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blocking artifacts along CU edges. The operations of filter unit 216 may be skipped in some examples.

[0086] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in an example where the operation of the filter unit 216 is not required, the reconstruction unit 214 can store the reconstructed blocks to the DPB 218. In an example where the operation of the filter unit 216 is not required, the filter unit 216 can store the filtered reconstructed blocks to the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve a reference picture from the DPB 218, which is formed by the reconstructed (and potentially filtered) blocks to perform inter-frame prediction on blocks of subsequently encoded pictures. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks of the current picture in the DPB 218 to perform intra-frame prediction on other blocks in the current picture.

[0087] In general, the entropy coding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may entropy encode a quantized transform coefficient block from the quantization unit 208. As another example, the entropy coding unit 220 may entropy encode a prediction syntax element (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-encoded data. For example, the entropy coding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-to-variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an exponential Golomb coding operation, or another type of entropy coding operation on the data. In some examples, the entropy coding unit 220 may operate in a bypass mode, in which the syntax elements are not entropy encoded.

[0088] The video encoder 200 may output a bitstream including entropy-encoded syntax elements required to reconstruct blocks of a slice or picture. For example, the entropy encoding unit 220 may output a bitstream.

[0089] The above operations are described with respect to blocks. This description should be understood as operations for luma codec blocks and / or chroma codec blocks. As described above, in some examples, the luma codec block and the chroma codec block are the luma component and chroma component of a CU. In some examples, the luma codec block and the chroma codec block are the luma component and chroma component of a PU.

[0090] In some examples, operations performed with respect to luma codec blocks need not be repeated for chroma codec blocks. As an example, operations for identifying MVs and reference pictures for luma codec blocks need not be repeated for identifying MVs and reference pictures for chroma blocks. Instead, the MVs for luma codec blocks may be scaled to determine MVs for chroma blocks, and the reference pictures may be the same. As another example, the intra prediction process may be the same for luma codec blocks and chroma codec blocks.

[0091] Video encoder 200 represents an example of a device configured to encode video data, the device including a memory configured to store the video data and one or more processors implemented in circuits and configured to determine an incremental motion vector from control point motion vectors of neighboring blocks of a current block of the video data, clip the incremental motion vector to a predetermined range, and use the clipped incremental motion vector to encode and decode the current block of the video data.

[0092] Figure 4 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Figure 4 It is provided for the purpose of explanation and does not limit the technology as widely illustrated and described in this disclosure. For the purpose of explanation, the video decoder 300 is described according to the technology of JEM, VVC and HEVC. However, the technology of this disclosure can be performed by a video codec device configured for other video codec standards.

[0093] exist Figure 4 In the example of , the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 are implemented in one or more processors or in processing circuits. In addition, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions.

[0094] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include additional units to perform predictions according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of the motion compensation unit 316), an affine unit (AU) 317, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.

[0095] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of the video decoder 300. The video data stored in the CPB memory 320 may be, for example, received from the computer-readable medium 110 ( Figure 1 ). The CPB memory 320 may include a CPB that stores coded video data (e.g., syntax elements) from a coded video bitstream. Moreover, the CPB memory 320 may store video data other than syntax elements of coded and decoded pictures, such as temporary data representing outputs from various units of the video decoder 300. The DPB 314 typically stores decoded pictures, which the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures of the coded video bitstream. The video data memory 320 and the DPB 314 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. The CPB memory 320 and the DPB 314 may be provided by the same memory device or different memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or off-chip relative to those components.

[0096] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) to retrieve the encoded and decoded video data. That is, memory 120 may store data using CPB memory 320 as discussed above. Likewise, memory 120 may store instructions to be executed by video decoder 300 when some or all of the functionality of video decoder 300 is implemented in software to be executed by processing circuitry of video decoder 300.

[0097] Pictured Figure 4 The various units shown in the figure are used to help understand the operations performed by the video decoder 300. These units can be implemented as fixed function circuits, programmable circuits, or a combination thereof. Figure 3, fixed-function circuits refer to circuits that provide specific functionality and are preset in the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For example, a programmable circuit can run software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. Fixed-function circuits can run software instructions (for example, to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.

[0098] The video decoder 300 may include an ALU, an EFU, a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video decoder 300 is performed by software running on the programmable circuit, an on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.

[0099] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to regenerate the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.

[0100] Typically, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (where the block currently being reconstructed, ie, the decoded block, may be referred to as a "current block").

[0101] The entropy decoding unit 302 may entropy decode syntax elements defining quantized transform coefficients of the quantized transform coefficient block and transform information, such as a quantization parameter (QP) and / or (multiple) transform mode indications. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a degree of quantization, and likewise, determine a degree of inverse quantization for the inverse quantization unit 306 to apply. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.

[0102] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the coefficient block.

[0103] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax elements (including the prediction information syntax elements entropy decoded by entropy decoding unit 302). For example, if the prediction information syntax elements indicate that the current block is inter-predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements can indicate a reference picture in DPB 314 from which the reference block is retrieved, and a motion vector that identifies the position of the reference block in the reference picture relative to the current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in a manner substantially similar to that described with respect to motion compensation unit 224 ( Figure 3 ) describes the method to perform the inter-frame prediction process.

[0104] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 can generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra-prediction unit 318 can generally generate a prediction block in a manner substantially similar to that described with respect to the intra-prediction unit 226 ( Figure 3 The intra prediction process is performed in the manner described in the preceding figure. The intra prediction unit 318 can retrieve data of neighboring samples for the current block from the DPB 314.

[0105] In another example, if the prediction information syntax element indicates that the current block is affine predicted, the affine unit 317 can generate a prediction block according to an affine mode. The affine unit 317 can determine an incremental motion vector from the CPMV of a neighboring block of the current block of video data, scale the incremental motion vector, and clip the incremental motion vector when generating a prediction block for the current block of video data being encoded.

[0106] The reconstruction unit 310 may reconstruct the current block using the prediction block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.

[0107] The filter unit 312 may perform one or more filtering operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 may not necessarily be performed in all examples.

[0108] The video decoder 300 may store the reconstructed blocks in the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation. In addition, the video decoder 300 may output decoded pictures from the DPB for subsequent presentation on a display device, such as a Figure 1 Display device 118.

[0109] In this manner, the video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data and one or more processors implemented in circuits and configured to determine an incremental motion vector from control point motion vectors of neighboring blocks of a current block of the video data, clip the incremental motion vector to a predetermined range, and use the clipped incremental motion vector to encode and decode the current block of the video data.

[0110] Figure 5 is a conceptual diagram illustrating control points for a six-parameter affine motion model. One model for motion prediction is an affine model. The six-parameter affine motion model can be described as:

[0111]

[0112] Among them, (v x ,v y ) is the motion vector at coordinate (x, y), and a, b, c, d, e, and f are six parameters. The affine motion model for a block can also be composed of three motion vectors (MV) at the three corners of the block 500 (sometimes called control point motion vectors) and To describe, such as Figure 5 As shown. Figure 5 As shown, In the upper left corner of block 500, In the upper right corner of block 500, and in the lower left corner of block 500. The motion field is then described as:

[0113]

[0114] Where w and h are the width and height of the block.

[0115] The simplified four-parameter affine motion model can be described as:

[0116]

[0117] Similarly, the simplified four-parameter affine motion model for a block can be represented by two MVs at the two corners of the block: and The playground is described as:

[0118]

[0119] Where w and h are the width and height of the block.

[0120] Figure 6 is an illustration of the control point motion vectors (eg, ) is another example of a conceptual diagram. In the following, MV It is called CPMV.

[0121] CPMV is not necessarily related to Figure 5 or Figure 6 The CPMV in is the same as in . Other choices of CPMV can also be used. For the four-parameter affine model, the control point pairs can be selected from Figure 6 CPMV shown For a six-parameter affine model, the control point set can be selected from any three of the CPMVs. Given the selected CPMV, another MV can be calculated by the derived affine motion model.

[0122] The affine motion model can also be represented by the anchor MV at coordinate (x0, y0) Horizontal increment MV and vertical increment MV To represent. can be calculated as

[0123] The CPMV representation can be converted to a representation with deltaMV. For example, CPMV with the upper left corner same.

[0124] Note that the above operations are all vector operations. Addition, division, and multiplication operations are applied element-wise.

[0125] As in the normal motion vector prediction technique of HEVC, the affine motion predictor may be derived from the affine motion vectors or normal motion vectors of neighboring coded blocks. Example types of affine motion predictors include inherited affine motion vector predictors and constructed affine motion vector predictors.

[0126] When obtaining the inherited affine motion vector predictor (MVP), the video encoder 200 and the video decoder 300 can be configured to use the affine motion of the adjacent coded blocks to derive the predicted CPMV of the current block. This process operates under the assumption that the current block shares the same affine motion model with the adjacent coded blocks. In this context, the adjacent coded blocks are referred to as candidate blocks. Candidate blocks can be selected from different spatial or temporal adjacent positions. Figure 7 An example is shown. Figure 7 The affine motion vector of the neighboring candidate block A 530 in (expressed as the motion vector at the control point) is: The size of candidate block A 530 is (w, h), and the coordinates of the control points of the neighboring candidate block A 530 are (x0, y0), (x1, y1), and (x2, y2). The predicted affine motion vector at the control point of the current block 520 is It can be derived by replacing (x, y) in equation (2) with the coordinate difference between the control point of the current block 520 and the upper left corner control point of the adjacent candidate block A 530, so that:

[0127]

[0128]

[0129]

[0130] where (x0', y0'), (x1', y1') and (x2', y2') are the coordinates of the control points in the current block. If expressed as a delta MV, then

[0131] Similarly, if the affine model of the neighboring candidate block is a four-parameter affine model, equation (4) applies. If the affine model for the current block is a four-parameter affine model, equation (7) is ignored.

[0132] Figure 8 is a conceptual diagram illustrating an example candidate block. In one example, the candidate block may be located as follows Figure 8 Positions shown are A0, B0, B1, A1, B2.

[0133] The constructed affine motion vector predictor is derived by predicting the motion vector at the control point of the current block as a normal motion vector prediction. In other words, the video encoder 200 or the video decoder 300 may derive the constrained affine motion vector predictor in a manner similar to the affine motion vector predictor derived by the video encoder 200 or the video decoder 300. For example, Figure 8As shown, the motion vector at the upper left control point It can be predicted by the motion vector at B2, B3 or A3. The motion vector at the upper right control point It can be predicted by the motion vector at B0 or ​​B1, and the motion vector at the lower left control point Can be predicted by the motion vector at A0 or A1.

[0134] According to an example of the present disclosure, the video encoder 200 and the video decoder 300 may be configured to convert the increment MV into and Clip to the same predetermined range. For example, the predetermined range can be from -2 k to 2 k , where k is an integer value. For example, for an 8-bit representation of the incremental MV, k may be 7, or for a 16-bit representation of the incremental MV, k may be 15. In other examples, the basic unit may be independent of the range. For example, a unit may be 1 / 16, 1 / 32, 1 / 64, or 1 / 128 samples. In another example, the predetermined range may be a fixed unit of 1 / 16, 1 / 32, 1 / 64, or 1 / 128 samples, and the predetermined range may be scaled based on the precision (also referred to as resolution) of the incremental MV. For example, if the basic unit for the range is 1 / 64, but the precision of the incremental MV is 1 / 128, the range may be scaled by 2. By clipping the value of the incremental MV, the incremental MV can be stored using fewer bits, resulting in a reduction in the amount of memory required to store the incremental MV. Therefore, in some embodiments, the video encoder 200 and the video decoder 300 may be configured to store an incremental MV with a determined number of bits. Typically, the number of bits is less than the number of bits used to store the original MV. For example, tests have shown that the BD rate performance with a bit reduction is approximately 0.1%. The average bit rate for the same quality video can be increased by about 0.1%. In the following, six-parameter affine motion is assumed. However, the clipping for four-parameter affine motion can be similarly applied. In other words, the video encoder 200 and the video decoder 300 can clip the incremental motion vectors for the six-parameter affine motion model and / or the four-parameter affine motion model. Moreover, and and The distances between MVs are assumed to be w and h. However, if the distances between MVs are different values, the technology of the present disclosure can also be applied.

[0135] In view of the foregoing, in one example of the present disclosure, the video encoder 200 and the video decoder 300 may be configured to determine an incremental motion vector from control point motion vectors of neighboring blocks of a current block of video data, crop the incremental motion vector to a predetermined range, and use the cropped incremental motion vector to encode and decode the current block of video data.

[0136] In one example, the video encoder 200 and the video decoder 300 may be configured to convert the incremental motion vector v 1x -v 0x 、v 1y -v 0y 、v 2x -v 0x 、v 2y -v 0y Crop to a predetermined range.

[0137] In another example, the video encoder 200 and the video decoder 300 may be configured to convert the incremental motion vector v 1x -v 0x 、v 1y -v 0y 、v 2x -v 0x 、v 2y -v 0y The scaling value is clipped to a predetermined range. For example, the scaling value is: S may be 1, 2, or other predetermined values. S may also be predetermined by the resolution of the incremental MV. For example, if the anchor MV resolution (or precision) is different from the incremental resolution (or precision), the incremental MV resolution may be scaled. Thus, in this example, the video encoder 200 and the video decoder 300 may be configured to scale the incremental motion vectors before cropping, wherein the scaling is based on the scaling factor S. For example, the video encoder 200 and the video decoder 300 may include a component for scaling the incremental motion vectors.

[0138] In another example, the video encoder 200 and the video decoder 300 may be configured to The value of is clipped to a predetermined range. In this example, the video encoder 200 and the video decoder 300 may be configured to scale the incremental motion vector before clipping, wherein the scaling is based on the width or height of the corresponding neighboring block.

[0139] In another example, the video encoder 200 and the video decoder 300 may be configured to The scaling value is clipped to a predetermined range. For example, the scaling value is: Where N is predetermined. In one example, N is the maximum size of the block. In another example, N is determined by w and h, and in yet another embodiment, N is determined by the resolution of the MV. In yet another example, N is the maximum size of the block divided by k, where k is an integer constant such as 1, 2, or other integer. If N is a power of 2, scaling can also be implemented by left shifting. In one example, N is 128. Then, multiplication by N can be replaced by << 7, where << is a bitwise left shift. Note that if scaling values ​​are used, the values ​​in equations (5), (6), and (7) are all scaled by N. v ix ′、v iy The value of ′ can be obtained by scaling down N.

[0140] Thus, in the aforementioned example, the video encoder 200 and the video decoder 300 may be configured to scale the incremental motion vectors before cropping, wherein the scaling is based on the width or height of the corresponding neighboring block and a scaling factor N. N may be a function of the width and / or height of the neighboring block, the resolution of the MV, or the maximum size of the block.

[0141] In one example, the range for clipping is determined so that the clipped value can be represented in a certain number of bits. In one example, the range is (-2 B-1 , 2 B-1 -1), where B is the number of bits representing the crop value. B may be 8, 16, or another integer. B may be a predetermined fixed value or a value signaled from the video encoder 200 to the video decoder 300.

[0142] In one example implementation of the VVC standard, the derivation process of the luminance affine control point motion vectors for neighboring blocks as described in "Versatile Video Coding (Draft 4)" by Bross et al. at the 13th Joint Video Experts Group (JVET) Meeting (JVET-M1001) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, held in Marrakech, Morocco, from January 9 to 18, 2019, is modified as follows: The additions of JVET-M1001 are shown in <add> and< / add> The deleted contents of JVET-M1001 are displayed <delete> and< / delete> between.

[0143] Derivation process of motion vectors for luminance affine control points from neighboring blocks

[0144] The inputs to this process are:

[0145] - luma position (xCb, yCb), which specifies the top left corner sample of the current luma codec block relative to the top left corner luma sample of the current picture,

[0146] - Two variables cbWidth and cbHeight, which specify the width and height of the current luma codec block,

[0147] - luma position (xNb, yNb), which specifies the top left corner sample of the adjacent luma codec block relative to the top left corner luma sample of the current picture,

[0148] - two variables nNbW and nNbH which specify the width and height of the adjacent luma codec block,

[0149] -Number of control point motion vectors numCpMv,

[0150] The output of this process is the brightness affine control point vector cpMvLX[cpIdx], where cpIdx=0..numCpMv-1 and X is 0 or 1.

[0151] The variable isCTUboundary is derived as follows:

[0152] - Set isCTUboundary equal to true if all of the following conditions are true:

[0153] -((yNb+nNbH)%CtbSizeY) is equal to 0

[0154] -yNb+nNbH equals yCb

[0155] - Otherwise, set isCTUboundary equal to false.

[0156] The variables log2NbW and log2NbH are derived as follows:

[0157] log2NbW=Log2(nNbW) (8-593)

[0158] log2NbH=Log2(nNbH) (8-594)

[0159] The variables mvScaleHor, mvScaleVer, dHorX, and dVerX are derived as follows:

[0160] - If isCTUboundary equals "true", the following applies:

[0161] mvScaleHor=MvLX[xNb][yNb+nNbH-1][0]<<7 (8-595)

[0162] mvScaleVer=MvLX[xNb][yNb+nNbH-1][1]<<7 (8-596)

[0163] dHorX=(MvLX[xNb+nNbW-1][yNb+nNbH-1][0]-MvLX[xNb][yNb+nNbH-1][0])<<(7-log2NbW) (8-597)

[0164] dVerX=(MvLX[xNb+nNbW-1][yNb+nNbH-1][1]-MvLX[xNb][yNb+nNbH-1][1])<<(7-log2NbW) (8-598)

[0165] Otherwise, (isCTUboundary is equal to "false"), the following applies:

[0166] mvScaleHor=CpMvLX[xNb][yNb][0][0]<<7 (8-599)

[0167] mvScaleVer=CpMvLX[xNb][yNb][0][1]<<7 (8-600)

[0168] dHorX=(CpMvLX[xNb+nNbW-1][yNb][1][0]-CpMvLX[xNb][yNb][0][0])<<(7-log2NbW) (8-601)

[0169] dVerX=(CpMvLX[xNb+nNbW-1][yNb][1][1]-CpMvLX[xNb][yNb][0][1])<<(7-log2NbW) (8-602)

[0170] <add>dHorX=Clip3(-2 B-1 ,2 B-1 -1,dHorX)

[0171] dVerX=Clip3(-2 B-1 ,2 B-1 -1,dVerX)< / add>

[0172] The variables dHorY and dVerY are derived as follows:

[0173] - If isCTUboundary is equal to "false" and MotionModelIdc[xNb][yNb] is equal to 2, the following applies:

[0174] dHorY=(CpMvLX[xNb][yNb+nNbH-1][2][0]-CpMvLX[xNb][yNb][2][0])<<(7-log2NbH) (8-603)

[0175] dVerY=(CpMvLX[xNb][yNb+nNbH-1][2][1]-CpMvLX[xNb][yNb][2][1])<<(7-log2NbH) (8-604)

[0176] - Otherwise, (isCTUboundary is equal to "true" or MotionModelIdc[xNb][yNb] is equal to 1),

[0177] The following applies:

[0178] dHorY=-dVerX (8-605)

[0179] dVerY=dHorX (8-606)

[0180] <add>dHorY=Clip3(-2 B-1 ,2 B-1 -1,dHorY)

[0181] dVerY=Clip3(-2 B-1 ,2 B-1 -1,dVerY)< / add>

[0182] The brightness affine control point vector cpMvLX[cpIdx], where cpIdx=0..numCpMv-1 and X is 0 or 1, is derived as follows:

[0183] - When isCTUboundary equals "true", set yNb equal to yCb.

[0184] - The first two control point motion vectors cpMvLX[0] and cpMvLX[1] are derived as follows:

[0185] cpMvLX[0][0]=(mvScaleHor+dHorX*(xCb-xNb)+dHorY*(yCb-yNb))(8-607)

[0186] cpMvLX[0][1]=(mvScaleVer+dVerX*(xCb-xNb)+dVerY*(yCb-yNb))(8-608)

[0187] cpMvLX[1][0]=(mvScaleHor+dHorX*(xCb+cbWidth-xNb)+dHorY*(yCb-yNb))(8-609)

[0188] cpMvLX[1][1]=(mvScaleHor+dHorX*(xCb+cbWidth-xNb)+dVerY*(yCb-yNb))(8-610)

[0189] If numCpMv is equal to 3, the third control point vector cpMvLX[2] is derived as follows:

[0190] cpMvLX[2][0]=(mvScaleHor+dHorX*(xCb-xNb)+dHorY*(yCb+cbHeight-yNb))(8-611)

[0191] cpMvLX[2][1]=(mvScaleVer+dVerX*(xCb-xNb)+dVerY*(yCb+cbHeight-yNb))(8-612)

[0192] - Invoke the rounding process for motion vectors as specified in clause 8.4.2.14 with mvX set equal to cpMvLX[cpIdx], rightShift set equal to 7, and leftShift set equal to 0 as input, and with the rounded cpMvLX[cpIdx] as output, where X is 0 or 1 and cpIdx = 0..numCpMv-1.

[0193] In another implementation of the VVC standard, the derivation process of the brightness affine control point motion vector from the neighboring block in JVET-M1001 is modified as follows:

[0194] Derivation process of motion vectors for luminance affine control points from neighboring blocks

[0195] The inputs to this process are:

[0196] - luma position (xCb, yCb), which specifies the top left corner sample of the current luma codec block relative to the top left corner luma sample of the current picture,

[0197] - Two variables cbWidth and cbHeight, which specify the width and height of the current luma codec block,

[0198] - luma position (xNb, yNb), which specifies the top left corner sample of the adjacent luma codec block relative to the top left corner luma sample of the current picture,

[0199] - two variables nNbW and nNbH which specify the width and height of the adjacent luma codec block,

[0200] -Number of control point motion vectors numCpMv,

[0201] The output of this process is the brightness affine control point vector cpMvLX[cpIdx], where cpIdx=0..numCpMv-1 and X is 0 or 1.

[0202] The variable isCTUboundary is derived as follows:

[0203] - Set isCTUboundary equal to true if all of the following conditions are true:

[0204] -((yNb+nNbH)%CtbSizeY) is equal to 0

[0205] -yNb+nNbH equals yCb

[0206] - Otherwise, set isCTUboundary equal to false.

[0207] The variables log2NbW and log2NbH are derived as follows:

[0208] log2NbW=Log2(nNbW) (8-593)

[0209] log2NbH=Log2(nNbH) (8-594)

[0210] The variables mvScaleHor, mvScaleVer, dHorX, and dVerX are derived as follows:

[0211] - If isCTUboundary equals "true", the following applies:

[0212] mvScaleHor=MvLX[xNb][yNb+nNbH-1][0]<<7 (8-595)

[0213] mvScaleVer=MvLX[xNb][yNb+nNbH-1][1]<<7 (8-596)

[0214] dHorX= <add> Clip3< / add> ( <add> -2 B-1 ,2 B-1 -

[0215] 1,< / add> MvLX[xNb+nNbW-1][yNb+nNbH-1][0]-MvLX[xNb][yNb+nNbH-1][0])<<(7-log2NbW) (8-597)

[0216] dVerX= <add> Clip3< / add> ( <add> -2 B-1 ,2 B-1 -1,< / add> MvLX[xNb+nNbW-1][yNb+nNbH-1][1]-MvLX[xNb][yNb+nNbH-1][1])<<(7-log2NbW) (8-598)

[0217] Otherwise, (isCTUboundary is equal to "false"), the following applies:

[0218] mvScaleHor=CpMvLX[xNb][yNb][0][0]<<7 (8-599)

[0219] mvScaleVer=CpMvLX[xNb][yNb][0][1]<<7 (8-600)

[0220] dHorX= <add> Clip3< / add> (<add> -2 B-1 ,2 B-1 -1,< / add> CpMvLX[xNb+nNbW-1][yNb][1][0]-CpMvLX[xNb][yNb][0][0])<<(7-log2NbW) (8-601)

[0221] dVerX= <add> Clip3< / add> ( <add> -2 B-1 ,2 B-1 -1,< / add> CpMvLX[xNb+nNbW-1][yNb][1][1]-CpMvLX[xNb][yNb][0][1])<<(7-log2NbW) (8-602)

[0222] The variables dHorY and dVerY are derived as follows:

[0223] - If isCTUboundary is equal to "false" and MotionModelIdc[xNb][yNb] is equal to 2, the following applies:

[0224] dHorY= <add> Clip3< / add> ( <add> -2 B-1 ,2 B-1 -< / add> 1,CpMvLX[xNb][yNb+nNbH-1][2][0]-CpMvLX[xNb][yNb][2][0])<<(7-log2NbH) (8-603)

[0225] dVerY= <add> Clip3< / add> ( <add> -2 B-1 ,2 B-1 -1,< / add> CpMvLX[xNb][yNb+nNbH-1][2][1]-CpMvLX[xNb][yNb][2][1])<<(7-log2NbH) (8-604)

[0226] - Otherwise, (isCTUboundary is equal to "true" or MotionModelIdc[xNb][yNb] is equal to 1),

[0227] The following applies:

[0228] dHorY=-dVerX (8-605)

[0229] dVerY=dHorX (8-606)

[0230] The brightness affine control point vector cpMvLX[cpIdx], where cpIdx=0..numCpMv-1 and X is 0 or 1, is derived as follows:

[0231] - When isCTUboundary equals "true", set yNb equal to yCb.

[0232] - The first two control point motion vectors cpMvLX[0] and cpMvLX[1] are derived as follows:

[0233] cpMvLX[0][0]=(mvScaleHor+dHorX*(xCb-xNb)+dHorY*(yCb-yNb))(8-607)

[0234] cpMvLX[0][1]=(mvScaleVer+dVerX*(xCb-xNb)+dVerY*(yCb-yNb))(8-608)

[0235] cpMvLX[1][0]=(mvScaleHor+dHorX*(xCb+cbWidth-xNb)+dHorY*(yCb-yNb))(8-609)

[0236] cpMvLX[1][1]=(mvScaleHor+dHorX*(xCb+cbWidth-xNb)+dVerY*(yCb-yNb))(8-610)

[0237] If numCpMv is equal to 3, the third control point vector cpMvLX[2] is derived as follows:

[0238] cpMvLX[2][0]=(mvScaleHor+dHorX*(xCb-xNb)+dHorY*(yCb+cbHeight-yNb))(8-611)

[0239] cpMvLX[2][1]=(mvScaleVer+dVerX*(xCb-xNb)+dVerY*(yCb+cbHeight-yNb))(8-612)

[0240] - Invoke the rounding process for motion vectors as specified in clause 8.4.2.14 with mvX set equal to cpMvLX[cpIdx], rightShift set equal to 7, and leftShift set equal to 0 as input, and with the rounded cpMvLX[cpIdx] as output, where X is 0 or 1 and cpIdx = 0..numCpMv-1.

[0241] In another example of the present disclosure, the adjacent decoded block from the upper left ( Figure 8In other words, in this example, the video encoder 200 and the video decoder 300 may not use the affine motion inheritance from the upper left adjacent encoded block. Let (xCurr, yCurr) be the coordinates of the upper left pixel of the current block, then if the x component of the coordinates of the adjacent block is less than xCurr and the y component of the coordinates is less than yCurr, then the affine motion inheritance is prohibited. Therefore, affine motion inheritance can only come from the adjacent encoded block on the left or above. In this way, in a memory optimized implementation, the buffer size can be saved by 1 / 3 (for example, as described in “CE4-related: A clean up for affine mode” proposed by Zhou et al. at the 12th meeting of the Joint Video Experts Group (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 held in Macau, China from October 3 to 12, 2018).

[0242] Note that the techniques of this disclosure can also be applied to normal motion vector prediction, where the motion vector predictor from the top left neighboring encoded block is disabled.

[0243] Fig. 9 is a flow chart illustrating the techniques of the present disclosure. Video encoder 200 (e.g., affine unit 223) or video decoder 300 (e.g., affine unit 317) may determine a delta motion vector (542) from the CPMV of a neighboring block of a current block of video data. For example, video encoder 200 or video decoder 300 may determine a CPMV representation for an affine motion model and may convert the CPMV representation into a representation with a delta MV. For example, CPMV with the upper left corner same.

[0244] In some examples, the neighboring blocks do not include an upper left neighboring block relative to the current block. In other examples, the neighboring blocks include an upper neighboring block and a left neighboring block. In some examples, the neighboring blocks only include an upper neighboring block and a left neighboring block.

[0245] In some examples, the video encoder 200 (e.g., affine unit 223) or the video decoder 300 (e.g., affine unit 317) may scale the incremental motion vector (544). In other examples, the video encoder 200 or the video decoder 300 may not scale the incremental motion vector and proceed directly to block 546. For example, the video encoder 200 (e.g., affine unit 223) or the video decoder 300 (e.g., affine unit 317) may scale the incremental motion vector based on a scaling factor S. The scaling factor S may be a predetermined value or may be determined based on the resolution of the MV. In other examples, the video encoder 200 (e.g., affine unit 223) or the video decoder 300 (e.g., affine unit 317) may scale the incremental motion vector based on the width or height of the corresponding neighboring block. In some examples, the video encoder 200 (e.g., affine unit 223) or the video decoder 300 (e.g., affine unit 317) may scale the incremental motion vector based on the width or height of the corresponding neighboring block and the scaling factor N. In some examples, the scaling factor N may be a function of the width and / or height of neighboring blocks, the resolution of motion vectors, or the maximum size of blocks.

[0246] Video encoder 200 (e.g., affine unit 223) or video decoder 300 (e.g., affine unit 317) may clip the incremental motion vector (or scaled incremental motion vector) to a predetermined range (546). For example, video encoder 200 (e.g., affine unit 223) or video decoder 300 (e.g., affine unit 317) may clip the incremental motion vector to a given number of bits B, such as an integer. In some examples, the number of bits may be a predetermined fixed value. In other examples, video encoder 200 may determine the number of bits and signal the number of bits to video decoder 300.

[0247] The video encoder 200 or the video decoder 300 may use the cropped incremental motion vector to encode and decode the current block. For example, the video encoder 200 may use the cropped MV to form a prediction block for the current block, and use the prediction block to encode the current block. The video decoder 300 may use the cropped MV to form a prediction block for the current block, and use the prediction block to decode the current block.

[0248] Fig.10 2 is a flowchart illustrating an example method for encoding a current block. The current block may include a current CU. Although with respect to the video encoder 200 ( Figure 1 and Figure 3 ), but it should be understood that other devices can still be configured to perform similar Fig.10 method of method of method.

[0249] In this example, the video encoder 200 initially predicts the current block (350). For example, the video encoder 200 may form a prediction block for the current block. When using an affine prediction mode to form a prediction block, the video encoder 200 may determine an incremental motion vector from the control point motion vectors of neighboring blocks of the current block. In some examples, the video encoder 200 may scale the incremental motion vector as described above. In other examples, the video encoder 200 may not scale the incremental motion vector. The video encoder 200 may clip the incremental motion vector (or the scaled incremental motion vector) to a predetermined range.

[0250] The video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, the video encoder 200 may calculate the difference between the original, unencoded block and the prediction block for the current block. The video encoder 200 may then transform and quantize the coefficients of the residual block (354). Next, the video encoder 200 may scan the transform coefficients of the quantized residual block (356). During or after the scan, the video encoder 200 may entropy encode the coefficients (358). For example, the video encoder 200 may encode the coefficients using CAVLC or CABAC. The video encoder 200 may then output the entropy-encoded data of the block (360).

[0251] Fig.11 300 ( Figure 1 and Figure 4 ), but it should be understood that other devices can still be configured to perform similar Fig.11 method of method of method.

[0252] The video decoder 300 may receive entropy-encoded data for a current block, such as entropy-encoded prediction information and entropy-encoded data for coefficients of a residual block corresponding to the current block (370). The video decoder 300 may entropy decode the entropy-encoded data to determine prediction information for the current block and to regenerate coefficients of the residual block (372). The video decoder 300 may predict the current block (374), for example, using an intra-frame or inter-frame prediction mode as indicated by the prediction information for the current block to calculate a prediction block for the current block. For an affine prediction mode, when forming a prediction block, the video decoder 300 may determine an incremental motion vector from the control point motion vectors of neighboring blocks of the current block. In some examples, the video decoder 300 may scale the incremental motion vector as described above. In other examples, the video decoder 300 may not scale the incremental motion vector. The video decoder 300 may clip the incremental motion vector (or the scaled incremental motion vector) to a predetermined range.

[0253] The video decoder 300 may then inverse scan the regenerated coefficients (376) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize and inverse transform the coefficients to produce a residual block (378). The video decoder 300 may ultimately decode the current block (380) by combining the prediction block and the residual block.

[0254] Various examples of the present disclosure include the following.

[0255] Example 1. A method for encoding and decoding video data, the method comprising: determining an incremental motion vector from control point motion vectors of neighboring blocks of a current block, clipping the incremental motion vector to a predetermined range, and using the clipped incremental motion vector to encode and decode a current block of video data.

[0256] Example 2. The method of Example 1 further includes scaling the incremental motion vector prior to cropping.

[0257] Example 3. The method of Example 2, wherein scaling the incremental motion vector before cropping includes scaling the incremental motion vector before cropping, wherein the scaling is based on a scaling factor S.

[0258] Example 4. The method of Example 2, wherein scaling the incremental motion vector before cropping includes scaling the incremental motion vector before cropping, wherein the scaling is based on a width or a height of a corresponding neighboring block.

[0259] Example 5. The method of Example 2, wherein scaling the incremental motion vector before cropping includes scaling the incremental motion vector before cropping, wherein the scaling is based on a width or height of a corresponding neighboring block and a scaling factor N.

[0260] Example 6. The method of Example 5, wherein N is a function of the width and / or height of neighboring blocks, the resolution of motion vectors, or the maximum size of a block.

[0261] Example 7. The method of Example 1, wherein the neighboring block does not include an upper left neighboring block relative to the current block.

[0262] Example 8. The method of Example 1, wherein the adjacent blocks include an upper adjacent block and a left adjacent block.

[0263] Example 9. The method of Example 1, wherein the neighboring blocks only include upper neighboring blocks and left neighboring blocks.

[0264] Example 10. The method of any combination of Examples 1 to 9.

[0265] Example 11. A method as described in any one of Examples 1 to 10, wherein encoding and decoding includes decoding.

[0266] Example 12. A method as described in any one of Examples 1 to 10, wherein encoding and decoding includes encoding.

[0267] Example 13. A device for encoding and decoding video data, the device comprising one or more components for performing the method as described in any one of Examples 1 to 10.

[0268] Example 14. The apparatus of Example 13, wherein one or more components include one or more processors implemented in a circuit.

[0269] Example 15. The device of any one of Examples 13 and 14 further comprises a memory for storing video data.

[0270] Example 16. The apparatus of any one of Examples 13 to 15, further comprising a display configured to display the decoded video data.

[0271] Example 17. The device of any one of Examples 13 to 16, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0272] Example 18. The device of any one of Examples 13 to 17, wherein the device comprises a video decoder.

[0273] Example 19. The device of any one of Examples 13 to 18, wherein the device comprises a video encoder.

[0274] Example 20. A computer-readable storage medium having instructions stored thereon, which, when executed, cause one or more processors to perform the method as described in any one of Examples 1 to 10.

[0275] It will be appreciated that, depending on the example, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or omitted altogether (e.g., not all described actions or events are necessary for the practice of the techniques). Additionally, in some examples, actions or events may be performed simultaneously, such as through multithreading, interrupt handling, or multiple processors, rather than sequentially.

[0276] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or sent as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media corresponding to tangible media such as data storage media, or communication media including any media that facilitates the transfer of a computer program from one place to another, for example, according to a communication protocol. In this manner, computer-readable media may generally correspond to (1) non-transitory tangible computer-readable storage media, or (2) communication media such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in the present disclosure. A computer program product may include a computer-readable medium.

[0277] By way of example and not limitation, this computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium, which may be used to store desired program code in the form of instructions or data structures and instructions or data structures that can be accessed by a computer. Moreover, any connection is properly referred to as a computer-readable medium. For example, if the instruction is sent from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave) are all included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but point to non-temporary tangible storage media. As used herein, disks and discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks and blue-ray discs, wherein the disks usually reproduce data magnetically, and the discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0278] Instructions may be run by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Accordingly, the terms "processor" and "processing circuitry" as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. Moreover, these techniques may be implemented entirely in one or more circuits or logic elements.

[0279] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs) or groups of ICs (e.g., chipsets). Various components, modules, or units are described in the present disclosure to emphasize the functional aspects of a device configured to perform the disclosed techniques, but do not necessarily require implementation by different hardware units. Instead, as described above, the various units may be combined in a codec hardware unit, or provided by a collection of interoperable hardware units including one or more processors as described above, in combination with appropriate software and / or firmware.

[0280] Various examples have been described. These and other examples are within the scope of the following claims.

Claims

1. A device for encoding and decoding video data using an affine motion model described by three control point motion vectors at three corners of a block of video data, the device comprising: a memory configured to store a current block of video data; as well as one or more processors implemented in circuitry coupled to the memory, the one or more processors configured to: determining an incremental motion vector from control point motion vectors of neighboring blocks of the current block of the video data, wherein to determine the incremental motion vector, the one or more processors are configured to determine a horizontal incremental motion vector based on a first control point motion vector of the neighboring block and a second control point motion vector of the neighboring block, and to determine a vertical incremental motion vector based on the first control point motion vector and a third control point motion vector of the neighboring block; Clipping the incremental motion vector to a predetermined range; and The current block of the video data is encoded and decoded using the cropped incremental motion vector to derive a control point motion vector of the current block.

2. The device according to claim 1, wherein: The one or more processors are further configured to: The incremental motion vectors are scaled before cropping.

3. The apparatus of claim 2, wherein to scale the incremental motion vector, the one or more processors are further configured to: The incremental motion vector is scaled based on a scaling factor S.

4. The device as claimed in claim 3, wherein: S is a predetermined value or a resolution based on the motion vector.

5. The device of claim 4, wherein: To scale the incremental motion vector prior to cropping, the one or more processors are configured to: The incremental motion vector is scaled based on a width of the neighboring block or a height of the neighboring block.

6. The device of claim 2, wherein: To scale the incremental motion vector prior to cropping, the one or more processors are configured to: The incremental motion vector is scaled based on the width of the neighboring block or the height of the neighboring block and a scaling factor N.

7. The device of claim 6, wherein: N is a function of the width of the neighboring blocks or the height of the neighboring blocks, the resolution of the motion vectors or the maximum size of the blocks.

8. The device of claim 1, wherein: The neighboring blocks are blocks other than the upper left neighboring block with respect to the current block of the video data.

9. The device of claim 1, wherein: The adjacent block is an upper adjacent block or a left adjacent block.

10. The device of claim 1, further comprising a display configured to display the decoded video data.

11. The device of claim 1, wherein: The device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

12. The apparatus of claim 1, wherein: The apparatus comprises a video decoder.

13. The apparatus of claim 1, wherein: The apparatus includes a video encoder.

14. The apparatus of claim 1, wherein: In order to encode and decode the video data, the one or more processors are configured to encode the video data, and the device further comprises: A camera is configured to capture a picture including the current block of the video data.

15. The apparatus of claim 1, wherein: In order to encode and decode the video data, the one or more processors are configured to decode the video data, and the device further comprises: A display is configured to display a picture including the current block of the video data.

16. The apparatus of claim 1, wherein: The one or more processors are configured to clip the delta motion vector according to one or more of the following: , ,or Among them, the three control point motion vectors are expressed as , and , S is a predetermined value or a resolution based on a motion vector, w is the width of the neighboring block, h is the height of the neighboring block, and N is one of the following: a maximum size of a block, based on w and h, the resolution based on the motion vector, or a maximum size of a block divided by an integer constant k.

17. A method for encoding and decoding video data using an affine motion model described by three control point motion vectors at three corners of a block of video data, the method comprising: Determining an incremental motion vector from control point motion vectors of neighboring blocks of a current block of video data, wherein determining the incremental motion vector comprises determining a horizontal incremental motion vector based on a first control point motion vector of the neighboring block and a second control point motion vector of the neighboring block, and determining a vertical incremental motion vector based on the first control point motion vector and a third control point motion vector of the neighboring block; Clipping the incremental motion vector to a predetermined range; as well as The current block of the video data is encoded and decoded, wherein the encoding and decoding includes using the cropped incremental motion vector to derive a control point motion vector of the current block.

18. The method of claim 17, further comprising: The incremental motion vectors are scaled before cropping.

19. The method of claim 18, wherein: Scaling the incremental motion vector before cropping includes: The incremental motion vector is scaled based on a scaling factor S.

20. The method of claim 19, wherein: S is a predetermined value or a resolution based on the motion vector.

21. The method of claim 18, wherein: Scaling the incremental motion vector before cropping includes: The incremental motion vector is scaled based on a width of the neighboring block or a height of the neighboring block.

22. The method of claim 18, wherein: Scaling the incremental motion vector before cropping includes: The incremental motion vector is scaled based on the width of the neighboring block or the height of the neighboring block and a scaling factor N.

23. The method of claim 22, wherein: N is a function of the width of the neighboring blocks or the height of the neighboring blocks, the resolution of the motion vectors or the maximum size of the blocks.

24. The method of claim 17, wherein: The neighboring blocks are blocks other than the upper left neighboring block with respect to the current block of the video data.

25. The method of claim 17, wherein: The neighboring block is one of an upper neighboring block and a left neighboring block.

26. The method of claim 17, wherein: Encoding and decoding the current block of the video data comprises encoding the current block of the video data, and wherein the method further comprises: A picture including the current block of the video data is captured with a camera.

27. The method of claim 17, wherein: Encoding and decoding the current block of the video data comprises decoding the current block of the video data, and wherein the method further comprises: A picture including a current block of decoded video data is displayed.

28. The method of claim 17, wherein: Clipping the incremental motion vector includes clipping the incremental motion vector according to one or more of the following: , ,or Among them, the three control point motion vectors are expressed as , and , S is a predetermined value or a resolution based on a motion vector, w is the width of the neighboring block, h is the height of the neighboring block, and N is one of the following: a maximum size of a block, based on w and h, the resolution based on the motion vector, or a maximum size of a block divided by an integer constant k.

29. An apparatus for encoding and decoding video data using an affine motion model described by three control point motion vectors at three corners of a block of video data, the apparatus comprising: means for determining an incremental motion vector from control point motion vectors of neighboring blocks of a current block of video data, wherein the means for determining the incremental motion vector comprises means for determining a horizontal incremental motion vector based on a first control point motion vector of the neighboring block and a second control point motion vector of the neighboring block, and means for determining a vertical incremental motion vector based on the first control point motion vector and a third control point motion vector of the neighboring block; means for clipping the incremental motion vector to a predetermined range; as well as Means for encoding and decoding the current block of the video data, wherein the encoding and decoding means includes using the cropped incremental motion vector to derive a control point motion vector for the current block.

30. The apparatus of claim 29, further comprising: Means for scaling the incremental motion vectors prior to cropping.

31. A computer-readable storage medium having stored thereon instructions which, when executed, cause one or more processors to: determining an incremental motion vector from control point motion vectors of neighboring blocks of a current block of video data, wherein to determine the incremental motion vector, the instructions cause the one or more processors to determine a horizontal incremental motion vector based on a first control point motion vector of the neighboring block and a second control point motion vector of the neighboring block, and to determine a vertical incremental motion vector based on the first control point motion vector and a third control point motion vector of the neighboring block; Clipping the incremental motion vector to a predetermined range; and The current block of the video data is encoded and decoded using the cropped incremental motion vector to derive a control point motion vector of the current block.