Simplification of spatio-temporal motion vector prediction

文档序号:621650 发布日期:2021-05-07 浏览:12次 中文

阅读说明:本技术 时空运动矢量预测的简化 (Simplification of spatio-temporal motion vector prediction ) 是由 韩钰 H·黄 W-J·钱 M·卡切维奇 于 2019-10-04 设计创作,主要内容包括:一种用于对视频数据进行译码的设备和方法确定时空运动矢量预测器(STMVP),使得不需要对STMVP进行运动矢量缩放。该设备可以确定候选列表。然后,该设备可以确定候选列表中的哪些候选具有相同的参考图片。然后,该设备可以基于候选列表中的被确定为具有相同的参考图片的候选来生成STMVP。然后,该设备可以使用STMVP来对视频数据的当前块进行译码。(An apparatus and method for coding video data determines a spatio-temporal motion vector predictor (STMVP) such that motion vector scaling of the STMVP is not required. The device may determine a candidate list. The device may then determine which candidates in the candidate list have the same reference picture. Then, the device may generate the STMVP based on the candidates in the candidate list that are determined to have the same reference picture. The device may then code the current block of video data using STMVP.)

1. A method of coding video data, the method comprising:

generating a candidate list;

determining whether two or more candidates in the candidate list have the same reference picture;

generating a spatio-temporal motion vector predictor (STMVP) based on the two or more candidates in the candidate list having the same reference picture; and

coding a current block of the video data using the STMVP.

2. The method of claim 1, wherein the candidate list comprises a Temporal Motion Vector Predictor (TMVP), and generating the STMVP comprises:

generating the STMVP based on an average of the TMVP and one or more of: (i) a candidate in the candidate list derived from a first neighboring block located above the current block, or (ii) a candidate in the candidate list derived from a second neighboring block located to the left of the current block,

wherein the first neighboring block is a first available block having the same reference picture as the TMVP among a neighboring block set located above the current block, and

wherein the second neighboring block is a first available block having the same reference picture as the TMVP among a neighboring block set located at the left side of the current block.

3. The method of claim 1, wherein generating the STMVP comprises:

generating the STMVP based on an average of two spatial candidates in the candidate list having the same reference picture based on whether a spatial candidate having the same reference picture as a TMVP for the current block does not exist in the candidate list or the TMVP for the current block is unavailable.

4. The method of claim 1, wherein the STMVP is bi-directional, and generating the STMVP comprises: the STMVP is derived separately in each direction.

5. The method of claim 1, wherein the STMVP is bi-directional, and generating the STMVP comprises: based on there being no spatial candidate in the candidate list that has the same reference picture as the TMVP of the current block or based on the TMVP of the current block being unavailable:

generating a list0 motion vector for the STMVP based on an average of list0 motion vectors of two spatial candidates in the candidate list having the same reference picture; and

generating a list1 motion vector for the STMVP based on an average of the list1 motion vectors of two spatial candidates in the candidate list having the same reference picture.

6. The method of claim 1, wherein the candidate list is a merge candidate list, and generating the STMVP comprises:

selecting, in the candidate list, up to two candidates having a reference picture identical to the TMVP that first appear in the candidate list according to an order; and

generating the STMVP based on the TMVP and one or more of the selected candidates.

7. The method of claim 1, wherein the STMVP is bi-directional, and generating the STMVP comprises:

selecting a first set of up to two candidates in the candidate list that first appear in the candidate list according to an order, having the same reference picture as the TMVP in a list0 direction;

selecting, in the candidate list, a second set of up to two candidates that first appear in the candidate list according to the order or a different order, having the same reference picture as the TMVP in a list1 direction;

generating a list0 motion vector for the STMVP based on one or more of the list0 motion vector for the TMVP and the motion vectors for the candidates in the first candidate set; and

generating a list1 motion vector for the STMVP based on one or more of the list1 motion vector for the TMVP and the motion vectors for the candidates in the second candidate set.

8. The method of claim 1, wherein generating the STMVP comprises:

the STMVP is derived from TMVP and one or more candidates in a history-based motion vector prediction (HMVP) table.

9. The method of claim 1, wherein the STMVP is bi-directional, and generating the STMVP comprises:

separately generating a list0 motion vector of the STMVP and a list1 motion vector of the STMVP based on the TMVP and one or more candidates in a history-based motion vector prediction (HMVP) table.

10. The method of claim 1, wherein generating the candidate list comprises: the candidate list is generated from motion information of blocks at a set of predefined locations.

11. The method of claim 1, wherein generating the candidate list comprises: generating the candidate list from motion information of blocks at a set of signaled positions in a bitstream, the bitstream comprising an encoded representation of the video data.

12. The method of claim 1, wherein the STMVP is a first STMVP, and the method further comprises:

generating a second STMVP; and

including the first STMVP and the second STMVP in the candidate list.

13. The method of claim 1, further comprising:

including the STMVP at a predefined location in the candidate list.

14. The method of claim 1, further comprising:

including the STMVP at a location in the candidate list, wherein the location is signaled in a bitstream comprising an encoded representation of the video data.

15. The method of claim 1, wherein at least one of the following is predefined in both an encoder and a decoder: the candidate according to which the STMVP is generated, the position of the STMVP in the candidate list, or the number of STMVP candidates in the candidate list.

16. The method of claim 1, wherein at least one of the following is signaled in a bitstream comprising an encoded representation of the video data: the candidate according to which the STMVP is generated, the position of the STMVP in the candidate list, or the number of STMVP candidates in the candidate list.

17. An apparatus for coding video data, comprising:

a memory configured to store a current block of the video data; and

one or more processors coupled to the memory, the one or more processors configured to:

generating a candidate list;

determining whether two or more candidates in the candidate list have the same reference picture;

generating a spatio-temporal motion vector predictor (STMVP) based on the two or more candidates in the candidate list having the same reference picture; and

coding the current block of the video data using the STMVP.

18. The device of claim 17, wherein the candidate list comprises a Temporal Motion Vector Predictor (TMVP), and the one or more processors are further configured to: generating the STMVP based on an average of the TMVP and at least one of: (i) a candidate in the candidate list derived from a first neighboring block located above the current block, or (ii) a candidate in the candidate list derived from a second neighboring block located to the left of the current block,

wherein the first neighboring block is a first available block having the same reference picture as the TMVP among a neighboring block set located above the current block, and

wherein the second neighboring block is a first available block having the same reference picture as the TMVP among a neighboring block set located at the left side of the current block.

19. The device of claim 17, wherein the one or more processors are further configured to: generating the STMVP based on an average of two spatial candidates in the candidate list having the same reference picture when there is no spatial candidate in the candidate list having the same reference picture as a TMVP for the current block or the TMVP for the current block is unavailable.

20. The device of claim 17, wherein the one or more processors are further configured to:

generating the STMVP by separately deriving the STMVP in each direction.

21. The device of claim 17, wherein the STMVP is bi-directional, and the one or more processors are further configured to:

generating a list0 motion vector for the STMVP based on an average of list0 motion vectors of two spatial candidates in the candidate list having the same reference picture; and

generating a list1 motion vector of the STMVP based on an average of list1 motion vectors of two spatial candidates in the candidate list having the same reference picture when there is no spatial candidate using the same reference picture as the TMVP of the current block in the candidate list or the TMVP of the current block is unavailable.

22. The device of claim 17, wherein the candidate list is a merge candidate list, and the one or more processors are further configured to:

selecting, in the candidate list, up to two candidates having a reference picture identical to the TMVP that first appear in the candidate list according to an order; and

generating the STMVP based on the TMVP and one or more of the selected candidates.

23. The device of claim 17, wherein the STMVP is bi-directional, and the one or more processors are further configured to:

selecting a first set of up to two candidates in the candidate list that appear first in the candidate list according to an order, each candidate in the first candidate set having a same reference picture as a TMVP in a List0 direction;

selecting a second set of up to two candidates in the candidate list that first appear in the candidate list according to the order or a different order, each candidate in the second candidate set having the same reference picture in the list1 direction as the TMVP;

generating a list0 motion vector for the STMVP based on one or more of the list0 motion vector for the TMVP and the motion vectors for the candidates in the first candidate set; and

generating a list1 motion vector for the STMVP based on one or more of the list1 motion vector for the TMVP and the motion vectors for the candidates in the second candidate set.

24. The device of claim 17, wherein the one or more processors are further configured to:

the STMVP is derived from TMVP and one or more candidates in a history-based motion vector prediction (HMVP) table.

25. The device of claim 17, wherein the STMVP is bi-directional, and the one or more processors are further configured to:

separately generating a list0 motion vector of the STMVP and a list1 motion vector of the STMVP based on the TMVP and one or more candidates in a history-based motion vector prediction (HMVP) table.

26. The device of claim 17, wherein the one or more processors are further configured to:

the candidate list is generated from motion information of blocks at a set of predefined locations.

27. The device of claim 17, wherein the one or more processors are further configured to:

generating the candidate list from motion information of blocks at a set of signaled positions in a bitstream, the bitstream comprising an encoded representation of the video data.

28. The device of claim 17, wherein the STMVP is a first STMVP, and the one or more processors are further configured to:

generating a second STMVP; and

including the first STMVP and the second STMVP in the candidate list.

29. A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to:

generating a candidate list;

determining whether two or more candidates in the candidate list have the same reference picture;

generating a spatio-temporal motion vector predictor (STMVP) based on the candidates in the candidate list determined to have the same reference picture; and

coding a current block of video data using the STMVP.

30. An apparatus for coding video data, comprising:

means for generating a candidate list;

means for determining whether two or more candidates in the candidate list have the same reference picture;

means for generating a spatio-temporal motion vector predictor (STMVP) based on the two or more candidates in the candidate list having the same reference picture; and

means for coding a current block of the video data using the STMVP.

Technical Field

The present disclosure relates to video encoding (encoding) and video decoding (decoding).

Background

Digital video capabilities can be incorporated into a wide variety of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, Personal Digital Assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video gaming consoles, cellular or satellite radio telephones (so-called "smart phones"), video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video coding (coding) techniques such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T h.263, ITU-T h.264/MPEG-4 (part 10, Advanced Video Coding (AVC)), the High Efficiency Video Coding (HEVC) standard, ITU-T h.265/High Efficiency Video Coding (HEVC), and extensions of such standards. By implementing such video coding techniques, video devices may more efficiently transmit, receive, encode, decode, and/or store digital video information.

Video coding techniques include spatial (intra-picture) prediction and/or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be partitioned into video blocks, which may also be referred to as Coding Tree Units (CTUs), Coding Units (CUs), and/or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction with respect to reference samples in neighboring blocks in the same picture. Video blocks in inter-coded (P or B) slices of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame.

Disclosure of Invention

In general, this disclosure describes techniques for inter-prediction in video coding. The techniques of this disclosure may be applied to any existing video codec, such as HEVC (high efficiency video coding) or to high efficiency coding tools in any future video coding standard, such as h.266/VVC (general video coding).

In one example, this disclosure describes a method of coding video data, the method comprising: generating a candidate list; determining whether two or more candidates in the candidate list have the same reference picture; generating a spatio-temporal motion vector predictor (STMVP) based on the two or more candidates in the candidate list having the same reference picture; and code a current block of the video data using the STMVP.

In another example, this disclosure describes an apparatus for coding video data, comprising: a memory configured to store a current block of the video data; and one or more processors coupled to the memory, the one or more processors configured to: generating a candidate list; determining whether two or more candidates in the candidate list have the same reference picture; generating a spatio-temporal motion vector predictor (STMVP) based on the two or more candidates in the candidate list having the same reference picture; and code the current block of the video data using the STMVP.

In another example, the present disclosure describes a computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to: generating a candidate list; determining whether two or more candidates in the candidate list have the same reference picture; generating a spatio-temporal motion vector predictor (STMVP) based on the candidates in the candidate list determined to have the same reference picture; and coding a current block of video data using the STMVP.

In yet another example, the present disclosure describes an apparatus for coding video data, comprising: means for generating a candidate list; means for determining whether two or more candidates in the candidate list have the same reference picture; means for generating a spatio-temporal motion vector predictor (STMVP) based on the two or more candidates in the candidate list having the same reference picture; and code a current block of the video data using the STMVP.

