Buffer reset for intra block copy in video coding
By optimizing buffer management in intra-frame block copy mode and utilizing the reconstruction block information of the current video region, the problem of improper buffer management in existing technologies is solved, thereby improving the efficiency and resource utilization of video encoding and decoding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-02
- Publication Date
- 2026-03-27
AI Technical Summary
Existing video encoding and decoding technologies suffer from resource waste and inefficiency when processing video data, especially in intra-frame block copy mode, due to improper buffer management. In particular, when reference images are not readily available, they cannot effectively utilize the reconstruction block information of the current video region.
By optimizing buffer management in intra-frame block copy mode, storing and using motion information related to reconstructed blocks located in the same video region as the current video block, avoiding reference images, and achieving efficient management and utilization of reference samples.
It improves the efficiency and resource utilization of video encoding and decoding, and reduces the complexity and resource waste of buffer management, especially in the prediction and reconstruction of current video blocks.
Smart Images

Figure CN113366848B_ABST
Abstract
Description
[0001] Cross-references to related applications
[0002] In accordance with applicable patent law and / or the rules of the Paris Convention, this application aims to promptly claim international patent applications filed on February 2, 2019 (PCT / CN2019 / 074598), March 1, 2019 (PCT / CN2019 / 076695), March 4, 2019 (PCT / CN2019 / 076848), March 11, 2019 (PCT / CN2019 / 077725), March 21, 2019 (PCT / CN2019 / 079151), May 7, 2019 (PCT / CN2019 / 085862), May 23, 2019 (PCT / CN2019 / 088129), and June 18, 2019 (PCT / CN2019 / 088129). Priority and interests in the following international patent applications filed on July 28, 2019: PCT / CN2019 / 091691, PCT / CN2019 / 093552, PCT / CN2019 / 094957, PCT / CN2019 / 095297, PCT / CN2019 / 095504, PCT / CN2019 / 095656, PCT / CN2019 / 095913, and PCT / CN2019 / 096048. For all purposes under the law, the entire disclosure of the foregoing application is incorporated by reference as part of the disclosure of this application. Technical Field
[0003] This patent document relates to video encoding and decoding technologies, devices, and systems. Background Technology
[0004] Despite advancements in video compression, digital video still accounts for the largest share of bandwidth usage on the internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth demand for digital video is expected to continue to grow. Summary of the Invention
[0005] This document describes various embodiments and techniques for buffer management and block vector encoding / decoding in intra-frame block copy mode for decoding or encoding video or images.
[0006] In one example aspect, a method of video or image (visual data) processing is disclosed. The method includes determining a size of a buffer to store reference samples for prediction in an intra block copy mode; and performing a conversion between a current video block of visual media data and a bitstream representation of the current video block using the reference samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block in a same video region as the current video block and does not reference a reference picture.
[0007] In another example aspect, another method of visual data processing is disclosed. The method includes, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, determining a buffer to store reconstructed samples for prediction in an intra block copy mode, wherein the buffer is to store reconstructed samples before a loop filtering step; and performing the conversion using the reconstructed samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block in a same video region as the current video block and does not reference a reference picture.
[0008] In yet another example aspect, another method of visual data processing is disclosed. The method includes, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, determining a buffer to store reconstructed samples for prediction in an intra block copy mode, wherein the buffer is to store reconstructed samples after a loop filtering step; and performing the conversion using the reconstructed samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block in a same video region as the current video block and does not reference a reference picture.
[0009] In yet another example aspect, another method of video processing is disclosed. The method includes, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, determining a buffer to store reconstructed samples for prediction in an intra block copy mode, wherein the buffer is to store both reconstructed samples before a loop filtering step and reconstructed samples after the loop filtering step; and performing the conversion using the reconstructed samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block in a same video region as the current video block and does not reference a reference picture.
[0010] In another example aspect, another method of video processing is disclosed. The method includes storing, using a buffer, reference samples for prediction in an intra block copy mode, wherein a first bit depth of the buffer is different from a second bit depth used for representing visual media data in a bitstream representation; and performing, using the reference samples stored in the buffer, a conversion between a current video block of the visual media data and a bitstream representation of the current video block, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not refer to a reference picture.
[0011] In yet another example aspect, another method of video processing is disclosed. The method includes initializing a buffer to store reference samples for prediction in an intra block copy mode, wherein the buffer is initialized with a first value; and performing, using the reference samples stored in the buffer, a conversion between a current video block of the visual media data and a bitstream representation of the current video block, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not refer to a reference picture.
[0012] In yet another example aspect, another method of video processing is disclosed. The method includes initializing a buffer to store reference samples for prediction in an intra block copy mode, wherein the buffer is initialized with a first value; and performing, using the reference samples stored in the buffer, a conversion between a current video block of the visual media data and a bitstream representation of the current video block, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not refer to a reference picture.
[0013] In yet another example aspect, another method of video processing is disclosed. The method includes determining, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer storing reference samples for prediction in an intra block copy mode; performing the conversion using the reference samples stored in the buffer, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the current video block and does not refer to a reference picture; and for a pixel located at a position (x0, y0) in a spatial domain and having a block vector (BVx, BVy) included in the motion information, computing a corresponding reference (P mod M, Q mod N) in the buffer based on a reference position, wherein "mod" is a modulo operation and M and N are integers representing an x-dimension and a y-dimension of the buffer, wherein the reference position (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0).
[0014] In yet another example aspect, another method of video processing is disclosed. The method includes determining, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer storing reference samples for prediction in an intra block copy mode; performing the conversion using the reference samples stored in the buffer, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the current video block and does not refer to a reference picture; and for a pixel located at a position (x0, y0) in a spatial domain and having a block vector (BVx, BVy) included in the motion information, computing a corresponding reference in the buffer based on a reference position (P, Q), wherein the reference position (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0).
[0015] In yet another example aspect, another method of video processing is disclosed. The method includes determining, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer storing reference samples for prediction in an intra block copy mode, wherein pixel positions within the buffer are addressed using x-numbers and y-numbers; and performing the conversion using the reference samples stored in the buffer based on the x-numbers and the y-numbers, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the current video block and does not refer to a reference picture.
[0016] In yet another example aspect, another method of video processing is disclosed. The method includes determining, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer storing reference samples for prediction in an intra block copy mode, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the current video block and does not refer to a reference picture; calculating, for a pixel located at a position (x0, y0) of the current video block in a spatial domain and having a block vector (BVx, BVy), a corresponding reference at a reference position (P, Q) in the buffer, wherein the reference position (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0); and re-calculating the reference position using a sample in the buffer when it is determined that the reference position (P, Q) is located outside the buffer.
[0017] In yet another example aspect, another method of video processing is disclosed. The method includes determining, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer storing reference samples for prediction in an intra block copy mode, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the current video block and does not refer to a reference picture; calculating, for a pixel located at a position (x0, y0) of the current video block in a spatial domain and having a block vector (BVx, BVy), a corresponding reference at a reference position (P, Q) in the buffer, wherein the reference position (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0); and re-calculating the reference position using a sample in the buffer when it is determined that the reference position (P, Q) is located outside the buffer.
[0018] In yet another example aspect, another method of video processing is disclosed. The method includes determining, for a conversion between a current video block of a video and a bitstream representation of the current video block, a buffer storing reference samples for prediction in an intra block copy mode, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the current video block and does not refer to a reference picture; calculating, for a pixel at a position (x0, y0) relative to a top-left position of a coding tree unit including the current video block and having a block vector (BVx, BVy), a corresponding reference at a reference position (P, Q) in the buffer, wherein the reference position (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0); and padding the block vector (BVx, BVy) according to a block vector of a sample value within the buffer when it is determined that the block vector (BVx, BVy) is outside the buffer.
[0019] In yet another example aspect, another method of video processing is disclosed. The method includes resetting, during a conversion between a video and a bitstream representation of the video, a buffer storing reference samples for prediction in an intra block copy mode at a video boundary; and performing the conversion using the reference samples stored in the buffer, wherein a conversion of a video block of the video is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the video block and does not refer to a reference picture.
[0020] In yet another example aspect, another method of video processing is disclosed. The method includes performing a conversion between a current video block and a bitstream representation of the current video block; and updating a buffer for storing reference samples for prediction in an intra block copy mode, wherein the buffer is used for a conversion between a subsequent video block and a bitstream representation of the subsequent video block, wherein the conversion between the subsequent video block and the bitstream representation of the subsequent video block is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the subsequent video block and does not refer to a reference picture.
[0021] In yet another example aspect, another method of video processing is disclosed. The method includes determining, for a conversion between a current video block and a bitstream representation of the current video block, a buffer storing reconstructed samples for prediction in an intra block copy mode, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the current video block and does not refer to a reference picture; and applying a pre-processing operation to the reconstructed samples stored in the buffer in response to determining that the reconstructed samples stored in the buffer are to be used for prediction sample values during the conversion.
[0022] In yet another example aspect, another method of video processing is disclosed. The method includes selectively determining, for a conversion between a current video block of a current virtual pipeline data unit (VPDU) of a video region and a bitstream representation of the current video block, whether to use K1 previously processed VPDU's from even lines of the video region and / or K2 previously processed VPDU's from odd lines of the video region; and performing the conversion, wherein the conversion does not include using a remaining portion of the current VPDU, wherein the conversion is performed in an intra block copy mode, wherein the intra block copy mode is based on motion information related to reconstructed blocks in the same video region as the video block and does not reference reference pictures.
[0023] In yet another example aspect, a video encoder or decoder apparatus is disclosed, comprising a processor configured to implement a method described above.
[0024] In another example aspect, a computer readable program medium is disclosed. The medium stores code embodying processor-executable instructions for implementing one of the disclosed methods.
[0025] These and other aspects are described in more detail in the present document. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 An example of a current picture reference or intra block copy video or image coding technique is shown.
[0027] Figure 2 An example of a dynamic reference region is shown.
[0028] Figure 3 An example of coding of a block starting at (x, y) is shown.
[0029] Figure 4 An example of a possible alternative way of selecting previously coded 64x64 blocks is shown.
[0030] Figure 5 An example of a possible alternative way of changing the coding / decoding order of 64x64 blocks is shown.
[0031] Figure 6 A flowchart of an example method of video or image processing is shown.
[0032] Figure 7 A block diagram of a hardware platform for video or image coding or decoding is shown.
[0033] Figure 8 Another possible alternative way of selecting previously coded 64x64 blocks is shown when the decoding order of 64x64 blocks is from top to bottom, left to right.
[0034] Figure 9 Another possible alternative for selecting previously coded 64x64 blocks is shown.
[0035] Figure 10 An example flowchart of a decoding process with shaping is shown.
[0036] Figure 11 Another possible alternative for selecting previously coded 64x64 blocks is shown when the decoding order of 64x64 blocks is from left to right, top to bottom.
[0037] Figure 12 is an illustration of the IBC reference buffer state, where the blocks represent 64x64 CTUs.
[0038] Figure 13 One arrangement of reference regions for IBC is shown.
[0039] Figure 14 Another arrangement of reference regions for IBC is shown.
[0040] Figure 15 Another arrangement of reference regions for IBC is shown when the current Virtual Pipeline Data Unit (VPDU) is on the right side of the picture boundary.
[0041] Figure 16 An example of the state of the virtual buffer when the VPDU in a CTU row is decoded sequentially is shown.
[0042] Figure 17 is a block diagram of an example video processing system in which the disclosed technology can be implemented.
[0043] Figure 18 is a flowchart of an example method of visual data processing.
[0044] Figure 19 is a flowchart of an example method of visual data processing.
[0045] Figure 20 is a flowchart of an example method of visual data processing.
[0046] Figure 21 is a flowchart of an example method of visual data processing.
[0047] Figure 22 is a flowchart of an example method of visual data processing.
[0048] Figure 23 is a flowchart of an example method of visual data processing.
[0049] Figure 24 is a flowchart of an example method of visual data processing.
[0050] Figure 25 is a flowchart of an example method of visual data processing.
[0051] Figure 26 is a flowchart of an example method of visual data processing.
[0052] Figure 27 is a flowchart of an example method of visual data processing.
[0053] Figure 28 is a flowchart of an example method of visual data processing.
[0054] Figure 29 is a flowchart of an example method of visual data processing.
[0055] Figure 30 is a flowchart of an example method of visual data processing.
[0056] Figure 31 is a flowchart of an example method of visual data processing.
[0057] Figure 32 is a flowchart of an example method of visual data processing.
[0058] Figure 33 is a flowchart of an example method of visual data processing.
[0059] Figure 34 is a flowchart of an example method of visual data processing. DETAILED DESCRIPTION
[0060] For ease of understanding, section headings have been provided in this document and are not meant to limit the scope of the embodiments disclosed in each section to that section only. This document describes various embodiments and techniques for buffer management and block vector coding of intra block copy mode for decoding or encoding a video or image.
[0061] 1. SUMMARY
[0062] This patent document relates to video coding techniques. In particular, it relates to intra block copy in video coding. It can be applied to standards that are being developed, for example, Versatile Video Coding. It can also be applicable to future video coding standards or video codecs.
[0063] 2. BRIEF DISCUSSION
[0064] Video coding standards have evolved mainly through the development of the well-known ITU-T and ISO / IEC standards. ITU-T produced H.261 and H.263, ISO / IEC produced MPEG-1 and MPEG-4 Visual, and the two organizations jointly produced the H.262 / MPEG-2 Video and 264 / MPEG-4 Advanced Video Coding (AVC) standards and the H.265 / HEVC standard. Since H.262, the video coding standards are based on the hybrid video coding structure, where temporal prediction plus transform coding are utilized. To explore future video coding technologies beyond HEVC, the Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. Since then, many new methods have been adopted by the JVET and put into the reference software named Joint Exploration Test Model (JEM). In April 2018, the Joint Video Expert Team (JVET) between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) was established to work on VVC standard with the goal of 50% bitrate reduction compared to HEVC.
[0065] 2.1 Inter prediction in HEVC / H.265
[0066] Each inter prediction PU has motion parameters for one or two reference picture lists. The motion parameters include motion vectors and reference picture indices. The use of one of the two reference picture lists can also be signaled using inter_pred_idc. The motion vectors can be coded explicitly as a delta with respect to a predictor.
[0067] When a CU is coded in skip mode, one PU is associated with the CU and there are no significant residual coefficients, no coded motion vector delta or reference picture index. Merge mode is specified whereby the motion parameters of the current PU are derived from neighboring PUs including spatial and temporal candidates. Merge mode can be applied to any inter predicted PU, not only for skip mode. An alternative to Merge mode is explicit signaling of motion parameters, where the motion vector (more precisely, the motion vector difference (MVD) compared to the motion vector predictor), the corresponding reference picture index for each reference picture list and the reference picture list are signaled explicitly per PU. Such a mode is referred to as Advanced Motion Vector Prediction (AMVP) in this disclosure.
[0068] When the signaling indicates that one of the two reference picture lists is to be used, the PU is generated from one sample block. This is referred to as “uni-prediction”. Uni-prediction applies to both P slices and B slices.
[0069] When the signaling indicates that both reference picture lists are to be used, the PU is generated from two sample blocks. This is referred to as “bi-prediction”. Bi-prediction only applies to B slices.
[0070] Details on the inter prediction modes specified in HEVC are provided below. The description will start with Merge mode.
[0071] 2.2 Current Picture Reference
[0072] Current Picture Referencing (CPR), or once named Intra Block Copy (IBC), has been adopted in the HEVC Screen Content Coding extension (HEVC-SCC) and in the current VVC test model. IBC extends the concept of motion compensation from inter coding to intra coding. As Figure 1As shown, when CPR is applied, the current block is predicted by a reference block in the same picture. Before the current block is coded or decoded, the samples in the reference block must have already been reconstructed. Although CPR is not efficient for most camera captured sequences, it shows significant coding gain for screen content. The reason is that there are many repetitive patterns in screen content pictures, such as icons and text characters. CPR can effectively remove the redundancy among these repetitive patterns. In HEVC-SCC, if an inter-coded coding unit (CU) chooses the current picture as its reference picture, it can apply CPR. In this case, the MV is renamed as block vector (BV), and the BV always has integer pixel precision. To be compatible with the main profile HEVC, the current picture is marked as a "long-term" reference picture in the decoded picture buffer (DPB). It should be noted that similarly, in multi-view / 3D video coding standards, the inter-view reference pictures are also marked as "long-term" reference pictures.
[0073] After the BV finds its reference block, the prediction can be generated by copying the reference block. The residual can be obtained by subtracting the reference pixels from the original signaling. Then the transform and quantization can be applied as in other coding modes.
[0074] Figure 1 is an example illustration of current picture reference.
[0075] However, when the reference block is outside the picture, or overlaps with the current block, or outside the reconstructed area, or outside the valid area restricted by certain constraints, some or all of the pixel values are undefined. Basically, there are two solutions to solve such problems. One is not to allow such cases, for example, in bitstream conformance. The other is to apply padding to those undefined pixel values. The following sub-sections describe the solutions in detail.
[0076] 2.3 CPR in HEVC screen content coding extension
[0077] In the screen content coding extension of HEVC, when a block uses the current picture as reference, it should guarantee that the whole reference block is within the available reconstructed area, as indicated in the following specification text:
[0078] offsetX = ( ChromaArrayType == 0 )? 0 ( mvCLX[0] & 0x7? 2 : 0 ) (8-104)
[0079] offsetY = ( ChromaArrayType == 0 )? 0 : ( mvCLX[ 1 ] & 0x7? 2 : 0 ) (8-105)
[0080] One requirement for bitstream conformance is that the luma motion vector mvLX shall obey the following constraint when the reference picture is the current picture:
[0081] - When the derivation process of z-scan order block availability as specified in clause 6.4.1 is invoked with ( xCurr, yCurr ) set to ( xCb, yCb ) and the neighboring luma position ( xNbY, yNbY ) set to ( xPb + ( mvLX[ 0 ] » 2 ) - offsetX, yPb + ( mvLX[ 1 ] » 2 ) - offsetY ), the output shall be equal to TRUE.
[0082] - When the derivation process of z-scan order block availability as specified in clause 6.4.1 is invoked with ( xCurr, yCurr ) set to ( xCb, yCb ) and the neighboring luma position ( xNbY, yNbY ) set to ( xPb + ( mvLX[ 0 ] » 2 ) + nPbW - 1 + offsetX, yPb + ( mvLX[ 1 ] » 2 ) + nPbH - 1 + offsetY ), the output shall be equal to TRUE.
[0083] - One or both of the following conditions shall be true:
[0084] - The value of ( mvLX[ 0 ] » 2 ) + nPbW + xB1 + offsetX is less than or equal to 0.
[0085] - The value of ( mvLX[ 1 ] » 2 ) + nPbH + yB1 + offsetY is less than or equal to 0.
[0086] - The following condition shall be true:
[0087] ( xPb + ( mvLX[ 0 ] » 2 ) + nPbSw - 1 + offsetX ) / CtbSizeY - xCb / CtbSizeY <= yCb / CtbSizeY - ( yPb + ( mvLX[ 1 ] » 2 ) + nPbSh - 1 + offsetY ) / CtbSizeY (8-106)
[0088] Therefore, it will not happen that the reference block overlaps with the current block or the reference block is outside the picture. There is no need to pad the reference or predicted block.
[0089] 2.4 Example of CPR / IBC
[0090] In VVC test model, the whole reference block should have the current coding tree unit (CTU) and does not overlap with the current block. Therefore, padding the reference or prediction block is not needed.
[0091] When dual tree is enabled, the partition structure can be different from luma CTU to chroma CTU. Therefore, for 4:2:0 color format, one chroma block (e.g., CU) can correspond to one collocated luma region that has been divided into multiple luma CUs.
[0092] When the following conditions should be true, the chroma block can only be coded in CPR mode:
[0093] 1) Each luma CU within the collocated luma block should be coded in CPR mode
[0094] 2) Each of the BVs of the luma 4x4 block is first converted to a BV of the chroma block, and the BV of the chroma block is a valid BV.
[0095] If either of the two conditions is false, the chroma block should not be coded in CPR mode.
[0096] Note that the definition of “valid BV” has the following constraints:
[0097] 1) All samples within the reference block identified by the BV should be within the restricted search range (e.g., within the same CTU in the current VVC design).
[0098] 2) All samples within the reference block identified by the BV have been reconstructed.
[0099] 2.5 Example of CPR / IBC
[0100] In some examples, the reference region for CPR / IBC is limited to the current CTU, which is up to 128x128. The reference region is dynamically changed to reuse the memory to store the reference samples for CPR / IBC, so that the CPR / IBC block can have more reference candidates, while the reference buffer for CPR / IBC can remain or decrease from one CTU.
[0101] Figure 2 A method is shown, where the block is 64x64, and the CTU contains 4 64x64 blocks. When coding the 64x64 block, the previous 3 64x64 blocks can be used as reference. By doing so, the decoder only needs to store 4 64x64 blocks to support CPR / IBC.
[0102] Assume the current brightness CU is positioned (x, y) relative to the top-left corner of the image, and the block vector is (BVx, BVy). In the current design, whether BV is valid can be determined by the fact that the brightness position ((x+BVx)>>6<<6+(1<<7), (y+BVy)>>6<<6) has not yet been reconstructed and ((x+BVx)>>6<<6+(1<<7), (y+BVy)>>6<<6) is not equal to (x>>6<<6, y>>6<<6).
[0103] 2.6 In-loop Reshaping (ILR)
[0104] The basic idea of loop shaping (ILR) is to transform the original (first domain) signal (predicted / reconstructed signal) to the second domain (shaping domain).
[0105] The loop luminance shaper is implemented as a pair of look-up tables (LUTs), but only one of the two LUTs needs to be signaled, as the other LUT can be computed from the signaled LUT. Each LUT is a one-dimensional, 10-bit, 1024-entry mapping table (1D-LUT). One LUT is a forward LUT, FwdLUT, which takes the input luminance code value Y as input. i Mapped to the changed value Y r Y r =FwdLUT[Y i Another LUT is the inverse LUT, InvLUT, which modifies the code value Y. r Mapped to ( Y represents i (Reconstructed value).
[0106] 2.6.1 PWL Model
[0107] Conceptually, piecewise linear (PWL) is implemented in the following way:
[0108] Assume x1 and x2 are two input pivot points, and y1 and y2 are their corresponding output pivot points for a piece. The output value y for any input value x between x1 and x2 can be interpolated using the following equation:
[0109] y=((y2-y1) / (x2-x1))*(x-x1)+y1
[0110] In the fixed-point implementation, the equation can be rewritten as:
[0111] y=((m*x+2 FP_PREC-1) + c
[0112] where m is a scalar, c is an offset, and FP_PREC is a constant value specifying the precision.
[0113] In some examples, the PWL model is used to pre-compute 1024 entries for the FwdLUT and InvLUT mapping tables; however, the PWL model also allows for an implementation that computes the same mapping values on-the-fly without pre-computing the LUTs.
[0114] 2.6.2.1 Luma reshaping
[0115] A method of in-loop luma reshaping provides a lower complexity pipeline that also eliminates the decoding latency of block-wise intra prediction in inter slice reconstruction. Intra prediction is performed in the reshaping domain for both inter and intra slices.
[0116] Intra prediction is always performed in the reshaping domain, regardless of the slice type. With this arrangement, intra prediction can start immediately after the previous TU reconstruction is complete. Such an arrangement also provides a unified process for intra modes, rather than relying on the slice. Figure 10 A block diagram of the mode-based CE 12-2 decoding process is shown.
[0117] A 16-segment piecewise linear (PWL) model is tested for luma and chroma residual scaling, instead of a 32-segment PWL model.
[0118] Inter slice reconstruction with in-loop luma reshaper (light green shaded blocks indicate signaling in the reshaping domain: luma residual; intra luma prediction; and intra luma reconstruction).
[0119] 2.6.2.2 Luma-dependent chroma residual scaling
[0120] Luma-dependent chroma residual scaling is a multiplication process implemented with fixed-point integer arithmetic. Chroma residual scaling compensates for the interaction of the luma signal with the chroma signal. Chroma residual scaling is applied at the TU level. More specifically, the following applies:
[0121] - For intra, the reconstructed luma is averaged.
[0122] - For inter, the predicted luma is averaged.
[0123] The average is used to identify an index in the PWL model. This index identifies a scaling factor, cScaleInv. The chroma residual is multiplied by this number.
[0124] Note that the chroma scaling factor is computed from the predicted luma value, not the reconstructed luma value, of the forward mapping.
[0125] 2.6.2.3 Signaling of ILR side information
[0126] Parameters (current) are conveyed in slice group header (similar to ALF). These are claimed to require 40-100 bits.
[0127] In some examples, added syntax is highlighted in italics.
[0128] 7.3.2.1 Sequence parameter set RBSP syntax
[0129]
[0130] 7.3.3.1 In slice group header syntax
[0131]
[0132]
[0133] Add new syntax table slice reshaper model:
[0134]
[0135] In the general sequence parameter set RBSP semantics, add the following semantics:
[0136] Equal to 1 specifies that a reshaper is used in the coded video sequence (CVS). sps_reshaper_enabled_flag equal to 0 specifies that a reshaper is not used in the CVS.
[0137] In the slice group header syntax, add the following semantics Equal to 1 specifies that tile_group_reshaper_model() is present in the slice group header. tile_group_reshaper_model_present_flag equal to 0 specifies that tile_group_reshaper_model() is not present in the slice group header. When tile_group_reshaper_model_present_flag is not present, it is inferred to be equal to 0.
[0138] Equal to 1 specifies that a reshaper is enabled for the current slice group. tile_group_reshaper_enabled_flag equal to 0 specifies that a reshaper is not enabled for the current slice group. When tile_group_reshaper_enable_flag is not present, it is inferred to be equal to 0.
[0139] Equal to 1 specifies that chroma residual scaling is enabled for the current tile group. tile_group_reshaper_chroma_residual_scale_flag equal to 0 specifies that chroma residual scaling is not enabled for the current tile group. When tile_group_reshaper_chroma_residual_scale_flag is not present, it is inferred to be equal to 0. The tile_group_reshaper_model() syntax is added Specifies the minimum bin (or segment) index to be used in the reshaper construction process. The value of reshape_model_min_bin_idx shall be in the range of 0 to MaxBinIdx, inclusive. The value of MaxBinIdx shall be equal to 15.
[0140] Specifies the maximum allowed bin (or segment) index MaxBinIdx minus the maximum bin index to be used in the reshaper construction process. The value of reshape_model_max_bin_idx is set equal to MaxBinIdx - reshape_model_delta_max_bin_idx.
[0141] Add 1 specifies the number of bits used to represent the syntax reshape_model_bin_delta_abs_CW[i].
[0142] [i] specifies the absolute delta codeword value for the i-th bin. [i] specifies the sign of reshape_model_bin_delta_abs_CW[i] as follows:
[0143] - If reshape_model_bin_delta_sign_CW_flag[i] is equal to 0, the corresponding variable RspDeltaCW[i] is positive.
[0144] - Otherwise (reshape_model_bin_delta_sign_CW_flag[i] is not equal to 0), the corresponding variable RspDeltaCW[i] is negative.
[0145] When reshape_model_bin_delta_sign_CW_flag[ i ] is not present, it is inferred to be equal to 0. The variable RspDeltaCW[ i ] = ( 1 2 * reshape_model_bin_delta_sign_CW[ i ] ) * reshape_model_bin_delta_abs_CW[ i ];
[0146] The variable RspCW[ i ] is derived as follows:
[0147] The variable OrgCW is set equal to ( 1 « BitDepth Y ) / ( MaxBinIdx + 1 ).
[0148] - If reshaper_model_min_bin_idx <= i <= reshaper_model_max_bin_idx
[0149] RspCW[ i ] = OrgCW + RspDeltaCW[ i ].
[0150] - Otherwise, RspCW[ i ] = 0.
[0151] If the value of BitDepth Y , the value of RspCW[ i ] shall be in the range of 32 to 2 * OrgCW - 1.
[0152] The variable InputPivot[ i ] ( i in the range of 0 to MaxBinIdx + 1, inclusive ) is derived as follows
[0153] InputPivot[ i ] = i * OrgCW
[0154] The variable ReshapePivot[ i ] ( i in the range of 0 to MaxBinIdx + 1, inclusive ), the variable ScaleCoef[ i ] and InvScaleCoeff[ i ] ( i in the range of 0 to MaxBinIdx, inclusive ) are derived as follows:
[0155]
[0156] The variable ChromaScaleCoef[ i ] ( i in the range of 0 to MaxBinIdx, inclusive ) is derived as follows:
[0157] ChromaResidualScaleLut
[64] ={16384,16384,16384,16384,16384,16384,
[0158] 16384,8192,8192,8192,8192,5461,5461,5461,5461,4096,4096,4096,
[0159] 4096,3277,3277,3277,3277,2731,2731,2731,2731,2341,2341,2341,
[0160] 2048,2048,2048,1820,1820,1820,1638,1638,1638,1638,1489,1489,
[0161] 1489,1489,1365,1365,1365,1365,1260,1260,1260,1260,1170,1170,
[0162] 1170,1170,1092,1092,1092,1092,1024,1024,1024,1024};
[0163] shiftC = 11
[0164] –If (RspCW[i] == 0)
[0165] ChromaScaleCoef[i] = (1 < <shiftC)
[0166] Otherwise (RspCW[i] != 0), ChromaScaleCoef[i] =
[0167] ChromaResidualScaleLut[RspCW[i]>>1]
[0168] 2.6.2.4 Use of ILR
[0169] On the encoder side, each picture (or group of pictures) is first converted to the integer domain. All encoding and decoding processes are performed in the integer domain. For intra-frame prediction, neighboring blocks are in the integer domain; for inter-frame prediction, reference blocks (generated from the original domain from the decoded picture buffer) are first converted to the integer domain. The residuals are then generated and encoded / decoded into a bitstream.
[0170] After the whole picture (or slice group) is completely coded / decoded, the samples in the reshaped domain are converted to the original domain, then the deblocking filter and other filters are applied.
[0171] For the following cases, forward reshaping on the prediction signal is disabled:
[0172] The current block is intra coded
[0173] The current block is coded as CPR (Current Picture Reference, also known as Intra Block Copy, IBC)
[0174] The current block is coded as Combined Inter-Intra Mode (CIIP) and forward reshaping is disabled for the intra predicted block.
[0175] 3. Examples of problems solved by various embodiments
[0176] In the current design of CPR / IBC, there are some problems.
[0177] 1) The reference region changes dynamically, which makes the encoder / decoder processing complex.
[0178] 2) It is easy to generate invalid block vectors and difficult to check, which makes both the encoder and the decoder complex.
[0179] 3) Irregular reference region leads to inefficient coding of block vectors.
[0180] 4) It is unclear how to handle CTU sizes smaller than 128x128.
[0181] 5) In the determination process of whether the BV is valid or not, the decision is based on the availability of luma samples for chroma blocks, which can lead to wrong decisions due to the dual tree partition structure.
[0182] 4. Example embodiments
[0183] In some embodiments, a regular buffer can be used for CPR / IBC blocks to get the reference.
[0184] The function isRec(x, y) is defined to indicate whether the pixel (x, y) has been reconstructed and referenced by the IBC mode. isRec(x, y) returns false when (x, y) is out of picture, out of different slice / tile / brick; isRec(x, y) returns false when (x, y) is not reconstructed. In another example, when the sample (x, y) has been reconstructed but meets some other conditions, it can also be marked as unavailable, such as out of reference region / in different VPDU, and isRec(x, y) returns false.
[0185] The function isRec(c, x, y) is defined to indicate whether the sample (x, y) of component c is available. For example, if the sample (x, y) has not been reconstructed, it is marked as unavailable. In another example, the sample (x, y) can also be marked as unavailable when it has been reconstructed but meets some other conditions, such as out of picture / in different slice / tile / block / in different VPDU, out of allowed reference region. isRec(c, x, y) returns false when the sample (x, y) is unavailable, otherwise returns true.
[0186] In the following discussion, a reference sample can be a reconstructed sample. Note that a “pixel buffer” can be responsive to a “buffer of one color component” or a “buffer of multiple color components”.
[0187] Reference buffer for CPR / IBC
[0188] 1. It is proposed to use a M x N pixel buffer to store the luma reference samples for CPR / IBC.
[0189] a. In one example, the buffer size is 64 x 64.
[0190] b. In one example, the buffer size is 128 x 128.
[0191] c. In one example, the buffer size is 64 x 128.
[0192] d. In one example, the buffer size is 128 x 64.
[0193] e. In one example, N is equal to the height of a CTU.
[0194] f. In one example, N = nH, where H is the height of a CTU and n is a positive integer.
[0195] g. In one example, M is equal to the width of a CTU.
[0196] h. In one example, M = mW, where W is the width of a CTU and m is a positive integer.
[0197] i. In one example, the buffer size is not equal to the CTU size, such as 96 x 128 or 128 x 96.
[0198] j. In one example, the buffer size is equal to the CTU size.
[0199] k. In one example, M = mW and N = H, where W and H are the width and height of a CTU and m is a positive integer.
[0200] l. In one example, M = W and N = nH, where W and H are the width and height of the CTU, and n is a positive integer.
[0201] m. In one example, M = mW and N = nH, where W and H are the width and height of the CTU, and m and n are positive integers.
[0202] n. In the above examples, m and n can depend on the CTU size.
[0203] i. In one example, when the CTU size is 128x128, m = 1 and n = 1.
[0204] ii. In one example, when the CTU size is 64x64, m = 4 and n = 1.
[0205] iii. In one example, when the CTU size is 32x32, m = 16 and n = 1.
[0206] iv. In one example, when the CTU size is 16x16, m = 64 and n = 1.
[0207] o. Alternatively, the buffer size corresponds to the CTU size.
[0208] p. Alternatively, the buffer size corresponds to the Virtual Pipeline Data Unit (VPDU) size.
[0209] q. M and / or N can be signaled from the encoder to the decoder, such as in the VPS / SPS / PPS / picture header / tile group header / slice header.
[0210]
[0211] 2. In different profiles / levels / tiers defined in the standard, M and / or N can be different. It is proposed to use another McxNc pixel buffer to store the chroma reference samples for CPR / IBC.
[0212] a. In one example, for 4:2:0 video, Mc= M / 2 and Nc= N / 2
[0213] b. In one example, for 4:4:4 video, Mc= M and Nc= N
[0214] c. In one example, for 4:2:2 video, Mc= M and Nc= N / 2
[0215] d. Alternatively, Mcand Ncmay be independent of M and N.
[0216] e. In one example, the chroma buffer includes two channels, corresponding to Cb and Cr.
[0217] f. In one example, Mc = M and Nc = N.
[0218] 3. It is proposed to use a M x N sample buffer to store the RGB reference samples for CPR / IBC.
[0219] a. In one example, the buffer size is 64 x 64.
[0220] b. In one example, the buffer size is 128 x 128.
[0221] c. In one example, the buffer size is 64 x 128.
[0222] d. In one example, the buffer size is 128 x 64.
[0223] e. Alternatively, the buffer size corresponds to the CTU size.
[0224] f. Alternatively, the buffer size corresponds to the Virtual Pipeline Data Unit (VPDU) size.4. It is proposed that the buffer can store the reconstructed pixels before loop filtering. Loop filtering can refer to the Deblocking Filter, the Adaptive Loop Filter (ALF), the Sample Adaptive Offset (SAO), the Cross-Component ALF, or any other filter.
[0225] a. In one example, the buffer can store the samples in the current CTU.
[0226] b. In one example, the buffer can store the samples outside the current CTU.
[0227] c. In one example, the buffer can store the samples from any part of the current picture.
[0228] d. In one example, the buffer can store the samples from other pictures.
[0229] 5. It is proposed that the buffer can store the reconstructed pixels after loop filtering. Loop filtering can refer to the Deblocking Filter, the Adaptive Loop Filter (ALF), the Sample Adaptive Offset (SAO), the Cross-Component ALF, or any other filter.
[0230] a. In one example, the buffer can store the samples in the current CTU.
[0231] b. In one example, the buffer can store the samples outside the current CTU.
[0232] c. In one example, the buffer can store the samples from any part of the current picture.
[0233] d. In one example, the buffer can store samples from other pictures.
[0234] 6. It is proposed that the buffer can store both reconstructed samples before in-loop filtering and reconstructed samples after in-loop filtering. In-loop filtering can refer to deblocking filter, adaptive loop filter (ALF), sample adaptive offset (SAO), cross-component ALF, or any other filter.
[0235] a. In one example, the buffer can store both samples from the current picture and samples from other pictures, depending on the availability of these samples.
[0236] b. In one example, the reference samples from other pictures are from reconstructed samples after in-loop filtering.
[0237] c. In one example, the reference samples from other pictures are from reconstructed samples before in-loop filtering.
[0238] 7. It is proposed that the buffer stores samples with a given bit-depth, where the given bit-depth can be different from the bit-depth of the coded video data.
[0239] a. In one example, the bit-depth of the reconstructed buffer / coded video data is greater than the bit-depth of the IBC reference samples stored in the buffer.
[0240] b. In one example, the IBC reference samples are stored to be aligned with the input bit-depth, even when the internal bit-depth is different from the input bit-depth of the video sequence, such as (10-bit vs 8-bit).
[0241] c. In one example, the bit-depth is the same as the bit-depth of the reconstructed buffer.
[0242] d. In one example, the bit-depth is the same as the bit-depth of the input image / video.
[0243] e. In one example, the bit-depth is the same as a pre-defined number.
[0244] f. In one example, the bit-depth depends on the profile of the standard.
[0245] g. In one example, the bit-depth or the bit-depth difference compared to the output bit-depth / input bit-depth / internal bit-depth can be signaled in SPS / PPS / sequence header / picture header / slice header / tile group header / tile header or other kind of video data unit.
[0246]
[0247] h. The proposed methods can be applied together with the proposed buffer definitions mentioned in other items, alternatively, they can also be applied to the existing design of IBC.
[0248] i. The bit depth of each color component of the buffer can be different.
[0249] Buffer initialization
[0250] 8. It is proposed to initialize the buffer with a given value
[0251] a. In one example, the buffer is initialized with a given value.
[0252] i. In one example, the given value can depend on the input bit depth and / or the internal bit depth.
[0253] ii. In one example, the buffer is initialized with a mid-grey value (e.g. 128 for an 8-bit signal, or 512 for a 10-bit signal).
[0254] iii. In one example, when ILR is used, the buffer is initialized with forwardLUT(m). For example m = 1 « (Bitdepth - 1).
[0255] b. Alternatively, the buffer is initialized with a value signaled in the SPS / VPS / APS / PPS / sequence header / slice header /
[0256] CTU header / picture header / slice / CTU / coding unit / VPDU / region.
[0257] c. In one example, the given value can be derived from the samples of a previously decoded picture or slice or CTU row or CTU or CU.
[0258] d. The given value can be different for different color components.
[0259] 9. Alternatively, it is proposed to initialize the buffer with decoded pixels from a previously coded block.
[0260] a. In one example, the decoded pixels are those decoded pixels before loop filtering.
[0261] b. In one example, when the buffer size is a CTU, the buffer is initialized with decoded pixels of a previously decoded CTU, if available.
[0262] c. In one example, when the buffer size is 64x64, its buffer size is initialized with decoded pixels of a previously decoded 64x64 block, if available.
[0263] d. In addition, alternatively, the method in bullet 8 can be applied if no previously coded block is available.
[0264] Reference to the buffer
[0265] 10. For a block that uses pixels in the buffer as reference, it can use the location (x, y) within the buffer to indicate where to get the reference, where x = 0, 1, 2, …, M-1; y = 0, 1, 2, …, N-1.
[0266] 11. Alternatively, the reference location can be represented as l = y*M + x, l = 0, 1, …, M*N-1.
[0267] 12. Denote the top-left location of the block related to the current CTU as (x0, y0), the block vector (BVx, BVy) = (x-x0, y-y0) can be transmitted to the decoder to indicate where to get the reference in the buffer.
[0268] 13. Alternatively, the block vector (BVx, BVy) can be defined as (x-x0+Tx, y-y0+Ty), where Tx and Ty are predefined offsets.
[0269] 14. For any pixel (x0, y0) and (BVx, BVy), its reference in the buffer can be found at (x0+BVx, y0+BVy).
[0270] a. In one example, when (x0+BVx, y0+BVy) is outside the buffer, it will be clipped to the boundary.
[0271] b. Alternatively, when (x0+BVx, y0+BVy) is outside the buffer, its reference value is predefined to a given value, e.g., the middle gray level.
[0272] c. Alternatively, the reference location is defined as ((x0+BVx) mod M, (y0+BVy) mod N) so that it is always within the buffer.
[0273] 15. For any pixel (x0, y0) and (BVx, BVy), when (x0+BVx, y0+BVy)
[0274] is outside the buffer, its reference value can be derived from the value in the buffer.
[0275] a. In one example, the value is derived from the sample ((x0+BVx) mod M,
[0276] (y0+BVy) mod N) in the buffer.
[0277] b. In one example, the value is derived from the sample in the buffer ((x0+BVx) mod M, clip(y0+BVy, 0, N-1)).
[0278] c. In one example, the value is derived from the sample in the buffer (clip(x0+BVx, 0, M-1), (y0+BVy) mod N).
[0279] d. In one example, the value is derived from the sample in the buffer (clip(x0+BVx, 0, M-1), clip(y0+BVy, 0, N-1)).
[0280] 16. It can not allow certain coordinates outside the buffer range.
[0281] a. In one example, for any pixel (x0, y0) relative to the top-left corner of the CTU and block vector (BVx, BVy), the bitstream constraint is that y0+BVy should be in the range [0, …, N-1].
[0282] b. In one example, for any pixel (x0, y0) relative to the top-left corner of the CTU and block vector (BVx, BVy), the bitstream constraint is that x0+BVx should be in the range [0, …, M-1].
[0283] c. In one example, for any pixel (x0, y0) relative to the top-left corner of the CTU and block vector (BVx, BVy), the bitstream constraint is that y0+BVy should be in the range [0, …, N-1] and x0+BVx should be in the range [0, …, M-1].
[0284] 17. When a signaled or derived block vector of a block points somewhere outside the buffer, padding can be applied according to the buffer.
[0285] a. In one example, the value of any sample outside the buffer is defined with a pre-defined value.
[0286] i. In one example, the value can be 1 « (Bitdepth-1), e.g., 128 for 8-bit signal and 512 for 10-bit signal.
[0287] ii. In one example, when ILR is used, the value can be forwardLUT
[0288] (m). For example m = 1 « (Bitdepth-1).
[0289] iii. Alternatively, the indication of the pre-defined value can be in SPS / PPS / sequence header / picture header
[0290] The slice header / tile group / tile / CTU / CU level is signaled or indicated.
[0291] b. In one example, any sample outside the buffer is defined as the value of the nearest sample in the buffer.
[0292] 18. The method of handling out-of-buffer reference can be different in horizontal and vertical directions, or can be different depending on the location of the current block (e.g., whether it is closer to the picture boundary).
[0293] a. In one example, when y0+BVy is outside of [0, N-1], the sample value of (x0+BVx, y0+BVy) is assigned a pre-defined value.
[0294] b. In one example, when x0+BVx is outside of [0, M-1], the sample value of (x0+BVx, y0+BVy) is assigned a pre-defined value.
[0295] c. Alternatively, the sample value of (x0+BVx, y0+BVy) is assigned the sample value of ((x0+BVx) mod M, y0+BVy) if ((x0+BVx) mod M, y0+BVy)
[0296] is still outside the buffer, it can call other methods to further derive the value.
[0297] d. Alternatively, the sample value of (x0+BVx, y0+BVy) is assigned the sample value of (x0+BVx,
[0298] (y0+BVy) mod N) if (x0+BVx, (y0+BVy) mod N) is still outside the buffer, it can call other methods to further derive the value.
[0299] Block vector representation
[0300] 19. Each component or one of the components of the block vector (BVx, BVy) can be normalized to a certain range.
[0301] a. In one example, BVx can be replaced by (BVx mod M).
[0302] b. Alternatively, BVx can be replaced by ((BVx+X) mod M) - X, where X is a pre-defined value.
[0303] i. In one example, X is 64.
[0304] ii. In one example, X is M / 2;
[0305] iii. In one example, X is the horizontal coordinate of the block relative to the current CTU.
[0306] c. In one example, BVy can be replaced by (BVy mod N).
[0307] d. Alternatively, BVy can be replaced by ((BVy+Y) mod N) - Y, where Y is a predefined value.
[0308] i. In one example, Y is 64.
[0309] ii. In one example, Y is N / 2;
[0310] iii. In one example, Y is the vertical coordinate of the block relative to the current CTU.
[0311] 20. BVx and BVy can have different normalization ranges.
[0312] 21. Block vector difference (BVDx, BVDy) can be normalized to a specific range.
[0313] a. In one example, BVDx can be replaced by (BVDx mod M), where the function
[0314] mod returns the remainder.
[0315] b. Alternatively, BVDx can be replaced by ((BVDx+X) mod M) - X, where X is a predefined value.
[0316] i. In one example, X is 64.
[0317] ii. In one example, X is M / 2;
[0318] c. In one example, BVy can be replaced by (BVDy mod N).
[0319] d. Alternatively, BVy can be replaced by ((BVDy+Y) mod N) - Y, where Y is a predefined value.
[0320] i. In one example, Y is 64.
[0321] ii. In one example, Y is N / 2;
[0322] 22. BVDx and BVDy can have different normalization ranges.
[0323] Validity check of block vectors
[0324] Let the width and height of the IBC buffer be denoted as W buf and Hbuf For a WxH block (which can be a luma block, a chroma block, a CU, a TU, 4x4, 2x2 or other sub-block) starting at (X, Y) relative to the top-left corner of the picture, the following can apply to determine whether a block vector (BVx, BVy) is valid. Assume W pic and H pic are the width and height of the picture; and W ctu and H ctu are the width and height of the CTU. The function floor(x) returns the largest integer not greater than x. The function isRec(x, y) returns whether the sample (x, y) has been reconstructed.
[0325] 23. A block vector (BVx, BVy) can be set as valid even if any reference location is outside the picture boundary.
[0326] a. In one example, a block vector can be set as valid even if X + BVx < 0.
[0327] b. In one example, a block vector can be set as valid even if X + W + BVx > W pic , the block vector can be set as valid.
[0328] c. In one example, a block vector can be set as valid even if Y + BVy < 0.
[0329] d. In one example, a block vector can be set as valid even if Y + H + BVy > H pic , the block vector can be set as valid.
[0330] 24. A block vector (BVx, BVy) can be set as valid even if any reference location is outside the current CTU row.
[0331] a. In one example, a block vector can be set as valid even if Y + BVy < floor(Y / H ctu )*H ctu , the block vector can be set as valid.
[0332] b. In one example, a block vector can be set as valid even if Y + H + BVy >= floor(Y / H ctu )*H ctu + H ctu , the block vector can be set as valid.
[0333] 25. A block vector (BVx, BVy) can be set as valid even if any reference location is outside the current CTU and the left (n-1) CTUs, where n is the number of CTUs (including or excluding the current CTU) that can be used as reference region for IBC.
[0334] a. In one example, the block vector can be set valid even if X + BVx < floor(X / W ctu )*W ctu -(n-1)*W ctu , the block vector can also be set valid.
[0335] b. In one example, the block vector can be set valid even if X + W + BVx > floor(X / W ctu )*W ctu +W ctu , the block vector can also be set valid.
[0336] 26. The block vector (BVx, BVy) can be set valid even if the particular sample has not been reconstructed yet.
[0337] a. In one example, the block vector can be set valid even if isRec(X + BVx, Y + BVy) is false.
[0338] b. In one example, the block vector can be set valid even if isRec(X + BVx + W - 1, Y + BVy) is false.
[0339] c. In one example, the block vector can be set valid even if isRec(X + BVx, Y + BVy + H - 1) is false.
[0340] d. In one example, the block vector can be set valid even if isRec(X + BVx + W - 1, Y + BVy + H - 1) is false.
[0341] 27. The block vector (BVx, BVy) can always be set valid when the block is not the first CTU in the CTU row.
[0342] a. Alternatively, the block vector can always be set valid.
[0343] 28. The block vector (BVx, BVy) can always be set valid when all the following 3 conditions are met
[0344] • X + BVx >= 0
[0345] • Y + BVy >= floor(Y / H ctu )
[0346] • isRec(X + BVx + W - 1, Y + BVy + H - 1) == true
[0347] a. Alternatively, the block vector can always be set valid when all three conditions are met for the block of the first CTU in the CTU row.
[0348] 29. When the block vector (BVx, BVy) is valid, the sample copy of the block can be based on the block vector.
[0349] a. In one example, the prediction of sample (X, Y) can be according to ((X + BVx) % W buf ,
[0350] (Y + BVy) % H buf ).
[0351] Buffer update
[0352] 30. When a new picture or slice is coded, the buffer can be reset.
[0353] a. The term “reset” can mean that the buffer is initialized.
[0354] b. The term “reset” can mean that all samples / pixels in the buffer are set to a given value (e.g., 0 or -1).
[0355] 31. When the coding of a VPDU is completed, the buffer can be updated with the reconstructed values of the VPDU.
[0356] 32. When the coding of a CTU is completed, the buffer can be updated with the reconstructed values of the CTU.
[0357] a. In one example, when the buffer is not full, the buffer can be updated CTU by CTU sequentially.
[0358] b. In one example, when the buffer is full, the buffer area corresponding to the oldest CTU will be updated.
[0359] c. In one example, when M = mW and N = H (W and H are the CTU size; M and N are the buffer size) and the previously updated area starts from (kW, 0), the next starting position to be updated will be ((k+1)W mod M, 0).
[0360] 33. The buffer can be reset at the beginning of each CTU row.
[0361] a. Alternatively, the buffer can be reset when starting to decode each CTU.
[0362] b. Alternatively, the buffer can be reset when starting to decode one slice.
[0363] c. Alternatively, the buffer can be reset when starting to decode one slice group / picture.
[0364] 34. When the coding of a block starting from (x, y) is completed, the corresponding area of the buffer starting from (x, y) will be updated with the reconstruction according to the block.
[0365] a. In one example, (x, y) is a position relative to the top-left corner of the CTU.
[0366] 35. When coding of a block relative to a picture is complete, the corresponding region of the buffer is updated with the reconstruction of the block.
[0367] a. In one example, the value at position (x mod M, y mod N) in the buffer can be updated with the reconstructed pixel value at position (x, y) relative to the top-left corner of the picture.
[0368] b. In one example, the value at position (x mod M, y mod N) in the buffer can be updated with the reconstructed pixel value at position (x, y) relative to the top-left corner of the current slice.
[0369] c. In one example, the value at position (x mod M, y mod N) in the buffer can be updated with the reconstructed pixel value at position (x, y) relative to the top-left corner of the current CTU row.
[0370] d. In one example, the value in the buffer can be updated with the reconstructed pixel value after bit-depth alignment.
[0371] 36. When coding of a block starting at (x, y) is complete, the corresponding region of the buffer starting at (xb, yb) is updated with the reconstruction of the block, where (xb, yb) and (x, y)
[0372] are two different coordinates.
[0373] a. In one example, (x, y) is a position relative to the top-left corner of the CTU, and (xb, yb) is (x + update_x, y + update_y), where update_x and update_y point to an updatable position in the buffer.
[0374] 37. For the above example, the reconstructed value of the block can indicate the reconstructed value before application of a filter (e.g., a deblocking filter).
[0375] a. Alternatively, the reconstructed value of the block can indicate the reconstructed value after application of a filter (e.g., a deblocking filter).
[0376] 38. When a buffer is updated with a reconstructed sample, the reconstructed sample can first be modified before being stored, such as the sample bit-depth can be changed.
[0377] a. In one example, the buffer is updated with the reconstructed sample value after bit-depth alignment with the bit-depth of the buffer.
[0378] b. In one example, the buffer value is updated according to the value {p + [1 « (b - 1)]} » b, where p is the reconstructed sample value and b is a predefined bit shift value.
[0379] c. In one example, the buffer value is updated according to the value clip({p + [1 « (b - 1)]} » b, 0,
[0380] (1 « bitdepth) - 1), where p is the reconstructed sample value, b is a predefined bit shift value, and bitdepth is the buffer bit depth.
[0381] d. In one example, the buffer value is updated according to the value {p + [1 « (b - 1) - 1]} » b, where p is the reconstructed sample value and b is a predefined bit shift value.
[0382] e. In one example, the buffer value is updated according to the value clip({p + [1 « (b - 1) - 1]} » b, 0, (1 « bitdepth) - 1), where p is the reconstructed sample value, b is a predefined bit shift value, and bitdepth is the buffer bit depth.
[0383] f. In one example, the buffer value is updated according to the value p » b.
[0384] g. In one example, the buffer value is updated according to the value clip(p » b, 0, (1 « bitdepth)
[0385] - 1), where bitdepth is the buffer bit depth.
[0386] h. In the above examples, b can be the reconstruction bit depth minus the input sample bit depth.39. When using the buffer sample to form a prediction, a pre-processing can be applied.
[0387] a. In one example, the prediction value is p « b, where p is the sample value in the buffer and b is a predefined value.
[0388] b. In one example, the prediction value is clip(p « b, 0, 1 « bitdepth), where
[0389] bitdepth is the bit depth of the reconstructed sample.
[0390] c. In one example, the prediction value is (p « b) + (1 « (bitdepth - 1)), where p is the sample value in the buffer, b is a predefined value, and bitdepth is the bit depth of the reconstructed sample.
[0391] d. In the above example, b can be the reconstruction bit depth minus the input sample bit depth.
[0392] 40. The buffer can be updated in a given order.
[0393] a. In one example, the buffer can be updated sequentially.
[0394] b. In one example, the buffer can be updated according to the order of the reconstructed blocks.
[0395] 41. When the buffer is full, the samples in the buffer can be replaced with the latest reconstructed samples.
[0396] a. In one example, the samples can be updated in a first-in, first-out manner.
[0397] b. In one example, the oldest samples will be replaced.
[0398] c. In one example, the samples can be assigned a priority and replaced according to the priority.
[0399] d. In one example, the samples can be marked as “long-term” such that other samples will be replaced first.
[0400] e. In one example, a flag can be transmitted with the block to indicate high priority.
[0401] f. In one example, a number can be transmitted with the block to indicate priority.
[0402] g. In one example, samples from a reconstructed block with a certain characteristic will be assigned a higher priority such that other samples will be replaced first.
[0403] i. In one example, when the percentage of samples coded in IBC mode is greater than a threshold, all samples of the block can be assigned high priority.
[0404] ii. In one example, when the percentage of samples coded in Palette mode is greater than a threshold, all samples of the block can be assigned high priority.
[0405] iii. In one example, when the percentage of samples coded in IBC or Palette mode is greater than a threshold, all samples of the block can be assigned high priority.
[0406] iv. In one example, when the percentage of samples coded in Transform Skip mode is greater than a threshold, all samples of the block can be assigned high priority.
[0407] v. The threshold can be different according to block size, color component, CTU size.
[0408] vi. The threshold value can be signaled in SPS / PPS / sequence header / slice header / tile group / tile level / region.
[0409] h. In one example, the buffer being full can mean that the number of available samples in the buffer is equal to or greater than a given threshold value.
[0410] i. In one example, the buffer can be determined to be full when the number of available samples in the buffer is equal to or greater than 64x64x3 luma samples.
[0411] Optional buffer combination
[0412] 42. Instead of always using the three 64x64 blocks coded previously as reference regions, it is proposed to adaptively change it based on the position of the current block (or VPDU).
[0413] a. In one example, when a 64x64 block is coded / decoded, the previous 3 64x64 blocks can be used as reference. Compared to Figure 2 more kinds of combination of previous 64x64 blocks can be applied. Figure 2 Examples of different combinations of previous 64x64 blocks are shown.
[0414] 43. Instead of using z-scan order, instead a vertical scan order can be utilized.
[0415] a. In one example, when a block is divided into 4 VPDU with index 0...3 in z-scan order, the encoding / decoding order is 0, 2, 1, 3.
[0416] b. In one example, when a 64x64 block is coded / decoded, the previous 3 64x64 blocks can be used as reference. Compared to Figure 2 more kinds of encoding / decoding order of 64x64 blocks can be applied. Figure 4 Examples of different encoding / decoding order of 64x64 blocks are shown.
[0417] c. Alternatively, the above method can be applied only to screen content coding.
[0418] d. Alternatively, the above method can be applied only when CPR is enabled for a tile / tile group / picture.
[0419] e. Alternatively, the above method can be applied only when CPR is enabled for a CTU or a CTU row.
[0420] Virtual IBC buffer
[0421] Below, the width and height of a VPDU are denoted as W VPDU (e.g., 64) and H VPDU (e.g., 64). Alternatively, W VPDU and / or H VPDU may represent the width and / or height of other video units (e.g., CTUs).
[0422] 44. A virtual buffer can be maintained to keep track of IBC reference region status.
[0423] a. In one example, the size of the virtual buffer is mWVPDU x nHVPDU.
[0424] i. In one example, m is equal to 3 and n is equal to 2.
[0425] ii. In one example, m and / or n can depend on picture resolution, CTU size.
[0426] iii. In one example, m and / or n can be signaled or predefined.
[0427] b. In one example, the methods described in the above bullets and sub-bullets can be applied to the virtual buffer.
[0428] c. In one example, a sample (x, y) relative to the top-left corner of a picture / slice / tile / block can be mapped to (x%(mW VPDU ), y%(nH VPDU )).
[0429] 45. An array can be used to track the availability of each sample associated with the virtual buffer.
[0430] a. In one example, a flag can be associated with a sample in the virtual buffer to specify whether the sample in the buffer can be used as an IBC reference.
[0431] b. In one example, each 4x4 block containing luma samples and chroma samples can share a flag to indicate whether any sample associated with the block can be used as an IBC reference.
[0432] 46. After a VPDU or video unit is finished being decoded, certain samples associated with the virtual buffer can be marked as unavailable for IBC reference.
[0433] a. In one example, which samples can be marked as unavailable depends on the location of the most recently decoded VPDU.
[0434] b. When a sample is marked as unavailable, prediction from that sample is not allowed.
[0435] i. Alternatively, other ways (e.g., using default values) can be further applied to derive the prediction value to replace the unavailable samples.
[0436]
[0437] 47. The position of the most recently decoded VPDU can be recorded to help identify which samples associated with the virtual buffer can be marked as unavailable.
[0438] a. In one example, upon starting the decoding of a VPDU, certain samples associated with the virtual buffer can be marked as unavailable according to the position of the most recently decoded VPDU.
[0439] i. In one example, (xPrevVPDU, yPrevVPDU) is expressed as the top-left position relative to the top-left corner of the picture / tile / slice / block / other video processing unit of the most recently decoded VPDU, if yPrevVPDU % (nHVPDU) is equal to 0, then the certain position (x, y) can be marked as unavailable.
[0440]
[0441] 1. In one example, x can be in a range such as [xPrevVPDU - 2WVPDU + 2mWVPDU) % mWVPDU, ((xPrevVPDU - 2WVPDU + 2mWVPDU) % mWVPDU) - 1 + WVPDU];
[0442] 2. In one example, y can be in a range such as [yPrevVPDU % (nHVPDU), (yPrevVPDU % (nHVPDU)) - 1 + HVPDU];
[0443] 3. In one example, x can be in a range such as [xPrevVPDU - 2WVPDU + 2mWVPDU) % mWVPDU, ((xPrevVPDU - 2WVPDU + 2mWVPDU) % mWVPDU) - 1 + WVPDU], and y can be in a range such as [yPrevVPDU % (nHVPDU),
[0444] (yPrevVPDU % (nHVPDU)) - 1 + HVPDU].
[0445] ii. In one example, (xPrevVPDU, yPrevVPDU) is expressed as the top-left position relative to the top-left corner of the picture / tile / slice / block / other video processing unit of the most recently decoded VPDU, if yPrevVPDU % (nHVPDU) is equal to 0, then the certain position (x, y) can be marked as unavailable.
[0446] (nHVPDU) is not equal to 0, then the particular position (x, y) can be marked as unavailable.
[0447] 1. In one example, x can be in a range such as [xPrevVPDU - WVPDU + 2mWVPDU) % mWVPDU, ((xPrevVPDU - WVPDU + 2mWVPDU) % mWVPDU) - 1 + WVPDU];
[0448] 2. In one example, y can be in a range such as [yPrevVPDU % (nHVPDU), (yPrevVPDU % (nHVPDU)) - 1 + HVPDU];
[0449] 3. In one example, x can be in a range such as [xPrevVPDU - WVPDU + 2mWVPDU) % mWVPDU, ((xPrevVPDU - WVPDU + 2mWVPDU) % mWVPDU) - 1 + WVPDU], and y can be in a range such as [yPrevVPDU % (nHVPDU),
[0450] (yPrevVPDU % (nHVPDU)) - 1 + HVPDU].
[0451] (yPrevVPDU % (nHVPDU)) - 1 + HVPDU].
[0452] 48. When a CU contains multiple VPDU, instead of applying the IBC reference availability marking process according to VPDU, the IBC reference availability marking process can be applied according to the CU.
[0453] a. In one example, upon starting the decoding of a CU containing multiple VPDU, the IBC reference availability marking process can be applied to each VPDU before the VPDU within the CU is decoded.
[0454] b. In this case, 128x64 and 64x128 IBC blocks can not be allowed.
[0455] i. In one example, pred_mode_ibc_flag for 128x64 and 64x128 CUs can not be transmitted and can be inferred to be equal to 0.
[0456] 49. For a reference block or sub-block, the top-right corner reference availability status can not need to be checked to determine whether the block vector associated with the reference block is valid.
[0457] a. In one example, only the top-left, bottom-left and bottom-right corners of the block / sub-block will be checked to determine whether the block vector is valid.
[0458] 50. The IBC buffer size can depend on the VPDU size (where width / height is denoted by vSize) and / or the CTB / CTU size (where width / height is denoted by ctbSize).
[0459] a. In one example, the height of the buffer can be equal to ctbSize.
[0460] b. In one example, the width of the buffer can depend on min(ctbSize, 64).
[0461] i. In one example, the width of the buffer can be (128*128 / vSize, min(ctbSize, 64)).
[0462] 51. The IBC buffer can contain values outside the range of pixels, which indicates that the location can not be available for IBC reference, e.g., not used to predict other samples.
[0463] a. The sample value can be set to a value that indicates that the sample is not available.
[0464] b. In one example, the value can be -1.
[0465] c. In one example, the value can be any value outside of [0, 1 « (internal_bit_depth) - 1], where internal_bit_depth is a positive integer value. For example, internal_bit_depth is the internal bit depth used to encode / decode samples of a color component.
[0466] d. In one example, the value can be any value outside of [0, 1 « (input_bit_depth) - 1], where input_bit_depth is a positive integer value. For example, input_bit_depth is the input bit depth used to encode / decode samples of a color component.
[0467] 52. The availability flag for a sample in the IBC buffer can depend on the location of the current block, the size of the current block, the CTU / CTB size, and the VPDU size. In one example, assume (xCb, yCb) denotes the location of the block relative to the top-left corner of the picture; ctbSize is the size (i.e., width and / or height) of the CTU / CTB; vSize = min(ctbSize, 64); wIbcBuf and hIbcBuf are the IBC buffer width and height.
[0468] a. In one example, if (xCb % vSize) is equal to 0 and (yCb % vSize) is equal to 0, a particular set of positions in the IBC buffer can be marked as unavailable.
[0469] b. In one example, when the current block size is smaller than the VPDU size, i.e., min(ctbSize,
[0470] 64), the region marked as unavailable can be according to the VPDU size.
[0471] c. In one example, when the current block size is larger than the VPDU size, i.e., min(ctbSize,
[0472] 64), the region marked as unavailable can be according to the CU size.
[0473] 53. When starting to decode a video unit (e.g., VPDU(xV, yV)) relative to the top-left position of a picture, the corresponding positions in the IBC buffer can be set to a value outside the pixel range.
[0474] a. In one example, the buffer samples in the buffer at positions (x % wIbcBuf, y % hIbcBuf), where x = xV, …, xV + ctbSize - 1 and y
[0475] = yV, …, yV + ctbSize - 1. Where wIbcBuf and hIbcBuf are the IBC buffer width and height, and ctbSize is the width of the CTU / CTB.
[0476] i. In one example, hIbcBuf can be equal to ctbSize.
[0477] 54. Bitstream conformance constraints can be according to the values of the samples in the IBC buffer.
[0478] a. In one example, if the reference block associated with the block vector in the IBC buffer contains a value outside the pixel range, the bitstream can be illegal.
[0479] 55. Bitstream conformance constraints can be set according to the availability indication in the IBC buffer.
[0480] a. In one example, if any of the reference samples mapped in the IBC buffer are marked as unavailable for encoding / decoding the block, the bitstream can be illegal.
[0481] b. In one example, when using single tree, if any luma reference samples mapped in the IBC buffer for encoding / decoding the block are marked as unavailable, the bitstream can be illegal.
[0482] c. A conformant bitstream can satisfy that for an IBC coded block, the associated block vector can point to a reference block mapped in the IBC buffer, and each luma reference sample located in the IBC buffer for encoding / decoding the block should be marked as available (e.g., the value of the sample is within the range [K0, K1], where e.g., K0 is set to 0 and K1 is set to (1 « BitDepth - 1), where BitDepth is the internal bit depth or the input bit depth).
[0483] 56. The bitstream conformance constraint can depend on the coding tree type and the treeType of the current CU.
[0484] a. In one example, if dual tree is allowed in a high level (e.g., slice / picture / tile / block / tile) and the current video block (e.g., CU / PU / CB / PB) is coded with single tree, the bitstream constraint can require checking whether the locations of all components mapped in the IBC buffer are marked as unavailable.
[0485] b. In one example, if dual tree is allowed in a high level (e.g., slice / picture / tile / block / tile) and the current luma video block (e.g., CU / PU / CB / PB) is coded with dual tree, the bitstream constraint can ignore whether the locations of chroma components mapped in the IBC buffer are marked as unavailable.
[0486] i. Alternatively, in this case, the bitstream constraint can still check whether the locations of all components mapped in the IBC buffer are marked as unavailable.c. In one example, if single tree is used, the bitstream constraint can ignore whether the locations of chroma components mapped in the IBC buffer are marked as unavailable.
[0487] Improvements to the current VTM design
[0488] 57. The prediction for IBC can have lower precision than the reconstruction.
[0489] a. In one example, the prediction value is according to the value clip{{p + [1 « (b - 1)]} » b, 0,
[0490] (1 « bitdepth) - 1} « b, where p is the reconstructed sample value, b is a pre-defined bit-shift value, and bitdepth is the prediction sample bit depth.
[0491] b. In one example, the predicted value is according to the value clip{{p + [1 « (b - 1) - 1]} » b, 0,
[0492] (1 « bitdepth) - 1} « b, where p is the reconstructed sample value, b is a pre-defined bit-shift value.
[0493] c. In one example, the predicted value is according to the value ((p » b) + (1 « (bitdepth - 1))) « b, where
[0494] bitdepth is the bitdepth of the prediction sample.
[0495] d. In one example, the predicted value is according to the value (clip((p » b), 0, (1 « (bitdepth-
[0496] b)) + (1 « (bitdepth - 1))) « b, where bitdepth is the bitdepth of the prediction sample.
[0497] e. In one example, the predicted value is clipped differently depending on whether ILR is applied or not.
[0498] f. In the above examples, b can be the reconstruction bitdepth minus the input sample bitdepth.
[0499] g. In one example, the bitdepth or the bitdepth difference compared to the output bitdepth / input bitdepth / interior bitdepth can be signaled in SPS / PPS / sequence header / picture header / slice header / tile group header / tile header or other kind of video data unit.
[0500] h. In one example, the bitdepth or the bitdepth difference compared to the output bitdepth / input bitdepth / interior bitdepth can be signaled in SPS / PPS / sequence header / picture header / slice header / tile group header / tile header or other kind of video data unit.
[0501] 58. A part of the prediction of IBC can have lower precision and another part has the same precision as the reconstruction.
[0502] a. In one example, the allowed reference region can contain samples with different precision (e.g. bitdepth).
[0503] b. In one example, the reference from other 64x64 blocks than the current 64x64 block being decoded has lower precision and the reference from the current 64x64 block has the same precision as the reconstruction.
[0504] c. In one example, the reference from other CTUs than the current CTU being decoded has lower precision and the reference from the current CTU has the same precision as the reconstruction.
[0505] d. In one example, a reference from a particular set of color components has low precision, while a reference from other color components has the same precision as the reconstruction.
[0506] 59. When the CTU size is M×M and the reference area size is nM×nM, the reference area is the nearest available n×n CTU in the CTU row.
[0507] a. In one example, when the reference area size is 128×128 and the CTU size is 64×64, the four most recent available CTUs in the CTU row can be used for IBC reference.
[0508] b. In one example, when the reference area size is 128×128 and the CTU size is 32×32, the 16 most recent available CTUs in the CTU row can be used for IBC reference.
[0509] 60. When the CTU size is M and the reference area size is nM, the reference area is the CTU row /
[0510] The most recently available n-1 CTUs in the film.
[0511] a. In one example, when the reference area size is 128×128 or 256×64 and the CTU size is 64×64, the three most recent available CTUs in the CTU row can be used for IBC reference.
[0512] b. In one example, when the reference area size is 128×128 or 512×32 and the CTU size is 32×32, the 15 most recent available CTUs in the CTU row can be used for IBC reference.
[0513] 61. When the CTU size is M, the VPDU size is kM, and the reference area size is nM, the reference area is the nearest nk available CTUs in the CTU row / slice.
[0514] a. In one example, the CTU size is 64×64, the VPDU size is also 64×64, the reference area size is 128×128, and the three nearest CTUs in the CTU row can be used for IBC reference values.
[0515] b. In one example, the CTU size is 32×32, the VPDU size is also 64×64, the reference area size is 128×128, and the nearest (16-4) = 12 CTUs in the CTU row can be used for IBC reference.
[0516] 62. For a w x h block with top-left corner (x, y) using IBC, there are constraints to move the reference block away from a certain region for memory reuse, where w and h are the width and height of the current block.
[0517] a. In one example, when the CTU size is 128 x 128 and (x, y) = (m x 64, n x 64), the reference block cannot overlap with the 64 x 64 region starting from ((m - 2) x 64, n x 64).
[0518] b. In one example, when the CTU size is 128 x 128, the reference block cannot overlap with the w x h block with top-left corner (x - 128, y).
[0519] c. In one example, when the CTU size is 128 x 128, (x + BVx, y + BVy) cannot be within the w x h block with top-left corner (x - 128, y), where BVx and BVy represent the block vector of the current block.
[0520] d. In one example, when the CTU size is M x M and the IBC buffer size is k x M x M, the reference block cannot overlap with the w x h block with top-left corner (x - k x M, y), where BVx and BVy represent the block vector of the current block.
[0521] e. In one example, when the CTU size is M x M and the IBC buffer size is k x M x M, (x + BVx, y + BVy) cannot be within the w x h block with top-left corner (x - k x M, y), where BVx and BVy represent the block vector of the current block.
[0522] 63. When the CTU size is not M x M and the reference region size is nM x nM, the reference region is the nearest available (n x n - 1) CTUs in the CTU row.
[0523] a. In one example, when the reference region size is 128 x 128 and the CTU size is 64 x 64, the nearest available 3 CTUs in the CTU row can be used for IBC reference.
[0524] b. In one example, when the reference region size is 128 x 128 and the CTU size is 32 x 32, the nearest available 15 CTUs in the CTU row can be used for IBC reference.
[0525] 64. For a CU within a 64×64 block starting from (2m*64, 2n*64) (i.e., the top-left 64×64 block in a 128×128 CTU), its IBC prediction can be based on the reconstructed samples in the 64×64 block starting from ((2m-2)*64, 2n*64), the 64×64 block starting from ((2m-1)*64, 2n*64), the 64×64 block starting from ((2m-1)*64, (2n+1)*64) and the current 64×64 block.
[0526] 65. For a CU within a 64×64 block (i.e., the bottom right 64×64 block in a 128×128 CTU) starting from ((2m+1)*64, (2n+1)*64), its IBC prediction can be based on the current 128×128 CTU.
[0527] 66. For a CU within a 64×64 block (i.e., the top-right 64×64 block in a 128×128 CTU) starting from ((2m+1)*64, 2n*64), its IBC prediction can be based on ((2m-1)*64, 2n*64).
[0528] The 64×64 blocks starting from ((2m-1)*64, (2n+1)*64), the 64×64 blocks starting from (2m*64, 2n*64), and the reconstructed samples in the current 64×64 block.
[0529] a. Alternatively, if the 64×64 block starting from (2m*64, (2n+1)*64) has been reconstructed, then the IBC prediction can be based on the 64×64 block starting from ((2m-1)*64, 2n*64), the 64×64 block starting from (2m*64, 2n*64), and the 64×64 block starting from (2m*64, 2n*64).
[0530] The reconstructed samples in the 64×64 block starting from (2n+1)*64) and the current 64×64 block.
[0531] 67. For a CU within a 64×64 block (i.e., the bottom-left 64×64 block in a 128×128 CTU) starting from (2m*64, (2n+1)*64), its IBC prediction can be based on ((2m-1)*64).
[0532] The 64×64 blocks starting from (2n+1)*64), the 64×64 blocks starting from (2m*64, 2n*64), the 64×64 blocks starting from ((2m+1)*64, 2n*64), and the reconstructed samples in the current 64×64 block.
[0533] a. Alternatively, if the 64x64 block starting at ((2m+1)*64, 2n*64) has not been reconstructed, the IBC prediction can be based on reconstructed samples in the 64x64 block starting at ((2m-1)*64, 2n*64), the 64x64 block starting at ((2m-1)*64, (2n+1)*64), the 64x64 block starting at (2m*64, 2n*64), and the current 64x64 block.
[0534] 68. Propose to adjust the reference region based on which 64x64 blocks the current CU belongs to.
[0535] a. In one example, for a CU starting at (x, y), when (y >> 6) & 1 == 0, the two or up to two previous 64x64 blocks starting at ((x >> 6 << 6) - 128, y >> 6 << 6) and ((x >> 6 << 6) - 64, y >> 6 << 6)
[0536] may be referenced by the IBC mode.
[0537] b. In one example, for a CU starting at (x, y), when (y >> 6) & 1 == 1, the one previous 64x64 block starting at ((x >> 6 << 6) - 64, y >> 6 << 6) can be referenced by the IBC mode.
[0538] 69. For a block starting at (x, y) and having a block vector (BVx, BVy), if isRec(((x + BVx) >> 6 << 6) + 128 - (((y + BVy) >> 6) & 1) * 64 + (x % 64),
[0539] ((y + BVy) >> 6 << 6) + (y % 64)) is true, then the block vector is invalid.
[0540] a. In one example, the block is a luma block.
[0541] b. In one example, the block is a chroma block in 4:4:4 format.
[0542] c. In one example, the block contains both luma and chroma components.
[0543] 70. For a chroma block in 4:2:0 format starting at (x, y) and having a block vector (BVx, BVy), if isRec(((x + BVx) >> 5 << 5) + 64 - (((y + BVy) >> 5) & 1) * 32 + (x % 32),
[0544] 71. The determination of whether a block of component c is invalid for a BV can rely on the availability of samples of component X, rather than just checking luma samples.
[0545] a. For a block of component c starting at (x, y) and having a block vector (BVx, BVy), the block vector can be considered invalid if isRec(c, ((x + BVx) » 6 « 6) + 128 - (((y + BVy) » 6) & 1) * 64 + (x % 64), ((y + BVy) » 6 « 6) + (y % 64)) is true.
[0546] i. In one example, the block is a luma block (e.g., c is the luma component, or for RGB coding is the G component).
[0547] ii. In one example, the block is a chroma block in 4:4:4 format (e.g., c is the cb or cr component, or for RGB coding is the B / R component).
[0548] iii. In one example, the availability of samples of both luma and chroma components can be checked, e.g., the block contains both luma and chroma components.
[0549] b. For a chroma block in 4:2:0 format starting at (x, y) of component c and having a block vector (BVx, BVy), the block vector can be considered invalid if isRec(c, ((x + BVx) » 5 « 5) + 64 - (((y + BVy) » 5) & 1) * 32 + (x % 32), ((y + BVy) » 5 « 5) + (y % 32)) is true.
[0550] c. For a chroma block or sub-block starting at (x, y) of component c and having a block vector (BVx, BVy), the block vector can be considered invalid if isRec(c, x + BVx + Chroma_CTU_size, y) is true for the chroma component, where Chroma_CTU_size is the CTU size of the chroma component.
[0551] i. In one example, Chroma_CTU_size can be 64 for 4:2:0 format.
[0552] ii. In one example, a chroma sub-block can be a 2x2 block in 4:2:0 format.
[0553] iii. In one example, a chroma sub-block can be a 4x4 block in 4:4:4 format.
[0554] iv. In one example, a chroma sub-block can correspond to the minimum CU size in the luma component.
[0555] 1. Alternatively, a chroma sub-block can correspond to the minimum CU size of the chroma component.
[0556] 72. For all the bullets mentioned above, it is assumed that the reference buffer contains multiple MxM blocks (M=64). However, it can be extended to other cases, such as the reference buffer contains multiple NxM blocks (e.g., N=128, M=64).
[0557] 73. For all the bullets mentioned above, a further restriction can be applied, i.e., the reference buffer should be within the same tile / slice / slice group / tile group as the current block.
[0558] a. In one example, if a part of the reference buffer is outside the current tile / slice / slice group / tile group, the usage of IBC can be disabled. The signaling of IBC related syntax elements can be skipped.
[0559] b. Alternatively, if a part of the reference buffer is outside the current tile / slice / slice group / tile group, IBC can still be enabled for one block, however, the block vector associated with one block can only point to the remaining reference buffer.
[0560] 74. It is proposed to use the K1 most recently coded VPDUs (if available) in the first VPDU row of a CTU / CTB row and the K2 most recently coded VPDUs (if available) in the second VPDU row of a CTU / CTB row as the reference region for IBC, excluding the current VPDU.
[0561] a. In one example, K1 is equal to 2 and K2 is equal to 1.
[0562] b. In one example, the above method can be applied when the CTU / CTB size is 128x128 and the VPDU size is 64x64.
[0563] c. In one example, the above method can be applied when the CTU / CTB size is 64x64 and the VPDU size is 64x64 and / or 32x32.
[0564] d. In one example, the above method can be applied when the CTU / CTB size is 32x32 and the VPDU size is 32x32 or smaller.
[0565] 75. The above method can be applied in different stages.
[0566] a. In one example, the modulo operation (e.g., a mod b) of a block vector (BV) can be invoked in
[0567] the availability check procedure of the BV to decide whether the BV is valid.
[0568] b. In one example, a modulo operation (e.g., a mod b) of a block vector (BV) can be invoked to identify a location of a reference sample in the IBC virtual buffer or the reconstructed picture buffer (e.g., prior to the in-loop filtering process) (e.g., based on a location of the current sample and the modulo result of the BV).
[0569] 5. Embodiments
[0570] 5.1 Embodiment #1
[0571] An implementation of the buffer for IBC is described as follows:
[0572] The buffer size is 128x128. The CTU size is also 128x128. For the coding of the first CTU in a CTU row, the buffer is initialized with 128 (for 8-bit video signaling). For the coding of the k-th CTU in a CTU row, the buffer is initialized with the reconstruction before in-loop filtering of the (k-1)-th CTU.
[0573] Figure 3 An example of coding a block starting from (x, y) is shown.
[0574] When coding a block starting from (x, y) related to the current CTU, a block vector (BVx, BVy) = (x-x0, y-y0) is signaled to the decoder to indicate that the reference block comes from (x0, y0) in the IBC buffer. Assume the width and height of the block are w and h, respectively. When the coding of the block is finished, the w x h region starting from (x, y) in the IBC buffer will be updated with the reconstruction of the block before in-loop filtering.
[0575] 5.2 Embodiment #2
[0576] Figure 4 An example of a possible alternative way of selecting the previously coded 64x64 block is shown.
[0577] 5.3 Embodiment #3
[0578] Figure 5 An example of a possible alternative way of changing the coding / decoding order of the 64x64 blocks is shown.
[0579] 5.4 Embodiment #4
[0580] Figure 8 Another possible alternative way of selecting the previously coded 64x64 block is shown when the decoding order of the 64x64 blocks is from top to bottom, left to right.
[0581] 5.5 Embodiment #5
[0582] Figure 9 Another possible alternative to select previously coded 64x64 blocks is shown.
[0583] 5.6 Embodiment #6
[0584] Figure 11 Another possible alternative to select previously coded 64x64 blocks is shown when the decoding order of the 64x64 blocks is from left to right, from top to bottom.
[0585] 5.7 Embodiment #7
[0586] An implementation of the IBC buffer at the decoder with size mMxW and bit depth B, assuming a CTU size of WxW, is as follows.
[0587] At the beginning of the decoding of a CTU row, the buffer is initialized with the value (1 « (B - 1)), and the starting point to be updated (xb, yb) is set to (0, 0).
[0588] When a CU of size wxh starting at (x, y) related to the top-left corner of the CTU is decoded, the region of size wxh starting at (xb+x, yb+y) is updated with the reconstructed pixel values of the CU after bit depth alignment with B bits.
[0589] After the CTU is decoded, the starting point to be updated (xb, yb) is set to ((xb+W) mod mW, 0).
[0590] When an IBC CU with block vector (BVx, BVy) is decoded, for any pixel (x, y) related to the top-left corner of the CTU, its prediction is fetched from the buffer at position ((x+BVx) mod mW, (y+BVy) mod W) after bit depth alignment with the bit depth of the prediction signal.
[0591] In one example, B is set to 7 or 8, while the output / input bit depth of the block can be equal to 10.
[0592] 5.8 Embodiment #8
[0593] For a luma CU or joint luma / chroma CU starting at (x, y) related to the top-left corner of the picture and block vector (BVx, BVy), the block vector is invalid when isRec(((x+BVx) » 6 « 6) + 128 - (((y+BVy) » 6) & 1) * 64 + (x % 64), ((y+BVy) » 6 « 6) + (y % 64)) is true.
[0594] For a chroma CU starting at (x, y) relative to the top-left corner of the picture and a block vector (BVx, BVy), the block vector is invalid when isRec(((x + BVx) » 5 « 5) + 64 - (((y + BVy) » 5) & 1) * 32 + (x % 32), ((y + BVy) » 5 « 5) + (y % 32)) is true.
[0595] 5.9 Embodiment #9
[0596] For a chroma block or sub-block starting at (x, y) relative to the top-left corner of the picture in 4:2:0 format and a block vector (BVx, BVy), the block vector is invalid when isRec(c, (x + BVx + 64, y + BVy) is true, where c is the chroma component.
[0597] For a chroma block or sub-block starting at (x, y) relative to the top-left corner of the picture in 4:4:4 format and a block vector (BVx, BVy), the block vector is invalid when isRec(c, (x + BVx + 128, y + BVy) is true, where c is the chroma component.
[0598] 5.10 Embodiment #10
[0599] For a luma CU or joint luma / chroma CU starting at (x, y) relative to the top-left corner of the picture and a block vector (BVx, BVy), the block vector is invalid when isRec(((x + BVx) » 6 « 6) + 128 - (((y + BVy) » 6) & 1) * 64 + (x % 64), ((y + BVy) » 6 « 6) + (y % 64)) is true.
[0600] For a chroma block or sub-block starting at (x, y) relative to the top-left corner of the picture in 4:2:0 format and a block vector (BVx, BVy), the block vector is invalid when isRec(c, ((x + BVx) » 5 « 5) + 64 - (((y + BVy) » 5) & 1) * 32 + (x % 32), ((y + BVy) » 5 « 5) + (y % 32)) is true, where c is the chroma component.
[0601] 5.11 Embodiment #11
[0602] This embodiment highlights the implementation of keeping two most recently coded VPDUs in the first VPDU row of a CTU / CTB row and one most recently coded VPDU in the second VPDU row, excluding the current VPDU.
[0603] When the VPDU coding order is from top to bottom and from left to right, the reference region is as shown in Figure 13 .
[0604] When the VPDU coding order is from left to right and from top to bottom, and the current VPDU is not on the right side of the picture boundary, the reference region can be as shown in Figure 14 .
[0605] When the VPDU coding order is from left to right and from top to bottom, and the current VPDU is on the right side of the picture boundary, the reference region can be as shown in Figure 15 .
[0606] Whether a block vector (BVx, BVy) is valid for a luma block (x, y) of size w x h can be determined by checking the following condition:
[0607] isRec(((x + BVx + 128) » 6 « 6) - (refy & 0x40) + (x % 64), ((y + BVy) » 6 « 6) + (refy » 6 == y » 6)? (y % 64) : 0), where refy = (y & 0x40)? (y + BVy) : (y + BVy + w - 1).
[0608] If the above function returns true, the block vector (BVx, BVy) is not valid, otherwise the block vector can be valid.
[0609] 5.12 Embodiment #12
[0610] If the CTU size is 192 x 128, a virtual buffer of size 192 x 128 is maintained to keep track of the reference samples used for IBC.
[0611] A sample (x, y) relative to the top-left corner of the picture is associated with a position (x % 192, y % 128) relative to the top-left corner of the buffer. The following steps show how to mark the availability of samples associated with the virtual buffer used for IBC reference.
[0612] A position (xPrevVPDU, yPrevVPDU) relative to the top-left corner of the picture is recorded to represent the top-left sample of the last decoded VPDU.
[0613] 1) When starting to decode a VPDU row, all positions of the buffer are marked as unavailable.
[0614] (xPrevVPDU, yPrevVPDU) is set to (0, 0).
[0615] 2) When starting to decode the first CU of a VPDU, the position (x, y) where x = (xPrevVPDU + w) % 192 and y = (yPrevVPDU + h) % 128 is marked as available.
[0616] (xPrevVPDU - 2WVPDU + 2mWVPDU)%(mWVPDU),..., (xPrevVPDU - 2WVPDU + 2mWVPDU)%(mWVPDU) - 1 + WVPDU; and y = (yPrevVPDU - 2HVPDU + 2nHVPDU)%(nHVPDU),..., (yPrevVPDU - 2HVPDU + 2nHVPDU)%(nHVPDU) - 1 + HVPDU.
[0617] (yPrevVPDU%nHVPDU),..., (yPrevVPDU%nHVPDU) - 1 + HVPDU) can be marked as unavailable. Then (xPrevVPDU, yPrevVPDU) is set to (xCU, yCU), i.e., the top-left corner position of the CU relative to the picture.
[0618] 3) After the CU is decoded, positions (x, y) (where x = xCU%(mWVPDU),..., (xCU+CU_width-1)%(mWVPDU) and y = yCU%(nHVPDU),..., (yCU+CU_height-1)%(nHVPDU)) are marked as available.
[0619] (xCU+CU_width-1)%(mWVPDU) and y = yCU%(nHVPDU),..., (yCU+CU_height-1)%(nHVPDU)) are marked as available.
[0620] (yCU+yBV)%(nHVPDU),..., (yCU+yBV+CU_height-1)%(nHVPDU)) are marked as unavailable, the block vector is considered invalid.
[0621] 4) For an IBC CU with block vector (xBV, yBV), if any position (x, y) (where x = (xCU+xBV)%(mWVPDU),..., (xCU+xBV+CU_width-1)%(mWVPDU) and y = (yCU+yBV)%(nHVPDU),..., (yCU+yBV+CU_height-1)%(nHVPDU)) is marked as unavailable, the block vector is considered invalid.
[0622] (yCU+yBV)%(nHVPDU),..., (yCU+yBV+CU_height-1)%(nHVPDU)) are marked as unavailable, the block vector is considered invalid.
[0623] Figure 16 The buffer status and VPDU decoding status in a picture are shown.
[0624] 5.13 Embodiment #13
[0625] If the CTU size is 128x128 or the CTU size is larger than the VPDU size (e.g., 64x64 in the current design) or the CTU size is larger than the VPDU size (e.g., 64x64 in the current design), a virtual buffer of size 192x128 is maintained to track the reference samples for IBC. Below, (a%b) is defined as floor(a / b)*b when a<0, where Returns the largest integer not greater than c.
[0626] The sample (x, y) relative to the top-left corner of the picture is associated with the position (x%192, y%128) relative to the top-left corner of the buffer. The following steps show how to mark the availability of samples associated with the virtual buffer used for IBC reference.
[0627] The position (xPrevVPDU, yPrevVPDU) relative to the top-left corner of the picture is recorded to represent the top-left sample of the last decoded VPDU.
[0628] 1) When starting the decoding of a VPDU row, all positions of the buffer are marked as unavailable.
[0629] (xPrevVPDU, yPrevVPDU) is set to (0, 0).
[0630] 2) When starting the decoding of the first CU of a VPDU,
[0631] a. If yPrevVPDU%64 is equal to 0, the positions (x, y) where x = (xPrevVPDU
[0632] -128)%192,..,((xPrevVPDU-128)%192)+63; and y = yPrevVPDU%128,..,
[0633] (yPrevVPDU%128)+63) are marked as unavailable. Then (xPrevVPDU, yPrevVPDU) is set to (xCU, yCU), i.e. the position of the CU relative to the top-left corner of the picture.
[0634] b. Otherwise, the positions (x, y) where x = (xPrevVPDU-64)%192,..,
[0635] ((xPrevVPDU-64)%192)+63; and y = yPrevVPDU%128,..,
[0636] (yPrevVPDU%128)+63) are marked as unavailable. Then (xPrevVPDU,
[0637] yPrevVPDU) is set to (xCU, yCU), i.e. the position of the CU relative to the top-left corner of the picture.
[0638] 3) After the decoding of a CU, the positions (x, y) where x = xCU%192,..,
[0639] (xCU+CU_width-1)%192 and y=yCU%128,…,(yCU+CU_height-1)%128) are marked as available.
[0640] 4) For an IBC CU with block vector (xBV, yBV), if any position (x, y)
[0641] (where x = (xCU + xBV)%192, ..., (xCU + xBV + CU_width - 1)%192 and y = (yCU + yBV)%128, ..., (yCU + yBV + CU_height - 1)%128) are marked as unavailable, and the block vector is considered invalid.
[0642] If the CTU size is S×S, where S is not equal to 128, then Wbuf is assumed to be equal to 128*128 / S. A virtual buffer of size Wbuf×S is maintained to track reference samples used for IBC. In this case, the VPDU size is equal to the CTU size.
[0643] The positions (xPrevVPDU, yPrevVPDU) relative to the top left corner of the image are recorded to represent the top left corner sample of the most recently decoded VPDU.
[0644] 1) When the VPDU line is started to be decoded, all positions in the buffer are marked as unavailable.
[0645] (xPrevVPDU, yPrevVPDU) is set to (0, 0).
[0646] 2) At the beginning of decoding the first CU of the VPDU, the position is (x, y) (where x = (xPrevVPDU)
[0647] –W buf *S)%S,..,((xPrevVPDU–W buf *S)%S)+S-1;and y=
[0648] yPrevVPDU%S,..,(yPrevVPDU%S)+S-1) is marked as unavailable. Then
[0649] (xPrevVPDU, yPrevVPDU) is set to (xCU, yCU), which is the position of CU relative to the top left corner of the image.
[0650] 3) After decoding the CU, the position (x, y) (where x = xCU%(W)) buf ),...,
[0651] (xCU + CU width - 1) % (W buf ) and y = yCU % S,..., (yCU + CU height - 1) % S)
[0652] marked as available.
[0653] 4) For an IBC CU with block vector (xBV, yBV), if any position (x, y)
[0654] (where x = (xCU + xBV) % (Wbuf),..., (xCU + xBV + CU width - 1) % (Wbuf) and y = (yCU + yBV) % S,..., (yCU + yBV + CU height - 1) % S) is marked as unavailable, the block vector is considered invalid.
[0655] 5.14 Embodiment #14
[0656] If the CTU size is 128x128 or the CTU size is larger than the VPDU size (e.g., 64x64 in the current design) or the CTU size is larger than the VPDU size (e.g., 64x64 in the current design), a virtual buffer with size 256x128 is maintained to keep track of the reference samples for IBC. Below, (a % b) is defined as floor(a / b)*b when a<0, where Returns the largest integer not greater than c.
[0657] A sample (x, y) relative to the top-left corner of the picture is associated with a position (x % 256, y % 128) relative to the top-left corner of the buffer. The following steps show how to mark the availability of samples associated with the virtual buffer for IBC reference.
[0658] A position (xPrevVPDU, yPrevVPDU) relative to the top-left corner of the picture is recorded to represent the top-left sample of the most recently decoded VPDU.
[0659] 1) When starting to decode a VPDU row, all positions of the buffer are marked as unavailable.
[0660] (xPrevVPDU, yPrevVPDU) is set to (0, 0).
[0661] 2) When starting to decode the first CU of a VPDU,
[0662] a. If yPrevVPDU % 64 is equal to 0, the position (x, y) (where x = (xPrevVPDU
[0663] (xPrevVPDU - 128) % 256,..., (xPrevVPDU - 128) % 256 + 63; and y = yPrevVPDU % 128,..., (yPrevVPDU % 128) + 63) are marked as unavailable. Then (xPrevVPDU, yPrevVPDU) is set to (xCU, yCU), i.e. the top-left corner position of the CU relative to the picture.
[0664] (xPrevVPDU - 128) % 256,..., (xPrevVPDU - 128) % 256 + 63; and y = yPrevVPDU % 128,..., (yPrevVPDU % 128) + 63) are marked as unavailable. Then (xPrevVPDU, yPrevVPDU) is set to (xCU, yCU), i.e. the top-left corner position of the CU relative to the picture.
[0665] b. Otherwise, the positions (x, y) where x = (xPrevVPDU - 64) % 256,..., (xPrevVPDU - 64) % 256 + 63; and y = yPrevVPDU % 128,..., (yPrevVPDU % 128) + 63) are marked as unavailable. Then (xPrevVPDU, yPrevVPDU) is set to (xCU, yCU), i.e. the top-left corner position of the CU relative to the picture.
[0666] (xPrevVPDU - 64) % 256 + 63; and y = yPrevVPDU % 128,..., (yPrevVPDU % 128) + 63) are marked as unavailable. Then (xPrevVPDU, yPrevVPDU) is set to (xCU, yCU), i.e. the top-left corner position of the CU relative to the picture.
[0667] (xPrevVPDU - 64) % 256 + 63; and y = yPrevVPDU % 128,..., (yPrevVPDU % 128) + 63) are marked as unavailable. Then (xPrevVPDU, yPrevVPDU) is set to (xCU, yCU), i.e. the top-left corner position of the CU relative to the picture.
[0668] (xPrevVPDU - 64) % 256 + 63; and y = yPrevVPDU % 128,..., (yPrevVPDU % 128) + 63) are marked as unavailable. Then (xPrevVPDU, yPrevVPDU) is set to (xCU, yCU), i.e. the top-left corner position of the CU relative to the picture.
[0669] 3) After decoding the CU, the positions (x, y) where x = xCU % 256,..., (xCU + CU_width - 1) % 256 and y = yCU % 128,..., (yCU + CU_height - 1) % 128) are marked as available.
[0670] 3) After decoding the CU, the positions (x, y) where x = xCU % 256,..., (xCU + CU_width - 1) % 256 and y = yCU % 128,..., (yCU + CU_height - 1) % 128) are marked as available.
[0671] 4) For an IBC CU with block vector (xBV, yBV), if any position (x, y) where x = (xCU + xBV) % 256,..., (xCU + xBV + CU_width - 1) % 256 and y = (yCU + yBV) % 128,..., (yCU + yBV + CU_height - 1) % 128) is marked as unavailable, the block vector is considered as invalid.
[0672] 4) For an IBC CU with block vector (xBV, yBV), if any position (x, y) where x = (xCU + xBV) % 256,..., (xCU + xBV + CU_width - 1) % 256 and y = (yCU + yBV) % 128,..., (yCU + yBV + CU_height - 1) % 128) is marked as unavailable, the block vector is considered as invalid.
[0673] When the CTU size is not 128x128 or smaller than 64x64 or smaller than 64x64, the same procedure as in the previous embodiment (i.e. Emb#14) applies.
[0674] 5.15 Emb#15
[0675] The IBC reference availability marking procedure is described as follows. In this document, changes are indicated in bold, underlined and italicized text.
[0676] 7.3.7.1 General slice data syntax
[0677]
[0678]
[0679] 7.3.7.5 Coding unit syntax
[0680]
[0681] 8.6.2 Derivation process of motion vector components for IBC blocks 8.6.2.1 General
[0682] …
[0683]
[0684] …
[0685] 8.6.3 Decoding process of IBC blocks
[0686] 8.6.3.1 General
[0687] This process is invoked when a coding unit coded in IBC prediction mode is decoded.
[0688] The inputs to this process are:
[0689] - luma position (xCb, yCb) specifying the top-left sample of the current coding block relative to the top-left luma sample of the current picture,
[0690] - variable cbWidth specifying the width of the current coding block in luma samples,
[0691] - variable cbHeight specifying the height of the current coding block in luma samples,
[0692] - variables numSbX and numSbY specifying the number of luma coding sub-blocks in horizontal and vertical direction,
[0693] - motion vectors mv[xSbIdx][ySbIdx] for xSbIdx = 0..numSbX - 1 and ySbIdx = 0..numSbY - 1,
[0694] - variable cldx specifying the color component index of the current block.
[0695]
[0696] …
[0697] For each coded sub-block at sub-block index (xSbldx, ySblidx) (where xSbldx = 0.. numSbX - 1 and ySbldx = 0.. numSbY - 1), the following applies:
[0698] - The luma position (xSb, ySb) of the top-left sample of the current coded sub-block relative to the top-left luma sample of the current picture is specified as follows:
[0699] (xSb, ySb) = (xCb + xSbldx * sbWidth, yCb + ySbldx * sbHeight) (8-913)
[0700]
[0701] …
[0702]
[0703]
[0704] 8.7.5 Picture reconstruction process 8.7.5.1 Inputs to this process are:
[0705] - position (xCurr, yCurr) specifying the top-left sample of the current block relative to the top-left sample of the current picture component,
[0706] - variables nCurrSw and nCurrSh specifying the width and height of the current block, respectively,
[0707] - variable cldx specifying the color component of the current block,
[0708] - (nCurrSw) x (nCurrSh) array predSamples specifying the prediction samples of the current block,
[0709] - (nCurrSw) x (nCurrSh) array resSamples specifying the residual samples of the current block.
[0710] The output of this process is
[0711] - the reconstructed picture sample array recSamples.
[0712]
[0713] …
[0714]
[0715] 5.16 Embodiment #16
[0716] The same as the previous embodiment except for the following changes.
[0717]
[0718]
[0719]
[0720] 5.17 Embodiment #17
[0721] In this document, changes in some examples are indicated by bolded, underlined text.
[0722] 7.3.7 Slices data syntax
[0723] 7.3.7.1 General slice data syntax
[0724]
[0725]
[0726] 7.4.8.5 Coding unit semantics
[0727] When all of the following conditions are true, update the history-based motion vector predictor list for the shared Merge candidate list region by setting NumHmvpSmrIbcCand equal to NumHmvpIbcCand, and HmvpSmrIbcCandList[ i ] equal to HmvpIbcCandList[ i ] (for i = 0..NumHmvpIbcCand - 1):
[0728] - IsInSmr[ x0 ][ y0 ] is equal to TRUE.
[0729] - SmrX[ x0 ][ y0 ] is equal to x0.
[0730] - SmrY[ x0 ][ y0 ] is equal to y0.
[0731] For x = x0..x0 + cbWidth - 1 and y = y0..y0 + cbHeight - 1, the following applies:
[0732] CbPosX[ x ][ y ] = x0 (7-135)
[0733] CbPosY[ x ][ y ] = y0 (7-136)
[0734] CbWidth[ x ][ y ] = cbWidth (7-137)
[0735] CbHeight[ x ][ y ] = cbHeight (7-138)
[0736]
[0737] The input of this process is:
[0738] - the luma position (xCb, yCb) of the top-left sample of the current luma coding block relative to the top-left luma sample of the current picture,
[0739] - the variable cbWidth specifying the width of the current coding block in luma samples,
[0740] - the variable cbHeight specifying the height of the current coding block in luma samples.
[0741] The output of this process is:
[0742] - the luma motion vector mvL with 1 / 16 fraction sample precision.
[0743] The luma motion vector mvL is derived as follows:
[0744] - the derivation process of the IBC luma motion vector prediction as specified in clause 8.6.2.2 is invoked with the luma position (xCb, yCb), the variable cbWidth and cbHeight as inputs, and the output is the luma motion vector mvL.
[0745] - the following applies when general_merge_flag[ xCb ][ yCb ] is equal to 0:
[0746] 1. the variable mvd is derived as follows:
[0747] mvd[ 0 ] = MvdL0[ xCb ][ yCb ][ 0 ] (8-883)
[0748] mvd[ 1 ] = MvdL0[ xCb ][ yCb ][ 1 ] (8-884)
[0749] 2. the process of Motion Vector Scaling as specified in clause 8.5.2.14 is invoked with mvX set equal to mvL, rightShift set equal to MvShift + 2 and leftShift set equal to MvShift + 2 as inputs and mvL as output.
[0750] 3. The brightness motion vector mvL is modified as follows:
[0751] u[0]=(mvL[0]+mvd[0]+2 18 ) % 2 18 (8-885)
[0752] mvL[0] = (u[0] >= 2) 17 ) ? ( u[ 0 ] - 2 18 ): u[ 0 ] (8-886)
[0753] u[1]=(mvL[1]+mvd[1]+2 18 ) % 2 18 (8-887)
[0754] mvL[1] = (u[1] >= 2) 17 ) ? ( u[ 1 ] - 2 18 ): u[ 1 ] (8-888)
[0755] Note 1 - The result values of mvL[0] and mvL[1] specified above are always in the range -2. 17 Up to 2 17 -1 (including -2) 17 and 2 17 -1) in.
[0756] The brightness motion vector mvL invokes the update procedure for the historical list of motion vector predictions as specified in Clause 8.6.2.6.
[0757]
[0758] 8.7.5 Image Reconstruction Process
[0759] 8.7.5.1 Overall
[0760] The input to this process is:
[0761] – Position (xCurr, yCurr), specifies the top-left corner of the current block relative to the top-left corner of the current image component.
[0762] – Variables nCurrSw and nCurrSh specify the width and height of the current block, respectively.
[0763] – The variable cIdx specifies the color component of the current block.
[0764] - an (nCurrSw) x (nCurrSh) array predSamples specifying the prediction samples of the current block,
[0765] - an (nCurrSw) x (nCurrSh) array resSamples specifying the residual samples of the current block.
[0766] The output of the process The reconstructed picture samples array resSamples
[0767] Depending on the value of the colour component cldx, the following applies:
[0768] - If cldx is equal to 0, recSamples corresponds to the reconstructed picture samples array S L , and the function clipCidxl corresponds to Clipl Y .
[0769] - Else if cldx is equal to 1, tuCbfChroma is set equal to tu_cbf_cb[xCurr][yCurr], recSamples corresponds to the reconstructed chroma samples array S Cb ,
[0770] , and the function clipCidxl corresponds to Clipl C .
[0771] - Else (cldx is equal to 2), tuCbfChroma is set equal to tu_cbf_cr[xCurr][yCurr], recSamples corresponds to the reconstructed chroma samples array S Cr ,
[0772] , and the function clipCidxl corresponds to Clipl C .
[0773] Depending on the value of the slice_lmcs_enabled_flag, the following applies:
[0774] - If slice_lmcs_enabled_flag is equal to 0, for i = 0..nCurrSw-1, j = 0..nCurrSh-1, the (nCurrSw) x (nCurrSh) block of reconstructed samples recSamples at position (xCurr, yCurr) is derived as follows:
[0775] recSamples[xCurr+i][yCurr+j] = clipCidxl(predSamples[i][j] +
[0776] ( 8 - 992 ) * resSamples[ i ][ j ] ( 8 - 992 )
[0777] - Otherwise (slice_lmcs_enabled_flag is equal to 1), the following applies:
[0778] - If cldx is equal to 0, the following applies:
[0779] - with luma position ( xCurr, yCurr ), block width nCurrSw and height nCurrSh,
[0780] the picture reconstruction and mapping process for luma samples as specified in clause 8.7.5.2 is invoked with the reconstructed luma sample array recSamples as output.
[0781] - Otherwise (cldx is greater than 0), the picture reconstruction and mapping process for chroma samples depending on luma residual scaling as specified in clause 8.7.5.3 is invoked with the reconstructed chroma sample array recSamples as output.
[0782]
[0783] 5.18 Example #18
[0784] In this document, changes in some examples are indicated in bold, underlined and italicized text.
[0785] 7.3.7 Slice data syntax
[0786] 7.3.7.1 General slice data syntax
[0787]
[0788] 7.4.8.5 Coding unit semantics
[0789] When all of the following conditions are true, the history-based motion vector predictor list for the shared Merge candidate list region is updated by setting NumHmvpSmrIbcCand equal to NumHmvpIbcCand, and setting HmvpSmrIbcCandList[ i ] equal to HmvpIbcCandList[ i ] for i = 0..NumHmvpIbcCand - 1:
[0790] - IsInSmr[ x0 ][ y0 ] is equal to TRUE.
[0791] - SmrX[ x0 ][ y0 ] is equal to x0.
[0792] - SmrY[ x0 ][ y0 ] is equal to y0.
[0793] For x = x0..x0 + cbWidth - 1 and y = y0..y0 + cbHeight - 1, the following applies:
[0794] CbPosX[ x ][ y ] = x0 (7-135)
[0795] CbPosY[ x ][ y ] = y0 (7-136)
[0796] CbWidth[ x ][ y ] = cbWidth (7-137)
[0797] CbHeight[ x ][ y ] = cbHeight (7-138)
[0798]
[0799] 8.6.2 Derivation process of motion vector components for IBC blocks
[0800] 8.6.2.1 General
[0801] The inputs of the process are:
[0802] - the luma position ( xCb, yCb ) of the top-left sample of the current luma coding block relative to the top-left luma sample of the current picture,
[0803] - the variable cbWidth specifying the width of the current coding block in luma samples,
[0804] - the variable cbHeight specifying the height of the current coding block in luma samples.
[0805] The outputs of the process are:
[0806] The brightness motion vector mvL with a precision of -1 / 16 fractional sample points.
[0807] The brightness motion vector mvL is derived as follows:
[0808] – The derivation process for IBC luminance motion vector prediction, as specified in Clause 8.6.2.2, is invoked with luminance position (xCb, yCb), variables cbWidth and cbHeight as input, and the output is the luminance motion vector mvL.
[0809] – When general_merge_flag[xCb][yCb] equals 0, the following applies:
[0810] 4. The variable mvd is derived as follows:
[0811] mvd[ 0 ] = MvdL0[ xCb ][ yCb ][ 0 ] (8-883)
[0812] mvd[ 1 ] = MvdL0[ xCb ][ yCb ][ 1 ] (8-884)
[0813] 5. Call the rounding procedure for the motion vector as specified in Clause 8.5.2.14, with mvX set to equal to mvL, rightShift set to equal to MvShift+2, and leftShift set to equal to MvShift+2 as inputs and the rounded mvL as output.
[0814] 6. The brightness motion vector mvL has been modified as follows:
[0815] u[0]=(mvL[0]+mvd[0]+2 18 ) % 2 18 (8-885)
[0816] mvL[0] = (u[0] >= 2) 17 ) ? ( u[ 0 ] - 2 18 ): u[ 0 ] (8-886)
[0817] u[1]=(mvL[1]+mvd[1]+2 18 ) % 2 18 (8-887)
[0818] mvL[1] = (u[1] >= 2) 17 ) ? ( u[ 1 ] - 218 ) : u[ 1 ] (8-888)
[0819] NOTE 1 - The resulting values of mvL[0] and mvL[1] as specified above are always in the range -2 17 to 2 17 -1 (including -2 17 and 2 17 -1).
[0820] The history-based motion vector predictor list update process as specified in clause 8.6.2.6 is invoked with the luma motion vector mvL.
[0821]
[0822]
[0823] 8.6.3 Decoding process of an ibc block
[0824] 8.6.3.1 General
[0825] This process is invoked when a coded unit coded in the ibc prediction mode is decoded.
[0826] The inputs of this process are:
[0827] - the luma position (xCb, yCb) specifying the top-left sample of the current coded block relative to the top-left luma sample of the current picture,
[0828] - the variable cbWidth specifying the width of the current coded block in luma samples,
[0829] - the variable cbHeight specifying the height of the current coded block in luma samples,
[0830] - the color component index of the current block.
[0831]
[0832] The outputs of this process are:
[0833] - the array of prediction samples predSamples.
[0834]
[0835] 8.7.5 Picture reconstruction process
[0836] 8.7.5.1 General
[0837] The inputs of this process are:
[0838] - a position (xCurr, yCurr) specifying a top-left sample of the current block with respect to a top-left sample of the current picture component,
[0839] - variables nCurrSw and nCurrSh specifying, respectively, a width and a height of the current block,
[0840] - a variable cldx specifying a color component of the current block,
[0841] - an (nCurrSw) x (nCurrSh) array predSamples specifying prediction samples of the current block,
[0842] - an (nCurrSw) x (nCurrSh) array resSamples specifying residual samples of the current block. The output of the process - a reconstructed picture sample array recSamples
[0843]
[0844] Depending on the value of the color component cldx, the following is specified:
[0845] - if cldx is equal to 0, recSamples corresponds to the reconstructed picture sample array S L , and
[0846] The function clipCidxl corresponds to Clipl Y .
[0847] - else if cldx is equal to 1, tuCbfChroma is set equal to
[0848] tu_cbf_cb[ xCurr ][ yCurr ], recSamples corresponds to the reconstructed chroma sample array S Cb ,
[0849] and the function clipCidxl corresponds to Clipl C .
[0850] - else (cldx is equal to 2), tuCbfChroma is set equal to
[0851] tu_cbf_cr[ xCurr ][ yCurr ], recSamples corresponds to the reconstructed chroma sample array S Cr ,
[0852] and the function clipCidxl corresponds to Clipl C .
[0853] Depending on the value of slice_lmcs_enabled_flag, the following applies:
[0854] - If slice_lmcs_enabled_flag is equal to 0, for i = 0..nCurrSw-1,
[0855] j = 0..nCurrSh-1, the (nCurrSw) x (nCurrSh) block of reconstructed samples recSamples at position (xCurr, yCurr) is derived as follows:
[0856] recSamples[ xCurr + i ][ yCurr + j ] = clipCidxl( predSamples[ i ][ j ] + resSamples[ i ][ j ] ) (8-992)
[0857] (8-993)
[0858] - Otherwise (slice_lmcs_enabled_flag is equal to 1), the following applies:
[0859] - If cldx is equal to 0, the following applies:
[0860] - With luma position (xCurr, yCurr), block width nCurrSw and height nCurrSh,
[0861] the array of predicted luma samples predSamples and the array of residual luma samples resSamples as input, the picture reconstruction and mapping process for luma samples as specified in clause 8.7.5.2, and the output is the array of reconstructed luma samples
[0862] recSamples.
[0863]
[0864] - Otherwise (cldx is greater than 0), with chroma position (xCurr, yCurr), transform block width nCurrSw and height nCurrSh, the coding block flag for the current chroma transform block tuCbfChroma, the array of predicted chroma samples predSamples and the array of residual chroma samples resSamples as input, the picture reconstruction and luma-dependent chroma residual scaling process for chroma samples as specified in clause 8.7.5.3, and the output is the array of reconstructed chroma samples recSamples.
[0865]
[0866] 5.19 Embodiment #19
[0867] In this document, changes in some examples are indicated in bold, underlined text.
[0868] 7.3.7 Slice data syntax
[0869] 7.3.7.1 General slice data syntax
[0870]
[0871]
[0872] 7.4.8.5 Coding unit semantics
[0873] When all of the following conditions are true, the history-based motion vector predictor list for the shared Merge candidate list region is updated by setting NumHmvpSmrIbcCand equal to NumHmvpIbcCand, and setting HmvpSmrIbcCandList[ i ] equal to HmvpIbcCandList[ i ] for i = 0..NumHmvpIbcCand - 1:
[0874] - IsInSmr[ x0 ][ y0 ] is equal to TRUE.
[0875] - SmrX[ x0 ][ y0 ] is equal to x0.
[0876] - SmrY[ x0 ][ y0 ] is equal to y0.
[0877] For x = x0..x0 + cbWidth - 1 and y = y0..y0 + cbHeight - 1, the following applies:
[0878] CbPosX[ x ][ y ] = x0 (7-135)
[0879] CbPosY[ x ][ y ] = y0 (7-136)
[0880] CbWidth[ x ][ y ] = cbWidth (7-137)
[0881] CbHeight[ x ][ y ] = cbHeight (7-138)
[0882]
[0883]
[0884] 8.6.2 Derivation process for motion vector components of IBC blocks
[0885] 8.6.2.1 General
[0886] The input to this process is:
[0887] – The brightness position (xCb, yCb) of the current luminance block relative to the top-left luminance sample of the current image.
[0888] – The variable cbWidth specifies the width of the current codec block in the luminance sample.
[0889] – The variable cbHeight specifies the height of the current codec block in the luminance sample.
[0890] The output of this process is:
[0891] The brightness motion vector mvL with a precision of -1 / 16 fractional sample points.
[0892] The brightness motion vector mvL is derived as follows:
[0893] – The derivation process for IBC luminance motion vector prediction, as specified in Clause 8.6.2.2, is invoked with luminance position (xCb, yCb), variables cbWidth and cbHeight as input, and the output is the luminance motion vector mvL.
[0894] – When general_merge_flag[xCb][yCb] equals 0, the following applies:
[0895] 7. The variable mvd is derived as follows:
[0896] mvd[ 0 ] = MvdL0[ xCb ][ yCb ][ 0 ] (8-883)
[0897] mvd[ 1 ] = MvdL0[ xCb ][ yCb ][ 1 ] (8-884)
[0898] 8. Call the rounding procedure for the motion vector as specified in Clause 8.5.2.14, with mvX set to equal to mvL, rightShift set to equal to MvShift+2, and leftShift set to equal to MvShift+2 as inputs and the rounded mvL as output.
[0899] 9. The brightness motion vector mvL is modified as follows:
[0900] u[0]=(mvL[0]+mvd[0]+2 18 ) % 2 18 (8-885)
[0901] mvL[ 0 ] = ( u[ 0 ] >= 2 )? ( u[ 0 ] - 2 ) : u[ 0 ] (8-886) 17 mvL[ 1 ] = ( u[ 1 ] >= 2 )? ( u[ 1 ] - 2 ) : u[ 1 ] (8-887) 18
[0902] u[ 1 ] = ( mvL[ 1 ] + mvd[ 1 ] + 2 ) % 2 18 18 (8-888)
[0903] mvL[ 1 ] = ( u[ 1 ] >= 2 )? ( u[ 1 ] - 2 ) : u[ 1 ] (8-888) 17 18 (8-888)
[0904] NOTE 1 - The resulting values of mvL[0] and mvL[1] as specified above are always in the range -2 17 17 -1, inclusive. 17 17
[0905] The history-based motion vector predictor list update process as specified in clause 8.6.2.6 is invoked with the luma motion vector mvL.
[0906]
[0907] 8.6.3 Decoding process of an ibc block
[0908] 8.6.3.1 General
[0909] This process is invoked when a coded unit coded in the ibc prediction mode is decoded.
[0910] The inputs to this process are:
[0911] - the luma position (xCb, yCb) specifying the top-left sample of the current coding block relative to the top-left luma sample of the current picture,
[0912] - the variable cbWidth specifying the width of the current coding block in luma samples,
[0913] - the variable cbHeight specifying the height of the current coding block in luma samples,
[0914]
[0915] 8.7.5 Picture reconstruction process
[0916] 8.7.5.1 General
[0917] The inputs of the process are:
[0918] - a position (xCurr, yCurr) specifying a top-left sample of the current block relative to the top-left sample of the current picture component,
[0919] - variables nCurrSw and nCurrSh specifying respectively a width and a height of the current block,
[0920] - a variable cldx specifying a color component of the current block,
[0921] - an (nCurrSw) x (nCurrSh) array predSamples specifying the prediction samples of the current block,
[0922] - an (nCurrSw) x (nCurrSh) array resSamples specifying the residual samples of the current block. The output of the process is a reconstructed picture samples array recSamples and an IBC buffer array ibcBuf L , ibcBuf Cb , ibcBuf Cr .
[0923] Depending on the value of the color component cldx, the following is specified:
[0924] - if cldx is equal to 0, recSamples corresponds to the reconstructed picture samples array S L , and the function clipCidxl corresponds to Clipl Y .
[0925] - else if cldx is equal to 1, tuCbfChroma is set equal to tu_cbf_cb[xCurr][yCurr], recSamples corresponds to the reconstructed chroma samples array S Cb ,
[0926] , and the function clipCidxl corresponds to Clipl C .
[0927] - else (cldx is equal to 2), tuCbfChroma is set equal to tu_cbf_cr[xCurr][yCurr], recSamples corresponds to the reconstructed chroma samples array S Cr ,
[0928] , and the function clipCidxl corresponds to Clipl C .
[0929] Depending on the value of slice_lmcs_enabled_flag, the following applies:
[0930] - If slice_lmcs_enabled_flag is equal to 0, the (nCurrSw) x (nCurrSh) block of reconstructed samples recSamples at position (xCurr, yCurr) is derived as follows for i = 0..nCurrSw - 1, j = 0..nCurrSh - 1:
[0931] recSamples[ xCurr + i ][ yCurr + j ] = clipCidxl( predSamples[ i ][ j ] + resSamples[ i ][ j ] ) (8-991)
[0932] recSamples[ xCurr + i ][ yCurr + j ] = clipCidxl( predSamples[ i ][ j ] + resSamples[ i ][ j ] ) (8-992)
[0933] - Otherwise (slice_lmcs_enabled_flag is equal to 1), the following applies:
[0934] - If cldx is equal to 0, the following applies:
[0935] - The luma position (xCurr, yCurr), the block width nCurrSw and height nCurrSh,
[0936] the array of predicted luma samples predSamples and the array of residual luma samples resSamples as inputs, and the output is the array of reconstructed luma samples recSamples.
[0937] - Otherwise (cldx is greater than 0), the picture reconstruction and luma-dependent chroma residual scaling process for chroma samples as specified in clause 8.7.5.3 is invoked with the chroma position (xCurr, yCurr), the transform block width nCurrSw and height nCurrSh, the coding block flag for the current chroma transform block tuCbfChroma, the array of predicted chroma samples predSamples and the array of residual chroma samples resSamples as inputs, and the output is the array of reconstructed chroma samples recSamples.
[0938]
[0939]
[0940] 5.20 Embodiment #20
[0941] In this document, changes in some examples are indicated in bold, underlined and italicized text.
[0942] 7.3.7 slice data syntax
[0943] 7.3.7.1 general slice data syntax
[0944]
[0945]
[0946] 7.4.8.5 coding unit semantics
[0947] When all of the following conditions are true, the history-based motion vector predictor list for the shared Merge candidate list region is updated by setting NumHmvpSmrIbcCand equal to NumHmvpIbcCand, and HmvpSmrIbcCandList[ i ] equal to HmvpIbcCandList[ i ] for i = 0..NumHmvpIbcCand - 1:
[0948] - IsInSmr[ x0 ][ y0 ] is equal to TRUE.
[0949] - SmrX[ x0 ][ y0 ] is equal to x0.
[0950] - SmrY[ x0 ][ y0 ] is equal to y0.
[0951] For x = x0..x0 + cbWidth - 1 and y = y0..y0 + cbHeight - 1, the following applies:
[0952] CbPosX[ x ][ y ] = x0 (7-135)
[0953] CbPosY[ x ][ y ] = y0 (7-136)
[0954] CbWidth[ x ][ y ] = cbWidth (7-137)
[0955] CbHeight[ x ][ y ] = cbHeight (7-138)
[0956]
[0957]
[0958] 8.6.2 derivation process of motion vector components for IBC blocks
[0959] 8.6.2.1 general
[0960] The input of this process is:
[0961] - the luma position of the top-left sample of the current luma coding block relative to the top-left luma sample of the current picture (xCb, yCb),
[0962] - the variable cbWidth specifying the width of the current coding block in luma samples,
[0963] - the variable cbHeight specifying the height of the current coding block in luma samples.
[0964] The output of this process is:
[0965] - the luma motion vector mvL with 1 / 16 fraction sample precision.
[0966] The luma motion vector mvL is derived as follows:
[0967] - the derivation process of IBC luma motion vector prediction as specified in clause 8.6.2.2 is invoked with the luma position (xCb, yCb), the variable cbWidth and cbHeight as inputs and the output is the luma motion vector mvL.
[0968] - the following applies when general_merge_flag[ xCb ][ yCb ] is equal to 0:
[0969] 10. The variable mvd is derived as follows:
[0970] mvd[ 0 ] = MvL0[ xCb ][ yCb ][ 0 ] (8-883)
[0971] mvd[ 1 ] = MvL0[ xCb ][ yCb ][ 1 ] (8-884)
[0972] 11. The process of Motion Vector Scaling as specified in clause 8.5.2.14 is invoked with mvX set equal to mvL, rightShift set equal to MvShift + 2 and leftShift set equal to MvShift + 2 as inputs and mvL as output.
[0973] 12. The luma motion vector mvL is modified as follows:
[0974] u[ 0 ] = ( mvL[ 0 ] + mvd[ 0 ] + 2 18 ) % 2 18 (8-885)
[0975] mvL[ 0 ] = ( u[ 0 ] >= 2 17 )? ( u[ 0 ] - 2 18 ) : u[ 0 ] (8-886)
[0976] u[ 1 ] = ( mvL[ 1 ] + mvd[ 1 ] + 2 18 ) % 2 18 (8-887)
[0977] mvL[ 1 ] = ( u[ 1 ] >= 2 17 )? ( u[ 1 ] - 2 18 ) : u[ 1 ] (8-888)
[0978] NOTE 1 - The resulting values of mvL[0] and mvL[1] as specified above are always in the range -2 17 to 2 17 -1, inclusive -2 17 and 2 17 -1.
[0979] The history-based motion vector predictor list update process as specified in clause 8.6.2.6 is invoked with the luma motion vector mvL.
[0980]
[0981] 8.6.3 Decoding process of an ibc block
[0982] 8.6.3.1 General
[0983] This process is invoked when a coded unit coded in the ibc prediction mode is decoded.
[0984] The inputs to this process are:
[0985] - the luma position (xCb, yCb) specifying the top-left sample of the current coding block relative to the top-left luma sample of the current picture,
[0986] - the variable cbWidth specifying the width of the current coding block in luma samples,
[0987] - the variable cbHeight specifying the height of the current coding block in luma samples,
[0988] - the variable cldx specifying the color component index of the current block.
[0989]
[0990]
[0991] 8.7.5 picture reconstruction process
[0992] 8.7.5.1 general
[0993] The inputs of the process are:
[0994] - a position (xCurr, yCurr) specifying the top-left sample of the current block relative to the top-left sample of the current picture component,
[0995] - variables nCurrSw and nCurrSh specifying the width and height of the current block, respectively,
[0996] - a variable cldx specifying the color component of the current block,
[0997] - an (nCurrSw) x (nCurrSh) array predSamples specifying the prediction samples of the current block,
[0998] - an (nCurrSw) x (nCurrSh) array resSamples specifying the residual samples of the current block.
[0999] The output of the process is a reconstructed picture sample array recSamples and the IBC buffer array ibcBuf L , ibcBuf Cb ibcBuf Cr .
[1000] Depending on the value of the color component cldx, the following is specified:
[1001] - if cldx is equal to 0, recSamples corresponds to the reconstructed picture sample array S L , and the function clipCidxl corresponds to Clipl Y .
[1002] - else if cldx is equal to 1, tuCbfChroma is set equal to tu_cbf_cb[xCurr][yCurr], recSamples corresponds to the reconstructed chroma sample array S Cb , and the function clipCidxl corresponds to Clipl C .
[1003] - else (cldx is equal to 2), tuCbfChroma is set equal to tu_cbf_cr[xCurr][yCurr], recSamples corresponds to the reconstructed chroma sample array S Cr ,
[1004] , and the function clipCidxl corresponds to Clipl C .
[1005] The following applies depending on the value of slice_lmcs_enabled_flag:
[1006] – If slice_lmcs_enabled_flag is equal to 0, the (nCurrSw) x (nCurrSh) block of reconstructed samples recSamples at position (xCurr, yCurr) is derived as follows for i = 0..nCurrSw - 1, j = 0..nCurrSh - 1:
[1007] recSamples[ xCurr + i ][ yCurr + j ] = clipCidxl( predSamples[ i ][ j ] + resSamples[ i ][ j ] ) (8-992) - Otherwise (slice_lmcs_enabled_flag is equal to 1), the following applies:
[1008] recSamples[ xCurr + i ][ yCurr + j ] = clipCidxl( predSamples[ i ][ j ] + resSamples[ i ][ j ] ) (8-992) - Otherwise (slice_lmcs_enabled_flag is equal to 1), the following applies:
[1009] – If cldx is equal to 0, the following applies:
[1010] – The picture reconstruction and mapping process for luma samples as specified in clause 8.7.5.2 is invoked with the luma position (xCurr, yCurr), the block width nCurrSw and height nCurrSh, the array of predicted luma samples predSamples, and the array of residual luma samples resSamples as input, and the output is the array of reconstructed luma samples recSamples.
[1011] – Otherwise (cldx is greater than 0), the picture reconstruction and luma-dependent chroma residual scaling process for chroma samples as specified in clause 8.7.5.3 is invoked with the chroma position (xCurr, yCurr), the transform block width nCurrSw and height nCurrSh, the coding block flag for the current chroma transform block tuCbfChroma, the array of predicted chroma samples predSamples, and the array of residual chroma samples resSamples as input, and the output is the array of reconstructed chroma samples recSamples.
[1012]
[1013]
[1014] Figure 6is a flowchart of an example method 600 of video processing. The method 600 includes determining (602), for a conversion between a current video block and a bitstream representation of the current video block, a size of a buffer to store reference samples of the current video block that use an intra block copy coding mode, and performing (604) the conversion using the reference samples stored in the buffer.
[1015] The following clauses describe some example preferred features implemented by embodiments of the method 600 and other methods. Additional examples are provided in Section 4 of this document.
[1016] 1. A method of video processing, comprising: determining, for a conversion between a current video block and a bitstream representation of the current video block, a size of a buffer to store reference samples of the current video block that use an intra block copy coding mode; and performing the conversion using the reference samples stored in the buffer.
[1017] 2. The method of clause 1, wherein the size of the buffer is a predetermined constant.
[1018] 3. The method of any of clauses 1-2, wherein the size is MxN, where M and N are integers.
[1019] 4. The method of clause 3, wherein MxN is equal to 64x64 or 128x128 or 64x128.
[1020] 5. The method of clause 1, wherein the size of the buffer is equal to a size of a coding tree unit of the current video block.
[1021] 6. The method of clause 1, wherein the size of the buffer is equal to a size of a virtual pipe data unit used during the conversion.
[1022] 7. The method of clause 1, wherein the size of the buffer corresponds to a field in the bitstream representation.
[1023] 8. The method of clause 7, wherein the field is included in the bitstream representation at a video parameter set or a sequence parameter set or a picture parameter set or a picture header or a slice header or a tile group header level.
[1024] 9. The method of any of clauses 1-8, wherein the size of the buffer is different for reference samples of a luma component and reference samples of a chroma component.
[1025] 10. The method of any of clauses 1-8, wherein the size of the buffer depends on a chroma sub-sampling format of the current video block.
[1026] 11. The method of any of clauses 1-8, wherein the reference samples are stored in an RGB format.
[1027] 12. The method of any of clauses 1-11, wherein the buffer is used to store reconstructed samples before in-loop filtering and reconstructed samples after in-loop filtering.
[1028] 13. The method of clause 12, wherein the in-loop filtering comprises deblocking filtering or adaptive loop filtering (ALF) or sample adaptive offset (SAO) filtering.
[1029] 14. A method of video processing, comprising: for a conversion between a current video block and a bitstream representation of the current video block, initializing a buffer with initial values of reference samples to store reference samples of the current video block that are coded using an intra block copy coding mode; and performing the conversion using the reference samples stored in the buffer.
[1030] 15. The method of clause 14, wherein the initial values correspond to a constant.
[1031] 16. The method of any of clauses 14-15, wherein the initial values are a function of a bit depth of the current video block.
[1032] 17. The method of clause 15, wherein the constant corresponds to a mid-gray value.
[1033] 18. The method of clause 14, wherein the initial values correspond to pixel values of a previously decoded video block.
[1034] 19. The method of clause 18, wherein the previously decoded video block corresponds to a decoded block before in-loop filtering.
[1035] 20. The method of any of clauses 14-19, wherein a size of the buffer is as described in one of clauses 1-13.
[1036] 21. The method of any of clauses 1-20, wherein pixel positions within the buffer are addressed using an x number and a y number.
[1037] 22. The method of any of clauses 1-20, wherein pixel positions within the buffer are addressed using a single number that is expanded from 0 to M*N-1, where M and N are a pixel width and a pixel height of the buffer.
[1038] 23. The method of any of clauses 1-20, wherein the current bitstream representation includes a block vector for the conversion, wherein the block vector represented as (BVx, BVy) is equal to (x-x0, y-y0), wherein (x0, y0) corresponds to a top-left corner position of a coding tree unit of the current video block.
[1039] 24. The method of any of clauses 1-20, wherein the current bitstream representation includes a block vector for the conversion, wherein the block vector represented as (BVx, BVy) is equal to (x-x0+Tx, y-y0+Ty), wherein (x0, y0) corresponds to a top-left corner position of a coding tree unit of the current video block, and wherein Tx and Ty are offset values.
[1040] 25. The method of clause 24, wherein Tx and Ty are predefined offset values.
[1041] 26. The method of any of clauses 1-20, wherein, during the conversion, for a pixel at position (x0, y0) and having a block vector (BVx, BVy), the corresponding reference in the buffer is found at the reference position (x0+BVx, y0+BVy).
[1042] 27. The method of clause 26, wherein, in case the reference position is outside the buffer, the reference in the buffer is determined by clipping at the boundaries of the buffer.
[1043] 28. The method of clause 26, wherein, in case the reference position is outside the buffer, the reference in the buffer is determined to have a predetermined value.
[1044] 29. The method of any of clauses 1-20, wherein, during the conversion, for a pixel at position (x0, y0) and having a block vector (BVx, BVy), the corresponding reference in the buffer is found at the reference position ((x0+BVx) mod M, (y0+BVy) mod N), wherein "mod" is a modulo operation and M and N are integers representing the x-dimension and y-dimension of the buffer.
[1045] 30. A method of video processing, comprising: resetting, during a conversion between a bitstream representation of a video and a current video block, a buffer that stores reference samples for intra block copy coding at a video boundary; and performing the conversion using the reference samples stored in the buffer.
[1046] 31. The method of clause 30, wherein the video boundary corresponds to a new picture or a new slice.
[1047] 32. The method of clause 30, wherein the conversion is performed by updating a buffer with reconstructed values of virtual pipeline data units (VPDUs) after a reset.
[1048] 33. The method of clause 30, wherein the conversion is performed by updating a buffer with reconstructed values of coding tree units after a reset.
[1049] 34. The method of clause 30, wherein the reset is performed at the start of each coding tree unit row.
[1050] 35. The method of clause 1, wherein a size of the buffer corresponds to L 64x64 previously decoded blocks, where L is an integer.
[1051] 36. The method of any of clauses 1-35, wherein a vertical scan order is used to read samples in the buffer or store samples in the buffer during the conversion.
[1052] 37. A method of video processing, comprising: for a conversion between a current video block and a bitstream representation of the current video block, using a buffer to store reference samples of the current video block that use an intra block copy coding mode, wherein a first bit depth of the buffer is different from a second bit depth of coded data; and performing the conversion using the reference samples stored in the buffer.
[1053] 38. The method of clause 37, wherein the first bit depth is greater than the second bit depth.
[1054] 39. The method of any of clauses 37-38, wherein the first bit depth is the same as a bit depth of a reconstruction buffer used during the conversion.
[1055] 40. The method of any of clauses 37-39, wherein the first bit depth is signaled in the bitstream representation as a value or a difference value.
[1056] 41. The method of any of clauses 37-40, wherein the conversion uses different bit depths for a chroma component and a luma component.
[1057] Additional embodiments and examples of clauses 37-41 are described in item 7 of section 4.
[1058] 42. A method of video processing, comprising: performing a conversion between a current video block that uses an intra block copy mode and a bitstream representation of the current video block, wherein a first precision used for prediction calculations during the conversion is lower than a second precision used for reconstruction calculations during the conversion in the intra block copy mode.
[1059] 43. The method of clause 43, wherein the prediction calculation comprises determining the prediction sample value from the reconstructed sample value using clip{{p + [1 « (b - 1)]} » b, 0, (1 « bitdepth) - 1} « b, where p is the reconstructed sample value, b is a predefined bitshift value, and bitdepth is the prediction sample precision.
[1060] Additional embodiments and examples of clauses 42-43 are described in items 28-31 and 34 of section 4.
[1061] 44. A method of video processing, comprising: performing a conversion between a current video block using an intra block copy mode and a bitstream representation of the current video block, wherein in the intra block copy mode, a reference region of size nMxnM is used for a coding tree unit of size MxM, wherein n and M are integers, and wherein the current video block is in the coding tree unit, and wherein the reference region is a nearest available nxn-1 coding tree unit in a coding tree unit row corresponding to the current video block.
[1062] Additional embodiments and examples of clause 4 are described in item 35 of section 4.
[1063] 45. A method of video processing, comprising: performing a conversion between a current video block using an intra block copy mode and a bitstream representation of the current video block, wherein in the intra block copy mode, a reference region of size nMxnM is used for a coding tree unit other than MxM, wherein n and M are integers, and wherein the current video block is in the coding tree unit, and wherein the reference region is a nearest available nxn-1 coding tree unit in a coding tree unit row corresponding to the current video block.
[1064] Additional embodiments and examples of clause 4 are described in item 36 of section 4. Figure 8 and Figure 9 Additional example embodiments are shown.
[1065] 46. The method of clause 3, wherein M = mW and N = H, wherein W and H are a width and a height of a coding tree unit (CTU) of the current video block, and m is a positive integer.
[1066] 47. The method of clause 3, wherein M = W and N = nH, wherein W and H are a width and a height of a coding tree unit (CTU), and n is a positive integer.
[1067] 48. The method of clause 3, wherein M = mW and N = nH, wherein W and H are a width and a height of a coding tree unit (CTU), and m and n are positive integers.
[1068] 49. The method of any of clauses 46-48, wherein n and m depend on a size of the CTU.
[1069] 50. A method of video processing, comprising: for a conversion between a current video block of a video and a bitstream representation of the current video block, determining, using a component X of the video, a validity of a block vector corresponding to the current video block of a component c of the video, wherein the component X is different from a luma component of the video; and when the block vector is determined to be valid for the current video block, using the block vector to perform the conversion. Here, the block vector denoted as (BVx, BVy) is equal to (x-x0, y-y0), where (x0, y0) corresponds to a top-left position of a coding tree unit of the current video block.
[1070] 51. The method of clause 50, wherein the component c corresponds to a luma component of the video.
[1071] 52. The method of clause 50, wherein the current video block is a chroma block and the video is in 4:4:4 format.
[1072] 53. The method of clause 50, wherein the video is in 4:2:0 format and wherein the current video block is a chroma block that starts at position (x, y), and wherein the determining comprises determining the block vector to be invalid for a case where isRec(c, ((x+BVx)>>5< <5)+64-(((y+BVy)>>5)&1)*32+(x%32), ((y+BVy)>>5< <5)+(y%32)) is true.
[1073] 54. The method of clause 50, wherein the video is in 4:2:0 format and wherein the current video block is a chroma block that starts at position (x, y), and wherein the determining comprises determining the block vector to be invalid for a case where isRec(c, x+BVx+Chroma_CTU_size, y) is true.
[1074] 55. A method of video processing, comprising: for a conversion between a current video block of a current virtual pipeline data unit (VPDU) of a video region and a bitstream representation of the current video block, selectively determining to use K1 previously processed VPDU from a first row of the video region and K2 previously processed VPDU from a second row of the video region; and performing the conversion, wherein the conversion does not include using a remaining portion of the current VPDU.
[1075] 56. The method of clause 55, wherein K1 = 1 and K2 = 2.
[1076] 57. The method of any of clauses 55-56, wherein the current video block is selectively processed based on a size of the video region or a size of the current VPDU.
[1077] 58. A method of video processing, comprising: performing a validity check of a block vector for a conversion between a current video block and a bitstream representation of the current video block, wherein the block vector is used for an intra block copy mode; and selectively using the block vector during the conversion using a result of the validity check.
[1078] 59. The method of clause 58, wherein an intra block copy (IBC) buffer is used during the conversion, wherein a width and a height of the IBC buffer are Wbuf and Hbuf, a size of the current video block is WxH, and wherein the block vector is denoted as (BVx, BVy), and wherein the current video block is in a current picture having a size Wpic and Hpic and a coding tree unit having Wctu and Hctu as a width and a height, and wherein the validity check uses a predetermined rule.
[1079] 60. The method of any of clauses 58-59, wherein the current video block is a luma block, a chroma block, a coding unit CU, a transform unit TU, a 4x4 block, a 2x2 block, or a sub-block of a parent block, starting from pixel coordinates (X, Y).
[1080] 61. The method of any of clauses 58-60, wherein the validity check considers a block vector that falls outside a boundary of the current picture as valid.
[1081] 62. The method of any of clauses 58-60, wherein the validity check considers a block vector that falls outside a boundary of the coding tree unit as valid.
[1082] Clauses 23-30 in the previous section provide additional examples and variations of the above clauses 58-62.
[1083] 63. The method of any of clauses 1-62, wherein the conversion comprises generating the bitstream representation from the current video block.
[1084] 64. The method of any of clauses 1-62, wherein the conversion comprises generating pixel values of the current video block from the bitstream representation.
[1085] 65. A video encoder apparatus comprising a processor configured to implement a method recited in any one or more of clauses 1-62.
[1086] 66. A video decoder apparatus comprising a processor configured to implement a method recited in any one or more of clauses 1-62.
[1087] 67. A computer-readable medium having stored thereon code embodying processor-executable instructions for implementing a method according to any one or more of clauses 1-62.
[1088] Figure 7 is a block diagram of a hardware platform of a video / image processing device 700. The device 700 can be used to implement one or more of the methods described herein. The device 700 can be embodied in a smartphone, a tablet, a computer, an Internet of Things (IoT) receiver, etc. The device 700 can include one or more processors 702, one or more memories 704, and video processing hardware 706. The processor(s) 702 can be configured to implement one or more methods described in the present document, including but not limited to the method 600. The memory(ies) 704 can be used for storing data and code used for implementing the methods and techniques described herein. The video processing hardware 706 can be used to implement, in hardware circuitry, some of the techniques described in the present document.
[1089] A bitstream representation corresponding to a current video block need not be a contiguous set of bits and can be distributed across headers, parameter sets, and Network Abstraction Layer (NAL) units.
[1090] Section A: Another Additional Example Embodiment
[1091] In Section A, we present another example embodiment in which the current version of the VVC standard can be modified to implement some of the techniques described in the present document.
[1092] This section analyzes several issues in the current IBC reference buffer design and presents different designs to solve the issues. Instead of mixing with the decoding memory, an independent IBC reference buffer is proposed. Compared with the current anchor, the proposed scheme shows -0.99% / -0.71% / -0.79% AI / RA / LD-B brightness BD rate for Class F and -2.57% / -1.81% / -1.36% AI / RA / LD-B brightness BD rate for 4:2:0 TGM with 6.7% memory reduction; or -1.31% / -1.01% / -0.81% AI / RA / LD-B brightness BD rate for Class F and -3.23% / -2.33% / -1.71% AI / RA / LD-B brightness BD rate for 4:2:0 TGM with 6.7% memory increase.
[1093] A1. Introduction
[1094] Intra Block Copy, IBC (or Current Picture Reference, i.e. previous CPR) coding mode is adopted. It has been realized that IBC reference samples should be stored in on-chip memory, thus a limited reference region of one CTU is defined. To limit the extra on-chip memory for the buffer, the current design reuses the 64x64 memory for decoding the current VPDU, so that only 3 additional 64x64 block of memory is needed to support IBC. When the CTU size is 128x128, the reference region is currently shown in Figure 2 .
[1095] In the current draft (VVC Draft 4), the region is defined as:
[1096]
[1097]
[1098] Thus, the total reference size is CTU.
[1099] A2. Potential issues of the current design
[1100] The current design assumes that the 64x64 memory is reused for decoding the current VPDU, and accordingly aligns the IBC reference with the VPDU memory reuse. Such design bundles the VPDU decoding memory with the IBC buffer. There could be several issues:
[1101] 1. It could be an issue to handle smaller CTU. Assuming the CTU size is 32x32, it is unclear whether the current 64x64 memory for decoding the current VPDU can effectively support 32x32 level memory reuse in different architectures.
[1102] 2. The reference region changes significantly. Thus, too many bitstream conformance constraints are introduced. It puts extra burden on the encoder to effectively utilize the reference region and avoid generating a legal bitstream. It also increases the possibility of having invalid BVs in different modules (e.g. Merge list). To handle those invalid BVs, extra logic or extra conformance constraints could be introduced. It not only puts burden on the encoder or decoder, but also could cause the difference between BV coding and MV coding.
[1103] 3. The design does not scale well. Due to the mixing of VPDU decoding and IBC buffer, it is not easy to increase or decrease the reference region with respect to the current one 128x128 CTU design. This could limit the flexibility of exploiting better coding efficiency versus on-chip memory trade-off in later development (e.g. lower or higher profile).
[1104] 4. The bit-depth of IBC reference buffer is associated with the decoded buffer. Even though screen content usually has lower bit-depth than the internal decoded bit-depth, the buffer still needs to spend memory to store the bits that mainly represent rounding or quantization noise. This problem becomes more serious when considering higher decoded bit-depth configuration.
[1105] A3. Clear IBC buffer design
[1106] To solve the problems listed in the above subsection, we propose to utilize a dedicated IBC buffer, which is not mixed with the decoded memory.
[1107] For 128x128 CTU, the buffer is defined as 128x128 with 8-bit samples, when a CU(x, y) with size w x h has been decoded, its reconstruction before in-loop filtering is converted to 8-bit and written into the w x h block region starting from position (x%128, y%128). Here, the modulo operator % always returns positive number, i.e. for x<0, For example, -3%128 = 125.
[1108] Suppose pixel (x, y) is coded in IBC mode with BV = (BVx, BVy), its predicted sample in IBC reference buffer is at ((x+BVx)%128, (y+BVy)%128), and the pixel value will be converted to 10-bit before prediction.
[1109] When the buffer is considered as (W, H), after a CTU or CU starting from (x, y) is decoded, the reconstructed pixels before in-loop filtering will be stored in the buffer starting from (x%W, y%H). Therefore, after a CTU is decoded, the corresponding IBC reference buffer will be updated accordingly. Such setup can happen when the CTU size is not 128x128. For example, for 64x64 CTU, it can be considered as 256x64 buffer with the current buffer size. For 64x64 CTU, Figure 2 The buffer state is shown.
[1110] Figure 12 is an illustration of IBC reference buffer state, where the block represents 64x64 CTU.
[1111] In such design, because the IBC buffer is different from VPDU decoded memory, all IBC reference buffers can be used as reference.
[1112] When the bit-depth of the IBC buffer is 8 bits, the on-chip memory increases to (8*4) / (10*3)-100% = 6.7% compared to the current design which requires 3 additional 10-bit 64x64 buffers.
[1113] If we further reduce the bit-depth, the memory requirement can be further reduced. For example, for a 7-bit buffer, the on-chip memory saving is 100%-(7*4) / (10*3) = 6.7%.
[1114] In the case of this design, the only bitstream conformance constraint is that the reference block should be within the reconstructed region in the current CTU row of the current tile.
[1115] When initializing to 512 at the beginning of each CTU row is allowed, all bitstream conformance constraints can be removed.
[1116] A4. Experimental results
[1117] In some embodiments, the disclosed method can be implemented using VTM-4.0 software.
[1118] For the 10-bit buffer implementation and CTC, the decoder is fully compatible with the current VTM4.0 encoder, which means that the proposed decoder can correctly decode VTM-4.0 CTC bitstreams.
[1119] For the 7-bit buffer implementation, the results are shown in Table I
[1120] For the 8-bit buffer implementation, the results are shown in Table II.
[1121] Table I. Performance of 7-bit buffer. Anchor is VTM-4.0 with IBC on for all sequences.
[1122]
[1123]
[1124] Table II. Performance of 8-bit buffer. Anchor is VTM-4.0 with IBC on for all sequences.
[1125]
[1126]
[1127] Figure 17is a block diagram illustrating an example video processing system 1700 in which various techniques disclosed herein can be implemented. Various implementations can include some or all of the components of the system 1700. The system 1700 can include an input 1702 for receiving video content. The video content can be received in a raw or uncompressed format, e.g., 8 or 10 bit multi-component pixel values, or can be in a compressed or encoded format. The input 1702 can represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, Passive Optical Network (PON), etc., and wireless interfaces such as Wi-Fi or cellular interfaces.
[1128] The system 1700 can include a codec component 1704 that can implement various coding or encoding methods described in this document. The codec component 1704 can reduce the average bitrate of video from the input 1702 to the output of the codec component 1704 to produce a coded representation of the video. The coding techniques are thus sometimes referred to as video compression or video transcoding techniques. The output of the codec component 1704 can be stored, or transmitted via a communication connection as represented by component 1706. The stored or communicated bitstream (or coded) representation of the video received at the input 1702 can be used by component 1708 to generate pixel values or displayable video to a display interface 1710. The process of generating user-viewable video from a bitstream representation is sometimes referred to as video decompression. Furthermore, while certain video processing operations are referred to as “coding” operations or tools, it will be understood that the coding tools or operations are used at an encoder, and corresponding decoding tools or operations that reverse the results of the coding will be performed by a decoder.
[1129] Examples of peripheral bus interfaces or display interfaces can include Universal Serial Bus (USB), or High Definition Multimedia Interface (HDMI), or Displayport, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The techniques described in this document can be embodied in various electronic devices such as mobile telephones, laptop computers, smart phones, or other devices capable of performing digital data processing and / or video display.
[1130] Figure 18is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 1 in section 4 of this document. At step 1802, the process determines a size of a buffer to store reference samples for prediction in an intra block copy mode. At step 1804, the process performs a conversion between a current video block of visual media data and a bitstream representation of the current video block using the reference samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block in a same video region as the current video block and does not reference a reference picture.
[1131] Figure 19 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 4 in section 4 of this document. At step 1902, the process determines a buffer to store reconstructed samples for prediction in an intra block copy mode for a conversion between a current video block of visual media data and a bitstream representation of the current video block, wherein the buffer is used to store reconstructed samples before a loop filtering step. At step 1904, the process performs the conversion using the reconstructed samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block in a same video region as the current video block and does not reference a reference picture.
[1132] Figure 20 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 5 in section 4 of this document. At step 2002, the process determines a buffer to store reconstructed samples for prediction in an intra block copy mode for a conversion between a current video block of visual media data and a bitstream representation of the current video block, wherein the buffer is used to store reconstructed samples after a loop filtering step. At step 2004, the process performs the conversion using the reconstructed samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block in a same video region as the current video block and does not reference a reference picture.
[1133] Figure 21is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 6 in section 4 of this document. At step 2102, the process determines a buffer to store reconstructed samples for prediction in an intra block copy mode for a conversion between a current video block of visual media data and a bitstream representation of the current video block, wherein the buffer is used to store both reconstructed samples before a loop filtering step and reconstructed samples after the loop filtering step. At step 2104, the process performs the conversion using the reconstructed samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not reference a reference picture.
[1134] Figure 22 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 7 in section 4 of this document. At step 2202, the process stores reference samples for prediction in an intra block copy mode using a buffer, wherein a first bit depth of the buffer is different from a second bit depth used to represent visual media data in a bitstream representation. At step 2204, the process performs a conversion between a current video block of visual media data and a bitstream representation of the current video block using the reference samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not reference a reference picture.
[1135] Figure 23 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 8 in section 4 of this document. At step 2302, the process initializes a buffer to store reference samples for prediction in an intra block copy mode, wherein the buffer is initialized with a first value. At step 2304, the process performs a conversion between a current video block of visual media data and a bitstream representation of the current video block using the reference samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not reference a reference picture.
[1136] Figure 24is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 9 in section 4 of this document. At step 2402, the process initializes a buffer to store reference samples for prediction in an intra block copy mode, wherein the buffer is initialized with pixel values of one or more video blocks in the visual media data based on availability of the one or more video blocks in the visual media data. At step 2404, the process performs a conversion between a current video block that does not belong to the one or more video blocks in the visual media data and a bitstream representation of the current video block using the reference samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not refer to a reference picture.
[1137] Figure 25 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 14c in section 4 of this document. At step 2502, the process determines a buffer that stores reference samples for prediction in an intra block copy mode for a conversion between a current video block of the visual media data and a bitstream representation of the current video block. At step 2504, the process performs the conversion using the reference samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not refer to a reference picture. At step 2506, the process computes a corresponding reference (P mod M, Q mod N) in the buffer based on a reference location for a pixel that is located at a position (x0, y0) in the spatial domain and has a block vector (BVx, BVy) that is included in the motion information, wherein "mod" is a modulo operation and M and N are integers representing an x-dimension and a y-dimension of the buffer, wherein the reference location (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0).
[1138] Figure 26is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in conjunction with example embodiments 14a-14b in section 4 of this document. At step 2602, the process determines, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer that stores reference samples for prediction in an intra block copy mode. At step 2604, the process performs the conversion using the reference samples stored in the buffer, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not reference a reference picture. At step 2606, the process computes, for a pixel that is located at a position (x0, y0) in a spatial domain and has a block vector (BVx, BVy) that is included in the motion information, a corresponding reference in the buffer based on a reference position (P, Q), wherein the reference position (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0).
[1139] Figure 27 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in conjunction with example embodiment 10 in section 4 of this document. At step 2702, the process determines, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer that stores reference samples for prediction in an intra block copy mode, wherein pixel positions within the buffer are addressed using x-numbers and y-numbers. At step 2704, the process performs the conversion using the reference samples stored in the buffer based on the x-numbers and the y-numbers, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not reference a reference picture.
[1140] Figure 28is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 15 in section 4 of this document. At step 2802, the process determines, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer storing reference samples for prediction in an intra block copy mode, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the current video block and does not refer to a reference picture. At step 2804, the process computes, for a pixel located at a position (x0, y0) of the current video block in a spatial domain and having a block vector (BVx, BVy), a corresponding reference at a reference position (P, Q) in the buffer, wherein the reference position (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0). At step 2806, the process re-computes the reference position using a sample in the buffer when the reference position (P, Q) is determined to be located outside the buffer.
[1141] Figure 29 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 16 in section 4 of this document. At step 2902, the process determines, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer storing reference samples for prediction in an intra block copy mode, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block in a same video region as the current video block and does not refer to a reference picture. At step 2904, the process computes, for a pixel located at a position (x0, y0) of the current video block in a spatial domain and having a block vector (BVx, BVy), a corresponding reference at a reference position (P, Q) in the buffer, wherein the reference position (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0). At step 2906, the process constrains at least a portion of the reference position to be located within a predefined range when the reference position (P, Q) is determined to be located outside the buffer.
[1142] Figure 30is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 17 in section 4 of this document. At step 3002, the process determines, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer that stores reference samples for prediction in an intra block copy mode, wherein the conversion is performed in the intra block copy mode that is based on motion information related to a reconstructed block that is in a same video region as the current video block and does not refer to a reference picture. At step 3004, the process computes, for a pixel that is spatially located at a position (x0, y0) relative to a top-left corner position of a coding tree unit that includes the current video block and has a block vector (BVx, BVy), a corresponding reference at a reference position (P, Q) in the buffer, wherein the reference position (P, Q) is determined using the block vector (BVx, BVy) and the position (x0, y0). At step 1706, the process fills the block vector (BVx, BVy) from a block vector of a sample value that is inside the buffer when the block vector (BVx, BVy) is determined to be outside the buffer.
[1143] Figure 31 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 30 in section 4 of this document. At step 3102, the process resets, during a conversion between a video and a bitstream representation of the video, a buffer that stores reference samples for prediction in an intra block copy mode at a video boundary. At step 3104, the process performs the conversion using the reference samples stored in the buffer, wherein a conversion of a video block of the video is performed in the intra block copy mode that is based on motion information related to a reconstructed block that is in a same video region as the video block and does not refer to a reference picture.
[1144] Figure 32 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 34 in section 4 of this document. At step 3202, the process performs a conversion between a current video block and a bitstream representation of the current video block. At step 3204, the process updates a buffer that is used to store reference samples for prediction in an intra block copy mode, wherein the buffer is used for a conversion between a subsequent video block and a bitstream representation of the subsequent video block, wherein the conversion between the subsequent video block and the bitstream representation of the subsequent video block is performed in the intra block copy mode that is based on motion information related to a reconstructed block that is in a same video region as the subsequent video block and does not refer to a reference picture.
[1145] Figure 33is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 39 in section 4 of this document. At step 3302, the process determines, for a conversion between a current video block and a bitstream representation of the current video block, a buffer to store reconstructed samples for prediction in an intra block copy mode, wherein the conversion is performed in the intra block copy mode, wherein the intra block copy mode is based on motion information related to reconstructed blocks in a same video region as the current video block and does not reference reference pictures. At step 3304, the process applies a pre-processing operation to the reconstructed samples stored in the buffer in response to determining that the reconstructed samples stored in the buffer are to be used for predicting sample values during the conversion.
[1146] Figure 34 is a flowchart of an example method of visual data processing. The steps of this flowchart are discussed in connection with example embodiment 42 in section 4 of this document. At step 3402, the process selectively determines, for a conversion between a current video block of a current virtual pipeline data unit (VPDU) of a video region and a bitstream representation of the current video block, whether to use K1 previously processed VPDU's from even lines of the video region and / or K2 previously processed VPDU's from odd lines of the video region. At step 3404, the process performs the conversion, wherein the conversion does not include using a remaining portion of the current VPDU, wherein the conversion is performed in an intra block copy mode, wherein the intra block copy mode is based on motion information related to reconstructed blocks in a same video region as the video block and does not reference reference pictures.
[1147] Some embodiments of this document are now presented in clause-based format.
[1148] 1. A method of visual media processing, comprising:
[1149] resetting a buffer storing reference samples for prediction in an intra block copy mode at a video boundary during a conversion between a video and a bitstream representation of the video; and
[1150] performing the conversion using the reference samples stored in the buffer, wherein a conversion of a video block of the video is performed in an intra block copy mode, wherein the intra block copy mode is based on motion information related to reconstructed blocks in a same video region as the video block and does not reference reference pictures.
[1151] 2. The method of clause 1, wherein the video boundary corresponds to a new picture or a new slice.
[1152] 3. The method of clause 1, wherein the resetting comprises initializing the buffer with one or more predetermined values.
[1153] 4. The method of clause 1, wherein the one or more predetermined values are consistently equal to zero.
[1154] 5. The method of clause 1, wherein the one or more predetermined values are consistently equal to -1.
[1155] 6. The method of clause 1, wherein the conversion is performed by updating a buffer with reconstructed values of a virtual pipeline data unit (VPDU) after a reset.
[1156] 7. The method of clause 1, wherein the conversion is performed by updating a buffer with reconstructed values of a coding tree unit after a reset.
[1157] 8. The method of clause 7, wherein the buffer is sequentially updated in response to determining that the buffer is partially full.
[1158] 9. The method of clause 7, wherein a region of the buffer associated with an oldest coding tree unit is updated in response to determining that the buffer is completely full.
[1159] 10. The method of clause 7, wherein a size of the buffer is denoted as M = mW and N = H, where M and N represent x and y dimensions of the buffer, m is an integer, and W and H are integers representing a size of a coding tree unit, the method further comprising:
[1160] when it is determined that a previous update started at a location denoted as (kW, 0), calculating a next update location as ((k+1)W mod M, 0), where k is an integer.
[1161] 11. The method of clause 1, wherein the reset is performed at a start of each coding tree unit row.
[1162] 12. The method of clause 1, wherein the reset is performed at a start of a video boundary.
[1163] 13. The method of clause 1, wherein the reset is performed at a start of a picture or group.
[1164] 14. The method of any one of clauses 1-13, wherein the conversion comprises generating a bitstream representation from a current video block.
[1165] 15. The method of any one of clauses 1-13, wherein the conversion comprises generating pixel values of a current video block from a bitstream representation.
[1166] 16. A video encoder apparatus comprising a processor configured to implement a method recited in any one or more of clauses 1-13.
[1167] 17. A video decoder apparatus comprising a processor configured to implement a method recited in any one or more of clauses 1-13.
[1168] 18. A computer-readable medium having code stored thereon, the code embodying processor-executable instructions for implementing a method recited in any one or more of clauses 1-13.
[1169] In this document, the term “video processing” can refer to video encoding, video decoding, video compression, or video decompression. For example, a video compression algorithm can be applied during a conversion from a pixel representation of a video to a corresponding bitstream representation, or vice versa. The bitstream representation of a current video block can correspond, for example, to bits that are collocated or scattered elsewhere in a bitstream, as defined by a syntax. For example, a macroblock can be encoded according to transform and coded error residual values, and can also be encoded using bits in headers and other fields in the bitstream.
[1170] From the foregoing, it will be appreciated that specific embodiments of the presently disclosed technology have been described herein for purposes of illustration, but well-known modifications can be made by a person skilled in the art. Accordingly, the presently disclosed technology is not limited except as by the appended claims.
[1171] Implementations of the subject matter and the functional operations described in this patent document can be implemented in various systems, digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Implementations of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a tangible and non-transitory computer readable medium for execution by, or to control the operation of, data processing apparatus. The computer readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a combination of a
[1172] A computer program, which can also be referred to or referred to as a program, software, software application, script, or code, can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and are interconnected by a communication network.
[1173] The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, and the apparatuses can also be implemented as special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
[1174] Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for performing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer need not have such devices. Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
[1175] This specification and the accompanying drawings are intended to be exemplary, where exemplary means an example. As used in this document, the use of "or" is intended to include "and / or", unless the context clearly indicates otherwise.
[1176] While this patent document contains many specifics, these should not be construed as limiting the scope of any invention or of the patent or other rights to be awarded herein, but as merely providing description of particular embodiments of the inventions. Some features described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented separately or in any appropriate subcombination. Moreover, although features can be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination and the claimed combination can be directed to a subcombination or variation of a subcombination.
[1177] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring such order nor that all illustrated operations be performed to achieve desirable results. Additionally, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
[1178] Only a few implementations and examples are described and other implementations, enhancements and variations can be made based on what is described and illustrated in this patent document.
Claims
1. A method for visual media processing, comprising: During the conversion between the video and the video bitstream, the buffer storing reference samples for prediction in intra-block copy mode at video boundaries is reset; as well as The transformation is performed using the reference samples stored in the buffer, wherein the transformation of the video blocks of the video is performed in an intra-block copy mode, wherein the intra-block copy mode is based on motion information associated with a reconstructed block located in the same video region as the video block and does not refer to a reference image; The video boundary corresponds to a new image or a new video; The reset includes initializing all reference samples in the buffer with one or more predetermined values; The one or more predetermined values are all equal to -1; The transformation is performed by updating the buffer with the reconstructed values of the Virtual Pipeline Data Unit (VPDU) or the codec tree unit after the reset.
2. The method according to claim 1, wherein, In response to determining that the buffer is partially full, the buffer is updated sequentially.
3. The method according to claim 1, wherein, In response to determining that the buffer is completely full, the region of the buffer associated with the oldest codec tree unit is updated.
4. The method according to claim 1, wherein, The size of the buffer is represented as M = mW and N = H, where M and N represent the x-dimension and y-dimension of the buffer, m is an integer, and W and H are integers representing the size of the codec tree unit. The method further includes: When it is determined that the previous update started at the position denoted as (kW, 0), the next update position is calculated as ((k+1)W mod M, 0), where k is an integer.
5. The method according to claim 1, wherein, The reset is performed at the beginning of each codec tree unit row.
6. The method according to claim 1, wherein, The reset is performed at the beginning of the video boundary.
7. The method according to claim 1, wherein, The reset is performed at the beginning of the image or group.
8. The method according to any one of claims 1-7, wherein, The conversion includes encoding the video blocks to generate the bitstream.
9. The method according to any one of claims 1-7, wherein, The conversion includes decoding the video blocks from the bitstream.
10. A video encoder apparatus comprising a processor configured to implement the method according to any one of claims 1-8.
11. A video decoder apparatus comprising a processor configured to implement the method according to any one of claims 1-7, 9.
12. A computer-readable medium having code stored thereon, the code embodying processor-executable instructions for carrying out the method according to any one of claims 1-9.
Citation Information
Patent Citations
Method and apparatus for resource sharing between intra block copy mode and inter prediction mode in video coding systems
CN107615765A
Method of Intra Picture Block Copy for Screen Content and Video Coding
US20170280159A1