Method and device for video processing and medium

By adopting intra-block copying and predictive encoding and decoding methods in video encoding and decoding, combined with the technology of derive the context initialization probability, the problem of insufficient encoding and decoding efficiency in the prior art is solved, and more efficient video encoding and decoding is achieved.

CN119732055APending Publication Date: 2025-03-28DOUYIN VISION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380032627.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-04-05
Filing Date
2023-04-04
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies have shortcomings in improving encoding and decoding efficiency, especially in intra-block replication and context initialization.

Method used

A video processing method is proposed, which encodes and codes the video unit through intra-block copy mode, and uses symbols with poor block vectors to perform predictive encoding and codecs. In addition, the method further includes determining the context initialization probability of the first band based on the second band information of the video unit and applying these probabilities during the encoding and decoding process.

Benefits of technology

Through intra-block copying and predictive encoding and decoding, the efficiency of video encoding and decoding is improved. At the same time, by derive the context initialization probability, the encoding and decoding process is further optimized and the overall encoding and decoding performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119732055A_ABST
    Figure CN119732055A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a solution for video processing. A method for video processing is presented. The method comprises: for a conversion between a video unit of a video and a bitstream of the video, determining a symbol of a block vector difference for the video unit, where the symbol is predictively coded and the video unit is coded using an Intra Block Copy (IBC) mode; and performing the conversion based on the sign and value of the block vector difference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate generally to video processing techniques, and more particularly to context adaptive variable length coding (CABAC) initialization and intra block copying in image / video coding. Background Art

[0002] Nowadays, digital video capabilities are being applied to all aspects of people's lives. For video encoding / decoding, various types of video compression technologies have been proposed, such as MPEG-2, MPEG-4, ITU-T H.263, ITU-TH.264 / MPEG-4 Part 10 Advanced Video Codec (AVC), ITU-T H.265 High Efficiency Video Codec (HEVC) standard, and Versatile Video Codec (VVC) standard. However, it is generally expected that the encoding and decoding efficiency of video encoding and decoding technologies can be further improved. Public Content

[0003] The embodiments of the present disclosure provide a solution for video processing.

[0004] In a first aspect, a method for video processing is proposed. The method comprises: for conversion between a video unit of a video and a bit stream of the video, determining a sign of a block vector difference of the video unit, wherein the sign is predictively coded and the video unit is coded using an intra-frame block copy (IBC) mode; and performing the conversion based on the sign and value of the block vector difference. According to the first aspect of the present disclosure, a signal can be predicted and coded, thereby improving coding efficiency.

[0005] In a second aspect, another method for video processing is proposed. The method includes: for conversion between a video unit of a video and a bitstream of the video, determining a context initialization probability of a first stripe of the video unit based on information of a second stripe of the video unit; and performing the conversion based on the context initialization probability. According to the second aspect of the present disclosure, the context initialization probability can be derived from the time information, thereby improving the encoding and decoding efficiency.

[0006] In a third aspect, another method for video processing is proposed. The method includes: for conversion between a video unit of a video and a bitstream of the video, determining that a block vector of the video unit is outside a reference area, and wherein the video unit is encoded and decoded using an intra-frame block copy (IBC) mode; changing a value of the block vector; and performing the conversion based on the changed value of the block vector. According to the third aspect of the present disclosure, the invalid block vector can be changed, thereby improving the encoding and decoding efficiency.

[0007] In a fourth aspect, a video processing device is provided. The device includes a processor and a non-volatile memory having instructions thereon. When the instructions are executed by the processor, the processor executes the method according to the first, second or third aspect of the present disclosure.

[0008] In a fifth aspect, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores instructions, and the instructions enable a processor to execute the method according to the first, second or third aspect of the present disclosure.

[0009] In a sixth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by an apparatus for video processing. The method includes: determining a sign of a block vector difference of a video unit, wherein the sign is predictively encoded and decoded, and the video unit is encoded and decoded using an intra-frame block copy (IBC) mode; and generating a bitstream based on the sign and value of the block vector difference.

[0010] In a seventh aspect, a method for storing a bitstream of a video is provided, the method comprising: determining a sign of a block vector difference of a video unit, wherein the sign is predictively encoded and decoded, and the video unit is encoded and decoded using an intra-frame block copy (IBC) mode; generating a bitstream based on the sign and value of the block vector difference; and storing the bitstream in a non-transitory computer-readable recording medium.

[0011] In an eighth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by an apparatus for video processing. The method includes: determining a context initialization probability of a first slice of a video unit based on information of a second slice of a video unit; and generating a bitstream based on the context initialization probability.

[0012] In a ninth aspect, a method for storing a bitstream of a video is provided, wherein the method comprises: determining a context initialization probability of a first slice of a video unit based on information of a second slice of a video unit; generating a bitstream based on the context initialization probability; and storing the bitstream in a non-transitory computer-readable recording medium.

[0013] In a tenth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by an apparatus for video processing. The method includes: determining that a block vector of a video unit is outside a reference area, and wherein the video unit is encoded and decoded using an intra-frame block copy (IBC) mode; changing a value of the block vector; and generating a bitstream based on the changed value of the block vector.

[0014] In an eleventh aspect, a method for storing a bitstream of a video is provided. The method includes: determining that a block vector of a video unit is outside a reference area, and wherein the video unit is encoded and decoded using an intra-block copy (IBC) mode; changing a value of the block vector; generating a bitstream based on the changed value of the block vector; and storing the bitstream in a non-transitory computer-readable recording medium.

[0015] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become more apparent through the following detailed description with reference to the accompanying drawings. In the exemplary embodiments of the present disclosure, the same reference numerals generally refer to the same components.

[0017] Figure 1 A block diagram showing an example video encoding and decoding system according to some embodiments of the present disclosure is shown;

[0018] Figure 2 A block diagram of a first example video encoder according to some embodiments of the present disclosure is shown;

[0019] Figure 3 A block diagram of an example video decoder according to some embodiments of the present disclosure is shown;

[0020] Figure 4 An example of the current CTU processing order and its available reference samples in the current and left CTUs is shown;

[0021] Figure 5 An example of a residual encoding and decoding pass for transforming a skipped block is shown;

[0022] Figure 6 An example of a block encoded and decoded in palette mode is shown;

[0023] Figure 7 A sub-block based index map scan for a palette is shown, the left side for horizontal scanning and the right side for vertical scanning;

[0024] Figure 8 An example of a decoding flow chart with ACT is shown;

[0025] Fig. 9 shows an example of the intra-frame template matching search area used;

[0026] Fig.10 shows a flow chart for decoding binary bits;

[0027] Fig.11 An example of a residual codec structure for a transform block is shown;

[0028] Fig.12 An example of a template for selecting a probabilistic model is shown, where the black square specifies the current scan position and the grey square represents the local neighborhood used;

[0029] Fig.13 An example of pruning invalid BV candidates into valid BV candidates is shown;

[0030] Fig.14 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown;

[0031] Fig.15 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown;

[0032] Fig.16 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown;

[0033] Fig.17 shows a block diagram of a computing device in which various embodiments of the present disclosure may be implemented;

[0034] Throughout the drawings, the same or similar reference numbers generally refer to the same or similar elements. DETAILED DESCRIPTION

[0035] The principle of the present disclosure will now be described with reference to some embodiments. It should be understood that these embodiments are described only for the purpose of illustrating and helping those skilled in the art to understand and implement the present disclosure, and do not imply any limitation on the scope of the present disclosure. In addition to the methods described below, the disclosure described herein can also be implemented in various ways.

[0036] In the following description and claims, unless otherwise defined, all scientific and technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present disclosure belongs.

[0037] References in this disclosure to "one embodiment," "an embodiment," "an example embodiment," and the like indicate that the described embodiment may include a particular feature, structure, or characteristic, but not every embodiment must include the particular feature, structure, or characteristic. Furthermore, these phrases do not necessarily refer to the same embodiment. Furthermore, when a particular feature, structure, or characteristic is described in conjunction with an example embodiment, whether or not explicitly described, it is considered to be within the knowledge of those skilled in the art to affect such feature, structure, or characteristic in relation to other embodiments.

[0038] It should be understood that although the terms "first" and "second" etc. can be used to describe various elements, these elements should not be limited to these terms. These terms are only used to distinguish one element from another element. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element without departing from the scope of the exemplary embodiments. As used herein, the term "and / or" includes any and all combinations of one or more of the listed terms.

[0039] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments. As used herein, the singular forms "a", "an", and "the" are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms "comprises", "includes", and / or "having" when used herein indicate the presence of the features, elements, and / or components, etc., but do not exclude the presence or addition of one or more other features, elements, components, and / or combinations thereof. Example Environment

[0040] Figure 1 1 is a block diagram illustrating an example video codec system 100 that can utilize the techniques of the present disclosure. As shown, the video codec system 100 may include a source device 110 and a destination device 120. The source device 110 may also be referred to as a video encoding device, and the destination device 120 may also be referred to as a video decoding device. In operation, the source device 110 may be configured to generate encoded video data, and the destination device 120 may be configured to decode the encoded video data generated by the source device 110. The source device 110 may include a video source 112, a video encoder 114, and an input / output (I / O) interface 116.

[0041] Video source 112 may include a source such as a video capture device. Examples of a video capture device include, but are not limited to, an interface that receives video data from a video content provider, a computer graphics system for generating video data, and / or combinations thereof.

[0042] The video data may include one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a bitstream. The bitstream may include a bit sequence that forms a codec representation of the video data. The bitstream may include a codec picture and associated data. The codec picture is a codec representation of the picture. The associated data may include a sequence parameter set, a picture parameter set, and other grammatical structures. The I / O interface 116 may include a modulator / demodulator and / or a transmitter. The encoded video data may be directly transmitted to the destination device 120 via the network 130A via the I / O interface 116. The encoded video data may also be stored on a storage medium / server 130B for access by the destination device 120.

[0043] The destination device 120 may include an I / O interface 126, a video decoder 124, and a display device 122. The I / O interface 126 may include a receiver and / or a modem. The I / O interface 126 may obtain encoded video data from the source device 110 or the storage medium / server 130B. The video decoder 124 may decode the encoded video data. The display device 122 may display the decoded video data to the user. The display device 122 may be integrated with the destination device 120, or may be outside the destination device 120, which is configured to be connected to an external display device interface.

[0044] The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Codec (HEVC) standard, the Versatile Video Codec (VVC) standard, and other existing and / or further standards.

[0045] Figure 2 is a block diagram showing an example of a video encoder 200 according to some embodiments of the present disclosure, which may be Figure 1 An example of a video encoder 114 in the system 100 is shown.

[0046] Video encoder 200 may be configured to implement any or all of the techniques of this disclosure. Figure 2 In the example of , video encoder 200 includes multiple functional components. The techniques described in this disclosure can be shared between the various components of video encoder 200. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.

[0047] In some embodiments, the video encoder 200 may include a partitioning unit 201, a prediction unit 202, a residual generation unit 207, a transformation unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transformation unit 211, a reconstruction unit 212, a buffer 213 and an entropy coding and decoding unit 214, and the prediction unit 202 may include a mode selection unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-frame prediction unit 206.

[0048] In other examples, the video encoder 200 may include more, fewer, or different functional components. In one example, the prediction unit 202 may include an intra-block copy (IBC) unit. The IBC unit may perform prediction in an IBC mode, where at least one reference picture is a picture where the current video block is located.

[0049] Furthermore, although some components (such as the motion estimation unit 204 and the motion compensation unit 205) may be integrated, for the purpose of explanation, these components are described in detail below. Figure 2 are shown separately in the example.

[0050] The partitioning unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.

[0051] The mode selection unit 203 may select one of a plurality of codec modes (intra or inter), for example, based on the error result, and provide the generated intra codec block or inter codec block to the residual generation unit 207 to generate residual block data, and to the reconstruction unit 212 to reconstruct the codec block for use as a reference picture. In some examples, the mode selection unit 203 may select a combination of intra and inter prediction (CIIP) modes, where the prediction is based on an inter prediction signal and an intra prediction signal. In the case of inter prediction, the mode selection unit 203 may also select a resolution for the motion vector (e.g., sub-pixel precision or integer pixel precision) for the block.

[0052] To perform inter-frame prediction on the current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing the current video block with one or more reference frames from the buffer 213. The motion compensation unit 205 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from the buffer 213 other than the picture associated with the current video block.

[0053] The motion estimation unit 204 and the motion compensation unit 205 may perform different operations on the current video block, for example, depending on whether the current video block is in an I slice, a P slice, or a B slice. As used herein, an "I slice" may refer to a portion of a picture consisting of macroblocks, all of which are based on macroblocks within the same picture. Furthermore, as used herein, in some aspects, a "P slice" and a "B slice" may refer to a portion of a picture consisting of macroblocks that are independent of macroblocks in the same picture.