The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description and drawings, and from the claims.

Drawings

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

Fig. 2A and 2B are conceptual diagrams illustrating an example binary Quadtree (QTBT) structure and corresponding Coding Tree Unit (CTU).

Fig. 3 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.

Fig. 4 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.

FIG. 5 is a flow diagram illustrating an example method for encoding a current block.

FIG. 6 is a flow diagram illustrating an example method for decoding a current block of video data.

Fig. 7A is a conceptual diagram illustrating example spatial neighboring motion vector candidates for the merge mode.

Fig. 7B is a conceptual diagram illustrating example spatial neighboring motion vector candidates for an Advanced Motion Vector Prediction (AMVP) mode.

Fig. 8A is a conceptual diagram illustrating example temporal motion vector prediction candidates.

Fig. 8B is a conceptual diagram illustrating an example of motion vector scaling.

Fig. 9 is a conceptual diagram illustrating spatial and temporal neighboring motion vector candidates for the merge and skip mode.

Fig. 10 is a conceptual diagram illustrating an example of sub-Prediction Unit (PU) motion prediction from a reference picture.

Fig. 11A is a conceptual diagram illustrating an example of one PU having four sub-blocks and its neighboring blocks.

Fig. 11B is a conceptual diagram illustrating an example of one PU having four sub-blocks and its neighboring blocks.

Fig. 12 is a conceptual diagram illustrating an example spatial neighboring block for deriving spatial merging candidates.

Fig. 13 is a conceptual diagram illustrating an example of a non-sub-PU spatio-temporal motion vector predictor.

Fig. 14 is a flow diagram illustrating a transcoding technique according to the present disclosure.

Fig. 15 is a conceptual diagram illustrating bi-prediction according to the techniques of this disclosure.

Detailed Description

In general, the disclosed techniques relate to spatio-temporal motion vector prediction for video coding. For example, this disclosure describes techniques for selecting a spatio-temporal motion vector predictor (STMVP) such that motion vector scaling of the STMVP is not necessary. In current implementations, a video coding device may select a motion vector predictor having a different reference picture than a current block of video data. In such a case, the motion vector predictor must be scaled to point to the reference picture of the current block of video data. The techniques of this disclosure may be applied to existing video codecs, such as HEVC (high efficiency video coding), or may be applied to coding tools in future video coding standards. Specifically, the video coding apparatus generates a candidate list. The video coding device determines which candidates in the candidate list have the same reference picture. Then, the video coding device generates the STMVP based on the candidates in the candidate list that are determined to have the same reference picture. For example, a video coding device may select one or more candidates having the same reference picture as a Temporal Motion Vector Predictor (TMVP) and average them to create a STMVP. The video coding device then codes the current block of video data using STMVP.

In existing video coding standards, the encoder and decoder select STMVP without regard to whether a motion vector scaling operation would be necessary when using STMVP. The motion vector scaling operation increases the complexity of the encoder and decoder and increases the encoding and decoding time. Accordingly, the techniques of this disclosure may enable a video coding device to avoid a motion vector scaling operation on STMVP. In contrast, as described in this disclosure, a video coding device may generate a candidate list and determine whether two or more candidates in the candidate list have the same reference picture. If two or more candidates in the candidate list have the same reference picture, the video coding device may generate the STMVP based on the two or more candidates in the candidate list having the same reference picture. The video coding device may then code the current block of video data using STMVP. However, when the video coding device determines that there are no two candidates in the candidate list that have the same reference picture, the video coding device does not generate the STMVP based on two or more candidates in the candidate list. In this way, the video coding device may avoid performing motion vector scaling operations that may slow down the process of generating the candidate list.

Fig. 1 is a block diagram illustrating an example video encoding and decoding system 100 that may perform the techniques of this disclosure. In general, the techniques of this disclosure relate to coding (encoding and/or decoding) video data. In general, video data includes any data used to process video. Thus, video data may include original unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata (e.g., signaling data).

As shown in fig. 1, in this example, system 100 includes a source device 102, source device 102 providing encoded video data to be decoded and displayed by a destination device 116. In particular, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may comprise any of a wide variety of devices, including desktop computers, notebook computers (i.e., laptop computers), tablet computers, set-top boxes, telephone handsets such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, and the like. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and may therefore be referred to as wireless communication devices.

In the example of fig. 1, the source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. The destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. In accordance with the present disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 may be configured to apply the techniques for video coding described in the present disclosure. Thus, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, the source device and the destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source, such as an external camera. Likewise, destination device 116 may interface with an external display device instead of including an integrated display device.

The system 100 as shown in fig. 1 is merely an example. In general, any digital video encoding and/or decoding apparatus may perform techniques for coding video data. Source device 102 and destination device 116 are merely examples of transcoding devices in which source device 102 generates transcoded video data for transmission to destination device 116. The present disclosure refers to a "transcoding" apparatus as an apparatus that performs transcoding (e.g., encoding and/or decoding) of data. Accordingly, the video encoder 200 and the video decoder 300 represent examples of a coding apparatus (specifically, a video encoder and a video decoder), respectively. In some examples, the devices 102, 116 may operate in a substantially symmetric manner such that each of the devices 102, 116 includes video encoding and decoding components. Thus, the system 100 may support one-way or two-way video transmission between the video devices 102, 116, for example, for video streaming, video playback, video broadcasting, or video telephony.

In general, video source 104 represents a source of video data (i.e., raw, unencoded video data), and provides a sequential series of pictures (also referred to as "frames") of the video data to video encoder 200, which video encoder 200 encodes the data for the pictures. The video source 104 of the source device 102 may include a video capture device, such as a video camera, a video archive unit containing previously captured raw video, and/or a video feed interface for receiving video from a video content provider. As a further alternative, video source 104 may generate computer graphics-based data as the source video, or a combination of real-time video, archived video, and computer-generated video. In each case, the video encoder 200 may encode captured, pre-captured, or computer-generated video data. The video encoder 200 may rearrange the pictures from the received order (sometimes referred to as "display order") to a coding order for coding. The video encoder 200 may generate a bitstream including the encoded video data. Source device 102 may then output the encoded video data onto computer-readable medium 110 via output interface 108 for receipt and/or retrieval by, for example, input interface 122 of destination device 116.

Memory 106 of source device 102 and memory 120 of destination device 116 represent general purpose memory. In some examples, the memories 106, 120 may store raw video data, e.g., raw video from the video source 104 and raw decoded video data from the video decoder 300. Additionally or alternatively, the memories 106, 120 may store software instructions executable by, for example, the video encoder 200 and the video decoder 300, respectively. Although shown in this example as being separate from the video encoder 200 and the video decoder 300, it should be understood that the video encoder 200 and the video decoder 300 may also include internal memory for functionally similar or equivalent purposes. Further, the memories 106, 120 may store, for example, encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of memory 106, 120 may be allocated as one or more video buffers, e.g., to store raw decoded and/or encoded video data.

Computer-readable medium 110 may represent any type of medium or device capable of transporting encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium that enables source device 102 to send encoded video data directly to destination device 116 in real-time, e.g., via a radio frequency network or a computer-based network. Output interface 108 may modulate a transmission signal including the encoded video data according to a communication standard, such as a wireless communication protocol, and input interface 122 may modulate a received transmission signal according to a communication standard, such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, such as a Radio Frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network such as: a local area network, a wide area network, or a global network such as the internet. The communication medium may include a router, switch, base station, or any other device that may be useful for facilitating communication from source device 102 to destination device 116.

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

In some examples, source device 102 may output the encoded video data to file server 114 or another intermediate storage device that may store the encoded video generated by source device 102. Destination device 116 may access stored video data from file server 114 via streaming or download. File server 114 may be any type of server device capable of storing encoded video data and transmitting the encoded video data to destination device 116. File server 114 may represent a web server (e.g., for a website), a File Transfer Protocol (FTP) server, a content delivery network device, or a Network Attached Storage (NAS) device. Destination device 116 may access the encoded video data from file server 114 through any standard data connection, including an internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both, suitable for accessing encoded video data stored on file server 114. File server 114 and input interface 122 may be configured to operate in accordance with: a streaming transport protocol, a download transport protocol, or a combination thereof.

Output interface 108 and input interface 122 may represent wireless transmitters/receivers, modems, wired networking components (e.g., ethernet cards), wireless communication components that operate according to any of a variety of IEEE 802.11 standards, or other physical components. In examples in which the output interface 108 and the input interface 122 include wireless components, the output interface 108 and the input interface 122 may be configured to transmit data, such as encoded video data, in accordance with a cellular communication standard, such as 4G, 4G-LTE (long term evolution), LTE advanced, 5G, and so forth. In some examples in which the output interface 108 comprises a wireless transmitter, the output interface 108 and the input interfaceThe input interface 122 may be configured to be in accordance with other wireless standards (such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee)TM)、BluetoothTMStandard, etc.) to transmit data (such as encoded video data). In some examples, source device 102 and/or destination device 116 may include respective system on chip (SoC) devices. For example, source device 102 may include an SoC device to perform the functions attributed to video encoder 200 and/or output interface 108, and destination device 116 may include an SoC device to perform the functions attributed to video decoder 300 and/or input interface 122.

The techniques of this disclosure may be applied to video coding to support any of a variety of multimedia applications, such as over-the-air television broadcasts, cable television transmissions, satellite television transmissions, internet streaming video transmissions, such as dynamic adaptive streaming over HTTP (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

The input interface 122 of the destination device 116 receives the encoded video bitstream from the computer-readable medium 110 (e.g., storage device 112, file server 114, etc.). The encoded video bitstream from the computer-readable medium 110 may include signaling information defined by the video encoder 200 (which is also used by the video decoder 300), such as the following syntax elements: the syntax elements have values that describe characteristics and/or processing of video blocks or other coding units (e.g., slices, pictures, groups of pictures, sequences, etc.). Display device 118 displays the decoded pictures of the decoded video data to a user. Display device 118 may represent any of a variety of display devices, such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), a plasma display, an Organic Light Emitting Diode (OLED) display, or another type of display device.

Although not shown in fig. 1, in some examples, video encoder 200 and video decoder 300 may each be integrated with an audio encoder and/or audio decoder, and may include appropriate MUX-DEMUX units or other hardware and/or software to process multiplexed streams that include both audio and video in a common data stream. The MUX-DEMUX unit may, if applicable, conform to the ITU h.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).

Video encoder 200 and video decoder 300 may each be implemented as any of a variety of suitable encoder and/or decoder circuits, such as one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic, software, hardware, firmware, or any combinations thereof. When the techniques are implemented in part in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of video encoder 200 and video decoder 300 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder/decoder (CODEC) in the respective device. A device including video encoder 200 and/or video decoder 300 may include an integrated circuit, a microprocessor, and/or a wireless communication device (such as a cellular telephone).

The video encoder 200 and the video decoder 300 may operate in accordance with a video coding standard, such as ITU-t h.265 (also known as High Efficiency Video Coding (HEVC) or an extension thereto, such as a multiview and/or scalable video coding extension.) alternatively, the video encoder 200 and the video decoder 300 may operate in accordance with other proprietary or industry standards, such as Joint Exploration Model (JEM), VVC, or VCC Test Model (VTM).

In general, the video encoder 200 and the video decoder 300 may perform block-based coding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in an encoding and/or decoding process). For example, a block may comprise a two-dimensional matrix of samples of luminance and/or chrominance data. In general, video encoder 200 and video decoder 300 may code video data represented in YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for samples of a picture, video encoder 200 and video decoder 300 may code luma and chroma components, where the chroma components may include both red-hue and blue-hue chroma components. In some examples, the video encoder 200 converts the received RGB formatted data to a YUV representation prior to encoding, and the video decoder 300 converts the YUV representation to an RGB format. Alternatively, a pre-processing and post-processing unit (not shown) may perform these conversions.

In general, the present disclosure may relate to coding (e.g., encoding and decoding) of a picture to include a process of encoding or decoding data of the picture. Similarly, the disclosure may relate to coding of a block of a picture to include a process of encoding or decoding (e.g., predictive and/or residual coding) data for the block. An encoded video bitstream typically includes a series of values for syntax elements that represent coding decisions (e.g., coding modes) and that partition a picture into blocks. Thus, references to coding a picture or block should generally be understood as coding values of syntax elements used to form the picture or block.

