Weighted Sample Bidirectional Prediction in Video Coding and Decoding
By determining the prediction mode of the co-unit video block and using asymmetric weight table for weighted sample point prediction, the problems of co-unit motion vector derivation dependence and cropping accuracy in inter-prediction are solved, and more efficient video encoding and decoding are achieved.
Patent Information
- Application Number
- CN202080064505.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-09-13
- Filing Date
- 2020-09-11
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2040-09-11
AI Technical Summary
In the existing video codec technology, there are problems in deriving the juxtaposed motion vectors in inter prediction. For example, the deriving the juxtaposed motion vectors in TMVP and SbTMVP depends on the prediction mode of the codec block, resulting in the palette codec not being used during the palette codec. Defined motion vector; low prediction efficiency of weighted sample points in BCW; Merge motion vectors have poor cropping accuracy loss; and large overhead for cu_skip_flag signaling notification.
By determining the prediction mode of the co-unit video block, the availability and mode of the co-unit motion vector are derived; weighted sample point prediction is performed using an asymmetric weight table in BCW; cropping the Merge motion vector difference to the same range as the motion vector; and conditions Signaling to cu_skip_flag to reduce overhead.
Improve the efficiency and accuracy of video encoding and decoding, reduce the complexity of encoding and decoding, and reduce the overhead of signaling notification.
Smart Images

