Motion vector prediction
By using non-adjacent block motion vector predictors and intra-frame prediction modes in video coding technology, motion vector prediction is improved, solving the problem of low efficiency in existing motion vector prediction technologies and achieving more efficient video compression and transmission.
Patent Information
- Application Number
- CN202410971672.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2018-06-08
- Filing Date
- 2018-06-11
- Publication Date
- 2024-10-08
AI Technical Summary
In existing video coding technologies, motion vector prediction is inefficient, resulting in poor video compression and difficulty in transmitting high-quality video data under limited bandwidth.
By using non-neighboring block motion vector predictors (MVPs) to predict the motion vector of the current block, and combining intra-frame prediction mode and temporal motion vector predictor candidates, the accuracy and efficiency of motion vector prediction are improved.
It improves video compression efficiency, enables the transmission of higher quality video data with limited bandwidth, reduces network congestion, and enhances the performance of video codecs.
Smart Images

Figure CN118748721A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the application date of June 11, 2018, application number 201880038768.4 (PCT application number PCT / US2018 / 036883), and the invention name is motion vector prediction. This case claims the benefit of U.S. Provisional Patent Application No. 62 / 519,007 filed on June 13, 2017, the entire contents of which are incorporated by reference. Technical Field
[0002] The present disclosure relates to devices configured to perform video coding. Background Art
[0003] Digital video capabilities may be incorporated into a wide range of devices, including digital televisions, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, electronic book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones (so-called "smart phones"), video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video compression techniques, such as those defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (AVC), or the techniques described in ITU-T H.265, High Efficiency Video Coding (HEVC) standards, and extensions of these standards. Video devices may more efficiently transmit, receive, encode, decode, and / or store digital video information by implementing these video compression techniques.
[0004] Video compression techniques may perform 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 frame or a portion of a video frame) may be partitioned into video blocks, such as coding tree blocks and coding blocks. Spatial or temporal prediction generates a predictive block for the block to be coded. Residual data represents the pixel difference between the original block to be coded and the predictive block. For further compression, the residual data may be transformed from the pixel domain to the transform domain, thereby generating residual transform coefficients that may then be quantized. Summary of the invention
[0005] In general, this disclosure describes techniques related to motion vector prediction.The techniques of this disclosure may be applied to any of the existing video codecs, such as High Efficiency Video Coding (HEVC), or any future video coding standard.
[0006] In one example, the present invention describes a method of decoding video data, the method comprising: determining, by a video decoder, a motion vector of a non-neighboring block of a current picture of the video data, the non-neighboring block being non-neighboring to a current block of the current picture; determining, by the video decoder, a motion vector predictor (MVP) of the current block based on the motion vector of the non-neighboring block; determining, by the video decoder, a motion vector of the current block based on the MVP of the current block; determining, by the video decoder, a predictive block based on the motion vector of the current block; and reconstructing, by the video decoder, sample values of the current picture based on the predictive block.
[0007] In another example, the disclosure describes a method of encoding video data, the method comprising: determining, by a video encoder, a motion vector for a non-neighboring block of a current picture of the video data, the non-neighboring block being non-neighboring to a current block of the current picture; determining, by the video encoder, a motion vector predictor (MVP) for the current block based on the motion vectors of the non-neighboring blocks; determining, by the video encoder, a motion vector for the current block, wherein the motion vector is equal to a motion vector of the MVP of the current block or equal to the motion vector of the MVP of the current block plus a motion vector difference (MVD) signaled in a bitstream; determining, by the video encoder, a predictive block based on the motion vector of the current block; and generating, by the video encoder, residual sample values based on the predictive block.
[0008] In another example, the disclosure describes an apparatus for decoding video data, the apparatus comprising: one or more storage media configured to store video data; and one or more processors configured to: determine motion vectors for non-neighboring blocks of a current picture of the video data, the non-neighboring blocks being non-neighboring to a current block of the current picture; determine a motion vector predictor (MVP) for the current block based on the motion vectors of the non-neighboring blocks; determine a motion vector for the current block based on the MVP of the current block; determine a predictive block based on the motion vector of the current block; and reconstruct sample values of the current picture based on the predictive block.
[0009] In another example, the disclosure describes an apparatus for encoding video data, the method comprising: determining, by a video encoder, a motion vector of a non-neighboring block of a current picture of the video data, the non-neighboring block not being adjacent to a current block of the current picture; determining, by the video encoder, a motion vector predictor (MVP) for the current block based on the motion vector of the non-neighboring block; determining, by the video encoder, a motion vector for the current block, wherein the motion vector is equal to a motion vector of the MVP of the current block or equal to the motion vector of the MVP of the current block plus a motion vector difference (MVD) signaled in a bitstream; determining, by the video encoder, a predictive block based on the motion vector of the current block; and generating, by the video encoder, residual sample values based on the predictive block.
[0010] In another example, the disclosure describes an apparatus for decoding video data, the apparatus comprising: means for determining a motion vector for a non-neighboring block of a current picture of the video data, the non-neighboring block being non-neighboring to a current block of the current picture; means for determining a motion vector predictor (MVP) for the current block based on the motion vector of the non-neighboring block; means for determining the motion vector of the current block based on the MVP of the current block; means for determining a predictive block based on the motion vector of the current block; and means for reconstructing sample values of the current picture based on the predictive block.
[0011] In another example, the disclosure describes an apparatus for encoding video data, the apparatus comprising: means for determining a motion vector for a non-neighboring block of a current picture of the video data, the non-neighboring block being non-neighboring to a current block of the current picture; means for determining a motion vector predictor (MVP) for the current block based on the motion vector of the non-neighboring block; means for determining the motion vector of the current block, wherein the motion vector is equal to a motion vector of the MVP of the current block or equal to the motion vector of the MVP of the current block plus a motion vector difference (MVD) signaled in a bitstream; means for determining a predictive block based on the motion vector of the current block; and means for generating residual sample values based on the predictive block.
[0012] In another example, the present disclosure describes a computer-readable storage medium storing instructions that, when executed, cause one or more processors to: determine a motion vector for a non-neighboring block of a current picture of the video data, the non-neighboring block being non-neighboring to a current block of the current picture; determine a motion vector predictor (MVP) for the current block based on the motion vector of the non-neighboring block; determine a motion vector for the current block based on the MVP of the current block; determine a predictive block based on the motion vector of the current block; and reconstruct sample values of the current picture based on the predictive block.
[0013] In another example, the disclosure describes a computer-readable storage medium storing instructions that, when executed, cause one or more processors to: determine a motion vector for a non-neighboring block of a current picture of the video data, the non-neighboring block being non-neighboring to a current block of the current picture; determine a motion vector predictor (MVP) for the current block based on the motion vector of the non-neighboring block; determine a motion vector for the current block, wherein the motion vector is equal to a motion vector of the MVP of the current block or equal to the motion vector of the MVP of the current block plus a motion vector difference (MVD) signaled in a bitstream; determine a predictive block based on the motion vector of the current block; and generate residual sample values based on the predictive block.
[0014] The details of one or more aspects of the invention are described below in the drawings and detailed description. Other features, objectives, and advantages of the techniques described in this invention will be apparent from the detailed description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 2 is a block diagram of an example video encoding and decoding system that may employ one or more techniques described in this disclosure.
[0016] Figure 2 are examples of spatial and temporal neighboring motion vector candidates for merge / skip mode.
[0017] Figure 3 is an example of bilateral matching.
[0018] Figure 4 An example of template matching.
[0019] Figure 5 An example of unilateral motion estimation in frame rate up-conversion.
[0020] Figure 6 An example of decoder-side motion vector improvement based on bilateral template matching.
[0021] Figure 7An example of advanced temporal motion vector prediction motion prediction for a coding unit.
[0022] Figure 8 is an example of a coding unit with four sub-blocks and its neighboring blocks.
[0023] Fig. 9 Block diagram of a simplified affine motion model for the current affine block instance.
[0024] Fig.10 is an instance of a simplified affine motion model for the current affine block.
[0025] Fig.11 Example of a motion vector field for motion compensation prediction.
[0026] Fig.12 An instance of a stored motion vector field.
[0027] Fig.13 An example of motion vector prediction for AF_INTER.
[0028] Fig.14A FIG. 4 is a block diagram illustrating the selection order of candidate blocks for AF_MERGE.
[0029] Fig. 14B is a block diagram illustrating candidates for AF_MERGE if the lower left candidate block is coded in affine mode.
[0030] Fig.15 is a block diagram illustrating example non-adjacent blocks according to techniques of this disclosure.
[0031] Fig.16 is a block diagram illustrating an example of selection of non-adjacent blocks according to the techniques of this disclosure.
[0032] Fig.17 is a block diagram illustrating an example of selection of non-neighboring blocks based on parent blocks.
[0033] Fig.18A is a block diagram illustrating an example of position modification of non-adjacent blocks according to the techniques of this disclosure.
[0034] Fig.18B is a block diagram illustrating an example of position modification of non-adjacent blocks according to the techniques of this disclosure.
[0035] Fig.19A FIG. 5 is a block diagram illustrating an example of modifying a threshold value for non-neighboring blocks according to the techniques of this disclosure.
[0036] Fig.19B FIG. 5 is a block diagram illustrating an example of modifying a threshold value for non-neighboring blocks according to the techniques of this disclosure.
[0037] Fig. 20 is a block diagram illustrating an example of selection of non-adjacent blocks according to the techniques of this disclosure.
[0038] Fig.21 is a block diagram illustrating an example of selection of non-adjacent blocks according to the techniques of this disclosure.
[0039] Fig. 22 is a block diagram illustrating an example of selection of non-adjacent blocks according to the techniques of this disclosure.
[0040] Fig.23 is a block diagram illustrating an example of selection of non-neighboring blocks based on parent blocks according to techniques of this disclosure.
[0041] Fig.24 is a block diagram of an example video encoder that may implement one or more techniques described in this disclosure.
[0042] Fig.25 is a block diagram illustrating an example video decoder that may implement one or more techniques described in this disclosure.
[0043] Fig.26 A flowchart is shown illustrating example operation of a video encoder to encode video data in accordance with one or more techniques of this disclosure.
[0044] Fig. 27 is a flowchart illustrating example operation of a video decoder for decoding video data in accordance with one or more techniques of this disclosure.
[0045] Fig.28 2 is a flowchart illustrating example operations for determining NA-SMVP using frame rate up conversion (FRUC) motion vector candidates in accordance with the techniques of this disclosure.
[0046] Fig.29 is a flowchart illustrating example operation of a video encoder to include a synthesis candidate in a list of MVP candidates for a current block, in accordance with one or more techniques of this disclosure.
[0047] Fig.30 is a flowchart illustrating example operation of a video decoder to include a synthesis candidate in a list of MVP candidates for a current block, in accordance with one or more techniques of this disclosure.
[0048] Fig.31 is a flowchart illustrating example operation of a video encoder for encoding video data in accordance with the techniques of this disclosure.
[0049] Fig.32 is a flowchart illustrating example operation of a video decoder for decoding video data in accordance with the techniques of this disclosure.
[0050] Fig.33 is a flowchart illustrating example operation of a video encoder for encoding video data in accordance with the techniques of this disclosure.
[0051] Fig.34 is a flowchart illustrating example operation of a video decoder for decoding video data in accordance with the techniques of this disclosure.
[0052] Fig.35 is a flowchart illustrating example operation of a video encoder for encoding video data in accordance with the techniques of this disclosure.
[0053] Fig.36 is a flowchart illustrating example operation of a video decoder for decoding video data in accordance with the techniques of this disclosure. DETAILED DESCRIPTION
[0054] As video compression improves, the proportion of encoded data used to represent motion vectors has increased. Therefore, in order to achieve greater video compression, it may be necessary to improve the way motion vectors are encoded. Greater video compression needs to be achieved for many reasons, such as being able to send higher quality video data via existing infrastructure, reducing network congestion, etc. Motion vector prediction is a common way to reduce the amount of data used to encode the motion vectors of a block. In most motion vector prediction systems, the video encoder determines a list of motion vector predictors for the block, selects a motion vector predictor, and then signals the position in the list of the selected motion vector. The video decoder determines the same list of motion vector predictors and determines the selected motion vector predictor based on the data signaled in the bitstream. The video decoder can then use the motion vector predictor to determine one or more motion vectors for the block.
[0055] This disclosure describes techniques that can improve motion vector prediction by more fully utilizing reconstructed motion vector information, and thereby potentially improve video compression efficiency. For example, this disclosure describes techniques that use motion vector predictors from one or more blocks of a current picture that are not spatially adjacent to a current block of the current picture. In this example, a video coder (e.g., a video encoder or a video decoder) may determine motion vectors of non-adjacent blocks of a current picture of video data. The non-adjacent blocks are not adjacent to the current block of the current picture. Furthermore, in this example, the video coder may determine a motion vector predictor (MVP) of the current block based on the motion vectors of the non-adjacent blocks. The video coder may then determine (e.g., based on the MVP of the current block) a motion vector for the current block. Additionally, the video coder may determine a predictive block based on the motion vector of the current block.
[0056] In addition, this disclosure describes techniques for generating synthetic motion vector candidates. This disclosure also describes techniques for generating additional temporal motion vector predictor candidates. Additionally, this disclosure describes techniques for using intra prediction modes of one or more blocks of a current picture that are not spatially adjacent to a current block of the current picture to determine one or more most probable intra prediction modes in a set of most probable intra prediction modes for the current block. The techniques of this disclosure, or subcombinations thereof, may be used together or separately.
[0057] Figure 1 1 is a block diagram illustrating an example video encoding and decoding system 10 that may utilize the techniques of this disclosure. Figure 1 As shown in , system 10 includes a source device 12 that provides encoded video data to be later decoded by a destination device 14. Source device 12 may be an apparatus for encoding video data and destination device 14 may be an apparatus for decoding video data. Specifically, source device 12 provides encoded video data to destination device 14 via computer-readable medium 16. Source device 12 and destination device 14 may include any of a wide range of devices and equipment, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, tablet computers, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, and the like. In some cases, source device 12 and destination device 14 are equipped for wireless communication. Therefore, source device 12 and destination device 14 may be wireless communication devices. The techniques described in this disclosure may be applied to wireless and / or wired applications. Source device 12 is an example video encoding device (i.e., a device for encoding video data). Destination device 14 is an example video decoding device (ie, a device for decoding video data).
[0058] Figure 1 The illustrated system 10 of is only one example. The techniques for processing video data may be performed by any digital video encoding and / or decoding device. In some examples, the techniques may be performed by a video encoder / decoder (commonly referred to as a “codec”). Source device 12 and destination device 14 are examples of such decoding devices in which source device 12 generates coded video data for transmission to destination device 14. In some examples, source device 12 and destination device 14 operate in a substantially symmetrical manner such that each of source device 12 and destination device 14 includes video encoding and decoding components. Thus, system 10 may support one-way or two-way video transmission between source device 12 and destination device 14, such as for video streaming, video playback, video broadcasting, or video telephony.
[0059] exist Figure 11, source device 12 includes a video source 18, a storage medium 19 configured to store video data, a video encoder 20, and an output interface 22. Destination device 14 includes an input interface 26, a storage medium 28 configured to store encoded video data, a video decoder 30, and a display device 32. In other examples, source device 12 and destination device 14 include other components or arrangements. For example, source device 12 may receive video data from an external video source, such as an external camera. Likewise, destination device 14 may interface with an external display device rather than including an integrated display device.
[0060] Video source 18 is a source of video data. The video data may include a series of pictures. Video source 18 may include a video capture device, such as a video camera, a video archive containing previously captured video, and / or a video feed interface for receiving video data from a video content provider. In some examples, video source 18 generates computer graphics-based video data, or a combination of live video, archived video, and computer-generated video. Storage media 19 may be configured to store video data. In each case, the captured, pre-captured, or computer-generated video may be encoded by video encoder 20.
[0061] Output interface 22 may output the encoded video information to computer-readable medium 16. Output interface 22 may include various types of components or devices. For example, output interface 22 may include a wireless transmitter, a modem, a wired network connection component (such as an Ethernet card), or another physical component. In an example where output interface 22 includes a wireless transmitter, output interface 22 may be configured to transmit data modulated according to a cellular communication standard (such as 4G, 4G-LTE, Advanced LTE, 5G, etc.), such as encoded video data. In some examples where output interface 22 includes a wireless transmitter, output interface 22 may be configured to transmit data modulated according to other wireless standards (such as IEEE 802.11 specifications, IEEE 802.15 specifications (such as ZigBee TM ), Bluetooth TM The output interface 22 may be configured to receive data modulated by a video encoder 20 and / or output interface 22. ...
[0062] Destination device 14 may receive the encoded video data to be decoded via computer-readable medium 16. Computer-readable medium 16 may include any type of media or device capable of moving the encoded video data from source device 12 to destination device 14. In some examples, computer-readable medium 16 includes a communication medium to enable source device 12 to transmit the encoded video data directly to destination device 14 in real time. 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 routers, switches, base stations, or any other equipment that can be used to facilitate communication from source device 12 to destination device 14. Destination device 14 may include one or more data storage media configured to store the encoded video data and the decoded video data.
[0063] In some examples, output interface 22 may output data, such as encoded video data, to an intermediate device, such as a storage device. Similarly, input interface 26 of destination device 14 may receive encoded data from an intermediate device. The intermediate device may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing encoded video data. In some examples, the intermediate device corresponds to a file server. Examples of file servers include a web server, an FTP server, a network attached storage (NAS) device, or a local disk drive.
[0064] Destination device 14 may access the encoded video data through any standard data connection, including an Internet connection. Such a standard data connection may include a wireless channel (such as a Wi-Fi connection) suitable for accessing encoded video data stored on a file server, a wired connection (such as DSL, cable modem, etc.), or a combination of both. The transmission of the encoded video data from the storage device may be a streaming transmission, a download transmission, or a combination thereof.
[0065] Computer-readable medium 16 may include: temporary media, such as wireless broadcast or wired network transmission; or storage media (i.e., non-temporary storage media), such as a hard disk, flash drive, compact disc, digital video disc, Blu-ray disc, or other computer-readable media. In some examples, a network server (not shown) may receive encoded video data from source device 12 and provide the encoded video data to destination device 14, such as via network transmission. Similarly, a computing device of a media production facility, such as a disc stamping facility, may receive encoded video data from source device 12 and produce a disc containing the encoded video data. Therefore, in various examples, computer-readable medium 16 may be understood to include one or more computer-readable media in various forms.
[0066] The input interface 26 of the destination device 14 receives data from the computer-readable medium 16. The input interface 26 may include various types of components or devices. For example, the input interface 26 may include a wireless receiver, a modem, a wired network connection component (such as an Ethernet card), or another physical component. In examples where the input interface 26 includes a wireless receiver, the input interface 26 may be configured to receive data, such as a bit stream, modulated according to a cellular communication standard (such as 4G, 4G-LTE, Advanced LTE, 5G, etc.). In some examples where the input interface 26 includes a wireless receiver, the input interface 26 may be configured to receive data, such as a bit stream, modulated according to, for example, the IEEE 802.11 specification, the IEEE 802.15 specification (such as ZigBee TM), Bluetooth 5G, etc. TM The input interface 26 may be integrated into the circuitry of the video decoder 30 and / or other components of the destination device 14. For example, the video decoder 30 and the input interface 26 may be part of a SoC. The SoC may also include other components, such as a general-purpose microprocessor, a graphics processing unit, and the like.
[0067] Storage medium 28 may be configured to store encoded video data, such as the encoded video data (e.g., a bitstream) received by input interface 26. Display device 32 displays the decoded video data to a user. Display device 32 may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0068] Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the techniques are partially implemented in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium, and may execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of video encoder 20 and video decoder 30 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 a respective device. In some examples, video encoder 20 and video decoder 30 encode and decode video data according to a video coding standard or specification. For example, video encoder 20 and video decoder 30 may encode and decode video data according to ITU-T H.261, ISO / IEC MPEG-1 Visual, ITU-T H.262 or ISO / IEC MPEG-2 Visual, ITU-T H.263, ISO / IEC MPEG-4 Visual, and ITU-T H.264 (also known as ISO / IEC MPEG-4 AVC), including its scalable video coding (SVC) and multi-view video coding (MVC) extensions, or another video coding standard or specification. In some examples, video encoder 20 and video decoder 30 encode and decode video data according to High Efficiency Video Coding (HEVC), which is referred to as ITU-T H.265, its range and screen content coding extension, its 3D video coding extension (3D-HEVC), its multi-view extension (MV-HEVC), or its scalable extension (SHVC). HEVC, SHVC and 3D-HEVC have been developed by the Joint Collaboration Team on Video Coding (JCT-VC) and the Joint Collaboration Team on 3D Video Coding Extension Development (JCT-3V) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG).
[0069] ITU-T VCEG (Q6 / 16) and ISO / IEC MPEG (JTC 1 / SC 29 / WG 11) are now studying the potential need to standardize future video coding techniques that will significantly exceed the compression capabilities of the current HEVC standard, including its current extensions and near-term extensions for screen content coding and high dynamic range coding. The expert groups are working together on this exploratory activity in a joint collaborative effort known as the Joint Video Exploration Team (JVET) to evaluate compression technology designs proposed by experts in the field. JVET met for the first time during October 19-21, 2015. ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 Joint Video Exploration Team (JVET) 5th Meeting: Geneva, CH, 12-20 January 2017, document JVET E-1001, Chen et al. "Algorithm Description of Joint Exploration Test Model 5" is the algorithm description of Joint Exploration Test Model 6 (JEM5). ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 Joint Video Exploration Team (JVET) 6th Meeting: Hobart, AU, 31 March-7 April 2017, document JVET F-1001, Chen et al. "Algorithm Description of Joint Exploration Test Model 6" is the algorithm description of Joint Exploration Test Model 6 (JEM6). Video encoder 20 and video decoder 30 may operate according to the Joint Exploration Model or the new Versatile Video Coding (VVC) standard currently under development.
[0070] This disclosure may generally refer to "signaling" certain information, such as syntax elements. The term "signaling" may generally refer to the communication of syntax elements and / or other data used to decode encoded video data. This communication may occur in real time or near real time. Alternatively, this communication may occur over a span of time, such as when syntax elements in a bitstream are stored to a computer-readable storage medium at encoding time, which may then be retrieved by a decoding device at any time after being stored in such a medium.
[0071] In HEVC and other video coding specifications, video data includes a series of pictures. A picture may also be referred to as a "frame". A picture may include one or more sample arrays. Each respective sample array of a picture may include a sample array of a respective color component. A picture may include three sample arrays, indicated as S L , S Cb and S Cr . SL is a two-dimensional array (i.e., block) of luma samples. Cb is a two-dimensional array of Cb chrominance samples. Cr is a two-dimensional array of Cr chrominance samples. In other cases, the picture may be monochrome and may only include an array of luma samples.
[0072] As part of encoding video data, video encoder 20 may encode a picture of the video data. In other words, video encoder 20 may generate an encoded representation of a picture of the video data. The encoded representation of a picture may be referred to herein as a "coded picture" or "encoded picture."
[0073] To generate an encoded representation of a picture, video encoder 20 may encode a block of the picture. Video encoder 20 may include an encoded representation of the video block in a bitstream. In some examples, to encode a block of a picture, video encoder 20 performs intra-frame prediction or inter-frame prediction to generate one or more predictive blocks. In addition, video encoder 20 may generate residual data for the block. The residual block includes residual samples. Each residual sample may indicate the difference between a sample of one of the generated predictive blocks and a corresponding sample of the block. In this way, video encoder 20 may generate residual sample values based on the predictive block. Video encoder 20 may apply a transform to a block of residual samples to generate transform coefficients. In addition, video encoder 20 may quantize the transform coefficients. In some examples, video encoder 20 may generate one or more syntax elements to represent the transform coefficients. Video encoder 20 may entropy encode one or more of the syntax elements representing the transform coefficients.
[0074] More specifically, when encoding video data according to HEVC or other video coding specifications, to generate an encoded representation of a picture, video encoder 20 may partition each sample array of the picture into coding tree blocks (CTBs) and encode the CTBs. A CTB may be an NxN block of samples in the sample array of a picture. In the HEVC Main specification, the size of a CTB may range from 16x16 to 64x64 (although an 8x8 CTB size may technically be supported).
[0075] A coding tree unit (CTU) of a picture may include one or more CTBs and may include syntax structures used to encode samples of the one or more CTBs. For example, each CTU may include a CTB for luma samples, two corresponding CTBs for chroma samples, and syntax structures used to encode samples of the CTBs. In a monochrome picture or a picture with three separate color planes, a CTU may include a single CTB and a syntax structure used to encode samples of the CTB. A CTU may also be referred to as a "tree block" or a "largest coding unit" (LCU). In this disclosure, a "syntax structure" may be defined as zero or more syntax elements presented together in a bitstream in a specified order. In some codecs, an encoded picture is an encoded representation containing all CTUs of a picture.
[0076] To encode a CTU of a picture, the video encoder 20 may partition the CTB of the CTU into one or more coding blocks. A coding block is an N×N block of samples. In some codecs, to encode a CTU of a picture, the video encoder 20 may recursively perform quadtree partitioning on the coding tree blocks of the CTU to partition the CTB into coding blocks, hence the name “coding tree unit”. A coding unit (CU) may include one or more coding blocks and a syntax structure for encoding samples of the one or more coding blocks. For example, a CU may include a coding block of luma samples of a picture having a luma sample array, a Cb sample array, and a Cr sample array, and two corresponding coding blocks of chroma samples, and a syntax structure for encoding samples of the coding block. In a monochrome picture or a picture with three separate color planes, a CU may include a single coding block and a syntax structure for encoding the samples of the coding block. In HEVC, the largest coding unit in a slice is referred to as a coding tree block (CTB) or a coding tree unit (CTU). The CTB contains a quadtree whose nodes are CUs. The size of the CTB can range from 16x16 to 64x64 in the HEVC Main specification (although 8x8 CTB size is technically supported). A coding unit (CU) can be the same size as a CTB and can be as small as 8x8. Each coding unit is coded using one mode.
[0077] In addition, video encoder 20 may encode a CU of a picture of video data. In some codecs, as part of encoding a CU, video encoder 20 may partition the coding block of the CU into one or more prediction blocks. A prediction block is a rectangular (i.e., square or non-square) block of samples for which the same prediction is applied. A prediction unit (PU) of a CU may include one or more prediction blocks of the CU and syntax structures used to predict the one or more prediction blocks. For example, a PU may include a prediction block of luma samples, two corresponding prediction blocks of chroma samples, and syntax structures used to predict the prediction blocks. In a monochrome picture or a picture with three separate color planes, a PU may include a single prediction block and syntax structures used to predict the prediction block.
[0078] The video encoder 20 may generate predictive blocks (e.g., luma, Cb, and Cr predictive blocks) for prediction blocks (e.g., luma, Cb, and Cr prediction blocks) of PUs of a CU. The video encoder 20 may use intra prediction or inter prediction to generate the predictive blocks. If the video encoder 20 uses intra prediction to generate the predictive blocks, the video encoder 20 may generate the predictive blocks based on decoded samples of the picture including the CU. If the video encoder 20 uses inter prediction to generate the predictive blocks of the PUs of the current picture, the video encoder 20 may generate the predictive blocks of the PUs based on decoded samples of a reference picture (i.e., a picture other than the current picture). In HEVC, the video encoder 20 generates a "prediction_unit" syntax structure for inter-predicted PUs within the "coding_unit" syntax structure, but does not generate a "prediction_unit" syntax structure for intra-predicted PUs within the "coding_unit" syntax structure. Specifically, in HEVC, syntax elements for intra-predicted PUs are directly included in the "coding_unit" syntax structure. When a CU is inter-coded, the CU may be further partitioned into 2 or 4 PUs or become only one PU when no further partitioning is applied. When two PUs are present in one CU, they may be half-sized rectangles or two rectangles of 1 / 4 or 3 / 4 size of the CU. When a CU is inter-coded, a set of motion information is provided for each PU. In addition, each PU is coded using a unique inter-prediction mode to derive a set of motion information. In this disclosure, the term "block" may refer to a CU, a PU, or any other coding unit for video coding purposes.
[0079] A video decoder, such as video encoder 20 or video decoder 30, may perform intra-prediction using an intra-prediction mode selected from a plurality of available intra-prediction modes. An intra-prediction mode may include a directional intra-prediction mode, which may also be referred to as an intra-prediction direction. Different directional intra-prediction modes correspond to different angles. In some examples, to determine the value of a current sample of a predictive block using a directional intra-prediction mode, the video decoder may determine a point at which a line passing through the current sample intersects a set of boundary samples at an angle corresponding to the directional intra-prediction mode. Boundary samples may include samples in a column immediately to the left of the predictive block and samples in a row just above the predictive block. If the point is between two samples in the boundary sample, the video decoder may interpolate or otherwise determine a value corresponding to the point. If the point corresponds to a single sample in the boundary sample, the video decoder may determine that the value of the point is equal to the boundary sample. The video decoder may set the value of the current sample of the predictive block to be equal to the determined value of the point.
[0080] In HEVC and some other codecs, video encoder 20 encodes a CU using only one prediction mode (i.e., intra prediction or inter prediction). Therefore, in HEVC and certain other codecs, video encoder 20 may generate a predictive block for each PU of a CU using intra prediction or video encoder 20 may generate a predictive block for each PU of a CU using inter prediction. When video encoder 20 encodes a CU using inter prediction, video encoder 20 may partition the CU into 2 or 4 PUs, or one PU corresponds to the entire CU. When two PUs are present in one CU, the two PUs may be half-sized rectangles or two rectangles having a size of 1 / 4 or 3 / 4 of the size of the CU. In HEVC, there are eight partitioning modes for CUs coded using inter prediction modes, namely: PART_2N×2N, PART_2N×N, PART_N×2N, PART_N×N, PART_2N×nU, PART_2N×nD, PART_nL×2N, and PART_nR×2N. When a CU is intra predicted, 2Nx2N and NxN are the only allowed PU shapes, and within each PU, a single intra prediction mode is coded (while chroma prediction mode is signaled at the CU level).
[0081] The video encoder 20 may generate one or more residual blocks for the CU. For example, the video encoder 20 may generate a luma residual block for the CU. Each sample in the luma residual block for the CU indicates the difference between a luma sample in one of the predictive luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. In addition, the video encoder 20 may generate a Cb residual block for the CU. Each sample in the Cb residual block for the CU may indicate the difference between a Cb sample in one of the predictive Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU. The video encoder 20 may also generate a Cr residual block for the CU. Each sample in the Cr residual block for the CU may indicate the difference between a Cr sample in one of the predictive Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.
[0082] In addition, the video encoder 20 may decompose the residual block of the CU into one or more transform blocks. For example, the video encoder 20 may use quadtree partitioning to decompose the residual block of the CU into one or more transform blocks. A transform block is a rectangular (e.g., square or non-square) block of samples for which the same transform is applied. A transform unit (TU) of a CU may include one or more transform blocks. For example, a TU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and a syntax structure for transforming the transform block samples. Thus, each TU of a CU may have a luma transform block, a Cb transform block, and a Cr transform block. The luma transform block of a TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.
[0083] Video encoder 20 may apply one or more transforms to a transform block of a TU to generate a coefficient block for the TU. A coefficient block may be a two-dimensional array of transform coefficients. The transform coefficients may be scalars. In some examples, the one or more transforms convert the transform block from the pixel domain to the frequency domain. Thus, in these examples, the transform coefficients may be scalars that are viewed as being in the frequency domain. A transform coefficient level is an integer number representing the value associated with a specific 2-dimensional frequency index in the decoding process prior to calculation of scaling the transform coefficient values.
[0084] In some examples, video encoder 20 skips application of a transform for a transform block. In these examples, video encoder 20 may process residual sample values in the same manner as transform coefficients. Thus, in examples where video encoder 20 skips application of a transform, the following discussion of transform coefficients and coefficient blocks may apply to transform blocks of residual samples.
[0085] According to JEM, a video decoder (e.g., video encoder 200) partitions a picture into multiple coding tree units (CTUs). Video encoder 200 may partition CTUs according to a tree structure (e.g., a quadtree binary tree (QTBT) structure). JEM's QTBT structure removes the concept of multiple partition types, such as the spacing between CUs, PUs, and TUs of HEVC. Therefore, in the context of JEM, the term "PU" or "TU" may be applicable to CUs. JEM's QTBT structure includes two levels: a first level partitioned according to quadtree partitioning, and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0086] In some examples, video encoder 200 and video decoder 300 may use a single QTBT structure to represent each of the luma and chroma components, while in other examples, video encoder 200 and 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 respective chroma components).
[0087] After generating the coefficient block, video encoder 20 may quantize the coefficient block to possibly reduce the amount of data used to represent the coefficient block, potentially providing further compression. Quantization generally refers to a process in which a range of values is compressed to a single value. For example, quantization may be performed by dividing the value by a constant and then rounding to the nearest integer. To quantize the coefficient block, video encoder 20 may quantize the transform coefficients of the coefficient block. For example, quantization may reduce the bit depth associated with some or all of the transform coefficients. For example, during quantization, an n-bit transform coefficient may be rounded down to an m-bit transform coefficient, where n is greater than m. In some examples, video encoder 20 skips quantization.
[0088] Video encoder 20 may generate syntax elements indicating some or all of the potentially quantized transform coefficients. Video encoder 20 may entropy encode one or more of the syntax elements indicating the quantized transform coefficients. For example, video encoder 20 may perform context adaptive binary arithmetic coding (CABAC) on the syntax elements indicating the quantized transform coefficients. Thus, an encoded block (e.g., an encoded CU) may include entropy encoded syntax elements indicating the quantized transform coefficients.
[0089] Video encoder 20 may output a bitstream that includes encoded video data. In other words, video encoder 20 may output a bitstream that includes encoded representations of video data. The encoded representations of video data may include encoded representations of pictures of the video data. For example, the bitstream may include a sequence of bits that form a representation of an encoded picture of the video data and associated data. In some examples, the representation of an encoded picture may include encoded representations of blocks of a picture.
[0090] Video decoder 30 may receive a bitstream generated by video encoder 20. As mentioned above, the bitstream may include an encoded representation of video data. Video decoder 30 may decode the bitstream to reconstruct pictures of the video data. As part of decoding the bitstream, video decoder 30 may obtain syntax elements from the bitstream. Video decoder 30 may reconstruct pictures of the video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing pictures of the video data may be generally reciprocal to the process performed by video encoder 20 to encode pictures.
[0091] For example, as part of decoding a picture of video data, video decoder 30 may use inter-prediction or intra-prediction to generate a predictive block. In addition, video decoder 30 may determine transform coefficients based on syntax elements obtained from a bitstream. In some examples, video decoder 30 inverse quantizes the determined transform coefficients. Inverse quantization maps quantized values to reconstructed values. For example, video decoder 30 may inverse quantize the values by multiplying a determined value by a quantization step size. In addition, video decoder 30 may apply an inverse transform to the determined transform coefficients to determine the value of a residual sample. Video decoder 30 may reconstruct a block of a picture based on the residual samples and corresponding samples of the generated predictive block. For example, video decoder 30 may add the residual samples to the corresponding samples of the generated predictive block to determine the reconstructed samples of the block.
[0092] More specifically, in HEVC and other video coding specifications, the video decoder 30 may use inter-prediction or intra-prediction to generate one or more predictive blocks for each PU of the current CU. In addition, the video decoder 30 may inversely quantize the coefficient blocks of the TUs of the current CU. The video decoder 30 may perform an inverse transform on the coefficient blocks to reconstruct the transform blocks of the TUs of the current CU. Based on the samples of the predictive blocks of the PUs of the current CU and the residual samples of the transform blocks of the TUs of the current CU, the video decoder 30 may reconstruct the coding blocks of the current CU. In some examples, the video decoder 30 may reconstruct the coding blocks of the current CU by adding the samples of the predictive blocks of the PUs of the current CU to the corresponding decoded samples of the transform blocks of the TUs of the current CU. By reconstructing the coding blocks of the CUs of the picture, the video decoder 30 may reconstruct the picture.
[0093] A slice of a picture may include an integer number of blocks of the picture. For example, in HEVC and other video coding specifications, a slice of a picture may include an integer number of CTUs of the picture. The CTUs of a slice may be ordered consecutively in a scan order (e.g., a raster scan order). In HEVC and potentially other codecs, a slice is defined as an integer number of CTUs contained in one independent slice segment and all subsequent dependent slice segments (if any) preceding the next independent slice segment (if any) within the same access unit. In addition, in HEVC and potentially other codecs, a slice segment is defined as an integer number of CTUs ordered consecutively in a tile scan and contained in a single NAL unit. Tile scanning is a specific sequential ordering of CTBs that partition a picture, where the CTBs are ordered consecutively in a CTB raster scan in tiles, and tiles in a picture are ordered consecutively in a raster scan of tiles of the picture. A tile is a rectangular area of CTBs within a specific tile column and a specific tile row in a picture.
[0094] As mentioned above, a video coder (e.g., video encoder 20 or video decoder 30) may apply inter-prediction to generate a predictive block for a video block of a current picture. For example, in the context of HEVC and other video coding specifications, a video coder may apply inter-prediction to generate a predictive block for a prediction block of a PU of a CU of the current block. If the video coder applies inter-prediction to generate a predictive block, the video coder may generate the predictive block based on decoded samples of one or more reference pictures. A reference picture is a picture other than the current picture. The video coder may determine one or more reference picture lists. Each of the reference picture lists may include zero or more reference pictures. In the context of HEVC and other video coding specifications, one of the reference picture lists may be referred to as reference picture list 0 (i.e., RefPicList0 or list0) and the other reference picture list may be referred to as reference picture list 1 (i.e., RefPicList1 or list1).
[0095] The video coder may apply unidirectional inter prediction or bidirectional inter prediction to generate a predictive block. When the video coder applies unidirectional inter prediction to generate a predictive block for a video block, the video coder determines a single reference block for the video block based on samples of a single reference picture. In addition, when the video coder applies unidirectional inter prediction, the video coder may set the predictive block equal to the reference block. When the video coder applies bidirectional inter prediction to generate a predictive block 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 bidirectional inter prediction, the video coder may determine the predictive block based on the two reference blocks. For example, the video coder may determine the predictive block so that each sample of the predictive block is a weighted average of corresponding samples of the two reference blocks. A reference list indicator may be used to indicate which of the reference picture lists includes a reference picture for determining the reference block.
[0096] As mentioned above, the video coder may determine a reference block based on samples of a reference picture. In some examples, the video coder may determine the reference block such that each sample of the reference block is equal to a sample of the 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 samples of the predictive block to be a weighted average of two or more samples of the reference picture.
[0097] In some examples, when video encoder 20 performs unidirectional inter prediction, video encoder 20 searches for a reference block within one or more reference pictures of one of the reference picture lists. A reference block may be a block of samples similar to the prediction block. In some examples, video encoder 20 uses a mean square error to determine the similarity between the reference block and the prediction block. In addition, video encoder 20 may determine motion information for the prediction block. The motion information (i.e., motion parameters) for the prediction block may include a motion vector and a reference index. The motion vector may indicate a spatial displacement between a position of a particular video block within a current picture (i.e., a picture including the particular video block) and a position of a reference block within a reference picture. The reference index indicates a position within a reference picture list of a reference frame containing the reference picture list. The predictive block for the particular video block may be equal to the reference block.
[0098] When video encoder 20 performs bidirectional inter-frame prediction for a particular video block, video encoder 20 may search for a first reference block within a reference picture in a first reference picture list ("List 0") and may search for a second reference block within a reference picture in a second reference picture list ("List 1"). Video encoder 20 may generate a predictive block for the particular video block based at least in part on the first reference block and the second reference block. Additionally, video encoder 20 may generate a first motion vector indicating a spatial displacement between the particular video block and the first reference block. Video encoder 20 may also generate a first reference index identifying a position within the first reference picture list of a reference picture containing the first reference block. Furthermore, video encoder 20 may generate a second motion vector indicating a spatial displacement between the particular video block and the second reference block. Video encoder 20 may also generate a second reference index identifying a position within a second reference picture list of a reference picture including the second reference block.
[0099] When video encoder 20 performs unidirectional inter prediction on a particular video block, video decoder 30 may use the motion information of the particular video block to identify a reference block for the particular video block. Video decoder 30 may then generate a predictive block for the particular video block based on the reference block. When video encoder 20 performs bidirectional inter prediction to determine a predictive block for a particular video block, video decoder 30 may use the motion information of the particular video block to determine two reference blocks. Video decoder 30 may generate a predictive block for the particular video block based on two reference samples of the particular video block. In this way, for unidirectional inter prediction or bidirectional inter prediction, video encoder 20 and video decoder 30 may determine a predictive block based on a motion vector of the block.
[0100] Video encoder 20 may signal motion information of a video unit in various ways. Such motion information may include motion vectors, reference indexes, reference picture list indicators, and / or other data related to motion. In some examples, video encoder 20 and video decoder 30 may use motion prediction to reduce the amount of data used to signal motion information. Motion prediction may include determining motion information of a video unit (e.g., a PU) based on motion information of one or more other video units. There are various types of motion prediction. For example, merge mode and advanced motion vector prediction (AMVP) mode are two types of motion prediction. That is, in the HEVC standard, there are two inter-prediction modes, referred to as merge (skipping special cases that are considered merges) and advanced motion vector prediction (AMVP) mode for prediction units (PUs). In AMVP or merge mode, a motion vector (MV) candidate list is maintained for multiple motion vector predictors. See J.-L Lin, Y.-W. Chen, Y.-W. Huang, and S.-M. Lei, “Motion vector coding in the HEVC standard,” IEEE Journal on Signal Processing, Vol. 7, No. 6, pp. 957-968, 2013.
[0101] In merge mode, video encoder 20 generates a candidate list. The candidate list includes a set of candidates indicating motion information of one or more source video units. The source video unit may be spatially or temporally adjacent to the current video unit. In addition, in merge mode, video encoder 20 may select a candidate from the candidate list, and may use the motion information indicated by the selected candidate as the motion information of the current video unit. Video encoder 20 may signal the position in the candidate list of the selected candidate. Video decoder 30 may determine an index into the candidate list based on information obtained from the bitstream. In addition, video decoder 30 may generate the same candidate list and may determine the selected candidate based on the index. Video decoder 30 may then use the motion information of the selected candidate to generate a predictive block for the current video unit.
[0102] Skip mode is similar to merge mode. In skip mode, video encoder 20 and video decoder 30 generate and use a candidate list in the same manner as video encoder 20 and video decoder 30 use the candidate list in merge mode. However, when video encoder 20 signals motion information for a current video unit using skip mode, video encoder 20 does not signal any residual data for the current video unit. Therefore, video decoder 30 may determine a predictive block for a video unit based on one or more reference blocks indicated by motion information of a selected candidate in the candidate list without using residual data.
[0103] For skip mode and merge mode, a merge index is signaled to indicate which candidate in the merge candidate list to use. No inter prediction indicator, reference index, or motion vector difference is transmitted. Two or more types of merge candidates are considered in merge mode, including: spatial motion vector predictor (SMVP) and temporal motion vector predictor (TMVP). For SMVP derivation, when locating Figure 2 The maximum of four merge candidates is selected among the candidates in the positions depicted in . The derived order is A1→B1→B0→A0→(B2). In HEVC, position B2 is considered only when the total number of candidates from positions A1, B1, B0, A0 is less than four when any PU of position A1, B1, B0, A0 is unavailable or intra-coded or after pruning (deletion).
[0104] In the derivation of the TMVP, a scaled motion vector is derived based on a co-located PU of one of the reference pictures of the current picture within a signaled reference picture list. The reference picture list for the derivation of the co-located PU may be explicitly signaled in the slice header of the slice of the current picture. The scaled motion vector for the temporal merge candidate may be obtained using the scaled motion vector of the co-located PU using the POC distances (tb and td), where tb is defined as the POC difference between the reference picture of the current picture and the current picture, and td is defined as the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of the temporal merge candidate is set equal to zero. The actual implementation of the scaling process is described in the HEVC draft specification, which is available from https: / / www.itu.int / rec / T-REC-H.265. For B slices, two motion vectors (one motion vector for reference picture list 0 and another motion vector for reference picture list 1) are obtained and combined to form a bi-directional predictive merge candidate.
[0105] The position of the co-located PU is selected between two candidate positions C and H, such as Figure 2 If the PU at position H is not available, or is intra-coded, or is outside the current CTU row (ie, the CTU row containing the current PU), position C is used. Otherwise, position H is used to derive the temporal merging candidate.
[0106] In addition to SMVP and TMVP, there may be two types of synthetic merge candidates: (1) combined bi-predictive MVP and (2) zero MVP. Combined bi-predictive MVP is generated by utilizing SMVP and TMVP. In HEVC, combined bi-predictive merge candidates are only used for B slices. For example, two candidates in the original merge candidate list (which have mvL0 and refIdxL0 or mvL1 and refIdxL1) are used to create a combined bi-predictive merge candidate. Zero MVP has one or more motion vectors with magnitude 0.
[0107] During the candidate selection process, duplicate candidates with the same motion parameters as the previous candidate in the processing order may be removed from the candidate list. This process is defined as a pruning process. In addition, candidates inside the same merge estimation region (MER) are not considered in order to facilitate parallel merging processing. Redundant segmentation shapes are avoided in order not to simulate a virtual 2N×2N segmentation.
[0108] Between each step of generating merge candidates in the merge candidate list, if the number of merge candidates reaches MaxNumMergeCand, the derivation process can stop. In HEVC and potentially other codecs, MaxNumMergeCand is set equal to five. Since the number of candidates is constant, the index of the best merge candidate can be encoded using truncated unary binarization.
[0109] AMVP mode is similar to merge mode in that video encoder 20 may generate a candidate list and may select a candidate from the candidate list. However, for each respective reference block used to determine a predictive block for a current block (i.e., a video unit), video encoder 20 may signal a respective motion vector difference (MVD) for the current block, a respective reference index for the current block, and a respective candidate index indicating a selected candidate in the candidate list. The MVD for the block may indicate the difference between the motion vector of the block and the motion vector of the selected candidate. The reference index for the current block indicates a reference picture for determining the reference block.
[0110] In addition, when the AMVP mode is used, for each corresponding reference block used in determining the predictive block of the current block, the video decoder 30 may determine the MVD of the current block, the reference index of the current block, and the candidate index and motion vector prediction (MVP) flag. The video decoder 30 may generate the same candidate list and may determine the selected candidate in the candidate list based on the candidate index. As previously described, this list may include motion vectors of neighboring blocks associated with the same reference index and a temporal motion vector predictor, which is derived based on motion parameters of neighboring blocks of the co-located block in the temporal reference picture. The video decoder 30 may recover the motion vector of the current PU by adding the MVD to the motion vector indicated by the selected AMVP candidate. That is, the video decoder 30 may determine the current PU motion vector based on the motion vector indicated by the selected AMVP candidate and the MVD. Then, the video decoder 30 may use the recovered motion vector or motion vectors of the current PU to generate a predictive block for the current PU.
[0111] When a video coder (e.g., video encoder 20 or video decoder 30) generates an AMVP candidate list for a current PU, the video coder may derive one or more AMVP candidates based on motion information of PUs covering locations that are spatially adjacent to the current PU (i.e., spatially adjacent PUs), and derive one or more AMVP candidates based on motion information of PUs that are temporally adjacent to the current PU. In the present invention, a PU (or other type of video unit or block) may be said to "cover" a location if its prediction block (or other type of sample block of a video unit) includes the location. The candidate list may include motion vectors of neighboring blocks associated with the same reference index and a temporal motion vector predictor derived based on motion parameters (i.e., motion information) of neighboring blocks of a co-located block in a temporal reference picture. Candidates in a merge candidate list or an AMVP candidate list based on motion information of PUs that are temporally adjacent to the current PU (i.e., PUs in a different time instance from the current PU) may be referred to as TMVPs. TMVP may be used to improve the coding efficiency of HEVC, and unlike other coding tools, TMVP may need to access motion vectors of frames in a decoded picture buffer, more specifically, in a reference picture list.
[0112] For AMVP mode, an inter prediction indicator is transmitted to indicate list 0 prediction, list 1 prediction, or bi-prediction. Next, one or two reference indices are transmitted when multiple reference pictures are present. An index is transmitted for each prediction direction to select a motion candidate from the candidate list. Figure 2 As shown in , the candidate list for inter mode contains two spatial motion candidates and one temporal motion candidate:
[0113] 1. Left candidate (the first one available from A0 and A1)
[0114] 2. Top candidate (the first one available from B0, B1, B2)
[0115] 3. Time Candidate (the first one available from H and C)
[0116] In HEVC, the video coder searches for left spatial motion candidates from bottom left to left (i.e., A0 and A1) and the video coder selects the first available as the left candidate. The video coder searches for top spatial motion candidates from top right to top left (i.e., B0, B1, and B2) and the video coder selects the first available as the top candidate. The video coder may select temporal motion candidates from blocks (H or C) located in reference pictures, which are called temporally co-located pictures. Temporally co-located pictures are indicated by transmitting a flag in the slice header that specifies which reference picture list and a reference index in the slice header that indicates which reference picture in the reference list is used as the co-located reference picture. In HEVC, after transmitting the index, one or two corresponding motion vector differences (MVDs) are transmitted.
[0117] In addition, in HEVC and potentially other codecs, a fixed candidate list size is used to decouple candidate list construction and index parsing. In order to compensate for the decoding performance loss caused by the fixed list size, additional candidates are assigned to the empty positions in the candidate list. In this process, the index is decoded with a truncated unary code of the maximum length, where the maximum length is transmitted in the slice header for skip mode and merge mode and is fixed to 2 for inter-frame mode. As described above, for skip mode and merge mode, after deriving and pruning four spatial motion candidates and one temporal motion candidate, if the number of available candidates is less than the fixed candidate list size, then additional synthetic candidates are derived and added to fill the empty positions in the merge candidate list. For AMVP mode, after deriving and pruning two spatial motion candidates and one temporal motion candidate, zero vector motion candidates are added to fill the empty positions in the AMVP candidate list.
[0118] In the JEM reference software, there are several inter-coding tools that derive and / or improve the motion vector (MV) of the current block or utilize an affine motion model at the decoder side. These new inter prediction methods are described in detail below.
[0119] Pattern matching motion vector derivation (PMMVD) mode is a specific merge mode based on the frame rate up conversion (FRUC) technique. With PMMVD mode, the motion information of the block is not signaled, but is actually derived at the decoder side. The FRUC flag is signaled for a block (e.g., CU) when its merge flag is true. When the FRUC flag is false, the merge index is signaled and the normal merge mode is used. When the FRUC flag is true, an additional FRUC mode flag is signaled to indicate which method (bilateral matching or template matching) will be used to derive motion information for the block.
[0120] At the encoder side, the decision on whether to use FRUC merge mode for a CU may be based on rate / distortion (RD) cost selection, as performed for normal merge candidates. That is, both matching modes (bilateral matching and template matching) may be checked for a CU by using RD cost selection. The mode that results in the minimum cost is further compared with other CU modes. If the FRUC matching mode is the most efficient mode, the FRUC flag is set to true for the CU and the relevant matching mode is used.
[0121] The motion derivation process in FRUC merge mode includes two steps. CU-level motion search may be performed first, followed by sub-CU-level motion refinement. At the CU level, an initial motion vector (i.e., starting MV) for the entire CU is derived based on bilateral matching or template matching. First, a list of MV candidates (FRUC MV candidates) is generated and the candidate resulting in the minimum matching cost is selected as the starting point for further CU-level refinement. Next, a local search around the starting point based on bilateral matching or template matching is performed and the MV resulting in the minimum matching cost is considered as the MV for the entire CU. Subsequently, motion information is further refined at the sub-CU level using the derived CU motion vector as the starting point.
[0122] For example, the following derivation process may be performed for W×HCU motion information derivation, where W is the width and H is the height. In the first stage, the MV for the entire W×HCU is derived. In the second stage, the CU is further split into M×M sub-CUs. The value of M is calculated as in equation (1) below, and D is the predefined split depth that is set to 3 by default in JEM. Then, the MV for each sub-CU is derived.
[0123]
[0124] like Figure 3As shown in , bilateral matching is used to derive the motion information of the current CU by finding the best match between two blocks in two different reference pictures along the motion trajectory of the current CU. Under the assumption of a continuous motion trajectory, the motion vectors MV0 and MV1 pointing to the two reference blocks are proportional to the temporal distance between the current picture and the two reference pictures (i.e., TD0 and TD1). As a special case, when the current picture is temporally between the two reference pictures and the temporal distance from the current picture to the two reference pictures is the same, bilateral matching becomes mirror-based bidirectional MV.
[0125] like Figure 4 As shown in , template matching is used to derive the motion information of the current CU by finding the best match between the template in the current picture (the neighboring blocks above and / or to the left of the current CU) and the block in the reference picture (the same size as the template). In addition to the aforementioned FRUC merge mode, template matching is also applied to AMVP mode. In JEM, similar to HEVC, AMVP has two candidates. Using the template matching method, a new candidate is derived. If the candidate newly derived by template matching is different from the first existing AMVP candidate, the newly derived candidate is inserted at the absolute beginning of the AMVP candidate list and then the list size is set to two (meaning the second existing AMVP candidate is removed). When applied to AMVP mode, only CU level search is applied.
[0126] In the CU-level FRUC MV candidate set, the MV candidate set at the CU level includes or is composed of:
[0127] (i) If the current CU is in AMVP mode, then the original AMVP candidate
[0128] (ii) all Merger Candidates,
[0129] (iii) Several MVs in the interpolated MV field, which are introduced elsewhere in this disclosure
[0130] (iv) Neighboring motion vectors above and to the left
[0131] When bilateral matching is used, each valid MV of the merge candidate is used as input to generate an MV pair assuming bilateral matching. For example, one valid MV of the merge candidate is (MV a , ref a ). Then, find the reference picture ref of its paired bilateral MV in another reference list B b , so that ref a and ref b On different sides of the current image in time. If this ref bis not available in reference list B, then ref b Determined to be different from ref a The reference of the current picture and its time distance to the current picture is the smallest in list B. b After that, based on the current image and ref a ,ref b Time distance between zoom MV a To export MV b .
[0132] Four MVs from the interpolated MV field may also be added to the CU-level candidate list. More specifically, the interpolated MVs at positions (0, 0), (W / 2, 0), (0, H / 2), and (W / 2, H / 2) of the current CU may be added. When FRUC is applied in AMVP mode, the original AMVP candidates may also be added to the CU-level MV candidate set. At the CU level, up to 15 MVs for the AMVP CU and up to 13 MVs for the merged CU are added to the candidate list. In the present invention, an AMVP CU is a CU in which motion information is predicted using the AMVP mode. In addition, in the present invention, a merged CU is a CU in which motion information is predicted using the merge mode.
[0133] In some examples, the MV candidate set at the sub-CU level consists of or includes:
[0134] (i) Search the determined MV from the CU level,
[0135] (ii) the upper, left, upper left and upper right adjacent MVs,
[0136] (iii) a scaled version of the collocated MV from the reference image,
[0137] (iv) up to 4 Advanced Temporal Motion Vector Prediction (ATMVP) candidates,
[0138] (v) Up to 4 spatial temporal motion vector prediction (STMVP) candidates.
[0139] The scaled MV from the reference picture can be derived as follows. All reference pictures in the two lists are traversed. The MV at the co-located position of the sub-CU in the reference picture is scaled to the reference of the starting CU level MV. That is, similar to TMVP in HEVC, the MV at the co-located position can be scaled according to the POC distance. ATMVP and STMVP candidates are limited to at most four ATMV and STMVP candidates. At the sub-CU level, at most 17 MVs are added to the candidate list.
[0140] As mentioned above, in the CU level FRUC MV candidate set, the MV candidate set at the CU level may include one or more MVs in the interpolated MV field. Before coding a frame, an interpolated motion field (i.e., an interpolated MV field) is generated for the entire picture based on unilateral motion estimation. The motion field may then be used later as a CU level or sub-CU level MV candidate. First, the motion field of each reference picture in the two reference lists may be traversed at the 4×4 block level. Figure 5 An example of unilateral motion estimation in frame rate up-conversion. Figure 5 The picture 500 in is a reference picture for the current picture. The current picture has an output time corresponding to the output time of the picture 502. The picture 504 is a reference picture for the picture 500. The video decoder uses the motion vectors of the blocks in the picture 500 pointing to the positions in the picture 504 to interpolate the samples of the current picture. The picture 502 contains the resulting interpolated samples. In some examples, for Figure 5 For each 4x4 block in the picture 500 of FIG. 500 , if the motion associated with the 4x4 block passes through a 4x4 block in the current picture and the 4x4 block has not been assigned any interpolated motion, the motion of the reference block is scaled to the current picture according to the temporal distances TD0 and TD1 (in the same way as the MV scaling of TMVP in HEVC) and the scaled motion is assigned to the block in the current frame. If no scaled MV is assigned to the 4x4 block in the current frame, the motion of the block in the current frame is marked as unavailable in the interpolated motion field. In other examples, other block sizes may be used.
[0141] When the motion vector points to a fractional sample position, motion compensated interpolation may be required. Motion compensated interpolation can interpolate sample values of positions between the actual samples of the picture from the actual samples of the picture. To keep the complexity of motion compensated interpolation low, bilinear interpolation (rather than conventional 8-tap HEVC interpolation) can be used for both bilateral matching and template matching. The calculation of the matching cost is different at different steps. For example, when the best candidate is selected from the candidate set at the CU level, the matching cost is the absolute sum difference (SAD) of bilateral matching or template matching. After determining the starting MV, the matching cost C can be calculated using equation (2) below:
[0142]
[0143] In equation (2), w is a weighting factor empirically set to 4, MV and MV s Indicates the current MV and the starting MV (MV x and are the horizontal components of the current MV and the starting MV respectively; MV y and are the vertical components of the current MV and the starting MV, respectively), and |·| indicates the absolute value.
[0144] In some examples, in FRUC mode, MVs are derived by using only luma samples. In these examples, the derived motion can be used for both luma and chroma for motion compensated inter prediction. After MV derivation, final motion compensation is performed using an 8-tap interpolation filter for luma and a 4-tap interpolation filter for chroma.
[0145] MV refinement may include pattern-based MV search using criteria of bilateral matching cost or template matching cost. In JEM, two search patterns are supported: (1) Unrestricted Center Biased Diamond Search (UCBDS), and (2) Adaptive Cross Search for MV refinement at CU level and sub-CU level, respectively. For both CU level and sub-CU level MV refinement, MVs may be directly searched with quarter luma sample MV accuracy, which may then undergo one-eighth luma sample MV refinement. The search range for MV refinement for both CU and sub-CU steps may be set equal to 8 luma samples.
[0146] The video coder may select the prediction direction in the template matching FRUC merge mode as follows. In the bilateral matching merge mode, bidirectional prediction is always applied because the motion information of the CU is derived based on the best match between two blocks in two different reference pictures along the motion trajectory of the current CU. In JEM, there is no such restriction for the template matching merge mode. In the template matching merge mode, the video coder may select between unidirectional prediction from list0, unidirectional prediction from list1, or bidirectional prediction for the CU. The selection may be based on the template matching cost as follows:
[0147] Sequence 1
[0148] If costBi <= factor × min(cost0, cost1), then
[0149] Use bidirectional prediction;
[0150] Otherwise if cost0 ≤ cost1, then
[0151] Use the one-way prediction from list0;
[0152] otherwise,
[0153] Use the one-way prediction from list1;
[0154] In the pseudo code of sequence 1 above, cost0 is the SAD of list0 template matching, cost1 is the SAD of list1 template matching and costBi is the SAD of bi-prediction template matching. The value of the factor is equal to 5 / 4, which means that the selection process is biased towards bi-prediction. In JEM, inter prediction direction selection is only applied to the CU level template matching process.
[0155] In the bidirectional prediction template matching operation, for the prediction of a block region, two prediction blocks formed using the MV of list0 and the MV of list1, respectively, are combined to form a single prediction signal. In the decoder-side motion vector improvement (DMVR) method, the two motion vectors of the bidirectional prediction are further improved by the bilateral template matching process. Bilateral template matching can be applied in the video decoder 30 to perform a distortion-based search between the bilateral template and the reconstructed samples in the reference picture to obtain the improved MV without transmitting additional motion information.
[0156] In DMVR, the bilateral templates are obtained from Figure 6 The initial MV0 of list0 and MV1 of list1 shown in are generated as a weighted combination (i.e., an average) of the two prediction blocks. The template matching operation may include or consist of calculating a cost measurement between the generated bilateral template and a sample area in a reference picture (surrounding the initial prediction block). For each of the two reference pictures, the MV that produces the minimum template cost may be considered as the updated MV of the list to replace the original MV. The template cost may be calculated as the sum of absolute differences (SAD) or the sum of squared differences (SSD) between the current template and the reference samples. In JEM, nine MV candidates are searched for each list. The nine MV candidates include the original MV and 8 surrounding MVs that are offset by one luminance sample from the original MV in the horizontal direction, the vertical direction, or both directions. Finally, two new MVs (i.e., Figure 6 MV0' and MV1' shown in FIG. 2 are used to generate the final bidirectional prediction result. SAD can be used as a cost measurement value. Figure 6 is the proposed DMVR based on bilateral template matching.
[0157] Therefore, in Figure 6In the example of , a current block 600 in a current picture 602 has a first motion vector 604 (MV0) and a second motion vector 606 (MV1). Motion vector 604 points to a reference block 608 in a list0 reference picture 610. Motion vector 606 points to a reference block 612 in a list1 reference picture 614. Reference block 608 and reference block 612 may also be referred to herein as prediction blocks. After identifying reference block 608 and reference block 612, the video coder may generate a predictive block 616 as a weighted average of reference block 608 and reference block 612. Predictive block 616 may also be referred to herein as a bilateral template. Thus, in Figure 6 In the example of , the video coder may generate a bilateral template from the prediction block referenced by MV0 and MV1. In addition, the video coder may search for the block that best matches the predictive block 616 in the reference picture 610. Figure 6 In the example of , the video coder has identified block 618 of reference picture 610 as the best match for predictive block 616. The video coder may also search for a block in reference picture 614 that best matches predictive block 616. Figure 6 In the example of , the video coder has identified block 620 as the best match for predictive block 616. Motion vector 622 (MV0′) indicates the spatial displacement between current block 600 and block 618. Motion vector 624 (MV1′) indicates the spatial displacement between current block 600 and block 620.
[0158] DMVR can be applied to the merge mode of bi-prediction with one MV from the past reference picture and another MV from the future reference picture without transmitting additional syntax elements. In JEM5, DMVR is not applied when local illumination compensation (LIC), affine motion, FRUC, sub-CU merge candidates are enabled for CU.
[0159] In JEM with QTBT, each CU may have at most one set of motion for each prediction direction. Two sub-CU level motion vector prediction methods are provided by splitting a large CU into sub-CUs and deriving motion information of all sub-CUs of the large CU. The Advanced Temporal Motion Vector Prediction (ATMVP) method allows each CU to extract multiple sets of motion information from multiple blocks smaller than the current CU in the same-place reference picture. In the Spatial Temporal Motion Vector Prediction (STMVP) method, the motion vector of a sub-CU is recursively derived by using the temporal motion vector predictor and spatial neighboring motion vectors. To maintain a more accurate motion field for sub-CU motion prediction, motion compression for reference frames is currently disabled in JEM.
[0160] In the Advanced Temporal Motion Vector Prediction (ATMVP) method, motion vector temporal motion vector prediction (TMVP) is improved by allowing each CU to extract multiple sets of motion information (including motion vectors and reference indices) from multiple blocks smaller than the current CU. Figure 7 As shown in , a sub-CU is a square N×N block (N is set to 4 by default).
[0161] ATMVP predicts the motion vectors of sub-CUs within a CU in two steps. The first step is to identify the corresponding blocks with so-called temporal vectors in the reference picture. The reference picture is called the motion source picture. The second step is to split the current CU into sub-CUs and obtain the motion vectors and the reference index of each sub-CU from the blocks corresponding to each sub-CU, such as Figure 7 as shown in .
[0162] Figure 7 ATMVP motion prediction for a current CU 700 in a current picture 702 is shown. In a first step, a reference picture 704 and a corresponding block 706 are determined by motion information of spatially neighboring blocks of the current CU 700. The reference picture 704 may also be referred to as a motion source picture 704 because the video coder uses the motion source picture 704 as a source of motion information for the current CU 700 in the current picture 702. To avoid repeated scanning processes of neighboring blocks, the motion information of the first merge candidate in the merge candidate list of the current CU 700 is used to determine the reference picture 704 and the corresponding block 706. The first available motion vector and its associated reference index are set to the temporal vector 708 and the index to the motion source picture 704. Therefore, in ATMVP, the corresponding block 706 may be more accurately identified compared to TMVP, where the corresponding block (sometimes referred to as a co-located block) is always in a lower right or center position relative to the current CU 700.
[0163] In a second step, the corresponding blocks of the sub-CUs of the current CU 700 are identified by the time vector 708 in the motion source picture 704 by adding the time vector 708 to the (x, y) coordinates of the current CU 700. For each sub-CU of the current CU 700, the motion information of its corresponding block (the smallest motion grid covering the center pixel) is used to derive the motion information of the sub-CU. After the motion information of the corresponding N×N block is identified, the motion information of the corresponding N×N block is converted into a motion vector and reference index for the current sub-CU in the same manner as TMVP, where motion scaling and other processes are applicable. For example, the video decoder 30 may check whether the low latency condition is met and possibly use the motion vector MV x (corresponding to the motion vector of reference picture list X) to predict the motion vector MV for each sub-CU y(where X equals 0 or 1 and Y equals 1-X.) This is done in the same way as for temporal motion vector prediction.
[0164] In spatial-temporal motion vector prediction, the motion vector of a sub-CU is derived recursively following the raster scan order. Figure 8 For example, consider an 8×8 CU ( Figure 8 ) as a square with a thicker outline, such as Figure 8 The neighboring N×N blocks in the current frame are shown in Figure 8 The meridians are marked as a, b, c and d.
[0165] The motion derivation for the sub-CUA begins by identifying its two spatial neighbors. The first neighbor is the N×N block (block c) above the sub-CUA. If block c is not available or intra-coded, the other N×N blocks above the sub-CUA are checked (from left to right, starting at block c). The second neighbor is the block (block b) on the left side of the sub-CUA. If block b is not available or intra-coded, the other blocks on the left side of the sub-CUA are checked (from top to bottom, starting at block b). The motion information obtained from the neighboring blocks of each list is scaled to the first reference frame of the given list. Next, the temporal motion vector predictor (TMVP) of sub-block A is derived by following the same TMVP derivation process as specified in HEVC and described in the present invention above. The motion information of the co-located block at position D is extracted and scaled accordingly. Finally, after retrieving and scaling the motion information, all available motion vectors (up to 3) are averaged individually for each reference list. The averaged motion vector is assigned as the motion vector of the current sub-CU.
[0166] In the sub-CU motion prediction mode signaling, the sub-CU mode is enabled as an additional merge candidate and there are no additional syntax elements required to signal the mode. Two additional merge candidates are added to the merge candidate list of each CU to represent the ATMVP mode and the STMVP mode. If the sequence parameter set indicates that ATMVP and STMVP are enabled, up to seven merge candidates are used. At the encoding logic, the additional merge candidates are the same as the merge candidates in the HEVC test model (HM), which means that for each CU in a P or B slice, more than two RD checks are required for two additional merge candidates. To improve merge index decoding, in JEM, all binaries of the merge index are context-coded by CABAC. In HEVC, only the first bin is context-coded and the remaining bins are context-bypass coded.
[0167] Compared to performing conventional CABAC decoding on binary numbers, performing bypass CABAC decoding on binary numbers can be less computationally expensive. In addition, performing bypass CABAC decoding can allow higher parallelization and throughput. Binary numbers encoded using bypass CABAC decoding can be referred to as "bypass binaries". Grouping bypass binaries together can increase the throughput of video encoder 20 and video decoder 30. The bypass CABAC decoding engine may be able to decode several binaries in a single cycle, while the conventional CABAC decoding engine may only be able to decode a single binary in a cycle. The bypass CABAC decoding engine may be simpler, because the bypass CABAC decoding engine does not select a context and can assume a probability of 1 / 2 for two symbols (0 and 1). Therefore, in bypass CABAC decoding, the interval is directly split into two halves. However, compression efficiency can be reduced.
[0168] In HEVC, only the translational motion model is applied to motion compensated prediction (MCP). In the real world, there are many kinds of motion, such as zoom-in / out, rotation, perspective motion, and other irregular motions. In JEM, affine transform motion compensated prediction is applied to improve coding efficiency. If a block follows an affine motion model, the MV of a position (x, y) in the block can be determined by the affine motion model:
[0169]
[0170] In equation (3), a, b, c, d, e, and f are affine parameters. In addition, in equation (3), v x is the horizontal component of the MV at position (x, y) and v y is the vertical component of the MV at position (x, y).
[0171] Fig. 9 is a block diagram of a simplified affine motion model for the current affine block 900. Fig. 9 As shown in , the 6-parameter affine motion model can be represented by the motion vector v0 of the upper left control point 902 (x0, y0), the motion vector v1 of the upper right control point 904 (x1, y1), and the motion vector v2 of the lower left control point 906 (x2, y2). Assuming that the upper left control point 902 is the origin of the coordinate system (which means (x0, y0) = (0, 0)), the MV of the position (x, y) in the current affine block 900 is described by the following equation (4):
[0172]
[0173] In equation (4), (v 0x , v 0y ) is the motion vector of the upper left corner control point 902, (v 1x , v1y ) is the motion vector of the upper right corner control point 904, (v 2x , v 2y ) is the motion vector of the lower left corner control point 906, w = (x1-x0) is the horizontal distance between the upper left control point 902 and the upper right control point 904, and h = (y2-y0) is the vertical distance between the upper left control point 902 and the lower left control point 906. In equation (4), v x is the horizontal component of the MV at position (x, y) and v y is the vertical component of the MV at position (x, y).
[0174] However, in JEM, the affine motion model is simplified to a 4-parameter affine motion model by assuming a=e and b=−d in equation (3), resulting in v as shown below in equation (5): x and v y The expression is:
[0175]
[0176] The 4-parameter affine motion model is then represented by the motion vector v0 of the upper left control point 902 (x0, y0) assumed to be the origin and the motion vector v1 of the upper right control point 904 (x1, y1). In equation (5), v x is the horizontal component of the MV at position (x, y) and v y is the vertical component of the MV at position (x, y). Fig.10 is an example of a simplified affine motion model of the current affine block 1000. Fig.10 As shown in , the affine motion field of a block is described by two control point motion vectors v0 and v1. The motion vector field (MVF) of a block is described by equation (6):
[0177]
[0178] In equation (6), (v 0x , v 0y ) is the motion vector of the upper left corner control point 1002, (v 1x , v 1y ) is the motion vector of the upper right corner control point 1004 and w=(x1-x0) is the horizontal distance between the upper left control point 1002 and the upper right control point 1004. x is the horizontal component of the MV at position (x, y) and v y is the vertical component of the MV at position (x, y).
[0179] To further simplify motion compensated prediction, block-based affine transformation prediction can be applied. To derive the motion vector for each sub-block, Fig.11 As shown in , the motion vector of the center sample of each sub-block is calculated according to equation (6) and rounded to 1 / 16 resolution accuracy. The video decoder can then apply a motion compensated interpolation filter to generate a prediction for each sub-block using the derived motion vector. The interpolated motion vector of each sub-block within the affine block is referred to as the MCP motion vector field (MVF) in the following context. The sub-block size can vary depending on the MV difference between the control points. Fig.11 is an example MCPMV field, where the MV of each sub-block (e.g., a 4×4 block) is interpolated from the MV of the control point; the MV is then used to perform motion compensated prediction (MCP) for each sub-block. The motion vector of each sub-block can be used to identify the corresponding reference block, which is combined to form a predictive block. Thus, in this way, the video coder can generate a predictive block based on the motion vector of the block (e.g., the motion vector of the control point of the block).
[0180] After motion compensated prediction, the high-accuracy motion vector of each sub-block is rounded to the same accuracy as the normal motion vector and saved. In JEM and in HEVC, the motion vector of each inter-prediction CU or PU is stored for MV prediction of other inter-frame blocks. The storage unit of the motion vector is a 4×4 block. In other words, in JEM, the interpolated MV of the affine block is generated and stored for each 4×4 block. However, since the MV of the control point can be used for subsequent blocks, the stored MV of the corner 4×4 block is the MV of the control point rather than the MV of the control point. Fig.12 It should be noted that in JEM6, the MVs of the lower left and lower right control points are also generated by the MVs of the upper left and upper right control points.
[0181] Therefore, in Fig.12 In FIG. 1 , CU 1200 includes sixteen sub-blocks. For each corresponding sub-block among the twelve sub-blocks that are not at the corners of CU 1200, the video decoder stores a motion vector for the center point of the corresponding sub-block. For each corresponding sub-block at the corners of CU 1200, the video decoder stores a motion vector for the outer corner of the corresponding sub-block.
[0182] In JEM, there are two affine motion modes: affine inter (AF_INTER) mode and affine merge (AF_MERGE) mode. For CUs with width and height greater than 8, AF_INTER mode can be applied. An affine flag is signaled at the CU level in the bitstream to indicate whether AF_INTER mode is used. In this mode, the motion vector set {(MVP0, MVP1)|MVP0={v A , v B , v C},MVP1={V D , V EThe candidate list of}} is constructed using neighboring blocks. Fig.13 As shown in , MVP0 is a motion vector selected from blocks A, B or C. Fig.13 An example of MVP for AF_INTER is shown. The motion vector from the neighboring block is scaled according to the relationship between the reference list and the picture order count (POC) for the neighboring block's reference, the POC for the current CU's reference, and the POC of the current CU. The method of selecting MVP1 from neighboring blocks D and E is similar. In JEM, if the number of candidates in the candidate list is less than 2, the list is filled with motion vector pairs composed by copying each of the AMVP candidates {AMVP0, AMVP0} and {AMVP1, AMVP1}.
[0183] Furthermore, in JEM, when the number of candidates in the candidate list is greater than 2, the candidates are first sorted according to the consistency of neighboring motion vectors (the similarity of two motion vectors in a pair of candidates) and only the first two candidates are selected. Fig.13 The video coder may use a rate-distortion (RD) cost check to determine which motion vector set candidate is selected as the control point motion vector prediction (CPMVP) for the current CU. An index indicating the position of the CPMVP in the candidate list is signaled in the bitstream. After determining the CPMVP for the current affine CU, affine motion estimation is applied and the control point motion vector (CPMV) is found. The difference between the CPMV and the CPMVP may then be signaled in the bitstream.
[0184] When a CU is applied in affine merge (AF_MERGE) mode, the CU obtains the first block decoded from the valid neighboring reconstructed blocks using affine mode based on the following access order: A1→B1→B0→A0→B2. The selection order for candidate blocks is as follows Fig.14A The diagram is from left, top, top right, bottom left to top left. If the adjacent bottom left block A is Fig. 14B , then the motion vectors v2, v3, and v4 of the upper left corner, upper right corner, and lower left corner of the CU containing block A are derived. The motion vector v0 of the upper left corner of the current CU is extrapolated from v2, v3, and v4 using equation (7) below by assuming that (x2, y2) is the origin (which means (x2, y2) = (0, 0)). Next, the motion vector v1 of the upper right corner of the current CU is calculated in a similar manner. Equation (7) is shown below.
[0185]
[0186] In equation (7), (v 2x , v2y ) is the motion vector of the upper left corner control point (x2, y2), (v 3x , v 3y ) is the motion vector of the upper right corner control point (x3, y3), (v 4x , v 4y ) is the motion vector of the lower left corner control point (x4, y4) in the adjacent affine block, w = (x3-x2) is the horizontal distance between the upper left control point and the upper right control point, and h = (y4-y2) is the vertical distance between the upper left control point and the lower left control point, v x is the horizontal component of the motion vector for position (x, y), and v y is the vertical component of the motion vector for position (x, y).
[0187] After the CPMV v0 and v1 of the current CU are derived, the MVF of the current CU is generated according to the affine motion model equation (6). To identify whether the current CU is coded using AF_MERGE mode, an affine flag is signaled in the bitstream when there is at least one neighboring block coded in affine mode.
[0188] In HEVC, the motion vector difference (MVD) (between the motion vector of a PU and the predicted motion vector) is signaled in units of quarter luma samples. In JEM, Advanced Motion Vector Resolution (AMVR) is introduced. In JEM5, MVD can be coded in units of quarter luma samples, integer luma samples, or four luma samples. In JEM5, MVD resolution is controlled at the CU level and an MVD resolution flag is conditionally signaled for each CU with at least one non-zero MVD component.
[0189] For a CU with at least one non-zero MVD component, a first flag is signaled to indicate whether quarter luma sample MV precision is used for the CU. When the first flag (equal to 1) indicates that quarter luma sample MV precision is not used, another flag is signaled to indicate whether integer luma sample MV precision or four luma sample MV precision is used.
[0190] When the first MVD resolution flag of a CU is zero, or is not coded for the CU (meaning all MVDs in the CU are zero), quarter luma sample MV resolution is used for the CU. When the CU uses integer luma sample MV precision or four luma sample MV precision, the MVP in the AMVP candidate list for the CU is rounded to the corresponding precision.
[0191] On the encoder side, the video encoder 20 may use a CU-level RD check to determine which MVD resolution is used for the CU. That is, the CU-level RD check may be performed three times for each MVD resolution, respectively. To speed up the encoder speed, the following encoding scheme is applied in JEM:
[0192] During RD check of a CU using normal quarter luma sample MVD resolution, the motion information of the current CU (integer luma sample accuracy) is stored. The stored motion information (after rounding) is used as a starting point for further small-range motion vector refinement during RD check of the same CU using integer luma samples and 4 luma sample MVD resolution, so that the time-consuming motion estimation process is not repeated three times.
[0193] Conditionally call RD check for CUs using 4-luminance sample MVD resolution. For a CU, when the RD cost for integer luma sample MVD resolution is much greater than that for quarter luma sample MVD resolution (e.g., the ratio of the RD cost for integer luma sample MVD resolution to the RD cost for quarter luma sample MVD resolution is greater than a threshold), skip RD check for 4-luminance sample MVD resolution of the CU.
[0194] Reconstructed motion vector information is not all used in existing schemes of motion vector prediction in existing video codecs, such as HEVC / H.265, AVC / H.264, and JEM.
[0195] This disclosure describes techniques that can improve computing devices that perform motion vector prediction (MVP). The techniques are detailed in several different aspects described below. The following techniques can be applied individually. Alternatively, any combination of techniques can be applied.
[0196] According to one or more techniques of this disclosure, a video coder may use motion vectors of blocks that are not immediately adjacent to a current block, because the motion vectors of the non-adjacent blocks may further improve prediction efficiency, especially when the correlation between spatial motion vectors is strong enough for the motion information of the current block that is similar to the motion information of the non-adjacent blocks. Therefore, the motion information from the non-adjacent blocks may be a good MVP candidate for the current block. In this disclosure, one or more non-adjacent spatial motion vector predictors (NA-SMVPs) are proposed to derive a motion vector predictor for the motion information of the current block; or the NA-SMVP may be directly reused by the current block to perform inter-frame prediction. This disclosure describes techniques for adaptively merging the NA-SMVP with other MV predictors (e.g., conventional SMVP, TMVP, synthetic MVP) for MV prediction.
[0197] Therefore, according to the techniques of this disclosure, video encoder 20 may determine motion vectors of non-neighboring blocks of a current picture of video data. The non-neighboring blocks are not adjacent to the current block of the current picture. In addition, video encoder 20 may determine the MVP of the current block based on the motion vectors of the non-neighboring blocks. Video encoder 20 may also determine the motion vector of the current block. The motion vector may be equal to the motion vector of the MVP of the current block or may be equal to the motion vector of the MVP of the current block plus a motion vector difference (MVD) signaled in the bitstream. In addition, video encoder 20 may determine a predictive block based on the motion vector of the current block. Video encoder 20 may generate residual sample values based on the predictive block.
[0198] Similarly, video decoder 30 may determine motion vectors of non-adjacent blocks of a current picture of video data. The non-adjacent blocks are not adjacent to the current block of the current picture. Furthermore, video decoder 30 may determine the MVP of the current block based on the motion vectors of the non-adjacent blocks. Additionally, video decoder 30 may determine the motion vector of the current block based on the MVP of the current block. Video decoder 30 may also determine a predictive block based on the motion vector of the current block. Video decoder 30 may then reconstruct sample values of the current picture based on the predictive block.
[0199] In some examples, a non-neighboring spatial motion vector predictor (NA-SMVP) is derived from motion information of spatially non-neighboring blocks located in the same picture, slice, or predefined region in which the current block is located. Since the motion information of the non-neighboring blocks can be reused as the motion vector predictor of the current block, only non-neighboring blocks with reconstructed motion information are considered for non-neighboring MVP derivation. The present invention proposes to further add constraints to the NA block to constrain the distance between the NA block and the current block to be within a range. The distance can be measured in pixel distance in the L1 or L2 sense; or the distance can be measured in block distance in the L1 or L2 sense. The L1 distance between two coordinate points in an n-dimensional real vector space using a fixed Cartesian coordinate system is the sum of the lengths of the projections of the line segments between the points onto the coordinate axis. In the case of L1 pixel distance, the length of the projection is the height or width of one pixel. In the case of L1 block distance, the length of the projection is the width or height of the block. The L2 distance is the Euclidean distance between two points. The distance can be measured between the block center or any specified point within each block. In some examples, another constraint is added to the NA block, which constrains the NA block to be a block that is not adjacent to the current block and is not adjacent to a block that is immediately adjacent to the current block.
[0200] Fig.15 1 is a block diagram illustrating an example non-adjacent block according to the techniques of the present invention. Fig.15As shown in , the non-neighboring block 1500 is a reconstructed block that is not adjacent to the current block 1502. The size of the non-neighboring block may be defined as a minimum unit block (e.g., a 4×4 block) used to store motion information or a basic unit for inter-prediction (e.g., a PU in HEVC) or a sub-block as used in an affine mode, a FRUC mode in JEM, or any other specified block size. Fig.15 Also shown are a neighboring non-reconstructed block 1 504 and a non-neighboring non-reconstructed block 1 506 .
[0201] Fig.16 is a block diagram illustrating an example of selection of non-adjacent blocks according to the techniques of this disclosure. Figure 1 7 is a block diagram illustrating an example of selection of non-neighboring blocks based on parent blocks according to techniques of this disclosure. Although potentially all non-neighboring blocks may be used for MVP derivation, it may be more desirable (in terms of implementation complexity) to select only a limited number of non-neighboring blocks (NA blocks) for MVP derivation. Several ways of selecting N (where N is a non-negative integer) non-neighboring blocks for motion vector predictor (MVP) derivation are detailed below. For example, in one example of selecting N non-neighboring blocks for MVP derivation, a fixed pattern of non-neighboring blocks is selected for NA-SMVP derivation. The fixed pattern is positioned relative to the position of the current block. In the example shown in FIG. Fig.16 In one example shown in FIG. 1 , in addition to neighboring blocks (e.g., A0, A1, B0, B1, and B2) used to derive a conventional SMVP as used for the current block 1600 in HEVC, 11 NA blocks (NA 1,1 ,NA 1,2 ,NA 1,3 ,NA 1,4 ,NA 1,5 ,NA 1,6 ,NA 1,7 ,NA 1,8 ,NA 1,9 ,NA 1,10 ,NA 1,11 ) is used to derive the NA-SMVP. The horizontal distance s1 and the vertical distance t1 are two descriptors of this pattern.
[0202] In such Fig.17 In another example shown in . Fig.17 In the example of , in addition to the neighboring blocks used to derive the conventional SMVP as used in HEVC, the video coder uses the neighboring blocks of the parent block 1700 containing the current block 1702 as NA blocks for MVP derivation. Fig.17 , the neighboring blocks (NA 1,1 ,NA 1,2 ,NA 1,3 ,NA 1,4,NA 1,5 ,NA 1,6 ,NA 1,7 ,NA 1,8 ,NA 1,9 ) is selected as a non-neighboring block of a block within the parent block 1700 (including the current block 1702). The size of the parent block 1700 may be predetermined or signaled in the bitstream or depend on the size of the current block 1702 or depend on the coding mode (e.g., skip / merge / AMVP) of the current block 1702. The NA-SMVP of the present disclosure may be derived from the disclosed pattern of non-neighboring spatial blocks (but is not limited to the disclosed pattern).
[0203] Examples of multi-level surrounding NA blocks are given as follows. It should be noted that for each level, the number of NA blocks may be different.
[0204] Pattern A1: Multi-level surrounding NA blocks. Each level (level i) is determined by the distance parameter (s i and t i )describe. Fig. 20 , Fig.21 and Fig. 22 An example of 2 levels of surrounding NA blocks is shown, but the number of levels can be any non-negative integer. Fig. 20 , Fig.21 and Fig. 22 In the example of , the black squares correspond to NA blocks in the first level and the gray squares correspond to NA blocks in the second level. t1 indicates the vertical distance from the current block 2000, 2100, or 2200 to the first level. t2 indicates the vertical distance from the current block 2000, 2100, or 2200 to the second level. s1 indicates the horizontal distance from the current block 2000, 2100, or 2200 to the first level. s2 indicates the horizontal distance from the current block 2000, 2100, or 2200 to the second level.
[0205] Pattern A2: Multi-level surrounding NA blocks based on the parent block. Each level (level i) is determined by the distance parameter (s i and t i ) description. The size of the parent block can be predetermined or signaled in the bitstream. Fig.23 An example of 2 levels of surrounding NA blocks is shown, but the number of levels can be any non-negative integer.
[0206] Furthermore, in some examples, the distance between the current block and the non-neighboring blocks is defined by an L1 norm (ie, L1 distance) or an L2 norm (ie, Euclidean distance).
[0207] In some examples, video encoder 20 and video decoder 30 select the N non-contiguous blocks according to a reverse coding order. For example, a video coder, such as video encoder 20 or video decoder 30, may select the non-contiguous blocks by scanning the blocks in an order that is reverse to the order in which the video coder coded the blocks.
[0208] In some examples, video encoder 20 and video decoder 30 construct a global MV candidate list by inserting all reconstructed MVs into this list according to a predefined order. The global MV candidate list may contain MVs derived from neighboring blocks and MVs derived from non-neighboring blocks. This global MV candidate may then be used to derive an MV predictor for the current block. Therefore, in these examples, a video coder (such as video encoder 20 or video decoder 30) may determine a global motion vector candidate list that includes MVP candidates that specify motion vectors for each block encoded in the current picture and before the current block. In addition, the video coder may determine the motion vectors of non-neighboring blocks from the MVP candidates in the global motion vector candidate list.
[0209] In some examples, because directly extracting non-adjacent MV candidates may increase the size of the line buffer, the video coder applies an alternative way of storing reconstructed MVs. For example, the video coder may store the reconstructed MVs in a history buffer in a first-in-first-out manner. To simulate non-adjacent MV candidates, only those old MVs in the history buffer are considered as non-adjacent MV candidates. The old MVs in the history buffer may be defined as those MVs close to the end of the history buffer. For example, if the size of the history buffer is N, a threshold T (e.g., T == N / 4) may be signaled or set so that the T MVs closest to the exit in the history buffer are defined as old MVs.
[0210] In some examples, to reduce the buffer size of the buffer used to store non-neighboring motion information (i.e., motion information of non-neighboring blocks), constraints are added to derive non-neighboring spatial motion vector predictors. If the distance between the non-neighboring block and the current block (or current CTU) is greater than a threshold, the position of the non-neighboring block may be modified. In other words, the video coder may determine the second position based on the first position when the distance from the first position to the current block is greater than the threshold, rather than determining the MV candidate based on the NA block at the first position (e.g., the position specified by the fixed pattern of the NA block). In some examples, the video coder may determine that the first position is not valid when the distance from the first position to the current block is greater than the threshold, rather than determining the MV candidate based on the NA block at the first position (e.g., the position specified by the fixed pattern of the NA block). The threshold may be different for the horizontal distance and the vertical distance. Therefore, in some examples, before determining the motion vector of the non-neighboring block and based on the distance between the non-neighboring block and the current block being greater than the threshold distance, the video coder may modify the position of the non-neighboring block. In some examples, before determining the motion vector of the non-neighboring block and based on the distance between the non-neighboring block and the current coding tree block being greater than the threshold distance, the video coder may modify the position of the non-neighboring block. In these examples, the current coding tree block contains the current block.
[0211] One example of position modification may be rounding the first position to a coarser grid, i.e., reducing the stored non-neighboring motion. Thus, in this example, the video coder may modify the position of the non-neighboring block at least in part by rounding the position of the non-neighboring block to a position on a first grid of blocks in the current picture that is coarser than a second grid of blocks of the current picture.
[0212] Another example of position modification may be: if the distance of the position is greater than a threshold, then clipping the first position to the threshold. Clipping the position to the threshold means: if the position exceeds the threshold, then modify the position to be at the threshold. Thus, in this example, the video coder may modify the position of the non-neighboring block at least in part by clipping the position of the non-neighboring block to the distance threshold. Multiple position modification methods that apply different thresholds may be combined.
[0213] Fig.18A and Fig.18B is a block diagram illustrating an example of position modification of non-adjacent blocks according to the techniques of this disclosure. Fig.19A and Fig.19B1 is a block diagram illustrating an example of a threshold value for modifying a non-adjacent block according to the techniques of the present invention. Several examples of modifying positions are provided below. In these examples, it is assumed that the position of the non-adjacent block is (xNA, yNA), the modified position of the non-adjacent block is (xNA', yNA'), the position of the upper left grid of the current CTU 1800, 1900 is (xCTU, yCTU), and the position of the current CU is (xCU, yCU). Examples of constraints may be:
[0214] 1. If (yCTU-yNA)>(or>=)yThrd, then yNA′=yThrd. If (xCTU-xNA)>(or>=)xThrd, then xNA′=xThrd. yThrd may be less than xThrd. Fig.18A shows an example with yThrd, where Thrd is the abbreviation for threshold. Fig.18A , CTU 1800 contains current CU (curr) 1802. If the difference between the vertical coordinates of position NA 1804 of the non-neighboring block and the vertical coordinates of CTU 1800 is greater than a threshold value (yThrd), the video coder clips the vertical coordinates of position NA 1804 to the threshold value, thereby generating position NA′ 1806.
[0215] 2. If (yCTU-yNA)>(or>=)yThrd and (or) (xCTU-xNA)>(or>=)xThrd, then abs(xNA',yNA')=((xNA>>CompressedLog2SizeX)<<CompressedLog2SizeX, (yNA>>CompressedLog2SizeY)<<CompressedLog2SizeY). CompressedLog2SizeX and CompressedLog2SizeY are values used to control position rounding. For example, if (xNA,yNA) is (36,18) and (CompressedLog2SizeX,CompressedLog2SizeY) is (4,4), then the rounded position (xNA',yNA') will be ((36>>4)<<4, (18>>4)<<4)=(32,16). In other words, if the location of the non-neighboring block is far away from the current block, the video coder may round the location to a coarse grid. Therefore, the motion buffer may only store non-neighboring block motion on a coarse grid. Fig.18B Therefore, in Fig.18BIn the example of , CTU 1850 contains current CU (curr) 1852. If the difference between the vertical (y) coordinate of position NA 1854 and the vertical coordinate of the position of CTU 1850 is greater than a vertical threshold (yThrd) and / or the difference between the horizontal (x) coordinate of position NA 1854 is greater than a horizontal threshold (xThrd), the video coder may determine the horizontal coordinate of modified position NA′1 856 as (xNA>>CompressedLog2SizeX)<<CompressedLog2SizeX and the vertical coordinate of modified position NA′1 856 as (yNA>>CompressedLog2SizeY)<<CompressedLog2SizeY. In some examples, xThrd is negative infinity. Therefore, in these examples, (xCTU-xNA) is always greater than xThrd.
[0216] 3. In some examples, the threshold for modifying non-neighboring blocks is: if (yCTU-yNA)>yThrd, then the non-neighboring blocks are modified. Fig.19A An example is shown, and the shaded blocks are non-adjacent block locations that should be modified. Specifically, Fig.19A In the example of , CTU 1900 includes current CU (curr) 1 902. If the difference between the vertical coordinate of the non-neighboring block and the vertical coordinate of CTU 1900 is greater than a threshold value (yThrd), the video coder may modify the position of the non-neighboring block.
[0217] 4. The threshold for modifying non-neighboring blocks can be a combination of more than one rule. Examples may be: (1) If (yCTU-yNA)>yThrd, then the non-neighboring blocks should be modified. (2) If (yCTU-yNA)>0 and (xCTU-xNA)>0, then the non-neighboring blocks should be modified. Fig.19B An example of a combination of two rules is shown, and the shaded blocks are non-adjacent block positions that should be modified. Specifically, Fig.19B In the example of , CTU 1950 includes current CU (curr) 1952. If the difference between the vertical coordinate of the non-neighboring block and the vertical coordinate of CTU 1950 is greater than a vertical threshold (yThrd), the video coder may modify the vertical coordinate of the non-neighboring block. In addition, if the difference between the horizontal coordinate of the non-neighboring block and the horizontal coordinate of CTU 1950 is greater than 0 and the difference between the vertical coordinate of the non-neighboring block and the vertical coordinate of CTU 1950 is greater than 0, the video coder may modify the horizontal coordinate of the non-neighboring block.
[0218] In one example, only non-neighboring blocks located at the same CTU column as the current block may be selected. In another example, only non-neighboring blocks located at the same CTU as the current block may be selected.
[0219] After the video coder determines N non-adjacent blocks, the video coder may derive M (where M≤N) non-adjacent spatial motion vector predictors (NA-SMVPs) from the N non-adjacent blocks (NA blocks). There are different ways to utilize the non-adjacent SMVPs depending on the inter-prediction mechanism used in the video codec. For example, when a competitive motion candidate mechanism (such as merge / skip mode in HEVC or JEM) is used, one or more non-adjacent spatial MVPs (NA-SMVPs) are derived and inserted into the candidate list according to a predefined order. In such a case, the non-adjacent spatial motion vector predictors ... Fig.16 In one example shown in , 11 non-adjacent MVPs are inserted into the merge candidate list after the regular spatial MVP, temporal MVP and before the synthetic combined candidate, synthetic zero candidate.
[0220] In some examples, a full motion pruning process may be applied to NA-SMVP and other merge candidates; or partial motion pruning may be applied to NA-SMVP and other merge candidates. The full motion pruning process compares one candidate against all previously derived candidates in the current candidate list to avoid inserting the same candidate to a certain extent. To reduce complexity, the partial motion pruning process only compares a limited number of candidates instead of comparing each potential candidate with all other existing candidates. More insertion orders for non-adjacent blocks are given below in Sequence 2 to Sequence 5. The NA-SMVP of the present invention may be inserted into the candidate list, including but not limited to the disclosed insertion order.
[0221] Sequence 2
[0222] Insertion order for merge mode:
[0223] 1. Conventional SMVP (e.g. A1, B1, B0, A0, B2) → TMVP (e.g. H or C) → NA-SMVP → Synthetic Candidate
[0224] 2. Conventional SMVP (e.g. A1, B1, B0, A0, B2) → Sub-block MV candidate (e.g. ATMVP, STMVP) → TMVP (e.g. H or C) → NA-SMVP → Synthetic candidate
[0225] 3. Conventional SMVP (e.g. A1, B1, B0, A0, B2) → NA-SMVP → TMVP (e.g. H or C) → Synthetic Candidate
[0226] Sequence 3
[0227] Insertion order for AMVP mode (for List0 or List1 MV prediction):
[0228] 1. Left SMVP (e.g. A0, A1) → Scaled Left SMVP (e.g. A0, A1) → Upper SMVP (e.g. B0, B1, B2) → Scaled Upper SMVP (e.g. B0, B1, B2) → NA-SMVP → Scaled NA-SMVP → TMVP → Synthesized Candidate
[0229] Sequence 4
[0230] Insertion order for affine merge mode:
[0231] 1. Conventional SMVP (e.g. A1, B1, B0, A0, B2) → NA-SMVP
[0232] Sequence 5
[0233] Insertion order for affine AMVP mode:
[0234] 1. Extrapolated affine MVP → left SMVP (e.g. A0, A1) → scaled left SMVP (e.g. A0, A1) → upper SMVP (e.g. B0, B1, B2) → scaled upper SMVP (e.g. B0, B1, B2) → NA-SMVP → scaled NA-SMVP → TMVP → synthetic candidate
[0235] A competitive spatial-temporal motion candidate scheme may include a system in which a motion predictor is selected from a set of available motion predictors. When a competitive spatial-temporal motion candidate scheme is used (such as AMVP mode in HEVC or JEM or other video codecs), non-neighboring MVP candidates are derived and inserted into the candidate list according to a predefined order. In one example, the video coder places the non-neighboring MVP candidate after the regular spatial MVP, the temporal MVP, and before any synthetic zero candidates. Fig.16 The 11 non-adjacent MVPs are inserted into the AMVP candidate list. NA-SMVP derivation may follow the same derivation rules as HEVC or any other rules applied to SMVP derived from adjacent blocks.
[0236] The order of NA-SMVP candidates may be determined by a specific predefined rule or may be determined in an adaptive manner. For example, the video coder may select the same order of N NA blocks to arrange the M candidates from N non-adjacent blocks according to any of the examples provided elsewhere in this disclosure. Alternatively, in one example, the video coder reorders the M candidates according to the frequency of those candidates (i.e., the number of candidate occurrences among all MV candidates) and / or the distance between the NA block and the current block. Thus, in this example, the video coder may place more frequent candidates and / or candidates from NA blocks closer to the current block in the front in the NA-SMVP candidate list (i.e., a candidate list that includes the NA-SMVP candidate and possibly other candidates). In addition, the video coder may insert all NA-SMVP candidates in fixed positions in the candidate list as described above in sequences 2 to 5, where the NA-SMVP candidates are allowed to be reordered between only NA-SMVP candidates. In another example, the video coder may reorder all candidates in the list (including NA-SMVP and other candidates) according to a particular criterion, such as the frequency of motion information (i.e., the number of motion vector occurrences among all MV candidates) or any available motion statistics from the current picture and / or previously coded pictures. The order of NA-SMVPs in the candidate list may be different for a particular coding mode (e.g., merge and / or AMVP mode), and is not necessarily limited to the disclosed candidate order. For example, the video coder may insert NA-SMVP candidates into the merge candidate list according to a first order and may insert NA-SMVP candidates into the AMVP candidate list according to a second order that is different from the first order.
[0237] In some examples, the pruning process is adapted to the block size. In one example, a threshold may be used to define what needs to be pruned. For example, if the block size is larger (i.e., larger than a predefined block size), the video coder may increase the threshold accordingly. Consider two candidates with motion vectors MV0 (added to the list earlier) and MV1, in one example, if the L1 or L2 norm of the distance between MV0 and MV1 is less than a threshold, the video coder prunes the candidate of MV1. Video encoder 20 may signal the threshold via the SPS, PPS, slice header, or signaled in another syntax structure.
[0238] In another example, the threshold is adaptive based on the current block size. For example, in this example, a first threshold is applied to blocks having a size less than a predefined block size, and a second, different threshold is applied to blocks having a size greater than the predefined block size. In this example, when generating a candidate list for blocks having a size less than the predefined block size, if the L1 or L2 norm of the distance between a motion vector of a candidate and a motion vector of another candidate in the list is less than the first threshold, then the video coder may prune the candidate from the list. In this example, when generating a candidate list for blocks having a size greater than the predefined block size, if the L1 or L2 norm of the distance between a motion vector of a candidate and a motion vector of another candidate in the list is less than the second threshold, then the video coder may prune the candidate from the list.
[0239] In another example pruning process, the threshold is adaptive based on the distance between the spatial position of the candidate and the spatial position of the current block. If the candidate is located farther away from the current block, the video coder may use a larger threshold. For example, when generating a candidate list for the current block, the video coder may determine a first NA-SMVP based on a particular non-adjacent block. In this example, if the L1 or L2 norm of the distance between the motion vector of the first NA-SMVP candidate and the second candidate motion vector in the list is less than a particular threshold, the video coder may prune the first NA-SMVP candidate from the list. In this example, the particular threshold may depend on the distance between the particular non-adjacent block and the current block.
[0240] In some examples, the classification of motion vectors may be accomplished using methods including but not limited to K-means or support vector machines and only from N c The first M of each category c Candidates should be kept in a candidate list, where M c and the number of categories N c Can be predefined or signaled in a high-level syntax.
[0241] In a scheme using only a single MVP, such as the affine merge mode in JEM, a video coder, such as video encoder 20 or video decoder 30, may also include one or more non-adjacent SMVPs (NA-SMVPs) in the candidate set along with other MVPs. The final MVP is then selected as the first available MVP according to a predefined order. In one example, when a CU is applied in the affine merge (AF_MERGE) mode, it gets the first block coded from valid neighboring reconstructed blocks using the affine mode based on the following access order: A1→B1→B0→A0→B2→NA-block. Therefore, in this example, if none of blocks A1, B1, B0, A0, or B2 are coded using the affine mode, the video coder may determine that the MVP for the CU is the first one of the non-adjacent blocks that is coded in the affine mode.
[0242] As briefly discussed above, the motion derivation process in the FRUC merge mode includes two steps. Specifically, the CU-level motion search is performed first, followed by sub-CU-level motion improvement. At the CU level, the video coder derives an initial motion vector for the entire CU based on bilateral matching or template matching. To derive the initial motion vector for the entire CU, the video coder may first generate a list of MV candidates (FRUC CU-level MV candidate set) and the video coder selects the candidate that results in the minimum matching cost as the starting point for further CU-level improvement. Then, the video coder performs a local search around the starting point based on bilateral matching or template matching. The video coder then adopts the MV that results in the minimum matching cost as the MV for the entire CU. Subsequently, the video coder may further apply the FRUC sub-CU-level MV candidate set containing the derived CU motion vector to improve the motion information at the sub-CU level.
[0243] The present invention proposes to add one or more NA-SMVPs to the FRUC CU-level MV candidate set, the FRUC sub-CU-level MV candidate set, or both. Thus, a video coder (e.g., video encoder 20 or video decoder 30) may determine a set of CU-level FRUC motion vector candidates. According to the techniques of the present invention, the set of CU-level FRUC motion vector candidates may include one or more NA-SMVPs. In addition, the video coder may select a CU-level FRUC motion vector candidate from the set of CU-level FRUC motion vector candidates. The video coder may then determine the CU-level motion vector at least in part by performing a local search starting from the selected CU-level FRUC motion vector candidate. The video coder may also employ the set of FRUC sub-CU-level motion vector candidates to improve the CU-level motion vector at the sub-CU level. In this example, at least one of the set of CU-level FRUC motion vector candidates and the set of FRUC sub-CU-level motion vector candidates may include a NA-SMVP that specifies the motion vector of a non-neighboring block. The NA-SMVP may be determined according to any of the examples provided elsewhere in this disclosure.
[0244] The high-level syntax related to non-neighboring MVPs may be predetermined or explicitly signaled into the bitstream. The high-level syntax includes but is not limited to the following control parameters:
[0245] 1. The number of neighboring blocks N. In some examples, the number is adaptive according to coding information such as block size. In some examples, the number N depends on the coding mode (such as skip / merge / AMVP) or the maximum allowed number of candidates for merge / AMVP / skip mode.
[0246] 2. Distance s / t (if it exists, then multiple parameters s / t are signaled), where Figures 20 to 23 As shown in , s is the horizontal shift and t is the vertical shift of the NA block.
[0247] 3. The size of the parent block used for NA block determination.
[0248] 4. Activation / deactivation of non-adjacent MVP.
[0249] 5. See above Figures 20 to 22 The number of levels used to locate NA blocks is discussed.
[0250] In HEVC, the merge candidate list size ranges from 1 to 5, while the AMVP candidate list size is fixed to 2. In JEM, the merge candidate list size ranges from 1 to 7, while the AMVP candidate list size is fixed to 2. When NA-SMVP is included in the MVP or merge candidate list, the maximum candidate list size may be increased accordingly. For example, when one or more NA-SMVPs are inserted into the merge candidate list size, the merge candidate list size may be increased to N (where N is a positive integer and N>7). In this example, when one or more NA-SMVPs are inserted into the merge candidate list size, the AMVP candidate list size may be increased to M (where M is a positive integer and M>2).
[0251] The present invention also proposes the use of synthetic MV candidates in addition to those provided in HEVC. The utilization of additional synthetic MV candidates may also follow the examples provided elsewhere in this invention regarding the use of non-neighboring MVPs. That is, the synthetic MV candidates may be generated based on motion parameters of non-neighboring blocks, where the non-neighboring blocks are determined according to any of the examples provided above.
[0252] In some examples, a video coder (eg, video encoder 20 or video decoder 30) selects the video sequence according to a predefined order (eg, A1, B1, B0, A0, B2 (see Figure 2 )) A synthetic unidirectional prediction candidate is generated by splitting the available bidirectional prediction MV candidate into two independent unidirectional prediction candidates. The video coder can then insert the generated synthetic unidirectional prediction candidate into the candidate list.
[0253] Furthermore, in some examples, when integer MVD (i.e., MVD assigned to a precision of one luma sample) or four luma sample MVD (i.e., MVD assigned to a precision of four luma samples) is enabled, the video coder may generate a synthetic integer MV candidate (i.e., MV candidate with a motion vector with a precision of one luma sample) or four luma sample MV candidates (i.e., MV candidate with a motion vector with a precision of four luma samples) by rounding or truncating the available MV candidates to integer MV or four luma sample MV candidates. The video coder may then insert the generated synthetic integer MV candidate or 4 luma sample MV into the candidate list.
[0254] The present invention also proposes a way to include multiple TMVP candidates in a merge candidate list or an AMVP candidate list. In one example, following the HEVC design where one co-located picture is signaled, the video coder uses more temporal neighboring blocks to derive more TMVP candidates. For example, in addition to checking only H and C blocks in order ( Figure 2In addition to selecting one of the blocks (depicted in FIG. 1 ) and selecting one of them, the video coder may check more blocks (e.g., co-located blocks of spatial neighboring blocks of the current block). In one example, the spatial neighboring blocks checked by the video coder may include only neighboring blocks, such as Fig.16 , A0, A1, B0, B1, and B2 shown in . Thus, in this example, the video coder considers up to five co-located blocks of the neighboring block (including or in addition to the H and C blocks). In another example, the video coder may also consider co-located blocks of the NA block (e.g. Fig.16 11 NA blocks in 1,1 ,NA 1,2 ,NA 1,3 ,NA 1,4 ,NA 1,5 ,NA 1,6 ,NA 1,7 ,NA 1,8 ,NA 1,9 ,NA 1,10 ,NA 1,11 )).
[0255] In some examples, the video coder considers co-located blocks located at opposite sides of the current block. Fig.16 NA block in NA 1,6 (located at the (-4, -4) position), the video coder may select the corresponding NA co-located block (i.e., a block that is co-located with a non-neighboring block and is a reference picture) as the block located at (W+3, H+3), where W and H are the width and height of the current block in basic units of the block size of motion information (e.g., 4×4). This results in a set of NA co-located blocks that are in the bottom and right positions of the current block. In some examples, the video coder adds this set of MV candidates (i.e., MV candidates defined from the NA co-located blocks) to the NA-SMVP in an interleaved manner. Alternatively, in some examples, the video coder may insert this set of MV candidates as a set of TMVP candidates as in an existing AMVP or merge derivation process described elsewhere in this disclosure.
[0256] In some examples, the video coder may select more than one co-located picture. In other words, the video coder may select more than one reference picture from which to derive TMVP candidates. In these examples, the selected pictures may be defined as all reference pictures included in the reference picture list or the selected pictures may be signaled. In one example, for each selected reference picture, the video coder may check the H and C blocks within the selected reference picture in the same order as used in HEVC (i.e., bottom right, then center). Alternatively, in one example, for each selected picture, the video coder checks more blocks (e.g., spatially adjacent co-located blocks and / or NA blocks of the current block).
[0257] Furthermore, when the video coder derives multiple TMVP candidates, the video coder may apply a pruning process to remove identical candidates therein. Alternatively, in some examples, the video coder may apply a limited pruning process, meaning that one of the TMVP candidates may be compared only to a certain number of candidates and not to all other candidates. Furthermore, in one example, the video coder may further apply a pruning process between one TMVP candidate and other candidates, such as spatial merge candidates. The proposed techniques using additional TMVPs may be applied to specific coding modes, such as merge and / or AMVP modes.
[0258] As described in "Overview of the High Efficiency Video Coding (HEVC) Standard" by G. J. Sullivan, J.-R. Ohm, W.-J. Han, and T. Wiegand, IEEE Transactions on Circuits and Systems for Video Technology, Vol. 22, No. 12, Dec. 2012, pp. 1649-1668, HEVC considers three most probable modes (MPMs) instead of one most probable mode considered in H.264 / MPEG-4 AVC when predictively coding luma intra prediction modes due to the increased number of intra prediction directions compared to H.264 / MPEG-4 AVC. The MPMs are derived from the intra modes of spatially neighboring blocks. In the case where the current luma prediction mode is one of the three MPMs, only the MPM index is transmitted to the decoder. In addition, the index of the current luma prediction mode that does not include the three MPMs is transmitted to the decoder by using a 5-bit fixed length code. JEM also follows the same intra mode prediction scheme. However, JEM may include more than three MPMs.
[0259] The present invention proposes a technique for using intra modes of non-neighboring blocks to derive one or more MPMs to achieve better prediction efficiency. The techniques described in the previous section can be applied to MPM derivation. Fig.35 and Fig.36 Provides examples for deriving MPMs from non-adjacent blocks.
[0260] Fig.24 FIG. 2 is a block diagram of an example video encoder 20 that may implement the techniques of this disclosure. Fig.24 , and the diagrams should not be considered limiting of the techniques as broadly exemplified and described in this disclosure. The techniques of this disclosure may be applied to various coding standards or methods.
[0261] The processing circuit includes a video encoder 20, and the video encoder 20 is configured to perform one or more of the example techniques described in this disclosure. For example, the video encoder 20 includes an integrated circuit, and Fig.24 The various units illustrated in the drawings may be formed as hardware circuit blocks interconnected with a circuit bus. These hardware circuit blocks may be separate circuit blocks or two or more of the units may be combined into a common hardware circuit block. The hardware circuit blocks may be formed as a combination of electrical components that form operation blocks such as arithmetic logic units (ALUs), elementary function units (EFUs), and logic blocks such as AND, OR, NAND, NOR, XOR, XNOR, and other similar logic blocks.
[0262] In some instances, Fig.24 One or more of the units depicted in the example may be software units executed on processing circuitry. In these examples, object code for these software units is stored in memory. The operating system may cause video encoder 20 to retrieve the object code and execute the object code, which causes video encoder 20 to perform operations that implement the example techniques. In some examples, the software unit may be firmware that video encoder 20 executes at startup. Thus, video encoder 20 is a structural component having hardware that performs the example techniques or having software / firmware that executes on the hardware to specialize the hardware that performs the example techniques.
[0263] exist Fig.24 In the example of , video encoder 20 includes prediction processing unit 100, video data memory 101, residual generation unit 102, transform processing unit 104, quantization unit 106, inverse quantization unit 108, inverse transform processing unit 110, reconstruction unit 112, filter unit 114, decoded picture buffer 116, and entropy encoding unit 118. Prediction processing unit 100 includes inter-prediction processing unit 120 and intra-prediction processing unit 126. Inter-prediction processing unit 120 may include a motion estimation unit and a motion compensation unit (not shown).
[0264] The video data memory 101 may be configured to store video data to be encoded by components of the video encoder 20. The video data stored in the video data memory 101 may be obtained, for example, from a video source 18. The decoded picture buffer 116 may be a reference picture memory that stores reference video data for use by the video encoder 20 when encoding video data (e.g., in an intra-frame or inter-frame decoding mode). The video data memory 101 and the decoded picture buffer 116 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 101 and the decoded picture buffer 116 may be provided by the same memory device or by separate memory devices. In various examples, the video data memory 101 may be on-chip with other components of the video encoder 20, or off-chip relative to those components. The video data memory 101 may be connected to the video encoder 20. Figure 1 The storage medium 19 is the same as or Figure 1 portion of the storage medium 19.
[0265] Video encoder 20 receives video data. Video encoder 20 may encode each CTU in a segment of a picture of the video data. Each of the CTUs may be associated with an equal-sized luma coding tree block (CTB) and a corresponding CTB of the picture. As part of encoding the CTUs, prediction processing unit 100 may perform partitioning to divide the CTBs of the CTU into progressively smaller blocks. The smaller blocks may be coding blocks of a CU. For example, prediction processing unit 100 may partition the CTBs associated with the CTU according to a tree structure.
[0266] Video encoder 20 may encode a CU of a CTU to generate an encoded representation of the CU (i.e., a coded CU). As part of encoding a CU, prediction processing unit 100 may partition coding blocks associated with the CU in one or more PUs of the CU. Thus, each PU may be associated with a luma prediction block and a corresponding chroma prediction block. Video encoder 20 and video decoder 30 may support PUs of various sizes. As indicated above, the size of a CU may refer to the size of the luma coding block of the CU, and the size of a PU may refer to the size of the luma prediction block of the PU. Assuming that the size of a particular CU is 2N×2N, video encoder 20 and video decoder 30 may support PU sizes of 2N×2N or N×N for intra-prediction, and symmetric PU sizes of 2N×2N, 2N×N, N×2N, N×N, or similar sizes for inter-prediction. Video encoder 20 and video decoder 30 may also support asymmetric partitioning of PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-prediction.
[0267] Inter-prediction processing unit 120 may generate predictive data for a PU. As part of generating predictive data for a PU, inter-prediction processing unit 120 performs inter-prediction on the PU. The predictive data for the PU may include a predictive block for the PU and motion information for the PU. Depending on whether the PU is in an I slice, a P slice, or a B slice, inter-prediction processing unit 120 may perform different operations for the PU of the CU. In an I slice, all PUs are intra-predicted. Therefore, if the PU is in an I slice, inter-prediction processing unit 120 does not perform inter-prediction on the PU. Therefore, for blocks encoded in I mode, the predicted blocks are formed from previously encoded neighboring blocks in the same frame using spatial prediction. If the PU is in a P slice, inter-prediction processing unit 120 may use unidirectional inter-prediction to generate a predictive block for the PU. If the PU is in a B slice, inter-prediction processing unit 120 may use unidirectional or bidirectional inter-prediction to generate a predictive block for the PU.
[0268] Inter-prediction processing unit 120 may perform certain techniques of this disclosure. For example, inter-prediction processing unit 120 may determine motion vectors for non-neighboring blocks of a current picture of video data, the non-neighboring blocks being non-neighboring to the current block of the current picture. Additionally, inter-prediction processing unit 120 may determine an MVP for the current block based on the motion vectors of the non-neighboring blocks. Additionally, inter-prediction processing unit 120 may determine a motion vector for the current block, wherein the motion vector is equal to the motion vector of the MVP of the current block or is equal to the motion vector of the MVP of the current block plus an MVD signaled in the bitstream.
[0269] Intra-prediction processing unit 126 may generate predictive data for a PU by performing intra prediction on the PU. The predictive data for the PU may include predictive blocks and various syntax elements for the PU. Intra-prediction processing unit 126 may perform intra prediction on PUs in I slices, P slices, and B slices.
[0270] To perform intra prediction on a PU, intra prediction processing unit 126 may use multiple intra prediction modes to generate multiple sets of predictive data for the PU. Intra prediction processing unit 126 may use samples from sample blocks of neighboring PUs to generate predictive blocks for the PU. For PUs, CUs, and CTUs, assuming a left-to-right, top-to-bottom coding order, the neighboring PU may be above, to the right, to the left, or to the left of the PU. Intra prediction processing unit 126 may use various numbers of intra prediction modes, such as 33 directional intra prediction modes. In some examples, the number of intra prediction modes may depend on the size of the region associated with the PU.
[0271] Prediction processing unit 100 may select predictive data for PUs of a CU from the predictive data for PUs generated by inter-prediction processing unit 120, or from the predictive data for PUs generated by intra-prediction processing unit 126. In some examples, prediction processing unit 100 selects predictive data for PUs of a CU based on rate / distortion metrics of multiple sets of predictive data. The predictive block of the selected predictive data may be referred to herein as a selected predictive block. Intra-prediction processing unit 126 may perform techniques of this disclosure related to MPM.
[0272] Residual generation unit 102 may generate a residual block (e.g., luma, Cb, and Cr residual block) for a CU based on the coding blocks (e.g., luma, Cb, and Cr coding blocks) of the CU and the selected predictive blocks (e.g., predictive luma, Cb, and Cr blocks) of the PUs of the CU. For example, residual generation unit 102 may generate the residual block for the CU such that each sample in the residual block has a value equal to the difference between a sample in the coding blocks of the CU and a corresponding sample in a corresponding selected predictive sample block of the PUs of the CU.
[0273] Transform processing unit 104 may partition the residual blocks of a CU into transform blocks for TUs of the CU. For example, transform processing unit 104 may perform quadtree partitioning to partition the residual blocks of a CU into transform blocks for TUs of the CU. Thus, a TU may be associated with a luma transform block and two chroma transform blocks. The size and position of the luma transform blocks and the chroma transform blocks of the TUs of the CU may or may not be based on the size and position of the prediction blocks of the PUs of the CU. A quadtree structure referred to as a “residual quadtree” (RQT) may include nodes associated with each of the regions. The TUs of a CU may correspond to leaf nodes of the RQT.
[0274] Transform processing unit 104 may generate transform coefficient blocks for each TU of a CU by applying one or more transforms to the transform blocks of the TU. Transform processing unit 104 may apply various transforms to the transform blocks associated with the TU. For example, transform processing unit 104 may apply a discrete cosine transform (DCT), a directional transform, or a conceptually similar transform to the transform blocks. In some examples, transform processing unit 104 does not apply a transform to the transform blocks. In these examples, the transform blocks may be processed as transform coefficient blocks.
[0275] Quantization unit 106 may quantize transform coefficients in a coefficient block. Quantization unit 106 may quantize coefficient blocks associated with TUs of a CU based on a quantization parameter (QP) value associated with the CU. Video encoder 20 may adjust the degree of quantization applied to coefficient blocks associated with a CU by adjusting the QP value associated with the CU. Quantization may introduce a loss of information. Therefore, the quantized transform coefficients may have lower precision than the original transform coefficients.
[0276] Inverse quantization unit 108 and inverse transform processing unit 110 may apply inverse quantization and inverse transform, respectively, to the coefficient block to reconstruct a residual block from the coefficient block. Reconstruction unit 112 may add the reconstructed residual block to corresponding samples from one or more predictive blocks generated by prediction processing unit 100 to produce a reconstructed transform block associated with the TU. By reconstructing the transform blocks for each TU of a CU in this manner, video encoder 20 may reconstruct the coding blocks of the CU.
[0277] Filter unit 114 may perform one or more deblocking operations to reduce blocking artifacts in the coding blocks associated with the CU. Decoded picture buffer 116 may store the reconstructed coding blocks after filter unit 114 performs the one or more deblocking operations on the reconstructed coding blocks. Inter-prediction processing unit 120 may use a reference picture containing the reconstructed coding blocks to perform inter prediction on PUs of other pictures. In addition, intra-prediction processing unit 126 may use the reconstructed coding blocks in decoded picture buffer 116 to perform intra prediction on other PUs in the same picture as the CU.
[0278] Entropy encoding unit 118 may receive data from other functional components of video encoder 20. For example, entropy encoding unit 118 may receive coefficient blocks from quantization unit 106 and may receive syntax elements from prediction processing unit 100. Entropy encoding unit 118 may perform one or more entropy encoding operations on the data to generate entropy-encoded data. For example, entropy encoding unit 118 may perform a CABAC operation, a context-adaptive variable length coding (CAVLC) operation, a variable-to-variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an exponential Golomb coding operation, or another type of entropy encoding operation on the data. Video encoder 20 may output a bitstream that includes the entropy-encoded data generated by entropy encoding unit 118. For example, the bitstream may include data representing values of transform coefficients for a CU.
[0279] Fig.25 FIG. 1 is a block diagram illustrating an example video decoder 30 configured to implement the techniques of this disclosure. Fig.25 , and it does not limit the techniques as broadly demonstrated and described in this disclosure. For purposes of explanation, this disclosure describes video decoder 30 in the context of HEVC coding. However, the techniques of this disclosure may be applicable to other coding standards or methods.
[0280] The processing circuitry includes a video decoder 30, and the video decoder 30 is configured to perform one or more of the example techniques described in this disclosure. For example, the video decoder 30 includes an integrated circuit, and Fig.25The various units illustrated in the drawings may be formed as hardware circuit blocks interconnected with a circuit bus. These hardware circuit blocks may be separate circuit blocks or two or more of the units may be combined into a common hardware circuit block. The hardware circuit blocks may be formed as a combination of electronic components that form operation blocks such as arithmetic logic units (ALUs), elementary function units (EFUs), and logic blocks such as AND, OR, NAND, NOR, XOR, XNOR, and other similar logic blocks.
[0281] In some instances, Fig.25 One or more of the units depicted in the example may be software units executed on the processing circuitry. In these examples, object code for these software units is stored in memory. The operating system may cause the video decoder 30 to retrieve the object code and execute the object code, which causes the video decoder 30 to perform operations that implement the example techniques. In some examples, the software unit may be firmware that the video decoder 30 executes at startup. Thus, the video decoder 30 is a structural component having hardware that performs the example techniques or having software / firmware that executes on the hardware to specialize the hardware that performs the example techniques.
[0282] exist Fig.25 In the example of , video decoder 30 includes entropy decoding unit 150, video data memory 151, prediction processing unit 152, inverse quantization unit 154, inverse transform processing unit 156, reconstruction unit 158, filter unit 160, and decoded picture buffer 162. Prediction processing unit 152 includes motion compensation unit 164 and intra-prediction processing unit 166. In other examples, video decoder 30 may include more, fewer, or different functional components.
[0283] The video data memory 151 may store encoded video data, such as an encoded video bitstream, to be decoded by components of the video decoder 30. The video data stored in the video data memory 151 may be obtained from the computer-readable medium 16, such as from a local video source (such as a camera), or by accessing a physical data storage medium, such as via a wired or wireless network communication of video data. The video data memory 151 may form a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. The decoded picture buffer 162 may be a reference picture memory that stores reference video data used by the video decoder 30 to decode video data, such as in an intra-frame or inter-frame decoding mode, or for output. The video data memory 151 and the decoded picture buffer 162 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 151 and the decoded picture buffer 162 may be provided by the same memory device or separate memory devices. In various examples, video data memory 151 may be on-chip with other components of video decoder 30, or off-chip relative to those components. Figure 1 The storage medium 28 is the same as or Figure 1 portion of the storage medium 28.
[0284] Video data memory 151 receives and stores encoded video data (e.g., NAL units) of a bitstream. Entropy decoding unit 150 may receive encoded video data (e.g., NAL units) from video data memory 151, and may parse the NAL units to obtain syntax elements. Entropy decoding unit 150 may entropy decode the entropy-encoded syntax elements in the NAL units. Prediction processing unit 152, inverse quantization unit 154, inverse transform processing unit 156, reconstruction unit 158, and filter unit 160 may generate decoded video data based on the syntax elements extracted from the bitstream. Entropy decoding unit 150 may perform a process that is generally inverse to the process of entropy encoding unit 118.
[0285] In addition to obtaining syntax elements from the bitstream, video decoder 30 may perform a reconstruction operation on a non-partitioned CU. To perform a reconstruction operation on a CU, video decoder 30 may perform a reconstruction operation on each TU of the CU. By performing a reconstruction operation on each TU of the CU, video decoder 30 may reconstruct the residual block of the CU.
[0286] As part of performing a reconstruction operation on a TU of a CU, inverse quantization unit 154 may inverse quantize (e.g., dequantize) a coefficient block associated with the TU. After inverse quantization unit 154 inverse quantizes the coefficient block, inverse transform processing unit 156 may apply one or more inverse transforms to the coefficient block in order to generate a residual block associated with the TU. For example, inverse transform processing unit 156 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the coefficient block.
[0287] If the PU is encoded using intra prediction, intra prediction processing unit 166 may perform intra prediction to generate predictive blocks for the PU. Intra prediction processing unit 166 may use an intra prediction mode to generate predictive blocks for the PU based on sample spatial neighboring blocks. Intra prediction processing unit 166 may determine the intra prediction mode for the PU based on one or more syntax elements obtained from the bitstream. Intra prediction processing unit 166 may perform techniques of this disclosure related to MPM.
[0288] If a PU is encoded using inter prediction, entropy decoding unit 150 and / or motion compensation unit 164 may determine motion information for the PU. Motion compensation unit 164 may determine one or more reference blocks based on the motion information of the PU. Motion compensation unit 164 may generate predictive blocks (e.g., predictive luma, Cb, and Cr blocks) for the PU based on the one or more reference blocks.
[0289] According to the techniques of this disclosure, motion compensation unit 164 may determine motion vectors for non-neighboring blocks of a current picture of video data that are not adjacent to a current block of the current picture. Additionally, motion compensation unit 164 may determine motion for the current block based on the motion vectors of the non-neighboring blocks. Motion compensation unit 164 may also determine a current block motion vector based on the MVP for the current block.
[0290] Reconstruction unit 158 may reconstruct the coding blocks (e.g., luma, Cb, and Cr coding blocks) of the CU using transform blocks (e.g., luma, Cb, and Cr transform blocks) of the TUs of the CU and predictive blocks (e.g., luma, Cb, and Cr blocks) of the PUs of the CU (i.e., intra prediction data or inter prediction data, as applicable). For example, reconstruction unit 158 may add samples of transform blocks (e.g., luma, Cb, and Cr transform blocks) to corresponding samples of predictive blocks (e.g., luma, Cb, and Cr predictive blocks) to reconstruct the coding blocks (e.g., luma, Cb, and Cr coding blocks) of the CU.
[0291] Filter unit 160 may perform a deblocking operation to reduce blocking artifacts associated with the coding blocks of a CU. Video decoder 30 may store the coding blocks of the CU in decoded picture buffer 162. Decoded picture buffer 162 may provide reference pictures for subsequent motion compensation, intra prediction, and display on a display device (e.g., Figure 1 For example, video decoder 30 may perform intra prediction or inter prediction operations on PUs of other CUs based on blocks in decoded picture buffer 162.
[0292] For purposes of illustration, certain aspects of this disclosure have been described with respect to extensions to the HEVC standard. However, the techniques described in this disclosure may be used for other video coding processes, including other standards or proprietary video coding processes that have not yet been developed.
[0293] As described in the present invention, a video coder may refer to a video encoder or a video decoder. Similarly, a video coding unit may refer to a video encoder or a video decoder. Likewise, video coding may refer to video encoding or video decoding, when applicable. In the present invention, the phrase "based on" may indicate based only on, at least partially on, or based on in some way. The present invention may use the term "video unit" or "video block" or "block" to refer to one or more blocks of samples and a grammatical structure of samples used to code one or more blocks of samples. Example types of video units may include CTUs, CUs, PUs, transform units (TUs), macroblocks, macroblock partitions, and the like. In some cases, the discussion of PUs may be interchangeable with the discussion of macroblocks or macroblock partitions. Example types of video blocks may include coding tree blocks, coding blocks, and other types of video data blocks.
[0294] Fig.26 1 is a flowchart illustrating an example operation of a video encoder for encoding video data in accordance with one or more techniques of this disclosure. Fig.26 In an example of , video encoder 20 may determine a motion vector for a non-neighboring block of a current picture of video data (2600). The non-neighboring block is not adjacent to the current block of the current picture.
[0295] In addition, video encoder 20 may determine an MVP for the current block based on motion vectors of non-neighboring blocks (2602). In some examples, the MVP for the current block is in an affine mode. In other words, the motion vectors are specified for control points in the MVP. In some examples, the non-neighboring blocks are blocks in a template of a fixed pattern that defines the positions of the non-neighboring blocks relative to the current block.
[0296] In one example, as part of determining the MVP for the current block, video encoder 20 may generate a list of MVP candidates based in part on the motion vectors of the non-neighboring blocks. In this example, the list of MVP candidates includes MVP candidates that specify the motion vectors of the non-neighboring blocks. Furthermore, in this example, video encoder 20 may determine the MVP for the current block from among the MVP candidates in the list of MVP candidates. For example, video encoder 20 may use RD cost analysis to determine the MVP for the current block.
[0297] In some examples, video encoder 20 sorts a plurality of NA-SMVP candidates in the list of MVP candidates. In these examples, for each respective NA-SMVP candidate in the plurality of NA-SMVP candidates, the respective NA-SMVP candidate corresponds to a respective non-adjacent block in a plurality of non-adjacent blocks and the respective NA-SMVP specifies a motion vector of the respective non-adjacent block. The plurality of non-adjacent blocks includes a first non-adjacent block. Furthermore, in this example, video encoder 20 may sort the plurality of NA-SMVP candidates in the list according to a distance of the corresponding non-adjacent block from the current block. The distance may be in an L1 or L2 sense.
[0298] In some examples, video encoder 20 determines a first plurality of NA-SMVP candidates. For each respective NA-SMVP candidate in the first plurality of NA-SMVP candidates, the respective NA-SMVP candidate corresponds to a respective non-adjacent block in a plurality of non-adjacent blocks. The respective NA-SMVP specifies a motion vector for the respective non-adjacent block. The first plurality of non-adjacent blocks includes the first non-adjacent block. In this example, video encoder 20 may include a second plurality of NA-SMVP candidates in a list, the second plurality of NA-SMVP candidates including non-duplicate NA-SMVP candidates in the first plurality of NA-SMVP candidates. In this manner, video encoder 20 may perform a pruning process that removes duplicate NA-SMVP candidates from the list. The second plurality of NA-SMVP candidates may be sorted in the list according to the frequency with which a motion vector specified by a NA-SMVP candidate in the first plurality of NA-SMVP candidates is specified by a NA-SMVP candidate in the second plurality of NA-SMVP candidates.
[0299] In some examples, the list of MVP candidates is a global motion vector candidate list. The global motion vector candidate list includes MVP candidates that specify the motion vector of each block encoded in the current picture and before the current block. In these examples, the video coder can determine the motion vector of the non-neighboring block from the MVP candidates in the global motion vector candidate list.
[0300] In addition, in some examples, video encoder 20 stores multiple non-adjacent MVP candidates in a FIFO buffer. The multiple non-adjacent MVP candidates include non-adjacent MVP candidates that specify motion vectors of non-adjacent blocks. In these examples, video encoder 20 updates the FIFO buffer to remove the earliest added non-adjacent MVP candidate from the FIFO buffer and add the MVP candidate to the FIFO buffer.
[0301] In some examples, video encoder 20 applies a pruning process to the list. The pruning process is adapted to the block size of the current block. For example, a full motion pruning process or a partial motion pruning process may be applied, as described elsewhere in this disclosure.
[0302] Video encoder 20 may also determine a motion vector for the current block (2604). In some examples, such as where merge mode is used, the motion vector for the current block is equal to the motion vector for the MVP. In some examples, such as when AMVP is used, the motion vector for the current block is equal to the motion vector for the MVP plus the MVD signaled in the bitstream.
[0303] In addition, video encoder 20 may determine a predictive block based on the motion vector of the current block (2606). Video encoder 20 may generate residual sample values based on the predictive block (2608). Video encoder 20 may determine the predictive block and generate residual sample values according to any of the examples provided elsewhere in this disclosure.
[0304] Fig. 27 1 is a flowchart illustrating example operation of video decoder 30 for decoding video data in accordance with one or more techniques of this disclosure. Fig. 27 In an example of 2700, video decoder 30 may determine a motion vector for a non-neighboring block of a current picture of video data. The non-neighboring block is not adjacent to the current block of the current picture. In some examples, the non-neighboring block is a block in a template of a fixed pattern that defines a position of a block relative to the current block.
[0305] In some examples, the list of MVP candidates is a global motion vector candidate list. The global motion vector candidate list includes MVP candidates that specify the motion vector of each block encoded in the current picture and before the current block. In these examples, the video coder can determine the motion vector of the non-neighboring block from the MVP candidates in the global motion vector candidate list.
[0306] In addition, in some examples, video decoder 30 stores a plurality of non-adjacent MVP candidates in a FIFO buffer. The plurality of non-adjacent MVP candidates include non-adjacent MVP candidates that specify motion vectors of non-adjacent blocks. In these examples, video encoder 20 updates the FIFO buffer to remove the earliest added non-adjacent MVP candidate from the FIFO buffer and add the MVP candidate to the FIFO buffer.
[0307] In addition, video decoder 30 may determine the MVP of the current block based on the motion vectors of the non-neighboring blocks (2702). In some examples, the MVP of the current block may be in an affine mode, a non-affine mode, or another mode of motion compensated prediction. In one example, as part of determining the MVP of the current block, video decoder 30 may generate a list of MVP candidates based in part on the motion vectors of the non-neighboring blocks. In this example, the list of MVP candidates includes MVP candidates that specify the motion vectors of the non-neighboring blocks. In addition, in this example, video decoder 30 may determine the MVP of the current block from among the MVP candidates in the list of MVP candidates. For example, video decoder 30 may use rate-distortion analysis to identify the best MVP in the list of MVP candidates.
[0308] In some examples, the non-adjacent block is a first non-adjacent block and video decoder 30 sorts the plurality of NA-SMVP candidates in the list. In other words, video decoder 30 inserts the plurality of NA-SMVP candidates into the list according to a particular order. In these examples, for each respective NA-SMVP candidate in the plurality of NA-SMVP candidates, the respective NA-SMVP candidate corresponds to a respective non-adjacent block in the plurality of non-adjacent blocks. The respective NA-SMVP specifies a motion vector of the respective non-adjacent block. In some examples, video decoder 30 sorts the plurality of NA-SMVP candidates in the list according to a distance of the corresponding non-adjacent block from the current block (e.g., according to L1 or L2). In some examples, video decoder 30 sorts the plurality of NA-SMVP candidates according to any of the examples provided elsewhere in this disclosure.
[0309] In some examples, the non-adjacent block is a first non-adjacent block and the video decoder 30 further determines a first plurality of NA-SMVP candidates. For example, in these examples, for each respective NA-SMVP candidate in the first plurality of NA-SMVP candidates, the respective NA-SMVP candidate corresponds to a respective non-adjacent block of the plurality of non-adjacent blocks. The respective NA-SMVP specifies a motion vector of the respective non-adjacent block. The first plurality of non-adjacent blocks includes the first non-adjacent block. In addition, in these examples, the video decoder 30 may sort the second plurality of NA-SMVP candidates in the list. In other words, the video decoder 30 may include the second plurality of NA-SMVP candidates in the list according to a particular order. The second plurality of NA-SMVP candidates include non-repeating NA-SMVP candidates in the first plurality of NA-SMVP candidates. In some examples, the second plurality of NA-SMVP candidates are sorted in the list according to the frequency of the motion vectors specified by the NA-SMVP candidates in the first plurality of NA-SMVP candidates and the motion vectors specified by the NA-SMVP candidates in the second plurality of NA-SMVP candidates.
[0310] In some examples, video decoder 30 may apply a pruning process to the list. In some of these examples, the pruning process is adapted to the block size of the current block. In some examples, video decoder 30 applies a full motion pruning process to NA-SMVP and other merge candidates, as described elsewhere in this disclosure. In some examples, video decoder 30 applies only a partial motion pruning process to NA-SMVP and other merge candidates, as described elsewhere in this disclosure.
[0311] Additionally, video decoder 30 may determine a motion vector for the current block based on the MVP of the current block (2704). In some examples, if the list of MVP candidates is a merge candidate list, video decoder 30 may determine the MVP for the current block such that the MVP for the current block specifies a motion vector for an MVP candidate in the list of MVP candidates. In some examples, if the list of MVP candidates is an AMVP candidate list, video decoder 30 may determine the MVP for the current block such that the motion vector for the MVP of the current block is equal to the motion vector for the MVP candidate in the list of MVP candidates plus the MVD.
[0312] Video decoder 30 may also determine a predictive block based on the motion vector of the current block (2706). For example, video decoder 30 may determine the predictive block based on samples of a reference picture at the location indicated by the motion vector, as described in detail elsewhere in this disclosure. Video decoder 30 may then reconstruct sample values of the current picture based on the predictive block (2708). For example, video decoder 30 may reconstruct sample values of the current picture by adding sample values in the predictive block to residual sample values.
[0313] Fig.28 1 is a flowchart illustrating an example operation for determining a NA-SMVP using FRUC motion vector candidates in accordance with the techniques of this disclosure. Fig.28 In an example of , a video coder (e.g., video encoder 20 or video decoder 30) may determine a set of CU-level frame rate up conversion (FRUC) motion vector candidates (2800). Additionally, the video coder may select a CU-level FRUC motion vector candidate from the set of CU-level FRUC motion vector candidates (2802). The video coder may determine the CU-level motion vector (2804) at least in part by performing a local search starting from the selected CU-level FRUC motion vector candidate. Furthermore, the video coder may employ the set of FRUC sub-CU level motion vector candidates to refine the CU-level motion vector at the sub-CU level (2806). According to the techniques of the present disclosure, at least one of the set of CU-level FRUC motion vector candidates and the set of FRUC sub-CU level motion vector candidates includes a specified Fig.26 and Fig. 27 The NA-SMVP of the motion vectors of the non-neighboring blocks. The FRUC process may otherwise be consistent with the examples provided elsewhere in this disclosure.
[0314] Fig.29 1 is a flowchart illustrating example operation of video encoder 20 to include a synthesis candidate in the list of MVP candidates for a current block in accordance with one or more techniques of this disclosure. Fig.29 In an example of , video encoder 20 may determine a list of MVP candidates for a current block of a current picture of video data (2900). The list of MVP candidates includes bi-directional prediction MVP candidates and synthetic uni-directional prediction MVP candidates. In addition, Fig.29In an example and in accordance with the techniques of the present invention, as part of determining a list of MVP candidates, video encoder 20 generates a synthetic unidirectional prediction MVP candidate based on a motion vector specified by a bidirectional prediction MVP candidate (2902). In one example, video encoder 20 generates a synthetic unidirectional prediction candidate by splitting an available bidirectional prediction MV candidate into two independent unidirectional prediction candidates according to a predefined order. In this example, video encoder 20 may then insert the generated synthetic unidirectional prediction candidate into the candidate list. In some examples, when integer MVD or four luma sample MVD is enabled, video encoder 20 may generate a synthetic integer or four luma sample MV candidate by rounding or truncating the available MV candidates into integer MV or four luma sample MV candidates. In these examples, video encoder 20 inserts the synthetic integer MV candidate or 4 luma sample MV candidate into the candidate list.
[0315] In addition, Fig.29 In examples of MVP, video encoder 20 may determine the MVP for the current block based on the motion vector of the selected MVP candidate in the list of MVP candidates (2904). In addition, video encoder 20 may determine the motion vector of the current block (2906). In some examples, such as where merge mode is used, the motion vector of the current block is equal to the motion vector of the MVP. In some examples, such as when AMVP is used, the motion vector of the current block is equal to the motion vector of the MVP plus the MVD signaled in the bitstream.
[0316] Video encoder 20 may also determine a predictive block based on the motion vector of the current block (2908). In addition, video encoder 20 may generate residual sample values based on the predictive block (2910). Video encoder 20 may determine the predictive block and generate residual sample values according to any of the examples provided elsewhere in this disclosure.
[0317] Fig.30 1 is a flowchart illustrating example operation of video decoder 30 in including a synthesis candidate in the list of MVP candidates for a current block in accordance with one or more techniques of this disclosure. Fig.30 In an example of , video decoder 30 may determine a list of MVP candidates for a current block of a current picture of video data (3000). The list of MVP candidates includes a bi-directional prediction MVP candidate and a synthetic uni-directional prediction MVP candidate. Fig.30In an example and in accordance with the techniques of the present invention, as part of determining a list of MVP candidates, the video decoder 30 generates a synthetic unidirectional prediction MVP candidate based on a motion vector specified by a bidirectional prediction MVP candidate (3002). In one example, the video decoder 30 generates the synthetic unidirectional prediction candidate by splitting the available bidirectional prediction MV candidate into two independent unidirectional prediction candidates according to a predefined order. In this example, the video decoder 30 may then insert the generated synthetic unidirectional prediction candidate into the candidate list. In some examples, when integer MVD or four luma sample MVD is enabled, the video decoder 30 generates a synthetic integer or four luma sample MV candidate by rounding or truncating the available MV candidates to integer MV or four luma sample MV candidates. In these examples, the video decoder 30 inserts the synthetic integer MV candidate or 4 luma sample MV candidate into the candidate list.
[0318] exist Fig.30 In the example of , video decoder 30 may then determine the MVP of the current block based on the motion vector of the selected MVP candidate in the list of MVP candidates (3004). In addition, video decoder 30 determines the motion vector of the current block based on the MVP of the current block (3006). Video decoder 30 may determine the predictive block based on the motion vector of the current block (3008). Furthermore, video decoder 30 may reconstruct sample values of the current picture based on the predictive block (3010). Video decoder 30 may select an MVP candidate, determine a motion vector, determine a predictive block, and reconstruct values of the current picture according to any of the examples provided elsewhere in this disclosure.
[0319] Fig.31 1 is a flowchart illustrating an example operation of video encoder 20 for encoding video data in accordance with the techniques of this disclosure. Fig.31 In the example of 3100, video encoder 20 determines a list of MVP candidates for a current block of a current picture of video data. Video encoder 20 may determine the list of MVP candidates according to any of the examples provided elsewhere in this disclosure. Additionally, according to the techniques of this disclosure, video encoder 20 determines a synthesized MVP candidate by rounding or truncating the MVP candidates in the list to an integer resolution or 4 luma sample resolution. Video encoder 20 may then insert the synthesized MVP candidate into the list of MVP candidates.
[0320] Video encoder 20 may then determine a motion vector predictor (MVP) for the current block based on the motion vector of the selected MVP candidate in the list of MVP candidates (3106). For example, video encoder 20 may use a rate-distortion test to select the MVP for the current block. In addition, video encoder 20 may determine a motion vector for the current block (3108). In some examples, such as where merge mode is used, the motion vector of the current block is equal to the motion vector of the MVP. In some examples, such as when AMVP is used, the motion vector of the current block is equal to the motion vector of the MVP plus the MVD signaled in the bitstream.
[0321] Video encoder 20 may determine a predictive block based on the motion vector of the current block (3110). Next, video encoder 20 may generate residual sample values based on the predictive block (3112). Video encoder 20 may determine the predictive block and generate residual sample values according to any of the examples provided elsewhere in this disclosure.
[0322] Fig.32 1 is a flowchart illustrating an example operation of video decoder 30 for decoding video data in accordance with the techniques of this disclosure. Fig.32 In the example of 3200, video decoder 30 determines a list of MVP candidates for a current block of a current picture of video data. Video decoder 30 may determine the list of MVP candidates according to any of the examples provided elsewhere in this disclosure. Additionally, according to the techniques of this disclosure, video decoder 30 may determine a synthetic MVP candidate by rounding or truncating the MVP candidates in the list to an integer resolution or 4 luma sample resolution. Video decoder 30 may then insert the synthetic MVP candidate into the list of MVP candidates.
[0323] Subsequently, video decoder 30 may determine the MVP of the current block based on the motion vector of the selected MVP candidate in the list of MVP candidates (3206). Additionally, video decoder 30 may determine the motion vector of the current block based on the MVP of the current block (3208). Video decoder 30 may also determine the predictive block based on the motion vector of the current block (3210). Furthermore, video decoder 30 may reconstruct sample values of the current picture based on the predictive block (3212). Video decoder 30 may select an MVP candidate, determine a motion vector, determine a predictive block, and reconstruct values of the current picture according to any of the examples provided elsewhere in this disclosure.
[0324] Fig.33 1 is a flowchart illustrating an example operation of video encoder 20 for encoding video data in accordance with the techniques of this disclosure. Fig.33In an example of 3300, video encoder 20 may determine a list of MVP candidates for a current block of a current picture of video data. In general, video encoder 20 may determine a list of MVP candidates according to any of the examples provided elsewhere in this disclosure. However, according to the techniques of this disclosure, the list of MVP candidates includes a plurality of TMVP candidates. Each respective MVP candidate in the list of MVP candidates specifies a respective motion vector. A respective TMVP candidate in the plurality of TMVP candidates specifies a motion vector for one or more blocks in one or more reference pictures (e.g., a single reference picture, multiple reference pictures, etc.).
[0325] In some examples, the plurality of TMVP candidates include two or more TMVP candidates that specify a motion vector of a reference block that is co-located with a location in the current picture (e.g., a location adjacent to the current block, a location not adjacent to the current block). In these examples, the reference block is a block of one or more reference pictures.
[0326] In some examples, video encoder 20 applies a pruning process to the list of MVP candidates. For example, video encoder 20 may apply a pruning process to the list of MVP candidates to remove all or some of the same MVP candidates in the list of MVP candidates.
[0327] In addition, Fig.33 In an example of 3302, video encoder 20 may determine an MVP for a current block based on a motion vector of a selected MVP candidate in the list of MVP candidates. For example, video encoder 20 may use a rate-distortion test to determine the MVP for the current block. Video encoder 20 may also determine a motion vector for the current block (3304). In some examples, such as where merge mode is used, the motion vector of the current block is equal to the motion vector of the MVP. In some examples, such as when AMVP is used, the motion vector of the current block is equal to the motion vector of the MVP plus the MVD signaled in the bitstream.
[0328] Furthermore, video encoder 20 may use the motion vector of the current block to determine a predictive block (3306). Additionally, video encoder 20 may generate residual sample values based on the predictive block (3308). Video encoder 20 may determine the predictive block and generate residual sample values according to any of the examples provided elsewhere in this disclosure.
[0329] Fig.34 FIG. 8 is a flow chart illustrating an example operation of video decoder 30 for decoding video data in accordance with one or more examples of the present disclosure. Fig.34In an example of 3400, video decoder 30 may determine a list of MVP candidates for a current block of a current picture of video data. In general, video decoder 30 may determine a list of MVP candidates according to any of the examples provided elsewhere in this disclosure. However, according to the techniques of this disclosure, the list of MVP candidates includes a plurality of TMVP candidates. Each respective MVP candidate in the list of MVP candidates specifies a respective motion vector. A respective TMVP candidate in the plurality of TMVP candidates specifies a motion vector for one or more blocks in one or more reference pictures (e.g., a single reference picture, multiple reference pictures, etc.).
[0330] In one example, the plurality of TMVP candidates include two or more TMVP candidates that specify a motion vector of a reference block that is co-located with a location in the current picture. In this example, the reference block is a block of one or more reference pictures (e.g., a single reference picture, multiple reference pictures, etc.). In some cases of this example, the location is adjacent to the current block. In some cases of this example, the location is not adjacent to the current block.
[0331] In some examples, video decoder 30 may apply a pruning process to the list of MVP candidates. For example, video decoder 30 may apply a pruning process to the list of MVP candidates to remove all or some of the same MVP candidates in the list of MVP candidates.
[0332] In addition, Fig.34 In the example of , video decoder 30 may determine the MVP of the current block based on the motion vector of the selected MVP candidate in the list of MVP candidates (3402). Video decoder 30 may determine the motion vector of the current block based on the MVP of the current block (3404). In addition, video decoder 30 may determine the predictive block based on the motion vector of the current block (3406). Video decoder 30 may reconstruct sample values of the current picture based on the predictive block (3408). Video decoder 30 may select the MVP candidate, determine the motion vector, determine the predictive block, and reconstruct values of the current picture according to any of the examples provided elsewhere in this disclosure.
[0333] Fig.35 1 is a flowchart illustrating an example operation of video encoder 20 for encoding video data in accordance with the techniques of this disclosure. Fig.35 In an example of , video encoder 20 may determine a plurality of most probable modes (MPMs) (3500). Each respective MPM in the plurality of MPMs specifies a respective intra-prediction mode for a respective block. Fig.35In an example of , the plurality of MPMs includes a particular MPM that specifies an intra prediction mode for a non-neighboring block of a current picture of the video data. The non-neighboring block is not adjacent to the current block of the current picture. In some examples, the non-neighboring block is a block in a template of a fixed pattern that defines the position of the non-neighboring block relative to the current block. In other examples, the non-neighboring block is a block within a particular distance of the current block. The non-neighboring block may be determined according to any of the examples provided elsewhere in this disclosure.
[0334] In some examples, as part of determining the plurality of MPMs, video encoder 20 may determine an ordered list of MPMs. In these examples, the non-neighboring block-based MPMs are ordered in the list according to the frequency with which the intra-prediction mode is specified by the non-neighboring blocks in the plurality of non-neighboring blocks. In other examples, the non-neighboring block-based MPMs are not ordered in the list according to this frequency.
[0335] In some examples, to determine the multiple MPMs, video encoder 20 may determine a global MPM list that includes MPMs that specify motion information for each block encoded in the current picture and before the current block. In these examples, video encoder 20 may determine the MPM from the MPMs in the global motion vector candidate list. In some examples, video encoder 20 may store multiple non-adjacent MPMs in a FIFO buffer. In these examples, the multiple non-adjacent MPMs include non-adjacent MPMs that specify intra-prediction modes for non-adjacent blocks. In addition, in these examples, video encoder 20 may update the FIFO buffer to remove the earliest added non-adjacent MPM from the FIFO buffer and may add MPMs to the FIFO buffer. The multiple MPMs may include the MPMs in the FIFO buffer.
[0336] In addition, Fig.35 In the example of , video encoder 20 may generate a predictive block based on an intra prediction mode specified by an MPM in a plurality of MPMs (3502). In addition, video encoder 20 may generate residual sample values based on the predictive block (3504). Video encoder 20 may determine the predictive block and generate the residual sample values according to any of the examples provided elsewhere in this disclosure.
[0337] Fig.36 is a flowchart illustrating example operation of video decoder 30 for decoding video data in accordance with the techniques of this disclosure. Fig.36In an example of , video decoder 30 may determine a plurality of MPMs (3600). Each respective MPM in the plurality of MPMs specifies a respective intra-prediction mode for a respective block. According to the techniques of this disclosure, the plurality of MPMs include a particular MPM that specifies an intra-prediction mode for a non-adjacent block of a current picture of video data. The non-adjacent block is not adjacent to the current block of the current picture. In some examples, the non-adjacent block is a block in a template of a fixed pattern that defines the position of the non-adjacent block relative to the current block. In other examples, the non-adjacent block is a fixed distance from the current block. The non-adjacent block may be determined according to any of the examples provided elsewhere in this disclosure.
[0338] In some examples, as part of determining the plurality of MPMs, video decoder 30 may determine an ordered list of MPMs. In these examples, the non-neighboring block-based MPMs are ordered in the list according to the frequency with which the intra-prediction mode is specified by the non-neighboring blocks in the plurality of non-neighboring blocks. In other examples, the non-neighboring block-based MPMs are not ordered in the list according to this frequency.
[0339] In some examples, the plurality of MPMs is a global MPM list that includes MPMs that specify motion information for each block encoded in the current picture and before the current block. In these examples, the video decoder 30 may determine the MPM from the MPMs in the global motion vector candidate list. In some examples, the video decoder 30 may store a plurality of non-adjacent MPMs in a first-in, first-out (FIFO) buffer. In these examples, the plurality of non-adjacent MPMs include non-adjacent MPMs that specify intra-prediction modes for non-adjacent blocks. In addition, in these examples, the video decoder 30 may update the FIFO buffer to remove the earliest added non-adjacent MPM from the FIFO buffer and add the MPM to the FIFO buffer. The plurality of MPMs may include the MPMs in the FIFO buffer.
[0340] In addition, Fig.36 In the example of , video decoder 30 may generate a predictive block based on the intra prediction mode specified by the MPM in the plurality of MPMs (3602). In addition, video decoder 30 may reconstruct sample values of the current picture based on the predictive block (3604). Video decoder 30 may generate the predictive block and reconstruct the sample values according to any of the techniques provided elsewhere in this disclosure.
[0341] 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 broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission (e.g., 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.
[0342] In the present invention, ordinal terms such as "first", "second", "third", etc. are not necessarily indicators of positions within the order, but may be used merely to distinguish different instances of the same thing.
[0343] It should be recognized that, depending on the example, certain actions or events of any of the techniques described herein may be performed in a different sequence, may be added, merged, or omitted entirely (e.g., not all described actions or events are necessary to practice the techniques). Furthermore, in some examples, actions or events may be performed simultaneously rather than sequentially, such as via multithreading, interrupt handling, or multiple processors.
[0344] In one or more examples, the described functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media (which corresponds to tangible media such as data storage media) or communication media (which includes any media that facilitates the transfer of a computer program from one place to another, such as according to a communication protocol). In this manner, computer-readable media may generally correspond to (1) non-transitory tangible computer-readable storage media, or (2) communication media such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processing circuits to retrieve instructions, codes, and / or data structures for implementing the techniques described in the present invention. A computer program product may include a computer-readable medium.
[0345] As an example and not limitation, such computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, cache memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, optical cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwaves, then the coaxial cable, optical cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwaves are included in the definition of media. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but rather involve non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser disks, optical disks, digital versatile disks (DVDs), floppy disks, and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically by lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0346] The functions described in the present invention may be performed by fixed-function and / or programmable processing circuits. For example, instructions may be performed by fixed-function and / or programmable processing circuits. This processing circuit may include one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Therefore, the term "processor" as used herein may refer to any of the above structures or any other structures suitable for implementing the technology described herein. In addition, in some aspects, the functions described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding or incorporated in a combined codec. In addition, the technology may be fully implemented in one or more circuits or logic elements. The processing circuit may be coupled to other components in various ways. For example, the processing circuit may be coupled to other components via an internal device interconnect, a wired or wireless network connection, or another communication medium.
[0347] The techniques of this disclosure may be implemented in a variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs), or sets of ICs (e.g., chipsets). 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 described above, the various units may be combined in a codec hardware unit or provided by a set of interoperating hardware units, including one or more processors as described above, along with appropriate software and / or firmware.
[0348] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A decoding method, the method include: Generating a first-in-first-out FIFO motion vector predictor MVP candidate list buffer by a video decoder, wherein generating the FIFO MVP candidate list buffer comprises: determining, by the video decoder, motion information of a block of a current picture that was decoded before a current block of the current picture, wherein the motion information of the block includes a motion vector and a reference index; and updating, by the video decoder, the FIFO MVP candidate list buffer to remove the earlier added MVP candidate from the FIFO MVP candidate list buffer and add the motion information of the block to the FIFO MVP candidate list buffer as an MVP candidate; determining, by the video decoder, the MVP of the current block from the MVP candidates in the FIFO MVP candidate list buffer, wherein the MVP candidates in the FIFO MVP candidate list buffer include motion information of at least one non-neighboring block in the current picture that is not adjacent to the current block; determining, by the video decoder, a motion vector of the current block based on the MVP of the current block; determining, by the video decoder, a predictive block based on the motion vector of the current block; and Sample values of the current block of the current picture are reconstructed by the video decoder based on the predictive block. 2 . The method of claim 1 , wherein the MVP of the current block is in affine mode.
3. The method according to claim 1, wherein the motion vector of the current block is determined include: The motion vector of the current block is determined by the video decoder so that the motion vector of the current block specifies the motion vector of the MVP of the current block, or so that the motion vector of the current block is equal to the motion vector of the motion information of the MVP of the current block plus a motion vector difference MVD.
4. The method according to claim 1, further comprising: include: Determining, by the video decoder, a set of coding unit (CU) level frame rate up conversion (FRUC) motion vector candidates; selecting, by the video decoder, a CU-level FRUC motion vector candidate from the set of CU-level FRUC motion vector candidates; determining, by the video decoder at least in part by performing a local search starting from the selected CU-level FRUC motion vector candidate; and refining, by the video decoder, the CU level motion vector at a sub-CU level using a set of FRUC sub-CU level motion vector candidates, Wherein at least one of the set of CU-level FRUC motion vector candidates and the set of FRUC sub-CU level motion vector candidates includes a non-neighboring spatial motion vector predictor NA-SMVP specifying the motion vector of the non-neighboring block.
5. A method of encoding, the method comprising: include: A first-in-first-out (FIFO) motion vector predictor (MVP) candidate list buffer is generated by a video encoder, wherein generating the FIFO MVP candidate list buffer comprises: determining, by the video encoder, motion information of a block of a current picture that was encoded before a current block of the current picture, wherein the motion information of the block includes a motion vector and a reference index; and updating, by the video encoder, the FIFO MVP candidate list buffer to remove the earlier added MVP candidate from the FIFO MVP candidate list buffer and add the motion information of the block to the FIFO MVP candidate list buffer as an MVP candidate; determining, by the video encoder, an MVP for the current block from the MVP candidates in the FIFO MVP candidate list buffer, wherein the MVP candidates in the FIFO MVP candidate list buffer include at least one non-adjacent block of the current picture that is non-adjacent to the current block; determining, by the video encoder, a motion vector of the current block based on the MVP of the current block; determining, by the video encoder, a predictive block based on the motion vector of the current block; and Residual sample values are generated by the video encoder based on the predictive block. The method of claim 5 , wherein the MVP of the current block is in affine mode.
7. The method according to claim 5, further comprising: include: Determining, by the video encoder, a set of coding unit (CU) level frame rate up conversion (FRUC) motion vector candidates; selecting, by the video encoder, a CU-level FRUC motion vector candidate from the set of CU-level FRUC motion vector candidates; determining, by the video encoder at least in part by performing a local search starting from the selected CU-level FRUC motion vector candidate; and refining, by the video encoder, the CU level motion vector at a sub-CU level using a set of FRUC sub-CU level motion vector candidates, Wherein at least one of the set of CU-level FRUC motion vector candidates and the set of FRUC sub-CU level motion vector candidates includes a non-neighboring spatial motion vector predictor NA-SMVP specifying the motion vector of the non-neighboring block.
8. A device for decoding, the device include: one or more storage media; and One or more processors implemented in circuitry, the one or more processors configured to: generating a first-in-first-out FIFO motion vector predictor MVP candidate list buffer, wherein the one or more storage media are configured to store the FIFO MVP candidate list buffer, and the one or more processors are configured as part of generating the FIFO MVP candidate list buffer to: Determining motion information of a block of a current picture that is decoded before a current block of the current picture, wherein the motion information of the block includes a motion vector and a reference index; and updating the FIFO MVP candidate list buffer to remove the MVP candidate added earlier from the FIFO MVP candidate list buffer and add the motion information of the block to the FIFO MVP candidate list buffer as an MVP candidate; determining the MVP of the current block from the MVP candidates in the FIFO MVP candidate list buffer, wherein the MVP candidates in the FIFO MVP candidate list buffer include motion information of at least one non-neighboring block of the current picture that is non-neighboring to the current block; determining a motion vector of the current block based on the MVP of the current block; determining a predictive block based on the motion vector of the current block; and Sample values of the current block of the current picture are reconstructed based on the predictive block.
9. The apparatus of claim 8, wherein the MVP of the current block is in affine mode.
10. The device of claim 8, wherein the one or more processors are configured to perform the following steps as part of determining the motion vector for the current block: The motion vector of the current block is determined so that the motion vector of the current block specifies the motion vector of the MVP of the current block, or so that the motion vector of the current block is equal to the motion vector of the motion information of the MVP of the current block plus a motion vector difference MVD.
11. The apparatus of claim 8, wherein the one or more processors are further configured to: Determine a set of decoding unit CU level frame rate up conversion FRUC motion vector candidates; selecting a CU-level FRUC motion vector candidate from the set of CU-level FRUC motion vector candidates; determining a CU-level motion vector at least in part by performing a local search starting from the selected CU-level FRUC motion vector candidate; and Refining the CU level motion vector at the sub-CU level using a set of FRUC sub-CU level motion vector candidates, Wherein at least one of the set of CU-level FRUC motion vector candidates and the set of FRUC sub-CU level motion vector candidates includes a non-neighboring spatial motion vector predictor NA-SMVP specifying the motion vector of the non-neighboring block.
12. A device for encoding, the device include: one or more storage media; and One or more processors implemented in circuitry, the one or more processors configured to: generating a first-in-first-out FIFO motion vector predictor MVP candidate list buffer, wherein the one or more storage media are configured to store the FIFO MVP candidate list buffer, and the one or more processors are configured as part of generating the FIFO MVP candidate list buffer to: determining motion information of a block of a current picture that was encoded before a current block of the current picture, wherein the motion information of the block includes a motion vector and a reference index; and updating the FIFO MVP candidate list buffer to remove the MVP candidate added earlier from the FIFO MVP candidate list buffer and add the motion information of the block to the FIFO MVP candidate list buffer as an MVP candidate; determining an MVP for the current block from the MVP candidates in the FIFO MVP candidate list buffer, wherein the MVP candidates in the FIFO MVP candidate list buffer include at least one non-adjacent block of the current picture that is non-adjacent to the current block; determining a motion vector of the current block based on the MVP of the current block; determining a predictive block based on the motion vector of the current block; and Residual sample values are generated based on the predictive block.
13. The apparatus of claim 12, wherein the MVP of the current block is in affine mode.
14. The apparatus of claim 12, wherein the one or more processors are further configured to: Determine a set of decoding unit CU level frame rate up conversion FRUC motion vector candidates; selecting a CU-level FRUC motion vector candidate from the set of CU-level FRUC motion vector candidates; determining a CU-level motion vector at least in part by performing a local search starting from the selected CU-level FRUC motion vector candidate; and Refining the CU level motion vector at the sub-CU level using a set of FRUC sub-CU level motion vector candidates, Wherein at least one of the set of CU-level FRUC motion vector candidates and the set of FRUC sub-CU level motion vector candidates includes a non-neighboring spatial motion vector predictor NA-SMVP specifying the motion vector of the non-neighboring block.