HEVC defines various blocks, including Coding Units (CUs), Prediction Units (PUs), and Transform Units (TUs). According to HEVC, a video coder, such as video encoder 200, partitions a Coding Tree Unit (CTU) into CUs according to a quadtree structure. That is, the video coder partitions the CTUs and CUs into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without a child node may be referred to as a "leaf node," and a CU of such a leaf node may include one or more PUs and/or one or more TUs. The video coder may further partition the PU and TU. For example, in HEVC, the Residual Quadtree (RQT) represents the partitioning of a TU. In HEVC, a PU represents inter prediction data and a TU represents residual data. The intra-predicted CU includes intra-prediction information, such as an intra-mode indication.

As another example, the video encoder 200 and the video decoder 300 may be configured to operate in accordance with JEM. According to JEM, a video coder, such as video encoder 200, partitions a picture into multiple Coding Tree Units (CTUs). The video encoder 200 may partition the CTUs according to a tree structure, such as a quadtree-binary tree (QTBT) structure. The QTBT structure of JEM removes the concept of multiple partition types, such as the split between CU, PU and TU of HEVC. The QTBT structure of JEM includes two levels: a first level segmented according to quadtree segmentation, and a second level segmented according to binary tree segmentation. The root node of the QTBT structure corresponds to the CTU. Leaf nodes of the binary tree correspond to Coding Units (CUs).

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

The video encoder 200 and the video decoder 300 may be configured to use quadtree partitioning per HEVC, QTBT partitioning according to JEM, or other partitioning structures. For purposes of explanation, a description of the techniques of the present disclosure is given with respect to QTBT segmentation. However, it should be understood that the techniques of this disclosure may also be applied to video coders configured to use quadtree partitioning, or also other types of partitioning.

The present disclosure may use "NxN" and "N by N" interchangeably to refer to the sample size of a block (such as a CU or other video block) in the vertical and horizontal dimensions, e.g., 16x16 samples or 16 by 16 samples. Typically, 16x16CU will have 16 samples in the vertical direction (y-16) and 16 samples in the horizontal direction (x-16). Likewise, an NxN CU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. Furthermore, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include NxM samples, where M is not necessarily equal to N.

Video encoder 200 encodes video data representing prediction and/or residual information, as well as other information, for a CU. The prediction information indicates how the CU is to be predicted in order to form a prediction block for the CU. The residual information typically represents the sample-by-sample difference between the samples of the CU before encoding and the prediction block.

To predict a CU, video encoder 200 may typically form a prediction block for the CU through inter prediction or intra prediction. Inter-prediction typically refers to predicting a CU from data of a previously coded picture, while intra-prediction typically refers to predicting a CU from previously coded data of the same picture. To perform inter prediction, the video encoder 200 may generate a prediction block using one or more motion vectors. Video encoder 200 may typically perform a motion search to identify a reference block that closely matches a CU, e.g., in terms of differences between the CU and the reference block. Video encoder 200 may calculate a difference metric using Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD), Mean Absolute Differences (MAD), Mean Squared Differences (MSD), or other such difference calculations to determine whether the reference block closely matches the current CU. In some examples, video encoder 200 may predict the current CU using uni-directional prediction or bi-directional prediction.

JEM also provides an affine motion compensation mode, which can be considered an inter prediction mode. In the affine motion compensation mode, video encoder 200 may determine two or more motion vectors that represent non-translational motion (such as zoom-in or zoom-out, rotation, perspective motion, or other irregular types of motion).

To perform intra-prediction, video encoder 200 may select an intra-prediction mode to generate the prediction block. JEM provides sixty-seven intra prediction modes, including various directional modes, as well as a planar mode and a DC mode. In general, video encoder 200 selects an intra-prediction mode that describes neighboring samples of a current block (e.g., a block of a CU) from which samples of the current block are to be predicted. Assuming that the video encoder 200 codes CTUs and CUs in raster scan order (left-to-right, top-to-bottom), such samples may typically be above, above-left, or left-to-side of the current block in the same picture as the current block.

The video encoder 200 encodes data representing a prediction mode for the current block. For example, for an inter prediction mode, the video encoder 200 may encode data indicating which of various available inter prediction modes is used, as well as motion information for the corresponding mode. For uni-directional or bi-directional inter prediction, for example, the video encoder 200 may encode the motion vector using Advanced Motion Vector Prediction (AMVP) or merge mode. The video encoder 200 may use a similar mode to encode the motion vectors for the affine motion compensation mode.

As described above, a video coder (e.g., video encoder 200 or video decoder 300) may apply inter prediction to generate a prediction block for a video block of a current picture. For example, a video coder may apply inter-prediction to generate a prediction block for a CU. If the video coder applies inter-prediction to generate the prediction block, the video coder generates the prediction block based on decoded samples of one or more reference pictures. Typically, the reference picture is a picture other than the current picture. In some video coding specifications, a video coder may also consider the current picture itself as a reference picture. The video coder may determine one or more reference picture lists. Each of the reference picture lists includes zero or more reference pictures. One of the reference picture lists may be referred to as reference picture list 0(RefPicList0), and the other reference picture list may be referred to as reference picture list 1(RefPicList 1). For convenience of explanation, the present disclosure may refer to reference picture list0 as list0, and may refer to reference picture list1 as list 1.

The video coder may apply uni-directional inter prediction or bi-directional inter prediction to generate the prediction block. When the video coder applies uni-directional inter prediction to generate the prediction block for the video block, the video coder determines a single reference block for the video block based on samples of a single reference picture. The reference block may be a block of samples similar to the prediction block. Further, when the video coder applies uni-directional inter prediction, the video coder may set the prediction block equal to the reference block. When a video coder applies bi-directional inter prediction to generate prediction blocks for a video block, the video coder determines two reference blocks for the video block. In some examples, the two reference blocks are in reference pictures in different reference picture lists. In addition, when the video coder applies bi-directional inter prediction, the video coder may determine a prediction block based on two reference blocks. For example, the video coder may determine the prediction block such that each sample of the prediction block is a weighted average of corresponding samples of the two reference blocks. The reference list indicator may be used to indicate which of the reference picture lists include reference pictures used to determine the reference block.

As described above, a video coder may determine a reference block based on samples of a reference picture. In some examples, a video coder may determine a reference block such that each sample of the reference block is equal to a sample of a reference picture. In some examples, as part of determining the reference block, the video coder may interpolate samples of the reference block from samples of the reference picture. For example, the video coder may determine that the samples of the prediction block are a weighted average of two or more samples of the reference picture.

In some examples, when video encoder 200 performs uni-directional inter prediction for a current block of a current picture, video encoder 200 identifies a reference block within one or more reference pictures in one of the reference picture lists. For example, video encoder 200 may search for a reference block within one or more reference pictures within a reference picture list. In some examples, video encoder 200 uses a mean square error or other metric to determine the similarity between the reference block and the current block. In addition, the video encoder 200 may determine motion parameters for the current block. The motion parameters for the current block may include a motion vector and a reference index. The motion vector may indicate a spatial displacement between a position of the current block within the current picture and a position of the reference block within the reference picture. The reference index indicates a position within the reference picture list of a reference frame that includes the reference picture list. The prediction block for the current block may be equal to the reference block.

When video encoder 200 performs bi-directional inter prediction for a current block of a current picture, video encoder 200 may identify a first reference block within a reference picture in a first reference picture list ("list 0") and may identify a second reference block within a reference picture in a second reference picture list ("list 1"). For example, the video encoder 200 may search for first and second reference blocks within reference pictures in the first and second reference picture lists, respectively. The video encoder 200 may generate a prediction block for the current block based at least in part on the first and second reference blocks. In addition, the video encoder 200 may generate a first motion vector indicating a spatial displacement between the current block and the first reference block. The video encoder 200 may also generate a first reference index that identifies a position within the first reference picture list of a reference picture that contains the first reference block. In addition, the video encoder 200 may generate a second motion vector indicating a spatial displacement between the current block and a second reference block. The video encoder 200 may also generate a second reference index that identifies a position within the second reference picture list of a reference picture that includes the second reference block.

When the video encoder 200 performs unidirectional inter prediction with respect to the current block, the video decoder 300 may identify a reference block of the current block using the motion parameter of the current block. Then, the video decoder 300 may generate a prediction block for the current block based on the reference block. When the video encoder 200 performs bi-directional inter prediction to determine a prediction block for a current block, the video decoder 300 may determine two reference blocks using motion parameters of the current block. The video decoder 300 may generate a prediction block for the current block based on two reference samples for the current block.

After prediction, such as intra prediction or inter prediction, for a block, the video encoder 200 may calculate residual data for the block. Residual data (such as a residual block) represents the sample-by-sample difference between a block and a prediction block for the block, which is formed using the corresponding prediction mode. Video encoder 200 may apply one or more transforms to the residual block to produce transformed data in the transform domain rather than in the sample domain. For example, the video encoder 200 may apply a Discrete Cosine Transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, video encoder 200 may apply a second transform, such as a mode dependent non-separable second transform (mdsnst), a signal dependent transform, a Karhunen-Loeve transform (KLT), or the like, after the first transform. The video encoder 200 generates transform coefficients after applying one or more transforms.

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

After quantization, video encoder 200 may scan the transform coefficients, producing a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scanning may be designed to place the higher energy (and therefore lower frequency) coefficients in front of the vector and the lower energy (and therefore higher frequency) transform coefficients behind the vector. In some examples, video encoder 200 may scan the quantized transform coefficients with a predefined scan order to produce a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, video encoder 200 may perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 200 may entropy encode the one-dimensional vector, e.g., according to Context Adaptive Binary Arithmetic Coding (CABAC). Video encoder 200 may also entropy encode values for syntax elements describing metadata associated with the encoded video data for use by video decoder 300 in decoding the video data.

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

The video encoder 200 may also generate syntax data (such as block-based syntax data, picture-based syntax data, and sequence-based syntax data) or other syntax data (such as Sequence Parameter Sets (SPS), Picture Parameter Sets (PPS), or Video Parameter Sets (VPS)) for the video decoder 300, for example, in a picture header, a block header, a slice header. Likewise, video decoder 300 may decode such syntax data to determine how to decode the corresponding video data.

In this manner, video encoder 200 may generate a bitstream that includes encoded video data, e.g., syntax elements that describe partitioning of a picture into blocks (e.g., CUs) and prediction and/or residual information for the blocks. Finally, the video decoder 300 may receive the bitstream and decode the encoded video data.

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

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

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

