Prediction signal filtering in affine linear weighted intra prediction
By filtering boundary reference samples in ALWIP modes using an affine model, the solution addresses inefficiencies in intra prediction, improving video compression efficiency and quality.
Patent Information
- Application Number
- JP2025044660
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-05-07
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing video coding techniques suffer from visible artifacts and inefficiencies in intra prediction, particularly in affine linear weighted intra prediction (ALWIP) modes, leading to increased residual values and bit requirements.
The proposed solution involves filtering boundary reference samples to generate a filtered prediction block by applying an affine model to a subset of edge samples and using full sets of neighboring samples for interpolation, thereby improving the rate-distortion trade-off.
This approach generates a more accurate prediction block, reducing residual values and bit requirements, thus enhancing the compression efficiency and quality of decoded video.
Smart Images

Figure 2025106301000001_ABST
Abstract
Description
Claim of Priority
[0001]
[0001] This application claims the benefit of U.S. Provisional Patent Application No. 62 / 845,839, filed on May 9, 2019, the entire content of which is incorporated herein by reference, and claims the priority of U.S. Patent Application No. 16 / 868,982, filed on May 7, 2020.
Technical Field
[0002]
[0002] This disclosure relates to video encoding and video decoding.
Background Art
[0003]
[0003] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radiotelephones, so-called "smartphones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques such as those described in the 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, the ITU-T H.265 / High Efficiency Video Coding (HEVC) standard, and extensions to such standards. By implementing such video coding techniques, video devices can transmit, receive, encode, decode, and / or store digital video information more efficiently.
[0004]
[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in a video sequence. In block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) can be partitioned into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction with respect to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture, or temporal prediction with respect to reference samples in other reference pictures. A picture may sometimes be referred to as a frame, and a reference picture may sometimes be referred to as a reference frame.
Summary of the Invention
[0005]
[0005] The present disclosure describes techniques that can improve intra prediction, including derivation and signaling of modes for linear weighted intra prediction, sometimes referred to as matrix intra prediction or matrix weighted intra prediction or affine linear weighted intra prediction (ALWIP). More specifically, for a current block of video data encoded in the ALWIP mode, the present disclosure describes techniques for filtering boundary reference samples to generate a filtered prediction block. The filtered prediction block can improve the rate-distortion trade-off of blocks coded in the ALWIP mode by generating a more accurate prediction block.
[0006] According to one example, a method for decoding video data includes determining that a current block of the video data is encoded in an Affine Linear Weighted Intra Prediction (ALWIP) mode, deriving a subset of left-edge samples and a subset of top-edge samples based on a set of left-edge neighboring samples of the current block and a set of top-edge neighboring samples of the current block, wherein the subset of left-edge samples includes fewer samples than the set of left-edge samples and the subset of top-edge samples includes fewer samples than the set of top-edge samples, applying an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples, filtering the intermediate samples using the set of left-edge neighboring samples of the current block and the set of top-edge neighboring samples of the current block to generate a final prediction block, and decoding the current block of the video data based on the final prediction block.
[0007] According to another example, a device for decoding video data includes a memory configured to store the video data and one or more processors implemented in a circuit, the one or more processors determining that the current block of the video data is encoded in an affine linear weighted intra prediction (ALWIP) mode, deriving a subset of left edge samples and a subset of top edge samples based on a set of left edge neighboring samples of the current block and a set of top edge neighboring samples of the current block, wherein the subset of left edge samples includes fewer samples than the set of left edge samples and the subset of top edge samples includes fewer samples than the set of top edge samples, applying an affine model to the subset of left edge samples and the subset of top edge samples to generate an intermediate block of intermediate samples, filtering the intermediate samples using the set of left edge neighboring samples of the current block and the set of top edge neighboring samples of the current block to generate a final prediction block, and decoding the current block of the video data based on the final prediction block.
[0008] According to another example, a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the one or more processors to determine that a current block of video data is encoded in an affine linear weighted intra prediction (ALWIP) mode, derive a subset of left-edge samples and a subset of top-edge samples based on a set of left-edge neighboring samples of the current block and a set of top-edge neighboring samples of the current block, wherein the subset of left-edge samples includes fewer samples than the set of left-edge samples and the subset of top-edge samples includes fewer samples than the set of top-edge samples, apply an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples, filter the intermediate samples using the set of left-edge neighboring samples of the current block and the set of top-edge neighboring samples of the current block to generate a final prediction block, and decode the current block of video data based on the final prediction block.
[0009]
[0009] According to another example, an apparatus for decoding video data includes means for determining that a current block of video data is encoded in an affine linear weighted intra prediction (ALWIP) mode, means for deriving a subset of left-edge samples and a subset of top-edge samples based on a set of left-edge neighboring samples of the current block and a set of top-edge neighboring samples of the current block, where the subset of left-edge samples includes fewer samples than the set of left-edge samples and the subset of top-edge samples includes fewer samples than the set of top-edge samples, means for applying an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples, means for filtering the intermediate samples using the set of left-edge neighboring samples of the current block and the set of top-edge neighboring samples of the current block to generate a final prediction block, and means for decoding the current block of video data based on the final prediction block.
[0010]
[0010] 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
[0011]
Figure 1
[0011] A block diagram illustrating an exemplary video encoding and decoding system in which the techniques of the present disclosure may be implemented.
Figure 2A
[0012] A conceptual diagram illustrating an exemplary quad-tree binary-tree (QTBT) structure.
Figure 2B
Figure 3
[0013] A diagram illustrating an example of the direction of intra prediction where the arrow points to the reference samples.
Figure 4
[0014] Figure showing an example of an 8×4 rectangular block where a "closer" reference sample is not used for intra prediction, but a farther reference sample may be used.
Figure 5A
[0015] Figure showing an example of a mode mapping process for modes outside the diagonal direction range.
Figure 5B
Figure 5C
Figure 6
[0016] Conceptual diagram showing an exemplary intra prediction direction with a wide angle direction.
Figure 7A
[0017] Conceptual diagram showing another example of an intra prediction direction with a wide angle direction.
Figure 7B
[0018] Table showing the relationship between intra prediction modes and intra prediction angles.
Figure 8
[0019] Conceptual diagram showing exemplary vertical and horizontal splits of a block.
Figure 9
[0020] Conceptual diagram showing other examples of vertical and horizontal splits of a block.
Figure 10
[0021] Figure of reference samples from multiple reference lines that can be used for intra prediction of a coding block.
Figure 11A
[0022] Conceptual diagram showing an example of DC mode PDPC weights at sample positions within a 4×4 block.
Figure 11B
Figure 12
[0023] Conceptual diagram showing an example of an intra prediction angle mode.
Figure 13A
[0024] Conceptual diagram showing an example of a diagonal upper right mode.
Figure 13B
[0025] Conceptual diagram showing an example of a diagonal lower left mode.
Figure 13C
[0026] Conceptual diagram showing an example of the adjacent diagonal upper right mode.
Figure 13D
[0027] Conceptual diagram showing an example of the adjacent diagonal lower left mode.
Figure 14
[0028] Conceptual diagram showing an example of the affine linear weighted intra prediction (ALWIP) process for an 8×8 block.
Figure 15
[0029] Figure showing some examples of the types of boundary bands.
Figure 16
[0030] Figure showing an example of a boundary reference sample.
Figure 17
[0031] Figure showing an exemplary derivation of a sample.
Figure 18
[0032] Block diagram showing an exemplary video encoder capable of implementing the techniques of the present disclosure.
Figure 19
[0033] Block diagram showing an exemplary video decoder capable of implementing the techniques of the present disclosure.
Figure 20
[0034] Flowchart showing an exemplary video encoding process.
Figure 21
[0035] Flowchart showing an exemplary video decoding process.
Figure 22
[0036] Flowchart showing an exemplary video decoding process.
Mode for Carrying Out the Invention
[0012]
[0037] Video coding (e.g., video encoding and / or video decoding) generally involves either predicting a block of video data from already-coded blocks of video data in the same picture (e.g., intra prediction) or predicting a block of video data from already-coded blocks of video data in different pictures (e.g., inter prediction). In some cases, the video encoder also calculates residual data by comparing a predicted block, also called a prediction block, with the original block. Thus, the residual data represents the difference between the predicted block of video data and the original block such that adding the residual data to the predicted block results in the original block of the video. In some coding scenarios, to reduce the number of bits required to signal the residual data, the video encoder transforms and quantizes the residual data and signals the transformed and quantized residual data in an encoded bitstream. The compression achieved by the transform and quantization process can be lossy, meaning that the transform and quantization process can introduce distortion into the decoded video data.
[0013]
[0038] The video decoder decodes the residual data and adds it to the predicted block to generate a reconstructed video block that more closely matches the original video block than the predicted block alone. Due to the loss introduced by the transform and quantization of the residual data, the reconstructed block may have distortion or artifacts. One common type of artifact or distortion is called blocking, where the boundaries of the blocks used to code the video data are visible.
[0014]
[0039] To further improve the quality of the decoded video, the video decoder may perform one or more filtering operations on the reconstructed video block. As part of performing one or more filtering operations, the video decoder may perform one or more of, for example, deblocking filtering, sample adaptive offset (SAO) filtering, and adaptive loop filtering (ALF). The parameters for these filtering operations are determined by the video encoder and may be either explicitly signaled in the encoded video bitstream or implicitly determined by the video decoder without the need for the parameters to be explicitly signaled in the encoded video bitstream.
[0015]
[0040] In the present disclosure, techniques for improving intra prediction are described, including the derivation and signaling of modes for linear weighted intra prediction, which may also be referred to as matrix intra prediction or matrix weighted intra prediction or affine linear weighted intra prediction (ALWIP). More specifically, for the current block of video data encoded in the ALWIP mode, the present disclosure describes techniques for filtering boundary reference samples to generate a filtered prediction block. The filtered prediction block may improve the rate-distortion trade-off of the block coded in the ALWIP mode by generating a more accurate prediction block.
[0016]
[0041] As described in more detail below, when a video coder codes a block in ALWIP mode, the video coder generates a set of "intermediate" prediction samples by multiplying a matrix and a bias vector by a reduced number of boundary samples. The video coder then upsamples the intermediate samples using linear interpolation to generate a prediction block. This process can ultimately result in a prediction error that can be larger at the edges of the prediction block, thereby resulting in larger residual values that require more bits to compress the video data. In the present disclosure, techniques for filtering intermediate samples to generate a final prediction block in a manner that can reduce the prediction error of the prediction block are described. For example, a video coder configured according to the techniques of the present disclosure can apply an affine model to a subset of left edge samples and a subset of top edge samples to generate an intermediate block of intermediate samples, and then filter the intermediate samples by applying one or more filters vertically using the full set of left edge samples and the full set of top edge samples.
[0017]
[0042] That is, the techniques of the present disclosure can result in a video coder that generates a prediction block that more closely matches the original block of video data when using ALWIP mode, and thus requires smaller residual values and thus fewer total bits to be compressed. By using fewer total bit compressed blocks of video data coded in ALWIP mode, the techniques of the present disclosure can result in a video coder that achieves a better rate-distortion tradeoff.
[0018]
[0043] FIG. 1 is a block diagram showing an exemplary video encoding and decoding system 100 in which the techniques of the present disclosure may be implemented. The techniques of the present disclosure generally are directed to coding (encoding and / or decoding) video data. Generally, video data includes any data for processing video. Thus, video data may include raw, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata such as signaling data.
[0019]
[0044] As shown in FIG. 1, system 100 includes, in this example, a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides video data to destination device 116 via computer-readable medium 110. Each of source device 102 and destination device 116 may comprise any of a wide range of devices including, for example, a desktop computer, a notebook (i.e., laptop) computer, a mobile device, a tablet computer, a set-top box, a telephone handset such as a smartphone, a television, a camera, a display device, a digital media player, a video gaming console, a video streaming device, a broadcast receiver device, 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.
[0020]
[0045] In the example of FIG. 1, the source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. The destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. According to the present disclosure, the video encoder 200 of the source device 102 and the video decoder 300 of the destination device 116 can be configured to apply techniques for coding the ALWIP mode described herein. Accordingly, the source device 102 represents an example of a video encoding device, and the destination device 116 represents an example of a video decoding device. In other examples, the source device and the destination device may include other components or arrangements. For example, the source device 102 may receive video data from an external video source such as an external camera. Similarly, the destination device 116 may interface with an external display device rather than including an integrated display device.
[0021]
[0046] The system 100 shown in FIG. 1 is merely an example. Generally, any digital video encoding and / or decoding device may implement techniques for coding the ALWIP mode described herein. The source device 102 and the destination device 116 are merely examples of coding devices such that the source device 102 generates encoded video data for transmission to the destination device 116. The present disclosure refers to a “coding” device as a device that performs coding (encoding and / or decoding) of data. Thus, the video encoder 200 and the video decoder 300 represent examples of coding devices, particularly a video encoder and a video decoder, respectively. In some examples, the source device 102 and the destination device 116 may operate substantially symmetrically such that each of the source device 102 and the destination device 116 includes video encoding and decoding components. Thus, the system 100 may support one-way or two-way video transmission between the source device 102 and the destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.
[0022]
[0047] Generally, video source 104 represents a source of video data (i.e., raw, unencoded video data), provides a continuous series of pictures of video data (also referred to as "frames") to video encoder 200, and video encoder 200 encodes the data for the pictures. The video source 104 of source device 102 may include a video capture device, such as a video camera, a video archive containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, the video source 104 may generate computer graphics-based data, or a combination of live video, archived video, and computer-generated video, as the source video. In each case, the video encoder 200 encodes the captured video, pre-captured video, or computer-generated video data. The video encoder 200 may reorder the pictures from the received order (sometimes referred to as "display order") to a coding order for coding. The video encoder 200 may generate a bitstream including the encoded video data. The source device 102 may then output the encoded video data onto a computer-readable medium 110 via output interface 108 for reception and / or retrieval, for example, by input interface 122 of destination device 116.
[0023]
[0048] 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 may store raw video data, such as raw video from the video source 104 and raw decoded video data from the video decoder 300. Additionally or alternatively, the memories 106, 120 may store, for example, software instructions executable by the video encoder 200 and the video decoder 300, respectively. 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 may also include internal memories for functionally similar or equivalent purposes. Further, the memories 106, 120 may store, for example, encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 may be allocated as one or more video buffers, for example, to store raw decoded and / or encoded video data.
[0024]
[0049] Computer-readable medium 110 can represent any type of medium or device capable of transferring encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium that enables source device 102 to directly transmit encoded video data to destination device 116 in real time via, for example, a radio frequency network or a computer-based network. Output interface 108 can modulate a transmission signal including the encoded video data, and input interface 122 can demodulate the received transmission signal according to a communication standard such as a wireless communication standard or protocol. The communication medium can comprise any wireless or wired communication medium, such as the radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium can 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 can include routers, switches, base stations, or any other device that may be useful for facilitating communication from source device 102 to destination device 116.
[0025]
[0050] In some examples, source device 102 can output encoded data from output interface 108 to storage device 112. Similarly, destination device 116 can access the encoded data from storage device 112 via input interface 122. Storage device 112 can include any of a variety of distributed or locally accessible data storage media, such as a hard drive, a Blu-ray Disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing encoded video data.
[0026]
[0051] In some examples, the source device 102 may output the encoded video data generated by the source device 102 to a file server 114 or another intermediate storage device that can store the encoded video data. The destination device 116 may access the stored video data from the file server 114 via streaming or download. The file server 114 can be any type of server device that can store the encoded video data and transmit the encoded video data to the destination device 116. The file server 114 can represent a web server (e.g., for a website), a File Transfer Protocol (FTP) server, a content delivery network device, or a Network Attached Storage (NAS) device. The destination device 116 can access the encoded video data from the file server 114 through any standard data connection including an Internet connection. This can include a wireless channel (e.g., Wi-Fi® connection), a wired connection (e.g., Digital Subscriber Line (DSL), cable modem, etc.), or a combination of both that is suitable for accessing the encoded video data stored on the file server 114. The file server 114 and the input interface 122 can be configured to operate according to a streaming transmission protocol, a download transmission protocol, or a combination thereof.
[0027]
[0052] The output interface 108 and the input interface 122 may represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet (registered trademark) card), a wireless communication component operating according to any of various IEEE 802.11 standards, or other physical components. In an example where the output interface 108 and the input interface 122 include wireless components, the output interface 108 and the input interface 122 may be configured to transfer data such as encoded video data according to cellular communication standards such as 4G, 4G-LTE (registered trademark) (Long Term Evolution), LTE-Advanced, 5G, etc. In some examples where the output interface 108 includes a wireless transmitter, the output interface 108 and the input interface 122 may be configured to transfer data such as encoded video data according to other wireless standards such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee (registered trademark)), the Bluetooth (registered trademark) standard, etc. In some examples, the source device 102 and / or the destination device 116 may include respective system-on-chip (SoC) devices. For example, the source device 102 may include an SoC device for implementing functions attributed to the video encoder 200 and / or the output interface 108, and the destination device 116 may include an SoC device for implementing functions attributed to the video decoder 300 and / or the input interface 122.
[0028]
[0053] The techniques of the present disclosure may be applied to video coding that supports any of various multimedia application examples, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission such as dynamic adaptive streaming over HTTP (DASH), digital video encoded on a data storage medium, decoding of digital video stored on a data storage medium, or other application examples.
[0029]
[0054] The input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 that is also used by the video decoder 300, such as syntax elements having values that describe the characteristics and / or processing of video blocks or other coded units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays the decoded pictures of the decoded video data to the user. The display device 118 may represent any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0030]
[0055] Although not shown in FIG. 1, in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder and include an appropriate MUX-DEMUX unit, or other hardware and / or software, to handle a multiplexed stream that includes both audio and video in a common data stream. When applicable, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol, or other protocols such as the User Datagram Protocol (UDP).
[0031]
[0056] The video encoder 200 and the video decoder 300 can each be implemented as any of various suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the techniques herein are implemented in part in software, the device can store software instructions on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of the video encoder 200 and the video decoder 300 can be included in one or more encoders or decoders, any of which can be integrated as part of a combined encoder / decoder (CODEC) in their respective devices. Devices including the video encoder 200 and / or the video decoder 300 can include integrated circuits, microprocessors, and / or wireless communication devices such as cellular telephones.
[0032]
[0057] 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 extensions 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 ITU-T H.266, also known as Versatile Video Coding (VVC). The most recent draft of the VVC standard is described in Bross et al., "Versatile Video Coding (Draft 8)", Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 17th meeting, Brussels, BE, January 7-17, 2020, JVET-Q2001-v15 (hereinafter referred to as "VVC Draft 8"). However, the techniques of the present disclosure are not limited to any particular coding standard.
[0033]
[0058] Generally, video encoder 200 and video decoder 300 may perform block-based coding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., to be encoded, decoded, or used in other ways in the encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Generally, video encoder 200 and video decoder 300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for samples of a picture, video encoder 200 and video decoder 300 may code a luminance component and a chrominance component, where the chrominance component may include both a red-phase and a blue-phase chrominance component. In some examples, video encoder 200 converts the received data in RGB format to a YUV representation before encoding, and video decoder 300 converts the YUV representation to an RGB format. Alternatively, preprocessing and postprocessing units (not shown) may perform these conversions.
[0034]
[0059] In the present disclosure, generally, coding of a picture (e.g., encoding and decoding) may be referred to as including a process of encoding or decoding data of the picture. Similarly, in the present disclosure, coding of a block of a picture may be referred to as including a process of encoding or decoding data of the block, e.g., prediction and / or residual coding. An encoded video bitstream generally includes a series of values of syntax elements that represent coding decisions (e.g., coding modes) and partitioning of a picture into blocks. Thus, a reference to coding a picture or a block should generally be understood as coding the values of the syntax elements that form the picture or the block.
[0035]
[0060] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) divides a coding tree unit (CTU) into CUs according to a quad-tree structure. That is, the video coder divides the CTU and CU into four equal and non-overlapping squares, and each node of the quad-tree has either zero or four child nodes. A node without child nodes may be called 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 coder may further divide the PU and TU. For example, in HEVC, a residual quad-tree (RQT) represents the division of TUs. In HEVC, the PU represents inter-prediction data, while the TU represents residual data. A CU that is intra-predicted includes intra-prediction information such as an intra-mode indication.
[0036]
[0061] As another example, video encoder 200 and video decoder 300 may be configured to operate according to VVC. According to VVC, a video coder (such as video encoder 200) divides a picture into a plurality of coding tree units (CTUs). Video encoder 200 may divide the CTU according to a tree structure, such as a quad-tree binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure removes the concept of multiple division types, such as the separation between the CU, PU, and TU of HEVC. The QTBT structure includes two levels: a first level divided according to a quad-tree division and a second level divided according to a binary-tree division. The root node of the QTBT structure corresponds to the CTU. The leaf node of the binary tree corresponds to a coding unit (CU).
[0037]
[0062] In the MTT partitioning structure, a block can be partitioned using a quad tree (QT) partition, a binary tree (BT) partition, and one or more types of triple tree (TT) (also called ternary tree) partitions. A triple or ternary tree partition is a partition where a block is split into three sub-blocks. In some examples, the triple or ternary tree partition splits the block into three sub-blocks without dividing the original block through its center. The partition types (e.g., QT, BT, and TT) in MTT can be symmetric or asymmetric.
[0038]
[0063] In some examples, video encoder 200 and video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance and chrominance components. In other examples, video encoder 200 and video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for both chrominance components (or two QTBT / MTT structures for each chrominance component).
[0039]
[0064] Video encoder 200 and video decoder 300 may be configured to use a quad tree partition, a QTBT partition, an MTT partition, or other partition structures according to HEVC. For purposes of explanation, the description of the techniques of this disclosure is presented with respect to the QTBT partition. However, it should be understood that the techniques of this disclosure may also be applicable to video coders configured to use a quad tree partition or similarly other types of partitions.
[0040]
[0065] In some examples, a CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples of a picture having three sample arrays, or a CTB of samples of a picture coded using a monochrome picture or three separate color planes used to code samples. A CTB can be an N×N block of samples for some value N such that the splitting of components to the CTB is in units. A component is an array or single sample from one of three arrays (luma and two chroma) that make up a picture in 4:2:0, 4:2:2, or 4:4:4 color format, or an array or single sample of an array that makes up a picture in monochrome format. In some examples, a coding block is an M×N block of samples for some values M and N such that the splitting of CTBs to the coding block is in units.
[0041]
[0066] Blocks (e.g., CTUs or CUs) can be grouped in various ways in a picture. As an example, a block can refer to a rectangular region of CTU rows within a particular tile in the picture. A tile can be a rectangular region of CTUs within a particular tile column and particular tile row in the picture. A tile column refers to a rectangular region of CTUs having a height equal to the height of the picture and a width specified by a syntax element (such as in a picture parameter set). A tile row refers to a rectangular region of CTUs having a height specified by a syntax element (such as in a picture parameter set) and a width equal to the width of the picture.
[0042]
[0067] In some examples, a tile can be divided into a plurality of bricks, each of which can include one or more CTU rows within the tile. A tile that is not divided into a plurality of bricks may also be referred to as a brick. However, a brick that is a true subset of a tile may not be referred to as a tile.
[0043]
[0068] The bricks in the picture can also be placed in slices. A slice can be an integer number of bricks of a picture that may be contained solely within a single network abstraction layer (NAL) unit. In some examples, a slice contains either some complete tiles or only a contiguous sequence of complete bricks of one tile.
[0044]
[0069] In the present disclosure, for example, "N×N" and "N-by-N" can be used interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) with respect to the vertical and horizontal dimensions, such as 16×16 samples or 16-by-16 samples of 16 samples each. Generally, a 16×16 CU has 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an N×N CU generally 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 can be arranged in rows and columns. Further, a CU does not necessarily have to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU can comprise N×M samples, where M does not necessarily equal N.
[0045]
[0070] Video encoder 200 encodes video data for a CU representing prediction and / or residual information, as well as other information. Prediction information indicates how a CU should be predicted to form a prediction block for the CU. Residual information generally represents the sample-by-sample difference between the samples of a CU prior to encoding and the prediction block.
[0046]
[0071] To predict a CU, video encoder 200 can generally form a prediction block for the CU through inter prediction or intra prediction. Inter prediction generally refers to predicting a CU from data of a previously coded picture, while intra prediction generally refers to predicting a CU from previously coded data of the same picture. To perform inter prediction, video encoder 200 can use one or more motion vectors to generate a prediction block. Video encoder 200 can generally perform motion search to identify a reference block that exactly matches the CU, for example, with respect to the difference between the CU and the reference block. Video encoder 200 can calculate a difference metric using sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculations to determine whether the reference block exactly matches the current CU. In some examples, video encoder 200 can predict the current CU using uni-directional prediction or bi-directional prediction.
[0047]
[0072] Some examples of VVC can also provide an affine motion compensation mode, which can be considered an inter prediction mode. In the affine motion compensation mode, video encoder 200 can determine two or more motion vectors representing non-translational motion, such as zoom in or out, rotation, perspective motion, or other irregular motion types.
[0048]
[0073] To perform intra prediction, video encoder 200 may select an intra prediction mode to generate a prediction block. Some examples of VVC provide 67 intra prediction modes, including various directional modes, as well as planar mode and DC mode. Generally, video encoder 200 selects an intra prediction mode that describes neighboring samples for the current block from which the samples of the current block (e.g., the block of the CU) are to be predicted. Such samples will generally be above, above and to the left, or to the left of the current block in the same picture as the current block, assuming that video encoder 200 codes CTUs and CUs in raster scan order (from left to right, top to bottom).
[0049]
[0074] Video encoder 200 encodes data representing the prediction mode for the current block. For example, in the inter prediction mode, video encoder 200 may encode which of the various available inter prediction modes is used, as well as data representing the motion information for the corresponding mode. For example, in uni - directional or bi - directional inter prediction, video encoder 200 may use advanced motion vector prediction (AMVP) or merge mode to encode the motion vector. Video encoder 200 may use a similar mode to encode the motion vectors for the affine motion compensation mode.
[0050]
[0075] Following prediction such as intra prediction or inter prediction of a block, video encoder 200 may calculate residual data for the block. Residual data such as a residual block represents the per-sample difference between the block and a predicted block for the block formed using the corresponding prediction mode. Video encoder 200 may apply one or more transforms to the residual block to generate transform data in a transform domain rather than a sample domain. For example, 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. Further, video encoder 200 may apply a second transform following a first transform, such as a mode-dependent non-separable second-order transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT). Video encoder 200 generates transform coefficients following the application of one or more transforms.
[0051]
[0076] As described above, following any transform for generating transform coefficients, video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to reduce as much as possible the amount of data used to represent the transform coefficients, thereby achieving further compression. By performing the quantization process, video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, 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, video encoder 200 may perform a bitwise right shift of the value to be quantized.
[0052]
[0077] Following quantization, video encoder 200 may scan the transform coefficients to generate a one-dimensional vector from the two-dimensional matrix containing the quantized transform coefficients. The scan may be designed to place transform coefficients of higher energy (and thus lower frequency) towards the front of the vector and transform coefficients of lower energy (and thus higher frequency) towards the back of the vector. In some examples, video encoder 200 may utilize a predefined scan order to scan the quantized transform coefficients to generate a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, video encoder 200 may perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 200 may entropy encode the one-dimensional vector, for example, according to context adaptive binary arithmetic coding (CABAC). Video encoder 200 may also entropy encode the values of syntax elements that describe metadata associated with the encoded video data for use by video decoder 300 when decoding the video data.
[0053]
[0078] To perform CABAC, video encoder 200 may assign a context within a context model to the symbol to be transmitted. The context may relate, for example, to whether neighboring values of the symbol are zero values. Probability determination may be based on the context assigned to the symbol.
[0054]
[0079] Video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, in other syntax data such as picture headers, block headers, slice headers, or sequence parameter sets (SPS), picture parameter sets (PPS), or video parameter sets (VPS) for video decoder 300. Video decoder 300 may similarly decode such syntax data to determine how to decode the corresponding video data.
[0055]
[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 the prediction and / or residual information of the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0056]
[0081] Generally, the video decoder 300 performs a reverse process of what is performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 can use CABAC in a manner substantially similar to but reverse of the CABAC encoding process of the video encoder 200 to decode the values of the syntax elements of the bitstream. The syntax elements can define the partitioning information for partitioning a picture into CTUs to define the CUs of the CTUs and the partitioning of each CTU according to a corresponding partitioning structure such as a QTBT structure. The syntax elements can further define the prediction and residual information for blocks (e.g., CUs) of the video data.
[0057]
[0082] The residual information can be represented, for example, by quantized transform coefficients. The video decoder 300 can inverse quantize and inverse transform the quantized transform coefficients of a block to reproduce the residual block of the block. The video decoder 300 uses the signaled prediction mode (intra or inter prediction) and the related prediction information (e.g., motion information for inter prediction) to form the prediction block of the block. The video decoder 300 can then combine the prediction block and the residual block (for each sample) to reproduce the original block. The video decoder 300 can perform additional processing such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.
[0058]
[0083] According to the techniques of the present disclosure, video decoder 300 may be configured to determine that the current block of video data is encoded in the ALWIP mode, derive a subset of left-edge samples and a subset of top-edge samples based on a set of neighboring samples of the left edge of the current block and a set of neighboring samples of the top edge of the current block, apply an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples, filter the intermediate samples using the set of neighboring samples of the left edge of the current block and the set of neighboring samples of the top edge of the current block to generate a final prediction block, and decode the current block of video data based on the final prediction block. Video encoder 200 may be similarly configured to determine that the current block of video data is encoded in the ALWIP mode as part of the decoding loop of the video encoding process, derive a subset of left-edge samples and a subset of top-edge samples based on a set of neighboring samples of the left edge of the current block and a set of neighboring samples of the top edge of the current block, apply an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples, filter the intermediate samples using the set of neighboring samples of the left edge of the current block and the set of neighboring samples of the top edge of the current block to generate a final prediction block, and decode the current block of video data based on the final prediction block.
[0059]
[0084] In this disclosure, generally, reference may be made to "signaling" certain information, such as syntax elements. The term "signaling" generally may refer to the communication of the values of syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 may signal the value of a syntax element in the bitstream. Generally, signaling refers to generating a value in the bitstream. As described above, source device 102 may transfer the bitstream to destination device 116 substantially in real time or may transfer the bitstream to destination device 116 non-real time such that it can be stored in storage device 112 for later retrieval by destination device 116 when storing syntax elements in storage device 112.
[0060]
[0085] FIGS. 2A and 2B are conceptual diagrams showing an exemplary QTBT structure 130 and a corresponding CTU 132. Solid lines represent quad-tree splitting, and dotted lines indicate binary-tree splitting. At each split (i.e., non-leaf) node of the binary tree, one flag is signaled to indicate which splitting type (i.e., horizontal or vertical) is used, where in this example, 0 indicates horizontal splitting and 1 indicates vertical splitting. In quad-tree splitting, since a quad-tree node splits a block horizontally and vertically into four sub-blocks of equal size, there is no need to indicate the splitting type. Thus, video encoder 200 may encode syntax elements (such as splitting information) for the region tree level (i.e., solid lines) of QTBT structure 130 and syntax elements (such as splitting information) for the prediction tree level (i.e., dashed lines) of QTBT structure 130, and video decoder 300 may decode them. Video encoder 200 may encode video data, such as prediction and transform data, for a CU represented by a terminal leaf node of QTBT structure 130, and video decoder 300 may decode it.
[0061]
[0086] Generally, the CTU 132 of FIG. 2B can be associated with parameters that define the size of the blocks corresponding to the nodes of the QTBT structure 130 at the first and second levels. These parameters can include a CTU size (representing the size of the CTU 132 in the sample), a minimum quad tree size (MinQTSize representing the minimum allowable quad tree leaf node size), a maximum binary tree size (MaxBTSize representing the maximum allowable binary tree root node size), a maximum binary tree depth (MaxBTDepth representing the maximum allowable binary tree depth), and a minimum binary tree size (MinBTSize representing the minimum allowable binary tree leaf node size).
[0062]
[0087] The root node of the QTBT structure corresponding to the CTU can have four child nodes at the first level of the QTBT structure, and each of them can be partitioned according to the quad tree partition. That is, the nodes at the first level are either leaf nodes (having no child nodes) or have four child nodes. An example of the QTBT structure 130 represents nodes including a parent node and child nodes having solid lines for branches. If the nodes at the first level are not larger than the maximum allowable binary tree root node size (MaxBTSize), the nodes can be further partitioned by respective binary trees. The binary tree splitting of one node can be repeated until the nodes resulting from the split reach the minimum allowable binary tree leaf node size (MinBTSize) or the maximum allowable binary tree depth (MaxBTDepth). An example of the QTBT structure 130 represents nodes having dashed lines for branches. The binary tree leaf nodes are called coding units (CUs), and the CUs are used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further partitioning. As discussed above, the CUs may also be called "video blocks" or "blocks".
[0063]
[0088] In an example of the QTBT partitioning structure, the CTU size is set to 128×128 (luma samples and two corresponding 64×64 chroma samples), MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. The quad-tree partitioning is first applied to the CTU to generate quad-tree leaf nodes. The quad-tree leaf nodes can have sizes ranging from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). When the leaf quad-tree node is 128×128, this node is not further split by the binary tree since its size exceeds MaxBTSize (i.e., 64×64 in this example). In other cases, the leaf quad-tree node is further partitioned by the binary tree. Thus, the quad-tree leaf node is also the root node of the binary tree and has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), further splitting is not permitted. A binary tree node having a width equal to MinBTSize (4 in this example) implies that further horizontal splitting is not permitted. Similarly, a binary tree node having a height equal to MinBTSize implies that further vertical splitting is not permitted for that binary tree node. As described above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without further partitioning.
[0064]
[0089] FIG. 3 shows an example of the direction of intra prediction where the arrow points towards the reference sample. The video encoder 200 and the video decoder 300 can be configured to perform intra prediction using both wide-angle and non-wide-angle. The intra prediction mode includes a DC prediction mode, a planar prediction mode, and a directional (or angular) prediction mode. For the directional prediction of a square block, as shown in FIG. 3, in the Versatile Video Coding Test Model 2 (VTM2), J. Chen, Y. Ye, S. Kim, "Algorithm description for Versatile Video Coding and Test Model 2 (VTM2)", the 11th JVET meeting, Ljubljana, SI, July 2018 (JVET-K1002), the direction between -135 degrees and 45 degrees of the current block is used.
[0065]
[0090] In VTM2, the block structure used to specify the prediction block for intra prediction is not limited to being square (width w = height h). Rectangular or non-square prediction blocks (w > h or w < h) can increase the coding efficiency based on the characteristics of the content.
[0066]
[0091] In such rectangular blocks, by restricting the direction of intra prediction to be within -135 degrees to 45 degrees, a situation may occur where a farther reference sample rather than a nearer reference sample is used for intra prediction. Such a design may affect the coding efficiency. It may be more beneficial to relax the range of the restriction so that a nearer reference sample (beyond the angle of -135 degrees to 45 degrees) can be used for prediction. An example of such a case is given in FIG. 4.
[0067]
[0092] FIG. 4 shows an example of an 8×4 rectangular block (current block 400) where a “closer” reference sample (circle 404) is not used to intra-predict the current block 400. Instead, due to the limitation that the intra-prediction direction must be within the range from -135 degrees to 45 degrees, a farther reference sample (circle 402) can be used.
[0068]
[0093] During the 12th JVET meeting, a modification to wide-angle intra prediction was proposed and adopted in VTM3 in “CE3-related: Unification of angular intra prediction for square and non-square blocks” by L. Zhao, X. Zhao, S. Liu, X. Li, the 12th JVET meeting, Macau Special Administrative Region, CN, October 2018, JVET-L0279. VTM3 is described in “Algorithm description for Versatile Video Coding and Test Model 3 (VTM3)” by J. Chen, Y. Ye, S. Kim, the 12th JVET meeting, Macau Special Administrative Region, CN, October 2018, JVET-L1002.
[0069]
[0094] This proposal included two modifications to unify angular intra prediction for square and non-square blocks. First, the angular prediction direction was modified to cover the diagonal directions of all block shapes. Second, all angular directions were kept within the range between the lower-left diagonal direction and the upper-right diagonal direction for all block aspect ratios (square and non-square) as shown in FIGS. 5A to 5C. Additionally, the number of reference samples in the upper reference row and the left reference column can be limited to 2*width + 1 and 2*height + 1 for all block shapes.
[0070]
[0095] Figures 5A to 5C are conceptual diagrams showing mode mapping for coding units having different shapes. The video encoder 200 and the video decoder 300 may implement a mode mapping process for various shapes and for determining available intra prediction modes determined by the size of the CU. Figure 5A shows a square block that does not require angular mode remapping. Figure 5B shows the angular mode remapping of a horizontal non-square block. Figure 5C shows the angular mode remapping of a vertical non-square block. In Figures 5B and 5C, although there are still only 65 available angular modes, modes A and B are exchanged for mapped modes A and B so that those 65 available modes are different among Figures 5A, 5B, and 5C.
[0071]
[0096] In the example of Figure 5A, the CU 502 is a square block (i.e., w = h). The diagonal direction 504 corresponds to a 45-degree prediction angle, and the diagonal direction 506 corresponds to a -135-degree prediction angle. All available prediction modes for the CU 502 are between the diagonal direction 504 and the diagonal direction 506, and thus, mode remapping is not necessary.
[0072]
[0097] In the example of Figure 5B, the CU 512 is a non-square, rectangular block, where w is greater than h. The diagonal direction 514 represents the diagonal direction running from the lower left corner of the CU 512 to the upper right corner of the CU 512, and the diagonal direction 516 represents the diagonal direction running from the upper right corner of the CU 512 to the lower left corner of the CU 512. When modes A and B are not between the diagonal direction 514 and the diagonal direction 516, modes A and B are exchanged for mapped modes A and B so that all available prediction modes for the CU 512 are between the diagonal direction 514 and the diagonal direction 516.
[0073]
[0098] In the example of FIG. 5C, CU522 is a non-square, rectangular block, where h is greater than w. The diagonal direction 524 represents the diagonal direction running from the lower left corner of CU522 to the upper right corner of CU522, and the diagonal direction 526 represents the diagonal direction running from the upper right corner of CU522 to the lower left corner of CU522. When modes A and B are not between the diagonal direction 524 and the diagonal direction 526, modes A and B are swapped to the mapping modes A and B such that all available prediction modes for CU522 are between the diagonal direction 624 and the diagonal direction 526.
[0074]
[0099] FIG. 6 is a wide-angle view adopted in VTM2. FIG. 7A shows the wide-angle modes shown in addition to 65 angular modes (labeled -1 to -10 and 67 to 76 in FIG. 6). In the example of FIG. 7A, mode 50 corresponds to a prediction angle of -90 degrees. Mode 66 corresponds to a prediction angle of -135 degrees, and mode 2 corresponds to a prediction angle of 45 degrees.
[0075]
[0100] FIG. 7A shows an example of the wide angle in VTM3 (labeled -1 to -14 and 67 to 80 in FIG. 7A) other than modes 2 and 66 for a total of 93 angular modes. In the example of FIG. 8, mode 50 corresponds to a prediction angle of -90 degrees. Mode 66 corresponds to a prediction angle of -135 degrees, and mode 2 corresponds to a prediction angle of 45 degrees. VTM3 defines 95 modes, but only 67 modes are allowed for any block size. The exact modes allowed depend on the ratio of the width to the height of the block. This is achieved by restricting the mode range based on the block size.
[0076]
[0101] FIG. 7B is a table showing the relationship between the intra prediction mode and the intra prediction angle. In particular, Table 1 in FIG. 7B specifies the mapping table between the intra prediction mode predModeIntra and the angle parameter intraPredAngle in VTM3. VTM3 is described in B. Bross, J. Chen, S. Liu, "Versatile Video Coding (Draft 3)", 12th JVET Meeting, Macau Special Administrative Region, CN, October 2018, JVET-L100.
[0077]
[0102] In Table 1, the angular mode corresponding to the non-square block diagonal is indicated by a caret symbol (^). The vertical and horizontal modes are indicated by a number symbol (#) for reference. The square block diagonal mode is indicated by an asterisk (*) in Table 1. Hereinafter, the angular mode with a positive intraPredAngle value is called the positive angular mode (mode index <18 or >50), while the angular mode with a negative intraPredAngle value is called the negative angular mode (mode index >18 and <50).
[0078]
[0103] The inverse angle parameter invAngle is derived based on intraPredAngle as follows.
[0079]
Equation
[0080]
[0104] Note that the intraPredAngle value, which is always a multiple of 32 (0, 32, 64, 128, 256, 512), corresponds to prediction from non-fractional reference array samples as in the case of the VTM3 specification.
[0081]
Table 1
[0082]
[0105] The video encoder 200 and the video decoder 300 may be configured to perform intra sub - partition coding (ISP). The intra sub - partition (ISP) coding mode was proposed in S. De Luxan Hernandez, H. Schwarz, D. Marpe, T. Wiegand (HHI) "CE3: Line - based intra coding mode" (hereinafter referred to as "JVET - L0076"). When coding video data using the ISP coding mode, the video encoder 200 and the video decoder 300 may be configured to split (e.g., split or partition) the luma intra - predicted block into two or four sub - partitions in the vertical or horizontal direction according to the block size dimension. Examples of block splitting in the ISP coding mode are described below with respect to FIGS. 8 and 9.
[0083]
[0106] FIG. 8 is a conceptual diagram showing exemplary vertical and horizontal splits of a block. As shown in FIG. 8, current block 800 is an ISP block. That is, block 800 is a block that should be split into sub-partitions, and each of the sub-partitions will be coded using intra prediction. Current block 800 has a height (H) and a width. In the ISP coding mode, video encoder 200 and / or video decoder 300 may be configured to split current block 800 either horizontally or vertically. In the example of FIG. 8, video encoder 200 and / or video decoder 300 may be configured to split current block 800 into two sub-partitions. When using the horizontal split type, video encoder 200 and / or video decoder 300 may split current block 800 into sub-partition 802 and sub-partition 804. Each of sub-partition 802 and sub-partition 804 has a height equal to H / 2 and a width equal to W. When using the vertical split type, video encoder 200 and / or video decoder 300 may split current block 800 into sub-partition 806 and sub-partition 808. Each of sub-partition 806 and sub-partition 808 has a height equal to H and a width equal to W / 2.
[0084]
[0107] FIG. 9 is a conceptual diagram showing another example of vertical and horizontal splitting of a block. FIG. 9 shows the current block 900 again, which is an ISP block. In this example, the video encoder 200 and / or the video decoder 300 may split the current block 900 into four sub - partitions. When using the horizontal split type, the video encoder 200 and / or the video decoder 300 may split the current block 900 into sub - partition 910, sub - partition 912, sub - partition 914, and sub - partition 916. Each of sub - partition 910, sub - partition 912, sub - partition 914, and sub - partition 916 has a height equal to H / 4 and a width equal to W. When using the vertical split type, the video encoder 200 and / or the video decoder 300 may split the current block 900 into sub - partition 920, sub - partition 922, sub - partition 924, and sub - partition 926. Each of sub - partition 920, sub - partition 922, sub - partition 924, and sub - partition 926 has a height equal to H and a width equal to W / 4.
[0085]
[0108] FIGS. 8 and 9 are merely exemplary split types. In other examples of ISP, the current block may be split into any number (e.g., 3, 5, 6, etc.) of segments (partitions). Additionally, in some examples, the sizes of the sub - partitions need not be symmetric. That is, the sub - partitions may have different sizes.
[0086]
[0109] In one example, based on the intracoding mode and split type being utilized, two different classes of processing order, referred to as "normal" order and "reversed" order, may be used. In the normal order, the first sub-partition to be processed includes the top-left sample of the CU, and then proceeds downward (horizontal split) or rightward (vertical split), which are sub-partitions. The video encoder 200 may signal a bit indicating the splitting type of the CU (e.g., horizontal or vertical split) to the video decoder 300. In another example, the reverse processing order starts with a sub-partition that includes the bottom-left sample of the CU and proceeds upward, or starts with a sub-partition that includes the top-right sample of the CU and proceeds leftward.
[0087]
[0110] In JVET WD4, a variant of the ISP that uses only the normal processing order is used. It should be noted that the terms sub-block and sub-partition are used interchangeably herein, and both refer to blocks obtained by dividing a coding block using the ISP.
[0088]
[0111] Some of the syntax and semantics related to the ISP in JVET WD4 are shown below, and the symbols <<**>> and << / **>> indicate the relevant syntax.
[0089]
Table 2
[0090]
Table 3
[0091] Semantics of Coding Unit An intra_subpartitions_mode_flag[x0][y0] equal to 1 specifies that the current intra-coding unit is partitioned into NumIntraSubPartitions[x0][y0] rectangular transform block sub-partitions. An intra_subpartitions_mode_flag[x0][y0] equal to 0 specifies that the current intra-coding unit is not partitioned into rectangular transform block sub-partitions.
[0092] When intra_subpartitions_mode_flag[x0][y0] does not exist, it is inferred to be equal to 0.
[0093] intra_subpartitions_split_flag[x0][y0] specifies whether the intra-subpartition split type is horizontal or vertical. When intra_subpartitions_mode_flag[x0][y0] does not exist, it is inferred to be equal to 0.
[0094] The variable IntraSubPartitionsSplitType specifies the type of split used for the current luma coding block as shown in Table 2-3. IntraSubPartitionsSplitType is derived as follows.
[0095] - If intra_subpartitions_mode_flag[x0][y0] is equal to 0, IntraSubPartitionsSplitType is set equal to 0.
[0096] - Otherwise, IntraSubPartitionsSplitType is set equal to 1 + intra_subpartitions_split_flag[x0][y0].
[0097]
Table 4
[0098] The variable NumIntraSubPartitions specifies the number of transform block sub - partitions into which an intra - coding block is divided. NumIntraSubPartitions is derived as follows.
[0099] - When IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT, NumIntraSubPartitions is set equal to 1.
[0100] - Otherwise, if one of the following conditions is true, NumIntraSubPartitions is set equal to 2.
[0101] - cbWidth is equal to 4 and cbHeight is equal to 8, - cbWidth is equal to 8 and cbHeight is equal to 4 - In other cases, NumIntraSubPartitions is set equal to 4. << / **>>
[0112] FIG. 10 shows a diagram of reference samples from multiple reference lines that can be used for intra - prediction of a coding block. The video encoder 200 and the video decoder 300 can be configured to perform multiple reference line predictions. Samples in the neighborhood of the coding block are used for intra - prediction of the block. Typically, the reconstructed reference sample lines closest to the left and upper boundaries of the coding block are used as reference samples for intra - prediction. However, VVC WD4 also allows other samples in the neighborhood of the coding block to be used as reference samples. FIG. 10 shows the reference sample lines that can be used for intra - prediction. For each coding block, an index indicating the reference lines used is signaled.
[0102]
[0113] In VVC WD4, only reference lines with MRLIdx equal to 0, 1, and 3 can be used. The index to the reference line used for coding a block (the values 0, 1, and 2 indicate lines with MRLIdx 0, 1, and 3, respectively) is coded using a truncated unary codeword. Since the reference lines used have MRLIdx > 0, the planar and DC modes are not used.
[0103]
[0114] Video encoder 200 and video decoder 300 may be configured to perform a position dependent intra prediction combination. Block-based intra prediction is part of such video standards as AVC, HEVC, VVC, etc. Typically, lines of reference samples from adjacent reconstructed blocks are used to predict samples within the current block. One or more lines of samples may be used for prediction. The reference samples are adopted by typical intra prediction modes such as DC, planar, and angular / directional modes.
[0104]
[0115] The Position Dependent Intra Prediction Combination (PDPC) was proposed by J. Pfaff, B. Stallenberger, M. Schafer, P. Merkle, P. Helle, T. Hinz, H. Schwarz, D. Marpe, T. Wiegand (HHI) in "CE3: Affine linear weighted intra prediction (CE3-4.1, CE3-4.2)" (JVET-N0217) and further simplified in JVET-M0102. For the purpose of the proposal, submitted for the JVET call, J. Chen, Y. Ye, S. H. Kim, "Algorithm description for Versatile Video Coding and Test Model 3 (VTM3)" (JVET-L1002), Macau, CN, October 2018, PDPC is applied to the planar, DC, horizontal, and vertical modes without the signaling summarized below. In F. Bossen, K. Misra, "Non-CE3: A unified luma intra mode list construction process" (JVET-M0528), PDPC was further extended to the diagonal directionality mode and the modes adjacent to the diagonal directionality mode.
[0105]
[0116] (x,y) is the predicted sample pred(x,y) located at the position, predicted in the intra prediction mode (DC, planar, angle), and its value is corrected using the PDPC formula for a single reference sample line as follows.
[0106]
Number
[0107] Here, R x,-1 、R -1,y represent the reference samples located above and to the left of the current sample (x,y) respectively, and R -1,-1represents a reference sample located at the upper left corner of the current block. In DC mode, the weights are calculated as follows for a block with dimensions, width, and height.
[0108]
Num
[0109] However, shift = (log2(width) + log2(height) + 2) >> 2. On the other hand, in planar mode, wTL = 0, in horizontal mode, wTL = wT, and in vertical mode, wTL = wL. The PDPC weights can be calculated using only addition and shift. The value of pred(x,y) can be calculated in a single step using Equation 1.
[0110]
[0117] Figure 11A shows the DC mode PDPC weights (wL, wT, wTL) for the (0,0) position within one 4×4 block. Figure 11B shows the DC mode PDPC weights (wL, wT, wTL) for the (1,0) position within one 4×4 block. When PDPC is applied to DC, planar, horizontal, and vertical intra-modes, no additional boundary filters such as the DC mode boundary filter or the horizontal / vertical mode edge filter are applied. Equation 1 can be generalized to include additional reference sample lines (e.g., not limited to samples one row above or one column to the left of the current block). In this case, multiple reference samples are available in the neighborhood of Rx,-1, R-1,y, R-1,-1, and each can have an assigned weight that can be optimized, for example, by training.
[0111]
[0118] The technique described in U.S. Patent Application No. 16 / 371,638, filed on April 1, 2019, extends PDPC to diagonal intra - modes and to angular modes adjacent to diagonal modes. The intended diagonal intra - mode is a mode that predicts according to the lower - left and upper - right directions, as well as several adjacent angular modes, for example, 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. FIG. 12 shows the identification of angular modes. Generally, adjacent modes can be a selected subset of the available angular modes. The spacing between angular modes can be non - uniform and some angular modes can be skipped.
[0112]
[0119] FIGS. 13A - 13D show the definition of samples used for the PDPC extension to diagonal and adjacent angular intra - modes. FIG. 13A shows the definition of the reference samples Rx, - 1, R - 1, y and R - 1, - 1 for the extension of PDPC to the upper - right diagonal mode. The prediction sample pred(x’, y’) is located at (x’, y’) within the prediction block. The coordinate x of the reference sample Rx, - 1 is given by x = x’+y’ + 1, and the coordinate y of the reference sample R - 1, y is similarly given by y = x’+y’ + 1. The PDPC weights for the upper - right diagonal mode are, for example, wT = 16>>( (y’<<1)>>shift), wL = 16>>( (x’<<1)>>shift), wTL = 0.
[0113]
[0120] Similarly, FIG. 13B shows the definition of the reference samples Rx, - 1, R - 1, y and R - 1, - 1 for the extension of PDPC to the lower - left diagonal mode. The coordinate x of the reference sample Rx, - 1 is given by x = x’+y’ + 1, and the coordinate y of the reference sample R - 1, y is y = x’+y’ + 1. The PDPC weights for the upper - right diagonal mode are, for example, wT = 16>>( (y’<<1)>>shift), wL = 16>>( (x’<<1)>>shift), wTL = 0.
[0114]
[0121] In FIGS. 13A and 13B, the video encoder 200 and the video decoder 300 can each determine a row above the current block (e.g., the row immediately above, although the technique is not so limited) and can determine the x coordinate in the determined row. The x coordinate in the determined row is equal to the x coordinate of the prediction sample + the y coordinate of the prediction sample + 1. The video encoder 200 and the video decoder 300 can determine one reference sample out of one or more reference samples based on the determined row and the determined x coordinate.
[0115]
[0122] Similarly, in FIGS. 13A and 13B, the video encoder 200 and the video decoder 300 can determine a column to the left of the current block (e.g., the column immediately to the left, although the technique is not so limited) and can determine the y coordinate in the determined column. The y coordinate in the determined column is equal to the x coordinate of the prediction sample + the y coordinate of the prediction sample + 1. The video encoder 200 and the video decoder 300 can determine one reference sample out of one or more reference samples based on the determined column and the determined y coordinate.
[0116]
[0123] Based on the determined x and y coordinates, the video encoder 200 and the video decoder 300 can determine reference samples (e.g., a first reference sample based on the determined row and the determined x coordinate and a second reference sample based on the determined column and the determined y coordinate). Also, the video encoder 200 and the video decoder 300 can determine weights according to the above exemplary technique for the diagonal mode (e.g., as two examples, the upper right diagonal mode and the lower left diagonal mode). Then, based on Equation 1 (as one non-limiting example), the video encoder 200 and the video decoder 300 can determine a modified prediction sample (e.g., pred(x,y)).
[0117]
[0124] The case of the adjacent upper right diagonal mode is shown in FIG. 13C. Generally, for the angle α defined in FIG. 3, the y coordinate of the reference sample R-1,y is determined as y = y’ + tan(α) × (x’ + 1), and the x coordinate of Rx,-1 is given by x = x’ + cotan(α) × (y’ + 1), where tan(α) and cotan(α) are the tangent and cotangent of the angle α. The PDPC weights for the adjacent upper right diagonal mode are, for example, wT = 32 >> ((y’ << 1) >> shift), wL = 32 >> ((x’ << 1) >> shift), wTL = 0 or wT = 32 >> ((y’ << 1) >> shift), wL = 0, wTL = 0.
[0118]
[0125] Similarly, the case of the adjacent lower left diagonal mode is shown in FIG. 13D. Generally, for the angle β defined in FIG. 3, the x coordinate of the reference sample Rx,-1 is determined as x = x’ + tan(β) × (y’ + 1), and the y coordinate of R-1,y is given by y = y’ + cotan(β) × (x’ + 1), where tan(β) and cotan(β) are the tangent and cotangent of the angle β. The PDPC weights for the adjacent lower left diagonal mode are, for example, wL = 32 >> ((x’ << 1) >> shift), wT = 32 >> ((y’ << 1) >> shift), wTL = 0 or wL = 32 >> ((x’ << 1) >> shift), wT = 0, wTL = 0.
[0119]
[0126] In FIGS. 13C and 13D, the video encoder 200 and the video decoder 300 can each determine the row above the current block (e.g., the row immediately above, although the technique is not so limited) and can determine the x coordinate in the determined row. The x coordinate in the determined row is based on the angle of the angular intra prediction mode. The video encoder 200 and the video decoder 300 can determine one of the one or more reference samples based on the determined row and the determined x coordinate.
[0120]
[0127] To determine the x - coordinate in the determined row, the video encoder 200 and the video decoder 300 may determine one of the cotangent of the angle of the angular intra - prediction mode (e.g., of the adjacent upper - right diagonal mode) or the tangent of the angle of the angular intra - prediction mode (e.g., of the adjacent lower - left diagonal mode). The video encoder 200 and the video decoder 300 may determine the x - coordinate in the determined row based on one of the cotangent or tangent of the angle of the angular intra - prediction mode, the x - coordinate of the predicted sample, and the y - coordinate of the predicted sample. For example, in the adjacent upper - right diagonal angular intra - prediction mode, the x - coordinate in the determined row is equal to x’+cotan(α)×(y’ + 1), and in the adjacent lower - left diagonal mode, the x - coordinate in the determined row is equal to x’+tan(β)×(y’ + 1), where x’ and y’ are the x and y coordinates of the modified predicted sample.
[0121]
[0128] Similarly, in FIGS. 13C and 13D, the video encoder 200 and the video decoder 300 may each determine a column (e.g., the column immediately to the left, but the technique is not so limited) to the left of the current block and may determine the y - coordinate in the determined column. The y - coordinate in the determined column is based on the angle of the angular intra - prediction mode. The video encoder 200 and the video decoder 300 may determine one of the one or more reference samples based on the determined column and the determined y - coordinate.
[0122]
[0129] To determine the y coordinate in the determined column, the video encoder 200 and the video decoder 300 may determine one of the cotangent of the angle of the angular intra prediction mode (e.g., of the adjacent bottom left diagonal mode) or the tangent (e.g., of the adjacent top right diagonal mode). The video encoder 200 and the video decoder 300 may determine the y coordinate in the determined column based on one of the cotangent or tangent of the angle of the angular intra prediction mode, the x coordinate of the prediction sample, and the y coordinate of the prediction sample. For example, in the adjacent top right diagonal angular intra prediction mode, the y coordinate in the determined column is equal to y’+tan(α)×(x’+1), and in the adjacent bottom left diagonal mode, the y coordinate in the determined column is equal to y’+cotan(β)×(x’+1), where x’ and y’ are the x and y coordinates of the modified prediction sample.
[0123]
[0130] Based on the determined x and y coordinates, the video encoder 200 and the video decoder 300 may determine reference samples (e.g., a first reference sample based on the determined row and the determined x coordinate and a second reference sample based on the determined column and the determined y coordinate). Also, the video encoder 200 and the video decoder 300 may determine weights according to the above exemplary techniques for the adjacent diagonal modes (e.g., as two examples, the adjacent top right diagonal mode and the adjacent bottom left diagonal mode). Then, based on (as one non-limiting example) Equation 1, the video encoder 200 and the video decoder 300 may determine a modified prediction sample (e.g., pred(x,y)).
[0124]
[0131] In the above, exemplary techniques for the upper right and lower left diagonal modes and the adjacent upper right diagonal mode and adjacent lower left diagonal mode have been described as exemplary angular modes to which PDPC can be applied. The exemplary techniques can be similarly extended to other angular modes. Also, in some examples, one or more reference samples have both an x - coordinate and a y - coordinate that are different from both the x - coordinate and the y - coordinate of the predicted samples in the prediction block. For example, in the above - described exemplary formula, to determine the reference sample, to determine the x - coordinate and y - coordinate in each row and column, the x - coordinate is different from the x - coordinate of the predicted sample being modified, and the y - coordinate is different from the y - coordinate of the predicted sample being modified. That is, the reference sample need not be in the same row or the same column as the predicted sample being modified.
[0125]
[0132] For the diagonal and adjacent diagonal modes, as in the case of DC, planar, horizontal, and vertical mode PDPC, when PDPC is extended to these angular modes, for example, as specified in 'J.Chen, E.Alshina, G.J.Sullivan, J.-R.Ohm, J.Boyce, "Algorithm description of Joint Exploration Test Model 7", 7th JVET meeting, Torino, Italy, July 2017, JVET - G1001, there is no additional boundary filtering process.
[0126]
[0133] The video encoder 200 and the video decoder 300 may be configured to implement ALWIP. That is, the video encoder 200 and the video decoder 300 may be configured to encode video data and decoding blocks in ALWIP mode. The ALWIP described in JVET-N0217 uses an affine linear weighted prediction model to generate a prediction of a block from neighboring reference samples. First, the neighboring samples are processed. In some cases, the neighboring samples are downsampled and then used to derive (using an affine model) a set of reduced samples that resemble an intermediate downsampled version of the prediction samples. The final prediction is obtained by upsampling the intermediate values (if necessary).
[0127]
[0134] An explanation of the ALWIP process is given in FIG. 14. FIG. 14 shows an exemplary ALWIP process for an 8×8 block. The boundary samples 1402 represent neighboring samples on the boundary of the 8×8 block and include both the upper boundary samples (bdry top ) above the 8×8 block and the left boundary samples (bdry left ) to the left of the 8×8 block. The video encoder 200 or the video decoder 300 downsamples the boundary samples 1402 to obtain reduced boundary samples 1404 that include both the upper reduced boundary samples (bdry red top ) and the left reduced boundary samples (bdry red left ). The video encoder 200 or the video decoder 300 multiplies the vector representation bdry red of the boundary samples by the matrix A k and adds the offset / bias term b k to obtain a downsampled version pred red of the prediction block represented by the gray samples in block 1406. The video encoder 200 or the video decoder 300 uses the boundary samples together with the prediction samples pred redBy upsampling and determining the values of other samples in block 1406, i.e., the white samples, the final prediction block 1408 is obtained. Matrix A k and the offset, or bias, vector b k are selected based on the mode values indicated for the block.
[0128]
[0135] An explanation of the ALWIP process is given in FIG. 11. The ALWIP process of FIG. 11 can be implemented by video encoder 200 and video decoder 300. The reference samples of the block (also called boundary samples) are downsampled to obtain reduced boundary samples. The vector representation bdry of the boundary samples red is multiplied by matrix A k and the offset / bias term b k is added to obtain the downsampled version pred of the prediction block red The final prediction is obtained by upsampling these prediction samples pred red along with the boundary samples. Matrix A k and the offset / bias vector b k are selected based on the mode values indicated for the block. Matrix A k and the offset / bias vector b k The combination of and is sometimes referred to herein as the "ALWIP mode".
[0129]
[0136] To derive intermediate prediction samples, video encoder 200 and video decoder 300 use an affine linear weighted prediction model. Three types are defined. The number of intermediate samples derived varies for each type as follows.
[0130] 1) 4×4 for block sizes where both width and height are equal to 4 2) 8×8 for block sizes where both width and height are 8 or less (i.e., 4×8, 8×4, and 8×8 blocks), except when both width and height are equal to 4 3) 16×16 for blocks where at least one of the width and height is greater than 8 In each of these three cases, different numbers of ALWIP modes, namely 35, 19, and 11 respectively, are used.
[0131]
[0137] The video encoder 200 and the video decoder 300 can be configured to signal ALWIP as follows.
[0132] a) A flag (alwip_flag) is signaled to indicate that the current block is coded in ALWIP.
[0133] b) When the block is coded in ALWIP, another flag is signaled to indicate whether the current block is coded in the ALWIP-MPM mode.
[0134] a. If the current block is coded in ALWIP MPM, the MPM index is signaled.
[0135] b. In other cases, an index to the remaining mode values is signaled. The alwip_flag can be context-coded in four allowed contexts as follows.
[0136] - When the block width > 2 * height or height > 2 * width, context 3 is used.
[0137] - In other cases, context ctxId is used, where ctxId is derived as follows.
[0138] 〇 Initialize ctxId to 0 〇 If the left neighboring block is coded in ALWIP, ctxId++. 〇 If the upper neighboring block is coded in ALWIP, ctxId++.
[0138] The video encoder 200 and the video decoder 300 can be configured to derive ALWIP MPM as follows.
[0139] 1) LeftIntraMode and AboveIntraMode are initialized to -1. 2) When the left neighboring block is intra-coded, a. When the left neighboring block is coded in ALWIP mode L, i. If L is of the same ALWIP type as the current block, LeftIntraMode is set equal to L.
[0140] b. The intra-mode of the left neighboring block is mapped to an ALWIP mode of the same type as the current block and assigned to LeftIntraMode.
[0141] 3) When the upper neighboring block is intra-coded, a. When the upper neighboring block is coded in ALWIP mode A, i. If A is of the same ALWIP type as the current block, AboveIntraMode is set equal to A.
[0142] b. The intra-mode of the upper neighboring block is mapped to an ALWIP mode of the same type as the current block and assigned to AboveIntraMode.
[0143] 4) The MPM is then derived based on LeftIntraMode and AboveIntraMode.
[0144]
[0139] In the present disclosure, a block coded with ALWIP may be referred to as an ALWIP-coded block or an ALWIP block, and other blocks (coded with regular intra prediction, intra sub-partition, or multiple reference lines) may be referred to as non-ALWIP blocks.
[0145]
[0140] The video encoder 200 and the video decoder 300 may be configured to perform single-step linear interpolation. For a W×H block where max(W,H)≧8, the prediction signal is red ×H red the reduced prediction signal pred red above. Depending on the block shape, the video encoder 200 and the video decoder 300 perform linear interpolation in the vertical direction, the horizontal direction, or both directions. In some examples, when linear interpolation should be applied in both directions, the video encoder 200 and the video decoder 300 apply linear interpolation horizontally first if W<H, or vertically first otherwise.
[0146]
[0141] Without loss of generality, consider a W×H block where max(W,H)≧8 and W≧H. In that case, the video encoder 200 and the video decoder 300 may perform one-dimensional linear interpolation as follows. For the purpose of explanation, linear interpolation is described with respect to the vertical direction. First, the reduced prediction signal is extended upward by the boundary signal. The vertical upsampling factor U ver =H / H red is defined, and
[0147]
Number
[0148] is written. Then, the extended, reduced prediction signal is defined by the following equation.
[0149]
Number
[0150]
[0142] Then, from this extended, reduced prediction signal, a vertical-direction linear interpolation prediction signal is generated by the following equation.
[0151]
Number
[0152]
[0143] The techniques described above involve several potential problems. ALWIP generates a set of "intermediate" prediction samples by multiplying the reduced boundary samples by a matrix and a bias vector. The intermediate samples are then upsampled using linear interpolation as necessary to generate the prediction block. The matrix used for ALWIP is selected from a set of several matrices, but no finite set of matrices can efficiently (and in some cases, may not be able to) predict the almost infinite number of blocks that occur in video content. The prediction error becomes larger at the edges of the prediction block, resulting in more bits that need to be compressed. Linear interpolation of samples uses the intermediate prediction block and boundary samples to generate the remaining samples, but not all boundary samples are used for the interpolation function. As shown in FIG. 14, the final prediction block pred is generated from the intermediate prediction samples, one boundary is downsampled (the top in the example of FIG. 14), and one boundary is left unmodified. This affects the prediction accuracy.
[0153] As used herein, a "block edge sample" generally refers to a sample in a block adjacent to one of the four boundaries of the block, such as samples in the first and last rows of the block and samples in the first and last columns of the block. As used herein, the top, left, bottom, and right edge samples of a block generally refer to samples in blocks adjacent to the top, left, bottom, and right boundaries of the block, respectively. Note that the top left corner sample of a block can be considered both a top edge sample and a left edge sample. In some examples, understand that the top left corner sample may be considered a top edge sample but not a left edge sample, and in other examples, the top left corner sample may be considered a left edge sample but not a top edge sample. Similar considerations can apply to the top right, bottom right, and bottom left corner samples of a block.
[0154] As used herein, an edge band of samples of a block generally refers to samples in a block adjacent to any of the four boundaries of the block, such as samples in some of the first or last rows of the block or samples in some of the first or last columns of the block. Similar definitions can also be defined for the top, left, right, and bottom edge bands of samples of a block. As used herein, the n top edge band of samples of a block generally refers to samples belonging to the top n rows of the block, and the n bottom edge band of samples of a block is defined as samples belonging to the bottom n rows of the block. The n left edge band of samples of a block is defined as samples belonging to the left n columns of the block, and the n right edge band of samples of a block is defined as samples belonging to the right n columns of the block. In these examples, n is an integer.
[0155]
[0146] FIG. 15 shows some examples of the boundary bands defined above. For example, block 1502 (indicated by the bold black line) includes the left edge sample 1504 shown in gray. Block 1506 (indicated by the bold black line) includes the 3 upper edge bands 1512 of the sample and the 2 lower edge bands 1514 of the sample.
[0156]
[0147] In the present disclosure, techniques that can improve the efficiency of ALWIP will be described. The techniques described below can be used separately or in combination.
[0157]
[0148] In some examples, the upsampling process described above can be modified so that the prediction error of the samples can be reduced. For example, the video encoder 200 and the video decoder 300 can be configured to perform an additional filtering stage for reducing the prediction error. In some examples, this additional filtering stage can be effectively incorporated into the interpolation or upsampling stage such that the additional filtering is not separate from but part of the interpolation or upsampling stage. In other examples, the additional filtering can be performed instead of the interpolation or upsampling stage.
[0149] In some examples, the video encoder 200 and the video decoder 300 can be configured to perform further filtering on the upper and left edge samples after linear interpolation is applied in one or both directions to generate prediction samples. For example, filter F1 can be applied to the upper edge samples in the vertical direction, and filter F2 can be applied to the left edge samples in the horizontal direction. The video encoder 200 and the video decoder 300 can be configured to use all boundary reference samples in an additional filter stage. In some examples, the video encoder 200 and the video decoder 300 can be configured to apply different downsampling filters to the boundary samples to generate a reduced set of boundary reference samples for the additional filter stage.
[0158]
[0150] The video encoder 200 and the video decoder 300 may be configured to select filters F1 and F2 from a set of filters that can be signaled or pre-determined. A non-exhaustive set of coefficients of such filters is as follows.
[0159] 1.
[0121] 2. [1] 3. [1 2 2 2 1] 4. [1 4 6 4 1] 5.
[0013]
[0151] In the above example, the filter of [1] can effectively be a "copy" filter that copies the sample value to which the filter is applied without averaging. In contrast, the [1 1 1 1] filter can represent an averaging filter process. Filters with other values can represent weighted averaging filters. The above filters 1 to 4 are symmetric filters such that intermediate coefficients (e.g., 2 in filter 1, 6 in filter 4, etc.) are applied to the samples being filtered.
[0160]
[0152] In some examples, filter F1 and filter F2 may not be the same. In other examples, the video encoder 200 and the video decoder 300 may select a filter based on the upsampling factor used in the ALWIP upsampling process. In some examples, the video encoder 200 and the video decoder 300 may apply an additional filter stage to the upper edge samples of a block only when the upsampling factor is greater than 1 in the horizontal direction. In some examples, the video encoder 200 and the video decoder 300 may apply an additional filter stage to the left edge samples of a block only when the upsampling factor is greater than 1 in the vertical direction.
[0161]
[0153] In some examples, the additional filter stage may be implemented similar to the PDPC operation, where the predicted sample is updated using a weighted average of the prediction and boundary samples.
[0162]
[0154] FIG. 16 shows an example where the boundary reference sample is used without downsampling and there is one intermediate prediction sample value in the lower right. UpV and UpH indicate the upsampling factors in the vertical and horizontal directions, respectively.
[0163]
[0155] In this example, assume that pred(x, y) is the prediction obtained as the result of ALWIP linear interpolation. The additional step modifies pred(x, y) as follows.
[0164]
Equation
[0165]
[0156] Note that the above values of 32 and 64 are selected based on the precision of the values wL and wT, and may be different for different precisions of wT and wL. In this example, assume that the values of wT and wL are in the range from 0 to 64, and in some cases, wT, wL, and 64 - wT - wL are constrained to be non - negative. The weights can be derived as follows.
[0166]
Equation
[0167] Here, the shift value can be fixed or derived using the width and height of the block, for example, shift = (log2(width)+log2(height)+2)>>2.
[0157] In some cases, the value of the prediction sample corresponding to the intermediate prediction position (e.g., P in FIG. 16) is not modified.
[0168]
[0158] When modifying samples in other parts of the block, only the left or upper boundary samples can be used for additional filter stages. For example, for sample (x, y) with respect to the upper left sample of the block, when the value of x is greater than or equal to a threshold (e.g., UpH), the value of wL can be set equal to 0. Similarly, when the value of y is greater than or equal to a threshold (e.g., UpV), the value of wT can be set equal to 0.
[0169]
[0159] In some examples, the additional filter stage is applied only to modify the values of the sample positions at the n1 upper edge samples and the n2 left edge samples of the block, where the values of n1 and n2 can be determined by the upsampling factor for ALWIP in the block (e.g., n1 can be equal to UpV - 1, and n2 can be equal to UpH - 1, where UpV and UpH are the upsampling factors in the vertical and horizontal directions, respectively).
[0170]
[0160] In some examples, the upsampling process is modified such that samples are predicted using position - dependent weights, or in other words, linear interpolation and additional stage operations are combined in one step.
[0171]
[0161] The prediction of all samples in the block can be generalized as follows.
[0172] When (x, y) does not belong to an intermediate prediction sample, the value pred(x, y) is determined as follows (x and y are with respect to the lower right sample of P3).
[0173]
Number
[0174] Here, the values of the offset and the shift are selected to normalize the predicted sample values, and the values are set as w1 = x * y, w2 = (UpH - 1 - x) * y, w3 = (UpH - 1 - x) * (UpV - 1 - y), w4 = x * (UpH - 1 - y), and wL and wT are determined based on the same formula as PDPC, with the following exceptions.
[0175] - When L and T belong to the boundary reference, w2, w3, and w4 are set equal to 0.
[0176] - Otherwise, when L does not belong to the boundary and T belongs to the boundary, wL, w3, and w4 are set equal to 0.
[0177] - Otherwise, when L belongs to the boundary but T does not belong to the boundary, wT, w3, and w2 are set equal to 0.
[0178] - In other cases, wL and wT are set equal to 0.
[0179]
[0162] In some examples, the value of the predicted sample is derived in the same way as the derivation of the plane prediction. For example, in FIG. 17, the sample value at x, y is derived using the same derivation as the plane prediction by deriving the horizontal prediction from L (or P2 and P3), P4, and P1, and deriving the vertical prediction from T (or P3 and P4), P1, and P2.
[0180]
[0163] Note that the values of w1, w2, w3, w4, wL, and wT are only shown as examples, and other values of these weights can be selected.
[0181]
[0164] In some examples, when position-dependent weights are used to modify the upsampling process, the selection of the weights may be based on the specific mode / matrix used with the ALWIP. In some cases, a mapping table may be used to interpret the intra prediction mode corresponding to a specific matrix. The position-dependent weights may be selected based on the interpreted intra prediction mode, and one or more boundary reference samples may be used to calculate the predicted value. In some cases, a default set of weights may be used for position-dependent weights that do not depend on the matrix used. In some examples, the position-dependent weights may also depend on other characteristics including, but not limited to, block shape (width, height), aspect ratio, etc.
[0182]
[0165] FIG. 18 is a block diagram illustrating an exemplary video encoder 200 that may implement the techniques of the present disclosure. FIG. 18 is provided for illustrative purposes and should not be considered as limiting the techniques broadly illustrated and described in the present disclosure. For illustrative purposes, in the present disclosure, the video encoder 200 will be described in the context of video coding standards such as the HEVC video coding standard and the developing H.266 video coding standard. However, the techniques of the present disclosure are not limited to these video coding standards and are generally applicable to video encoding and decoding.
[0183]
[0166] In the example of FIG. 18, 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 encoding unit 220.
[0184]
[0167] The video data memory 230 may store video data to be encoded by components of the video encoder 200. The video encoder 200 may receive, for example, video data stored in the video data memory 230 from a video source 104 (FIG. 1). The DPB 218 may act as a reference picture memory that stores reference video data used in prediction of subsequent video data by the video encoder 200. The video data memory 230 and the DPB 218 may be formed by any of various memory devices, such as a dynamic random access memory (DRAM) including a synchronous DRAM (SDRAM), a magnetoresistive RAM (MRAM), a resistive RAM (RRAM (registered trademark)), or other types of memory devices. The video data memory 230 and the DPB 218 may be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 may be on-chip with other components of the video encoder 200 or off-chip with respect to those components, as illustrated.
[0185]
[0168] In the present disclosure, a reference to the video data memory 230 should not be construed as being limited to the memory internal to the video encoder 200 or, unless otherwise specifically stated, limited to the memory external to the video encoder 200. Instead, a reference to the video data memory 230 is to be understood as a reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data of the current block to be encoded). The memory 106 of FIG. 1 may also provide temporary storage of outputs from various units of the video encoder 200.
[0186]
[0169] The various units of FIG. 18 are shown to assist in understanding the operations performed by video encoder 200. The units may be implemented as fixed function circuitry, programmable circuitry, or a combination thereof. Fixed function circuitry refers to circuitry that provides a specific function and is preset to the operations that may be performed. Programmable circuitry refers to circuitry that can be programmed to perform various tasks and provide a flexible function in the operations that may be performed. For example, programmable circuitry may execute software or firmware that operates the programmable circuitry in a manner defined by software or firmware instructions. Fixed function circuitry may execute software instructions (e.g., to receive or output parameters), but the type of operations performed by fixed function circuitry is generally invariant. In some examples, one or more of the units may be separate circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0187]
[0170] Video encoder 200 may include a programmable core formed from an arithmetic logic unit (ALU), an elementary function unit (EFU), digital circuitry, analog circuitry, and / or programmable circuitry. In an example where the operations of video encoder 200 are performed using software executed by programmable circuitry, memory 106 (FIG. 1) may store the object code of the software that video encoder 200 receives and executes, or another memory (not shown) within video encoder 200 may store such instructions.
[0188]
[0171] Video data memory 230 is configured to store received video data. Video encoder 200 may retrieve a picture of video data from video data memory 230 and provide the video data to residual generation unit 204 and mode selection unit 202. The video data in video data memory 230 may be raw video data to be encoded.
[0189]
[0172] 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 for performing video prediction according to other prediction modes. By way of example, the mode selection unit 202 may include a palette unit, an intra block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, and the like.
[0190]
[0173] Generally, the mode selection unit 202 coordinates a plurality of encoding paths to test combinations of encoding parameters and the resulting rate distortion values for such combinations. The encoding parameters may include the partitioning of CTUs into CUs, the prediction mode of the CU, the transform type for the residual data of the CU, the quantization parameter for the residual data of the CU, and the like. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a rate distortion value better than other tested combinations.
[0191]
[0174] The video encoder 200 may partition a picture fetched from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs within a slice. The mode selection unit 202 may partition the CTUs of the picture according to a tree structure, such as the QTBT structure or the quad tree structure of HEVC described above. As described above, the video encoder 200 may form one or more CUs from partitioning the CTUs according to the tree structure. Such CUs are sometimes generally referred to as "video blocks" or "blocks".
[0192]
[0175] Generally, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or in HEVC, the overlapping part of the PU and TU). For the inter prediction of the current block, the motion estimation unit 222 may perform a motion search to identify one or more exactly matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). In particular, the motion estimation unit 222 may calculate a value representing how similar a potential reference block is to the current block, for example, according to the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 may generally 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 lowest value obtained from these calculations, which indicates the reference block that most closely matches the current block.
[0193]
[0176] 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 the current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, in uni-directional inter prediction, the motion estimation unit 222 may provide a single motion vector, while in bi-directional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then generate a prediction block using the motion vectors. For example, the motion compensation unit 224 may retrieve data of the reference block using the motion vectors. As another example, when the motion vectors have fractional sample accuracy, the motion compensation unit 224 may interpolate the values of the prediction block according to one or more interpolation filters. Moreover, in bi-directional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the respective motion vectors and may combine the retrieved data, for example, through sample-by-sample averaging or weighted averaging.
[0194]
[0177] As another example, for intra prediction, or intra prediction coding, the intra prediction unit 226 may generate a prediction block from samples adjacent to the current block. For example, in the directional mode, the intra prediction unit 226 may generally mathematically combine the values of neighboring samples and populate these calculated values in a defined direction across the current block to generate a prediction block. As another example, in the DC mode, the intra prediction unit 226 may calculate the average of neighboring samples for the current block and generate a prediction block that includes this obtained average for each sample of the prediction block. As another example, in the ALWIP mode, the intra prediction unit 226 may derive a subset of left-edge samples and a subset of top-edge samples based on a set of left-edge neighboring samples of the current block and a set of top-edge neighboring samples of the current block, apply an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples, and filter the intermediate samples using the set of left-edge neighboring samples of the current block and the set of top-edge neighboring samples of the current block to generate a final prediction block.
[0195]
[0178] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the raw uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The obtained sample-by-sample difference defines the residual block for the current block. In some examples, the residual generation unit 204 may also determine the difference between 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.
[0196]
[0179] In an example where the mode selection unit 202 divides a CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs having various sizes. As described above, the size of a CU may refer to the size of the luma coding block of the CU, and the size of a PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a specific CU is 2N×2N, the video encoder 200 may support a 2N×2N or N×N PU size for intra prediction and a symmetric PU size of 2N×2N, 2N×N, N×2N, N×N, or the like for inter prediction. The video encoder 200 and the video decoder 300 may also support an asymmetric division of the 2N×nU, 2N×nD, nL×2N, and nR×2N PU sizes for inter prediction.
[0197]
[0180] In an example where the mode selection unit does not further divide a CU into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As described above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 may support a CU size of 2N×2N, 2N×N, or N×2N.
[0198]
[0181] As some examples, in other video coding techniques such as 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 currently encoded block via each unit associated with the coding technique. In some examples such as palette mode coding, the mode selection unit 202 may not generate a prediction block and instead may generate a syntax element indicating a manner in which the block should be reconstructed 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.
[0199]
[0182] As described above, the residual generation unit 204 receives video data for the current block and the 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.
[0200]
[0183] 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 the 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, such as a first-order transform and a second-order transform, such as a rotation transform, on the residual block. In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0201]
[0184] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to generate 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 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 (e.g., via the mode selection unit 202). Quantization may result in a loss of information, and thus the quantized transform coefficients may have lower accuracy than the original transform coefficients generated by the transform processing unit 206.
[0202]
[0185] The inverse quantization unit 210 and the inverse transform processing unit 212 can apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block in order to reconstruct the residual block from the transform coefficient block. The reconstruction unit 214 can generate a reconstruction block corresponding to the current block (although potentially with some distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 can add the samples of the reconstructed residual block to the corresponding samples from the prediction block generated by the mode selection unit 202 to generate the reconstruction block.
[0203]
[0186] The filter unit 216 can perform one or more filter operations on the reconstruction block. For example, the filter unit 216 can perform a deblocking operation to reduce blocking artifacts along the edges of the CU. In some examples, the operation of the filter unit 216 may be skipped.
[0204]
[0187] The video encoder 200 stores the reconstruction block in the DPB 218. For example, in an example where the operation of the filter unit 216 is not performed, the reconstruction unit 214 can store the reconstruction block in the DPB 218. In an example where the operation of the filter unit 216 is performed, the filter unit 216 can store the filtered reconstruction block in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve a reference picture formed from the reconstructed (and potentially filtered) blocks from the DPB 218 to inter-predict blocks of a picture to be encoded later. In addition, the intra prediction unit 226 can use the reconstruction blocks in the DPB 218 of the current picture to intra-predict other blocks in the current picture.
[0205]
[0188] Generally, entropy encoding unit 220 may entropy-encode syntax elements received from other functional components of video encoder 200. For example, entropy encoding unit 220 may entropy-encode a quantized transform coefficient block from quantization unit 208. As another example, entropy encoding unit 220 may entropy-encode prediction syntax elements (e.g., motion information for inter prediction, or intra mode information for intra prediction) from mode selection unit 202. Entropy encoding unit 220 may perform one or more entropy encoding operations on syntax elements, which are another example of video data, to generate entropy-encoded data. For example, entropy encoding unit 220 may perform context adaptive variable length coding (CAVLC) operation, CABAC operation, variable-to-variable (V2V) length coding operation, syntax-based context adaptive binary arithmetic coding (SBAC) operation, probability interval partitioning entropy (PIPE) coding operation, exponential Golomb coding operation, or another type of entropy encoding operation on the data. In some examples, entropy encoding unit 220 may operate in a bypass mode where the syntax elements are not entropy-encoded.
[0206]
[0189] Video encoder 200 may output a bitstream including entropy-encoded syntax elements required to reconstruct blocks of a slice or picture. In particular, entropy encoding unit 220 may output the bitstream.
[0207]
[0190] The operations described above are described with respect to blocks. Such descriptions are to be understood as being for 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.
[0208]
[0191] In some examples, the operations performed on the luma coding blocks need not be repeated for the chroma coding blocks. As an example, the operations for identifying the motion vector (MV) and reference picture for the luma coding blocks need not be repeated to identify the MV and reference picture for the chroma blocks. Instead, the MV for the luma coding blocks may be scaled to determine the MV for the chroma blocks, and the reference picture may be the same. As another example, the intra prediction process may be the same for the luma coding blocks and chroma coding blocks.
[0209]
[0192] Video encoder 200 represents an example of a device configured to encode video data, including a memory configured to store video data and one or more processing units implemented in a circuit, where the one or more processing units are configured to implement the techniques of the present disclosure, including techniques for upsampling in affine linear weighted intra prediction.
[0210]
[0193] FIG. 19 is a block diagram showing an exemplary video decoder 300 that can implement the techniques of the present disclosure. FIG. 19 is provided for illustrative purposes and is not a limitation on the techniques broadly illustrated and described in the present disclosure. For illustrative purposes, the present disclosure describes that the video decoder 300 will be described according to the techniques of JEM and HEVC. However, the techniques of the present disclosure can be implemented by video coding devices configured according to other video coding standards.
[0211]
[0194] In the example of FIG. 19, the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include additional units for performing predictions according to other prediction modes. By way of example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, and the like. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0212]
[0195] The CPB memory 320 can store video data such as an encoded video bitstream to be decoded by components of the video decoder 300. The video data stored in the CPB memory 320 can be obtained, for example, from the computer-readable medium 110 (FIG. 1). The CPB memory 320 can include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. Also, the CPB memory 320 can store video data other than the syntax elements of the coded picture, such as temporary data representing outputs from various units of the video decoder 300. The DPB 314 generally stores decoded pictures that can be output and / or used as reference video data when the video decoder 300 decodes subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 can be formed by any of various memory devices, such as a dynamic random access memory (DRAM) including a synchronous DRAM (SDRAM), a magnetoresistive RAM (MRAM), a resistive RAM (RRAM), or other types of memory devices. The CPB memory 320 and the DPB 314 can be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 can be on-chip with other components of the video decoder 300 or off-chip with respect to those components.
[0213]
[0196] Additionally or alternatively, in some examples, the video decoder 300 can retrieve encoded video data from the memory 120 (FIG. 1). That is, the memory 120 can store the data discussed above using the CPB memory 320. Similarly, the memory 120 can store instructions to be executed by the video decoder 300 when some or all of the functionality of the video decoder 300 is implemented in software executed by the processing circuitry of the video decoder 300.
[0214]
[0197] The various units shown in FIG. 19 are shown to assist in understanding the operations performed by the video decoder 300. The units may be implemented as fixed-function circuits, programmable circuits, or combinations thereof. Similar to FIG. 18, a fixed-function circuit refers to a circuit that provides a specific function and is preset to the operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provide a flexible function in the operations that can be performed. For example, a programmable circuit may execute software or firmware that operates the programmable circuit in a manner defined by instructions of the software or firmware. A fixed-function circuit may execute software instructions (e.g., for receiving or outputting parameters), but the type of operations performed by the fixed-function circuit is generally invariant. In some examples, one or more of the units may be separate circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.
[0215]
[0198] The video decoder 300 may include a programmable core formed from an ALU, EFU, digital circuits, analog circuits, and / or programmable circuits. In an example where the operations of the video decoder 300 are performed by software executed on a programmable circuit, on-chip or off-chip memory may store the instructions (e.g., object code) of the software that the video decoder 300 receives and executes.
[0216]
[0199] The entropy decoding unit 302 may receive encoded video data from the CPB and perform entropy decoding on the video data to reproduce 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.
[0217]
[0200] Generally, video decoder 300 reconstructs a picture block by block. Video decoder 300 may perform a reconstruction operation individually for each block (where the block being currently reconstructed, i.e., the block being currently decoded, may be referred to as the "current block").
[0218]
[0201] Entropy decoding unit 302 may entropy decode syntax elements defining the quantized transform coefficients of the quantized transform coefficient block, as well as transform information such as quantization parameter (QP) and / or transform mode indication. Inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine the degree of quantization and, similarly, the degree of inverse quantization to be applied by inverse quantization unit 306. Inverse quantization unit 306 may perform, for example, a left shift operation on a bit-by-bit basis to inverse quantize the quantized transform coefficients. Inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0219]
[0202] After inverse quantization unit 306 forms the transform coefficient block, inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block related to the current block. For example, inverse transform processing unit 308 may apply an inverse DCT, inverse integer transform, inverse Karunen - Loève transform (KLT), inverse rotation transform, inverse direction transform, or another inverse transform to the coefficient block.
[0220]
[0203] Furthermore, the prediction processing unit 304 generates a prediction block according to the prediction information syntax element entropy-decoded by the entropy decoding unit 302. For example, when the prediction information syntax element indicates that the current block is inter-predicted, the motion compensation unit 316 may generate a prediction block. In this case, the prediction information syntax element may indicate a reference picture in the DPB 314 from which the reference block should be taken, as well as a motion vector that identifies the location of the reference block in the reference picture relative to the location of the current block in the current picture. The motion compensation unit 316 may generally perform the inter-prediction process in a substantially similar manner as described with respect to the motion compensation unit 224 (FIG. 18).
[0221]
[0204] As another example, when 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. As another example, when the prediction information syntax element indicates that the current block is intra-predicted in the ALWIP mode, the intra-prediction unit 318 may derive a subset of left-edge samples and a subset of top-edge samples based on a set of left-edge neighboring samples of the current block and a set of top-edge neighboring samples of the current block, apply an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples, and filter the intermediate samples using the set of left-edge neighboring samples of the current block and the set of top-edge neighboring samples of the current block to generate a final prediction block. Also in this case, the intra-prediction unit 318 may generally perform the intra-prediction process in a substantially similar manner as described with respect to the intra-prediction unit 226 (FIG. 18). The intra-prediction unit 318 may retrieve data of neighboring samples for the current block from the DPB 314.
[0222]
[0205] The reconstruction unit 310 may reconstruct the current block using a prediction block and a residual block. For example, the reconstruction unit 310 may add the samples of the residual block to the corresponding samples of the prediction block to reconstruct the current block.
[0223]
[0206] The filter unit 312 may perform one or more filter operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blockiness artifacts along the edges of the reconstructed block. The operation of the filter unit 312 is not necessarily performed in all cases.
[0224]
[0207] The video decoder 300 may store the reconstructed block in the DPB 314. As discussed above, the DPB 314 may provide reference information, such as samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation, to the prediction processing unit 304. Moreover, the video decoder 300 may output the decoded picture from the DPB onto a display device, such as the display device 118 of FIG. 1, for subsequent presentation.
[0225]
[0208] In this way, the video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data and one or more processing units implemented in a circuit, and the one or more processing units are configured to implement the techniques of the present disclosure, including techniques for upsampling in affine linear weighted intra prediction.
[0226]
[0209] FIG. 20 is a flowchart showing an exemplary process for encoding a current block. The current block may include a current CU. Although described with respect to the video encoder 200 (FIGS. 1 and 18), it should be understood that other devices may be configured to perform a method similar to the method of FIG. 20.
[0227]
[0210] In this example, the video encoder 200 first predicts (350) the current block. For example, the video encoder 200 may form a prediction block for the current block using any of the intra prediction techniques described in this disclosure. The video encoder 200 may then calculate (352) a residual block for the current block. To calculate the residual block, the video encoder 200 may calculate the difference between the original uncoded block and the prediction block for the current block. The video encoder 200 may then transform and quantize (354) the coefficients of the residual block. Next, the video encoder 200 may scan (356) the quantized transform coefficients of the residual block. During or following the scan, the video encoder 200 may entropy encode (358) the coefficients. For example, the video encoder 200 may encode the coefficients using CAVLC or CABAC. The video encoder 200 may then output (360) the entropy encoded data of the block.
[0228]
[0211] FIG. 21 is a flowchart showing an exemplary process for decoding a current block of video data. The current block may include a current CU. Although described with respect to the video decoder 300 (FIGS. 1 and 19), it should be understood that other devices may be configured to perform in a manner similar to the method of FIG. 21.
[0229]
[0212] The video decoder 300 can receive entropy-coded data of the current block, such as entropy-coded prediction information and entropy-coded data for the coefficients of the residual block corresponding to the current block (370). The video decoder 300 can entropy-decode the entropy-coded data to determine prediction information about the current block and reproduce the coefficients of the residual block (372). The video decoder 300 can predict the current block using, for example, an intra prediction or an inter prediction mode indicated by the prediction information about the current block, to calculate a prediction block for the current block (374). The video decoder 300 can predict the current block using, for example, any of the intra prediction techniques described in the present disclosure. The video decoder 300 can then inverse-scan the reproduced coefficients to create a block of quantized transform coefficients (376). The video decoder 300 can then inverse-quantize and inverse-transform the coefficients to generate a residual block (378). The video decoder 300 can finally decode the current block by combining the prediction block and the residual block (380).
[0230]
[0213] FIG. 22 is a flowchart showing an exemplary process for decoding a current block of video data. The current block can include a current CU. Although described with respect to the video decoder 300 (FIGS. 1 and 19), it should be understood that other devices can be configured to implement a method similar to the method of FIG. 22. For example, the decoding loop of the video encoder 200 (FIGS. 1 and 18) can also implement the technique of FIG. 22.
[0231]
[0214] In the example of FIG. 22, the video decoder 300 determines (382) that the current block of video data is encoded in the ALWIP mode. The video decoder 300 derives (384) a subset of left-edge samples and a subset of top-edge samples based on a set of left-edge neighboring samples of the current block and a set of top-edge neighboring samples of the current block. The video decoder 300 may derive the subset of left-edge samples, for example, by downsampling the set of left-edge neighboring samples using averaging, and may derive the subset of top-edge samples by downsampling the set of top-edge neighboring samples using averaging.
[0232]
[0215] The set of top-edge neighboring samples may have, for example, a total of N samples, and the subset of top-edge samples may have a total of N / 2 samples, where N is an integer representing the number of columns included in the current block. The set of left-edge neighboring samples may have, for example, a total of N samples, and the subset of left-edge samples may have a total of N / 2 samples, where N is an integer representing the number of rows included in the current block. In one example, the current block may be an N×M block of samples, where N is an integer value representing the number of columns in the current block and the number of samples in the set of top-edge samples, and M is an integer value representing the number of rows in the current block and the number of samples in the set of left-edge samples. N and M may or may not be equal. The set of left-edge samples may have M / 2 samples, and the set of top-edge samples may have N / 2 samples.
[0233]
[0216] The video decoder 300 applies an affine model to a subset of left-edge samples and a subset of top-edge samples (386) to generate an intermediate block of intermediate samples. To apply an affine model to a subset of left-edge samples and a subset of top-edge samples to generate an intermediate block of intermediate samples, the video decoder 300 can, for example, multiply a matrix and a bias vector by a subset of left-edge samples and a subset of top-edge samples.
[0234]
[0217] To generate the final prediction block, video decoder 300 filters intermediate samples (388) using a set of left-edge neighboring samples and a set of top-edge neighboring samples of the current block. To filter intermediate samples to generate the final prediction block, video decoder 300 may upsample the intermediate samples using, for example, a second subset of left-edge samples different from a subset of left-edge samples and a second subset of top-edge samples different from a subset of top-edge samples. Video decoder 300 may upsample the intermediate samples based on the actual sample values in the set of top-edge samples or the set of left-edge samples, as opposed to sample values from a subset of top-edge samples or a subset of left-edge samples, where the subset is obtained by averaging and is different from the set. To filter intermediate samples to generate the final prediction block, video decoder 300 may apply one or more filters in the vertical direction and one or more filters in the horizontal direction. To apply one or more filters in the vertical direction, video decoder 300 may use samples from the set of top-edge samples to perform linear interpolation in the vertical direction. That is, if the subset of top-edge samples includes M / 2 samples, video decoder 300 may use a different subset of the M top-edge samples when applying one or more filters in the vertical direction. The samples used for interpolation may be the actual samples of the M top-edge samples instead of the samples determined from averaging. As part of applying one or more filters in the vertical direction, video decoder 300 may comprise applying position-dependent weights to at least some of the M samples in the set of top-edge samples.
[0235]
[0218] The video decoder 300 decodes (390) a current block of video data based on a final prediction block. To decode the current block of video data based on the final prediction block, the video decoder 300 may determine a residual value of the current block of video data, add the residual value to the filtered prediction block to determine a reconstructed block for the current block of video data, and apply one or more filters to the reconstructed block to generate a decoded block of video data. The video decoder 300 may then output a picture including the decoded block of video data to a display and / or storage. The video decoder 300 may store, for example, a copy of the picture for use when decoding other pictures of the video data.
[0236]
[0219] According to the above example, it should be recognized that some of the acts or events of any of the techniques described herein may be performed in a different sequence, may be added, merged, or completely excluded (e.g., not all of the described acts or events are necessary for the practice of the technique). Moreover, in some examples, the acts or events may not be performed sequentially, but may be performed, for example, simultaneously through multi-threaded processing, interrupt processing, or multiple processors.
[0237]
[0220] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on a computer-readable medium as one or more instructions or code, or transmitted via a computer-readable medium and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium such as a data storage medium, or may include a communication medium including any medium that facilitates transfer of a computer program from one place to another, for example, according to a communication protocol. In this way, the computer-readable medium generally may correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium such as a signal or a carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0238] By way of example, and not limitation, such computer-readable storage media can include one or more of RAM, ROM, EEPROM (registered trademark), CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection can be properly called a computer-readable medium. For example, if the instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but rather are directed to non-transient, tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc (registered trademark), optical disc, digital versatile disc (DVD), floppy (registered trademark) disk, and Blu-ray disc, where disk typically magnetically reproduces data and disc optically reproduces data with a laser. Combinations of the above should also be included within the scope of computer-readable media.
[0239] The
[0222] command can be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated circuits or discrete logic circuits. Thus, the term "processor" as used herein may refer to either the foregoing structure or any other structure suitable for implementation of the techniques described herein. Further, in some aspects, the functions described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. Also, the techniques may be implemented entirely in one or more circuits or logic elements.
[0240] The techniques of the present disclosure can be implemented in a variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs) or sets of ICs (e.g., chip sets). In the present disclosure, various components, modules, or units have been described in order to emphasize the functional aspects of devices configured to implement the disclosed techniques, but those components, modules, or units do not necessarily have to be realized by different hardware units. Rather, as described above, the various units can be combined in a codec hardware unit, including one or more of the processors described above, along with suitable software and / or firmware, or can be provided by a set of interoperable hardware units.
[0241] A variety of examples have been described. These and other examples fall within the scope of the following claims.
Claims
Claim 1 A method for decoding video data, comprising: determining that a current block of the video data is encoded in an affine linear weighted intra prediction (ALWIP) mode; deriving a subset of left-edge samples and a subset of top-edge samples based on a set of left-edge neighboring samples of the current block and a set of top-edge neighboring samples of the current block, wherein the subset of left-edge samples includes fewer samples than the set of left-edge samples, and the subset of top-edge samples includes fewer samples than the set of top-edge samples; applying an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples; filtering the intermediate samples using the set of left-edge neighboring samples and the set of top-edge neighboring samples of the current block to generate a final prediction block; decoding the current block of the video data based on the final prediction block; A method comprising the above steps. Claim 2 Deriving the subset of left-edge samples comprises downsampling the set of left-edge neighboring samples, wherein each sample of the subset of left-edge samples comprises an average of two or more samples of the set of left-edge samples. Deriving the subset of top-edge samples comprises downsampling the set of top-edge neighboring samples, wherein each sample of the subset of top-edge samples comprises an average of two or more samples of the set of top-edge samples. The method according to claim 1. Claim 3 Applying the affine model to the subset of left-edge samples and the subset of top-edge samples to generate the intermediate block of intermediate samples comprises multiplying the subset of left-edge samples and the subset of top-edge samples by a matrix and a bias vector. The method according to claim 1. Claim 4 The set of upper-edge neighboring samples has a total of N samples, and the subset of upper-edge samples has a total of N / 2 samples, where N is an integer representing the number of columns included in the current block, the method according to claim 1.
5. The set of left-edge neighboring samples has a total of N samples, and the subset of left-edge samples has a total of N / 2 samples, where N is an integer representing the number of rows included in the current block, the method according to claim 1.
6. Filtering the intermediate samples to generate the final prediction block comprises upsampling the intermediate samples using a second subset of left-edge samples different from the subset of left-edge samples and a second subset of upper-edge samples different from the subset of upper-edge samples, the method according to claim 1.
7. The current block is an N×M block of samples, where N is an integer value representing the number of columns in the current block and the number of samples in the set of upper-edge samples, and M is an integer value representing the number of rows in the current block and the number of samples in the set of left-edge samples, the subset of left-edge samples has M / 2 samples, and the subset of upper-edge samples has N / 2 samples. the method according to claim 1.
8. Filtering the intermediate samples to generate the final prediction block comprises applying one or more filters in the vertical direction, the method according to claim 7.
9. Applying the one or more filters in the vertical direction includes using samples from the set of upper-edge samples to perform linear interpolation in the vertical direction, the method according to claim 8.
10. Applying the one or more filters in the vertical direction comprises applying position-dependent weights to at least some of the N samples in the set of upper-edge samples, the method according to claim 8.
11. Decoding the current block of video data based on the final prediction block comprises determining a residual value of the current block of video data, and To determine a reconstruction block for the current block of video data, adding the residual value to the filtered prediction block; To generate a decoded block of video data, applying one or more filters to the reconstruction block; The method according to claim 1, comprising the above.
12. The method according to claim 1, wherein the method is implemented as part of a video encoding process.
13. A device for decoding video data, comprising: A memory configured to store video data; One or more processors implemented in a circuit, wherein the one or more processors are configured to: Determine that the current block of video data is encoded in an affine linear weighted intra prediction (ALWIP) mode; Derive a subset of left-edge samples and a subset of top-edge samples based on a set of left-edge neighboring samples of the current block and a set of top-edge neighboring samples of the current block, wherein the subset of left-edge samples includes fewer samples than the set of left-edge samples, and the subset of top-edge samples includes fewer samples than the set of top-edge samples; Apply an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples; Filter the intermediate samples using the set of left-edge neighboring samples of the current block and the set of top-edge neighboring samples of the current block to generate a final prediction block; Decode the current block of video data based on the final prediction block; A device configured to perform the above.
14. To derive the subset of left-edge samples, the one or more processors are further configured to downsample the set of left-edge neighboring samples, wherein each sample of the subset of left-edge samples comprises an average of two or more samples of the set of left-edge samples. To derive the subset of upper edge samples, the one or more processors are further configured to downsample the set of upper edge neighboring samples, wherein each sample of the subset of upper edge samples comprises an average of two or more samples of the set of upper edge samples. The device according to claim 13.
15. The device according to claim 13, wherein, to generate the intermediate block of intermediate samples and to apply the affine model to the subset of left edge samples and the subset of upper edge samples, the one or more processors are further configured to multiply a matrix and a bias vector by the subset of left edge samples and the subset of upper edge samples.
16. The device according to claim 13, wherein the set of upper edge neighboring samples has a total of N samples, and the subset of upper edge samples has a total of N / 2 samples, where N is an integer representing the number of columns included in the current block.
17. The device according to claim 13, wherein the set of left edge neighboring samples has a total of N samples, and the subset of left edge samples has a total of N / 2 samples, where N is an integer representing the number of rows included in the current block.
18. The device according to claim 13, wherein, to filter the intermediate samples to generate the final prediction block, the one or more processors are further configured to upsample the intermediate samples using a second subset of left edge samples different from the subset of left edge samples and a second subset of upper edge samples different from the subset of upper edge samples.
19. The current block is an N×M block of samples, where N is an integer value representing the number of columns in the current block and the number of samples in the set of upper edge samples, and M is an integer value representing the number of rows in the current block and the number of samples in the set of left edge samples. The subset of left edge samples has M / 2 samples, and the subset of upper edge samples has N / 2 samples. The device according to claim 13. Claim 20 The device according to claim 19, wherein, to filter the intermediate samples to generate a final prediction block, the one or more processors are further configured to apply one or more filters in a vertical direction. Claim 21 The device according to claim 20, wherein, to apply the one or more filters in the vertical direction, the one or more processors are further configured to use samples of the set of upper edge samples to perform linear interpolation in the vertical direction. Claim 22 The device according to claim 20, wherein, to apply the one or more filters in the vertical direction, the one or more processors are further configured to apply position-dependent weights to at least some of the N samples of the set of upper edge samples. Claim 23 To decode the current block of video data based on the final prediction block, the one or more processors determine a residual value of the current block of video data, add the residual value to the filtered prediction block to determine a reconstructed block for the current block of video data, apply one or more filters to the reconstructed block to generate a decoded block of video data, and are further configured to perform the above, the device according to claim 13. Claim 24 The device according to claim 13, further comprising a wireless communication device comprising a receiver configured to receive encoded video data. Claim 25 The device according to claim 24, wherein the wireless communication device comprises a telephone handset, and the receiver is configured to demodulate a signal comprising the encoded video data according to a wireless communication standard. Claim 26 The device according to claim 13, further comprising a wireless communication device comprising a transmitter configured to transmit encoded video data. Claim 27 The device according to claim 26, wherein the wireless communication device comprises a telephone handset, and the transmitter is configured to modulate a signal comprising the encoded video data according to a wireless communication standard. Claim 28 A computer-readable storage medium storing instructions that, when executed by one or more processors, cause the one or more processors to determine that a current block of video data is encoded in an affine linear weighted intra prediction (ALWIP) mode; derive a subset of left-edge samples and a subset of top-edge samples based on a set of left-edge neighboring samples of the current block and a set of top-edge neighboring samples of the current block, wherein the subset of left-edge samples includes fewer samples than the set of left-edge samples, and the subset of top-edge samples includes fewer samples than the set of top-edge samples; apply an affine model to the subset of left-edge samples and the subset of top-edge samples to generate an intermediate block of intermediate samples; filter the intermediate samples using the set of left-edge neighboring samples and the set of top-edge neighboring samples of the current block to generate a final prediction block; decode the current block of video data based on the final prediction block; A computer-readable storage medium. **Claim 29** To derive the subset of left-edge samples, the instructions cause the one or more processors to downsample the set of left-edge neighboring samples, wherein each sample of the subset of left-edge samples comprises an average of two or more samples of the set of left-edge samples. To derive the subset of top-edge samples, the instructions cause the one or more processors to downsample the set of top-edge neighboring samples, wherein each sample of the subset of top-edge samples comprises an average of two or more samples of the set of top-edge samples. The computer-readable storage medium according to claim 28. **Claim 30** To generate the intermediate block of the intermediate sample, to apply the affine model to the subset of the left edge samples and the subset of the upper edge samples, the instructions cause the one or more processors to multiply a matrix and a bias vector by the subset of the left edge samples and the subset of the upper edge samples. The computer-readable storage medium according to claim 28.
31. The set of upper edge neighboring samples has a total of N samples, and the subset of upper edge samples has a total of N / 2 samples, where N is an integer representing the number of columns included in the current block. The computer-readable storage medium according to claim 28.
32. The set of left edge neighboring samples has a total of N samples, and the subset of left edge samples has a total of N / 2 samples, where N is an integer representing the number of rows included in the current block. The computer-readable storage medium according to claim 28.
33. To filter the intermediate sample to generate the final prediction block, the instructions cause the one or more processors to upsample the intermediate sample using a second subset of left edge samples different from the subset of left edge samples and a second subset of upper edge samples different from the subset of upper edge samples. The computer-readable storage medium according to claim 28.
34. The current block is an N×M block of samples, where N is an integer value representing the number of columns in the current block and the number of samples in the set of upper edge samples, and M is an integer value representing the number of rows in the current block and the number of samples in the set of left edge samples. The subset of left edge samples has M / 2 samples, and the subset of upper edge samples has N / 2 samples. The computer-readable storage medium according to claim 28.
35. To filter the intermediate sample to generate the final prediction block, the instructions cause the one or more processors to apply one or more filters in the vertical direction. The computer-readable storage medium according to claim 34.
36. To apply the one or more filters in the vertical direction, the instructions cause the one or more processors to use samples of the set of upper edge samples to perform linear interpolation in the vertical direction, the computer-readable storage medium according to claim 35.
37. To apply the one or more filters in the vertical direction, the instructions cause the one or more processors to apply position-dependent weights to at least some of the N samples of the set of upper edge samples, the computer-readable storage medium according to claim 35.
38. To decode the current block of video data based on the final prediction block, the instructions cause the one or more processors to determine a residual value of the current block of video data; add the residual value to the filtered prediction block to determine a reconstructed block for the current block of video data; apply one or more filters to the reconstructed block to generate a decoded block of video data; and cause the computer-readable storage medium according to claim 28.
39. An apparatus for decoding video data, comprising means for determining that a current block of video data is encoded in an affine linear weighted intra prediction (ALWIP) mode; means for deriving a subset of left edge samples and a subset of upper edge samples based on a set of left edge neighboring samples of the current block and a set of upper edge neighboring samples of the current block, wherein the subset of left edge samples includes fewer samples than the set of left edge samples, and the subset of upper edge samples includes fewer samples than the set of upper edge samples; means for applying an affine model to the subset of left edge samples and the subset of upper edge samples to generate an intermediate block of intermediate samples; means for filtering the intermediate samples using the set of left edge neighboring samples of the current block and the set of upper edge neighboring samples of the current block to generate a final prediction block; means for decoding the current block of video data based on the final prediction block; An apparatus comprising
40. Deriving said subset of left edge samples comprises downsampling said set of left edge neighboring samples, wherein each sample of said subset of left edge samples comprises an average of two or more samples of said set of left edge samples. Deriving said subset of top edge samples comprises downsampling said set of top edge neighboring samples, wherein each sample of said subset of top edge samples comprises an average of two or more samples of said set of top edge samples. The apparatus according to claim 39.
41. Applying said affine model to said subset of left edge samples and said subset of top edge samples to generate said intermediate block of intermediate samples comprises multiplying a matrix and a bias vector by said subset of left edge samples and said subset of top edge samples. The apparatus according to claim 39.
42. Said set of top edge neighboring samples has a total of N samples, and said subset of top edge samples has a total of N / 2 samples, where N is an integer representing the number of columns included in said current block. The apparatus according to claim 39.
43. Said set of left edge neighboring samples has a total of N samples, and said subset of left edge samples has a total of N / 2 samples, where N is an integer representing the number of rows included in said current block. The apparatus according to claim 39.
44. Filtering said intermediate samples to generate said final prediction block comprises upsampling said intermediate samples using a second subset of left edge samples different from said subset of left edge samples and a second subset of top edge samples different from said subset of top edge samples. The apparatus according to claim 39.
45. Said current block is an N×M block of samples, where N is an integer value representing the number of columns in said current block and the number of samples in said set of top edge samples, and M is an integer value representing the number of rows in said current block and the number of samples in said set of left edge samples. The subset of left edge samples has M / 2 samples, and the subset of upper edge samples has N / 2 samples. The apparatus according to claim 39.
46. The apparatus according to claim 45, wherein filtering the intermediate samples to generate a final prediction block comprises applying one or more filters in a vertical direction.
47. The apparatus according to claim 46, wherein applying the one or more filters in the vertical direction includes using samples from the set of upper edge samples to perform linear interpolation in the vertical direction.
48. The apparatus according to claim 46, wherein applying the one or more filters in the vertical direction comprises applying position-dependent weights to at least some of the N samples of the set of upper edge samples.
49. Decoding the current block of video data based on the final prediction block comprises determining a residual value of the current block of video data; and adding the residual value to the filtered prediction block to determine a reconstructed block for the current block of video data; and applying one or more filters to the reconstructed block to generate a decoded block of video data. The apparatus according to claim 39.