[0054] In some examples, the motion estimation unit 204 may perform unidirectional prediction on the current video block, and the motion estimation unit 204 may search the reference pictures of list 0 or list 1 to find the reference video block for the current video block. The motion estimation unit 204 may then generate a reference index and a motion vector, the reference index indicating the reference picture in list 0 or list 1 containing the reference video block, and the motion vector indicating the spatial displacement between the current video block and the reference video block. The motion estimation unit 204 may output the reference index, the prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the reference video block indicated by the motion information of the current video block.

[0055] Alternatively, in other examples, the motion estimation unit 204 may perform bidirectional prediction on the current video block. The motion estimation unit 204 may search the reference pictures in list 0 for a reference video block for the current video block, and may also search the reference pictures in list 1 for another reference video block for the current video block. The motion estimation unit 204 may then generate a plurality of reference indexes and a plurality of motion vectors, the plurality of reference indexes indicating a plurality of reference pictures in list 0 and list 1 containing a plurality of reference video blocks, and the plurality of motion vectors indicating a plurality of spatial displacements between the plurality of reference video blocks and the current video block. The motion estimation unit 204 may output the plurality of reference indexes and the plurality of motion vectors of the current video block as motion information of the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the plurality of reference video blocks indicated by the motion information of the current video block.

[0056] In some examples, motion estimation unit 204 may output a complete set of motion information for use in a decoding process by a decoder. Alternatively, in some embodiments, motion estimation unit 204 may signal motion information of a current video block with reference to motion information of another video block. For example, motion estimation unit 204 may determine that motion information of a current video block is sufficiently similar to motion information of a neighboring video block.

[0057] In one example, motion estimation unit 204 may indicate to video decoder 300 a value in a syntax structure associated with the current video block that indicates that the current video block has the same motion information as another video block.

[0058] In another example, the motion estimation unit 204 may identify another video block and a motion vector difference (MVD) in a syntax structure associated with the current video block. The motion vector difference indicates the difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 300 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.

[0059] As discussed above, the video encoder 200 may signal motion vectors in a predictive manner.Two examples of prediction signaling techniques that may be implemented by the video encoder 200 include Advanced Motion Vector Prediction (AMVP) and merge mode signaling.

[0060] The intra prediction unit 206 may perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a prediction video block and various syntax elements.

[0061] The residual generation unit 207 may generate residual data for the current video block by subtracting (e.g., indicated by a minus sign) the prediction video block(s) of the current video block from the current video block. The residual data of the current video block may include residual video blocks corresponding to different sample portions of samples in the current video block.

[0062] In other examples, such as in skip mode, there may be no residual data for the current video block, and the residual generation unit 207 may not perform a subtraction operation.

[0063] Transform processing unit 208 may generate one or more transform coefficient video blocks for a current video block by applying one or more transforms to the residual video block associated with the current video block.

[0064] After transform processing unit 208 generates a transform coefficient video block associated with the current video block, quantization unit 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values ​​associated with the current video block.

[0065] The inverse quantization unit 210 and the inverse transform unit 211 may apply inverse quantization and inverse transform to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. The reconstruction unit 212 may add the reconstructed residual video block to corresponding samples from one or more prediction video blocks generated by the prediction unit 202 to generate a reconstructed video block associated with the current video block for storage in the buffer 213.

[0066] After reconstruction unit 212 reconstructs the video block, a loop filtering operation may be performed to reduce video blocking artifacts in the video block.

[0067] The entropy coding unit 214 may receive data from other functional components of the video encoder 200. When the entropy coding unit 214 receives data, the entropy coding unit 214 may perform one or more entropy coding operations to generate entropy coded data and output a bitstream including the entropy coded data.

[0068] Figure 3 is a block diagram showing an example of a video decoder 300 according to some embodiments of the present disclosure, which may be Figure 1 An example of a video decoder 124 in the system 100 is shown.

[0069] Video decoder 300 may be configured to perform any or all of the techniques of this disclosure. Figure 3In the example of , video decoder 300 includes multiple functional components. The techniques described in this disclosure can be shared between the various components of video decoder 300. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.

[0070] exist Figure 3 In the example of , the video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, and a reconstruction unit 306 and a buffer 307. In some examples, the video decoder 300 can perform a decoding process that is generally opposite to the encoding process described with respect to the video encoder 200.

[0071] The entropy decoding unit 301 can retrieve the encoded bitstream. The encoded bitstream may include entropy encoded video data (e.g., encoded video data blocks). The entropy decoding unit 301 can decode the entropy encoded video data, and the motion compensation unit 302 can determine motion information from the entropy decoded video data, the motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 can determine the information, for example, by performing AMVP and merge mode. AMVP is used, including deriving several most likely candidates based on data and reference pictures of adjacent PBs. The motion information typically includes horizontal and vertical motion vector displacement values, one or two reference picture indexes, and in the case of prediction areas in B strips, also includes an identification of which reference picture list is associated with each index. As used herein, in some aspects, "merge mode" may refer to deriving motion information from blocks that are adjacent in space or time.

[0072] The motion compensation unit 302 may generate motion compensated blocks, possibly performing interpolation based on interpolation filters.Identifiers for the interpolation filters used with sub-pixel precision may be included in the syntax elements.

[0073] The motion compensation unit 302 may calculate interpolated values ​​for sub-integer pixels of a reference block using interpolation filters used by the video encoder 200 during encoding of the video block. The motion compensation unit 302 may determine the interpolation filters used by the video encoder 200 based on received syntax information, and the motion compensation unit 302 may use the interpolation filters to generate a prediction block.

[0074] The motion compensation unit 302 may use at least part of the syntax information to determine the size of blocks used to encode (multiple) frames and / or (multiple) slices of the encoded video sequence, partition information describing how each macroblock of a picture of the encoded video sequence is partitioned, a mode indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-frame coding block, and other information for decoding the encoded video sequence. As used herein, in some aspects, a "slice" may refer to a data structure that can be decoded independently of other slices of the same picture in terms of entropy coding, signal prediction, and residual signal reconstruction. A slice may be an entire picture, or it may be a region of a picture.

[0075] The intra prediction unit 303 may use, for example, an intra prediction mode received in the bitstream to form a prediction block from spatially neighboring blocks. The inverse quantization unit 304 inverse quantizes (i.e., dequantizes) the quantized video block coefficients provided in the bitstream and decoded by the entropy decoding unit 301. The inverse transform unit 305 applies an inverse transform.

[0076] The reconstruction unit 306 may obtain the decoded block, for example, by adding the residual block to the corresponding prediction block generated by the motion compensation unit 302 or the intra prediction unit 303. If necessary, a deblocking filter may also be applied to filter the decoded block to remove blocking artifacts. The decoded video block is then stored in a buffer 307, which provides reference blocks for subsequent motion compensation / intra prediction, and the buffer 307 also generates the decoded video for presentation on a display device.