Fig. 2A and 2B are conceptual diagrams illustrating an example binary Quadtree (QTBT) structure 130 and a corresponding Coding Tree Unit (CTU) 132. The solid line represents a quadtree split, while the dashed line indicates a binary tree split. In each split (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which type of split (i.e., horizontal or vertical) is used, where, in this example, 0 indicates horizontal split and 1 indicates vertical split. For quadtree splitting, the split type need not be indicated since quadtree nodes split a block horizontally and vertically into 4 sub-blocks of equal size. Thus, video encoder 200 may encode and video decoder 300 may decode: syntax elements (such as split information) for the region tree level (i.e., solid line) of the QTBT structure 130, and syntax elements (such as split information) for the prediction tree level (i.e., dashed line) of the QTBT structure 130. The video encoder 200 may encode video data (such as prediction and transform data) for a CU represented by a terminal leaf node of the QTBT structure 130, while the video decoder 300 may decode the video data.

In general, the CTU 132 of fig. 2B may be associated with parameters that define the size of the blocks corresponding to the nodes at the first and second levels of the QTBT structure 130. These parameters may include CTU size (representing the size of CTU 132 in the sample), minimum quadtree size (MinQTSize, which represents the minimum allowed quadtree leaf node size), maximum binary tree size (MaxBTSize, which represents the maximum allowed binary tree root node size), maximum binary tree depth (MaxBTDepth, which represents the maximum allowed binary tree depth), and minimum binary tree size (MinBTSize, which represents the minimum allowed binary tree leaf node size).

The root node of the QTBT structure corresponding to the CTU may have four child nodes at the first level of the QTBT structure, each of which may be partitioned according to quadtree partitioning. That is, the first level node is a leaf node (without children) or has four children. The example of the QTBT structure 130 represents such nodes as including parent and child nodes with solid line branches. If the nodes of the first level are not larger than the maximum allowed binary tree root node size (MaxBTSize), they may be further partitioned by the corresponding binary tree. The binary tree split for a node may be iterated until the nodes resulting from the split reach a minimum allowed binary tree leaf node size (MinBTSize) or a maximum allowed binary tree depth (MaxBTDepth). The example of the QTBT structure 130 represents such a node as having dashed-line branches. The binary tree leaf nodes are referred to as Coding Units (CUs) that are used for prediction (e.g., intra-picture or inter-picture prediction) and transform without any further partitioning. As discussed above, a CU may also be referred to as a "video block" or "block.

In one example of the QTBT segmentation structure, the CTU size is set to 128x128 (luma samples and two corresponding 64x64 chroma samples), MinQTSize is set to 16x16, MaxBTSize is set to 64x64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. A quadtree partitioning is first applied to CTUs to generate quadtree leaf nodes. The quad tree leaf nodes may have sizes from 16x16 (i.e., MinQTSize) to 128x128 (i.e., CTU size). If the leaf quadtree node is 128x128, it will not be further split by the binary tree since the size exceeds MaxBTSize (i.e., 64x64 in this example). Otherwise, the leaf quadtree nodes will be further partitioned by the binary tree. Thus, the quadtree leaf nodes are also the root nodes for the binary tree and have a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), no further splitting is allowed. When the binary tree node has a width equal to MinBTSize (4 in this example), it means that no further horizontal splitting is allowed. Similarly, a binary tree node having a height equal to MinBTSize means that no further vertical splitting is allowed for that binary tree node. As described above, the leaf nodes of the binary tree are referred to as CUs and are further processed according to prediction and transformation without further partitioning.

Fig. 3 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Fig. 3 is provided for purposes of explanation and should not be considered limiting of the technology broadly illustrated and described in this disclosure. For purposes of explanation, this disclosure describes video encoder 200 in the context of a video coding standard, such as the HEVC video coding standard and the h.266 video coding standard under development. However, the techniques of this disclosure are not limited to these video coding standards and are generally applicable to video encoding and decoding.

In the example of fig. 3, the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a Decoded Picture Buffer (DPB)218, and an entropy coding unit 220.

The video data memory 230 may store video data to be encoded by the components of the video encoder 200. Video encoder 200 may receive video data stored in video data storage 230 from, for example, video source 104 (fig. 1). The DPB 218 may act as a reference picture memory that stores reference video data for use when subsequent video data is predicted by the video encoder 200. Video data memory 230 and DPB 218 may be formed from any of a variety of memory devices, such as Dynamic Random Access Memory (DRAM) (including synchronous DRAM (sdram)), magnetoresistive ram (mram), resistive ram (rram), or other types of memory devices. Video data memory 230 and DPB 218 may be provided by the same memory device or separate memory devices. In various examples, video data memory 230 may be on-chip with other components of video encoder 200 (as shown), or off-chip with respect to those components.

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

The various elements of fig. 3 are described to assist in understanding the operations performed by video encoder 200. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Fixed function circuitry refers to circuitry that provides a particular function and is pre-configured with respect to operations that may be performed. Programmable circuitry refers to circuitry that can be programmed to perform various tasks and provide flexible functionality in operations that can be performed. For example, the programmable circuitry may execute software or firmware that causes the programmable circuitry to operate in a manner defined by the instructions of the software or firmware. Fixed function circuitry may execute software instructions (e.g., to receive parameters or output parameters), but the type of operations performed by the fixed function circuitry is typically immutable. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be integrated circuits.

The video encoder 200 may include an Arithmetic Logic Unit (ALU), a basic function unit (EFU), digital circuitry, analog circuitry, and/or a programmable core formed from programmable circuitry. In examples in which the operations of video encoder 200 are performed using software executed by programmable circuitry, memory 106 (fig. 1) may store object code of the software received and executed by video encoder 200, or another memory (not shown) within video encoder 200 may store such instructions.

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

Mode selection unit 202 includes motion estimation unit 222, motion compensation unit 224, and intra prediction unit 226. The mode selection unit 202 may comprise additional functional units that perform video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra-block copy unit (which may be part of the motion estimation unit 222 and/or the motion compensation unit 224), an affine unit, a Linear Model (LM) unit, and the like.

Mode selection unit 202 typically coordinates multiple encoding passes (pass) to test combinations of encoding parameters and resulting rate-distortion values for such combinations. The encoding parameters may include partitioning of the CTU into CUs, a prediction mode for the CU, a transform type of residual data for the CU, a quantization parameter of the residual data for the CU, and the like. The mode selection unit 202 may finally select a combination of encoding parameters having a better rate-distortion value than other tested combinations.

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

Typically, mode select unit 202 also controls its components (e.g., motion estimation unit 222, motion compensation unit 224, and intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or the overlapping portion of a PU and a TU in HEVC). To inter-predict the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate a value representing how similar the potential reference block will be to the current block, for example, from a Sum of Absolute Differences (SAD), a Sum of Squared Differences (SSD), a Mean Absolute Difference (MAD), a Mean Squared Difference (MSD), and the like. The motion estimation unit 222 may typically perform these calculations using the sample-by-sample difference between the current block and the reference block under consideration. The motion estimation unit 222 may identify the reference block resulting from these calculations that has the lowest value, indicating the reference block that most closely matches the current block.

The motion estimation unit 222 may form one or more Motion Vectors (MVs) that define the position of a reference block in a reference picture relative to the position of the current block in the current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for uni-directional inter prediction, motion estimation unit 222 may provide a single motion vector, while for bi-directional inter prediction, motion estimation unit 222 may provide two motion vectors. Then, the motion compensation unit 224 may generate a prediction block using the motion vector. For example, the motion compensation unit 224 may use the motion vectors to retrieve data of the reference block. As another example, if the motion vector has fractional sample precision, the motion compensation unit 224 may interpolate values for the prediction block according to one or more interpolation filters. Furthermore, for bi-directional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by respective motion vectors and combine the retrieved data, e.g., by sample-wise averaging or weighted averaging.

As another example, for intra-prediction or intra-prediction coding, the intra-prediction unit 226 may generate a prediction block from samples adjacent to the current block. For example, for directional modes, the intra prediction unit 226 may generally mathematically combine values of neighboring samples and pad these calculated values in a defined direction across the current block to produce a prediction block. As another example, for the DC mode, the intra prediction unit 226 may calculate an average value of neighboring samples of the current block, and generate the prediction block to include the resulting average value for each sample of the prediction block.

The mode selection unit 202 supplies the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original, unencoded version of the current block from the video data memory 230 and the prediction block from the mode selection unit 202. The residual generation unit 204 calculates a sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine differences between sample values in the residual block to generate the residual block using Residual Differential Pulse Code Modulation (RDPCM). In some examples, residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.

In an example where mode selection unit 202 partitions a CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs having various sizes. As noted above, the size of a CU may refer to the size of the luma coding block of the CU, while the size of a PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2Nx2N, video encoder 200 may support PU sizes of 2Nx2N or NxN for intra prediction, and 2Nx2N, 2NxN, Nx2N, NxN, or similar symmetric PU sizes for inter prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter prediction.

In examples where the mode selection unit does not further partition a CU into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As described above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 may support CU sizes of 2Nx2N, 2NxN, or Nx 2N.

As described above, the residual generation unit 204 receives video data for the current block and the corresponding prediction block. Then, the residual generating unit 204 generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates a sample-by-sample difference between the prediction block and the current block. Therefore, the temperature of the molten metal is controlled,

transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form a block of transform coefficients. For example, the transform processing unit 206 may apply Discrete Cosine Transform (DCT), directional transform, Karhunen-Loeve transform (KLT), or conceptually similar transform to the residual block. In some examples, transform processing unit 206 may perform a variety of transforms on the residual block, e.g., a primary transform and a secondary transform (such as a rotational transform). In some examples, transform processing unit 206 does not apply a transform to the residual block.

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

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

The filter unit 216 may perform one or more filter operations on the reconstructed block. For example, filter unit 216 may perform deblocking operations to reduce blocking artifacts along edges of the CU. In some examples, the operation of the filter unit 216 may be skipped.

The video encoder 200 stores the reconstructed block in the DPB 218. For example, in an example in which operation of the filter unit 216 is not required, the reconstruction unit 214 may store the reconstructed block into the DPB 218. In examples where operation of the filter unit 216 is required, the filter unit 216 may store the filtered reconstructed block into the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve reference pictures formed of reconstructed (and potentially filtered) blocks from the DPB 218 to inter-predict blocks of subsequently encoded pictures. In addition, the intra-prediction unit 226 may intra-predict other blocks in the current picture using reconstructed blocks of the current picture in the DPB 218.

In general, entropy encoding unit 220 may entropy encode syntax elements received from other functional components of video encoder 200. For example, entropy encoding unit 220 may entropy encode the quantized transform coefficient block from quantization unit 208. As another example, entropy encoding unit 220 may entropy encode the prediction syntax elements (e.g., motion information for inter prediction or intra mode information for intra prediction) from mode selection unit 202. Entropy encoding unit 220 may perform one or more entropy encoding operations on syntax elements, which is another example of video data, to generate entropy encoded data. For example, entropy encoding unit 220 may perform a Context Adaptive Variable Length Coding (CAVLC) operation, a CABAC operation, a variable-variable (V2V) length coding operation, a syntax-based context adaptive binary arithmetic coding (SBAC) operation, a Probability Interval Partitioning Entropy (PIPE) coding operation, an exponential golomb encoding operation, or another type of entropy encoding operation on data. In some examples, entropy encoding unit 220 may operate in a bypass mode in which syntax elements are not entropy encoded.

The video encoder 200 may output a bitstream that includes entropy encoded syntax elements needed for reconstructing blocks of a slice or picture. Specifically, the entropy encoding unit 220 may output a bitstream.

The above operations are described with respect to blocks. Such a description should be understood as an operation for a luma coding block and/or a chroma coding block. As described above, in some examples, the luma and chroma coding blocks are luma and chroma components of a CU. In some examples, the luma and chroma coding blocks are luma and chroma components of the PU.

In some examples, the operations performed with respect to luma coded blocks need not be repeated for chroma coded blocks. As one example, the operations for identifying Motion Vectors (MVs) and reference pictures for luma coding blocks need not be repeated to identify MVs and reference pictures for chroma blocks. Specifically, the MVs for the luma coding blocks may be scaled to determine MVs for chroma blocks, and the reference pictures may be the same. As another example, the intra prediction process may be the same for luma and chroma coded blocks.

Video encoder 200 represents an example of a device configured to encode video data. Video encoder 200 includes a memory (e.g., video data memory 230) configured to store video data. The video encoder 200 also includes one or more processing units (e.g., motion estimation unit 222) implemented in circuitry. The video encoder 200 (e.g., the motion estimation unit 222) may be configured to generate a candidate list and determine whether two or more candidates in the candidate list have the same reference picture. The video encoder 200 (e.g., the motion estimation unit 222) may be configured to generate a spatio-temporal motion vector predictor (STMVP) based on two or more candidates in the candidate list having the same reference picture. The video encoder 200 may also be configured to encode a current block of video data using STMVP.

Fig. 4 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Fig. 4 is provided for purposes of explanation and is not intended to limit the technology broadly illustrated and described in this disclosure. For purposes of explanation, this disclosure describes video decoder 300 in terms of the techniques of HEVC and the h.266 video coding standard being developed. However, the techniques of this disclosure may be performed by video coding devices configured for other video coding standards.

In the example of fig. 4, the video decoder 300 includes a Coded Picture Buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a Decoded Picture Buffer (DPB) 314. The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include an addition unit that performs prediction according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra-block copy unit (which may form part of the motion compensation unit 316), an affine unit, a Linear Model (LM) unit, and the like. In other examples, video decoder 300 may include more, fewer, or different functional components.

