Video encoding and decoding method, device and medium

By decoding the prediction information and block vector of the current block in the video decoding method, optimizing the search range and constraints, the problem of low encoding efficiency of high-resolution videos in the prior art is solved, and higher encoding efficiency and performance are achieved.

CN114666607BActive Publication Date: 2025-02-07TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210399292.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-07-31
Filing Date
2020-03-04
Publication Date
2025-02-07
Estimated Expiration
2040-03-04

AI Technical Summary

Technical Problem

When existing video encoding and decoding technologies deal with high-resolution video, it is difficult to effectively reduce bandwidth and storage space requirements, and at the same time there is a problem of inefficient encoding.

Method used

By decoding the prediction information of the current block from the encoded video code stream in the video decoding method, determining whether the current block is the first reconstructed block in the current area, and reconstructing the sample of the current block according to the block vector, optimizing the search range and constraints to improve coding efficiency.

Benefits of technology

It achieves higher video encoding efficiency, reduces bandwidth and storage space requirements, and improves video decoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114666607B_ABST
    Figure CN114666607B_ABST
Patent Text Reader

Abstract

Disclosed are a method, device and medium for video decoding. The device decodes prediction information of a current block from an encoded video code stream. The prediction information indicates an intra-frame block copy mode. The current block is one of a plurality of coding blocks in a current region of a current coding tree block (CTB) in a current picture. The device determines whether the current block is the first reconstructed block in the current region. When the current block is the first reconstructed block in the current region, the device determines a block vector for the current block, wherein a reference block indicated by the block vector is located in a search range in the current picture that does not include a co-located region in a previously reconstructed CTB. The relative position of the co-located region in the previously reconstructed CTB is the same as the relative position of the current region in the current CTB.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Join by reference

[0002] This application is a divisional application of an actively modified version of a patent application with a filing date of March 4, 2020, Chinese patent application number 202080002122.8, and invention name “Video Decoding Method and Device”. Technical Field

[0003] This application describes embodiments generally related to video encoding and decoding. Background Art

[0004] The background technology description provided in this article is for the purpose of generally describing the contents of the present disclosure. Certain works of the inventors (i.e., works described in this background technology section) and the contents in the specification concerning certain prior arts that have not become prior arts before the filing date are not considered to be prior arts with respect to the present disclosure, whether explicitly or implicitly.

[0005] Video encoding and decoding can be performed using inter-picture prediction with motion compensation. Uncompressed digital video can include a series of pictures, each picture having a spatial dimension of, for example, 1920x1080 luma samples and associated chroma samples. The series of pictures can have a fixed or variable picture rate (also informally referred to as a frame rate) of, for example, 60 pictures per second or 60Hz. Uncompressed video has very high bit rate requirements. For example, 1080p604:2:0 video with 8 bits per sample (1920x1080 luma sample resolution at 60Hz frame rate) requires a bandwidth of nearly 1.5Gbit / s. One hour of such video requires more than 600GB of storage space.

[0006] One purpose of video encoding and decoding can be to reduce redundancy in the input video signal through compression. Compression can help reduce the bandwidth or storage space requirements mentioned above, in some cases by two orders of magnitude or more. Lossless compression and lossy compression, as well as combinations thereof, can be employed. Lossless compression refers to techniques that can reconstruct an exact copy of the original signal from the compressed original signal. When lossy compression is used, the reconstructed signal may be different from the original signal, but the distortion between the original signal and the reconstructed signal is small enough to make the reconstructed signal usable for the intended application. In the case of video, lossy compression is widely used. The amount of tolerable distortion depends on the application, for example, users of certain consumer streaming applications can tolerate higher distortion than users of television distribution applications. The achievable compression rate can reflect that higher tolerable / acceptable distortion can produce higher compression rates.

[0007] Video encoders and video decoders may utilize a variety of broad categories of techniques including, for example, motion compensation, transforms, quantization, and entropy coding.

[0008] Video codec techniques may include a technique known as intra-coding. In intra-coding, sample values ​​are represented without reference to samples or other data from previously reconstructed reference pictures. In some video codecs, pictures are spatially subdivided into blocks of samples. When all blocks of samples are encoded in intra-mode, the picture may be an intra-picture. Intra-pictures and their derivatives (such as independent decoder refresh pictures) can be used to reset the decoder state, and can therefore be used as the first picture in a coded video bitstream and video session, or as a still image. The samples of the intra-block can be transformed, and the transform coefficients can be quantized before entropy coding. Intra-prediction can be a technique for minimizing sample values ​​in the pre-transform domain. In some cases, the smaller the DC value after the transform and the smaller the AC coefficient, the fewer bits are needed to represent the entropy-coded block at a given quantization step size.

[0009] Conventional intra-frame coding, such as is known from, for example, MPEG-2 generation coding techniques, does not use intra-frame prediction. However, some newer video compression techniques include techniques that attempt to use, for example, surrounding sample data and / or metadata obtained during encoding / decoding of spatially adjacent and preceding data blocks in decoding order. Such techniques are hereinafter referred to as "intra-frame prediction" techniques. Note that, at least in some cases, intra-frame prediction uses only reference data from the current picture being reconstructed, and not reference data from reference pictures.

[0010] Intra-frame prediction can take many different forms. When more than one such technique can be used in a given video coding technique, the technique in use can be encoded in an intra-frame prediction mode. In some cases, a mode can have sub-modes and / or parameters, and these sub-modes and / or parameters can be encoded separately or included in a mode codeword. Which codeword is used for a given mode / sub-mode / parameter combination may have an impact on the coding efficiency gain through intra-frame prediction, and the entropy coding technique used to convert the codeword into a bitstream may also have an impact on it.

[0011] H.264 introduced a certain intra-frame prediction mode, which was improved in H.265 and further improved in new coding techniques such as the Joint Exploration Model (JEM), Versatile Video Coding (VVC), Benchmark Set (BMS), etc. The predictor block can be formed using the neighboring sample values ​​belonging to the already available samples. The sample values ​​of the neighboring samples are copied to the predictor block according to the direction. The reference to the used direction can be encoded in the bitstream, or it can be predicted itself.

[0012] refer to Figure 1 , depicted at the bottom right is a subset of 9 predictor directions known from the 33 possible predictor directions of H.265 (corresponding to the 33 angular modes in the 35 intra modes). The point (101) where the arrows converge represents the sample being predicted. The arrows represent the direction of the sample being predicted. For example, arrow (102) indicates that sample (101) is predicted from one or more samples in the upper right direction at a 45 degree angle to the horizontal. Similarly, arrow (103) indicates that sample (101) is predicted from one or more samples in the lower left direction of sample (101) at a 22.5 degree angle to the horizontal.

[0013] Still refer to Figure 1 , a square block (104) of 4x4 samples is depicted in the upper left corner (indicated by the bold dashed line). The square block (104) contains 16 samples, each of which is labeled with an "S" and its position in the Y dimension (e.g., row index) and its position in the X dimension (e.g., column index). For example, sample S21 is the second sample in the Y dimension (from the top) and the first sample in the X dimension (from the left). Similarly, sample S44 is the fourth sample in the block (104) in both the Y dimension and the X dimension. Since the size of the block is 4x4 samples, S44 is in the lower right corner. Figure 1 Reference samples are also shown in , following a similar numbering scheme. Reference samples are labeled with R and their Y position (e.g., row index) and X position (column index) relative to the block (104). In both H.264 and H.265, the prediction samples are adjacent to the block being reconstructed, so there is no need to use negative values.

[0014] Intra-picture prediction can work by copying reference sample values ​​from neighboring samples occupied by a signaled prediction direction. For example, assume that the encoded video bitstream includes signaling that indicates a prediction direction consistent with arrow (102) for the block, that is, the sample is predicted from one or more prediction samples in the upper right corner at a 45 degree angle to the horizontal. In this case, samples S41, S32, S23, and S14 are predicted based on the same reference sample R05. Sample S44 is then predicted based on reference sample R08.

[0015] In some cases, the values ​​of multiple reference samples may be combined, such as by interpolation, in order to calculate the reference sample, especially when the direction is not divisible by 45 degrees.

[0016] As video coding techniques have evolved, the number of possible directions has increased. In H.264 (2003), nine different directions could be represented. This number increased to 33 in H.265 (2013), and at the time of this disclosure, up to 65 directions are supported in JEM / VVC / BMS. Experiments have been conducted to identify the most likely directions, and certain techniques in entropy coding are used to represent those possible directions with a small number of bits, accepting a certain cost for less likely directions. In addition, the direction itself can sometimes be predicted based on neighboring directions used in neighboring blocks that have already been decoded.

[0017] Figure 2 is a schematic diagram (201) showing 65 intra prediction directions according to JEM, thereby showing the number of prediction directions increasing over time.

[0018] The mapping of the intra prediction direction bits representing the direction in the coded video bitstream can vary from one video coding technique to another, and, for example, can range from a simple direct mapping of prediction directions to intra prediction modes to codewords to complex adaptive schemes involving most likely modes and similar techniques. However, in all cases, there may be some directions that are statistically less likely to occur in the video content than some other directions. Since the goal of video compression is to reduce redundancy, in a well-functioning video coding technique, those less likely directions will be represented by a larger number of bits than the more likely directions. Summary of the invention

[0019] Embodiments of the present application provide a method, device, and medium for video encoding / decoding.

[0020] A video decoding method, comprising:

[0021] Decoding prediction information of a current block from an encoded video bitstream, the prediction information indicating an intra block copy mode, the current block being one of a plurality of coding blocks in a current region of a current coding tree block (CTB) in a current picture;

[0022] Determining whether the current block is the first reconstructed block in the current area;

[0023] When the current block is the first reconstructed block in the current region, setting a reference block in a co-located region of the current region in a previously reconstructed CTB to be unavailable, the relative position of the co-located region in the previously reconstructed CTB being the same as the relative position of the current region in the current CTB; and

[0024] A block vector of the current block is determined, and at least one sample of the current block is reconstructed according to the block vector.

[0025] In the above scheme, the reference block indicated by the block vector is within a search range, and the search range includes coding blocks reconstructed after the co-located area and before the current block.

[0026] In the above scheme, the size of the current CTB is equal to the size of the reference memory, the previously reconstructed CTB is the left neighbor of the current CTB, the position of the co-located region is offset by the width of the current CTB relative to the position of the current region, and the coding block in the search range is located in at least one of the current CTB and the previously reconstructed CTB.

[0027] In the above scheme, a first constraint and a second constraint are set; the first constraint includes: taking the position coordinates of the upper left sample of the current block as input to call the derivation process of the reference block availability of the current block, and a false output indicates that the co-located area of ​​the reference block has not been reconstructed; the second constraint includes: the position coordinates of the upper left sample of the co-located area where the reference block is located are not equal to the position coordinates of the upper left sample of the current area; when the first constraint and the second constraint are met, at least one sample of the current block is reconstructed according to the block vector.

