Embodiments of the present disclosure relates generally to video coding techniques, and more particularly, to distortion determination with machine learning model.
In nowadays, digital video capabilities are being applied in various aspects of peoples' lives. Multiple types of video compression technologies, such as MPEG-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4 Part 10 Advanced Video Coding (AVC), ITU-TH.265 high efficiency video coding (HEVC) standard, versatile video coding (VVC) standard, have been proposed for video encoding/decoding. However, coding efficiency of conventional video coding techniques is generally very low, which is undesirable.
Embodiments of the present disclosure provide a solution for video processing.
In a first aspect, a method for video processing is proposed. The method comprises: determining, for a conversion between a current video block of a video and a bitstream of the video, a distortion value of the current video block based on a set of distortion metrics, the set of distortion metrics comprising at least one of: a first distortion metric determined according to a first machine learning model, a second distortion metric determined according to a second machine learning model, or a third distortion metric determined without using the first and second machine learning models; and performing the conversion based on the distortion value.
The method in accordance with the first aspect of the present disclosure determines a distortion value of the current video block based on a set of distortion metrics. The determined distortion value may be applied in a rate-distortion optimization (RDO) process, and thus can improve the RDO process. In this way, the coding effectiveness and coding efficiency can be improved.
In a second aspect, another method for video processing is proposed. The method comprises: determining, for a conversion between a current video block of a video and a bitstream of the video, whether to apply a machine learning model in a rate-distortion optimization (RDO) process for a coding tool of the current video block; performing the RDO process on the current video block based on the determining; and performing the conversion based on the RDO process.
The method in accordance with the second aspect of the present disclosure determines whether to apply a machine learning model in a RDO process for a coding tool of the current video block. In this way, the coding effectiveness and coding efficiency can be improved.
In a third aspect, an apparatus for processing video data is proposed. The apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform a method in accordance with the first or second aspect of the present disclosure.
In a fourth aspect, a non-transitory computer-readable storage medium is proposed. The non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with the first or second aspect of the present disclosure.
In a fifth aspect, a non-transitory computer-readable recording medium is proposed. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises: determining a distortion value of a current video block of the video based on a set of distortion metrics, the set of distortion metrics comprising at least one of: a first distortion metric determined according to a first machine learning model, a second distortion metric determined according to a second machine learning model, or a third distortion metric determined without using the first and second machine learning models; and generating the bitstream based on the distortion value.
In a sixth aspect, a method for storing a bitstream of a video is proposed. The method comprises: determining a distortion value of a current video block of the video based on a set of distortion metrics, the set of distortion metrics comprising at least one of: a first distortion metric determined according to a first machine learning model, a second distortion metric determined according to a second machine learning model, or a third distortion metric determined without using the first and second machine learning models; generating the bitstream based on the distortion value; and storing the bitstream in a non-transitory computer-readable recording medium.
In a seventh aspect, another non-transitory computer-readable recording medium is proposed. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises: determining whether to apply a machine learning model in a rate-distortion optimization (RDO) process for a coding tool of a current video block of the video; performing the RDO process on the current video block based on the determining; and generating the bitstream based on the RDO process.
In an eighth aspect, another method for storing a bitstream of a video is proposed. The method comprises: determining whether to apply a machine learning model in a rate-distortion optimization (RDO) process for a coding tool of a current video block of the video; performing the RDO process on the current video block based on the determining; generating the bitstream based on the RDO process; and storing the bitstream in a non-transitory computer-readable recording medium.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Through the following detailed description with reference to the accompanying drawings, the above and other objectives, features, and advantages of example embodiments of the present disclosure will become more apparent. In the example embodiments of the present disclosure, the same reference numerals usually refer to the same components.
Throughout the drawings, the same or similar reference numerals usually refer to the same or similar elements.
Principle of the present disclosure will now be described with reference to some embodiments. It is to be understood that these embodiments are described only for the purpose of illustration and help those skilled in the art to understand and implement the present disclosure, without suggesting any limitation as to the scope of the disclosure. The disclosure described herein can be implemented in various manners other than the ones described below.
In the following description and claims, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skills in the art to which this disclosure belongs.
References in the present disclosure to “one embodiment,” “an embodiment,” “an example embodiment,” and the like indicate that the embodiment described may include a particular feature, structure, or characteristic, but it is not necessary that every embodiment includes the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an example embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
It shall be understood that although the terms “first” and “second” etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and similarly, a second element could be termed a first element, without departing from the scope of example embodiments. As used herein, the term “and/or” includes any and all combinations of one or more of the listed terms.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises”, “comprising”, “has”, “having”, “includes” and/or “including”, when used herein, specify the presence of stated features, elements, and/or components etc., but do not preclude the presence or addition of one or more other features, elements, components and/or combinations thereof.
The video source 112 may include a source such as a video capture device. Examples of the video capture device include, but are not limited to, an interface to receive video data from a video content provider, a computer graphics system for generating video data, and/or a combination thereof.
The video data may comprise one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a bitstream. The bitstream may include a sequence of bits that form a coded representation of the video data. The bitstream may include coded pictures and associated data. The coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. The I/O interface 116 may include a modulator/demodulator and/or a transmitter. The encoded video data may be transmitted directly to destination device 120 via the I/O interface 116 through the network 130A. The encoded video data may also be stored onto a storage medium/server 130B for access by destination device 120.
The destination device 120 may include an I/O interface 126, a video decoder 124, and a display device 122. The I/O interface 126 may include a receiver and/or a modem. The I/O interface 126 may acquire encoded video data from the source device 110 or the storage medium/server 130B. The video decoder 124 may decode the encoded video data. The display device 122 may display the decoded video data to a user. The display device 122 may be integrated with the destination device 120, or may be external to the destination device 120 which is configured to interface with an external display device.
The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, Versatile Video Coding (VVC) standard and other current and/or further standards.
The video encoder 200 may be configured to implement any or all of the techniques of this disclosure. In the example of
In some embodiments, the video encoder 200 may include a partition unit 201, a prediction unit 202 which may include a mode select unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-prediction unit 206, a residual generation unit 207, a transform unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transform unit 211, a reconstruction unit 212, a buffer 213, and an entropy encoding unit 214.
In other examples, the video encoder 200 may include more, fewer, or different functional components. In an example, the prediction unit 202 may include an intra block copy (IBC) unit. The IBC unit may perform prediction in an IBC mode in which at least one reference picture is a picture where the current video block is located.
Furthermore, although some components, such as the motion estimation unit 204 and the motion compensation unit 205, may be integrated, but are represented in the example of
The partition unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.
The mode select unit 203 may select one of the coding modes, intra or inter, e.g., based on error results, and provide the resulting intra-coded or inter-coded block to a residual generation unit 207 to generate residual block data and to a reconstruction unit 212 to reconstruct the encoded block for use as a reference picture. In some examples, the mode select unit 203 may select a combination of intra and inter prediction (CIIP) mode in which the prediction is based on an inter prediction signal and an intra prediction signal. The mode select unit 203 may also select a resolution for a motion vector (e.g., a sub-pixel or integer pixel precision) for the block in the case of inter-prediction.
To perform inter prediction on a current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing one or more reference frames from buffer 213 to the current video block. The motion compensation unit 205 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from the buffer 213 other than the picture associated with the current video block.
The motion estimation unit 204 and the motion compensation unit 205 may perform different operations for a current video block, for example, depending on whether the current video block is in an I-slice, a P-slice, or a B-slice. As used herein, an “I-slice” may refer to a portion of a picture composed of macroblocks, all of which are based upon macroblocks within the same picture. Further, as used herein, in some aspects, “P-slices” and “B-slices” may refer to portions of a picture composed of macroblocks that are not dependent on macroblocks in the same picture.
In some examples, the motion estimation unit 204 may perform uni-directional prediction for the current video block, and the motion estimation unit 204 may search reference pictures of list 0 or list 1 for a reference video block for the current video block. The motion estimation unit 204 may then generate a reference index that indicates the reference picture in list 0 or list 1 that contains the reference video block and a motion vector that indicates a spatial displacement between the current video block and the reference video block. The motion estimation unit 204 may output the reference index, a prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate the predicted video block of the current video block based on the reference video block indicated by the motion information of the current video block.
Alternatively, in other examples, the motion estimation unit 204 may perform bi-directional prediction for the current video block. The motion estimation unit 204 may search the reference pictures in list 0 for a reference video block for the current video block and may also search the reference pictures in list 1 for another reference video block for the current video block. The motion estimation unit 204 may then generate reference indexes that indicate the reference pictures in list 0 and list 1 containing the reference video blocks and motion vectors that indicate spatial displacements between the reference video blocks and the current video block. The motion estimation unit 204 may output the reference indexes and the motion vectors of the current video block as the motion information of the current video block. The motion compensation unit 205 may generate the predicted video block of the current video block based on the reference video blocks indicated by the motion information of the current video block.
In some examples, the motion estimation unit 204 may output a full set of motion information for decoding processing of a decoder. Alternatively, in some embodiments, the motion estimation unit 204 may signal the motion information of the current video block with reference to the motion information of another video block. For example, the motion estimation unit 204 may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.
In one example, the motion estimation unit 204 may indicate, in a syntax structure associated with the current video block, a value that indicates to the video decoder 300 that the current video block has the same motion information as the another video block.
In another example, the motion estimation unit 204 may identify, in a syntax structure associated with the current video block, another video block and a motion vector difference (MVD). The motion vector difference indicates a difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 300 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.
As discussed above, video encoder 200 may predictively signal the motion vector. Two examples of predictive signaling techniques that may be implemented by video encoder 200 include advanced motion vector prediction (AMVP) and merge mode signaling.
The intra prediction unit 206 may perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a predicted video block and various syntax elements.
The residual generation unit 207 may generate residual data for the current video block by subtracting (e.g., indicated by the minus sign) the predicted video block (s) of the current video block from the current video block. The residual data of the current video block may include residual video blocks that correspond to different sample components of the samples in the current video block.
In other examples, there may be no residual data for the current video block for the current video block, for example in a skip mode, and the residual generation unit 207 may not perform the subtracting operation.
The transform processing unit 208 may generate one or more transform coefficient video blocks for the current video block by applying one or more transforms to a residual video block associated with the current video block.
After the transform processing unit 208 generates a transform coefficient video block associated with the current video block, the quantization unit 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.
The inverse quantization unit 210 and the inverse transform unit 211 may apply inverse quantization and inverse transforms to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. The reconstruction unit 212 may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the prediction unit 202 to produce a reconstructed video block associated with the current video block for storage in the buffer 213.
After the reconstruction unit 212 reconstructs the video block, loop filtering operation may be performed to reduce video blocking artifacts in the video block.
The entropy encoding unit 214 may receive data from other functional components of the video encoder 200. When the entropy encoding unit 214 receives the data, the entropy encoding unit 214 may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.
The video decoder 300 may be configured to perform any or all of the techniques of this disclosure. In the example of
In the example of
The entropy decoding unit 301 may retrieve an encoded bitstream. The encoded bitstream may include entropy coded video data (e.g., encoded blocks of video data). The entropy decoding unit 301 may decode the entropy coded video data, and from the entropy decoded video data, the motion compensation unit 302 may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 may, for example, determine such information by performing the AMVP and merge mode. AMVP is used, including derivation of several most probable candidates based on data from adjacent PBs and the reference picture. Motion information typically includes the horizontal and vertical motion vector displacement values, one or two reference picture indices, and, in the case of prediction regions in B slices, an identification of which reference picture list is associated with each index. As used herein, in some aspects, a “merge mode” may refer to deriving the motion information from spatially or temporally neighboring blocks.
The motion compensation unit 302 may produce motion compensated blocks, possibly performing interpolation based on interpolation filters. Identifiers for interpolation filters to be used with sub-pixel precision may be included in the syntax elements.
The motion compensation unit 302 may use the interpolation filters as used by the video encoder 200 during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. The motion compensation unit 302 may determine the interpolation filters used by the video encoder 200 according to the received syntax information and use the interpolation filters to produce predictive blocks.
The motion compensation unit 302 may use at least part of the syntax information to determine sizes of blocks used to encode frame(s) and/or slice(s) of the encoded video sequence, partition information that describes how each macroblock of a picture of the encoded video sequence is partitioned, modes indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-encoded block, and other information to decode the encoded video sequence. As used herein, in some aspects, a “slice” may refer to a data structure that can be decoded independently from other slices of the same picture, in terms of entropy coding, signal prediction, and residual signal reconstruction. A slice can either be an entire picture or a region of a picture.
The intra prediction unit 303 may use intra prediction modes for example received in the bitstream to form a prediction block from spatially adjacent blocks. The inverse quantization unit 304 inverse quantizes, i.e., de-quantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 301. The inverse transform unit 305 applies an inverse transform.
The reconstruction unit 306 may obtain the decoded blocks, e.g., by summing the residual blocks with the corresponding prediction blocks generated by the motion compensation unit 302 or intra-prediction unit 303. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blockiness artifacts. The decoded video blocks are then stored in the buffer 307, which provides reference blocks for subsequent motion compensation/intra prediction and also produces decoded video for presentation on a display device.
Some exemplary embodiments of the present disclosure will be described in detailed hereinafter. It should be understood that section headings are used in the present document to facilitate ease of understanding and do not limit the embodiments disclosed in a section to only that section. Furthermore, while certain embodiments are described with reference to Versatile Video Coding or other specific video codecs, the disclosed techniques are applicable to other video coding technologies also. Furthermore, while some embodiments describe video coding steps in detail, it will be understood that corresponding steps decoding that undo the coding will be implemented by a decoder. Furthermore, the term video processing encompasses video coding or compression, video decoding or decompression and video transcoding in which video pixels are represented from one compressed format into another compressed format or at a different compressed bitrate.
This disclosure is related to video coding technologies. Specifically, it is related to the loop filter in image/video coding. It may be applied to the existing video coding standard like High-Efficiency Video Coding (HEVC), Versatile Video Coding (VVC), or the standard (e.g., AVS3) to be finalized. It may be also applicable to future video coding standards or video codec or being used as post-processing method which is out of encoding/decoding process.
Video coding standards have evolved primarily through the development of the well-known ITU-T and ISO/IEC standards. The ITU-T produced H.261 and H.263, ISO/IEC produced MPEG-1 and MPEG-4 Visual, and the two organizations jointly produced the H.262/MPEG-2 Video and H.264/MPEG-4 Advanced Video Coding (AVC) and H.265/HEVC standards. Since H.262, the video coding standards are based on the hybrid video coding structure wherein temporal prediction plus transform coding are utilized. To explore the future video coding technologies beyond HEVC, Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. Since then, many new methods have been adopted by JVET and put into the reference software named Joint Exploration Model (JEM). In April 2018, the Joint Video Expert Team (JVET) between VCEG (Q6/16) and ISO/IEC JTC1 SC29/WG11 (MPEG) was created to work on the VVC standard targeting at 50% bitrate reduction compared to HEVC. VVC version 1 was finalized in July 2020.
The latest version of VVC draft, i.e., Versatile Video Coding (Draft 10) could be found at:
The latest reference software of VVC, named VTM, could be found at:
Color space, also known as the color model (or color system), is an abstract mathematical model which simply describes the range of colors as tuples of numbers, typically as 3 or 4 values or color components (e.g., RGB). Basically speaking, color space is an elaboration of the coordinate system and sub-space.
For video compression, the most frequently used color spaces are YCbCr and RGB.
YCbCr, Y′CbCr, or Y Pb/Cb Pr/Cr, also written as YCBCR or Y′CBCR, is a family of color spaces used as a part of the color image pipeline in video and digital photography systems. Y′ is the luma component and CB and CR are the blue-difference and red-difference chroma components. Y′ (with prime) is distinguished from Y, which is luminance, meaning that light intensity is nonlinearly encoded based on gamma corrected RGB primaries. Chroma subsampling is the practice of encoding images by implementing less resolution for chroma information than for luma information, taking advantage of the human visual system's lower acuity for color differences than for luminance.
2.1.1. 4:4:4
Each of the three Y′CbCr components have the same sample rate, thus there is no chroma subsampling. This scheme is sometimes used in high-end film scanners and cinematic post production.
2.1.2. 4:2:2
The two chroma components are sampled at half the sample rate of luma: the horizontal chroma resolution is halved. This reduces the bandwidth of an uncompressed video signal by one-third with little to no visual difference.
2.1.3. 4:2:0
In 4:2:0, the horizontal sampling is doubled compared to 4:1:1, but as the Cb and Cr channels are only sampled on each alternate line in this scheme, the vertical resolution is halved. The data rate is thus the same. Cb and Cr are each subsampled at a factor of 2 both horizontally and vertically. There are three variants of 4:2:0 schemes, having different horizontal and vertical siting.
A picture is divided into one or more tile rows and one or more tile columns. A tile is a sequence of CTUs that covers a rectangular region of a picture.
A tile is divided into one or more bricks, each of which consisting of a number of CTU rows within the tile.
A tile that is not partitioned into multiple bricks is also referred to as a brick. However, a brick that is a true subset of a tile is not referred to as a tile.
A slice either contains a number of tiles of a picture or a number of bricks of a tile.
Two modes of slices are supported, namely the raster-scan slice mode and the rectangular slice mode. In the raster-scan slice mode, a slice contains a sequence of tiles in a tile raster scan of a picture. In the rectangular slice mode, a slice contains a number of bricks of a picture that collectively form a rectangular region of the picture. The bricks within a rectangular slice are in the order of brick raster scan of the slice.
In VVC, the CTU size, signaled in SPS by the syntax element log 2_ctu_size_minus2, could be as small as 4×4.
log 2_ctu_size_minus2 plus 2 specifies the luma coding tree block size of each CTU.
log 2_min_luma_coding_block_size_minus2 plus 2 specifies the minimum luma coding block size.
The variables CtbLog2SizeY, CtbSizeY, MinCbLog2SizeY, MinCbSizeY, MinThLog2SizeY, MaxTbLog2SizeY, MinTbSizeY, MaxTbSizeY, PicWidthInCtbsY, PicHeightInCtbsY, PicSizeInCtbsY, PicWidthInMinCbsY, PicHeightInMinCbsY, PicSizeInMinCbsY, PicSizeInSamplesY, PicWidthInSamplesC and PicHeightInSamplesC are derived as follows:
2.2.2. CTUs in a Picture
Suppose the CTB/LCU size indicated by M×N (typically M is equal to N, as defined in HEVC/VVC), and for a CTB located at picture (or tile or slice or other kinds of types, picture border is taken as an example) border, K×L samples are within picture border wherein either K<M or L<N.
The input of DB is the reconstructed samples before in-loop filters.
The vertical edges in a picture are filtered first. Then the horizontal edges in a picture are filtered with samples modified by the vertical edge filtering process as input. The vertical and horizontal edges in the CTBs of each CTU are processed separately on a coding unit basis. The vertical edges of the coding blocks in a coding unit are filtered starting with the edge on the left-hand side of the coding blocks proceeding through the edges towards the right-hand side of the coding blocks in their geometrical order. The horizontal edges of the coding blocks in a coding unit are filtered starting with the edge on the top of the coding blocks proceeding through the edges towards the bottom of the coding blocks in their geometrical order.
Filtering is applied to 8×8 block boundaries. In addition, it must be a transform block boundary or a coding subblock boundary (e.g., due to usage of Affine motion prediction, ATMVP). For those which are not such boundaries, filter is disabled.
For a transform block boundary/coding subblock boundary, if it is located in the 8×8 grid, it may be filtered and the setting of bS [xDi] [yDj] (wherein [xDi] [yDj] denotes the coordinate) for this edge is defined in Table 1 and Table 2, respectively.
The deblocking decision process is described in this sub-section.
Wider-stronger luma filter is filters are used only if all the Condition1, Condition2 and Condition 3 are TRUE. The condition 1 is the “large block condition”. This condition detects whether the samples at P-side and Q-side belong to large blocks, which are represented by the variable bSidePisLargeBlk and bSideQisLargeBlk respectively. The bSidePisLargeBlk and bSideQisLargeBlk are defined as follows.
Based on bSidePisLargeBlk and bSideQisLargeBlk, the condition 1 is defined as follows.
Condition1=(bSidePisLargeBlk∥ bSidePisLargeBlk)? TRUE: FALSE
Next, if Condition 1 is true, the condition 2 will be further checked. First, the following variables are derived:
Condition2=(d<β)? TRUE: FALSE
If Condition1 and Condition2 are valid, whether any of the blocks uses sub-blocks is further checked:
Finally, if both the Condition 1 and Condition 2 are valid, the proposed deblocking method will check the condition 3 (the large block strong filter condition), which is defined as follows.
In the Condition3 StrongFilterCondition, the following variables are derived:
As in HEVC, StrongFilterCondition=(dpq is less than (β>>2), sp3+sq3 is less than (3*β>>5), and Abs(p0−q0) is less than (5*tc+1)>>1)? TRUE: FALSE.
Bilinear filter is used when samples at either one side of a boundary belong to a large block. A sample belonging to a large block is defined as when the width>=32 for a vertical edge, and when height>=32 for a horizontal edge. The bilinear filter is listed below.
Block boundary samples pi for i=0 to Sp−1 and qi for j=0 to Sq−1 (pi and qi are the i-th sample within a row for filtering vertical edge, or the i-th sample within a column for filtering horizontal edge) in HEVC deblocking described above) are then replaced by linear interpolation as follows:
The chroma strong filters are used on both sides of the block boundary. Here, the chroma filter is selected when both sides of the chroma edge are greater than or equal to 8 (chroma position), and the following decision with three conditions are satisfied: the first one is for decision of boundary strength as well as large block. The proposed filter can be applied when the block width or height which orthogonally crosses the block edge is equal to or larger than 8 in chroma sample domain. The second and third one is basically the same as for HEVC luma deblocking decision, which are on/off decision and strong filter decision, respectively.
In the first decision, boundary strength (bS) is modified for chroma filtering and the conditions are checked sequentially. If a condition is satisfied, then the remaining conditions with lower priorities are skipped. Chroma deblocking is performed when bS is equal to 2, or bS is equal to 1 when a large block boundary is detected. The second and third condition is basically the same as HEVC luma strong filter decision as follows.
In the second condition:
The second condition will be TRUE when d is less than β.
In the third condition StrongFilterCondition is derived as follows:
As in HEVC design, StrongFilterCondition=(dpq is less than ((β>>2), sp3+sq3 is less than (β>>3), and Abs(p0−q0) is less than (5*tc+1)>>1).
The following strong deblocking filter for chroma is defined:
The proposed chroma filter performs deblocking on a 4×4 chroma sample grid.
The position dependent clipping tcPD is applied to the output samples of the luma filtering process involving strong and long filters that are modifying 7, 5 and 3 samples at the boundary. Assuming quantization error distribution, it is proposed to increase clipping value for samples which are expected to have higher quantization noise, thus expected to have higher deviation of the reconstructed sample value from the true sample value.
For each P or Q boundary filtered with asymmetrical filter, depending on the result of decision-making process in section 2.4.2, position dependent threshold table is selected from two tables (i.e., Tc7 and Tc3 tabulated below) that are provided to decoder as a side information:
Tc7={6, 5, 4, 3, 2, 1, 1}; Tc3={6,4,2};
For the P or Q boundaries being filtered with a short symmetrical filter, position dependent threshold of lower magnitude is applied:
Tc3={3, 2, 1}.
Following defining the threshold, filtered p ‘t and q’; sample values are clipped according to tcP and tcQ clipping values:
To enable parallel friendly deblocking using both long filters and sub-block deblocking the long filters is restricted to modify at most 5 samples on a side that uses sub-block deblocking (AFFINE or ATMVP or DMVR) as shown in the luma control for long filters. Additionally, the sub-block deblocking is adjusted such that that sub-block boundaries on an 8×8 grid that are close to a CU or an implicit TU boundary is restricted to modify at most two samples on each side.
Following applies to sub-block boundaries that not are aligned with the CU boundary.
Where edge equal to 0 corresponds to CU boundary, edge equal to 2 or equal to orthogonalLength-2 corresponds to sub-block boundary 8 samples from a CU boundary etc. Where implicit TU is true if implicit split of TU is used.
The input of SAO is the reconstructed samples after DB. The concept of SAO is to reduce mean sample distortion of a region by first classifying the region samples into multiple categories with a selected classifier, obtaining an offset for each category, and then adding the offset to each sample of the category, where the classifier index and the offsets of the region are coded in the bitstream. In HEVC and VVC, the region (the unit for SAO parameters signaling) is defined to be a CTU.
Two SAO types that can satisfy the requirements of low complexity are adopted in HEVC. Those two types are edge offset (EO) and band offset (BO), which are discussed in further detail below. An index of an SAO type is coded (which is in the range of [0, 2]). For EO, the sample classification is based on comparison between current samples and neighboring samples according to 1-D directional patterns: horizontal, vertical, 135° diagonal, and 45° diagonal.
The input of DB is the reconstructed samples after DB and SAO. The sample classification and filtering process are based on the reconstructed samples after DB and SAO.
In the JEM, a geometry transformation-based adaptive loop filter (GALF) with block-based filter adaption is applied. For the luma component, one among 25 filters is selected for each 2×2 block, based on the direction and activity of local gradients.
In the JEM, up to three diamond filter shapes (as shown in
An index is signalled at the picture level to indicate the filter shape used for the luma component. Each square represents a sample, and Ci (i being 0-6 (left), 0-12 (middle), 0-20 (right)) denotes the coefficient to be applied to the sample. For chroma components in a picture, the 5×5 diamond shape is always used.
Each 2×2 block is categorized into one out of 25 classes. The classification index C is derived based on its directionality D and a quantized value of activity Â, as follows:
To calculate D and Â, gradients of the horizontal, vertical and two diagonal directions are first calculated using 1-D Laplacian:
Indices i and j refer to the coordinates of the upper left sample in the 2×2 block and R(i,j) indicates a reconstructed sample at coordinate (i, j).
Then D maximum and minimum values of the gradients of horizontal and vertical directions are set as:
and the maximum and minimum values of the gradient of two diagonal directions are set as:
To derive the value of the directionality D, these values are compared against each other and with two thresholds t1 and t2:
Step 2. If gh,vmax/gh,vmin>gd0,d1max/gd0,d1min, continue from Step 3; otherwise continue from Step 4.
The activity value A is calculated as:
A is further quantized to the range of 0 to 4, inclusively, and the quantized value is denoted as Â.
For both chroma components in a picture, no classification method is applied, i.e., a single set of ALF coefficients is applied for each chroma component.
Before filtering each 2×2 block, geometric transformations such as rotation or diagonal and vertical flipping are applied to the filter coefficients f(k, l), which is associated with the coordinate (k, l), depending on gradient values calculated for that block. This is equivalent to applying these transformations to the samples in the filter support region. The idea is to make different blocks to which ALF is applied more similar by aligning their directionality. Three geometric transformations, including diagonal, vertical flip and rotation are introduced:
In the JEM, GALF filter parameters are signalled for the first CTU, i.e., after the slice header and before the SAO parameters of the first CTU. Up to 25 sets of luma filter coefficients could be signalled. To reduce bits overhead, filter coefficients of different classification can be merged. Also, the GALF coefficients of reference pictures are stored and allowed to be reused as GALF coefficients of a current picture. The current picture may choose to use GALF coefficients stored for the reference pictures and bypass the GALF coefficients signalling. In this case, only an index to one of the reference pictures is signalled, and the stored GALF coefficients of the indicated reference picture are inherited for the current picture.
To support GALF temporal prediction, a candidate list of GALF filter sets is maintained. At the beginning of decoding a new sequence, the candidate list is empty. After decoding one picture, the corresponding set of filters may be added to the candidate list. Once the size of the candidate list reaches the maximum allowed value (i.e., 6 in current JEM), a new set of filters overwrites the oldest set in decoding order, and that is, first-in-first-out (FIFO) rule is applied to update the candidate list. To avoid duplications, a set could only be added to the list when the corresponding picture doesn't use GALF temporal prediction. To support temporal scalability, there are multiple candidate lists of filter sets, and each candidate list is associated with a temporal layer. More specifically, each array assigned by temporal layer index (TempIdx) may compose filter sets of previously decoded pictures with equal to lower TempIdx. For example, the k-th array is assigned to be associated with TempIdx equal to k, and it only contains filter sets from pictures with TempIdx smaller than or equal to k. After coding a certain picture, the filter sets associated with the picture will be used to update those arrays associated with equal or higher TempIdx.
Temporal prediction of GALF coefficients is used for inter coded frames to minimize signalling overhead. For intra frames, temporal prediction is not available, and a set of 16 fixed filters is assigned to each class. To indicate the usage of the fixed filter, a flag for each class is signalled and if required, the index of the chosen fixed filter. Even when the fixed filter is selected for a given class, the coefficients of the adaptive filter f(k, l) can still be sent for this class in which case the coefficients of the filter which will be applied to the reconstructed image are sum of both sets of coefficients.
The filtering process of luma component can controlled at CU level. A flag is signalled to indicate whether GALF is applied to the luma component of a CU. For chroma component, whether GALF is applied or not is indicated at picture level only.
At decoder side, when GALF is enabled for a block, each sample R(i,j) within the block is filtered, resulting in sample value R′(i,j) as shown below, where L denotes filter length, fm,n represents filter coefficient, and f(k, l) denotes the decoded filter coefficients.
In VTM4.0, the filtering process of the Adaptive Loop Filter, is performed as follows:
The current design of GALF in VVC has the following major changes compared to that in JEM:
Equation (11) can be reformulated, without coding efficiency impact, in the following expression:
Using this above filter formula of (13), VVC introduces the non-linearity to make ALF more efficient by using a simple clipping function to reduce the impact of neighbor sample values (I(x+i, y+j)) when they are too different with the current sample value (I(x, y)) being filtered.
More specifically, the ALF filter is modified as follows:
In some implementation, the clipping parameters k(i,j) are specified for each ALF filter, one clipping value is signaled per filter coefficient. It means that up to 12 clipping values can be signalled in the bitstream per Luma filter and up to 6 clipping values for the Chroma filter.
In order to limit the signaling cost and the encoder complexity, only 4 fixed values which are the same for INTER and INTRA slices are used.
Because the variance of the local differences is often higher for Luma than for Chroma, two different sets for the Luma and Chroma filters are applied. The maximum sample value (here 1024 for 10 bits bit-depth) in each set is also introduced, so that clipping can be disabled if it is not necessary.
The sets of clipping values are provided in the Table 5. The 4 values have been selected by roughly equally splitting, in the logarithmic domain, the full range of the sample values (coded on 10 bits) for Luma, and the range from 4 to 1024 for Chroma.
More precisely, the Luma table of clipping values have been obtained by the following formula:
Similarly, the Chroma tables of clipping values is obtained according to the following formula:
The selected clipping values are coded in the “alf_data” syntax element by using a Golomb encoding scheme corresponding to the index of the clipping value in the above Table 5. This encoding scheme is the same as the encoding scheme for the filter index.
In deep learning, a convolutional neural network (CNN, or ConvNet) is a class of deep neural networks, most commonly applied to analyzing visual imagery. They have very successful applications in image and video recognition/processing, recommender systems, image classification, medical image analysis, natural language processing.
CNNs are regularized versions of multilayer perceptrons. Multilayer perceptrons usually mean fully connected networks, that is, each neuron in one layer is connected to all neurons in the next layer. The “fully-connectedness” of these networks makes them prone to overfitting data. Typical ways of regularization include adding some form of magnitude measurement of weights to the loss function. CNNs take a different approach towards regularization: they take advantage of the hierarchical pattern in data and assemble more complex patterns using smaller and simpler patterns. Therefore, on the scale of connectedness and complexity, CNNs are on the lower extreme.
CNNs use relatively little pre-processing compared to other image classification/processing algorithms. This means that the network learns the filters that in traditional algorithms were hand-engineered. This independence from prior knowledge and human effort in feature design is a major advantage.
Deep learning-based image/video compression typically has two implications: end-to-end compression purely based on neural networks and traditional frameworks enhanced by neural networks. The first type usually takes an auto-encoder like structure, either achieved by convolutional neural networks or recurrent neural networks. While purely relying on neural networks for image/video compression can avoid any manual optimizations or hand-crafted designs, compression efficiency may be not satisfactory. Therefore, works distributed in the second type take neural networks as an auxiliary, and enhance traditional compression frameworks by replacing or enhancing some modules. In this way, they can inherit the merits of the highly optimized traditional frameworks. For example, a fully connected network for the intra prediction is proposed. In addition to intra prediction, deep learning is also exploited to enhance other modules. For example, the in-loop filters of HEVC with a convolutional neural network is replaced and promising results are achieved. Neural networks are applied to improve the arithmetic coding engine.
In lossy image/video compression, the reconstructed frame is an approximation of the original frame, since the quantization process is not invertible and thus incurs distortion to the reconstructed frame. To alleviate such distortion, a convolutional neural network could be trained to learn the mapping from the distorted frame to the original frame. In practice, training must be performed prior to deploying the CNN-based in-loop filtering.
The purpose of the training processing is to find the optimal value of parameters including weights and bias. First, a codec (e.g., HM, JEM, VTM, etc.) is used to compress the training dataset to generate the distorted reconstruction frames.
Then the reconstructed frames are fed into the CNN and the cost is calculated using the output of CNN and the groundtruth frames (original frames). Commonly used cost functions include SAD (Sum of Absolution Difference) and MSE (Mean Square Error). Next, the gradient of the cost with respect to each parameter is derived through the back propagation algorithm. With the gradients, the values of the parameters can be updated. The above process repeats until the convergence criteria is met. After completing the training, the derived optimal parameters are saved for use in the inference stage.
During convolution, the filter is moved across the image from left to right, top to bottom, with a one-pixel column change on the horizontal movements, then a one-pixel row change on the vertical movements. The amount of movement between applications of the filter to the input image is referred to as the stride, and it is almost always symmetrical in height and width dimensions. The default stride or strides in two dimensions is (1,1) for the height and the width movement.
During the inference stage, the distorted reconstruction frames are fed into CNN and processed by the CNN model whose parameters are already determined in the training stage. The input samples to the CNN can be reconstructed samples before or after DB, or reconstructed samples before or after SAO, or reconstructed samples before or after ALF.
The current NN filter has the following problems:
1. The prior art design of NN filter is only applied after the reconstruction of all blocks before in-loop filtering processes within a slice. Therefore, the impact of reduced distortion due to NN filter is not taken into consideration during the rate-distortion optimization (RDO) process, such as intra mode selection, partitioning selection, intra mode selection, inter mode selection, transform core selection, etc. The coding performance is sub-optimal considering:
The detailed embodiments below should be considered as examples to explain general concepts. These embodiments should not be interpreted in a narrow way. Furthermore, these embodiments can be combined in any manner. To solve the above problem, it is proposed to take the NN filter into consideration based on video content during the rate distortion optimization (RDO) process. This disclosure elaborates how to extend RDO purview with NN filter models, how to utilize NN filter models to select mode (e.g., intra mode, partitioning mode, inter mode or transform core), how to control the usage of NN filter models.
In the disclosure, a NN filter can be any kind of NN filter, such as a convolutional neural network (CNN) filter; alternatively, it could also be applied to non-NN based filters. In the following discussion, a NN filter may also be referred to as a CNN filter.
In the following discussion, a video unit may be a sequence, a picture, a slice, a tile, a brick, a subpicture, a CTU/CTB, a CTU/CTB row, one or multiple CUs/CBs, one ore multiple CTUs/CTBs, one or multiple VPDU (Virtual Pipeline Data Unit), a sub-region within a picture/slice/tile/brick. A father video unit represents a unit larger than the video unit. Typically, a father unit will contain several video units. E.g., when the video unit is CTU, the father unit could be slice, CTU row, multiple CTUs, etc.
The width and height of a video unit are denoted as W and H, respectively.
1. Whether to and/or how to utilize the NN filter models (or calculate the rate distortion cost) in RDO process may be dependent on the distortion DORG without NN filter model and/or the distortion DnNNLF with nth NN filter model (the model index is n−1, where n>=1). The RDO criterion is noted as J=D+lambda*R. “A distortion DnNNLF with the nth NN filter” may mean that the reconstruction samples are filtered by the nth NN filter and the filtered reconstruction samples will be compared with the original samples to derive the distortion.
2. Whether to and/or how to utilize the NN filter models (or calculate the rate distortion cost) in RDO process may be dependent on the distortion DORG without NN filter model and/or the combination of distortions with multiple NN filter models. The RDO criterion is noted as J=D+lambda*R.
3. The distortion DORG without NN filter model may be dependent on the other filters LFi which are different with the NN filtering models (e.g., Deblocking, ALF). The distortion DiLF with LFi may mean that the reconstruction samples are filtered by the LFi filter and the filtered reconstruction samples will be compared with the original samples to derive the distortion.
4. The input of the NN filter models in RDO process may include the signal from the current video block and/or the neighboring blocks.
5. Whether to and/or how to utilize the NN filter models in RDO process may be dependent on the coding statistics of the video unit (e.g., prediction modes, qp, temporal layer, slice type, etc.).
In this implementation, the convolutional neural network-based in-loop filtering with adaptive model selection (DAM) is extended to the rate distortion optimization (RDO) process. And the number of residual blocks in DAM is reduced to 4. The DAM is applied to the coding unit level to select the best partitioning structure based on the RDO criterion. The rate distortion cost could be formulated as:
Before applying the DAM, the cost JA of partitioning mode A and the cost JB of partitioning mode B are checked. When meeting the following condition, the DAM is skipped.
The embodiments of the present disclosure are related to RDO process with machine learning model. As used herein, the term “machine learning model” can also be referred to as a “machine learning model”. The machine learning model may comprise any kinds of model, such as a neural network (NN) model (also referred to as a “NN filter” or “NN filter model”), a convolutional neural network (CNN) model, or the like. Alternatively, in some embodiments, the machine learning model further comprises non-NN based models or non-NN based filters. Scope of the present disclosure is not limited in this regard.
As used herein, the term “video unit” or “video block” may be a sequence, a picture, a slice, a tile, a brick, a subpicture, a coding tree unit (CTU)/coding tree block (CTB), a CTU/CTB row, one or multiple coding units (CUs)/coding blocks (CBs), one ore multiple CTUs/CTBs, one or multiple Virtual Pipeline Data Unit (VPDU), a sub-region within a picture/slice/tile/brick. As used herein, the term “father video unit” may represent a unit larger than the video unit. A father unit will contain several video units. For example, if the video unit is a CTU, the father unit may be a slice, CTU row, multiple CTUs, etc.
As shown in
The method 1600 enables determining a distortion value of the current video block based on a set of distortion metrics. The determined distortion value may be applied in a rate-distortion optimization (RDO) process, and thus can improve the RDO process. In this way, the coding effectiveness and coding efficiency can be improved.
At block 1620, the conversion is performed based on the distortion metric. In some embodiments, the conversion may include encoding the current video block into the bitstream. Alternatively, or in addition, the conversion may include decoding the current video block from the bitstream.
In some embodiments, at block 1610, if the first machine learning model is applied for at least one of a plurality of candidate modes of the current video block, the first distortion metric may be determined as the distortion value. In some embodiments, at block 1610, if the first machine learning model is not applied for at least one of the plurality of candidate modes of the current video block, the third distortion metric may be determined as the distortion value.
In some embodiments, the plurality of candidate modes are not partitioning modes. That is, if all or one of T candidate modes are not partitioning modes, the distortion value in RDO criterion may be a combination of the distortion with a model such as a NN filter model and a distortion without the NN filter model.
In some embodiments, when all or one of T candidate modes are not partitioning modes, the distortion value D in RDO criterion is combination of the distortion with the pth machine learning model such as a NN filter model and/or distortion without the machine learning model. If a pth NN filter model is not applied for one or all of T candidate modes, D in RDO criterion is the distortion without NN filter model (D=DORG). If the pth NN filter model is applied for all or one of T candidate modes, D in RDO criterion is the distortion with the pth NN filter model (D=DpNNLF).
In some embodiments, at block 1610, if the second machine learning model is applied for at least one of a plurality of candidate modes of the current video block, a minimum one of the second and third distortion metrics may be determined as the distortion value. In some embodiments, at block 1610, if the second machine learning model is not applied for at least one of the plurality of candidate modes of the current video block, the distortion value may be determined based on the first and third distortion metrics.
In some embodiments, if the first machine learning model is applied to the plurality of candidate modes, the first distortion metric may be determined as the distortion value. In some embodiments, if the first machine learning model is not applied to the plurality of candidate modes, the third distortion metric may be determined as the distortion value.
In some embodiments, at block 1610, the distortion value may be determined based on a combination of the set of distortion metrics. The combination of the set of distortion metrics may be determined based on at least one of the following: coding statistics of the current video block, a first usage of the first machine learning model, a second usage of the second machine learning model, or a priority order of the set of distortion metrics.
In some embodiments, the method 1600 further comprises: determining the priority order based on at least one of the following: a coding mode of the current video block, or coding statistics of the current video block.
In some embodiments, the coding statistics comprises at least one of the following: a prediction mode of the current video block, a type of the prediction mode, a quantization parameter (QP) of the current video block, a temporal layer of the current video block, or a slice type of the current video block.
In some embodiments, a fourth distortion metric comprises a minimum one of the second and third distortion metrics, a priority of the fourth distortion metric is higher than a priority of the first distortion metric. That is, a minimum one D=min(DqNNLF, DORG) may have a greater priority than the distortion with the pth NN filter model D=DpNNLF.
In some embodiments, a priority of the first distortion metric is higher than a priority of the third distortion metric. That is, the distortion with the pth NN filter model D=DpNNLF may have a greater priority than the distortion without NN filter model D=DORG.
In some embodiments, a plurality of candidate modes of the current video block are partitioning modes, and the combination of the set of distortion metric comprises the first, the second and the third distortion metric.
In some embodiments, the first machine learning model comprises one of the following: a deblocking filter, a sample adaptive offset (SAO), or an adaptive loop filer (ALF).
In some embodiments, the second machine learning model comprises a convolutional neural network (CNN) model.
In some embodiments, the first machine learning model is the same with the second machine learning model.
In some embodiments, a first index of the first machine learning model is the same with a second index of the second machine learning model.
In some embodiments, the method 1600 further comprises: performing, based on the distortion value, a rate-distortion optimization (RDO) process on the current video block.
In some embodiments, the RDO process may be performed on a plurality of candidate modes based on a rate-distortion cost. The rate-distortion cost may be determined based on a sum of the distortion value and a weighted rate of the current video block.
In some embodiments, a number of the plurality of candidate modes comprises one of: 1, 2, 3 or 4.
In some embodiments, the rate-distortion cost may be determined by using the following: J=D+lambda*R (referred to as the RDO criterion), where J represents the rate-distortion cost, D represents the distortion value, R represents a rate of the current video block, and lambda represents a predefined factor.
In some embodiments, a target coding tool of the current video block may be determined based on the rate-distortion cost. As used herein, the term “target coding tool” may represent a coding tool to be used on the current video block during the conversion. The coding tool may be a coding mode or a coding method.
In some embodiments, the set of distortion metrics further comprises at least one of the following: a minimum one of the third distortion metric and a fifth distortion metric determined according to one of a plurality of machine learning models, the plurality of machine learning models comprising the first and second machine learning models, a sixth distortion metric determined according to a predefined or selected model of the plurality of machine learning models, a scaled metric of the third distortion metric, or a weighted sum of the first, second, third, fifth or sixth metric.
According to further embodiments of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. According to the method, a distortion value of a current video block of the video is determined based on a set of distortion metrics. The set of distortion metrics comprise at least one of: a first distortion metric determined according to a first machine learning model, a second distortion metric determined according to a second machine learning model, or a third distortion metric determined without using the first and second machine learning models. The bitstream is generated based on the distortion value.
According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. According to the method, a distortion value of a current video block of the video is determined based on a set of distortion metrics. The set of distortion metrics comprise at least one of: a first distortion metric determined according to a first machine learning model, a second distortion metric determined according to a second machine learning model, or a third distortion metric determined without using the first and second machine learning models. The bitstream is generated based on the distortion value. The bitstream is stored in a non-transitory computer-readable recording medium.
According to embodiments of the present disclosure, the distortion value may be determined based on a set of distortion metrics. The determined distortion value can be applied in a RDO process. In this way, the RDO process can be improved, and thus the coding effectiveness and coding efficiency may be improved.
At block 1730, the conversion is performed based on the RDO process. In some embodiments, the conversion may include encoding the current video block into the bitstream. Alternatively, or in addition, the conversion may include decoding the current video block from the bitstream.
By using the method 1700, whether to apply a machine learning model in a RDO process for a coding tool of the current video block can be determined. In this way, the coding effectiveness and coding efficiency can be improved.
As used herein, the term a “coding tool” or a “target coding tool” may represent a coding tool to be used on the current video block during the conversion. The coding tool may be a coding mode or a coding method.
In some embodiments, at block 1710, a priority order of the coding tool and a further coding tool may be determined. Whether to apply the machine learning model in the RDO process for the coding tool or for the further coding tool may be determined based on the priority order.
In some embodiments, if the priority order indicates a first priority of the coding tool being higher than or equal to a second priority of the further coding tool, it is determined to apply the machine learning model in the RDO process for the coding tool. Alternatively, or in addition, in some embodiments, if the priority order indicates the first priority of the coding tool being lower than the second priority of the further coding tool, it is determined to apply the machine learning model in the RDO process for the further coding tool.
In some embodiments, if a first rate-distortion cost of the coding tool is greater than or equal to a second rate-distortion cost of the further coding tool, a first priority of the coding tool may be determined to be higher than a second priority of the further coding tool. The first and second rate-distortion costs are determined without using the machine learning model.
In some embodiments, if a first rate-distortion cost of the coding tool is less than or equal to a second rate-distortion cost of the further coding tool, a first priority of the coding tool may be determined to be higher than a second priority of the further coding tool. The first and second rate-distortion costs are determined without using the machine learning model.
In some embodiments, the first or second rate-distortion cost is determined based on a sum of a distortion value of the current video block and a weighted rate of the current video block.
In some embodiments, the distortion value of the current video block comprises a first distortion value determined without using the machine learning model.
In some embodiments, the priority order may be determined based on at least one of a coding mode of the current video block or coding statistics of the current video block.
In some embodiments, the coding statistics comprises at least one of the following: a prediction mode of the current video block, a type of the prediction mode, a quantization parameter (QP) of the current video block, a temporal layer of the current video block, or a slice type of the current video block.
In some embodiments, at block 1710, whether to apply the machine learning model in the RDO process for the coding tool may be determined based on a first rate-distortion cost of the coding tool and a second rate-distortion cost of a further coding tool. The first rate-distortion cost is determined without using the machine learning model. The second rate-distortion cost is determined according to the machine learning model.
In some embodiments, the first rate-distortion cost is determined based on a sum of a first distortion value of the current video block and a weighted rate of the current video block.
In some embodiments, the first distortion value of the current video block is determined without using the machine learning model.
In some embodiments, the second rate-distortion cost is determined based on a sum of a second distortion value of the current video block and a weighted rate of the current video block.
In some embodiments, the second distortion value of the current video block comprises one of the following: a minimum one of a first distortion value determined without using the machine learning model and a third distortion value determined according to the machine learning model, or the first distortion value.
In some embodiments, the first or second rate-distortion cost may be determined by using the following: J=D+lambda*R, where J represents the rate-distortion cost, D represents the first or second distortion value, R represents a rate of the current video block, and lambda represents a predefined factor.
In some embodiments, the machine learning model comprises at least one of: a neural network (NN) model, a convolutional neural network (CNN) model, or a non-NN based model.
According to further embodiments of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. According to the method, whether to apply a machine learning model in a rate-distortion optimization (RDO) process for a coding tool of a current video block of the video is determined. The RDO process is performed on the current video block based on the determining. The bitstream is generated based on the RDO process.
According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. According to the method, whether to apply a machine learning model in a rate-distortion optimization (RDO) process for a coding tool of a current video block of the video is determined. The RDO process is performed on the current video block based on the determining. The bitstream is generated based on the RDO process. The bitstream is stored in a non-transitory computer-readable recording medium.
According to embodiments of the present disclosure, whether to apply a machine learning model in a RDO process for a coding tool can be determined. In this way, the RDO process for the coding tool can be enhanced, and thus the coding effectiveness and coding efficiency can be improved.
It is to be understood that the above method 1600 and/or method 1700 may be used in combination or separately. Any suitable combination of these methods may be applied. Scope of the present disclosure is not limited in this regard.
By using these methods 1600 and/or 1700 separately or in combination, the RDO process can be improved. In this way, the coding effectiveness and coding efficiency can be improved.
Implementations of the present disclosure can be described in view of the following clauses, the features of which can be combined in any reasonable manner.
Clause 1. A method for video processing, comprising: determining, for a conversion between a current video block of a video and a bitstream of the video, a distortion value of the current video block based on a set of distortion metrics, the set of distortion metrics comprising at least one of: a first distortion metric determined according to a first machine learning model, a second distortion metric determined according to a second machine learning model, or a third distortion metric determined without using the first and second machine learning models; and performing the conversion based on the distortion value.
Clause 2. The method of clause 1, wherein determining the distortion value comprises: in accordance with a determination that the first machine learning model is applied for at least one of a plurality of candidate modes of the current video block, determining the first distortion metric as the distortion value; and in accordance with a determination that the first machine learning model is not applied for at least one of the plurality of candidate modes of the current video block, determining the third distortion metric as the distortion value.
Clause 3. The method of clause 2, wherein the plurality of candidate modes are not partitioning modes.
Clause 4. The method of any of clauses 1-3, wherein determining the distortion value comprises: in accordance with a determination that the second machine learning model is applied for at least one of a plurality of candidate modes of the current video block, determining a minimum one of the second and third distortion metrics as the distortion value; and in accordance with a determination that the second machine learning model is not applied for at least one of the plurality of candidate modes of the current video block, determining the distortion value based on the first and third distortion metrics.
Clause 5. The method of clause 4, wherein determining the distortion value based on the first and third distortion metrics comprises: in accordance with a determination that the first machine learning model is applied to the plurality of candidate modes, determining the first distortion metric as the distortion value; and in accordance with a determination that the first machine learning model is not applied to the plurality of candidate modes, determining the third distortion metric as the distortion value.
Clause 6. The method of any of clauses 1-5, wherein determining the distortion value comprises: determining the distortion value based on a combination of the set of distortion metrics, the combination of the set of distortion metrics being determined based on at least one of the following: coding statistics of the current video block, a first usage of the first machine learning model, a second usage of the second machine learning model, or a priority order of the set of distortion metrics.
Clause 7. The method of clause 6, further comprising: determining the priority order based on at least one of the following: a coding mode of the current video block, or coding statistics of the current video block.
Clause 8. The method of clause 6 or clause 7, wherein the coding statistics comprises at least one of the following: a prediction mode of the current video block, a type of the prediction mode, a quantization parameter (QP) of the current video block, a temporal layer of the current video block, or a slice type of the current video block.
Clause 9. The method of any of clauses 6-8, wherein a fourth distortion metric comprises a minimum one of the second and third distortion metrics, a priority of the fourth distortion metric is higher than a priority of the first distortion metric.
Clause 10. The method of any of clauses 6-9, wherein a priority of the first distortion metric is higher than a priority of the third distortion metric.
Clause 11. The method of any of clauses 6-10, wherein a plurality of candidate modes of the current video block are partitioning modes, and the combination of the set of distortion metric comprises the first, the second and the third distortion metric.
Clause 12. The method of any of clauses 1-11, wherein the first machine learning model comprises one of the following: a deblocking filter, a sample adaptive offset (SAO), or an adaptive loop filer (ALF).
Clause 13. The method of any of clauses 1-12, wherein the second machine learning model comprises a convolutional neural network (CNN) model.
Clause 14. The method of any of clauses 1-13, wherein the first machine learning model is the same with the second machine learning model.
Clause 15. The method of any of clauses 1-14, wherein a first index of the first machine learning model is the same with a second index of the second machine learning model.
Clause 16. The method of any of clauses 1-15, further comprising: performing, based on the distortion value, a rate-distortion optimization (RDO) process on the current video block.
Clause 17. The method of clause 16, wherein performing the RDO process on the current video block comprises: performing the RDO process on a plurality of candidate modes based on a rate-distortion cost, wherein the rate-distortion cost is determined based on a sum of the distortion value and a weighted rate of the current video block.
Clause 18. The method of clause 17, wherein a number of the plurality of candidate modes comprises one of: 1, 2, 3 or 4.
Clause 19. The method of any of clauses 1-18, wherein the set of distortion metrics further comprises at least one of the following: a minimum one of the third distortion metric and a fifth distortion metric determined according to one of a plurality of machine learning models, the plurality of machine learning models comprising the first and second machine learning models, a sixth distortion metric determined according to a predefined or selected model of the plurality of machine learning models, a scaled metric of the third distortion metric, or a weighted sum of the first, second, third, fifth or sixth metric.
Clause 20. A method for video processing, comprising: determining, for a conversion between a current video block of a video and a bitstream of the video, whether to apply a machine learning model in a rate-distortion optimization (RDO) process for a coding tool of the current video block; performing the RDO process on the current video block based on the determining; and performing the conversion based on the RDO process.
Clause 21. The method of clause 20, wherein determining whether to apply the machine learning model in the RDO process for the coding tool comprises: determining a priority order of the coding tool and a further coding tool; and determining whether to apply the machine learning model in the RDO process for the coding tool or for the further coding tool based on the priority order.
Clause 22. The method of clause 21, wherein determining whether to apply the machine learning model in the RDO process for the coding tool or for the further coding tool based on the priority order comprises: in accordance with a determination that the priority order indicating a first priority of the coding tool being higher than or equal to a second priority of the further coding tool, determining to apply the machine learning model in the RDO process for the coding tool; and in accordance with a determination that the priority order indicating the first priority of the coding tool being lower than the second priority of the further coding tool, determining to apply the machine learning model in the RDO process for the further coding tool.
Clause 23. The method of clause 21 or clause 22, wherein determining the priority order comprises: in accordance with a determination that a first rate-distortion cost of the coding tool is greater than or equal to a second rate-distortion cost of the further coding tool, determining that a first priority of the coding tool is higher than a second priority of the further coding tool, the first and second rate-distortion costs being determined without using the machine learning model.
Clause 24. The method of clause 21 or clause 22, wherein determining the priority order comprises: in accordance with a determination that a first rate-distortion cost of the coding tool is less than or equal to a second rate-distortion cost of the further coding tool, determining that a first priority of the coding tool is higher than a second priority of the further coding tool, the first and second rate-distortion costs being determined without using the machine learning model.
Clause 25. The method of clause 23 or clause 24, wherein the first or second rate-distortion cost is determined based on a sum of a distortion value of the current video block and a weighted rate of the current video block.
Clause 26. The method of clause 25, wherein the distortion value of the current video block comprises a first distortion value determined without using the machine learning model.
Clause 27. The method of any of clauses 21-26, wherein determining the priority order comprises: determining the priority order based on at least one of a coding mode of the current video block or coding statistics of the current video block.
Clause 28. The method of clause 27, wherein the coding statistics comprises at least one of the following: a prediction mode of the current video block, a type of the prediction mode, a quantization parameter (QP) of the current video block, a temporal layer of the current video block, or a slice type of the current video block.
Clause 29. The method of any of clauses 20-28, wherein determining whether to apply the machine learning model in the RDO process for the coding tool comprises: determining whether to apply the machine learning model in the RDO process for the coding tool based on a first rate-distortion cost of the coding tool and a second rate-distortion cost of a further coding tool, the first rate-distortion cost being determined without using the machine learning model, the second rate-distortion cost being determined according to the machine learning model.
Clause 30. The method of clause 29, wherein the first rate-distortion cost is determined based on a sum of a first distortion value of the current video block and a weighted rate of the current video block.
Clause 31. The method of clause 30, wherein the first distortion value of the current video block is determined without using the machine learning model.
Clause 32. The method of any of clauses 29-31, wherein the second rate-distortion cost is determined based on a sum of a second distortion value of the current video block and a weighted rate of the current video block.
Clause 33. The method of clause 32, wherein the second distortion value of the current video block comprises one of the following: a minimum one of a first distortion value determined without using the machine learning model and a third distortion value determined according to the machine learning model, or the first distortion value.
Clause 34. The method of any of clauses 20-33, wherein the machine learning model comprises at least one of: a neural network (NN) model, a convolutional neural network (CNN) model, or a non-NN based model.
Clause 35. The method of any of clauses 1-34, wherein the conversion includes encoding the current video block into the bitstream.
Clause 36. The method of any of clauses 1-34, wherein the conversion includes decoding the current video block from the bitstream.
Clause 37. An apparatus for video processing comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform a method in accordance with any of clauses 1-36.
Clause 38. A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of clauses 1-36.
Clause 39. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by an apparatus for video processing, wherein the method comprises: determining a distortion value of a current video block of the video based on a set of distortion metrics, the set of distortion metrics comprising at least one of: a first distortion metric determined according to a first machine learning model, a second distortion metric determined according to a second machine learning model, or a third distortion metric determined without using the first and second machine learning models; and generating the bitstream based on the distortion value.
Clause 40. A method for storing a bitstream of a video, comprising: determining a distortion value of a current video block of the video based on a set of distortion metrics, the set of distortion metrics comprising at least one of: a first distortion metric determined according to a first machine learning model, a second distortion metric determined according to a second machine learning model, or a third distortion metric determined without using the first and second machine learning models; generating the bitstream based on the distortion value; and storing the bitstream in a non-transitory computer-readable recording medium.
Clause 41. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by an apparatus for video processing, wherein the method comprises: determining whether to apply a machine learning model in a rate-distortion optimization (RDO) process for a coding tool of a current video block of the video; performing the RDO process on the current video block based on the determining; and generating the bitstream based on the RDO process.
Clause 42. A method for storing a bitstream of a video, comprising: determining whether to apply a machine learning model in a rate-distortion optimization (RDO) process for a coding tool of a current video block of the video; performing the RDO process on the current video block based on the determining; generating the bitstream based on the RDO process; and storing the bitstream in a non-transitory computer-readable recording medium.
It would be appreciated that the computing device 1800 shown in
As shown in
In some embodiments, the computing device 1800 may be implemented as any user terminal or server terminal having the computing capability. The server terminal may be a server, a large-scale computing device or the like that is provided by a service provider. The user terminal may for example be any type of mobile terminal, fixed terminal, or portable terminal, including a mobile phone, station, unit, device, multimedia computer, multimedia tablet, Internet node, communicator, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, personal communication system (PCS) device, personal navigation device, personal digital assistant (PDA), audio/video player, digital camera/video camera, positioning device, television receiver, radio broadcast receiver, E-book device, gaming device, or any combination thereof, including the accessories and peripherals of these devices, or any combination thereof. It would be contemplated that the computing device 1800 can support any type of interface to a user (such as “wearable” circuitry and the like).
The processing unit 1810 may be a physical or virtual processor and can implement various processes based on programs stored in the memory 1820. In a multi-processor system, multiple processing units execute computer executable instructions in parallel so as to improve the parallel processing capability of the computing device 1800. The processing unit 1810 may also be referred to as a central processing unit (CPU), a microprocessor, a controller or a microcontroller.
The computing device 1800 typically includes various computer storage medium. Such medium can be any medium accessible by the computing device 1800, including, but not limited to, volatile and non-volatile medium, or detachable and non-detachable medium. The memory 1820 can be a volatile memory (for example, a register, cache, Random Access Memory (RAM)), a non-volatile memory (such as a Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), or a flash memory), or any combination thereof. The storage unit 1830 may be any detachable or non-detachable medium and may include a machine-readable medium such as a memory, flash memory drive, magnetic disk or another other media, which can be used for storing information and/or data and can be accessed in the computing device 1800.
The computing device 1800 may further include additional detachable/non-detachable, volatile/non-volatile memory medium. Although not shown in
The communication unit 1840 communicates with a further computing device via the communication medium. In addition, the functions of the components in the computing device 1800 can be implemented by a single computing cluster or multiple computing machines that can communicate via communication connections. Therefore, the computing device 1800 can operate in a networked environment using a logical connection with one or more other servers, networked personal computers (PCs) or further general network nodes.
The input device 1850 may be one or more of a variety of input devices, such as a mouse, keyboard, tracking ball, voice-input device, and the like. The output device 1860 may be one or more of a variety of output devices, such as a display, loudspeaker, printer, and the like. By means of the communication unit 1840, the computing device 1800 can further communicate with one or more external devices (not shown) such as the storage devices and display device, with one or more devices enabling the user to interact with the computing device 1800, or any devices (such as a network card, a modem and the like) enabling the computing device 1800 to communicate with one or more other computing devices, if required. Such communication can be performed via input/output (I/O) interfaces (not shown).
In some embodiments, instead of being integrated in a single device, some or all components of the computing device 1800 may also be arranged in cloud computing architecture. In the cloud computing architecture, the components may be provided remotely and work together to implement the functionalities described in the present disclosure. In some embodiments, cloud computing provides computing, software, data access and storage service, which will not require end users to be aware of the physical locations or configurations of the systems or hardware providing these services. In various embodiments, the cloud computing provides the services via a wide area network (such as Internet) using suitable protocols. For example, a cloud computing provider provides applications over the wide area network, which can be accessed through a web browser or any other computing components. The software or components of the cloud computing architecture and corresponding data may be stored on a server at a remote position. The computing resources in the cloud computing environment may be merged or distributed at locations in a remote data center. Cloud computing infrastructures may provide the services through a shared data center, though they behave as a single access point for the users. Therefore, the cloud computing architectures may be used to provide the components and functionalities described herein from a service provider at a remote location. Alternatively, they may be provided from a conventional server or installed directly or otherwise on a client device.
The computing device 1800 may be used to implement video encoding/decoding in embodiments of the present disclosure. The memory 1820 may include one or more video coding modules 1825 having one or more program instructions. These modules are accessible and executable by the processing unit 1810 to perform the functionalities of the various embodiments described herein.
In the example embodiments of performing video encoding, the input device 1850 may receive video data as an input 1870 to be encoded. The video data may be processed, for example, by the video coding module 1825, to generate an encoded bitstream. The encoded bitstream may be provided via the output device 1860 as an output 1880.
In the example embodiments of performing video decoding, the input device 1850 may receive an encoded bitstream as the input 1870. The encoded bitstream may be processed, for example, by the video coding module 1825, to generate decoded video data. The decoded video data may be provided via the output device 1860 as the output 1880.
While this disclosure has been particularly shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application as defined by the appended claims. Such variations are intended to be covered by the scope of this present application. As such, the foregoing description of embodiments of the present application is not intended to be limiting.
Number | Date | Country | Kind |
---|---|---|---|
PCT/CN2022/086468 | Apr 2022 | WO | international |
This application is a continuation of International Application No. PCT/CN2023/087613, filed on Apr. 11, 2023, which claims the benefit of International Application No. PCT/CN2022/086468 filed on Apr. 12, 2022. The entire contents of these applications are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2023/087613 | Apr 2023 | WO |
Child | 18913890 | US |