Figure CN114402610B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is an application entering the Chinese national phase of international patent application PCT / CN2020 / 114761 filed on September 11, 2020, which claims priority to international patent application No. PCT / CN2019 / 105825 filed on September 13, 2019. The entire disclosure of the above application is incorporated by reference as part of the disclosure of this application. Technical Field
[0003] This application document relates to video and image encoding and decoding technology. Background Art
[0004] Digital video accounts for the largest use of bandwidth on the Internet and other digital communications networks. As the number of connected user devices capable of receiving and displaying video increases, bandwidth demand for digital video usage is expected to continue to grow. Summary of the invention
[0005] Devices, systems and methods related to digital video processing are described, and in particular, devices, systems and methods related to juxtaposing motion vectors in video processing. The described methods can be applied to existing video codec standards (e.g., High Efficiency Video Codec (HEVC)) and future video codec standards (e.g., Versatile Video Codec (VVC)) or codecs.
[0006] In one exemplary aspect, a video processing method is disclosed. The method includes: making a first determination regarding whether a collocated video block of a video block of a video is coded using an inter-coding mode or a non-inter-coding mode; making a second determination based on the first determination regarding the availability of a motion vector for the collocated video block or a mode for deriving a motion vector for the collocated video block; and performing a conversion between the video block and a coded representation of the video based on the second determination.
[0007] In another exemplary aspect, a video processing method is disclosed. The method includes: for conversion between a video block of a video and a codec representation of the video, determining one or more collocated motion vectors based on a reference index or reference list of a collocated video block of the video block; and performing the conversion based on the determination.
[0008] In another exemplary aspect, a video processing method is disclosed. The method includes: for a conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional codec unit-level weighting (BCW) tool, wherein a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; and performing a conversion using the prediction block, wherein deriving the prediction block includes: applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive a final prediction sample; and performing a right shift operation on the final prediction sample to convert the bit depth of the final prediction sample, wherein the right shift operation is pbSample>>(shift1+3)), wherein pbSample represents the final prediction sample, and shift1 is set equal to Max(2,14-bitDepth); and determining a prediction block based on the final prediction sample.
[0009] In another exemplary aspect, a video processing method is disclosed. The method includes: for a conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional coding unit level weighting (BCW) tool, wherein a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; and performing the conversion using the prediction block, wherein deriving the prediction block includes: applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive a final prediction sample; and adding an offset to the final prediction sample, wherein the offset is 1<<(shift1+2), wherein shift1 is set equal to Max(2,14-bitDepth); and determining the prediction block based on the final prediction sample.
[0010] In yet another exemplary aspect, a video processing method is disclosed. The method includes: for a conversion between a current block of a video and a codec representation of the video, deriving a motion vector difference of a Merge mode motion vector prediction value of the current block according to a rule; and performing the conversion based on the derivation, wherein the rule specifies whether to clip the motion vector difference to a range that is the same as a range used to clip the motion vector.
[0011] In yet another exemplary aspect, a video processing method is disclosed. The method includes: for a conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional codec unit-level weighting (BCW) tool, wherein weights are used to determine a weighted sum of two initial prediction blocks used to determine the prediction block, wherein at least one of the weights belongs to a weight table, wherein the weight table is organized according to a rule; and performing the conversion using the prediction block, wherein the rule specifies that entries of the weight table are non-monotonically increasing.
[0012] In yet another exemplary aspect, a video processing method is disclosed. The method includes: for a conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional codec unit level weighting (BCW) tool, wherein weights are used to determine a weighted sum of two initial prediction blocks used to determine the prediction block, wherein at least one of the weights belongs to a weight table, and the weight table is selected from a plurality of weight tables; and performing the conversion using the prediction block.
[0013] In another exemplary aspect, a video processing method is disclosed. The method includes: for a conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional codec unit level weighting (BCW) tool, wherein a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; and performing the conversion using the prediction block, wherein deriving the prediction block includes: converting intermediate prediction samples to a first bit depth; applying the weight to the intermediate prediction samples to derive a final prediction sample; and converting the final prediction sample to a second bit depth.
[0014] In yet another exemplary aspect, a video processing method is disclosed. The method includes: for a conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional codec unit level weighting (BCW) tool, wherein a first weight and a second weight are used to determine a weighted sum of two initial prediction blocks used to determine the prediction block, wherein at least one of the first weight and the second weight is included in a weight table, wherein the weight table is organized according to a rule; and performing the conversion using the prediction block, wherein the rule specifies that the weight table is asymmetric.
[0015] In yet another example aspect, the above method may be implemented by a video encoder apparatus comprising a processor.
[0016] In yet another example aspect, the methods may be embodied in the form of processor-executable instructions and stored on a computer-readable program medium.
[0017] These and other aspects are described further throughout this document. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A block diagram of an example encoder is shown.
[0019] Figure 2 Examples of 67 intra prediction modes are shown.
[0020] Figure 3 Examples of horizontal and vertical traversal scans are shown.
[0021] Figure 4 An example of motion vector scaling for temporal merge candidates is shown.
[0022] Figure 5 The candidate positions of the time domain Merge candidates are shown.
[0023] Fig. 6A An example of spatial neighboring blocks used by optional temporal motion vector prediction (ATMVP) is shown.
[0024] Figure 6B An example of deriving a sub-CU motion field is shown.
[0025] Figure 7 An example of a search point using the Merge Motion Vector Difference (MMVD) mode is shown.
[0026] Figure 8 is an example flow chart of a video processing method.
[0027] Fig. 9 is another example flow chart of a video processing method.
[0028] Fig.10 is another example flow chart of a video processing method.
[0029] Fig.11 is another example flow chart of a video processing method.
[0030] Fig.12 is another example flow chart of a video processing method.
[0031] Fig.13 is another example flow chart of a video processing method.
[0032] Fig.14A and Fig. 14B is an example block diagram of a hardware platform for implementing the visual media decoding or visual media encoding technology described in this application document.
[0033] Figure 15A-15E is a flowchart of an example method of video processing based on some embodiments of the disclosed technology. DETAILED DESCRIPTION
[0034] The present application document provides various techniques that can be used by a decoder of an image or video bitstream to improve the quality of a decompressed or decoded digital video or image. For the sake of brevity, the term "video" is used herein to include both a sequence of pictures (traditionally referred to as video) and a single image. In addition, a video encoder can also implement these techniques during the encoding process to reconstruct a decoded frame for further encoding.
[0035] The section headings are used in this application document to facilitate understanding, and do not limit the embodiments and techniques to the corresponding sections. Thus, the embodiments from one section can be combined with the embodiments of other sections.
[0036] 1. Summary
[0037] This application document relates to video coding technology. Specifically, it is related to juxtaposition of motion vectors and other coding tools. It can be applied to existing video coding standards, such as HEVC, and can also be applied to a pending standard (multi-function video codec). It may also be applicable to future video coding standards or video codecs.
[0038] 2. Preliminary Discussion
[0039] Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T developed H.261 and H.263, ISO / IEC developed MPEG-1 and MPEG-4 Vision, and the two organizations jointly developed the H.262 / MPEG-2 Video, H.264 / MPEG-4 Advanced Video Coding (AVC), and H.265 / HEVC standards. Since H.262, video codec standards have been based on a hybrid video codec structure that uses temporal prediction plus transform codecs. In order to explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, JVET has adopted many new methods and introduced them into reference software called the Joint Exploration Model (JEM). In April 2018, a Joint Video Experts Team (JVET) between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) was established to work on the VVC standard targeting a 50% bitrate reduction compared to HEVC.
[0040] 2.1 Color Space and Chroma Subsampling
[0041] A color space, also called a color model (or color system), is an abstract mathematical model that simply describes the range of colors as a tuple of numbers, usually 3 or 4 values or color components (e.g., RGB). Basically, a color space is a refinement of a coordinate system and subspaces.
[0042] For video compression, the most commonly used color spaces are YCbCr and RGB.
[0043] YCbCr, Y′CbCr or Y Pb / Cb Pr / Cr (also written as YCBCR or Y'CBCR) is a family of color spaces used as part of the color image pipeline in video and digital photography systems. Y′ is the luminance component, CB and CR are the blue-difference and red-difference chrominance components. Y′ (with prime) is different from Y, which is luminance, meaning that the light intensity is non-linearly encoded based on the gamma-corrected RGB primaries.
[0044] Chroma subsampling is the practice of encoding an image at a lower resolution for chroma information than for luminance information, taking advantage of the fact that the human visual system is less sensitive to color differences than to brightness. 2.1.1 4:4:4
[0046] Each of the three Y'CbCr components has the same sampling rate, so there is no chroma subsampling. This scheme is sometimes used in high-end film scanners and film post-production. 2.1.2 4:2:2
[0048] The two chroma components are sampled at half the rate of luma: the horizontal chroma resolution is halved. This reduces the bandwidth of the uncompressed video signal by one-third with little visual difference. 2.1.3 4:2:0
[0050] In 4:2:0, the horizontal sampling is doubled compared to 4:1:1, but the vertical resolution is reduced by half because the Cb and Cr channels are only sampled on every alternate line in this scheme. Therefore, the data rate is the same. Cb and Cr are subsampled by a factor of 2 in both horizontal and vertical directions. There are three variants of the 4:2:0 scheme with different horizontal and vertical sites.
[0051] In MPEG-2, Cb and Cr are co-located horizontally. Cb and Cr are placed between pixels in the vertical direction (interval location).
[0052] In JPEG / JFIF, H.261, and MPEG-1, Cb and Cr are intermittently located, between alternating luminance samples.
[0053] In 4:2:0 DV, Cb and Cr are co-located in the horizontal direction. In the vertical direction, they are co-located on alternating lines.
[0054] 2.2 Encoding and decoding process of typical video codecs
[0055] Figure 1An example of an encoder block diagram of VVC is shown, which contains three loop filter blocks: deblocking filter (DF), sample adaptive offset (SAO) and ALF. Unlike DF, which uses a predefined filter, SAO and ALF use the original samples of the current picture to reduce the mean square error between the original samples and the reconstructed samples by adding an offset and applying a finite impulse response (FIR) filter, respectively, while the codec side information signals the offset and filter coefficients. ALF is located at the last processing stage of each picture and can be seen as a tool that attempts to capture and repair artifacts created by previous stages.
[0056] 2.3 Intra-mode codec with 67 intra-prediction modes
[0057] To capture arbitrary edge directions that occur in natural videos, the number of directional intra modes is extended from 33 used in HEVC to 65. Figure 2 The additional directional modes are depicted with red dashed arrows in , and the planar and DC modes remain unchanged. These more dense directional intra prediction modes apply to intra prediction for all block sizes and for both luma and chroma.
[0058] like Figure 2 As shown, the normal angle intra prediction direction is defined from 45 degrees to -135 degrees in the clockwise direction. In VTM6, some normal angle intra prediction modes are adaptively replaced with wide angle intra prediction modes for non-square blocks. The replaced modes are signaled using the original method and remapped to the index of the wide angle mode after parsing. The total number of intra prediction modes remains unchanged, i.e. 67, and the intra mode encoding and decoding remains unchanged.
[0059] In HEVC, each intra-coded block has a square shape, and the length of each side is a power of 2. Therefore, no division operation is required to generate intra prediction values using DC mode. In VVC, blocks can have a rectangular shape, which usually requires the use of division operations for each block. To avoid division operations for DC prediction, only the longer side is used to calculate the average value for non-square blocks.
[0060] 2.4 Inter-frame prediction
[0061] For each inter-frame predicted CU, the motion parameters include motion vector, reference picture index and reference picture list usage index, as well as additional information required for the new coding features of VVC for generating inter-frame prediction samples. Motion parameters can be signaled explicitly or implicitly. When a CU is encoded and decoded using skip mode, the CU is associated with one PU and has no significant residual coefficients, no encoded motion vector increments or reference picture indexes. A Merge mode is specified, in which the motion parameters of the current CU are obtained from neighboring CUs, including spatial and temporal candidates, and additional scheduling introduced in VVC. Merge mode can be applied to any intra-frame predicted CU, not just skip mode. An alternative to Merge mode is explicit transmission of motion parameters, in which for each CU, the motion vector, the corresponding reference picture index and reference picture list usage flag for each reference picture list and other required information are explicitly signaled.
[0062] 2.5 Intra-block copy (IBC)
[0063] Intra-block copying (IBC) is a tool adopted in the HEVC extension on SCC. As we all know, it significantly improves the coding efficiency of screen content materials. Since the IBC mode is implemented as a block-level coding mode, block matching (BM) is performed at the encoder to find the best block vector (or motion vector) for each CU. Here, the block vector is used to indicate the displacement from the current block to the reference block, which has been reconstructed within the current picture. The luminance block vector of the CU encoded and decoded by IBC is integer precision. The chrominance block vector is also rounded to integer precision. When combined with AMVR, the IBC mode is able to switch between 1 pixel and 4 pixel motion vector precision. The CU encoded and decoded by IBC is regarded as a third prediction mode in addition to the intra or inter prediction mode. The IBC mode is applicable to CUs with a width and height that are less than or equal to 64 luminance samples.
[0064] On the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD checks on blocks with a width or height no greater than 16 luma samples. For non-Merge mode, a block vector search is first performed using a hash-based search. If the hash search does not return a valid candidate, a local search based on block matching is performed.
[0065] In hash-based search, the hash key match (32-bit CRC) between the current block and the reference block is extended to all allowed block sizes. The hash key calculation for each position in the current picture is based on a 4×4 sub-block. For a current block of larger size, a hash key is determined to match the hash key of a reference block when all hash keys of all 4×4 sub-blocks match the hash keys in the corresponding reference positions. If multiple reference blocks are found to match the hash key of the current block, the block vector cost of each matching reference block is calculated and the one with the smallest cost is selected.
[0066] In the block matching search, the search range is set to cover both the previous and current CTUs.
[0067] At the CU level, the IBC mode is signaled with a flag, and can be signaled as IBC AMVP mode or IBC skip / merge mode as follows:
[0068] – IBC Skip / Merge mode: The Merge candidate index is used to indicate which block vectors from the list of neighboring candidate IBC codec blocks are used to predict the current block. The Merge list includes spatial, HMVP, and pairwise candidates.
[0069] – IBC AMVP mode: Block vector differences are encoded and decoded in the same way as motion vector differences. The block vector prediction method uses two candidates as predictors, one from the left neighbor and the other from the top neighbor (if IBC encoding). When one of the neighbors is not available, the default block vector is used as the predictor. A flag is signaled to indicate the block vector predictor index.
[0070] 2.6 Palette Mode
[0071] For palette mode signaling, the palette mode is encoded and decoded as the prediction mode for the codec unit, that is, the prediction mode for the codec unit can be MODE_INTRA, MODE_INTER, MODE_IBC and MODE_PLT. If the palette mode is used, the pixel values in the CU are represented by a small set of representative color values. This set is represented as a palette. For pixels with values close to the palette color, the palette index is signaled. For pixels with values outside the palette, the pixel is represented with an escape symbol and the quantized pixel value is signaled directly.
[0072] To decode a palette coded block, the decoder needs to decode the palette colors and indices. The palette colors are described by a palette table and encoded by the palette table codec. The escape flag is signaled for each CU to indicate whether an escape symbol is present in the current CU. If an escape symbol is present, a palette table is added and the last index is assigned to the escape mode. The palette indices of all pixels in the CU form a palette index map and are encoded by the palette index map codec.
[0073] In order to encode and decode the palette table, the palette prediction value is maintained. The prediction value is initialized at the beginning of each stripe where the prediction value is reset to 0. For each entry in the palette prediction value, the reuse flag is signaled to indicate whether it is part of the current palette. The reuse flag is sent using zero run length encoding and decoding. After that, the number of new palette entries is signaled using an exponential Golomb code of order 0. Finally, the component values of the new palette entries are signaled. After encoding the current CU, the palette prediction value will be updated with the current palette, and the entries in the previous palette prediction value that are not reused in the current palette will be added to the end of the new palette prediction value until the maximum allowed size is reached (palette filling).
[0074] To encode and decode the palette index map, use Figure 3 The palette_transpose_flag is used to explicitly signal the scan order in the bitstream.
[0075] The palette index is encoded and decoded using two main palette sample modes: "INDEX" and "COPY_ABOVE". The mode is signaled using a flag when using anything other than the first row when horizontal scanning is used or the first column when vertical scanning is used, or when the previous mode was "COPY_ABOVE". In "COPY_ABOVE" mode, the palette index of the samples in the previous row is copied. In "INDEX" mode, the palette index is signaled explicitly. For both "INDEX" and "COPY_ABOVE" modes, a running value is signaled that specifies the number of pixels encoded and decoded using the same mode.
[0076] The encoding order of the index mapping is as follows: First, the number of index values for the CU is signaled. After this, the actual index value for the entire CU is signaled using truncated binary codec. Both the number of indices and the index values are encoded in bypass mode. This groups the bypass bins of the indexes. Then, the palette mode (INDEX or COPY_ABOVE) and the run are signaled in an interleaved manner. Finally, the component escape values corresponding to the escape samples of the entire CU are grouped together and encoded and decoded in bypass mode. After signaling the index value, an additional syntax element last_run_type_flag is signaled. This syntax element, together with the number of indices, eliminates the need to signal the run value corresponding to the last run in the block.
[0077] In VTM5.0, dual tree is enabled for I slices, which distinguishes the codec unit partitioning for luma and chroma. Therefore, in this proposal, the palette is applied separately to luma (Y component) and chroma (Cb and Cr components). If dual tree is disabled, the palette is applied jointly to Y, Cb, Cr components, the same as HEVC palette.
[0078] 2.7 Temporal Motion Vector Prediction (TMVP) in VVC
[0079] In the process of deriving this time domain merge candidate, the scaled motion vector is derived based on the collocated CU belonging to the collocated reference picture. The reference picture list used to derive the collocated CU is explicitly signaled in the slice header. Figure 4 The scaled motion vector for the temporal Merge candidate is obtained as illustrated by the dotted line in , which is scaled from the motion vector of the collocated CU using the POC distance (tb and td), where tb is defined as the POC difference between the reference picture of the current picture and the current picture, and td is defined as the POC difference between the reference picture of the collocated picture and the collocated picture. The reference picture index of the temporal Merge candidate is set equal to 0.
[0080] like Figure 5 As depicted, the position of the temporal candidate is selected between candidates C0 and C1. If the CU at position C0 is not available, is intra-coded, or is outside the current row of the CTU, then position C1 is used. Otherwise, position C0 is used to derive the temporal Merge candidate.
[0081] 2.8 Sub-block-based temporal motion vector prediction (SbTMVP) in VVC
[0082] VTM supports the sub-block-based temporal motion vector prediction (SbTMVP) method. Similar to the temporal motion vector prediction (TMVP) in HEVC, SbTMVP uses the motion field in the collocated picture to improve the motion vector prediction and merge mode of the CU in the current picture. The same collocated pictures used by TMVP are also used for SbTVMP. SbTMVP differs from TMVP in the following two main aspects:
[0083] 1. TMVP predicts CU-level motion, but SbTMVP predicts sub-CU-level motion;
[0084] 2. Whereas TMVP obtains the temporal motion vector from the collocated block in the collocated picture (the collocated block is relative to the lower right block or the center block of the current CU), SbTMVP applies motion displacement before obtaining the temporal motion information from the collocated picture, where the motion displacement is obtained from the motion vector of one of the spatial neighboring blocks of the current CU.
[0085] The SbTMVP process is illustrated in Figure 6. SbTMVP predicts the motion vector of a sub-CU within the current CU in two steps. In the first step, check Fig. 6A The spatial neighbor A1 in is . If A1 has a motion vector that uses the collocated picture as its reference picture, this motion vector is selected as the motion displacement to be applied. If no such motion is identified, the motion displacement is set to (0, 0).
[0086] In the second step, if Figure 6B As shown, the motion displacement identified in step 1 is applied (ie, added to the coordinates of the current block) to obtain sub-CU level motion information (motion vector and reference index) from the collocated picture. Figure 6B The example in assumes that the motion displacement is set to the motion of block A1. Then, for each sub-CU, the motion information of its corresponding block (the minimum motion grid covering the center sample) in the collocated picture is used to derive the motion information of the sub-CU. After the motion information of the collocated sub-CU is identified, it is converted into the motion vector and reference index of the current sub-CU in a manner similar to the TMVP process of HEVC, where temporal motion scaling is applied to align the reference picture of the temporal motion example with the reference picture of the current CU.
[0087] In VTM6, a combined sub-block based Merge list containing SbTVMP candidates and affine Merge candidates is used to signal the sub-block based Merge mode. The SbTVMP mode is enabled / disabled by the sequence parameter set (SPS) flag. If the SbTMVP mode is enabled, the SbTMVP prediction value is added as the first entry in the sub-block based Merge candidate list, followed by the affine Merge candidate. The size of the sub-block based Merge list is signaled in the SPS, and in VTM6, the maximum allowed size of the sub-block based Merge list is 5.
[0088] The sub-CU size used in SbTMVP is fixed to 8×8, and like the affine merge mode, the SbTMVP mode is only applicable to CUs whose width and height are both greater than or equal to 8.
[0089] The encoding logic of the additional SbTMVPMerge candidate is the same as that of other Merge candidates, that is, for each CU in a P or B slice, an additional RD check is performed to decide whether to use the SbTMVP candidate.
[0090] Description of TMVP and SbTMVP in the working draft
[0091] 8.5.2.11 Derivation of temporal luminance motion vector prediction
[0092] The inputs to this process are:
[0093] - the luma position (xCb, yCb) of the top left sample of the current luma codec block relative to the top left luma sample of the current picture,
[0094] - variable cbWidth, specifies the width of the current codec block in luminance samples,
[0095] - The variable cbHeight specifies the height of the current codec block in luminance samples.
[0096] - Reference index refIdxLX, where X is 0 or 1.
[0097] The output of this process is:
[0098] - motion vector prediction mvLXCol with fractional sample accuracy of 1 / 16,
[0099] -Availability flag availableFlagLXCol.
[0100] The variable currCb specifies the current luma codec block at luma location (xCb, yCb).
[0101] The variables mvLXCol and availableFlagLXCol are derived as follows:
[0102] - If slice_temporal_mvp_enabled_flag is equal to 0 or (cbWidth*cbHeight) is less than or equal to 32, then both components of mvLXCol are set equal to 0 and availableFlagLXCol is set equal to 0.
[0103] - Otherwise, (slice_temporal_mvp_enabled_flag is equal to 1), the following sequence of steps applies:
[0104] 1. Derived the lower right concatenated motion vector and the lower right boundary sample position as follows:
[0105] xColBr=xCb+cbWidth (8-421)
[0106] yColBr=yCb+cbHeight (8-422)
[0107] rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?
[0108] SubPicRightBoundaryPos:pic_width_in_luma_samples-1 (8-423)
[0109] botBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?
[0110] SubPicBotBoundaryPos:pic_height_in_luma_samples- 1(8-424)
[0111] – If yCb>>CtbLog2SizeY is equal to yColBr>>CtbLog2SizeY, yColBr is less than or equal to botBoundaryPos, and xColBr is less than or equal to rightBoundaryPos, then the following applies:
[0112] - The variable colCb specifies the luma codec block that covers the modification position specified by ((xColBr>>3)<<3, (yColBr>>3)<<3) within the collocated picture specified by ColPic.
[0113] - Set the luma position (xColCb, yColCb) equal to the top left sample of the collocated luma codec block specified by colCb relative to the top left luma sample of the collocated picture specified by ColPic.
[0114] - Invoke the derivation process of the collocated motion vector specified in clause 8.5.2.12 with as input currCb, colCb, (xColCb, yColCb), refIdxLX and sbFlag set equal to 0, and assign the output to mvLXCol and availableFlagLXCol.
[0115] Otherwise, set both components of mvLXCol equal to 0 and set availableFlagLXCol equal to 0.
[0116] 2. When availableFlagLXCol is equal to 0, the center-concatenated motion vector is derived as follows:
[0117] xColCtr=xCb+(cbWidth>>1) (8-425)
[0118] yColCtr=yCb+(cbHeight>>1) (8-426)
[0119] – The variable colCb specifies the luma codec block that overlays the modified position specified by ((xColCtr>>3)<<3, (yColCtr>>3)<<3) within the collocated picture specified by ColPic.
[0120] – The luma position (xColCb, yColCb) is set equal to the top left sample of the collocated luma codec block specified by colCb relative to the top left luma sample of the collocated picture specified by ColPic.
[0121] – Invoke the derivation of the collocated motion vector as specified in clause 8.5.2.12 with as input currCb, colCb, (xColCb, yColCb), refIdxLX and sbFlag set equal to 0, and assign the output to mvLXCol and availableFlagLXCol.
[0122] 8.5.2.12 Derivation of concatenated motion vectors
[0123] The inputs to this process are:
[0124] – The variable currCb specifies the current codec block,
[0125] – variable colCb specifies the collocated codec block within the collocated picture specified by ColPic,
[0126] – luma position (xColCb, yColCb) specifies the top-left sample of the collocated luma codec block specified by colCb relative to the top-left luma sample of the collocated picture specified by ColPic;
[0127] – Reference index refIdxLX, where X is 0 or 1,
[0128] – Flag sbFlag indicating the sub-block time domain Merge candidate.
[0129] The output of this process is:
[0130] – motion vector prediction mvLXCol with fractional sample accuracy of 1 / 16,
[0131] –Availability flag availableFlagLXCol.
[0132] The variable currPic specifies the current picture.
[0133] The arrays predFlagL0Col[x][y], mvL0Col[x][y], and refIdxL0Col[x][y] are set equal to PredFlagL0[x][y], MvDmvrL0[x][y], and RefIdxL0[x][y], respectively, of the collocated picture specified by ColPic, and the arrays predFlagL1Col[x][y], mvL1Col[x][y], and refIdxL1Col[x][y] are set equal to PredFlagL1[x][y], MvDmvrL1[x][y], and RefIdxL1[x][y], respectively, of the collocated picture specified by ColPic.
[0134] The variables mvLXCol and availableFlagLXCol are derived as follows:
[0135] – If colCb is encoded in intra or IBC prediction mode, both components of mvLXCol are set equal to 0 and availableFlagLXCol is set equal to 0.
[0136] – Otherwise, the motion vector mvCol, the reference index refIdxCol and the reference list identifier listCol are derived as follows:
[0137] 2.8.1 Derivation of concatenated motion vectors when encoding colCb as an inter-block
[0138] – If sbFlag is equal to 0, availableFlagLXCol is set equal to 1 and the following applies:
[0139] - If predFlagL0Col[xColCb][yColCb] is equal to 0, then set mvCol, refIdxCol, and listCol equal to mvL1Col[xColCb][yColCb], refIdxL1Col[xColCb][yColCb], and L1, respectively.
[0140] - Otherwise, if predFlagL0Col[xColCb][yColCb] is equal to 1 and predFlagL1Col[xColCb][yColCb] is equal to 0, then mvCol, refIdxCol, and listCol are set equal to mvL0Col[xColCb][yColCb], refIdxL0Col[xColCb][yColCb], and L0, respectively.
[0141] - Otherwise (predFlagL0Col[xColCb][yColCb] is equal to 1 and predFlagL1Col[xColCb][yColCb] is equal to 1), the following assignments are made:
[0142] - If NoBackwardPredFlag is equal to 1, set mvCol, refIdxCol, and listCol equal to mvLXCol[xColCb][yColCb], refIdxLXCol[xColCb][yColCb], and LX, respectively.
[0143] - Otherwise, mvCol, refIdxCol, and listCol are set equal to mvLNCol[xColCb][yColCb], refIdxLNCol[xColCb][yColCb], and LN, respectively, where N is the value of collocated_from_l0_flag.
[0144] – Otherwise (sbFlag equals 1), the following applies:
[0145] - If PredFlagLXCol[xColCb][yColCb] is equal to 1, then mvCol, refIdxCol, and listCol are set equal to mvLXCol[xColCb][yColCb], refIdxLXCol[xColCb][yColCb], and LX, respectively, and availableFlagLXCol is set equal to 1.
[0146] Otherwise (PredFlagLXCol[xColCb][yColCb] is equal to 0), the following applies:
[0147] - If NoBackwardPredFlag is equal to 1 and PredFlagLYCol[xColCb][yColCb] is equal to 1, then set mvCol, refIdxCol, and listCol to mvLYCol[xColCb][yColCb], refIdxLYCol[xColCb][yColCb], and LY, Y to !X, respectively, where X is the value of X at which this procedure was called. Set availableFlagLXCol equal to 1.
[0148] Otherwise, set both components of mvLXCol equal to 0 and set availableFlagLXCol equal to 0.
[0149] – When availableFlagLXCol is equal to TRUE, mvLXCol and availableFlagLXCol are derived as follows:
[0150] - If LongTermRefPic(currPic, currCb, refIdxLX, LX) is not equal to LongTermRefPic(ColPic, colCb, refIdxCol, listCol), then set both components of mvLXCol equal to 0 and set availableFlagLXCol equal to 0.
[0151] - Otherwise, the variable availableFlagLXCol is set equal to 1, refPicList[listCol][refIdxCol] is set to the picture with reference index refIdxCol in the reference picture list listCol of the slice containing the codec block colCb in the collocated picture specified by ColPic, and the following applies:
[0152] colPocDiff=DiffPicOrderCnt(ColPic,refPicList[listCol][refIdxCol])(8-427)
[0153] currPocDiff=DiffPicOrderCnt(currPic,RefPicList[X][refIdxLX])(8-428)
[0154] - Invoke the temporal motion buffer compression process for collocated motion vectors as specified in clause 8.5.2.15 with mvCol as input and the modified mvCol as output.
[0155] - If RefPicList[X][refIdxLX] is a long-term reference picture, or colPocDiff is equal to currPocDiff, then mvLXCol is derived as follows:
[0156] mvLXCol=mvCol (8-429)
[0157] Otherwise, mvLXCol is derived as a scaled version of the motion vector mvCol as follows:
[0158] tx=(16384+(Abs(td)>>1)) / td (8-430)
[0159] distScaleFactor=Clip3(-4096,4095,(tb*tx+32)>>6) (8-431)
[0160] mvLXCol=Clip3(-131072,131071,(distScaleFactor*mvCol+128-(distScaleFactor*mvCol>=0))>>8)) (8-432)
[0161] where td and tb are derived as follows:
[0162] td=Clip3(-128,127,colPocDiff) (8-433)
[0163] tb=Clip3(-128,127,currPocDiff) (8-434)
[0164] 2.9 CU-level weighted bidirectional prediction (BCW)
[0165] In HEVC, a bidirectional prediction signal is generated by averaging two prediction signals obtained from two different reference pictures and / or using two different motion vectors. In VTM6, the bidirectional prediction mode is extended beyond simple averaging to allow weighted averaging of two prediction signals.
[0166] P bi-pred =((8w)*P0+w*P1+4)>>3 (3-19)
[0167] Five weights are allowed in weighted average bidirectional prediction, w∈{-2,3,4,5,10}. For each bidirectional prediction CU, the weight w is determined in one of the following two ways: 1) For non-MergeCU, the weight index is signaled after the motion vector difference; 2) For MergeCU, the weight index is inferred from the neighboring blocks based on the Merge candidate index. Weighted average bidirectional prediction is only applicable to CUs with 256 or more luma samples (i.e., CU width multiplied by CU height is greater than or equal to 256). For low-latency pictures, all 5 weights are used. For non-low-latency pictures, only 3 weights (w∈{3,4,5}) are used.
[0168] – At the encoder, fast search algorithms are applied to find the weight index without significantly increasing the encoder complexity. These algorithms are summarized below. For more details, refer to the VTM software and document JVET-L0646. When used in conjunction with AMVR, unequal weights are conditionally checked only for 1-pixel and 4-pixel motion vector precision if the current picture is a low-latency picture.
[0169] – When used in conjunction with affine, affine ME will be performed on unequal weights if and only if the affine mode is selected as the current best mode.
[0170] – When the two reference pictures in bidirectional prediction are the same, unequal weights are only checked conditionally.
[0171] – Depends on the POC distance between the current picture and its reference picture, the codec QP, and the temporal level, and does not search for unequal weights when certain conditions are not met.
[0172] The BCW weight index is encoded using a context codec bin and a subsequent bypass codec bin. The first context codec bin indicates whether equal weights are used; if unequal weights are used, an additional bin is signaled using bypass codec to indicate which unequal weights are used.
[0173] Weighted prediction (WP) is a codec tool supported by the H.264 / AVC and HEVC standards to efficiently encode and decode video content with attenuation. Support for WP has also been added to the VVC standard. WP allows weighting parameters (weights and offsets) to be signaled for each reference picture in each reference picture list L0 and L1. Then, during motion compensation, the corresponding (multiple) weights and (multiple) offsets of the reference picture are applied. WP and BCW are designed for different types of video content. In order to avoid the interaction between WP and BCW that complicates the design of the VVC decoder, if the CU uses WP, the BCW weight index is not signaled, and w is inferred to be 4 (ie, equal weights are applied). For Merge CU, the weight index is inferred from the neighboring blocks based on the Merge candidate index. This can be applied to general Merge mode and inherited affine Merge mode. For the constructed affine Merge mode, the affine motion information is constructed based on the motion information of up to 3 blocks. The following process is used to derive the BCW index of the CU using the constructed affine Merge mode.
[0174] 1. Divide the range of BCW index {0,1,2,3,4} into three groups: {0}, {1,2,3} and {4}. If the BCW indexes of all control points are from the same group, derive the BCW index according to step 2; otherwise, set the BCW index to 2.
[0175] 2. If at least two control points have the same BCW index, assign this BCW index value to the candidate; otherwise, set the BCW index of the currently constructed candidate to 2.
[0176] 2.10 Merge Mode with MVD (MMVD)
[0177] In addition to the Merge mode (in which the implicitly derived motion information is directly used for prediction sample generation of the current CU), the Merge mode with motion vector difference (MMVD) is introduced in VVC. The MMVD flag is signaled immediately after the Skip flag and the Merge flag are sent to specify whether the MMVD mode is used for the CU.
[0178] In MMVD, after a Merge candidate is selected, it is further refined by signaling MVD information. Further information includes a Merge candidate flag, an index to specify the magnitude of motion, and an index to indicate the direction of motion. In MMVD mode, one of the first two candidates in the Merge list is selected as the MV basis. The Merge candidate flag is signaled to specify which one is used.
[0179] The distance index specifies the motion magnitude information and indicates a predefined offset from the starting point. Figure 7 As shown, the offset is added to the horizontal component or the vertical component of the starting MV. The relationship between the distance index and the predefined offset is specified in Table 1.
[0180] Table 1: Relationship between distance index and predefined offset
[0181]
[0182] The direction index indicates the direction of the MVD relative to the starting point. The direction index can represent four directions as shown in Table 2. It is worth noting that the meaning of the MVD symbol can change according to the information of the starting MV. When the starting MV is a non-predicted MV or a bidirectional predicted MV in which both lists point to the same side of the current picture (that is, the POCs of both references are greater than the POC of the current picture, or are less than the POC of the current picture), the symbol in Table 2 specifies the sign of the MV offset added to the starting MV. When the starting MV is a bidirectional predicted MV in which two MVs point to different sides of the current picture (that is, the POC of one reference is greater than the POC of the current picture, and the POC of the other reference is less than the POC of the current picture), the symbol in Table 2 specifies the sign of the MV offset added to the list0 MV component of the starting MV, as well as the sign of the list1 MV with the opposite value.
[0183] Table 2: Sign of MV offset specified by direction index
[0184] Directions to IDX 00 01 10 11 x-axis + – N / A N / A y-axis N / A N / A + –
[0185] 2.11 Optional Luminance Half-Pixel Interpolation Filter
[0186] In JVET-N0309, an optional half-pixel interpolation filter is proposed.
[0187] The switching of the half-pixel luma interpolation filter depends on the motion vector accuracy. In addition to the existing quarter-pixel, full-pixel, and quad-pixel AMVR modes, a new half-pixel precision AMVR mode is introduced. The optional half-pixel luma interpolation filter can be selected only in the case of half-pixel motion vector accuracy.
[0188] 2.11.1 Half-Pixel AMVR Mode
[0189] An additional AMVR mode for non-affine non-Merge inter-coded CUs is proposed, which allows the motion vector difference to be signaled with half-pixel precision. The existing AMVR scheme of the current VVC draft is directly extended in the following way: directly after the syntax element amvr_flag, if amvr_flag==1, there is a new context modeling binary syntax element hpel_amvr_flag, which indicates the use of the new half-pixel AMVR mode if hpel_amvr_flag==1. Otherwise, that is, if hpel_amvr_flag==0, the choice between full-pixel and 4-pixel AMVR modes is indicated by the syntax element amvr_precision_flag as shown in the current VVC draft.
[0190] 2.11.2 Optional Luminance Half-Pixel Interpolation Filter
[0191] For non-affine non-Merge inter-coded CUs using half-pixel motion vector precision (i.e., half-pixel AMVR mode), switching between the HEVC / VVC half-pixel luma interpolation filter and one or more optional half-pixel interpolation is based on the value of a new syntax element if_idx. The syntax element if_idx is signaled only in half-pixel AMVR mode. In the case of Skip / Merge mode with spatial Merge candidates, the value of the syntax element if_idx is inherited from the neighboring block.
[0192] 2.11.2.1 Test 1: An optional half-pixel interpolation filter
[0193] In this test case, a 6-tap interpolation filter is used as a replacement for the normal HEVC / VVC half-pixel interpolation filter. The following table shows the mapping between the value of the syntax element if_idx and the selected half-pixel brightness interpolation filter:
[0194]
[0195] 2.11.2.1 Test 2: Two optional half-pixel interpolation filters
[0196] In this test case, two 8-tap interpolation filters are used as replacements for the normal HEVC / VVC half-pixel interpolation filters. The following table shows the mapping between the value of the syntax element if_idx and the selected half-pixel luma interpolation filter:
[0197]
[0198] The signaling notifies amvr_precision_idx to indicate whether the current CU uses 1 / 2 pixel, 1 pixel or 4 pixel precision. Two bins need to be encoded and decoded.
[0199] hpel_if_idx is signaled to indicate whether the default half-pixel interpolation filter or the optional half-pixel interpolation filter is used. When two optional half-pixel interpolation filters are used, two bins need to be encoded and decoded.
[0200] 3. Defects of existing implementation methods
[0201] Current designs for deriving collocated motion vectors in inter prediction suffer from the following problems:
[0202] 1. The derivation of the collocated motion vector in TMVP and SbTMVP depends on the prediction mode of the collocated codec block. In the current VVC, if the collocated codec block is coded in intra or IBC prediction mode, the collocated motion vector is set equal to the zero motion vector. Therefore, even if the collocated block is palette coded, an undefined collocated motion vector will be returned because there is no motion vector associated with the palette prediction mode.
[0203] 2. Deriving weighted sample point predictions in BCW may not be efficient.
[0204] 3. In the current VVC, MV is clipped to 18 bits. However, the Merge motion vector difference is clipped to 16 bits, which may cause a loss of accuracy.
[0205] 4. Signaling cu_skip_flag will result in overhead bits. In the current VVC, the maximum width and height of the IBC codec unit is 64. For blocks with a width or height greater than 64 in an I slice, there is no need to signal cu_skip_flag.
[0206] 5. The optional luma half-pixel interpolation filter flag may be set to true even when the CU / PU / block has no half-pixel or coarser MV components.
[0207] 4. Example method for juxtaposing motion vectors in video coding
[0208] The following detailed description of the invention should be considered as an example to explain the general concept. These inventions should not be interpreted narrowly. In addition, these inventions can be combined in any way.
[0209] Deriving Collocated Motion Vectors
[0210] 1. Instead of checking whether the collocated coded block is intra coded or IBC coded, how to derive the collocated motion vector and / or the availability of the collocated motion vector may depend on whether the prediction mode of the collocated coded block is inter. In this case, there is no need to store four prediction modes for each block, only one 1-bit is needed to determine whether the block is inter or non-inter.
[0211] a. In one example, for the case of encoding and decoding a collocated codec block in palette prediction mode, how to derive a collocated motion vector and / or the availability of a collocated motion vector may be the same as the case of encoding and decoding a collocated codec block in intra / IBC prediction mode.
[0212] b. In one example, when a collocated codec block is coded in a non-inter prediction mode (eg, intra, palette, or IBC), the collocated motion vector may be set to unavailable.
[0213] c. Optionally, the collocated motion vector may be marked as available, and when the collocated codec block is encoded in a non-inter prediction mode (eg, intra, palette, or IBC), a default motion vector may be designated as the collocated motion vector.
[0214] d. Optionally, when a collocated codec block is coded in a non-inter prediction mode, other blocks (eg, a neighboring inter-coded block of the collocated codec block) may be checked instead.
[0215] i. In one example, the neighboring block may be an inter-frame coded block that is closest to the collocated coded block in left / right / top / bottom.
[0216] 2. The determination of the collocated motion vector may depend on the reference list and / or reference index of the collocated codec block.
[0217] a. In one example, when the reference index of the reference list X (eg, L1) of the collocated codec block is not equal to a specific value (eg, 0), the collocated motion vector may be derived (eg, using the prior art as described in 2.8.1).
[0218] b. In one example, when the reference index of the reference list X (eg, L1) of the collocated codec block is equal to a specific value (eg, 0), the derivation of the collocated motion vector may be invoked.
[0219] c. Optionally, in addition, when the collocated coded block is coded in a non-inter prediction mode (including or excluding IBC), or its reference picture does not meet a given condition, the collocated MV is set to be unavailable.
[0220] i. Optionally, set the concatenated MV to a default value.
[0221] BCW sample point prediction
[0222] 3. The weight table applied in BCW codec mode may be asymmetric.
[0223] a. In one example, for a weight W as a table entry, (1-W) may not be a table entry, where W is in the range of [a, b], where (a+b) equals 1.
[0224] b. In one example, for a weight W as a table entry, (2 N -W) may not be a table entry, assuming that the final prediction block is generated by (W0×P0+W1×P1)>>N, where W0 and W1 are two weights applied to the two prediction blocks P0 and P1 respectively, and (W0+W1) equals (1< <N)。
[0225] 4. The weights in the weight table applied in the BCW codec mode may not be in a monotonically increasing order.
[0226] a. In one example, the value of the (i+1)th entry of the table may be smaller than the value of the i-th entry of the table.
[0227] 5. In one example, the weighted sample prediction process of BCW can depend on different weight lookup tables.
[0228] a. In one example, {4,5,3,10,2} / {4,3,5,10,2} / {4,5,3,10,1} / {4,3,5,10,1} / {4,5,3,10,-1} can be used as the weight lookup table for BCW.
[0229] 6. In one example, in the weighted sample prediction process of BCW, the intermediate prediction samples in each prediction direction may be converted to the first bit depth (if necessary, for example, when the first bit depth is not equal to the bit depth of the intermediate prediction samples), then, the weighted prediction may be applied, and the final prediction samples may be converted to the second bit depth.
[0230] a. In one example, the second bit depth is the same as the input bit depth of the current color component.
[0231] b. In one example, in conversion between different bit depths, a right shift (eg, converting samples from a higher bit depth to a lower bit depth) or a left shift (eg, converting samples from a lower bit depth to a higher bit depth) may be applied.
[0232] i. Optionally, in addition, an offset may be added before the right or left shift.
[0233] c. In one example, the first bit depth is the same as the bit depth of the intermediate prediction samples. The weighted sample prediction of BCW can be derived as: pbSamples[x][y] = Clip3(0, (1<<bitDepth)-1,(w0*predSamplesL0[x][y]+w1*predSamplesL1[x][y]+offset3)> >(shift1+3)), where shift1 is set equal to Max(2,14-bitDepth), and the variable offset3 is set equal to 1<<(shift1+2), where bitDepth is the bit depth of the current color component.
[0234] d. In one example, the first bit depth is the same as the input bit depth of the current color component. The weighted sample prediction of BCW can be derived as: pbSamples[x][y] = Clip3(0, (1<<bitDepth)-1,(w0*((predSamplesL0[x][y]+offset1)> >shift1)+w1*((predSamplesL1[x][y]+offset1)>>shift1)+4)>>3), where shift1 is set equal to Max(2,14-bitDepth) and the variable offset1 is set to 1<<(shift1)-1).
[0235] MMVD Range
[0236] 7. In one example, the Merge motion vector difference can be clipped to the same range as the motion vector.
[0237] a. In one example, the Merge motion vector difference can be clipped to 18 bits, for example, [-2 17 ,2 17 –1], which is the same as the motion vector range in VVC.
[0238] b. In one example, the Merge motion vector difference can be clipped to [-2 17 +1,2 17 –1].
[0239] c. In one example, the Merge motion vector difference may not be clipped.
[0240] i. For example, after adding the Merge motion difference to the motion vector prediction candidate, the result of the motion vector is clipped to 18 bits.
[0241] c u_skip_flag signaling notification
[0242] 8. It is proposed that, depending on the dimension of the codec block, an indication (eg, cu_skip_flag) of whether a CU / PU / block is coded in skip mode may be conditionally signaled.
[0243] a. In one example, when the current slice type is I-slice, and sps_ibc_enabled_flag is true, and both the block width and the block height are less than or equal to N (N is an integer), the indication (eg, cu_skip_flag) may be signaled. For example, N=64.
[0244] b. In one example, when the current block is encoded and decoded in IBC mode, when both the block width and the block height are less than or equal to N (N is an integer), the indication (eg, cu_skip_flag) may be signaled. For example, N=64.
[0245] Chroma component codec tool
[0246] 9. Whether codec tool X (eg, X is TMVP / ATMVP / BCW / MMVD / PDPC) can be applied to a block of a first color component depends on whether it is applied to one or more corresponding blocks in a second color component.
[0247] a. In one example, when codec X is applied to a corresponding second color component (eg, luma) block, use of codec X on a first color component (eg, chroma) block may be prohibited.
[0248] b. In one example, when codec Y (where Y is different from X) is applied to the corresponding second color component (eg, luma) block, use of codec X on the first color component (eg, chroma) block may be prohibited.
[0249] c. In one example, a message (such as a flag or index) may be conditionally signaled to indicate whether codec X applies to the first color component of a block. The condition may be defined as whether it applies to the corresponding second color component block. Optionally, furthermore, if it does not apply to the corresponding second color component block, it does not apply to the first component of the block without signaling.
[0250] i. In one example, codec X may be applied to different color components in different ways.
[0251] 1) It is possible to signal how to apply codec X to luma and chroma components independently.
[0252] d. In one example, the first color component is a chrominance component and the second color component is a luminance component.
[0253] e. In one example, the first color component is a chrominance color component and the second color component is another chrominance color component.
[0254] f. In one example, the first color component is a luminance color component and the second color component is a chrominance color component.
[0255] g. In the above discussion, a "corresponding second color component block" may refer to a second color component block that covers at least one "corresponding sample" of a first color component block.
[0256] i. In one example, the first color component is a chrominance component and the second color component is a luminance component.
[0257] ii. The sample position can be scaled according to color formats such as 4:4:4 or 4:2:0. Assume that the top left position of the chroma block is (x0, y0), and the width and height of the chroma block are W and H, all of which will be scaled according to the luma sample unit.
[0258] iii. In one example, the corresponding sample point may be at (x0, y0);
[0259] iv. In one example, the corresponding sample point may be at (x0+W-1, y0+H-1);
[0260] v. In one example, the corresponding sample point may be at (x0+W / 2-1, y0+H / 2-1);
[0261] vi. In one example, the corresponding sample point may be at (x0+W / 2, y0+H / 2);
[0262] vii..In one example, the corresponding sample point may be at (x0+W / 2, y0+H / 2-1);
[0263] viii. In one example, the corresponding sample point may be at (x0+W / 2-1, y0+H / 2);
[0264] h. In the above discussion, "chrominance component" may mean "one or more chrominance components".
[0265] 10. It is proposed that when encoding and decoding the collocated luminance block of a chrominance block in certain modes, the position-dependent intra-frame prediction sample filtering process (also known as PDPC) can be disabled for certain chrominance components.
[0266] a. In one example, when encoding and decoding a collocated luma block of a chroma block in MIP (matrix-based intra prediction) mode, such a process may be disabled.
[0267] b. In one example, such a process may be disabled when encoding and decoding a collocated luma block of a chroma block in MRL (Multi-Reference Line) mode.
[0268] 11. When a CU / PU / block has only MV components with finer precision than half-pixel precision (e.g., 1 / 4 pixel, 1 / 8 pixel, etc.), the indication of whether to use the optional half-pixel interpolation filter may be set to false. That is, the default half-pixel interpolation filter may be used instead of the optional half-pixel interpolation filter.
[0269] a. In one example, if the reconstructed MV has only MV components with finer precision than half a pixel, this indication may be set to false in MMVD mode.
[0270] b. In one example, for a pair of Merge candidates, if it only has MV components with finer precision than half a pixel, this indication can be set to false.
[0271] c. In one example, this indication may be set to false when the reconstructed bidirectional prediction motion information is converted into unidirectional prediction motion information having only MV components with finer precision than half a pixel (e.g., applied to small blocks such as 4*8 or / and 8*4 blocks).
[0272] 12. In some cases, the indication of whether to use the optional half-pixel interpolation filter can always be set to false. That is, in these cases, the default half-pixel interpolation filter can always be used.
[0273] a. In one example, in MMVD mode, this indication may always be set to false.
[0274] b. In one example, when some specific MVDs are selected, in MMVD mode, this indication may always be set to false.
[0275] i. For example, if an MVD with 1 / 4 pixel accuracy is selected, this indication may be set to false.
[0276] c. In one example, for pairwise Merge candidates, this indication may always be set to false.
[0277] d. In one example, when the reconstructed bi-directional prediction motion information is converted to uni-directional prediction motion information (eg, applied to small blocks such as 4*8 or / and 8*4 blocks), this indication may always be set to false.
[0278] General solution
[0279] 13. Whether and / or how to apply the above disclosed method may be signaled at the sequence level / picture level / slice level / slice group level, such as in the sequence header / picture header / SPS / VPS / DPS / PPS / APS / slice header / slice group header.
[0280] The examples described above may be incorporated into the context of the methods described below, for example, methods 800 , 900 , 1000 , 1100 , 1200 , and 1300 , which may be implemented at a video decoder or a video encoder.
[0281] Figure 8 A flow chart of an exemplary method for video processing is shown. The method 800 includes, at step 810, determining availability of one or more collocated motion vectors based on a prediction mode of a collocated video block relative to a current video block.
[0282] The method 800 includes, at step 820, performing conversion between the current block and a bitstream representation of the current block based on the one or more collocated motion vectors, the indication of the prediction mode comprising a bit indicating whether the current video block is encoded in inter mode or non-inter mode.
[0283] Fig. 9 A flow chart of an exemplary method for video processing is shown. Method 900 includes, at step 910, for conversion between a codec representation of a video block and a video block, determining a type of a collocated video block of the video block, the type taking one of only two possible values.
[0284] The method 900 includes, at step 920 , performing a conversion based on the determination.
[0285] Fig.10 A flow chart of an exemplary method for video processing is shown. The method 100 includes, at step 1010, deriving prediction samples for a current block based on a first weight table associated with a bidirectional prediction (BCW) mode with a codec unit (CU) level weighting process, wherein the first weight table is asymmetric.
[0286] The method 1000 comprises, at step 1020, performing a conversion between a current block and a bitstream representation of the current block based on the prediction samples.
[0287] Fig.11 A flow chart of an exemplary method for video processing is shown. The method 1100 includes, at step 1110, making a decision regarding selectively signaling an indication of a skip mode codec for the current video block in a bitstream representation of the current video block based on a dimension of the current video block.
[0288] The method 1100 includes, at step 1120, performing a conversion between the current block and a bitstream representation of the current block based on the determination.
[0289] Fig.12 A flow chart of an exemplary method for video processing is shown. The method 1200 includes, at step 1210, making a decision regarding selectively applying a second codec tool to at least one block of a second color component of the current video block based on applying a first codec tool to one or more blocks in a first color component of the current video block.
[0290] The method 1200 includes, at step 1220, performing a conversion between the current block and a bitstream representation of the current block based on the determination.
[0291] Fig.13 A flow chart of an exemplary method for video processing is shown. The method 1300 includes, at step 1310, making a decision regarding selective signaling of an indication to use an alternative half-pixel interpolation filter instead of a default half-pixel interpolation filter based on the accuracy of a motion vector in a current video block.
[0292] The method 1300 includes, at step 1320, performing a conversion between the current block and a bitstream representation of the current block based on the determination.
[0293] Some embodiments of the disclosed technology include making a decision or determination to enable a video processing tool or mode. In one example, when a video processing tool or mode is enabled, the encoder will use or implement the tool or mode in the processing of a video block, but it is not necessary to modify the generated bitstream based on the use of the tool or mode. That is, when the video processing tool or mode is enabled based on a decision or determination, it will be used to perform a conversion from a video block to a bitstream representation of a video. In another example, when a video processing tool or mode is enabled, the decoder will process the bitstream using the knowledge that the bitstream has been modified based on the video processing tool or mode. That is, the video processing tool or mode enabled based on a decision or determination will be used to perform a conversion from a bitstream representation of a video to a video block.
[0294] Some embodiments of the disclosed technology include making a decision or determination to disable a video processing tool or mode. In one example, when the video processing tool or mode is disabled, the encoder will not use the tool or mode in the conversion of video blocks to a bitstream representation of the video. In another example, when the video processing tool or mode is disabled, the decoder will process the bitstream with the knowledge that the video processing tool or mode disabled based on the decision or determination was not used to modify the bitstream representation.
[0295] In this application document, the term "video processing" may refer to video encoding, video decoding, video compression, or video decompression. For example, a video compression algorithm may be applied during the conversion from a pixel representation of a video to a corresponding bitstream representation, or vice versa. As defined by the grammar, the bitstream representation of the current video block may correspond, for example, to bits that are concatenated or dispersed at different locations within the bitstream. For example, a macroblock may be encoded based on an error residual value of a transform and codec and also using bits in a header and other fields of the bitstream.
[0296] 5. Exemplary Embodiments of the Disclosed Technology
[0297] Changes are highlighted in bold and italics. Deleted text is marked with double brackets (for example, [[a]] indicates the deletion of the character "a").
[0298] 5.1 Example #1
[0299] The following changes may be made to the working draft specified in JVET-O2001-vE.
[0300] 8.5.2.12 Derivation of concatenated motion vectors
[0301] …
[0302] The variables mvLXCol and availableFlagLXCol are derived as follows:
[0303] – If colCb is encoded in intra or palette or IBC prediction mode, both components of mvLXCol are set equal to 0 and availableFlagLXCol is set equal to 0.
[0304] – Otherwise, the motion vector mvCol, the reference index refIdxCol and the reference list identifier listCol are derived as follows:
[0305] …
[0306] Optionally, the following applies:
[0307] The variables mvLXCol and availableFlagLXCol are derived as follows:
[0308] – If colCb is not encoded in [[Intra or IBC]] inter prediction mode, both components of mvLXCol are set equal to 0 and availableFlagLXCol is set equal to 0.
[0309] – Otherwise, the motion vector mvCol, the reference index refIdxCol and the reference list identifier listCol are derived as follows:
[0310] …
[0311] 5.2 Example #2
[0312] The following changes may be made to the working draft specified in JVET-O2001-vE.
[0313] 8.5.1 General decoding process for codecs encoded and decoded in inter-frame prediction mode
[0314] …
[0315] 3. For xSbIdx=0..numSbX–1, ySbIdx=0..numSbY–1, the luminance and chrominance motion vector arrays refMvLX[xSbIdx][ySbIdx] and refMvCLX[xSbIdx][ySbIdx] after motion vector refinement at the decoder side are derived as follows, where X is 0 and 1:
[0316] – If dmvrFlag is equal to 1, the derivation process for chroma motion vectors in clause 8.5.2.13 is called with refMvLX[xSbIdx][ySbIdx] and refIdxLX as inputs and refMvCLX[xSbIdx][ySbIdx] as output, and the input refMvLX[xSbIdx][ySbIdx] is derived as follows:
[0317] refMvLX[xSbIdx][ySbIdx]=mvLX[xSbIdx][ySbIdx]+
[0318] dMvLX[xSbIdx][ySbIdx] (8-287)
[0319] refMvLX[xSbIdx][ySbIdx][0]=Clip3(-2 17 ,2 17 -1,refMvLX[xSbI
[0320] dx][ySbIdx][0]) (8-288)
[0321] refMvLX[xSbIdx][ySbIdx][1]=Clip3(-2 17 ,2 17 -1,refMvLX[xSbI
[0322] dx][ySbIdx][1]) (8-289)
[0323] – Otherwise (dmvrFlag is equal to 0), the following applies:
[0324] refMvLX[xSbIdx][ySbIdx]=mvLX[xSbIdx][ySbIdx] (8-290)
[0325] refMvCLX[xSbIdx][ySbIdx]=mvCLX[xSbIdx][ySbIdx]
[0326] (8-291)
[0327] NOTE - The array refMvLX is stored in MvDmvrLX and is used in the derivation of the concatenated motion vector in clause 8.5.2.12. After decoding the slice, when the codec block Cb[xSbIdx][ySbIdx] is coded in IBC prediction mode, both MvDmvrLX[xSbIdx][ySbIdx] and the corresponding reference index are set equal to -1. The array of non-refined luma motion vectors MvLX is used in the spatial motion vector prediction and deblocking boundary strength derivation.
[0328] …
[0329] 8.5.2.12 Derivation of concatenated motion vectors
[0330] …
[0331] The variables mvLXCol and availableFlagLXCol are derived as follows:
[0332] – If colCb is encoded in intra or IBC prediction mode, both components of mvLXCol are set equal to 0 and availableFlagLXCol is set equal to 0.
[0333] – Otherwise, the motion vector mvCol, the reference index refIdxCol and the reference list identifier listCol are derived as follows:
[0334] If predFlagL0Col[xColCb][yColCb] is equal to 0 and predFlagL1Col[xColCb][yColCb] is equal to 0, then both components of mvLXCol are set equal to 0 and availableFlagLXCol is set equal to 0.
[0335] Otherwise, the following applies:
[0336] - If sbFlag is equal to 0, availableFlagLXCol is set to 1 and the following applies:
[0337] - If predFlagL0Col[xColCb][yColCb] is equal to 0, then set mvCol, refIdxCol, and listCol equal to mvL1Col[xColCb][yColCb], refIdxL1Col[xColCb][yColCb], and L1, respectively.
[0338] - Otherwise, if predFlagL0Col[xColCb][yColCb] is equal to 1 and predFlagL1Col[xColCb][yColCb] is equal to 0, then mvCol, refIdxCol, and listCol are set equal to mvL0Col[xColCb][yColCb], refIdxL0Col[xColCb][yColCb], and L0, respectively.
[0339] - Otherwise (predFlagL0Col[xColCb][yColCb] is equal to 1 and predFlagL1Col[xColCb][yColCb] is equal to 1), the following assignments are made:
[0340] - If NoBackwardPredFlag is equal to 1, set mvCol, refIdxCol, and listCol equal to mvLXCol[xColCb][yColCb], refIdxLXCol[xColCb][yColCb], and LX, respectively.
[0341] - Otherwise, mvCol, refIdxCol, and listCol are set equal to mvLNCol[xColCb][yColCb], refIdxLNCol[xColCb][yColCb], and LN, respectively, where N is the value of collocated_from_l0_flag.
[0342] – Otherwise (sbFlag equals 1), the following applies:
[0343] - If PredFlagLXCol[xColCb][yColCb] is equal to 1, then mvCol, refIdxCol, and listCol are set equal to mvLXCol[xColCb][yColCb], refIdxLXCol[xColCb][yColCb], and LX, respectively, and availableFlagLXCol is set to 1.
[0344] Otherwise (PredFlagLXCol[xColCb][yColCb] is equal to 0), the following applies:
[0345] - If NoBackwardPredFlag is equal to 1 and PredFlagLYCol[xColCb][yColCb] is equal to 1, then mvCol, refIdxCol, and listCol are set to mvLYCol[xColCb][yColCb], refIdxLYCol[xColCb][yColCb], and LY,Y are equal to !X, respectively, where X is the value of X at which this procedure was called. Set availableFlagLXCol equal to 1.
[0346] Otherwise, set both components of mvLXCol equal to 0 and set availableFlagLXCol equal to 0.
[0347] …
[0348] 5.3 Example #3
[0349] The following changes may be made to the working draft specified in JVET-O2001-vE.
[0350] 8.5.6.6.2 Default weighted sample prediction process
[0351] …
[0352] The variables shift1, shift2, offset1, offset2, and offset3 are derived as follows:
[0353] – Set the variable shift1 equal to Max(2,14-bitDepth) and the variable shift2 equal to Max(3,15-bitDepth).
[0354] – Set the variable offset1 equal to 1<<(shift1-1).
[0355] – Set the variable offset2 equal to 1<<(shift2-1).
[0356] – Set the variable offset3 equal to 1<<(shift2+1[[2]]).
[0357] …
[0358] – Otherwise (predFlagL0 is equal to 1 and predFlagL1 is equal to 1), the following applies:
[0359] - If bcwIdx is equal to 0 or ciip_flag[xCb][yCb] is equal to 1, the predicted sample value is derived as follows:
[0360] pbSamples[x][y]=Clip3(0,(1< <bitDepth)-1, (8-823)
[0361] (predSamplesL0[x][y]+predSamplesL1[x][y]+offset2)>>shift2)
[0362] - Otherwise (bcwIdx is not equal to 0 and ciip_flag[xCb][yCb] is equal to 0), the following applies:
[0363] -Set variable w1 equal to bcwWLut[bcwIdx], where bcwWLut[k] = {4, 5, 3, 10, -2}.
[0364] -Set variable w0 equal to (8-w1).
[0365] -Predict the sample point value as follows:
[0366] pbSamples[x][y]=Clip3(0,(1< <bitDepth)-1,(8 824)
[0367] (w0*predSamplesL0[x][y]+w1*predSamplesL1[x][y]+offset3)>>(shift2+[[3]]2))
[0368] …
[0369] Optionally, the following applies:
[0370] …
[0371] The variables shift1, shift2, offset1, offset2, and offset3 are derived as follows:
[0372] – Set variable shift1 equal to Max(2,14-bitDepth) [[and set variable shift2 equal to Max(3,15-bitDepth)]].
[0373] – Set the variable offset1 equal to 1<<(shift1-1).
[0374] – Set the variable offset2 equal to 1<<(shift1+[[2-]]1).
[0375] Set the variable offset3 equal to 1<<(shift[[2]]1+2)]].
[0376] …
[0377] – Otherwise (predFlagL0 is equal to 1 and predFlagL1 is equal to 1), the following applies:
[0378] - If bcwIdx is equal to 0 or ciip_flag[xCb][yCb] is equal to 1, the predicted sample value is derived as follows:
[0379] pbSamples[x][y]=Clip3(0,(1< <bitDepth)-1, (8-823)
[0380] (predSamplesL0[x][y]+predSamplesL1[x][y]+offset2)>>
[0381] (shift1+1)[[2]])
[0382] - Otherwise (bcwIdx is not equal to 0 and ciip_flag[xCb][yCb] is equal to 0), the following applies:
[0383] -Set variable w1 equal to bcwWLut[bcwIdx], where bcwWLut[k] = {4, 5, 3, 10, -2}.
[0384] -Set variable w0 equal to (8-w1).
[0385] -Predict the sample point value as follows:
[0386] pbSamples[x][y]=Clip3(0,(1<<bitDepth)-1, (8-824)(w0*predSamplesL0[x][y]+w1*predSamplesL1[x][y]+offset3)> >(shift1+3[[2+3]]))
[0387] …
[0388] Optionally, the following applies:
[0389] …
[0390] The variables shift1, shift2, offset1, offset2, and offset3 are derived as follows:
[0391] – Set the variable shift1 equal to Max(2,14-bitDepth) and the variable shift2 equal to Max(3,15-bitDepth).
[0392] – Set the variable offset1 equal to 1<<(shift1-1).
[0393] – Set the variable offset2 equal to 1<<(shift2-1).
[0394] –[[Set variable offset3 equal to 1<<(shift2+2)]].
[0395] …
[0396] – Otherwise (predFlagL0 is equal to 1 and predFlagL1 is equal to 1), the following applies:
[0397] - If bcwIdx is equal to 0 or ciip_flag[xCb][yCb] is equal to 1, the predicted sample value is derived as follows:
[0398] pbSamples[x][y]=Clip3(0,(1< <bitDepth)-1, (8-823)
[0399] (predSamplesL0[x][y]+predSamplesL1[x][y]+offset2)>>
[0400] shift2)
[0401] - Otherwise (bcwIdx is not equal to 0 and ciip_flag[xCb][yCb] is equal to 0), the following applies:
[0402] -Set variable w1 equal to bcwWLut[bcwIdx], where bcwWLut[k] = {4, 5, 3, 10, -2}.
[0403] -Set variable w0 equal to (8-w1).
[0404] -Predict the sample point value as follows:
[0405] pbSamples[x][y]=Clip3(0,(1< <bitDepth)-1,(8 824)
[0406] (w0*((predSamplesL0[x][y]+offset1)>>
[0407] shift1)+w1*((predSamplesL1[x][y]+offset1)>>
[0408] shift1)+4)>>(8[[shift2+3)]])
[0409] …
[0410] 5.4 Example #4
[0411] The following changes may be made to the working draft specified in JVET-O2001-vE.
[0412] 8.5.6.6.2 Default weighted sample prediction process
[0413] …
[0414] - Otherwise (bcwIdx is not equal to 0 and ciip_flag[xCb][yCb] is equal to 0), the following applies:
[0415] Set variable w1 equal to bcwWLut[bcwIdx], where bcwWLut[k] = {4,5,3,10,2[[-2]]} / {4,5,3,10,1} / {4,3,5,10,2} / {4,3,5,10,1} / {4,5,3,10,-1}.
[0416] …
[0417] 5.5 Example #5
[0418] The following changes may be made to the working draft specified in JVET-O2001-vE.
[0419] 8.5.2.7 Merge motion vector difference derivation process
[0420] …
[0421] mMvdL1[0]=Clip3(-2 [
[15] ]17 ,2 [
[15] ]17 -1,(distScaleFactor*mMvdL0[0]+ (8-394)
[0422] 128-(distScaleFactor*mMvdL0[0]>=0))>>8)
[0423] mMvdL1[1]=Clip3(-2 [
[15] ]17 ,2 [
[15] ]17 -1,(distScaleFactor*mMvdL0[1]+ (8-395)
[0424] 128-(distScaleFactor*mMvdL0[1]>=0))>>8)
[0425] …
[0426] mMvdL0[0]=Clip3(-2[
[15] ]17 ,2 [
[15] ]17 -1,(distScaleFactor*mMvdL1[0]+ (8-404)
[0427] 128-(distScaleFactor*mMvdL1[0]>=0))>>8)
[0428] mMvdL0[1]=Clip3(-2 [
[15] ]17 ,2 [
[15] ]17 -1,,(distScaleFactor*mMvdL1[1]+ (8-405)
[0429] 128-(distScaleFactor*mMvdL1[1]>=0))>>8))
[0430] …
[0431] 5.6 Example #6
[0432] The following changes may be made to the working draft specified in JVET-O2001-vE.
[0433] 7.3.8.5 Codec unit syntax
[0434]
[0435]
[0436] Fig.14A 1 is a block diagram of a video processing device 1400. Device 1400 can be used to implement one or more methods described herein. Device 1400 can be implemented in a smart phone, a tablet computer, a computer, an Internet of Things (IoT) receiver, etc. Device 1400 may include one or more processors 1402, one or more memories 1404, and video processing hardware 1406. (Multiple) processors 1402 can be configured to implement one or more methods described in this application document (including but not limited to methods 800, 900, 1000, 1100, 1200, and 1300). (Multiple) memories 1404 can be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 1406 can be used to implement some of the techniques described in this application document using hardware circuits. In some embodiments, hardware 1406 can be implemented in whole or in part in processor 1402, such as a graphics coprocessor.
[0437] Fig. 14B14 is a block diagram illustrating an example video processing system 1410 in which various techniques disclosed herein may be implemented. Various embodiments may include some or all of the components of system 1410. System 1410 may include an input 1412 for receiving video content. The video content may be received in a raw or uncompressed format, such as 8-bit or 10-bit multi-component pixel values, or may be received in a compressed or encoded format. Input 1412 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, a passive optical network (PON), and wireless interfaces such as Wi-Fi or a cellular interface.
[0438] System 1410 may include a codec component 1414, which can implement various codecs or encoding methods described in the present application document. Codec component 1414 can reduce the average bit rate of the video from the input 1412 of codec component 1414 to the output of codec component 1414 to generate a codec representation of the video. Therefore, codec technology is sometimes referred to as video compression or video transcoding technology. The output of codec component 1414 can be stored or transmitted through a connected communication (as shown in component 1416). The bitstream (or codec) representation of the storage or transmission of the video received at input 1412 can be used by component 1418 to generate pixel values or send to a displayable video of display interface 1410. The process of generating a user-viewable video from a bitstream representation is sometimes referred to as video decompression. In addition, although some video processing operations are referred to as "codec" operations or tools, it should be understood that codec tools or operations are used at the encoder, and the corresponding decoding tools or operations of the inverse codec results will be performed by the decoder.
[0439] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB) or High Definition Multimedia Interface (HDMI) or Display Port, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The techniques described herein may be implemented in a variety of electronic devices, such as mobile phones, laptops, smart phones, or other devices capable of performing digital data processing and / or video display.
[0440] In some embodiments, the video encoding and decoding method may use Fig.14A Or it can be implemented by the device implemented on the hardware platform shown in Figure 14B.
[0441] The following list provides embodiments that can solve the technical problems described in this application document and other problems. The first group of clauses describes certain features and aspects of the technology disclosed in the previous sections.
[0442] 1. A method for processing a video, comprising: determining availability of one or more collocated motion vectors based on a prediction mode of a collocated video block relative to a current video block; and performing conversion between a current block and a bitstream representation of the current block based on the one or more collocated motion vectors, wherein the indication of the prediction mode includes a bit indicating whether the current video block uses inter-mode or non-inter-mode encoding and decoding.
[0443] 2. A method for processing a video, comprising: for conversion between an encoded solution representation of a video block and the video block, determining a type of a collocated video block of the video block, wherein the type takes one of only two possible values; and performing the conversion based on the determination.
[0444] 3. The method of clause 2, wherein the two possible values include: a first value indicating that the collocated video block is inter-coded; and a second value indicating that the collocated video block is coded using a mode other than inter-coded.
[0445] 4. A method according to any of clauses 1-3, wherein the determination is the same when the current video block is encoded in a palette prediction mode and when the current video block is encoded in an intra or intra block copy (IBC) prediction mode.
[0446] 5. A method according to any of clauses 1-3, wherein one or more collocated motion vectors are determined to be unavailable when the collocated video block is encoded in a non-inter prediction mode.
[0447] 6. A method according to any of clauses 1-3, wherein when the collocated video block is encoded in a non-inter prediction mode, one or more collocated motion vectors are determined to be available and include a default motion vector.
[0448] 7. A method according to clause 5 or 6, wherein the non-inter prediction mode is an intra prediction mode, a palette prediction mode or an intra block copy (IBC) prediction mode.
[0449] 8. A method according to any of clauses 1-3, wherein the determination is based on a reference index or a reference list of collocated video blocks.
[0450] 9. The method of clause 8, wherein the reference index is a predetermined value.
[0451] 10. The method of clause 8, wherein the reference index excludes predetermined values.
[0452] 11. The method according to clause 9 or 10, wherein the predetermined value is 0.
[0453] 12. A video processing method, comprising: deriving prediction samples of a current block based on a first weight table associated with a bidirectional prediction (BCW) mode with a codec unit (CU) level weighting process, wherein the first weight table is asymmetric; and performing conversion between the current block and a bitstream representation of the current block based on the prediction samples.
[0454] 13. The method of clause 12, wherein entries in the first weight table are non-monotonically increasing.
[0455] 14. The method of clause 12, wherein the BCW process is further based on a second weight table that is different from the first weight table.
[0456] 15. The method of clause 12, wherein deriving prediction samples comprises: converting intermediate prediction samples to a first bit depth; and applying weights of a first weight table to the intermediate prediction samples to derive prediction samples; and converting the prediction samples to a second bit depth.
[0457] 16. The method of clause 15, wherein the second bit depth is a bit depth of a color component of the current video block.
[0458] 17. A video processing method, comprising: making a decision about selectively signaling an indication of a skip codec mode for the current video block in a bitstream representation of the current video block based on a dimension of the current video block; and performing a conversion between the current block and the bitstream representation of the current block based on the decision.
[0459] 18. The method of clause 17, wherein the indication is signaled if it is determined that the slice type of the slice comprising the current video block is I-slice, sps_ibc_enabled_flag is set to true, and the width and height of the current video block are less than or equal to N.
[0460] 19. The method of clause 17, wherein the indication is signaled if it is determined that the current video block is encoded in intra block copy (IBC) mode and the height and width of the current video block are less than or equal to N.
[0461] 20. The method according to clause 18 or 19, wherein N=64.
[0462] 21. A video processing method, comprising: based on applying a first codec tool to one or more blocks in a first color component of a current video block, making a decision about selectively applying a second codec tool to at least one block of a second color component of a current video block; and based on the decision, performing a conversion between a current block and a bitstream representation of the current block.
[0463] 22. The method of clause 21, wherein upon determining that the second codec tool is the same as the first codec tool, the second codec tool is applied.
[0464] 23. The method of clause 21, wherein, if it is determined that the second codec tool is different from the first codec tool, the second codec tool is not applied.
[0465] 24. A method according to clause 21, wherein the decision is also based on an indication in the bitstream representation.
[0466] 25. A method according to any of clauses 21-24, wherein the first colour component is a luminance component and the second colour component is a chrominance component.
[0467] 26. A method according to any of clauses 21-24, wherein the first color component is a first chrominance color component and the second color component is a second chrominance color component.
[0468] 27. A method according to any one of clauses 21-26, wherein the first codec tool and the second codec tool are one of: temporal motion vector prediction (TMVP), optional temporal motion vector prediction (ATMVP), bidirectional prediction (BCW) with a codec unit (CU) level weighting process, a Merge with Motion Vector Difference (MMVD) mode, or a position-dependent prediction combination (PDPC) process.
[0469] 28. A video processing method comprising: making a decision regarding selective signaling of an indication of using an optional half-pixel interpolation filter instead of a default half-pixel interpolation filter based on a motion vector accuracy of a current video block; and performing a conversion between a current block and a bitstream representation of the current block based on the decision.
[0470] 29. The method of clause 28, wherein, in case it is determined that the current video block is encoded and decoded in Merge with Motion Vector Difference (MMVD) mode and the accuracy of the reconstructed motion vector is less than half a pixel, a default half-pixel interpolation filter is used.
[0471] 30. A method according to any of clauses 1-29, wherein performing the conversion is also based on signaling notification in a decoder parameter set (DPS), a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), a video parameter set (VPS), a sequence header, a picture header, a slice header or a slice group header.
[0472] 31. A method according to any of clauses 1-30, wherein performing the conversion comprises generating a bitstream representation from the current video block.
[0473] 32. A method according to any of clauses 1-30, wherein performing the conversion comprises generating the current video block from a bitstream representation.
[0474] 33. A video decoding apparatus comprising a processor configured to implement the method according to any of clauses 1-32.
[0475] 34. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for executing the method according to any of clauses 1-32.
[0476] The second set of items describes certain features and aspects of the technology disclosed in the previous sections (e.g., items 1 and 2).
[0477] 1. A video processing method, comprising: making a first determination regarding whether a collocated video block of a video block of a video is coded using an inter-coding mode or a non-inter-coding mode; making a second determination based on the first determination regarding availability of a motion vector for the collocated video block or a mode for deriving a motion vector for the collocated video block; and performing conversion between the video block and a coded representation of the video based on the second determination.
[0478] 2. The method of clause 1, wherein the non-inter-coding mode is an intra mode, a palette mode, or an intra block copy (IBC) mode.
[0479] 3. The method of clause 1, wherein the second determination is performed such that the second determination is the same for collocated video blocks encoded in palette mode and collocated video blocks encoded in intra mode.
[0480] 4. The method of clause 1, wherein the second determining is performed such that the second determining is the same for collocated video blocks encoded in palette mode and collocated video blocks encoded in intra block copy mode.
[0481] 5. The method of clause 1, wherein the second determining is performed such that the second determining is the same for collocated video blocks coded in intra mode and collocated video blocks coded in intra block copy mode.
[0482] 6. The method of clause 1, wherein making the first determination comprises generating a bit to indicate whether the collocated video block is encoded using an inter-frame coding mode or a non-inter-frame coding mode.
[0483] 7. The method of clause 1, wherein the second determination determines that the motion vector for the collocated video block is unavailable based on the first determination that the collocated video block is coded using a non-inter coding mode.
[0484] 8. The method of clause 1, wherein the second determination determines that a motion vector for the collocated video block is available based on the first determination that the collocated video block is coded using a non-inter coding mode, wherein a default motion vector is assigned as the motion vector for the collocated video block.
[0485] 9. The method of clause 1, wherein, in a case where the collocated video block is encoded using a non-inter coding mode, another video block other than the collocated video block is examined.
[0486] 10. The method of clause 9, wherein the other video block is a neighboring block that is a nearest inter-coded block to the left, right, above, or below the collocated video block.
[0487] 11. A video processing method, comprising: for conversion between a video block of a video and a codec representation of the video, determining one or more collocated motion vectors based on a reference index or reference list of a collocated video block of the video block; and performing the conversion based on the determination.
[0488] 12. The method of clause 11, wherein one or more collocated motion vectors are derived if a reference index of a reference list of a collocated video block is not equal to a predetermined value.
[0489] 13. The method of clause 11, wherein one or more collocated motion vectors are derived if a reference index of a reference list of a collocated video block is equal to a predetermined value.
[0490] 14. The method according to clause 12 or 13, wherein the predetermined value is 0.
[0491] 15. The method of clause 11, wherein one or more collocated motion vectors are set to unavailable if the collocated video block is coded in a non-inter coding mode or a reference picture of the collocated video block does not satisfy a given condition.
[0492] 16. The method of clause 11, wherein one or more collocated motion vectors are set to a default value if the collocated video block is coded in a non-inter coding mode or a reference picture of the collocated video block does not satisfy a given condition.
[0493] 17. A method according to any of clauses 1-16, wherein converting comprises encoding the video into a codec representation.
[0494] 18. A method according to any of clauses 1-16, wherein converting comprises decoding the codec representation to generate the video.
[0495] 19. A video processing device, comprising: a processor, wherein the processor is configured to implement any one or more of the methods described in clauses 1-16.
[0496] 20. A computer readable medium storing program code which, when executed, causes a processor to implement the method of any one or more of clauses 1-16.
[0497] 21. A computer-readable medium storing a codec representation or a bitstream representation generated according to any one of the above methods.
[0498] The third group of items describes certain features and aspects of the technology disclosed in the previous sections (e.g., items 3-7).
[0499] 1. A video processing method (eg, Fig. 15C The method 1530 shown in FIG. 1 includes: for a conversion between a current block of a video and a codec representation of the video, deriving (1532) a prediction block of the current block determined according to a bidirectional codec unit-level weighting (BCW) tool, wherein a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; and performing (1534) a conversion using the prediction block, wherein deriving the prediction block includes: applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive a final prediction sample; and performing a right shift operation on the final prediction sample to convert the bit depth of the final prediction sample, wherein the right shift operation is pbSample>>(shift1+3), wherein pbSample represents the final prediction sample and shift1 is set to be equal to Max(2,14-bitDepth); determining the prediction block based on the final prediction sample.
[0500] 2. A method according to clause 1, wherein an offset is added to the final prediction sample before performing the right shift operation.
[0501] 3. The method of clause 1, wherein the offset is 1<<(shift1+2).
[0502] 4. A method according to clause 3, wherein the final prediction sample pbSamples[x][y] is derived so that pbSamples[x][y]=Clip3(0,(1<<bitDepth)-1,(w0*predSamplesL0[x][y]+w1*predSamplesL1[x][y]+offset3)> >(shift1+3)), where w0 and w1 are weights, and predSamplesL0[x][y] and predSamplesL1[x][y] are two intermediate prediction samples.
[0503] 5. The method of clause 1, wherein at least one of the weights belongs to a weight table, wherein entries of the weight table are non-monotonically increasing.
[0504] 6. A video processing method, comprising: for a conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional codec unit-level weighting (BCW) tool, wherein a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; performing the conversion using the prediction block, wherein deriving the prediction block comprises: applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive a final prediction sample; and adding an offset to the final prediction sample, the offset being 1<<(shift1+2), wherein shift1 is set equal to Max(2, 14-bitDepth); and determining the prediction block based on the final prediction sample.
[0505] 7. The method of clause 6, wherein determining the prediction block based on the final prediction samples comprises: performing a right shift operation on the final prediction samples to convert a bit depth of the final prediction samples.
[0506] 8. The method according to clause 1 or 7, wherein the right shift operation is pbSample>>(shift1+3), where pbSample represents the final prediction sample point.
[0507] 9. A method according to clause 8, wherein the final prediction sample pbSamples[x][y] is derived so that pbSamples[x][y]=Clip3(0,(1<<bitDepth)-1,(w0*predSamplesL0[x][y]+w1*predSamplesL1[x][y]+offset3)> >(shift1+3)), where w0 and w1 are weights, predSamplesL0[x][y] and predSamplesL1[x][y] are two intermediate prediction samples.
[0508] 10. The method of clause 6, wherein at least one of the weights belongs to a weight table, wherein entries of the weight table are non-monotonically increasing.
[0509] 11. A video processing method (eg, Fig.15D The method 1540 shown in the figure includes: for a conversion between a current block of a video and a codec representation of the video, deriving (1542) a motion vector difference of a Merge mode motion vector prediction value of the current block according to a rule; and performing (1544) the conversion based on the derivation, wherein the rule specifies whether to clip the motion vector difference to a range that is the same as a range used to clip the motion vector.
[0510] 12. A method according to clause 11, wherein the rule provides for clipping the motion vector differences to the same range as used for clipping the motion vectors.
[0511] 13. The method of clause 11, wherein the range used for clipping the motion vector is 18 bits.
[0512] 14. A method according to clause 13, wherein the range used for clipping motion vectors is [-2 17 ,2 17 –1].
[0513] 15. A method according to clause 11, wherein the rule provides for clipping the motion vector difference to [-2 17 +1,2 17 –1].
[0514] 16. A method according to clause 11, wherein the rule provides that motion vector differences are not clipped.
[0515] 17. A method according to clause 16, wherein the rule provides that the result obtained by adding the motion vector difference to the motion vector prediction candidate is clipped to 18 bits.
[0516] 18. A video processing method, comprising: for a conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional codec unit-level weighting (BCW) tool, wherein weights are used to determine a weighted sum of two initial prediction blocks used to determine the prediction block, wherein at least one of the weights belongs to a weight table, and the weight table is organized according to a rule; performing the conversion using the prediction block, wherein the rule stipulates that the entries of the weight table are non-monotonically increasing.
[0517] 19. The method of clause 18, wherein the weight table comprises an (i+1)th entry whose value is less than the value of the i-th entry.
[0518] 20. A video processing method, comprising: for a conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional codec unit-level weighting (BCW) tool, wherein weights are used to determine a weighted sum of two initial prediction blocks used to determine the prediction block, wherein at least one of the weights belongs to a weight table, and the weight table is selected from a plurality of weight tables; and performing the conversion using the prediction block.
[0519] 21. The method of clause 20, wherein the plurality of weight tables comprises {4,5,3,10,2}, {4,3,5,10,2}, {4,5,3,10,1}, {4,3,5,10,1}, or {4,5,3,10,-1}.
[0520] 22. A video processing method, comprising: for conversion between a current block of a video and a codec representation of the video, deriving a prediction block of the current block determined according to a bidirectional codec unit-level weighting (BCW) tool, wherein a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; performing the conversion using the prediction block, wherein deriving the prediction block comprises: converting intermediate prediction samples to a first bit depth; applying weights to the intermediate prediction samples to derive final prediction samples; and converting the final prediction samples to a second bit depth.
[0521] 23. A method according to clause 22, wherein the second bit depth is the bit depth of the color components of the current block.
[0522] 24. A method as described in clause 22, wherein the first bit-depth is not equal to the bit-depth of the intermediate prediction samples.
[0523] 25. The method of clause 22, wherein deriving the prediction block comprises a right shift operation to convert samples from a higher bit depth to a lower bit depth or a left shift operation to convert samples from a lower bit depth to a higher bit depth.
[0524] 26. The method of clause 25, wherein an offset is added before a right shift operation or a left shift operation.
[0525] 27. A method according to clause 22, wherein the final prediction sample pbSamples[x][y] is derived such that pbSamples[x][y]=Clip3(0,(1<<bitDepth)-1,(w0*((predSamplesL0[x][y]+offset1)> >shift1)+w1*((predSamplesL1[x][y]+offset1)>>shift1)+4)>>3), where w0 and w1 are weights, shift1 is set equal to Max(2, 14-bitDepth), and offset1 is set equal to 1<<(shift1-1).
[0526] 28. A video processing method ( Fig.15E The method 1550 shown in ) comprises: for a conversion between a current block of a video and a codec representation of the video, deriving (1552) a prediction block of the current block determined according to a bidirectional codec unit level weighting (BCW) tool, wherein a first weight and a second weight are used to determine a weighted sum of two initial prediction blocks used to determine the prediction block, and at least one of the first weight and the second weight is included in a weight table, wherein the weight table is organized according to a rule; performing the conversion using the prediction block, wherein the rule stipulates that the weight table is asymmetric.
[0527] 29. A method according to clause 28, wherein the weight table includes entries whose values correspond to the first weight W and does not include any entries whose values correspond to the second weight (1-W), whereby W is in the range of [a, b] and the sum of a and b (a+b) is equal to 1.
[0528] 30. A method according to clause 28, wherein, in the case where the prediction sample is generated by (W0*P0+W1*P1)>>N, the weight table includes an entry whose value corresponds to the first weight W and does not include an entry whose value corresponds to the second weight (2 N -W), where W0 and W1 are the first weight and the second weight applied to the two initial prediction blocks P0 and P1 respectively; (W0+W1) is equal to (1< <N)。
[0529] 31. A method according to any of clauses 1-30, wherein performing the conversion comprises generating a codec representation from the current video block.
[0530] 32. A method according to any of clauses 1-30, wherein performing the conversion comprises generating the current video block from a codec representation.
[0531] 33. A video processing device comprising a video processor configured to implement the method of any one or more of clauses 1-32.
[0532] 34. A computer readable medium storing program code which, when executed, causes a processor to implement the method of any one or more of clauses 1-32.
[0533] 35. A computer-readable medium storing a codec representation or a bitstream representation generated according to any one of the above methods.
[0534] From the foregoing, it will be appreciated that, for purposes of illustration, specific embodiments of the presently disclosed technology have been described herein, but that various modifications may be made without departing from the scope of the invention. Therefore, the presently disclosed technology is not to be limited except as set forth in the appended claims.
[0535] The examples and functional operations of the subject matter described herein can be implemented in various systems, digital electronic circuits, or computer software, firmware or hardware, including the structures disclosed in this specification and their structural equivalents, or a combination of one or more thereof. The examples of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a tangible and non-volatile computer-readable medium, for a data processing device to execute or control the operation of the data processing device. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a storage device, a material composition that affects a machine-readable propagation signal, or a combination of one or more thereof. The term "data processing unit" or "data processing device" includes all devices, equipment and machines for processing data, including, for example, a programmable processor, a computer or a multiprocessor or a computer group. In addition to hardware, the device may also include code that creates an execution environment for a computer program, for example, code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more thereof.
[0536] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language (including compiled or interpreted languages) and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program, or in multiple coordinated files (e.g., files that store one or more modules, subroutines, or portions of code). A computer program may be deployed for execution on one or more computers that are located at one site or distributed across multiple sites and interconnected by a communications network.
[0537] The processes and logic flows described in this specification may be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may also be performed by special purpose logic circuits, and the apparatus may also be implemented as special purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application specific integrated circuits).
[0538] For example, processors suitable for executing computer programs include general and special purpose microprocessors, and any one or more of any type of digital computer. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor that executes instructions and one or more storage devices that store instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or be coupled to one or more mass storage devices by operation to receive data from them or transfer data to one or more mass storage devices, or both. However, a computer does not necessarily have such a device. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices. The processor and memory can be supplemented by, or incorporated into, a dedicated logic circuit.
[0539] Instructions and Appendix Figure 1 The foregoing are intended to be regarded as exemplary only, where exemplary means example. 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. In addition, the use of "or" is intended to include "and / or" unless the context clearly indicates otherwise.
[0540] Although this patent document contains many details, they should not be construed as limitations on the scope of any invention or the claims, but rather as descriptions of features of particular embodiments of particular inventions. Certain features described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various functions described in the context of a single embodiment may also be implemented separately in multiple embodiments, or in any suitable subcombination. In addition, although the above-mentioned features may be described as working in certain combinations, or even initially claimed to be so, in some cases, one or more features in the claim combination may be removed from the combination, and the claim combination may be directed to subcombinations or variations of subcombinations.
[0541] Likewise, although operations are described in a particular order in the drawings, this should not be understood as requiring that such operations be performed in the particular order or order shown, or that all illustrated operations be performed, in order to achieve the desired results. In addition, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
[0542] Only a few examples and instances are described, and other examples, enhancements, and variations can be made based on what is described and illustrated in this patent document.
Claims
1. A method for processing video data, comprising: For a conversion between a current block of a video and a bitstream of the video, deriving a prediction block for the current block determined according to a tool in which a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; as well as performing said transforming based on said prediction block, Wherein, deriving the prediction block comprises: Applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive weighted prediction samples; and Performing a right shift operation on the weighted prediction sample, wherein the value of the right shift operation is (shift1 + 3), wherein shift1 is set equal to Max(2, 14-bitDepth), wherein bitDepth represents the sample bit depth; and determining the prediction block based on the weighted prediction samples with the right shift operation; Wherein, the method further comprises: applying a format rule to the bitstream, wherein the format rule specifies selectively including in the bitstream an indication of a skip mode codec for the current block, wherein the skip mode codec allows the conversion to be performed without generating a residual of the current block or without coding a residual of the current block, The format rule specifies that the indication is selectively included based on dimensions of the current block, wherein the dimensions of the current block include a height and a width of the current block.
2. The method according to claim 1, wherein: Before performing the right shift operation, an offset is added to the weighted prediction samples.
3. The method according to claim 2, wherein: The offset is offset3=1<<(shift1+2).
4. The method according to claim 3, wherein: Determining the prediction block based on the weighted prediction samples with the right shift operation includes deriving final prediction samples, where pbSamples[ x ][ y ] = Clip3( 0, (1 <<bitDepth ) – 1,( w0 * predSamplesL0[ x ][ y ] + w1*predSamplesL1[ x ][ y ] +offset3 ) > > (shift1+3) ), Among them, pbSamples[ x ][ y ] represents the final prediction sample point, w0 and w1 are the weights, predSamplesL0 [x] [y] and predSamplesL1 [ x] [y] are the two intermediate prediction sample points, and w0 *predSamplesL0[ x ][ y ] + w1*predSamplesL1[ x ][ y ] represents the weighted prediction sample point.
5. The method according to claim 1, wherein: At least one of the weights belongs to a weight table, wherein the weight values in the weight table are non-monotonically increasing.
6. The method according to claim 5, wherein: The weight table includes an (i+1)th entry, and a value of the (i+1)th entry is less than or equal to a value of the i-th entry.
7. The method according to claim 1, wherein: The format rule provides that the selectively including the indication is further based on: a slice type of a slice including the current block and a flag indicating whether an intra block copy (IBC) mode is enabled for the current block, wherein the flag is denoted as sps_ibc_enabled_flag.
8. The method according to claim 1, wherein: The format rule specifies that the indication is included in the bitstream if the following conditions are met: 1) the slice type of the slice including the current block is an I slice, 2) sps_ibc_enabled_flag is set to true, 3) the height and width of the current block are less than or equal to N, where N=64, and 4) under the dual-tree partitioning structure, the current block is not a chroma component.
9. The method according to claim 1, wherein: The format rule provides that the selectively including the indication is independent of a flag indicating whether a palette mode is enabled for the current block, wherein the flag is denoted sps_palette_enabled_flag.
10. The method according to claim 1, wherein: The tool is a bidirectional codec unit-level weighting (BCW) tool.
11. The method according to claim 1, wherein: To convert the bit depth of the weighted prediction samples, the right shift operation is performed.
12. The method according to claim 1, wherein: The converting includes encoding the current block into the bitstream.
13. The method according to claim 1, wherein: The converting includes decoding the current block from the bitstream.
14. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein: The instructions, when executed by the processor, cause the processor to: For a conversion between a current block of a video and a bitstream of the video, deriving a prediction block for the current block determined according to a tool in which a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; as well as performing said transforming based on said prediction block, Wherein, deriving the prediction block comprises: Applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive weighted prediction samples; and Performing a right shift operation on the weighted prediction sample, wherein the value of the right shift operation is (shift1 + 3), wherein shift1 is set equal to Max(2, 14-bitDepth), wherein bitDepth represents the sample bit depth; and determining the prediction block based on the weighted prediction samples with the right shift operation; The instructions further cause the processor to: applying a format rule to the bitstream, wherein the format rule specifies selectively including in the bitstream an indication of a skip mode codec for the current block, wherein the skip mode codec allows the conversion to be performed without generating a residual of the current block or without coding a residual of the current block, The format rule specifies that the indication is selectively included based on dimensions of the current block, wherein the dimensions of the current block include a height and a width of the current block.
15. The device according to claim 14, wherein: Before performing the right shift operation, an offset is added to the weighted prediction samples.
16. A non-transitory computer-readable storage medium storing instructions that cause a processor to: For a conversion between a current block of a video and a bitstream of the video, deriving a prediction block for the current block determined according to a tool in which a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; as well as performing said transforming based on said prediction block, in, Deriving the prediction block comprises: Applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive weighted prediction samples; and Performing a right shift operation on the weighted prediction sample, wherein the value of the right shift operation is (shift1 + 3), wherein shift1 is set equal to Max(2, 14-bitDepth), wherein bitDepth represents the sample bit depth; and determining the prediction block based on the weighted prediction samples with the right shift operation; The instructions further cause the processor to: applying a format rule to the bitstream, wherein the format rule specifies selectively including in the bitstream an indication of a skip mode codec for the current block, wherein the skip mode codec allows the conversion to be performed without generating a residual of the current block or without coding a residual of the current block, The format rule specifies that the indication is selectively included based on dimensions of the current block, wherein the dimensions of the current block include a height and a width of the current block.
17. The non-transitory computer-readable storage medium of claim 16, wherein: Before performing the right shift operation, an offset is added to the weighted prediction samples.
18. A method for storing a bit stream of a video, comprising: For a current block of a video, deriving a prediction block for the current block determined according to a tool in which a weight is used to determine a weighted sum of two initial prediction blocks used to determine the prediction block; generating the bitstream based on the prediction block; as well as storing the bitstream in a non-transitory computer-readable storage medium, Wherein, deriving the prediction block comprises: Applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive weighted prediction samples; and Performing a right shift operation on the weighted prediction sample, wherein the value of the right shift operation is (shift1 + 3), wherein shift1 is set equal to Max(2, 14-bitDepth), wherein bitDepth represents the sample bit depth; and determining the prediction block based on the weighted prediction samples with the right shift operation; applying a format rule to the bitstream, wherein the format rule provides for selectively including in the bitstream an indication of a skip mode codec for the current block, wherein the skip mode codec allows the prediction block to be determined without generating a residual of the current block or without coding a residual of the current block, The format rule specifies that the indication is selectively included based on dimensions of the current block, wherein the dimensions of the current block include a height and a width of the current block.
19. A video processing method, comprising: For a conversion between a current block of a video and a bitstream of the video, deriving a prediction block for the current block determined according to a bidirectional codec level weighting (BCW) tool, wherein a weight is used to determine a weighted sum of two initial prediction blocks, the two initial prediction blocks being used to determine the prediction block; as well as performing said transforming using said prediction block, Wherein, deriving the prediction block comprises: Applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive a final prediction sample; and performing a right shift operation on the final prediction sample to convert the bit depth of the final prediction sample, wherein the right shift operation is pbSample >> (shift1 + 3), wherein pbSample represents the final prediction sample, and shift1 is set equal to Max(2, 14-bitDepth); and Determine the prediction block based on the final prediction sample point; Wherein, the method further comprises: applying a format rule to the bitstream, wherein the format rule specifies selectively including in the bitstream an indication of a skip mode codec for the current block, wherein the skip mode codec allows the conversion to be performed without generating a residual of the current block or without coding a residual of the current block, The format rule specifies that the indication is selectively included based on dimensions of the current block, wherein the dimensions of the current block include a height and a width of the current block.
20. The method according to claim 19, wherein: Before performing the right shift operation, an offset is added to the final prediction sample.
21. The method according to claim 20, wherein: The shift is 1 << (shift1 + 2).
22. The method according to claim 21, wherein: The final prediction sample pbSamples [x] [y] is derived so that pbSamples [x] [y] = Clip3(0, (1 << bitDepth) - 1, (w0 * predSamplesL0 [x] [y] + w1 * predSamplesL1 [x] [y] + offset3) >> (shift1 + 3)), where w0 and w1 are the weights, and predSamplesL0 [x] [y] and predSamplesL1 [x] [y] are the two intermediate prediction samples.
23. The method according to claim 19, wherein: At least one of the weights belongs to a weight table, wherein entries of the weight table are non-monotonically increasing.
24. A video processing method, comprising: For a conversion between a current block of a video and a bitstream of the video, deriving a prediction block for the current block determined according to a bidirectional codec level weighting (BCW) tool, wherein a weight is used to determine a weighted sum of two initial prediction blocks, the two initial prediction blocks being used to determine the prediction block; as well as performing said transforming using said prediction block, Wherein, deriving the prediction block comprises: Applying the weight to two intermediate prediction samples respectively belonging to the two initial prediction blocks to derive a final prediction sample; and adding an offset to the final prediction sample, wherein the offset is 1 << (shift1 + 2), wherein shift1 is set equal to Max(2, 14-bitDepth); and Determine the prediction block based on the final prediction sample point; Wherein, the method further comprises: applying a format rule to the bitstream, wherein the format rule specifies selectively including in the bitstream an indication of a skip mode codec for the current block, wherein the skip mode codec allows the conversion to be performed without generating a residual of the current block or without coding a residual of the current block, The format rule specifies that the indication is selectively included based on dimensions of the current block, wherein the dimensions of the current block include a height and a width of the current block.
25. The method according to claim 24, wherein: Determining the prediction block based on the final prediction samples includes: performing a right shift operation on the final prediction samples to convert a bit depth of the final prediction samples.
26. The method according to claim 25, wherein: The right shift operation is pbSample >> (shift1 + 3), where pbSample represents the final prediction sample point.
27. The method according to claim 26, wherein: The final prediction sample pbSamples [x] [y] is derived so that pbSamples [x] [y] = Clip3(0, (1 << bitDepth) - 1, (w0 *predSamplesL0[x][y] + w1*predSamplesL1[x][y] + offset3) >> (shift1+3)), where w0 and w1 are the weights, and predSamplesL0 [x] [y] and predSamplesL1 [x] [y] are the two intermediate prediction samples.
28. The method of claim 24, wherein: At least one of the weights belongs to a weight table, wherein entries of the weight table are non-monotonically increasing.
29. The method according to any one of claims 19 to 28, wherein: Performing the conversion includes generating the bitstream from the current block.
30. The method according to any one of claims 19 to 28, wherein: Performing the conversion includes generating the current block from the bitstream.
31. A video processing device, comprising a video processor, wherein the processor is configured to implement the method according to any one of claims 19-28.
32. A computer readable medium storing program code, which, when executed, causes a processor to implement the method according to any one of claims 19 to 28.