[0077] Some example embodiments of the present disclosure will be described in detail below. It should be noted that the section titles used in this document are for ease of understanding, and the embodiments disclosed in the section are not limited to that section. In addition, although some embodiments are described with reference to general video codecs or other specific video codecs, the disclosed technology is also applicable to other video coding and decoding technologies. In addition, although some embodiments describe the video encoding steps in detail, it should be understood that the corresponding decoding steps of canceling the encoding will be implemented by the decoder. In addition, the term "video processing" includes video coding or compression, video decoding or decompression, and video transcoding, in which video pixels are represented from one compression format to another compression format or at different compression bit rates. 1. Brief Overview The present disclosure relates to video coding technology. Specifically, about context / CABAC initialization, intra-frame block copy and / or current picture reference in image / video coding. It can be applied to existing video coding standards such as HEVC, VVC, etc. It can also be applied to future video coding standards or video codecs. 2 Introduction 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 Visual, and the two organizations jointly developed H.262 / MPEG-2 Video and H.264 / MPEG-4 Advanced Video Codec (AVC) and H.265 / HEVC (Higher Education Video Codec, 4th edition, Rec. ITU-T H.265, ISO / IEC 23008-2, December 2016) standards. Since H.262, video codec standards have been based on a hybrid video codec structure, which uses temporal prediction plus transform codec. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly founded the Joint Video Exploration Team (JVET) in 2015. JVET meetings are held simultaneously every quarter. The new video codec standard was officially named Versatile Video Codec (VVC) at the JVET meeting in April 2018, when the first version of the VVC Test Model (VTM) was released. The VVC working draft and the test model VTM (VTM software: https: / / vcgit.hhi.fraunhofer.de / jvet / VVCSoftware_VTM.git) are updated after each meeting. The VVC project achieved technical completion (FDIS) at the July 2020 meeting (Versatile Video Codec, Version 1, Rec.ITU-T H.266, ISO / IEC FDIS23090-3, July 2020). 2.1 Existing screen content encoding and decoding tools 2.1.1 Intra-block copy (IBC) Intra-block copying (IBC) is a tool adopted in the HEVC extension on SCC. It is well known that it significantly improves the encoding and decoding efficiency of screen content materials. Since the IBC mode is implemented as a block-level codec 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 has integer precision. The chrominance block vector is also rounded to integer precision. When combined with AMVR, the IBC mode can 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 whose width and height are both less than or equal to 64 luminance samples. On the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD checks on blocks with 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. In hash-based search, the hash key matching (32-bit CRC) between the current block and the reference blocks is extended to all allowed block sizes. The hash key calculation for each position in the current picture is based on 4×4 sub-blocks. For current blocks of larger size, the hash key is determined to match the hash key of the reference block when all hash keys in all 4×4 sub-blocks match the hash keys in the corresponding reference positions. If multiple reference blocks are found whose hash keys match the hash key of the current block, the block vector cost of each matching reference is calculated and the one with the smallest cost is selected. In the block matching search, the search range is set to cover the previous CTU and the current CTU. At CU level, the IBC mode is signaled through a flag, which can be signaled as IBC AMVP mode or IBC Skip / Merge mode as shown below: – IBC skip / merge mode: The merge candidate index is used to indicate which block vector from the list of neighboring candidate IBC codec blocks is used to predict the current block. The merge list consists of spatial candidates, HMVP candidates and pairwise candidates. – 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 one from the top neighbor (if IBC coded). When either neighbor is not available, the default block vector is used as predictor. A flag is signaled to indicate the block vector predictor index. 2.1.1.1 IBC Reference Area In order to reduce memory consumption and decoder complexity, IBC in VVC only allows the reconstruction of predefined areas, which include the area of ​​the current CTU and a certain area of ​​the left CTU. Figure 4 The reference area of ​​the IBC mode is shown, where each block represents a 64×64 luma sample unit. Depending on the location of the current codec CU location within the current CTU, the following applies: – If the current block falls into the 64×64 block to the upper left of the current CTU, in addition to the samples already reconstructed in the current CTU, the CPR mode can be used to refer to the reference samples in the lower right 64x64 block of the left CTU. The current block can also use the CPR mode to refer to the reference samples in the lower left 64×64 block of the left CTU and the reference samples in the upper right 64×64 block of the left CTU. –If the current block falls into the 64×64 block to the upper right of the current CTU, in addition to the samples that have been reconstructed in the current CTU, if the luma position (0, 64) has not been reconstructed relative to the current CTU, the current block can also use the CPR mode to refer to the reference samples in the lower left 64×64 block and the lower right 64×64 block of the left CTU; otherwise, the current block can also refer to the reference samples in the lower right 64×64 block of the left CTU. – If the current block falls into the 64×64 block at the lower left of the current CTU, in addition to the samples that have been reconstructed in the current CTU, if the luma position (64, 0) has not been reconstructed relative to the current CTU, the current block can also use the CPR mode to refer to the reference samples in the upper right 64×64 block and the lower right 64×64 block of the left CTU. Otherwise, the current block can also use the CPR mode to refer to the reference samples in the lower right 64×64 block of the left CTU. – If the current block falls into the 64×64 block to the lower right of the current CTU, only the CPR mode can be used to refer to the samples that have been reconstructed in the current CTU. This restriction allows the IBC mode to be implemented using local on-chip memory for hardware implementation. 2.1.1.2 Interaction between IBC and other codecs The interaction between IBC mode and other inter-frame codec tools in VVC, such as pairwise merge candidates, history-based motion vector predictor (HMVP), combined intra / frame prediction modes (CIIP), merge mode with motion vector difference (MMVD), and geometric partition model (GPM), is as follows: -IBC can be used with pairwise merge candidates and HMVP. A new pairwise IBC merge candidate can be generated by averaging two IBC merge candidates. For HMVP, IBC motions are inserted into the history buffer for future reference. - IBC cannot be used in conjunction with the following interframe tools: Affine Motion, CIIP, MMVD, and GPM. - When DUAL_TREE partitioning is used, IBC is not allowed for chroma codec blocks. Unlike in the HEVC screen content codec extension, the current picture is no longer included as one of the reference pictures in reference picture list 0 for IBC prediction. The motion vector derivation process for IBC mode excludes all neighboring blocks in inter mode and vice versa. The following IBC design aspects are applied: - IBC shares the same process as regular MV merging, including pairwise merging candidates and history-based motion predictors, but TMVP and zero vectors are not allowed as they are invalid for IBC mode. - Separate HMVP buffers (5 candidates each) for legacy MV and IBC. - Block vector constraints are implemented as bitstream consistency constraints, where the encoder needs to ensure that there are no invalid vectors in the bitstream and that merges should not be used if the merge candidate is invalid (out of range or 0). This bitstream consistency constraint is represented by a virtual buffer as described below. - For deblocking, IBC is handled as an inter mode. - If the current block is coded using IBC prediction mode, AMVR does not use quarter pixels; instead, AMVR is signaled to only indicate whether the MV is inter-pixel or 4 integer pixels. - The number of IBC merge candidates may be signaled in the slice header separately from the number of normal, sub-block and geometric merge candidates. The virtual buffer concept is used to describe the allowable reference area for IBC prediction mode and valid block vectors. Denoting the CTU size as ctbSize, the width of the virtual buffer ibcBuf is wIbcBuf=128×128 / ctbSize, and the height hIbcBuf=ctbSize. For example, for a CTU of size 128×128, the size of ibcBuf is also 128×128; for a CTU of size 64×64, the size of ibcBuf is 256×64; and for a CTU of size 32×32, the size of ibcBuf is 512×32. The size of VPDU in each dimension is min(ctbSize,64), W v =min(ctbSize,64). The virtual IBC buffer ibcBuf is maintained as follows. - At the start of decoding each CTU line, flush the entire ibcBuf with an invalid value of -1. - When starting to decode a VPDU (xVPDU, yVPDU) relative to the top left corner of the picture, set ibcBuf[x][y]=-1, where x=xVPDU%wIbcBuf,...,xVPDU%wIbcBuf+W v -1; y=yVPDU%ctbSize,…,yVPDU%ctbSize+W v -1. -After decoding, the CU contains the (x,y) relative to the upper left corner of the picture, set ibcBuf[x%wIbcBuf][y%ctbSize]=recSample[x][y] For a block covering coordinates (x, y), it is valid if the following holds for the block vector bv = (bv[0], bv[1]); otherwise, it is invalid: ibcBuf[(x+bv[0])%wIbcBuf][(y+bv[1])%ctbSize] should not be equal to -1. 2.1.2 Block Differential Pulse Coded Modulation (BDPCM) VVC supports Block Differential Pulse Coded Modulation (BDPCM) for screen content coding and decoding. At the sequence level, the BDPCM enable flag is signaled in the SPS; this flag is signaled only when transform skip mode (described in the next section) is enabled in the SPS. When BDPCM is enabled, if the CU size is less than or equal to MaxTsSize×MaxTsSize in terms of luma samples and if the CU is intra-coded, a flag is sent at the CU level, where MaxTsSize is the maximum block size that allows transform skip mode. The flag indicates whether conventional intra-coding or BDPCM is used. If BDPCM is used, the BDPCM prediction direction flag is transmitted to indicate whether the prediction is horizontal or vertical. The block is then predicted using a conventional horizontal or vertical intra prediction process with unfiltered reference samples. The residuals are quantized, and the difference between each quantized residual and its predictor, i.e., the previously coded residual of a neighboring position horizontally or vertically (depending on the BDPCM prediction direction), is coded. For a block of size M (height) × N (width), let r i,j ,0≤i≤M-1,0≤j≤N-1 is the prediction residual. Let Q(r i,j ), 0≤i≤M-1,0≤j≤N-1 represents the residual r i,j BDPCM is applied to the quantized residual values, resulting in a quantized version of The modified M×N array in is predicted from its neighboring quantized residual values. For vertical BDPCM prediction mode, for 0≤j≤(N-1), the following is used to derive For the horizontal BDPCM prediction mode, for 0≤j≤(N-1), the following is used to derive On the decoder side, the above process is reversed to calculate Q(r i,j ), 0≤i≤M-1,0≤j≤N-1, as follows: The inverse quantized residual Q -1 (Q(r i,j )) is added to the intra block prediction value to produce the reconstructed sample value. The predicted quantized residual value is converted to Sent to the decoder. For lossless codec, if slice_ts_residual_coding_disabled_flag is set to 1, the quantized residual values ​​are sent to the decoder using the conventional transform residual codec as described in 2.2.2. For MPM modes for future intra-mode codecs, if the BDPCM prediction direction is horizontal or vertical, respectively, the horizontal or vertical prediction mode is stored for the BDPCM-coded CU, respectively. For deblocking, if the two blocks on both sides of the block boundary are coded and decoded using BDPCM, then the specific block boundary is not deblocked. 2.1.3 Residual Codec for Transform Skip Mode VVC allows transform skip mode for luma blocks of size up to MaxTsSize×MaxTsSize, where the value of MaxTsSize is signaled in the PPS and can be at most 32. When a CU is encoded and decoded in transform skip mode, its prediction residual is quantized and encoded using the transform skip residual encoding and decoding process. This process is modified from the transform coefficient encoding and decoding process described in 2.2.2. In transform skip mode, the residual of the TU is also encoded and decoded in units of non-overlapping sub-blocks of size 4×4. For better coding efficiency, some modifications are made to customize the residual coding and decoding process to the residual signal characteristics. The following summarizes the differences between transform skip residual coding and conventional transform residual coding: - a forward scanning order is applied to scan sub-blocks within a transformed block and also to scan positions within the sub-blocks; - no signaling of the last (x,y) position; - when all previous flags are equal to 0, coded_sub_block_flag is coded and decoded for each sub-block except the last sub-block; -sig_coeff_flag context modeling uses a simplified template, and the context model of sig_coeff_flag depends on the top and left neighboring values; -abs_level_gt1 flag's context model also depends on the left and above sig_coeff_flag values; - par_level_flag to use only one context model; - signaling additional greater than 3, 5, 7, 9 flags to indicate coefficient levels, with one context for each flag; - Binarization for the remainder values ​​derived using Rice parameters of fixed order = 1; - Determine the context model for the sign flag based on the left and above neighboring values, and parse the sign flag after sig_coeff_flag to keep all context coded bins together. For each subblock, if coded_subblock_flag is equal to 1 (i.e., there is at least one non-zero quantized residual in the subblock), encoding and decoding of the quantized residual level is performed in three scanning passes (see Figure 5 ): - First scan pass: Encode and decode the validity flag (sig_coeff_flag), the sign flag (coeff_sign_flag), the flag that the absolute level is greater than 1 (abs_level_gtx_flag[0]), and the parity check (par_level_flag). For a given scan position, if sig_coeff_flag is equal to 1, then coeff_sign_flag is encoded and decoded, followed by abs_level_gtx_flag[0] (which specifies whether the absolute level is greater than 1). If abs_level_gtx_flag[0] is equal to 1, then par_level_flag is additionally encoded and decoded to specify the parity of the absolute level. - Scan pass greater than x: For each scan position where the absolute level is greater than 1, up to four abs_level_gtx_flag[i] are encoded for i=1...4 to indicate whether the absolute level at the given position is greater than 3, 5, 7 or 9, respectively. - Remainder scan pass: The absolute level remainder abs_remainder is encoded and decoded in bypass mode. The absolute level remainder is binarized using a fixed Rice parameter value of 1. The binary bits in scan passes #1 and #2 (the first scan pass and greater than x scan passes) are context-coded until the maximum number of context-coded binary bits in the TU has been exhausted. The maximum number of context-coded binary bits in the residual block is limited to 1.75*block_width*block_height, or equivalently, an average of 1.75 context-coded binary bits per sample position. The binary bits in the last scan pass (remainder scan pass) are bypass-coded. The variable RemCbs is first set to the maximum number of context-coded binary bits for the block and is reduced by 1 each time a context-coded binary bit is coded. When RemCcbs is greater than or equal to 4, the context-coded binary bits are used to encode the syntax elements in the first codec pass, including sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, and par_level_flag. If RemCcbs becomes smaller than 4 when encoding and decoding the first pass, the remaining coefficients that have not been encoded in the first pass are encoded and decoded in the remainder scanning pass (pass#3). After the first pass of encoding and decoding is completed, if RemCcbs is greater than or equal to 4, the context-coded binary bits are used to encode and decode the syntax elements in the second encoding and decoding pass, including abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and abs_level_gt9_flag. If RemCcbs becomes less than 4 when encoding and decoding the second pass, the remaining coefficients that have not been encoded and decoded in the second pass are encoded and decoded in the remainder scan pass (pass#3). Figure 5 The transform skip residual coding process is shown. The stars mark the positions where the context coded bins are exhausted, at which point all remaining bins are coded using bypass coding. In addition, for blocks not coded in BDPCM mode, a horizontal mapping mechanism is applied to transform skipped residual coding until the maximum number of context-coded binary bits has been reached. Horizontal mapping uses the top and left neighboring coefficient levels to predict the current coefficient level in order to reduce signaling costs. For a given residual position, denote absCoeff as the absolute coefficient level before mapping, and absCoeffMod as the coefficient level after mapping. Let X0 denote the absolute coefficient level of the left neighboring position, and let X1 denote the absolute coefficient level of the upper neighboring position. Horizontal mapping is performed as follows: The absCoeffMod value is then encoded as described above.After all context-decoded bins have been exhausted, horizontal mapping is disabled for all remaining scan positions in the current block. 2.1.4 Palette Mode In VVC, palette mode is used for picture content encoding and decoding in all chroma formats supported in 4:4:4 profile (i.e., 4:4:4, 4:2:0, 4:2:2, and monochrome). When palette mode is enabled, if the CU size is less than or equal to 64×64, a flag is transmitted at the CU level, and the number of samples in the CU is greater than 16 to indicate whether palette mode is used. Considering that applying palette mode on small CUs introduces insignificant codec gain and brings additional complexity on small blocks, palette mode is disabled for CUs less than or equal to 16 samples. A palette-encoded codec unit (CU) is treated as a prediction mode different from intra-prediction, inter-prediction, and intra-block copy (IBC) modes. If palette mode is used, the sample values ​​in a CU are represented by a set of representative color values. This set is called a palette. For positions with sample values ​​close to the palette colors, the palette index is signaled. Samples outside the palette can also be specified by signaling escape symbols. For samples within a CU coded and decoded using escape symbols, their component values ​​are signaled directly using (possibly) quantized component values. This is done in Figure 6 The quantized escaped symbols are binarized using a fifth-order exponential Golomb binarization process (EG5). For palette encoding and decoding, the palette predictor is maintained. For the non-wavefront case, the palette predictor is initialized to 0 at the beginning of each stripe. For the WPP case, the palette predictor at the beginning of each CTU row is initialized to the predictor derived from the first CTU in the previous CTU row, so that the initialization scheme between the palette predictor and CABAC synchronization is unified. For each entry in the palette predictor, a reuse flag is signaled to indicate whether it is part of the current palette in the CU. The reuse flag is sent using a run length codec of zero. Thereafter, the number of new palette entries and the component values ​​of the new palette entries are signaled. After encoding the palette-encoded CU, the palette predictor will be updated with the current palette, and entries from the previous palette predictor that are not reused in the current palette will be added to the end of the new palette predictor until the maximum allowed size is reached. An escape flag is signaled for each CU to indicate whether there is an escape symbol in the current CU. If there is an escape symbol, the palette table is expanded by one and the last index is assigned as the escape symbol. In a manner similar to the coefficient groups (CGs) used in transform coefficient coding, a CU coded with palette mode is divided into multiple line-based coefficient groups, each consisting of m samples (i.e., m=16), where the index run of the escape mode, the palette index value, and the quantized color are encoded / parsed sequentially for each CG. As in HEVC, horizontal or vertical traversal scanning can be applied to scan the samples, such as Figure 7 as shown in . The encoding and decoding order for the palette run encoding and decoding in each fragment is as follows: For each sample position, a context encoded binary bit run_copy_flag=0 is signaled to indicate whether the pixel has the same mode as the previous sample position, that is, whether the previously scanned sample and the current sample are both of the run type COPY_ABOVE, or whether the previously scanned sample and the current sample both have the run type INDEX and the same index value. Otherwise, run_copy_flag=1 is signaled. If the current sample has a different mode from the previous sample, then a context encoded binary bit copy_above_palette_indices_flag is signaled to indicate the run type of the current sample, that is, INDEX or COPY_ABOVE. Here, if the sample is in the first row (horizontal traversal scan) or the first column (vertical traversal scan), the decoder does not have to parse the run type because the INDEX mode is used by default. In the same way, if the previously parsed run type is COPY_ABOVE, the decoder does not have to parse the run type. After palette run encoding of samples in one codec pass, index values ​​(for INDEX mode) and quantized escape colors are grouped and encoded using CABAC bypass codec in another codec pass. This separation of context codec binary bits and bypass codec binary bits can improve throughput within each line CG. For slices with dual luma / chroma trees, the palette is applied separately to luma (Y component) and chroma (Cb and Cr components), where the luma palette entries contain only Y values, and the chroma palette entries contain both Cb and Cr values. For slices with a single tree, the palette is applied on the Y, Cb, Cr components jointly, i.e., each entry in the palette contains Y, Cb, Cr values, unless when a CU is encoded using local dual-tree encoding, in which case the encoding of luma and chroma is handled separately. In this case, if the corresponding luma blocks or chroma blocks are encoded using palette mode, their palettes are applied in a manner similar to the dual-tree case (this is relevant for non-4:4:4 codecs and will be further explained in 2.1.4.1). For slices decoded with dual-tree codec, the maximum palette predictor size is 63, and the maximum palette table size for the codec of the current CU is 31. For slices decoded with dual-tree codec, the maximum predictor and palette table sizes are halved, i.e., for each of the luma palette and chroma palette, the maximum predictor size is 31 and the maximum table size is 15. For deblocking, palette-coded blocks on the side of a block boundary are not deblocked. 2.1.4.1 Palette Mode for Non-4:4:4 Content The palette modes in VVC are supported for all chroma formats in a similar manner as the palette modes in HEVC SCC. For non-4:4:4 content, the following customizations apply: 1. When signaling an escape value for a given sample position, if that sample position has only a luma component but no chroma components due to chroma subsampling, then only the luma escape value is signaled. This is the same as in HEVC SCC. 2. For a local dual-tree block, the palette pattern is applied to the block in the same way as the palette pattern applied to a single T-shaped block with two exceptions: a. The process of palette predictor updating is slightly modified as follows. Since the local dual-tree block contains only luminance (or chroma) components, so the predictor update process uses the signaled values ​​of the luma (or chroma) components and fills in the "missing" chroma (or luma) components by setting them to default values ​​(1<<(component bit depth - 1)). b. The maximum palette predictor size remains at 63 (because the slices are encoded and decoded using a single tree), but the maximum palette table size for luma / chroma blocks remains at 15 (because the blocks are encoded and decoded using separate palettes). 3. For palette mode in monochrome format, the number of color components in a palette-encoded block is set to 1 instead of 3. 2.1.4.2 Encoder Algorithm for Palette Mode On the encoder side, the following steps are used to generate the palette table of the current CU. 1. First, in order to derive the initial entries in the palette table of the current CU, a simplified K-means clustering is applied. The palette table of the current CU is initialized to an empty table. For each sample position in the CU, the SAD between the sample and each palette table entry is calculated, and the minimum SAD among all palette table entries is obtained. If the minimum SAD is less than the predefined error limit errorLimit, the current sample is clustered with the palette table entry with the minimum SAD. Otherwise, a new palette table entry is created. The threshold errorLimit is QP-related and is retrieved from a lookup table containing 57 elements covering the entire QP range. After all samples of the current CU have been processed, the initial palette entries are sorted according to the number of samples clustered with each palette entry, and any entries after the 31st entry are discarded. 2. In the second step, the initial palette table colors are adjusted by considering two options: using the centroid of each cluster from step 1 or using one of the palette colors in the palette predictor. The option with the lower rate-distortion cost is selected as the final color of the palette table. If a cluster has only a single sample and the corresponding palette entry is not in the palette predictor, the corresponding sample is converted to an escape symbol in the next step. 3. The palette table thus generated contains some new entries from the centroids of the clusters in step 1, and some entries from the palette predictor. Therefore, the table is reordered again so that all new entries (i.e., centroids) are placed at the beginning of the table, followed by entries from the palette predictor. Given the palette table of the current CU, the encoder selects a palette index for each sample position in the CU. For each sample position, the encoder checks the RD cost of all index values ​​corresponding to the palette table entry, as well as the index representing the escape symbol, and selects the index with the minimum RD cost using the following equation: RD cost = distortion × (isChroma? 0.8:1) + lambda × bypassed coded bits (2-5) After determining the index map for the current CU, each entry in the palette table is checked to see if it is used by at least one sample position in the CU. Any unused palette entry will be removed. After deciding the index map for the current CU, the trellis RD optimization is applied to find the best values ​​of run_copy_flag and run type for each sample position by comparing the RD costs of three options: same as the previously scanned position, run type COPY_ABOVE, or run type INDEX. When calculating the SAD value, the sample values ​​are scaled down to 8 bits unless the CU is encoded or decoded in lossless mode, in which case the actual input bit depth is used to calculate the SAD. In addition, in the case of lossless codecs, only the ratio is used in the above rate-distortion optimization step (because lossless codecs do not cause distortion). 2.1.5 Adaptive Color Transformation In the HEVC SCC extension, Adaptive Color Transform (ACT) is applied to reduce the redundancy between the three color components in the 444 chroma format. ACT is also adopted in the VVC standard to enhance the codec efficiency of the 444 chroma format codec. As in HEVC SCC, ACT performs an in-loop color space conversion in the prediction residual domain by adaptively converting the residual from the input color space to the YCgCo space. Figure 8 A decoding flow chart for applying ACT is shown. Two color spaces are adaptively selected by signaling an ACT flag at the CU level. When the flag is equal to 1, the residual of the CU is encoded and decoded in the YCgCo space; otherwise, the residual of the CU is encoded and decoded in the original color space. In addition, similar to the HEVC ACT design, for inter and IBc CUs, ACT is enabled only when there is at least one non-zero coefficient in the CU. ACT is enabled only when the chroma component selects the same intra prediction mode of the luminance component (i.e., DM mode). 2.1.5.1ACT Mode In the HEVC SCC extension, ACT supports both lossless and lossy codecs based on the lossless flag (i.e., cu_transquant_bypass_flag). However, there is no flag in the bitstream to indicate whether lossy or lossless codec is applied. Therefore, the YCgCo-R transform is applied as ACT to support both lossy and lossless cases. The YCgCo-R reversible color transform is shown below. Since the YCgCo-R transform is not normalized. In order to compensate for the dynamic range change of the residual signal before and after the color transform, the QP adjustment of (-5, 1, 3) is applied to the transform residuals of the Y, Cg and Co components respectively. The adjusted quantization parameter only affects the quantization and inverse quantization of the residual in the CU. For other encoding and decoding processes (such as deblocking), the original QP is still applied. Additionally, because the forward and inverse color transforms require access to the residuals of all three components, ACT mode is always disabled for single tree partitioning and ISP mode, where the prediction block sizes for different color components are different. When ACT is applied, transform skip (TS) and block differential pulse codec modulation (BDPCM) extended to code chroma residuals are also enabled. 2.1.5.2 ACT Fast Encoding Algorithm To avoid brute force RD searches in both the original and converted color spaces, the following fast encoding algorithm is applied in the VTM reference software to reduce encoder complexity when ACT is enabled. - The order of RD checking for enabling / disabling ACT depends on the original color space of the input video. For RGB video, RD cost for ACT mode is checked first; for YCbCr video, RD cost for non-ACT mode is checked first. RD cost for the second color space is checked only if there is at least one non-zero coefficient in the first color space. - Reuse the same ACT enable / disable decision when a CU is obtained through different split paths. Specifically, when the CU is encoded and decoded for the first time, the selected color space used to encode and decode the residual of a CU will be stored. Then, when the same CU is obtained by another split path, instead of checking the RD cost of the two spaces, the stored color space decision will be directly reused. -The RD cost of the parent CU is used to decide whether to check the RD cost of the second color space of the current CU. For example, if the RD cost of the first color space is less than the RD cost of the second color space for the parent CU, the second color space is not checked for the current CU. - To reduce the number of tested codec modes, the selected codec modes are shared between the two color spaces. Specifically, for intra mode, the pre-selected intra mode candidates according to SATD-based intra mode selection are shared between the two color spaces. For inter and IBC modes, only one block vector search or motion estimation is performed. Block vectors and motion vectors are shared by the two color spaces. 2.1.6 Intra-frame template matching Intra Template Matching Prediction (Intra TMP) is a special intra prediction mode that copies the best prediction block from the reconstructed part of the current frame, whose L-shaped template matches the current template. For a predefined search range, the encoder searches for the template that is most similar to the current template in the reconstructed part of the current frame and uses the corresponding block as the prediction block. The encoder then signals the use of this mode and performs the same prediction operation on the decoder side. The prediction signal is generated by matching the L-shaped causal neighbors of the current block with another block in a predefined search area consisting of: R1: current CTU; R2: upper left CTU; R3: above CTU; R4: Left CTU. SAD is used as the cost function. In each region, the decoder searches for the template with the minimum SAD relative to the current region and uses its corresponding block as the prediction block. The size of all regions (Search Range_w, SearchRange_h) is proportional to the block size (BlkW, BlkH) with a fixed number of SAD comparisons per pixel. That is: SearchRange_w=a*BlkW SearchRange_h=a*BlkH Where 'a' is a constant that controls the gain / complexity tradeoff. In practice, 'a' is equal to 5. Fig. 9 The intra template matching search area used is shown. The intra template matching tool is enabled in width and height for CUs of size less than or equal to 64. This maximum CU size for intra template matching is configurable. When DIMD is not used for the current CU, the intra template matching prediction mode is signaled at the CU level through a dedicated flag. 2.2 Existing Entropy Coding and Decoding Technology 2.2.1 Core CABAC Engine The CABAC engine in HEVC uses a table-based probability conversion process between 64 different representative probability states. In HEVC, the range ivlCurrRange representing the state of the codec engine is quantized to a set of 4 values ​​before calculating the new interval range. HEVC state transitions can be implemented using a table containing all 64x48-bit pre-calculated values ​​to approximate the value of ivlCurrRange*pLPS(pStateIdx), where pLPS is the probability of the least likely symbol (LPS) and pStateIdx is the index of the current state. Moreover, a pre-calculated LUT can be used to implement decoding decisions. The first ivlLpsRange is obtained using the following LUT. Then, ivlLpsRange is used to update ivlCurrRange and calculate the output binVal. ivlLpsRange=rangeTableLps[pStateIdx][qRangeIdx] (2-7) In VVC, the probability is expressed linearly by the probability index pStateIdx. Therefore, all calculations can be done using equations without LUT operations. In order to improve the accuracy of the probability estimate, a multi-hypothesis probability update model is applied. The pStateIdx used in the interval subdivision in the binary arithmetic codec is a combination of two probabilities pStateIdx0 and pStateIdxl. The two probabilities are associated with each context model and are updated independently with different adaptation rates. The adaptation rates of pStateIdx0 and pStateIdx1 for each context model are pre-trained based on the statistics of the associated binary bits. The probability estimate pStateIdx is the average of the estimates from the two hypotheses. Fig.10 A flow chart for decoding a single binary decision in VVC is shown. As done in HEVC, VVC CABAC also has a QP-dependent initialization process called at the beginning of each slice. Given an initial value of the luma QP for the slice, the initial probability state of the context model (denoted as preCtxState) is derived as follows: m=slopeIdx×5-45 (2-8) n=(offsetIdx<<3)+7 (2-9) preCtxState=Clip3(1,127,((m×(QP-32))>>4)+n) (2-10) Where slopeIdx and offsetIdx are limited to 3 bits, and the total initialization value is represented by 6 bits of precision. The probability state preCtxState directly represents the probability in the linear domain. Therefore, preCtxState only requires appropriate shift operations before input to the arithmetic codec engine and saves the logarithmic to linear domain mapping and the 256-byte table. pStateIdx0=preCtxState<<3 (2-11) pStateIdx1=preCtxState<<7 (2-12) 2.2.2 Transform coefficient level encoding and decoding In HEVC, the transform coefficients of a codec block are encoded using non-overlapping coefficient groups (CGs or sub-blocks), and each CG contains the coefficients of a 4x4 block of the codec block. In VVC, the choice of coefficient group size depends only on the TB size, i.e., the dependency on the channel type is removed. As a result, various CGs (1x16, 2x8, 8x2, 2x4, 4x2, and 16x1) become available. The CGs within the codec block and the transform coefficients within the CGs are encoded and decoded according to a predefined scan order. In order to limit the maximum number of context coding binary bits per pixel, the area and color components of the TB are used to derive the maximum number of context coding binary bits for the TB. For luma TBs, the maximum number of context coding binary bits is equal to TB_zosize*1.75. For chroma TBs, the maximum number of context coding binary bits (CCBs) is equal to TB_zosize*1.25. Here, TB_zosize indicates the number of samples within the TB after the coefficients are cleared. Note that the coded_sub_block_flag in the transform skip residual mode is not considered for CCB counting. Unlike HEVC where the residual codec is designed for the signal characteristics at the statistical and transform coefficient levels, two separate residual codec structures are adopted for transform coefficients and transform skip coefficients, respectively. 2.2.2.1 Residual Encoding and Decoding for Transform Coefficients In transform coefficient coding, the variable remBinsPass1 is first set to the maximum number of context coding binary bits and is decremented by one when context coding binary bits are signaled. When remBinsPass1 is greater than or equal to 4, the first coding pass containing sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag is coded using context coding binary bits. If the number of context coding binary bits is not greater than Mcb in the first coding pass, the remainder of the level information indicated as being further coded in the first pass is coded using the syntax element of abs_remainder using Golomb-Rice codes and bypassed coding binary bits. When remBinsPass1 becomes less than 4 when encoding and decoding the first pass, the remaining coefficients indicated to be further encoded and decoded in the first pass are encoded and decoded using the syntax element of abs_remainder, and the coefficients that were not encoded and decoded in the first pass are directly encoded and decoded in the second pass by using Golomb-Rice codes and bypassed encoded binary bits, such as Figure 8. For each TB, remBinsPass1 is reset. The switch from using context-coded binary bits for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag to using bypass-coded binary bits for the remaining coefficients occurs only once per TB at most. For a coefficient subblock, if remBinsPass1 is less than 4, the entire coefficient subblock is coded by using bypass-coded binary bits. After all of the above-mentioned level coding, the sign (sign_flag) is finally bypass-coded for all scan positions with sig_coeff_flag equal to 1. The unified (same) rice parameter (ricePar) derivation is used for both pass 2 and pass 3. The only difference is setting baseLevel to 4 and 0 for pass 2 and pass 3 respectively. The Rice parameter is determined based only on the sum of the absolute levels of the neighboring five transform coefficients in the local template, but the corresponding base level is also considered as follows: RicePara=RiceParTable[max(min(31,sumAbs,5*baseLevel),0)](2-13). Fig.11 The residual codec structure for a transform block is shown. After termination of the first sub-block codec pass, the absolute value of each of the remaining to-be-coded coefficients is coded by a syntax element dec_abs_level, which corresponds to a modified absolute level value, where a zero level value is conditionally mapped to a non-zero value. On the encoder side, the value of the syntax element dec_abs_level is derived from the absolute level (absLevel), the dependent quantizer state (QState) and the rice parameter (RicePara) as follows: 2.2.2.2 Residual Codec for Transform Skipping Similar to HEVC, VVC supports transform skip mode. Transform skip mode is allowed for luma and chroma blocks. In transform skip mode, the statistical characteristics of the signal are different from those of the transform coefficients, and applying a transform to such residuals in order to achieve energy compression around low-frequency components is generally less effective. Residuals with such characteristics are often found in screen content, as opposed to natural camera-captured content. 2.2.3 Context Modeling for Coefficient Encoding and Decoding The choice of the probability model of the syntax element related to the absolute value of the transform coefficient level depends on the value of the absolute level in the local neighborhood or the absolute level of the partial reconstruction. The template used is Fig.12 Shown in. The chosen probability model depends on the sum of the absolute levels (or partially reconstructed absolute levels) in the local neighborhood and the number of absolute levels greater than 0 in the local neighborhood (given by the number of sig_coeff_flags equal to 1). Context modeling and binarization rely on the following measures for the local neighborhood: -numSig: the number of non-zero levels in the local neighborhood; -sumAbs1: the sum of the absolute levels (absLevel1) of the partial reconstructions after the first pass in the local neighborhood; -sumAbs: the sum of the absolute levels of reconstruction in the local neighborhood; - Diagonal position (d): The sum of the horizontal and vertical coordinates of the current scan position within the transform block. Based on the values ​​of numSig, sumAbs1 and d, the probability model for encoding and decoding sig_flag, par_flag, gt1_flag and gt2_flag is selected. Based on the values ​​of sumAbs and numSig, the Rice parameters for binarizing abs_remainder are selected. In VVC, a reduced 32-point MTS (RMTS32) based on skipping high-frequency coefficients is used to reduce the computational complexity of 32-point DST-7 / DCT-8. Also, all types of zeroing (i.e., RMTS32 and existing zeroing for high-frequency components in DCT2) are considered, accompanied by coefficient codec changes. Specifically, based on the reduced TU size, the binarization of the last non-zero coefficient position codec is encoded and decoded, and the context model selection for the last non-zero coefficient position codec is determined by the original TU size. In addition, 60 context models are used to encode the sig_coeff_flag of the transform coefficients. The selection of the context model index is based on the sum of the maximum values ​​of the absolute levels of the five previous partial reconstructions called locSumAbsPass1, as follows: - If cIdx is equal to 0, ctxInc is derived as follows: ctxInc=12*Max(0,QState-1)+ Min ((locSumAbsPass1+1)>>1,3)+(d<2?8: (d<5?4:0)) (2-14) --Otherwise (cIdx is greater than 0), ctxInc is derived as follows: ctxInc=36+8*Max(0, QState-1)+ Min((locSumAbsPass1+1)>>1,3)+(d<2?4:0)(2-15). 2.2.4 Extended Precision The intermediate precision used in the arithmetic codec engine is increased to include three elements. First, the precision of both probability states is increased to 15 bits compared to 10 bits and 14 bits in VVC. Second, the LPS range update process is modified as follows: if q>=16384 q=2 15 –1–q R LPS =((range*(q>>6))>>9)+1, Where range is a 9-bit variable representing the width of the current interval, q is a 15-bit variable representing the probability state of the current context model, and RLPS is the update range of LPS. This operation can also be implemented by looking up 512x256 entries in a 9-bit lookup table. Third, on the encoder side, the 256-entry lookup table used for bit estimation in VTM is expanded to 512 entries. 2.2.5 Window size based on stripe type Since the statistics are different for different slice types, it is beneficial to have the probability state of the context updated at a rate that is optimal for a given slice type. Therefore, for each context model, three window sizes are predefined for I slices, B slices, and P slices, respectively, as initialization parameters. Retrain the context initialization parameters and window size. 2.2.6 Temporal CABAC The use of previous codec slices for CABAC initialization in JEM was proposed in JVET-K0379 and studied in VVC CE5. Specifically, if the current slice type is B or P, after the CTU is encoded and decoded to the specified location and stored, the probability state of each context model is first obtained. Then, the stored probability state will be used as the initial probability state of the corresponding context model in the next B slice or P slice encoded and decoded with the same quantization parameter (QP). 3 Questions There are several problems with existing video codec technologies, which will be further improved for higher codec gain. 1. The CABAC initialization probability of inter slices can be inherited from the stored probability of previously coded slices (eg, temporal CABAC). However, how to derive the context initialization probability from temporal information needs to be designed, especially when a temporal picture contains more than one slice. 2. In ECM-4.0, sign prediction is used to estimate the sign of the conventional AMVP motion vector difference (MVD) (+ or -), but not used for IBC AMVP. The sign of IBC MVD can be predicted and decoded. 3. In VVC and ECM, when the IBC predictor pointed to by a motion vector candidate is not in the valid region, the motion vector candidate is considered invalid. However, in this case, a new motion vector candidate can be inserted into the IBC motion list based on the invalid IBC motion candidate. 4. Detailed solution The following detailed embodiments should be considered as examples to explain the general concept. These embodiments should not be interpreted in a narrow sense. In addition, these embodiments can be combined in any way. The term “video unit” or “codec unit” may refer to a picture, a slice, a tile, a codec tree block (CTB), a codec tree unit (CTU), a codec block (CB), a CU, a PU, a TU, a PB, a TB. The term "block" may refer to a codec tree block (CTB), a codec tree unit (CTU), a codec block (CB), a CU, a PU, a TU, a PB, a TB. Note that the terms mentioned below are not limited to the specific terms defined in existing standards. Any changes in codec tools are also applicable. 4.1 Regarding the CABAC initialization probability (e.g., the first problem and related problems), the following method is proposed: a. It may be required that the context initialization probability of the first slice does not depend on the context initialization probability obtained from the second slice in the same picture (eg, in the case where more than one slice is contained in each picture of the video sequence). a. For example, the second slice is encoded and decoded before the first slice. b. The context initialization probability of the first slice in the first picture may depend on the context initialization probability obtained from the second slice in the second picture. a. For example, the first picture is different from the second picture. b. For example, the second picture is encoded and decoded before the first picture. c. For example, the second picture may be a reference picture of the first slice / picture. d. For example, the second picture is not necessarily a reference picture of the first slice / picture. c. The initialization probability dependency of the first slice and the second slice may be based on the slice type but not the quantization parameter (QP). a. For example, when the first slice and the second slice are coded with the same slice type X (eg, X=B or P slice), the context initialization probability of the first slice may depend on the context initialization probability of the second slice. b. For example, the context initialization probability of the first slice may depend on the context initialization probability of the second slice, regardless of the QP values ​​used for the first slice and the second slice. d. The context initialization probability of the first slice may depend on the context initialization probability obtained from the second slice based on the quantization parameter (QP). a. For example, how the first slice derives the context initialization probability from the second slice may be based on whether the first slice and the second slice have the same / similar QP value (eg, whether the QP difference is less than a threshold). b. For example, how the first slice derives the context initialization probability from the second slice may be based on whether the first slice and the second slice are from the same QP range (eg, the QP range may be defined by a predefined rule). c. For example, how the first slice derives the context initialization probability from the second slice may be based on whether the first slice and the second slice are from the same QP class (eg, the QP class may be defined by a predefined rule). e. In the case where the first slice derives the context initialization probability from the second slice, it may be required that the temporal layer of the second slice is not larger than the temporal layer of the first slice. a. For example, in the case where the first slice derives the context initialization probability from the second slice, the temporal layer of the second slice may be smaller than the temporal layer of the first slice. b. For example, in the case where the first slice derives the context initialization probability from the second slice, the temporal layer of the second slice may be equal to the temporal layer of the first slice. c. For example, in the case where the first slice derives the context initialization probability from the second slice, the temporal layer of the second slice should not be larger than the temporal layer of the first slice. 4.2 Regarding the sign prediction of block vector differences (e.g., the second problem and related problems), the following method is proposed: a. IBC Codec The sign of the horizontal component and / or the vertical component of the block vector difference (eg, BVD, MVD) of a video unit may be predictively coded. b. The sign of the block vector difference (eg, BVD, MVD) component of an IBC-coded video unit may be represented by an index from a lookup table. a. For example, symbol candidates in a lookup table may be predefined and used for both the encoder and the decoder. b. For example, symbol candidates in a lookup table can be generated on the fly. c. For example, at least two symbol lookup tables may be allowed to be used for encoding and decoding IBC block vector differences. i. For example, the symbol lookup table is on a per-block basis. ii. For example, the order of the symbol candidates in the first symbol lookup table and the order of the symbol candidates in the second symbol lookup table may be different. d. For example, the symbol candidates in the lookup table may be generated based on the cost / error / difference obtained from the template matching method. i. For example, the symbol candidates in the lookup table may be reordered based on a template matching method. ii. For example, template matching may refer to matching a first predefined group of reconstructed samples neighboring a first block (eg, a current block) and a second predefined group of reconstructed samples neighboring a second block (eg, a reference block to the current block). e. For example, the block vector difference (eg, BVD, The index of the symbol of the MVD) component is used for context coding and decoding. 4.3 Regarding block vectors outside the invalid region (e.g., the third problem and related problems), the following method is proposed: a. If a block vector candidate of an IBC codec block is outside the reference region, the block vector may be changed to another value instead of being discarded from the IBC candidate list. a. For example, an operation may be applied to a block vector and change it to a valid block vector within a reference region. i. For example, the operation can be based on a clipping process. ii. For example, the operation may be based on a scaling process. b. For example, a clipping operation may be applied to a block vector to clip it within a reference region. i. For example, you can clip to the nearest boundary of the reference region, such as Fig.13 shown. c. For example, a new block vector may be used to replace an invalid block vector. General Requirements 4.4 Whether and / or how to apply the method disclosed above may be signaled at the sequence level / picture group level / picture level / slice level / tile group level, for example in the sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header. 4.5 Whether and / or how to apply the above disclosed methods can be signaled in PB / TB / CB / PU / TU / CU / VPDU / CTU / CTU row / slice / tile / sub-picture / other kinds of regions containing more than one sample or pixel. 4.6 Whether and / or how to apply the above disclosed method may depend on the encoded information, such as block size, color format, single tree / dual tree partitioning, color component, slice / picture type.