The CPB memory 320 may store video data to be decoded by the components of the video decoder 300, such as an encoded video bitstream. For example, the video data stored in the CPB memory 320 may be obtained from the computer-readable medium 110 (fig. 1). The CPB memory 320 may include CPBs that store encoded video data (e.g., syntax elements) from an encoded video bitstream. Furthermore, the CPB memory 320 may store video data other than syntax elements of coded pictures, such as temporary data representing the output from various units of the video decoder 300. The DPB314 typically stores decoded pictures that the video decoder 300 may output and/or use as reference video data in decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and DPB314 may be formed from any of a variety of memory devices, such as Dynamic Random Access Memory (DRAM), including synchronous DRAM (sdram), magnetoresistive ram (mram), resistive ram (rram), or other types of memory devices. The CPB memory 320 and DPB314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300 or off-chip with respect to those components.

Additionally or alternatively, in some examples, video decoder 300 may retrieve the coded video data from memory 120 (fig. 1). That is, the memory 120 may utilize the CPB memory 320 to store data as discussed above. Also, when some or all of the functions of the video decoder 300 are implemented in software to be executed by processing circuitry of the video decoder 300, the memory 120 may store instructions to be executed by the video decoder 300.

The respective units shown in fig. 4 are explained to help understand the operations performed by the video decoder 300. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Similar to fig. 3, fixed function circuitry refers to circuitry that provides a particular function and is pre-configured with respect to operations that may be performed. Programmable circuitry refers to circuitry that can be programmed to perform various tasks and provide flexible functionality in operations that can be performed. For example, the programmable circuitry may execute software or firmware that causes the programmable circuitry to operate in a manner defined by the instructions of the software or firmware. Fixed function circuitry may execute software instructions (e.g., to receive parameters or output parameters), but the type of operations performed by the fixed function circuitry is typically immutable. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be integrated circuits.

The video decoder 300 may include an ALU, EFU, digital circuitry, analog circuitry, and/or a programmable core formed from programmable circuitry. In examples in which the operations of video decoder 300 are performed by software executing on programmable circuitry, on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by video decoder 300.

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

In general, the video decoder 300 reconstructs pictures on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (wherein a block currently being reconstructed (i.e., decoded) may be referred to as a "current block").

Entropy decoding unit 302 may entropy decode syntax elements that define quantized transform coefficients of a quantized transform coefficient block and transform information such as a Quantization Parameter (QP) and/or a transform mode indication. Inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a degree of quantization and, likewise, a degree of inverse quantization for application by inverse quantization unit 306. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thus form a transform coefficient block comprising transform coefficients.

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

Also, the prediction processing unit 304 generates a prediction block according to the prediction information syntax element entropy-decoded by the entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, the motion compensation unit 316 may generate a prediction block. In this case, the prediction information syntax element may indicate the reference picture in the DPB314 from which the reference block is to be retrieved, and a motion vector that identifies the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion compensation unit 316 may generally perform the inter prediction process in a substantially similar manner as described with respect to the motion compensation unit 224 (fig. 3).

As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra prediction unit 318 may generate the prediction block according to the intra prediction mode indicated by the prediction information syntax element. Again, intra-prediction unit 318 may generally perform the intra-prediction process in a substantially similar manner as described with respect to intra-prediction unit 226 (fig. 3). The intra prediction unit 318 may retrieve data of neighboring samples of the current block from the DPB 314.

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

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

The video decoder 300 may store the reconstructed block in the DPB 314. As discussed above, the DPB314 may provide reference information (such as samples of a current picture for intra prediction and a previously decoded picture for subsequent motion compensation) to the prediction processing unit 304. Further, video decoder 300 may output the decoded pictures from DPB314 for subsequent presentation on a display device, such as display device 118 of fig. 1.

In this manner, video decoder 300 represents an example of a video decoding device configured to decode video data. The video decoder 300 includes a memory (e.g., CPB memory 320) configured to store video data. The video decoder 300 includes one or more processing units (e.g., motion compensation unit 316) implemented in circuitry. The video decoder 300 (e.g., the motion compensation unit 316) may be configured to generate a candidate list and determine whether two or more candidates in the candidate list have the same reference picture. The video decoder 300 (e.g., the motion compensation unit 316) may also generate the STMVP based on two or more candidates in the candidate list having the same reference picture. The video decoder 300 may decode the current block of video data using STMVP.

FIG. 5 is a flow diagram illustrating an example method for encoding a current block. The current block may include a current CU. Although described with respect to video encoder 200 (fig. 1 and 2), it should be understood that other devices may be configured to perform methods similar to those of fig. 5.

In this example, the video encoder 200 initially predicts the current block (350). For example, the video encoder 200 may form a prediction block for the current block. The video encoder 200 (e.g., the motion estimation unit 222) may perform the techniques for generating STMVP as part of predicting the current block. For example, the video encoder 200 (e.g., the motion estimation unit 222) may generate a STMVP as shown in fig. 13 and described later in this disclosure. The video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, the video encoder 200 may calculate the difference between the original, unencoded block and the prediction block for the current block. The video encoder 200 may then transform and quantize the coefficients of the residual block (354). Next, video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after scanning, video encoder 200 may entropy encode the coefficients (358). For example, video encoder 200 may encode the coefficients using CAVLC or CABAC. The video encoder 200 may then output entropy encoded data for the block (360).

FIG. 6 is a flow diagram illustrating an example method for decoding a current block of video data. The current block may include a current CU. Although described with respect to video decoder 300 (fig. 1 and 3), it should be understood that other devices may be configured to perform methods similar to those of fig. 6.

The video decoder 300 may receive entropy encoded data for the current block (370), such as entropy encoded prediction information and entropy encoded data for coefficients of a residual block corresponding to the current block. The video decoder 300 may entropy decode the entropy encoded data to determine prediction information for the current block and reproduce coefficients of the residual block (372). The video decoder 300 may predict the current block, e.g., using an intra or inter prediction mode as indicated by the prediction information for the current block (374), to calculate a prediction block for the current block. The video decoder 300 (e.g., the motion compensation unit 316) may perform the techniques for generating STMVP as part of predicting the current block. For example, the video decoder 300 (e.g., the motion compensation unit 316) may generate a STMVP as shown in fig. 13 and described later in this disclosure. The video decoder 300 may then inverse scan the reproduced coefficients (376) to create blocks of quantized transform coefficients. The video decoder 300 may then inverse quantize and inverse transform the coefficients to produce a residual block (378). Finally, the video decoder 300 may decode the current block by combining the prediction block and the residual block (380).

The ITU-T Video Coding Experts Group (VCEG) (Q6/16) and ISO/IEC Moving Picture Experts Group (MPEG) (JTC 1/SC 29/WG 11) are studying the potential need for standardization of future video coding technologies with compression capabilities that significantly exceed the compression capabilities of the current HEVC standard, including its current and recent extensions to screen content coding and high dynamic range coding. These groups jointly engaged in this exploration activity in a joint collaboration called joint video expert group (jfet) to evaluate the compression technique design proposed by experts in this field. JVET meets the meeting for the first time between days 19-21 of 10 months in 2015. Chen et al, "Algorithm Description of Joint Exploration Test Model 7", ITU-T SG 16WP 3 and the Joint video expert group (JVET) of ISO/IEC JTC 1/SC 29/WG 11, conference 7, Dublin Italy, 7 months 13-21 years 2017, document JVET-G1001 is an algorithmic Description of the Joint Exploration Test Model 7 (JEM-7). Jfet is currently developing a JEM-based universal video coding (VVC) standard. The document JVET-K1001 (hereinafter referred to as "JVET-K1001") is a Draft of the VVC standard, in "Versatile Video Coding (Draft 2)" by Bross et al, the Joint Video experts group (JVET) of ITU-T SG 16WP 3 and ISO/IEC JTC 1/SC 29/WG 11, conference No. 11, Lumbuya, Schroentnie, 7 months, 10-18 days 2018.

In HEVC, the largest coding unit in a slice is referred to as a Coding Tree Block (CTB) or Coding Tree Unit (CTU). The CTB includes a quadtree, whose nodes are coding units. In the HEVC main profile, the size of the CTB may range from 16x16 to 64x64 (although 8x8 CTB sizes may be technically supported). The size of a CU may be the same as a CTB, but a CU may be as small as 8x 8. Furthermore, each CU is coded with one mode (i.e., inter-coding or intra-coding). A CU may be further partitioned into 2 or 4 PUs when the CU is inter coded, or become only one PU when further partitioning is not applicable. When two PUs are present in one CU, the two PUs may be a rectangle of half the size, or two rectangles of a size equal to 1/4 or 3/4 of the size of the CU. When a CU is inter coded, there is one set of motion information for each PU. In addition, each PU is coded with a unique inter prediction mode to derive a set of motion information.

In HEVC, for a PU, there are two inter prediction modes, referred to as merge mode and Advanced Motion Vector Prediction (AMVP) mode, respectively. In HEVC, skip mode is considered a special case of merge mode. In AMVP or merge mode, a Motion Vector (MV) candidate list is maintained for multiple motion vector predictors. The motion vector of the PU and the reference index in merge mode are generated by extracting one candidate from the MV candidate list. In HEVC, the MV candidate list includes up to 5 candidates for merge mode and only two candidates for AMVP mode. The merge candidates may contain a set of motion information, e.g., a motion vector and a reference index corresponding to two reference picture lists (list 0 and list 1). If a merge candidate is identified by a merge index, the reference picture is used for prediction of the current block and the associated motion vector. However, in AMVP mode, for each potential prediction direction from list0 or list1, the reference index is explicitly signaled along with the MV predictor (MVP) index to the MV candidate list, since the AMVP candidate only contains motion vectors. The reference index is a value that specifies a reference picture in a reference picture list. In AMVP mode, the predicted motion vector can be further refined. As can be seen above, the merge candidate corresponds to the complete motion information set, whereas the AMVP candidate contains only one motion vector for a particular prediction direction. Candidates for both modes are similarly derived from the same spatial and temporal neighboring blocks.

For a particular PU (PU)0) The spatial MV candidates may be derived from neighboring blocks shown in fig. 7A and 7B, but methods for generating the spatial MV candidates from the blocks are different for the merge and AMVP modes. Specifically, fig. 7A is a conceptual diagram illustrating example spatial neighboring motion vector candidates for the merge mode. Fig. 7B is a conceptual diagram illustrating example spatial neighboring motion vector candidates for the AMVP mode.

In merge mode, up to four spatial MV candidates may be derived using the order shown in fig. 7A. Specifically, the sequence is as follows: left side (0), top (1), upper right (2), lower left (3) and upper left (4). Thus, in merge mode, the MV candidate list may be included in the following order: a merging candidate derived from a block covering the left position (0), a merging candidate derived from a block covering the right position (1), a merging candidate derived from a block covering the upper right position (2), a merging candidate derived from a block covering the lower left position (3), a merging candidate derived from a block covering the upper left position (4).

In AMVP mode, neighboring blocks are divided into two groups. The first group is the left group consisting of blocks covering positions 0 and 1. The second group is the upper group consisting of blocks covering 2, 3 and 4, as shown in fig. 7B. For each group, the potential candidate that references the same reference picture in the neighboring block as indicated by the signaled reference index has the highest priority to be selected to form the final candidate for the group. It is possible that not all neighboring blocks contain motion vectors pointing to the same reference picture. Thus, if no such candidate can be found, the first available candidate is scaled to form the final candidate, and thus the time distance difference can be compensated for.

Fig. 8A and 8B are conceptual diagrams illustrating temporal motion vector prediction candidates. Fig. 8A shows an example of a TMVP candidate. The TMVP candidate (if enabled and available) is added to the MV candidate list after the spatial motion vector candidate. The process of motion vector derivation for the TMVP candidate is the same for both merge mode and AMVP mode, however, in merge mode the target reference index for the TMVP candidate is always set to 0, whereas in AMVP mode the reference picture index for the TMVP candidate is indicated by the signaled reference index.

The dominant block location for TMVP candidate derivation is the bottom right block outside the co-located PU (as shown in fig. 8A as block "T") to compensate for the bias to the top and left blocks used to generate the spatially neighboring candidates. However, if the block is located outside the current CTB line or motion information is not available, the block is replaced with the central block of the PU.

