Video decoding, encoding method and device, computer equipment and storage medium

By adopting affine model prediction technology in video decoding and using affine transformation to determine motion vectors, the problem of low compression efficiency of high frame rate video data in the existing technology is solved, and more efficient data storage and transmission are achieved.

CN116156197BActive Publication Date: 2024-10-11TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211613305.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-12-28
Filing Date
2019-07-04
Publication Date
2024-10-11
Estimated Expiration
2039-07-04

AI Technical Summary

Technical Problem

Among existing video coding technologies, there is still room for improvement in the data compression efficiency of motion compensation prediction in high-resolution videos, especially in terms of reducing storage and bandwidth requirements, especially when processing high frame rate videos, where redundant data storage exists problem.

Method used

Adopts affine model prediction technology to determine motion vectors by using affine transformations during video decoding, reducing the storage requirements for line buffers, especially in the processing of CTU top blocks, skipping affine merge mode to avoid additional of motion data storage, reducing row buffer sizes and saving costs.

Benefits of technology

It effectively reduces the motion data storage requirements of the line buffer during the video decoding process, improves data compression efficiency, reduces storage and transmission bandwidth, and improves coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116156197B_ABST
    Figure CN116156197B_ABST
Patent Text Reader

Abstract

Various embodiments of the present application provide a method and apparatus for video encoding / decoding. In some examples, the apparatus for video decoding includes a receiving circuit system and a processing circuit system. The processing circuit system decodes the prediction information of the current block in the current picture according to the encoded video code stream. The prediction information indicates an affine model in a merge mode. The processing circuit system obtains the motion information of the bottom position in the adjacent block adjacent to the current block in the current picture from the buffer, and determines the parameters of the affine model for transforming between the block and the reference block in the reference picture based on the motion information of the bottom position in the adjacent block. Further, the processing circuit system reconstructs the sample of the current block based on the affine model.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to U.S. Provisional Application No. 62 / 697,999, filed on July 13, 2018, "Method of Affine Model Prediction in Video Coding," and priority to U.S. Regular Application No. 16 / 236,209, filed on December 28, 2018, the entire texts of both applications are incorporated herein by reference. Technical Field

[0002] The present application relates to video decoding technology, and in particular to a video decoding and encoding method and apparatus, a computer device and a storage medium. Background Art

[0003] The background description provided herein is intended to state the scope of the present invention. With respect to the various aspects described in this background section and those that may not qualify as prior art at the time of filing the application, the work of the currently named inventors is neither explicitly nor implicitly admitted as prior art to the present invention.

[0004] Video encoding and decoding can be performed using inter-picture prediction with motion compensation. An uncompressed digital video may include a series of pictures, each picture having spatial dimensions of, for example, 1920×1080 luma samples and associated chroma samples. The series of pictures may have a fixed or variable picture rate (also informally referred to as a frame rate), such as 60 pictures per second or 60 Hz (Hertz). Uncompressed video has significant bit rate requirements. For example, 1080p60 4:2:0 video (providing a 1920×1080 luma sample resolution at a 60 Hz frame rate) with 8 bits per sample requires a bandwidth of nearly 1.5 Gbit / s (bits per second). One hour of such video requires more than 600 GB (gigabytes) of storage space.

[0005] One purpose of video encoding and decoding can be to reduce redundancy in the input video signal through compression. Compression helps reduce the bandwidth or storage space requirements mentioned earlier, in some cases by two orders of magnitude or more. Lossless compression and lossy compression, as well as combinations thereof, can be employed. Lossless compression refers to techniques that can reconstruct an exact copy of the original signal from the compressed original signal. When lossy compression is used, the reconstructed signal may not be exactly the same as the original signal, but the distortion between the original signal and the reconstructed signal is small enough to make the reconstructed signal suitable for the intended application. Lossy compression is widely used in video. The amount of distortion that can be tolerated depends on the application. For example, users of certain consumer streaming applications may tolerate higher distortion than users of television distribution applications. The achievable compression ratio can reflect that higher allowed / tolerable distortion can produce higher compression ratios.

[0006] Motion compensation may be a lossy compression technique and may involve a technique where a block of sample data obtained from a previously reconstructed picture or part thereof (reference picture) is used to predict a newly reconstructed picture or part of a picture after being spatially shifted in the direction indicated by a motion vector (hereinafter MV). In some cases, the reference picture may be the same as the picture currently being reconstructed. The MV may have two dimensions, X and Y, or three dimensions, the third dimension being an indication of the reference picture in use (indirectly, the latter may be a temporal dimension).

[0007] In some video compression techniques, an MV applicable to a particular region of sample data can be predicted from other MVs, for example, from MVs related to another region of sample data that is spatially adjacent to the region under reconstruction and that precede the MV in decoding order. Doing so can greatly reduce the amount of data required to encode the MV, thereby eliminating redundancy and increasing compression. MV prediction can work effectively, for example, because when encoding an input video signal from a camera (called natural video), there is a statistical possibility that a larger region than the region applicable to a single MV moves in a similar direction, so in some cases, similar motion vectors of MVs from adjacent regions can be used for prediction. This results in the MV found for a given region being similar or identical to the MV predicted from the surrounding MVs, and in turn, after entropy coding, can be represented with fewer bits than the number of bits used when the MV is directly encoded. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., MV) derived from the original signal (i.e., sample stream). In other cases, MV prediction itself may be lossy, for example due to rounding errors when calculating predicted values ​​from several surrounding MVs. Summary of the invention

[0008] Embodiments of the present application provide methods and devices for video encoding / decoding. In some examples, the device for video decoding includes a receiving circuit system and a processing circuit system. The processing circuit system decodes prediction information of a current block in a current picture from an encoded video code stream. The prediction information indicates an affine model in a merge mode. The processing circuit system obtains motion information of a bottom position in an adjacent block adjacent to the current block in the current picture from a buffer, and determines parameters of an affine model for transforming between the current block and a reference block in a reference picture based on the motion information of the bottom position in the adjacent block. Further, the processing circuit system reconstructs samples of the current block based on the affine model.

[0009] According to an embodiment of the present application, the processing circuit system obtains the motion vector of a specific minimum size block from a row buffer, wherein the row buffer includes the motion vector of the minimum size block at the bottom position in the coding tree unit (CTU) row above the current block. In one embodiment, the row buffer is configured to not buffer the motion vector of the non-bottom minimum size block in the CTU row above the current block. In another embodiment, the row buffer is configured to not buffer the motion information of the control point of the affine coding block.

[0010] In some embodiments, the processing circuit system uses a 4-parameter affine model to derive a motion vector of a control point of the current block based on a motion vector of a specific minimum size block. In one embodiment, the processing circuit system detects whether a minimum size block adjacent to the control point is affine encoded based on an affine flag, and the affine flag indicates whether a plurality of consecutive minimum size blocks belong to an affine encoded block. Then, when the minimum size block is affine encoded, the processing circuit system derives a motion vector of the control point based on the motion vector of the minimum size block. In one example, when the minimum size block adjacent to the control point is affine encoded, the processing circuit system uses the motion vector of the minimum size block as the motion vector of the control point.

[0011] In some embodiments, the processing circuit system determines a pair of minimum size blocks that are affine encoded, and determines the parameters of the four-parameter affine model based on the motion vectors of the pair of minimum size blocks. In one example, the processing circuit system determines a pair of consecutive minimum size blocks that are affine encoded, and determines the parameters of the four-parameter affine model based on the motion vectors of the pair of consecutive minimum size blocks.

[0012] In an embodiment, the processing circuitry determines a pair of minimum-sized blocks that are affine-coded, and determines motion vectors of control points at two corners of the current block based on motion vectors of the pair of minimum-sized blocks.

[0013] In another embodiment, the processing circuitry disables the affine merge mode when no left neighboring block in the current block is available as an affine encoded block.

[0014] An embodiment of the present application also provides a device for video decoding, including: a decoding module, used to decode prediction information of a current block in a current picture from an encoded video code stream, the prediction information indicating an affine model in a merge mode; a first acquisition module, used to acquire motion information of a bottom position in an adjacent block adjacent to the current block in the current picture from a buffer; a first determination module, used to determine parameters of the affine model used to transform between the current block and a reference block in a reference picture, the reference picture being reconstructed based on the motion information of the bottom position in the adjacent block; and a reconstruction module, used to reconstruct at least one sample of the current block based on the affine model.

[0015] In one embodiment, the device further includes: a second acquisition module, used to obtain the motion vector of a specific minimum size block from a row buffer, and the row buffer includes: the motion vector of the minimum size block at the bottom position in the coding tree unit (CTU) row above the current block.

[0016] In one embodiment, the line buffer is configured not to buffer motion vectors of non-bottom minimum-sized blocks in the CTU line above the current block.

[0017] In one embodiment, the line buffer is configured not to buffer motion information of control points of the affine coded block.

[0018] In one embodiment, the apparatus further comprises: a deriving module, configured to derive the motion vector of the control point of the current block based on the motion vector of the specific minimum-sized block using a four-parameter affine model.

[0019] In one embodiment, the device further includes: a detection module, used to detect whether a minimum size block adjacent to a control point is affine encoded based on an affine flag, wherein the affine flag indicates whether multiple consecutive minimum size blocks belong to an affine encoded block; and the derivation module derives the motion vector of the control point based on the motion vector of the minimum size block when the minimum size block is affine encoded.

[0020] In one embodiment, the apparatus further comprises: a second determination module for determining a pair of minimum-sized blocks to be affine-coded; and a third determination module for determining parameters of a four-parameter affine model based on motion vectors of the pair of minimum-sized blocks.

[0021] In one embodiment, the device further includes: a second determination module for determining a pair of minimum-sized blocks to be affine encoded; and a fourth determination module for determining the motion vectors of the control points at the two top corners of the current block based on the motion vectors of the pair of minimum-sized blocks.

[0022] A computer device is also provided in an embodiment of the present application, including a processor and a memory, wherein the memory stores machine-readable instructions. When the machine-readable instructions are executed by the processor, the processor executes the method for video decoding described in any embodiment of the present application.

[0023] An embodiment of the present application also provides a non-transitory computer-readable medium storing instructions. When executed by a computer for video decoding, the stored instructions enable the computer to execute the method for video decoding described in any embodiment of the present application.

[0024] It can be seen from the above scheme that the storage requirements for motion data to be stored in a row buffer (also called a motion data row buffer) can be reduced in an embodiment of the present invention, especially for blocks at the top of a CTU, such as at the upper boundary of a CTU, affine merging can be skipped to avoid additional motion data storage in the row buffer, thereby reducing the row buffer size and saving costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Further features, properties and various advantages of the subject matter of the present application will become more apparent from the following detailed description and accompanying drawings, in which:

[0026] Figure 1 Schematic diagram of the current block and its surrounding spatial merging candidates in an example.

[0027] Figure 2 A schematic diagram showing a simplified block diagram of a communication system according to one embodiment.

[0028] Figure 3 A schematic diagram showing a simplified block diagram of a communication system according to another embodiment.

[0029] Figure 4 A schematic diagram showing a simplified block diagram of a decoder according to one embodiment.

[0030] Figure 5 A schematic diagram showing a simplified block diagram of an encoder according to another embodiment.

[0031] Figure 6 A block diagram of an encoder according to yet another embodiment is shown.

[0032] Figure 7 A block diagram of a decoder according to yet another embodiment is shown.

[0033] Figure 8 Examples of spatial and temporal candidates are shown in some examples.

[0034] Fig. 9 An example of a block with an affine model is shown.

[0035] Fig.10 Examples of affine transformations are shown in some examples.

[0036] Fig.11 A diagram showing a current block and two control points CP0 and CP1 of the current block according to some embodiments of the present application.

[0037] Fig.12 A diagram showing motion vector prediction in affine mode according to an embodiment of the present application.

[0038] Fig.13Another schematic diagram of motion vector prediction in affine mode according to an embodiment of the present application is shown.