[0078] As used herein, the term "video unit" or "video block" may be a sequence, picture, slice, tile, block, sub-picture, codec tree unit (CTU) / codec tree block (CTB), CTU / CTB row, one or more codec units (CU) / codec blocks (CB), one or more CTU / CTB, one or more virtual pipeline data units (VPDU), sub-region within a picture / slice / tile / block. The term "image compression" may refer to any variance of a signal processing method that compresses or processes the current input. Input images / videos include, but are not limited to, screen content and natural content.

[0079] Fig.14 A flow chart of a method 1400 for video processing according to an embodiment of the present disclosure is shown. The method 1400 is implemented during conversion between a video unit of a video and a bitstream of the video.

[0080] At block 1410, for a conversion between a video unit of a video and a bitstream of the video, a sign of a block vector difference for the video unit is determined. The sign is predictively coded and the video unit is coded using an intra block copy (IBC) mode. In some embodiments, the block vector difference comprises at least one of: a motion vector difference (MVD) or a block vector difference (BVD). The sign may be "+" or "-".

[0081] At block 1420, a conversion is performed based on the sign and value of the block vector difference. In some embodiments, the conversion may include encoding the video unit into a bitstream. Alternatively or additionally, the conversion may include decoding the video unit from the bitstream. In this case, the block vector difference of the video unit may be obtained based on the sign and the absolute value. In this way, the encoding and decoding efficiency of the block vector encoding and decoding may be improved.

