Method and device for decoding video data, and readable storage medium
By optimizing the mixing of intra-frame and inter-frame prediction blocks using position-independent or position-dependent weights in intra-frame and inter-frame prediction, the decoding efficiency and complexity issues caused by PDPC in the prior art are solved, and more efficient video decoding is achieved.
Patent Information
- Application Number
- CN202410940041.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-11-14
- Filing Date
- 2019-11-15
- Publication Date
- 2024-11-08
AI Technical Summary
The application of position-dependent intra-prediction combination (PDPC) in the intra-frame-inter-frame mixing step in existing technologies may affect decoding efficiency and implementation complexity, especially in the triangular motion compensation prediction and intra-frame reference sample filtering processes, where ambiguity and complexity issues exist.
By using position-independent or position-dependent weights for weighted combination in intra-frame and inter-frame prediction, the mixing process of intra-frame and inter-frame prediction blocks is optimized, reducing complexity and improving decoding efficiency.
It improves the efficiency of video decoding and simplifies the implementation process, reduces the complexity of intra-frame and inter-frame mixing, and enhances decoding performance.
Smart Images

Figure CN118921459A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the application date of November 15, 2019, application number 201980074034.6, and invention name "Position-related intra-frame-inter-frame prediction combination in video coding".
[0002] This application claims priority to U.S. Patent Application No. 16 / 684,440 filed on November 14, 2019, U.S. Patent Application No. 67 / 768,655 filed on November 16, 2018, and No. 62 / 784,140 filed on December 21, 2018, the entire contents of each of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to video coding. Background Art
[0004] Digital video capabilities can be incorporated into a wide variety of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radio telephones, smart phones, video teleconferencing equipment, video streaming devices, and the like. Digital video devices implement video compression techniques, such as those described in standards defined by 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, ITU-T H.264 (also known as ISO / IEC MPEG-4 AVC), including its Scalable Video Coding (SVC) and Multi-view Video Coding (MVC) extensions, and ITU-T H.265 (also known as ISO / IEC MPEG-4 HEVC) and its extensions, MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Coding (AVC), High Efficiency Video Coding (HEVC) standards, and extensions of such standards. By implementing such video compression techniques, video devices can more efficiently send, receive, encode, decode, and / or store digital video information. The Versatile Video Coding (VVC) standardization activity, also known as ITU-T H.266, began during the April 2018 Joint Video Experts Team (JVET) meeting, with an evaluation of video compression technologies submitted in response to a call for proposals.
[0005] Video compression techniques may perform spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video frame or portion of a video frame) may be partitioned into video blocks, such as coding tree blocks and coding blocks. Spatial or temporal prediction results in a prediction of the block to be coded. Residual data represents the pixel differences between the original block to be coded and the predicted block. For further compression, the residual data may be transformed from the pixel domain to the transform domain, thereby producing residual transform coefficients, which may then be quantized. Summary of the invention
[0006] The present disclosure generally describes various techniques related to improving position dependent intra prediction combination (PDPC). Generally, PDPC involves generating an intra prediction block and an inter prediction block for a current block, and then generating a prediction block from the combination of the intra prediction block and the inter prediction block. For example, the present disclosure describes a technique for calculating position-independent weights that will be applied to samples of the intra prediction block and the inter prediction block during the combination process, such as based on the number of neighboring blocks of the inter or intra prediction.
[0007] In one example, a method for decoding video data includes: forming an inter-frame prediction block of a current luminance block of the 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 decoding; determining whether a second neighboring block of the current luminance block is intra-frame prediction decoding; determining a first weight and a second weight based on the determination of whether at least one of the first neighboring block or the second neighboring block is intra-frame prediction decoding; 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 luminance block; and decoding the current luminance block using the prediction block.
[0008] In one example, a device for decoding video data includes: a memory configured to store video data; and one or more processors implemented in a circuit, the one or more processors configured to: form an inter-frame prediction block of a current luminance block of the video data; form an intra-frame prediction block of the current luminance block of the video data; determine whether a first neighboring block of the current luminance block is intra-frame prediction decoded; determine whether a second neighboring block of the current luminance block is intra-frame prediction decoded; determine a first weight and a second weight based on a determination of whether at least one of the first neighboring block or the second neighboring block is intra-frame prediction 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 of the current luminance block; and decode the current luminance block using the prediction block.
[0009] In one example, a computer-readable storage medium having instructions stored thereon, the instructions, when executed, causing a processor to: form an inter-frame prediction block for a current luminance block of video data; form an intra-frame prediction block for the current luminance block of the video data; determine whether a first neighboring block of the current luminance block is intra-frame prediction decoded; determine whether a second neighboring block of the current luminance block is intra-frame prediction decoded; determine a first weight and a second weight based on the determination of whether at least one of the first neighboring block or the second neighboring block is intra-frame prediction 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 luminance block; and decode the current luminance block using the prediction block.
[0010] In one example, a device for decoding video data includes: a component for forming an inter-frame prediction block of a current luminance block of the video data; a component for forming an intra-frame prediction block of the current luminance block of the video data; a component for determining whether a first neighboring block of the current luminance block is intra-frame prediction decoded; a component for determining whether a second neighboring block of the current luminance block is intra-frame prediction decoded; a component for determining a first weight and a second weight based on a determination of whether at least one of the first neighboring block or the second neighboring block is intra-frame prediction 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 a first weighted inter-frame prediction block and a second weighted intra-frame prediction block to form a prediction block of the current luminance block; and a component for decoding the current luminance block using the prediction block.
[0011] In one example, a method for decoding (encoding or decoding) video data includes: determining a first number of neighboring blocks for intra-frame prediction of a current block; determining a second number of neighboring blocks for inter-frame prediction; determining a first weight value based on the first number and the second number, the first weight value to be applied to intra-frame prediction samples of the intra-frame prediction block of the current block; determining a second weight value based on the first number and the second number, the second weight value to be applied to inter-frame prediction samples of the inter-frame prediction block of the current block; generating a prediction block of the current block, the prediction block being a weighted combination of the intra-frame prediction block to which the first weight value is applied and the inter-frame prediction block to which the second weight value is applied; and decoding the current block using the prediction block.
[0012] In another example, a device for decoding (encoding or decoding) video data includes a memory configured to store video data; and one or more processors implemented in a circuit and configured to: determine a first number of neighboring blocks for intra-frame prediction of a current block of the video data; determine a second number of neighboring blocks for inter-frame prediction; determine a first weight value based on the first number and the second number, the first weight value to be applied to intra-frame prediction samples of the intra-frame prediction block of the current block; determine a second weight value based on the first number and the second number, the second weight value to be applied to inter-frame prediction samples of the inter-frame prediction block of the current block; generate a prediction block for the current block as a weighted combination of the intra-frame prediction block to which the first weight value is applied and the inter-frame prediction block to which the second weight value is applied; and decode the current block using the prediction block.
[0013] In another example, a computer-readable storage medium stores thereon instructions that, when executed, cause a processor to: determine a first number of neighboring blocks for intra-frame prediction of a current block; determine a second number of neighboring blocks for inter-frame prediction; determine a first weight value based on the first number and the second number, the first weight value to be applied to intra-frame prediction samples of the intra-frame prediction block of the current block; determine a second weight value based on the first number and the second number, the second weight value to be applied to inter-frame prediction samples of the inter-frame prediction block of the current block; generate a prediction block for the current block as a weighted combination of the intra-frame prediction block to which the first weight value is applied and the inter-frame prediction block to which the second weight value is applied; and decode (encode or decode) the current block using the prediction block.
[0014] In another example, an apparatus for decoding (encoding or decoding) video data includes: a component for determining a first number of neighboring blocks for intra-frame prediction of a current block; a component for determining a second number of neighboring blocks for inter-frame prediction; a component for determining a first weight value based on the first number and the second number, the first weight value to be applied to intra-frame prediction samples of the intra-frame prediction block of the current block; a component for determining a second weight value based on the first number and the second number, the second weight value to be applied to inter-frame prediction samples of the inter-frame prediction block of the current block; a component for generating a prediction block of the current block as a weighted combination of the intra-frame prediction blocks to which the first weight value is applied and the inter-frame prediction blocks to which the second weight value is applied; and a component for decoding the current block using the prediction block.
[0015] 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
[0016] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform one or more techniques described in this disclosure.
[0017] Figure 2 is a diagram showing an example of DC mode position dependent prediction combination (PDPC) weights for (0, 0) and (1, 0) positions within a 4×4 block.
[0018] Figure 3 is a diagram showing example intra prediction modes.
[0019] Figure 4A-4D is a diagram showing various PDPC definitions.
[0020] Figure 5 is a diagram showing example intra prediction modes.
[0021] Figure 6 is a block diagram showing an example of an 8×4 rectangular block.
[0022] Figure 7A-7C is a block diagram illustrating an example mode mapping process for modes outside of a diagonal direction range.
[0023] Figure 8 This is a conceptual diagram showing the wide angle adopted in VTM2.
[0024] Fig. 9 This is a conceptual diagram showing the wider angle adopted in VTM3.
[0025] Fig.10 is a conceptual diagram showing prediction of triangular motion compensation.
[0026] Fig.11 is a conceptual diagram illustrating the adaptive weighting process.
[0027] Fig.12 2 is a conceptual diagram showing an example of position-dependent weights of an 8×8 block.
[0028] Fig.13A and Fig. 13B is a conceptual diagram showing an example of a combination of two samples.
[0029] Figures 14A-14D is a conceptual diagram showing how the left reference sample point may vary with certain neighborhoods of the sample point.
[0030] Fig.15A and Fig. 15B is a conceptual diagram illustrating an example of weight calculation according to aspects of the present disclosure.
[0031] Fig.16 is a block diagram illustrating an example video encoder that may implement one or more techniques described in this disclosure.
[0032] Fig.17 is a block diagram illustrating an example video decoder that may implement one or more techniques described in this disclosure.
[0033] Fig.18 is a flowchart illustrating an example method of encoding video data according to the techniques of this disclosure.
[0034] Fig.19 is a flow chart illustrating an example method of decoding video data according to the techniques of this disclosure. DETAILED DESCRIPTION
[0035] A video decoder (e.g., a video encoder or a video decoder) may use intra prediction to generate a prediction block for a current block of a current picture. Typically, when using intra prediction to generate a prediction block, the video decoder determines a set of reference samples in columns to the left of the current block in the current picture and / or in rows above the current block in the current picture. The video decoder may then use the reference samples to determine the values of the samples in the prediction block.
[0036] In high-efficiency video coding (HEVC) and other video coding standards, the video decoder performs intra-frame reference smoothing, also known as mode-dependent intra smoothing (MDIS). When a video decoder performs intra-frame reference smoothing or MDIS, the video decoder applies a filter to the reference samples before using the reference samples to determine the predicted values of the samples in the prediction block. For example, the video decoder may apply a 2-tap linear filter or a 3-tap (1,2,1) / 4 filter to the reference samples. In the filter descriptions above, " / 4" indicates normalization by dividing the result by 4. In general, performing intra-frame reference smoothing improves prediction accuracy, especially when the current block represents a smoothly changing gradient.
[0037] Although MDIS can improve prediction accuracy in many cases, there are other cases where using unfiltered reference samples may help. Position-dependent prediction combining (PDPC) is a scheme designed to address these problems and improve intra-frame prediction. In the PDPC scheme, the video decoder determines the value of the prediction block samples based on the filtered reference samples, the unfiltered reference samples, and the position of the prediction block samples within the prediction block. The use of the PDPC scheme can be associated with decoding efficiency gains. For example, the same amount of video data can be decoded using fewer bits.
[0038] Block-based intra prediction is part of video standards such as AVC, HEVC, VVC (currently under development). Typically, a line of reference samples from a neighboring reconstructed block is used to predict samples within the current block. One or more lines of samples can be used for prediction. Typical intra prediction modes such as DC, planar, and angular / directional modes use reference samples.
[0039] PDPC was proposed in ITU-T SG16 / Q6 document COM16-C1046, "Position-Dependent Intra Prediction Combination (PDPC)", and was further simplified in "EE1-related: Simplification and Extension of PDPC", (8th JVET Meeting, Macau, October 2018, JVET-H0057, by X. Zhao, V. Seregin, A. Said, and M. Karczewicz). In the "Description of Qualcomm's Proposed SDR, HDR and 360° Video Coding Techniques" submitted to the JVET Call for Proposals (10th JVET Meeting, San Diego, CA, USA, April 2018, JVET-J0021, by M. Karczewicz et al.), PDPC is applied to planar, DC, horizontal and vertical modes without signaling as outlined below. In “Extension of Simplified PDPC for Diagonal Intra Modes” (10th JVET Conference, San Diego, CA, USA, April 2018, JVET-J0069, by G. Vander Auwera, V. Seregin, A. Said, M. Karczewicz), PDPC is further extended to diagonal directional modes and modes adjacent to diagonal directional modes.
[0040] The present disclosure describes techniques and system configurations that can address the following potential issues. First, a potential issue is that PDPC is applied before the intra-inter blending step, which may have an adverse effect on decoding efficiency and implementation complexity. Second, in the case of triangular motion compensated prediction, the two triangular prediction units are only applied to the motion compensated or inter-predicted CU. Mixing of one intra and one inter triangular prediction unit is not supported. In this case, there is ambiguity on how to apply PDPC with blending. Third, before intra-inter blending, MDIS filtering can be applied to the reference samples of intra prediction, which may have an adverse effect on decoding efficiency and implementation complexity. The details of one or more aspects of the present disclosure are set forth in the accompanying drawings and the following description. Other features, objects, and advantages of the techniques described in the present disclosure will be apparent from the specification, drawings, and claims.
[0041] 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 decoding (encoding and / or decoding) video data. Generally, video data includes any data used to process video. Therefore, video data can include original undecoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata such as signaling data.
[0042] 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 the video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may be any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, handheld phones such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication, and thus may be referred to as wireless communication devices.
[0043] exist Figure 1 In the example of , source device 102 includes video source 104, memory 106, video encoder 200 and output interface 108. Destination device 116 includes input interface 122, video decoder 300, memory 120 and display device 118. According to the present disclosure, video decoder 200 of source device 102 and video decoder 300 of destination device 116 can be configured to apply technology to cross-component prediction. Therefore, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, 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 be connected to an external display device instead of including an integrated display device.
[0044] like Figure 1 The system 100 shown is only an example. In general, any digital video encoding and / or decoding device can perform techniques for cross-component prediction. The source device 102 and the destination device 116 are only examples of such decoding devices, wherein the source device 102 generates decoded video data for transmission to the destination device 116. The present disclosure refers to a "decoding" device as a device that performs decoding (encoding and / or encoding) of data. Therefore, the video encoder 200 and the video decoder 300 represent examples of decoding devices, specifically, examples of video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 can operate in a substantially symmetrical manner, so that each of the source device 102 and the destination device 116 includes a video encoding and decoding component. Therefore, the system 100 can support one-way or two-way video transmission between the video source device 102 and the destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.
[0045] Typically, the video source 104 represents the source of video data (i.e., the original undecoded video data), and provides a series of sequential pictures (also referred to as "frames") of the video data 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 another alternative, the video source 104 may generate computer graphics-based data as the source video, or a combination of real-time video, archived video, and computer-generated video. In each case, the video encoder 200 encodes the captured, pre-captured, or computer-generated video data. The video encoder 200 may rearrange the images from the received order (sometimes referred to as "display order") to a decoding order for decoding. The video encoder 200 may generate a bitstream including the encoded video data. Source device 102 may then output the encoded video data onto computer-readable medium 110 via output interface 108 for receipt and / or retrieval by, for example, input interface 122 of destination device 116 .
[0046] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memories. In some examples, the memories 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 memories 106, 120 can store software instructions that can be executed by, for example, the video encoder 200 and the video decoder 300. Although the memory 106 and the memory 120 are 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 to achieve functionally similar or equivalent purposes. In addition, the memories 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 memories 106, 120 can be allocated as one or more video buffers, for example, to store original decoded and / or encoded video data.
[0047] 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 medium or device for enabling the source device 102 to transmit the encoded video data directly to the destination device 116 in real time, such as 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 the transmission signal including the encoded video data, and the input interface 122 may demodulate the received transmission signal. The communication medium may include one or both of a 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.
[0048] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access the encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0049] In some examples, the source device 102 may output the encoded video data to the file server 114 or may output to another intermediate storage device storing the encoded video generated by the source device 102. The destination device 116 may access the stored video data from the file server 114 via a streaming or downloading program. The file server 114 may be any type of server device capable of storing the encoded video data and sending the encoded video data to the destination device 116. The 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. The destination device 116 may access the encoded video data from the 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 the two, which is suitable for accessing the encoded video data stored on the server 114. The file server 114 and the input interface 122 may be configured to operate according to a streaming transmission protocol, a download transmission protocol, or a combination thereof.
[0050] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired network components (e.g., Ethernet cards), wireless communication components that operate according to any of 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) in accordance with a wireless 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) in accordance with other wireless standards (e.g., IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee TM ), Bluetooth TM Standards, etc. In some examples, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include an SoC device to perform functions attributed to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device to perform functions attributed to video decoder 300 and / or input interface 122.
[0051] The technology disclosed herein can be applied to video decoding that supports any of a variety of multimedia applications (e.g., over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission, dynamic adaptive streaming media such as over HTTP (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications).
[0052] The input interface 122 of the destination device 116 receives an encoded video bitstream from the computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The encoded video bitstream of the computer-readable medium 110 may include signaling information defined by the video encoder 200 (e.g., syntax elements with values describing characteristics and / or processing of video blocks or other decoding units (e.g., slices, pictures, groups of pictures, sequences, etc.) and the signaling information is also used by the video decoder 300. The display device 118 displays the 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 (OLED) display, or another type of display device.
[0053] Despite Figure 1200 and 300 may each be integrated with an audio encoder and / or an audio decoder and may include appropriate MUX-DEMUX units, or other hardware and / or software, to handle multiplexed streams of both audio and video included in a common data stream. If applicable, the MUX-DEMUX units may conform to the ITU H.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).
[0054] 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 (e.g., processing circuits), such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, fixed function circuits, programmable processing circuits, hardware, firmware, hardware implementing software, or any combination thereof. When the technology is partially implemented in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the technology of the present disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, any of which may 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 may include an integrated circuit, a microprocessor, and / or a wireless communication device (e.g., a cellular phone).
[0055] The video encoder 200 and the video decoder 300 may operate in accordance with a video coding standard such as ITU-T H.265 (also known as High Efficiency Video Coding (HEVC)), or an extension thereof such as multi-view and / or scalable video coding extensions. Alternatively, the video encoder 200 and the video decoder 300 may operate in accordance with other proprietary or industry standards such as the Joint Exploration Test Model (JEM) or VVC. However, the techniques of the present disclosure are not limited to any particular coding standard.
[0056] Typically, the video encoder 200 and the video decoder 300 can perform block-based picture decoding. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Typically, the video encoder 200 and the video decoder 300 can decode video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and the video decoder 300 can decode luminance and chrominance components instead of decoding red, green, and blue (RGB) data of samples of a picture, where the chrominance components may include red hue and blue chrominance components. 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.
[0057] The present disclosure may generally refer to the decoding (e.g., encoding and decoding) of a picture to include the process of encoding or decoding the data of the picture. Similarly, the present disclosure may refer to the decoding of a block of a picture to include the process of encoding or decoding the data of the block (e.g., prediction and / or residual decoding). The encoded video bitstream generally includes a series of values for syntax elements that represent decoding decisions (e.g., decoding modes) and the partitioning of the picture into blocks. Therefore, references to decoding a picture or a block should generally be understood as decoding the values of the syntax elements that form the picture or block.
[0058] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video decoder (e.g., video encoder 200) partitions a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video encoder 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 decoder may further partition the PU and TU. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of a TU. In HEVC, a PU represents inter-frame prediction data, and a TU represents residual data. An intra-predicted CU includes intra-frame prediction information (e.g., an intra-frame mode indication).
[0059] 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 decoder (e.g., the video encoder 200) partitions a picture into a plurality of coding tree units (CTUs). The video encoder 200 may partition the CTU according to a tree structure, such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure removes the concept of multiple partition types, such as the separation between CU, PU, and TU of HEVC. The QTBT structure includes two 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 coding units (CUs).
[0060] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also known as ternary tree (TT)) partitioning. Triple or ternary tree partitioning is a partitioning that partitions a block into three sub-blocks. In some examples, triple or ternary tree partitioning is a partitioning that divides a block into three sub-blocks. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0061] 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).
[0062] The video encoder 200 and the video decoder 300 may be configured to use quadtree segmentation, QTBT segmentation, MTT segmentation, or other segmentation structures per HEVC. For purposes of explanation, 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 decoder configured to use quadtree segmentation or other types of segmentation.
[0063] Blocks (e.g., CTUs or CUs) may be grouped in a picture in various ways. As an example, a tile may refer to a rectangular area of a CTU row within a particular tile in a picture. A tile may be a rectangular area of a CTU within a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular area of a CTU having a height equal to the picture height and a width specified by a syntax element (e.g., such as in a picture parameter set). A tile row refers to a rectangular area of a CTU having a height specified by a syntax element (e.g., such as in a picture parameter set) and a width equal to the picture width.
[0064] In some examples, a slice may be partitioned into multiple bricks, each of which may include one or more CTU rows within the slice. A slice that is not partitioned into multiple bricks may also be referred to as a brick. However, a brick that is a true subset of a slice may not be referred to as a slice.
[0065] The tiles in a picture can also be arranged in slices. A slice can be an integer number of tiles of a picture that can be exclusively contained in a single network abstraction layer (NAL) unit. In some examples, a slice includes a continuous sequence of multiple complete slices or just complete tiles of a slice.
[0066] This 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 terms of vertical and horizontal dimensions, for example, 16×16 samples or 16 by 16 samples. Typically, a 16x16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Likewise, 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. Furthermore, 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.
[0067] The video encoder 200 encodes the video data of the CU for representing prediction and / or residual information and other information. The prediction information indicates how the CU will be predicted to form a prediction block of the CU. The residual information generally indicates the sample-by-sample difference between the sample of the CU before encoding and the prediction block.
[0068] In order to predict a CU, the video encoder 200 may generally form a prediction block of the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU based on data of a previously decoded picture, while intra-frame prediction generally refers to predicting a CU based on previously decoded data of the same image. 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 generally perform a 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.
[0069] 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).
[0070] 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 67 intra prediction modes, including various directional modes as well as planar modes and DC modes. Typically, the video encoder 200 selects an intra prediction mode that describes neighboring samples to a current block (e.g., a block of a CU) from which samples of the current block are predicted. Assuming that the video encoder 200 decodes CTUs and CUs in a raster scan order (from left to right, from top to bottom), such samples may typically be above, above left, or to the left of the current block in the same picture as the current block.
[0071] The video encoder 200 encodes data representing the prediction mode of the current block. For example, for inter-frame prediction mode, the video encoder 200 may encode data indicating which of various available inter-frame prediction modes is used and 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 of the affine motion compensation mode.
[0072] In some examples, for example, according to the techniques of this disclosure, the video encoder 200 and the video decoder 300 may perform position-dependent intra prediction combining (PDPC). That is, the video encoder 200 and the video decoder 300 may generate a prediction block for the current block using a combination of both an intra prediction block and an inter prediction block for the current block. In some examples, the video encoder 200 and the video decoder 300 may generate a prediction block as a weighted combination of samples of an intra prediction block and an inter prediction block.
[0073] The video encoder 200 and the video decoder 300 may determine the weights to be applied to the intra-prediction block and the inter-prediction block on a position-independent basis (e.g., based on the number of adjacent intra-frame and inter-frame prediction blocks of the current block). For example, the video encoder 200 and the video decoder 300 may determine whether one or both of the upper neighboring block and the left neighboring block of the current block are intra-predicted or inter-predicted. When both the upper neighboring block and the left neighboring block are intra-predicted, the video encoder 200 and the video decoder 300 may determine that the weight to be applied to the intra-prediction block is greater than the inter-prediction block, a weight of 3 will be applied to the intra-prediction block and a weight of 1 will be applied to the inter-prediction block. When both the upper neighboring block and the left neighboring block are inter-prediction, the video encoder 200 and the video decoder 300 may determine that the weight to be applied to the inter-prediction block is greater than the intra-prediction block, a weight of 3 will be applied to the inter-prediction block and a weight of 1 will be applied to the intra-prediction block. When one of the upper neighboring block and the left neighboring block is intra-predicted and the other of the upper neighboring block and the left neighboring block is inter-predicted, the video encoder 200 and the video decoder 300 may determine that equal weights are applied to the inter-prediction block and the intra-prediction block, for example, a weight of 2 is used for each of the inter-prediction block and the intra-prediction block.
[0074] After determining the weights, the video encoder 200 and the video decoder 300 may generate a prediction block by applying the weights to the corresponding samples of the intra prediction block and the inter prediction block. The weights may be position-independent. Therefore, the video encoder 200 and the video decoder 300 may apply the weights for the intra prediction block to each sample of the intra prediction block, and apply the weights for the inter prediction block to each sample of the inter prediction block. The video encoder 200 and the video decoder 300 may add the weighted samples of the intra prediction block and the inter prediction block on a sample-by-sample basis. In addition, the video encoder 200 and the video decoder 300 may divide the result value by the sum of the weights. In some examples, instead of performing a division operation, the video encoder 200 and the video decoder 300 may ensure that the sum of the weights is a multiple of 2, and then perform a bitwise right shift operation based on the sum of the weights. For example, for a sum of weights equal to four, the video encoder 200 and the video decoder 300 may perform a 2-bit right shift.
[0075] After a prediction, such as intra prediction or inter prediction of a block, the video encoder 200 may calculate residual data for the block. The residual data (e.g., a residual block) represents the sample-by-sample difference between the block and a prediction block of the block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to produce transformed data in a transform domain rather than a sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 may apply a secondary transform (e.g., a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc.) after a primary transform. The video encoder 200 produces transform coefficients after the application of one or more transforms.
[0076] As described above, after any transforms that produce transform coefficients, the video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to the process of quantizing transform coefficients to possibly reduce the amount of data used to represent the coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 may reduce the bit depth associated with some or all coefficients. For example, the video encoder 200 may round 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 may perform a bitwise right shift of the value to be quantized.
[0077] After quantization, the video encoder 200 may scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place coefficients of higher energy (and therefore lower frequency) at the front of the vector and transform coefficients of lower energy (and therefore higher frequency) at the back of the vector. In some examples, the video encoder 200 may 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 may perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 may entropy encode the one-dimensional vector (e.g., according to context adaptive binary arithmetic coding (CABAC)). The video encoder 200 may also entropy encode the value of a syntax element that describes metadata associated with the encoded video data for use by the video decoder 300 when decoding the video data.
[0078] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be transmitted. The context may relate to, for example, whether neighboring values of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.
[0079] The video encoder 200 may also generate syntax data such as block-based syntax data, picture-based syntax data, and sequence-based syntax data (e.g., 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 similarly decode such syntax data to determine how to decode the corresponding video data.
[0080] In this way, the video encoder 200 can generate a bitstream including encoded video data (e.g., 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.
[0081] In general, the video decoder 300 performs a reciprocal process to that performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may use CABAC to decode the values of syntax elements of the bitstream using CABAC in a manner substantially similar to (although in reverse of) the CABAC encoding process of the video encoder 200. The syntax elements may define partitioning information of a picture into CTUs, and each CTU may be partitioned 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.
[0082] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to regenerate a residual block of 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 regenerate the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.
[0083] The present disclosure may generally refer to "signaling" certain information (e.g., 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 described above, the source device 102 may transmit the bitstream to the destination device 116 in substantially real time, or may transmit the bitstream to the destination device 116 in non-real time, such as may occur when storing syntax elements to the storage device 112 for later retrieval by the destination device 116.
[0084] According to various aspects of PDPC, the prediction sample pred(x,y) at (x,y) is predicted using the intra prediction mode (DC, planar, angular) and its value is modified using the PDPC expression for a single reference sample line, for example, as shown below:
[0085] pred(x,y)=(wL×R -1,y +wT×R x,-1 –wTL×R -1,-1 +(64–wL–wT+wTL)×pred(x,y)+32)>>6, (Formula 1)
[0086] Where R x,-1 , R -1,y Respectively represent the reference sample points located at the top and left of the current sample point (x, y), R -1,-1 Indicates the reference sample located at the upper left corner of the current block. For DC mode, for blocks with dimensions width and height, the weights are calculated as follows:
[0087] wT=32>>((y<<1)>>shift), wL=32>>((x<<1)>>shift), wTL=(wL>>4)+(wT>>4),
[0088] Where shift = (log2(width) + log2(height) + 2) >> 2 when wTL = 0 for planar mode, wTL = wT for horizontal mode, and wTL = wL for vertical mode. PDPC weights can only be calculated by addition and shift. The value of pred(x, y) can be calculated in a single step using Formula 1.
[0089] Figure 2 is a diagram showing an example of DC mode PDPC weights (wL, wT, wTL) for the (0,0) and (1,0) positions within a 4x4 block. If PDPC is applied to DC, planar, horizontal, and vertical intra modes, no additional boundary filters (e.g., DC mode boundary filters or horizontal / vertical mode edge filters) are applied. Equation 1 can be generalized to include additional reference sample lines. In this case, multiple reference samples are added to R x,-1 , R -1,y , R -1,-1 are available in a neighborhood of , and each reference sample may have an assigned weight, which may be optimized (eg, through training).
[0090] U.S. Provisional Patent Application No. 62 / 651,424 (filed on April 2, 2018, the entire contents of which are incorporated herein by reference) extends PDPC to diagonal intra modes and angular modes adjacent to the diagonal modes. The expected diagonal intra modes are modes predicted based on the lower left direction and the upper right direction, and several adjacent angular modes (e.g., N adjacent modes between the lower left diagonal mode and the vertical mode, and N or M adjacent modes between the upper right diagonal mode and the horizontal mode).
[0091] Figure 3 is a diagram illustrating the identification of angle patterns. In general, adjacent patterns may be a selected subset of available angle patterns. The spacing between angle patterns may be uneven, and some angle patterns may be skipped.
[0092] Figure 4A-4D is a diagram illustrating various PDPC definitions. Figure 4A The reference sample point R used to extend the PDPC to the upper right diagonal pattern is shown. x,-1 , R -1,y and R -1,-1 The prediction sample pred(x',y') is located at (x',y') in the prediction block. The reference sample R x,-1 The coordinate x of is given by: x = x' + y' + 1, with reference to the sample point R -1,y The coordinate y of is similarly given by: y = x' + y' + 1. For example, the PDPC weight for the upper right diagonal pattern is:
[0093] wT=16>>((y'<<1)>>shift), wL=16>>((x'<<1)>>shift), wTL=0.
[0094] Similarly, Figure 4B The reference sample point R used to extend the PDPC to the lower left diagonal pattern is shown. x,-1 , R -1,y and R -1,-1 The definition of reference point R x,-1 The coordinate x of is given by: x = x' + y' + 1, with reference to the sample point R -1,y The coordinate y of is given by: y = x' + y' + 1. The PDPC weight of the upper right diagonal pattern is, for example:
[0095] wT=16>>((y'<<1)>>shift), wL=16>>((x'<<1)>>shift), wTL=0.
[0096] exist Figure 4C The case of the adjacent upper right diagonal pattern is shown in FIG. Figure 3The angle α defined in the reference point R -1,y The coordinate y of is determined as follows: y = y' + tan (α) × (x' + 1), and R x,-1 The coordinate x of is given by: x = x' + cotan(α) × (y' + 1), where tan(α) and cotan(α) are the tangent and cotangent of the angle α, respectively. For example, the PDPC weight of the adjacent upper right diagonal pattern is:
[0097] wT=32>>((y'<<1)>>shift), wL=32>>((x'<<1)>>shift), wTL=0, or
[0098] wT=32>>((y'<<1)>>shift), wL=0, wTL=0.
[0099] Similarly, in Figure 4D The case of the adjacent lower left diagonal pattern is shown in FIG. Figure 3 The angle β defined in the reference point R x,-1 The coordinate x of is determined as follows: x = x' + tan (β) × (y' + 1), R -1,y The coordinate y of is given by: y = y' + cotan(β) × (x' + 1), where tan(β) and cotan(β) are the tangent and cotangent of the angle β, respectively. For example, the PDPC weight of the adjacent lower left diagonal pattern is:
[0100] wL=32>>((x'<<1)>>shift), wT=32>>((y'<<1)>>shift), wTL=0, or
[0101] wL=32>>((x'<<1)>>shift), wT=0, wTL=0.
[0102] As in the case of DC, planar, horizontal, and vertical mode PDPC, there is no additional boundary filtering (such as specified in "Algorithmic Description of Joint Exploration Test Model 7" (7th JVET Conference, Turin, Italy, July 2017, JVET-G1001, authors J. Chen, E. Alshina, GJ Sullivan, J.-R. Ohm, and J. Boyce)).
[0103] Figure 5FIG. is a diagram showing example intra prediction modes. An example of intra prediction is wide-angle intra prediction. In some examples, intra prediction of a luminance block includes 35 modes, including a planar prediction mode, a DC prediction mode, and 33 angular (or direction) prediction modes. Direction prediction of a square block uses the direction between -135 degrees and 45 degrees of the current block in the Versatile Video Coding Test Model 2 (VTM2) (see "Algorithm Description of Versatile Video Coding and Test Model 2 (VTM2)", 11th JVET Conference, Ljubljana, SI, July 2018, JVET-K1002, authors J. Chen, Y. Ye, and S. Kim), as Figure 5 shown. The 35 modes of intra prediction are indexed as shown in Table 1 below.
[0104] Table 1 - Description of Intra Prediction Modes and Associated Names
[0105] Intra prediction mode Associated name 0 INTRA_PLANAR 1 INTRA_DC 2..34 INTRA_ANGULAR2..INTRA_ANGULAR34
[0106] In VTM2, the block structure for specifying the prediction block used for intra prediction is not limited to a square (width w = height h). Based on content characteristics, rectangular prediction blocks (w > h or w < h) can improve the decoding efficiency.
[0107] In such a rectangular block, restricting the direction for intra prediction within -135 degrees to 45 degrees may result in the situation of using farther reference samples instead of closer reference samples for intra prediction. Such a design may affect the decoding efficiency. Relaxing the restricted range may be more beneficial so as to use closer reference samples (beyond the -135 to 45 degree angle) for prediction. In Figure 6 an example of such a situation is given.
[0108] Figure 6 FIG. is a block diagram showing an example of an 8x4 rectangular block. In Figure 6 the example of, since the intra prediction direction is restricted within the range of -135 degrees to 45 degrees, the "closer" reference samples (indicated by circle 3002) are not used, but the "farther" reference samples (indicated by circle 3006) can be used. That is, in Figure 6 the example of, some reference samples within -135 degrees but farther than the reference samples indicated by circle 3002 can be used, while some reference samples are not used even though they are closer than other samples (e.g., closer than the samples indicated by circle 3006).
[0109] Figure 7A-7C FIG. is a block diagram showing an example pattern mapping process for modes outside the diagonal direction range. In Fig. 7AIn the example above, the square blocks do not require angular mode remapping. Figure 7B The example shows angular mode remapping for horizontal non-square blocks. Figure 7C Angular mode remapping for vertical non-square blocks is shown.
[0110] Figure 8 This is a conceptual diagram showing the wide angle adopted in VTM2. During the 12th JVET conference, VVC Test Model 3 (VTM3) adopted modifications to intra prediction for wide angles, for details, see (i) “CE3-related: Unification of angular intra prediction for square and non-square blocks”, 12th JVET conference, Macau SAR, CN, October 2018, JVET-L0279, by L. Zhao, X. Zhao, S. Liu, and X. Li; (ii) “Algorithmic Description of Versatile Video Coding and Test Model 3 (VTM3)”, 12th JVET conference, Macau SAR, CN, October 2018, JVET-L1002, by J. Chen, Y. Ye, and S. Kim; and (iii) “Versatile Video Coding (Draft 3)”, 12th JVET conference, Macau SAR, CN, October 2018, JVET-L1001, by B. Bross, J. Chen, and S. Liu.
[0111] This adoption includes two modifications to unify angular intra prediction for square and non-square blocks. First, the angular prediction directions are modified to cover the diagonal directions for all block shapes. Second, as shown in FIG7 and described above, all angular directions are kept in the range between the bottom left diagonal direction and the top right diagonal direction for all block aspect ratios (square and non-square). In addition, the number of reference samples in the top reference row and left reference column is restricted to 2*width+1 and 2*height+1 for all block shapes. Figure 8 In the example of , in addition to the 65 angle mode, wide angles (-1 to -10, and 67 to 76) are also depicted.
[0112] Fig. 9 is a conceptual diagram showing the wider angle adopted in VTM3. Although VTM3 defines 95 modes, only 67 modes are allowed for any block size. The exact modes allowed depend on the ratio of block width to block height. This is done by limiting the range of modes for certain block sizes. Fig. 9 A graph is provided for the wide angles (-1 to -14, and 67 to 80) in VTM3 beyond modes 2 and 66 for a total of 93 angle modes.
[0113] Table 2 below specifies the mapping table between predModeIntra and the angle parameter intraPredAngle in VTM3, and more details can be found in "Versatile Video Decoding (Draft 3)", 12th JVET Conference, Macau SAR, CN, October 2018, JVET-L1001, author B. Bross, J. Chen, and S. Liu.
[0114] predModeIntra -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 intraPredAngle 512 341 256 171 128 102 86 73 64 57 predModeIntra -4 -3 -2 -1 2 3 4 5 6 7 intraPredAngle 51 45 39 35 32 29 26 23 20 18 predModeIntra 8 9 10 11 12 13 14 15 16 17 intraPredAngle 16 14 12 10 8 6 4 3 2 1 predModeIntra 18 19 20 21 22 23 24 25 26 27 intraPredAngle 0 -1 -2 -3 -4 -6 -8 -10 -12 -14 predModeIntra 28 29 30 31 32 33 34 35 36 37 intraPredAngle -16 -18 -20 -23 -26 -29 -32 -29 -26 -23 predModeIntra 38 39 40 41 42 43 44 45 46 47 intraPredAngle -20 -18 -16 -14 -12 -10 -8 -6 -4 -3 predModeIntra 48 49 50 51 52 53 54 55 56 57 intraPredAngle -2 -1 0 1 2 3 4 6 8 10 predModeIntra 58 59 60 61 62 63 64 65 66 67 intraPredAngle 12 14 16 18 20 23 26 29 32 35 predModeIntra 68 69 70 71 72 73 74 75 76 77 intraPredAngle 39 45 51 57 64 73 86 102 128 171 predModeIntra 78 79 80 intraPredAngle 256 341 512
[0115] Table 2
[0116] Based on intraPredAngle, the inverse angle parameter invAngle is derived as follows:
[0117]
[0118] Note that, as is the case in the VTM3 specification, intraPredAngle values that are multiples of 32 (i.e., values of 0, 32, 64, 128, 256, 512 in this example) always correspond to predictions from non-fractional reference array samples. Table 3 below shows the diagonal patterns corresponding to various block aspect ratios.
[0119] Table 3: Diagonal patterns corresponding to various block aspect ratios
[0120] Block aspect ratio (W / H) Diagonal mode 1(square) 2,34,66 2 8,28,72 4 12,24,76 8 14,22,78 16 16,20,80 1 / 2 -6,40,60 1 / 4 -10,44,56 1 / 8 -12,46,54 1 / 16 -14,48,52
[0121] MDIS and reference sample interpolation are described in the following sections of this disclosure. In HEVC, adjacent reference samples may be filtered using a 2-tap linear or 3-tap (1,2,1) / 4 filter before intra prediction. This process is called intra reference smoothing or mode-dependent intra smoothing (MDIS). In MDIS, given an intra prediction mode index predModeIntra and a block size nTbS, it is determined whether to perform a reference smoothing process and which smoothing filter to use if so. The following text is the relevant paragraph from the HEVC specification:
[0122] "8.4.4.2.3 Filtering process of adjacent samples
[0123] The inputs to this process are:
[0124] – adjacent samples p[x][y], where x = -1, y = -1..nTbS*2–1 and x = 0..nTbS*2–1, y = -1,
[0125] –Variable nTbS, specifies the size of the transform block.
[0126] The output of this process is the filtered samples pF[x][y], where x=-1, y=-1..nTbS*2-1 and x=0..nTbS*2-1, y=-1.
[0127] The derivation of the variable filterFlag is as follows:
[0128] – Set filterFlag equal to 0 if one or more of the following conditions are true:
[0129] –predModeIntra is equal to INTRA_DC.
[0130] –nTbS is equal to 4.
[0131] – Otherwise, the following applies:
[0132] – The variable minDistVerHor is set equal to Min(Abs(predModeIntra-26),Abs(predModeIntra-10)).
[0133] – The variable intraHorVerDistThres[nTbS] is specified in Table 8-3.
[0134] –The derivation of the variable filterFlag is as follows:
[0135] – If minDistVerHor is greater than intraHorVerDistThres[nTbS], set filterFlag equal to 1.
[0136] – Otherwise, set filterFlag equal to 0.
[0137] Table 8-3 — Specification of intraHorVerDistThres[nTbS] for various transform block sizes
[0138]
[0139] When filterFlag is equal to 1, the following conditions apply:
[0140] –The derivation of the variable biIntFlag is as follows:
[0141] – Set biIntFlag equal to 1 if all of the following conditions are true:
[0142] –strong_intra_smoothing_enabled_flag equals 1
[0143] –nTbS is equal to 32
[0144] –Abs(p[-1][-1]+p[nTbS*2-1][-1]–2*p[nTbS-1][-1])<(1<<(BitDepthY-5))
[0145] –Abs(p[-1][-1]+p[-1][nTbS*2-1]–2*p[-1][nTbS-1])<(1<<(BitDepthY-5))
[0146] – Otherwise, set biIntFlag equal to 0.
[0147] – The filtering is performed as follows:
[0148] – If biIntFlag is equal to 1, the filtered sample value pF[x][y] is derived as follows, where x = -1, y = -1..63 and x = 0..63, y = -1:
[0149] pF[-1][-1]=p[-1][-1] (8-30)
[0150] pF[-1][y]=((63-y)*p[-1][-1]+(y+1)*p[-1]
[63] +32)>>6,
[0151] For y = 0..62 (8-31)
[0152] pF[-1]
[63] =p[-1]
[63] (8-32)
[0153] pF[x][-1]=((63-x)*p[-1][-1]+(x+1)*p
[63] [-1]+32)>>6,
[0154] For x = 0..62 (8-33)
[0155] pF
[63] [-1]=p
[63] [-1] (8-34)
[0156] – Otherwise (biIntFlag is equal to 0), the filtered sample value pF[x][y] is derived as follows, where x = -1, y = -1..nTbS*2–1 and x = 0..nTbS*2-1, y = -1:
[0157] pF[-1][-1]=(p[-1][0]+2*p[-1][-1]+p[0][-1]+2)>>2 (8-35)
[0159] pF[-1][y]=p[-1][y+1]+2*p[-1][y]+p[-1][y-1]+2)>>2,
[0160] For y = 0..nTbS*2-2 (8-36)
[0161] pF[-1][nTbS*2-1]=p[-1][nTbS*2-1] (8-37)
[0162] pF[x][-1]=p[x-1][-1]+2*p[x][-1]+p[x+1][-1]+2)>>2
[0163] For x = 0..nTbS*2-2 (8-38)
[0164] pF[nTbS*2-1][-1]=p[nTbS*2-1][-1] (8-39)
[0165] During the JVET activity, the Joint Exploration Test Model (JEM) version 7 was defined (more details are available from “Algorithmic Description of the Joint Exploration Test Model 7” (7th JVET Conference, Torino, Italy, July 2017, JVET-G1001, by J. Chen, E. Alshina, G. J. Sullivan, J.-R. Ohm, and J. Boyc)) and included the following version of the MDIS table for the luma block:
[0166] sizeIndex Threshold [sizeIndex] 0 20 1 20 2 14 3 2 4 0 5 20 6 0
[0167] Table 4
[0168] The block size index is defined in JEM7 as follows:
[0169] sizeIndex=(log2(BlockWidth)–2+log2(BlockHeight)–2) / 2+2–1
[0170] Whether to apply a [1 2 1] / 4 smoothing filter to intra reference samples is determined as follows:
[0171] IntraModeDiff=min(abs(IntraModeIdx-HOR_IDX),abs(IntraModeIdx–VER_IDX))
[0172] In the case of HOR_IDX=18 and VER_IDX=50, because JEM7 has 65 directional intra modes (IntraModeIdx 2-66) in addition to planar (IntraModeIdx=0) and DC (IntraModeIdx=1) modes, the following conditions determine whether to apply the smoothing filter:
[0173] If IntraModeDiff > Threshold[sizeIndex], then Apply Smoothing Filter
[0174] In the Joint Video Experts Team (JVET) and its VVC Test Model Version 3 (VTM3) ("Versatile Video Coding (Draft 3)", 12th JVET Meeting, Macau SAR, CN, October 2018, JVET-L1001, authors B. Bross, J. Chen, and S. Liu), the following MDIS table is included:
[0175] sizeIndex Threshold [sizeIndex] 0 20 1 20 2 20 3 14 4 2 5 0 6 0 7 0
[0176] Table 5
[0177] The block size index is defined in VTM3 as follows:
[0178] sizeIndex=(log2(BlockWidth)+log2(BlockHeight)) / 2
[0179] Whether to apply a [1 2 1] / 4 smoothing filter to non-fractional intra reference samples or to switch an interpolation filter between smoothing (e.g., Gaussian interpolation) and non-smoothing (e.g., cubic interpolation) for fractional reference sample locations is determined as follows (see also U.S. Provisional Patent Application Nos. 62 / 731,723, filed September 14, 2018, 62 / 727,341, filed September 5, 2018, and 62 / 693,266, filed July 2, 2018, the entire contents of each of which are incorporated herein by reference, and “Versatile Video Decoding (Draft 3)”, 12th JVET Conference, Macau SAR, CN, October 2018, JVET-L1001, by B. Bross, J. Chen, and S. Liu):
[0180] IntraModeDiff=min(abs(IntraModeIdx-HOR_IDX), abs(IntraModeIdx–VER_IDX))
[0181] Where HOR_IDX=18 and VER_IDX=50 and the condition is:
[0182] If IntraModeDiff > Threshold[sizeIndex], then Apply Smoothing
[0183] In VTM3, the intra smoothing condition is set to true for wide angle modes with index <2 or >66. The reason is that in the case of wide angle intra prediction, two vertically adjacent prediction samples can use two non-adjacent reference samples.
[0184] In "CE10.1.1: Multi-hypothesis prediction for improved AMVP mode, skip or merge mode, and intra mode", 12th JVET Conference, Macau SAR, CN, October 2018, JVET-L0100, by M.-S. Chiang, C.-W. Hsu, Y.-W. Huang, and S.-M. Lei", aspects of intra-inter prediction hybridization are discussed. The following text (enclosed in quotation marks) provides an overview of intra-inter prediction hybridization:
[0185] "Multiple hypothesis prediction is proposed to improve AMVP mode, skip or merge mode, and intra mode. Multi-hypothesis prediction is proposed to improve existing prediction modes in inter pictures, including Advanced Motion Vector Prediction (AMVP) mode, skip and merge modes, and unidirectional prediction for intra mode. The general concept is to combine existing prediction modes with an additional merge-indexed prediction. The merge-indexed prediction is performed as in merge mode, where the merge-index is signaled to obtain motion information for motion compensated prediction. The final prediction is a weighted average of the merge-indexed prediction and the prediction generated by the existing prediction modes, where different weights are applied depending on the combination.
[0186] Three inter-frame combined prediction modes were tested to combine the prediction of merge index with unidirectional prediction of AMVP mode, merge mode and intra-frame mode respectively. When combined with unidirectional prediction of AMVP mode, one motion is obtained using the original syntax elements in AMVP mode and the other is obtained using merge index, where a total of two hypotheses are used. When combined with merge mode, implicit selection of subsequent merge candidates is used to obtain additional motion information without signaling any additional merge index, where at most two more hypotheses are used. When combined with intra-frame mode, explicit signaling of intra-frame mode for merge mode in the inter-frame decoding unit (CU) is applied to generate the combined prediction, where one more hypothesis from the intra-frame mode is used. Different weights for producing the final prediction based on the combination are also tested.
[0187] When multi-hypothesis prediction is applied to improve intra mode, multi-hypothesis prediction combines an intra prediction and a prediction of a merge index. In the merged CU, a flag is signaled for the merge mode (when the flag is true) to select the intra mode from the intra candidate list. For the luma component, the intra candidate list is derived from 4 intra prediction modes (including DC, planar, horizontal and vertical modes), and the size of the intra candidate list can be 3 or 4, depending on the block shape. When the CU width is greater than twice the CU height, the horizontal mode is not included in the intra mode list; when the CU height is greater than twice the CU width, the vertical mode is deleted from the intra mode list. A weighted average is used to combine the prediction of one intra prediction mode selected by the intra mode index and one merge index selected by the merge index. For chroma components, DM is always applied without additional signaling. The weights of the combined prediction are described as follows. When DC or planar mode is selected or the width or height of the CB is less than 4, equal weights are applied. For those CBs with a CB width and height greater than or equal to 4, when horizontal / vertical mode is selected, a CB is first divided vertically / horizontally into four regions of equal area. Each weight set (denoted as (w_intra i ,w_inter i ), where i is from 1 to 4 and (w_intra1,w_inter1)=(6,2), (w_intra2,w_inter2)=(5,3), (w_intra3,w_inter3)=(3,5) and (w_intra4,w_inter4)=(2,6)) will be applied to the corresponding area. (w_intra1,w_inter1) is used for the area closest to the reference sample, while (w_intra4,w_inter4) is used for the area farthest from the reference sample. The combined prediction is then calculated by adding the two weighted predictions and shifting right by 3 bits. In addition, the intra prediction mode for the intra hypothesis of the predictor can be saved for reference by the following neighboring CU. "
[0188] Fig.10 is a conceptual diagram showing triangular motion compensated prediction. Aspects of triangular motion compensated prediction are described in "CE10.3.1.b: Triangular Prediction Unit Mode", 12th JVT Meeting, Macau SAR, CN, October 2018, JVET-L0124, by R.-L. Liao and C.S. Lim. References Fig.10 , the following text (enclosed in quotation marks) provides an overview of prediction for triangular motion compensation.
[0189] "In triangle prediction unit mode, a CU can be partitioned in diagonal or counter-diagonal directions using two triangle prediction units. Each triangle prediction unit in a CU has its own unidirectional prediction motion vector and reference frame index, which are derived from the unidirectional prediction candidate list. Triangle partitioning is only applied to motion compensated prediction, which means that the transform and quantization process is applied to the entire CU formed by combining two triangles together. Triangle prediction unit mode is only applied to CUs with block size greater than or equal to 8×8, and its decoding prediction mode is skip mode or merge mode. If Fig.10 As shown, it splits the CU into two triangular prediction units along a diagonal or counter-diagonal direction.
[0190] Fig.11 is a conceptual diagram showing the adaptive weighting process. "CE10.3.1.b: Triangular Prediction Unit Mode", 12th JVET Conference, Macau SAR, CN, October 2018, JVET-L0124, by R.-L. Liao and C.S. Lim" also describes various aspects of the adaptive weighting process. The text below (in quotes), and references Fig.11 , provides an overview of the adaptive weighting process:
[0191] "After predicting each triangle prediction unit, an adaptive weighting process is applied to the diagonal edges between two triangle prediction units to derive the final prediction for the entire CU. Two groups of weighting factors are listed as follows:
[0192] The first weighting factor group: {7 / 8, 6 / 8, 4 / 8, 2 / 8, 1 / 8} and {7 / 8, 4 / 8, 1 / 8} are used for luma and chroma samples respectively;
[0193] The second weighting factor group: {7 / 8, 6 / 8, 5 / 8, 4 / 8, 3 / 8, 2 / 8, 1 / 8} and {6 / 8, 4 / 8, 2 / 8} are used for luma and chroma samples respectively.
[0194] A weighting factor set is selected based on the comparison of the motion vectors of the two triangle prediction units. When the reference pictures of the two triangle prediction units are different from each other or the difference of their motion vectors is greater than 16 pixels, the second weighting factor set is used. Otherwise, the first weighting factor set is used. Fig.11 An example is shown in
[0195] Each of the above techniques has one or more potential challenges / problems. For example, using an intra prediction mode (DC, planar, angular) to predict a prediction sample intraPred(x,y) at (x,y), and using the PDPC expression to modify its value to a single reference sample line to obtain intraPredPDPC(x,y) prediction sample as follows:
[0196] intraPredPDPC(x,y)=(wL×R -1,y +wT×R x,-1 –wTL×R -1,-1 +(64–wL–wT+wTL)×intraPred(x,y)+32)>>6
[0197] Where R x,-1 , R -1,y Respectively represent the reference sample points located at the top and left of the current sample point (x, y), and R -1,-1 represents the reference sample located at the upper left corner of the current block. Intra-inter prediction mixes this prediction sample intraPredPDPC(x,y) with the merge mode prediction interPred(x,y), for example, by performing a simple average as follows:
[0198] intraInterPred(x,y)=(intraPredPDPC(x,y)+interPred(x,y)+1)>>1
[0199] A potential problem is that PDPC is applied before the intra-inter mixing step, which may adversely affect the decoding efficiency and implementation complexity.
[0200] Second, in the case of triangular motion compensated prediction, two triangular prediction units are only applied to motion compensated or inter predicted CUs. Blending one intra and one inter triangular prediction unit is not supported. In this case, there is ambiguity on how to apply PDPC with blending.
[0201] Thirdly, before intra-inter mixing, MDIS filtering may be applied to the reference samples for intra prediction, which may adversely affect the coding efficiency and implementation complexity.
[0202] The present disclosure describes various techniques for solving one or more of the potential problems listed above. In various examples, the techniques described below can alleviate one or more potential problems, while in other examples, these techniques can eliminate one or more potential problems. The techniques of the present disclosure can be implemented individually, or in some examples, various combinations of techniques can be implemented simultaneously or in any serial order.
[0203] According to some examples according to the present disclosure, the video encoder 200 and / or the video decoder 300 may predict the intra block samples intraPredPDPC(x, y) by using the intra mode together with PDPC, and the inter prediction block samples interPred(x, y) may be mixed together by one of the following example intra-inter prediction mixing processes:
[0204] a. Perform averaging:
[0205] intraInterPred(x,y)=(intraPredPDPC(x,y)+interPred(x,y)+1)>>1
[0206] b. Use position-independent weight parameter wB for weighting, for example, if wB value range is 0…32:
[0207] intraInterPred(x,y)=(wB×intraPredPDPC(x,y)+(32–wB)×interPred(x,y)+16)>>5
[0208] c. Use position-dependent weight parameter wB (x,y) For example, if wB (x,y) The value range of is 0…32:
[0209] intraInterPred(x,y)=(wB(x,y)×intraPredPDPC(x,y)+(32–wB(x,y))×interPred(x,y)+16)>>5
[0210] d. The video encoder 200 and / or the video decoder 300 may make the weights dependent on the intra mode, for example, for planar, DC, directional or wide angle directional modes, different position-independent weights or position-dependent weights may be applied.
[0211] e. The video encoder 200 and / or the video decoder 300 may make the weights dependent on inter-mode or motion data.
[0212] f. The video encoder 200 and / or the video decoder 300 may make the weights dependent on block dimensions (width, height), block area, block shape (square, rectangular, triangular, etc.).
[0213] g. The video encoder 200 and / or the video decoder 300 may make the weights dependent on neighboring block data (such as the intra or inter mode of the neighboring blocks).
[0214] h. The video encoder 200 and / or the video decoder 300 can completely or partially disable intra-frame-frame inter prediction mixing by applying weights so that each block or each block sample selects only one of the intra-frame or inter-frame modes. For example, in this way, the prediction unit within the current block can be defined in various shapes (e.g., a triangular unit).
[0215] i. The video encoder 200 and / or the video decoder 300 may enable or disable intra-frame-inter prediction mixing based on a flag or value coded in the bitstream (parameter set, picture header, slice header, slice header, etc.) or based on conditions depending on block dimension, block area, block shape, prediction mode.
[0216] j. The video encoder 200 and / or the video decoder 300 may use the planar mode as the intra mode.
[0217] According to some examples according to the present disclosure, the video encoder 200 and / or the video decoder 300 may predict the intra-frame block samples intraPred(x, y) by using the intra-frame mode (i.e., without using PDPC). In these examples, the video encoder 200 and / or the video decoder 300 may mix the inter-frame prediction block samples interPred(x, y) together by one of the following example intra-frame inter-frame prediction mixing processes:
[0218] a. Perform averaging:
[0219] intraInterPred(x,y)=(intraPred(x,y)+interPred(x,y)+1)>>1
[0220] b. Use position-independent weight parameter wB for weighting, for example, if wB value range is 0...32:
[0221] intraInterPred(x,y)=(wB×intraPred(x,y)+(32–wB)×interPred(x,y)+16)>>5
[0222] c. Use position-dependent weight parameter wB(x,y) for weighting. For example, if the value range of wB(x,y) is 0…32:
[0223] intraInterPred(x,y)=(wB(x,y)×intraPred(x,y)+(32–wB(x,y))×interPred(x,y)+16)>>5
[0224] d. The video encoder 200 and / or the video decoder 300 may make the weights dependent on the intra mode, for example, for planar, DC, directional or wide angle directional modes, different position-independent weights or position-dependent weights may be applied.
[0225] e. The video encoder 200 and / or the video decoder 300 may make the weights dependent on inter-mode or motion data.
[0226] f. The video encoder 200 and / or the video decoder 300 may make the weights dependent on the dimensions of the block (width, height), the area of the block, the shape of the block (square, rectangular, triangular, etc.).
[0227] g. The video encoder 200 and / or the video decoder 300 may make the weights dependent on neighboring block data (such as the intra or inter mode of the neighboring blocks).
[0228] h. The video encoder 200 and / or the video decoder 300 can completely or partially disable intra-frame-frame inter prediction mixing by applying weights so that each block or each block sample selects only one of the intra-frame or inter-frame modes. For example, in this way, the prediction unit within the current block can be defined in various shapes (e.g., a triangular unit).
[0229] i. The video encoder 200 and / or the video decoder 300 may enable or disable intra-frame-inter prediction mixing based on a flag or value coded in the bitstream (parameter set, picture header, slice header, slice header, etc.) or based on conditions depending on block dimension, block area, block shape, prediction mode.
[0230] j. The video encoder 200 and / or the video decoder 300 may use the planar mode as the intra mode.
[0231] According to some examples according to the present disclosure, the video encoder 200 and / or the video decoder 300 may predict the intra block sample intraPred(x,y) by using the intra mode (i.e., without using PDPC or using PDPC). In these examples, the video encoder 200 and / or the video decoder 300 may blend the inter prediction block sample interPred(x,y) with the adjacent reconstructed reference samples from one or more lines on the left or top of the current block by one of the following example intra-inter prediction blending processes:
[0232] a. Average intraPred(x,y) and interPred(x,y) and blend this average with neighboring reconstructed reference samples by applying weights:
[0233] intraInterPred(x,y)=(wL×R -1,y +wT×Rx,-1 –wTL×R -1,-1 +(64–wL–wT+wTL)×((intrapred(x,y)+interpred(x,y)+1)>>1)+32)>>6
[0234] Or use the following single rounding operation:
[0235] intraInterPred(x,y)=(2×wL×R -1,y +2×wT×R x,-1 –2×wTL×R -1,-1 +(64–wL–wT+wTL)×(intrapred(x,y)+interpred(x,y))+64)>>7
[0236] Where R x,-1 , R -1,y Respectively represent the reference sample points located at the top and left of the current sample point (x, y), and R -1,-1 Indicates the reference sample located at the upper left corner of the current block.
[0237] i. The weights wL, wT, wTL can be position independent.
[0238] ii. The weights wL, wT, wTL may be position dependent and may be calculated or stored in a table or template.
[0239] iii. The weights wL, wT, wTL may be position-independent and depend on the intra mode or inter mode (or motion data) or both of the prediction block or neighboring blocks in the blending process.
[0240] iv. The weights wL, wT, wTL may be position-dependent and depend on the intra-mode, for example, PDPC weights may be applied corresponding to the intra-mode, such as DC mode weights:
[0241] wT=32>>((y<<1)>>shift), wL=32>>((x<<1)>>shift), wTL=(wL>>4)+(wT>>4),
[0242] where shift = (log2(width)+log2(height)+2)>>2
[0243] v. The weights wL, wT, wTL may be position-dependent and depend on the intra-mode, for example, PDPC weights may be applied corresponding to the intra-mode, such as planar mode weights:
[0244] wT=32>>((y<<1)>>shift), wL=32>>((x<<1)>>shift), wTL=0,
[0245] where shift = (log2(width)+log2(height)+2)>>2
[0246] vi. The weights wL, wT, wTL may be position-dependent and depend on the inter-mode or motion data (eg, motion vector direction).
[0247] b. Weight intraPred(x,y) and interPred(x,y) using a position-independent weight wB, and blend this weighted average with the adjacent reconstructed reference samples by applying the weight:
[0248] intraInterPred(x,y)=(wL×R -1,y +wT×R x,-1 –wTL×R -1,-1 +(64–wL–wT+wTL)×((wB×intrapred(x,y)+(32–wB)×interpred(x,y)+16)>>5)+32)>>6
[0249] Or use the following single rounding operation:
[0250] intraInterPred(x,y)=(32×wL×R -1,y +32×wT×R x,-1 –32×wTL×R -1,-1 +(64–wL–wT+wTL)×(wB×intrapred(x,y)+(32–wB)×interpred(x,y))+(1<<10))>>11
[0251] c. Weight intraPred(x,y) and interPred(x,y) using position-dependent weights wB(x,y) and blend this weighted average with the neighboring reconstructed reference samples by applying the weights:
[0252] intraInterPred(x,y)=(wL×R -1,y +wT×R x,-1 –wTL×R -1,-1 +(64–wL–wT+wTL)×((wB(x,y)×intrapred(x,y)+(32–wB(x,y))×interPred(x,y)+16)>>5)+32)>>6
[0253] Or use the following single rounding operation:
[0254] intraInterPred(x,y)=(32×wL×R -1,y +32×wT×R x,-1 –32×wTL×R -1,-1 +(64–wL–wT+wTL)×(wB(x,y)×intrapred(x,y)+(32–wB(x,y))×interPred(x,y))+(1<<10))>>11
[0255] i) In one example, where intraPred(x,y) is equal to planar prediction mode, position-dependent weighting uses PDPC-style weights as follows:
[0256] wB(x,y)=32+(32>>((x<<1)>>shift))+(32>>((y<<1)>>shift)),
[0257] intraInterPred(x,y)=(128×wL×R -1,y +128×wT×R x,-1 +(64–wL–wT)×(wB(x,y)×intrapred(x,y)+(128–wB(x,y))×interPred(x,y))+(1<<12))>>13
[0258] Among them, wT=32>>((y<<1)>>shift), wL=32>>((x<<1)>>shift), wTL=0,
[0259] shift=(log2(width)+log2(height)+2)>>2
[0260] or
[0261] wT=16>>((y<<1)>>shift), wL=16>>((x<<1)>>shift), wTL=0,
[0262] intraInterPred(x,y)=(128×wL×R -1,y +128×wT×R x,-1 +(32–wL–wT)×(wB(x,y)×intrapred(x,y)+(128–wB(x,y))×interPred(x,y))+(1<<11))>>12
[0263] ii) In one example, the weights of neighboring samples, intra-frame prediction samples, and inter-frame prediction samples are position-dependent. An example of this implementation is as follows:
[0264] wT=16>>((y<<1)>>shift), wL=16>>((x<<1)>>shift)
[0265] w=wT+wL
[0266] wIntra=32+w
[0267] wInter=96-w
[0268] intraInterPred(x,y)=(128×wL×R -1,y +128×wT×R x,-1 +(32–wL–wT)×(wIntra×intrapred(x,y)+wInter×interPred(x,y))+(1<<11))>>12
[0269] Fig.12 is a conceptual diagram showing an example of position-dependent weights of an 8x8 block.
[0270] iii) In another example,
[0271] wB(x,y)=64+MAX((32>>((x<<1)>>shift)),(32>>((y<<1)>>shift)))
[0272] or
[0273] wB(x,y)=64+MIN((32>>((x<<1)>>shift)),(32>>((y<<1)>>shift)))
[0274] MIN(a,b) and MAX(a,b) are the minimum and maximum values of a and b respectively.
[0275] iv) To further reduce the rounding operation, the planar pattern PL(x,y) can be further deconstructed into two parts, the horizontal interpolation part H(x,y) and the vertical interpolation part V(x,y), for example as follows: PL(x,y) = (H(x,y) + V(x,y) + 1) / 2, and the blending operation can be defined as follows:
[0276] intraInterPred(x,y)=(64×wL×R-1,y+64×wT×Rx,-1–64×wTL×R -1,-1+(128–wL–wT+wTL)×(wB(x,y)×(H(x,y)+V(x,y))+(32–wB(x,y))×interPred(x,y))+(1<<11))>>12
[0277] a. The weights may depend on the intra mode, e.g. for planar, DC, directional or wide angle directional modes, different position-independent or position-dependent weights may be applied.
[0278] b. The weights can depend on inter-mode or motion data.
[0279] c. The weights may depend on the block dimensions (width, height), the area of the block, the shape of the block (square, rectangular, triangular, etc.).
[0280] d. The weights may depend on neighboring block data (such as intra-frame or inter-frame modes of neighboring blocks). That is, the video encoder 200 and / or the video decoder 300 may determine the weights in such a manner that the calculation of the weights depends on neighboring block data (such as intra-frame or inter-frame modes of neighboring blocks).
[0281] e. By applying weights, intra-inter prediction mixing can be fully or partially disabled so that each block or each block sample selects only one of intra or inter mode. For example, in this way, the prediction unit within the current block can be defined in various shapes (such as triangular units).
[0282] f. Intra-inter prediction mixing can be enabled or disabled based on a flag or value decoded in the bitstream (parameter set, picture header, slice header, slice header, etc.) or based on conditions depending on block dimension, block area, block shape, prediction mode.
[0283] g. The neighboring reconstructed reference samples may be filtered using a smoothing filter, bilateral filter, etc. An MDIS condition that depends on the intra mode and block size may be applied to determine whether to use unfiltered or filtered reference samples, or a condition may be applied based on inter mode, motion data, intra mode, block dimension, block area, block shape, etc. This information may be obtained from neighboring blocks, the current block, or a co-located block.
[0284] h. The intra mode may be a planar mode. That is, the video encoder 200 and / or the video decoder 300 may use the planar mode as the intra mode.
[0285] According to some examples of the present disclosure, the video encoder 200 and / or the video decoder 300 may determine the intra-frame mode from all intra-frame modes or from a group of selected intra-frame modes (e.g., plane, DC, horizontal, vertical), or may only allow a single intra-frame mode (e.g., plane mode). The allowed intra-frame mode may depend on the mode of the neighboring blocks.
[0286] According to some examples of the present disclosure, the video encoder 200 and / or the video decoder 300 may determine the inter-frame mode from all inter-frame modes or from a group of selected inter-frame modes (e.g., skip, merge), or may only allow a single inter-frame mode (e.g., merge). The allowed inter-frame mode may depend on the mode of the neighboring block or the co-located block.
[0287] According to some examples of the present disclosure, intra-inter mixing can use more than two predictions (e.g., two inter predictions and one intra prediction). According to some of these examples, adjacent reconstruction reference samples from one or more lines on the left or top of the current block can be used.
[0288] According to some examples of the present disclosure, when a triangle prediction block is used to decode a block, a PDPC-like combination may be applied to one or more triangle prediction blocks. The PDPC-like combination may involve combining a temporary prediction sample value (obtained by a prediction method) with one or more adjacent reference samples. In some cases, the combination may use different weights for each item in the combination. In some such cases, the weight may depend on the position of the current sample relative to the current triangle block or the current block. Various implementations of these examples are listed below:
[0289] a. In some examples, the reference samples may also refer to samples of a triangle prediction block belonging to the current block.
[0290] b. In one example, wL, wT, wTL, and wR are defined for the left, top, top-left, and right reference points, respectively. The PDPC-like combination of a point s(x,y) at position (x,y) can be defined as follows: pred(x,y) = (wL×R x1(x),y1(x) +wT×R x2(x),y2(x) +wR×R x3(x),y3(x) –wTL×R -1,-1 +(64–wL–wT–wR+wTL)×s(x,y)+32)>>6
[0291] where (xN(x), yN(x)) specify the sample point locations of the left, top, and right reference samples, respectively, for the PDPC-like combination of sample point s(x, y).
[0292] Fig.13A and Fig. 13B is a conceptual diagram showing an example of a combination of two sample points. Fig.13A and Fig. 13BIn , the example 8x8 block is divided into two triangular partitions. The weights can be defined similar to the weights defined for PDPC, which are based on the distance from the sample point s(x,y) and the shift operation. The weights can also depend on the mode used for prediction.
[0293] Fig.13A It is shown how to apply a PDPC-like combination to a sample S using reference samples T, L, R, and TL. For different positions of sample S, the reference sample changes. S is the current sample, and L, R, T, and TL are the left, right, top, and top-left reference samples of S, respectively. In one example, the weights are defined so that the weights are non-zero only for some samples within a certain distance (e.g., two or three sample values) of the diagonal lines that create two triangle partitions. In another example, the position of one or more reference samples may be a function of the row index corresponding to the sample; in another example, the position of one or more reference samples may be a function of the column index corresponding to the sample.
[0294] Figures 14A-14D is a conceptual diagram showing how the reference sample on the left varies with certain neighborhoods of the sample. Specifically, Figures 14A-14D An example of how the reference sample point varies with the position of the sample point S is shown. Figure 14B-Figure 14D An example is shown where arrows indicate how the sample and reference sample move relative to the sample. Figure 14B-Figure 14D The arrows in the Fig.14A The displacement of the sample point. Figures 14A-14D In , S is the current sample, and L, R, T, and TL are the left, right, top, and top-left reference samples of S, respectively. Fig. 14B In , T, S, and R move to the right. Fig. 14C In , T moves to the right and L, S, and R move down and to the right. Fig.14D , T moves right by two, L moves down and right by two, and S and R move down and right by two.
[0295] In some examples, a partition of the current block (e.g., the first triangle block in the current block) may not apply PDPC-like combining. In other examples, for a partition (e.g., the first partition), the weight associated with one or more of the reference samples may be set equal to 0. Fig.12 In the middle block (b), when the left triangular partition is reconstructed first, the weights associated with the right reference samples may be set equal to 0.
[0296] c) In one example, a PDPC-like combination may be applied to an intra-coded block, an inter-coded block, or an intra-inter prediction hybrid block. In other examples, a PDPC-like combination may be applied to an intra-coded or inter-coded block; then another combination (e.g., using PDPC) may be used to mix one or more such combined blocks.
[0297] d) In one example, the application of PDPC to one or more triangle prediction blocks may be controlled by an indicator that is signaled by the video encoder 200 to the video decoder 300 in the bitstream (e.g., a flag specifying that PDPC is to be applied to triangle prediction blocks) or inferred / derived by the decoder (e.g., by the video decoder 300) based on the block size, the mode used for prediction, or other characteristics of the current or neighboring blocks.
[0298] Fig.15A and Fig. 15B is a conceptual diagram illustrating an example of weight calculation according to aspects of the present disclosure. According to some examples of the present disclosure, the video encoder 200 and the video decoder 300 may use intra-frame mode (e.g., without using PDPC or using PDPC) to predict intra-frame block samples intraPred(x,y), and may mix inter-frame prediction block samples interPred(x,y) together using position-independent weights for intra-frame and inter-frame prediction samples. For example, the video encoder 200 and / or the video decoder 300 may mix intra-frame block samples predicted using intra-frame mode together using position-independent weights for intra-frame and inter-frame prediction samples. Let wIntra and wInter be the weights of intraPred(x,y) and interPred(x,y), respectively. wIntra and wInter may be defined as follows:
[0299] a. Determine wIntra and wInter using the number of intra-coded neighbors of the current block. For example, the weights can be determined based on Fig.15A In other words, the video encoder 200 and the video decoder 300 may determine the weights based on the block above the current block that touches the upper left corner of the current block (“top”) and the block to the left of the current block that touches the upper left corner of the current block (“left”). In another example, the video encoder 200 and the video decoder 300 may use the following example: Fig. 15B. That is, the video encoder 200 and the video decoder 300 may determine the weights based on the block above the current block that touches the upper right corner of the current block ("top-r") and the block to the left of the current block that touches the lower left corner of the current block ("left-b"). In some examples, if both reference blocks are intra-coded, the video encoder 200 and the video decoder 300 determine a value for wIntra that is greater than wInter. If only one of the reference blocks is intra-coded, the video encoder 200 and the video decoder 300 may determine equal values for wIntra and wInter. Otherwise, if both reference blocks are inter-predicted, the video encoder 200 and the video decoder 300 may determine a value for wIntra that is less than wInter. In one example, if both reference blocks are intra-coded, the video encoder 200 and the video decoder 300 set (wIntra, wInter) equal to (3, 1); if one of the reference blocks is intra-coded and the other is inter-coded, the video encoder 200 and the video decoder 300 may set the weights equal to (2, 2); otherwise, if both reference blocks are inter-coded, the video encoder 200 and the video decoder 300 may set the weights equal to (1, 3).
[0300] b. In some examples, video encoder 200 and video decoder 300 may use the size of the current block to calculate wIntra and wInter.
[0301] In one example, given wIntra and wInter as follows:
[0302] wInter=min(log2(width),log2(height)).
[0303] wIntra=log2(MAX_BLOCK_SIZE)–wInter
[0304] Where MAX_BLOCK_SIZE is the maximum size allowed for a block.
[0305] In another example, given wIntra and wInter as follows:
[0306] wInter=(min(log2(width),log2(height))>>1)<<1.
[0307] wIntra=log2(MAX_BLOCK_SIZE)–wInter
[0308] In another example, the weights are calculated as:
[0309] wInter=log2(width+height)–1.
[0310] wIntra=log2(MAX_BLOCK_SIZE)–wInter
[0311] Using position-independent weights, the video encoder 200 and / or the video decoder 300 may perform the mixing process according to the following formula:
[0312] pred(x,y)=(wIntra*intraPred(x,y)+wInter*interPred(x,y)+offset) / (wIntra+wInter)
[0313] In order to avoid division during the mixing process, (wIntra+wInter) can be designed to be a power of 2, that is, (wIntra+wInter)=2 N .
[0314] In this design, the mixing formula becomes:
[0315] pred(x,y)=(wIntra*intraPred(x,y)+wInter*interPred(x,y)+(1<<(N-
[0316] 1)))>>N
[0317] In one example, a lookup table (LUT) based division may be used to perform the division.
[0318] In another example, the video encoder 200 and / or the video decoder 300 may avoid performing explicit clipping when deriving pred(x,y), and the clipping operation may be combined with the clipping operation of the PDPC as described above.
[0319] According to some examples of the present disclosure, blending may use intra prediction samples, inter prediction samples, and adjacent reconstructed reference samples from one or more lines adjacent to (eg, to the left or top of) the current block.
[0320] a. In one example, the weights of intra and inter prediction samples are position independent (as described above with respect to the example where intra mode is used (e.g., not using PDPC or using
[0321] In the example, the intra block sample intraPred(x,y) may be predicted by using intra mode (i.e., without using PDPC or with PDPC), and the inter prediction block sample interPred(x,y) may be blended together using position-independent weights for intra and inter samples), while the weights for neighboring reconstructed samples may use a position-dependent scheme (as described above with respect to the example, where the intra block sample intraPred(x,y) may be predicted by using intra mode (i.e., without using PDPC or with PDPC), and the inter prediction block sample interPred(x,y) and neighboring reconstructed reference samples from one or more lines on the left or top of the current block may be blended together
[0322] In one example, the mixed sample points are given as:
[0323] pred(x,y)=((wL*L<<2)+(wT*T<<2)+(32-wL-wT)*(wIntra*intraPred(x,y)+wInter*interPred(x,y))+(1<<6))>>7;
[0324] Among them, wT=16>>((y<<1)>>shift), wL=16>>((x<<1)>>shift)
[0325] shift=(log2(width)+log2(height)+2)>>2
[0326] b. In another example, the mixed samples are given as:
[0327] pred(x,y)=((wL*L<<2)+(wT*T<<2)+(64-wL-wT)*(wIntra*intraPred(x,y)+wInter*interPred(x,y))+(1<<7))>>8;
[0328] Among them, wT=32>>((y<<1)>>shift), wL=32>>((x<<1)>>shift)
[0329] shift=(log2(width)+log2(height)+2)>>2
[0330] c. In another example, the weights of the top and left samples and the weights for inter-frame and intra-frame prediction
[0331] The weights of the predictions are position independent. The prediction samples can be given as:
[0332] pred(x,y)=(wL*L+wT*T+W*(wIntra*intraPred(x,y)+wInter*interPred(x,y))+(1<<(N-1)))>>N
[0333] Among them, wL, wT, W, wIntra, and wInter are constants and position-independent.
[0334] An example of mixing can be given as:
[0335] pred(x,y)=(4*L+4*T+6*(wIntra*intraPred(x,y)+wInter*interPred(x,y))+16)>>6
[0336] Wherein, wInter and wIntra are decided / determined as above with respect to the example in which the intra block samples intraPred(x,y) are predicted using an intra mode (e.g., without PDPC or with PDPC), and the inter prediction block samples interPred(x,y) may be mixed together using position-independent weights for intra and inter prediction samples.
[0337] According to some examples of the present disclosure, the weights wInter and wIntra for inter-frame and intra-frame prediction samples may be determined as follows:
[0338] a. The video encoder 200 and / or the video decoder 300 may determine a first subset of neighboring blocks (eg, top and left neighboring blocks).
[0339] b. The video encoder 200 and / or the video decoder 300 may determine a second subset of neighboring blocks (eg, top and left neighboring blocks); the first subset and the second subset may or may not have common blocks.
[0340] c. The video encoder 200 and / or the video decoder 300 may determine a first number of neighboring blocks in the first subset that satisfy a first criterion (eg, the first criterion is a determination that the block is coded using intra mode).
[0341] d. The video encoder 200 and / or the video decoder 300 may determine a second number of neighboring blocks in the second subset that satisfy a second criterion (eg, the second criterion is a determination that the block is coded using an inter-intra hybrid mode).
[0342] e. The video encoder 200 and / or the video decoder 300 may determine weights wInter and wIntra based on the first number and the second number of blocks.
[0343] f. The video encoder 200 and / or the video decoder 300 may determine to use inter-intra mixing to code the current block depending on the second number of neighboring blocks.
[0344] i. In one example, the indication that the current block is decoded using inter-intra mixing (or other parameters related to inter-intra mixing) may depend on the value of the second number; in some examples, the video encoder 200 may make the signaling of the indication (or related parameters) dependent on the value of the second number. When the video encoder 200 does not signal the indication (or related parameters), a default value may be selected. For example, when the value of the second number is 0, the video encoder 200 may not signal the indication, and the video decoder 300 may infer the value to be 0 (indicating that inter-intra mixing is not applied to the current block).
[0345] ii. In another example, the video encoder 200 may determine one or more contexts for signaling an indication of inter-intra mixing or parameters thereof based on the value of the second number.
[0346] g. In one example, the video encoder 200 and / or the video decoder 300 may replace one or more determinations based on the first number (n1) or the second number (n2) or both the first number and the second number using a function of the first number and the second number (e.g., the function may be n1+n2).
[0347] According to some examples of the present disclosure, multiple intra-inter hybrid schemes may be allowed. For example, a subset of the various hybrid schemes described above may be defined. The video encoder 200 may select a hybrid scheme that has / produces the best performance to encode a block. The selection of the best candidate may be performed by different methods. According to the technology of the present disclosure, some solutions for selecting the best candidate are as follows:
[0348] a. The best hybrid mode is obtained through a rate-distortion optimization process. In this solution, all candidates in a predefined hybrid set are evaluated based on the rate-distortion (RD) cost. The mode with the minimum cost is selected and the index of the mode is signaled to the decoder. The video encoder 200 can encode the index using a CABAC engine.
[0349] b. The video encoder 200 and / or the video decoder 300 may select a hybrid scheme based on the coding information of the block or neighboring blocks (coding information such as motion information, coding mode, or reference picture index for inter-frame prediction). In this solution, the video encoder 200 may not need to signal the best hybrid mode. According to this implementation, the derivation of the hybrid mode at the video encoder 200 and the video decoder 300 is the same. In one example, the video encoder 200
[0350] and / or the video decoder 300 may select the best hybrid scheme (e.g., in terms of RD cost)
[0351] As a hybrid scheme to be used at the video encoder 200 and / or the video decoder 300 .
[0352] Fig.16 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Fig.16 is for the purpose of explanation, and Fig.16 This should not be considered limiting of the techniques extensively illustrated and described in this disclosure. For purposes of explanation, this disclosure describes the video encoder 200 in the context of video coding standards such as the HEVC video coding standard, the developing H.266 video coding standard, and VVC. However, the techniques of this disclosure are not limited to these video coding standards and are generally applicable to video encoding and decoding.
[0353] exist Fig.16 In the example of , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any one 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 decoded picture buffer (DPB) 218, and the entropy coding unit 220 may be implemented in one or more processors or in processing circuits. In addition, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions. Non-limiting examples of processing circuits that the video encoder 200 may include may be fixed function circuits, programmable circuits, and ASICs.
[0354] The video data memory 230 may store video data to be encoded by the components of the video encoder 200. The video encoder 200 may receive video data from, for example, the video source 104 ( Figure 1) receives video data stored in video data memory 230. DPB218 can act as a reference picture memory that stores reference video data for use when the video encoder 200 predicts subsequent video data. Video data memory 230 and DPB 218 can be formed by any of a variety of storage devices (e.g., dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM) or other types of storage devices). Video data memory 230 and DPB 218 can be provided by the same storage device or an independent storage device. In various examples, video data memory 230 can be on-chip with other components of video encoder 200, as shown, or off-chip relative to those components.
[0355] 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 limited to memory external to the video encoder 200, unless specifically described as such. Instead, 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 of outputs from the various units of the video encoder 200 .
[0356] Show Fig.16 The various units shown in the figure help to understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide specific functions and are preset on the 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 that causes the programmable circuit to operate 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 units can be different circuit blocks (fixed function or programmable), and in some examples, one or more units can be integrated circuits.
[0357] 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.
[0358] 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.
[0359] 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.
[0360] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of coding parameters and the resulting rate-distortion values for such combinations. The coding parameters may include the partitioning of CTUs into CUs, the prediction mode of the CUs, the transform type of the residual data of the CUs, the quantization parameter of the residual data of the CUs, etc. The mode selection unit 202 may ultimately select a combination of coding parameters that has a better rate-distortion value than other tested combinations.
[0361] The video encoder 200 may partition a picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a slice. The mode selection unit 202 may partition the CTUs of the picture according to a tree structure, such as the QTBT structure or quadtree structure of HEVC described above. As described above, the video encoder 200 may form one or more CUs from the partitioned CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".
[0362] 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 the overlapping portion of the PU and TU in HEVC). For inter-frame prediction of the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate values indicating how similar the potential reference blocks are to the current block (e.g., based on the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD). The motion estimation unit 222 may typically perform these calculations using the sample-by-sample differences between the current block and the reference block under consideration. The motion estimation unit 222 may identify the reference block having the smallest value resulting from these calculations, which indicates the reference block that most closely matches the current block.
[0363] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion 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. In addition, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by corresponding motion vectors, for example, by sample-by-sample averaging or weighted averaging, and combine the retrieved data.
[0364] As another example, for intra prediction or intra prediction decoding, the intra prediction unit 226 may generate a prediction block from samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 may 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 may calculate an average value of the adjacent samples to the current block and generate a prediction block to include the obtained average value for each sample of the prediction block.
[0365] According to the techniques of the present disclosure, the mode selection unit 202 may also enable the intra prediction unit 226, the motion estimation unit 222, and the motion compensation unit 224 to perform PDPC according to the techniques of the present disclosure to generate a prediction block. Specifically, the mode selection unit 202 may select a PDPC for a block of video data (e.g., based on a rate-distortion optimization (RDO) performance of the PDPC for the block of video data). Typically, the intra prediction unit 226 may generate an intra prediction block for the block, and the motion estimation unit 222 and the motion compensation unit 224 may generate an inter prediction block for the block. The mode selection unit 202 may then determine neighboring blocks of the current block (e.g., Fig.15A or 15B neighboring blocks) prediction mode.
[0366] The mode selection unit 202 may then determine the weights to be applied to the intra-frame prediction block and the inter-frame prediction block according to the prediction modes of the neighboring blocks. In one example, if both the upper neighboring block and the left neighboring block are intra-frame prediction, the mode selection unit 202 may determine that the weight to be applied to the intra-frame prediction block is 3 and the weight to be applied to the inter-frame prediction block is 1; if both the upper neighboring block and the left neighboring block are inter-frame prediction, the mode selection unit 202 may determine that the weight to be applied to the inter-frame prediction block is 3 and the weight to be applied to the intra-frame prediction is 1; and if one of the upper neighboring block and the left neighboring block is intra-frame prediction and the other is inter-frame prediction, the mode selection unit 202 may determine that the weight to be applied to the intra-frame prediction block is 2, and the weight to be applied to the inter-frame prediction block is 2.
[0367] The mode selection unit 202 may generate a prediction block using a weighted combination of an intra prediction block and an inter prediction block according to the determined weights. For example, the mode selection unit 202 may apply the intra prediction weights to the samples of the intra prediction block and apply the inter prediction weights to the samples of the inter prediction block (e.g., according to the formula pred(x, y) = (wIntra*intraPred(x, y) + wInter*interPred(x, y) + offset) / (wIntra + wInter)). The mode selection unit 202 may then add the samples of the weighted intra prediction block to the corresponding samples of the weighted inter prediction block and divide the resulting samples by the sum of the weights (e.g., 4). To avoid actually performing a division operation, the mode selection unit 202 may perform a 4-bit right shift on each sample of the block. The resulting block may correspond to the prediction block.
[0368] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original undecoded 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.
[0369] In the example where the mode selection unit 202 partitions the CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As indicated above, the size of the CU may refer to the size of the luma coding 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 2Nx2N, the video encoder 200 may support PU sizes of 2Nx2N or NxN for intra-prediction, and symmetric PU sizes of 2Nx2N, 2NxN, Nx2N, NxN, or the like for inter-prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning, with PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-prediction.
[0370] In an example where mode selection unit 202 does not further partition a CU into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As described above, the size of a CU may refer to the size of the luma coding block of the CU. Video encoder 200 and video decoder 300 may support CU sizes of 2N×2N, 2N×N, or N×2N.
[0371] As a few examples, for other video coding techniques (e.g., intra block copy mode coding, affine mode coding, and linear model (LM) mode coding), the mode selection unit 202 generates a prediction block for the current block being encoded via various units associated with the coding technique. In some examples, such as palette mode coding, the mode selection unit 202 may not generate a prediction block, but instead generate a syntax element indicating how to reconstruct the block based on the selected palette. In such a mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.
[0372] 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.
[0373] 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 may apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 may perform multiple transforms on the residual block, such as a primary transform and a secondary transform (e.g., a rotation transform). In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0374] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may introduce information loss, and therefore, the quantized transform coefficients may have lower precision than the original transform coefficients generated by the transform processing unit 206.
[0375] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although 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 of the prediction block generated by the free mode selection unit 202 to generate a reconstructed block.
[0376] 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 edge of the CU. In some examples, the operations of filter unit 216 may be skipped.
[0377] 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 subsequently encoded blocks. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks of the current picture in the DPB 218 to perform intra-frame prediction on other blocks in the current picture.
[0378] 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 (which are another example of video data) to generate entropy encoded data. For example, the entropy coding unit 220 may perform a context adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable to variable (V2V) length coding operation, a syntax-based context adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an exponential Golomb coding operation, or another entropy coding operation on the data. In some examples, the entropy coding unit 220 may operate in a bypass mode where the syntax elements are not entropy encoded.
[0379] The video encoder 200 may output a bitstream including syntax elements required for entropy coding of a reconstructed block of a slice or picture. Specifically, the entropy coding unit 220 may output a bitstream.
[0380] The above operations are described with respect to blocks. Such description should be understood as operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are the luma and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are the luma and chroma components of a PU.
[0381] In some examples, operations performed for luma coding blocks do not have to be repeated for chroma coding blocks. As an example, operations for identifying motion vectors (MVs) and reference pictures for luma coding blocks do not need to be repeated to identify MVs and reference pictures for chroma blocks. Instead, the MVs for luma coding blocks can be scaled to determine MVs for chroma blocks, and the reference pictures can be the same. As another example, the intra prediction process can be the same for luma coding blocks and chroma coding blocks.
[0382] In this manner, the video encoder 200 represents an example of a device for encoding video data, the device including a memory configured to store video data; and one or more processors implemented in a circuit and configured to: determine a first number of neighboring blocks for intra-frame prediction of a current block of the video data; determine a second number of neighboring blocks for inter-frame prediction; determine a first weight value based on the first number and the second number, the first weight value to be applied to intra-frame prediction samples of the intra-frame prediction block of the current block; determine a second weight value based on the first number and the second number, the second weight value to be applied to inter-frame prediction samples of the inter-frame prediction block of the current block; generate a prediction block for the current block as a weighted combination of the intra-frame prediction blocks to which the first weight value is applied and the inter-frame prediction blocks to which the second weight value is applied; and decode the current block using the prediction block.
[0383] Fig.17 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Fig.17 is for the purpose of explanation, and Fig.17 The techniques extensively illustrated and described in this disclosure are not limited. For purposes of explanation, this disclosure describes a video decoder 300 according to the technical descriptions of VVC and HEVC. However, the techniques of this disclosure may be performed by a video encoding device configured for other video coding standards.
[0384] exist Fig.17In the example of , the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented in one or more processors or in processing circuits. In addition, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions. Non-limiting examples of processing circuits that the video decoder 300 may include are fixed function circuits, programmable circuits, and ASICs.
[0385] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include an addition unit 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.
[0386] CPB memory 320 may store video data (e.g., an encoded video bitstream) to be decoded by components of video decoder 300. For example, the video bitstream may be obtained from computer readable medium 110 ( Figure 1 ) obtains video data stored in the CPB memory 320. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. Moreover, the CPB memory 320 may store video data other than syntax elements of decoded pictures, such as temporary data representing outputs from various units of the self-video decoder 300. The DPB 314 typically stores decoded pictures, which the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed by any of a variety of storage devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM)), or other types of storage devices. The CPB memory 320 and the DPB 314 may be provided by the same storage device or a separate storage 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 those components.
[0387] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) retrieves the encoded video data. That is, the memory 120 may utilize the CPB memory 320 to store the data as described above. Similarly, when some or all of the functions of the video decoder 300 are implemented in software to be executed by the processing circuit of the video decoder 300, the memory 120 may store instructions to be executed by the video decoder 300.
[0388] Show Fig.17 The various units shown in FIG. 1 and FIG. 2 are provided to help understand the operations performed by the video decoder 300. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Fig.16 , fixed-function circuits refer to circuits that provide specific functions and are preset in the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functions in the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate 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 units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.
[0389] 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 the programmable circuit, an on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0390] 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.
[0391] 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 a block currently being reconstructed (ie, decoded) may be referred to as a "current block").
[0392] The entropy decoding unit 302 may entropy decode syntax elements that define quantized transform coefficients of a quantized transform coefficient block, as well as transform information such as a quantization parameter (QP) and / or (multiple) transform mode indications. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a quantization degree, and likewise, determine an inverse quantization degree for application by the inverse quantization unit 306. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0393] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the coefficient block.
[0394] 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 the reference block is retrieved, and a motion vector that identifies the position of the reference block in the reference picture relative to the position of the current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in the same manner as described for motion compensation unit 224 ( Fig.16 ) is performed in a manner substantially similar to that described herein.
[0395] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 may generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra-prediction unit 318 may generally generate a prediction block in the same manner as described with respect to the intra-prediction unit 226 ( Fig.16 The intra prediction unit 318 may retrieve data of neighboring samples of the current block from the DPB 314.
[0396] As another example, if the prediction information syntax element indicates that the current block is predicted using PDPC according to the techniques of the present disclosure, the prediction processing unit 304 can further cause the intra prediction unit 318 and the motion compensation unit 316 to perform PDPC according to the techniques of the present disclosure to generate a prediction block. Typically, the intra prediction unit 318 can generate an intra prediction block for the block, and the motion compensation unit 316 can generate an inter prediction block for the block. The prediction processing unit 304 can then determine a prediction mode for a neighboring block of the current block (e.g., a neighboring block of 15A or 15B).
[0397] The prediction processing unit 304 may then determine the weights to be applied to the intra-frame prediction block and the inter-frame prediction block according to the prediction mode used for the neighboring block. In one example, if both the upper neighboring block and the left neighboring block are intra-frame prediction, the prediction processing unit 304 may determine that the weight to be applied to the intra-frame prediction block is 3 and the weight to be applied to the inter-frame prediction block is 1; if both the upper neighboring block and the left neighboring block are inter-frame prediction, the prediction processing unit 304 may determine that the weight to be applied to the inter-frame prediction block is 3 and the weight to be applied to the intra-frame prediction is 1; and if one of the upper neighboring block and the left neighboring block is intra-frame prediction and the other is inter-frame prediction, the prediction processing unit 304 may determine that the weight to be applied to the intra-frame prediction block is 2 and the weight to be applied to the inter-frame prediction block is 2.
[0398] The prediction processing unit 304 may generate a prediction block using a weighted combination of the intra prediction block and the inter prediction block according to the determined weights. For example, the prediction processing unit 304 may apply the intra prediction weights to the samples of the intra prediction block and the inter prediction weights to the samples of the inter prediction block, for example, according to the formula pred(x, y) = (wIntra*intraPred(x, y) + wInter*interPred(x, y) + offset) / (wIntra + wInter). The prediction processing unit 304 may then add the weighted samples of the intra prediction block to the corresponding samples of the weighted inter prediction block and divide the resulting samples by the sum of the weights (e.g., 4). To avoid actually performing a division operation, the prediction processing unit 304 may perform a 4-bit right shift on each sample of the block. The resulting block may correspond to the prediction block.
[0399] 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.
[0400] 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 need not be performed in all examples.
[0401] The video decoder 300 may store the reconstructed blocks in the DPB 314. As described above, the DPB 314 may provide reference information (e.g., samples of the current picture for intra-frame prediction and previously decoded pictures for subsequent motion compensation) to the prediction processing unit 304. In addition, the video decoder 300 may output the decoded pictures from the DPB for subsequent display on a display device (e.g., Figure 1 is presented on a display device 118).
[0402] In this manner, video decoder 300 represents an example of a device for decoding video data that includes a memory configured to store the video data and one or more processing units implemented in processing circuitry and configured to perform example techniques described in this disclosure.
[0403] For example, the processing circuit may be configured to determine a boundary luminance value. Samples having values less than or equal to the boundary luminance value are classified into a first group, and samples having values greater than the boundary luminance value are classified into a second group. The processing circuit may be configured to determine a first set of prediction samples for a prediction block of samples of the first group based on a first prediction model having first parameters and second parameters, and determine a second set of prediction samples for a prediction block of samples of the second group based on a second prediction model having third parameters and fourth parameters.
[0404] For example, if Rec L '[x,y] < threshold, the first model is α1*Rec L '[x,y]+β1. In this example, the first set of prediction samples of the prediction block are those generated from the first model. The first parameter is α1 and the second parameter is β1. If Rec L '[x,y]>threshold, then the second model is α2*Rec L '[x,y]+β2. In this example, the second set of prediction samples of the prediction block are those generated from the second model. The third parameter is α2 and the fourth parameter is β2.
[0405] The processing circuit may be configured to determine at least one of the first parameter, the second parameter, the third parameter, or the fourth parameter. To determine at least one of the first, second, third, or fourth parameters, the processing circuit may be configured to determine a first luma sample in the first group among the samples of the first group having the maximum luma value, determine a first chroma sample corresponding to the first luma sample; determine a second luma sample in the second group among the samples of the second group having the minimum luma value, determine a second chroma sample corresponding to the second luma sample; and determine at least one of the first parameter, the second parameter, the third parameter, or the fourth parameter based on the first chroma sample and the second chroma sample.
[0406] The processing circuitry may be configured to reconstruct the current block based at least in part on the prediction block and the residual block.
[0407] As an example, the processing circuit may determine the derived chroma value based on the first chroma sample and the second chroma sample. To determine at least one of the first parameter, the second parameter, the third parameter, or the fourth parameter based on the first chroma sample and the second chroma sample, the processing circuit may be configured to determine at least one of the first parameter, the second parameter, the third parameter, or the fourth parameter based on the derived chroma value. For example, the processing circuit may determine an average of the first chroma sample and the second chroma sample to determine the derived chroma value.
[0408] To determine at least one of the first parameter, the second parameter, the third parameter, or the fourth parameter based on the derived chrominance value, the processing circuit may be configured to determine the first parameter (α1) equal to (c-Cy) / (Y1-Yb), determine the second parameter (β1) equal to Cy-α1*Yb, determine the third parameter (α2) equal to (c-Cx) / (Y1-Ya), and determine the fourth parameter (β2) equal to Cx-α2*Ya. In this example, c is equal to the derived chrominance value, Cy is equal to the second chrominance sample, Y1 is equal to the boundary luminance value, Yb is equal to the second luminance sample, Cx is equal to the first chrominance sample, and Ya is equal to the first luminance sample.
[0409] In some examples, the boundary brightness value may be such that the predicted samples at the boundary brightness value using the prediction model may be the same or within a threshold difference. For example, assume that the first predicted sample is equal to the first parameter multiplied by the boundary brightness value plus the second parameter, and the second predicted sample is equal to the third parameter multiplied by the boundary brightness value plus the fourth parameter. In this example, the boundary brightness value is such that the difference (e.g., the absolute value of the difference) between the first predicted sample and the second predicted sample is less than the threshold difference. In some examples, the threshold difference may be approximately equal to 0.
[0410] In this way, the video decoder 300 represents an example of a device for decoding video data, the device including a memory configured to store video data; and one or more processors implemented in a circuit and configured to: determine a first number of neighboring blocks for intra-frame prediction of a current block of the video data; determine a second number of neighboring blocks for inter-frame prediction; determine a first weight value based on the first number and the second number, the first weight value to be applied to the intra-frame prediction samples of the intra-frame prediction block of the current block; determine a second weight value based on the first number and the second number, the second weight value to be applied to the inter-frame prediction samples of the inter-frame prediction block of the current block; generate a prediction block for the current block as a weighted combination of the intra-frame prediction blocks to which the first weight value is applied and the inter-frame prediction blocks to which the second weight value is applied; and decode the current block using the prediction block.
[0411] Fig.18 is a flowchart illustrating an example method of encoding video data according to the techniques of the present disclosure. Although with respect to the video encoder 200 ( Figure 1 and Fig.16 ), but it should be understood that other devices can be configured to perform the same Fig.18 Similar approach.
[0412] In this example, video encoder 200 initially predicts a current block using PDPC according to the techniques of this disclosure. Specifically, video encoder 200 generates an intra-frame prediction block for the current block (350), and then generates an inter-frame prediction block for the current block (352). Video encoder 200 may then determine a prediction mode for neighboring blocks of the current block (354). For example, video encoder 200 may determine an upper neighboring block and a left neighboring block (such as Fig.15A and 15B those shown).
[0413] Then, the video encoder 200 may determine the weights to be applied to the intra-prediction block and the inter-prediction block according to the prediction mode for the neighboring blocks (356). In one example, if both the upper neighboring block and the left neighboring block are intra-predicted, the video encoder 200 may determine that the weight to be applied to the intra-prediction block is 3 and the weight to be applied to the inter-prediction block is 1; if both the upper neighboring block and the left neighboring block are inter-predicted, the video encoder 200 may determine that the weight to be applied to the inter-prediction block is 3 and the weight to be applied to the intra-prediction block is 1; and if one of the upper neighboring block and the left neighboring block is intra-predicted and the other is inter-predicted, the video encoder 200 may determine that the weight to be applied to the intra-prediction block is 2 and the weight to be applied to the inter-prediction block is 2.
[0414] The video encoder 200 may then use the weights to generate a prediction block (358). For example, the video encoder 200 may apply the intra prediction weights to the samples of the intra prediction block and the inter prediction weights to the samples of the inter prediction block, for example, according to the formula pred(x,y)=(wIntra*intraPred(x,y)+wInter*interPred(x,y)+offset) / (wIntra+wInter). The video encoder 200 may then add the weighted samples of the intra prediction block to the corresponding samples of the weighted inter prediction block and divide the resulting samples by the sum of the weights (e.g., 4). To avoid actually performing a division operation, the video encoder 200 may perform a 4-bit right shift on each sample of the block. The resulting block may correspond to the prediction block.
[0415] The video encoder 200 may then calculate a residual block for the current block (360). To calculate the residual block, the video encoder 200 may calculate the difference between the original, uncoded block and the predicted block for the current block. The video encoder 200 may then transform and quantize the coefficients of the residual block (362). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (364). During or after the scan, the video encoder 200 may entropy encode the transform coefficients (366). For example, the video encoder 200 may encode the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output entropy encoded data of the coefficients of the block (368).
[0416] In this way, Fig.18 The method represents an example of a method for encoding video data, the method comprising determining a first number of neighboring blocks for intra-frame prediction of a current block; determining a second number of neighboring blocks for inter-frame prediction; determining a first weight value based on the first number and the second number, the first weight value to be applied to intra-frame prediction samples of the intra-frame prediction block of the current block; determining a second weight value based on the first number and the second number, the second weight value to be applied to inter-frame prediction samples of the inter-frame prediction block of the current block; generating a prediction block for the current block as a weighted combination of the intra-frame prediction block to which the first weight value is applied and the inter-frame prediction block to which the second weight value is applied; and decoding the current block using the prediction block.
[0417] Fig.19 is a flowchart illustrating an example method of decoding video data according to the techniques of this disclosure. Although with respect to video decoder 300 ( Figure 1 and Fig.17 ), but it should be understood that other devices can be configured to perform the same Fig.19 Similar approach.
[0418] The video decoder 300 may receive entropy-encoded data of the current block (e.g., entropy-encoded prediction information and entropy-encoded data of coefficients of the residual block corresponding to the current block) (370). The video decoder 300 may entropy-decode the entropy-encoded data to determine the prediction information of the current block and reproduce the coefficients of the residual block (372). Fig.19 For example, the prediction information of the current block may indicate that the current block will be predicted using the PDPC according to the technology of the present disclosure.
[0419] The video decoder 300 may then predict the current block (e.g., using PDPC according to techniques of this disclosure). Specifically, the video decoder 300 generates an intra-prediction block for the current block (376) and then generates an inter-prediction block for the current block (378). The video decoder 300 may then determine a prediction mode for neighboring blocks of the current block (380). For example, the video decoder 300 may determine the prediction mode for the top neighboring block and the left neighboring block (such as Fig.15A and Fig. 15B Those shown in ).
[0420] Then, the video decoder 300 may determine the weights to be applied to the intra-prediction block and the inter-prediction block according to the prediction modes of the neighboring blocks (382). In one example, if both the upper neighboring block and the left neighboring block are intra-predicted, the video decoder 300 may determine that the weight to be applied to the intra-prediction block is 3 and the weight to be applied to the inter-prediction block is 1; if both the upper neighboring block and the left neighboring block are inter-predicted, the video decoder 300 may determine that the weight to be applied to the inter-prediction block is 3 and the weight to be applied to the intra-prediction block is 1; and if one of the upper neighboring block and the left neighboring block is intra-predicted and the other is inter-predicted, the video decoder 300 may determine that the weight to be applied to the intra-prediction block is 2 and the weight to be applied to the inter-prediction block is 2.
[0421] The video decoder 300 may then use the weights to generate a prediction block (384). For example, the video decoder 300 may apply the intra prediction weights to the samples of the intra prediction block and the inter prediction weights to the samples of the inter prediction block, for example, according to the formula pred(x,y)=(wIntra*intraPred(x,y)+wInter*interPred(x,y)+offset) / (wIntra+wInter). The video decoder 300 may then add the weighted samples of the intra prediction block to the corresponding samples of the weighted inter prediction block and divide the resulting samples by the sum of the weights (e.g., 4). To avoid actually performing a division operation, the video decoder 300 may perform a 4-bit right shift on each sample of the block. The resulting block may correspond to the prediction block.
[0422] The video decoder 300 may then inverse scan the reproduced coefficients (386) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize and inverse transform the transform coefficients to generate a residual block (388). The video decoder 300 may ultimately decode the current block by combining the prediction block and the residual block (390).
[0423] In this way, Fig.19 The method represents an example of a method for decoding video data, the method comprising determining a first number of neighboring blocks for intra-frame prediction of a current block; determining a second number of neighboring blocks for inter-frame prediction; determining a first weight value based on the first number and the second number, the first weight value to be applied to intra-frame prediction samples of the intra-frame prediction block of the current block; determining a second weight value based on the first number and the second number, the second weight value to be applied to inter-frame prediction samples of the inter-frame prediction block of the current block; generating a prediction block for the current block as a weighted combination of the intra-frame prediction block to which the first weight value is applied and the inter-frame prediction block to which the second weight value is applied; and decoding the current block using the prediction block.
[0424] It should be appreciated that, according to examples, 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 required to implement the technique). In addition, in some examples, actions or events may be performed simultaneously rather than sequentially, such as through multithreading, interrupt handling, or multiple processors.
[0425] In one or more examples, the described functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or transmitted on 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 the transfer of a computer program from one place to another (e.g., according to a communication protocol). 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 to implement the techniques described in the present disclosure. A computer program product may include a computer-readable medium.
[0426] As an example and not limitation, such computer-readable storage media may include one or more of RAM, ROM, EEPROM, 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 required program code in the form of instructions or data structures and can be accessed by a computer. Similarly, any connection can be appropriately 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, the definition of the medium includes coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave). However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals or other transient media, but are directed to non-transient 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, where disks usually copy data magnetically, while optical disks copy data optically by lasers. The above combination should also be included in the scope of computer-readable media.
[0427] 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. Therefore, the terms "processor," "processing circuit," or "circuit" used herein may refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein, and may be used interchangeably where appropriate. In addition, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software circuits configured for encoding and decoding, or incorporated into a combined codec. Similarly, the technology may be fully implemented in one or more circuits or logic elements.
[0428] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Rather, 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 conjunction with appropriate software and / or firmware.
[0429] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for 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-prediction decoded; Determining whether a second neighboring block of the current luminance block is intra-prediction decoded; Determining a first weight and a second weight based on a determination of whether at least one of the first neighboring block or the second neighboring block is intra-frame prediction decoding; 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 The current luma block is decoded using the prediction block.
2. The method according to claim 1, wherein: Based on the first neighboring block and the second neighboring block being both intra-predicted, determining the first weight and the second weight includes determining the first weight to be equal to 3 and determining the second weight to be equal to 1; Based on one of the first neighboring block or the second neighboring block being intra predicted and the other of the first neighboring block or the second neighboring block being inter predicted, determining the first weight and the second weight includes determining the first weight to be equal to 2 and determining the second weight to be equal to 2; or Based on the fact that both the first neighboring block and the second neighboring block are inter-frame predicted, determining the first weight and the second weight includes determining the first weight to be equal to 1 and determining the second weight to be equal to 3. 3 . The method of claim 2 , wherein the first neighboring block comprises an above neighboring block, and wherein the second neighboring block comprises a left neighboring block.
4. A device for decoding video data, the device comprising: a memory configured to store video data; as well as One or more processors implemented in circuitry, the one or more processors 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-prediction decoded; Determining whether a second neighboring block of the current luminance block is intra-prediction decoded; Determining a first weight and a second weight based on a determination of whether at least one of the first neighboring block or the second neighboring block is intra-frame prediction decoding; 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 The current luma block is decoded using the prediction block.
5. The device according to claim 4, wherein: The one or more processors are configured to: Based on the first neighboring block and the second neighboring block being both intra-predicted, determining the first weight and the second weight includes determining the first weight to be equal to 3 and determining the second weight to be equal to 1; Based on one of the first neighboring block or the second neighboring block being intra predicted and the other of the first neighboring block or the second neighboring block being inter predicted, determining the first weight and the second weight includes determining the first weight to be equal to 2 and determining the second weight to be equal to 2; or Based on the fact that both the first neighboring block and the second neighboring block are inter-frame predicted, determining the first weight and the second weight includes determining the first weight to be equal to 1 and determining the second weight to be equal to 3. 6 . The apparatus of claim 5 , wherein the first neighboring block comprises an above neighboring block, and wherein the second neighboring block comprises a left neighboring block.
7. 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-prediction decoded; Determining whether a second neighboring block of the current luminance block is intra-prediction decoded; Determining a first weight and a second weight based on a determination of whether at least one of the first neighboring block or the second neighboring block is intra-frame prediction decoding; 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 The current luma block is decoded using the prediction block.
8. The computer-readable storage medium according to claim 7, wherein: The instructions cause the processor to: Based on the first neighboring block and the second neighboring block being both intra-predicted, determining the first weight and the second weight includes determining the first weight to be equal to 3 and determining the second weight to be equal to 1; Based on one of the first neighboring block or the second neighboring block being intra predicted and the other of the first neighboring block or the second neighboring block being inter predicted, determining the first weight and the second weight includes determining the first weight to be equal to 2 and determining the second weight to be equal to 2; or Based on the fact that both the first neighboring block and the second neighboring block are inter-frame predicted, determining the first weight and the second weight includes determining the first weight to be equal to 1 and determining the second weight to be equal to 3. 9 . The computer-readable storage medium of claim 8 , wherein the first neighboring block comprises an above neighboring block, and wherein the second neighboring block comprises a left neighboring block.
10. A device for 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 decoded; A component for determining whether a second neighboring block of the current luminance block is intra-frame prediction decoded; means for determining a first weight and a second weight based on a determination of whether at least one of the first neighboring block or the second neighboring block is intra-prediction decoded; means for applying the first weight to the inter prediction block and applying the second weight to the intra prediction block; means for 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 Means for decoding the current luma block using the prediction block.
11. The device according to claim 10, comprising: Based on the first neighboring block and the second neighboring block being intra predicted, the means for determining the first weight and the second weight includes determining the first weight to be equal to 3 and determining the second weight to be equal to 1; Based on one of the first neighboring block or the second neighboring block being intra predicted and the other of the first neighboring block or the second neighboring block being inter predicted, the means for determining the first weight and the second weight includes determining the first weight equal to 2 and determining the second weight equal to 2; or Based on the fact that both the first neighboring block and the second neighboring block are inter-frame predicted, the means for determining the first weight and the second weight includes determining the first weight to be equal to 1 and determining the second weight to be equal to 3. 12 . The method of claim 11 , wherein the first neighboring block comprises an above neighboring block, and wherein the second neighboring block comprises a left neighboring block.
