Method, apparatus, and medium for video processing
By applying Hadamard transformed sum of absolute difference (SATD) cost for one-dimensional arrays, the method enhances coding efficiency in video processing, addressing inefficiencies in existing video coding technologies like HEVC and VVC.
Patent Information
- Application Number
- PCT/CN2025/106519
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-09-27
- Filing Date
- 2025-07-01
- Publication Date
- 2026-01-08
AI Technical Summary
Existing video coding technologies, such as HEVC and VVC, face challenges in improving coding efficiency for video processing, particularly in handling complex video block shapes and prediction modes, leading to inefficiencies in video compression and decoding processes.
The implementation of Hadamard transformed sum of absolute difference (SATD) cost for one-dimensional arrays in video units to determine coding information, which guides the conversion process, thereby enhancing coding performance.
This approach improves coding efficiency by optimizing the conversion process based on SATD cost, leading to more effective video compression and decoding.
Smart Images

Figure CN2025106519_08012026_PF_FP_ABST
Abstract
Description
METHOD, APPARATUS, AND MEDIUM FOR VIDEO PROCESSINGFIELDS
[0001] Embodiments of the present disclosure relates generally to video processing techniques, and more particularly, to Hadamard transformed sum of absolute difference.BACKGROUND
[0002] In nowadays, digital video capabilities are being applied in various aspects of peoples’ lives. Multiple types of video compression technologies, such as motion picture expert group (MPEG) -2, MPEG-4, international telecommunication union -telecommunication standardization sector (ITU-T) H. 263, ITU-T H. 264 / MPEG-4 Part 10 advanced video coding (AVC) , ITU-T H. 265 high efficiency video coding (HEVC) standard, versatile video coding (VVC) standard, have been proposed for video encoding / decoding. However, coding efficiency of video coding techniques is generally expected to be further improved.SUMMARY
[0003] Embodiments of the present disclosure provide a solution for video processing.
[0004] In a first aspect, a method for video processing is proposed. The method comprises: determining, for a conversion between a video unit of a video and a bitstream of the video, a transformed sum of absolute difference (SATD) cost for a one-dimensional array associated with the video unit; determining coding information of the video unit based on the SATD cost; and performing the conversion based on the coding information. In this way, coding performance could be improved.
[0005] In a second aspect, an apparatus for video processing is proposed. The apparatus comprises a processor and a non-transitory memory with instructions thereon. The instructions upon execution by the processor, cause the processor to perform a method in accordance with the first aspect of the present disclosure.
[0006] In a third aspect, a non-transitory computer-readable storage medium is proposed. The non-transitory computer-readable storage medium stores instructions that cause a processor to perform a method in accordance with the first aspect of the present disclosure.
[0007] In a fourth 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 an apparatus for video processing. The method comprises: determining a transformed sum of absolute difference (SATD) cost for a one-dimensional array associated with the video unit; determining coding information of the video unit based on the SATD cost; and generating the bitstream based on the coding information.
[0008] In a fifth aspect, a method for storing a bitstream of a video is proposed. The method comprises: determining a transformed sum of absolute difference (SATD) cost for a one-dimensional array associated with the video unit; determining coding information of the video unit based on the SATD cost; generating the bitstream based on the coding information; and storing the bitstream in a non-transitory computer-readable recording medium.
[0009] 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.BRIEF DESCRIPTION OF THE DRAWINGS
[0010] 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.
[0011] Fig. 1 illustrates a block diagram of an example video coding system in accordance with some embodiments of the present disclosure;
[0012] Fig. 2 illustrates a block diagram of an example video encoder in accordance with some embodiments of the present disclosure;
[0013] Fig. 3 illustrates a block diagram of an example video decoder in accordance with some embodiments of the present disclosure;
[0014] Fig. 4 illustrates an example of encoder block diagram;
[0015] Fig. 5 illustrates 67 intra prediction modes;
[0016] Fig. 6 illustrates reference samples for wide-angular intra prediction;
[0017] Fig. 7 illustrates problem of discontinuity in case of directions beyond 45°;
[0018] Fig. 8 illustrates a matrix weighted intra prediction process;
[0019] Fig. 9 illustrates spatial GPM candidates;
[0020] Fig. 10 illustrates GPM template;
[0021] Fig. 11 illustrates GPM blending;
[0022] Fig. 12 illustrates neighboring reconstructed samples used for DIMD chroma mode;
[0023] Fig. 13 illustrates SBT position, type and transform type;
[0024] Fig. 14 illustrates three EIP filter shapes;
[0025] Fig. 15 illustrates three types of reconstructed area for EIP filter;
[0026] Fig. 16 illustrates L-shaped neighborhood for a given predicted block;
[0027] Fig. 17 illustrates neighboring blocks for mering checks;
[0028] Fig. 18 illustrates a template and reference samples of the template in reference pictures;
[0029] Fig. 19 illustrates template and reference samples of the template for block with sub-block motion using the motion information of the subblocks of the current block;
[0030] Fig. 20 illustrates a flowchart of a method for video processing in accordance with some embodiments of the present disclosure;
[0031] Fig. 21 illustrates a block diagram of a computing device in which various embodiments of the present disclosure can be implemented.
[0032] Throughout the drawings, the same or similar reference numerals usually refer to the same or similar elements.DETAILED DESCRIPTION
[0033] 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.
[0034] 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.
[0035] 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.
[0036] 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.
[0037] 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. Example Environment
[0038] Fig. 1 is a block diagram that illustrates an example video coding system 100 that may utilize the techniques of this disclosure. As shown, the video coding system 100 may include a source device 110 and a destination device 120. The source device 110 can be also referred to as a video encoding device, and the destination device 120 can be also referred to as a video decoding device. In operation, the source device 110 can be configured to generate encoded video data and the destination device 120 can be configured to decode the encoded video data generated by the source device 110. The source device 110 may include a video source 112, a video encoder 114, and an input / output (I / O) interface 116.
[0039] 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.
[0040] 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.
[0041] 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.
[0042] 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.
[0043] Fig. 2 is a block diagram illustrating an example of a video encoder 200, which may be an example of the video encoder 114 in the system 100 illustrated in Fig. 1, in accordance with some embodiments of the present disclosure.
[0044] The video encoder 200 may be configured to implement any or all of the techniques of this disclosure. In the example of Fig. 2, the video encoder 200 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video encoder 200. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.
[0045] 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.
[0046] 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.
[0047] 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 Fig. 2 separately for purposes of explanation.
[0048] 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.
[0049] 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 combined inter and intra 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] In other examples, there may be no residual data for the current video block, for example in a skip mode, and the residual generation unit 207 may not perform the subtracting operation.
[0061] The transform 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.
[0062] After the transform 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.
[0063] 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.
[0064] After the reconstruction unit 212 reconstructs the video block, loop filtering operation may be performed to reduce video blocking artifacts in the video block.
[0065] 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.
[0066] Fig. 3 is a block diagram illustrating an example of a video decoder 300, which may be an example of the video decoder 124 in the system 100 illustrated in Fig. 1, in accordance with some embodiments of the present disclosure.
[0067] The video decoder 300 may be configured to perform any or all of the techniques of this disclosure. In the example of Fig. 3, the video decoder 300 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video decoder 300. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.
[0068] In the example of Fig. 3, the video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, a reconstruction unit 306 and a buffer 307. The video decoder 300 may, in some examples, perform a decoding pass generally reciprocal to the encoding pass described with respect to video encoder 200.
[0069] 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.
[0070] 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.
[0071] 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.
[0072] 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.
[0073] 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.
[0074] 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.
[0075] Some example 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. 1. Brief Summary
[0076] The present disclosure is related to video coding technologies. Specifically, it is related to Hadamard transformed sum of absolute difference (SATD) , and / or SATD for one row / column / line of pixels, and / or SATD cost used for reordering, and other coding tools in image / video coding. It may be applied to the existing video coding standard like HEVC, or Versatile Video Coding (VVC) . It may be also applicable to future video coding standards or video codec. 2. Introduction
[0077] 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. 2.1 Coding flow of a typical video codec
[0078] Fig. 4 shows an example of encoder block diagram of VVC, which contains three in-loop filtering blocks: deblocking filter (DF) , sample adaptive offset (SAO) and ALF. Unlike DF, which uses predefined filters, SAO and ALF utilize the original samples of the current picture to reduce the mean square errors between the original samples and the reconstructed samples by adding an offset and by applying a finite impulse response (FIR) filter, respectively, with coded side information signalling the offsets and filter coefficients. ALF is located at the last processing stage of each picture and can be regarded as a tool trying to catch and fix artifacts created by the previous stages. 2.2 Intra mode coding with 67 intra prediction modes
[0079] Fig. 5 shows 67 intra prediction modes. To capture the arbitrary edge directions presented in natural video, the number of directional intra modes is extended from 33, as used in HEVC, to 65, as shown in Fig. 5, and the planar and DC modes remain the same. These denser directional intra prediction modes apply for all block sizes and for both luma and chroma intra predictions.
[0080] In the HEVC, every intra-coded block has a square shape and the length of each of its side is a power of 2. Thus, no division operations are required to generate an intra-predictor using DC mode. In VVC, blocks can have a rectangular shape that necessitates the use of a division operation per block in the general case. To avoid division operations for DC prediction, only the longer side is used to compute the average for non-square blocks. 2.2.1 Wide angle intra prediction
[0081] Although 67 modes are defined in the VVC, the exact prediction direction for a given intra prediction mode index is further dependent on the block shape. Conventional angular intra prediction directions are defined from 45 degrees to -135 degrees in clockwise direction. In VVC, several conventional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes for non-square blocks. The replaced modes are signalled using the original mode indexes, which are remapped to the indexes of wide angular modes after parsing. The total number of intra prediction modes is unchanged, i.e., 67, and the intra mode coding method is unchanged.
[0082] Fig. 6 shows reference samples for wide-angular intra prediction. To support these prediction directions, the top reference with length 2W+1, and the left reference with length 2H+1, are defined as shown in Fig. 6.
[0083] The number of replaced modes in wide-angular direction mode depends on the aspect ratio of a block. The replaced intra prediction modes are illustrated in Table 1. Table 1 Intra prediction modes replaced by wide-angular modes
[0084] Fig. 7 illustrates problem of discontinuity in case of directions beyond 45°. As shown in Fig. 7, two vertically adjacent predicted samples may use two non-adjacent reference samples in the case of wide-angle intra prediction. Hence, low-pass reference samples filter and side smoothing are applied to the wide-angle prediction to reduce the negative effect of the increased gap Δpα. If a wide-angle mode represents a non-fractional offset. There are 8 modes in the wide-angle modes satisfy this condition, which are [-14, -12, -10, -6, 72, 76, 78, 80] . When a block is predicted by these modes, the samples in the reference buffer are directly copied without applying any interpolation. With this modification, the number of samples needed to be smoothing is reduced. Besides, it aligns the design of non-fractional modes in the conventional prediction modes and wide-angle modes.
[0085] In VVC, 4: 2: 2 and 4: 4: 4 chroma formats are supported as well as 4: 2: 0. Chroma derived mode (DM) derivation table for 4: 2: 2 chroma format was initially ported from HEVC extending the number of entries from 35 to 67 to align with the extension of intra prediction modes. Since HEVC specification does not support prediction angle below -135 degree and above 45 degree, luma intra prediction modes ranging from 2 to 5 are mapped to 2. Therefore, chroma DM derivation table for 4: 2: 2: chroma format is updated by replacing some values of the entries of the mapping table to convert prediction angle more precisely for chroma blocks. 2.3 Inter prediction
[0086] For each inter-predicted CU, motion parameters consisting of motion vectors, reference picture indices and reference picture list usage index, and additional information needed for the new coding feature of VVC to be used for inter-predicted sample generation. The motion parameter can be signalled in an explicit or implicit manner. When a CU is coded with skip mode, the CU is associated with one PU and has no significant residual coefficients, no coded motion vector delta or reference picture index. A merge mode is specified whereby the motion parameters for the current CU are obtained from neighbouring CUs, including spatial and temporal candidates, and additional schedules introduced in VVC. The merge mode can be applied to any inter-predicted CU, not only for skip mode. The alternative to merge mode is the explicit transmission of motion parameters, where motion vector, corresponding reference picture index for each reference picture list and reference picture list usage flag and other needed information are signalled explicitly per each CU. 2.4 Intra block copy (IBC)
[0087] Intra block copy (IBC) is a tool adopted in HEVC extensions on SCC. It is well known that it significantly improves the coding efficiency of screen content materials. Since IBC mode is implemented as a block level coding mode, block matching (BM) is performed at the encoder to find the optimal block vector (or motion vector) for each CU. Here, a block vector is used to indicate the displacement from the current block to a reference block, which is already reconstructed inside the current picture. The luma block vector of an IBC-coded CU is in integer precision. The chroma block vector rounds to integer precision as well. When combined with AMVR, the IBC mode can switch between 1-pel and 4-pel motion vector precisions. An IBC-coded CU is treated as the third prediction mode other than intra or inter prediction modes. The IBC mode is applicable to the CUs with both width and height smaller than or equal to 64 luma samples.
[0088] At the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD check for blocks with either width or height no larger than 16 luma samples. For non-merge mode, the block vector search is performed using hash-based search first. If hash search does not return valid candidate, block matching based local search will be performed.
[0089] In the hash-based search, hash key matching (32-bit CRC) between the current block and a reference block is extended to all allowed block sizes. The hash key calculation for every position in the current picture is based on 4u4 sub-blocks. For the current block of a larger size, a hash key is determined to match that of the reference block when all the hash keys of all 4×4 sub-blocks match the hash keys in the corresponding reference locations. If hash keys of multiple reference blocks are found to match that of the current block, the block vector costs of each matched reference are calculated and the one with the minimum cost is selected.
[0090] In block matching search, the search range is set to cover both the previous and current CTUs.
[0091] At CU level, IBC mode is signalled with a flag and it can be signalled as IBC AMVP mode or IBC skip / merge mode as follows: –IBC skip / merge mode: a merge candidate index is used to indicate which of the block vectors in the list from neighbouring candidate IBC coded blocks is used to predict the current block. The merge list consists of spatial, HMVP, and pairwise candidates. –IBC AMVP mode: block vector difference is coded in the same way as a motion vector difference. The block vector prediction method uses two candidates as predictors, one from left neighbour and one from above neighbour (if IBC coded) . When either neighbour is not available, a default block vector will be used as a predictor. A flag is signalled to indicate the block vector predictor index. 2.5 Matrix weighted Intra Prediction (MIP) Matrix weighted intra prediction (MIP) method is a newly added intra prediction technique into VVC. For predicting the samples of a rectangular block of width W and height H, matrix weighted intra prediction (MIP) takes one line of H reconstructed neighbouring boundary samples left of the block and one line of W reconstructed neighbouring boundary samples above the block as input. If the reconstructed samples are unavailable, they are generated as it is done in the conventional intra prediction. Fig. 8 shows matrix weighted intra prediction process. The generation of the prediction signal is based on the following three steps, which are averaging, matrix vector multiplication and linear interpolation as shown in Fig. 8. 2.5.1Averaging neighbouring samples
[0092] Among the boundary samples, four samples or eight samples are selected by averaging based on block size and shape. Specifically, the input boundaries bdrytop and bdryleft are reduced to smaller boundaries and by averaging neighbouring boundary samples according to predefined rule depends on block size. Then, the two reduced boundaries and are concatenated to a reduced boundary vector bdryred which is thus of size four for blocks of shape 4×4 and of size eight for blocks of all other shapes. If mode refers to the MIP-mode, this concatenation is defined as follows: 2.5.2Matrix Multiplication
[0093] A matrix vector multiplication, followed by addition of an offset, is carried out with the averaged samples as an input. The result is a reduced prediction signal on a subsampled set of samples in the original block. Out of the reduced input vector bdryred a reduced prediction signal predred, which is a signal on the down-sampled block of width Wred and height Hred is generated. Here, Wred and Hred are defined as:
[0094] The reduced prediction signal predred is computed by calculating a matrix vector product and adding an offset: predred=A·bdryred+b. (2-4) Here, A is a matrix that has Wred· Hred rows and 4 columns if W=H=4 and 8 columns in all other cases. b is a vector of size Wred· Hred. The matrix A and the offset vector b are taken from one of the sets S0, S1, S2. One defines an index idx=idx (W, H) as follows: Here, each coefficient of the matrix A is represented with 8 bit precision. The set S0 consists of 16 matrices each of which has 16 rows and 4 columns and 16 offset vectors each of size 16.Matrices and offset vectors of that set are used for blocks of size 4×4. The set S1 consists of 8 matrices each of which has 16 rows and 8 columns and 8 offset vectors each of size 16. The set S2 consists of 6 matrices each of which has 64 rows and 8 columns and of 6 offset vectors of size 64. 2.5.3 Interpolation
[0095] The prediction signal at the remaining positions is generated from the prediction signal on the subsampled set by linear interpolation which is a single step linear interpolation in each direction. The interpolation is performed firstly in the horizontal direction and then in the vertical direction regardless of block shape or block size. 2.5.4 Signalling of MIP mode and harmonization with other coding tools
[0096] For each Coding Unit (CU) in intra mode, a flag indicating whether an MIP mode is to be applied or not is sent. If an MIP mode is to be applied, MIP mode (predModeIntra) is signalled . For an MIP mode, a transposed flag (isTransposed) , which determines whether the mode is transposed, and MIP mode Id (modeId) , which determines which matrix is to be used for the given MIP mode is derived as follows: isTransposed=predModeIntra&1 modeId=predModeIntra>>1. (2-6)
[0097] MIP coding mode is harmonized with other coding tools by considering following aspects: –LFNST is enabled for MIP on large blocks. Here, the LFNST transforms of planar mode are used. –The reference sample derivation for MIP is performed exactly as for the conventional intra prediction modes. –For the up-sampling step used in the MIP-prediction, original reference samples are used instead of down-sampled ones. –Clipping is performed before up-sampling and not after up-sampling. –MIP is allowed up to 64u64 regardless of the maximum transform size.
[0098] The number of MIP modes is 32 for sizeId=0, 16 for sizeId=1 and 12 for sizeId=2. 2.6 Spatial Geometric partitioning mode (SGPM)
[0099] SGPM is an intra mode that resembles the inter coding tool of GPM, where the two prediction parts are generated from intra predicted process. Fig. 9 shows spatial GPM candidates. In this mode, a candidate list is built with each entry containing one partition split and two intra prediction modes as shown in Fig. 9.26 partition modes and 3 of intra prediction modes are used to form the combinations. the length of the candidate list is set equal to 16. The selected candidate index is signalled.
[0100] Fig. 10 shows GPM template. The list is reordered using template (Fig. 10) where SAD between the prediction and reconstruction of the template is used for ordering. The template size is fixed to 1.
[0101] For each partition mode, an IPM list is derived for each part using the same intra-inter GPM list derivation. The IPM list size is set to 3. In the list, TIMD derived mode is replaced by 2 derived modes with horizontal and vertical orientations.
[0102] The SGPM mode is applied with a restricted blocks size: 4<=width<=64, 4<=height<=64, width<height*8, height<width*8, width*height>=32.
[0103] A PPS flag is coded to indicate whether no blending of two intra predictions is allowed. When this PPS flag is set to false, the following adaptive blending is also used for spatial GPM, where blending depth τ shown in Fig. 11 is derived as follows: If min (width, height) ==4, 1 / 2 τ is selected else if min (width, height) ==8, τ is selected else if min (width, height) ==16, 2 τ is selected else if min (width, height) ==32, 4 τ is selected else, 8 τ is selected.
[0104] Otherwise (the PPS flag is set to true) , 1 / 4 τ is always used for spatial GPM coded blocks to make sure no blending is used when SGPM block has partition angle completely horizontal or vertical, and much narrower blending width is used when SGPM block has other partition angles. It is noted that the flag is set to true in current Common Test Conditions (CTC) for the screen content videos. 2.7 Decoder side intra mode derivation (DIMD)
[0105] When DIMD is applied, up to five intra modes are derived from the reconstructed neighbor samples, and those five predictors are combined with the planar mode predictor with the weights derived from the histogram of gradients. The division operations in weight derivation are performed utilizing the same lookup table (LUT) based indigenization scheme used by the CCLM. For example, the division operation in the orientation calculation Orient=Gy / Gx (2-7) is computed by the following LUT-based scheme: x = Floor (Log2 (Gx) ) normDiff = ( (Gx<< 4) >> x) & 15 x += (3 + (normDiff ! = 0) ? 1 : 0) Orient = (Gy* (DivSigTable [normDiff] | 8) + (1<< (x-1) ) ) >> x (2-8) where DivSigTable
[0016] = {0, 7, 6, 5 , 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0 } .
[0106] For a block of size W×H, the weight for each of the five derived modes is modified if the one the above or left histogram magnitudes is twice larger than the other one. In this case, the weights are location dependent and computed as follows: If the above histogram is twice the left, then: If the left histogram is twice the above, then: where wDimdi is the unmodified uniform weight of the DIMD, Δi is pre-defined and set to 10.
[0107] Derived intra modes are included into the primary list of intra most probable modes (MPM) , so the DIMD process is performed before the MPM list is constructed. The primary derived intra mode of a DIMD block is stored with a block and is used for MPM list construction of the neighboring blocks.
[0108] Finally, note the region of neighboring reconstructed samples used for computing the histogram of gradients is modified, depending on reconstructed samples availability. The region of decoded reference samples of current WxH luma CB is extended towards the above-right side if available, up to W additional columns. It is extended towards the bottom-left side if available, up to H additional rows. 2.7.1 DIMD chroma mode
[0109] Fig. 12 shows Neighboring reconstructed samples used for DIMD chroma mode. The DIMD chroma mode uses the DIMD derivation method to derive the chroma intra prediction mode of the current block based on the neighboring reconstructed Y, Cb and Cr samples in the second neighboring row and column as shown in Fig. 12. Specifically, a horizontal gradient and a vertical gradient are calculated for each collocated reconstructed luma sample of the current chroma block, as well as the reconstructed Cb and Cr samples, to build a HoG. Then the intra prediction mode with the largest histogram amplitude values is used for performing chroma intra prediction of the current chroma block.
[0110] When the intra prediction mode derived from the DIMD chroma mode is the same as the intra prediction mode derived from the DM mode, the intra prediction mode with the second largest histogram amplitude value is used as the DIMD chroma mode. A CU level flag is signaled to indicate whether the proposed DIMD chroma mode is applied.
[0111] Finally, the luma region of reconstructed samples used for computing the histogram of gradients for chroma DIMD mode is modified. For a WuH pair of chroma CBs to predict, to build the histogram of gradients associated to the collocated luma CB, the pairs of a vertical gradient and a horizontal gradient are extracted from the second and third lines in this luma CB instead of being extracted from the regular set of DIMD decoded reference samples around this luma CB. 2.8 Template-based intra mode derivation (TIMD)
[0112] For each intra prediction mode in MPMs, as well as the wide-angle modes if the above-right and / or bottom-left reference samples are available, SATD between the prediction and reconstruction samples of the template is calculated. First two intra prediction modes with the minimum SATD are selected as the TIMD modes. These two TIMD modes are fused with the weights after applying PDPC process, and such weighted intra prediction is used to code the current CU. Position dependent intra prediction combination (PDPC) is included in the derivation of the TIMD modes.
[0113] The costs of the two selected modes are compared with a threshold, in the test the cost factor of 2 is applied as follows: costMode2 < 2*costMode1 (2-11) .
[0114] If this condition is true, the fusion is applied, otherwise the only mode1 is used.
[0115] Weights of the modes are computed from their SATD costs as follows: weight1 = costMode2 / (costMode1+ costMode2) weight2 = 1 -weight1 (2-12)
[0116] The division operations are conducted using the same lookup table (LUT) based integerization scheme used by the CCLM. 2.9 Multi-model LM (MMLM)
[0117] CCLM included in VVC is extended by adding three Multi-model LM (MMLM) modes. In each MMLM mode, the reconstructed neighboring samples are classified into two classes using a threshold which is the average of the luma reconstructed neighboring samples. The linear model of each class is derived using the Least-Mean-Square (LMS) method. For the CCLM mode, the LMS method is also used to derive the linear model. A slope adjustment to is applied to cross-component linear model (CCLM) and to Multi-model LM prediction. The adjustment is tilting the linear function which maps luma values to chroma values with respect to a center point determined by the average luma value of the reference samples. 2.10 Multiple transform selection (MTS) for core transform
[0118] In addition to DCT-II which has been employed in HEVC, a Multiple Transform Selection (MTS) scheme is used for residual coding both inter and intra coded blocks. It uses multiple selected transforms from the DCT8 / DST7. The newly introduced transform matrices are DST-VII and DCT-VIII. Table 2 shows the basis functions of the selected DST / DCT. Table 2 Transform basis functions of DCT-II / VIII and DSTVII for N-point input
[0119] In order to keep the orthogonality of the transform matrix, the transform matrices are quantized more accurately than the transform matrices in HEVC. To keep the intermediate values of the transformed coefficients within the 16-bit range, after horizontal and after vertical transform, all the coefficients are to have 10-bit.
[0120] In order to control MTS scheme, separate enabling flags are specified at SPS level for intra and inter, respectively. When MTS is enabled at SPS, a CU level flag is signalled to indicate whether MTS is applied or not. Here, MTS is applied only for luma. The MTS signaling is skipped when one of the below conditions is applied. –The position of the last significant coefficient for the luma TB is less than 1 (i.e., DC only) –The last significant coefficient of the luma TB is located inside the MTS zero-out region
[0121] If MTS CU flag is equal to zero, then DCT2 is applied in both directions. However, if MTS CU flag is equal to one, then two other flags are additionally signalled to indicate the transform type for the horizontal and vertical directions, respectively. Transform and signalling mapping table as shown in Table 3. Unified the transform selection for ISP and implicit MTS is used by removing the intra-mode and block-shape dependencies. If current block is ISP mode or if the current block is intra block and both intra and inter explicit MTS is on, then only DST7 is used for both horizontal and vertical transform cores. When it comes to transform matrix precision, 8-bit primary transform cores are used. Therefore, all the transform cores used in HEVC are kept as the same, including 4-point DCT-2 and DST-7, 8-point, 16-point and 32-point DCT-2. Also, other transform cores including 64-point DCT-2, 4-point DCT-8, 8-point, 16-point, 32-point DST-7 and DCT-8, use 8-bit primary transform cores. Table 3 - Transform and signalling mapping table
[0122] To reduce the complexity of large size DST-7 and DCT-8, High frequency transform coefficients are zeroed out for the DST-7 and DCT-8 blocks with size (width or height, or both width and height) equal to 32. Only the coefficients within the 16x16 lower-frequency region are retained.
[0123] As in HEVC, the residual of a block can be coded with transform skip mode. To avoid the redundancy of syntax coding, the transform skip flag is not signalled when the CU level MTS_CU_flag is not equal to zero. Note that implicit MTS transform is set to DCT2 when LFNST or MIP is activated for the current CU. Also the implicit MTS can be still enabled when MTS is enabled for inter coded blocks. 2.11 Subblock transform (SBT)
[0124] In VTM, subblock transform is introduced for an inter-predicted CU. In this transform mode, only a sub-part of the residual block is coded for the CU. When inter-predicted CU with cu_cbf equal to 1, cu_sbt_flag may be signaled to indicate whether the whole residual block or a sub-part of the residual block is coded. In the former case, inter MTS information is further parsed to determine the transform type of the CU. In the latter case, a part of the residual block is coded with inferred adaptive transform and the other part of the residual block is zeroed out.
[0125] When SBT is used for an inter-coded CU, SBT type and SBT position information are signaled in the bitstream. Fig. 13 shows SBT position, type and transform type. There are two SBT types and two SBT positions, as indicated in Fig. 13. For SBT-V (or SBT-H) , the TU width (or height) may equal to half of the CU width (or height) or 1 / 4 of the CU width (or height) , resulting in 2: 2 split or 1: 3 / 3: 1 split. The 2: 2 split is like a binary tree (BT) split while the 1: 3 / 3: 1 split is like an asymmetric binary tree (ABT) split. In ABT splitting, only the small region contains the non-zero residual. If one dimension of a CU is 8 in luma samples, the 1: 3 / 3: 1 split along that dimension is disallowed. There are at most 8 SBT modes for a CU.
[0126] Position-dependent transform core selection is applied on luma transform blocks in SBT-V and SBT-H (chroma TB always using DCT-2) . The two positions of SBT-H and SBT-V are associated with different core transforms. More specifically, the horizontal and vertical transforms for each SBT position is specified in Fig. 13. For example, the horizontal and vertical transforms for SBT-V position 0 is DCT-8 and DST-7, respectively. When one side of the residual TU is greater than 32, the transform for both dimensions is set as DCT-2. Therefore, the subblock transform jointly specifies the TU tiling, cbf, and horizontal and vertical core transform type of a residual block.
[0127] The SBT is not applied to the CU coded with combined inter-intra mode. 2.12 Extrapolation filter-based intra prediction (EIP) mode
[0128] In the EIP mode, the samples in a CU are predicted from the top-left position to the bottom-right position by applying an extrapolation filter to neighboring reconstructed samples or predicted samples. The EIP mode uses a 15-tap filter for prediction as below: , where pred (x, y) is the predicted value at position (x, y) in the CU, ci is the filter coefficient, and the is the reconstructed samples or predicted samples.
[0129] The EIP filter can be derived from the neighboring reconstructed samples or be inherited from the previous EIP coded blocks. There are three EIP filter shapes and three types of reconstructed area supported in ECM as shown in Fig. 14 and Fig. 15, respectively. Fig. 14 shows three EIP filter shapes. Fig. 15 shows three types of reconstructed area for EIP filter.
[0130] For a CU coded in the EIP mode, an EIP merge flag is signaled to indicate whether the EIP filter is inherited from previous blocks coded in EIP mode. When the EIP merge flag is true, an EIP merge list is constructed from the spatial adjacent, spatial non-adjacent, temporal and history candidates. The position and inclusion order of these candidates are the same as those used in CCP merge candidate list. An EIP merge index is further signaled to indicate which EIP merge candidate is selected. The filter shape and the filter coefficients of the selected candidate are then inherited to code the CU.
[0131] When the EIP merge flag is false, the EIP filter is derived from the neighboring reconstructed samples and the relevant syntax element is signaled to indicate which one of the three types of reconstructed area and which one of the three filter shapes are used for the CU. The selected filter moves in the selected reconstructed area either horizontally or vertically with a one-pixel step to construct the auto-correlation matrix and the cross-correlation vector. The calculation of coefficients from the auto-correlation matrix and the cross-correlation vector is the same as that in CCCM.
[0132] After generating the prediction samples of the CU using the EIP filter, an intra prediction mode is derived by applying the DIMD process to the prediction samples. Specifically, a horizontal gradient and a vertical gradient are calculated for each predicted sample to build a histogram of gradient. Then the intra prediction mode corresponding to the largest histogram count is used to determine the LFNST, NSPT or MTS transform set. 2.13 Matrix based intra prediction replacing conventional intra modes (PDP)
[0133] A matrix of weights, which are defined for a block shape and intra mode, is introduced, those weights are multiplied by the neighbour reference template to derive the prediction samples replacing conventional intra prediction. Fig. 16 shows L-shaped neighborhood for a give predicted block. The weights are applied to the reference samples of the L-shaped causal neighborhood template as shown in Fig. 16.
[0134] The reference samples in the causal neighborhood are denoted as r, and F (x, y) is the matrix of weights. Then the prediction P (x, y) can be derived as P (x, y) = ∑k F (x, y, k) *r (k) (2-13) where k denotes the index of the reference sample in the template.
[0135] In the test, this prediction is used for block size with both width and height up to 32 (except for 4′32, 32′4, 8′32 and 32′8) . The template size is 2 for blocks with both width and height up to 16 and it is only used for mode 0, 1, and (2+2*k) . For other blocks, template size is set to 1; is used for mode 0, 1, and (2+4*k) ; prediction is only performed for 16′16 positions, and the rest of the samples are generated by bilinear interpolation. For all block sizes, block shape and mode-based symmetry is used. Reference length is set to W and H for modes greater than 18 and less than 50 and set to 2*W and 2*H otherwise.
[0136] The filters are trained with BVI sequences composing of 800 sequences with diverse resolutions. 2.14 Modifications to Matrix-Based Intra Prediction
[0137] Alternative matrices are used for a sub-set of block sizes that support MIP. For blocks with a max size of 32′32, alternative matrices which use the L-shaped causal template (Fig. 16) as input to generate the W′H prediction block are used in MIP modes. The L-shaped template contains T1′W and T2′H neighbor reference samples and the T1′T2 corner reference samples. T1 and T2 are both set to 2.
[0138] The prediction of a sample P (x, y) can be derived as: P (x, y) = ∑k F (x, y, k) *r (k) , where r (k) is the kth item in the L-shaped template, and F (x, y) is the matrix weights corresponding to the position (x, y) . 2.15 Intra prediction merge mode
[0139] A list of intra mode candidates is constructed using the intra modes from the neighbour blocks. It is similar to inter merge mode, but instead of motion vector the neighbour intra modes are added to the list. A flag is signalled to indicate whether to enable the proposed intra merge mode. If the flag is true, at least one intra merge candidate list is constructed. If there are more than one intra merge lists, a list index is signalled to indicate which intra merge list is selected. An index is further signalled to indicate which candidate is used for this CU. The neighbouring blocks considered for the intra merge list construction are as shown in Fig. 17. Fig. 17 shows neighboring blocks for merging checks. 2.16 Sum of Square Error (SSE)
[0140] The difference between two blocks with the same block size is produced using Diff (i, j) = BlockA (i, j) -BlockB (i, j) (2-14) SEE is computed using the following equation: 2.17 Sum of Absolute Difference (SAD)
[0141] SAD is computed using the following equation: 2.18 Hadamard transformed SAD (SATD)
[0142] Since the transformed coefficients are coded, an improved estimation of the cost of each mode can be obtained by estimating DCT with the Hadamard transform. SATD is computed using: 2.19 Hadamard transform
[0143] Hadamard transform is used in video coding to calculate SATD cost as follows: [LN] ′= [HN] × [LN] × [HN] (2-18) where HN denotes a N-order Hadamard matrix and LN denotes a N′N block. And H2, H4, H8, H16 are used to calculate SATD cost for 2′2, 4′4, 8′8, 16′16 blocks. 2.20 Mean-scaled SATD
[0144] It is proposed to modify the SATD calculations by applying a weight of one quarter for the absolute value of the DC coefficient resulting from the SATD transform process. This is asserted to compensate for the relative easiness of coding the DC components with respect to the AC coefficients.
[0145] The weight of one quarter is selected empirically as it provides on average larger gains than other weights that can be implemented with simple bit shifting. 2.21 Adaptive reordering of merge candidates with template matching (ARMC-TM)
[0146] The merge candidates are adaptively reordered with template matching (TM) . The reordering method is applied to regular merge mode, TM merge mode, and affine merge mode (excluding the SbTMVP candidate) . For the TM merge mode, merge candidates are reordered before the refinement process.
[0147] An initial merge candidate list is firstly constructed according to given checking order, such as spatial, TMVPs, non-adjacent, HMVPs, pairwise, virtual merge candidates. Then the candidates in the initial list are divided into several subgroups. For the template matching (TM) merge mode, adaptive DMVR mode, each merge candidate in the initial list is firstly refined by using TM / multi-pass DMVR. Merge candidates in each subgroup are reordered to generate a reordered merge candidate list and the reordering is according to cost values based on template matching. The index of selected merge candidate in the reordered merge candidate list is signalled to the decoder. For simplification, merge candidates in the last but not the first subgroup are not reordered. All the zero candidates from the ARMC reordering process are excluded during the construction of Merge motion vector candidates list. The subgroup size is set to 5 for regular merge mode and TM merge mode. The subgroup size is set to 3 for affine merge mode. ● Cost calculation
[0148] The template matching cost of a merge candidate during the reordering process is measured by the SAD between samples of a template of the current block and their corresponding reference samples. The template comprises a set of reconstructed samples neighboring to the current block. Reference samples of the template are located by the motion information of the merge candidate. When a merge candidate utilizes bi-directional prediction, the reference samples of the template of the merge candidate are also generated by bi-prediction as shown in Fig. 18. ● Refinement of the initial merge candidate list
[0149] When multi-pass DMVR is used to derive the refined motion to the initial merge candidate list only the first pass (i.e., PU level) of multi-pass DMVR is applied in reordering. When template matching is used to derive the refined motion, the template size is set equal to 1. Only the above or left template is used during the motion refinement of TM when the block is flat with block width greater than 2 times of height or narrow with height greater than 2 times of width. TM is extended to perform 1 / 16-pel MVD precision. The first four merge candidates are reordered with the refined motion in TM merge mode.
[0150] For subblock-based merge candidates with subblock size equal to Wsub × Hsub, the above template comprises several sub-templates with the size of Wsub × 1, and the left template comprises several sub-templates with the size of 1 × Hsub. As shown in Fig. 19, the motion information of the subblocks in the first row and the first column of current block is used to derive the reference samples of each sub-template. ● Reordering criteria
[0151] In the reordering process, a candidate is considered as redundant if the cost difference between a candidate and its predecessor is inferior to a lambda value e.g. |D1-D2| < λ, where D1 and D2 are the costs obtained during the first ARMC ordering and λ is the Lagrangian parameter used in the RD criterion at encoder side.
[0152] The proposed algorithm is defined as the following: -Determine the minimum cost difference between a candidate and its predecessor among all candidates in the list ● If the minimum cost difference is superior or equal to λ, the list is considered diverse enough and the reordering stops. ● If this minimum cost difference is inferior to λ, the candidate is considered as redundant, and it is moved at a further position in the list. This further position is the first position where the candidate is diverse enough compared to its predecessor. -The algorithm stops after a finite number of iterations (if the minimum cost difference is not inferior to λ) .
[0153] This algorithm is applied to the Regular, TM, BM and Affine merge modes. A similar algorithm is applied to the Merge MMVD and sign MVD prediction methods which also use ARMC for the reordering.
[0154] The value of λ is set equal to the λ of the rate distortion criterion used to select the best merge candidate at the encoder side for low delay configuration and to the value λ corresponding to a another QP for Random Access configuration. A set of λ values corresponding to each signaled QP offset is provided in the SPS or in the Slice Header for the QP offsets which are not present in the SPS. ● Extension to AMVP modes
[0155] The ARMC design is also applicable to the AMVP mode wherein the AMVP candidates are reordered according to the TM cost. For the template matching for advanced motion vector prediction (TM-AMVP) mode, an initial AMVP candidate list is constructed, followed by a refinement from TM to construct a refined AMVP candidate list. In addition, an MVP candidate with a TM cost larger than a threshold, which is equal to five times of the cost of the first MVP candidate, is skipped.
[0156] Note, when wrap around motion compensation is enabled, the MV candidate shall be clipped with wrap around offset taken into consideration.
[0157] Merge candidates of one single candidate type, e.g., TMVP or non-adjacent MVP (NA-MVP) , are reordered based on the ARMC TM cost values. The reordered candidates are then added into the merge candidate list. The TMVP candidate type adds more TMVP candidates with more temporal positions and different inter prediction directions to perform the reordering and the selection. Moreover, NA-MVP candidate type is further extended with more spatially non-adjacent positions. The target reference picture of the TMVP candidate can be selected from any one of reference picture in the list according to scaling factor. The selected reference picture is the one whose scaling factor is the closest to 1. 3. Problems
[0158] In current design of ECM, decoder-side derivation and / or reordering is used in the determination of coding information for a coding tool, such as Template-based multiple reference line intra prediction (TMRL) , Adaptive reordering of merge candidates with template matching (ARMC) . Typically, template matching (TM) cost or bilaterial matching (TM) cost is calculated and used in the derivation and / or reordering, wherein SAD is used as cost metric for some coding tools and SATD is used as cost metric for other coding tools. The coding performance could be improved by using SATD as cost metric in the derivation and / or reordering.
[0159] In addition, SATD only supports two-dimensional array (i.e., block with M′N where M > 1 and N > 1) in current ECM, while SATD for one-dimensional array is missing. 4. Detailed solutions
[0160] The detailed example 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.SATD for one-dimensional array or block with M′1 and 1′M 1. It is proposed that SATD cost may be calculated for one-dimensional array or block with M′1 and 1′M. a. In one example, Hadamard transform may be used for the one-dimensional array or block with M′1 and 1′M. i. In one example, horizontal transform may be used. ii. In one example, vertical transform may be used. iii. In one example, the SATD cost may be equal to the sum of the absolute value of the coefficients after transform. b. In one example, one or more the coefficients may be adjusted. i. In one example, one or more weights may be applied to the coefficients. c. In one example, mean-scaled SATD may be used. i. In one example, the weight for the absolute value of the DC coefficient used in mean- scaled SATD may depend on coding information, such as M. ii. In one example, the weight may be pre-defined / derived / signalled. d. In one example, the SATD cost (C) may be adjusted using a factor (S) . i. In one example, S may depend on M. ii. In one example, C = C / S. iii. In one example, C = C + S or C = C –S. iv. In one example, S = sqrt (M) *2, where sqrt () denotes square root function. e. In one example, M = 2, or 4, or 8, or 16, or 32, or 64, or 128, or 256. i. In one example, M less than 4 is disallowed. f. In one example, SATD cost for one-dimensional array or block with M′1 (1′M) may be calcu- lated using the sum of SATD cost for one-dimensional array or block with H′1 (1′H) , where H is less than M. i. In one example, M = n*H and n is an integer larger than 1. 1) In one example, H = 8, M = 16, or 32, or 64, or 128, or 256. 2) In one example, H = 16, M = 32, or 64, or 128, or 256. 3) In one example, H = 32, M = 64, or 128, or 256. g. In one example, Hadamard transform for the one-dimensional array or block with M′1 and 1′M may be used to calculate SATD cost for two-dimensional array. i. In one example, for a block with M′H, N one-dimensional M′1 Hadamard transform may be used. ii. In one example, for a block with M′H, M one-dimensional 1′H Hadamard transform may be used.SATD / SSE cost used in the derivation / reordering for coding information 2. It is proposed that SATD / SSE may be used as cost metrics in the derivation or reordering for coding information for a coding tool. a. In one example, the coding tool may refer to intra coding tool. i. In one example, the coding information may refer to conventional intra prediction mode, EIP mode (EIP filter type and / or type of reconstructed area for deriving the filter coef-ficients) , MIP mode and / or MIP transposed flag, chroma prediction mode, cross-com-ponent prediction (CCP) mode for chroma, non-CCP mode for chroma, SGPM index, coding information for DIMD, coding information for TIMD, intraTMP BV (integer and / or fractional) . ii. In one example, the coding tool may refer to conventional intra prediction, DIMD, DIMD merge, TIMD, TIMD merge, MRL, ISP, MIP, IntraTMP, SGPM, chroma fusion, CCLM, MMLM, CCCM, GLM, CCP merge, intra prediction fusion, TMRL, PDPC / gradient PDPC, EIP, Intra merge mode, or their variants. b. In one example, the coding tool may refer to inter coding tool. i. In one example, the coding information may refer to merge candidate, AMVP index, BCW index, weights for OBMC, reference picture index, LIC flag or LIC parameters, MVD offset or candidate (magnitude and / or sign) . ii. In one example, the coding tool may refer to such as CIIP (e.g., CIIP-Planar, CIIP- TIMD, CIIP-TM) , BCW (e.g., BCW index derived by TM) , MMVD (e.g., MMVD or TM based reordering for MMVD) , template matching (TM) , affine (e.g., affine-MMVD, TM based reordering for affine MMVD) , DMVR / multi-pass DMVR, PROF, BDOF / sample based BDOF, adaptive decoder-side motion vector refinement (AD-MVR) , OBMC or TM based OBMC, MHP, GPM (e.g., GPM, GPM-TM, GPM-MMVD, GPM-intra, GPM-affine, adaptive GPM blending) , bilateral / template match-ing AMVP-merge mode, Inter-CCP merge, reference picture reordering, or their vari-ants. c. In one example, the coding tool may refer to IBC coding tool. i. In one example, the coding information may refer to IBC merge candidate, IBC AMVP index, block vector difference (magnitude and / or sign) , block vector offset. ii. In one example, the coding tool may refer to IBC AMVP mode, or IBC merge mode, or IBC-TM mode, or IBC-MBVD mode, or RR-IBC mode, or IBC-LIC, or CIBCIP (IBC-CIIP) , or AMVR for IBC, or fractional BV, or an IBC coding tool in which the reference block is overlapped with current block, or their variants. d. In one example, SAD may be replaced by SATD or SSE. e. In one example, more than one cost metrics may be used. i. In one example, two or more cost metrics may be used in the derivation or reordering. 1) In one example, a joint cost may be derived using SATD cost and SAD cost, or SSE cost and SAD cost, or SATD cost and SSE cost. 2) In one example, the evaluation of signalled bits may be included. ii. In one example, different cost metrics may be used when more than one derivation or reordering is performed. 3. In one example, the calculation of SATD cost which is used in the derivation or reordering for coding information may be different from the calculation of SATD cost that is only used in encoder. a. In one example, the mean-scaled SATD may be not used. i. Alternatively, the mean-scaled SATD may be used conditionally. ii. Alternatively, the weight used in the mean-scaled SATD may be different. 1) In one example, the weight may depend on coding information. 4. In one example, whether to and / or how to calculate the template matching (TM) cost may depend on the coding information. a. In one example, the coding information may refer to one or more reconstructed samples of the template, and / or one or more predicted samples of the template. b. In one example, the difference (Di) between one or more reconstructed samples and their pre- dicted samples may be adjusted before calculating the TM cost, where the reconstructed sample may be coded by a specific prediction mode. i. In one example, the prediction mode may refer to Intra mode, and / or IBC mode, and / or Palette mode, and / or Inter mode. ii. In one example, when TM cost is used for a first prediction mode, the specific predic- tion mode may refer to a second prediction mode, where the first prediction mode is different from the second prediction mode. iii. In one example, Di = Di *S, where S is smaller than or equal to 1. 1) In one example, S = 0. 2) In one example, S = 0.5. c. In one example, the above methods may be applied to a specific coding tool. i. In one example, the coding tool may refer to CIIP (e.g., CIIP-Planar, CIIP-TIMD, CIIP- TM) , BCW (e.g., BCW index derived by TM) , MMVD (e.g., MMVD or TM based reordering for MMVD) , template matching (TM) , affine (e.g., affine-MMVD, TM based reordering for affine MMVD) , DMVR / multi-pass DMVR, PROF, BDOF / sample based BDOF, adaptive decoder-side motion vector refinement (ADMVR) , OBMC or TM based OBMC, MHP, GPM (e.g., GPM, GPM-TM, GPM-MMVD, GPM-intra, GPM-affine, adaptive GPM blending) , bilateral / template matching AMVP-merge mode, Inter-CCP merge, reference picture reordering, or their variants. 5. In one example, the Lagrangian parameter λ used in ARMC may depend on the cost metrics used for ARMC. a. In one example, λ1 may be used when a first cost metric is used in ARMC, and λ2 may be used when a second cost metric is used in ARMC, where λ1 ! = λ2. i. In one example, the first cost metric may be SAD, or SATD, or MR-SAD, or MR- SATD, or SSE, or MR-SSE. ii. In one example, the second cost metric may be SAD, or SATD, or MR-SAD, or MR- SATD, or SSE, or MR-SSE. iii. In one example, λ1 and / or λ2 may be signaled, or derived. 1) In one example, λ2 may be derived using λ1. a) In one example, λ1 is used for SAD, λ2 is used for SATD, and λ2 = a *λ1. 6. In one example, whether to and / or how to use a specific cost metric in the reordering may depend on coding information, where the coding information is not a merge index. i. In one example, the coding information may refer to block dimensions and / or block size, and / or block depth, and / or slice / picture type and / or partition tree type (single, or dual tree, or local dual tree) , and / or temporal layer identification, block location, and / or colour format, and / or colour component, and / or video content, such as camera-captured video or screen content video.General aspects 7. In above examples, the video unit may refer to the video unit may refer to colour component / sub-pic- ture / slice / tile / coding tree unit (CTU) / CTU row / groups of CTU / coding unit (CU) / prediction unit (PU) / transform unit (TU) / coding tree block (CTB) / coding block (CB) / prediction block (PB) / transform block (TB) / ablock / sub-block of a block / sub-region within a block / any other region that contains more than one sample or pixel. 8. Whether to and / or how to apply the disclosed methods above may be signalled at sequence level / group of pictures level / picture level / slice level / tile group level, such as in sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header. 9. Whether and / or how to apply the above methods may depend on the following information: a. A message signalled in the DPS / SPS / VPS / PPS / APS / picture header / slice header / tile group header / coding tree unit (CTU) / Coding unit (CU) / CTU row / group of CTUs / TU / PU block / Video coding unit b. Position of CU / PU / TU / block / Video coding unit c. Block dimension of current block and / or its neighbouring blocks d. Block shape of current block and / or its neighbouring blocks e. coded mode of a block, e.g., IBC or non-IBC inter mode or non-IBC subblock mode f. Indication of the colour format (such as 4: 2: 0, 4: 4: 4) g. Coding tree structure h. Slice / tile group type and / or picture type i. Colour component (e.g., may be only applied on chroma components or luma component) j. Temporal layer ID k. Profiles / Levels / Tiers of a standard. Embodiment Embodiment 1 Embodiment 2
[0161] SATD is calculated as the template cost in the reordering process. In Aspect #1, SATD-based reordering is used for intra and IBC coding tools, such as reordering in TMRL and EIP, and ARMC for IBC. In Aspect #2, SATD-based reordering is used for inter coding tools, such as ARMC, reordering for MMVD, MVD sign and magnitude derivation, TM based BCW index reordering, TM for affine, reordering for reference picture index, OBMC blending weights derivation.
[0162] Fig. 20 illustrates a flowchart of a method 2000 for video processing in accordance with embodiments of the present disclosure. The method 2000 is implemented during a conversion between a video unit of a video and a bitstream of the video.
[0163] At block 2010, for a conversion between a video unit of a video and a bitstream of the video, a transformed sum of absolute difference (SATD) cost for a one-dimensional array associated with the video unit is determined. In some embodiments, the one one-dimensional array associated with the video unit may include SATD cost of predictions and reconstruction of pixels in a column or a row. In some embodiments, the SATD cost is determined for block with one-dimensional array that may be M*1 block or 1*M block, where M is an integer.
[0164] At block 2020, coding information of the video unit is determiend based on the SATD cost. In some embodiments, the video unit comprises at least one of the following: a color component, a sub-picture, a slice, a tile, a coding tree unit (CTU) , a CTU row, a group of CTU, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree block (CTB) , a coding block (CB) , a prediction block (PB) , a transform block (TB) , a block, a sub-block of a block, a sub-region within a block, a region containing more than one sample or pixel.
[0165] At block 2030, the conversion is performed based on the coding information. In some embodiments, the conversion includes encoding the video unit into the bitstream. In some other embodiments, the conversion includes decoding the video unit from the bitstream. In this way, the coding performance and efficiency can be improved.
[0166] In some embodiments, Hadamard transform is used for the one-dimensional array. For example, a horizontal transform is used for the one-dimensional array. In some other embodiments, a vertical transform is used for the one-dimensional array. In some further embodiments, the SATD cost is equal to a sum of absolute value of coefficients after transform.
[0167] In some embodiments, one or more coefficients after tranfomred are adjusted. By way of example, values after Hadamard transformation are referred to as coefficients. For example, one or more weights are applied to the one or more coefficients.
[0168] In some embodiments, a mean-scaled SATD is used for the one-dimensional array. In some embodiments, a weight for an absolute value of direct current coefficient used in the mean-scaled SATD depends on coding information. In some other embodiments, the weight for the absolute value of direct current coefficient used in the mean-scaled SATD is predefined. Alternatively, the weight for the absolute value of direct current (DC) coefficient used in the mean-scaled SATD is derived. In some other embodiments, the weight for the absolute value of direct current coefficient used in the mean-scaled SATD is signaled.
[0169] In some embodiments, the SATD cost is adjusted using a factor. In some embodiments, the factor depends on the number of elements in the one-dimensional array. In some embodiments, C’ =C / S, where C’ represents the adjusted SATD cost, C represents the SATD cost and S represents the factor. In some other embodiments, C’ =C+S or C’ =C-S, where C’ represents the adjusted SATD cost, C represents the SATD cost and S represents the factor. In some further embodiments, S = sqrt (M) *2, where sqrt () denotes square root function, S represents the factor and M represents the number of elements in the one-dimensional array.
[0170] In some embodiments, the number of elements in the one-dimensional array is equal to one of: 2, 4, 8, 16, 32, 64, 128 or 256. In some embodiments, the number of elements in the one-dimensional array being less than 4 is disallowed.
[0171] In some embodiments, the SATD cost for the one-dimensional array is calculated using a sum of SATD cost for another one-dimensional array. In this case, the number of elements in the one-dimensional array may be larger than the number of elements in the other one-dimensional array.
[0172] In some embodiments, M= n*H. In this case, M represents the number of elements in the one-dimensional array and H represents the number of elements in the other one-dimensional array, n is an integer larger than 1.
[0173] In some embodiments, H = 8, M = 16, or 32, or 64, or 128, or 256. Alternatively, H = 16, M = 32, or 64, or 128, or 256. Alternatively, H = 32, M = 64, or 128, or 256.
[0174] In some embodiments, a Hadamard transform for the one-dimensional array is used to determine a SATD cost for two-dimensional array. In some embodiments, for a block with M*H, H one-dimensional M*1 Hadamard transform is used. In some other embodiments, for a block with M*H, M one-dimensional 1*H Hadamard transform is used.
[0175] In some embodiments, at least one of SATD or sum of square error (SSE) is used as cost metric in a derivation or reordering for coding information for a coding tool. The coding performance could be improved by using SATD as cost metric in the derivation and / or reordering.
[0176] In some embodiments, the coding tool comprises an intra coding tool. For example, the coding information comprises at least one of: conventional intra prediction mode, an extrapolation filter-based intra prediction (EIP) mode, an EIP filter type for deriving filter coefficients, a type of reconstructed area for deriving filter coefficients, a matrix weighted intra prediction (MIP) mode, an MIP transposed flag, a chroma prediction mode, a cross-component prediction (CCP) mode for chroma, a non-CCP mode for chroma, a spatial geometric partitioning mode (SGPM) index, coding information for decoder-side intra mode derivation (DIMD) , coding information for template-based intra mode derivation (TIMD) , or intra template matching prediction (IntraTMP) block vector (BV) . In some embodiments, the coding tool comprise at least one of: a conventional intra prediction, a variant of conventional intra prediction, a decoder-side intra mode derivation (DIMD) , a variant of DIMD, a DIMD merge, a variant of DIMD merge, a template-based intra mode derivation (TIMD) , a variant of TIMD, a TIMD merge, a variant of TIMD merge, a multiple reference line (MRL) , a variant of MRL, an intra sub-partition (ISP) , a variant of ISP, a matrix weighted intra prediction (MIP) , a variant of MIP, an Intra template matching prediction (IntraTMP) , a variant of IntraTMP, a SGPM, a variant of SGPM, chroma fusion, a variant of chroma fusion, a cross-component linear model (CCLM) , a variant of CCLM, a multi-model CCLM (MMLM) , a variant of MMLM, a convolutional cross-component model (CCCM) , a variant of CCCM, a gradient linear model (GLM) , a variant of GLM, a cross-component prediction (CCP) merge, a variant of CCP merge, intra prediction fusion, a variant of intra prediction fusion, a template-based multiple reference line intra prediction (TMRL) , a variant of TMRL, a position dependent intra prediction combination (PDPC) , a variant of PDPC, a gradient PDPC, a variant of gradient PDPC, an EIP, a variant of EIP, an intra merge mode, or a variant of intra merge mode.
[0177] In some embodiments, the coding tool comprises an inter coding tool. For example, the coding information comprises at least one of: merge candidate, an advanced motion vector Prediction (AMVP) index, a bi-prediction with coding unit (CU) -level weight (BCW) index, weights for overlapped block motion compensation (OBMC) , reference picture index, local illumination compensation (LIC) flag, LIC parameters, or motion vector difference (MVD) offset or candidate. In some embodiments, the coding tool comprises at least one of: a combined inter intra prediction (CIIP) mode, a variant of CIIP, a BCW, a variant of BCW, merge mode with motion vector difference (MMVD) , a variant of MMVD, a template matching (TM) based reordering for MMVD, a variant of TM based reordering for MMVD, a TM, a variant of TM, an affine mode, a variant of affine mode, a decoder side motion vector refinement (DMVR) , a variant of DMVR, multi-pass DMVR, prediction refinement with optical flow (PROF) , a variant of PROF, a bi-directional optical flow (BDOF) , a variant of BDOF, sample based BDOF, an adaptive decoder-side motion vector refinement (ADMVR) , a variant of ADMVR, an OBMC, a variant of OBMC, a TM based OBMC, a multi hypothesis prediction (MHP) , a variant of MHP, a geometric partitioning mode (GPM) , a variant of GPM, a bilateral matching (BM) AMVP-merge mode, a variant of BM AMVP-merge mode, a template matching (TM) AMVP-merge mode, a variant of TM AMVP-merge mode, an Inter-cross component prediction (CCP) merge, a variant of Inter-CCP merge, a reference picture reordering, or a variant of reference picture reordering.
[0178] In some embodiments, the coding tool comprises intra block copy (IBC) coding tool. For example, the coding information comprises at least one of: an IBC merge candidate, an IBC AMVP index, a block vector difference, or a block vector offset. In some embodiments, the coding tool comprises at least one of: an IBC AMVP mode, a variant of IBC AMVP, an IBC merge mode, a variant of IBC merge, an IBC-TM mode, a variant of IBC-TM, an IBC merge mode with block vector differences (IBC-MBVD) , a variant of IBC-MBVD, a reconstruction reordered (RR) -IBC mode, a variant of RR-IBC, an IBC-LIC, a variant of IBC-LIC, an IBC-CIIP, a variant of IBC-CIIP, an adaptive motion vector resolution (AMVR) for IBC, a variant of AMVR for IBC, a fractional BV, an IBC coding tool in which the reference block is overlapped with current block or a variant of IBC coding tool.
[0179] In some emmbodiments, the at least one of SATD or SSE that replaces SAD is used as the cost metric in the derivation or reordering. For example, SAD is replaced by SATD or SSE. In other words, instead of SAD cost, the SATD and / or SSE cost is used in the reordering. Alternatiavely, the SAD cost may be combined with the SATD and / or SSE cost in the reordering. In some embodiments, more than one cost metrics are used in the derivation or reordering. In some embodiments, two or more cost metrics are used in the derivation or reordering. For example, a joint cost is derived using SATD cost and SAD cost, or SSE cost and SAD cost, or SATD cost and SSE cost.
[0180] In some embodiments, signalled bits are evaluated in the derivation or reordering. For example, an evaluation of signalled bits are included in the derivation or reordering. By way of example, when reordering, in addition to the costs (such as, SAD cost and / or SATD cost and / or SSE cost) , the bits are also evaluated in the reordering. In some embodiments, different cost metrics are used in response to that more than one derivation or reordering is performed.
[0181] In some embodiments, whether to and / or how to calculate a template matching (TM) cost depends on the coding information. For example, the coding information comprises at least one of: one or more reconstructed samples of the template, or one or more predicted samples of the template.
[0182] In some embodiments, a difference between one or more reconstructed samples and their predicted samples is adjusted before calculating the TM cost. In this case, the one or more reconstructed samples are coded by a target prediction mode. In some embodiments, the target prediction mode comprises at least one of: an Intra mode, an IBC mode, a Palette mode, or an Inter mode.
[0183] In some embodiments, if the TM cost is used for a first prediction mode, the target prediction mode comprises a second prediction mode, and the first prediction mode is different from the second prediction mode. In some embodiments, the difference between the one or more reconstructed samples and their predicted samples is adjusted.
[0184] In some embodiments, Di = Di *S, where Di represents the differenced and S is smaller than or equal to 1. In some embodiments, S = 0 or S = 0.5.
[0185] In some embodiments, the video unit is applied with a certain coding tool. For example, the certain coding tool comprises at least one of: a combined inter intra prediction (CIIP) mode, a variant of CIIP, a BCW, a variant of BCW, merge mode with motion vector difference (MMVD) , a variant of MMVD, a template matching (TM) based reordering for MMVD, a variant of TM based reordering for MMVD, a TM, a variant of TM, an affine mode, a variant of affine mode, a decoder side motion vector refinement (DMVR) , a variant of DMVR, multi-pass DMVR, prediction refinement with optical flow (PROF) , a variant of PROF, a bi-directional optical flow (BDOF) , a variant of BDOF, sample based BDOF, an adaptive decoder-side motion vector refinement (ADMVR) , a variant of ADMVR, an OBMC, a variant of OBMC, a TM based OBMC, a multi hypothesis prediction (MHP) , a variant of MHP, a geometric partitioning mode (GPM) , a variant of GPM, a bilateral matching (BM) AMVP-merge mode, a variant of BM AMVP-merge mode, a template matching (TM) AMVP-merge mode, a variant of TM AMVP-merge mode, an Inter-cross component prediction (CCP) merge, a variant of Inter-CCP merge, a reference picture reordering, or a variant of reference picture reordering.
[0186] In some embodiments, a Lagrangian parameter λ used in ARMC depends on one or more cost metrics used for ARMC. In some embodiments, λ1 is used if a first cost metric is used in ARMC, and λ2 is used if a second cost metric is used in ARMC, wherein λ1 is not equal to λ2. In some embodiments, the first cost metric comprises at least one of: SAD, SATD, mean of residual (MR) -SAD, MR-SATD, SSE, or MR-SSE. In some embodiments, the second cost metric comprises at least one of: SAD, SATD, MR-SAD, MR-SATD, SSE, or MR-SSE.
[0187] In some embodiments, at least one of: λ1 or λ2 is signaled, or wherein at least one of: λ1 or λ2 is derived. In some embodiments, λ2 is derived using λ1. In some embodiments, λ1 is used for SAD, λ2 is used for SATD, and λ2 = a *λ1.
[0188] In some embodiments, a calculation of SATD cost which is used in a derivation or reordering for coding information is different from a calculation of SATD cost that is used in encoder. In some embodiments, a mean-scaled SATD is not used. In some embodiments, a mean-scaled SATD is used based on a condition.
[0189] In some embodiments, a weight used in a mean-scaled SATD is different. In some embodiments, the weight depends on coding information.
[0190] In some embodiments, whether to and / or how to use a specific cost metric in a reordering depends on coding information. In this case, the coding information is not a merge index.
[0191] In some embodiments, the coding information comprises at least one of: block dimensions, block size, block depth, slice type, picture type, partition tree type, temporal layer identification, block location, colour format, colour component, or video content. In some embodiments, the video content comprises camera-captured video or screen content video.
[0192] In some embodiments, an indication of whether to and / or how to determine the SATD cost for the one-dimensional array associated with the video unit is indicated at one of the following: sequence level, group of pictures level, picture level, slice level, or tile group level. In some embodiments, an indication of whether to and / or how to determine the SATD cost for the one-dimensional array associated with the video unit is used is indicated in one of the followings: a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a dependency parameter set (DPS) , decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter set (APS) , a slice header, or a tile group header.
[0193] In some embodiments, whether to and / or how to determine the SATD cost for the one-dimensional array associated with the video unit depends on at least one of the following information: a message signalled in one of: a DPS, a SPS, a VPS, a PPS, an APS, a picture header, a slice header, a tile group header, a coding tree unit (CTU) , a coding unit (CU) , a CTU row, a group of CTUs, a TU, a PU block, or a video coding unit, a position of a CU, a position of a PU, a position of a TU, a position of a block, a position of a video coding unit, a block dimension of a current block, a block dimension of a neighbouring block of the current block, a block shape of a current block, a block shape of a neighbouring block of the current block, a coded mode of a block, an indication of a colour format, a coding tree structure, a slice group type, a tile group type, a picture type, a colour component, a temporal layer identification, a profile of a standard, a level of a standard, or a tier of a standard.
[0194] In some embodiments, the coded mode of the block comprises at least one of: an intra block copy (IBC) inter mode, a non-IBC inter mode, or a non-IBC subblock mode. In some embodiments, the indication of the color format comprises 4: 2: 0 or 4: 4: 4. In some embodiments, the color component is applied on one of: a chroma component or a luma component.
[0195] 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. The method comprises: determining a transformed sum of absolute difference (SATD) cost for a one-dimensional array or block with one-dimension array associated with the video unit; determining coding information of the video unit based on the SATD cost; and generating the bitstream based on the coding information.
[0196] According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. The method comprises: determining a transformed sum of absolute difference (SATD) cost for a one-dimensional array or block with one-dimension array associated with the video unit; determining coding information of the video unit based on the SATD cost; generating the bitstream based on the coding information; and storing the bitstream in a non-transitory computer-readable recording medium.
[0197] 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.
[0198] Clause 1. A method of video processing, comprising: determining, for a conversion between a video unit of a video and a bitstream of the video, a transformed sum of absolute difference (SATD) cost for a one-dimensional array or block with one-dimension array associated with the video unit; determining coding information of the video unit based on the SATD cost; and performing the conversion based on the coding information.
[0199] Clause 2. The method of clause 1, wherein Hadamard transform is used for the one-dimensional array.
[0200] Clause 3. The method of clause 2, wherein a horizontal transform is used for the one-dimensional array.
[0201] Clause 4. The method of clause 2, wherein a vertical transform is used for the one-dimensional array.
[0202] Clause 5. The method of clause 2, wherein the SATD cost is equal to a sum of absolute value of coefficients after transform.
[0203] Clause 6. The method of clause 1, wherein one or more coefficients after transformed are adjusted.
[0204] Clause 7. The method of clause 6, wherein one or more weights are applied to the one or more coefficients.
[0205] Clause 8. The method of clause 1, wherein a mean-scaled SATD is used for the one-dimensional array.
[0206] Clause 9. The method of clause 8, wherein a weight for an absolute value of direct current coefficient used in the mean-scaled SATD depends on coding information.
[0207] Clause 10. The method of clause 8, wherein the weight for the absolute value of direct current (DC) coefficient used in the mean-scaled SATD is predefined, or wherein the weight for the absolute value of direct current coefficient used in the mean-scaled SATD is derived, or wherein the weight for the absolute value of direct current coefficient used in the mean-scaled SATD is signaled.
[0208] Clause 11. The method of clause 1, wherein the SATD cost is adjusted using a factor.
[0209] Clause 12. The method of clause 11, wherein the factor depends on the number of elements in the one-dimensional array.
[0210] Clause 13. The method of clause 11, wherein C’ =C / S, wherein C’ represents the adjusted SATD cost, C represents the SATD cost and S represents the factor.
[0211] Clause 14. The method of clause 11, wherein C’ =C+S or C’ =C-S, wherein C’ represents the adjusted SATD cost, C represents the SATD cost and S represents the factor.
[0212] Clause 15. The method of clause 11, wherein S = sqrt (M) *2, wherein sqrt () denotes square root function, S represents the factor and M represents the number of elements in the one-dimensional array.
[0213] Clause 16. The method of clause 1, wherein the number of elements in the one-dimensional array is equal to one of: 2, 4, 8, 16, 32, 64, 128 or 256.
[0214] Clause 17. The method of clause 1, wherein the number of elements in the one-dimensional array being less than 4 is disallowed.
[0215] Clause 18. The method of clause 1, wherein the SATD cost for the one-dimensional array is calculated using a sum of SATD cost for another one-dimensional array, wherein the number of elements in the one-dimensional array is larger than the number of elements in the other one-dimensional array.
[0216] Clause 19. The method of clause 18, wherein M= n*H, wherein M represents the number of elements in the one-dimensional array and H represents the number of elements in the other one-dimensional array, n is an integer larger than 1.
[0217] Clause 20. The method of clause 19, wherein H = 8, M = 16, or 32, or 64, or 128, or 256, or wherein H = 16, M = 32, or 64, or 128, or 256, or wherein H = 32, M = 64, or 128, or 256.
[0218] Clause 21. The method of clause 1, wherein a Hadamard transform for the one-dimensional array is used to determine a SATD cost for two-dimensional array.
[0219] Clause 22. The method of clause 21, wherein for a block with M*H, H one-dimensional M*1 Hadamard transform is used.
[0220] Clause 23. The method of clause 21, wherein for a block with M*H, M one-dimensional 1*H Hadamard transform is used.
[0221] Clause 24. The method of clause 1, wherein at least one of SATD or sum of square error (SSE) is used as cost metric in a derivation or reordering for coding information for a coding tool.
[0222] Clause 25. The method of clause 24, wherein the coding tool comprises an intra coding tool.
[0223] Clause 26. The method of clause 25, wherein the coding information comprises at least one of: conventional intra prediction mode, an extrapolation filter-based intra prediction (EIP) mode, an EIP filter type for deriving filter coefficients, a type of reconstructed area for deriving filter coefficients, a matrix weighted intra prediction (MIP) mode, an MIP transposed flag, a chroma prediction mode, a cross-component prediction (CCP) mode for chroma, a non-CCP mode for chroma, a spatial geometric partitioning mode (SGPM) index, coding information for decoder-side intra mode derivation (DIMD) , coding information for template-based intra mode derivation (TIMD) , or intra template matching prediction (IntraTMP) block vector (BV) .
[0224] Clause 27. The method of clause 25, wherein the coding tool comprise at least one of: a conventional intra prediction, a variant of conventional intra prediction, a decoder-side intra mode derivation (DIMD) , a variant of DIMD, a DIMD merge, a variant of DIMD merge, a template-based intra mode derivation (TIMD) , a variant of TIMD, a TIMD merge, a variant of TIMD merge, a multiple reference line (MRL) , a variant of MRL, an intra sub-partition (ISP) , a variant of ISP, a matrix weighted intra prediction (MIP) , a variant of MIP, an Intra template matching prediction (IntraTMP) , a variant of IntraTMP, a SGPM, a variant of SGPM, chroma fusion, a variant of chroma fusion, a cross-component linear model (CCLM) , a variant of CCLM, a multi-model CCLM (MMLM) , a variant of MMLM, a convolutional cross-component model (CCCM) , a variant of CCCM, a gradient linear model (GLM) , a variant of GLM, a cross-component prediction (CCP) merge, a variant of CCP merge, intra prediction fusion, a variant of intra prediction fusion, a template-based multiple reference line intra prediction (TMRL) , a variant of TMRL, a position dependent intra prediction combination (PDPC) , a variant of PDPC, a gradient PDPC, a variant of gradient PDPC, an EIP, a variant of EIP, an intra merge mode, or a variant of intra merge mode.
[0225] Clause 28. The method of clause 24, wherein the coding tool comprises an inter coding tool.
[0226] Clause 29. The method of clause 28, wherein the coding information comprises at least one of: merge candidate, an advanced motion vector Prediction (AMVP) index, a bi-prediction with coding unit (CU) -level weight (BCW) index, weights for overlapped block motion compensation (OBMC) , reference picture index, local illumination compensation (LIC) flag, LIC parameters, or motion vector difference (MVD) offset or candidate.
[0227] Clause 30. The method of clause 28, wherein the coding tool comprises at least one of: a combined inter intra prediction (CIIP) mode, a variant of CIIP, a BCW, a variant of BCW, merge mode with motion vector difference (MMVD) , a variant of MMVD, a template matching (TM) based reordering for MMVD, a variant of TM based reordering for MMVD, a TM, a variant of TM, an affine mode, a variant of affine mode, a decoder side motion vector refinement (DMVR) , a variant of DMVR, multi-pass DMVR, prediction refinement with optical flow (PROF) , a variant of PROF, a bi-directional optical flow (BDOF) , a variant of BDOF, sample based BDOF, an adaptive decoder-side motion vector refinement (ADMVR) , a variant of ADMVR, an OBMC, a variant of OBMC, a TM based OBMC, a multi hypothesis prediction (MHP) , a variant of MHP, a geometric partitioning mode (GPM) , a variant of GPM, a bilateral matching (BM) AMVP-merge mode, a variant of BM AMVP-merge mode, a template matching (TM) AMVP-merge mode, a variant of TM AMVP-merge mode, an Inter-cross component prediction (CCP) merge, a variant of Inter-CCP merge, a reference picture reordering, or a variant of reference picture reordering.
[0228] Clause 31. The method of clause 28, wherein the coding tool comprises intra block copy (IBC) coding tool.
[0229] Clause 32. The method of clause 31, wherein the coding information comprises at least one of: an IBC merge candidate, an IBC AMVP index, a block vector difference, or a block vector offset.
[0230] Clause 33. The method of clause 31, wherein the coding tool comprises at least one of: an IBC AMVP mode, a variant of IBC AMVP, an IBC merge mode, a variant of IBC merge, an IBC-TM mode, a variant of IBC-TM, an IBC merge mode with block vector differences (IBC-MBVD) , a variant of IBC-MBVD, a reconstruction reordered (RR) -IBC mode, a variant of RR-IBC, an IBC-LIC, a variant of IBC-LIC, an IBC-CIIP, a variant of IBC-CIIP, an adaptive motion vector resolution (AMVR) for IBC, a variant of AMVR for IBC, a fractional BV, an IBC coding tool in which the reference block is overlapped with current block or a variant of IBC coding tool.
[0231] Clause 34. The method of clause 24, wherein the at least one of SATD or SSE that replaces SAD is used as the cost metric in the derivation or reordering.
[0232] Clause 35. The method of clause , wherein more than one cost metrics are used in the derivation or reordering.
[0233] Clause 36. The method of clause 35, wherein two or more cost metrics are used in the derivation or reordering.
[0234] Clause 37. The method of clause 36, wherein a joint cost is derived using SATD cost and SAD cost, or SSE cost and SAD cost, or SATD cost and SSE cost.
[0235] Clause 38. The method of clause 36, wherein signalled bits are evaluated in the derivation or reordering.
[0236] Clause 39. The method of clause 35, wherein different cost metrics are used in response to that more than one derivation or reordering is performed.
[0237] Clause 40. The method of clause 1, wherein whether to and / or how to calculate a template matching (TM) cost depends on the coding information.
[0238] Clause 41. The method of clause 40, wherein the coding information comprises at least one of: one or more reconstructed samples of the template, or one or more predicted samples of the template.
[0239] Clause 42. The method of clause 40, wherein a difference between one or more reconstructed samples and their predicted samples is adjusted before calculating the TM cost, wherein the one or more reconstructed samples are coded by a target prediction mode.
[0240] Clause 43. The method of clause 42, wherein the target prediction mode comprises at least one of: an Intra mode, an IBC mode, a Palette mode, or an Inter mode.
[0241] Clause 44. The method of clause 42, wherein if the TM cost is used for a first prediction mode, the target prediction mode comprises a second prediction mode, and the first prediction mode is different from the second prediction mode.
[0242] Clause 45. The method of clause 42, wherein the difference between the one or more reconstructed samples and their predicted samples is adjusted.
[0243] Clause 46. The method of clause 45, wherein Di = Di *S, wherein Di represents the differenced and S is smaller than or equal to 1.
[0244] Clause 47. The method of clause 46, wherein S = 0 or S = 0.5.
[0245] Clause 48. The method of any of clauses 40-47, wherein the video unit is applied with a certain coding tool.
[0246] Clause 49. The method of clause 48, wherein the certain coding tool comprises at least one of: a combined inter intra prediction (CIIP) mode, a variant of CIIP, a BCW, a variant of BCW, merge mode with motion vector difference (MMVD) , a variant of MMVD, a template matching (TM) based reordering for MMVD, a variant of TM based reordering for MMVD, a TM, a variant of TM, an affine mode, a variant of affine mode, a decoder side motion vector refinement (DMVR) , a variant of DMVR, multi-pass DMVR, prediction refinement with optical flow (PROF) , a variant of PROF, a bi-directional optical flow (BDOF) , a variant of BDOF, sample based BDOF, an adaptive decoder-side motion vector refinement (ADMVR) , a variant of ADMVR, an OBMC, a variant of OBMC, a TM based OBMC, a multi hypothesis prediction (MHP) , a variant of MHP, a geometric partitioning mode (GPM) , a variant of GPM, a bilateral matching (BM) AMVP-merge mode, a variant of BM AMVP-merge mode, a template matching (TM) AMVP-merge mode, a variant of TM AMVP-merge mode, an Inter-cross component prediction (CCP) merge, a variant of Inter-CCP merge, a reference picture reordering, or a variant of reference picture reordering.
[0247] Clause 50. The method of clause 1, wherein a Lagrangian parameter λ used in ARMC depends on one or more cost metrics used for ARMC.
[0248] Clause 51. The method of clause 50, wherein λ1 is used if a first cost metric is used in ARMC, and λ2 is used if a second cost metric is used in ARMC, wherein λ1 is not equal to λ2.
[0249] Clause 52. The method of clause 51, wherein the first cost metric comprises at least one of: SAD, SATD, mean of residual (MR) -SAD, MR-SATD, SSE, or MR-SSE.
[0250] Clause 53. The method of clause 51, wherein the second cost metric comprises at least one of: SAD, SATD, MR-SAD, MR-SATD, SSE, or MR-SSE.
[0251] Clause 54. The method of clause 51, wherein at least one of: λ1 or λ2 is signaled, or wherein at least one of: λ1 or λ2 is derived.
[0252] Clause 55. The method of clause 54, wherein λ2 is derived using λ1.
[0253] Clause 56. The method of clause 55, wherein λ1 is used for SAD, λ2 is used for SATD, and λ2 = a *λ1.
[0254] Clause 57. The method of clause 1, wherein a calculation of SATD cost which is used in a derivation or reordering for coding information is different from a calculation of SATD cost that is used in encoder.
[0255] Clause 58. The method of clause 57, wherein a mean-scaled SATD is not used.
[0256] Clause 59. The method of clause 57, wherein a mean-scaled SATD is used based on a condition.
[0257] Clause 60. The method of clause 57, wherein a weight used in a mean-scaled SATD is different.
[0258] Clause 61. The method of clause 60, wherein the weight depends on coding information.
[0259] Clause 62. The method of clause 1, wherein whether to and / or how to use a specific cost metric in a reordering depends on coding information, wherein the coding information is not a merge index.
[0260] Clause 63. The method of clause 62, wherein the coding information comprises at least one of: block dimensions, block size, block depth, slice type, picture type, partition tree type, temporal layer identification, block location, colour format, colour component, or video content.
[0261] Clause 64. The method of clause 63, wherein the video content comprises camera-captured video or screen content video.
[0262] Clause 65. The method of any of clauses 64, wherein the video unit comprises at least one of the following: a color component, a sub-picture, a slice, a tile, a coding tree unit (CTU) , a CTU row, a group of CTU, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree block (CTB) , a coding block (CB) , a prediction block (PB) , a transform block (TB) , a block, a sub-block of a block, a sub-region within a block, a region containing more than one sample or pixel.
[0263] Clause 66. The method of any of clauses 1-65, wherein an indication of whether to and / or how to determine the SATD cost for the one-dimensional array associated with the video unit is indicated at one of the following: sequence level, group of pictures level, picture level, slice level, or tile group level.
[0264] Clause 67. The method of any of clauses 1-65, wherein an indication of whether to and / or how to determine the SATD cost for the one-dimensional array associated with the video unit is used is indicated in one of the followings: a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a decoding parameter set (DPS) , decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter set (APS) , a slice header, or a tile group header.
[0265] Clause 68. The method of any of clauses 1-65, wherein whether to and / or how to determine the SATD cost for the one-dimensional array associated with the video unit depends on at least one of the following information: a message signalled in one of: a DPS, a SPS, a VPS, a PPS, an APS, a picture header, a slice header, a tile group header, a coding tree unit (CTU) , a coding unit (CU) , a CTU row, a group of CTUs, a TU, a PU block, or a video coding unit, a position of a CU, a position of a PU, a position of a TU, a position of a block, a position of a video coding unit, a block dimension of a current block, a block dimension of a neighbouring block of the current block, a block shape of a current block, a block shape of a neighbouring block of the current block, a coded mode of a block, an indication of a colour format, a coding tree structure, a slice group type, a tile group type, a picture type, a colour component, a temporal layer identification, a profile of a standard, a level of a standard, or a tier of a standard.
[0266] Clause 69. The method of clause 68, wherein the coded mode of the block comprises at least one of: an intra block copy (IBC) inter mode, a non-IBC inter mode, or a non-IBC subblock mode.
[0267] Clause 70. The method of clause 68, wherein the indication of the color format comprises 4: 2: 0 or 4: 4: 4.
[0268] Clause 71. The method of clause 68, wherein the color component is applied on one of: a chroma component or a luma component.
[0269] Clause 72. The method of any of clauses 1-71, wherein the conversion includes encoding the video unit into the bitstream.
[0270] Clause 73. The method of any of clauses 1-71, wherein the conversion includes decoding the video unit from the bitstream.
[0271] Clause 74. 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-73.
[0272] Clause 75. A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of clauses 1-73.
[0273] Clause 76. 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 transformed sum of absolute difference (SATD) cost for a one-dimensional array or block with one-dimension array associated with the video unit; determining coding information of the video unit based on the SATD cost; and generating the bitstream based on the coding information.
[0274] Clause 77. A method for storing a bitstream of a video, comprising: determining a transformed sum of absolute difference (SATD) cost for a one-dimensional array or block with one-dimension array associated with the video unit; determining coding information of the video unit based on the SATD cost; generating the bitstream based on the coding information; and storing the bitstream in a non-transitory computer-readable recording medium. Example Device
[0275] Fig. 21 illustrates a block diagram of a computing device 2100 in which various embodiments of the present disclosure can be implemented. The computing device 2100 may be implemented as or included in the source device 110 (or the video encoder 114 or 200) or the destination device 120 (or the video decoder 124 or 300) .
[0276] It would be appreciated that the computing device 2100 shown in Fig. 21 is merely for purpose of illustration, without suggesting any limitation to the functions and scopes of the embodiments of the present disclosure in any manner.
[0277] As shown in Fig. 21, the computing device 2100 includes a general-purpose computing device 2100. The computing device 2100 may at least comprise one or more processors or processing units 2110, a memory 2120, a storage unit 2130, one or more communication units 2140, one or more input devices 2150, and one or more output devices 2160.
[0278] In some embodiments, the computing device 2100 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 2100 can support any type of interface to a user (such as “wearable” circuitry and the like) .
[0279] The processing unit 2110 may be a physical or virtual processor and can implement various processes based on programs stored in the memory 2120. 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 2100. The processing unit 2110 may also be referred to as a central processing unit (CPU) , a microprocessor, a controller or a microcontroller.
[0280] The computing device 2100 typically includes various computer storage medium. Such medium can be any medium accessible by the computing device 2100, including, but not limited to, volatile and non-volatile medium, or detachable and non-detachable medium. The memory 2120 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 2130 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 2100.
[0281] The computing device 2100 may further include additional detachable / non-detachable, volatile / non-volatile memory medium. Although not shown in Fig. 21, it is possible to provide a magnetic disk drive for reading from and / or writing into a detachable and non-volatile magnetic disk and an optical disk drive for reading from and / or writing into a detachable non-volatile optical disk. In such cases, each drive may be connected to a bus (not shown) via one or more data medium interfaces.
[0282] The communication unit 2140 communicates with a further computing device via the communication medium. In addition, the functions of the components in the computing device 2100 can be implemented by a single computing cluster or multiple computing machines that can communicate via communication connections. Therefore, the computing device 2100 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.
[0283] The input device 2150 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 2160 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 2140, the computing device 2100 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 2100, or any devices (such as a network card, a modem and the like) enabling the computing device 2100 to communicate with one or more other computing devices, if required. Such communication can be performed via input / output (I / O) interfaces (not shown) .
[0284] In some embodiments, instead of being integrated in a single device, some or all components of the computing device 2100 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.
[0285] The computing device 2100 may be used to implement video encoding / decoding in embodiments of the present disclosure. The memory 2120 may include one or more video coding modules 2125 having one or more program instructions. These modules are accessible and executable by the processing unit 2110 to perform the functionalities of the various embodiments described herein.
[0286] In the example embodiments of performing video encoding, the input device 2150 may receive video data as an input 2170 to be encoded. The video data may be processed, for example, by the video coding module 2125, to generate an encoded bitstream. The encoded bitstream may be provided via the output device 2160 as an output 2180.
[0287] In the example embodiments of performing video decoding, the input device 2150 may receive an encoded bitstream as the input 2170. The encoded bitstream may be processed, for example, by the video coding module 2125, to generate decoded video data. The decoded video data may be provided via the output device 2160 as the output 2180.
[0288] While this disclosure has been particularly shown and described with references to example 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.
Claims
A method of video processing, comprising:determining, for a conversion between a video unit of a video and a bitstream of the video, a transformed sum of absolute difference (SATD) cost for a one-dimensional array or block with one-dimension array associated with the video unit;determining coding information of the video unit based on the SATD cost; andperforming the conversion based on the coding information.The method of claim 1, wherein Hadamard transform is used for the one-dimensional array.The method of claim 2, wherein a horizontal transform is used for the one-dimensional array.The method of claim 2, wherein a vertical transform is used for the one-dimensional array.The method of claim 2, wherein the SATD cost is equal to a sum of absolute value of coefficients after transform.The method of claim 1, wherein one or more coefficients after transformed are adjusted.The method of claim 6, wherein one or more weights are applied to the one or more coefficients.The method of claim 1, wherein a mean-scaled SATD is used for the one-dimensional array.The method of claim 8, wherein a weight for an absolute value of direct current coefficient used in the mean-scaled SATD depends on coding information.The method of claim 8, wherein the weight for the absolute value of direct current (DC) coefficient used in the mean-scaled SATD is predefined, orwherein the weight for the absolute value of direct current coefficient used in the mean-scaled SATD is derived, orwherein the weight for the absolute value of direct current coefficient used in the mean-scaled SATD is signaled.The method of claim 1, wherein the SATD cost is adjusted using a factor.The method of claim 11, wherein the factor depends on the number of elements in the one-dimensional array.The method of claim 11, wherein C’=C / S, wherein C’ represents the adjusted SATD cost, C represents the SATD cost and S represents the factor.The method of claim 11, wherein C’=C+S or C’=C-S, wherein C’ represents the adjusted SATD cost, C represents the SATD cost and S represents the factor.The method of claim 11, wherein S = sqrt (M) *2, wherein sqrt () denotes square root function, S represents the factor and M represents the number of elements in the one-dimensional array.The method of claim 1, wherein the number of elements in the one-dimensional array is equal to one of: 2, 4, 8, 16, 32, 64, 128 or 256.The method of claim 1, wherein the number of elements in the one-dimensional array being less than 4 is disallowed.The method of claim 1, wherein the SATD cost for the one-dimensional array is calculated using a sum of SATD cost for another one-dimensional array, wherein the number of elements in the one-dimensional array is larger than the number of elements in the other one-dimensional array.The method of claim 18, wherein M= n*H, wherein M represents the number of elements in the one-dimensional array and H represents the number of elements in the other one-dimensional array, n is an integer larger than 1.The method of claim 19, wherein H = 8, M = 16, or 32, or 64, or 128, or 256, orwherein H = 16, M = 32, or 64, or 128, or 256, orwherein H = 32, M = 64, or 128, or 256.The method of claim 1, wherein a Hadamard transform for the one-dimensional array is used to determine a SATD cost for two-dimensional array.The method of claim 21, wherein for a block with M*H, H one-dimensional M*1 Hadamard transform is used.The method of claim 21, wherein for a block with M*H, M one-dimensional 1*H Hadamard transform is used.The method of claim 1, wherein at least one of SATD or sum of square error (SSE) is used as cost metric in a derivation or reordering for coding information for a coding tool.The method of claim 24, wherein the coding tool comprises an intra coding tool.The method of claim 25, wherein the coding information comprises at least one of:conventional intra prediction mode,an extrapolation filter-based intra prediction (EIP) mode,an EIP filter type for deriving filter coefficients,a type of reconstructed area for deriving filter coefficients,a matrix weighted intra prediction (MIP) mode,an MIP transposed flag,a chroma prediction mode,a cross-component prediction (CCP) mode for chroma,a non-CCP mode for chroma,a spatial geometric partitioning mode (SGPM) index,coding information for decoder-side intra mode derivation (DIMD) ,coding information for template-based intra mode derivation (TIMD) , orintra template matching prediction (IntraTMP) block vector (BV) .The method of claim 25, wherein the coding tool comprise at least one of:a conventional intra prediction,a variant of conventional intra prediction,a decoder-side intra mode derivation (DIMD) ,a variant of DIMD,a DIMD merge,a variant of DIMD merge,a template-based intra mode derivation (TIMD) ,a variant of TIMD,a TIMD merge,a variant of TIMD merge,a multiple reference line (MRL) ,a variant of MRL,an intra sub-partition (ISP) ,a variant of ISP,a matrix weighted intra prediction (MIP) ,a variant of MIP,an Intra template matching prediction (IntraTMP) ,a variant of IntraTMP,a SGPM,a variant of SGPM,chroma fusion,a variant of chroma fusion,a cross-component linear model (CCLM) ,a variant of CCLM,a multi-model CCLM (MMLM) ,a variant of MMLM,a convolutional cross-component model (CCCM) ,a variant of CCCM,a gradient linear model (GLM) ,a variant of GLM,a cross-component prediction (CCP) merge,a variant of CCP merge,intra prediction fusion,a variant of intra prediction fusion,a template-based multiple reference line intra prediction (TMRL) ,a variant of TMRL,a position dependent intra prediction combination (PDPC) ,a variant of PDPC,a gradient PDPC,a variant of gradient PDPC,an EIP,a variant of EIP,an intra merge mode, ora variant of intra merge mode.The method of claim 24, wherein the coding tool comprises an inter coding tool.The method of claim 28, wherein the coding information comprises at least one of:merge candidate,an advanced motion vector Prediction (AMVP) index,a bi-prediction with coding unit (CU) -level weight (BCW) index,weights for overlapped block motion compensation (OBMC) ,reference picture index,local illumination compensation (LIC) flag,LIC parameters, ormotion vector difference (MVD) offset or candidate.The method of claim 28, wherein the coding tool comprises at least one of:a combined inter intra prediction (CIIP) mode,a variant of CIIP,a BCW,a variant of BCW,merge mode with motion vector difference (MMVD) ,a variant of MMVD,a template matching (TM) based reordering for MMVD,a variant of TM based reordering for MMVD,a TM,a variant of TM,an affine mode,a variant of affine mode,a decoder side motion vector refinement (DMVR) ,a variant of DMVR,multi-pass DMVR,prediction refinement with optical flow (PROF) ,a variant of PROF,a bi-directional optical flow (BDOF) ,a variant of BDOF,sample based BDOF,an adaptive decoder-side motion vector refinement (ADMVR) ,a variant of ADMVR,an OBMC,a variant of OBMC,a TM based OBMC,a multi hypothesis prediction (MHP) ,a variant of MHP,a geometric partitioning mode (GPM) ,a variant of GPM,a bilateral matching (BM) AMVP-merge mode,a variant of BM AMVP-merge mode,a template matching (TM) AMVP-merge mode,a variant of TM AMVP-merge mode,an Inter-cross component prediction (CCP) merge,a variant of Inter-CCP merge,a reference picture reordering, ora variant of reference picture reordering.The method of claim 28, wherein the coding tool comprises intra block copy (IBC) coding tool.The method of claim 31, wherein the coding information comprises at least one of:an IBC merge candidate,an IBC AMVP index,a block vector difference, ora block vector offset.The method of claim 31, wherein the coding tool comprises at least one of:an IBC AMVP mode,a variant of IBC AMVP,an IBC merge mode,a variant of IBC merge,an IBC-TM mode,a variant of IBC-TM,an IBC merge mode with block vector differences (IBC-MBVD) ,a variant of IBC-MBVD,a reconstruction reordered (RR) -IBC mode,a variant of RR-IBC,an IBC-LIC,a variant of IBC-LIC,an IBC-CIIP,a variant of IBC-CIIP,an adaptive motion vector resolution (AMVR) for IBC,a variant of AMVR for IBC,a fractional BV,an IBC coding tool in which the reference block is overlapped with current block ora variant of IBC coding tool.The method of claim 24, wherein the at least one of SATD or SSE that replaces SAD is used as the cost metric in the derivation or reordering.The method of claim , wherein more than one cost metrics are used in the derivation or reordering.The method of claim 35, wherein two or more cost metrics are used in the derivation or reordering.The method of claim 36, wherein a joint cost is derived using SATD cost and SAD cost, or SSE cost and SAD cost, or SATD cost and SSE cost.The method of claim 36, wherein signalled bits are evaluated in the derivation or reordering.The method of claim 35, wherein different cost metrics are used in response to that more than one derivation or reordering is performed.The method of claim 1, wherein whether to and / or how to calculate a template matching (TM) cost depends on the coding information.The method of claim 40, wherein the coding information comprises at least one of:one or more reconstructed samples of the template, orone or more predicted samples of the template.The method of claim 40, wherein a difference between one or more reconstructed samples and their predicted samples is adjusted before calculating the TM cost, wherein the one or more reconstructed samples are coded by a target prediction mode.The method of claim 42, wherein the target prediction mode comprises at least one of:an Intra mode,an IBC mode,a Palette mode, oran Inter mode.The method of claim 42, wherein if the TM cost is used for a first prediction mode, the target prediction mode comprises a second prediction mode, and the first prediction mode is different from the second prediction mode.The method of claim 42, wherein the difference between the one or more reconstructed samples and their predicted samples is adjusted.The method of claim 45, wherein Di = Di *S,wherein Di represents the differenced and S is smaller than or equal to 1.The method of claim 46, wherein S = 0 or S = 0.5.The method of any of claims 40-47, wherein the video unit is applied with a certain coding tool.The method of claim 48, wherein the certain coding tool comprises at least one of:a combined inter intra prediction (CIIP) mode,a variant of CIIP,a BCW,a variant of BCW,merge mode with motion vector difference (MMVD) ,a variant of MMVD,a template matching (TM) based reordering for MMVD,a variant of TM based reordering for MMVD,a TM,a variant of TM,an affine mode,a variant of affine mode,a decoder side motion vector refinement (DMVR) ,a variant of DMVR,multi-pass DMVR,prediction refinement with optical flow (PROF) ,a variant of PROF,a bi-directional optical flow (BDOF) ,a variant of BDOF,sample based BDOF,an adaptive decoder-side motion vector refinement (ADMVR) ,a variant of ADMVR,an OBMC,a variant of OBMC,a TM based OBMC,a multi hypothesis prediction (MHP) ,a variant of MHP,a geometric partitioning mode (GPM) ,a variant of GPM,a bilateral matching (BM) AMVP-merge mode,a variant of BM AMVP-merge mode,a template matching (TM) AMVP-merge mode,a variant of TM AMVP-merge mode,an Inter-cross component prediction (CCP) merge,a variant of Inter-CCP merge,a reference picture reordering, ora variant of reference picture reordering.The method of claim 1, wherein a Lagrangian parameter λ used in ARMC depends on one or more cost metrics used for ARMC.The method of claim 50, wherein λ1 is used if a first cost metric is used in ARMC, and λ2 is used if a second cost metric is used in ARMC, wherein λ1 is not equal to λ2.The method of claim 51, wherein the first cost metric comprises at least one of:SAD,SATD,mean of residual (MR) -SAD,MR-SATD,SSE, orMR-SSE.The method of claim 51, wherein the second cost metric comprises at least one of:SAD,SATD,MR-SAD,MR-SATD,SSE, orMR-SSE.The method of claim 51, wherein at least one of: λ1 or λ2 is signaled, orwherein at least one of: λ1 or λ2 is derived.The method of claim 54, wherein λ2 is derived using λ1.The method of claim 55, wherein λ1 is used for SAD, λ2 is used for SATD, and λ2 = a *λ1.The method of claim 1, wherein a calculation of SATD cost which is used in a derivation or reordering for coding information is different from a calculation of SATD cost that is used in encoder.The method of claim 57, wherein a mean-scaled SATD is not used.The method of claim 57, wherein a mean-scaled SATD is used based on a condition.The method of claim 57, wherein a weight used in a mean-scaled SATD is different.The method of claim 60, wherein the weight depends on coding information.The method of claim 1, wherein whether to and / or how to use a specific cost metric in a reordering depends on coding information, wherein the coding information is not a merge index.The method of claim 62, wherein the coding information comprises at least one of:block dimensions,block size,block depth,slice type,picture type,partition tree type,temporal layer identification,block location,colour format,colour component, orvideo content.The method of claim 63, wherein the video content comprises camera-captured video or screen content video.The method of any of claims 64, wherein the video unit comprises at least one of the following:a color component,a sub-picture,a slice,a tile,a coding tree unit (CTU) ,a CTU row,a group of CTU,a coding unit (CU) ,a prediction unit (PU) ,a transform unit (TU) ,a coding tree block (CTB) ,a coding block (CB) ,a prediction block (PB) ,a transform block (TB) ,a block,a sub-block of a block,a sub-region within a block,a region containing more than one sample or pixel.The method of any of claims 1-65, wherein an indication of whether to and / or how to determine the SATD cost for the one-dimensional array associated with the video unit is indicated at one of the following:sequence level,group of pictures level,picture level,slice level, ortile group level.The method of any of claims 1-65, wherein an indication of whether to and / or how to determine the SATD cost for the one-dimensional array associated with the video unit is used is indicated in one of the followings:a sequence header,a picture header,a sequence parameter set (SPS) ,a video parameter set (VPS) ,a decoding parameter set (DPS) ,decoding capability information (DCI) ,a picture parameter set (PPS) ,an adaptation parameter set (APS) ,a slice header, ora tile group header.The method of any of claims 1-65, wherein whether to and / or how to determine the SATD cost for the one-dimensional array associated with the video unit depends on at least one of the following information:a message signalled in one of: a DPS, a SPS, a VPS, a PPS, an APS, a picture header, a slice header, a tile group header, a coding tree unit (CTU) , a coding unit (CU) , a CTU row, a group of CTUs, a TU, a PU block, or a video coding unit,a position of a CU,a position of a PU,a position of a TU,a position of a block,a position of a video coding unit,a block dimension of a current block,a block dimension of a neighbouring block of the current block,a block shape of a current block,a block shape of a neighbouring block of the current block,a coded mode of a block,an indication of a colour format,a coding tree structure,a slice group type,a tile group type,a picture type,a colour component,a temporal layer identification,a profile of a standard,a level of a standard, ora tier of a standard.The method of claim 68, wherein the coded mode of the block comprises at least one of: an intra block copy (IBC) inter mode, a non-IBC inter mode, or a non-IBC subblock mode.The method of claim 68, wherein the indication of the color format comprises 4: 2: 0 or 4: 4: 4.The method of claim 68, wherein the color component is applied on one of: a chroma component or a luma component.The method of any of claims 1-71, wherein the conversion includes encoding the video unit into the bitstream.The method of any of claims 1-71, wherein the conversion includes decoding the video unit from the bitstream.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 claims 1-73.A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of claims 1-73.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 transformed sum of absolute difference (SATD) cost for a one-dimensional array or block with one-dimension array associated with a video unit of the video;determining coding information of the video unit based on the SATD cost; andgenerating the bitstream based on the coding information.A method for storing a bitstream of a video, comprising:determining a transformed sum of absolute difference (SATD) cost for a one-dimensional array or block with one-dimension array associated with a video unit of the video;determining coding information of the video unit based on the SATD cost;generating the bitstream based on the coding information; andstoring the bitstream in a non-transitory computer-readable recording medium.
Citation Information
Patent Citations
Video encoding with fast motion estimation
EP1684525A2
Method for fast SATD estimation
US20070198622A1
Method and Apparatus for Motion Estimation in a Video Encoder
US20080025395A1
Method and apparatus for motion vector refinement
US20200404284A1