The motion vector for the TMVP candidate is derived from the collocated PU of the collocated picture indicated at the slice level. The motion vectors for co-located PUs are called co-located MVs.

Fig. 8B shows an example of MV scaling. To derive the TMVP candidate, the co-located MVs may need to be scaled to compensate for the temporal distance difference, as shown in fig. 8B.

For skip mode and merge mode, the video encoder 200 signals a merge index to indicate which candidate in the merge candidate list is used. In the skip mode and the merge mode, the video encoder 200 does not send an inter prediction indicator, a reference index, or an MVD. In merge mode, the video encoder 200 and the video decoder 300 consider two types of merge candidates: spatial Motion Vector Predictor (SMVP) and TMVP. For SMVP derivation, in the bit positionA maximum of four merge candidates are selected among the candidates of the positions as depicted in fig. 9. The order of derivation is A1→B1→B0→A0→(B2). Only when in position A1、B1、B0、A0Is unavailable or is intra coded or comes from location a after pruning1、B1、B0、A0Is less than four, then position B is considered2

In the derivation of TMVP, video encoder 200 (e.g., motion estimation unit 222) and video decoder 300 (e.g., motion compensation unit 316) derive a scaled motion vector based on a co-located PU that belongs to one of the reference pictures of the current picture within the signaled reference picture list. The video encoder 200 explicitly signals in the slice header the reference picture list to be used for deriving the co-located PU. The video encoder 200 and the video decoder 300 obtain the scaled motion vectors for the temporal merging candidate and the scaled motion vectors of the co-located PUs using Picture Order Count (POC) distances tb and td, where tb is defined as a POC difference between a reference picture of the current picture and the current picture, and td is defined as a POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of the temporal merging candidate is set to zero. A practical implementation of the scaling process is described in the HEVC draft specification. For a B slice, two motion vectors are obtained and combined to form bi-predictive merge candidates, one for reference picture list0 and the other for reference picture list 1.

As depicted in fig. 9, video encoder 200 (e.g., motion estimation unit 222) and video decoder 300 (e.g., motion compensation unit 316) select a co-located PU between two candidate locations C and H. Location C is used if the PU at location H is not available, either intra coded or outside the current CTU row. Otherwise, the position H is used to derive a temporal merging candidate.

In addition to SMVP and TMVP, there are two additional types of synthetic merge candidates: the bi-directional predicted MVP and the zero MVP are combined. The video encoder 200 (e.g., motion estimation unit 222) and the video decoder 300 (e.g., motion compensation unit 316) generate a combined bi-predictive MVP by utilizing SMVP and TMVP. The combined bi-predictive merging candidate is used for B slices only. For example, two candidates in the original merge candidate list with mvL0 and refIdxL0 or mvL1 and refIdxL1 are used to create a combined bi-predictive merge candidate.

In the process of candidate selection, the video encoder 200 (e.g., the motion estimation unit 222) and the video decoder 300 (e.g., the motion compensation unit 316) remove candidates from the candidate list that have the same motion parameters as previous candidates in processing order. This process is defined as a pruning process. Furthermore, candidates within the same Merge Estimation Region (MER) are not considered in order to assist the parallel merge process. Redundant partition shapes are avoided so as not to emulate virtual 2Nx2N partitions.

Between each generation step, if the number of candidates reaches MaxNumMergeCand, the derivation process is stopped. Under current common test conditions, MaxNumMergeCand is set equal to 5. Since the number of candidates is constant, the index of the best merging candidate is encoded using truncated unary binarization.

Several other aspects of the merge mode and AMVP mode are worth mentioning as follows. For example, the video encoder 200 and the video decoder 300 may perform motion vector scaling. It is assumed that the value of the motion vector is proportional to the distance of the picture in presentation time. The motion vector associates two pictures: reference pictures and pictures that contain motion vectors (i.e., contain pictures). When one motion vector is used to predict another motion vector, the distance between the included picture and the reference picture is calculated based on the POC value.

For a motion vector to be predicted, both its associated containing picture and reference picture may be different. Therefore, a new distance (based on POC) is calculated. Video encoder 200 (e.g., motion estimation unit 222) and video decoder 300 (e.g., motion compensation unit 316) may scale the motion vectors based on the two POC distances. For spatial neighboring candidates, the included pictures for the two motion vectors are the same, while the reference pictures are different. In HEVC, motion vector scaling applies to both TMVP and AMVP for spatial and temporal neighbor candidates.

In another example, the video encoder 200 (e.g., the motion estimation unit 222) and the video decoder 300 (e.g., the motion compensation unit 316) may perform artificial motion vector candidate generation. If the motion vector candidate list is not complete, an artificial motion vector candidate may be generated and inserted at the end of the list until the list has a complete candidate set. Artificial motion vector candidates are artificial in the sense that they do not express motion vectors of any available spatial or temporal neighboring blocks.

In merge mode, there are two types of artificial MV candidates: (1) a combination candidate and (2) a zero candidate. If the first type does not provide enough artificial candidates to fill the MV candidate list, the video coder includes one or more zero candidates in the MV candidate list. The zero candidate is a candidate specifying a motion vector having a size of 0. The combination candidates are derived only for B slices. For each pair of candidates that is already in the candidate list and has the necessary motion information, the video coder may derive a bi-directionally combined motion vector candidate as a combination of: the motion vector of the first candidate in the pair (where the motion vector of the first candidate refers to a picture in list0) and the motion vector of the second candidate in the pair (where the motion vector of the second candidate refers to a picture in list 1).

In another example, a video coder (e.g., video encoder 200 or video decoder 300) may perform a pruning process for candidate insertions. The candidates from different blocks may be exactly the same, which reduces the efficiency of merging/AMVP candidate lists. A pruning process may be applied to address this problem. The pruning process compares one candidate with the other candidates in the current candidate list to avoid inserting the same candidate to some extent. To reduce complexity, the pruning process is applied to a limited number of candidates, rather than comparing each potential candidate to all others.

Advanced temporal motion vector prediction is proposed to allow each PU to obtain multiple sets of motion information (including motion vectors and reference pictures). The motion information in the Advanced Temporal Motion Vector Predictor (ATMVP) is only from reference pictures. To derive the ATMVP of the current PU, the first step is to determine where the temporal motion vector will be taken from. This step of the advanced temporal motion vector prediction process finds the first available motion vector in the five neighboring blocks in the order left, up, right up, left down and left up. The definition of the five neighboring blocks is the same as the spatial merging candidate of the current PU. For example, as shown in fig. 9, the five adjacent blocks are a0, a1, B0, B1, and B2. To avoid the repeated scanning process of the neighboring blocks, the video encoder 200 and the video decoder 300 may find the motion vector of the first merge candidate only in the already derived merge candidate list to determine from where to take the temporal motion vector. The PU is split into square NxN sub-PUs (e.g., N is set to 4). The motion vectors of the sub-PUs are derived recursively in raster scan order.

Fig. 10 is a conceptual diagram illustrating sub-PU motion prediction from a reference picture. In fig. 10, the temporal vector of the current picture 1000 is shown as pointing to the reference picture 1002. In fig. 10, a current picture 1000 is denoted as "current", and a reference picture 1002 is denoted as "reference". The PU 1004 in the reference picture 1002 is shown divided into four sub-PUs 1006A, 1006B, 1006C, 1006D, each having its own motion vector. The present disclosure may collectively refer to sub-PUs 1006A, 1006B, 1006C, and 1006D as "sub-PU 1006".

Further, as shown in the example of fig. 10, the video encoder 200 and the video decoder 300 may generate ATMVP using the motion vectors of the sub-PU 1006. For example, in the example of fig. 10, motion source picture 1008 includes sub-PU 1010. The motion source picture 1008 may be the same picture as the reference picture 1002, and the sub-PU 1010 may be one of the sub-PUs 1006. In the example of fig. 10, the moving source picture 1008 is denoted as "moving source picture". If the motion vector for sub-PU 1010 points to a reference picture 1012 that is 30 pictures away from the motion source picture 1008, ATMVP may point to a reference picture 1014 that is 30 pictures away from the current picture 1000. In the example of fig. 10, reference picture 1012 is denoted as "reference picture of source picture". In the example of fig. 11, the reference picture 1014 is denoted as "target reference picture of current picture".

The spatio-temporal motion vector predictor (STMVP) considers not only the temporal motion vector predictor but also the spatial motion vector predictor. By averaging the motion information of two spatial motion vector predictors and one temporal motion vector predictor, the video coder may generate additional merge candidates (i.e., STMVP) for each sub-PU to achieve further Bjontegaard-delta (bd) rate reduction.

To derive the STMVP, the video coder may use two spatial neighbors and one temporal motion predictor to derive the motion vector in each sub-PU. The process for deriving STMVP is described with respect to fig. 11A. Fig. 11A is a conceptual diagram illustrating an example of one PU having four sub-blocks and its neighboring blocks. In the process for deriving the STMVP, the PU is split into square N × N sub-PUs (e.g., where N is set to 4). The video coder may recursively derive the motion vectors for the sub-PUs in raster scan order. Thus, the STMVP for a block may include a set of motion information (e.g., motion vectors and reference indices) for each of the sub-PUs of the block. In the example of FIG. 11A, the 8 × 8PU 1100 contains four 4 × 4 sub-PUs 1102A, 1102B, 1102C, and 1102D (collectively, "sub-PUs 1102"). In the example of FIG. 11A, the sub-PUs 1102 are labeled A, B, C and D. In fig. 11A, neighboring nxn blocks 1104A, 1104B, 1104C, and 1104D (collectively, "neighboring blocks 1104") in the current frame are labeled as a, B, C, and D.

To derive the motion vector of sub-PU a, the video coder uses two spatial neighbors 1104B and 1104C (B and C) and one temporal motion vector predictor for 1102d (d). Thus, if the video coder is using a sub-PU to generate a uni-directionally predicted STMVP (i.e., a uni-directionally predicted sub-PU STMVP), the video coder may (1) set the X-component of the list X motion vector of sub-PU 1102a (a) to the X-component of the list X motion vector of spatial neighbors 1104B and 1104C (B and C) and the average of the temporal motion predictors used for 1102d (d), and (2) set the y-component of the list X motion vector of sub-PU 1102a (a) to the y-component of the list X motion vector of spatial neighbors 1104B and 1104C (B and C) and the average of the temporal motion predictors used for 1104d (d), where X is 0 or 1. If the video coder is generating a bi-directionally predicted sub-PU STMVP, the video coder may determine the X and Y components of the list X motion vector for sub-PU 1102a (a) in the same manner as described above, and may determine the X and Y components of the list Y motion vector for sub-PU 1102a (a) in the same manner (replacing X with Y).

In some examples, the video coder uses two spatial neighbors and one temporal motion vector predictor to generate a STMVP for each of the sub-PUs. For example, the video coder may use the top and left neighbors of the current sub-PU and temporal motion vector predictors. For sub-PU 1102B, the video coder may use 1104B and 1104D (B and D) and the temporal motion vector predictor for 1102D (D). For sub-PU 1102C, the video coder may use 1104A and 1104C (a and C) and the temporal motion vector predictor for 1102d (d). For sub-PU 1102D, the video coder may use 1104A and 1104D (a and D) and the temporal motion vector predictor for 1102D (D).

In other examples, a video coder may use top and left neighbors as well as temporal motion vector predictors. For example, for sub-PU 1102B, the video coder may use 1104D and 1102A (D and a) and the temporal motion vector predictor for 1102D (D). For sub-PU 1102C, the video coder may use 1104A and 1102A (a and a) and the temporal motion vector predictor for 1102d (d). For sub-PU 1102D, the video coder may use 1102B and 1102C and the temporal motion vector predictor for 1102D.

Fig. 11B shows another process for deriving STMVP. In the example of FIG. 11B, the 8 × 8PU 1110 includes four 4 × 4 sub-PUs 1112A, 1112B, 1112C, and 1112D (collectively, "sub-PUs 1112"). sub-PU 1112 is labeled A, B, C and D. In fig. 11B, adjacent nxn blocks 1114A, 1114B, 1114C, and 1114D (collectively, "adjacent blocks 1114") in the current frame are labeled a, B, C, and D.