[0082] In some embodiments, the block vector difference comprises a horizontal component and a vertical component.The sign of at least one of the horizontal component or the vertical component may be predictively encoded.

[0083] In some embodiments, the block vector difference comprises a horizontal component and a vertical component. In this case, the sign of at least one of the horizontal component or the vertical component is represented by an index from a lookup table. The lookup table may include a set of sign candidates.

[0084] In some embodiments, the symbols may be encoded and decoded based on a non-lookup table approach. For example, a prediction of the symbol may be generated based on the decoded information, and the difference between the prediction and the true value of the symbol may be in the bitstream.

[0085] In some embodiments, the set of symbol candidates in the lookup table is predefined and used for both the encoder and the decoder.In some embodiments, the set of symbol candidates may be dynamically generated.

[0086] In some embodiments, at least two lookup tables are allowed to encode and decode IBC block vector differences. For example, the lookup table is based on each block. As another example, the first order of symbol candidates in the first lookup table is different from the second order of symbol candidates in the second lookup table.

[0087] In some embodiments, the set of symbol candidates is generated based on at least one of the following: cost, error, difference obtained according to a template matching method. For example, the set of symbol candidates is reordered based on the template matching method.

[0088] In some embodiments, the template matching method includes matching a first predefined group of reconstructed samples of a neighboring first block with a second predefined group of reconstructed samples of a neighboring second block. ii. For example, template matching may refer to matching a first predefined group of reconstructed samples of a neighboring first block (e.g., a current block) with a second predefined group of reconstructed samples of a neighboring second block (e.g., a reference block of the current block). In some embodiments, the block vector difference includes a horizontal component and a vertical component, and a sign of at least one of the horizontal component or the vertical component may be context-coded.