[0039] Fig.14A and 14B Candidate positions for the composite merge mode are shown.

[0040] Fig.15 A diagram is shown for deriving control point motion information from regular motion information according to an embodiment of the present application.

[0041] Fig.16 A diagram is shown for explaining model-based affine merge candidate derivation with reduced row buffer according to an embodiment of the present application.

[0042] Fig.17A A flowchart of an overview process according to an embodiment of the present application is shown.

[0043] FIG. 17B to FIG. 17E Several exemplary structural diagrams of devices for video decoding according to several embodiments of the present application are shown.

[0044] Fig.18 is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION

[0045] Various MV prediction mechanisms are described in H.265 / HEVC (ITU-T H.265 Recommendation, "High Efficiency Video Coding", December 2016). Among the various MV prediction mechanisms provided by H.265, this application describes a technique referred to below as "spatial merging".

[0046] Please refer to Figure 1 , the current block (101) includes samples that have been discovered by the encoder during the motion search process, and the samples can be predicted based on the previous block of the same size that has generated a spatial offset. In addition, the MV can be derived from metadata associated with one or more reference pictures instead of encoding the MV directly. For example, the MV is derived from the metadata of the nearest reference picture (in decoding order) using the MV associated with any of the five surrounding samples A0, A1 and B0, B1, B2 (corresponding to 102 to 106 respectively). In H.265, MV prediction can use the prediction value of the same reference picture that the neighboring blocks are also using.

[0047] Figure 22 is a simplified block diagram of a communication system (200) according to an embodiment disclosed in the present application. The communication system (200) includes a plurality of terminal devices, which can communicate with each other through, for example, a network (250). For example, the communication system (200) includes a first terminal device (210) and a second terminal device (220) interconnected through the network (250). Figure 2 In an embodiment of the present invention, the first terminal device (210) and the second terminal device (220) perform unidirectional data transmission. For example, the first terminal device (210) may encode video data (e.g., a video picture stream collected by the terminal device (210)) for transmission to the second terminal device (220) via the network (250). The encoded video data is transmitted in the form of one or more encoded video code streams. The second terminal device (220) may receive the encoded video data from the network (250), decode the encoded video data to restore the video data, and display the video picture based on the restored video data. Unidirectional data transmission is more common in applications such as media services.

[0048] In another embodiment, the communication system (200) includes a third terminal device (230) and a fourth terminal device (240) that perform bidirectional transmission of encoded video data, which can occur, for example, during a video conference. For bidirectional data transmission, each of the third terminal device (230) and the fourth terminal device (240) can encode video data (e.g., a video picture stream collected by the terminal device) to transmit to the other terminal device of the third terminal device (230) and the fourth terminal device (240) through a network (250). Each of the third terminal device (230) and the fourth terminal device (240) can also receive the encoded video data transmitted by the other terminal device of the third terminal device (230) and the fourth terminal device (240), and can decode the encoded video data to restore the video data, and can display the video picture on an accessible display device based on the restored video data.

[0049] exist Figure 2In the embodiment of the present invention, the first terminal device (210), the second terminal device (220), the third terminal device (230) and the fourth terminal device (240) may be servers, personal computers and smart phones, but the principles disclosed in the present application may not be limited thereto. The embodiments disclosed in the present application are applicable to laptop computers, tablet computers, media players and / or dedicated video conferencing equipment. The network (250) represents any number of networks that transmit encoded video data between the first terminal device (210), the second terminal device (220), the third terminal device (230) and the fourth terminal device (240), including, for example, wired (wired) and / or wireless communication networks. The communication network (250) may exchange data in circuit switching and / or packet switching channels. The network may include a telecommunications network, a local area network, a wide area network and / or the Internet. For the purpose of the present application, unless explained below, the architecture and topology of the network (250) may be irrelevant to the operation disclosed in the present application.

[0050] As an example, Figure 3 The video encoder and video decoder are shown in a streaming environment. The subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, video conferencing, digital TV, storing compressed video on digital media including CDs, DVDs, memory sticks, etc.

[0051] The streaming system may include an acquisition subsystem (313), which may include a video source (301) such as a digital camera, which creates an uncompressed video picture stream (302). In an embodiment, the video picture stream (302) includes samples taken by a digital camera. Compared to the encoded video data (304) (or the encoded video bitstream), the video picture stream (302) is depicted as a thick line to emphasize the high data volume of the video picture stream, and the video picture stream (302) can be processed by an electronic device (320), which includes a video encoder (303) coupled to the video source (301). The video encoder (303) may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in more detail below. Compared to the video picture stream (302), the encoded video data (304) (or the encoded video bitstream (304)) is depicted as a thin line to emphasize the lower amount of data of the encoded video data (304) (or the encoded video bitstream (304)), which can be stored on the streaming server (305) for future use. One or more streaming client subsystems, such as Figure 3The client subsystem (306) and the client subsystem (308) in the video transmission system can access the streaming server (305) to retrieve the copy (307) and the copy (309) of the encoded video data (304). The client subsystem (306) may include, for example, a video decoder (310) in the electronic device (330). The video decoder (310) decodes the incoming copy (307) of the encoded video data and generates an output video picture stream (311) that can be presented on a display (312) (e.g., a display screen) or another presentation device (not depicted). In some streaming transmission systems, the encoded video data (304), the video data (307), and the video data (309) (e.g., a video bitstream) can be encoded according to certain video encoding / compression standards. Examples of these standards include ITU-T H.265. In an embodiment, the video coding standard under development is informally referred to as Versatile Video Coding (VVC), and the present application can be used in the context of the VVC standard.

[0052] It should be noted that the electronic device (320) and the electronic device (330) may include other components (not shown). For example, the electronic device (320) may include a video decoder (not shown), and the electronic device (330) may also include a video encoder (not shown).

[0053] Figure 4 4 is a block diagram of a video decoder (410) according to an embodiment disclosed in the present application. The video decoder (410) may be provided in an electronic device (430). The electronic device (430) may include a receiver (431) (e.g., a receiving circuit). The video decoder (410) may be used to replace Figure 3 A video decoder (310) of an embodiment.

[0054] The receiver (431) may receive one or more encoded video sequences to be decoded by the video decoder (410); in the same or another embodiment, one encoded video sequence is received at a time, wherein the decoding of each encoded video sequence is independent of the other encoded video sequences. The encoded video sequence may be received from a channel (401), which may be a hardware / software link to a storage device storing the encoded video data. The receiver (431) may receive the encoded video data as well as other data, such as encoded audio data and / or auxiliary data streams that may be forwarded to their respective consuming entities (not shown). The receiver (431) may separate the encoded video sequence from the other data. To prevent network jitter, a buffer memory (415) may be coupled between the receiver (431) and the entropy decoder / parser (420) (hereinafter referred to as "parser (420)"). In some applications, the buffer memory (415) is part of the video decoder (410). In other cases, the buffer memory (415) may be provided external to the video decoder (410) (not shown). In other cases, a buffer memory (not shown) is provided outside the video decoder (410) to prevent network jitter, for example, and another buffer memory (415) may be configured inside the video decoder (410) to handle broadcast timing, for example. When the receiver (431) receives data from a storage / forward device with sufficient bandwidth and controllability or from an isochronous network, it may not be necessary to configure the buffer memory (415), or the buffer memory may be made smaller. Of course, in order to use on a service packet network such as the Internet, a buffer memory (415) may also be required, and the buffer memory may be relatively large and have an adaptive size, and may be at least partially implemented in an operating system or a similar element (not shown) outside the video decoder (410).

[0055] The video decoder (410) may include a parser (420) to reconstruct symbols (421) from the encoded video sequence. The types of symbols include information used to manage the operation of the video decoder (410) and potential information used to control a display device such as a display device (412) (e.g., a display screen) that is not part of the electronic device (430) but can be coupled to the electronic device (430), such as Figure 4As shown in . The control information for the display device may be a parameter set fragment (not indicated) of Supplemental Enhancement Information (SEI message) or Video Usability Information (VUI). The parser (420) may parse / entropy decode the received coded video sequence. The encoding of the coded video sequence may be performed according to a video coding technique or standard, and may follow various principles, including variable length coding, Huffman Coding, arithmetic coding with or without context sensitivity, and the like. The parser (420) may extract a subgroup parameter set of at least one subgroup of the subgroups of pixels in the video decoder from the coded video sequence based on at least one parameter corresponding to the group. The subgroup may include a Group of Pictures (GOP), a picture, a tile, a slice, a macroblock, a Coding Unit (CU), a block, a Transform Unit (TU), a Prediction Unit (PU), and the like. The parser (420) may also extract information from the encoded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, and so on.

[0056] The parser (420) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (415), thereby creating symbols (421).

[0057] Depending on the type of coded video picture or portion of coded video picture (e.g., inter- and intra-pictures, inter- and intra-blocks) and other factors, the reconstruction of the symbol (421) may involve multiple different units. Which units are involved and how they are involved may be controlled by subgroup control information parsed by the parser (420) from the coded video sequence. For the sake of brevity, such subgroup control information flow between the parser (420) and the multiple units below is not described.

[0058] In addition to the functional blocks already mentioned, the video decoder (410) can be conceptually subdivided into several functional units as described below. In a practical embodiment operating under commercial constraints, many of these units interact closely with each other and can be integrated with each other. However, for the purpose of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.

[0059] The first unit is a sealer / inverse transform unit (451). The sealer / inverse transform unit (451) receives quantized transform coefficients as symbols (421) from the parser (420) and control information, including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The sealer / inverse transform unit (451) can output a block including sample values, which can be input into an aggregator (455).

[0060] In some cases, the output samples of the scaler / inverse transform unit (451) may belong to an intra-coded block; that is, a block that does not use predictive information from a previously reconstructed picture, but may use predictive information from a previously reconstructed portion of the current picture. Such predictive information may be provided by an intra-picture prediction unit (452). In some cases, the intra-picture prediction unit (452) generates surrounding blocks of the same size and shape as the block being reconstructed using reconstructed information extracted from a current picture buffer (458). For example, the current picture buffer (458) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (455) adds the prediction information generated by the intra-prediction unit (452) to the output sample information provided by the scaler / inverse transform unit (451) on a per-sample basis.

[0061] In other cases, the output samples of the scaler / inverse transform unit (451) may belong to an inter-frame coded and potentially motion compensated block. In this case, the motion compensated prediction unit (453) may access the reference picture memory (457) to extract samples for prediction. After the extracted samples are motion compensated according to the symbols (421), these samples may be added to the output of the scaler / inverse transform unit (451) (in this case referred to as residual samples or residual signals) by the aggregator (455) to generate output sample information. The acquisition of the predicted samples by the motion compensated prediction unit (453) from the address in the reference picture memory (457) may be controlled by a motion vector, and the motion vector is provided to the motion compensated prediction unit (453) in the form of the symbols (421), for example, including X, Y and reference picture components. Motion compensation may also include interpolation of sample values ​​extracted from the reference picture memory (457) when using sub-sample accurate motion vectors, motion vector prediction mechanisms, and the like.

[0062] The output samples of the aggregator (455) may be employed by various loop filtering techniques in a loop filter unit (456). The video compression techniques may include in-loop filter techniques controlled by parameters included in the encoded video sequence (also referred to as the encoded video bitstream) and available to the loop filter unit (456) as symbols (421) from the parser (420). However, in other embodiments, the video compression techniques may also be responsive to meta-information obtained during decoding of a previous (in decoding order) portion of an encoded picture or encoded video sequence, as well as to previously reconstructed and loop filtered sample values.

[0063] The output of the loop filter unit (456) may be a sample stream that may be output to a display device (412) and stored in a reference picture memory (457) for subsequent inter-picture prediction.

[0064] Once fully reconstructed, certain coded pictures may be used as reference pictures for future prediction. For example, once the coded picture corresponding to the current picture is fully reconstructed, and the coded picture is identified as a reference picture (e.g., by the parser (420)), the current picture buffer (458) may become part of the reference picture memory (457), and a new current picture buffer may be reallocated before starting to reconstruct a subsequent coded picture.