In the example of fig. 11B, the video coder uses two spatial neighbors 1114B and 1114C (B and C) and two temporal motion predictors 1112B and 1112C (B and C), instead of one temporal motion predictor, to derive the motion of sub-PU 1112a (a).

Non-neighboring spatial merge candidate prediction techniques may be used for future video coding standards, such as VVC. By using non-adjacent spatial merging candidates, the merging candidate list may be increased in size and filled with non-adjacent spatial neighboring blocks. Fig. 12 is a conceptual diagram illustrating an example spatial neighboring block for deriving spatial merging candidates. Fig. 12 depicts five sets of spatial neighboring blocks labeled as sets 1-5. Group 1 is a group of adjacent spatial neighboring blocks and represents blocks a0, a1, B0, B1, and B2 as shown in fig. 9. Groups 2-5 are non-adjacent spatial neighboring blocks. The video encoder 200 and the video decoder 300 may use non-adjacent spatial neighboring blocks as merging candidates from group 2, group 3, group 4, and/or group 5.

The non-sub-PU STMVP prediction mode may be used for future video coding standards, such as VVC. Fig. 13 is a conceptual diagram illustrating an example of a non-sub-PU spatio-temporal motion vector predictor. In the example of fig. 13, a maximum of 2 upper positions and 2 left positions are checked, namely (position _2(PU _ width-1, -1), position _6(PU _ width x2, -1)) (shown as positions 2 and 6), and (position _1(-1, PU _ height-1), 5(-1, PU _ height x 2)) (shown as positions 1 and 5). The non-sub-PU STMVP is generated by averaging 3 candidates including 2 spatial candidates and 1 temporal candidate. If only two candidates are available, the STMVP is generated by averaging the two candidates. If only one candidate is available, then STMVP is just that one motion vector.

For example, to generate a uni-directionally predicted non-sub-PU STMVP by averaging two or more candidates, a video encoder (e.g., video encoder 200 or video decoder 300) may set the x-components of the list a motion vectors of the uni-directionally predicted non-sub-PU STMVP to the average of the x-components of the list a motion vectors of these candidates, where a is 0 or 1. In addition, the video coder may set the y-component of the list a motion vector of the uni-predictive non-sub-PU STMVP to the average of the y-components of these candidate list a motion vectors. To generate a bi-directionally predicted non-sub-PU STMVP by averaging two or more candidates, the video coder may (1) set the x-component of the list a motion vector of the bi-directionally predicted non-sub-PU STMVP to the average of the x-components of the list a motion vectors of these candidates, where a is 0 or 1; (2) setting the y-component of the list a motion vector of the bi-directionally predicted non-sub-PU STMVP to the average of the y-components of these candidate list a motion vectors; (3) setting the x-component of the list B motion vector of the bi-directionally predicted non-sub-PU STMVP to the average of the x-components of these candidate list B motion vectors, where B is 1-a; and (4) set the y-component of the list B motion vector of the bi-directionally predicted non-sub-PU STMVP to the average of the y-components of these candidate list B motion vectors.

The history-based motion vector prediction (HMVP) prediction mode may be used for future video coding standards, such as VVC. In the case of HMVP, the video coder generates a table with multiple HMVP candidates during the encoding and decoding process. The video coder populates the table with the motion vectors used by the previous blocks. The video coder applies a first-in-first-out (FIFO) rule to update the table, and the video coder also uses redundancy checks when inserting new HMVP candidates into the table. The video coder may update the table when encoding/decoding the inter-predicted CU. The video coder may use the HMVP table in merge mode and/or AMVP mode. In merge mode, the video coder may add the motion vector predictor in the HMVP table to the merge candidate list.

The examples of the present disclosure provided in the present disclosure may be used in combination or individually. These examples may be performed by either or both of video encoder 200 and video decoder 300.

In many video standards and video encoder and decoder implementations, the generation of STMVP requires a motion vector scaling operation. As described above, a video coder may generate STMVP for a block of a current picture by averaging the motion vectors of three motion vector predictors: two spatial motion vector predictors and one temporal motion vector predictor. In general, motion information of three motion vector predictors indicates positions in a reference picture corresponding to the same object. For example, the motion information of the three motion vector predictors may indicate a position in the reference picture corresponding to a headlight of a car that is moving from left to right in the video scene. If a first motion vector predictor of the three motion vector predictors has motion information indicating a position in a first reference picture that is earlier than a second reference picture indicated by the motion information of the second and third motion vector predictors, a motion vector of the motion information of the first motion vector predictor may be too long or too short when used to indicate a position in the second reference picture. For example, in an example involving an automobile headlight, the motion vector of the first motion vector predictor may indicate a position located to the left of the position of the headlight in the second reference picture. Thus, to use the first motion vector predictor in STMVP, the video coder may scale the motion vector of the first motion vector predictor based on the distance between the POC value of the first reference picture and the POC value of the current picture and the distance between the POC value of the second reference picture and the POC value of the current picture. For example, if the distance between the POC value of the first reference picture and the POC value of the current picture is twice the distance between the POC value of the second reference picture and the POC value of the current picture, the video coder may reduce 1/2 the size of the motion vector of the first motion vector predictor.

However, motion vector scaling slows down the encoding and decoding process and complicates encoder and decoder design. For example, scaling the motion vectors needed for generating the STMVP may delay the process of generating the MV candidate list. The techniques of this disclosure remove motion vector scaling of STMVP from the video encoder 200 and video decoder 300 by generating the STMVP in a particular manner that avoids motion vector scaling. These techniques may speed up encoding and decoding, may simplify video encoder 200 and video decoder 300, and may allow parallel processing in many cases.

In accordance with the techniques of this disclosure, video encoder 200 and video decoder 300 may generate STMVP from candidates having the same reference picture. For example, the motion estimation unit 222 of the video encoder 200 may generate STMVP, and the motion compensation unit 316 may generate STMVP, as discussed below. The techniques of this disclosure may be used to generate sub-PU STMVP and non-sub-PU STMVP. The techniques of this disclosure may be used in the field of deriving motion vectors from two or more candidates. Furthermore, the present disclosure proposes that STMVP can be derived from candidates having the same reference picture.

Fig. 14 is a flow diagram of a method of decoding in accordance with the techniques of this disclosure. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate a candidate list for motion vector prediction (400), as discussed above with reference to fig. 9-13. For example, the video encoder 200 and the video decoder 300 may generate a candidate list comprising candidates derived from a first neighboring block and candidates derived from a second neighboring block, wherein the first neighboring block is a first available neighboring block from a neighboring block set located at a predefined position and the second neighboring block is a first available neighboring block among another neighboring block set located at the predefined position, as discussed above. Then, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may determine whether two or more candidates in the candidate list have reference pictures that are identical to each other (402), i.e., the motion vectors of these candidates point to the same reference picture. In other words, for any first candidate and second candidate in the candidate list, if: (1) the first candidate and the second candidate are uni-directional candidates and the first candidate and the second candidate have the same list0 reference picture, (2) the first candidate and the second candidate are uni-directional candidates and the first candidate and the second candidate have the same list1 reference picture, (3) the first candidate is a bi-directional candidate and the list0 reference picture is the same as the list0 motion vector of the second candidate, or (4) the first candidate is a bi-directional candidate and the list1 reference picture of the first candidate is the same as the list1 reference picture of the second candidate, the first candidate may be considered as having the same reference picture as the second reference picture. The list X reference picture is a reference picture in list X, and the list X motion vector is a motion vector indicating a position in the list X reference picture, where X is 0 or 1.

In the example of fig. 14, if none of the candidates in the candidate list have the same reference picture as any other of the candidates ("no" branch of 402), the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP without averaging any of the candidates (404). For example, the video coder may use the motion vector of TMVP as STMVP. In another example, a video coder may use a motion vector of a spatial motion vector predictor as the STMVP.

In some cases, the video encoder 200 and the video decoder 300 may use bi-prediction to generate a prediction block for a current block of video data. Fig. 15 is a conceptual diagram illustrating a bi-prediction technique according to the present disclosure. In the case of bi-prediction, the video encoder 200 and the video decoder 300 use motion vectors in two directions: towards a position in a reference picture in list0 and towards a position in a reference picture in list 1. In fig. 15, a current block 500 within a current picture 510 is shown. When bi-prediction is used, the current block 500 has a list0 motion vector 502 and a list1 motion vector 504. The video encoder 200 and the video decoder 300 determine a first preliminary prediction block corresponding to a position identified by the list0 motion vector 502 within the list0 reference picture 520. List0 reference picture 520 is a reference picture in reference picture list 0. In addition, the video encoder 200 and the video decoder 300 determine a second preliminary prediction block corresponding to a position identified by the list1 motion vector 504 within the list1 reference picture 530. List1 reference picture 530 is a picture in reference picture list 1. The video encoder 200 and the video decoder 300 may generate the prediction block for the current block 500 based on the first preliminary prediction block and the second preliminary prediction block. For example, each sample in the prediction block for the current block 500 may be equal to an average of corresponding samples in the first preliminary prediction block and the second preliminary prediction block.

Referring back to fig. 14, if bi-prediction is used (i.e., if the video coder is generating bi-predicted STMVP), and none of the candidates have the same reference picture in either direction (the "no" branch of 402), the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate STMVP in the list0 direction based on the motion vector of one of the candidates in the L0 direction, and may generate STMVP in the L1 direction based on the motion vector of the same candidate or a different candidate in the L1 direction (404). In other words, the video coder may generate the bi-predictive STMVP such that the list0 motion vector of the bi-predictive STMVP specifies a list0 motion vector of one of the candidates, and such that the list1 motion vector of the bi-predictive STMVP specifies a list1 motion vector of the same candidate or a different candidate.

In other examples, if no candidates have the same reference picture, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) do not generate STMVP.

If two or more of the candidates have reference pictures that are the same as each other ("yes" branch of 406), the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may select two or more candidates having reference pictures that are the same as each other and generate the STMVP based on motion vectors of the selected candidates (406). For example, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may generate the STMVP as an average of list0 motion vectors of two or more candidates having reference pictures that are the same as each other. In other examples, the STMVP may be generated as an average of list1 motion vectors of two or more candidates having reference pictures that are the same as each other. In other examples, the STMVP may be bi-directional, the list0 motion vector of the STMVP may be generated as an average of two or more candidate list0 motion vectors, and the list1 motion vector of the STMVP may be generated as an average of two or more candidate list1 motion vectors.

After generating the STMVP in act (404) or act (406), the video encoder 200 and the video decoder 300 may code a current block of video data using the generated STMVP (408). For example, to encode a current block of video data using the generated STMVP, video encoder 200 may determine a prediction block based on samples in a reference picture at a location indicated by the STMVP (or, in the case of sub-PU STMVP, at multiple locations). Then, the video encoder 200 may generate residual data indicating a difference between the current block and the reference block. As described elsewhere in this disclosure, video encoder 200 may apply a transform to residual data to generate transform coefficients, quantize the transform coefficients, and entropy encode syntax elements that indicate the quantized transform coefficients.

In some examples, to decode a current block of video data using the generated STMVP, video decoder 300 may determine a prediction block based on samples in a reference picture at a location indicated by the STMVP (or, in the case of sub-PU STMVP, at multiple locations). The video decoder 300 may then add the samples of the prediction block to the residual data to reconstruct the current block.

In some examples, as part of generating the STMVP in act (406), where bi-prediction is used (i.e., the video coder is generating bi-predicted STMVP) and no candidate has the same reference picture in one direction (e.g., list0) but two or more candidates have the same reference picture in another direction (e.g., list1), video encoder 200 and video decoder 300 may generate the STMVP in the direction where no candidate has the same reference picture (e.g., list0) based on a motion vector of a single candidate in the direction where no candidate has the same reference picture (e.g., list 0). The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP in the direction in which the candidates have the same reference picture (e.g., list1) based on the candidates having the same reference picture in the direction in which the candidates have the same reference picture (e.g., list 1). In other words, in act (406), to generate a bi-predictive STMVP based on candidates having the same reference picture when no candidate has the same list X reference picture but two or more candidates have the same list Y reference picture, the video coder may set a list X motion vector of the bi-predictive STMVP to a list X motion vector of one of the candidates and set a list Y motion vector of the bi-predictive STMVP to an average of the list Y motion vectors of the two or more candidates having the same list Y reference picture. In this example, X is equal to 0 or 1, and Y is equal to 1-X.