[0089] In some embodiments, an indication of whether and / or how to determine the sign of the block vector difference of the video unit is indicated at one of the following: sequence level, group of picture level, picture level, slice level, or tile group level. In some embodiments, an indication of whether and / or how to determine the sign of the block vector difference of the video unit is indicated in one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptation parameter set (APS), slice header, or tile group header.

[0090] In some embodiments, the indication of whether and / or how to determine the sign of the block vector difference of the video unit is included in one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), virtual pipeline data unit (VPDU), codec tree unit (CTU), CTU row, slice, tile, sub-picture, or a region containing more than one sample or pixel. In some embodiments, method 1400 also includes: determining whether and / or how to determine the sign of the block vector difference of the video unit based on codec information of the video unit, the codec information including at least one of the following: block size, color format, single tree and / or dual tree partitioning, color component, slice type, or picture type.

[0091] According to another embodiment of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by a device for video processing. The method includes: determining a sign of a block vector difference of a video unit, wherein the sign is predictively encoded and decoded, and the video unit is encoded and decoded using an intra-frame block copy (IBC) mode; and generating a bitstream based on the sign and value of the block vector difference.

[0092] According to another embodiment of the present disclosure, a method for storing a bitstream of a video is provided. The method includes: determining a sign of a block vector difference of a video unit, wherein the sign is predictively encoded and decoded, and the video unit is encoded and decoded using an intra-frame block copy (IBC) mode; generating a bitstream based on the sign and value of the block vector difference; and storing the bitstream in a non-transitory computer-readable recording medium.

[0093] Fig.15 A flow chart of a method 1500 for video processing according to an embodiment of the present disclosure is shown. The method 1500 is implemented during conversion between a video unit of a video and a bitstream of the video.

[0094] At block 1510, for a conversion between a video unit of a video and a bitstream of the video, a context initialization probability for a first slice of the video unit is determined based on information of a second slice of the video unit. In some embodiments, the context initialization probability for the first slice depends on another context initialization probability obtained from the second slice based on a quantization parameter (QP).

[0095] At block 1520, conversion is performed based on the context initialization probability. In some embodiments, conversion may include encoding the video unit into a bitstream. Alternatively or additionally, conversion may include decoding the video unit from the bitstream. In this way, the codec efficiency of the block vector codec may be improved.

[0096] In some embodiments, the method of deriving the additional context initialization probability from the second slice is based on whether the QP difference between the first slice and the second slice is less than a threshold. For example, how the first slice derives the context initialization probability from the second slice may be based on whether the first slice and the second slice have the same / similar QP value (e.g., whether the QP difference is less than a threshold).

[0097] In some embodiments, the method of deriving additional context initialization probabilities from the second slice is based on whether the first slice and the second slice are from the same QP range. For example, how the first slice derives the context initialization probability from the second slice may be based on whether the first slice and the second slice are from the same QP range (e.g., the QP range may be defined by a predefined rule).

[0098] In some embodiments, the method of deriving additional context initialization probabilities from the second slice is based on whether the first slice and the second slice are from the same QP category. For example, how the first slice derives the context initialization probability from the second slice may be based on whether the first slice and the second slice are from the same QP category (e.g., the QP category may be defined by a predefined rule).

[0099] In some embodiments, if the first slice derives additional context initialization probabilities from the second slice, the temporal layer of the second slice is required to be no greater than the temporal layer of the first slice. For example, in the case where the first slice derives the context initialization probability from the second slice, the temporal layer of the second slice may be required to be no greater than the temporal layer of the first slice.

[0100] In some embodiments, if the first slice derives additional context initialization probabilities from the second slice, the temporal layer of the second slice is equal to the temporal layer of the first slice. For example, in the case where the first slice derives the context initialization probabilities from the second slice, the temporal layer of the second slice may be equal to the temporal layer of the first slice.

[0101] In some embodiments, if the first slice derives additional context initialization probabilities from the second slice, the temporal layer of the second slice is smaller than the temporal layer of the first slice. For example, in the case where the first slice derives the context initialization probability from the second slice, the temporal layer of the second slice may be smaller than the temporal layer of the first slice.

[0102] In some embodiments, if the first slice derives additional context initialization probabilities from the second slice, the temporal layer of the second slice is not greater than the temporal layer of the first slice. For example, in the case where the first slice derives the context initialization probabilities from the second slice, the temporal layer of the second slice should not be greater than the temporal layer of the first slice.

[0103] In some embodiments, the context initialization probability of the first slice is independent of another context initialization probability obtained from a second slice in the same picture. For example, the context initialization probability of the first slice is required to be independent of the context initialization probability obtained from the second slice in the same picture (e.g., in the case where more than one slice is included in each picture of the video sequence). In some embodiments, the second slice is encoded before the first slice.

[0104] In some embodiments, the context initialization probability of the first slice in the first picture depends on another context initialization probability obtained from the second slice in the second picture. For example, the first picture is different from the second picture. Alternatively or additionally, the second picture is encoded and decoded before the first picture. As an example, the second picture is a reference picture of the first slice or the first picture. As another example, the second picture is not a reference picture of the first slice or the first picture.

[0105] In some embodiments, the context initialization probability dependency of the first slice and the second slice is based on the slice type instead of the QP. In some embodiments, if the first slice and the second slice are coded with the same slice type, the context initialization probability of the first slice depends on another context initialization probability of the second slice. For example, in the case where the first slice and the second slice are coded with the same slice type X (e.g., X=B or P slice), the context initialization probability of the first slice may depend on the context initialization probability of the second slice.

[0106] In some embodiments, the context initialization probability of the first slice depends on the additional context initialization probability of the second slice, regardless of the QP values ​​used for the first slice and the second slice. For example, the context initialization probability of the first slice may depend on the context initialization probability of the second slice, regardless of the QP values ​​used for the first slice and the second slice.

[0107] In some embodiments, whether and / or how the indication of the context initialization probability for the first slice is determined is indicated at one of the following: sequence level, picture group level, picture level, slice basic, or tile group level. In some embodiments, whether and / or how the indication of the context initialization probability for the first slice is determined is indicated in one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptation parameter set (APS), slice header, or tile group header.

[0108] In some embodiments, whether and / or how to determine the context initialization probability of the first slice is included in one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), virtual pipeline data unit (VPDU), codec tree unit (CTU), CTU row, slice, tile, sub-picture; or a region containing more than one sample or pixel. In some embodiments, method 1500 also includes: determining whether and / or how to determine the context initialization probability of the first slice based on codec information of the video unit, the codec information including at least one of the following: block size, color format, single tree and / or dual tree partitioning, color component, slice type, or picture type.

[0109] According to another embodiment of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by a device for video processing. The method includes: determining a context initialization probability of a first slice of a video unit based on information of a second slice of a video unit; and generating a bitstream based on the context initialization probability.

[0110] According to another embodiment of the present disclosure, a method for storing a bitstream of a video is provided. The method includes: determining a context initialization probability of a first slice of a video unit based on information of a second slice of a video unit; generating a bitstream based on the context initialization probability; and storing the bitstream in a non-transitory computer-readable recording medium.

[0111] Fig.16 A flow chart of a method 1600 for video processing according to an embodiment of the present disclosure is shown. The method 1600 is implemented during conversion between a video unit of a video and a bitstream of the video.

[0112] At block 1610, for conversion between a video unit of a video and a bitstream of the video, it is determined that a block vector of the video unit is outside a reference region. The video unit is encoded and decoded using an intra block copy (IBC) mode.

[0113] The value of the block vector is changed at block 1620. For example, if a block vector candidate for an IBC coded block is outside the reference region, the block vector may be changed to another value instead of being discarded from the IBC candidate list.

[0114] At block 1630, a conversion is performed based on the changed value of the block vector. In some embodiments, the conversion may include encoding the video unit into a bitstream. Alternatively or additionally, the conversion may include decoding the video unit from the bitstream. In this way, the codec efficiency of the block vector codec may be improved.

[0115] In some embodiments, an operation is applied to a block vector candidate and changes the block vector to a valid block vector within a reference region. For example, the operation is based on a cropping process. As another example, the operation is based on a scaling process.

[0116] In some embodiments, a clipping operation is applied to the block vector to clip the block vector within the reference region. Fig.13 As shown, the block vector of the current block 1310 may be clipped to the nearest boundary of the reference area 1320 .

[0117] In some embodiments, another block vector is used to replace the block vector. For example, a new block vector may be used to replace an invalid block vector.

[0118] In some embodiments, an indication of whether and / or how to change the value of a block vector is indicated at one of the following: sequence level, picture group level, picture level, slice level, or tile group level. In some embodiments, an indication of whether and / or how to change the value of a block vector is indicated in one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptation parameter set (APS), slice header, or tile group header. In some embodiments, an indication of whether and / or how to change the value of a block vector is included in one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), virtual pipeline data unit (VPDU), codec tree unit (CTU), CTU row, slice, tile, sub-picture; or a region containing more than one sample or pixel.

[0119] In some embodiments, whether and / or how to change the value of the block vector is determined based on codec information of the video unit. The codec information includes at least one of the following: block size, color format, single tree and / or dual tree partitioning, color component, slice type, or picture type.

[0120] According to another embodiment of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by a device for video processing. The method includes: determining that a block vector of a video unit is outside a reference area, and wherein the video unit is encoded and decoded using an intra-frame block copy (IBC) mode; changing the value of the block vector; and generating a bitstream based on the changed value of the block vector.

[0121] According to another embodiment of the present disclosure, a method for storing a bitstream of a video is provided. The method includes: determining that a block vector of a video unit is outside a reference area, and wherein the video unit is encoded and decoded using an intra-frame block copy (IBC) mode; changing a value of the block vector; generating a bitstream based on the changed value of the block vector; and storing the bitstream in a non-transitory computer-readable recording medium.

[0122] Embodiments of the present disclosure may be described according to the following clauses, features of which may be combined in any reasonable way.

[0123] Item 1. A video processing method, comprising: determining, for conversion between a video unit of a video and a bitstream of the video, a sign of a block vector difference of the video unit, wherein the sign is predictively encoded and decoded, and the video unit is encoded and decoded using an intra-block copy (IBC) mode; and performing the conversion based on the sign and value of the block vector difference.

[0124] Clause 2. The method of clause 1, wherein the block vector difference comprises a horizontal component and a vertical component, and the sign of at least one of the horizontal component or the vertical component is predictively encoded.

[0125] Clause 3. A method according to clause 1, wherein the block vector difference includes a horizontal component and a vertical component, and the sign of at least one of the horizontal component or the vertical component is represented by an index from a lookup table, wherein the lookup table includes a set of symbol candidates.

[0126] Clause 4. The method of clause 3, wherein the set of symbol candidates in the lookup table is predefined and used for both an encoder and a decoder.

[0127] Clause 5. The method of clause 3, wherein the set of symbol candidates is dynamically generated.

[0128] Clause 6. The method of clause 3, wherein at least two lookup tables are enabled to encode and decode IBC block vector differences.

[0129] Clause 7. The method of clause 6, wherein the lookup table is on a per-block basis.

[0130] Clause 8. The method of clause 6, wherein a first order of the symbol candidates in the first lookup table and a second order of the symbol candidates in the second lookup table are different.

[0131] Clause 9. The method according to clause 3, wherein the set of symbol candidates is generated based on at least one of the following: cost, error, difference obtained according to a template matching method.