[0065] The video decoder (410) may perform decoding operations according to a predetermined video compression technique, such as in the ITU-T H.265 standard. The encoded video sequence may conform to the syntax specified by the video compression technique or standard used in the sense that the encoded video sequence follows the syntax of the video compression technique or standard and the profile recorded in the video compression technique or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technique or standard as the only tools available for use under the profile. For compliance, the complexity of the encoded video sequence is also required to be within the range defined by the hierarchy of the video compression technique or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sampling rate (measured in, for example, mega samples per second), the maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further limited by the Hypothetical Reference Decoder (HRD) specification and metadata of the HRD buffer management signaled in the encoded video sequence.

[0066] In an embodiment, the receiver (431) may receive additional (redundant) data along with the encoded video. The additional data may be part of the encoded video sequence. The additional data may be used by the video decoder (410) to properly decode the data and / or more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.

[0067] Figure 5 1 is a block diagram of a video encoder (503) according to an embodiment disclosed in the present application. The video encoder (503) is provided in an electronic device (520). The electronic device (520) includes a transmitter (540) (e.g., a transmission circuit). The video encoder (503) can be used to replace Figure 3 A video encoder (303) in an embodiment.

[0068] The video encoder (503) can be used to obtain the video source (501) (not Figure 5 In another embodiment, the video source (501) is a part of the electronic device (520) to receive video samples, and the video source can collect video images to be encoded by the video encoder (503). In another embodiment, the video source (501) is a part of the electronic device (520).

[0069] The video source (501) may provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (503), wherein the digital video sample stream may have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 Y CrCB, RGB, ...), and any suitable sampling structure (e.g., Y CrCb 4:2:0, Y CrCb 4:4:4). In a media service system, the video source (501) may be a storage device storing previously prepared videos. In a video conferencing system, the video source (501) may be a camera that captures local image information as a video sequence. The video data may be provided as a plurality of separate pictures that are given motion when viewed sequentially. The pictures themselves may be constructed as a spatial pixel array, wherein each pixel may include one or more samples depending on the sampling structure, color space, etc. used. The relationship between pixels and samples may be easily understood by those skilled in the art. The following description focuses on the samples.

[0070] According to an embodiment, the video encoder (503) may encode and compress pictures of a source video sequence into an encoded video sequence (543) in real time or under any other time constraints required by the application. Implementing an appropriate encoding speed is a function of the controller (550). In some embodiments, the controller (550) controls other functional units as described below and is functionally coupled to these units. For the sake of brevity, coupling is not indicated in the figure. The parameters set by the controller (550) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization technology, etc.), picture size, picture group (Group of Pictures, GOP) layout, maximum motion vector search range, etc. The controller (550) can be used to have other suitable functions that are related to the video encoder (503) optimized for a certain system design.

