Inter-frame-intra prediction mode for video data
By adopting a position-independent weighting scheme in video encoding and decoding, the weights are adaptively determined based on the information of adjacent blocks and merged index blocks, the problems of inter-intra prediction performance and artifacts in the prior art are solved, and the more Efficient video encoding and decoding.
Patent Information
- Application Number
- CN202080012176.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-02-04
- Filing Date
- 2020-02-05
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2040-02-05
AI Technical Summary
In the existing video encoding and decoding technology, inter-intra prediction technology fails to effectively utilize the encoding and decoding information of neighboring blocks, resulting in insufficient encoding and decoding performance, and region-based weight allocation may cause artifacts along region boundaries.
Adopting a position-independent weight scheme, the weights of inter-frame and intra-prediction samples are adaptively determined based on the number of adjacent blocks decoded intra-frame coded, the inter-frame prediction number of merged index blocks and the size of the current block to improve video programming. Decoding performance.
It improves the performance of inter-intra-frame encoding and decoding, reduces artifacts, and improves the compression efficiency of video data.
Smart Images

Figure CN113632466B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to U.S. Application No. 16 / 781,751, filed on February 4, 2020, and U.S. Provisional Application No. 62 / 802,515, filed on February 7, 2019, the entire contents of each of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to video coding and decoding, including video encoding and video decoding. Background Art
[0004] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones, so-called "smart phones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding (coding) technology, such as the technology described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Codec (AVC), ITU-T h.265 / High Efficiency Video Codec (HEVC), and extensions of these standards. By implementing such video coding technology, video devices can more efficiently send, receive, encode, decode and / or store digital video information.
[0005] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or eliminate redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be partitioned into video blocks, which may also be referred to as codec tree units (CTUs), codec units (CUs), and / or codec nodes. Video blocks in a slice of an intra-frame codec (I) of a picture are encoded using spatial predictions of reference samples in neighboring blocks in the same picture. Video blocks in a slice of an inter-frame codec (P or B) of a picture may use spatial predictions of reference samples in neighboring blocks in the same picture or temporal predictions of reference samples in other reference pictures. Pictures may be referred to as frames, and reference pictures may be referred to as reference frames. Summary of the invention
[0006] In general, the present disclosure describes techniques for performing combined inter-intraprediction. That is, in video coding, a video codec (e.g., a video encoder or a video decoder) can perform block-based coding and decoding on pictures that form a video sequence. The video codec can encode and decode blocks of a picture by forming a prediction block and encoding and decoding a residual block representing the sample-by-sample difference between the prediction block and the actual block to be coded. Inter prediction refers to the prediction of a reference block from a previously coded picture, while intra prediction refers to the prediction of previously coded reference data from a current picture. Combined inter-intra prediction refers to a prediction using both inter prediction and intra prediction. Specifically, the present disclosure describes improved techniques for performing combined inter-intra prediction. The techniques of the present disclosure can be used, for example, in Versatile Video Codec (VVC) or other video coding standards that support combined inter-intra prediction.
[0007] In one example, a method for encoding and decoding video data includes: forming an inter-frame prediction block of a current chrominance block of the video data; forming an intra-frame prediction block of the current chrominance block of the video data; determining the number of neighboring blocks of a luminance block corresponding to the current chrominance block that are intra-frame prediction encoded and decoded; determining a first weight and a second weight according to the number of neighboring blocks that are intra-frame prediction encoded and decoded; applying the first weight to the inter-frame prediction block, and applying the second weight to the intra-frame prediction block; combining the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block of the current chrominance block; and encoding and decoding the current chrominance block using the prediction block.
[0008] In another example, a device for encoding and decoding video data includes a memory for storing video data and one or more processors, which are implemented in a circuit and configured to: form an inter-frame prediction block for a current chroma block of the video data; form an intra-frame prediction block for the current chroma block of the video data; determine the number of neighboring blocks of a luminance block corresponding to the current chroma block that are intra-frame predicted and decoded; determine a first weight and a second weight based on the number of neighboring blocks that are intra-frame predicted and decoded; apply the first weight to the inter-frame prediction block and apply the second weight to the intra-frame prediction block; combine the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current chroma block; and encode and decode the current chroma block using the prediction block.
[0009] In another example, a computer-readable storage medium stores instructions that, when executed, cause a processor to: form an inter-frame prediction block for a current chroma block of video data; form an intra-frame prediction block for the current chroma block of video data; determine the number of neighboring blocks of a luminance block corresponding to the current chroma block that are intra-frame prediction encoded and decoded; determine a first weight and a second weight based on the number of neighboring blocks that are intra-frame prediction encoded and decoded; apply the first weight to the inter-frame prediction block, and apply the second weight to the intra-frame prediction block; combine the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current chroma block; and encode and decode the current chroma block using the prediction block.
[0010] In another example, an apparatus for encoding and decoding video data includes: a component for forming an inter-frame prediction block of a current chroma block of the video data; a component for forming an intra-frame prediction block of the current chroma block of the video data; a component for determining the number of neighboring blocks of a luminance block corresponding to the current chroma block that are intra-frame prediction encoded and decoded; a component for determining a first weight and a second weight according to the number of neighboring blocks that are intra-frame prediction encoded and decoded; a component for applying the first weight to the inter-frame prediction block and applying the second weight to the intra-frame prediction block; a component for combining the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current chroma block; and a component for encoding and decoding the current chroma block using the prediction block.
[0011] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.
[0013] Figure 2A and Figure 2B is a conceptual diagram illustrating an example quad binary tree (QTBT) structure and a corresponding codec tree unit (CTU).
[0014] Figure 3A-Figure 3F is a conceptual diagram showing example positions of neighboring blocks of a current block.
[0015] Figure 4 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.
[0016] Figure 5 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.
[0017] Figure 6is a flowchart illustrating an example method of encoding a current block according to the techniques of this disclosure.
[0018] Figure 7 is a flowchart illustrating an example method of decoding a current block according to the techniques of this disclosure.
[0019] Figure 8 is a flowchart illustrating an example method of encoding or decoding (encoding or decoding) video data according to the techniques of this disclosure. DETAILED DESCRIPTION
[0020] Video codec standards include 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 Codec (SVC) and Multi-view Video Codec (MVC) extensions.
[0021] High Efficiency Video Codec (HEVC) was completed in April 2013 by the Joint Collaboration Team on Video Codecs (JCT-VC) of the ITU-T Video Codec Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG).
[0022] The Joint Video Experts Team (JVET), a collaborative group formed by MPEG and VCEG of ITU-T Study Group 16, is currently working on a new video codec standard called Versatile Video Codec (VVC). The main purpose of VVC is to provide significant improvements in compression performance over the existing HEVC standard, helping to deploy higher quality video services and emerging applications such as 360° omnidirectional immersive multimedia and high dynamic range (HDR) video.
[0023] The present disclosure describes techniques that can improve combined inter-intra prediction modes for video data prediction. Multi-hypothesis intra mode (MHI) has been shown to improve merge mode by combining an intra prediction and a merge index prediction, and is adopted in the following: 12th JVET (China) Macau Conference: M.-S. Chiang, C.-W. Hsu, Y.-W. Huang, S.-M. Lei, "CE10.1.1: Multi-hypothesis prediction for improving AMVP mode, skip or merge mode, and intra mode", JVET-L0100, October 2018. According to MHI, candidates in a set of 4 intra modes including planar, DC, horizontal and vertical predictions are evaluated to select the best mode combined with merge index prediction. In the combination process described in the above example, equal weights are used if planar or DC mode is selected, or the size of the block is less than 4. Otherwise, the weights of samples (wIntra, wInter) used for intra and inter prediction are different based on the area of the samples within the codec block.
[0024] The present disclosure recognizes that in the inter-intra prediction techniques described in JVET-L0100, codec information of neighboring blocks has not been exploited to improve the codec performance of these tools. In addition, region-based weights are used for horizontal and vertical prediction modes, which may result in artifacts along region boundaries.
[0025] The disclosed techniques can improve the performance of inter-intra codecs. These improvements can result from the position-independent weighting schemes of these techniques. According to the disclosed techniques, the weights for inter- and intra-prediction samples can be adaptively determined using codec information such as the number of neighboring blocks for intra codecs, the number of inter-prediction (unidirectional or bidirectional prediction) of merged index blocks, and / or the size of the current block.
[0026] Figure 1 1 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of the present disclosure. The techniques of the present disclosure are generally directed to encoding and decoding (encoding and / or decoding) video data. Generally, video data includes any data used to process video. Thus, video data can include original unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata such as, for example, signaling data.
[0027] like Figure 1As shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may include any of a variety of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and, therefore, may be referred to as wireless communication devices.
[0028] exist Figure 1 In the example of, source device 102 comprises video source 104, memory 106, video encoder 200 and output interface 108. Destination device 116 comprises input interface 122, video decoder 300, memory 120 and display device 118. According to the present disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply the technology for inter-frame-intra-frame coding and decoding. Therefore, source device 102 represents an example of video encoding device, and destination device 116 represents an example of video decoding device. In other examples, source device and destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may interface with an external display device, rather than including an integrated display device.
[0029] like Figure 1 The system 100 shown is only an example. Generally, any digital video encoding and / or decoding device can perform the technology for inter-frame-intra-frame encoding and decoding. The source device 102 and the destination device 116 are only examples of such encoding and decoding devices, wherein the source device 102 generates encoded and decoded video data to send to the destination device 116. The present disclosure refers to the "encoding and decoding" device as a device that performs the encoding and decoding (encoding and / or decoding) of data. Thus, the video encoder 200 and the video decoder 300 represent examples of encoding and decoding devices, specifically, examples of video encoders and video decoders, respectively. In some examples, the devices 102, 116 can operate in a substantially symmetrical manner so that each of the devices 102, 116 includes a video encoding and decoding component. Thus, the system 100 can support one-way or two-way video transmission between the video devices 102, 116, for example, for video streaming, video playback, video broadcasting or video telephony.
[0030] Typically, the video source 104 represents a source of video data (i.e., original, unencoded video data), and a sequence of continuous pictures (also referred to as "frames") of the video data is provided to the video encoder 200, which encodes the data of the pictures. The video source 104 of the source device 102 may include a video capture device such as a camera, a video archive containing previously captured original video, and / or a video feed interface receiving video from a video content provider. As a further alternative, the video source 104 may generate computer graphics-based data as a source video, or a combination of live video, archived video, and computer-generated video. In each case, the video encoder 200 encodes the captured, pre-captured, or computer-generated video data. The video encoder 200 may rearrange the pictures from the order in which they are received (sometimes referred to as "display order") into a codec order for encoding and decoding. The video encoder 200 may generate a bitstream comprising encoded video data. Source device 102 may then output the encoded video data onto computer-readable medium 110 via output interface 108 for receipt and / or retrieval by, for example, input interface 122 of destination device 116 .
[0031] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memory. In some examples, the memory 106, 120 can store original video data, for example, original video from the video source 104 and original, decoded video data from the video decoder 300. Additionally or alternatively, the memory 106, 120 can store software instructions that can be executed by the video encoder 200 and the video decoder 300, respectively. Although shown separately from the video encoder 200 and the video decoder 300 in this example, it should be understood that the video encoder 200 and the video decoder 300 can also include internal memory for functionally similar or equivalent purposes. In addition, the memory 106, 120 can store, for example, encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memory 106, 120 can be allocated as one or more video buffers, for example, to store original, decoded and / or encoded video data.
[0032] The computer-readable medium 110 may represent any type of medium or device capable of transmitting the encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium that enables the source device 102 to transmit the encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. According to a communication standard such as a wireless communication protocol, the output interface 108 may modulate a transmission signal including the encoded video data, and the input interface 122 may demodulate the received transmission signal. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include a router, a switch, a base station, or any other device that facilitates communication from the source device 102 to the destination device 116.
[0033] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access the encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media for storing encoded video data, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium.
[0034] In some examples, source device 102 may output the encoded video data to file server 114 or another intermediate storage device that may store the encoded video data generated by source device 102. Destination device 116 may access the stored video data from file server 114 by streaming or downloading. File server 114 may be any type of server device capable of storing encoded video data and sending the encoded video data to destination device 116. File server 114 may represent a network server (e.g., for a website), a file transfer protocol (FTP) server, a content delivery network device, or a network attached storage (NAS) device. Destination device 116 may access the encoded video data from file server 114 through any standard data connection including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both suitable for accessing the encoded video data stored on file server 114. File server 114 and input interface 122 may be configured to operate according to a streaming protocol, a downloading protocol, or a combination thereof.
[0035] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components that operate according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to transmit data, such as encoded video data, according to a cellular communication standard such as 4G, 4G-LTE (Long Term Evolution), LTE Advanced, 5G, etc. In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to transmit data, such as encoded video data, according to a cellular communication standard such as IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee TM ),Bluetooth TM The source device 102 and / or the destination device 116 may include a corresponding system-on-chip (SoC) device. For example, the source device 102 may include a SoC device to perform functions belonging to the video encoder 200 and / or the output interface 108, and the destination device 116 may include a SoC device to perform functions belonging to the video decoder 300 and / or the input interface 122.
[0036] The techniques disclosed herein can be applied to video encoding and decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission such as HTTP Dynamic Adaptive Streaming (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0037] The input interface 122 of the destination device 116 receives the encoded video bitstream from the computer-readable medium 110 (e.g., the storage device 112, the file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements with values describing characteristics and / or processing of video blocks or other units of coding and decoding (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode display (OLED) display, or another type of display device.
[0038] although Figure 1Not shown, in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process a multiplexed stream including both audio and video in a common data stream. If applicable, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol, or other protocols such as the User Datagram Protocol (UDP).
[0039] The video encoder 200 and the video decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When these techniques are partially implemented in software, the device can store the instructions of the software in a suitable non-temporary computer-readable medium, and use one or more processors to execute the instructions in hardware to perform the techniques of the present disclosure. Each of the video encoder 200 and the video decoder 300 can be included in one or more encoders or decoders, any of which can be integrated as part of a combined encoder / decoder (codec) in a corresponding device. A device including the video encoder 200 and / or the video decoder 300 can include an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular phone.
[0040] The video encoder 200 and the video decoder 300 may operate according to a video codec standard, such as ITU-T H.265, also known as High Efficiency Video Codec (HEVC), or an extension thereof, such as a multi-view and / or scalable video codec extension. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary standards or industry standards, such as the Joint Exploration Test Model (JEM) or ITU-T H.266, also known as Versatile Video Codec (VVC). However, the techniques of the present disclosure are not limited to any particular codec standard.
[0041] Typically, the video encoder 200 and the video decoder 300 can perform block-based encoding and decoding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used for encoding and / or decoding processes). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Typically, the video encoder 200 and the video decoder 300 can encode and decode video data represented in YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and the video decoder 300 can encode and decode luminance and chrominance components instead of encoding and decoding red, green, and blue (RGB) data of samples of the picture, where the chrominance component may include both a red hue chrominance component and a blue hue chrominance component. In some examples, the video encoder 200 converts the received RGB format data into a YUV representation before encoding, and the video decoder 300 converts the YUV representation into an RGB format. Alternatively, a pre-processing and post-processing unit (not shown) can perform these conversions.
[0042] The present disclosure may generally refer to the encoding and decoding (e.g., encoding and decoding) of a picture to include the process of encoding or decoding data of the picture. Similarly, the present disclosure may refer to the encoding and decoding of a block of a picture to include the process of encoding or decoding the data of the block, for example, prediction and / or residual encoding and decoding. The encoded video bitstream typically includes a series of values of syntax elements that represent codec decisions (e.g., codec modes) and the partitioning of the picture into blocks. Therefore, references to encoding and decoding a picture or a block should generally be understood as encoding and decoding the values of the syntax elements that form the picture or block.
[0043] HEVC defines various blocks, including codec units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video codec (e.g., video encoder 200) partitions a codec tree unit (CTU) into CUs according to a quadtree structure. That is, the video codec partitions the CTU and CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node," and the CU of such a leaf node may include one or more PUs and / or one or more TUs. The video codec may further partition the PU and TU. For example, in HEVC, the residual quadtree (RQT) represents the partitioning of a TU. In HEVC, a PU represents inter-frame prediction data, and a TU represents residual data. An intra-predicted CU includes intra-frame prediction information such as an intra-frame mode indication.
[0044] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video codec (e.g., video encoder 200) partitions a picture into multiple codec tree units (CTUs). The video encoder 200 may partition the CTU according to a tree structure, such as a quadtree-binary tree structure (QTBT) or a multi-type tree (MTT) structure. The QTBT structure eliminates the concept of multiple partition types, such as the separation between CU, PU, and TU of HEVC. The 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 the CTU. The leaf nodes of the binary tree correspond to codec units (CUs).
[0045] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning. Ternary tree partitioning is a partitioning that splits a block into three sub-blocks. In some examples, ternary tree partitioning divides a block into three sub-blocks without dividing the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0046] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma and chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for corresponding chroma components).
[0047] The video encoder 200 and the video decoder 300 may be configured to use quadtree segmentation, QTBT segmentation, MTT segmentation, or other segmentation structures in accordance with HEVC. For illustrative purposes, the description of the disclosed technology is presented with respect to QTBT segmentation. However, it should be understood that the disclosed technology may also be applied to a video codec configured to use quadtree segmentation or other types of segmentation.
[0048] The present disclosure may use "N×N" and "N by N" interchangeably to refer to the sample dimensions of a block (e.g., a CU or other video block) in the vertical and horizontal dimensions, for example, 16×16 samples or 16 by 16 samples. Typically, a 16×16 CU has 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an N×N CU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. In addition, a CU does not necessarily have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include N×M samples, where M is not necessarily equal to N.
[0049] The video encoder 200 encodes the video data of the CU representing the prediction and / or residual information and other information. The prediction information indicates how to predict the CU in order to form the prediction block of the CU. The residual information generally indicates the sample-by-sample difference between the CU sample before encoding and the prediction block.
[0050] In order to predict a CU, the video encoder 200 may typically form a prediction block for the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction typically refers to predicting a CU from data of a previously coded picture, while intra-frame prediction typically refers to predicting a CU from previously coded data of the same picture. In order to perform inter-frame prediction, the video encoder 200 may use one or more motion vectors to generate a prediction block. The video encoder 200 may typically perform motion search to identify a reference block that closely matches the CU (e.g., in terms of the difference between the CU and the reference block). The video encoder 200 may calculate a difference metric using the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), or other such difference calculations to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 may use unidirectional prediction or bidirectional prediction to predict the current CU.
[0051] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered an inter-frame prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion (e.g., zooming in or out, rotation, perspective motion, or other irregular motion types).
[0052] To perform intra prediction, the video encoder 200 can select an intra prediction mode to generate a prediction block. Some examples of JEM and VVC provide sixty-seven intra prediction modes, including various directional modes, as well as a plane mode and a DC mode. Typically, the video encoder 200 selects an intra prediction mode that describes neighboring samples of a current block (e.g., a block of a CU) to predict the samples of the current block from the neighboring samples. Assuming that the video encoder 200 encodes and decodes CTUs and CUs in a raster scan order (from left to right, from top to bottom), such samples can typically be above, above left, or to the left of the current block in the same picture as the current block.
[0053] According to the technology of the present disclosure, the video encoder 200 can perform inter-frame-intra prediction of a video data block (e.g., CU). That is, the video encoder 200 can use both inter-frame prediction blocks and intra-frame prediction blocks to form a prediction block. The video encoder 200 can form a final prediction block of the current block by performing a weighted combination of samples of the inter-frame prediction block and the intra-frame prediction block. When the current block is a chroma block, the video encoder 200 can determine the weight according to the number of neighboring blocks of the luminance block corresponding to the current chroma block that are intra-frame prediction encoded and decoded (and / or the number of blocks that are inter-frame prediction encoded and decoded). That is, the video encoder 200 can determine the number of intra-frame and / or inter-frame prediction blocks adjacent to the luminance block corresponding to the current chroma block, and then determine the weight based on the number of intra-frame and / or inter-frame prediction blocks adjacent to the luminance block, instead of determining the weight according to the neighboring blocks of the current chroma block.
[0054] As an example, the video encoder 200 may determine whether the upper neighboring block and / or the left neighboring block of the corresponding luminance block are inter-predicted. When none of these neighboring blocks are inter-predicted, the video encoder 200 may determine that the weight to be applied to the intra-predicted block is 3 and the weight to be applied to the inter-predicted block is 1. When both neighboring blocks are inter-predicted, the video encoder 200 may determine that the weight to be applied to the inter-predicted block is 3 and the weight to be applied to the intra-predicted block is 1. When one of these neighboring blocks is inter-predicted and the other is intra-predicted, the video encoder 200 may determine that the weight to be applied to both the inter-predicted block and the intra-predicted block is 2. In some examples, the video encoder 200 may count neighboring blocks predicted using inter-intra prediction and / or intra-block copying as inter-prediction codec blocks. The video decoder 300 may perform substantially the same process to determine the weights of the inter- and intra-predicted blocks to be applied to the current chrominance block based on the prediction mode of the neighboring blocks of the luminance block corresponding to the current chrominance block.
[0055] The video encoder 200 encodes data representing the prediction mode of the current block. For example, for the inter-frame prediction mode, the video encoder 200 may encode data representing which of the various available inter-frame prediction modes is used and the motion information of the corresponding mode. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 may encode the motion vector using advanced motion vector prediction (AMVP) or merge mode. The video encoder 200 may use a similar mode to encode the motion vector for the affine motion compensation mode.
[0056] After prediction, such as intra-frame prediction or inter-frame prediction of a block, the video encoder 200 can calculate residual data for the block. The residual data, such as a residual block, represents the sample-by-sample difference between the block and the predicted block of the block formed using the corresponding prediction mode. The video encoder 200 can apply one or more transforms to the residual block to generate transform data in a transform domain rather than a sample domain. For example, the video encoder 200 can apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 can apply a secondary transform after the first transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc. The video encoder 200 generates transform coefficients after applying one or more transforms.
[0057] As described above, after any transform used to generate transform coefficients, the video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to minimize the amount of data used to represent the coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all coefficients. For example, the video encoder 200 can round down an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 can perform a bitwise right shift on the value to be quantized.
[0058] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place coefficients with higher energy (and therefore lower frequency) in front of the vector and transform coefficients with lower energy (and therefore higher frequency) in the back of the vector. In some examples, the video encoder 200 can scan the quantized transform coefficients using a predefined scan order to generate a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 can perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy encode the one-dimensional vector (e.g., according to context adaptive binary arithmetic coding (CABAC)). The video encoder 200 can also entropy encode the values of the syntax elements describing the metadata associated with the encoded video data for use by the video decoder 300 when decoding the video data.
[0059] To perform CABAC, the video encoder 200 may assign context in a context model to a symbol to be transmitted. For example, the context may relate to whether the neighboring values of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.
[0060] The video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, to the video decoder 300, such as in a picture header, a block header, a slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS). The video decoder 300 may also decode such syntax data to determine how to decode the corresponding video data.
[0061] In this way, the video encoder 200 can generate a bitstream including encoded video data, such as syntax elements describing the partitioning of a picture into blocks (e.g., CUs) and prediction and / or residual information of the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0062] In general, the video decoder 300 performs a process that is the reverse of the process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may decode the values of the syntax elements of the bitstream using CABAC in a manner substantially similar to (although reversed from) the CABAC encoding process of the video encoder 200. The syntax elements may define information about the partitioning of the picture into CTUs, and the partitioning of each CTU according to a corresponding partitioning structure (e.g., a QTBT structure) to define CUs of the CTU. The syntax elements may further define prediction and residual information for a block (e.g., a CU) of video data.
[0063] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-frame or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder 300 may perform additional processing, such as deblocking, to reduce visual artifacts along block boundaries.
[0064] According to the techniques of the present disclosure, the video encoder 200 and / or the video decoder 300 can be configured to perform inter-intra encoding and decoding. That is, the video encoder 200 and / or the video decoder 300 can predict a block of video data using combined inter-intra prediction according to any or all of the techniques described herein.
[0065] For example, the video encoder 200 and the video decoder 300 may adaptively determine weights to apply to samples of inter-frame prediction and intra-frame prediction based on a position-independent weighting scheme. For example, the video encoder 200 and the video decoder 300 may adaptively determine weights based on codec information (e.g., as a function of codec information) such as the number of neighboring blocks of intra-frame and / or inter-frame coding, the number of inter-frame predictions (unidirectional prediction or bidirectional prediction) of the merged index block, and the size of the current block. Let (wInter, wIntra) be the weights used for inter-frame and intra-frame prediction samples in the following description. That is, wInter represents the weight value applied to the sample of the inter-frame prediction block, and wIntra represents the weight value applied to the sample of the intra-frame prediction block. In some examples, wInter+wIntra=1, where wInter and wIntra are rational values between 0 and 1.
[0066] The present disclosure may generally involve "signaling" certain information, such as syntax elements. The term "signaling" may generally refer to the communication of values of syntax elements and / or other data used to decode encoded video data. That is, the video encoder 200 may signal the values of syntax elements in a bitstream. Generally, signaling refers to generating values in a bitstream. As mentioned above, the source device 102 may transmit the bitstream to the destination device 116 in substantially real time or in non-real time (such as may occur when the syntax elements are stored to the storage device 112 for later retrieval by the destination device 116).
[0067] Figure 2A and Figure 2B is a conceptual diagram showing an example quad-binary tree (QTBT) structure 130 and a corresponding codec tree unit (CTU) 132. Solid lines represent quad-tree splits and dashed lines represent binary tree splits. At each split (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which split type (i.e., horizontal or vertical) is used, where 0 indicates horizontal split and 1 indicates vertical split in this example. For quad-tree splits, there is no need to indicate the split type because the quad-tree node splits the block horizontally and vertically into 4 sub-blocks of equal size. Accordingly, the video encoder 200 can encode syntax elements (e.g., split information) for the regional tree level (i.e., solid line) of the QTBT structure 130 and syntax elements (e.g., split information) for the prediction tree level (i.e., dashed line) of the QTBT structure 130, and the video decoder 300 can decode it. The video encoder 200 may encode video data (eg, prediction and transform data) of a CU represented by a terminal leaf node of the QTBT structure 130 , and the video decoder 300 may decode it.
[0068] generally, Figure 2B The CTU 132 may be associated with parameters defining the size of blocks corresponding to nodes of the QTBT structure 130 at the first level and the second level. These parameters may include a CTU size (indicating the size of the CTU 132 in a sample), a minimum quadtree size (MinQTSize, indicating the minimum allowed quadtree leaf node size), a maximum binary tree size (MaxBTSize, indicating the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, indicating the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, indicating the minimum allowed binary tree leaf node size).
[0069] The root node of the QTBT structure corresponding to the CTU may have four child nodes at the first level of the QTBT structure, and each child node may be segmented according to the quadtree segmentation. That is, the nodes at the first level are either leaf nodes (without child nodes) or have four child nodes. The example of the QTBT structure 130 represents such nodes as including a parent node and child nodes with solid line branches. If the nodes at the first level are not larger than the maximum allowed binary tree root node size (MaxBTSize), they may be further segmented by the corresponding binary tree. The binary tree splitting of a node may be iterated until the node generated by the splitting reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). The example of the QTBT structure 130 represents such nodes as having dotted line branches. The binary tree leaf node is called a codec unit (CU), which is used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further segmentation. As described above, a CU may also be referred to as a "video block" or "block".
[0070] In one example of a QTBT partitioning structure, the CTU size is set to 128×128 (luminance sample and two corresponding 64×64 chrominance samples), MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate a quadtree leaf node. The quadtree leaf node can have a size from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). If the quadtree leaf node is 128×128, it will not be further split by the binary tree because its size exceeds MaxBTSize (i.e., 64×64 in this example). Otherwise, the quadtree leaf node will be further split by the binary tree. Therefore, the quadtree leaf node is also the root node of the binary tree and has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this case), no further splitting is allowed. When a binary tree node has a width equal to MinBTSize (4 in this case), it means that no further horizontal splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further vertical splitting of the binary tree node is allowed. As described above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without further segmentation.
[0071] Figure 3A-Figure 3F is a conceptual diagram showing an example position of a current block to an adjacent block. Specifically, Figure 3A represents an example of a current block 140 with a top neighbor block 142 and a left neighbor block 144, Figure 3B 3 shows an example of a current block 152 having a top neighbor block 154, a left neighbor block 156, and an upper left (top-1) neighbor block 158, Figure 3D 1 shows an example of a current block 160 having an upper right neighbor block 162, a lower left (left-b) neighbor block 164, and an upper left neighbor block 166, Figure 3E represents an example of a current block 168 having a top neighbor block 170, an upper right neighbor block 172, a left neighbor block 174, and a lower left neighbor block 176, and Figure 3F An example of a current block 178 having a top neighbor block 180 , an upper right neighbor block 182 , a left neighbor block 184 , a lower left neighbor block 186 , and an upper left neighbor block 188 is shown.
[0072] According to the techniques of the present disclosure, the video encoder 200 and the video decoder 300 may adaptively determine weights for intra and inter samples based on the number of intra and / or inter coded neighboring blocks, for example, as discussed in U.S. Application No. 16 / 684,379, filed on November 14, 2019, the entire contents of which are incorporated herein by reference. However, according to the techniques of the present disclosure, the video encoder 200 and the video decoder 300 may only mix inter and intra prediction samples without position-dependent intra prediction combining (PDPC). The video encoder 200 and the video decoder 300 may use reference neighbor blocks to determine weights, where, for example, Figures 3A-3F As shown in the various examples of , the reference neighbor block can be any combination of the top, upper right, upper left, left, or lower left neighbor blocks.
[0073] In one example, for example, Figure 3A As shown, the video encoder 200 and the video decoder 300 use the top neighbor block 142 and the left neighbor block 144 to determine the weights of intra-frame and inter-frame prediction samples to be applied to the inter-frame intra-frame prediction of the current block 140. That is, in this example, the top neighbor block 142 and the left neighbor block 144 are used for neighbor check of intra-frame coding and decoding of the current block 140.
[0074] In another example, for example, Figure 3B As shown, the video encoder 200 and the video decoder 300 use the upper right neighbor block 148 and the lower left neighbor block 150 to determine the weights of intra-frame and inter-frame prediction samples to be applied to the inter-frame intra-frame prediction of the current block 146. That is, in this example, the upper right neighbor block 148 and the lower left neighbor block 150 are used for neighbor check of intra-frame coding and decoding of the current block 146.
[0075] In another example, for example, Figure 3CAs shown, the top neighbor block 154 , the left neighbor block 156 , and the upper-left neighbor block 158 are used for neighbor checking for intra-frame coding of the current block 152 .
[0076] In another example, for example, Figure 3D As shown, an upper right neighbor block 162 , a lower left neighbor block 164 , and an upper left neighbor block 166 are used for neighbor checking of intra-frame coding and decoding of the current block 160 .
[0077] In another example, for example, Figure 3E As shown, a top neighbor block 170 , an upper right neighbor block 172 , a left neighbor block 174 , and a lower left neighbor block 176 are used for neighbor checking for intra-frame coding of the current block 168 .
[0078] In another example, for example, Figure 3F As shown, a top neighbor block 180 , an upper right neighbor block 182 , a left neighbor block 184 , a lower left neighbor block 186 , and an upper left neighbor block 188 are used for neighbor checking for intra-frame coding of the current block 178 .
[0079] In some examples, the video encoder 200 and the video decoder 300 select a reference neighboring block based on the block size (e.g., blkWidth and blkHeight) of the current block. For example, if blkWidth and blkHeight are equal, the video encoder 200 and the video decoder 300 may use Figure 3D , Figure 3E ,or Figure 3F In another example, for example, Figure 3B As shown, if blkWidth and blkHeight are different, the video encoder 200 and the video decoder 300 may use top right and bottom left.
[0080] In another example, if blkWidth and blkHeight are equal, the video encoder 200 and the video decoder 300 may select the neighboring block positions symmetrically along the width and height dimensions of the current block, for example, according to Figure 3A-Figure 3F On the other hand, if blkWidth and blkHeight are different, the video encoder 200 and the video decoder 300 may select the neighboring block positions asymmetrically along the width and height dimensions of the current block. For example, if blkWidth is greater than blkHeight, the video encoder 200 and the video decoder 300 may select the neighboring blocks to be the top right and left, and if blkWidth is less than blkHeight, the video encoder 200 and the video decoder 300 may select the neighboring blocks to be the bottom left and top.
[0081] In some examples, if the neighboring block being checked is IBC / CPR coded (Intra Block Copy / Current Picture Reference), the neighboring block may be considered as an inter-coded block.
[0082] In some examples, if the neighboring block being checked is IBC / CPR coded, the neighboring block may be considered as an intra-coded block.
[0083] In some examples, when the checked neighboring block is a combined intra-inter block, the neighboring block may be considered an inter-coded block.
[0084] In some examples, when the checked neighboring block is a combined intra-inter block, the neighboring block may be considered an intra-coded block.
[0085] In some examples, when a single luma-chroma codec tree or a dual (separated) luma-chroma codec tree is enabled, the video encoder 200 and the video decoder 300 may determine the weights for blending the chroma blocks based on the intra-check of the corresponding luma block or the neighboring blocks of the corresponding luma block.
[0086] In some examples, when dual-tree coding is enabled, video encoder 200 and video decoder 300 may determine weights for blending of chroma blocks based on intra-checks of neighboring chroma blocks.
[0087] The video encoder 200 and the video decoder 300 can determine the weights based on the intra-frame check. Assume that wInter and wIntra are the weights of the inter-frame samples and the intra-frame samples in the inter-frame-intra frame mixture. n To normalize the weights, where n is an integer equal to the sum of the weights. In other words, the weights can be normalized by 4, 8, 16, ..., which can be achieved by a simple right shift operation.
[0088] In some examples, if all checked neighboring blocks are intra-coded, the video encoder 200 and the video decoder 300 may determine that the weights for intra samples are higher than the weights for inter samples (e.g., (wInter, wIntra)=(1, 3) or (wInter, wIntra)=(3, 5)).
[0089] In some examples, if not all checked neighboring blocks are intra-coded, the video encoder 200 and the video decoder 300 may determine that the weights for intra samples are lower than the weights for inter samples (e.g., (wInter, wIntra)=(3, 1) or (wInter, wIntra)=(5, 3)).
[0090] In some examples, if only one of the checked neighboring blocks is intra-coded, the video encoder 200 and the video decoder 300 may determine that the weights for intra samples and inter samples are equal.
[0091] In some examples, if the upper left, upper right, and lower left neighboring blocks are all intra-frame coded, the video encoder 200 and the video decoder 300 may determine that the weight (wInter, wIntra) is (1, 3) or (3, 5). In another example, if at least one of the upper left, upper right, or lower left neighboring blocks is intra-frame coded, the video encoder 200 and the video decoder 300 may set (wInter, wIntra) to be equal to (2, 2) or (4, 4). In yet another example, if not all of the upper left, upper right, and lower left neighboring blocks are intra-frame coded, the video encoder 200 and the video decoder 300 may set (wInter, wIntra) to be equal to (3, 1) or (5, 3).
[0092] In some examples, if at least one of the checked blocks is an MHI-coded (Multi-Hypothesis Intra) block, video encoder 200 and video decoder 300 may copy the weight for the current block from the weight of one of the checked blocks.
[0093] In some examples, if only one of the checked blocks is intra-coded, the video encoder 200 and the video decoder 300 may determine that the weights for intra samples are higher than the weights for inter samples (e.g., (wInter, wIntra)=(1, 3) or (wInter, wIntra=(3, 5)).
[0094] In some examples, if only one of the checked blocks is intra-coded, the video encoder 200 and the video decoder 300 may determine that the weights for intra samples are lower than the weights for inter samples (e.g., (wInter, wIntra=(3, 1) or (wInter, wIntra=(5, 3)).
[0095] In some examples, if not all of the checked blocks are intra-coded, the video encoder 200 and the video decoder 300 may determine that the weights for intra samples are higher than the weights for inter samples (e.g., (wInter, wIntra)=(1,3) or (wInter, wIntra)=(3,5)).
[0096] In some examples, the video encoder 200 and the video decoder 300 may determine (wInter, wIntra) according to the intra prediction mode of the checked neighboring block. In one example, if there is at least one neighboring block encoded or decoded using the DC intra mode or the planar mode, the weight for the intra sample may be higher than the weight for the inter sample (e.g., (wInter, wIntra) = (1, 3) or (wInter, wIntra) = (3, 5)).
[0097] In some examples, the video encoder 200 and the video decoder 300 may determine (wInter, wIntra) based on the number of inter predictions of the merge index block, ie, whether the merge index block is predicted using uni-directional prediction or bi-directional prediction.
[0098] In some examples, if the merge index block is bi-predicted, the video encoder 200 and the video decoder 300 may set wInter to be higher than wIntra (eg, (wInter, wIntra)=(3, 1) or (wInter, wIntra)=(5, 3)).
[0099] In some examples, if the merge index block is uni-directionally predicted, the video encoder 200 and the video decoder 300 may set wInter to be higher than wIntra (eg, (wInter, wIntra)=(3, 1) or (wInter, wIntra)=(5, 3)).
[0100] In some examples, if the merge index block is bidirectionally predicted, the video encoder 200 and the video decoder 300 may set wInter to be higher than wIntra (e.g., (wInter, wIntra) = (3, 1) or (wInter, wIntra) = (5, 3)). Meanwhile, for example, as discussed above, for a merge index block using unidirectional prediction, the video encoder 200 and the video decoder 300 may use the number of adjacent intra and / or inter blocks to determine (wInter, wIntra).
[0101] In some examples, the video encoder 200 and the video decoder 300 may determine (wInter, wIntra) based on the size of the current block. The size of the current block (SIZEblk) is based on its width and height.
[0102] In some examples, the video encoder 200 and the video decoder 300 may determine the size of the current block as the minimum of the width and height of the current block. In another example, the video encoder 200 and the video decoder 300 may determine the size of the current block as the maximum of the width and height of the current block. In yet another example, the video encoder 200 and the video decoder 300 may determine the size of the current block by multiplying the height and width of the current block (i.e., the product). In yet another example, the video encoder 200 and the video decoder 300 may determine the size of the current block by the sum of the width and height of the current block.
[0103] In some examples, if SIZEblk is above a predefined threshold, video encoder 200 and video decoder 300 may set wInter to be higher or lower than wIntra (eg, (wInter, wIntra)=(3,1) or (wInter, wIntra)=(5,3)).
[0104] In some examples, if SIZEblk is below a predefined threshold, video encoder 200 and video decoder 300 may set wInter to be higher or lower than wIntra (eg, (wInter, wIntra)=(3,1) or (wInter, wIntra)=(5,3)).
[0105] In some examples, if the merge index block is bidirectionally predicted, the video encoder 200 and the video decoder 300 may set wInter to be higher or lower than wIntra (e.g., (wInter, wIntra) = (3, 1) or (wInter, wIntra) = (5, 3)). Meanwhile, for a merge index block using unidirectional prediction, the video encoder 200 and the video decoder 300 may adaptively determine (wInter, wIntra) according to the size of the current block.
[0106] In some examples, the weight pair set (wInter, wIntra) may be predefined. The weight pair set may be signaled in a bitstream header or a sequence parameter set (SPS). That is, the video encoder 200 may encode the weight pair set, and the video decoder 300 may decode the weight pair set. During the encoding process of the MHI block, the video encoder 200 may use rate-distortion (RD) evaluation to determine the optimal weight. In this example, the video encoder 200 may derive the RD cost of all elements in the weight pair. The video encoder 200 may select the pair with the minimum RD cost to encode the current block, and signal the index of the pair to the bitstream. The video encoder 200 may encode the index using a CABAC algorithm using bypass or context entropy coding. The video decoder 300 may perform a decoding process to obtain an index to determine the weight (e.g., weight pair) to be applied to the current block.
[0107] In some examples, the video encoder 200 and the video decoder 300 may encode and decode a weight list in a parameter set (e.g., SPS, picture parameter set (PPS), video parameter set (VPS), adaptive parameter set (APS), etc.) or a header (tile, slice, codec unit, etc.) corresponding to the situations described in the above-mentioned technology based on checking adjacent block patterns, block sizes, etc.
[0108] Figure 4 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Figure 4 The present disclosure is provided for the purpose of explanation and should not be considered as limiting the techniques broadly illustrated and described in the present disclosure. For the purpose of explanation, the present disclosure describes the video encoder 200 in the context of video codec standards such as the HEVC video codec standard and the H.266 video codec standard under development. However, the techniques of the present disclosure are not limited to these video codec standards and are generally applicable to video encoding and decoding.
[0109] exist Figure 4In the example of , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 may be implemented in one or more processors or processing circuits. Moreover, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions.
[0110] Video data memory 230 may store video data to be encoded by components of video encoder 200. Video encoder 200 may receive video data from, for example, video source 104 ( Figure 1 ) receives video data stored in video data memory 230. DPB218 can act as a reference picture memory, which stores reference video data for use in the prediction of subsequent video data by the video encoder 200. Video data memory 230 and DPB 218 can be formed by any of a variety of memory devices, for example, a dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 230 and DPB 218 can be provided by the same storage device or a separate storage device. In various examples, as shown in the figure, video data memory 230 can be on the chip with other components of the video encoder 200, or off the chip relative to these components.
[0111] In the present disclosure, references to the video data memory 230 should not be interpreted as limited to memory internal to the video encoder 200, unless specifically described as such, or to memory external to the video encoder 200, unless specifically described as such. Rather, references to the video data memory 230 should be understood as a reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data of a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage for outputs from the various units of the video encoder 200 .
[0112] Figure 4Various units are shown to help understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit refers to a circuit that provides a specific function and presets the operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provide flexible functions in the operations that can be performed. For example, a programmable circuit can execute software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. A fixed-function circuit can execute software instructions (for example, to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.
[0113] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video encoder 200 is performed using software executed by a programmable circuit, the memory 106 ( Figure 1 ) may store object code for software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0114] The video data memory 230 is configured to store received video data. The video encoder 200 may retrieve a picture of video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be original video data to be encoded.
[0115] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units to perform video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0116] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and the resulting rate-distortion values for these combinations. The encoding parameters may include the partitioning of CTUs into CUs, the prediction mode of the CU, the transform type of the residual data of the CU, the quantization parameter of the residual data of the CU, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than other tested combinations.
[0117] The video encoder 200 may partition the picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a slice. The mode selection unit 202 may partition the CTUs of the picture according to a tree structure (e.g., the QTBT structure or quadtree structure of HEVC described above). As described above, the video encoder 200 may form one or more CUs from partitioning the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".
[0118] Typically, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or in HEVC, the overlapping portion of the PU and TU). For inter prediction of the current block, the motion estimation unit 222 can perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 can calculate a value indicating how similar the potential reference block is to the current block, for example, based on the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 can generally perform these calculations using the sample-by-sample difference between the current block and the reference block under consideration. The motion estimation unit 222 can identify the reference block with the lowest value obtained from these calculations, which indicates the reference block that most closely matches the current block.
[0119] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use these motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion vector has fractional sample precision, the motion compensation unit 224 may interpolate the values of the prediction block according to one or more interpolation filters. Furthermore, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the corresponding motion vectors, and combine the retrieved data, for example, by performing sample-by-sample averaging or weighted averaging.
[0120] As another example, for intra prediction or intra prediction codec, the intra prediction unit 226 can generate a prediction block from samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 can generally mathematically combine the values of the adjacent samples and fill these calculated values along a defined direction on the current block to generate a prediction block. As another example, for DC mode, the intra prediction unit 226 can calculate the average value of the adjacent samples of the current block and generate a prediction block to include the average value of the results for each sample of the prediction block.
[0121] According to the technology of the present disclosure, the mode selection unit 202 can perform inter-frame-intra prediction of a video data block (e.g., CU). That is, the mode selection unit 202 can form a prediction block by causing the motion estimation unit 222 and the motion compensation unit 224 to form an inter-frame prediction block and causing the intra-frame prediction unit 226 to form an intra-frame prediction block. The mode selection unit 202 can form a final prediction block of the current block by performing a weighted combination on the samples of the inter-frame prediction block and the intra-frame prediction block. When the current block is a chroma block, the mode selection unit 202 can determine the weight for performing weighted prediction according to the number of neighboring blocks of the intra-frame and / or inter-frame prediction codec of the luminance block corresponding to the current chroma block. That is, the mode selection unit 202 can determine the number of inter-frame prediction blocks adjacent to the luminance block corresponding to the current chroma block, and then determine the weight based on the number of inter-frame prediction blocks adjacent to the luminance block, instead of determining the weight according to the neighboring blocks of the current chroma block.
[0122] As an example, the mode selection unit 202 may determine whether the upper neighboring block and / or the left neighboring block of the corresponding luminance block are inter-predicted. When none of these neighboring blocks are inter-predicted, the mode selection unit 202 may determine that the weight to be applied to the intra-predicted block is 3 and the weight to be applied to the inter-predicted block is 1. When both neighboring blocks are inter-predicted, the mode selection unit 202 may determine that the weight to be applied to the inter-predicted block is 3 and the weight to be applied to the intra-predicted block is 1. When one of these neighboring blocks is inter-predicted and the other is intra-predicted, the mode selection unit 202 may determine that the weight to be applied to both the inter-predicted block and the intra-predicted block is 2. In some examples, the mode selection unit 202 may count neighboring blocks predicted using inter-intra prediction and / or intra block copy as inter-prediction codec blocks.
[0123] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original, uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine the difference between the sample values in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0124] In the example where the mode selection unit 202 partitions the CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As described above, the size of the CU may refer to the size of the luma codec block of the CU, and the size of the PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, the video encoder 200 may support PU sizes of 2N×2N or N×N for intra-frame prediction, and symmetric PU sizes of 2N×2N, 2N×N, N×2N, N×N or the like for inter-frame prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning of PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-frame prediction.
[0125] In an example where the mode selection unit does not further split the CU into PUs, each CU may be associated with a luma codec block and a corresponding chroma codec block. As described above, the size of a CU may refer to the size of the luma codec block of the CU. The video encoder 200 and the video decoder 300 may support a CU size of 2N×2N, 2N×N, or N×2N.
[0126] For other video codec techniques, such as intra block copy mode codec, affine mode codec, and linear model (LM) mode codec as some examples, the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the codec technique. In some examples, such as palette mode codec, the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating how to reconstruct the block based on the selected palette. In this mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.
[0127] In some examples, the mode selection unit 202 may select the inter-intra prediction mode. In such examples, the mode selection unit 202 may weight the inter prediction block generated by the motion compensation unit 224 and the intra prediction block generated by the intra prediction unit 226 according to any of the various techniques of this disclosure. The mode selection unit 202 may generate a prediction block from the weighted inter and intra prediction blocks and output the generated prediction block.
[0128] As described above, the residual generation unit 204 receives video data of a current block and a corresponding prediction block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0129] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 can apply various transforms to the residual block to form the transform coefficient block. For example, the transform processing unit 206 can apply a discrete cosine transform (DCT), a directional transform, a Karl-Lof transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 can perform multiple transforms on the residual block, for example, a primary transform and a secondary transform such as a rotation transform. In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0130] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may introduce information loss, and thus, the quantized transform coefficients may have lower precision than the original transform coefficients generated by the transform processing unit 206.
[0131] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform to the quantized transform coefficient block, respectively, to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although it may have a certain degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples from the prediction block generated by the mode selection unit 202 to generate a reconstructed block.
[0132] Filter unit 216 may perform one or more filtering operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce blocking artifacts along the edges of the CU. In some examples, the operations of filter unit 216 may be skipped.
[0133] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in examples where the operation of the filter unit 216 is not required, the reconstruction unit 214 can store the reconstructed blocks to the DPB 218. In examples where the operation of the filter unit 216 is required, the filter unit 216 can store the filtered reconstructed blocks to the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve a reference picture from the DPB 218, which is formed by the reconstructed (and possibly filtered) blocks, to perform inter-frame prediction on blocks of subsequently encoded pictures. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks in the DPB 218 of the current picture to perform intra-frame prediction on other blocks in the current picture.
[0134] In general, the entropy coding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may entropy encode the quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy coding unit 220 may entropy encode the prediction syntax elements (e.g., motion information for inter prediction or intra mode information for intra prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on the syntax elements as another example of video data to generate entropy-coded data. For example, the entropy coding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable to variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, entropy encoding unit 220 may operate in a bypass mode, where syntax elements are not entropy encoded.
[0135] The video encoder 200 may output a bitstream including entropy-encoded syntax elements required to reconstruct a block of a slice or a picture. Specifically, the entropy encoding unit 220 may output a bitstream.
[0136] The operations described above are described with respect to blocks. Such descriptions should be understood as operations for luma codec blocks and / or chroma codec blocks. As described above, in some examples, the luma codec blocks and chroma codec blocks are the luma components and chroma components of a CU. In some examples, the luma codec blocks and chroma codec blocks are the luma components and chroma components of a PU.
[0137] In some examples, operations performed with respect to luma codec blocks need not be repeated for chroma codec blocks. As one example, operations for identifying motion vectors (MVs) and reference pictures for luma codec blocks need not be repeated to identify MVs and reference pictures for chroma blocks. Instead, the MVs for luma codec blocks may be scaled to determine MVs for chroma blocks, and the reference pictures may be the same. As another example, the intra prediction process may be the same for luma codec blocks and chroma codec blocks.
[0138] Figure 4 The video encoder 200 represents an example of a device for encoding and decoding video data, the device including one or more processors configured to: form an inter-frame prediction block for a current block of video data; form an intra-frame prediction block for the current block of video data; apply a first weight to the inter-frame prediction block and a second weight to the intra-frame prediction block; combine the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current block; and encode and decode (i.e., in this example, encode) the current block using the prediction block.
[0139] The video encoder 200 also represents an example of a device for encoding and decoding video data, the device including one or more processors configured to: form an inter-frame prediction block for a current chrominance block of the video data; form an intra-frame prediction block for the current chrominance block of the video data; determine the number of neighboring blocks of the luminance block corresponding to the current chrominance block that are intra-frame prediction encoded and decoded; determine a first weight and a second weight based on the number of neighboring blocks that are intra-frame prediction encoded and decoded; apply the first weight to the inter-frame prediction block and apply the second weight to the intra-frame prediction block; combine the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current chrominance block; and encode and decode the current chrominance block using the prediction block.
[0140] Figure 5 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Figure 5 The present disclosure is provided for the purpose of explanation and does not limit the techniques widely illustrated and described in the present disclosure. For the purpose of explanation, the present disclosure describes a video decoder 300 according to the techniques of JEM, VVC, and HEVC. However, the techniques of the present disclosure can be performed by a video codec device configured for other video codec standards.
[0141] exist Figure 5 In the example of , the video decoder 300 includes a codec picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented in one or more processors or processing circuits. Moreover, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions.
[0142] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include additional units to perform predictions according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0143] In some examples, prediction processing unit 304 may select an inter-intra prediction mode. In such examples, prediction processing unit 304 may weight the inter prediction blocks generated by motion compensation unit 316 and the intra prediction blocks generated by intra prediction unit 318 in accordance with any of the various techniques of this disclosure. Prediction processing unit 304 may generate a prediction block from the weighted inter and intra prediction blocks and output the generated prediction block.
[0144] According to the technology of the present disclosure, the prediction processing unit 304 can perform inter-frame and intra-frame prediction of a video data block (e.g., a CU). That is, the prediction processing unit 304 can form a prediction block by causing the motion compensation unit 316 to form an inter-frame prediction block and causing the intra-frame prediction unit 318 to form an intra-frame prediction block. The prediction processing unit 304 can form a final prediction block of the current block by performing a weighted combination of samples of the inter-frame prediction block and the intra-frame prediction block. When the current block is a chroma block, the prediction processing unit 304 can determine the weight for performing weighted prediction according to the number of neighboring blocks of the luminance block corresponding to the current chroma block that are intra-frame prediction encoded and decoded. That is, the prediction processing unit 304 can determine the number of intra-frame prediction blocks adjacent to the luminance block corresponding to the current chroma block, and then determine the weight based on the number of intra-frame prediction blocks adjacent to the luminance block, instead of determining the weight according to the neighboring blocks of the current chroma block.
[0145] As an example, the prediction processing unit 304 may determine whether the upper neighboring block and / or the left neighboring block of the corresponding luma block are inter-predicted. When none of these neighboring blocks are inter-predicted, the prediction processing unit 304 may determine that the weight to be applied to the intra-predicted block is 3 and the weight to be applied to the inter-predicted block is 1. When both neighboring blocks are inter-predicted, the prediction processing unit 304 may determine that the weight to be applied to the inter-predicted block is 3 and the weight to be applied to the intra-predicted block is 1. When one of these neighboring blocks is inter-predicted and the other is intra-predicted, the prediction processing unit 304 may determine that the weight to be applied to both the inter-predicted block and the intra-predicted block is 2. In some examples, the prediction processing unit 304 may count neighboring blocks predicted using inter-frame intra-frame prediction and / or intra-block copy as inter-prediction codec blocks.
[0146] CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of video decoder 300. For example, video data stored in CPB memory 320 may be received from computer-readable medium 110 ( Figure 1 ) is obtained. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. In addition, the CPB memory 320 may store video data other than syntax elements of encoded and decoded pictures, such as temporary data representing outputs from various units of the video decoder 300. The DPB 314 typically stores decoded pictures, and the video decoder 300 may output the decoded pictures and / or use them as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB memory 314 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 CPB memory 320 and the DPB memory 314 may be provided by the same memory device or a separate memory device. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or off-chip relative to these components.
[0147] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) retrieves the encoded and decoded video data. That is, the memory 120 may store data together with the CPB memory 320 as discussed above. Likewise, when some or all of the functionality of the video decoder 300 is implemented in software to be executed by the processing circuitry of the video decoder 300, the memory 120 may store instructions to be executed by the video decoder 300.
[0148] Figure 5 The various units shown are shown to aid in understanding the operations performed by the video decoder 300. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Figure 4 , fixed-function circuits refer to circuits that provide specific functions and have preset operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functions in the operations that can be performed. For example, a programmable circuit can execute software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (for example, to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.
[0149] The video decoder 300 may include an ALU, an EFU, a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video decoder 300 is performed by software executed on a programmable circuit, an on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0150] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to reproduce the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.
[0151] Typically, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (where the block currently being reconstructed (ie, decoded) may be referred to as a "current block").
[0152] The entropy decoding unit 302 may entropy decode syntax elements defining the quantized transform coefficients of the quantized transform coefficient block and transform information such as a quantization parameter (QP) and / or (one or more) transform mode indications. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a degree of quantization and, likewise, determine a degree of inverse quantization to be applied by the inverse quantization unit 306. For example, the inverse quantization unit 306 may perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0153] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karl-Lof transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the coefficient block.
[0154] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax element can indicate a reference picture in DPB 314 from which to retrieve the reference block, and a motion vector that identifies the position of the reference block in the reference picture relative to the position of the current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in a manner substantially similar to that described with respect to motion compensation unit 224 ( Figure 4 ) describes the method to perform the inter-frame prediction process.
[0155] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 can generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Likewise, the intra-prediction unit 318 can generally generate a prediction block in a manner substantially similar to that described with respect to the intra-prediction unit 226 ( Figure 4 The intra prediction process is performed in the manner described in ). The intra prediction unit 318 can retrieve the data of the neighboring samples of the current block from the DPB 314.
[0156] The reconstruction unit 310 may reconstruct the current block using the prediction block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.
[0157] The filter unit 312 may perform one or more filtering operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 may not necessarily be performed in all examples.
[0158] The video decoder 300 may store the reconstructed blocks in the DPB 314. As discussed above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra-frame prediction and previously decoded pictures for subsequent motion compensation. Furthermore, the video decoder 300 may output decoded pictures from the DPB for subsequent display on a display device (e.g., Figure 1 The image is presented on a display device 118).
[0159] Figure 5The video decoder 300 represents an example of a device for encoding and decoding video data, the device including one or more processors configured to: form an inter-frame prediction block for a current block of video data; form an intra-frame prediction block for the current block of video data; apply a first weight to the inter-frame prediction block and a second weight to the intra-frame prediction block; combine the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current block; and encode (i.e., in this example, decode) the current block using the prediction block.
[0160] The video decoder 300 also represents an example of a device for encoding and decoding video data, the device including one or more processors configured to: form an inter-frame prediction block for a current chrominance block of the video data; form an intra-frame prediction block for the current chrominance block of the video data; determine the number of neighboring blocks of the luminance block corresponding to the current chrominance block that are intra-frame prediction encoded and decoded; determine a first weight and a second weight based on the number of neighboring blocks that are intra-frame prediction encoded and decoded; apply the first weight to the inter-frame prediction block and apply the second weight to the intra-frame prediction block; combine the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current chrominance block; and encode and decode the current chrominance block using the prediction block.
[0161] Figure 6 2 is a flowchart illustrating an example method for encoding a current block according to the techniques of the present disclosure. The current block may include a current CU. Although with respect to the video encoder 200 ( Figure 1 and Figure 4 ), but it should be understood that other devices may be configured to perform similar Figure 6 method.
[0162] In this example, the video encoder 200 first predicts the current block (350). For example, according to the technology of the present disclosure, the video encoder 200 can use inter-intra prediction to form a prediction block for the current block. Then, the video encoder 200 can calculate the residual block of the current block (352). In order to calculate the residual block, the video encoder 200 can calculate the difference between the initial, unencoded block and the prediction block of the current block. Then, the video encoder 200 can transform and quantize the coefficients of the residual block (354). Next, the video encoder 200 can scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 can entropy encode the coefficients (358). For example, the video encoder 200 can encode the coefficients using CAVLC or CABAC. Then, the video encoder 200 can output the entropy encoded data of the block (360).
[0163] In this way, Figure 6The method represents an example of a method, which includes: forming an inter-frame prediction block for a current block of video data; forming an intra-frame prediction block for the current block of video data; applying a first weight to the inter-frame prediction block and applying a second weight to the intra-frame prediction block; combining the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current block; and encoding (i.e., encoding) the current block using the prediction block.
[0164] Figure 7 1 is a flowchart illustrating an example method of decoding a current block according to the techniques of the present disclosure. The current block may include a current CU. Although described with respect to video decoder 300 ( Figure 1 and Figure 5 ), but it should be understood that other devices may be configured to perform similar Figure 7 method.
[0165] The video decoder 300 may receive entropy-coded data of a current block, such as entropy-coded prediction information and entropy-coded data corresponding to coefficients of a residual block of the current block (370). The video decoder 300 may entropy decode the entropy-coded data to determine prediction information of the current block and reproduce coefficients of the residual block (372). The video decoder 300 may, for example, predict the current block (374) as indicated by the prediction information of the current block using an inter-intra prediction mode according to the techniques of the present disclosure to calculate a prediction block of the current block. The video decoder 300 may then inverse scan the reproduced coefficients (376) to create a quantized transform coefficient block. The video decoder 300 may then inverse quantize and inverse transform the coefficients to generate a residual block (378). The video decoder 300 may finally decode the current block (380) by combining the prediction block and the residual block.
[0166] In this way, Figure 7 The method represents an example of a method, which includes: forming an inter-frame prediction block for a current block of video data; forming an intra-frame prediction block for the current block of video data; applying a first weight to the inter-frame prediction block and applying a second weight to the intra-frame prediction block; combining the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current block; and encoding (i.e., decoding) the current block using the prediction block.
[0167] Figure 8 is a flowchart illustrating an example method of encoding or decoding video data according to the techniques of the present disclosure. For purposes of example and explanation, Figure 8 The method is about Figure 1 and Figure 5 The video decoder 300 interprets that although Figure 1 and Figure 4The video encoder 200 or other video encoding and decoding devices may also perform this or similar methods. Figure 8 The method can be used (for example, in Figure 6 The method of step 350 of the method of the present invention is performed by the video encoder 200 when predicting the current chrominance block, or when (for example, Figure 7 The method is performed by the video decoder 300 when predicting the current chroma block at step 374 of the present invention.
[0168] First, the video decoder 300 forms an inter-frame prediction block for the current chroma block (400). The video decoder 300 may also form an intra-frame prediction block for the current chroma block (402). Then, the video decoder 300 may determine a luma block corresponding to the chroma block (404), for example, a luma block that is co-located with the chroma block in a luma array.
[0169] The video decoder 300 may then determine the prediction mode of the neighboring blocks of the luma block (406). For example, the video decoder 300 may determine Figure 3A The top neighbor block 142 and the left neighbor block 144, Figure 3B The prediction mode of the upper right neighbor block 148 and the lower left neighbor block 150, or Figures 3A-3F Other examples of prediction modes for neighboring blocks are shown. Video decoder 300 may also determine the number of intra-prediction neighboring blocks for the luma block (408). Alternatively, video decoder 300 may determine the number of inter-prediction neighboring blocks for the luma block.
[0170] The video decoder 300 may also determine the weights to be applied to the inter-prediction blocks and the intra-prediction blocks based on the number of intra-prediction neighboring blocks of the luminance block (410). If there are more inter-prediction blocks than intra-prediction blocks, the video decoder 300 may determine that the weight to be applied to the inter-prediction blocks is greater than the weight to be applied to the intra-prediction blocks. For example, the weight to be applied to the inter-prediction blocks may be 3 and the weight to be applied to the intra-prediction blocks may be 1. If the number of intra-prediction blocks is greater than the number of inter-prediction blocks, the video decoder 300 may determine that the weight to be applied to the intra-prediction blocks is greater than the weight to be applied to the inter-prediction blocks. For example, the weight to be applied to the intra-prediction blocks may be 3 and the weight to be applied to the inter-prediction blocks may be 1. If the number of intra- and inter-prediction blocks is the same, the weights may be equal, for example, 2 each.
[0171] The video decoder 300 may then combine the inter prediction block and the intra prediction block using the weights to form a prediction block for the current chroma block (412). The video decoder 300 may then encode the current chroma block using the prediction block (414).
[0172] In this way, Figure 8The method represents an example of a method for encoding and decoding video data, the method comprising: forming an inter-frame prediction block of a current chroma block of the video data; forming an intra-frame prediction block of the current chroma block of the video data; determining the number of neighboring blocks of the luminance block corresponding to the current chroma block that are intra-frame prediction encoded and decoded; determining a first weight and a second weight according to the number of neighboring blocks that are intra-frame prediction encoded and decoded; applying the first weight to the inter-frame prediction block and applying the second weight to the intra-frame prediction block; combining the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block of the current chroma block; and encoding and decoding the current chroma block using the prediction block.
[0173] Certain techniques of the present disclosure are summarized in the following examples:
[0174] Example 1: A method for encoding and decoding video data, the method comprising: forming an inter-frame prediction block for a current block of the video data; forming an intra-frame prediction block for the current block of the video data; applying a first weight to the inter-frame prediction block and applying a second weight to the intra-frame prediction block; combining the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current block; and encoding and decoding the current block using the prediction block.
[0175] Example 2: The method according to Example 1, wherein encoding and decoding the current block includes decoding the current block, including: decoding a residual block of the current block; and combining samples of the residual block with samples of the prediction block.
[0176] Example 3: A method according to any one of Examples 1 and 2, wherein encoding and decoding the current block includes encoding the current block, including: subtracting samples of the prediction block from samples of the current block to form a residual block; and encoding the residual block.
[0177] Example 4: The method according to any one of Examples 1-3 further includes determining the first weight and the second weight according to the number of neighboring blocks of the current block that are intra-frame encoded.
[0178] Example 5: The method of Example 4, wherein the adjacent blocks include top adjacent blocks.
[0179] Example 6: A method according to any one of Examples 4 and 5, wherein the adjacent block includes a left adjacent block.
[0180] Example 7: A method according to any one of Examples 4-6, wherein the adjacent block includes an upper right adjacent block.
[0181] Example 8: A method according to any one of Examples 4-7, wherein the neighboring block includes a lower left neighboring block.
[0182] Example 9: A method according to any one of Examples 4-8, wherein the neighboring block includes an upper left neighboring block.
[0183] Example 10: The method according to any one of Examples 4-9 further includes determining a neighboring block based on a height of a current block and a width of the current block.
[0184] Example 11: The method of Example 10, wherein when the height and the width are equal, the neighboring blocks include an upper right neighboring block and a lower left neighboring block.
[0185] Example 12: The method according to Example 11, wherein the adjacent blocks further include a top adjacent block and a left adjacent block.
[0186] Example 13: The method according to Example 12, wherein the adjacent blocks further include an upper left adjacent block.
[0187] Example 14: A method according to any one of Examples 10-13, wherein when the height and width are different, the neighboring blocks include an upper right neighboring block and a lower left neighboring block.
[0188] Example 15: A method according to Example 10, wherein the adjacent blocks are symmetrical along the width and height dimensions of the current block when the height and width are equal, and the adjacent blocks are asymmetrical along the width and height dimensions of the current block when the height and width are not equal.
[0189] Example 16: The method according to Example 15, wherein when the width is greater than the height, the adjacent blocks include an upper right adjacent block and a left adjacent block, and when the height is greater than the width, the adjacent blocks include a top adjacent block and a lower left adjacent block.
[0190] Example 17: The method according to any one of Examples 4-16 further includes determining that one of the neighboring blocks decoded by intra block copy codec or current picture reference codec is an inter-frame codec block.
[0191] Example 18: The method according to any one of Examples 4-16 further includes determining that one of the neighboring blocks of intra block copy codec or current picture reference codec is an intra codec block.
[0192] Example 19: The method of any one of Examples 4-18, further comprising determining that one of the intra-coded neighboring blocks is an inter-coded block.
[0193] Example 20: The method of any one of Examples 4-18, further comprising determining that one of the intra-coded neighboring blocks is an intra-coded block.
[0194] Example 21: A method according to any one of Examples 4-20, wherein determining the first weight and the second weight includes selecting the second weight to be higher than the first weight when all neighboring blocks are intra-coded.
[0195] Example 22: The method of any one of Examples 4-21, wherein determining the first weight and the second weight comprises selecting the first weight to be higher than the second weight when at least one neighboring block is not intra-coded.
[0196] Example 23: A method according to any one of Examples 4-22, wherein determining the first weight and the second weight includes selecting the first weight to be equal to the second weight when only one neighboring block is intra-coded.
[0197] Example 24: A method according to any one of Examples 4-23, wherein determining the first weight and the second weight includes selecting the first weight as 1 and selecting the second weight as 3 when the upper left neighboring block, the upper right neighboring block, and the lower left neighboring block of the current block are intra-frame encoded and decoded.
[0198] Example 25: A method according to any one of Examples 4-23, wherein determining the first weight and the second weight includes selecting the first weight as 3 and selecting the second weight as 5 when the upper left neighboring block, the upper right neighboring block, and the lower left neighboring block of the current block are intra-frame encoded.
[0199] Example 26: A method according to any one of Examples 4-25, wherein determining the first weight and the second weight includes selecting the first weight as 2 and selecting the second weight as 2 when at least one of the upper left neighboring block, the upper right neighboring block, or the lower left neighboring block of the current block is intra-frame encoded.
[0200] Example 27: A method according to any one of Examples 4-25, wherein determining the first weight and the second weight includes selecting the first weight as 4 and selecting the second weight as 4 when at least one of the upper left neighboring block, the upper right neighboring block, or the lower left neighboring block of the current block is intra-frame encoded.
[0201] Example 28: A method according to any one of Examples 4-27, wherein determining the first weight and the second weight includes selecting the first weight as 3 and selecting the second weight as 1 when the upper left neighboring block, the upper right neighboring block, and the lower left neighboring block of the current block are not intra-frame encoded.
[0202] Example 29: A method according to any one of Examples 4-27, wherein determining the first weight and the second weight includes selecting the first weight as 5 and selecting the second weight as 3 when the upper left neighboring block, the upper right neighboring block, and the lower left neighboring block of the current block are not intra-frame encoded.
[0203] Example 30: The method of any one of Examples 4-29, wherein determining the first weight and the second weight comprises copying the first weight and the second weight from one of the neighboring blocks of the multi-hypothesis intra-frame coding.
[0204] Example 31: A method according to any of Examples 4-30, wherein determining the first weight and the second weight includes selecting the second weight to be higher than the first rate when only one neighboring block is intra-frame coded.
[0205] Example 32: The method of Example 31, wherein the second weight is 3 and the first weight is 1.
[0206] Example 33: The method of Example 31, wherein the second weight is 5 and the first weight is 3.
[0207] Example 34: A method according to any of Examples 4-30, wherein determining the first weight and the second weight includes selecting the first weight to be higher than the second rate when only one neighboring block is intra-coded.
[0208] Example 35: The method of Example 34, wherein the first weight is 3 and the second weight is 1.
[0209] Example 36: The method of Example 34, wherein the first weight is 5 and the second weight is 3.
[0210] Example 37: A method according to any of Examples 4-30, wherein determining the first weight and the second weight includes selecting the second weight to be higher than the first rate when no neighboring blocks are intra-coded.
[0211] Example 38: The method of Example 37, wherein the second weight is 3 and the first weight is 1.
[0212] Example 39: The method of Example 37, wherein the second weight is 5 and the first weight is 3.
[0213] Example 40: A method according to any one of Examples 4-30, wherein determining the first weight and the second weight includes selecting the second weight to be higher than the first rate when at least one neighboring block is predicted using a DC intra mode or a planar mode.
[0214] Example 41: The method of Example 40, wherein the second weight is 3 and the first weight is 1.
[0215] Example 42: The method of Example 40, wherein the second weight is 5 and the first weight is 3.
[0216] Example 43: The method according to any one of Examples 1-42 further includes determining the first weight and the second weight based on the luminance block of one of the adjacent blocks when a single luminance-chrominance codec tree or a dual luminance-chrominance codec tree is enabled in the adjacent blocks.
[0217] Example 44: The method according to any one of Examples 1-43 further includes determining the first weight and the second weight based on the chroma block of one of the neighboring blocks when the dual luminance-chroma codec tree is enabled in the one of the neighboring blocks.
[0218] Example 45: The method according to any one of Examples 1-44 further includes determining the first weight and the second weight according to the number of inter-frame predictions of the merged index block.
[0219] Example 46: The method of Example 45, wherein determining the first weight and the second weight comprises setting the first weight to be higher than the second weight when the merged index block is bidirectionally predicted.
[0220] Example 47: The method of Example 46, wherein the first weight is 3 and the second weight is 1.
[0221] Example 48: The method of Example 46, wherein the first weight is 5 and the second weight is 3.
[0222] Example 49: The method of any one of Examples 46-48, wherein determining the first weight and the second weight comprises determining the first weight and the second weight according to one of Examples 4-42 when the merged index block is unidirectionally predicted.
[0223] Example 50: The method of Example 45, wherein determining the first weight and the second weight comprises setting the first weight to be higher than the second weight when the merged index block is unidirectionally predicted.
[0224] Example 51: A method according to Example 50, wherein the first weight is 3 and the second weight is 1.
[0225] Example 52: The method of Example 50, wherein the first weight is 5 and the second weight is 3.
[0226] Example 53: The method according to any one of Examples 1-52 also includes determining the first weight and the second weight according to the size of the current block.
[0227] Example 54: The method according to Example 53, wherein the size of the current block includes a minimum value of a width of the current block and a height of the current block.
[0228] Example 55: The method according to Example 53, wherein the size of the current block includes a maximum value of a width of the current block and a height of the current block.
[0229] Example 56: A method according to Example 53, wherein the size of the current block includes the product of the width of the current block and the height of the current block.
[0230] Example 57: A method according to Example 53, wherein the size of the current block includes the sum of the width of the current block and the height of the current block.
[0231] Example 58: A method according to any of Examples 53-57, wherein determining the first weight and the second weight includes setting the first weight to be higher than the second weight when the size of the block is higher than a predefined threshold.
[0232] Example 59: The method of Example 58, wherein the first weight is 3 and the second weight is 1.
[0233] Example 60: The method of Example 58, wherein the first weight is 5 and the second weight is 3.
[0234] Example 61: A method according to any one of Examples 53-57, wherein determining the first weight and the second weight includes setting the second weight to be higher than the first weight when the size of the block is higher than a predefined threshold.
[0235] Example 62: The method of Example 61, wherein the second weight is 3 and the first weight is 1.
[0236] Example 63: The method of Example 61, wherein the second weight is 5 and the first weight is 3.
[0237] Example 64: A method according to any of Examples 53-57, wherein determining the first weight and the second weight includes setting the first weight to be higher than the second weight when the size of the block is below a predefined threshold.
[0238] Example 65: The method of Example 64, wherein the first weight is 3 and the second weight is 1.
[0239] Example 66: The method of Example 64, wherein the first weight is 5 and the second weight is 3.
[0240] Example 67: A method according to any of Examples 53-57, wherein determining the first weight and the second weight includes setting the second weight to be higher than the first weight when the size of the block is below a predefined threshold.
[0241] Example 68: The method of Example 67, wherein the second weight is 3 and the first weight is 1.
[0242] Example 69: The method of Example 67, wherein the second weight is 5 and the first weight is 3.
[0243] Example 70: The method of any one of Examples 1-69 further includes encoding and decoding data of a bitstream representing the first weight and the second weight.
[0244] Example 71: A method according to Example 70, wherein the data of the bitstream includes at least one of a sequence parameter set, a picture parameter set, an adaptation parameter set, a video parameter set, a picture header, a slice header, a tile header or a block header.
[0245] Example 72: A device for encoding and decoding video data, the device comprising one or more components for performing the method described in any of Examples 1-71.
[0246] Example 73: An apparatus according to Example 72, wherein one or more components include one or more processors implemented in the circuit.
[0247] Example 74: The apparatus of Example 72, further comprising a display configured to display the decoded video data.
[0248] Example 75: A device according to Example 72, wherein the device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0249] Example 76: The device according to Example 72 also includes a memory configured to store video data.
[0250] Example 77: A device for encoding video data, the device comprising: a component for forming an inter-frame prediction block for a current block of the video data; a component for forming an intra-frame prediction block for the current block of the video data; a component for applying a first weight to the inter-frame prediction block and a second weight to the intra-frame prediction block; a component for combining the first weighted inter-frame prediction block and the second weighted intra-frame prediction block to form a prediction block for the current block; and a component for encoding and decoding the current block using the prediction block.
[0251] Example 78: A computer-readable storage medium having instructions stored thereon, which, when executed, cause a processor to perform the method of any one of Examples 1-71.
[0252] It should be appreciated that, depending on the example, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or omitted entirely (e.g., not all described actions or events are necessary for the practice of the techniques). Additionally, in some examples, actions or events may be performed concurrently, such as through multithreading, interrupt handling, or multiple processors, rather than being performed sequentially.
[0253] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or sent through a computer-readable medium as one or more instructions or codes and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media corresponding to tangible media such as data storage media, or communication media including any media that facilitates (e.g., according to a communication protocol) transferring a computer program from one place to another. In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in the present disclosure. A computer program product may include computer-readable media.
[0254] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, flash 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 a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to send instructions from a website, server or other remote source, then the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave) is included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are directed to non-temporary tangible storage media. The disks and optical disks used herein include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), floppy disks and blue-ray disks, wherein the disks usually reproduce data magnetically, and the optical disks reproduce data optically with lasers. The above combination should also be included in the scope of computer-readable media.
[0255] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Accordingly, the terms "processor" and "processing circuit" used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques 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 into a combined codec. Similarly, these techniques may be fully implemented in one or more circuits or logic elements.
[0256] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses, including wireless handheld devices, integrated circuits (ICs), or IC sets (e.g., chipsets). Various components, modules, or units are described in the present disclosure to emphasize the functional aspects of devices configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Instead, as described above, the various units may be combined in a codec hardware unit, or provided by a collection of interoperable hardware units including one or more processors as described above in combination with appropriate software and / or firmware.
[0257] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for encoding and decoding video data, the method comprising: forming an inter-frame prediction block of a current luminance block of video data; forming an intra-frame prediction block of the current luminance block of the video data; Determining whether a first neighboring block of the current luminance block is intra-frame prediction coded and decoded; Determining whether a second neighboring block of the current luminance block is intra-frame prediction coded and decoded; Determining a first weight and a second weight based on determining whether at least one of the first neighboring block and the second neighboring block is intra-frame prediction coded or decoded; applying the first weight to the inter prediction block, and applying the second weight to the intra prediction block; combining the first weighted inter prediction block and the second weighted intra prediction block to form a prediction block for the current luminance block; as well as Using the prediction block to encode and decode the current luminance block, Wherein, determining whether the first neighboring block is intra-frame prediction encoded and decoded includes determining whether the first neighboring block is encoded and decoded according to a first intra-frame prediction mode other than intra-frame block copying or combined intra-frame inter-frame prediction, and wherein, determining whether the second neighboring block is intra-frame prediction encoded and decoded includes determining whether the second neighboring block is encoded and decoded using a second intra-frame prediction mode other than intra-frame block copying or combined intra-frame inter-frame prediction.
2. The method according to claim 1, wherein: Determining the first weight and the second weight also includes: when one of the first neighboring blocks and the second neighboring blocks enables a single luminance-chrominance codec tree or a dual luminance-chrominance codec tree, determining the first weight and the second weight based on the luminance block of the one of the first neighboring blocks and the second neighboring block.
3. The method according to claim 1, wherein: The first adjacent block and the second adjacent block include an upper adjacent block and a left adjacent block.
4. The method according to claim 1, wherein: Determining the first weight and the second weight includes determining the first weight and the second weight according to whether the merge index block is predicted using unidirectional prediction or bidirectional prediction.
5. The method according to claim 1, wherein: Determining the first weight and the second weight includes: determining the first weight and the second weight according to the size of the current luminance block. 6 . The method of claim 1 , further comprising encoding and decoding data of a bitstream representing the first weight and the second weight.
7. The method according to claim 6, wherein: The data of the bitstream includes at least one of a sequence parameter set, a picture parameter set, an adaptation parameter set, a video parameter set, a picture header, a slice header, a tile header or a block header.
8. The method of claim 1, wherein Encoding and decoding the current luminance block includes decoding the current luminance block, including: Decoding the residual block of the current luminance block; and The samples of the residual block are combined with the samples of the prediction block.
9. The method according to claim 1, wherein: Encoding and decoding the current luminance block includes encoding the current luminance block, including: Subtracting samples of the prediction block from samples of the current luminance block to form a residual block; and The residual block is encoded.
10. A device for encoding and decoding video data, the device comprising: A memory for storing video data; as well as One or more processors implemented in circuitry and configured to: forming an inter-frame prediction block of a current luminance block of video data; forming an intra-frame prediction block of the current luminance block of the video data; Determining whether a first neighboring block of the current luminance block is intra-frame prediction coded and decoded; Determining whether a second neighboring block of the current luminance block is intra-frame prediction coded and decoded; Determining a first weight and a second weight based on determining whether at least one of the first neighboring block and the second neighboring block is intra-frame prediction coded or decoded; applying the first weight to the inter prediction block, and applying the second weight to the intra prediction block; combining the first weighted inter prediction block and the second weighted intra prediction block to form a prediction block for the current luminance block; as well as Using the prediction block to encode and decode the current luminance block, Wherein, determining whether the first neighboring block is intra-frame prediction encoded and decoded includes determining whether the first neighboring block is encoded and decoded according to a first intra-frame prediction mode other than intra-frame block copying or combined intra-frame inter-frame prediction, and wherein, determining whether the second neighboring block is intra-frame prediction encoded and decoded includes determining whether the second neighboring block is encoded and decoded using a second intra-frame prediction mode other than intra-frame block copying or combined intra-frame inter-frame prediction.
11. The device according to claim 10, wherein: The one or more processors are configured to determine the first weight and the second weight based on a luma block of one of the first neighboring block and the second neighboring block when a single luma-chroma codec tree or a dual luma-chroma codec tree is enabled.
12. The device according to claim 10, wherein: The first adjacent block and the second adjacent block include an upper adjacent block and a left adjacent block.
13. The apparatus according to claim 10, wherein: The one or more processors are configured to determine the first weight and the second weight according to whether the merge index block is predicted using unidirectional prediction or bidirectional prediction.
14. The apparatus according to claim 10, wherein: The one or more processors are configured to determine the first weight and the second weight according to a size of the current luma block.
15. The apparatus according to claim 10, wherein: The one or more processors are further configured to encode and decode data of a bitstream representing the first weight and the second weight.
16. The device according to claim 15, wherein: The data of the bitstream includes at least one of a sequence parameter set, a picture parameter set, an adaptation parameter set, a video parameter set, a picture header, a slice header, a tile header or a block header.
17. The apparatus according to claim 10, wherein: The one or more processors are configured to decode the current luma block, and in order to decode the current luma block, the one or more processors are configured to: Decoding a residual block of the current luminance block; as well as The samples of the residual block are combined with the samples of the prediction block.
18. The apparatus according to claim 10, wherein: The one or more processors are configured to encode the current luma block, and in order to encode the current luma block, the one or more processors are configured to: Subtracting samples of the prediction block from samples of the current luminance block to form a residual block; and The residual block is encoded.
19. A computer readable storage medium having stored thereon instructions which, when executed, cause a processor to: forming an inter-frame prediction block of a current luminance block of video data; forming an intra-frame prediction block of the current luminance block of the video data; Determining whether a first neighboring block of the current luminance block is intra-frame prediction coded and decoded; Determining whether a second neighboring block of the current luminance block is intra-frame prediction coded and decoded; Determining a first weight and a second weight based on determining whether at least one of the first neighboring block and the second neighboring block is intra-frame prediction coded or decoded; applying the first weight to the inter prediction block, and applying the second weight to the intra prediction block; combining the first weighted inter prediction block and the second weighted intra prediction block to form a prediction block for the current luminance block; as well as Using the prediction block to encode and decode the current luminance block, Wherein, determining whether the first neighboring block is intra-frame prediction encoded and decoded includes determining whether the first neighboring block is encoded and decoded according to a first intra-frame prediction mode other than intra-frame block copying or combined intra-frame inter-frame prediction, and wherein, determining whether the second neighboring block is intra-frame prediction encoded and decoded includes determining whether the second neighboring block is encoded and decoded using a second intra-frame prediction mode other than intra-frame block copying or combined intra-frame inter-frame prediction.
20. The computer-readable storage medium of claim 19, wherein: The instructions causing the processor to determine the first weight and the second weight also include: instructions causing the processor to determine the first weight and the second weight based on the luminance block of one of the first neighboring blocks and the second neighboring block when a single luminance-chrominance codec tree or a dual luminance-chrominance codec tree is enabled for one of the first neighboring blocks and the second neighboring block.
21. The computer-readable storage medium of claim 19, wherein: The first adjacent block and the second adjacent block include an upper adjacent block and a left adjacent block.
22. The computer-readable storage medium of claim 19, wherein: The instructions that cause the processor to determine the first weight and the second weight include instructions that cause the processor to determine the first weight and the second weight based on whether the merge index block is predicted using unidirectional prediction or bidirectional prediction.
23. The computer-readable storage medium of claim 19, wherein: The instructions for causing the processor to determine the first weight and the second weight include instructions for causing the processor to determine the first weight and the second weight according to a size of the current luminance block.
24. The computer-readable storage medium of claim 19, further comprising instructions that cause the processor to encode and decode data of a bitstream representing the first weight and the second weight.
25. The computer-readable storage medium of claim 24, wherein: The data of the bitstream includes at least one of a sequence parameter set, a picture parameter set, an adaptation parameter set, a video parameter set, a picture header, a slice header, a tile header or a block header.
26. The computer-readable storage medium of claim 19, wherein: The instruction for causing the processor to encode and decode the current luminance block includes an instruction for causing the processor to decode the current luminance block, which includes an instruction for causing the processor to: Decoding the residual block of the current luminance block; and The samples of the residual block are combined with the samples of the prediction block.
27. The computer-readable storage medium of claim 19, wherein: The instruction for causing the processor to encode and decode the current luminance block includes an instruction for causing the processor to encode the current luminance block, which includes an instruction for causing the processor to: Subtracting samples of the prediction block from samples of the current luminance block to form a residual block; and The residual block is encoded.
28. A device for encoding and decoding video data, the device comprising: means for forming an inter-frame prediction block of a current luminance block of video data; means for forming an intra-frame prediction block of said current luma block of said video data; A component for determining whether a first neighboring block of the current luminance block is intra-frame prediction encoded and decoded; A component for determining whether a second neighboring block of the current luminance block is intra-frame prediction encoded and decoded; means for determining a first weight and a second weight based on determining whether at least one of the first neighboring block and the second neighboring block is intra-prediction coded or not; means for applying the first weight to the inter-prediction block and applying the second weight to the intra-prediction block; means for combining a first weighted inter prediction block and a second weighted intra prediction block to form a prediction block for said current luminance block; as well as means for encoding and decoding the current luminance block using the prediction block, Wherein, determining whether the first neighboring block is intra-frame prediction encoded and decoded includes determining whether the first neighboring block is encoded and decoded according to a first intra-frame prediction mode other than intra-frame block copying or combined intra-frame inter-frame prediction, and wherein, determining whether the second neighboring block is intra-frame prediction encoded and decoded includes determining whether the second neighboring block is encoded and decoded using a second intra-frame prediction mode other than intra-frame block copying or combined intra-frame inter-frame prediction.
29. The apparatus of claim 28, wherein: The component for determining the first weight and the second weight also includes: a component for determining the first weight and the second weight according to the luminance block of one of the first neighboring blocks and the second neighboring block when one of the first neighboring blocks and the second neighboring block enables a single luminance-chrominance codec tree or a dual luminance-chrominance codec tree.
30. The apparatus of claim 28, wherein: The first adjacent block and the second adjacent block include an upper adjacent block and a left adjacent block.
31. The apparatus of claim 28, wherein: The means for determining the first weight and the second weight includes means for determining the first weight and the second weight according to whether the merge index block is predicted using unidirectional prediction or bidirectional prediction.
32. The apparatus of claim 28, wherein: The means for determining the first weight and the second weight includes means for determining the first weight and the second weight according to the size of the current luminance block.
33. The apparatus of claim 28, further comprising means for encoding and decoding data of a bitstream representing the first weight and the second weight.
34. The apparatus of claim 33, wherein: The data of the bitstream includes at least one of a sequence parameter set, a picture parameter set, an adaptation parameter set, a video parameter set, a picture header, a slice header, a tile header or a block header.
35. The apparatus of claim 28, wherein: The means for encoding and decoding the current luminance block includes means for decoding the current luminance block, including: means for decoding a residual block of the current luminance block; and Means for combining samples of the residual block with samples of the prediction block.
36. The apparatus of claim 28, wherein: The means for encoding and decoding the current luminance block includes means for encoding the current luminance block, including: means for subtracting samples of the prediction block from samples of the current luminance block to form a residual block; and Means for encoding the residual block.
Citation Information
Patent Citations
Position-dependent intra-inter prediction combination in video coding
US20200162737A1