[0132] Clause 10. The method of clause 9, wherein the set of symbol candidates is reordered based on the template matching method.

[0133] Clause 11. The method of clause 9, wherein the template matching method comprises matching a first predefined set of reconstructed samples adjacent to the first block with a second predefined set of reconstructed samples adjacent to the second block.

[0134] Clause 12. The method of clause 3, wherein the block vector difference comprises a horizontal component and a vertical component, and the sign of at least one of the horizontal component or the vertical component is context encoded.

[0135] Clause 13. The method of any one of clauses 1 to 12, wherein the block vector difference comprises at least one of: a motion vector difference (MVD), a block vector difference (BVD).

[0136] Clause 14. A method according to any one of clauses 1 to 13, wherein whether and / or how to determine the indication of the sign of the block vector difference of the video unit is indicated at one of: a sequence level, a picture group level, a picture level, a slice level, or a tile group level.

[0137] Clause 15. A method according to any one of clauses 1 to 13, wherein an indication of whether and / or how to determine the sign of the block vector difference of the video unit is indicated in one of the following: a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a dependency parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, or a tile group header.

[0138] Clause 16. A method according to any one of clauses 1 to 13, wherein whether and / or how to determine the indication of the sign of the block vector difference of the video unit is included in one of the following: a prediction block (PB), a transform block (TB), a codec block (CB), a prediction unit (PU), a transform unit (TU), a codec unit (CU), a virtual pipeline data unit (VPDU), a codec tree unit (CTU), a CTU row, a slice, a tile, a sub-picture, or a region containing more than one sample or pixel.

[0139] Clause 17. The method according to any one of clauses 1 to 13 further includes: determining whether and / or how to determine the sign of the block vector difference of the video unit based on the coding and decoding information of the video unit, the coding and decoding information including at least one of the following: block size, color format, single tree and / or dual tree partitioning, color component, slice type, or picture type.

[0140] Clause 18. A video processing method, comprising: for conversion between a video unit of a video and a bitstream of the video, determining a context initialization probability of a first stripe of the video unit based on information of a second stripe of the video unit; and performing the conversion based on the context initialization probability.

[0141] Clause 19. The method of clause 18, wherein the context initialization probability for the first slice depends on a further context initialization probability obtained from the second slice based on a quantization parameter (QP).

[0142] Clause 20. The method of clause 19, wherein a method of deriving the additional context initialization probability from the second slice is based on whether a QP difference between the first slice and the second slice is less than a threshold.

[0143] Clause 21. The method of clause 19, wherein a method of deriving the additional context initialization probability from the second slice is based on whether the first slice and the second slice are from the same QP range.

[0144] Clause 22. The method of clause 19, wherein a method of deriving the additional context initialization probability from the second slice is based on whether the first slice and the second slice are from the same QP class.

[0145] Clause 23. The method of clause 18, wherein if the first slice derives additional context initialization probabilities from the second slice, the temporal layers of the second slice are required to be no larger than the temporal layers of the first slice.

[0146] Clause 24. The method of clause 23, wherein the temporal layer of the second slice is equal to the temporal layer of the first slice if the first slice derives the further context initialization probability from the second slice.

[0147] Clause 25. The method of clause 23, wherein if the first slice derives the further context initialization probability from the second slice, the temporal layer of the second slice is smaller than the temporal layer of the first slice.

[0148] Clause 26. The method of clause 23, wherein if the first slice derives the additional context initialization probability from the second slice, the temporal layer of the second slice is not greater than the temporal layer of the first slice.

[0149] Clause 27. The method of clause 18, wherein the context initialization probability for the first slice is independent of further context initialization probabilities obtained from the second slice in the same picture.

[0150] Clause 28. The method of Clause 27, wherein the second slice is encoded before the first slice.

[0151] Clause 29. The method of clause 18, wherein the context initialization probability for the first slice in a first picture depends on a further context initialization probability obtained from the second slice in a second picture.

[0152] Clause 30. A method according to clause 29, wherein the first picture is different from the second picture, and / or wherein the second picture is encoded and decoded before the first picture, and / or wherein the second picture is a reference picture of the first stripe or the first picture, and / or wherein the second picture is not a reference picture of the first stripe or the first picture.

[0153] Clause 31. The method of clause 18, wherein the initialization probability dependency of the first slice and the second slice is based on slice type instead of QP.

[0154] Clause 32. The method of clause 31, wherein if the first slice and the second slice are encoded using the same slice type, then the context initialization probability of the first slice depends on a further context initialization probability of the second slice.

[0155] Clause 33. The method of clause 31, wherein the context initialization probability for the first slice is dependent on another context initialization probability for the second slice, regardless of QP values ​​for the first slice and the second slice.

[0156] Clause 34. A method according to any one of clauses 18 to 33, wherein an indication of whether and / or how to determine the context initialization probability of the first slice is indicated at one of the following: sequence level, picture group level, picture level, slice basic, or tile group level.

[0157] Clause 35. A method according to any one of clauses 18 to 33, wherein an indication of whether and / or how to determine the context initialization probability of the first slice is indicated in one of the following: a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a dependency parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, or a tile group header.

[0158] Clause 36. A method according to any one of clauses 18 to 33, wherein an indication of whether and / or how to determine the context initialization probability of the first slice is included in one of the following: a prediction block (PB), a transform block (TB), a codec block (CB), a prediction unit (PU), a transform unit (TU), a codec unit (CU), a virtual pipeline data unit (VPDU), a codec tree unit (CTU), a CTU row, a slice, a tile, a sub-picture; or an area containing more than one sample or pixel.

[0159] Clause 37. The method according to any one of clauses 18 to 33 further includes: determining whether and / or how to determine the context initialization probability of the first slice based on the codec information of the video unit, the codec information including at least one of the following: block size, color format, single tree and / or dual tree partitioning, color component, slice type, or picture type.

[0160] Clause 38. A video processing method, comprising: for conversion between a video unit of a video and a bitstream of the video, determining that a block vector of the video unit is outside a reference area, and wherein the video unit is encoded and decoded using an intra-block copy (IBC) mode; changing the value of the block vector; and performing the conversion based on the changed value of the block vector.

[0161] Clause 39. The method of clause 38, wherein an operation is applied to a block vector candidate and the block vector is changed to a valid block vector within the reference region.

[0162] Clause 40. The method of clause 39, wherein the operation is based on a cropping process, or wherein the operation is based on a scaling process.

[0163] Clause 41. The method of clause 38, wherein a clipping operation is applied to the block vector to clip the block vector within the reference region.

[0164] Clause 42. The method of clause 41, wherein the clipping operation clips to the nearest boundary of the reference region.

[0165] Clause 43. The method of clause 38, wherein another block vector is used to replace the block vector.

[0166] Clause 44. A method according to any one of clauses 38 to 43, wherein the indication of whether and / or how to change the value of the block vector is indicated at one of: sequence level, picture group level, picture level, slice level, or tile group level.

[0167] Clause 45. A method according to any one of clauses 38 to 43, wherein an indication of whether and / or how to change the value of the block vector is indicated in one of the following: a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a dependency parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, or a tile group header.

[0168] Clause 46. A method according to any one of clauses 38 to 43, wherein an indication of whether and / or how to change the value of the block vector is included in one of the following: a prediction block (PB), a transform block (TB), a codec block (CB), a prediction unit (PU), a transform unit (TU), a codec unit (CU), a virtual pipeline data unit (VPDU), a codec tree unit (CTU), a CTU row, a slice, a tile, a sub-picture; or an area containing more than one sample or pixel.

[0169] Clause 47. The method according to any one of clauses 38 to 43 further includes: determining whether and / or how to change the value of the block vector based on the codec information of the video unit, the codec information including at least one of the following: block size, color format, single tree and / or dual tree partitioning, color component, slice type, or picture type.

[0170] Clause 48. The method of any one of clauses 1 to 47, wherein the converting comprises encoding the video unit into the bitstream.

[0171] Clause 49. The method of any one of clauses 1 to 47, wherein the converting comprises decoding the video unit from the bitstream.

[0172] Clause 50. An apparatus for video processing, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any one of clauses 1 to 49.

[0173] Clause 51. A non-transitory computer-readable storage medium storing instructions that cause a processor to perform the method of any one of clauses 1 to 49.

[0174] Item 52. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by a device for video processing, wherein the method comprises: determining a sign of a block vector difference of a video unit, wherein the sign is predictively encoded and decoded, and the video unit is encoded and decoded using an intra-block copy (IBC) mode; and generating the bitstream based on the sign and value of the block vector difference.

[0175] Clause 53. A method for storing a bitstream of a video, comprising: determining a sign of a block vector difference of a video unit, wherein the sign is predictively encoded and the video unit is encoded and decoded using an intra-block copy (IBC) mode; generating the bitstream based on the sign and value of the block vector difference; and storing the bitstream in a non-transitory computer-readable recording medium.

[0176] Item 54. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method executed by a device for video processing, wherein the method comprises: determining a context initialization probability of a first stripe of the video unit based on information of a second stripe of the video unit; and generating the bitstream based on the context initialization probability. Clause 55. A method for storing a bitstream of a video, comprising: determining a context initialization probability of a first stripe of a video unit based on information of a second stripe of the video unit; generating the bitstream based on the context initialization probability; and storing the bitstream in a non-transitory computer-readable recording medium.

[0177] Item 56. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by a device for video processing, wherein the method comprises: determining that a block vector of a video unit is outside a reference area, and wherein the video unit is encoded and decoded using an intra-block copy (IBC) mode; changing the value of the block vector; and generating the bitstream based on the changed value of the block vector.

[0178] Clause 57. A method for storing a bitstream of a video, comprising: determining that a block vector of a video unit is outside a reference area, and wherein the video unit is encoded and decoded using an intra-block copy (IBC) mode; changing the value of the block vector; generating the bitstream based on the changed value of the block vector; and storing the bitstream in a non-transitory computer-readable recording medium. Example Device

[0179] Fig.17 A block diagram of a computing device 1700 in which various embodiments of the present disclosure may be implemented is shown. The computing device 1700 may be implemented as a source device 110 (or video encoder 114 or 200) or a destination device 120 (or video decoder 124 or 300), or may be included in a source device 110 (or video encoder 114 or 200) or a destination device 120 (or video decoder 124 or 300).

[0180] It should be understood that Fig.17The computing device 1700 shown in the figure is for illustration purposes only and is not intended to in any way imply any limitation on the functionality and scope of the embodiments of the present disclosure.

[0181] like Fig.17 As shown, computing device 1700 includes a general computing device 1700. Computing device 1700 may include at least one or more processors or processing units 1710, memory 1720, storage unit 1730, one or more communication units 1740, one or more input devices 1750, and one or more output devices 1760.

[0182] In some embodiments, computing device 1700 can be implemented as any user terminal or server terminal with computing capability. A server terminal can be a server, a large computing device, etc. provided by a service provider. A user terminal can be, for example, any type of mobile terminal, fixed terminal, or portable terminal, including a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet computer, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device, or any combination thereof, and includes accessories and peripherals of these devices, or any combination thereof. It is conceivable that computing device 1700 can support any type of interface to a user (such as a "wearable" circuit device, etc.).

[0183] The processing unit 1710 may be a physical processor or a virtual processor and may implement various processes based on a program stored in the memory 1720. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the computing device 1700. The processing unit 1710 may also be referred to as a central processing unit (CPU), a microprocessor, a controller, or a microcontroller.

[0184] The computing device 1700 typically includes various computer storage media. Such media can be any media accessible by the computing device 1200, including but not limited to volatile media and non-volatile media, or removable media and non-removable media. The memory 1720 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (such as a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM) or flash memory) or any combination thereof. The storage unit 1730 can be any removable or non-removable medium, and can include machine-readable media, such as a memory, a flash drive, a disk, or other media that can be used to store information and / or data and can be accessed in the computing device 1700.

[0185] The computing device 1700 may also include additional removable / non-removable storage media, volatile / non-volatile storage media. Fig.17 Although not shown in the figure, a magnetic disk drive for reading from and / or writing to a removable nonvolatile magnetic disk and an optical disk drive for reading from and / or writing to a removable nonvolatile optical disk may be provided. In this case, each drive may be connected to the bus (not shown) via one or more data medium interfaces.

[0186] The communication unit 1740 communicates with another computing device via a communication medium. In addition, the functions of the components in the computing device 1700 can be implemented by a single computing cluster or multiple computing machines that can communicate via a communication connection. Therefore, the computing device 1700 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or other general network nodes.

[0187] Input device 1750 may be one or more of various input devices, such as a mouse, keyboard, trackball, voice input device, etc. Output device 1760 may be one or more of various output devices, such as a display, speaker, printer, etc. With the aid of communication unit 1740, computing device 1700 may also communicate with one or more external devices (not shown), such as storage devices and display devices, and computing device 1700 may also communicate with one or more devices that enable a user to interact with computing device 1700, or any device that enables computing device 1700 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.), if necessary. Such communication may be performed via an input / output (I / O) interface (not shown).

