The present disclosure generally relates to video processing, and more particularly, to systems and methods for intra prediction smoothing (IPS) filter.
A video is a set of static pictures (or “frames”) capturing the visual information. To reduce the storage memory and the transmission bandwidth, a video can be compressed before storage or transmission and decompressed before display. The compression process is usually referred to as encoding and the decompression process is usually referred to as decoding. There are various video coding formats which use standardized video coding technologies, most commonly based on prediction, transform, quantization, entropy coding and in-loop filtering. The video coding standards, such as the High Efficiency Video Coding (HEVC/H.265) standard, the Versatile Video Coding (VVC/H.266) standard, and AVS standards, specifying the specific video coding formats, are developed by standardization organizations. With more and more advanced video coding technologies being adopted in the video standards, the coding efficiency of the new video coding standards get higher and higher.
Embodiments of the present disclosure provide a video processing method. The method includes: dividing an intra prediction block into one or more sub-blocks; performing padding process for the one or more sub-blocks; and filtering the one or more sub-blocks with a parallel intra prediction smoothing (IPS) process.
Embodiments of the present disclosure provide an apparatus for video processing, the apparatus including: a memory figured to store instructions; and one or more processors configured to execute the instructions to cause the apparatus to perform: dividing an intra prediction block into one or more sub-blocks; performing padding process for the one or more sub-blocks; and filtering the one or more sub-blocks with a parallel intra prediction smoothing (IPS) process.
Embodiments of the present disclosure provide a non-transitory computer-readable storage medium that stores a set of instructions that is executable by one or more processors of an apparatus to cause the apparatus to initiate a method for video processing, the method includes: dividing an intra prediction block into one or more sub-blocks; performing padding process for the one or more sub-blocks; and filtering the one or more sub-blocks with a parallel intra prediction smoothing (IPS) process.
Embodiments and various aspects of the present disclosure are illustrated in the following detailed description and the accompanying figures. Various features shown in the figures are not drawn to scale.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise represented. The implementations set forth in the following description of exemplary embodiments do not represent all implementations consistent with the invention. Instead, they are merely examples of apparatuses and methods consistent with aspects related to the invention as recited in the appended claims. Particular aspects of the present disclosure are described in greater detail below. The terms and definitions provided herein control, if in conflict with terms and/or definitions incorporated by reference.
The Joint Video Experts Team (WET) of the ITU-T Video Coding Expert Group (ITU-T VCEG) and the ISO/IEC Moving Picture Expert Group (ISO/IEC MPEG) is currently developing the Versatile Video Coding (VVC/H.266) standard. The VVC standard is aimed at doubling the compression efficiency of its predecessor, the High Efficiency Video Coding (HEVC/H.265) standard. In other words, VVC's goal is to achieve the same subjective quality as HEVC/H.265 using half the bandwidth.
To achieve the same subjective quality as HEVC/H.265 using half the bandwidth, the JVET has been developing technologies beyond HEVC using the joint exploration model (JEM) reference software. As coding technologies were incorporated into the JEM, the JEM achieved substantially higher coding performance than HEVC.
The VVC standard has been developed recent, and continues to include more coding technologies that provide better compression performance. VVC is based on the same hybrid video coding system that has been used in modern video compression standards such as HEVC, H.264/AVC, MPEG2, H.263, etc.
A video is a set of static pictures (or “frames”) arranged in a temporal sequence to store visual information. A video capture device (e.g., a camera) can be used to capture and store those pictures in a temporal sequence, and a video playback device (e.g., a television, a computer, a smartphone, a tablet computer, a video player, or any end-user terminal with a function of display) can be used to display such pictures in the temporal sequence. Also, in some applications, a video capturing device can transmit the captured video to the video playback device (e.g., a computer with a monitor) in real-time, such as for surveillance, conferencing, or live broadcasting.
For reducing the storage space and the transmission bandwidth needed by such applications, the video can be compressed before storage and transmission and decompressed before the display. The compression and decompression can be implemented by software executed by a processor (e.g., a processor of a generic computer) or specialized hardware. The module for compression is generally referred to as an “encoder,” and the module for decompression is generally referred to as a “decoder.” The encoder and decoder can be collectively referred to as a “codec.” The encoder and decoder can be implemented as any of a variety of suitable hardware, software, or a combination thereof. For example, the hardware implementation of the encoder and decoder can include circuitry, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, or any combinations thereof. The software implementation of the encoder and decoder can include program codes, computer-executable instructions, firmware, or any suitable computer-implemented algorithm or process fixed in a computer-readable medium. Video compression and decompression can be implemented by various algorithms or standards, such as MPEG-1, MPEG-2, MPEG-4, H.26x series, or the like. In some applications, the codec can decompress the video from a first coding standard and re-compress the decompressed video using a second coding standard, in which case the codec can be referred to as a “transcoder.”
The video encoding process can identify and keep useful information that can be used to reconstruct a picture and disregard unimportant information for the reconstruction. If the disregarded, unimportant information cannot be fully reconstructed, such an encoding process can be referred to as “lossy.” Otherwise, it can be referred to as “lossless.” Most encoding processes are lossy, which is a tradeoff to reduce the needed storage space and the transmission bandwidth.
The useful information of a picture being encoded (referred to as a “current picture”) include changes with respect to a reference picture (e.g., a picture previously encoded and reconstructed). Such changes can include position changes, luminosity changes, or color changes of the samples, among which the position changes are mostly concerned. Position changes of a group of samples that represent an object can reflect the motion of the object between the reference picture and the current picture.
A picture coded without referencing another picture (i.e., it is its own reference picture) is referred to as an “I-picture.” A picture is referred to as a “P-picture” if some or all blocks (e.g., blocks that generally refer to portions of the video picture) in the picture are predicted using intra prediction or inter prediction with one reference picture (e.g., uni-prediction). A picture is referred to as a “B-picture” if at least one block in it is predicted with two reference pictures (e.g., bi-prediction).
As shown in
Typically, video codecs do not encode or decode an entire picture at one time due to the computing complexity of such tasks. Rather, they can split the picture into basic segments, and encode or decode the picture segment by segment. Such basic segments are referred to as basic processing units (“BPUs”) in the present disclosure. For example, structure 110 in
The basic processing units can be logical units, which can include a group of different types of video data stored in a computer memory (e.g., in a video frame buffer). For example, a basic processing unit of a color picture can include a luma component (Y) representing achromatic brightness information, one or more chroma components (e.g., Cb and Cr) representing color information, and associated syntax elements, in which the luma and chroma components can have the same size of the basic processing unit. The luma and chroma components can be referred to as “coding tree blocks” (“CTBs”) in some video coding standards (e.g., H.265/HEVC or H.266/VVC). Any operation performed to a basic processing unit can be repeatedly performed to each of its luma and chroma components.
Video coding has multiple stages of operations, examples of which are shown in
For example, at a mode decision stage (an example of which is shown in
For another example, at a prediction stage (an example of which is shown in
For another example, at a transform stage (an example of which is shown in
In structure 110 of
In some implementations, to provide the capability of parallel processing and error resilience to video encoding and decoding, a picture can be divided into regions for processing, such that, for a region of the picture, the encoding or decoding process can depend on no information from any other region of the picture. In other words, each region of the picture can be processed independently. By doing so, the codec can process different regions of a picture in parallel, thus increasing the coding efficiency. Also, when data of a region is corrupted in the processing or lost in network transmission, the codec can correctly encode or decode other regions of the same picture without reliance on the corrupted or lost data, thus providing the capability of error resilience. In some video coding standards, a picture can be divided into different types of regions. For example, H.265/HEVC and H.266/VVC provide two types of regions: “slices” and “tiles.” It should also be noted that different pictures of video sequence 100 can have different partition schemes for dividing a picture into regions.
For example, in
In
The encoder can perform process 200A iteratively to encode each original BPU of the original picture (in the forward path) and generate predicted reference 224 for encoding the next original BPU of the original picture (in the reconstruction path). After encoding all original BPUs of the original picture, the encoder can proceed to encode the next picture in video sequence 202.
Referring to process 200A, the encoder can receive video sequence 202 generated by a video capturing device (e.g., a camera). The term “receive” used herein can refer to receiving, inputting, acquiring, retrieving, obtaining, reading, accessing, or any action in any manner for inputting data.
At prediction stage 204, at a current iteration, the encoder can receive an original BPU and prediction reference 224, and perform a prediction operation to generate prediction data 206 and predicted BPU 208. Prediction reference 224 can be generated from the reconstruction path of the previous iteration of process 200A. The purpose of prediction stage 204 is to reduce information redundancy by extracting prediction data 206 that can be used to reconstruct the original BPU as predicted BPU 208 from prediction data 206 and prediction reference 224.
Ideally, predicted BPU 208 can be identical to the original BPU. However, due to non-ideal prediction and reconstruction operations, predicted BPU 208 is generally slightly different from the original BPU. For recording such differences, after generating predicted BPU 208, the encoder can subtract it from the original BPU to generate residual BPU 210. For example, the encoder can subtract values (e.g., greyscale values or RGB values) of samples of predicted BPU 208 from values of corresponding samples of the original BPU. Each sample of residual BPU 210 can have a residual value as a result of such subtraction between the corresponding samples of the original BPU and predicted BPU 208. Compared with the original BPU, prediction data 206 and residual BPU 210 can have fewer bits, but they can be used to reconstruct the original BPU without significant quality deterioration. Thus, the original BPU is compressed.
To further compress residual BPU 210, at transform stage 212, the encoder can reduce spatial redundancy of residual BPU 210 by decomposing it into a set of two-dimensional “base patterns,” each base pattern being associated with a “transform coefficient.” The base patterns can have the same size (e.g., the size of residual BPU 210). Each base pattern can represent a variation frequency (e.g., frequency of brightness variation) component of residual BPU 210. None of the base patterns can be reproduced from any combinations (e.g., linear combinations) of any other base patterns. In other words, the decomposition can decompose variations of residual BPU 210 into a frequency domain. Such a decomposition is analogous to a discrete Fourier transform of a function, in which the base patterns are analogous to the base functions (e.g., trigonometry functions) of the discrete Fourier transform, and the transform coefficients are analogous to the coefficients associated with the base functions.
Different transform algorithms can use different base patterns. Various transform algorithms can be used at transform stage 212, such as, for example, a discrete cosine transform, a discrete sine transform, or the like. The transform at transform stage 212 is invertible. That is, the encoder can restore residual BPU 210 by an inverse operation of the transform (referred to as an “inverse transform”). For example, to restore a sample of residual BPU 210, the inverse transform can be multiplying values of corresponding samples of the base patterns by respective associated coefficients and adding the products to produce a weighted sum. For a video coding standard, both the encoder and decoder can use the same transform algorithm (thus the same base patterns). Thus, the encoder can record only the transform coefficients, from which the decoder can reconstruct residual BPU 210 without receiving the base patterns from the encoder. Compared with residual BPU 210, the transform coefficients can have fewer bits, but they can be used to reconstruct residual BPU 210 without significant quality deterioration. Thus, residual BPU 210 is further compressed.
The encoder can further compress the transform coefficients at quantization stage 214. In the transform process, different base patterns can represent different variation frequencies (e.g., brightness variation frequencies). Because human eyes are generally better at recognizing low-frequency variation, the encoder can disregard information of high-frequency variation without causing significant quality deterioration in decoding. For example, at quantization stage 214, the encoder can generate quantized transform coefficients 216 by dividing each transform coefficient by an integer value (referred to as a “quantization scale factor”) and rounding the quotient to its nearest integer. After such an operation, some transform coefficients of the high-frequency base patterns can be converted to zero, and the transform coefficients of the low-frequency base patterns can be converted to smaller integers. The encoder can disregard the zero-value quantized transform coefficients 216, by which the transform coefficients are further compressed. The quantization process is also invertible, in which quantized transform coefficients 216 can be reconstructed to the transform coefficients in an inverse operation of the quantization (referred to as “inverse quantization”).
Because the encoder disregards the remainders of such divisions in the rounding operation, quantization stage 214 can be lossy. Typically, quantization stage 214 can contribute the most information loss in process 200A. The larger the information loss is, the fewer bits the quantized transform coefficients 216 can need. For obtaining different levels of information loss, the encoder can use different values of the quantization parameter or any other parameter of the quantization process.
At binary coding stage 226, the encoder can encode prediction data 206 and quantized transform coefficients 216 using a binary coding technique, such as, for example, entropy coding, variable length coding, arithmetic coding, Huffman coding, context-adaptive binary arithmetic coding, or any other lossless or lossy compression algorithm. In some embodiments, besides prediction data 206 and quantized transform coefficients 216, the encoder can encode other information at binary coding stage 226, such as, for example, a prediction mode used at prediction stage 204, parameters of the prediction operation, a transform type at transform stage 212, parameters of the quantization process (e.g., quantization parameters), an encoder control parameter (e.g., a bitrate control parameter), or the like. The encoder can use the output data of binary coding stage 226 to generate video bitstream 228. In some embodiments, video bitstream 228 can be further packetized for network transmission.
Referring to the reconstruction path of process 200A, at inverse quantization stage 218, the encoder can perform inverse quantization on quantized transform coefficients 216 to generate reconstructed transform coefficients. At inverse transform stage 220, the encoder can generate reconstructed residual BPU 222 based on the reconstructed transform coefficients. The encoder can add reconstructed residual BPU 222 to predicted BPU 208 to generate prediction reference 224 that is to be used in the next iteration of process 200A.
It should be noted that other variations of the process 200A can be used to encode video sequence 202. In some embodiments, stages of process 200A can be performed by the encoder in different orders. In some embodiments, one or more stages of process 200A can be combined into a single stage. In some embodiments, a single stage of process 200A can be divided into multiple stages. For example, transform stage 212 and quantization stage 214 can be combined into a single stage. In some embodiments, process 200A can include additional stages. In some embodiments, process 200A can omit one or more stages in
Generally, prediction techniques can be categorized into two types: spatial prediction and temporal prediction. Spatial prediction (e.g., an intra-picture prediction or “intra prediction”) can use samples from one or more already coded neighboring BPUs in the same picture to predict the current BPU. That is, prediction reference 224 in the spatial prediction can include the neighboring BPUs. The spatial prediction can reduce the inherent spatial redundancy of the picture. Temporal prediction (e.g., an inter-picture prediction or “inter prediction”) can use regions from one or more already coded pictures to predict the current BPU. That is, prediction reference 224 in the temporal prediction can include the coded pictures. The temporal prediction can reduce the inherent temporal redundancy of the pictures.
Referring to process 200B, in the forward path, the encoder performs the prediction operation at spatial prediction stage 2042 and temporal prediction stage 2044. For example, at spatial prediction stage 2042, the encoder can perform the intra prediction. For an original BPU of a picture being encoded, prediction reference 224 can include one or more neighboring BPUs that have been encoded (in the forward path) and reconstructed (in the reconstructed path) in the same picture. The encoder can generate predicted BPU 208 by extrapolating the neighboring BPUs. The extrapolation technique can include, for example, a linear extrapolation or interpolation, a polynomial extrapolation or interpolation, or the like. In some embodiments, the encoder can perform the extrapolation at the sample level, such as by extrapolating values of corresponding samples for each sample of predicted BPU 208. The neighboring BPUs used for extrapolation can be located with respect to the original BPU from various directions, such as in a vertical direction (e.g., on top of the original BPU), a horizontal direction (e.g., to the left of the original BPU), a diagonal direction (e.g., to the down-left, down-right, up-left, or up-right of the original BPU), or any direction defined in the used video coding standard. For the intra prediction, prediction data 206 can include, for example, locations (e.g., coordinates) of the used neighboring BPUs, sizes of the used neighboring BPUs, parameters of the extrapolation, a direction of the used neighboring BPUs with respect to the original BPU, or the like.
For another example, at temporal prediction stage 2044, the encoder can perform the inter prediction. For an original BPU of a current picture, prediction reference 224 can include one or more pictures (referred to as “reference pictures”) that have been encoded (in the forward path) and reconstructed (in the reconstructed path). In some embodiments, a reference picture can be encoded and reconstructed BPU by BPU. For example, the encoder can add reconstructed residual BPU 222 to predicted BPU 208 to generate a reconstructed BPU. When all reconstructed BPUs of the same picture are generated, the encoder can generate a reconstructed picture as a reference picture. The encoder can perform an operation of “motion estimation” to search for a matching region in a scope (referred to as a “search window”) of the reference picture. The location of the search window in the reference picture can be determined based on the location of the original BPU in the current picture. For example, the search window can be centered at a location having the same coordinates in the reference picture as the original BPU in the current picture and can be extended out for a predetermined distance. When the encoder identifies (e.g., by using a pel-recursive algorithm, a block-matching algorithm, or the like) a region similar to the original BPU in the search window, the encoder can determine such a region as the matching region. The matching region can have different dimensions (e.g., being smaller than, equal to, larger than, or in a different shape) from the original BPU. Because the reference picture and the current picture are temporally separated in the timeline (e.g., as shown in
The motion estimation can be used to identify various types of motions, such as, for example, translations, rotations, zooming, or the like. For inter prediction, prediction data 206 can include, for example, locations (e.g., coordinates) of the matching region, the motion vectors associated with the matching region, the number of reference pictures, weights associated with the reference pictures, or the like.
For generating predicted BPU 208, the encoder can perform an operation of “motion compensation.” The motion compensation can be used to reconstruct predicted BPU 208 based on prediction data 206 (e.g., the motion vector) and prediction reference 224. For example, the encoder can move the matching region of the reference picture according to the motion vector, in which the encoder can predict the original BPU of the current picture. When multiple reference pictures are used (e.g., as picture 106 in
In some embodiments, the inter prediction can be unidirectional or bidirectional. Unidirectional inter predictions can use one or more reference pictures in the same temporal direction with respect to the current picture. For example, picture 104 in
Still referring to the forward path of process 200B, after spatial prediction 2042 and temporal prediction stage 2044, at mode decision stage 230, the encoder can select a prediction mode (e.g., one of the intra prediction or the inter prediction) for the current iteration of process 200B. For example, the encoder can perform a rate-distortion optimization technique, in which the encoder can select a prediction mode to minimize a value of a cost function depending on a bit rate of a candidate prediction mode and distortion of the reconstructed reference picture under the candidate prediction mode. Depending on the selected prediction mode, the encoder can generate the corresponding predicted BPU 208 and predicted data 206.
In the reconstruction path of process 200B, if intra prediction mode has been selected in the forward path, after generating prediction reference 224 (e.g., the current BPU that has been encoded and reconstructed in the current picture), the encoder can directly feed prediction reference 224 to spatial prediction stage 2042 for later usage (e.g., for extrapolation of a next BPU of the current picture). The encoder can feed prediction reference 224 to loop filter stage 232, at which the encoder can apply a loop filter to prediction reference 224 to reduce or eliminate distortion (e.g., blocking artifacts) introduced during coding of the prediction reference 224. The encoder can apply various loop filter techniques at loop filter stage 232, such as, for example, deblocking, sample adaptive offsets, adaptive loop filters, or the like. The loop-filtered reference picture can be stored in buffer 234 (or “decoded picture buffer”) for later use (e.g., to be used as an inter-prediction reference picture for a future picture of video sequence 202). The encoder can store one or more reference pictures in buffer 234 to be used at temporal prediction stage 2044. In some embodiments, the encoder can encode parameters of the loop filter (e.g., a loop filter strength) at binary coding stage 226, along with quantized transform coefficients 216, prediction data 206, and other information.
In
The decoder can perform process 300A iteratively to decode each encoded BPU of the encoded picture and generate predicted reference 224 for encoding the next encoded BPU of the encoded picture. After decoding all encoded BPUs of the encoded picture, the decoder can output the picture to video stream 304 for display and proceed to decode the next encoded picture in video bitstream 228.
At binary decoding stage 302, the decoder can perform an inverse operation of the binary coding technique used by the encoder (e.g., entropy coding, variable length coding, arithmetic coding, Huffman coding, context-adaptive binary arithmetic coding, or any other lossless compression algorithm). In some embodiments, besides prediction data 206 and quantized transform coefficients 216, the decoder can decode other information at binary decoding stage 302, such as, for example, a prediction mode, parameters of the prediction operation, a transform type, parameters of the quantization process (e.g., quantization parameters), an encoder control parameter (e.g., a bitrate control parameter), or the like. In some embodiments, if video bitstream 228 is transmitted over a network in packets, the decoder can depacketize video bitstream 228 before feeding it to binary decoding stage 302.
In process 300B, for an encoded basic processing unit (referred to as a “current BPU”) of an encoded picture (referred to as a “current picture”) that is being decoded, prediction data 206 decoded from binary decoding stage 302 by the decoder can include various types of data, depending on what prediction mode was used to encode the current BPU by the encoder. For example, if intra prediction was used by the encoder to encode the current BPU, prediction data 206 can include a prediction mode indicator (e.g., a flag value) indicative of the intra prediction, parameters of the intra prediction operation, or the like. The parameters of the intra prediction operation can include, for example, locations (e.g., coordinates) of one or more neighboring BPUs used as a reference, sizes of the neighboring BPUs, parameters of extrapolation, a direction of the neighboring BPUs with respect to the original BPU, or the like. For another example, if inter prediction was used by the encoder to encode the current BPU, prediction data 206 can include a prediction mode indicator (e.g., a flag value) indicative of the inter prediction, parameters of the inter prediction operation, or the like. The parameters of the inter prediction operation can include, for example, the number of reference pictures associated with the current BPU, weights respectively associated with the reference pictures, locations (e.g., coordinates) of one or more matching regions in the respective reference pictures, one or more motion vectors respectively associated with the matching regions, or the like.
Based on the prediction mode indicator, the decoder can decide whether to perform a spatial prediction (e.g., the intra prediction) at spatial prediction stage 2042 or a temporal prediction (e.g., the inter prediction) at temporal prediction stage 2044. The details of performing such spatial prediction or temporal prediction are described in
In process 300B, the decoder can feed predicted reference 224 to spatial prediction stage 2042 or temporal prediction stage 2044 for performing a prediction operation in the next iteration of process 300B. For example, if the current BPU is decoded using the intra prediction at spatial prediction stage 2042, after generating prediction reference 224 (e.g., the decoded current BPU), the decoder can directly feed prediction reference 224 to spatial prediction stage 2042 for later usage (e.g., for extrapolation of a next BPU of the current picture). If the current BPU is decoded using the inter prediction at temporal prediction stage 2044, after generating prediction reference 224 (e.g., a reference picture in which all BPUs have been decoded), the decoder can feed prediction reference 224 to loop filter stage 232 to reduce or eliminate distortion (e.g., blocking artifacts). The decoder can apply a loop filter to prediction reference 224, in a way as described in
Apparatus 400 can also include memory 404 configured to store data (e.g., a set of instructions, computer codes, intermediate data, or the like). For example, as shown in
Bus 410 can be a communication device that transfers data between components inside apparatus 400, such as an internal bus (e.g., a CPU-memory bus), an external bus (e.g., a universal serial bus port, a peripheral component interconnect express port), or the like.
For ease of explanation without causing ambiguity, processor 402 and other data processing circuits are collectively referred to as a “data processing circuit” in this disclosure. The data processing circuit can be implemented entirely as hardware, or as a combination of software, hardware, or firmware. In addition, the data processing circuit can be a single independent module or can be combined entirely or partially into any other component of apparatus 400.
Apparatus 400 can further include network interface 406 to provide wired or wireless communication with a network (e.g., the Internet, an intranet, a local area network, a mobile communications network, or the like). In some embodiments, network interface 406 can include any combination of any number of a network interface controller (NIC), a radio frequency (RF) module, a transponder, a transceiver, a modem, a router, a gateway, a wired network adapter, a wireless network adapter, a Bluetooth adapter, an infrared adapter, an near-field communication (“NFC”) adapter, a cellular network chip, or the like.
In some embodiments, optionally, apparatus 400 can further include peripheral interface 408 to provide a connection to one or more peripheral devices. As shown in
It should be noted that video codecs (e.g., a codec performing process 200A, 200B, 300A, or 300B) can be implemented as any combination of any software or hardware modules in apparatus 400. For example, some or all stages of process 200A, 200B, 300A, or 300B can be implemented as one or more software modules of apparatus 400, such as program instructions that can be loaded into memory 404. For another example, some or all stages of process 200A, 200B, 300A, or 300B can be implemented as one or more hardware modules of apparatus 400, such as a specialized data processing circuit (e.g., an FPGA, an ASIC, an NPU, or the like).
An intra prediction smoothing (IPS) filter method can add a filtering process to the intra prediction blocks. The IPS method filters the predicted samples of a block predicted by an intra prediction mode to obtain the final filtered predicted samples. In this way, the prediction blocks can be smoothed and the coding efficiency can be improved.
The IPS can be performed as follows:
1) Prediction process: Using an intra prediction mode to generate a prediction block;
2) Padding process: Padding the four adjacent rows, the four adjacent columns and the adjacent corners of the current prediction block with the reconstructed samples of the adjacent reference row and column and the predicted samples within the prediction block.
3) Filtering process: Filtering the prediction block with an intra prediction smoothing filter to obtain the final filtered prediction block.
When filtering the current sample, the predicted value of the current sample is placed corresponding to the center of the filter (e.g., 32 in
Consistent with the disclosed embodiments, an IPS flag is signaled to specify whether IPS is used for an intra prediction block. In some embodiments, the IPS can be only applied to luminance intra prediction blocks with the number of samples is greater than or equal to 64 and less than 4096. In some embodiments, the width of the prediction block is restricted to be less than 64.
For intra prediction, the spatial neighboring reconstructed samples are used as the reference samples to predict the sample value of the current block. Generally, as the coding order is from left to right and from up to bottom, the left neighboring reconstructed samples and the top neighboring reconstructed samples are usually already coded when coding the current block. Thus, in an intra prediction, the top neighbouring reconstructed samples, the top-right neighboring reconstructed samples, the top-left neighboring reconstructed samples, the left neighboring reconstructed samples and the bottom-left neighboring reconstructed samples are used as the reference samples for the current block.
In the present disclosure, the top reference samples 1002 are denoted as r[1] to r[M], the top-right reference samples 1003 are denoted as r[M+1] to r[2M]; the left reference samples 1004 are denoted as c[1] to c[N], the bottom-left reference samples 1005 are denoted as c[N+1] to c[2N], the top-left reference sample 1006 is denoted as r[0] or c[0], the padded samples 1007 in top row are denoted as r[−1] and r[−2], and the padded samples 1008 in left column are denoted as c[−1] and c[−2].
DC mode (e.g., mode 0) is a mode in which the direct current of the left reference samples or top reference samples is used. If both the left reference samples and the top reference samples are available, the averaged value of the left reference samples and top reference samples is used as the predicted value of all the samples in the current block. If left reference samples are available and top reference samples are not available, the averaged value of left reference samples is used as the predicted value of all the samples in the current block. If the left reference samples are not available and the top reference samples are available, the averaged value of the top reference samples is used as the predicted value of all the samples in the current block. If both the left reference samples and the top reference sample are not available, the median of the sample value range is used as the predicted value of all the samples in the current block.
Plane mode (e.g., mode 1) is a mode in which the predicted values of samples are all in a plane. Therefore, the predicted value of each sample follows a two-dimension linear model.
Referring back to
ib=((ih«5)×imh+(1«(ish-1)))»ish Eq. (1)
is=((iv«5)×imv+(1«(isv-1)))»isv Eq. (2)
where ib is the horizontal slope, is is the vertical slope, imh, imv, ish and isv are dependent on the size of the block. In some embodiments, imh=ibMult[Log(M)−2], ish=ibShift[Log(M)−2], imv=ibMult[Log(N)−2], isv=ibShift[Log(N)−2], and ibMult[5]={13, 17, 5, 11, 23}, ibShift[5]={7, 10, 11, 15, 19}. The parameters ih and iv are derived based on Eq. (3) and Eq. (4),
Second, the averaged value of top-right samples 1003 and bottom-left samples 1005 is used as the predicted value of center sample in the current block based on Eq. (5),
is=(r[M]+c[N])/2«5 Eq. (5)
where is is the averaged value after right shifting 5 bits.
Third, based on the center value of the slope in two directions, the predicted values of all the samples in the current block are derived based on Eq. (6)
Pred[x][y]=(ia+(x−((M»1)−1))×ib+(y−((N»1)−1))xic+16)»5(x=0˜M−1, y=0˜N−1) Eq. (6)
where Pred[x][y] is the predicted value of sample located in (x, y) in the current block.
The predicted value of bilinear mode is the averaged value of two linear interpolated values.
The prediction process could be described as the following Eq. (7),
where is denotes sample A which is equal to r[M], ib denotes sample B which is equal to c[N], and is denotes the sample C.
In the angular mode, the predicted value is generated by directional extrapolation or interpolation of the reference samples. In AVS3, there are 62 different directions (e.g., mode 3 to mode 32, and mode 34 to mode 65 as shown in
Predk=(f0×a+f1×b+f2×c+f3×d)»shift Eq. (8)
wherein Predk is the predicted value of sample K, f0, f1, f2 and f3 are interpolation filter coefficients and the shift is the right shift number which is decided by the sum of f0, f1, f2 and f3.
In AVS3, an inter prediction filter is applied to the direct mode to filter the prediction blocks. If the current block is coded by the direct mode and is not coded by the AFFINE or UMVE mode, a flag is signaled to indicate whether the inter prediction filter (InterPF) is used or not. If InterPF is used, an index is signaled to indicate which filter method is used. In the decoder side, the decoder performs the same filter operation as the encoder when the parsed InterPF flag is true. That is the InterPF is used.
The filter uses the prediction block and neighboring samples in the above, below, right, and left of the current block to do weighted average to get the final prediction block. The InterPF method generates the final prediction signal by weighting the two prediction blocks Pred_inter and Pred_Q. The Pred_inter is derived by inter prediction. The Pred_Q is derived by the reconstructed reference samples of the current block like intra prediction.
If the interPF index is equal to 0, the following filter method is used based on Eq. (9) - Eq. (12):
Pred(x,y)=(Pred_inter(x,y)*5+Pred_Q(x,y)*3)»3 Eq. (9)
Pred_Q(x,y)=(Pred_V(x,y)+Pred_H(x,y)+1)»2 Eq. (10)
Pred_V(x,y)=((h-1-y)*Rec(x,-1)+(y+1)*Rec(-1,h)+(h»1))»log2(h) Eq. (11)
Pred_H(x,y)=((w-1-x)*Rec(-1,y)+(x+1)*Rec(w,-1)+(w»1))»log2(w) Eq. (12)
where Pred_inter is the unfiltered prediction block, Pred is the final prediction block, and Rec represents the reconstructed neighboring samples. The width and height of the current block are represented by w and h, respectively.
Pred(x,y)=Clip ((f(x)*Rec(-1,y)+f(y)*Rec(x,-1)+(64-f(x)-f(y))*Pred_inter(x,y)+32)»6) Eq. (13)
where f(x) and f(y) can be obtained by a look up table as shown in
Conventionally, IPS adds an operation to filter each predicted sample of the intra prediction block after performing intra prediction to obtain the final filtered prediction block. Each prediction sample needs to be filtered with 12 or 24 surrounding predicted samples to jointly calculate the current predicted sample, which causes some issues. The existing IPS design is not friendly to hardware implementation.
For example, for a 13-tap filter, there are 13 multiplications, 12 additions, and 1 shift introduced to the intra prediction, while for a 25-tap filter, there are 25 multiplications, 24 additions, and 1 shift introduced to the intra prediction.
Moreover, since the predicted samples need to wait for being used in the IPS filtering process of the surrounding predicted samples before they can be output for the next coding process, a latency is introduced to the hardware pipeline and more buffering is required.
The present disclosure provides embodiments to make the IPS friendly to hardware implementation and reduce the number of operations, the hardware pipeline latency and the buffer size.
In some embodiments, the IPS can be performed based on sub-blocks. The IPS can be performed parallel for each sub-block, so that the hardware pipeline latency and the buffering needed can be reduced.
At step 1602, an intra prediction mode is used to generate a prediction block. The prediction block is generated by an intra prediction mode, such that the prediction block can be filtered with an IPS filter to improve the prediction performance.
At step 1604, the prediction block is divided into one or more sub-blocks. Generally, prediction samples are arranged in a matrix form in the prediction block. Therefore, a prediction block can be divided into one or more sub-blocks. Each sub-block may include a number of prediction samples.
At step 1606, a padding process is performed for each sub-block. The padding process can be performed for each sub-block in parallel. Thus, the padding efficiency is improved.
At step 1608, each sub-block is filtered with an intra prediction smoothing filter to obtain a final filtered prediction block. Instead of filtering an entire prediction block in a raster scan order, the sub-blocks can be filtered with IPS simultaneously. The hardware pipeline latency and the buffer size of the filter are reduced.
In some embodiments, a W×H prediction block is divided into several M×H sub-blocks (e.g., the prediction block is divided in vertical direction). The prediction block is divided into
sub-blocks with the size of M×H, if W is greater than M, where W is the width of the prediction block, H is the height of the prediction block and M, for example, can be any value from the set {4,8,16,32,64,128}.
At step 1702, for top two rows, the reconstructed samples of the top row adjacent to the sub-block are used to fill the two adjacent top rows.
At step 1704, for left two columns, for the sub-blocks adjacent to the left boundary of the prediction block, the reconstructed samples of the left column adjacent to the prediction block are used to fill the two adjacent left columns. For other sub-blocks, the predicted samples of the first column within the sub-block are used to fill the two adjacent left columns.
At step 1706, for bottom two rows, the predicted samples of the last two rows within the sub-block are used to fill the two adjacent bottom rows.
At step 1708, for right two columns, the predicted samples of the last two columns within the sub-block are used to fill the two adjacent right columns.
At step 1710, for adjacent corners, the samples at the four adjacent corners of the sub-block are filled with adjacent filled samples.
In some embodiments, a W×H prediction block is divided into several W×N sub-blocks (e.g., the prediction block is divided in horizontal direction). The prediction block is divided into
sub-blocks with the size of W×N if H is greater than N, where W is the width of the prediction block, H is the height of the prediction block and N can be any value from the set {4,8,16,32,64,128}. Then, the padding and filtering processes are performed for each sub-block.
At step 1802, for top two rows: for the sub-blocks adjacent to the top boundary of the prediction block, the reconstructed samples of the top row adjacent are used to the prediction block to fill the two adjacent top rows. For other sub-blocks, the predicted samples of the first row within the sub-block are used to fill the two adjacent top rows.
At step 1804, for left two columns, the reconstructed samples of the left column adjacent are used to the sub-block to fill the two adjacent left columns.
At step 1806, for bottom two rows, the predicted samples of the last two rows within the sub-block are used to fill the two adjacent bottom rows.
At step 1808, for right two columns, the predicted samples of the last two columns within the sub-block are used to fill the two adjacent right columns.
At step 1810, for adjacent corners, the samples at the four adjacent corners of the sub-block are filled with adjacent filled samples.
In some embodiments, a W x H prediction block is divided into several M×N sub-blocks (e.g., the prediction block is divided in both vertical and horizontal directions). The prediction block is divided into
sub-blocks with the size of M×N if W is greater than M or H is greater than N, where W is the width of the prediction block and H is the height of the prediction block. M and N can be any value from the set {4,8,16,32,64,128}. Then, the padding and filtering processes are performed for each sub-block.
At step 1902, for top two rows: for the sub-blocks adjacent to the top boundary of the prediction block, the reconstructed samples of the top row adjacent are used to the prediction block to fill the two adjacent top rows. For other sub-blocks, the predicted samples of the first row within the sub-block are used to fill the two adjacent top rows.
At step 1904, for left two columns: for the sub-blocks adjacent to the left boundary of the prediction block, the reconstructed samples of the left column adjacent to the prediction block are used to fill the two adjacent left columns. For other sub-blocks, the predicted samples of the first column within the sub-block are used to fill the two adjacent left columns.
At step 1906, for bottom two rows, the predicted samples of the last two rows within the sub-block are used to fill the two adjacent bottom rows.
At step 1908, for right two columns, the predicted samples of the last two columns within the sub-block are used to fill the two adjacent right columns.
At step 1910, for adjacent corners, the samples at the four adjacent corners of the sub-block are filled with adjacent filled samples.
In some embodiments, the methods of splitting sub-blocks may depend on the order of predicting samples. The splitting direction is orthogonal to the order of prediction samples. Therefore, when the order of predicting the samples is in the horizontal raster scan order, a block is vertically divided into sub-blocks. When the order of predicting the samples is in the vertical raster scan order, a prediction block is horizontally divided into sub-blocks.
In some embodiments, some of the adjacent rows, columns and corners of each sub-block used for IPS can be obtained by the saved adjacent predicted samples from the adjacent sub-blocks that are before the current block in the raster scan order.
In some embodiments, some of the adjacent rows, columns and corners of each sub-block used for IPS can be padded by the adjacent reconstructed samples of the prediction block.
In some embodiments, different adjacent rows, columns and corners of a sub-block used for IPS can be obtained by using different methods as described above. Moreover, the methods can be based on the intra prediction mode and/or the position of the current sub-block.
In addition, the numbers of the padded rows and columns are depending on the number of the filter taps and the shape of the filter used for the prediction block.
Some embodiments of the present disclosure can modify or remove the restriction that only the blocks with the number of samples greater than or equal to 64 and less than 4096 can apply IPS. Furthermore, a decision on whether to apply the IPS or not can be made according to the width and the height of the block.
For example, the IPS is only applied to luminance intra prediction blocks with the number of samples is greater than or equal to 64 and less than or equal to 4096. Therefore, a prediction block with a number of samples being equal to 4096 can also apply IPS.
In some embodiments, the IPS is only applied to luminance intra prediction blocks with both the width and the height are greater than or equal to 8 and less than or equal to 64.
In some embodiments, a one-side filter can be used to perform IPS, where the bottom-right weight is used for the current predicted sample when performing the IPS. In this way, only the samples in the left and above of the current predicted sample are used for filtering, which can solve the latency problem.
In some embodiments, the 25-tap filter described above is cropped to get a 9-tap filter to be used in IPS.
In some embodiments, the 13-tap filter (e.g., 13-tap filter 600 in
In some embodiments, another 25-tap filter is designed to be used in IPS.
With a one-side filter, the multiples and adds can be reduced, and the latency is improved.
In some embodiments, some rows can be skipped when performing IPS for a prediction block.
At step 2902, a number of rows which is less than a height of the sub-block is filtered. Filtering less rows rather than filtering all the rows can reduce the latency.
For example, only the first Xrows of the prediction block or sub-block are filtered and the other rows are unfiltered.
In some embodiments, Xis equal to H-2, where H is the number of rows of the height of the prediction block or sub-block. Then, the IPS is only applied to the first H-2 rows of the prediction block. In addition, X can be any non-negative integer value less than H.
Conventionally, the IPS is performed with a 13-tap filter or a 25-tap filter. In some embodiments, the number of taps can be reduced to decrease the computational complexity and the buffering. Furthermore, reducing the tap in vertical direction can solve the latency issue.
Conventionally, the IPS filters are 2D filters. In some embodiments, a 1D filter can be used to replace the 2D filter, so that the computational complexity, the hardware pipeline latency and the buffering can be reduced. The number of the taps can be any non-negative odd integer value, and each weight is a non-negative integer value.
In some embodiments, the filter design may have one of following characteristics, which can reduce the computation complexity:
In some embodiments, a horizontal 1D filter and a vertical 1D filter are both used for performing IPS filtering. For example, horizontal filtering can be performed on all samples in the current prediction block with a horizontal 1D filter, and then vertical filtering can be performed on all the filtered samples with a vertical 1D filter. In some embodiments, vertical filtering can be performed on all samples in the current prediction block with a vertical 1D filter, and then horizontal filtering can be performed on all the filtered samples with a horizontal 1D filter.
In some embodiments, only horizontal filtering is performed on all samples in the current prediction block with a horizontal 1D filter.
In some embodiments, only vertical filtering is performed on all samples in the current prediction block with a vertical 1D filter.
In some embodiments, to use one of or both of horizontal 1D filter and vertical 1D filter or not use filter is determined according to the intra prediction mode used for the prediction blocks.
At step 3402A, an index of intra prediction mode is determined.
At step 3404A, in response to the index of mode being less than 3 (e.g., a non-angular mode, such as Plane, Bilinear or DC mode), a 2D filtering is performed (horizontal first and vertical second or vertical first and horizontal second).
At step 3406A, in response to the index of mode ∈ [19,32] or [51,65] (e.g., the angular mode in the right of mode 18, referring to
At step 3408A, in response to the index of mode ∈ [3,18] or [34,50] (e.g., the angular mode in the left of mode 18, referring to
At step 3402B, an index of intra prediction mode is determined.
At step 3404B, in response to the index of mode being less than 3 (e.g., a non-angular mode, such as Plane, Bilinear or DC mode), 2D filtering (horizontal first and vertical second or vertical first and horizontal second) is performed.
At step 3406B, in response to the index of mode ∈ [19,32] or [51,65] (e.g., the angular mode in the right of mode 18, referring to
At step 3408B, in response to the index of mode ∈ [3,18] or [34,50] (e.g., the angular mode in the left of mode 18, including model 18, referring to
At step 3402C, an index of intra prediction mode is determined.
At step 3404C, in response to the index of mode being less than 3 (e.g., a non-angular mode, such as Plane, Bilinear or DC mode), no filtering is performed.
At step 3406C, in response to the index of mode ∈ [19,32] or [51,65] (e.g., the angular mode in the right of mode 18, referring to
At step 3408C, in response to the index of mode ∈ [3,18] or [34,50] (e.g., the angular mode in the left of mode 18, including mode 18, referring to
At step 3402D, an index of intra prediction mode is determined.
At step 3404D, in response to the index of mode being less than 3 (e.g., a non-angular mode, such as Plane, Bilinear or DC mode), no filtering is performed.
At step 3406D, in response to the index of mode ∈ [19,32] or [51,65] (e.g., the angular mode in the right of mode 18, referring to
At step 3408D, in response to the index of mode ∈ [3,18] or [34,50] (e.g., the angular mode in the left of mode 18, including mode 18, referring to
In some embodiments, when performing IPS filtering, it is determined, according to the intra prediction mode, to use a 1D horizontal filter with different weights. For example, for vertical modes, a shaper 1D horizontal filter (the differences of weights are large) is used. For horizontal modes, a smoother 1D horizontal filter (the differences of weights are small) is used.
In some embodiment, the weights in the horizontal 1D filter and the vertical 1D filter can be different. In some embodiments, the tap number of 1D horizontal filter may be different from the tap number of 1D vertical filter. To reduce the memory cost and latency, 1D vertical filter may have less tap number than 1D horizontal filter. For example, 1D horizontal filter has 5 taps, while 1D vertical filter only has 3 taps.
The present disclosure also proposes to use a 1D horizontal filter for the padded prediction block and combine with some reference samples. In this way, the hardware pipeline latency and the buffering can be reduced.
In some embodiments, when filtering the current prediction filter with a 1D horizontal filter, some reference samples from top reference row and left reference column at the corresponding positions can be used.
In some embodiments, only some reference samples from left reference column at the corresponding positions are used.
In some embodiments, some reference samples at the corresponding positions are averaged to use for the filter process.
In some embodiments, the reference samples at the corresponding positions according to the intra prediction mode are used for the filter process. If the prediction mode is a non-angular mode, the averaged reference samples are used. If the prediction mode is an angular mode, the reference samples according to the prediction direction are used.
The number of the taps of the internal 1D horizontal used for the padded prediction block can be any positive integer, such as 3, 5, 7 and 9. The number of the used reference samples can be any positive integer, such as 2 and 4.
In some embodiments, the filter can be applied to not only the luma samples but also chroma samples. Therefore, the benefits of smoothing the prediction boundaries between prediction samples can be applied to chroma. In some embodiments, the filter used for chroma samples may be the same as the one used for luma samples. In some embodiments, the filter used for chroma samples may have less tap than the one used for luma samples. In some embodiments, the filter used for chroma samples may be sub-sampled from the one used for luma samples.
Conventionally, a prediction sample is filtered by surrounding prediction samples of the prediction sample. Due to the order of predicting samples, the latency issue is thus introduced. In some embodiments, reference sample can be used instead of prediction sample when performing filtering.
In some embodiments, the reference samples used to replace the prediction samples may be the left or top reference samples.
In some embodiments, the reference samples used to replace the prediction samples may depend on intra prediction direction.
In some embodiments, the reference samples used to replace the prediction samples may depend on the block shape. If the block is flat-and-wide, the top reference samples are used. If the block is tall-and-narrow, the left reference samples are used.
Conventionally, when filtering the current sample, each weight in the filter needs to be multiplied by a corresponding sample, and the sum of the products needs to be divided by the sum of all the weights in the filter. The present disclosure proposes methods to enlarge or reduce the filter.
At step 4302, filtering is performed on a current sample by a filter.
At step 4304, products are obtained by multiplying each weight of the filter with a corresponding sample.
At step 4306, a filtered prediction value is obtained by dividing a sum of the products by a first number, wherein the first number is different from a sum of all the weights.
In some embodiments, the sum of the products can be divided by a number that is less than the sum of all the weights. For example, if the sum of all the weights is 254, the sum of the multiplications can be divided by 256.
In some embodiments, the sum of the products can be divided by a number that is greater than the sum of all the weights. For example, if the sum of all the weights is 258, the sum of the multiplications can be divided by 256.
In some embodiments, the filtered prediction values obtained by IPS can further be multiplied by a reduced factor with value less than 1. For example, the reduced factor can be equal to 254/256 or 252/256.
In some embodiments, the filtered prediction values obtained by IPS can further be multiplied by an enlarged factor with value greater than 1. For example, the enlarged factor can be equal to 258/256 or 260/256.
In the present disclosure, various filters are proposed. The differences between these filters are different numbers of filter taps, different filter shapes, different filter dimensions, different values of the filter weights, and different reference samples used for the filter.
In some embodiments, two or more filters can be used for IPS. The filters with the minimum rate-distortion cost will be selected in encoder. And additional flag(s) are signaled to indicate which filter is used.
In some embodiments, two or more filters can be used for IPS. And the filters can be selected adaptively according to the prediction mode.
At step 4402A, an index of intra prediction mode is determined.
At step 4404A, in response to the index of mode being less than 3 (e.g., non-angular modes, such as Plane, Bilinear and DC modes), the 1D horizontal 5 tap filter with 2 averaged reference samples as shown in
At step 4406A, in response to the index of mode ∈ [3,18] or [34,50] (e.g., the angular mode in the left of mode 18, referring to
At step 4408A, in response to the index of mode ∈ [23,25] or [56,59] (e.g., the angular mode around the horizontal direction, referring to
At step 4410A, in response to the index of mode ∈ [19,22] or [51,55] or [26,33] or [60,65]), the 1D horizontal 5 tap filter with 2 reference samples according to the prediction mode as shown in
In some embodiments, the filters can be selected adaptively according to the area of the prediction block.
At step 4402B, an area of the prediction block is determined.
At step 4404B, in response to the area of the prediction block is less than a threshold (e.g., 1024), the 9+4 tap filter as shown in
At step 4406B, in response to the other prediction blocks, the 1D horizontal 5 tap filter with 4 reference samples from the top reference row and the left reference column as shown in
For another example, the selection of the filters is as follows:
For the area of the prediction block is greater than a threshold (e.g., 1024), the 9+4 tap filter as shown in
For other prediction blocks, the 1D horizontal 5 tap filter with 4 reference samples from the top reference row and the left reference column as shown in
In some embodiments, the filters can be selected adaptively according to the width of the prediction block.
At step 4402C, a width of the prediction block is determined.
At step 4404C, in response to the width of the prediction block is less than a threshold (e.g., 16), the 9+4 tap filter as shown in
At step 4406C, in response to other prediction blocks, the 1D horizontal 5 tap filter with 4 reference samples from the top reference row and the left reference column as shown in
For another example, the selection of the filters is as follows:
For the width of the prediction block is greater than a threshold (e.g., 16), the 9+4 tap filter as shown in
For other prediction blocks, the 1D horizontal 5 tap filter with 4 reference samples from the top reference row and the left reference column as shown in
One or more embodiments of the present disclosure can be combined with other one or more embodiments. For example, a W×H prediction block can be vertically divided into several M×H sub-blocks, and 1D horizontal filter can be applied to each prediction sample. For another example, a W x H prediction block can be vertically divided into several M×H sub-blocks, and 5×3 tap filter can be applied to each prediction sample.
The InterPF method generates the final prediction block by weighting two prediction blocks Pred_inter and Pred_Q. The Pred_inter is derived by inter prediction. The Pred_Q is derived by the reconstructed reference samples of the current block like intra prediction.
In some embodiments, IPS can be applied to InterPF. For example, the IPS can be performed to the final prediction block obtained by InterPF. In some embodiments, the IPS can be only performed to the Pred_Q(x,y) when the InterPF index is equal to 0. For example, the aforementioned 25-tap IPS filter can be used to filter the Pred_Q. Therefore, the prediction accuracy is improved.
A two-step cross-component prediction mode (TSCPM) for chroma intra coding was adopted in AVS3, which assumes a linear correlation between luma and chroma components. When the chroma block utilizes cross-component prediction mode, two steps are required to get the chroma prediction block.
TSCPM can be performed in the following steps:
There are 3 TSCPM modes: TSCPM_LT, TSCPM_L and TSCPM_T modes. The difference between these three modes lies in the different samples selected to construct the linear model parameters. For a W×H block, using row[0, . . , W-1] to represent the reconstructed samples of the top neighboring row and using col[0, . . . ,H-1] to represent the reconstructed samples of the left neighboring column, the selected samples can be as follows:
For TSCPM_LT mode:
For TSCPM_T mode:
For TSCPM_L mode:
The 4 selected samples are sorted according to luma sample intensity and classified into 2 group. The two larger samples and two smaller samples are respectively averaged. Cross component prediction model is derived with the 2 averaged points.
The temporary chroma prediction block is generated based on Eq. (14),
P
c′(x, y)=α×RL(x, y)+β Eq. (14)
where Pc′ (x, y) denotes a temporary prediction sample of chroma, a and are two model parameters, and RL (x, y) is a reconstructed luma sample.
Similar to normal intra prediction process, clipping operations are applied to Pc′ (x, y) to make sure it is within [0, 1«(BitDepth-1)].
A six-tap filter (e.g., [121; 121]) is introduced for the down-sampled process for temporary chroma prediction block, based on Eq. (15),
P
c=(2×Pc′(2x, 2y)+2×Pc′(2x, 2y+1)+Pc′(2x−1, 2y)+Pc′(2x+1, 2y)+Pc′(2x−1, 2y+1)+Pc′(2x+1, 2y−1)+4)»3 Eq. (15)
In addition, for chroma samples located at the left most column, [11] down-sampling filter is applied instead.
A prediction from multiple cross-components (PMC) method was adopted in AVS3 in which the predictors of Cr component are derived by a linear model of the reconstructed values of Y component and the reconstructed values of Cb component based on Eq. (16) and Eq. (17),
IPred=A·RL+B Eq. (16)
FPredCr=IPred′−RCb Eq. (17)
where RL denotes the reconstructed block of Y, IPred is an internal block that has the same dimension of luma coding block, IPred′ represents the down-sampled block from IPred which has the same dimension as chroma coding block, RCb denotes the reconstructed block of Cb, and FPredCr denotes the predicted block of Cr. A and B in Eq. (16) are two parameters of PMC model which is derived from the parameters of TSCPM based on Eq. (18) and Eq. (19),
A=α
0+α1 Eq. (18)
B=β
0+β1 Eq. (19)
where (α0, (β0) and (α1,β1) are two sets of linear model parameters derived for Cb and Cr in TSCPM. PMC also has three modes: PMC_LT, PMC_T and PMC_L. In these three modes, the sample positions selected when calculating the parameters (α0, (β0) and (α1, β1) can be the same as the three modes of TSCPM_LT, TSCPM_T, and TSCPM_L as described above, respectively.
In some embodiments, an offset can be added when selecting the samples for TSCPM_T, PMC_T, TSCPM_L and PMC_L modes (e.g., the modes only use one reference side). For TSCPM_T and PMC_T modes, the selected positions are offset to the right by oW. For TSCPM_L and PMC_L modes, the selected positions are offset to the bottom by oH. The value of oW is greater than 0 and less than W/4. The value of oH is greater than 0 and less than H/4.
At step 4702, an offset value is added for selecting samples for a cross-component prediction mode with only one reference side applied. For example, the offset value could be W/8 or H/8, where W and H are the width and height of the prediction block.
At step 4704, prediction is performed with the cross-component prediction mode.
In some embodiments, the offset can be only used for TSCPM_L and TSCPM_T modes. In some embodiments, the offset can be only used for PMC_L and PMC_T modes. In some embodiments, the offset can be used for TSCPM_L, TSCPM_T, PMC_L and PMC_T modes.
It is appreciated that, one of ordinary skill in the art can combine some of the described embodiments into one embodiment.
The embodiments may further be described using the following clauses:
1. A video processing method, comprising:
2. The method of clause 1, wherein filtering the one or more sub-blocks with the parallel IPS process comprises:
3. The method of clause 2, further comprising:
4. The method of clause 2 or 3, further comprising:
5. The method of any one of clauses 1 to 4, wherein two or more filters are used for the parallel IPS process.
6. The method of clause 5, further comprising:
7. The method of clause 5, wherein the two or more filters are selected based on a prediction mode.
8. The method of any one of clauses 1 to 7, wherein the prediction block includes less than 64 samples or more than 4096 samples.
9. The method of any one of clauses 1 to 8, further comprising:
10. The method of any one of clauses 1 to 9, wherein the parallel IPS process is performed on a chroma sample.
11. An apparatus for video processing, the apparatus comprising:
a memory figured to store instructions; and
one or more processors configured to execute the instructions to cause the apparatus to perform:
12. The apparatus of clause 11, wherein the one or more processors are further configured to execute the instructions to cause the apparatus to perform:
13. The apparatus of clause 12, wherein the one or more processors are further configured to execute the instructions to cause the apparatus to perform:
determining whether to filter with the 1D filter based on an intra prediction mode used for the prediction block.
14. The apparatus of clause 12 or 13, wherein the one or more processors are further configured to execute the instructions to cause the apparatus to perform:
filtering the one or more sub-blocks with a 1D horizontal filter and one or more reference samples from a top reference row and/or one or more reference samples from a left reference column at a corresponding position.
15. The apparatus of any one of clauses 11 to 14, wherein two or more filters are used for the parallel IPS process.
16. The apparatus of clause 15, wherein the one or more processors are further configured to execute the instructions to cause the apparatus to perform:
selecting the two or more filters based on minimum rate-distortion cost by an encoder; and
signaling one or more flags to indicate the two or more filters.
17. The apparatus of clause 15, wherein the two or more filters are selected based on a prediction mode.
18. The apparatus of any one of clauses 11 to 17, wherein the prediction block includes less than 64 samples or more than 4096 samples.
19. The apparatus of any one of clauses 11 to 18, wherein the one or more processors are further configured to execute the instructions to cause the apparatus to perform:
20. The apparatus of any one of clauses 11 to 19, wherein the one or more processors are further configured to execute the instructions to cause the apparatus to perform:
21. A non-transitory computer readable medium that stores a set of instructions that is executable by one or more processors of an apparatus to cause the apparatus to initiate a method for video processing, the method comprising:
22. The non-transitory computer readable medium of clause 21, wherein the set of instructions that is executable by one or more processors of an apparatus to cause the apparatus to further perform:
23. The non-transitory computer readable medium of clause 22, wherein the set of instructions that is executable by one or more processors of an apparatus to cause the apparatus to further perform:
24. The non-transitory computer readable medium of clause 22 or 23, wherein the set of instructions that is executable by one or more processors of an apparatus to cause the apparatus to further perform:
25. The non-transitory computer readable medium of any one of clauses 21 to 24, wherein two or more filters are used for the parallel IPS process.
26. The non-transitory computer readable medium of clause 25, wherein the set of instructions that is executable by one or more processors of an apparatus to cause the apparatus to further perform:
27. The non-transitory computer readable medium of clause 25, wherein the two or more filters are selected based on a prediction mode.
28. The non-transitory computer readable medium of any one of clauses 21 to 27, wherein the prediction block includes less than 64 samples or more than 4096 samples.
29. The non-transitory computer readable medium of any one of clauses 21 to 28, wherein the set of instructions that is executable by one or more processors of an apparatus to cause the apparatus to further perform:
30. The non-transitory computer readable medium of any one of clauses 21 to 29, wherein the set of instructions that is executable by one or more processors of an apparatus to cause the apparatus to further perform:
performing the parallel IPS process on a chroma sample.
In some embodiments, a non-transitory computer-readable storage medium including instructions is also provided, and the instructions may be executed by a device (such as the disclosed encoder and decoder), for performing the above-described methods. Common forms of non-transitory media include, for example, a floppy disk, a flexible disk, hard disk, solid state drive, magnetic tape, or any other magnetic data storage medium, a CD-ROM, any other optical data storage medium, any physical medium with patterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROM or any other flash memory, NVRAM, a cache, a register, any other memory chip or cartridge, and networked versions of the same. The device may include one or more processors (CPUs), an input/output interface, a network interface, and/or a memory.
It should be noted that, the relational terms herein such as “first” and “second” are used only to differentiate an entity or operation from another entity or operation, and do not require or imply any actual relationship or sequence between these entities or operations. Moreover, the words “comprising,” “having,” “containing,” and “including,” and other similar forms are intended to be equivalent in meaning and be open ended in that an item or items following any one of these words is not meant to be an exhaustive listing of such item or items, or meant to be limited to only the listed item or items.
As used herein, unless specifically stated otherwise, the term “or” encompasses all possible combinations, except where infeasible. For example, if it is stated that a database may include A or B, then, unless specifically stated otherwise or infeasible, the database may include A, or B, or A and B. As a second example, if it is stated that a database may include A, B, or C, then, unless specifically stated otherwise or infeasible, the database may include A, or B, or C, or A and B, or A and C, or B and C, or A and B and C.
It is appreciated that the above-described embodiments can be implemented by hardware, or software (program codes), or a combination of hardware and software. If implemented by software, it may be stored in the above-described computer-readable media. The software, when executed by the processor can perform the disclosed methods. The computing units and other functional units described in this disclosure can be implemented by hardware, or software, or a combination of hardware and software. One of ordinary skill in the art will also understand that multiple ones of the above-described modules/units may be combined as one module/unit, and each of the above-described modules/units may be further divided into a plurality of sub-modules/sub-units.
In the foregoing specification, embodiments have been described with reference to numerous specific details that can vary from implementation to implementation. Certain adaptations and modifications of the described embodiments can be made. Other embodiments can be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims. It is also intended that the sequence of steps shown in figures are only for illustrative purposes and are not intended to be limited to any particular sequence of steps. As such, those skilled in the art can appreciate that these steps can be performed in a different order while implementing the same method.
In the drawings and specification, there have been disclosed exemplary embodiments. However, many variations and modifications can be made to these embodiments. Accordingly, although specific terms are employed, they are used in a generic and descriptive sense only and not for purposes of limitation.
The disclosure claims the benefits of priority to U.S. Provisional Application No. 63/068,504, filed on Aug. 21, 2020, and U.S. Provisional Application No. 63/091,331, filed on Oct. 14, 2020, both of which are incorporated herein by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
63068504 | Aug 2020 | US | |
63091331 | Oct 2020 | US |