[0071] In some embodiments, the video encoder (503) operates in a coding loop. As a simple description, in embodiments, the coding loop may include a source encoder (530) (e.g., responsible for creating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture) and a (local) decoder (533) embedded in the video encoder (503). The decoder (533) reconstructs the symbols to create sample data in a manner similar to how the (remote) decoder creates sample data (because in the video compression technology considered in this application, any compression between the symbols and the encoded video code stream is lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (534). Since the decoding of the symbol stream produces bit-accurate results that are independent of the decoder location (local or remote), the contents of the reference picture memory (534) are also bit-accurate between the local encoder and the remote encoder. In other words, the reference picture samples "seen" by the prediction part of the encoder are exactly the same as the sample values ​​that the decoder will "see" when using the prediction during decoding. This basic principle of reference picture synchronization (and the drift that occurs when synchronization cannot be maintained, eg due to channel errors) is also used in some related techniques.

[0072] The operation of the "local" decoder (533) may be combined with, for example, Figure 4 The "remote" decoder described in detail for the video decoder (410) is identical. However, additional brief reference is made to Figure 4 , when symbols are available and the entropy encoder (545) and parser (420) are capable of losslessly encoding / decoding the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (410), including the buffer memory (415) and the parser (420), may not be fully implemented in the local decoder (533).

[0073] At this point, it can be observed that any decoder technology other than the parsing / entropy decoding present in the decoder must also be present in the corresponding encoder in substantially the same functional form. For this reason, the present application focuses on decoder operation. The description of encoder technology can be simplified because encoder technology is mutually inverse to the decoder technology described comprehensively. A more detailed description is only needed in certain areas and is provided below.

[0074] During operation, in some embodiments, the source encoder (530) may perform motion compensated predictive coding. The motion compensated predictive coding predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures." In this manner, the encoding engine (532) encodes the differences between pixel blocks of the input picture and pixel blocks of a reference picture that may be selected as a prediction reference for the input picture.

[0075] The local video decoder (533) may decode the encoded video data of the picture that may be designated as the reference picture based on the symbol created by the source encoder (530). The operation of the encoding engine (532) may be a lossy process. When the encoded video data is available at the video decoder ( Figure 5 When the video sequence is decoded at a remote location (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (533) replicates the decoding process that may be performed by the video decoder on the reference picture and may cause the reconstructed reference picture to be stored in the reference picture cache (534). In this way, the video encoder (503) may locally store a copy of the reconstructed reference picture that has common content (absent transmission errors) with the reconstructed reference picture to be obtained by the remote video decoder.

[0076] The predictor (535) may perform a prediction search for the encoding engine (532). That is, for a new picture to be encoded, the predictor (535) may search the reference picture memory (534) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that may serve as appropriate prediction references for the new picture. The predictor (535) may operate pixel-by-pixel based on sample blocks to find a suitable prediction reference. In some cases, based on the search results obtained by the predictor (535), it may be determined that the input picture may have prediction references taken from a plurality of reference pictures stored in the reference picture memory (534).

[0077] The controller (550) may manage encoding operations of the source encoder (530), including, for example, setting parameters and subgroup parameters for encoding video data.

[0078] The outputs of all the above functional units may be entropy encoded in an entropy encoder (545). The entropy encoder (545) performs lossless compression on the symbols generated by the various functional units according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc., thereby transforming the symbols into a coded video sequence.

[0079] The transmitter (540) may buffer the encoded video sequence created by the entropy encoder (545) in preparation for transmission over a communication channel (560), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (540) may combine the encoded video data from the video encoder (503) with other data to be transmitted, such as encoded audio data and / or ancillary data streams (source not shown).

[0080] The controller (550) may manage the operation of the video encoder (503). During encoding, the controller (550) may assign a certain coded picture type to each coded picture, but this may affect the coding techniques that can be applied to the corresponding picture. For example, a picture may generally be assigned to any of the following picture types:

[0081] An intra picture (I picture) may be a picture that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those skilled in the art are aware of the variations of I pictures and their corresponding applications and features.

[0082] A predictive picture (P picture) may be a picture that can be encoded and decoded using intra prediction or inter prediction, which uses at most one motion vector and a reference index to predict sample values ​​for each block.

[0083] Bidirectional predictive pictures (B pictures), which can be pictures that can be encoded and decoded using intra prediction or inter prediction, which uses up to two motion vectors and reference indices to predict the sample values ​​of each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstruction of a single block.

[0084] The source picture may typically be spatially subdivided into blocks of samples (e.g., blocks of 4×4, 8×8, 4×8, or 16×16 samples), and coded block by block. These blocks may be predictively coded with reference to other (already coded) blocks, which are determined according to the coding allocation applied to the block's corresponding picture. For example, blocks of an I picture may be non-predictively coded, or the blocks may be predictively coded (spatial prediction or intra prediction) with reference to already coded blocks of the same picture. Blocks of pixels of a P picture may be predictively coded by spatial prediction with reference to one previously coded reference picture or by temporal prediction. Blocks of a B picture may be predictively coded by spatial prediction with reference to one or two previously coded reference pictures or by temporal prediction.

[0085] The video encoder (503) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T H.265 Recommendation. In operation, the video encoder (503) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in an input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.

[0086] In an embodiment, the transmitter (540) may transmit additional data when transmitting the encoded video. The source encoder (530) may include such data as part of the encoded video sequence. The additional data may include other forms of redundant data such as temporal / spatial / SNR enhancement layers, redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.

[0087] The captured video may be taken as a plurality of source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often simplified to intra-prediction) exploits spatial correlations in a given picture, while inter-picture prediction exploits (temporal or other) correlations between pictures. In an embodiment, a particular picture being encoded / decoded is divided into blocks, and the particular picture being encoded / decoded is referred to as the current picture. When a block in the current picture is similar to a reference block in a reference picture that was previously encoded in the video and is still buffered, the block in the current picture may be encoded by a vector called a motion vector. The motion vector points to a reference block in a reference picture, and in the case where multiple reference pictures are used, the motion vector may have a third dimension that identifies the reference picture.

[0088] In some embodiments, bidirectional prediction techniques may be used in inter-picture prediction. According to the bidirectional prediction technique, two reference pictures are used, for example, a first reference picture and a second reference picture that are both before the current picture in the video in decoding order (but may be in the past and future in display order, respectively). A block in the current picture may be encoded by a first motion vector pointing to a first reference block in the first reference picture and a second motion vector pointing to a second reference block in the second reference picture. Specifically, the block may be predicted by a combination of the first reference block and the second reference block.

[0089] In addition, merge mode technology can be used in inter-picture prediction to improve coding efficiency.

[0090] According to some embodiments disclosed in the present application, predictions such as inter-picture prediction and intra-picture prediction are performed in units of blocks. For example, according to the HEVC standard, pictures in a video picture sequence are divided into coding tree units (CodingTree Unit, CTU) for compression, and the CTUs in the pictures have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU includes three coding tree blocks (Coding Tree Block, CTB), and the three coding tree blocks are a luminance CTB and two chrominance CTBs. Furthermore, each CTU can be split into one or more coding units (Coding Unit, CU) by a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or four 32×32 pixel CUs, or sixteen 16×16 pixel CUs. In an embodiment, each CU is analyzed to determine the prediction type for the CU, such as an inter-frame prediction type or an intra-frame prediction type. In addition, depending on temporal and / or spatial predictability, the CU is split into one or more prediction units (PUs). Typically, each PU includes a luminance prediction block (PB) and two chrominance PBs. In an embodiment, the prediction operation in encoding (encoding / decoding) is performed in units of prediction blocks. Taking the luminance prediction block as an example of a prediction block, the prediction block includes a matrix of pixel values ​​(e.g., luminance values), such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, and the like.

[0091] Figure 6 1 is a diagram of a video encoder (603) according to another embodiment disclosed in the present application. The video encoder (603) is used to receive a processed block (e.g., a prediction block) of sample values ​​in a current video picture in a video picture sequence, and encode the processed block into an encoded picture that is part of an encoded video sequence. In this embodiment, the video encoder (603) is used to replace Figure 3A video encoder (303) in an embodiment.

[0092] In an HEVC embodiment, a video encoder (603) receives a matrix of sample values ​​for a processing block, such as a prediction block of 8×8 samples. The video encoder (603) uses, for example, rate-distortion (RD) optimization to determine whether to use intra mode, inter mode, or bidirectional prediction mode to encode the processing block. When encoding the processing block in intra mode, the video encoder (603) may use intra prediction techniques to encode the processing block into an encoded picture; and when encoding the processing block in inter mode or bidirectional prediction mode, the video encoder (603) may use inter prediction or bidirectional prediction techniques to encode the processing block into an encoded picture, respectively. In some video encoding techniques, the merge mode may be an inter-picture prediction submode, in which a motion vector is derived from one or more motion vector predictors without the aid of an encoded motion vector component external to the predictor. In some other video encoding techniques, there may be a motion vector component applicable to the subject block. In an embodiment, the video encoder (603) includes other components, such as a mode decision module (not shown) for determining the processing block mode.

[0093] exist Figure 6 In an embodiment of the present invention, the video encoder (603) includes: Figure 6 Shown are an inter-frame encoder (630), an intra-frame encoder (622), a residual calculator (623), a switch (626), a residual encoder (624), a common controller (621), and an entropy encoder (625) coupled together.

[0094] The inter-frame encoder (630) is used to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture), generate inter-frame prediction information (e.g., redundant information description according to an inter-frame coding technique, motion vectors, merge mode information), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technique. In some embodiments, the reference picture is a decoded reference picture decoded based on the encoded video information.

[0095] The intra-frame encoder (622) is used to receive samples of a current block (e.g., a processing block), compare the block with an encoded block in the same picture in some cases, generate quantization coefficients after transformation, and in some cases also generate intra-frame prediction information (e.g., intra-frame prediction direction information according to one or more intra-frame coding techniques). In an embodiment, the intra-frame encoder (622) also calculates an intra-frame prediction result (e.g., a predicted block) based on the intra-frame prediction information and a reference block in the same picture.

[0096] The general controller (621) is used to determine the general control data and control other components of the video encoder (603) based on the general control data. In an embodiment, the general controller (621) determines the mode of the block and provides a control signal to the switch (626) based on the mode. For example, when the mode is intra mode, the general controller (621) controls the switch (626) to select the intra mode result for use by the residual calculator (623) and controls the entropy encoder (625) to select the intra prediction information and add the intra prediction information to the bitstream; and when the mode is inter mode, the general controller (621) controls the switch (626) to select the inter prediction result for use by the residual calculator (623) and controls the entropy encoder (625) to select the inter prediction information and add the inter prediction information to the bitstream.

[0097] The residual calculator (623) is used to calculate the difference (residual data) between the received block and the prediction result selected from the intra-frame encoder (622) or the inter-frame encoder (630). The residual encoder (624) is used to operate based on the residual data to encode the residual data to generate a transform coefficient. In an embodiment, the residual encoder (624) is used to transform the residual data from the time domain to the frequency domain and generate a transform coefficient. The transform coefficient is then processed by quantization to obtain a quantized transform coefficient. In various embodiments, the video encoder (603) also includes a residual decoder (628). The residual decoder (628) is used to perform an inverse transform and generate decoded residual data. The decoded residual data can be used appropriately by the intra-frame encoder (622) and the inter-frame encoder (630). For example, the inter-frame encoder (630) can generate a decoded block based on the decoded residual data and the inter-frame prediction information, and the intra-frame encoder (622) can generate a decoded block based on the decoded residual data and the intra-frame prediction information. The decoded blocks are appropriately processed to generate a decoded picture, and in some embodiments, the decoded picture may be buffered in a memory circuit (not shown) and used as a reference picture.

[0098] The entropy encoder (625) is used to format the code stream to produce an encoded block. The entropy encoder (625) generates various information according to a suitable standard such as the HEVC standard. In an embodiment, the entropy encoder (625) is used to obtain general control data, selected prediction information (such as intra-frame prediction information or inter-frame prediction information), residual information, and other suitable information in the code stream. It should be noted that according to the disclosed subject matter, when the block is encoded in the inter-frame mode or the merge sub-mode of the bidirectional prediction mode, there is no residual information.

[0099] Figure 7FIG. 7 is a diagram of a video decoder (710) according to another embodiment disclosed in the present application. The video decoder (710) is used to receive an encoded image as part of an encoded video sequence and decode the encoded image to generate a reconstructed picture. In an embodiment, the video decoder (710) is used to replace Figure 3 A video decoder (310) of an embodiment.

[0100] exist Figure 7 In an embodiment, the video decoder (710) includes Figure 7 An entropy decoder (771), an inter-frame decoder (780), a residual decoder (773), a reconstruction module (774) and an intra-frame decoder (772) coupled together are shown in FIG.

[0101] The entropy decoder (771) may be used to reconstruct certain symbols from the encoded picture, which represent syntax elements constituting the encoded picture. Such symbols may include, for example, a mode for encoding the block (e.g., intra mode, inter mode, bidirectional prediction mode, a merged sub-mode of the latter two, or another sub-mode), prediction information (e.g., intra prediction information or inter prediction information) that may identify certain samples or metadata for prediction by the intra decoder (772) or the inter decoder (780), respectively, residual information in the form of, for example, quantized transform coefficients, and the like. In an embodiment, when the prediction mode is inter or bidirectional prediction mode, the inter prediction information is provided to the inter decoder (780); and when the prediction type is an intra prediction type, the intra prediction information is provided to the intra decoder (772). The residual information may be inverse quantized and provided to the residual decoder (773).

[0102] The inter-frame decoder (780) is used for receiving the inter-frame prediction information and generating an inter-frame prediction result based on the inter-frame prediction information.

[0103] The intra-frame decoder (772) is used to receive intra-frame prediction information and generate a prediction result based on the intra-frame prediction information.

[0104] The residual decoder (773) is used to perform inverse quantization to extract dequantized transform coefficients, and process the dequantized transform coefficients to transform the residual from the frequency domain to the spatial domain. The residual decoder (773) may also require some control information (to obtain the quantizer parameter QP), and this information can be provided by the entropy decoder (771) (the data path is not indicated because this is only low-volume control information).

[0105] The reconstruction module (774) is used to combine the residual output by the residual decoder (773) with the prediction result (which can be output by the inter-frame prediction module or the intra-frame prediction module) in the spatial domain to form a reconstructed block, which can be part of a reconstructed picture, which in turn can be part of a reconstructed video. It should be noted that other suitable operations such as deblocking operations can be performed to improve visual quality.

[0106] It should be noted that the video encoder (303), video encoder (503) and video encoder (603) and video decoder (310), video decoder (410) and video decoder (710) may be implemented using any suitable technology. In an embodiment, the video encoder (303), video encoder (503) and video encoder (603) and video decoder (310), video decoder (410) and video decoder (710) may be implemented using one or more integrated circuits. In another embodiment, the video encoder (303), video encoder (503) and video encoder (603) and video decoder (310), video decoder (410) and video decoder (710) may be implemented using one or more processors that execute software instructions.

[0107] The present application provides techniques for affine model prediction in video coding (encoding / decoding) from different aspects.

[0108] Typically, the motion vector of a block can be encoded in an explicit way to signal the difference to a motion vector predictor (e.g., Advanced Motion Vector Prediction or AMVP mode); or in an implicit way to indicate completely from a previously encoded or generated motion vector. The latter is called merge mode and means that the current block is merged into the previously encoded block by using the motion information of the current block.

[0109] During decoding, both AMVP mode and Merge mode build candidate lists.

[0110] Figure 8 Examples of spatial and temporal candidates are shown in some examples.

[0111] For the merge mode in inter prediction, the merge candidates in the candidate list are mainly formed by checking the motion information from the spatial or temporal neighboring blocks of the current block. Figure 8 In the example of , candidate blocks A1, B1, B0, A0 and B2 are checked in turn. When any candidate block is a valid candidate block, for example, encoded with a motion vector, the motion information of the valid candidate block can be added to the merge candidate list. Some pruning operations are performed to ensure that duplicate candidates are not put into the list again. Candidate blocks A1, B1, B0, A0 and B2 are adjacent to the corners of the current block and are called corner candidates.

[0112] After the spatial candidates, the temporal candidates are also checked into the list. In some examples, the common position block of the current block in the specified reference picture is found. The motion information at the C0 position of the common position block (the lower right corner of the current block) will be used as the temporal merge candidate. If the block at this position is not encoded in inter-frame mode or is not available, the C1 position (at the lower right corner of the center of the common position block) will be used instead. The present application provides techniques to further improve the merge mode.

[0113] According to one embodiment of the present application, affine motion compensation, for example, by describing a six-parameter (or simplified four-parameter) affine model for a coding block, can effectively predict the motion information of samples within the current block. More specifically, in an affine-coded or described coding block, different parts of a sample may have different motion vectors. The basic unit with a motion vector in an affine-coded or described block is called a sub-block. The size of a sub-block can be as small as only 1 sample; it can also be as large as the size of the current block.

[0114] When determining the affine mode, for each sample in the current block, its motion vector (relative to the target reference picture) can be derived using such a model (e.g., a six-parameter affine model or a four-parameter affine model). In order to reduce the implementation complexity, affine motion compensation is performed on a sub-block basis rather than a sample basis. This means that each sub-block will derive its motion vector, and the motion vector is the same for the samples in each sub-block. It is assumed that a specific position of each sub-block (such as the upper left corner or center point of the sub-block) is a representative position. In the example, such a sub-block size contains 4×4 samples.

[0115] Generally speaking, the affine model has six parameters to describe the motion information of the block. After the affine transformation, the rectangular block will become a parallelogram. In one example, the six parameters of the affine coded block can be represented by three motion vectors located at three different positions of the block.

[0116] Fig. 9 An example of a block (900) with an affine model is shown. The block (900) uses motion vectors at three angular positions A, B and C and to describe the motion information for the affine model of block (900). These locations A, B and C are called control points.

[0117] In a simplified example, the affine model uses four parameters to describe the motion information of a block based on the assumption that the shape of the block remains unchanged after an affine transformation. Therefore, a rectangular block will remain rectangular and have the same aspect ratio (e.g., height / width) after the transformation. The affine model of such a block can be represented by two motion vectors at two different positions, such as at corner positions A and B.

[0118] Fig.10 Examples of affine transformations of a six-parameter affine mode (using a six-parameter affine model) and a four-parameter affine mode (using a four-parameter affine model) are shown.

[0119] According to an embodiment of the present application, when affine motion compensation is used, two signaling techniques may be used: the first signaling technique is used for merge mode, and the second signaling technique is used for residual mode or advanced motion vector prediction (AMVP) mode.

[0120] In merge mode, the affine information of the current block is predicted from the previous affine coded block. Various techniques can be used to predict the affine information. In a first embodiment, it is assumed that the reference block and the current block are the same affine object, so that the motion vector (MV) at the control point of the current block can be derived from the model of the reference block (e.g., the corresponding point of the reference block). Further, the MV at other positions of the current block is linearly modified in the same way as from one control point to another in the reference block. The technique used in the first embodiment is called model-based affine prediction.

[0121] In a second embodiment, the motion vectors of the neighboring blocks are used directly as motion vectors at the control points of the current block. The motion vectors for the rest of the block are then generated using information from the control points. The technique used in the second embodiment is called affine prediction based on control points.

[0122] In the merge mode, in either of the first embodiment and the second embodiment, the residual component of the MV at the current block is not signaled. The residual component of the MV is assumed to be zero.

[0123] In residual mode (or AMVP mode), the affine parameters or the MV at the control point of the current block can be predicted. In an embodiment, because there is more than one motion vector to be predicted, the candidate list of motion vectors at all control points is organized in a grouped manner so that each candidate in the candidate list includes a set of motion vector predictors for all control points. For example, candidate 1 = {predictor 1A for control point A, predictor 1B for control point B, predictor 1C for control point C}; candidate 2 = {predictor 2A for control point A, predictor 2B for control point B, predictor 2C for control point C}, etc. The predictors for the same control point in different candidates (e.g., predictor 1A and predictor 2A) can be the same or different. The motion vector prediction flag (mvp_l0_flag for list 0 or mvp_l1_flag for list 1) will be used to indicate which candidate is selected from the list. After prediction, the residual part of the parameters (e.g., the difference between the parameters and the parameters predicted by the predictor), or the difference between the MV at the control point (e.g., the difference between the MV and the MV predicted by the MV predictor) will be signaled. The MV predictor at each control point can also come from a model-based affine prediction of one of its neighbors, using the techniques described in the above description for the (affine) merge mode.

[0124] In some embodiments, for a block encoded in an affine mode, once the parameters of the affine model are determined, for example, the MV at the control point is determined, the MV at the remaining positions of the block can be calculated using the affine model.

[0125] For example, a pixel correspondence between a position (x, y) in the current block and a corresponding position (x', y') in the reference picture is shown in (Formula 1) using a four-parameter affine model. In (Formula 1), ρ is a scale factor for scaling, θ is an angle factor for rotation, and (c, f) is a motion vector describing translational motion.

[0126] The four parameters are ρ, θ, c and f.

[0127]

[0128] In an embodiment, for any position (x, y) in the current block, its motion vector pointing to the reference picture can be determined by using (Formula 1) to obtain the corresponding position (x', y') of the corresponding pixel in the reference picture. In this embodiment, the motion vector MV0 for the position (x, y) will be MV0 = (x'-x, y'-y). In the example, affine compensation is performed by dividing the entire block (current block) into an array of minimum units. Pixels within a unit (e.g., minimum unit) share the same motion vector. The position of each unit (e.g., minimum unit) is determined by using a selected position (representing position) in the unit such as the upper left corner pixel, the center of the unit, etc. The size of the minimum unit for affine compensation can be 1 pixel, 4×4 pixels, M×N pixels, M and N are positive integers, etc.

[0129] In some examples, the current block is divided into sub-blocks. In the sub-block, a position is selected, and the motion vector for the selected position is called the motion vector field (MVF) of the sub-block. In the example, the sub-block is the minimum unit for affine compensation. The MVF of the sub-block can be determined based on the motion vector at the control point of the current block.

[0130] Fig.11 FIG. 1 shows a schematic diagram of a current block and two control points CP0 and CP1 of the current block according to some embodiments of the present application. Fig.11 In the example of , CP0 is a control point located at the upper left corner of the current block and has a motion vector V0 = (v 0x , v 0y ), and CP1 is the control point located at the upper right corner of the current block and has a motion vector V1=(v 1x , v 1y ).

[0131] exist Fig.11 In the example of , when the selected position for the sub-block is (x, y) ((x, y is the relative position of the upper left corner of the current block), then the MVF of the sub-block is V = (v x , v y ), and can be calculated using (Formula 2):

[0132]

[0133] Wherein w indicates the width and height of the current block (eg, the current block has a square shape).

[0134] It is worth noting that other suitable positions can also be selected as control points, and the derivation of the motion vector at any position within the current block can be similarly expressed as in (Formula 2). In the example, the bottom two corners are used as control points CP2 and CP3. CP2 is a control point located at the lower left corner of the current block and has a motion vector V2=(v 2x , v 2y ), CP3 is the control point located at the lower right corner of the current block and has a motion vector V3 = (v 3x , v 3y Then, the motion vector V at the position (x, y) ((x, y) is the relative position of the upper left corner of the current block) = (v x , v y ) can be calculated using (Formula 3):

[0135]

[0136] According to an embodiment of the present application, various techniques may be used to generate an affine predictor for the current block, using model-based affine prediction from multiple adjacent affine coded blocks, or using affine merging based on multiple control points from multiple adjacent MVs.

[0137] Fig.12 A schematic diagram of motion vector prediction in affine mode according to an embodiment of the present application is shown. Fig.12 Three corners that can be selected as control points CP0, CP1 and CP2 are shown. CP0 is the control point located at the top left corner of the current block and has a motion vector v 0 =(v 0x , v 0y ), CP1 is the control point located at the upper right corner of the current block and has a motion vector v 1 =(v 1x , v 1y ), and CP2 is the control point located at the lower left corner of the current block and has a motion vector v 2 =(v 2x , v 2y ).

[0138] In an embodiment, in the affine AMVP mode, a pair of control points {CP0, CP1} is used, and a candidate list of motion vector pairs having {CP0, CP1} is constructed using neighboring blocks. For example, the candidate list consists of {(v 0 , v 1 )|v 0 = {v B2 , v B3 , v A2},v 1 = {v B1 , vB0}} indicates. Fig.12 As shown, v 0 The motion vector from the neighboring block is selected from the motion vector of block B2, B3 or A2. The motion vector from the neighboring block is scaled according to the reference list and the relationship between the POC of the neighboring block's reference, the POC of the current CU's reference and the POC of the current CU. Similarly, v 1 The motion vectors of the neighboring blocks B1 and B0 are selected. In the example, if the number of candidates in the candidate list is less than 2, the candidate list is filled with motion vector pairs formed by copying each AMVP candidate. For example, in v 1 = {v B1 , v B0}, if v B0 is not available, then each CP1 in the {CP0, CP1} pair will use v B1 . In another example, when the number of candidates in the candidate list is greater than 2, the candidates are first sorted according to the consistency of adjacent motion vectors (e.g., the similarity of two motion vectors in a pair of candidates), and only the first two candidates are retained. In some examples, at the encoder side, a rate distortion (RD) cost check is used to determine which motion vector pair candidate is selected as the motion vector predictor (MVP) for the control point of the current block. Further, an index indicating the position of the selected MVP of the control point in the candidate list is signaled in the encoded video bitstream. After determining the MVP of the control point of the current affine block, affine motion estimation is applied and the motion vector of the control point is found. Then, the difference between the MV of the control point and the MVP of the control point is signaled in the encoded video bitstream.

[0139] It is worth noting that on the decoder side, the candidate list is constructed in a similar manner to that on the encoder side. Further, the decoder decodes the index indicating the position of the selected MVP of the control point in the candidate list from the encoded video bitstream, and decodes the difference between the MVP and the MV of the control point. Based on the MVP of the control point and the difference, the decoder determines the MV of the control point.

[0140] In another embodiment, a technique called model-based affine merging is used. For example, when an affine merge mode is applied in a block, candidate blocks from valid neighboring reconstructed blocks are checked to find blocks encoded using the affine mode. For example, the first block encoded using the affine mode is selected as a merge candidate.

[0141] The selection of the first block is performed according to the selection order. In the example, the selection order of the candidate blocks is from left, top, top right, bottom left to top left, such as in Fig.12 The order in the example is {A1, B1, B0, A0, B2}. It is worth noting that other suitable selection orders can also be used. For example, Fig.12 The left adjacent block A1 shown is encoded in affine mode. The left adjacent block A1 is located in the coding unit N1. Then, control points such as CP0 at the upper left corner, upper right corner and lower left corner of the coding unit N1 are derived. A1 、CP1 A1 、CP2 A1 Then, in the example, according to CP0 A1 、CP1 A1 and CP2 A1 The motion vector of the upper left control point (CP0) of the current CU (or current block) is calculated based on the motion vector of CP0. A1 、CP1 A1 and CP2 A1 The motion vector of the upper right control point (CP1) of the current CU (or current block) is calculated by using the motion vector of the upper right control point (CP1).

[0142] After deriving the MVs of the control points CP0 and CP1 of the current CU, according to the simplified affine motion model in the example, the MVF of the current CU can be calculated, for example, according to (Formula 2). In an embodiment, when at least one neighboring block in the current CU is encoded in affine mode, the encoder signals an affine flag in the encoded video stream to identify whether the current CU is encoded in affine merge mode. On the decoder side, the decoder can decode the affine flag from the encoded video stream and determine whether the current block is encoded in affine merge mode based on the affine flag.

[0143] Fig.13 Another schematic diagram of motion vector prediction in affine mode according to an embodiment of the present application is shown. Fig.13 In the example, the current block is at the upper boundary of the CTU. Therefore, some adjacent blocks (such as the adjacent blocks N2 and N3 above) are located in different CTUs. Fig.13 The neighboring block B2 shown is coded in affine mode and selected. The neighboring block B2 is located in the coding unit N2. Then, the CPs such as the upper left corner, the upper right corner and the lower left corner of the coding unit N2 are derived. B2 、CP1 B2 、CP2 B2 Then, in the example, according to CP0 B2 、CP1 B2 and CP2 B2 The motion vector of the upper left control point (CP0) of the current CU (or current block) is calculated based on the motion vector of CP0. B2 、CP1 B2 and CP2 B2 The motion vector of the upper right control point (CP1) of the current CU (or current block) is calculated by using the motion vector of the upper right control point (CP1).

[0144] In some examples, such as Fig.13 As shown, when the current block is at the upper boundary of the CTU, the motion information of the adjacent blocks is stored in the line buffer. In the example, the line buffer stores the information of all MVs of the control points of the adjacent blocks and the corresponding block size, so the line buffer needs to have a relatively large size.

[0145] In another embodiment, affine merging based on multiple control points may be used. Affine merging based on multiple control points is called complex merging mode.

[0146] Fig.14A and Fig. 14B Candidate positions for complex merge patterns are shown. Fig.14A shows the locations of spatial candidates for complex merge patterns, Fig. 14B The locations of temporal candidates for complex merge mode are shown.

[0147] In complex merge mode, several control points are needed to determine the motion model. In the first step of complex merge mode, candidates for control points are determined. Fig.14A and Fig. 14B The candidate predicted control points are shown in CP k represents the kth control point. For example, control points CP0, CP1, CP2, and CP3 are located at the corners of the current block. Figures 14A-14B In the example, CP0 is a control point located at the upper left corner of the current block, CP1 is a control point located at the upper right corner of the current block, CP2 is a control point located at the lower left corner of the current block, and CP3 is a control point located at the lower right corner of the current block. Fig.14A Spatial candidates for predicting motion information of CP0, CP1 and CP2 are shown. Fig. 14B The positions of the temporal candidates for predicting the CP3 motion information are shown. Specifically, the spatial candidates for predicting the CP0 motion information are shown as B 2 , A 2 and B 3 , the spatial candidates for predicting the motion information of CP1 are shown as B 0 and B 1 , and the spatial candidate for predicting the motion information of CP2 is shown as A 0 and A 1 The temporal candidate for predicting the motion information of CP3 is shown as T Rb .

[0148] In some examples, a control point has multiple candidates, and the motion information of the control point is determined from the candidates according to a priority order. For example, for CP0, the priority order for checking is B 2 , A2 , then B 3 ; For CP1, the priority order for checking is B 0 , then B 1 ; For CP2, the priority order for checking is A 0 , followed by A 1 ; For CP3, use T Rb .

[0149] The control points are then used to build a list of candidate models. Various models can be built based on subsets of control points such as CP0, CP1, CP2, and CP3. For example, 11 models can be built. The first model is an affine model constructed using two control points (CP1, CP2); the second model is an affine model constructed using two control points (CP0, CP2); the third model is an affine model constructed using three control points (CP0, CP1, CP2); the fourth model is an affine model constructed using two control points (CP0, CP1); the fifth model is an affine model constructed using two control points (CP1, CP3); the sixth model is an affine model constructed using two control points (CP2, CP3); the seventh model is an affine model constructed using two control points (CP0, CP3); the eighth model is a bilinear model; the ninth model is an affine model constructed using three control points (CP0, CP1, CP3); the tenth model is an affine model constructed using three control points (CP1, CP2, CP3); the eleventh model is an affine model constructed using three control points (CP0, CP2, CP3).

[0150] The candidate model list is constructed according to a sequence, such as from the first model to the eleventh model. For example, when the motion information of the selected control point for the model can be derived and is not the same in at least one reference picture list (such as L0 or L1), the model can be placed in the candidate model list as one of the candidate models. In the example, the encoder encodes an index for the model in the candidate model list in the encoded video stream, and the model in the candidate model list is used to predict the complex merge mode on the encoder side. The index can be encoded as 3 binary bits using equal length binarization. On the decoder side, the decoder decodes the complex merge index from the 3 binary bits in the encoded video code stream. The decoder starts the process of building the candidate model list. When the candidate index of the model to be placed in the candidate model list is equal to the decoded complex merge index, the process stops, and the decoder determines that the model is the same model used by the encoder.

[0151] It is worth noting that when there are multiple affine prediction candidates, whether for merge mode or AMVP mode, the affine prediction candidates are sorted in the same way on the encoder side and the decoder side. The encoder selects a candidate and signals the index of the selected candidate in the encoded video bitstream. The decoder decodes the index from the encoded video bitstream and selects a candidate based on the index.

[0152] Embodiments of the present application provide techniques for reducing the storage requirements of motion data to be stored in a line buffer (also referred to as a motion data line buffer) for deriving an affine merge candidate or an affine MVP candidate when a neighboring block above a current block is located outside a current maximum coding unit, such as a coding tree unit (CTU). More specifically, instead of storing motion vectors and block width and / or height values ​​for all control points, in some embodiments, the motion vector of a minimum size block (e.g., a minimum unit for compensation) just above the current CTU line (e.g., from the top to adjacent to the CTU line) is stored in the line buffer. When a control point is at a position not just above the current CTU line, then the motion vector of the control point is not stored in the line buffer, and the block width and / or height of the neighboring block just above the CTU line is not stored in the line buffer.

[0153] According to one embodiment of the present application, the motion vector information of the control point can be derived from the regular motion information in the row buffer. Typically, the row buffer stores the regular motion information of the minimum size block just above the CTU line, and the regular motion information of the minimum size block is used for the regular merge / skip / AMVP mode. In the affine merge mode, when the current block is at the upper boundary of the CTU, when the adjacent candidate block is above the current CTU boundary, the motion information of the two control points at the top of the current block can be derived from the regular motion information of the adjacent block (already stored in the row buffer). Therefore, the affine merge mode shares the regular motion information of the minimum size block with the conventional merge / skip / AMVP mode, and the conventional motion information has been stored for the conventional merge / skip / AMVP mode. In the example, the regular motion information of the minimum size block includes motion vectors for the minimum size block respectively. For example, a representative position is selected for each minimum size block, and the motion vector at the representative position is used as the motion vector for the minimum size block. Therefore, for the affine merge mode, in addition to the conventional motion information, no additional motion information needs to be stored in the row buffer. In some examples, the affine control point information or the affine flag may not be necessary to be stored in the row buffer.

[0154] It is worth noting that when the current block is not at the upper boundary of the CTU, other suitable derivation techniques may be used, such as model-based affine merging, affine merging based on multiple control points, etc., to derive affine model parameters of the affine merging mode.

[0155] Fig.15 FIG. 2 shows a schematic diagram for deriving control point motion information from regular motion information according to an embodiment of the present application. Fig.15 As shown in FIG. 1 , the current block is at the CTU boundary. The three corners of the current block are selected as control points CP0, CP1, and CP2. CP0 is the control point at the upper left corner of the current block, CP1 is the control point at the upper right corner of the current block, and CP2 is the control point at the lower left corner of the current block. CP0 and CP1 are the control points at the top corners of the current block. In the example, control point CP0 has Fig.15 The three candidate blocks A2, B2 and B3 shown in FIG. 1 and the control point CP1 have the following characteristics: Fig.15 The two candidate blocks shown are B0 and B1.

[0156] exist Fig.15 In the example of , the line buffer stores regular motion information of the minimum size block located above the CTU boundary. For example, the line buffer caches motion vectors of B2, B3, B1, and B0.

[0157] In an embodiment, the neighboring candidate blocks located to the left of the current block and below the upper boundary of the CTU (referred to as left neighboring candidate blocks) are checked, such as Fig.15 A0, A1 and A2 in the example. When a specific left-neighboring candidate block is available and affine encoded, the affine parameters and motion vectors of the control points of the current block can be derived from the affine model of the specific left-neighboring candidate block, such as using a model-based affine merging technique. The left-neighboring candidate blocks can be checked using various checking orders, and the first left-neighboring candidate block that is affine encoded can be used as a merge candidate for the current block. The checking order can be any of {A0, A1, A2}, {A0, A2, A1}, {A1, A0, A2}, (A1, A2, A0), {A2, A0, A1} or {A2, A1, A0}.

[0158] When none of A0, A1 or A2 is available or affine coded, the regular motion information of neighboring blocks can be used to derive the control points of the current block at the upper boundary of the CTU.

[0159] In an embodiment, Fig.15 As depicted, control point CP0 has three adjacent candidate blocks A2, B2, and B3. Various checking orders may be used to check the adjacent candidate blocks, and the first adjacent candidate block affine encoded may be used as a merge candidate. For example, the motion information (or a scaled version of the motion information) of the first adjacent candidate block affine encoded is copied to CP0. The checking order may be any of {A2, B2, B3}, {A2, B3, B2}, {B2, A2, B3}, {B2, B3, A2}, {B3, A2, B2}, or {B3, B2, A2}.

[0160] Similarly, control point CP1 has two adjacent candidate blocks B0 and B1. Various checking orders can be used to check the adjacent candidate blocks, and the first adjacent candidate block affine encoded can be used as a merge candidate. For example, the motion information (or a scaled version of the motion information) of the first adjacent candidate block affine encoded is copied to CP1. The checking order can be any one of {B0, B1} or {B1, B0}.

[0161] In another embodiment, if Fig.15 As depicted, control point CP0 has two adjacent candidate blocks B2 and B3 in the row buffer. Various checking orders may be used to check the adjacent candidate blocks, and the first adjacent candidate block that is affine encoded may be used as a merge candidate. For example, the motion information (or a scaled version of the motion information) of the first adjacent candidate block that is affine encoded is copied to CP0. The checking order may be any of {B2, B3} or {B3, B2}.

[0162] Similarly, control point CP1 has two adjacent candidate blocks B0 and B1. Various checking orders can be used to check the adjacent candidate blocks, and the first adjacent candidate block affine encoded can be used as a merge candidate. For example, the motion information (or a scaled version of the motion information) of the first adjacent candidate block affine encoded is copied to CP1. The checking order can be any one of {B0, B1} or {B1, B0}.

[0163] In another embodiment, all combinations of CP0 using motion information from any one of {A2, B2, B3} and CP1 using motion information from any one of {B0, B1} can be used to derive an affine model of the current block. It is worth noting that when some or all adjacent blocks used for CP0 or CP1 have the same motion information, redundant combinations can be pruned. All combinations of CP0 and CP1 motion information pairs can form a candidate list after the above-mentioned redundant pruning. Then, one of the candidates in the candidate list is selected, and the index of the selected candidate is encoded by the encoder into the encoded video bitstream. On the decoder side, the decoder can form a candidate list in the same way as the encoder and decode the index of the selected candidate from the encoded video bitstream.

[0164] According to another embodiment of the present application, the candidate for model-based affine merging can be derived from the regular motion information in the row buffer. Similarly, the row buffer stores the regular motion information of the minimum size block just above the CTU line, and the regular motion information of the minimum size block is used for the regular merge / skip / AMVP mode. In the affine merge mode, when the current block is at the upper boundary of the CTU and the adjacent candidate block is above the current CTU boundary, the affine model of the current block, such as a four-parameter affine model, can be derived from the regular motion information of the adjacent block (already stored in the row buffer). Therefore, the affine merge mode shares the regular motion information of the minimum size block with the conventional merge / skip / AMVP mode, and the conventional motion information has been stored for the conventional merge / skip / AMVP mode. In the example, the regular motion information of the minimum size block includes motion vectors for the minimum size blocks respectively. For example, a representative position is selected for each minimum size block, and the motion vector at the representative position is used as the motion vector of the minimum size block. Therefore, for the affine merge mode, in addition to the conventional motion information, no additional motion information needs to be stored in the row buffer. In some examples, the affine control point information or the affine flag may not be necessary to be stored in the row buffer. In one example, the affine control point information and the affine flag are not stored in the row buffer. In another example, the affine control point information and / or the affine flag are stored in the row buffer.

[0165] It is worth noting that when the current block is not at the upper boundary of the CTU, other suitable derivation techniques, such as model-based affine merging, affine merging based on multiple control points, etc., can be used to derive affine model parameters for the affine merging mode.

[0166] Fig.16 A diagram is shown for explaining model-based affine merge candidate derivation with reduced row buffer according to one embodiment of the present application.

[0167] exist Fig.16 In the example of , the current block is at the top of the CTU boundary, and all the above neighboring blocks (minimum size blocks) are stored in the line buffer (also called the motion date line buffer). The three corners of the current block are selected as control points CP0, CP1, and CP2. CP0 is the control point at the upper left corner of the current block, CP1 is the control point at the upper right corner of the current block, and CP2 is the control point at the lower left corner of the current block. CP0 and CP1 are the control points at the top corners of the current block.

[0168] exist Fig.16 In the example, B m Indicates the upper left adjacent block, B m-1 Indicates that in B m The one directly adjacent to the right, and B m+1 Indicates that in Bm Directly adjacent to the left; B n Indicates the upper right adjacent block, B n-1 Indicates that in B n The one directly adjacent to the right, and B n+1 Indicates that in B n Directly adjacent to the left.

[0169] like Fig.16 As shown, in the example, the control point CP0 has Fig.16 The three candidate blocks A2, B m and B m+1 ; Control point CP1 has Fig.16 The two candidate blocks B shown n and B n+1 .

[0170] exist Fig.16 In the example of , the row buffer stores regular motion information of the smallest size block located above the CTU boundary. m+1 , B m , B m-1 , B m-2 , …, B n+2 , B n+1 , B n , B n-1 , …, etc.

[0171] In one embodiment, the neighboring candidate blocks located to the left of the current block and below the upper boundary of the CTU (referred to as left neighboring candidate blocks) are checked, such as Fig.16 A0, A1 and A2 in the example. When a specific left-neighboring candidate block is available and affine encoded, the affine parameters and motion vectors of the control points of the current block can be derived from the affine model of the specific left-neighboring candidate block, such as using a model-based affine merging technique. Various checking orders can be used to check the left-neighboring candidate blocks, and the first left-neighboring candidate block that is affine encoded can be used as a merge candidate for the current block. The checking order can be any of {A0, A1, A2}, {A0, A2, A1}, {A1, A0, A2}, (A1, A2, A0), {A2, A0, A1} or {A2, A1, A0}.

[0172] When none of A0, A1 or A2 is available or affine coded, the regular motion information of the above neighboring blocks in the line buffer can be used to derive the affine model and motion vector of the control point of the current block at the upper boundary of the CTU.

[0173] To describe two control points of the current block, (V0x, V0y) represents the motion vector of CP0, and (V1x, V1y) represents the motion vector of CP1. In an embodiment, a pair of adjacent neighboring blocks in a line buffer may be used for affine model derivation.

[0174] In one example, (Formula 1) is simplified. For example, a represents ρcosθ, and b represents ρsinθ. (Formula 1) is simplified to (Formula 4). In one example, a and b are related to two motion vectors. And (MV 1 h ,MV 1 v ) is shown in (Formula 5)-(Formula 8).

[0175]

[0176]

[0177]

[0178]

[0179]

[0180] like Fig.16 As shown, the regular motion information (eg, motion vector) of the above adjacent blocks is stored in the line buffer. In order to derive the four-parameter affine model, at least two candidate blocks are required.

[0181] In one embodiment, four pairs of consecutive candidate blocks may be checked according to a checking order. Then, during the checking, the first pair of candidate blocks that can be used to derive an affine model is used as a merge candidate. The four pairs of candidates are: B m+1 and B m The first pair P0, B m-1 and B m-2 The second pair P1, B n+2 and B n+1 The third pair P2, B n , B n-1 The order of availability check may be any order with P0, P1, P2, P3, such as {P0, P1, P2, P3}, {P0, P1, P3, P2}, {P3, P2, P1, P0}, {P3, P1, P2, P0}, etc.

[0182] In another embodiment, based on the construction of the merged candidate list, when one of the above-mentioned adjacent positions is accessed to derive model-based affine parameters, and the adjacent position is above the upper boundary of the current CTU, a pair of continuous candidate blocks mentioned in the above embodiment located at the adjacent position can be used to derive the affine model parameters of the adjacent block, and can be used to derive the motion information of the control point of the current block.

[0183] In this embodiment, D represents the distance between each consecutive candidate pair and is the size or width of the smallest size block with motion information. In one example, D is 4. Further, C0 and C1 represent a pair of consecutive adjacent blocks used in the derivation process. The motion vectors of C0 and C1 are represented as (V C0x , V C0y ), and for C1 (V C1x , V C1y ). C0 is located at (x C0 ,y C0 ), and C1 is located at (x C1 ,y C1 ). Further, if Fig.16 As shown in 0 ,y 0 ) represents the position of the control point CP0; and (x 1 ,y 1 ) represents the position of the control point CP1. Then, the motion vectors for the control points CP0 and CP1 can be derived according to (Formula 9) and (Formula 10):

[0184]

[0185]

[0186] In the example, for each pair of candidates, when the pair of candidates has the same motion vector, it indicates that the pair of candidates is encoded using a regular translation motion vector and is not encoded in an affine mode. This pair of candidates will be skipped.

[0187] In another embodiment, four pairs of consecutive neighboring blocks are checked. The four candidate pairs are: P0{B m+1 , B m}、P1{B m-1 , B m-2}、P2{B n+2 , B n+1}、P3{B n , B n-1 All available candidate block pairs will be used to derive motion vector values ​​for a pair of control points for the current block.

[0188] For example, for each available candidate block pair, (Formula 9) and (Formula 10) are used to derive motion vectors of control points CP0 and CP1. In an embodiment, each available derived CP0 and CP1 value pair can be used as an affine merge candidate to form a candidate list of derived CP0 and CP1. In another embodiment, only the spatial merge candidate positions in the above-mentioned adjacent blocks are checked. If a block at one of these positions is encoded in affine mode, affine parameters can be derived from the block. For example, when deriving from regular motion information stored in a motion data row buffer, the corresponding coded block (such as Figure 8 and Fig.12 When these corresponding blocks are affine coded, the regular motion information at the two bottom corners is used as an approximation of the motion information of the bottom control points, and the affine model and control point motion information of the current block can be derived from the adjacent coded blocks.

[0189] It is worth noting that when the current block is not at the upper boundary of the CTU, a rule derivation method for affine merging candidates can be used, such as model-based affine merging, affine merging based on multiple control points, etc.

[0190] According to another embodiment of the present application, for a block at the top of a CTU, such as at the upper boundary of the CTU, affine merging may be skipped to avoid additional motion data storage in a line buffer, reduce the line buffer size, and save costs.

[0191] In some embodiments, when the current block is at the upper CTU boundary, when the left-neighboring affine merge candidate is not available, the affine merge mode can be disabled. For example, when the current block is at the upper CTU boundary and blocks A0, A1, and A2 are not available or are not affine encoded, the affine merge mode is not available. Therefore, there is no need to put the affine motion information of the neighboring blocks above the CTU boundary into the line buffer.

[0192] In one embodiment, the affine merge candidate is derived from the first available neighboring block, such as a model-based affine merge. When the left neighboring blocks A0, A1 and A2 of the current block are not available or are not affine coded, and when the current block is at the upper boundary of the CTU (e.g., at Fig.16 ), affine merging is not available for the current block.

[0193] In another embodiment, the affine merge candidate is combined with other conventional internal merge candidates on the unified merge candidate list. Fig.16 ), and when the left neighboring blocks A0, A1 and A2 of the current block are not available or are not affine encoded, the affine merge candidate will not be added to the unified merge candidate list.

[0194] According to one embodiment of the present application, an affine flag is stored in a row buffer for each affine coded block. In one example, the minimum allowed affine block is MxN (M is the width of the minimum allowed affine block, and N is the height of the minimum allowed affine block), and the width of the minimum size block is D, then for each M / D consecutive minimum size blocks in the horizontal direction, a 1-bit affine flag is stored to indicate whether the block is affine coded.

[0195] In one embodiment, when a block is at the bottom of a CTU, when the motion data information of the block is stored in a row buffer for use in future CTU rows, an affine flag for each M / D consecutive minimum size block is also stored in the row buffer.

[0196] For the current block at the top of the CTU (just below the CTU boundary that separates the previous CTU row from the current CTU row), the above neighboring blocks are above the current CTU row and in the previous CTU row. When the row buffer stores affine flag information, the affine flag information can be used, for example, to determine whether to derive a model-based affine merge candidate with regular motion information from the row buffer. For example, when the affine flag information indicates that one of the above neighboring blocks above the current CTU is not encoded in affine mode, the minimum size block pair at that position cannot be used to derive the affine model.

[0197] It is worth noting that, although the control point motion vector is derived from the neighboring blocks in the above description, other suitable methods may be used in a similar manner.

[0198] Fig.17A A flowchart of an overview process (1700) according to an embodiment of the present application is shown. The process (1700) can be used for reconstruction of a block encoded in intra-frame mode to generate a prediction block for the reconstructed block. In various embodiments, the process (1700) is performed by a processing circuit, such as a processing circuit in a terminal device (210), (220), (230) and (240), a processing circuit that performs the function of a video encoder (303), a processing circuit that performs the function of a video decoder (310), a processing circuit system that performs the function of a video decoder (410), a processing circuit that performs the function of an intra-frame prediction module (452), a processing circuit that performs the function of a video encoder (503), a processing circuit that performs the function of a predictor (535), a processing circuit that performs the function of an intra-frame encoder (622), a processing circuit that performs the function of an intra-frame decoder (772), etc. In some embodiments, the process (1700) is implemented in software instructions, so when the processing circuit executes the software instructions, the processing circuit performs the process (1700). The process starts from (S1701) and proceeds to (S1701).

[0199] At (S1710), prediction information of a current block is decoded from an encoded video stream, the prediction information indicating an affine model in a merge mode.

[0200] At (S1720), motion information of a bottom position of a neighboring block adjacent to the current block is obtained, such as regular motion information of the bottom position. In an example, the neighboring block is in a different CTU row from the current block, such as a CTU row above the current block. The motion information of the neighboring block is stored in a row buffer. When it is determined that the affine model does not require motion information of a non-bottom position (e.g., a control point of a top corner of a neighboring block), the row buffer does not need to store motion information of the non-bottom position. Then, the size of the row buffer can be reduced to save costs.

[0201] At (S1730), parameters of an affine model are determined based on motion information of a bottom position in a neighboring block. For example, a motion vector of a control point of a current block may be derived from a regular motion vector of a bottom position of a neighboring block. The parameters of the affine model are used to transform between the current block and a reference block in a reference picture, the reference picture being reconstructed based on the motion information of the bottom position in the neighboring block.

[0202] At (S1740), at least one sample of the current block is reconstructed according to the affine model. In the example, a reference pixel in the reference picture corresponding to the pixel in the block is determined according to the affine model. Further, the pixel in the current block is reconstructed according to the reference pixel in the reference picture. Then, the process proceeds to (S1799) and ends.

[0203] Fig. 17B FIG. 2 shows an exemplary structural diagram of a device for video decoding according to an embodiment of the present application. Fig. 17B As shown, the apparatus for video decoding includes: a decoding module 1701 , a first acquisition module 1702 , a first determination module 1703 and a reconstruction module 1704 .

[0204] The decoding module 1701 is used to decode prediction information of a current block in a current picture from an encoded video code stream, where the prediction information indicates an affine model in a merge mode.

[0205] The first acquisition module 1702 is used to acquire, from a buffer, motion information of a bottom position in a neighboring block adjacent to the current block in the current picture.

[0206] The first determination module 1703 is used to determine parameters of the affine model for transforming between the current block and a reference block in a reference picture, wherein the reference picture is reconstructed based on the motion information of the bottom position in the neighboring block.

[0207] The reconstruction module 1704 is used to reconstruct at least one sample of the current block based on the affine model.

[0208] In one embodiment, if Figure 17C to Figure 17E As shown, the device for decoding may further include: a second acquisition module 1705, used to obtain the motion vector of a specific minimum size block from a row buffer, and the row buffer includes: the motion vector of the minimum size block at the bottom position in the coding tree unit (CTU) row above the current block.

[0209] In one embodiment, the line buffer is configured not to buffer motion vectors of non-bottom minimum-sized blocks in the CTU line above the current block.

[0210] In one embodiment, the line buffer is configured not to buffer motion information of control points of the affine coded block.

[0211] In one embodiment, if Fig. 17C As shown, the apparatus for decoding may further include: an export module 1706, configured to export the motion vector of the control point of the current block based on the motion vector of the specific minimum size block using a four-parameter affine model.

[0212] In one embodiment, if Fig. 17C As shown, the decoding device may further include: a detection module 1707, configured to detect whether a minimum size block adjacent to a control point is affine coded based on an affine flag, wherein the affine flag indicates whether a plurality of consecutive minimum size blocks belong to an affine coded block. The derivation module 1706 is configured to derive the motion vector of the control point based on the motion vector of the minimum size block when the minimum size block is affine coded.

[0213] In one embodiment, if Fig.17D As shown, the apparatus for decoding may further include: a second determination module 1708, for determining a pair of minimum-sized blocks to be affine-encoded; and a third determination module 1709A, for determining parameters of a four-parameter affine model based on motion vectors of the pair of minimum-sized blocks.

[0214] In one embodiment, if Fig.17E As shown, the device for decoding may further include: a second determination module 1708, used to determine a pair of minimum-sized blocks to be affine encoded; and a fourth determination module 1709B, used to determine the motion vectors of the control points at the two top corners of the current block based on the motion vectors of the pair of minimum-sized blocks.

[0215] The techniques described above may be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. Fig.18 A computer system (1800) suitable for implementing certain embodiments of the disclosed subject matter is shown.

[0216] The computer software may be encoded using any suitable machine code or computer language, which may be assembled, compiled, linked, or the like to create code comprising instructions, which may be directly executed by one or more computer central processing units (CPU), graphics processing units (GPU), or the like, or executed by decoding, microcode, or the like.

[0217] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablets, servers, smartphones, gaming devices, IoT devices, etc.

[0218] Fig.18 The components shown for the computer system (1800) are exemplary in nature and are not intended to impose any limitation on the scope of use or functionality of computer software implementing embodiments of the present application. Nor should the configuration of components be interpreted as having any dependency or requirement on any one or combination of components illustrated in the exemplary embodiment of the computer system (1800).

[0219] The computer system (1800) may include certain human-computer interface input devices. The human-computer interface input devices may respond to input from one or more human users through tactile input (e.g., keyboard input, sliding, data glove movement), audio input (e.g., sound, applause), visual input (e.g., gestures), olfactory input (not shown). The human-computer interface devices may also be used to capture certain media that are not necessarily directly related to human conscious input, such as audio (e.g., speech, music, ambient sound), images (e.g., scanned images, photographic images obtained from a still image camera), and videos (e.g., two-dimensional video, three-dimensional video including stereoscopic video).

[0220] The human-computer interface input device may include one or more of the following (only one of which is depicted): keyboard (1801), mouse (1802), touchpad (1803), touch screen (1810), data gloves (not shown), joystick (1805), microphone (1806), scanner (1807), camera (1808).

[0221] The computer system (1800) may also include certain human-computer interface output devices. The human-computer interface output devices may stimulate one or more human user senses through, for example, tactile output, sound, light, and smell / taste. The human-computer interface output devices may include tactile output devices (e.g., tactile feedback through a touch screen (1810), a data glove (not shown), or a joystick (1805), but there may also be tactile feedback devices that are not input devices), audio output devices (e.g., speakers (1809), headphones (not shown)), visual output devices (e.g., screens (1810) including cathode ray tube screens, liquid crystal screens, plasma screens, organic light emitting diode screens, each of which may or may not have a touch screen input function, tactile feedback function - some of which may output two-dimensional visual output or output of more than three dimensions through means such as stereoscopic picture output; virtual reality glasses (not shown), holographic displays, and smoke boxes (not shown)) and printers (not shown).

[0222] The computer system (1800) may also include human-accessible storage devices and their associated media, such as optical media including media (1821) such as CD / DVD ROM / RW (1820) with CD / DVD, thumb drives (1822), removable hard drives or solid-state drives (1823), traditional magnetic media such as tapes and floppy disks (not shown), special-purpose ROM / ASIC / PLD-based devices such as security software dongles (not shown), and the like.

[0223] Those skilled in the art should also understand that the term "computer-readable media" used in conjunction with the subject matter of the present application does not include transmission media, carrier waves, or other transient signals.

[0224] The computer system (1800) may also include an interface to one or more communication networks. For example, the network may be wireless, wired, or optical. The network may also be a local area network, a wide area network, a metropolitan area network, an in-vehicle network, an industrial network, a real-time network, a delay-tolerant network, and the like. The network also includes local area networks such as Ethernet, wireless local area networks, cellular networks (GSM, 3G, 4G, 5G, LTE, etc.), television wired or wireless wide area digital networks (including cable television, satellite television, and terrestrial broadcast television), in-vehicle and industrial networks (including CANBus), and the like. Some networks typically require an external network interface adapter connected to some universal data port or peripheral bus (1849) (e.g., a USB port of the computer system (1800)); other systems are typically integrated into the kernel of the computer system (1800) by connecting to the system bus described below (e.g., an Ethernet interface integrated into a PC computer system or a cellular network interface integrated into a smart phone computer system). By using any of these networks, the computer system (1800) can communicate with other entities. The communication can be one-way, for receiving only (e.g., wireless television), one-way for sending only (e.g., CAN bus to certain CAN bus devices), or two-way, such as to other computer systems via a local or wide area digital network. Each of the above networks and network interfaces can use certain protocols and protocol stacks.

[0225] The aforementioned human-machine interface devices, human-accessible storage devices, and network interfaces may be connected to the kernel (1840) of the computer system (1800).

[0226] The core (1840) may include one or more central processing units (CPUs) (1841), graphics processing units (GPUs) (1842), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1843), hardware accelerators for specific tasks (1844), etc. The above devices as well as read-only memory (ROM) (1845), random access memory (1846), internal large-capacity storage (e.g., internal non-user accessible hard disk drives, SSDs, etc.) (1847), etc. may be connected via a system bus (1848). In some computer systems, the system bus (1848) may be accessed in the form of one or more physical plugs for expansion by additional central processing units, graphics processing units, etc. Peripheral devices may be directly attached to the core's system bus (1848) or connected via a peripheral bus (1849). The architecture of the peripheral bus includes a peripheral controller interface PCI, a universal serial bus USB, etc.

[0227] The CPU (1841), GPU (1842), FPGA (1843) and accelerator (1844) can execute certain instructions, which can be combined to form the above-mentioned computer code. The computer code can be stored in ROM (1845) or RAM (1846). Transition data can also be stored in RAM (1846), while permanent data can be stored in, for example, internal mass storage (1847). Fast storage and retrieval of any memory device can be achieved by using a cache, which can be closely associated with one or more CPUs (1841), GPUs (1842), mass storage (1847), ROM (1845), RAM (1846), etc.

[0228] The computer readable medium may have computer codes for performing various computer-implemented operations. The medium and computer codes may be specially designed and constructed for the purpose of this application, or may be medium and codes well known and available to those skilled in the art of computer software.

[0229] As an example and not limitation, a computer system having architecture (1800), in particular a kernel (1840), can provide functionality as a processor (including a CPU, GPU, FPGA, accelerator, etc.) to execute software contained in one or more tangible computer-readable media. Such a computer-readable medium can be a medium associated with a user-accessible mass storage as described above, and a specific memory of the kernel (1840) having a non-transient nature, such as a kernel internal mass storage (1847) or ROM (1845). Software implementing various embodiments of the present application can be stored in such a device and executed by the kernel (1840). Depending on specific needs, the computer-readable medium may include one or more storage devices or chips. The software can cause the kernel (1840), in particular the processor therein (including a CPU, GPU, FPGA, etc.) to perform a specific process or a specific part of a specific process described herein, including defining a data structure stored in RAM (1846) and modifying such a data structure according to a software-defined process. Additionally or alternatively, the computer system may provide functionality hardwired in logic or otherwise contained in circuitry (e.g., accelerator (1844)) that may operate in place of or in conjunction with software to perform a particular process or a particular portion of a particular process described herein. Where appropriate, references to software may include logic and vice versa. Where appropriate, references to computer-readable media may include circuitry (e.g., an integrated circuit (IC)) storing execution software, circuitry containing execution logic, or both. The present application includes any suitable combination of hardware and software.

[0230] Appendix A: Acronyms

[0231] JEM: Joint Exploration Model

[0232] VVC: Versatile Video Coding

[0233] BMS: Benchmark Set

[0234] MV: Motion Vector

[0235] HEVC: High Efficiency Video Coding

[0236] SEI: Supplementary Enhancement Information

[0237] VUI:Video Usability Information

[0238] GOP: Groups of Pictures

[0239] TU:Transform Unit

[0240] PU: Prediction Unit

[0241] CTU: Coding Tree Unit

[0242] CTB: Coding Tree Block

[0243] PB: Prediction Block

[0244] HRD: Hypothetical Reference Decoder

[0245] SNR:Signal Noise Ratio

[0246] CPU:Central Processing Unit

[0247] GPU: Graphics Processing Unit

[0248] CRT: Cathode Ray Tube

[0249] LCD: Liquid-Crystal Display

[0250] OLED: Organic Light-Emitting Diode

[0251] CD: Compact Disc

[0252] DVD: Digital Video Disc

[0253] ROM:Read-Only Memory

[0254] RAM: Random Access Memory

[0255] ASIC: Application-Specific Integrated Circuit

[0256] PLD:Programmable Logic Device

[0257] LAN: Local Area Network

[0258] GSM:Global System for Mobile communications Global Mobile Communications System

[0259] LTE: Long-Term Evolution

[0260] CAN bus: Controller Area Network Bus

[0261] USB: Universal Serial Bus

[0262] PCI: Peripheral Component Interconnect

[0263] FPGA: Field Programmable Gate Areas

[0264] SSD: Solid-state Drive

[0265] IC:Integrated Circuit

[0266] CU:Coding Unit

[0267] Although the present application has described a number of exemplary embodiments, various changes, permutations, and substitutions of the embodiments are within the scope of the present application. It should therefore be understood that those skilled in the art are capable of designing a variety of systems and methods that, although not explicitly shown or described herein, embody the principles of the present application and are therefore within the spirit and scope of the present application.

Claims

1. A video decoding method, characterized in that: The method comprises: Decoding prediction information of a current block in a first coding tree unit CTU in a current picture from an encoded video bitstream, wherein the prediction information indicates an affine model in a merge mode; Determine whether the current block is located at an upper boundary of a first CTU to determine whether an uppermost row of the current block shares a boundary with a second CTU above the first CTU; When it is determined that the current block is located at an upper boundary of the first CTU, determining a pair of minimum-sized blocks to be affine-coded; Acquire, from a row buffer, the motion vectors of the pair of minimum-sized blocks at the bottom positions of the CTU row of the second CTU located above the current block; the row buffer stores the motion vector of at least one block that is not adjacent to the upper left corner and the upper right corner of the current block, wherein the row buffer does not store the motion vector of any block other than the CTU row of the second CTU located above the current block; Determine parameters of a four-parameter affine model based on the obtained motion vectors of the pair of minimum-sized blocks, and derive motion vectors of control points of the current block based only on the four-parameter affine model; and At least one sample of the current block is reconstructed based on the motion vector of the control point of the current block and the affine model.

2. The method according to claim 1, characterized in that The line buffer is configured to not buffer motion vectors of non-bottom minimum-sized blocks in the CTU line above the current block.

3. The method according to claim 1, characterized in that The line buffer is configured not to buffer motion information of control points of the affine coded block.

4. The method according to claim 1, characterized in that Further including: detecting whether a minimum-sized block adjacent to a control point is affine-coded based on an affine flag, the affine flag indicating whether a plurality of consecutive minimum-sized blocks belong to an affine-coded block; and When the minimum-sized block is affine-coded, the motion vector of the control point is derived based on the motion vector of the minimum-sized block.

5. The method according to claim 4, characterized in that Further including: When the minimum size block adjacent to the control point is affine-coded, the motion vector of the minimum size block is used as the motion vector of the control point.

6. The method according to claim 1, characterized in that Further including: determining a pair of consecutive minimum-sized blocks to be affine encoded; as well as The parameters of a four-parameter affine model are determined based on the motion vectors of the pair of consecutive minimum-sized blocks.

7. The method according to claim 1, characterized in that Further including: determining a pair of minimum-sized blocks to be affine encoded; as well as Motion vectors of control points at two top corners of the current block are determined based on the motion vectors of the pair of minimum-sized blocks.

8. The method according to claim 1, characterized in that Further including: When the current block is at the upper boundary of the coding tree unit CTU and no left neighboring block can be used as an affine coding block, the affine merge mode is disabled.

9. A video encoding method, characterized in that: The method comprises: Obtain prediction information of a current block located in a first coding tree unit CTU in a current picture, wherein the prediction information indicates an affine model in a merge mode; Determine whether the current block is located at an upper boundary of a first CTU to determine whether an uppermost row of the current block shares a boundary with a second CTU above the first CTU; When it is determined that the current block is located at an upper boundary of the first CTU, determining a pair of minimum-sized blocks to be affine-coded; Acquire, from a row buffer, the motion vectors of the pair of minimum-sized blocks at the bottom positions of the CTU row of the second CTU located above the current block; the row buffer stores the motion vector of at least one block that is not adjacent to the upper left corner and the upper right corner of the current block, wherein the row buffer does not store the motion vector of any block other than the CTU row of the second CTU located above the current block; Determine parameters of a four-parameter affine model based on the obtained motion vectors of the pair of minimum-sized blocks, and derive motion vectors of control points of the current block based only on the four-parameter affine model; and At least one sample of the current block is reconstructed based on the motion vector of the control point of the current block and the affine model.

10. A video decoding device, characterized in that: The device comprises: A decoding module, configured to decode prediction information of a current block located in a first coding tree unit CTU in a current picture from an encoded video bitstream, wherein the prediction information indicates an affine model; an acquisition module, configured to determine whether the current block is located at an upper boundary of a first CTU, so as to determine whether the top row of the current block shares a boundary with a second CTU above the first CTU; when determining that the current block is located at an upper boundary of the first CTU, determine a pair of minimum-size blocks to be affine-coded; acquire motion vectors of the pair of minimum-size blocks at the bottom position of a CTU row of a second CTU above the current block from a row buffer; the row buffer stores a motion vector of at least one block that is not adjacent to an upper left corner and an upper right corner of the current block, wherein the row buffer does not store a motion vector of any block other than a CTU row of the second CTU above the current block; a determination module, configured to determine parameters of a four-parameter affine model based on the obtained motion vectors of a pair of minimum-sized blocks, and derive motion vectors of control points of the current block based only on the four-parameter affine model; and A reconstruction module is used to reconstruct at least one sample of the current block based on the motion vector of the control point of the current block and the affine model.

11. The device according to claim 10, characterized in that The row buffer is configured not to buffer motion vectors of non-bottom minimum-sized blocks in the CTU row above the current block, or not to buffer motion information of control points of affine coded blocks.

12. The device according to claim 10, characterized in that Further including: A detection module, configured to detect whether a minimum size block adjacent to a control point is affine encoded based on an affine flag, wherein the affine flag indicates whether a plurality of consecutive minimum size blocks belong to an affine encoded block; The derivation module is used to derive the motion vector of the control point based on the motion vector of the minimum size block when the minimum size block is affine encoded.

13. The device according to claim 10, characterized in that The determination module is further used to determine the motion vectors of the control points at the two top corners of the current block based on the motion vectors of the pair of minimum-sized blocks.

14. A non-transitory computer-readable medium storing instructions, characterized in that: When executed by a computer for video encoding and decoding, the instructions cause the computer to perform the method as claimed in any one of claims 1 to 9.

15. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory stores machine-readable instructions, and when the machine-readable instructions are executed by the processor, the processor is caused to execute the method according to any one of claims 1 to 9.

16. A method for processing a video stream, characterized in that: The video code stream is generated according to the encoding method according to claim 9, or is decoded based on the decoding method according to any one of claims 1 to 8.