[0188] In some embodiments, some or all components of the computing device 1700 may also be arranged in a cloud computing architecture rather than being integrated in a single device. In a cloud computing architecture, components may be provided remotely and work together to implement the functions described in the present disclosure. In some embodiments, cloud computing provides computing, software, data access and storage services, which will not require the end user to know the physical location or configuration of the system or hardware that provides these services. In various embodiments, cloud computing provides services via a wide area network (e.g., the Internet) using a suitable protocol. For example, a cloud computing provider provides applications via a wide area network, which can be accessed through a web browser or any other computing component. The software or components of the cloud computing architecture and the corresponding data may be stored on a remote server. The computing resources in a cloud computing environment may be merged or distributed at the location of a remote data center. Cloud computing infrastructures may provide services through a shared data center, although they appear as a single access point for users. Therefore, cloud computing architectures may be used to provide components and functions described herein from a service provider at a remote location. Alternatively, they may be provided by a conventional server, or installed directly or otherwise on a client device.

[0189] In an embodiment of the present disclosure, the computing device 1700 may be used to implement video encoding / decoding. The memory 1720 may include one or more video encoding / decoding modules 1725 having one or more program instructions. These modules can be accessed and executed by the processing unit 1710 to perform the functions of the various embodiments described herein.

[0190] In an example embodiment performing video encoding, input device 1750 may receive video data as input 1770 to be encoded. The video data may be processed by, for example, video codec module 1725 to generate an encoded bitstream. The encoded bitstream may be provided as output 1780 via output device 1760.

[0191] In an example embodiment performing video decoding, input device 1750 may receive an encoded bitstream as input 1770. The encoded bitstream may be processed by, for example, video codec module 1725 to generate decoded video data. The decoded video data may be provided as output 1780 via output device 1760.

[0192] Although the present disclosure has been specifically shown and described with reference to the preferred embodiments of the present disclosure, it will be understood by those skilled in the art that various changes can be made in form and detail without departing from the spirit and scope of the present application as defined by the appended claims. These changes are intended to be encompassed by the scope of the present application. Therefore, the foregoing description of the embodiments of the present application is not intended to be limiting.

Claims

1. A video processing method, comprising: determining, for conversion between a video unit of a video and a bitstream of the video, a sign of a block vector difference of the video unit, wherein the sign is predictively coded and the video unit is coded using an intra block copy (IBC) mode; as well as The converting is performed based on the sign and value of the block vector difference.

2. The method of claim 1, wherein the block vector difference comprises a horizontal component and a vertical component, and The sign of at least one of the horizontal component or the vertical component is predictively encoded.

3. The method of claim 1 , wherein the block vector difference comprises a horizontal component and a vertical component, and The symbol of at least one of the horizontal component or the vertical component is represented by an index from a lookup table, wherein the lookup table includes a set of symbol candidates.

4. The method of claim 3, wherein the set of symbol candidates in the lookup table is predefined and used for both an encoder and a decoder. The method according to claim 3 , wherein the set of symbol candidates is dynamically generated.

6. The method of claim 3, wherein at least two lookup tables are enabled to encode and decode IBC block vector differences. The method of claim 6 , wherein the lookup table is on a per-block basis.

8. The method of claim 6, wherein a first order of symbol candidates in the first lookup table and a second order of symbol candidates in the second lookup table are different.

9. The method of claim 3, wherein the set of symbol candidates is generated based on at least one of: a cost, an error, a difference obtained according to a template matching method.

10. The method of claim 9, wherein the set of symbol candidates is reordered based on the template matching method.

11. The method of claim 9, wherein the template matching method comprises matching a first predefined set of reconstructed samples adjacent to a first block with a second predefined set of reconstructed samples adjacent to a second block.

12. The method of claim 3, wherein the block vector difference comprises a horizontal component and a vertical component, and The symbol of at least one of the horizontal component or the vertical component is context encoded.

13. The method according to any one of claims 1 to 12, wherein the block vector difference comprises at least one of the following: a motion vector difference (MVD), a block vector difference (BVD).

14. The method of any one of claims 1 to 13, wherein an indication of whether and / or how to determine the sign of the block vector difference of the video unit is indicated at one of: Sequence level, Picture group level, Picture level, Stripe level, or Tile group level.

15. The method of any one of claims 1 to 13, wherein an indication of whether and / or how to determine the sign of the block vector difference of the video unit is indicated in one of: Sequence header, Picture header, Sequence Parameter Set (SPS), Video Parameter Set (VPS), Dependency Parameter Set (DPS), Decoding Capability Information (DCI), Picture Parameter Set (PPS), Adaptive Parameter Set (APS), Strip header, or Tile group header.

16. The method of any one of claims 1 to 13, wherein the indication of whether and / or how to determine the sign of the block vector difference of the video unit is comprised in one of: Prediction Block (PB), Transform Block (TB), Codec Block (CB), Prediction Unit (PU), Transformation Unit (TU), Codec Unit (CU), Virtual Pipeline Data Unit (VPDU), Codec Tree Unit (CTU), CTU line, Strips, Tile, sub-image, or An area that contains more than one sample or pixel.

17. The method according to any one of claims 1 to 13, further comprising: Determine whether and / or how to determine the sign of the block vector difference of the video unit based on the codec information of the video unit, the codec information including at least one of the following: Block size, Color format, Single-tree and / or dual-tree partitioning, Color components, Strip type, or Image type.

18. A video processing method, comprising: For conversion between a video unit of a video and a bitstream of the video, determining a context initialization probability of a first slice of the video unit based on information of a second slice of the video unit; as well as The converting is performed based on the context initialization probability.

19. The method of claim 18, wherein the context initialization probability of the first slice depends on another context initialization probability obtained from the second slice based on a quantization parameter (QP).

20. The method of claim 19, wherein a method of deriving the additional context initialization probability from the second slice is based on whether a QP difference between the first slice and the second slice is less than a threshold.

21. The method of claim 19, wherein a method of deriving the additional context initialization probability from the second slice is based on whether the first slice and the second slice are from the same QP range.

22. The method of claim 19, wherein a method of deriving the additional context initialization probability from the second slice is based on whether the first slice and the second slice are from the same QP category.

23. The method of claim 18, wherein if the first slice derives additional context initialization probabilities from the second slice, the temporal layers of the second slice are required to be no larger than the temporal layers of the first slice.

24. The method of claim 23, wherein if the first slice derives the further context initialization probability from the second slice, the temporal layer of the second slice is equal to the temporal layer of the first slice.

25. The method of claim 23, wherein if the first slice derives the additional context initialization probability from the second slice, the temporal layer of the second slice is smaller than the temporal layer of the first slice.

26. The method of claim 23, wherein if the first slice derives the additional context initialization probabilities from the second slice, the temporal slice of the second slice is no larger than the temporal slice of the first slice.

27. The method of claim 18, wherein the context initialization probability for the first slice is independent of another context initialization probability obtained from the second slice in the same picture.

28. The method of claim 27, wherein the second slice is encoded and decoded before the first slice.

29. The method of claim 18, wherein the context initialization probability of the first slice in a first picture depends on another context initialization probability obtained from the second slice in a second picture.

30. The method according to claim 29, wherein the first picture is different from the second picture, and / or wherein the second picture is encoded and decoded before the first picture, and / or, The second picture is a reference picture of the first stripe or first picture, and / or The second picture is not a reference picture of the first slice or the first picture.

31. The method of claim 18, wherein initialization probability dependence of the first slice and the second slice is based on slice type instead of QP.

32. The method of claim 31, wherein if the first slice and the second slice are coded using the same slice type, then the context initialization probability of the first slice depends on another context initialization probability of the second slice.

33. The method of claim 31, wherein the context initialization probability for the first slice is dependent on another context initialization probability for the second slice regardless of QP values ​​for the first slice and the second slice.

34. The method according to any one of claims 18 to 33, wherein an indication of whether and / or how to determine the context initialization probability for the first slice is indicated at one of: Sequence level, Picture group level, Picture level, Stripe Basic, or Tile group level.

35. The method according to any one of claims 18 to 33, wherein the indication of whether and / or how to determine the context initialization probability of the first slice is indicated in one of: Sequence header, Picture header, Sequence Parameter Set (SPS), Video Parameter Set (VPS), Dependency Parameter Set (DPS), Decoding Capability Information (DCI), Picture Parameter Set (PPS), Adaptive Parameter Set (APS), Strip header, or Tile group header.

36. The method according to any one of claims 18 to 33, wherein the indication of whether and / or how to determine the context initialization probability of the first slice is included in one of: Prediction Block (PB), Transform Block (TB), Codec Block (CB), Prediction Unit (PU), Transformation Unit (TU), Codec Unit (CU), Virtual Pipeline Data Unit (VPDU), Codec Tree Unit (CTU), CTU line, Strips, Tile, sub-image; or An area that contains more than one sample or pixel.

37. The method according to any one of claims 18 to 33, further comprising: Determine whether and / or how to determine the context initialization probability of the first slice based on codec information of the video unit, the codec information including at least one of the following: Block size, Color format, Single-tree and / or dual-tree partitioning, Color components, Strip type, or Image type.

38. A video processing method, comprising: For conversion between a video unit of a video and a bitstream of the video, determining that a block vector of the video unit is outside a reference region, wherein the video unit is encoded and decoded using an intra block copy (IBC) mode; changing the value of the block vector; and The converting is performed based on the changed value of the block vector.

39. The method of claim 38, wherein an operation is applied to a block vector candidate and the block vector is changed to a valid block vector within the reference region.

40. The method of claim 39, wherein the operation is based on a clipping process, or The operation described therein is based on a scaling process.

41. The method of claim 38, wherein a clipping operation is applied to the block vector to clip the block vector within the reference region.

42. The method of claim 41, wherein the clipping operation clips to a nearest boundary of the reference region.

43. The method of claim 38, wherein another block vector is used to replace the block vector.

44. A method according to any one of claims 38 to 43, wherein an indication of whether and / or how to change the value of the block vector is indicated at one of: Sequence level, Picture group level, Picture level, Stripe level, or Tile group level.

45. A method according to any one of claims 38 to 43, wherein the indication of whether and / or how to change the value of the block vector is indicated in one of: Sequence header, Picture header, Sequence Parameter Set (SPS), Video Parameter Set (VPS), Dependency Parameter Set (DPS), Decoding Capability Information (DCI), Picture Parameter Set (PPS), Adaptive Parameter Set (APS), Strip header, or Tile group header.

46. ​​A method according to any one of claims 38 to 43, wherein the indication of whether and / or how to change the value of the block vector is comprised in one of: Prediction Block (PB), Transform Block (TB), Codec Block (CB), Prediction Unit (PU), Transformation Unit (TU), Codec Unit (CU), Virtual Pipeline Data Unit (VPDU), Codec Tree Unit (CTU), CTU line, Strips, Tile, sub-image; or An area that contains more than one sample or pixel.

47. The method according to any one of claims 38 to 43, further comprising: Determine whether and / or how to change the value of the block vector based on the codec information of the video unit, wherein the codec information includes at least one of the following: Block size, Color format, Single-tree and / or dual-tree partitioning, Color components, Strip type, or Image type.

48. The method of any one of claims 1 to 47, wherein the converting comprises encoding the video unit into the bitstream.

49. The method of any one of claims 1 to 47, wherein the converting comprises decoding the video unit from the bitstream.

50. An apparatus for video processing, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any one of claims 1 to 49.

51. A non-transitory computer readable storage medium storing instructions that cause a processor to perform the method according to any one of claims 1 to 49.

52. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by an apparatus for video processing, wherein the method comprises: determining a sign of a block vector difference of a video unit, wherein the sign is predictively coded and the video unit is coded using an intra block copy (IBC) mode; as well as The bitstream is generated based on the signs and values ​​of the block vector differences.

53. A method for storing a bitstream of a video, comprising: determining a sign of a block vector difference of a video unit, wherein the sign is predictively coded and the video unit is coded using an intra block copy (IBC) mode; generating the bitstream based on the signs and values ​​of the block vector differences; as well as The bit stream is stored in a non-transitory computer-readable recording medium.

54. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by an apparatus for video processing, wherein the method comprises: Determining a context initialization probability of a first slice of the video unit based on information of a second slice of the video unit; as well as The bitstream is generated based on the context initialization probability.

55. A method for storing a bitstream of a video, comprising: Determining a context initialization probability of a first slice of the video unit based on information of a second slice of the video unit; generating the bitstream based on the context initialization probability; as well as The bit stream is stored in a non-transitory computer-readable recording medium.

56. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by an apparatus for video processing, wherein the method comprises: determining that a block vector of a video unit is outside a reference region, and wherein the video unit is encoded and decoded using an intra block copy (IBC) mode; changing the value of the block vector; and The bitstream is generated based on the changed value of the block vector.

57. A method for storing a bitstream of a video, comprising: determining that a block vector of a video unit is outside a reference region, and wherein the video unit is encoded and decoded using an intra block copy (IBC) mode; changing the value of the block vector; generating the bitstream based on the changed value of the block vector; as well as The bit stream is stored in a non-transitory computer-readable recording medium.