Referring back to fig. 13, in one example, STMVP is derived from an upper candidate 6 or 2, a left candidate 5 or 1, and TMVP. In this example, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may select the first available above candidate from 6 or 2 that has the same reference picture as the TMVP. If TMVP uses bi-prediction, the video encoder 200 and video decoder 300 may select candidates from 6 or 2 that have the same reference picture in both directions. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may select the first available left candidate having the same reference picture as the TMVP from 5 or 1. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP by averaging the first available above candidate, the first available left candidate, and the TMVP. If only one of the candidates has the same reference picture as the TMVP, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may average the candidate and the TMVP. If no candidate has the same reference picture as the TMVP, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may use one motion vector, such as the TMVP motion vector. It may be predefined in both video encoder 200 and video decoder 300 that video encoder 200 and video decoder 300 may check the top candidate and the left candidate to see if they have the same order of reference pictures as TMVP.

In some examples, if both the video encoder 200 and the video decoder 300 determine that neither spatial candidate has the same reference picture as the TMVP or that the TMVP is unavailable, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP from the two spatial candidates having the same reference picture. For example, in fig. 15, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may select a first available left candidate having the same reference picture as candidate 6 from 5 or 1, and then derive an STMVP from the left candidate and candidate 6. If video encoder 200 and video decoder 300 determine that neither of the left candidates has the same reference picture as candidate 6, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may select the first available left candidate from 5 or 1 that has the same reference picture as candidate 2 and derive the STMVP from the left candidate and candidate 2. In another example, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may select the first available above candidate from 6 or 2 that uses the same reference picture as candidate 5, and derive the STMVP from the above candidate and candidate 5. If video encoder 200 and video decoder 300 determine that neither of the above candidates has the same reference as candidate 5, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may select the first available left candidate from 6 or 2 that has the same reference picture as candidate 1 and derive the STMVP from the above candidate and candidate 1. It may be predefined in both video encoder 200 and video decoder 300 that video encoder 200 and video decoder 300 may check the top candidate and the left candidate to see if they have the same order of reference pictures as TMVP.

In some examples using bi-prediction, the video encoder 200 and the video decoder 300 may derive the STMVP in both directions separately. For example, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may derive the STMVP for the list0 direction, selecting the first upper available candidate from 6 or 2 that has the same reference picture as the TMVP in list 0. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may select the first available left candidate from 5 or 1 that has the same reference picture as the TMVP in list 0. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP in the list0 direction by averaging the selected above candidate, the selected left candidate, and the TMVP in the list0 direction. If only one of the candidates has the same reference picture as the TMVP in the list0 direction, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may average the candidates and the TMVP in the list0 direction. If no candidate has the same reference picture as the TMVP in the list0 direction, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may use one motion vector in the list0 direction, such as the TMVP motion vector in the list0 direction. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP in the list1 direction in the same manner. It may be predefined in both the video encoder 200 and the video decoder 300 that the video encoder 200 and the video decoder 300 may check the top candidate and the left candidate to see if they have the same order of reference pictures as TVMP.

In other examples, when using bi-prediction, if the video encoder 200 and the video decoder 300 determine that neither spatial candidate has the same reference picture as the TMVP in the list0 direction or that the TMVP is unavailable, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP from the two spatial candidates. For example, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may select a first available left candidate from 5 or 1 that has the same reference picture in the list0 direction as candidate 6, and then derive the STMVP in the list0 direction from the left candidate and candidate 6. If neither of the left candidates has the same reference picture as candidate 6, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may select the first available left candidate from 5 or 1 that has the same reference picture as candidate 2 in the list0 direction, and then derive the STMVP in the list0 direction from the left candidate and candidate 2. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP in the list1 direction in the same manner.

In another example, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may select the first available above candidate in 6 or 2 that has the same reference as candidate 5 in the list0 direction, and then derive the STMVP in the list0 direction from the above candidate and candidate 5. If video encoder 200 and video decoder 300 determine that neither of the above candidates has the same reference as candidate 5, video encoder 200 (e.g., motion estimation unit 222 of video encoder 200) and video decoder 300 (e.g., motion compensation unit 316 of video decoder 300) may select the first available left candidate of 6 or 2 that has the same reference as candidate 1 in the list0 direction, and derive the STMVP in the list0 direction from the above candidate and candidate 1. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP in the list1 direction in the same manner. It may be predefined in both the video encoder 200 and the video decoder 300 that the video encoder 200 and the video decoder 300 may check the top candidate and the left candidate to see if they have the same order of reference pictures as TVMP.

In another example of motion vector predictor list generation, in merge mode, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may select the first 2 available candidates in the merge list that have the same reference picture as the TMVP. Then, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP by averaging the first two candidates having the same reference picture as the TMVP and the TMVP itself. If the video encoder 200 and the video decoder 300 determine that only one of the candidates has the same reference picture as the TMVP, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP by averaging the candidate and the TMVP. If both the video encoder 200 and the video decoder 300 determine that the candidates do not have the same reference picture as the TMVP, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP from a single motion vector, such as the TMVP motion vector. It may be predefined in both the video encoder 200 and the video decoder 300 that the video encoder 200 and the video decoder 300 may check merge candidates to see if they have the same order of reference pictures as TVMP. For example, the order may be the same as the order of the candidates in the merge list, or a different order of the candidates in the merge list (e.g., the reverse order of the candidates in the merge list).

In another example of using bi-prediction to generate a motion vector predictor list, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP separately in both directions. For example, in merge mode, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may select a first candidate set that includes the first 2 available candidates in the merge list that have the same reference picture as the TMVP in the list0 direction. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP in the list0 direction by averaging the 3 candidates (i.e., the first 2 available candidates in the merge list that have the same reference picture as the TMVP in the list0 direction and the TMVP itself in the list0 direction). If the video encoder 200 and the video decoder 300 determine that only one of the candidates has the same reference picture as the TMVP in the list0 direction, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP by averaging the candidate and the TMVP. If both the video encoder 200 and the video decoder 300 determine that the candidates do not have the same reference picture as the TMVP, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP from a single motion vector, such as the TMVP motion vector. It may be predefined in both the video encoder 200 and the video decoder 300 that the video encoder 200 and the video decoder 300 may check merge candidates to see if they have the same order of reference pictures as TVMP. For example, the order may be the same as the order of the candidates in the merge list, or a different order of the candidates in the merge list (e.g., the reverse order of the candidates in the merge list). The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP in the list1 direction in the same manner but using a second candidate set, which may or may not be the same as the first candidate set.

In another example, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP from the TMVP and the candidates in the HMVP table. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may select the first 2 available candidates in the HMVP table that have the same reference picture as the TMVP. Then, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP by averaging the 3 candidates (i.e., the first 2 available candidates in the HMVP table that have the same reference picture as the TMVP and the TMVP itself). If the video encoder 200 and the video decoder 300 determine that only one candidate among the candidates in the HMVP table has the same reference picture as the TMVP, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP by averaging the candidate and the TMVP. If the video encoder 200 and the video decoder 300 determine that neither candidate in the HMVP table has the same reference picture as the TMVP, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP from a single motion vector, such as the TMVP motion vector. It may be predefined in both the video encoder 200 and the video decoder 300 that the video encoder 200 and the video decoder 300 may check the HMVP candidates to determine whether the HMVP candidates have the same order of reference pictures as the TVMP. For example, the order may be the same as the order of the candidates in the HMVP table, or may be the reverse order of the candidates in the HMVP table.

In one example of using bi-prediction to generate a motion vector predictor list (generation is bi-prediction), the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP separately in both directions from the TMVP and the candidates in the HMVP table. For example, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may select the first 2 available candidates in the HMVP table that have the same reference picture as the TMVP in the list0 direction. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP in the list0 direction by averaging the 3 candidates (i.e., the first 2 available candidates in the HMVP table that have the same reference picture as the TMVP in the list0 direction and the TMVP itself). If the video encoder 200 and the video decoder 300 determine that only one of the candidates in the HMVP table has the same reference picture as the TMVP in the list0 direction, the video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may generate the STMVP by averaging the candidate and the TMVP. If the video encoder 200 and the video decoder 300 determine that neither candidate in the HMVP table has the same reference picture as the TMVP in the list0 direction, the video encoder 200 and the video decoder 300 may generate the STMVP from a single motion vector, such as the TMVP motion vector. It may be predefined in both video encoder 200 and video decoder 300 that video encoder 200 and video decoder 300 may check the HMVP candidates to see if the HMVP candidates have the same order of reference pictures as TVMP in the list0 direction. For example, the order may be the same as the order of the candidates in the HMVP table, or may be the reverse order of the candidates in the HMVP table. The video encoder 200 (e.g., the motion estimation unit 222 of the video encoder 200) and the video decoder 300 (e.g., the motion compensation unit 316 of the video decoder 300) may derive the STMVP in the list1 direction in the same manner.

In some examples, video encoder 200 and video decoder 300 use different spatial candidates than those discussed above. Referring to fig. 12, the video encoder 200 and the video decoder 300 may select spatial candidates from any neighboring position, not just the neighboring positions of group 1. For example, the video encoder 200 and the video decoder 300 may use spatial candidates in group 2, group 3, group 4, and/or group 5. The spatial candidates that can be used by the video encoder 200 and the video decoder 300 may be predefined at both the encoder side (e.g., the video encoder 200) and the decoder side (e.g., the video decoder 300) or may be sent in parameter sets from the video encoder 200 to the video decoder 300.

In some examples, the location of the TMVP used by video encoder 200 and video decoder 300 to derive the STMVP may be the same as the location of the TMVP defined in HEVC. In other examples, the location of the TMVP used by video encoder 200 and video decoder 300 to derive the STMVP may be different from the location of the TMVP defined in HEVC. In some examples, video encoder 200 and video decoder 300 derive the TMVP from predefined corresponding blocks. The location of the TMVP used by the video encoder 200 and the video decoder 300 to derive the STMVP may be predefined at both the encoder side (e.g., the video encoder 200) and the decoder side (e.g., the video decoder 300) or may be sent in a parameter set from the video encoder 200 to the video decoder 300.

In some examples, video encoder 200 and video decoder 300 may derive more than one STMVP candidate. For example, the video encoder 200 and the video decoder 300 may derive the first STMVP and the second STMVP and include both in the candidate list. These STMVP candidates may be derived in accordance with any of the techniques of this disclosure.

In some examples, the position of the STMVP in a motion vector predictor list (such as a merge list) may be predefined at both the encoder side (e.g., video encoder 200) and decoder side (e.g., video decoder 300) or may be sent in a parameter set from video encoder 200 to video decoder 300. For example, the video encoder 200 and the video decoder 300 may add STMVP to the motion vector predictor list after the advanced TMVP.

In some examples, the location set of candidates for generating an STMVP, the location of the STMVP in the motion vector predictor list, and the number of STMVP candidates may be predefined on both the encoder side (e.g., video encoder 200) and the decoder side (e.g., video decoder 300) or may be signaled by video encoder 200 to video decoder 300 via a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), a slice header, or at the CU level.

It is to be appreciated that, according to an example, certain acts or events of any of the techniques described herein can be performed in a different order, may be added, merged, or omitted entirely (e.g., not all described acts or events are necessary for the practice of the techniques). Further, in some examples, actions or events may be performed concurrently, e.g., through multi-threaded processing, interrupt processing, or multiple processors, rather than sequentially.

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

By way of example, and not limitation, such computer-readable storage media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but are instead directed to non-transitory, tangible storage media. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

The instructions may be executed by one or more processors, such as one or more Digital Signal Processors (DSPs), general purpose microprocessors, an Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, the term "processor," as used herein may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated into a combined codec. Furthermore, the techniques may be implemented entirely within one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an Integrated Circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require implementation by different hardware units. Rather, as noted above, the various units may be combined in a codec hardware unit, or provided by a collection of interoperable hardware units (including one or more processors as noted above) in conjunction with appropriate software and/or firmware.

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

52页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:使用帧间预测的图像编码/解码方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类