[0028] In the above scheme, the first constraint condition specifically includes: setting the position of the upper left sample of the current block to (xCb, yCb), when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1, setting the position coordinate (((xCb+(mvL[0]>>4+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) is used as input to call the derivation process of the reference block availability of the current block. If the output is false, it means that the co-located area of ​​the reference block has not been reconstructed; among them, mvL[0] and mvL[1] represent the x component and y component of the block vector respectively, CtbSizeY represents the CTB width, and CtbLog2SizeY represents the logarithm of the CTB width.

[0029] In the above scheme, the second constraint condition specifically includes: setting the position of the upper left sample of the current block to (xCb, yCb), the position coordinates of the upper left sample of the co-located area of ​​the reference block (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) are not equal to (xCb, yCb), ensuring that the position of the upper left sample of the co-located area where the reference block is located is not equal to the position of the upper left sample of the current area; wherein mvL[0] and mvL[1] respectively represent the x component and y component of the block vector, CtbSizeY represents the CTB width, and CtbLog2SizeY represents the logarithmic CTB width.

[0030] In the above scheme, the sizes of the current CTB and the previously reconstructed CTB are 128×128 samples, the current CTB includes 4 regions of 64×64 samples, the previously reconstructed CTB includes 4 regions of 64×64 samples, the position of the co-located region is offset by 128 samples relative to the position of the current region, the current region is one of the 4 regions in the current CTB, and the co-located region is one of the 4 regions in the previously reconstructed CTB.

[0031] In the above scheme, a third constraint and a fourth constraint are set; the third constraint includes: setting the position of the upper left sample of the current block to (xCb, yCb), when (xCb+(mvL[0]>>4))>>7 is equal to (xCb>>7)-1, using the position coordinates (((xCb+(mvL[0]>>4+128)>>6)<<6, ((yCb+(mvL[1]>>4))>>6)<<6) as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; the fourth constraint includes: determining the co-located area of ​​the reference block The upper left sample position coordinate (((xCb+(mvL[0]>>4)+128)>>6)<<6, ((yCb+(mvL[1]>>4))>>6)<<6) of the reference block is not equal to the upper left sample of the co-located area of ​​the reference block, wherein mvL[0] and mvL[1] represent the x component and y component of the block vector, respectively; wherein mvL[0] and mvL[1] represent the x component and y component of the block vector, respectively; when the third constraint and the fourth constraint are met, at least one sample of the current block is reconstructed according to the block vector.

[0032] In the above scheme, the 4 regions in the current CTB include an upper left region, an upper right region, a lower left region and a lower right region; the 4 regions in the previously reconstructed CTB include an upper left region, an upper right region, a lower left region and a lower right region; when the current region is the upper left region of the current CTB, the co-located region is the upper left region of the previously reconstructed CTB, and the search region does not include the upper left region of the previously reconstructed CTB; when the current region is the upper right region of the current CTB, the co-located region is the upper right region of the previously reconstructed CTB domain, and the search area does not include the upper left area and the upper right area of ​​the previously reconstructed CTB; when the current area is the lower left area of ​​the current CTB, the co-located area is the lower left area of ​​the previously reconstructed CTB, and the search area does not include the upper left area, the upper right area, and the lower left area of ​​the previously reconstructed CTB; and when the current area is the lower right area of ​​the current CTB, the co-located area is the lower right area of ​​the previously reconstructed CTB, and the search area does not include the previously reconstructed CTB.

[0033] In the above scheme, the current CTB includes 4 regions with the same size and shape, the previously reconstructed CTB includes 4 regions with the same size and shape, the current region is one of the 4 regions in the current CTB, and the co-located region is one of the 4 regions in the previously reconstructed CTB.

[0034] In the above scheme, the size of the current CTB is smaller than the size of the reference memory, the position of the co-located area is offset by the width of multiple current CTBs relative to the position of the current area, and the sample block in the search range is located in at least one of the following: the current CTB, the previously encoded CTB, and one or more encoded CTBs between the current CTB and the previously encoded CTB.

[0035] In the above scheme, a fifth constraint condition is set; the fifth constraint condition includes: taking the position coordinates of the upper left sample of the current block as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; when the fifth constraint condition is met, at least one sample of the current block is reconstructed according to the block vector.

[0036] In the above scheme, the fifth constraint condition specifically includes: setting the position of the upper left sample of the current block to (xCb, yCb), when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1<<((MaxCtbLog2SizeY-CtbLog2SizeY)<<1)), setting the position coordinate (((xCb+(mvL[0]>>4)+NCtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1 ), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1) is used as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; wherein, mvL[0] and mvL[1] represent the x component and y component of the block vector respectively, CtbSizeY represents the CTB width, CtbLog2SizeY represents the CTB width after taking the logarithm, and MaxCtbLog2SizeY represents the maximum CTB size or the reference memory size after taking the logarithm.

[0037] In the above scheme, the size of the current CTB is 64×64 samples, the size of the reference memory is 128×128 samples, the current CTB includes 4 areas of 32×32 samples, the previously reconstructed CTB includes 4 areas of 32×32 samples, and the position of the co-located area is offset by 256 samples relative to the position of the current area.

[0038] In the above scheme, a sixth constraint is set; the sixth constraint includes: setting the position of the upper left sample of the current block to (xCb, yCb), when (xCb+(mvL[0]>>4))>>6 is equal to (xCb>>6)-1<<(1<<1)), using the position coordinates (((xCb+(mvL[0]>>4)+256)>>5)<<5, ((yCb+(mvL[1]>>4))>>5)<<5) as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; wherein mvL[0] and mvL[1] represent the x component and y component of the block vector, respectively; when the sixth constraint is met, at least one sample of the current block is reconstructed according to the block vector.

[0039] In the above scheme, the coding block in the search range is located in at least one of the following: the current CTB and one or more reconstructed CTBs between the current CTB and the previously reconstructed CTB.

[0040] In the above scheme, the search range does not include the previously reconstructed CTB that is offset from the current CTB by N widths of the current CTB, where N is a ratio of the size of the reference memory to the size of the current CTB.

[0041] In the above scheme, additional data is obtained from the encoded video sequence, and the additional data is used to reconstruct the original video data. The additional data includes at least one of a time, space or signal-to-noise ratio enhancement layer, a redundant slice, a redundant picture, and a forward error correction code.

[0042] The embodiment of the present application also provides a device for video encoding, the device comprising a processing circuit. The processing circuit decodes prediction information of a current block from an encoded video code stream, the prediction information indicating an intra-frame block copy mode, the current block being one of a plurality of coding blocks in a current region of a current coding tree block (CTB) in a current picture; determines whether the current block is the first reconstructed block in the current region; when the current block is the first reconstructed block in the current region, sets a reference block in a co-located region of the current region in a previously reconstructed CTB to be unavailable, the relative position of the co-located region in the previously reconstructed CTB being the same as the relative position of the current region in the current CTB; and determines a block vector of the current block, and reconstructs at least one sample of the current block according to the block vector.

[0043] In the above device, the reference block indicated by the block vector is within a search range, and the search range includes coding blocks reconstructed after the co-located area and before the current block.

[0044] In the above-mentioned device, the size of the current CTB is equal to the size of the reference memory, the previously reconstructed CTB is the left neighbor of the current CTB, the position of the co-located region is offset by the width of the current CTB relative to the position of the current region, and the coding block in the search range is located in at least one of the current CTB and the previously reconstructed CTB.

[0045] In the above-mentioned device, a first constraint and a second constraint are set; the first constraint includes: taking the position coordinates of the upper left sample of the current block as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; the second constraint includes: the position coordinates of the upper left sample of the co-located area where the reference block is located are not equal to the position coordinates of the upper left sample of the current area; when the first constraint and the second constraint are met, at least one sample of the current block is reconstructed according to the block vector.

[0046] In the above device, the first constraint condition specifically includes: setting the position of the upper left sample of the current block to (xCb, yCb), when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1, setting the position coordinate (((xCb+(mvL[0]>>4+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) is used as input to call the derivation process of the reference block availability of the current block. If the output is false, it means that the co-located area of ​​the reference block has not been reconstructed; among them, mvL[0] and mvL[1] represent the x component and y component of the block vector respectively, CtbSizeY represents the CTB width, and CtbLog2SizeY represents the logarithm of the CTB width.

[0047] In the above-mentioned device, the second constraint condition specifically includes: setting the position of the upper left sample of the current block to (xCb, yCb), the upper left sample position coordinates of the co-located area of ​​the reference block (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) are not equal to (xCb, yCb), ensuring that the position of the upper left sample of the co-located area where the reference block is located is not equal to the position of the upper left sample of the current area; wherein mvL[0] and mvL[1] respectively represent the x component and y component of the block vector, CtbSizeY represents the CTB width, and CtbLog2SizeY represents the logarithm of the CTB width.

[0048] In the above-mentioned device, the sizes of the current CTB and the previously reconstructed CTB are 128×128 samples, the current CTB includes 4 regions of 64×64 samples, the previously reconstructed CTB includes 4 regions of 64×64 samples, the position of the co-located region is offset by 128 samples relative to the position of the current region, the current region is one of the 4 regions in the current CTB, and the co-located region is one of the 4 regions in the previously reconstructed CTB.

[0049] In the above device, a third constraint and a fourth constraint are set; the third constraint includes: setting the position of the upper left sample of the current block to (xCb, yCb), when (xCb+(mvL[0]>>4))>>7 is equal to (xCb>>7)-1, using the position coordinates (((xCb+(mvL[0]>>4+128)>>6)<<6, ((yCb+(mvL[1]>>4))>>6)<<6) as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; the fourth constraint includes: determining the co-located area of ​​the reference block The upper left sample position coordinate (((xCb+(mvL[0]>>4)+128)>>6)<<6, ((yCb+(mvL[1]>>4))>>6)<<6) of the reference block is not equal to the upper left sample of the co-located area of ​​the reference block, wherein mvL[0] and mvL[1] represent the x component and y component of the block vector, respectively; wherein mvL[0] and mvL[1] represent the x component and y component of the block vector, respectively; when the third constraint and the fourth constraint are met, at least one sample of the current block is reconstructed according to the block vector.

[0050] In the above device, the four regions in the current CTB include an upper left region, an upper right region, a lower left region, and a lower right region; the four regions in the previously reconstructed CTB include an upper left region, an upper right region, a lower left region, and a lower right region; when the current region is the upper left region of the current CTB, the co-located region is the upper left region of the previously reconstructed CTB, and the search region does not include the upper left region of the previously reconstructed CTB; when the current region is the upper right region of the current CTB, the co-located region is the upper right region of the previously reconstructed CTB domain, and the search area does not include the upper left area and the upper right area of ​​the previously reconstructed CTB; when the current area is the lower left area of ​​the current CTB, the co-located area is the lower left area of ​​the previously reconstructed CTB, and the search area does not include the upper left area, the upper right area, and the lower left area of ​​the previously reconstructed CTB; and when the current area is the lower right area of ​​the current CTB, the co-located area is the lower right area of ​​the previously reconstructed CTB, and the search area does not include the previously reconstructed CTB.

[0051] In the above device, the current CTB includes 4 regions with the same size and shape, the previously reconstructed CTB includes 4 regions with the same size and shape, the current region is one of the 4 regions in the current CTB, and the co-located region is one of the 4 regions in the previously reconstructed CTB.

[0052] In the above device, the size of the current CTB is smaller than the size of the reference memory, the position of the co-located area is offset by the width of multiple current CTBs relative to the position of the current area, and the sample block in the search range is located in at least one of the following: the current CTB, the previously encoded CTB, and one or more encoded CTBs located between the current CTB and the previously encoded CTB.

[0053] In the above device, a fifth constraint condition is set; the fifth constraint condition includes: taking the position coordinates of the upper left sample of the current block as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; when the fifth constraint condition is met, at least one sample of the current block is reconstructed according to the block vector.

[0054] In the above device, the fifth constraint condition specifically includes: setting the position of the upper left sample of the current block to (xCb, yCb), when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1<<((MaxCtbLog2SizeY-CtbLog2SizeY)<<1)), setting the position coordinate (((xCb+(mvL[0]>>4)+NCtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1 ), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1) is used as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; wherein, mvL[0] and mvL[1] represent the x component and y component of the block vector respectively, CtbSizeY represents the CTB width, CtbLog2SizeY represents the CTB width after taking the logarithm, and MaxCtbLog2SizeY represents the maximum CTB size or the reference memory size after taking the logarithm.

[0055] In the above device, the size of the current CTB is 64×64 samples, the size of the reference memory is 128×128 samples, the current CTB includes 4 areas of 32×32 samples, the previously reconstructed CTB includes 4 areas of 32×32 samples, and the position of the co-located area is offset by 256 samples relative to the position of the current area.

[0056] In the above device, a sixth constraint condition is set; the sixth constraint condition includes: setting the position of the upper left sample of the current block to (xCb, yCb), when (xCb+(mvL[0]>>4))>>6 is equal to (xCb>>6)-1<<(1<<1)), using the position coordinates (((xCb+(mvL[0]>>4)+256)>>5)<<5, ((yCb+(mvL[1]>>4))>>5)<<5) as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; wherein mvL[0] and mvL[1] represent the x component and y component of the block vector, respectively; when the sixth constraint condition is met, at least one sample of the current block is reconstructed according to the block vector.

[0057] In the above device, the coding block in the search range is located in at least one of the following: the current CTB and one or more reconstructed CTBs between the current CTB and the previously reconstructed CTB.

[0058] In the above apparatus, the search range does not include the previously reconstructed CTB that is offset from the current CTB by N widths of the current CTB, where N is a ratio of a size of the reference memory to a size of the current CTB.

[0059] In the above device, additional data is obtained from the encoded video sequence, and the additional data is used to reconstruct the original video data. The additional data includes at least one of a time, space or signal-to-noise ratio enhancement layer, a redundant slice, a redundant picture, and a forward error correction code.

[0060] The embodiment of the present application also provides a video encoding device, including:

[0061] A decoding module, configured to decode prediction information of a current block from an encoded video bitstream, the prediction information indicating an intra block copy mode, the current block being one of a plurality of coding blocks in a current region of a current coding tree block (CTB) in a current picture;

[0062] a determination module, configured to determine whether the current block is the first reconstructed block in the current region; when the current block is the first reconstructed block in the current region, setting a reference block in a co-located region of the current region in a previously reconstructed CTB to be unavailable, the relative position of the co-located region in the previously reconstructed CTB being the same as the relative position of the current region in the current CTB; and

[0063] The reconstruction module is used to determine a block vector of the current block and reconstruct at least one sample of the current block according to the block vector.

[0064] An embodiment of the present application also provides a non-transitory computer-readable medium storing instructions, which, when executed by a computer for video decoding, causes the computer to execute a method for video decoding. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Other features, properties and various advantages of the disclosed subject matter will become more apparent from the following detailed description and the accompanying drawings, in which:

[0066] Figure 1 is a schematic diagram of an exemplary subset of intra prediction modes.

[0067] Figure 2 is a diagram of exemplary intra prediction directions.

[0068] Figure 3 is a schematic diagram of a simplified block diagram of a communication system (300) according to one embodiment.

[0069] Figure 4is a schematic diagram of a simplified block diagram of a communication system (400) according to one embodiment.

[0070] Figure 5 is a schematic diagram of a simplified block diagram of a decoder according to one embodiment.

[0071] Figure 6 is a schematic diagram of a simplified block diagram of an encoder according to one embodiment.

[0072] Figure 7 A block diagram of an encoder according to another embodiment is shown.

[0073] Figure 8 A block diagram of a decoder according to another embodiment is shown.

[0074] Fig. 9 An example of intra block copy according to an embodiment of the present disclosure is shown.

[0075] Fig.10 An example of intra block copy according to an embodiment of the present disclosure is shown.

[0076] Fig.11 An example of intra block copy according to an embodiment of the present disclosure is shown.

[0077] FIG. 12A to FIG. 12D An example of intra block copy according to an embodiment of the present disclosure is shown.

[0078] Fig.13 An example of intra block copy in which the search range is larger than the size of a CTB according to an embodiment of the present disclosure is shown.

[0079] Fig.14 A flow chart outlining a process (1400) according to an embodiment of the present disclosure is shown.

[0080] Fig.15 is a schematic diagram of a computer system according to one embodiment. DETAILED DESCRIPTION

[0081] Figure 3 3 is a simplified block diagram of a communication system (300) according to an embodiment disclosed in the present application. The communication system (300) includes a plurality of terminal devices that can communicate with each other via, for example, a network (350). For example, the communication system (300) includes a first pair of terminal devices (310) and (320) interconnected via the network (350). Figure 3In an embodiment, the first terminal device performs unidirectional data transmission between (310) and (320). For example, the terminal device (310) may encode video data (e.g., a video picture stream collected by the terminal device (310)) for transmission to another terminal device (320) via the network (350). The encoded video data is transmitted in the form of one or more encoded video code streams. The terminal device (320) may receive the encoded video data from the network (350), decode the encoded video data to restore the video data, and display the video picture based on the restored video data. Unidirectional data transmission is more common in applications such as media services.

[0082] In another example, a communication system (300) includes a pair of terminal devices (330) and (340) that perform bidirectional transmission of encoded video data, which bidirectional transmission may occur, for example, during a video conference. For bidirectional data transmission, in one example, each of the terminal devices (330) and (340) may encode video data (e.g., a video picture stream collected by the terminal device) for transmission to the other of the terminal devices (330) and (340) via a network (350). Each of the terminal devices (330) and (340) may also receive the encoded video data transmitted by the other of the terminal devices (330) and (340), and may decode the encoded video data to restore the video picture, and may display the video picture on an accessible display device based on the restored video data.

[0083] exist Figure 3 In the example of, terminal device (310), terminal device (320), terminal device (330) and terminal device (340) may be shown as a server, a personal computer and a smart phone, but the principles disclosed in the present application may not be limited thereto. The embodiments disclosed in the present application are applicable to laptop computers, tablet computers, media players and / or dedicated video conferencing devices. Network (350) represents any number of networks that transmit encoded video data between terminal devices (310), terminal devices (320), terminal devices (330) and terminal devices (340), including, for example, wired (wired) and / or wireless communication networks. Communication network (350) can exchange data in circuit switching and / or packet switching channels. Representative networks may include telecommunication networks, local area networks, wide area networks and / or the Internet. For the purposes of the present application, unless explained below, the architecture and topology of network (350) may be irrelevant to the operations disclosed in the present application.

[0084] As examples of applications of the disclosed subject matter, Figure 4The placement of the video encoder and video decoder in a streaming environment is shown. The disclosed subject matter is equally applicable to other video-enabled applications including, for example, video conferencing, digital TV, storing compressed video on digital media including CDs, DVDs, memory sticks, etc., and the like.

[0085] The streaming system may include an acquisition subsystem (413), which may include a video source (401), such as a digital camera, that creates an uncompressed video picture stream (402). In an example, the video picture stream (402) includes samples captured by a digital camera. The video picture stream (402), depicted as thick lines to emphasize the high amount of data compared to the encoded video data (404) (or the encoded video bitstream), may be processed by an electronic device (420), which includes a video encoder (403) coupled to the video source (401). The video encoder (403) may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in more detail below. The encoded video data (404) (or the encoded video bitstream (404)), depicted as thin lines to emphasize the lower amount of data compared to the video picture stream (402), may be stored on a streaming server (405) for future use. One or more streaming client subsystems, such as Figure 4 A client subsystem (406) and a client subsystem (408) in a streaming server (405) may access a streaming server (405) to retrieve a copy (407) and a copy (409) of the encoded video data (404). The client subsystem (406) may include, for example, a video decoder (410) in an electronic device (430). The video decoder (410) decodes the incoming copy (407) of the encoded video data and generates an output video picture stream (411) that can be presented on a display (412) (e.g., a display screen) or another presentation device (not depicted). In some streaming systems, the encoded video data (404), the video data (407), and the video data (409) (e.g., a video bitstream) may be encoded according to certain video encoding / compression standards. Examples of such standards include ITU-T H.265. In the example, the video coding standard under development is informally referred to as Versatile Video Coding (VVC), and the disclosed subject matter may be used in the context of VVC.

[0086] It should be noted that the electronic device (420) and the electronic device (430) may include other components (not shown). For example, the electronic device (420) may include a video decoder (not shown), and the electronic device (430) may also include a video encoder (not shown).

[0087] Figure 5is a block diagram of a video decoder (510) according to an embodiment disclosed in the present application. The video decoder (510) may be included in an electronic device (530). The electronic device (530) may include a receiver (531) (e.g., a receiving circuit). The video decoder (510) may be used to replace Figure 4 A video decoder (410) in an example of FIG.

[0088] The receiver (531) may receive one or more encoded video sequences to be decoded by the video decoder (510); in the same or another embodiment, one encoded video sequence is received at a time, wherein the decoding of each encoded video sequence is independent of the other encoded video sequences. The encoded video sequence may be received from a channel (501), which may be a hardware / software link to a storage device storing the encoded video data. The receiver (531) may receive the encoded video data and other data, such as encoded audio data and / or auxiliary data streams, which may be forwarded to their respective consuming entities (not shown). The receiver (531) may separate the encoded video sequence from the other data. To prevent network jitter, a buffer memory (515) may be coupled between the receiver (531) and the entropy decoder / parser (520) (hereinafter referred to as "parser (520)"). In some applications, the buffer memory (515) is part of the video decoder (510). In other cases, the buffer memory (415) may be provided external to the video decoder (510) (not shown). In other cases, a buffer memory (not shown) is provided outside the video decoder (510) to prevent network jitter, for example, and another buffer memory (515) may be configured inside the video decoder (510) to handle broadcast timing, for example. When the receiver (531) receives data from a storage / forward device with sufficient bandwidth and controllability or from an isochronous network, it may not be necessary to configure the buffer memory (515), or the buffer memory may be made smaller. For use on a service packet network such as the Internet, a buffer memory (515) may also be required, which may be relatively large and may advantageously have an adaptive size, and may be at least partially implemented in an operating system or a similar element (not shown) outside the video decoder (510).

[0089] The video decoder (510) may include a parser (520) to reconstruct symbols (521) from the encoded video sequence. The types of symbols include information used to manage the operation of the video decoder (510) and potential information used to control a display device such as a display device (512) (e.g., a display screen) that is not an integral part of the electronic device (530) but can be coupled to the electronic device (530), such as Figure 5As shown in . The control information for the display device may be a parameter set fragment (not indicated) of Supplemental Enhancement Information (SEI message) or Video Usability Information (VUI). The parser (520) may parse / entropy decode the received coded video sequence. The encoding of the coded video sequence may be performed according to a video coding technique or standard, and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, and the like. The parser (520) may extract a subgroup parameter set of at least one subgroup of the subgroups of pixels in the video decoder from the coded video sequence based on at least one parameter corresponding to the group. The subgroup may include a Group of Pictures (GOP), a picture, a tile, a slice, a macroblock, a Coding Unit (CU), a block, a Transform Unit (TU), a Prediction Unit (PU), and the like. The parser (520) may also extract information from the encoded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, and so on.

[0090] The parser (520) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (515), thereby creating symbols (521).

[0091] Depending on the type of coded video picture or portion of coded video picture (e.g., inter- and intra-pictures, inter- and intra-blocks) and other factors, the reconstruction of the symbol (521) may involve multiple different units. Which units are involved and how they are involved may be controlled by subgroup control information parsed by the parser (520) from the coded video sequence. For the sake of brevity, such subgroup control information flow between the parser (520) and the multiple units below is not described.

[0092] In addition to the functional blocks already mentioned, the video decoder (510) can be conceptually subdivided into several functional units as described below. In a practical embodiment operating under commercial constraints, many of these units interact closely with each other and can be at least partially integrated with each other. However, for the purpose of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.

[0093] The first unit is a sealer / inverse transform unit (551). The sealer / inverse transform unit (551) receives quantized transform coefficients as symbols (521) from the parser (520) and control information, including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The sealer / inverse transform unit (551) can output a block including sample values, which can be input into the aggregator (555).

[0094] In some cases, the output samples of the scaler / inverse transform unit (551) may belong to an intra-coded block; that is, a block that does not use predictive information from a previously reconstructed picture, but may use predictive information from a previously reconstructed portion of the current picture. Such predictive information may be provided by an intra-picture prediction unit (552). In some cases, the intra-picture prediction unit (552) generates a block of the same size and shape as the block being reconstructed using surrounding reconstructed information extracted from a current picture buffer (558). For example, the current picture buffer (558) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (555) adds the prediction information generated by the intra-prediction unit (552) to the output sample information provided by the scaler / inverse transform unit (551) on a per-sample basis.

[0095] In other cases, the output samples of the scaler / inverse transform unit (551) may belong to an inter-frame coded and potentially motion compensated block. In this case, the motion compensated prediction unit (553) may access the reference picture memory (557) to extract samples for prediction. After the extracted samples are motion compensated according to the symbols (521) belonging to the block, these samples may be added to the output of the scaler / inverse transform unit (551) (in this case referred to as residual samples or residual signals) by the aggregator (555) to generate output sample information. The acquisition of the predicted samples by the motion compensated prediction unit (553) from the address in the reference picture memory (557) may be controlled by a motion vector, and the motion vector is provided to the motion compensated prediction unit (553) in the form of a symbol (521), which may have, for example, X, Y and reference picture components. Motion compensation may also include interpolation of sample values ​​extracted from the reference picture memory (557) when using sub-sample accurate motion vectors, motion vector prediction mechanisms, and the like.

[0096] The output samples of the aggregator (555) may be subjected to various loop filtering techniques in a loop filter unit (556). The video compression techniques may include in-loop filter techniques controlled by parameters included in the coded video sequence (also referred to as the coded video bitstream) and available to the loop filter unit (556) as symbols (521) from the parser (520), however, the video compression techniques may also be responsive to meta-information obtained during decoding of a coded picture or a previous (in decoding order) portion of the coded video sequence, as well as to previously reconstructed and loop filtered sample values.

[0097] The output of the loop filter unit (556) may be a sample stream that may be output to a display device (512) and stored in a reference picture memory (557) for subsequent inter-picture prediction.

[0098] Once fully reconstructed, certain coded pictures may be used as reference pictures for future prediction. For example, once the coded picture corresponding to the current picture is fully reconstructed, and the coded picture is identified as a reference picture (e.g., by the parser (520)), the current picture buffer (558) may become part of the reference picture memory (557), and a new current picture buffer may be reallocated before starting to reconstruct a subsequent coded picture.

[0099] The video decoder (510) may perform decoding operations according to a predetermined video compression technology, such as in the ITU-T H.265 standard. The encoded video sequence may conform to the syntax specified by the video compression technology or standard used, in the sense that the encoded video sequence follows the syntax of the video compression technology or standard and the profile recorded in the video compression technology or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technology or standard as the only tools available for use under the profile. For compliance, the complexity of the encoded video sequence is also required to be within the range defined by the hierarchy of the video compression technology or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sampling rate (measured in, for example, mega samples per second), the maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further limited by the Hypothetical Reference Decoder (HRD) specification and the metadata of the HRD buffer management signaled in the encoded video sequence.

[0100] In an embodiment, the receiver (531) may receive additional (redundant) data along with the encoded video. The additional data may be included as part of the encoded video sequence. The additional data may be used by the video decoder (510) to properly decode the data and / or more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.

[0101] Figure 6 6 is a block diagram of a video encoder (603) according to an embodiment disclosed in the present application. The video encoder (603) is included in an electronic device (620). The electronic device (620) includes a transmitter (640) (e.g., a transmission circuit). The video encoder (603) can be used to replace Figure 4 A video encoder (403) in an example.

[0102] The video encoder (603) can be used to obtain the video source (601) (not Figure 6 In another embodiment, the video source (601) is a part of the electronic device (620) to receive video samples, and the video source can collect video images to be encoded by the video encoder (603). In another embodiment, the video source (601) is a part of the electronic device (620).

[0103] The video source (601) may provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (603), which may have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 Y CrCB, RGB, ...), and any suitable sampling structure (e.g., Y CrCb 4:2:0, Y CrCb 4:4:4). In a media service system, the video source (601) may be a storage device storing previously prepared videos. In a video conferencing system, the video source (601) may be a camera that captures local image information as a video sequence. The video data may be provided as a plurality of separate pictures that are given motion when viewed sequentially. The pictures themselves may be constructed as a spatial pixel array, where each pixel may include one or more samples depending on the sampling structure, color space, etc. used. The relationship between pixels and samples may be easily understood by those skilled in the art. The following description focuses on samples.

[0104] According to an embodiment, the video encoder (603) may encode and compress pictures of a source video sequence into an encoded video sequence (643) in real time or under any other time constraints required by the application. Implementing an appropriate encoding speed is a function of the controller (650). In some embodiments, the controller (650) controls other functional units as described below and is functionally coupled to the other functional units. For the sake of brevity, coupling is not indicated in the figure. The parameters set by the controller (650) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization technology, etc.), picture size, group of pictures (GOP) layout, maximum motion vector search range, etc. The controller (650) may be configured to have other suitable functions that are related to the video encoder (603) optimized for a certain system design.

[0105] In some embodiments, the video encoder (603) is configured to operate in an encoding loop. As a simple description, in an example, the encoding loop may include a source encoder (630) (e.g., responsible for creating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture) and a (local) decoder (633) embedded in the video encoder (603). The decoder (633) reconstructs the symbols to create sample data in a manner similar to that of the (remote) decoder (because in the video compression technology considered by the disclosed subject matter, any compression between the symbols and the encoded video code stream is lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (634). Since the decoding of the symbol stream produces bit-accurate results that are independent of the decoder location (local or remote), the contents of the reference picture memory (634) are also bit-accurately corresponding between the local encoder and the remote encoder. In other words, the reference picture samples "seen" by the prediction part of the encoder are exactly the same as the sample values ​​that the decoder will "see" when using the prediction during decoding. This basic principle of reference picture synchronization (and the drift that occurs when synchronization cannot be maintained, eg due to channel errors) is also used in some related techniques.

[0106] The operation of the "local" decoder (633) can be combined with the above Figure 5 The "remote" decoder described in detail for the video decoder (510) is identical. However, additional brief reference is made to Figure 5 , when symbols are available and the entropy encoder (645) and parser (520) are capable of losslessly encoding / decoding the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (510), including the buffer memory (515) and the parser (520), may not be fully implemented in the local decoder (633).

[0107] At this point, it can be observed that any decoder technology other than the parsing / entropy decoding present in the decoder must also be present in the corresponding encoder in substantially the same functional form. For this reason, the disclosed subject matter focuses on the decoder operation. The description of encoder technology can be simplified because encoder technology is mutually inverse to the decoder technology described comprehensively. A more detailed description is only needed in certain areas and is provided below.

[0108] During operation, in some examples, the source encoder (630) may perform motion compensated predictive coding. The motion compensated predictive coding predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures." In this way, the encoding engine (632) encodes the difference between a pixel block of the input picture and a pixel block of a reference picture that may be selected as a prediction reference for the input picture.

[0109] The local video decoder (633) may decode the encoded video data of the picture that may be designated as the reference picture based on the symbol created by the source encoder (630). The operation of the encoding engine (632) may advantageously be a lossy process. When the encoded video data is available at the video decoder ( Figure 6 When the video sequence is decoded at a remote location (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (633) replicates the decoding process that may be performed by the video decoder on the reference picture and may cause the reconstructed reference picture to be stored in the reference picture cache (634). In this way, the video encoder (603) may locally store a copy of the reconstructed reference picture that has common content (absent transmission errors) with the reconstructed reference picture that will be obtained by the remote video decoder.

[0110] The predictor (635) may perform a prediction search for the encoding engine (632). That is, for a new picture to be encoded, the predictor (635) may search the reference picture memory (634) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that may serve as appropriate prediction references for the new picture. The predictor (635) may operate on a pixel block by pixel block basis to find a suitable prediction reference. In some cases, as determined by the search results obtained by the predictor (635), the input picture may have prediction references taken from multiple reference pictures stored in the reference picture memory (634).

[0111] The controller (650) may manage encoding operations of the source encoder (630), including, for example, setting parameters and subgroup parameters for encoding video data.

[0112] The outputs of all the above functional units may be entropy encoded in an entropy encoder (645). The entropy encoder (645) performs lossless compression on the symbols generated by the various functional units according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc., thereby converting the symbols into a coded video sequence.

[0113] The transmitter (640) may buffer the encoded video sequence created by the entropy encoder (645) in preparation for transmission over a communication channel (660), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (640) may combine the encoded video data from the video encoder (603) with other data to be transmitted, such as encoded audio data and / or ancillary data streams (source not shown).

[0114] The controller (650) may manage the operation of the video encoder (603). During encoding, the controller (650) may assign a certain coded picture type to each coded picture, but this may affect the coding techniques that can be applied to the corresponding picture. For example, a picture may generally be assigned to any of the following picture types:

[0115] An intra picture (I picture) may be a picture that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those skilled in the art are aware of the variations of I pictures and their corresponding applications and features.

[0116] A predictive picture (P picture) may be a picture that can be encoded and decoded using intra prediction or inter prediction, which uses at most one motion vector and a reference index to predict sample values ​​for each block.

[0117] Bidirectional predictive pictures (B pictures), which can be pictures that can be encoded and decoded using intra prediction or inter prediction, which uses up to two motion vectors and reference indices to predict the sample values ​​of each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstructing a single block.

[0118] The source picture may typically be spatially subdivided into blocks of samples (e.g., blocks of 4×4, 8×8, 4×8, or 16×16 samples), and coded block by block. These blocks may be predictively coded with reference to other (already coded) blocks, which are determined by the coding allocation applied to the block's corresponding picture. For example, a block of an I picture may be non-predictively coded, or the block may be predictively coded (spatial prediction or intra prediction) with reference to an already coded block of the same picture. A block of a P picture may be predictively coded by spatial prediction with reference to one previously coded reference picture or by temporal prediction. A block of a B picture may be predictively coded by spatial prediction with reference to one or two previously coded reference pictures or by temporal prediction.

[0119] The video encoder (603) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T H.265 Recommendation. In operation, the video encoder (603) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in an input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.

[0120] In an embodiment, the transmitter (640) may transmit additional data when transmitting the encoded video. The source encoder (630) may include such data as part of the encoded video sequence. The additional data may include other forms of redundant data such as temporal / spatial / SNR enhancement layers, redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.

[0121] The captured video may be taken as a plurality of source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often simplified to intra-prediction) exploits spatial correlations in a given picture, while inter-picture prediction exploits (temporal or other) correlations between pictures. In an example, a particular picture being encoded / decoded is divided into blocks, and the particular picture being encoded / decoded is referred to as the current picture. When a block in the current picture is similar to a reference block in a reference picture that was previously encoded in the video and is still buffered, the block in the current picture may be encoded by a vector called a motion vector. The motion vector points to a reference block in a reference picture, and in the case where multiple reference pictures are used, the motion vector may have a third dimension that identifies the reference picture.

[0122] In some embodiments, bidirectional prediction techniques may be used in inter-picture prediction. According to the bidirectional prediction technique, two reference pictures are used, for example, a first reference picture and a second reference picture that are both before the current picture in the video in decoding order (but may be in the past and future in display order, respectively). A block in the current picture may be encoded by a first motion vector pointing to a first reference block in the first reference picture and a second motion vector pointing to a second reference block in the second reference picture. Specifically, the block may be predicted by a combination of the first reference block and the second reference block.

[0123] In addition, merge mode technology can be used in inter-picture prediction to improve coding efficiency.

[0124] According to some embodiments disclosed in the present application, predictions such as inter-picture prediction and intra-picture prediction are performed in units of blocks. For example, according to the HEVC standard, pictures in a video picture sequence are divided into coding tree units (CTUs) for compression, and the CTUs in the pictures have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU includes three coding tree blocks (CTBs), which are a luminance CTB and two chrominance CTBs. Each CTU can also be recursively split into one or more coding units (coding units, CUs) using a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or 4 32×32 pixel CUs, or 16 16×16 pixel CUs. In the example, each CU is analyzed to determine a prediction type for the CU, such as an inter-prediction type or an intra-prediction type. Depending on temporal and / or spatial predictability, the CU is split into one or more prediction units (PUs). Typically, each PU includes a luma prediction block (PB) and two chroma PBs. In an embodiment, the prediction operation in encoding (encoding / decoding) is performed in units of prediction blocks. Taking the luma prediction block as an example of a prediction block, the prediction block includes a matrix of values ​​(e.g., luma values) for pixels, such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, and the like.

[0125] Figure 7 is a diagram of a video encoder (703) according to another embodiment disclosed in the present application. The video encoder (703) is configured to receive a processed block (e.g., a prediction block) of sample values ​​within a current video picture in a video picture sequence, and encode the processed block into an encoded picture that is part of an encoded video sequence. In this embodiment, the video encoder (703) is used to replace Figure 4Video encoder (403) in an embodiment

[0126] In an HEVC embodiment, a video encoder (703) receives a matrix of sample values ​​for a processing block, such as a prediction block of 8×8 samples. The video encoder (703) uses, for example, rate-distortion (RD) optimization to determine whether to use intra mode, inter mode, or bidirectional prediction mode to best encode the processing block. When encoding the processing block in intra mode, the video encoder (703) may use intra prediction techniques to encode the processing block into an encoded picture; and when encoding the processing block in inter mode or bidirectional prediction mode, the video encoder (703) may use inter prediction or bidirectional prediction techniques to encode the processing block into an encoded picture, respectively. In some video encoding techniques, the merge mode may be an inter-picture prediction submode, in which motion vectors are derived from one or more motion vector predictors without the aid of encoded motion vector components external to the predictor. In some other video encoding techniques, there may be motion vector components applicable to the subject block. In an embodiment, the video encoder (703) includes other components, such as a mode decision module (not shown) for determining the processing block mode.

[0127] exist Figure 7 In the example of FIG. 7 , the video encoder ( 703 ) includes Figure 6 Shown are an inter-frame encoder (730), an intra-frame encoder (722), a residual calculator (723), a switch (726), a residual encoder (724), a general controller (721), and an entropy encoder (725) coupled together.

[0128] The inter-frame encoder (730) is configured to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture), generate inter-frame prediction information (e.g., redundant information description according to an inter-frame coding technique, motion vectors, merge mode information), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technique. In some examples, the reference picture is a decoded reference picture decoded based on the encoded video information.

[0129] The intra encoder (722) is configured to receive samples of a current block (e.g., a processing block), compare the block with an encoded block in the same picture in some cases, generate quantization coefficients after transformation, and in some cases also generate intra prediction information (e.g., intra prediction direction information according to one or more intra coding techniques). In an example, the intra encoder (722) also calculates an intra prediction result (e.g., a predicted block) based on the intra prediction information and a reference block in the same picture.

[0130] The general controller (721) is configured to determine general control data and control other components of the video encoder (703) based on the general control data. In an example, the general controller (721) determines the mode of the block and provides a control signal to the switch (726) based on the mode. For example, when the mode is intra mode, the general controller (721) controls the switch (726) to select the intra mode result for use by the residual calculator (723), and controls the entropy encoder (725) to select intra prediction information and add the intra prediction information to the bitstream; and when the mode is inter mode, the general controller (721) controls the switch (726) to select the inter prediction result for use by the residual calculator (723), and controls the entropy encoder (725) to select the inter prediction information and add the inter prediction information to the bitstream.

[0131] The residual calculator (723) is configured to calculate the difference (residual data) between the received block and the prediction result selected from the intra-frame encoder (722) or the inter-frame encoder (730). The residual encoder (724) is configured to operate based on the residual data to encode the residual data to generate transform coefficients. In an example, the residual encoder (724) is configured to convert the residual data from the spatial domain to the frequency domain and generate transform coefficients. The transform coefficients are then subjected to quantization to obtain quantized transform coefficients. In various embodiments, the video encoder (703) also includes a residual decoder (728). The residual decoder (728) is configured to perform an inverse transform and generate decoded residual data. The decoded residual data can be used appropriately by the intra-frame encoder (722) and the inter-frame encoder (730). For example, the inter encoder (730) can generate a decoded block based on the decoded residual data and the inter prediction information, and the intra encoder (722) can generate a decoded block based on the decoded residual data and the intra prediction information. The decoded blocks are appropriately processed to generate a decoded picture, and in some examples, the decoded picture can be buffered in a memory circuit (not shown) and used as a reference picture.

[0132] The entropy encoder (725) is configured to format the codestream to produce an encoded block. The entropy encoder (725) includes various information according to a suitable standard, such as the HEVC standard. In an example, the entropy encoder (725) is configured to include general control data, selected prediction information (such as intra-frame prediction information or inter-frame prediction information), residual information, and other suitable information in the codestream. It should be noted that according to the disclosed subject matter, when the block is encoded in the inter-frame mode or the merge sub-mode of the bidirectional prediction mode, there is no residual information.

[0133] Figure 8is a diagram of a video decoder (810) according to another embodiment disclosed in the present application. The video decoder (810) is configured to receive an encoded image as part of an encoded video sequence and decode the encoded image to generate a reconstructed picture. In an example, the video decoder (810) is used to replace Figure 4 Video decoder (410) in the example

[0134] exist Figure 8 In the example of FIG. 8 , the video decoder ( 810 ) includes Figure 7 An entropy decoder (871), an inter-frame decoder (880), a residual decoder (873), a reconstruction module (874) and an intra-frame decoder (872) coupled together are shown in FIG.

[0135] The entropy decoder (871) may be configured to reconstruct certain symbols from the encoded picture, which represent syntax elements constituting the encoded picture. Such symbols may include, for example, a mode for encoding the block (e.g., intra mode, inter mode, bidirectional prediction mode, a merged submode of the latter two, or another submode), prediction information (e.g., intra prediction information or inter prediction information) that can identify certain samples or metadata for prediction by the intra decoder (872) or the inter decoder (880), respectively, residual information in the form of, for example, quantized transform coefficients, and the like. In an example, when the prediction mode is inter or bidirectional prediction mode, the inter prediction information is provided to the inter decoder (880); and when the prediction type is an intra prediction type, the intra prediction information is provided to the intra decoder (872). The residual information may be subjected to inverse quantization and provided to the residual decoder (873).

[0136] The inter-frame decoder (880) is configured to receive inter-frame prediction information and generate an inter-frame prediction result based on the inter-frame prediction information.

[0137] The intra decoder (872) is configured to receive intra prediction information and generate a prediction result based on the intra prediction information.

[0138] The residual decoder (873) is configured to perform inverse quantization to extract dequantized transform coefficients, and process the dequantized transform coefficients to convert the residual from the frequency domain to the spatial domain. The residual decoder (873) may also require certain control information (to include quantizer parameters QP), and this information may be provided by the entropy decoder (871) (the data path is not indicated because this is only low-volume control information).

[0139] The reconstruction module (874) is configured to combine the residual output by the residual decoder (873) with the prediction result (which may be output by the inter-frame prediction module or the intra-frame prediction module) in the spatial domain to form a reconstructed block, which may be part of a reconstructed picture, which in turn may be part of a reconstructed video. It should be noted that other suitable operations such as deblocking operations may be performed to improve visual quality.

[0140] It should be noted that the video encoder (403), video encoder (603), and video encoder (703) and video decoder (410), video decoder (510), and video decoder (810) may be implemented using any suitable technology. In an embodiment, the video encoder (403), video encoder (603), and video encoder (703) and video decoder (410), video decoder (510), and video decoder (810) may be implemented using one or more integrated circuits. In another embodiment, the video encoder (403), video encoder (603), and video encoder (603) and video decoder (410), video decoder (510), and video decoder (810) may be implemented using one or more processors that execute software instructions.

[0141] Aspects of the present disclosure provide techniques for search range adjustment for intra picture block compensation.

[0142] Block-based compensation can be used for inter-frame prediction and intra-frame prediction. For inter-frame prediction, block-based compensation from different pictures is called motion compensation. Block-based compensation can also be done, for example, in intra-frame prediction based on previously reconstructed areas in the same picture. Block-based compensation based on reconstructed areas in the same picture is called intra-picture block compensation, current picture reference (CPR) or intra-frame block copy (IBC). The displacement vector indicating the offset between the current block and the reference block (also called the prediction block) in the same picture is called a block vector (BV), where the current block can be encoded / decoded based on the reference block. Unlike the motion vector in motion compensation, which can be any value (positive or negative in the x or y direction), the BV has certain constraints to ensure that the reference block is available and has been reconstructed. In addition, in some examples, certain reference areas such as tile boundaries, slice boundaries, or wavefront ladder boundaries are excluded for parallel processing considerations.

[0143] The encoding of block vectors can be explicit or implicit. In explicit mode, the BV difference between the block vector and its predictor is signaled. In implicit mode, the block vector is recovered from the predictor (called the block vector predictor) without using the BV difference in a similar manner to motion vectors in merge mode. In some embodiments, the resolution of the block vector is limited to integer positions. In other systems, block vectors are allowed to point to fractional positions.

[0144] In some examples, a block level flag such as an IBC flag may be used to signal the use of intra block copy at the block level. In an embodiment, the block level flag is signaled when the current block is explicitly encoded. In some examples, a reference indexing method may be used to signal the use of intra block copy at the block level. The current picture being decoded is then considered as a reference picture or a special reference picture. In an example, such a reference picture is placed at the last position of the reference picture list. Special reference pictures are also managed together with other temporal reference pictures in a buffer such as a decoded picture buffer (DPB).

[0145] There are also some variations of intra block copying, such as flipped intra block copying (the reference block is flipped horizontally or vertically before it is used to predict the current block) or line-based intra block copying (each compensation unit within an MxN coding block is an Mx1 or 1xN line).

[0146] As described above, the BV of the current block being reconstructed in the picture may have certain constraints so that the reference block of the current block is within the search range. The search range refers to the portion of the picture from which the reference block can be selected. For example, the search range may be located in certain portions of the reconstruction area in the picture. The size, position, shape, etc. of the search range may be constrained. Alternatively, the BV may be constrained. In the example, the BV is a two-dimensional vector including an x ​​component and a y component, and at least one of the x component and the y component may be constrained. Constraints may be specified for the BV, the search range, or a combination of the BV and the search range. In various examples, when certain constraints are specified for the BV, the search range is constrained accordingly. Similarly, when certain constraints are specified for the search range, the BV will be constrained accordingly.

[0147] Fig. 9 An example of intra-block copying according to an embodiment of the present disclosure is shown. The current picture (900) will be reconstructed during decoding. The current picture (900) includes a reconstructed area (910) (gray area) and an area to be decoded (920) (white area). The current block (930) is being reconstructed by the decoder. The current block (930) can be reconstructed based on a reference block (940) in the reconstructed area (910). The position offset between the reference block (940) and the current block (930) is called a block vector (950) (or BV (950)). In Fig. 9 In the example of , the search range (960) is within the reconstructed area (910), the reference block (940) is within the search range (960), and the block vector (950) is constrained to point to the reference block (940) within the search range (960).

[0148] Various constraints may be applied to the BV and / or the search range. In an embodiment, the search range of the current block being reconstructed in the current CTB is constrained to be within the current CTB.

[0149] In an embodiment, the effective memory requirement for storing reference samples to be used in intra block copying is one CTB size. In the example, the CTB size is 128×128 samples. The current CTB includes the current region being reconstructed. The size of the current region is 64×64 samples. Since the reference memory can also store the reconstructed samples in the current region, when the reference memory size is equal to the CTB size of 128×128 samples, the reference memory can also store 3 more regions of 64×64 samples. Therefore, while the total memory requirement for storing reference samples remains unchanged (for example, 1 CTB size of 128×128 samples or a total of 4 64×64 reference samples), the search range can include some parts of the previously reconstructed CTB. In the example, the previously reconstructed CTB is the left neighbor of the current CTB, such as Fig.10 shown.

[0150] Fig.10 An example of intra-block copying according to an embodiment of the present disclosure is shown. The current picture (1001) includes a current CTB (1015) being reconstructed and a previously reconstructed CTB (1010) which is a left neighbor of the current CTB (1015). The CTB in the current picture (1001) has a CTB size such as 128×128 samples and a CTB width such as 128 samples. The current CTB (1015) includes 4 regions (1016)-(1019), where the current region (1016) is being reconstructed. The current region (1016) includes multiple coding blocks (1021)-(1029). Similarly, the previously reconstructed CTB (1010) includes 4 regions (1011)-(1014). The coding blocks (1021)-(1025) have been reconstructed, the current block (1026) is being reconstructed, and the coding blocks (1026)-(1027) and regions (1017)-(1019) are to be reconstructed.

[0151] The current region (1016) has a co-located region (i.e., region (1011) in the previously reconstructed CTB (1010)). The relative position of the co-located region (1011) with respect to the previously reconstructed CTB (1010) may be the same as the relative position of the current region (1016) with respect to the current CTB (1015). Fig.10In the example shown, the current region (1016) is the upper left region in the current CTB (1015), and thus the co-located region (1011) is also the upper left region in the previously reconstructed CTB (1010). Since the position of the previously reconstructed CTB (1010) is offset by a CTB width relative to the position of the current CTB (1015), the position of the co-located region (1011) is also offset by a CTB width relative to the position of the current region (1016).

[0152] In an embodiment, the co-located region of the current region (1016) is located in a previously reconstructed CTB, wherein the position of the previously reconstructed CTB is offset by one or more CTB widths relative to the position of the current CTB (1015), and therefore, the position of the co-located region is also offset by one or more CTB widths relative to the position of the current region (1016). The position of the co-located region may be shifted left, upward, etc. relative to the current region (1016).

[0153] As mentioned above, the size of the search range of the current block (1026) is constrained by the CTB size. Fig.10 In the example of , the search range may include the area (1012)-(1014) in the previously reconstructed CTB (1010) and a portion of the current area (1016) that has been reconstructed (e.g., coding blocks (1021)-(1025)). In addition, the search range does not include the co-located area (1011) so that the size of the search range is within the CTB size. Fig.10 , the reference block (1091) is located in the region (1014) of the previously reconstructed CTB (1010). The block vector (1020) indicates the offset between the current block (1026) and the corresponding reference block (1091). The reference block (1091) is within the search range.

[0154] Fig.10The example shown in can be appropriately applied to other scenarios in which the current area is located at another position in the current CTB (1015). In the example, when the current block is located in area (1017), the co-located area of ​​the current block is area (1012). Therefore, the search range can include areas (1013)-(1014), areas (1016), and the parts of area (1017) that have been reconstructed. The search range also does not include areas (1011) and the co-located area (1012), so that the size of the search range is within the CTB size. In the example, when the current block is in area (1018), the co-located area of ​​the current block is area (1013). Therefore, the search range can include areas (1014), areas (1016)-(1017), and the parts of area (1018) that have been reconstructed. The search range also does not include areas (1011)-(1012) and the co-located area (1013), so that the size of the search range is within the CTB size. In the example, when the current block is in region (1019), the co-located region of the current block is region (1014). Therefore, the search range may include regions (1016)-(1018) and a portion of region (1019) that has been reconstructed. The search range also does not include the previously reconstructed CTB (1010), so that the size of the search range is within the CTB size.

[0155] In the above description, the reference block may be among the previously reconstructed CTB (1010) or the current CTB (1015).

[0156] In an embodiment, the search range may be specified as follows: In an example, the current picture is a luma picture, the current CTB is a luma CTB including a plurality of luma samples, and the block vector mvL satisfies the following constraint conditions that make the code stream consistent.

[0157] The constraint conditions include a first condition: the reference block of the current block has been reconstructed. When the reference block is in a rectangular shape, an availability check process of the reference block may be performed to check whether the upper left sample and the lower right sample of the reference block have been reconstructed. When both the upper left sample and the lower right sample of the reference block have been reconstructed, it is determined that the reference block has been reconstructed.

[0158] For example, when the position of the upper left sample of the current block (xCurr, yCurr) is set to (xCb, yCb), and the position of the upper left sample of the reference block (xCb+(mvL[0]>>4), yCb+(mvL[1]>>4)) is used as input to call the derivation process of the reference block availability, when the upper left sample of the reference block has been reconstructed, the output is equal to TRUE, where the block vector mvL is a two-dimensional vector with an x ​​component mvL[0] and a y component mvL[1].

[0159] Similarly, when the position of the upper left sample of the current block (xCurr, yCurr) is set to (xCb, yCb), the position of the lower right sample of the reference block (xCb+(mvL[0]>>4)+cbWidth-1, yCb+(mvL[1]>>4)+cbHeight-1) is used as input to call the derivation process of block availability, the output is equal to TRUE when the lower right sample of the reference block has been reconstructed. The parameters cbWidth and cbHeight represent the width and height of the reference block.

[0160] The constraints may also include at least one of the following second conditions: 1) the value of (mvL[0]>>4)+cbWidth is less than or equal to 0, which means that the reference block is on the left side of the current block and does not overlap with the current block; 2) the value of (mvL[1]>>4)+cbHeight is less than or equal to 0, which means that the reference block is above the current block and does not overlap with the current block.

[0161] The constraint condition may also include that the block vector mvL must satisfy the following third condition:

[0162] (yCb+(mvL[1]>>4))>>CtbLog2SizeY=yCb>>CtbLog2SizeY(1)

[0163] (yCb+(mvL[1]>>4+cbHeight-1)>>CtbLog2SizeY=yCb>>CtbLog2Size(2)

[0164] (xCb+(mvL[0]>>4))>>CtbLog2SizeY>=(xCb>>CtbLog2SizeY)-1(3)(xCb+(mvL[0]>>4)+cbWidth-1)>>CtbLog2SizeY<=(xCb>>CtbLog2SizeY)

[0165] (4) Wherein, the parameter CtbLog2SizeY represents the CTB width in log2 form. For example, when the CTB width is 128 samples, CtbLog2SizeY is 7. Formulas (1)-(2) specify that the CTB containing the reference block is in the same CTB row as the current CTB (i.e., when the reference block is located in the previously reconstructed CTB (1010), the previously reconstructed CTB (1010) is in the same row as the current CTB (1015)). Formulas (3)-(4) specify whether the CTB containing the reference block is in the column of the left CTB of the current CTB, or in the same CTB column as the current CTB. The third condition as described in formulas (1)-(4) specifies whether the CTB containing the reference block is the current CTB (e.g., the current CTB (1015)) or the left neighbor of the current CTB (e.g., the previously reconstructed CTB (1010)), similar to the reference block. Fig.10 Description.

[0166] The constraint condition may also include a fourth condition: when the reference block is in the left neighbor of the current CTB, the co-located region of the reference block is not reconstructed (i.e., there are no reconstructed samples in the co-located region). In addition, the co-located region of the reference block is in the current CTB. Fig.10 In the example of , the co-located region of the reference block (1091) is a region (1019) offset by a CTB width relative to the region (1014) where the reference block (1091) is located, and the region (1019) has not been reconstructed. Therefore, the block vector (1020) and the reference block (1091) satisfy the fourth condition above.

[0167] In the example, the fourth condition can be specified as follows: when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1, the position (xCurr, yCurr) of the current block is set to (xCb, yCb), and the position (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) is used as input to call the derivation process of reference block availability, and the output is equal to FALSE, indicating that the co-located area has not been reconstructed, such as Fig.10 as shown in .

[0168] The constraints of the search range and / or block vector may include a suitable combination of the first condition, the second condition, the third condition and the fourth condition. In an example, the constraints include the first condition, the second condition, the third condition and the fourth condition, such as Fig.10In the example, the first condition, the second condition, the third condition and / or the fourth condition may be modified, and the constraint condition includes the modified first condition, the second condition, the third condition and / or the fourth condition.

[0169] According to the fourth condition, when one of the coding blocks (1022)-(1029) is the current block, the reference block cannot be in the region (1011), and therefore, the search range for one of the coding blocks (1022)-(1029) does not include the region (1011). The reason why the region (1011) is not included is as follows: if the reference block is in the region (1011), the co-located region of the reference block is the region (1016), but at least one sample in the coding block (1021) has been reconstructed, thus violating the fourth condition. On the other hand, for the coding block that is to be reconstructed first in the current region (e.g. Fig.11 For a coding block (1121) in region (1116) in the reference block, the fourth condition does not prevent the reference block from being located in region (1111) because the co-located region (1116) of the reference block has not yet been reconstructed.

[0170] Fig.11 An example of intra-block copying according to an embodiment of the present disclosure is shown. The current picture (1101) includes a current CTB (1115) being reconstructed and a previously reconstructed CTB (1110) which is a left neighbor of the current CTB (1115). The CTB in the current picture (1101) has a CTB size and a CTB width. The current CTB (1115) includes 4 regions (1116)-(1119), where the current region (1116) is being reconstructed. The current region (1116) includes a plurality of coding blocks (1121)-(1129). Similarly, the previously reconstructed CTB (1110) includes 4 regions (1111)-(1114). The current block (1121) being reconstructed is the first block to be reconstructed in the current region (1116), and the coding blocks (1122)-(1129) are blocks to be reconstructed. In the example, the CTB size is 128×128 samples, and each of the regions (1111)-(1114) and (1116)-(1119) is 64×64 samples. The size of the reference memory is equal to the CTB size and is 128×128 samples, so when the search range is constrained by the reference memory size, the search range includes 3 regions and a portion of the additional region.

[0171] Similar to reference Fig.10As described, the current region (1116) has a co-located region (i.e., region (1111) in the previously reconstructed CTB (1110)). According to the fourth condition above, the reference block of the current block (1121) may be in region (1111), and therefore, the search range may include regions (1111)-(1114). For example, when the reference block is in region (1111), the co-located region of the reference block is region (1116), where no samples in region (1116) have been reconstructed before the current block (1121) is reconstructed. However, as shown in the reference Fig.10 As described in the fourth condition, for example, after reconstructing the coding block (1121), the region (1111) is no longer included in the search range for reconstructing the coding block (1122). Therefore, strict synchronization and timing control of the reference storage buffer will be used, which may be challenging.

[0172] According to some embodiments, when the current block is the first / first reconstructed block in the current region of the current CTB, the search range may not include a co-located region of the current region in a previously reconstructed CTB, wherein the current CTB and the previously reconstructed CTB are located in the same current picture. The block vector may be determined so that the reference block is located within the search range that does not include the co-located region in the previously reconstructed CTB. In an embodiment, the search range includes coded blocks reconstructed after the co-located region and before the current block in decoding order.

[0173] In the following description, the CTB size may vary, and the maximum CTB size is set equal to the size of the reference memory. In the example, the size of the reference memory or the maximum CTB size is 128×128 samples. The description may be appropriately applied to other reference memory sizes or maximum CTB sizes.

[0174] In an embodiment, the size of the CTB is equal to the reference memory size. The previously reconstructed CTB is a left neighbor of the current CTB, the position of the co-located region is offset by the CTB width relative to the position of the current region, and the coding block within the search range is located in at least one of the current CTB and the previously reconstructed CTB.

[0175] FIG. 12A to FIG. 12D An example of intra-frame block copying according to an embodiment of the present disclosure is shown. FIG. 12A to FIG. 12D, the current picture (1201) includes a current CTB (1215) being reconstructed and a previously reconstructed CTB (1210) which is a left neighbor of the current CTB (1215). The CTB in the current picture (1201) has a CTB size and a CTB width. The current CTB (1215) includes 4 regions (1216)-(1219). Similarly, the previously reconstructed CTB (1210) includes 4 regions (1211)-(1214). In an embodiment, the CTB size is the maximum CTB size and is equal to the size of the reference memory. In the example, the CTB size and the reference memory size are 128×128 samples, and therefore, each of the regions (1211)-(1214) and (1216)-(1219) has a size of 64×64 samples.

[0176] exist FIG. 12A to FIG. 12D In the example shown, the current CTB (1215) includes an upper left region, an upper right region, a lower left region, and a lower right region corresponding to regions (1216)-(1219), respectively. The previously reconstructed CTB (1210) includes an upper left region, an upper right region, a lower left region, and a lower right region corresponding to regions (1211)-(1214), respectively.

[0177] refer to Fig. 12A, the current region (1216) is being reconstructed. The current region (1216) includes a plurality of coding blocks (1221)-(1229). The current block (1221) is the block that is first reconstructed in the current region (1216). The current region (1216) has a co-located region (i.e., region (1211)) located in a previously reconstructed CTB (1210). According to some embodiments, when the current block (1221) is to be first reconstructed in the current region (1216), the search range of the current block (1221) does not include the co-located region (1211). Therefore, strict synchronization and timing control of the reference storage buffer is not required. In addition, when the current block (1221) is to be first reconstructed in the current region (1216) and the search range of the current block (1221) includes the co-located region (1211) and regions (1212)-(1214), samples of the co-located region (1211) can be used to predict the current block (1221). For example, the sample may be from a co-located block of the current block (1221) in a previously reconstructed CTB (1210), and the processing order in the reference storage buffer may include: reading (or obtaining) the sample from position x in the reference storage buffer, performing prediction of the sample in the current block (1221) by using the sample from position x, adding a residual to the prediction, and then writing the reconstructed sample back to position x in the reference storage buffer. The writing and reading processes to the same reference memory location x may require strict synchronization, which may not be preferred in some examples. The search range includes areas (1212)-(1214) in the previously reconstructed CTB (1210) that are reconstructed after the co-located area (1211) and before the current block (1221) in decoding order.

[0178] refer to Fig. 12A , the position of the co-located region (1211) is shifted by one CTB width (e.g., 128 samples) relative to the position of the current region (1216). For example, the position of the co-located region (1211) is shifted to the left by 128 samples relative to the position of the current region (1216).

[0179] Reference again Fig. 12A , when the current region (1216) is the upper left region of the current CTB (1215), the co-located region (1211) is the upper left region of the previously reconstructed CTB (1210) and the search region does not include the upper left region of the previously reconstructed CTB.

[0180] refer to Fig. 12B, the current region (1217) is being reconstructed. The current region (1217) includes a plurality of coding blocks (1241)-(1249). The current block (1241) is the block that is first reconstructed in the current region (1217). The current region (1217) has a co-located region (i.e., region (1212) in a previously reconstructed CTB (1210)). According to aspects of the present disclosure, when the current block (1241) is the first block to be reconstructed in the current region (1217), the search range of the current block (1241) does not include the co-located region (1212). Therefore, strict synchronization and timing control of the reference storage buffer is not required. The search range includes regions (1213)-(1214) in a previously reconstructed CTB (1210) reconstructed after the co-located region (1212) and before the current block (1241) and region (1216) in the current CTB (1215). Due to the constraint of the reference memory size (ie, one CTB size), the search range does not yet include region (1211). Similarly, the position of the co-located region (1212) is offset by one CTB width (eg, 128 samples) relative to the position of the current region (1217).

[0181] exist Fig. 12B In the example, the current region (1217) is the upper right region of the current CTB (1215), the co-located region (1212) is also the upper right region of the previously reconstructed CTB (1210), and the search region does not include the upper right region of the previously reconstructed CTB (1210).

[0182] refer to Fig. 12C, the current region (1218) is being reconstructed. The current region (1218) includes multiple coding blocks (1261)-(1269). The current block (1261) is the first block to be reconstructed in the current region (1218). The current region (1218) has a co-located region (i.e., region (1213)) in the previously reconstructed CTB (1210). According to aspects of the present disclosure, when the current block (1261) is the block to be reconstructed first in the current region (1218), the search range of the current block (1261) does not include the co-located region (1213). Therefore, strict synchronization and timing control of the reference storage buffer is not required. The search range includes region (1214) in the previously reconstructed CTB (1210) reconstructed after the co-located region (1213) and before the current block (1216) and region (1216)-(1217) in the current CTB (1215). Similarly, due to the constraint of the reference memory size, the search range does not yet include the region (1211)-(1212). The position of the co-located region (1213) is offset by one CTB width (e.g., 128 samples) relative to the position of the current region (1218). Fig. 12C In the example, when the current region (1218) is the lower left region of the current CTB (1215), the co-located region (1213) is also the lower left region of the previously reconstructed CTB (1210) and the search region does not include the lower left region of the previously reconstructed CTB (1210).

[0183] refer to Fig.12D , the current region (1219) is being reconstructed. The current region (1219) includes multiple coding blocks (1281)-(1289). The current block (1281) is the first block to be reconstructed in the current region (1219). The current region (1219) has a co-located region (i.e., region (1214)) in the previously reconstructed CTB (1210). According to various aspects of the present disclosure, when the current block (1281) is the first block to be reconstructed in the current region (1219), the search range of the current block (1281) does not include the co-located region (1214). Therefore, strict synchronization and timing control of the reference storage buffer is not required. The search range includes regions (1216)-(1218) in the current CTB (1215) reconstructed after the co-located region (1214) and whose decoding order is before the current block (1281). Due to the constraint of the reference memory size, the search range does not include the region (1211)-(1213), and therefore, the search range does not include the previously reconstructed CTB (1210). Similarly, the position of the co-located region (1214) is offset by one CTB width (e.g., 128 samples) relative to the position of the current region (1219). Fig.12DIn the example, when the current region (1219) is the lower right region of the current CTB (1215), the co-located region (1214) is also the lower right region of the previously reconstructed CTB (1210) and the search region does not include the lower right region of the previously reconstructed CTB (1210).

[0184] As mentioned above FIG. 12A to FIG. 12D As described, the search range and the block vector mvL of the current block satisfy the modified fourth condition, wherein the current block is a block to be reconstructed first in the current region of the current CTB. In some embodiments, the modified fourth condition is specified as: when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1, the position (xCurr, yCurr) of the current block is set to (xCb, yCb), and the position (((xCb+(mvL[0]>>4+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) is used as input to call the derivation process of reference block availability, and the output equal to FALSE indicates that the co-located area has not been reconstructed.

[0185] In addition, the modified fourth condition includes an additional condition: the position (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) is not equal to (xCb, yCb). As shown in reference Fig.10As described, the position of the upper left sample of the current block is represented by (xCb, yCb), the position of the upper left sample of the reference block is represented by (xCb+(mvL[0]>>4), yCb+(mvL[1]>>4)), and therefore, the position of the upper left sample of the co-located area of ​​the reference block is represented by the position (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)), where the co-located area of ​​the reference block is in the current CTB. The additional condition ensures that the position of the upper left sample of the co-located area of ​​the reference block is not equal to the position of the upper left sample of the current block. In this regard, when the current block is the first block to be reconstructed in the current region, its reference block cannot be located in the co-located region of the current region. Otherwise, the additional condition is not satisfied. Therefore, the search range does not include the co-located region of the current region.

[0186] exist FIG. 12A to FIG. 12D In the example shown, the search range and block vector also satisfy the reference Fig.10 The first, second and third conditions described.

[0187] As described above, when the current block is the first block to be reconstructed in the current region of the current CTB, the search range may not include a co-located region of the current region in a previously reconstructed CTB, wherein the current CTB and the previously reconstructed CTB are located in the same current picture. According to various aspects of the present disclosure, when the size of the CTB is smaller than the reference memory size, the position of the co-located region may be offset by a multiple of the CTB width relative to the position of the current region, and the coding blocks in the search range are located in at least one of the following: the current CTB, the previously reconstructed CTB, and one or more reconstructed CTBs between the current CTB and the previously reconstructed CTB. Fig.13 As shown, when the size of the CTB is smaller than the size of the reference memory, the reference memory can be adaptively modified. FIG. 12A to FIG. 12D Description.

[0188] Fig.13An example of intra-block copying in which the search range is larger than the CTB size according to an embodiment of the present disclosure is shown. The current picture (1301) includes a current CTB (1315) being reconstructed and a plurality of previously reconstructed CTBs (1310) and (1321)-(1323). The CTB in the current picture (1301) has a CTB size and a CTB width. The current CTB (1315) includes 4 regions (1316)-(1319). Similarly, the previously reconstructed CTB (1310) includes 4 regions (1311)-(1314). In the example, the reference memory size is 128×128 samples and may be equal to the maximum CTB size, the size of the CTB is smaller than the size of the reference memory, or the maximum CTB size is 64×64 samples, and the size of each of the regions (1311)-(1314) and (1316)-(1319) is 32×32 samples. The ratio N is the ratio of the reference memory size to the CTB size.

[0189] The current CTB (1315) includes an upper left region, an upper right region, a lower left region, and a lower right region corresponding to regions (1316)-(1319), respectively. The previously reconstructed CTB (1310) includes an upper left region, an upper right region, a lower left region, and a lower right region corresponding to regions (1311)-(1314), respectively.

[0190] The current region (1317) is being reconstructed. The current region (1317) includes multiple coding blocks AI. The current block A is the first block to be reconstructed in the current region (1317). The current region (1317) has a co-located region (1312) in a previously reconstructed CTB (1310). According to aspects of the present disclosure, the search range of the current block A does not include the co-located region (1312). The search range includes regions (1313)-(1314), CTBs (1321)-(1323), and region (1316) in the previously reconstructed CTB (1310) reconstructed after the co-located region (1312) and before the current block A. Therefore, the leftmost CTB that the search range may include is offset by N times the CTB width relative to the current CTB (1315). The position of the co-located region (1312) is also offset by N times the CTB width relative to the position of the current region (1317). Fig.13 In the example of FIG. 1 , the ratio N is 4, and the leftmost CTB is the previously reconstructed CTB (1310) offset by 4 times the CTB width relative to the current CTB (1315). The position of the co-located region (1312) is shifted to the left by 256 samples (i.e., 4 times the CTB width (64 samples)) relative to the position of the current region (1317).

[0191] like Fig.13As shown in the example, when the current region (1317) is the upper right region of the current CTB (1315), the co-located region (1312) is also the upper right region of the previously reconstructed CTB (1310) and the search region does not include the upper right region of the previously reconstructed CTB (1310).

[0192] When the current block is a block first reconstructed in another area (eg, area (1316), area (1318), or area (1319)), the reference Fig.13 For the sake of brevity, the detailed description is omitted.

[0193] When the CTB size is smaller than the reference memory size, for example, the CTB size is 64×64 samples and the reference memory size is 128×128 samples, the following different Fig.13 Example embodiments. In the following embodiments, the current block to be reconstructed using the IBC mode is located in the current region of the current CTB being reconstructed. The reference block of the current block is located within the search range. The ratio N of the reference memory size to the CTB size is greater than 1. The N previously reconstructed CTBs are respectively shifted left by N, (N-1), ..., 1 times the CTB width relative to the current CTB. The search range may include at least one of the following ranges: the current CTB, the leftmost CTB (i.e., a CTB shifted to the left by N times the CTB width), and the (N-1) previously reconstructed CTBs (also referred to as (N-1) CTBs) located between the leftmost CTB and the current CTB.

[0194] In a first embodiment, the search range of the current block is between the current CTB and the previously reconstructed CTB that is the left neighbor of the current CTB. Because the reference memory size is at least twice the CTB size, each coding block of the left neighbor can be used as a reference block, so there is no need to perform additional checks on the availability of reference blocks. In one example, the current block is the first block to be reconstructed in the current region. In one example, the current block is a block reconstructed after the previously reconstructed coding block in the current region.

[0195] In a second embodiment, the search range is extended to include the (N-1) CTBs between the leftmost CTB and the current CTB. Therefore, the search range includes the (N-1) CTBs but does not include the leftmost CTB. The search range may also include a reconstructed portion of the current CTB. Since the reference memory size is N times the CTB size, the size of the search range is within the reference memory size. Therefore, when the (N-1) CTBs and the current CTB are located in the same tile, the same slice, etc., no additional check on the reference block availability is required. Reference Fig.13, the ratio N is 4, and the search range includes 3 previously reconstructed CTBs (i.e., previously reconstructed CTBs (1321)-(1323) between the leftmost CTB (1310) and the current CTB (1315)). For example, if the previously reconstructed CTBs (1321)-(1323) and the current CTB (1315) are in the same tile or slice, the previously reconstructed CTBs (1321)-(1323) are completely available for reference, so there is no need to perform additional checks on the reference block availability.

[0196] In the third embodiment, the search range is extended to include N previously reconstructed CTBs of the leftmost CTB, and special processing may be required. The current CTB and the leftmost CTB can be divided into 4 regions of equal size. In the example, the four regions are square regions. Depending on which region the current block is located, for example, similar to the reference Fig.10 , Fig.11 and FIG. 12A to FIG. 12D For descriptions, a portion of the leftmost CTB may or may not be used for reference.

[0197] In the first example of the third embodiment, the search range and block vector of the current block satisfy the following conditions: Fig.10 The modified constraint conditions are adaptively modified according to the described constraint conditions. For example, the modified constraint conditions include the first condition, the second condition, the modified third condition and the modified fourth condition. The modified third condition can be specified as follows:

[0198] (yCb+(mvL[1]>>4))>>CtbLog2SizeY=yCb>>CtbLog2SizeY(1)

[0199] (yCb+(mvL[1]>>4+cbHeight-1)>>CtbLog2SizeY=yCb>>CtbLog2Size(2)(xCb+(mvL[0]>>4))>>CtbLog2SizeY>=(xCb>>CtbLog2S izeY)-1<<((MaxCtbLog2SizeY-CtbLog2SizeY)<<1))(5)(xCb+(mvL[0]>>4+cbWidth-1)>>CtbLog2SizeY<=(xCb>>CtbLog2SizeY)

[0200] (4) wherein formulas (1)-(2) and (4) remain the same as those in the third condition, and formula (5) replaces formula (3) in the third condition. The parameter MaxCtbLog2SizeY represents the maximum CTB size or reference memory size in log2 form. As described above, the search range may include N previously reconstructed CTBs: e.g. Fig.13 In the example of , the leftmost CTB (1310) offset by N times the CTB width relative to the current CTB (1315) and the (N-1) CTBs between the leftmost CTB (1310) and the current CTB (1315). Formulas (4)-(5) constrain the reference block to be in one of the following ranges: the leftmost CTB (1310), the current CTB (1315), and the (N-1) CTBs (1321)-(1323).

[0201] The modified fourth condition may specify that when the reference block is in the leftmost CTB (1310), the co-located region of the reference block is not reconstructed (i.e., when the co-located region of the reference block is in the current CTB (1315), there are no reconstructed samples in the co-located region). The co-located region of the reference block is offset by N times the CTB width relative to the region where the reference block is located. For example, the modified fourth condition may be specified as follows: when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1<<((MaxCtbLog2SizeY-CtbLog2SizeY)<<1)), the position (xCurr, yCurr) of the upper left sample of the current block is set to (xCb, yCb), and the position (((xCb+(mvL[0]>>4)+N CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1) is used as input to call the derivation process of reference block availability, and the output equal to FALSE indicates that the co-located area of ​​the reference block has not been reconstructed.

[0202] In the second example of the third embodiment, the search range and block vector of the current block satisfy the following conditions according to the reference Fig.10The modified constraint conditions are adaptively modified according to the described constraint conditions. For example, the modified constraint conditions include a first condition, a second condition, a modified third condition, and a modified fourth condition. The modified third condition may be the same as the condition described in the first example with reference to the third embodiment, and therefore, for the sake of brevity, the detailed description is omitted. The modified fourth condition includes the modified fourth condition described in the first example with reference to the third embodiment. In addition, the modified fourth condition includes the following additional condition: when CtbLog2SizeY is equal to MaxCtbLog2SizeY, the position (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) is not equal to (xCb, yCb). The additional condition ensures that the position of the co-located area of ​​the reference block is not equal to the position of the current block. In this regard, when the current block is to be first reconstructed in the current region, the reference block may not be located in the co-located region of the current region. Therefore, the search range does not include the co-located region of the current region.

[0203] In the fourth embodiment, the leftmost CTB is set to be unavailable for reference, so the search range does not include the leftmost CTB. Therefore, similar to the second embodiment, the search range may include the reconstructed portion of the current CTB and (N-1) CTBs between the leftmost CTB and the current CTB.

[0204] In the first example of the fourth embodiment, the search range and block vector of the current block satisfy the following conditions according to the reference Fig.10 The modified constraint conditions are adaptively modified according to the described constraint conditions. For example, the modified constraint conditions include the first condition, the second condition, the modified third condition and the modified fourth condition. The modified third condition can be specified as follows:

[0205] (yCb+(mvL[1]>>4))>>CtbLog2SizeY=yCb>>CtbLog2SizeY(1)

[0206] (yCb+(mvL[1]>>4+cbHeight-1)>>CtbLog2SizeY=yCb>>CtbLog2Size(2)(xCb+(mvL[0]>>4))>>CtbLog2SizeY>=(xCb>>CtbLog2SizeY)-1<<(( 7-CtbLog2SizeY)<<1))+Min(1, MaxCtbLog2SizeY-CtbLog2SizeY)(6)(xCb+(mvL[0]>>4+cbWidth-1)>>CtbLog2SizeY<=(xCb>>CtbLog2SizeY)

[0207] (4) wherein formulas (1)-(2) and formula (4) remain the same as the third condition, and formula (6) replaces formula (3) in the third condition. Formulas (4) and (6) constrain the reference block to be within one of the following ranges: the current CTB and (N-1) CTBs.

[0208] The modified fourth condition may specify that when the reference block is in the left neighbor of the current CTB and the CTB size is the maximum CTB size (which is also the reference memory size), the co-located region of the reference block is not reconstructed (i.e., when the co-located region of the reference block is located in the current CTB, there are no samples in the co-located region that have been reconstructed). For example, the modified fourth condition can be specified as follows: when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1 and CtbLog2SizeY is equal to MaxCtbLog2SizeY, the position (xCurr, yCurr) of the upper left sample of the current block is set to (xCb, yCb), and the position (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) is used as input to call the derivation process of reference block availability, and the output equal to FALSE indicates that the co-located area of ​​the reference block has not been reconstructed.

[0209] In the second example of the fourth embodiment, the search range and block vector of the current block satisfy the following conditions according to the reference Fig.10 The modified constraint condition is adaptively modified according to the described constraint condition. For example, the modified constraint condition includes the first condition, the second condition, the modified third condition and the modified fourth condition. The modified third condition may be the same as the modified third condition of the first example of the fourth embodiment, and the modified third condition constrains the reference block to be within one of the following ranges: the current CTB and (N-1) CTBs.

[0210] The modified fourth condition includes the modified fourth condition of the first example of the fourth embodiment. Therefore, when the reference block is located in the left neighbor of the current CTB and the CTB size is the maximum CTB size (which is also the reference memory size), the co-located area of ​​the reference block is not reconstructed (that is, when the co-located area of ​​the reference block is located in the current CTB, there are no reconstructed samples in the co-located area). In addition, the modified fourth condition includes the following additional condition: when CtbLog2SizeY is equal to MaxCtbLog2SizeY, the position (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) is not equal to (xCb, yCb). The additional condition ensures that the position of the co-located area of ​​the reference block is not equal to the position of the current block. In this regard, when the current block is a block to be reconstructed first in the current region, its reference block may not be located in the co-located region of the current region. Therefore, the search range does not include the co-located region of the current region.

[0211] In the above description, the CTB may include 4 regions. For example, the current CTB 1015 includes regions (1016-1019). The description can be adaptively modified for scenarios where the CTB includes any suitable number of regions and the number can be a positive integer. In addition, these regions can have any suitable size and shape (including rectangles, squares, etc.). In the example, the size of the region can be determined based on the reference memory size, the unit size of the memory, etc. In the above example, the region can include 9 coding blocks. In general, a region can include any suitable number of coding blocks, and the description can be modified appropriately.

[0212] Fig.14A flow chart outlining a process (1400) according to an embodiment of the present disclosure is shown. The process (1400) may be used to reconstruct a current block encoded in an intra-block copy mode, thereby generating a reference block for the block being reconstructed. In various embodiments, the process (1400) is performed by a processing circuit such as a processing circuit in a terminal device (310), a terminal device (320), a terminal device (330), and a terminal device (340), a processing circuit that performs the functions of a video encoder (403), a processing circuit that performs the functions of a video decoder (410), a processing circuit that performs the functions of a video decoder (510), a processing circuit that performs the functions of a video encoder (603), and the like. In some embodiments, the process (1400) is implemented in software instructions, so that when the processing circuit executes the software instructions, the processing circuit performs the process (1400). The process starts at (S1401) and proceeds to (S1410).

[0213] At (S1410), prediction information of a current block is decoded from an encoded video bitstream. The prediction information indicates an intra block copy mode. The current block is one of a plurality of coding blocks in a current region of a current CTB in a current picture.

[0214] At (S1420), when the current block is a block first reconstructed in the current region, a block vector is determined for the current block, wherein the reference block indicated by the block vector is located within a search range that does not include a co-located region in a previously reconstructed CTB. Fig.10 , Fig.11 , FIG. 12A to FIG. 12D and Fig.13 As described above, the position of the co-located region in the previously reconstructed CTB is the same as the relative position of the current region in the current CTB.

[0215] The search range is within the current picture. In one embodiment, the search range includes the coded blocks reconstructed after the co-located region and before the current block.

[0216] In one embodiment, the CTB size may be compared to the reference memory size. In an example, when the CTB size is equal to the reference memory size, the previously reconstructed CTB is a left neighbor of the current CTB, the position of the co-located region is offset by the width of the current CTB relative to the position of the current region, and the coding block in the search range is located in at least one of the following: the current CTB and the previously reconstructed CTB. In an example, the sizes of the current CTB and the previously reconstructed CTB are 128x128 samples, the current CTB includes 4 regions of 64x64 samples, the previously reconstructed CTB includes 4 regions of 64x64 samples, the position of the co-located region is offset by 128 samples from the position of the current region, the current region is one of the 4 regions in the current CTB, and the co-located region is one of the 4 regions in the previously reconstructed CTB.

[0217] In an example, the CTB size is smaller than the reference memory size, and a ratio N of the reference memory size to the CTB size is greater than 1. Therefore, the position of the co-located region is offset by N times the CTB width relative to the position of the current region, and the coding block in the search range is located in at least one of the following: the current CTB, the leftmost previously reconstructed CTB that is shifted left by N times the CTB width relative to the current CTB, and the (N-1) reconstructed CTBs between the current CTB and the leftmost previously reconstructed CTB. For example, the CTB size is 64×64 samples, the reference memory size is 128×128 samples, the current CTB includes 4 regions of 32×32 samples, the previously reconstructed CTB includes 4 regions of 32×32 samples, and the co-located region is offset by 256 samples relative to the position of the current region.

[0218] Alternatively, when the size of the CTB is smaller than the size of the reference memory, the search range does not include the leftmost previously reconstructed CTB. In an example, the search range may include (N-1) reconstructed CTBs and a reconstructed portion of the current CTB.

[0219] At (S1430), at least one sample of the current block is reconstructed according to the block vector. In an example, a reference block is obtained using the block vector, and at least one sample is obtained according to the reference block. Then, the process (1400) proceeds to (S1499) and ends.

[0220] For example, when the current CTB includes multiple regions other than 4 regions, the process (1400) can be adaptively modified for various scenarios. In an embodiment, the process (1400) can also be used to reconstruct a coding block reconstructed after another coding block in the current region.

[0221] The above techniques may be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. Fig.15 A computer system (1500) suitable for implementing certain embodiments of the disclosed subject matter is shown.

[0222] Computer software may be encoded using any suitable machine code or computer language that may be subjected to assembly, compilation, linking or similar mechanisms to create code comprising instructions that may be executed directly by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., or through interpreted code, microcode, etc.

[0223] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, IoT devices, etc.

[0224] Fig.15 The components of the computer system (1500) shown are exemplary in nature and are not intended to suggest any limitation on the scope of use or functionality of computer software implementing embodiments of the present disclosure. Neither should the configuration of components be interpreted as having any dependency or requirement relating to any one or combination of components shown in the exemplary embodiment of the computer system (1500).

[0225] The computer system (1500) may include certain human-machine interface input devices. Such human-machine interface input devices may respond to input from one or more human users through, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, clapping), visual input (e.g., gestures), olfactory input (not depicted). The human-machine interface device may also be used to capture certain media that are not necessarily directly related to human conscious input, such as audio (e.g., voice, music, ambient sound), images (e.g., scanned images, photographic images obtained from a still image camera), video (e.g., two-dimensional video, three-dimensional video including stereoscopic video), etc.

[0226] The input human-machine interface device may include one or more of the following (only one of each is shown): keyboard (1501), mouse (1502), touch pad (1503), touch screen (1510), data gloves (not shown), joystick (1505), microphone (1506), scanner (1507), camera (1508).

[0227] The computer system (1500) may also include certain human-machine interface output devices. Such human-machine interface output devices may stimulate one or more human user senses, for example, through tactile output, sound, light, and smell / taste. Such human-machine interface output devices may include tactile output devices (e.g., tactile feedback of a touch screen (1510), a data glove (not shown), or a joystick (1505), but may also be a tactile feedback device that is not an input device), audio output devices (e.g., speakers (1509), headphones (not shown)), visual output devices (e.g., screens (1510) including CRT screens, LCD screens, plasma screens, OLED screens, each with or without touch screen input capabilities, each with or without tactile feedback capabilities - some of which are capable of outputting two-dimensional visual output or more than three-dimensional output through devices such as stereo image output, virtual reality glasses (not depicted), holographic displays and smoke boxes (not depicted), and printers (not depicted).

[0228] The computer system (1500) may also include human-accessible storage devices and their associated media: for example, optical media including CD / DVD ROM / RW (1520) with CD / DVD etc. media (1521), thumb drives (1522), removable hard drives or solid-state drives (1523), traditional magnetic media such as tapes and floppy disks (not shown), dedicated ROM / ASIC / PLD based devices such as security dongles (not shown), etc.

[0229] Those skilled in the art should also understand that the term "computer-readable media" used in connection with the presently disclosed subject matter does not encompass transmission media, carrier waves, or other transitory signals.

[0230] The computer system (1500) may also include an interface to one or more communication networks. The network may be, for example, a wireless network, a wired network, an optical network. The network may further be a local network, a wide area network, a metropolitan area network, a vehicle and industrial network, a real-time network, a delay-tolerant network, etc. Examples of networks include local area networks such as Ethernet, wireless LANs, cellular networks including GSM, 3G, 4G, 5G, LTE, etc., television wired or wireless wide area digital networks including cable television, satellite television, and terrestrial broadcast television, vehicle and industrial television including CANBus, etc. Some networks typically require an external network interface adapter (e.g., a USB port of the computer system (1500)) connected to some universal data port or peripheral bus (1549); as described below, other network interfaces are typically integrated into the kernel of the computer system (1500) by connecting to the system bus (e.g., connecting to an Ethernet interface in a PC computer system or connecting to a cellular network interface in a smartphone computer system). The computer system (1500) can use any of these networks to communicate with other entities. Such communications may be one-way receive only (e.g., broadcast television), one-way send only (e.g., a CANbus connected to certain CANbus devices), or bidirectional, for example, using a LAN or WAN digital network to connect to other computer systems. As described above, certain protocols and protocol stacks may be used on each of those networks and network interfaces.

[0231] The above-mentioned human-machine interface device, human-machine accessible storage device, and network interface may be attached to the kernel ( 1540 ) of the computer system ( 1500 ).

[0232] The core (1540) may include one or more central processing units (CPUs) (1541), graphics processing units (GPUs) (1542), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1543), hardware accelerators (1544) for certain tasks, etc. These devices, as well as read-only memory (ROM) (1545), random access memory (1546), internal mass storage (1547) such as internal non-user accessible hard drives, SSDs, etc., may be connected via a system bus (1548). In some computer systems, the system bus (1548) may be accessed in the form of one or more physical plugs to enable expansion by additional CPUs, GPUs, etc. Peripheral devices may be connected directly to the core's system bus (1548) or to the core's system bus (1848) via a peripheral bus (1549). The architecture of the peripheral bus includes PCI, USB, etc.

[0233] The CPU (1541), GPU (1542), FPGA (1543) and accelerator (1544) can execute certain instructions, which can be combined to form the above-mentioned computer code. The computer code can be stored in ROM (1545) or RAM (1546). Transition data can also be stored in RAM (1546), while permanent data can be stored, for example, in internal mass storage (1547). Fast storage and retrieval of any storage device can be performed by using a high-speed cache, which can be closely associated with the following: one or more CPUs (1541), GPUs (1542), mass storage (1547), ROM (1545), RAM (1546), etc.

[0234] The computer readable medium may have thereon computer codes for performing various computer-implemented operations. The medium and computer codes may be those specially designed and constructed for the purposes of the present disclosure, or the medium and computer codes may be of a type well known and available to those skilled in the art of computer software.

[0235] As a non-limiting example, a computer system having an architecture (1500), particularly a kernel (1540), may provide functionality due to one or more processors (including CPUs, GPUs, FPGAs, accelerators, etc.) executing software contained in one or more tangible computer-readable media. Such computer-readable media may be media associated with user-accessible mass storage as described above, as well as certain non-temporary memories of the kernel (1540), such as kernel internal mass storage (1547) or ROM (1545). Software implementing various embodiments of the present disclosure may be stored in such devices and executed by the kernel (1540). Depending on specific needs, the computer-readable medium may include one or more storage devices or chips. The software may enable the kernel (1540), particularly the processors therein (including CPUs, GPUs, FPGAs, etc.), to perform specific processes or specific parts of specific processes described herein, including defining data structures (1546) stored in RAM and modifying such data structures according to processes defined by the software. Additionally or alternatively, the computer system may provide functionality due to logic hardwired or otherwise embodied in circuitry (e.g., accelerator (1544)) that may replace software or operate in conjunction with software to perform a particular process or a particular portion of a particular process described herein. Where appropriate, references to portions of software may include logic and vice versa. Where appropriate, references to portions of computer-readable media may include circuitry (e.g., integrated circuits (ICs)) storing software for execution, circuitry embodying logic for execution, or both. The present disclosure includes any suitable combination of hardware and software.

[0236] Appendix A: Abbreviations

[0237] JEM: Joint Exploration Model

[0238] VVC: Next Generation Video Coding

[0239] BMS: Benchmark Set

[0240] MV: Motion Vector

[0241] HEVC: High Efficiency Video Coding

[0242] SEI: Supplemental Enhancement Information

[0243] VUI: Video Availability Information

[0244] GOP: Group of Pictures

[0245] TU: Transform Unit

[0246] PU: prediction unit

[0247] CTU: Coding Tree Unit

[0248] CTB: Coding Tree Block

[0249] PB: prediction block

[0250] HRD: Hypothesized Reference Decoder

[0251] SNR: Signal to Noise Ratio

[0252] CPU: Central Processing Unit

[0253] GPU: Graphics Processing Unit

[0254] CRT: cathode ray tube

[0255] LCD: Liquid Crystal Display

[0256] OLED: Organic Light Emitting Diode

[0257] CD: compact disc

[0258] DVD: Digital Video Disc

[0259] ROM: Read Only Memory

[0260] RAM: Random Access Memory

[0261] ASIC: Application-Specific Integrated Circuit

[0262] PLD: Programmable Logic Device

[0263] LAN: Local Area Network

[0264] GSM: Global System for Mobile Communications

[0265] LTE: Long Term Evolution

[0266] CANBus: Controller Area Network Bus

[0267] USB: Universal Serial Bus

[0268] PCI: Peripheral Component Interconnect

[0269] FPGA: Field Programmable Gate Array

[0270] SSD: Solid State Drive

[0271] IC: Integrated Circuit

[0272] CU: Coding Unit

[0273] SCC: Screen Content Coding

[0274] VTM: Versatile Test Model

[0275] BV: Block Vector

[0276] AMVP: Advanced Motion Vector Prediction

[0277] CPR: Current Picture Reference

[0278] IBC: Intra Block Copy

[0279] DPB: Decoded Picture Buffer

[0280] Although the present disclosure has described a number of exemplary embodiments, there are modifications, permutations, and various replacement equivalents that fall within the scope of the present disclosure. Therefore, it should be understood that those skilled in the art will be able to design many systems and methods that, although not explicitly shown or described herein, embody the principles of the present disclosure and therefore fall within the spirit and scope of the present disclosure.

Claims

1. A video decoding method, characterized in that: include: Decoding prediction information of a current block from an encoded video bitstream, the prediction information indicating an intra block copy mode, the current block being one of a plurality of coding blocks in a current region of a current coding tree block (CTB) in a current picture; When the constraint condition is met, a reference block search range of the current block is determined, where the reference block search range refers to a portion of a picture from which a reference block can be selected; wherein the constraint condition includes the following: First condition: the reference block of the current block has been reconstructed; Second condition: the reference block is on the left side of the current block and does not overlap with the current block; Third condition: the CTB where the reference block is located is in the same CTB row as the CTB where the current block is located; Fourth condition: the reference block is in the left CTB of the current CTB, and the co-located area of ​​the reference block has not been reconstructed; as well as Determine a block vector of the current block, and reconstruct at least one sample of the current block according to the block vector, wherein when a fifth constraint condition is satisfied, reconstruct at least one sample of the current block according to the block vector, and the fifth constraint condition includes: determining the position of the upper left sample of the current block as (xCb, yCb), and when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1<<((MaxCtbLog2SizeY-CtbLog2SizeY)<<1), reconstructing the position coordinates (((xCb+(mvL[0]>>4)+N CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1) is used as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; wherein, mvL[0] and mvL[1] represent the x component and y component of the block vector respectively, CtbSizeY represents the CTB width, CtbLog2SizeY represents the CTB width after taking the logarithm, MaxCtbLog2SizeY represents the maximum CTB size or the reference memory size after taking the logarithm, and N is the ratio of the size of the reference memory to the size of the current CTB.

2. The method according to claim 1, characterized in that The reference block indicated by the block vector is within a search range, and the search range includes coding blocks reconstructed after the co-located area of ​​the current block and before the current block.

3. The method according to claim 2, characterized in that The size of the current CTB is equal to the size of the reference memory, the previously reconstructed CTB is a left neighbor of the current CTB, the position of the co-located region of the current block is offset by the width of the current CTB relative to the position of the current region, and the coding block in the search range is located in at least one of the current CTB and the previously reconstructed CTB.

4. The method according to claim 3, characterized in that: The method further comprises: Determine a first constraint and a second constraint; the first constraint includes: taking the position coordinates of the upper left sample of the co-located area of ​​the reference block of the current block as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block is not reconstructed; the second constraint includes: the position coordinates of the upper left sample of the co-located area of ​​the reference block are not equal to the position coordinates of the upper left sample of the current area; The reconstructing at least one sample of the current block according to the block vector comprises: When the first constraint condition and the second constraint condition are satisfied, at least one sample of the current block is reconstructed according to the block vector.

5. The method according to claim 4, characterized in that The first constraint condition specifically includes: Determine the position of the upper left sample of the current block as (xCb, yCb), and when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1, use the position coordinates (((xCb+(mvL[0]>>4+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; Among them, mvL[0] and mvL[1] represent the x component and y component of the block vector respectively, CtbSizeY represents the CTB width, and CtbLog2SizeY represents the logarithm of the CTB width.

6. The method according to claim 4, characterized in that The second constraint condition specifically includes: Determine the position of the upper left sample of the current block as (xCb, yCb), the coordinates of the upper left sample position of the co-located area of ​​the reference block (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) are not equal to (xCb, yCb), ensuring that the position of the upper left sample of the co-located area of ​​the reference block is not equal to the position of the upper left sample of the current area; Among them, mvL[0] and mvL[1] represent the x component and y component of the block vector respectively, CtbSizeY represents the CTB width, and CtbLog2SizeY represents the logarithm of the CTB width.

7. The method according to claim 1, characterized in that The sizes of the current CTB and the previously reconstructed CTB are 128×128 samples, the current CTB includes 4 regions of 64×64 samples, the previously reconstructed CTB includes 4 regions of 64×64 samples, the position of the co-located region of the current block is offset by 128 samples relative to the position of the current region, the current region is one of the 4 regions in the current CTB, and the co-located region of the current block is one of the 4 regions in the previously reconstructed CTB.

8. The method according to claim 7, characterized in that The method further comprises: Determine a third constraint and a fourth constraint; the third constraint includes: determining the position of the upper left sample of the current block as (xCb, yCb), when (xCb+(mvL[0]>>4))>>7 is equal to (xCb>>7)-1, the size of the current CTB is equal to the size of the reference memory, and the previously reconstructed CTB is the left neighbor of the current CTB, and using the position coordinates (((xCb+(mvL[0]>>4+128)>>6)<<6, ((yCb+(mvL[1]>>4))>>6)<<6) as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block is not reconstructed; The fourth constraint condition includes: determining that the coordinates of the upper left sample position of the co-located area of ​​the reference block (((xCb+(mvL[0]>>4)+128)>>6)<<6, ((yCb+(mvL[1]>>4))>>6)<<6) are not equal to (xCb, yCb), ensuring that the position of the upper left sample of the co-located area of ​​the reference block is not equal to the position of the upper left sample of the current block; wherein mvL[0] and mvL[1] represent the x component and y component of the block vector respectively; wherein mvL[0] and mvL[1] represent the x component and y component of the block vector respectively; The reconstructing at least one sample of the current block according to the block vector comprises: When the third constraint condition and the fourth constraint condition are satisfied, at least one sample of the current block is reconstructed according to the block vector.

9. The method according to claim 7, characterized in that: The four regions in the current CTB include an upper left region, an upper right region, a lower left region, and a lower right region; The four regions in the previously reconstructed CTB include an upper left region, an upper right region, a lower left region, and a lower right region; When the current region is the upper left region of the current CTB, the co-located region of the current block is the upper left region of the previously reconstructed CTB, and the search region does not include the upper left region of the previously reconstructed CTB; When the current region is the upper right region of the current CTB, the co-located region of the current block is the upper right region of the previously reconstructed CTB, and the search region does not include the upper left region and the upper right region of the previously reconstructed CTB; When the current region is the lower left region of the current CTB, the co-located region of the current block is the lower left region of the previously reconstructed CTB, and the search region does not include the upper left region, the upper right region, and the lower left region of the previously reconstructed CTB; as well as When the current region is a lower right region of the current CTB, the co-located region of the current block is a lower right region of the previously reconstructed CTB, and the search region does not include the previously reconstructed CTB.

10. The method according to claim 1, characterized in that The current CTB includes 4 regions having the same size and shape, the previously reconstructed CTB includes 4 regions having the same size and shape, the current region is one of the 4 regions in the current CTB, and the co-located region of the current block is one of the 4 regions in the previously reconstructed CTB.

11. The method according to claim 2, characterized in that The size of the current CTB is smaller than the size of the reference memory, the position of the co-located area of ​​the current block is offset by the width of multiple current CTBs relative to the position of the current area, and the coding block reconstructed before the current block in the search range is located in at least one of the following: the current CTB, the previously reconstructed CTB, and one or more reconstructed CTBs between the current CTB and the previously reconstructed CTB.

12. The method according to claim 11, characterized in that The method further comprises: Determine a fifth constraint condition; the fifth constraint condition includes: taking the position coordinates of the upper left sample of the co-located area of ​​the reference block of the current block as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed.

13. The method according to claim 2, characterized in that The size of the current CTB is 64×64 samples, the size of the reference memory is 128×128 samples, the current CTB includes 4 areas of 32×32 samples, the previously reconstructed CTB includes 4 areas of 32×32 samples, and the position of the co-located area of ​​the current block is offset by 256 samples relative to the position of the current area.

14. The method according to claim 13, characterized in that The method further comprises: Determine a sixth constraint; the sixth constraint includes: determining the position of the upper left sample of the current block as (xCb, yCb), when (xCb+(mvL[0]>>4))>>6 is equal to (xCb>>6)-1<<(1<<1)), using the position coordinates (((xCb+(mvL[0]>>4)+256)>>5)<<5, ((yCb+(mvL[1]>>4))>>5)<<5) as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block is not reconstructed; wherein mvL[0] and mvL[1] represent the x component and y component of the block vector, respectively; The reconstructing at least one sample of the current block according to the block vector comprises: When the sixth constraint condition is met, at least one sample of the current block is reconstructed according to the block vector.

15. The method according to claim 11, characterized in that The coding blocks in the search range are located in at least one of: the current CTB and one or more reconstructed CTBs between the current CTB and the previously reconstructed CTB.

16. The method according to claim 11, characterized in that The search range does not include the previously reconstructed CTB that is offset from the current CTB by N widths of the current CTB, where N is a ratio of a size of the reference memory to a size of the current CTB.

17. The method according to claim 1, characterized in that The method further comprises: Additional data is obtained from an encoded video sequence, where the additional data is used to reconstruct original video data, and the additional data includes at least one of a time, space or signal-to-noise ratio enhancement layer, a redundant slice, a redundant picture, and a forward error correction code.

18. A video encoding method, characterized in that: The method comprises: Determining prediction information for a current block, the prediction information indicating an intra block copy mode, the current block being one of a plurality of coding blocks in a current region of a current coding tree block (CTB) in a current picture; When the constraint condition is met, a reference block search range of the current block is determined, where the reference block search range refers to a portion of a picture from which a reference block can be selected; wherein the constraint condition includes the following: First condition: the reference block of the current block has been encoded; Second condition: the reference block is on the left side of the current block and does not overlap with the current block; Third condition: the CTB where the reference block is located is in the same CTB row as the CTB where the current block is located; Fourth condition: the reference block is in the left CTB of the current CTB, and the co-located area of ​​the reference block is not encoded; as well as Determine a block vector of the current block, and encode at least one sample of the current block according to the block vector, wherein when a fifth constraint condition is satisfied, encode at least one sample of the current block according to the block vector, and the fifth constraint condition includes: determining the position of the upper left sample of the current block as (xCb, yCb), and when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1<<((MaxCtbLog2SizeY-CtbLog2SizeY)<<1), the position coordinate (((xCb+(mvL[0]>>4)+N CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1) is used as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block is not encoded; wherein, mvL[0] and mvL[1] represent the x component and y component of the block vector respectively, CtbSizeY represents the CTB width, CtbLog2SizeY represents the CTB width after taking the logarithm, MaxCtbLog2SizeY represents the maximum CTB size or the reference memory size after taking the logarithm, and N is the ratio of the size of the reference memory to the size of the current CTB.

19. A video decoding device, characterized in that: include: A processing circuit configured to perform the video decoding method according to any one of claims 1 to 17.

20. A video decoding device, characterized in that: include: A decoding module, configured to decode prediction information of a current block from an encoded video bitstream, the prediction information indicating an intra block copy mode, the current block being one of a plurality of coding blocks in a current region of a current coding tree block (CTB) in a current picture; A determination module is used to determine a reference block search range of the current block when a constraint condition is met, wherein the reference block search range refers to a portion of a picture from which a reference block can be selected; wherein the constraint condition includes the following: First condition: the reference block of the current block has been reconstructed; Second condition: the reference block is on the left side of the current block and does not overlap with the current block; Third condition: the CTB where the reference block is located is in the same CTB row as the CTB where the current block is located; The fourth condition is that the reference block is in the left CTB of the current CTB, and the co-located area of ​​the reference block has not been reconstructed; as well as a reconstruction module, configured to determine a block vector of the current block, and reconstruct at least one sample of the current block according to the block vector, wherein when a fifth constraint condition is satisfied, at least one sample of the current block is reconstructed according to the block vector, and the fifth constraint condition comprises: determining the position of the upper left sample of the current block as (xCb, yCb), and when (xCb+(mvL[0]>>4))>>CtbLog2SizeY is equal to (xCb>>CtbLog2SizeY)-1<<((MaxCtbLog2SizeY-CtbLog2SizeY)<<1), reconstructing the position coordinates (((xCb+(mvL[0]>>4)+N CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1) is used as input to call the derivation process of the reference block availability of the current block, and the output is false, indicating that the co-located area of ​​the reference block has not been reconstructed; wherein, mvL[0] and mvL[1] represent the x component and y component of the block vector respectively, CtbSizeY represents the CTB width, CtbLog2SizeY represents the CTB width after taking the logarithm, MaxCtbLog2SizeY represents the maximum CTB size or the reference memory size after taking the logarithm, and N is the ratio of the size of the reference memory to the size of the current CTB.

21. A computer-readable medium storing instructions, characterized in that: When the instruction is executed by a computer to perform video decoding, the computer is caused to perform the video decoding method according to any one of claims 1 to 17; or, when the instruction is executed by a computer to perform video encoding, the computer is caused to perform the video encoding method according to claim 18.

22. A method for processing a video code stream, characterized in that: The video code stream is generated according to the video encoding method according to claim 18, or is decoded based on the video decoding method according to any one of claims 1 to 17.