Encoding method, decoding method, decoder, and storage medium
Patent Information
- Application Number
- JP2025533201
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2025-12-05
AI Technical Summary
The existing video coding standard H.266/Versatile Video Coding (VVC) faces inefficiencies in chrominance prediction due to unreasonable setting of chrominance prediction modes, leading to inaccurate chrominance prediction and reduced coding efficiency, especially in Direct Mode (DM) when intra block copy (IBC) is used.
The proposed solution involves determining a second block vector parameter for a second color component based on a first block vector parameter of a first color component block, particularly for intra-predicted blocks, to enhance chroma prediction accuracy by utilizing related information from co-located luma blocks.
This approach improves encoding/decoding efficiency by accurately predicting chroma components, thereby saving bit rate and enhancing overall performance.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical Field]
[0001] TECHNICAL FIELD Embodiments of the present application relate to the technical field of video encoding and decoding, and in particular to an encoding and decoding method, a bitstream, an encoder, a decoder, and a storage medium. [Background technology]
[0002] As people's demands for video display quality increase, new video applications such as high-definition and ultra-high-definition video have emerged. The Joint Video Exploration Team (JVET) of the International Organization for Standardization (ISO / IEC) and ITU-T has developed the video coding standard H.266 / Versatile Video Coding (VVC). Here, intra block copy (IBC) is a block-level coding mode provided by VVC for video sequences of screen content type.
[0003] In the related art, in the case of Direct Mode (DM), when the luminance block uses IBC mode, the setting of the chrominance prediction mode at this time is unreasonable, so the chrominance prediction of the current block becomes inaccurate, resulting in reduced coding efficiency. Summary of the Invention [Problem to be solved by the invention]
[0004] The embodiments of the present application provide a coding / decoding method, a bitstream, an encoder, a decoder, and a storage medium that can save bit rate, improve coding / decoding efficiency, and enhance coding / decoding performance. [Means for solving the problem]
[0005] The technical solutions of the embodiments of the present application can be realized as follows. In a first aspect, an embodiment of the present application provides a decoding method applied to a decoder, the method comprising: determining a first color component block of the current block; determining second block vector parameters of a second color component block of the current block based on first block vector parameters of the first color component block when the first color component block is intra predicted based on block vectors; determining a predicted value of the second color component based on the second block vector parameters.
[0006] In a second aspect, embodiments of the present application provide an encoding method applied to an encoder, the method comprising: determining a first color component block of the current block; determining second block vector parameters of a second color component block of the current block based on first block vector parameters of the first color component block when the first color component block is intra predicted based on block vectors; determining a predicted value of the second color component based on the second block vector parameters.
[0007] In a third aspect, an embodiment of the present application provides a bitstream, wherein the bitstream is generated by performing bit coding based on information to be coded, and the information to be coded includes: The prediction mode identification information includes at least one of the color sampling format of the current block.
[0008] In a fourth aspect, an embodiment of the present application provides an encoder comprising a first determining unit, The first determination unit is configured to determine a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determine a second block vector parameter of the current block based on a first block vector parameter of the first color component block, and determine a predicted value of the second color component based on the second block vector parameter.
[0009] In a fifth aspect, embodiments of the present application provide an encoder comprising a first memory and a first processor; the first memory is configured to store a computer program executable by the first processor; The first processor is configured to execute the computer program to perform the method according to the first aspect.
[0010] In a sixth aspect, an embodiment of the present application provides a decoder comprising a second determination unit, The second determination unit is configured to determine a first color component block of the current block, and if the first color component block is intra predicted based on a block vector, determine second block vector parameters of a second color component block of the current block based on first block vector parameters of the first color component block, and determine a predicted value of the second color component based on the second block vector parameters.
[0011] In a seventh aspect, embodiments of the present application provide a decoder comprising a second memory and a second processor; the second memory is configured to store a computer program executable by the second processor; The second processor is configured to execute the computer program to perform the method according to the second aspect.
[0012] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program for implementing the method according to the first aspect or the method according to the second aspect. [Effects of the Invention]
[0013] The present embodiment provides an encoding / decoding method, an encoder, a decoder, and a storage medium, in which a codec determines a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determines a second block vector parameter of a second color component block based on a first block vector parameter of the first color component block, and determines a predicted value of the second color component based on the second block vector parameter. As can be seen, in the present embodiment, if a luma block corresponding to the current block is intra-predicted based on a block vector, determines a second block vector parameter to be applied to the chroma component based on the block vector parameter of the luma block, and predicts the chroma component using the second block vector parameter. In other words, the encoding / decoding method proposed in the present embodiment overcomes the problem of chroma prediction unity and fully utilizes related information of the co-located luma block to improve the accuracy of chroma prediction, thereby saving bit rate, improving encoding / decoding efficiency, and ultimately improving encoding / decoding performance. [Brief explanation of the drawings]
[0014] [Figure 1] 10 is an exemplary flowchart for obtaining reconstruction samples based on an IBC mode. [Figure 2] FIG. 10 is a schematic diagram illustrating the location distribution of adjacent blocks according to an embodiment of the present application; [Figure 3] 1 is a schematic diagram 1 showing the positional relationship between luminance CU and chromaticity CU according to an embodiment of the present application. [Figure 4A] 1 is a schematic block diagram of an encoder configuration according to an embodiment of the present application; [Figure 4B] FIG. 2 is a schematic block diagram of a decoder architecture according to an embodiment of the present application; [Figure 5] 1 is a schematic diagram of a network architecture of an encoding / decoding system according to an embodiment of the present application; [Figure 6] FIG. 1 is a schematic diagram of a decoding method. [Figure 7]10 is a schematic diagram 2 showing the positional relationship between luminance CU and chromaticity CU according to an embodiment of the present application. [Figure 8] 3 is a schematic diagram 3 showing the positional relationship between luminance CU and chromaticity CU according to an embodiment of the present application. [Figure 9] 4 is a schematic diagram 4 showing the positional relationship between luminance CU and chromaticity CU according to an embodiment of the present application. [Figure 10] 5 is a schematic diagram showing the positional relationship between luminance CU and chromaticity CU according to an embodiment of the present application. [Figure 11] FIG. 10 is a schematic diagram of a structure indicating whether an offset position does not overlap with a current block according to an embodiment of the present application; [Figure 12] FIG. 10 is a schematic diagram of a structure that indicates whether an offset position exceeds a predetermined available area, according to an embodiment of the present application. [Figure 13] FIG. 1 is a schematic diagram of a structure illustrating the determination of optimal chromaticity BV parameters according to an embodiment of the present application. [Figure 14] FIG. 10 is a schematic diagram showing the coordinates and block size of the luminance region at the same position as the current chrominance block. [Figure 15] FIG. 10 is a schematic diagram of a co-located luminance region search according to an embodiment of the present application; [Figure 16] 1 is a schematic diagram of a template type according to an embodiment of the present application; [Figure 17] FIG. 1 is a schematic diagram of template motion compensation according to an embodiment of the present application; [Figure 18] FIG. 10 is an exemplary structural diagram of performing block copy based on IBC extension mode according to an embodiment of the present application; [Figure 19] FIG. 1 is a schematic diagram of an encoding method. [Figure 20] 2 is a schematic diagram of a detailed process of an encoding method according to an embodiment of the present application; [Figure 21] FIG. 2 is a detailed process schematic diagram of another encoding method according to an embodiment of the present application; [Figure 22] FIG. 2 is an exemplary structural diagram of an encoder configuration according to an embodiment of the present application; [Figure 23] FIG. 2 is a schematic diagram of a specific hardware structure of an encoder according to an embodiment of the present application; [Figure 24] FIG. 2 is an exemplary structural diagram of a decoder configuration according to an embodiment of the present application; [Figure 25] 2 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application; [Figure 26] 1 is an exemplary structural diagram of a configuration of an encoding / decoding system according to an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION
[0015] In order to allow a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the drawings, which are for reference and explanation purposes only and are not intended to limit the embodiments of the present application.
[0016] Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terms used herein are for the purpose of describing the present application only and are not intended to be limiting of the present application.
[0017] In the following description, the term "some embodiments" refers to a subset of all possible embodiments, and it is understood that the term "some embodiments" may refer to the same or different subsets of all possible embodiments, which can be combined with each other without contradiction. The terms "first / second / third" used in the embodiments of the present application are merely used to distinguish between similar objects and do not represent a particular order of the objects. It should be understood that "first / second / third" can, in some cases, be interchangeable with a particular order or precedence order, thereby allowing the embodiments of the present application described herein to be performed in an order other than that shown or described.
[0018] Before describing the embodiments of the present application in more detail, the nouns and terms used in the embodiments of the present application will be explained. The nouns and terms used in the embodiments of the present application are interpreted as follows.
[0019] Coding Block (CB); Intra block copy (IBC); Screen Content Coding (SCC); Block Matching (BM); Coding Unit (CU); Block Vector (BV); Motion Vector (MV); Direct Block Vector (DBV); Advanced Motion Vector Prediction (AMVP); Cross-Component Linear Model Prediction (CCLM); Merge Mode; Planar Mode; H.266 / Versatile Video Coding (VVC); VVC's reference software test platform (VTM: VVC Test Model).
[0020] In a video image, a coding block is generally represented by a first color component, a second color component, and a third color component, where these three color components are one luminance component, one blue chrominance component, and one red chrominance component, respectively; specifically, the luminance component is usually represented by the symbol "Y", the blue chrominance component is usually represented by the symbol "Cb" or "U", and the red chrominance component is usually represented by the symbol "Cr" or "V". In this way, a video image can be represented in either a YCbCr format or a YUV format.
[0021] Furthermore, IBC is an extension tool in VVC for encoding video sequences of screen content type, which can significantly improve the encoding efficiency of screen content sequences. Specifically, IBC is a block-level encoding mode. Similar to the interframe technique, the encoding side performs motion search, specifically, finds the optimal block vector of each CU through block matching, also referred to as a motion vector. Here, the block vector is a vector that points from the current block to the reference block. Unlike the interframe technique, the optimal block vector of IBC is obtained by searching in the reconstruction domain of the frame where the current block is located (i.e., the current encoding frame), while the motion vector of an interframe is obtained by searching in an adjacent reference frame in the temporal domain of the current encoding frame.
[0022] In H.266 / VVC, the specific process of obtaining reconstructed pixels of the current block in IBC mode may include deriving a block vector, deriving a predicted sample using the block vector, deriving a residual sample, and deriving a reconstructed sample using the predicted sample and the residual sample.
[0023] In one specific implementation, the process of obtaining reconstruction samples in IBC mode may include the following steps, as shown in FIG.
[0024] In step S101, a block vector is derived.
[0025] For the luma component, the input includes a luma location (xCb, yCb) that specifies the top-left sample of the current block relative to the top-left luma sample of the current image, a variable cbWidth that specifies the width of the current block in luma samples, and a variable cbHeight that specifies the height of the current block in luma samples. The output includes a luma block vector (bvL). Note that the current block containing luma samples is also called the "luma block."
[0026] Here, IBC mode is divided into IBC MERGE mode and IBC AMVP mode. When deriving bvL, both modes need to construct an IBC block vector candidate list bvCandList. The following describes in detail the construction process of the IBC MERGE list. Here, the construction process of the IBC AMVP list is the same as that of the IBC MERGE list, but the maximum number of candidates for the two is different.
[0027] In step 1, if IsGt4by4 is TRUE (the variable IsGt4by4 is TRUE when the product of the width and height of the luminance block is greater than 16), the process for deriving spatial block vector candidates from neighboring coding units, as specified in the decoding specification, is invoked using the luminance block position (xCb, yCb), the luminance block width cbWidth, and the luminance block height cbHeight as inputs. The output is the availability flags availableFlagA1 and availableFlagB1, and the block vectors bvA1 and bvB1. Here, the relative positions of the neighboring blocks A1 and B1 to the current block are as shown in Figure 2.
[0028] In step 2, if IsGt4by4 is TRUE, the pseudocode for constructing the block vector candidate list bvCandList is as follows:
[0029] i=0 if(availableFlagA1) bvCandList[i++]=bvA1 if(availableFlagB1) bvCandList[i++]=bvB1 In step 3, the process of deriving the variable numCurrCand (the number of currently obtained candidates) is as follows.
[0030] If IsGt4by4 is TRUE, then numCurrCand is set equal to the number of candidates in bvCandList; otherwise, numCurrCand is set to 0.
[0031] In step 4, if numCurrCand is smaller than MaxNumIbcMergeCand (the maximum number of candidates in MERGE mode) and NumHmvpIbcCand (the maximum number of candidates for history-optimized block vectors Hmvp in IBC mode) is greater than 0, the history-based IBC block vector candidate derivation process specified in the decoding standard is called with bvCandList and numCurrCand as inputs and the modified bvCandList and numCurrCand as outputs.
[0032] In step 5, if numCurrCand is less than MaxNumIbcMergeCand, apply the following until numCurrCand is equal to MaxNumIbcMergeCand:
[0033] Set bvCandList[numCurrCand][0] (horizontal component of BV) to 0.
[0034] Set bvCandList[numCurrCand][1] (vertical component of BV) to 0.
[0035] Increase numCurrCand by 1.
[0036] In this way, the block vector candidate list bvCandList is established, and the candidate index bvIdx is derived in the following manner, and general_merge_flag indicates whether it is an IBC MERGE mode.
[0037] bvIdx=general_merge_flag[xCb][yCb]?merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb] In this way, a specific bvL can be obtained based on the index bvIdx and the block vector candidate list bvCandList.
[0038] bvL[0]=bvCandList[bvIdx][0] bvL[1]=bvCandList[bvIdx][1] In the IBC AMVP mode, a specific bvL can be obtained as the predicted bvL using the index bvIdx and the block vector candidate list bvCandList, and the true bvL needs to further add the block vector difference (BVD), and the specific process is as follows:
[0039] In step 1, obtain the horizontal and vertical components of BVD, where MvdL0 is the forward motion vector differential, the horizontal component of BVD is represented by bvd[0], and the vertical component of BVD is represented by bvd[1], as follows:
[0040] bvd[0]=MvdL0[xCb][yCb][0] bvd[1]=MvdL0[xCb][yCb][1] In step 2, a rounding operation is performed on the prediction bvL obtained above, where the right shift parameter AmvrShift is used for rounding and the left shift parameter AmvrShift is used for improving the resolution. Specifically,
[0041] Offset=(AmvrShift==0)?0:((1<<(AmvrShift-1))-1) bvL[0]=Sign(bvL[0])*(((Abs(bvL[0])+offset)>>AmvrShift)< <AmvrShift) bvL[1]=Sign(bvL[1])*(((Abs(bvL[1])+offset)>>AmvrShift)< <AmvrShift) In step 3, for true bvL, the range is -2 17 From 2 17 It is necessary to keep it between -1, and the specific derivation process is as follows:
[0042] u[0]=(bvL[0]+bvd[0]+2 18 )%2 18 bvL[0]=(u[0]>=2 17 )?(u[0]-2 18 ):u[0] u[1]=(bvL[1]+bvd[1]+2 18 )%2 18 bvL[1]=(u[1]>=2 17 )?(u[1]-2 18 ):u[1] Regarding the chrominance components, in the case of binary tree division, the IBC mode is not applied to the chrominance components, and in the case of single tree division, the BV of the chrominance components needs to be derived.
[0043] Here, the input includes luminance bvL (1 / 16 pixel accuracy), and the output includes chromaticity block vector (bvC: Block Vector Chroma) (1 / 32 pixel accuracy). The specific derivation process is as follows:
[0044] bvC[0]=((bvL[0]>>(3+SubWidthC))*32) bvC[1]=((bvL[1]>>(3+SubHeightC))*32) In step S102, a prediction sample is derived using the block vector.
[0045] Here, the inputs include a luma location (xCb, yCb) specifying the top-left corner sample of the current block relative to the top-left corner luma sample of the current image, a variable cbWidth specifying the width of the current block in luma samples, a variable cbHeight specifying the height of the current block in luma samples, a block vector BV, and a variable cIdx specifying the color component index of the current block. The output includes an array of predicted samples, predSamples.
[0046] Regarding the predicted sample, the specific derivation process is as follows:
[0047] If cIdx is 0, i.e. for the luminance component, then for x=xCb...xCb+cbWidth-1 and y=yCb...yCb+cbHeight-1, then:
[0048] xVb=(x+(bv[0]>>4))&(IbcBufWidthY-1) yVb=(y+(bv[1]>>4))&(CtbSizeY-1) predSamples[x][y]=ibcVirBuf[0][xVb][yVb] Here, IbcBufWidthY is the width of the luminance pixels in the reconstruction buffer unit (Buffer) stored in the IBC, CtbSizeY is the size of the CTU (Coding Tree Unit), and ibcVirBuf is the reconstruction pixels stored in the IBC.
[0049] If cIdx is not 0, i.e., for the chromaticity components, for x=xCb / SubWidthC...xCb / SubWidthC+cbWidth / SubWidthC-1 and y=yCb / SubHeightC...yCb / SubHeightC+cbHeight / SubHeightC-1, then:
[0050] xVb=(x+(bv[0]>>5))&(IbcBufWidthC-1) yVb=(y+(bv[1]>>5))&((CtbSizeY / subHeightC)-1) predSamples[x][y]=ibcVirBuf[cIdx][xVb][yVb] Here, the variables SubWidthC and SubHeightC specifically depend on the chromaticity sampling format specified by sps_chroma_format_idc, and the specific correspondence is as shown in Table 1.
[0051] [Table 1]
[0052] In step S103, residual samples are derived.
[0053] A residual decoding process as specified in the decoding paradigm can be invoked on the residual samples.
[0054] In step S104, the prediction samples and residual samples are used to derive reconstructed samples.
[0055] On the reconstructed samples (ie, reconstructed pixel values), an image reconstruction process for a specified color component as defined in the decoding paradigm can be invoked.
[0056] In another specific implementation, for the chrominance prediction mode derivation process in H.266 / VVC, the inputs include a luma position (xCb, yCb) specifying the top-left corner sample of the current block relative to the top-left corner luma sample of the current image, a variable cbWidth specifying the width of the current block in luma samples, a variable cbHeight specifying the height of the current block in luma samples, and a variable treeType specifying whether to use single-tree or binary-tree partitioning. The outputs include a chrominance intra prediction mode IntraPredModeC[xCb][yCb] and a MIP chrominance direct mode flag MipChromaDirectFlag[xCb][yCb].
[0057] If treeType is SINGLE_TREE, i.e., in the case of single tree division, sps_chroma_format_idc is equal to 3, i.e., 4:4:4 format, intra_chroma_pred_mode is 4, and IntraMipFlag[xCb][yCb] is 1, i.e., the prediction mode corresponding to the co-located luminance center block is MIP mode, the following holds:
[0058] (1) The MIP chrominance direct mode flag MipChromaDirectFlag[xCb][yCb] is set to 1, that is, chrominance uses the luma MIP mode.
[0059] (2) The chrominance intra-prediction mode IntraPredModeC[xCb][yCb] is set equal to IntraPredModeY[xCb][yCb].
[0060] Otherwise, the following holds:
[0061] (1) The MIP chromaticity direct mode flag MipChromaDirectFlag[xCb][yCb] is set to 0.
[0062] (2) The corresponding luma intra prediction mode lumaIntraPredMode is derived as follows.
[0063] If IntraMipFlag[xCb+cbWidth / 2][yCb+cbHeight / 2] is 1, lumaIntraPredMode is set equal to INTRA_PLANAR.
[0064] Otherwise, if CuPredMode[0][xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to MODE_IBC or MODE_PLT, set lumaIntraPredMode equal to INTRA_DC.
[0065] Here, if the IntraTmp mode is newly introduced in the ECM, CuPredMode[0][xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to MODE_INTRA and the mode is IntraTmp, lumaIntraPredMode is set equal to INTRA_PLANAR.
[0066] Otherwise, lumaIntraPredMode is set equal to IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2].
[0067] (3) The chrominance intra prediction mode IntraPredModeC[xCb][yCb] is derived as follows.
[0068] If cu_act_enabled_flag[xCb][yCb] is 1, set the chrominance intra prediction mode IntraPredModeC[xCb][yCb] equal to lumaIntraPredMode.
[0069] If not, If BdpcmFlag[xCb][yCb][1] is 1, set IntraPredModeC[xCb][yCb] equal to BdpcmDir[xCb][yCb][1]?INTRA_ANGULAR50:INTRA_ANGULAR18.
[0070] Otherwise, if cu_act_enabled_flag[xCb][yCb] is 0 and BdpcmFlag[xCb][yCb][1] is 0, the chrominance intra prediction mode IntraPredModeC[xCb][yCb] uses cclm_mode_flag, cclm_mode_idx, intra_chroma_pred_mode and lumaIntraPredMode specified in Table 2.
[0071] [Table 2]
[0072] When sps_chroma_format_idc is 2, chrominance intra prediction mode X in Table 2 can be used to derive chrominance intra prediction mode Y, specifically, refer to the mapping process standard from mode X to mode Y shown in Table 3, and then set chrominance intra prediction mode X equal to chrominance intra prediction mode Y.
[0073] [Table 3]
[0074] In yet another specific implementation, for the DM mode, the DM mode refers to directly using the luminance prediction mode information of the corresponding position.
[0075] When an I-frame uses binary tree partitioning, it is allowed to use a block partitioning structure in which the luma component and the chroma component are independent. In this case, the luma component at the corresponding position of a chroma CU may contain multiple luma CUs. As shown in Figure 3, in H.266 / VVC, a chroma CU inherits the intra prediction mode of the central CU of the corresponding luma block, i.e., intra_chroma_pred_mode is equal to 4.
[0076] Here, the specific description of the CU position acquired in the DM mode is as follows.
[0077] The luminance position (xCb, yCb) specifies the upper left corner luminance sample of the luminance area corresponding to the current block relative to the position of the upper left corner luminance sample of the current image, the variable cbWidth specifies the width of the current block in luminance samples, and the variable cbHeight specifies the height of the current block in luminance samples.
[0078] The positional relationship between the current chromaticity CU and the corresponding luma area is as shown in Figure 3, and the central luma pixel position of the luma area corresponding to the current chromaticity CU is explained as follows: where xCenter represents the horizontal coordinate position, yCenter represents the vertical coordinate position, and the CU containing the pixel position is the CU at the center position of the luma block corresponding to the chromaticity CU.
[0079] xCenter=xCb+cbWidth>>1 yCenter=yCb+cbHeight>>1 In yet another specific implementation, for the decoding process of chromaticity prediction in H.266 / VVC, the decoding process is as shown in Table 4. Also, for the value of the syntax element Value of intra_chroma_pred_mode, the corresponding binarization mapping table is as shown in Table 5, and for different syntax elements (e.g., cclm_mode_flag, cclm_mode_idx, and intra_chroma_pred_mode, etc.), the coding method used for each coded bit is specifically as shown in Table 6.
[0080] [Table 4]
[0081] [Table 5]
[0082] [Table 6]
[0083] Here, binIdx represents a bit position, and when binIdx=0, it represents the 0th bit, and when binIdx=1, it represents the 1st bit. Furthermore, bypass represents the bypass mode, and na represents no processing.
[0084] In the related art, in binary tree partitioning, for DM mode, if the corresponding luminance block is IBC mode, the obtained chrominance prediction mode is DC mode, which reduces coding efficiency. This is because, if chrominance prediction is performed using a fixed DC mode, all predicted pixels will have the same value, making it impossible to express the chrominance texture feature content of the current block. Furthermore, chrominance prediction does not use information on the co-located luminance block in IBC mode. Similarly, there is no prediction algorithm for block copying like IBC, so video sequences such as screen content cannot be effectively compressed. In short, the current chrominance prediction mode is relatively simple, which makes the chrominance prediction of the current block inaccurate, thereby reducing coding efficiency.
[0085] To solve the above problems, embodiments of the present application provide an encoding / decoding method, an encoder, a decoder, and a storage medium, in which a codec determines a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determines a second block vector parameter of a second color component block based on a first block vector parameter of the first color component block, and determines a predicted value of the second color component based on the second block vector parameter. As can be seen from this, in embodiments of the present application, if a luma block corresponding to the current block is intra-predicted based on a block vector, a second block vector parameter applied to the chroma component can be determined based on the block vector parameter of the luma block, and the chroma component can be predicted using the second block vector parameter. In other words, the encoding / decoding method proposed in embodiments of the present application overcomes the problem of unity of chroma prediction and fully utilizes related information of the co-located luma block to improve the accuracy of chroma prediction, thereby saving bit rate, improving encoding / decoding efficiency, and ultimately improving encoding / decoding performance.
[0086] Hereinafter, each embodiment of the present invention will be described in detail with reference to the drawings.
[0087] 4A, a schematic block diagram of an encoder according to an embodiment of the present application is shown. As shown in FIG. 4A, an encoder (specifically, a "video encoder") 100 includes a transform and quantization unit 101, an intra estimation unit 102, an intra prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control analysis unit 107, a filtering unit 108, an encoding unit 109, and a decoded image buffer unit 110. Here, the filtering unit 108 can realize deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 can realize header information coding and context-based adaptive binary arithmetic coding (CABAC). For an input original video signal, a video coding block can be obtained by dividing a coding tree unit (CTU). Then, for residual pixel information obtained by intra prediction or inter prediction, the transform and quantization unit 101 transforms the video coding block, which includes converting the residual information from the pixel domain to a transform domain and quantizing the obtained transform coefficients, thereby further reducing the bit rate. The intra estimation unit 102 and the intra prediction unit 103 are configured to perform intra prediction on the video coding block. Specifically, the intra estimation unit 102 and the intra prediction unit 103 are configured to determine an intra prediction mode to be used for encoding the video coding block. The motion compensation unit 104 and the motion estimation unit 105 are configured to perform inter prediction coding on one or more blocks in one or more reference frames for the received video coding block to provide temporal prediction information.The motion estimation performed by the motion estimation unit 105 is a process of generating a motion vector, which is used to estimate the motion of the video coding block. The motion compensation unit 104 then performs motion compensation based on the motion vector determined by the motion estimation unit 105. After the intra prediction mode is determined, the intra prediction unit 103 is further configured to provide the selected intra prediction data to the coding unit 109, and the motion estimation unit 105 is configured to send the calculated motion vector data to the coding unit 109. The inverse transform and inverse quantization unit 106 is further configured to reconstruct the video coding block. The residual block is reconstructed in the pixel domain, the reconstructed residual block is subjected to blocking artifact removal by the filter control analysis unit 107 and the filtering unit 108, and the reconstructed residual block is added to a prediction block in a frame in the decoded image buffer unit 110 to generate a reconstructed video coding block. The encoding unit 109 is configured to encode various coding parameters and quantized transform coefficients, and in a CABAC-based encoding algorithm, the context content is based on neighboring coding blocks, and encodes information indicating a determined intra-prediction mode, which can be used to output a bitstream of the video signal. The decoded image buffer unit 110 is configured to store reconstructed video coding blocks used for prediction reference. As the encoding of the video image progresses, new reconstructed video coding blocks are continuously generated, and all of these reconstructed video coding blocks are stored in the decoded image buffer unit 110.
[0088] Referring to FIG. 4B, a schematic block diagram of a decoder configuration according to an embodiment of the present application is shown. As shown in FIG. 4B, a decoder (specifically, a "video decoder") 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image buffer unit 206. Here, the decoding unit 201 can realize header information decoding and CABAC decoding, and the filtering unit 205 can realize deblocking filtering and SAO filtering. After performing the encoding process shown in FIG. 4A on an input video signal, a bitstream of the video signal is output. The bitstream is input to the decoder 200. First, the decoding unit 201 processes the decoded transform coefficients to obtain decoded transform coefficients. The transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate residual blocks in the pixel domain. The intra prediction unit 203 is configured to generate prediction data of a current video decoded block based on a determined intra prediction mode and data of a previous decoded block from a current frame or picture. The motion compensation unit 204 is configured to determine prediction information for a video decoded block by analyzing the motion vectors and other related syntax elements, and use the prediction information to generate a prediction block for the video decoded block currently being decoded. A decoded video block is formed by adding the residual block from the inverse transform and inverse quantization unit 202 and the corresponding prediction block generated by the intra prediction unit 203 or the motion compensation unit 204. The decoded video signal is filtered by the filtering unit 205 to remove blocking artifacts and improve video quality, and the decoded video block is stored in the decoded image buffer unit 206, which stores reference images used for subsequent intra prediction or motion compensation, and also outputs a video signal, i.e., a restored original video signal is obtained.
[0089] Furthermore, the present embodiment further provides a network architecture of an encoding / decoding system including an encoder and a decoder, where FIG. 5 is a schematic diagram of the network architecture of the encoding / decoding system according to the present embodiment. As shown in FIG. 5, the network architecture includes one or more electronic devices 13-1N and a communication network 01, where the electronic devices 13-1N can perform video interaction through the communication network 01. In the implementation process, the electronic devices may be various types of devices with video encoding / decoding functions, for example, smartphones, tablet computers, personal computers, personal digital assistants, navigation devices, digital telephones, video telephones, televisions, sensing devices, servers, etc., and the present embodiment is not particularly limited thereto. Here, the decoder or encoder described in the present embodiment may be the above-mentioned electronic devices.
[0090] It should be noted that the method of the embodiment of the present application is mainly applied to the intra prediction unit 103 shown in Fig. 4A and the intra prediction unit 203 shown in Fig. 4B. That is, the embodiment of the present application may be applied to an encoder, a decoder, or even to both an encoder and a decoder simultaneously, but the embodiment of the present application is not limited thereto.
[0091] It should be further noted that when applied to intra prediction unit 103, the "current block" specifically refers to the coded block currently being intra predicted, and when applied to intra prediction unit 203, the "current block" specifically refers to the decoded block currently being intra predicted.
[0092] An embodiment of the present application provides a decoding method, which is applied to a decoder. FIG. 6 is a schematic diagram of the decoding method. As shown in the drawing, the method by which the decoder performs decoding processing may include the following steps:
[0093] In step 101, the first color component block of the current block is determined.
[0094] The method of the present embodiment can be applied to an encoder or a decoder. The prediction mode here may specifically refer to an intra prediction mode. Here, assuming that the first color component is a luma component and the second color component is a chroma component, more specifically, this is a method for determining a chroma intra prediction mode.
[0095] It should be further noted that in the present embodiment, the current block includes at least a first color component and a second color component. If the current block is the first color component, the current block can be referred to as a first color component block, and if the first color component is a luma component, the first color component block can also be referred to as a luma block. Similarly, if the current block is the second color component, the current block can be referred to as a second color component block, and if the second color component is a chroma component, the second color component block can also be referred to as a chroma block.
[0096] It should be further noted that in binary tree partitioning, for DM mode, when the prediction mode of the co-located luminance block is IBC mode, the embodiment of the present application can determine the block vector (BV) information corresponding to the chrominance of the current block based on the BV information of the co-located luminance block, and further perform intra prediction processing using the BV information of the chrominance block, thereby improving the uniformity of chrominance prediction and thereby improving coding efficiency.
[0097] In some embodiments, determining the first color component block of the current block may include determining a first color component region at the same position of the current block, and determining the first color component block of the current block from a plurality of blocks divided from the first color component region.
[0098] In addition, in the embodiment of the present application, in the first color component area at the same position, block division can be performed on the current block, for example, using a binary tree structure, a ternary tree structure, a quad tree structure, etc., to obtain multiple blocks, each of which can be regarded as one CU, and then the first color component block of the current block is determined from these multiple CUs.
[0099] 3, the shaded area represents the in-position luminance area of the chrominance CU. The in-position luminance area may be divided into multiple blocks, and the central block among these blocks may be selected as the luminance block corresponding to the current block. For example, in FIG. 3, the black-filled block is the luminance block corresponding to the current block.
[0100] Further, in some embodiments, determining the first color component block of the current block from the plurality of blocks divided from the first color component region may include selecting a target block from the plurality of blocks divided from the first color component region, and setting the target block as the first color component block of the current block.
[0101] Here, the target block may be a block at any position. In one specific embodiment, a block at the center of the first color component region is selected as the target block, or a block at the upper left corner of the first color component region is selected as the target block, or a block at the lower right corner of the first color component region is selected as the target block.
[0102] It should be understood that in the embodiment of the present application, the target block as the first color component block may be a block at any position among the multiple blocks shown in Fig. 3. For example, it may be a block (filled with black) at the center of the same-position luminance area shown in Fig. 3, a block (filled with black) at the upper left corner of the same-position luminance area shown in Fig. 7, or a block (filled with black) at the lower right corner of the same-position luminance area shown in Fig. 8, or even a block at the upper right corner or lower left corner of the same-position luminance area, or even a block at the center of the upper left area, and is not particularly limited here.
[0103] Furthermore, in an embodiment of the present application, when selecting a target block from multiple blocks divided from a first color component area, first, the position information of the current block is determined, and then a scaling process is performed on the position information of the current block based on a predetermined sampling format (color sampling format), thereby obtaining the same-position area position information corresponding to the current block, and further, the target position information is determined based on the same-position area position information, and the block containing the target position information can be set as the target block.
[0104] It can be seen that in some embodiments, the mapping relationship between the position information (x,y) of the chroma block and the position information (xCb,yCb) of the scaled luma block is as shown in Table 7.
[0105] [Table 7]
[0106] For example, in an embodiment of the present application, when selecting a block located at the center of the first color component region as the target block, the position of the current chroma block, i.e., the position chromaPos=(x,y) of the upper-left corner chroma sample of the current chroma block relative to the upper-left corner chroma sample of the current image, is obtained, and chromaPos is scaled based on the chroma sampling format to obtain the luma region position lumaPos=(xCb,yCb) of the same position corresponding to the current chroma block. Assume that the position of the luma pixel corresponding to the upper-left corner of the current chroma-coding block relative to the upper-left corner luma pixel of the image is (xCb,yCb), and the width and height of the luma region corresponding to the current chroma-coding block are cbWidth and cbHeight, respectively. The block located at the center of the luma region is the luma block (the block filled with black in FIG. 3 ) with position coordinates (xCb+cbWidth>>1, yCb+cbHeight>>1).
[0107] For example, in an embodiment of the present application, when selecting a block located at the upper left corner of the first color component region as the target block, the position of the current chroma block, i.e., the position chromaPos=(x,y) of the upper left corner chroma sample of the current chroma block relative to the upper left corner chroma sample of the current image, is obtained, and chromaPos is scaled based on the chroma sampling format to obtain the luma region position lumaPos=(xCb,yCb) of the same position corresponding to the current chroma block. Assume that the position of the luma pixel corresponding to the upper left corner of the current chroma-coding block relative to the upper left corner luma pixel of the image is (xCb,yCb), and the width and height of the luma region corresponding to the current chroma-coding block are cbWidth and cbHeight, respectively. The block located at the upper left corner of the luma region is the luma block (the block filled with black in FIG. 7) with position coordinates (xCb,yCb).
[0108] For example, in an embodiment of the present application, when selecting a block located at the lower right corner of the first color component region as the target block, the position of the current chroma block, i.e., the position chromaPos=(x,y) of the upper left corner chroma sample of the current chroma block relative to the upper left corner chroma sample of the current image, is obtained, and chromaPos is scaled based on the chroma sampling format to obtain the luma region position lumaPos=(xCb,yCb) of the same position corresponding to the current chroma block. Assume that the position of the luma pixel corresponding to the upper left corner of the current chroma-coding block relative to the upper left corner luma pixel of the image is (xCb,yCb), and the width and height of the luma region corresponding to the current chroma-coding block are cbWidth and cbHeight, respectively. The block located at the lower right corner of the luma region is the luma block (the block filled with black in FIG. 8 ) with position coordinates (xCb+cbWidth-1, yCb+cbHeight-1).
[0109] Further, in some embodiments, determining the first color component block of the current block from the plurality of blocks divided from the first color component region may include: determining at least one candidate block at a predetermined position from the plurality of blocks divided from the first color component region; traversing the at least one candidate block according to a predetermined order; and determining a first candidate block among the at least one candidate block that is intra-predicted based on the block vector as the first color component block of the current block.
[0110] It should be understood that in the embodiment of the present application, the first color component block may further be determined by determining whether or not to intra-predict based on a block vector for at least one candidate block at a predetermined position. For example, as shown in Figure 9, five luminance pixel positions CU are included, specifically, C, TL, TR, BL, and BR. However, the embodiment of the present application is not limited to five positions, and may be multiple different positions, and is not limited to the five positions shown in Figure 9, and is not particularly limited thereto.
[0111] It should be further understood that in the embodiment of the present application, the five positions shown in Figure 9 are sequentially obtained in a predetermined order, and the processing continues as long as the determined candidate block is intra-predicted based on the block vector (i.e., encoded / decoded in a mode having BV information), i.e., when the CU of the first luminance pixel position that is intra-predicted based on the block vector is found, the CU of this first luminance pixel position is set as the corresponding luminance block of the current block, i.e., the first color component block.
[0112] That is, in an embodiment of the present application, when determining the first color component block, at least one candidate block at a predetermined position is determined, for example, blocks including the five luminance pixel positions shown in FIG. 9 are sequentially obtained, and the process continues as long as the determined block is coded in a mode with BV information (intra-predicted based on the block vector), i.e., the process continues until a block at the first luminance pixel position that is coded in a mode with BV information is found.
[0113] In the embodiment of the present application, the predetermined order may include, but is not limited to, the order of C → TL → TR → BL → BR. Here, the detailed position derivation process of C, TL, TR, BL, and BR also involves first determining the position information of the current block, then performing a scaling process on the position information of the current block based on a predetermined sampling format (color sampling format) to obtain the position information of the same-position area corresponding to the current block, and then determining the target position information based on the same-position area position information. The block containing the target position information can be at least one candidate block at a predetermined position, such as C, TL, TR, BL, or BR.
[0114] For example, in an embodiment of the present application, when a block located at the lower right corner of the first color component region is selected as the target block, the position of the current chroma block, i.e., the position of the upper left corner chroma sample of the current chroma block relative to the upper left corner chroma sample of the current image, chromaPos=(x,y), is obtained, and chromaPos is scaled (see Table 7) based on the chroma sampling format to obtain the position of the luma region corresponding to the current chroma block at the same position, lumaPos=(xCb,yCb). In this case, it is assumed that the position of the luma pixel corresponding to the upper left corner of the current block relative to the upper left corner luma pixel of the image (i.e., the position of the luma pixel TL) is (xCb,yCb), and the width and height of the luma region corresponding to the current block (i.e., the entire diagonal fill region of the luma component in FIG. 9) are cbWidth and cbHeight, respectively.
[0115] The coordinate information of the position of the luminance pixel C is (xCb+cbWidth / 2, yCb+cbHeight / 2), The coordinate information of the position of the luminance pixel TL is (xCb, yCb), The coordinate information of the position of the luminance pixel TR is (xCb+cbWidth-1, yCb), The coordinate information of the position of the luminance pixel BL is (xCb, yCb+cbHeight-1), The coordinate information of the position of the luminance pixel BR is (xCb+cbWidth-1, yCb+cbHeight-1).
[0116] Thus, for the current block, the corresponding first color component block needs to be determined first, where if the first color component is a luminance component, the luminance block (i.e., luminance CU) at the corresponding position needs to be determined.
[0117] Further, in some embodiments, determining a first color component block of the current block from a plurality of blocks divided from the first color component region may include determining at least one candidate block at a predetermined position from a plurality of blocks divided from the first color component region, and directly determining the at least one candidate block as the first color component block of the current block.
[0118] It should be understood that in the present embodiment, the first color component block may be determined based on at least one candidate block at a predetermined position. For example, as shown in FIG. 10, CUs at five luminance pixel positions are also included. However, the present embodiment is not limited to five positions, and may be at multiple different positions, and is not limited to the five positions shown in FIG. 10, and is not particularly limited thereto.
[0119] It should be further understood that in the present embodiment, for the five positions shown in FIG. 10, the CUs of the plurality of luminance pixel positions are taken as the corresponding luminance blocks, ie, the plurality of first color component blocks, of the current block.
[0120] That is, when determining the first color component block, multiple blocks of the same position luminance region can be obtained, and the positions of the multiple blocks include, but are not limited to, the multiple positions in FIG.
[0121] Furthermore, when determining the first color component block, at least one candidate block at a predetermined position may be determined from a plurality of blocks divided from the first color component region, and then the at least one candidate block may be traversed in a predetermined order, and the first candidate block among the at least one candidate block that satisfies a predetermined condition may be determined as the first color component block of the current block. Here, if the candidate block is intra-predicted based on the block vector and block vector parameters of the second color component block determined based on the candidate block satisfy a first availability condition, the candidate block may be determined to satisfy the predetermined condition.
[0122] It should be understood that in the present embodiment, the first color component block may be further determined by determining whether at least one candidate block at a predetermined position satisfies a predetermined condition. For example, as shown in FIG. 9, five luminance pixel positions CU are included, specifically, C, TL, TR, BL, and BR. However, the present embodiment is not limited to five positions, and multiple different positions may be used, and is not limited to the five positions shown in FIG. 9, and is not particularly limited thereto.
[0123] In the present embodiment, the predetermined order may include, but is not limited to, C → TL → TR → BL → BR. Here, when sequentially determining whether at least one candidate block at a predetermined position satisfies the predetermined condition, first, it is determined whether the luminance blocks at the five obtained positions are coded in a mode with BV information, i.e., whether they are intra-predicted based on the block vector. If not, it is possible to select not to obtain the luminance blocks and not to analyze the prediction mode identification information of the second color component. If there are one or more luminance blocks coded in a mode with BV information at the five positions, these five positions are sequentially obtained again until the first luminance block that satisfies the following condition is found: The condition is whether the luminance block is coded in a mode with BV information, and whether the chrominance BV is available after adjusting the luminance BV to obtain the chrominance BV. If available, the luminance block is selected as the luminance block from which the BV is ultimately obtained, i.e., the first color component block.
[0124] Correspondingly, if the chrominance BV is unavailable, the luma block is not obtained, but instead predicted using (but not limited to) a PLANAR mode or a CCLM-type mode or other angular prediction mode, or find the first luma block coded in a mode with BV information, adjust its BV to be available, and select this luma block as the luma block from which the BV is finally obtained, i.e., the first color component block.
[0125] Here, the detailed process of deriving the positions of C, TL, TR, BL, and BR includes the following: Assume that the position of the co-located luminance pixel corresponding to the upper left corner of the current chroma-coding block relative to the upper left corner luminance pixel of the image (i.e., the position of the luminance pixel TL) is (xCb, yCb), and the width and height of the co-located luminance region corresponding to the current chroma-coding block (i.e., the entire gray region in the left diagram below) are cbWidth and cbHeight, respectively.
[0126] The coordinates of the position of luminance pixel C are (xCb+cbWidth / 2, yCb+cbHeight / 2), The coordinates of the position of the luminance pixel TL are (xCb, yCb), The coordinates of the position of the luminance pixel TR are (xCb+cbWidth-1, yCb), The coordinates of the position of the luminance pixel BL are (xCb, yCb+cbHeight-1), The coordinates of the position of the luminance pixel BR are (xCb+cbWidth-1, yCb+cbHeight-1).
[0127] In step 102, if the first color component block is intra predicted based on the block vector, a second block vector parameter of a second color component block of the current block is determined based on the first block vector parameter of the first color component block.
[0128] In the embodiment of the present application, after the first color component block is determined, it is necessary to determine whether the first color component block is intra-predicted based on the block vector. Here, if the first color component block is intra-predicted based on the block vector, i.e., if it is determined that the first color component block is processed in a mode with BV information, it may further determine a first block vector parameter of the first color component block (e.g., BV of the luma block), and determine a second block vector parameter of the second color component block (e.g., BV of the chroma block) based on the first block vector parameter of the first color component block.
[0129] In an embodiment of the present application, the determination condition for whether intra prediction is performed based on a block vector may be that the prediction mode of the first color component block is a mode that uses BV information, where it should be understood that the mode that uses BV information includes, but is not limited to, IBC mode or IntraTMP mode.
[0130] It should be noted that in the present embodiment, the first block vector parameter represents a vector pointing from the current block to the reference block, which is searched from the reconstruction area of the frame to which the current block belongs (i.e., the current image).
[0131] Furthermore, it should be understood that in the embodiments of the present application, the number of first color component blocks may be any number, that is, the first color component block of the current block is not limited to one block here, but may be composed of multiple blocks. Correspondingly, when determining whether to perform intra prediction based on the block vector, each first color component block needs to be determined, and only the first color component that is intra predicted based on the block vector can be used to determine the second block vector parameters of the subsequent second color component.
[0132] It can be understood that in the embodiment of the present application, after the first color component block is determined, it is necessary to determine whether the first color component block is intra-predicted based on the block vector, i.e., whether the first color component block is processed in a mode with BV information. Here, if the first color component block is intra-predicted based on the block vector, a first block vector parameter of the first color component block can be determined, and a second block vector parameter of the second color component block can be determined based on the first block vector parameter.
[0133] Furthermore, in an embodiment of the present application, if the first color component block is not intra-predicted based on the block vector, i.e., if the first color component block is not processed in a mode having BV information, it is possible to choose not to analyze the prediction mode identification information of the second color component.
[0134] In addition, in an embodiment of the present application, when determining the second block vector parameters of the second color component block based on the first block vector parameters of the first color component block, it is possible to choose to directly determine the first block vector parameters of the first color component block as the second block vector parameters of the second color component block.
[0135] In addition, in an embodiment of the present application, when determining the second block vector parameters of the second color component block based on the first block vector parameters of the first color component block, it is also possible to select to determine a block vector parameter candidate list of the second color component block of the current block based on the first block vector parameters of the first color component block, and to determine the second block vector parameters of the second color component block based on the block vector parameter candidate list.
[0136] That is, in the embodiment of the present application, the first block vector parameters of the first color component block can be directly used as the second block vector parameters of the second color component block, or the first block vector parameters can be used to first construct a block vector parameter candidate list for the second color component block, and then the second block vector parameters of the second color component block can be determined based on the block vector parameter candidate list.
[0137] In some embodiments, determining the second block vector parameters of the second color component block based on the first block vector parameters of the first color component block may include directly using the first block vector parameters of the first color component block as the second block vector parameters of the second color component block, or adjusting the first block vector parameters of the first color component block to determine the second block vector parameters of the second color component block, or constructing a block vector parameter candidate list for the second color component block based on the first block vector parameters, and determining the second block vector parameters of the second color component block based on the block vector parameter candidate list.
[0138] Here, assuming that the first color component block is a luma block, the first block vector parameter may be the BV of the luma block, i.e., BVL, and assuming that the second color component block is a chroma block, the second block vector parameter may be the BV of the chroma block, i.e., BVC.
[0139] It can be understood that in the present embodiment, assuming that the first block vector parameter is luma BV=(BVLhor, BVLver) and the second block vector parameter is chroma BV=(BVChor, BVCver), we can choose to construct a chroma BVC candidate list including one or more candidate block vector parameters by adjusting BVL (luma BV) or BVC (chroma BV).
[0140] Furthermore, in an embodiment of the present application, when determining a block vector parameter candidate list for a second color component block of a current block based on the first block vector parameters of the first color component block, the first block vector parameters may be adjusted first, and then the candidate block vector parameters for the second color component block may be determined based on the candidate block vector parameters.
[0141] It can be understood that in the present embodiment, the above adjustment process may include a scaling process based on the chrominance sampling format, where the mapping relationship between the luma BV parameters and the scaled chrominance BV parameters is as shown in Table 8.
[0142] [Table 8]
[0143] Here, the syntax element sps_chroma_format_idc indicates the type of color sampling format, where the color sampling format is specifically the chroma sampling format, where different types of chroma sampling format have different corresponding scaling operations.
[0144] For example, if the value of sps_chroma_format_idc is 0, it is determined that the chromaticity sampling format is monochrome, i.e., the chromaticity BV parameter (BVC hor ,BVC hor If the value of sps_chroma_format_idc is 1, the chroma sampling format is determined to be 4:2:0, and the mapping relationship between the luminance BV parameter and the chroma BV parameter is BVC hor =BVL hor >>1, BVC hor =BVL ver >>1. If the value of sps_chroma_format_idc is 2, it determines that the chromaticity sampling format is 4:2:2, in which case the mapping relationship between the luminance BV parameters and the chromaticity BV parameters is BVC hor =BVL hor >>1,BVC hor =BVL ver If the value of sps_chroma_format_idc is 3, it indicates that the chroma sampling format is 4:4:4, in which case the mapping relationship between the luminance BV parameters and the chroma BV parameters is BVC hor=BVL hor , B.V.C. hor =BVL ver is.
[0145] Furthermore, in the embodiment of the present application, when adjusting the first block vector parameters to determine the candidate block vector parameters of the second color component block, the color sampling format of the current block can be first determined, and then a scaling process can be performed on the first block vector parameters based on the color sampling format to determine the candidate block vector parameters.
[0146] That is, in the embodiment of the present application, based on Table 8, it is possible to select to perform scaling based on the chroma sampling format and add the scaled BVC as a candidate block vector parameter to the chroma BVC candidate list (block vector parameter candidate list).
[0147] Furthermore, in the embodiment of the present application, when adjusting the first block vector parameters and determining the candidate block vector parameters of the second color component block, the color sampling format of the current block is first determined, and then a scaling process is performed on the first block vector parameters based on the color sampling format to determine the first initial block vector parameters, and finally the candidate block vector parameters can be determined based on the first initial block vector parameters and one or more numerical values.
[0148] Furthermore, in an embodiment of the present application, when adjusting the first block vector parameters and determining the candidate block vector parameters of the second color component block, one or more second initial block vector parameters can be determined based on the first block vector parameters and one or more numerical values, and then the color sampling format of the current block can be determined, and a scaling process can be performed on the second initial block vector parameters based on the color sampling format to determine the candidate block vector parameters.
[0149] It should be noted that the one or more numerical values above can be any number of any values.
[0150] That is, in the embodiment of the present application, after obtaining the BV of the corresponding luma block, it is denoted as BVL, and the chroma BV obtained based on the BVL is denoted as BVC. By adjusting the BVL or BVC, a chroma BVC candidate list including one or more candidates can be constructed. That is, according to Table 8, scaling can be performed based on the chroma sampling format, and the scaled BVL or BVC can be selected to be added to the chroma BVC candidate list as a candidate block vector parameter.
[0151] For example, in an embodiment of the present application, the BVC adjustment can be achieved by adjusting the BVL to form four situations. Here, if the BVL is odd, the four situations are BVL=(BVLhor,BVLver), BVL=(BVLhor+1,BVLver), BVL=(BVLhor,BVLver+1), and BVL=(BVLhor+1,BVLver+1). If the BVL is even, the BVL=(BVLhor,BVLver). Then, using Table 8, the BVL can be scaled based on the chrominance sampling format to obtain the BVC. In this way, if the BVL is odd, four BVC candidate block vector parameters are formed, and these candidate block vector parameters are added to the chrominance BVC candidate list.
[0152] For example, in an embodiment of the present application, the BVC adjustment can be achieved by adjusting the BVL to form four situations: when the BVL is odd, the four situations are BVL=(BVLhor,BVLver), BVL=(BVLhor+1,BVLver), BVL=(BVLhor,BVLver+1), and BVL=(BVLhor+1,BVLver+1); when the BVL is even, the four situations are BVL=(BVLhor,BVLver), BVL=(BVLhor-1,BVLver), BVL=(BVLhor,BVLver-1), and BVL=(BVLhor-1,BVLver-1). Then, using Table 8, the BVL can be scaled based on the chroma sampling format to obtain the BVC; in this way, whether the BVL is odd or even, four BVC candidates are formed, and these candidates are added to the chroma BVC candidate list.
[0153] For example, in the embodiment of the present application, the operations under different odd and even situations can be unified by the following calculation: directly take four situations: BVL=(BVLhor-1, BVLver-1), BVL=(BVLhor+1, BVLver-1), BVL=(BVLho-1r, BVLver+1), BVL=(BVLhor+1, BVLver+1).
[0154] For example, in an embodiment of the present application, the BVC can be adjusted by adjusting the BVL to form multiple scenarios, where if the BVL is an odd number, multiple scenarios are taken, such as BVL=(BVLhor,BVLver), BVL=(BVLhor+1,BVLver), BVL=(BVLhor,BVLver+1), BVL=(BVLhor+1,BVLver+1), BVL=(BVLhor+3,BVLver), BVL=(BVLhor,BVLver+3), BVL=(BVLhor+3,BVLver+3), BVL=(BVLhor-2,BVLver), and BVL=(BVLhor,BVLver-2), and these candidates are listed in order. When BVL is an even number, there are several situations, such as BVL=(BVLhor,BVLver), BVL=(BVLhor-1,BVLver), BVL=(BVLhor,BVLver-1), BVL=(BVLhor-1,BVLver-1), BVL=(BVLhor-3,BVLver), BVL=(BVLhor,BVLver-3), BVL=(BVLhor-3,BVLver-3), BVL=(BVLhor+2,BVLver), BVL=(BVLhor,BVLver+2), etc. Then, using Table 8, BVL can be scaled based on the chroma sampling format to obtain BVC. In this way, whether BVL is an odd number or an even number, several BVC candidates are formed, and these candidates are added to the chroma BVC candidate list.
[0155] For example, in the embodiment of the present application, the following calculation can be used to unify the behavior under different odd and even situations: directly take BVL=(BVLhor-1,BVLver-1), BVL=(BVLhor+1,BVLver-1), BVL=(BVLhor-1,BVLver+1), BVL=(BVLhor+1,BVLver+1), BVL=(BVLhor+3,BVLver-1), BVL=(BVLhor-1,BVLver+3), BVL=(BVLhor+3,BVLver+3), BVL=(BVLhor-3,BVLver-1), BVL=(BVLhor-1,BVLver-3), etc.
[0156] For example, in the embodiment of the present application, the obtained BVC can be further adjusted to obtain nine candidates, namely, set as follows: BVC=(BVChor,BVCver), BVC=(BVChor-1,BVCver), BVC=(BVChor,BVCver-1), BVC=(BVChor-1,BVCver-1), BVC=(BVChor+1,BVCver), BVC=(BVChor,BVCver+1), BVC=(BVChor+1,BVCver+1), BVC=(BVChor-1,BVCver+1), BVC=(BVChor+1,BVCver-1), thus forming nine BVC candidates, which are added to the chromaticity BVC candidate list.
[0157] Illustratively, in the embodiments of the present application, the obtained BVC can be further adjusted to obtain multiple candidates, i.e., BVC=(BVChor,BVCver), BVC=(BVChor-1,BVCver), BVC=(BVChor,BVCver-1), BVC=(BVChor-1,BVCver-1), BVC=(BVChor+1,BVCver), BVC=(BVChor,BVCver+1), BVC=(BVChor+1,BVCver+1), BVC=(BVChor-1,BVCver+1), BVC=(BVChor+1 ,BVCver-1), BVC=(BVChor-2,BVCver), BVC=(BVChor,BVCver-2), BVC=(BVChor-2,BVCver-2), BVC=(BVChor+2,BVCver), BVC=(BVChor,BVCver+2), BVC=(BVChor+2,BVCver+2), BVC=(BVChor-2,BVCver+2), BVC=(BVChor+2,BVCver-2), etc., multiple BVC candidates are formed, and these candidates are added to the chromaticity BVC candidate list.
[0158] Furthermore, in an embodiment of the present application, when determining a block vector parameter candidate list for a second color component block of a current block based on the first block vector parameters of the first color component block, the embodiment may first determine optimal block vector parameters based on the first block vector parameters, then determine a color sampling format of the current block, and perform a scaling process on the optimal block vector parameters based on the color sampling format to determine candidate block vector parameters for the second color component block, and then determine a block vector parameter candidate list based on the candidate block vector parameters.
[0159] For example, in the embodiment of the present application, in the IBC mode of single-tree inter prediction and single-tree partitioning, an optimal BVL (optimal block vector parameter) is determined from the luma BV (denoted as BVL) by RDO, and then the optimal block vector parameter is scaled based on the chroma sampling format to obtain the chroma BV (denoted as BVC). Here, the scaling process of the optimal block vector parameter can be performed using the above Table 8, and the optimal block vector parameter can also be adjusted in combination with any of the above adjustment or scaling methods to obtain the corresponding candidate block vector parameter, thereby completing the construction of the block vector parameter candidate list.
[0160] Furthermore, in an embodiment of the present application, when determining a block vector parameter candidate list for a second color component block of a current block based on a first block vector parameter of a first color component block, an optimal block vector parameter corresponding to the first color component block can be first determined, and then a block vector parameter candidate list for the second color component block of the current block can be determined based on the optimal block vector parameter.
[0161] For example, in the embodiment of the present application, in the case of IntraTmp mode, the optimal mode (optimal block vector parameter) of the luma block can be obtained by detailed search using a template, denoted as BVL; when IntraTmp is applied to chroma, any of the above-mentioned list construction methods can be used to complete the construction of the block vector parameter candidate list based on the optimal block vector parameter.
[0162] In this embodiment, a new prediction mode that can be introduced in this embodiment can be represented by INTRA_DBV, which performs a prediction process on the second color component of the current block based on the determined second block vector parameter, thereby determining a predicted value of the second color component.
[0163] It should be further noted that in the embodiment of the present application, when determining the second block vector parameters of the second color component block based on the block vector parameter candidate list, it is necessary to determine whether further candidate block vector parameters are available, i.e., it is necessary to select one or more available candidate block vector parameters from the block vector parameter candidate list.
[0164] In some embodiments, when determining the second block vector parameters of the second color component block based on the block vector parameter candidate list, it is first determined whether there are one or more candidate block vector parameters in the block vector parameter candidate list that satisfy the first availability condition, and if there are one or more candidate block vector parameters that satisfy the first availability condition, the second block vector parameters can be determined based on the one or more candidate block vector parameters.
[0165] Specifically, in the embodiment of the present application, only if the candidate block vector parameters satisfy the first availability condition, the candidate block vector parameters can be determined as the second block vector parameters.
[0166] Furthermore, in some embodiments, one or more candidate block vector parameters satisfying the first availability condition is determined by at least: the offset position indicated by one or more candidate block vector parameters does not cross an image boundary; the offset locations indicated by one or more candidate block vector parameters do not overlap with the current block; the offset position indicated by one or more candidate block vector parameters does not exceed a predetermined available area; The offset position indicated by one or more candidate block vector parameters may have already been reconstructed.
[0167] It should be understood that in the embodiment of the present application, only when all the above conditions are met, it is determined that the candidate block vector parameters satisfy the first availability condition, i.e., the candidate block vector parameters are available. In one specific embodiment, the candidate block vector parameters satisfying the first availability condition includes at least the following: the offset position indicated by the candidate block vector parameters does not cross an image boundary; the offset position indicated by the candidate block vector parameters does not overlap with the current block; the offset position indicated by the candidate block vector parameters does not exceed a predetermined available area; and the offset position indicated by the candidate block vector parameters has already been reconstructed.
[0168] For example, Figure 11 shows a schematic diagram of a structure for determining whether an offset position does not overlap with a current block according to an embodiment of the present application. As shown in Figure 11, the current block is represented by a black-filled block, the shaded area represents an available area, and the unfilled area represents an unavailable area. If the offset position indicated by the candidate block vector parameters for the current block is in an unavailable area, a situation occurs in which the offset position overlaps with the current block.
[0169] For example, Figure 12 shows a schematic diagram of a structure for determining whether an offset position exceeds a predetermined available area according to an embodiment of the present application. As shown in Figure 12, the black-filled block represents the current block, the shaded area represents the available area, and all reference blocks within the available area have been reconstructed. In this embodiment, considering the storage capacity of the buffer, the reference blocks adjacent to the current block (m,n) can typically be the predetermined available area, specifically, reference block (m-2,n-2), reference block (m-1,n-2), reference block (m,n-2), reference block (m+1,n-2), reference block (m-2,n-1), reference block (m-1,n-1), reference block (m,n-1), reference block (m+1,n-1), reference block (m-2,n), reference block (m-1,n), etc.
[0170] Furthermore, in an embodiment of the present application, when constructing a block vector parameter candidate list, first, a candidate block vector parameter of a second color component block is determined based on a first block vector parameter, and if the candidate block vector parameter satisfies a first availability condition, a modification process is performed on the candidate block vector parameter, and a block vector parameter candidate list can be determined based on the modified candidate block vector parameter.
[0171] Correspondingly, if the candidate block vector parameters do not satisfy the first availability condition, an adjustment process is performed on the candidate block vector parameters until the adjusted candidate block vector parameters satisfy the first availability condition.
[0172] In addition, in an embodiment of the present application, when performing a modification process on the candidate block vector parameters, the offset position of the second color component block is determined based on the candidate block vector parameters and the position information of the second color component block, and then a search process is performed based on the offset position of the second color component block to determine the modified candidate block vector parameters.
[0173] It should be further understood that in the embodiment of the present application, after performing a scaling process on the first block vector parameters of the first color component block based on the color sampling format, the obtained candidate block vector parameters need to be further modified. Here, before the modification process, it is also necessary to determine whether the candidate block vector parameters satisfy a first availability condition. If the candidate block vector parameters satisfy the first availability condition, the candidate block vector parameters of the current block are modified to determine the modified parameters as the second block vector parameters; or if the candidate block vector parameters do not satisfy the first availability condition, the candidate block vector parameters are adjusted until the adjusted block vector parameters satisfy the first availability condition, and then the adjusted block vector parameters are modified to determine the modified parameters as the second block vector parameters.
[0174] That is, in the present embodiment, a chromaticity BV can be modified and the modified BVC can be added to the chromaticity BVC candidate list, in which case only the modified BVC exists.
[0175] For example, after obtaining the scaled chromaticity BV based on the chromaticity sampling format, further modification is performed on it. Before the modification, it is necessary to first determine whether the BV is available. If it is available, the modification is performed; if it is not available, the BV is adjusted to be available and then the modification is performed. The modified BVC is added to the chromaticity BVC candidate list.
[0176] Here, when determining whether or not a chromaticity BV is available, the position (xCb, yCb) of the current chromaticity block is obtained, the chromaticity BVC = (BVChor, BVCver) is obtained, the corresponding offset position (xCb + BVChor, yCb + BVCver) is identified, and the following condition (i.e., the first availability condition) is determined. If all of the following conditions are met, the chromaticity BV is available.
[0177] Whether the obtained offset position does not exceed the image boundary, As shown in Figure 10 above, whether the obtained offset position does not overlap with the current block, As shown in FIG. 11, whether the obtained offset position does not exceed a predetermined available area or not, Whether the obtained offset position has already been reconstructed.
[0178] For example, in an embodiment of the present application, a template search can be adopted as the modification method, that is, after obtaining the modified chrominance BV parameters, an offset position can be found using the position of the current block and the modified chrominance BV parameters, and then a fine search can be performed near the offset position using a template matching method to obtain optimal chrominance BV parameters, and a chrominance predicted block for the current block can be obtained by copying the reference block at the optimal offset position obtained by the fine search. As shown in Figure 13, the shaded area represents the chrominance reconstruction area, and a template matching method can be adopted to find the optimal matching template and the corresponding optimal BV for the current block, and a reference block for the current block can be determined based on the optimal BV (i.e., IntraTMP BV), and thus a chrominance predicted value for the current block can be determined.
[0179] Since the availability of the BV has already been determined before the modification, there is no need to subsequently determine whether it is available (whether it satisfies the first availability condition), and the second block vector parameters can be determined directly.
[0180] Furthermore, in an embodiment of the present application, when constructing a block vector parameter candidate list, if a first block vector parameter satisfies a second availability condition, a modification process is performed on the first block vector parameter, and the block vector parameter candidate list is determined based on the modified first block vector parameter.
[0181] That is, before constructing the block vector parameter candidate list, a modification process can be performed on the first block vector parameter, for example, modifying the luminance BVL, and then constructing the BVC candidate list using any of the above list construction methods.
[0182] For example, in an embodiment of the present application, the co-located luma region corresponding to the current chroma block can be first obtained. Here, as shown in the schematic diagram of the coordinates and block sizes of the current chroma block and the co-located luma region in FIG. 14, the position of the current chroma block, chromaPos=(xCb, yCb), is obtained, and chromaPos is scaled based on the chroma sampling format in accordance with Table 7 above to obtain the co-located luma region position, lumaPos=(xCb_Y, yCb_Y), corresponding to the current chroma block. The size of the current chroma block, chromaSize=(cbWidth, cbHeight), is obtained, and chromaSize is scaled based on the chroma sampling format in accordance with the mapping relationship in Table 9 to obtain the co-located luma region size, lumaSize=(cbWidth_Y, cbHeight_Y), corresponding to the current chroma block.
[0183] [Table 9]
[0184] For example, further correction is made to the luminance BVL, and before the correction, it is first necessary to determine whether the BVL is available (whether the second availability condition is met), and if it is available, the correction is made, or if it is not available, it is adjusted so that it becomes available and then the correction is made.
[0185] In some embodiments, when determining whether a BVL is available, the position (xCb_Y, yCb_Y) of the same-position luminance area is obtained, the luminance BVL=(BVLhor, BVLver) is obtained, the corresponding offset position (xCb_Y+BVLhor, yCb_Y+BVLver) is identified, and the following conditions are determined. If all of the following conditions are met, the luminance BVL (first block vector parameter) is available, and the first block vector parameter satisfies the second availability condition, which means at least: the offset position indicated by the first block vector parameter does not exceed the image boundary; As shown in FIG. 12, the offset position indicated by the first block vector parameter does not exceed a predetermined available area; The offset position indicated by the first block vector parameter has already been reconstructed.
[0186] Here, compared with the first usable condition, the second usable condition does not require determining whether the current block covers the same-position luminance area corresponding to the current block.
[0187] Furthermore, in an embodiment of the present application, when performing the modification process, the offset position of the first color component block is determined based on the first block vector parameters and the position information of the first color component block, and a search process is performed based on the offset position of the first color component block to determine the modified first block vector parameters.
[0188] For example, the correction process may include, but is not limited to, a correction method using a co-located luminance region search corresponding to the current chrominance block, that is, after obtaining the luminance BVL, use the position of the co-located luminance region and the obtained luminance BVL to find an offset position, and then use the co-located luminance region to perform a detailed search near the offset position, where the range of the detailed search must fill the limited available area, as shown in Figure 12. Finally, an optimal luminance BVL is obtained, as shown in Figure 15, by the co-located luminance region search.
[0189] It can be understood that in the embodiments of the present application, the construction method of the block vector parameter candidate list includes, but is not limited to, the above-mentioned multiple situations, and different methods can be used to construct one candidate list at the same time.
[0190] Furthermore, in the embodiments of the present application, if there are one or more candidate block vector parameters that satisfy the first availability condition, when determining the second block vector parameter based on the one or more candidate block vector parameters, one candidate block vector parameter that directly satisfies the first availability condition can be determined as the second block vector parameter.
[0191] That is, if there is only one BVC candidate that satisfies the first usable condition in the constructed usable BVC candidate list, the BV (second block vector parameter) that is finally selected becomes that BVC.
[0192] Furthermore, in embodiments of the present application, if there are one or more candidate block vector parameters that satisfy the first availability condition, when determining second block vector parameters based on the one or more candidate block vector parameters, the embodiment may include: for the plurality of candidate block vector parameters that satisfy the first availability condition, determining a first matching template based on the plurality of candidate block vector parameters; calculating a matching error between the first template of the current block and the first matching template based on a predetermined error criterion; and determining a first cost value corresponding to the plurality of candidate block vector parameters; and finally determining one or more second block vector parameters from the plurality of candidate block vector parameters based on the first cost value.
[0193] In other words, in an embodiment of the present application, if there are multiple available BVC candidates in the constructed available BVC candidate list, a decision process must be performed on these available BVCs to obtain the final BV, and the decision method includes, but is not limited to, a method of performing decision process using a template.
[0194] It can be appreciated that in the present embodiment, the predetermined error criterion comprises one of the following: sum of absolute differences (SAD), sum of absolute difference transform (SATD), sum of squared differences (SSE), mean absolute difference (MAD), mean absolute error (MAE), and mean squared error (MSE).
[0195] For example, in the embodiment of the present application, when calculating the cost, i.e., when determining the first cost value, there are multiple options for the cost function for calculating the cost of the template region, i.e., there are multiple options for the predetermined error criterion. For example, evaluation criteria such as sum of absolute differences (SAD), sum of absolute differences after transformation (SATD), sum of squared differences (SSE), mean absolute difference (MAD), mean absolute error (MAE), mean squared error (MSE), etc. can be selected. The evaluation criteria mentioned in the following content can be any one of the above criteria. Taking the evaluation criterion of SAD as an example, the calculation formula is as follows:
[0196]
number
[0197] It should be noted that in the present embodiment, the first template includes one or more sample values in adjacent decoded regions of the current block.
[0198] For example, in an embodiment of the present application, when selecting a template (first template of a current block), it may be determined whether a pixel at the template position is available (including reconstructed luminance information) based on the availability of pixels in the neighboring regions of the current block. Figure 16 is a schematic diagram of template types. As shown in Figure 16, templates may be classified into template types such as top template, left template, top right template, bottom left template, and top left template based on the relative positional relationship between the template and the current block. Here, the template sizes of different types of different coding blocks may be fixed to the same size or may be different.
[0199] For example, regarding the template size, when the same template size is selected for any current coding block (current block), the following equation shows an example of the template size setting conditions, where nTbW and nTbH are the width and height of the current luminance coding block (current block), respectively, and iTempW and iTempH are the width and height of the adopted template, respectively.
[0200]
number
[0201]
number
[0202]
number
[0203] For example, in an embodiment of the present application, when determining the first matching template, motion compensation is performed using the first template of the current block for the obtained multiple BVC candidates (i.e., candidate block vector parameters that satisfy the first availability condition) to obtain a template in the corresponding BV (first matching template). Figure 17 is a schematic diagram of template motion compensation, and as shown in the figure, when a BV (BVC candidate) is available, motion compensation is performed using the first template and the new BV to obtain a template in the corresponding BV, i.e., the first matching template.
[0204] Here, there are several cases in which templates are used when calculating costs, as follows:
[0205] First case: If both the top template and the left template of the current block exist, and both the top template and the left template exist in the corresponding BV, then both the top template and the left template are available.
[0206] Second case: If both a top template and a left template exist for the current block, but only the top template exists for the corresponding BV, there are two methods: Method 1: Since the left template does not exist for the corresponding BV, it is not used directly, i.e., calculation is performed using only the top template; Method 2: Since the left template does not exist for the corresponding BV, the leftmost template-width column in the reference block is used as a substitute for the left template, i.e., calculation is performed using the top template and the left template.
[0207] Third case: If both the top and left templates of the current block exist, but only the left template exists in the corresponding BV, there are two methods: Method 1: Since the top template does not exist in the corresponding BV, it is not used directly, i.e., calculation is performed using only the left template; Method 2: Since the top template does not exist in the corresponding BV, the row with the topmost template height in the reference block is used as a substitute for the top template, i.e., calculation is performed using the top template and the left template.
[0208] Fourth Case: If only the top template of the current block exists, there are three methods. Method 1: Since there is no top template for the corresponding BV, it is not used directly. In this case, the BV finally selected is the first BVC in the BVC candidate list or the BVC at a specified position. Method 2: If there is no top template for the corresponding BV, the row with the topmost template height in the reference block is used instead of the top template. Method 3: If there is a top template for the corresponding BV, it is used directly.
[0209] Fifth Case: When only the left template of the current block exists, there are three methods. Method 1: Since the left template does not exist in the corresponding BV, it is not used directly. In this case, the BV finally selected is the first BVC in the BVC candidate list or the BVC at a specified position. Method 2: When the left template does not exist in the corresponding BV, the leftmost template-width column in the reference block is used instead of the left template. Method 3: When the left template exists in the corresponding BV, it is used directly.
[0210] Sixth case: If neither the top template nor the left template of the current block exists, the BV finally selected is the first BVC in the BVC candidate list or the BVC at a specified position.
[0211] Illustratively, in the embodiment of the present application, when determining one or more second block vector parameters based on the first cost value, unless the cost cannot be calculated, in other cases, the cost of each candidate in the BVC candidate list is calculated and sorted, and the sorting method includes, but is not limited to, bubble sort, selection sort, insertion sort, shell sort, merge sort, quick sort, radix sort, heap sort, counting sort, bucket sort, etc. Any number of BVCs with the smallest cost are selected as the final BV (second block vector parameter), and BV-based chromaticity prediction is performed based on this.
[0212] Furthermore, in an embodiment of the present application, if all the candidate block vector parameters in the block vector parameter candidate list do not satisfy the first availability condition, the predicted value of the second color component can be determined based on a first predetermined mode.
[0213] In some embodiments, the first predetermined mode includes at least one of, but is not limited to, a planar mode, a DM mode, a DC mode, a CCLM mode, and a skip mode.
[0214] For example, if the prediction mode of the first color component block is not the IBC mode, the first predetermined mode may include, but is not limited to, a planar mode, a cross-component prediction mode (e.g., a CCLM mode), or another angle prediction mode. Then, the reference pixels and related parameters are obtained to perform the prediction process. Furthermore, the first predetermined mode may be a skip mode, i.e., the current block may skip the prediction process of the corresponding mode.
[0215] Furthermore, in an embodiment of the present application, if all candidate block vector parameters in the block vector parameter candidate list do not satisfy the first availability condition, an adjustment process is performed on the candidate block vector parameters in the block vector parameter candidate list until one or more candidate block vector parameters that satisfy the first availability condition are present in the block vector parameter candidate list.
[0216] That is, in an embodiment of the present application, if all candidate block vector parameters in the block vector parameter candidate list are unavailable, i.e., if all candidate block vector parameters in the block vector parameter candidate list do not satisfy the first availability condition, it may be possible to select to adjust any one or more BVC candidates (candidate block vector parameters) in the block vector parameter candidate list until they become available. Here, adjustment methods include, but are not limited to, cropping, scaling, etc. Also, instead of a prediction method using BV information such as DBV mode, it may be possible to adopt PLANAR mode, CCLM mode, or other angle prediction mode, i.e., it may be possible to select to determine the predicted value of the second color component based on the first predetermined mode.
[0217] For example, in the embodiment of the present application, in the case of a planar mode, a CCLM-like mode, or other angle mode, the reference pixel and mode parameters can be obtained to perform chrominance mode prediction.
[0218] In step 103, a predicted value of the second color component is determined based on the second block vector parameters.
[0219] When determining the predicted value of the second color component based on the second block vector parameters, the offset position of the current block is determined based on the second block vector parameters and the position information of the current block, a block copy process is performed based on the offset position of the current block to obtain a first predicted block, and the predicted value of the second color component can be determined based on the first predicted block.
[0220] In some embodiments, in the present application, when the second color component of the current block is predicted using the second block vector parameters, the position information (xCb, yCb) and chromaticity BV=(BVChor, BVCver) of the current block can be obtained, and the offset position (xCb+BVChor, yCb+BVCver) can be determined to perform block copying, as shown in FIG. 18.
[0221] For example, cbWidth represents the width of the current block in chrominance samples, cbHeight represents the height of the current block in chrominance samples, predSamples[x][y] represents the chrominance predicted value of the current block, and cIdx specifies the color component index of the current block. The specific process is as follows:
[0222] For x=xCb...xCb+cbWidth-1 and y=yCb...yCb+cbHeight-1, we get
[0223] xVb= (xCb+BVChor)&(IbcBufWidthC-1) yVb= (yCb+BVCver)&(CtbSizeC-1) predSamples[x][y]= ibcVirChromaBuf[xVb][yVb] where BufWidthC represents the width of the chrominance pixel in the stored reconstruction buffer, CtbSizeC represents the size of the chrominance pixel in the CTU (Coding Tree Unit), and VirChromaBuf represents the stored reconstruction chrominance pixel. function() is a processing function for pixel values, which may be a direct copy, or a shift operation or filtering operation to ensure calculation accuracy.
[0224] Furthermore, when determining the predicted value of the second color component based on the second block vector parameters, multiple offset positions of the current block can be determined based on the multiple second block vector parameters and the position information of the current block, a block copy process can be performed based on the multiple offset positions of the current block to obtain multiple second predicted blocks, a weighting process can be performed on the second predicted blocks, a first predicted block can be determined, and the predicted value of the second color component can be determined based on the first predicted block.
[0225] That is, in an embodiment of the present application, when multiple BVs are determined, i.e., when multiple second block vector parameters are determined based on the block vector parameter candidate list, multiple second predicted values are obtained by prediction based on the multiple BVs, and then these multiple second predicted values are weighted to obtain weighted first predicted values.
[0226] Furthermore, in an embodiment of the present application, when determining a predicted value of the second color component based on the first predicted block, it is possible to choose to directly determine the first predicted block as the predicted value of the second color component.
[0227] Furthermore, in an embodiment of the present application, when determining a predicted value of the second color component based on the first predicted block, it may be possible to select to perform a correction process on the first predicted block and determine a predicted value of the second color component.
[0228] Here, after obtaining the first predicted value, the first predicted value may be further corrected, and the correction method may include, but is not limited to, weighting with CCLM-type modes or other modes.
[0229] For example, in an embodiment of the present application, the position (xCb, yCb) of the current chroma block is obtained, and the chroma BV=(BVChor, BVCver) is obtained, and the corresponding offset position (xCb+BVChor, yCb+BVCver) is determined, and then block copy is performed, and the copy value is modified to obtain the final predicted value, and the modification method includes, but is not limited to, weighting with CCLM-like modes or other modes.
[0230] Exemplarily, in one specific embodiment, determining a predicted value of a second color component based on the first predicted block may include: performing an intra prediction process on the second color component of the current block based on a second predetermined mode to obtain a second predicted block; and performing a weighted fusion process on the first predicted block and the second predicted block to determine a predicted value of the second color component, where the second predetermined mode includes at least one of a PLANAR mode, a DM mode, a DC mode, and a CCLM mode.
[0231] In the embodiment of the present application, when the predicted value of the second color component is obtained by performing block copying using the second block vector parameters, it is understood that the predicted value can be modified using a method such as weighting with the normal prediction mode, but is not limited to this.
[0232] Further, in an embodiment of the present application, prediction mode identification information is determined, and if the prediction mode identification information indicates that the second color component of the current block uses DBV mode, a second block vector parameter of the second color component block is determined, and a predicted value of the second color component is determined based on the second block vector parameter.
[0233] In an embodiment of the present application, it can be determined based on the prediction mode identification information whether the second color component of the current block can use DBV mode (prediction based on BV information), and by determining the value of the prediction mode identification information by decoding, it can be determined whether the prediction mode identification information indicates that the second color component of the current block uses DBV mode.
[0234] Illustratively, in an embodiment of the present application, if the value of the prediction mode identification information is a first value, it is determined that the prediction mode identification information indicates that the second color component of the current block is predicted using BV information, and if the value of the prediction mode identification information is a second value, it is determined that the prediction mode identification information indicates that the second color component of the current block is not predicted using BV information.
[0235] In the present embodiment, the prediction mode identification information may be represented by intra_dbv_flag or intra_chroma_ibc_flag, and indicates whether the second color component of the current block is predicted using BV information.
[0236] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value may be in a parameter format or a numerical format. Specifically, the prediction mode identification information may be a parameter written in a profile or a flag value, and there is no particular limitation thereto.
[0237] For example, taking the case where the first value is 1 and the second value is 0, the value of the prediction mode identification information is determined by decoding, and it may be determined that the second color component of the current block is predicted using BV information if the value of the prediction mode identification information is also 1. Then, based on the above method, a second block vector parameter of the second color component block may be determined, and a predicted value of the second color component may be determined based on the second block vector parameter.
[0238] It can be further understood that the decoding method proposed in the embodiments of the present application may modify the DM mode of the related art so that the modified DM mode is compatible with the INTRA_DBV mode.
[0239] In the present embodiment, in binary tree division and DM mode, if the corresponding luma domain has BV information, the current chroma block is predicted using DBV mode, i.e., it can be predicted based on the BV information. For example, If CuPredMode[0][xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to MODE_IBC, setting intra_dbv_flag=1 causes the chrominance intra prediction mode IntraPredModeC[xCb][yCb] to use DBV.
[0240] If CuPredMode[0][xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to MODE_INTRA, IntraTmpFlag[xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to 1, and you set intra_dbv_flag=1, the chrominance intra prediction mode IntraPredModeC[xCb][yCb] uses DBV.
[0241] Here, the chromaticity prediction mode is derived as follows.
[0242] The chromaticity intra prediction mode IntraPredModeC[xCb][yCb] uses cclm_mode_flag, cclm_mode_idx, and intra_chroma_pred_mode, lumaIntraPredMode, and lumaTempPredMode specified in Table 10. Here, 0 represents Planar mode, 1 represents DC, 18 represents horizontal prediction mode, 50 represents vertical prediction mode, and 81 to 83 represent CCLM prediction mode. Note that entries other than DBV mode are corresponding values given as examples, and do not necessarily need to be filled in with these values.
[0243] [Table 10]
[0244] In some embodiments, in DM mode, if intra_dbv_flag==1, that is, if the information obtained from the central block of the co-located luminance region includes BV, the chrominance intra prediction mode IntraPredModeC[xCb][yCb] uses DBV. Then, the second color component can be predicted based on the decoding method of steps 101 to 103. Here, if the first color component block is the central block of the co-located luminance region, the BV of the corresponding luminance block can be directly obtained as the first block vector parameter. Furthermore, if the candidate block vector parameter (candidate chrominance BV) determined based on the first block vector parameter is unavailable, the corresponding luminance prediction mode can be obtained to predict the second color component.
[0245] In other words, when making predictions using INTRA_DBV mode, if the CU at the center of the acquired same-position luminance area is unavailable, the corresponding luminance prediction mode can be obtained to perform chromaticity prediction.
[0246] Furthermore, in an embodiment of the present application, when any block in the first color component region is intra-predicted based on the block vector, it is determined that the second color component of the current block uses DBV mode, second block vector parameters of the second color component block are determined, and a predicted value of the second color component is determined based on the second block vector parameters. That is, when it is determined that the second color component of the current block uses DBV mode, second block vector parameters of the second color component block can be determined based on the above method, and a predicted value of the second color component can be determined based on the second block vector parameters.
[0247] That is, the judgment condition of the DM scheme may be that BV information exists at any position in the entire corresponding luma region. In some embodiments, for the DM mode, if the prediction information of the corresponding luma region includes BV information, the current chroma block is coded using DBV mode. For example, in x=xCb...xCb+cbWidth-1, y=yCb...yCb+cbHeight-1, if there is any (x, y) that makes CuPredMode[0][x][y] equal to MODE_IBC, Intra_DBV_flag is set to 1, and the chroma intra prediction mode IntraPredModeC[xCb][yCb] uses DBV. If there is any (x, y) where x=xCb...xCb+cbWidth-1, y=yCb...yCb+cbHeight-1 that makes CuPredMode[0][x][y] equal to MODE_INTRA and IntraTmpFlag[x][y] equal to 1, then Intra_DBV_flag is set to 1, and the chrominance intra prediction mode IntraPredModeC[xCb][yCb] uses DBV. Here, IntraTmpFlag indicates whether to use IntraTmp mode.
[0248] Furthermore, in the embodiment of the present application, when performing a transform and an inverse transform on the corresponding residual of the chroma block predicted in DBV mode, the following methods are included, but are not limited to: only one transform (e.g., only a discrete cosine transform (DCT) without a low-frequency non-separable transform (LFNST)) or two transforms (a linear transform and a secondary transform, e.g., a DCT transform is performed first on the encoding side, followed by an LFNST transform). The transform method performed on the decoding side is in the reverse order to the forward transform method performed on the encoding side.
[0249] In addition, according to the encoding / decoding method proposed in the embodiments of the present application, on the one hand, the uniformity of chromaticity prediction is improved and the information of the co-located luminance region is fully utilized, thereby effectively improving the accuracy of chromaticity prediction; on the other hand, by adjusting the accuracy of chromaticity BV and constructing a candidate list, multiple possibilities can be adaptively provided according to different content and sampling formats, thereby making DBV prediction more effective and further improving coding efficiency.
[0250] The encoding / decoding method proposed in the embodiment of the present application has been tested, and the test data is shown in the table below.
[0251] [Table 11]
[0252] As can be seen from the test data, the encoding and decoding method proposed in the embodiments of the present application improves the encoding performance.
[0253] In summary, the encoding / decoding method proposed in the embodiments of this application fully considers available information such as reconstructed luma and BV, predicts chroma based on this information, improves the uniformity of chroma prediction, and after obtaining the luma BV, configures multiple chroma BV candidates by adjusting the luma BV or chroma BV, and can adaptively provide multiple options according to different content and sampling formats, thereby making DBV prediction more effective and further improving coding efficiency.
[0254] That is, in the embodiment of the present application, the BV parameters of the corresponding luminance block are obtained, and the BV parameters are adjusted and applied to the chrominance, thereby improving the uniformity of the chrominance prediction, and by fully utilizing the information of the co-located luminance region, the accuracy of the chrominance prediction is improved, and ultimately the encoding / decoding efficiency is effectively improved.
[0255] An embodiment of the present application provides an encoding / decoding method, in which a codec determines a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determines a second block vector parameter of a second color component block based on a first block vector parameter of the first color component block, and determines a predicted value of the second color component based on the second block vector parameter. As can be seen from this, in this embodiment, if a luma block corresponding to the current block is intra-predicted based on a block vector, determines a second block vector parameter to be applied to the chroma component based on the block vector parameter of the luma block, and predicts the chroma component using the second block vector parameter. In other words, the encoding / decoding method proposed in this embodiment overcomes the problem of unity in chroma prediction and fully utilizes related information of the co-located luma block to improve the accuracy of chroma prediction, thereby saving bitrate, improving encoding / decoding efficiency, and ultimately improving encoding / decoding performance.
[0256] An embodiment of the present application provides an encoding method, which is applied to an encoder. FIG. 19 is a schematic diagram of the encoding method. As shown, the method by which the encoder performs encoding processing may include the following steps:
[0257] In step 201, the first color component block of the current block is determined.
[0258] The method of the present embodiment can be applied to an encoder or a decoder. The prediction mode here may specifically refer to an intra prediction mode. Here, assuming that the first color component is a luma component and the second color component is a chroma component, more specifically, this is a method for determining a chroma intra prediction mode.
[0259] It should be further noted that in the present embodiment, the current block includes at least a first color component and a second color component. If the current block is the first color component, the current block can be referred to as a first color component block, and if the first color component is a luma component, the first color component block can also be referred to as a luma block. Similarly, if the current block is the second color component, the current block can be referred to as a second color component block, and if the second color component is a chroma component, the second color component block can also be referred to as a chroma block.
[0260] It should be further noted that in binary tree partitioning, for DM mode, when the prediction mode of the co-located luminance block is IBC mode, the embodiment of the present application can determine the block vector (BV) information corresponding to the chrominance of the current block based on the BV information of the co-located luminance block, and further perform intra prediction processing using the BV information of the chrominance block, thereby improving the uniformity of chrominance prediction and thereby improving coding efficiency.
[0261] In some embodiments, determining the first color component block of the current block may include determining a first color component region at the same position of the current block, and determining the first color component block of the current block from a plurality of blocks divided from the first color component region.
[0262] In addition, in the embodiment of the present application, in the first color component area at the same position, block division can be performed on the current block, for example, using a binary tree structure, a ternary tree structure, a quad tree structure, etc., to obtain multiple blocks, each of which can be regarded as one CU, and then the first color component block of the current block is determined from these multiple CUs.
[0263] 3, the shaded area represents the in-position luminance area of the chrominance CU. The in-position luminance area may be divided into multiple blocks, and the central block among these blocks may be selected as the luminance block corresponding to the current block. For example, in FIG. 3, the black-filled block is the luminance block corresponding to the current block.
[0264] Further, in some embodiments, determining the first color component block of the current block from the plurality of blocks divided from the first color component region may include selecting a target block from the plurality of blocks divided from the first color component region, and setting the target block as the first color component block of the current block.
[0265] Here, the target block may be a block at any position. In one specific embodiment, a block at the center of the first color component region is selected as the target block, or a block at the upper left corner of the first color component region is selected as the target block, or a block at the lower right corner of the first color component region is selected as the target block.
[0266] It should be understood that in the embodiment of the present application, the target block as the first color component block may be a block at any position among the multiple blocks shown in Fig. 3. For example, it may be a block (filled with black) at the center of the same-position luminance area shown in Fig. 3, a block (filled with black) at the upper left corner of the same-position luminance area shown in Fig. 7, or a block (filled with black) at the lower right corner of the same-position luminance area shown in Fig. 8, or even a block at the upper right corner or lower left corner of the same-position luminance area, or even a block at the center of the upper left area, and is not particularly limited here.
[0267] Furthermore, in an embodiment of the present application, when selecting a target block from multiple blocks divided from a first color component area, first, the position information of the current block is determined, and then a scaling process is performed on the position information of the current block based on a predetermined sampling format (color sampling format), thereby obtaining the same-position area position information corresponding to the current block, and further, the target position information is determined based on the same-position area position information, and the block containing the target position information can be set as the target block.
[0268] It can be seen that in some embodiments, the mapping relationship between the position information (x,y) of the chroma block and the position information (xCb,yCb) of the scaled luma block is as shown in Table 7.
[0269] For example, in an embodiment of the present application, when selecting a block located at the center of the first color component region as the target block, the position of the current chroma block, i.e., the position chromaPos=(x,y) of the upper-left corner chroma sample of the current chroma block relative to the upper-left corner chroma sample of the current image, is obtained, and chromaPos is scaled based on the chroma sampling format to obtain the luma region position lumaPos=(xCb,yCb) of the same position corresponding to the current chroma block. Assume that the position of the luma pixel corresponding to the upper-left corner of the current chroma-coding block relative to the upper-left corner luma pixel of the image is (xCb,yCb), and the width and height of the luma region corresponding to the current chroma-coding block are cbWidth and cbHeight, respectively. The block located at the center of the luma region is the luma block (the block filled with black in FIG. 3 ) with position coordinates (xCb+cbWidth>>1, yCb+cbHeight>>1).
[0270] For example, in an embodiment of the present application, when selecting a block located at the upper left corner of the first color component region as the target block, the position of the current chroma block, i.e., the position chromaPos=(x,y) of the upper left corner chroma sample of the current chroma block relative to the upper left corner chroma sample of the current image, is obtained, and chromaPos is scaled based on the chroma sampling format to obtain the luma region position lumaPos=(xCb,yCb) of the same position corresponding to the current chroma block. Assume that the position of the luma pixel corresponding to the upper left corner of the current chroma-coding block relative to the upper left corner luma pixel of the image is (xCb,yCb), and the width and height of the luma region corresponding to the current chroma-coding block are cbWidth and cbHeight, respectively. The block located at the upper left corner of the luma region is the luma block (the block filled with black in FIG. 7) with position coordinates (xCb,yCb).
[0271] For example, in an embodiment of the present application, when selecting a block located at the lower right corner of the first color component region as the target block, the position of the current chroma block, i.e., the position chromaPos=(x,y) of the upper left corner chroma sample of the current chroma block relative to the upper left corner chroma sample of the current image, is obtained, and chromaPos is scaled based on the chroma sampling format to obtain the luma region position lumaPos=(xCb,yCb) of the same position corresponding to the current chroma block. Assume that the position of the luma pixel corresponding to the upper left corner of the current chroma-coding block relative to the upper left corner luma pixel of the image is (xCb,yCb), and the width and height of the luma region corresponding to the current chroma-coding block are cbWidth and cbHeight, respectively. The block located at the lower right corner of the luma region is the luma block (the block filled with black in FIG. 8 ) with position coordinates (xCb+cbWidth-1, yCb+cbHeight-1).
[0272] Further, in some embodiments, determining the first color component block of the current block from the plurality of blocks divided from the first color component region may include: determining at least one candidate block at a predetermined position from the plurality of blocks divided from the first color component region; traversing the at least one candidate block according to a predetermined order; and determining a first candidate block among the at least one candidate block that is intra-predicted based on the block vector as the first color component block of the current block.
[0273] It should be understood that in the embodiment of the present application, the first color component block may further be determined by determining whether to intra-predict based on a block vector for at least one candidate block at a predetermined position. For example, as shown in Figure 9, five luminance pixel positions CU are included, specifically, C, TL, TR, BL, and BR. However, the embodiment of the present application is not limited to five positions, and may be multiple different positions, and is not limited to the five positions shown in Figure 9, and is not particularly limited thereto.
[0274] It should be further understood that in the embodiment of the present application, the five positions shown in Figure 9 are sequentially obtained in a predetermined order, and the processing continues as long as the determined candidate block is intra-predicted based on the block vector (i.e., encoded / decoded in a mode having BV information), i.e., when the CU of the first luminance pixel position that is intra-predicted based on the block vector is found, the CU of this first luminance pixel position is set as the corresponding luminance block of the current block, i.e., the first color component block.
[0275] That is, in an embodiment of the present application, when determining the first color component block, at least one candidate block at a predetermined position is determined, for example, blocks including the five luminance pixel positions shown in FIG. 9 are sequentially obtained, and the process continues as long as the determined block is coded in a mode with BV information (intra-predicted based on the block vector), i.e., the process continues until a block at the first luminance pixel position that is coded in a mode with BV information is found.
[0276] In the embodiment of the present application, the predetermined order may include, but is not limited to, the order of C → TL → TR → BL → BR. Here, the detailed position derivation process of C, TL, TR, BL, and BR also involves first determining the position information of the current block, then performing a scaling process on the position information of the current block based on a predetermined sampling format (color sampling format) to obtain the position information of the same-position area corresponding to the current block, and then determining the target position information based on the same-position area position information. The block containing the target position information can be at least one candidate block at a predetermined position, such as C, TL, TR, BL, or BR.
[0277] For example, in an embodiment of the present application, when a block located at the lower right corner of the first color component region is selected as the target block, the position of the current chroma block, i.e., the position of the upper left corner chroma sample of the current chroma block relative to the upper left corner chroma sample of the current image, chromaPos=(x,y), is obtained, and chromaPos is scaled (see Table 7) based on the chroma sampling format to obtain the position of the luma region corresponding to the current chroma block at the same position, lumaPos=(xCb,yCb). In this case, it is assumed that the position of the luma pixel corresponding to the upper left corner of the current block relative to the upper left corner luma pixel of the image (i.e., the position of the luma pixel TL) is (xCb,yCb), and the width and height of the luma region corresponding to the current block (i.e., the entire diagonal fill region of the luma component in FIG. 9) are cbWidth and cbHeight, respectively.
[0278] The coordinate information of the position of the luminance pixel C is (xCb+cbWidth / 2, yCb+cbHeight / 2), The coordinate information of the position of the luminance pixel TL is (xCb, yCb), The coordinate information of the position of the luminance pixel TR is (xCb+cbWidth-1, yCb), The coordinate information of the position of the luminance pixel BL is (xCb, yCb+cbHeight-1), The coordinate information of the position of the luminance pixel BR is (xCb+cbWidth-1, yCb+cbHeight-1).
[0279] Thus, for the current block, the corresponding first color component block needs to be determined first, where if the first color component is a luminance component, the luminance block (i.e., luminance CU) at the corresponding position needs to be determined.
[0280] Further, in some embodiments, determining a first color component block of the current block from a plurality of blocks divided from the first color component region may include determining at least one candidate block at a predetermined position from a plurality of blocks divided from the first color component region, and determining the at least one candidate block directly as the first color component block of the current block.
[0281] It should be understood that in the present embodiment, the first color component block may be determined based on at least one candidate block at a predetermined position. For example, as shown in FIG. 10, CUs at five luminance pixel positions are also included. However, the present embodiment is not limited to five positions, and may be at multiple different positions, and is not limited to the five positions shown in FIG. 10, and is not particularly limited thereto.
[0282] It should be further understood that in the present embodiment, for the five positions shown in FIG. 10, the CUs of the plurality of luminance pixel positions are taken as the corresponding luminance blocks, ie, the plurality of first color component blocks, of the current block.
[0283] That is, when determining the first color component block, multiple blocks of the same position luminance region can be obtained, and the positions of the multiple blocks include, but are not limited to, the multiple positions in FIG.
[0284] Furthermore, when determining the first color component block, at least one candidate block at a predetermined position may be determined from a plurality of blocks divided from the first color component region, and then the at least one candidate block may be traversed in a predetermined order, and the first candidate block among the at least one candidate block that satisfies a predetermined condition may be determined as the first color component block of the current block. Here, if the candidate block is intra-predicted based on the block vector and block vector parameters of the second color component block determined based on the candidate block satisfy a first availability condition, the candidate block may be determined to satisfy the predetermined condition.
[0285] It should be understood that in the present embodiment, the first color component block may be further determined by determining whether at least one candidate block at a predetermined position satisfies a predetermined condition. For example, as shown in FIG. 9, five luminance pixel positions CU are included, specifically, C, TL, TR, BL, and BR. However, the present embodiment is not limited to five positions, and multiple different positions may be used, and is not limited to the five positions shown in FIG. 9, and is not particularly limited thereto.
[0286] In the present embodiment, the predetermined order may include, but is not limited to, C→TL→TR→BL→BR. Here, when sequentially determining whether at least one candidate block at a predetermined position satisfies the predetermined condition, first, it is determined whether the luma blocks at the five obtained positions are coded in a mode with BV information, i.e., whether they are intra-predicted based on the block vector. If not, the luma blocks are not obtained, and the mode identifiers are not transmitted in the bitstream. If there are one or more luma blocks coded in a mode with BV information at the five positions, these five positions are sequentially obtained again until the first luma block that satisfies the following condition is found: The condition is whether the luma block is coded in a mode with BV information, and whether the chroma BV is available after adjusting the luma BV to obtain the chroma BV. If available, the luma block is selected as the luma block from which the final BV is obtained, i.e., the first color component block.
[0287] Correspondingly, if the chrominance BV is unavailable, the luma block is not obtained, but instead predicted using a PLANAR mode or a CCLM-type mode or other angular prediction mode (including but not limited to), or find the first luma block coded in a mode with BV information, adjust its BV to be available, and select this luma block as the luma block from which the BV is finally obtained, i.e., the first color component block.
[0288] Here, the detailed process of deriving the positions of C, TL, TR, BL, and BR includes the following: Assume that the position of the co-located luminance pixel corresponding to the upper left corner of the current chroma-coding block relative to the upper left corner luminance pixel of the image (i.e., the position of the luminance pixel TL) is (xCb, yCb), and the width and height of the co-located luminance area corresponding to the current chroma-coding block (i.e., the entire gray area in the left diagram below) are cbWidth and cbHeight, respectively.
[0289] The coordinates of the position of luminance pixel C are (xCb+cbWidth / 2, yCb+cbHeight / 2), The coordinates of the position of the luminance pixel TL are (xCb, yCb), The coordinates of the position of the luminance pixel TR are (xCb+cbWidth-1, yCb), The coordinates of the position of the luminance pixel BL are (xCb, yCb+cbHeight-1), The coordinates of the position of the luminance pixel BR are (xCb+cbWidth-1, yCb+cbHeight-1).
[0290] In step 202, if the first color component block is intra predicted based on the block vector, a second block vector parameter of a second color component block of the current block is determined based on the first block vector parameter of the first color component block.
[0291] In the embodiment of the present application, after the first color component block is determined, it is necessary to determine whether the first color component block is intra-predicted based on the block vector. Here, if the first color component block is intra-predicted based on the block vector, i.e., if it is determined that the first color component block is processed in a mode with BV information, it may further determine a first block vector parameter of the first color component block (e.g., BV of the luma block), and determine a second block vector parameter of the second color component block (e.g., BV of the chroma block) based on the first block vector parameter of the first color component block.
[0292] In an embodiment of the present application, the determination condition for whether intra prediction is performed based on a block vector may be that the prediction mode of the first color component block is a mode using BV information, where it should be understood that the mode using BV information includes, but is not limited to, IBC mode or IntraTMP mode.
[0293] It should be noted that in the present embodiment, the first block vector parameter represents a vector pointing from the current block to the reference block, which is searched from the reconstruction area of the frame in which the current block is located (i.e., the current image).
[0294] Furthermore, it should be understood that in the embodiments of the present application, the number of first color component blocks may be any number, that is, the first color component block of the current block is not limited to one block here, but may be composed of multiple blocks. Correspondingly, when determining whether to perform intra prediction based on the block vector, each first color component block needs to be determined, and only the first color component that is intra predicted based on the block vector can be used to determine the second block vector parameters of the subsequent second color component.
[0295] It can be understood that in the embodiment of the present application, after the first color component block is determined, it is necessary to determine whether the first color component block is intra-predicted based on the block vector, i.e., whether the first color component block is processed in a mode with BV information. Here, if the first color component block is intra-predicted based on the block vector, a first block vector parameter of the first color component block can be determined, and a second block vector parameter of the second color component block can be determined based on the first block vector parameter.
[0296] Furthermore, in an embodiment of the present application, if the first color component block is not intra-predicted based on the block vector, i.e., if the first color component block is not processed in a mode with BV information, it is possible to choose not to transmit an identifier of that mode in the bitstream.
[0297] In addition, in an embodiment of the present application, when determining the second block vector parameters of the second color component block based on the first block vector parameters of the first color component block, it is possible to choose to directly determine the first block vector parameters of the first color component block as the second block vector parameters of the second color component block.
[0298] In addition, in an embodiment of the present application, when determining the second block vector parameters of the second color component block based on the first block vector parameters of the first color component block, it is also possible to select to determine a block vector parameter candidate list of the second color component block of the current block based on the first block vector parameters of the first color component block, and to determine the second block vector parameters of the second color component block based on the block vector parameter candidate list.
[0299] That is, in the embodiment of the present application, the first block vector parameters of the first color component block can be directly used as the second block vector parameters of the second color component block, or the first block vector parameters can be used to first construct a block vector parameter candidate list for the second color component block, and then the second block vector parameters of the second color component block can be determined based on the block vector parameter candidate list.
[0300] In some embodiments, determining the second block vector parameters of the second color component block based on the first block vector parameters of the first color component block may include directly using the first block vector parameters of the first color component block as the second block vector parameters of the second color component block, or adjusting the first block vector parameters of the first color component block to determine the second block vector parameters of the second color component block, or constructing a block vector parameter candidate list for the second color component block based on the first block vector parameters, and determining the second block vector parameters of the second color component block based on the block vector parameter candidate list.
[0301] Here, assuming that the first color component block is a luma block, the first block vector parameter may be the BV of the luma block, i.e., BVL, and assuming that the second color component block is a chroma block, the second block vector parameter may be the BV of the chroma block, i.e., BVC.
[0302] It can be understood that in the present embodiment, assuming that the first block vector parameter is luma BV=(BVLhor, BVLver) and the second block vector parameter is chroma BV=(BVChor, BVCver), we can choose to construct a chroma BVC candidate list including one or more candidate block vector parameters by adjusting BVL (luma BV) or BVC (chroma BV).
[0303] Furthermore, in an embodiment of the present application, when determining a block vector parameter candidate list for a second color component block of a current block based on the first block vector parameters of the first color component block, the first block vector parameters may be adjusted first, and then the candidate block vector parameters for the second color component block may be determined based on the candidate block vector parameters.
[0304] It can be understood that in the present embodiment, the above adjustment process may include performing a scaling process based on a chroma sampling format, where the mapping relationship between the luma BV parameters and the scaled chroma BV parameters is as shown in Table 8. Here, the syntax element sps_chroma_format_idc indicates the type of chroma sampling format, where the chroma sampling format is specifically the chroma sampling format. Different types of chroma sampling formats have different corresponding scaling operations.
[0305] For example, if the value of sps_chroma_format_idc is 0, it is determined that the chromaticity sampling format is monochrome, i.e., the chromaticity BV parameter (BVC hor ,BVC hor If the value of sps_chroma_format_idc is 1, the chroma sampling format is determined to be 4:2:0, and the mapping relationship between the luminance BV parameter and the chroma BV parameter is BVChor =BVL hor >>1,BVC hor =BVL ver >>1. If the value of sps_chroma_format_idc is 2, it determines that the chromaticity sampling format is 4:2:2, in which case the mapping relationship between the luminance BV parameters and the chromaticity BV parameters is BVC hor =BVL hor >>1,BVC hor =BVL ver If the value of sps_chroma_format_idc is 3, it indicates that the chroma sampling format is 4:4:4, in which case the mapping relationship between the luminance BV parameters and the chroma BV parameters is BVC hor =BVL hor ,BVC hor =BVL ver is.
[0306] Furthermore, in the embodiment of the present application, when adjusting the first block vector parameters to determine the candidate block vector parameters of the second color component block, the color sampling format of the current block can be first determined, and then a scaling process can be performed on the first block vector parameters based on the color sampling format to determine the candidate block vector parameters.
[0307] That is, in the embodiment of the present application, based on Table 8, it is possible to select to perform scaling based on the chroma sampling format and add the scaled BVC as a candidate block vector parameter to the chroma BVC candidate list (block vector parameter candidate list).
[0308] Furthermore, in the embodiment of the present application, when adjusting the first block vector parameters and determining the candidate block vector parameters of the second color component block, the color sampling format of the current block is first determined, and then a scaling process is performed on the first block vector parameters based on the color sampling format to determine the first initial block vector parameters, and finally the candidate block vector parameters can be determined based on the first initial block vector parameters and one or more numerical values.
[0309] Furthermore, in an embodiment of the present application, when adjusting the first block vector parameters and determining the candidate block vector parameters of the second color component block, one or more second initial block vector parameters can be determined based on the first block vector parameters and one or more numerical values, and then the color sampling format of the current block can be determined, and a scaling process can be performed on the second initial block vector parameters based on the color sampling format to determine the candidate block vector parameters.
[0310] It should be noted that the one or more numerical values above can be any number of any values.
[0311] That is, in the embodiment of the present application, after obtaining the BV of the corresponding luma block, it is denoted as BVL, and the chroma BV obtained based on the BVL is denoted as BVC. By adjusting the BVL or BVC, a chroma BVC candidate list including one or more candidates can be constructed. That is, according to Table 8, scaling can be performed based on the chroma sampling format, and the scaled BVL or BVC can be selected to be added to the chroma BVC candidate list as a candidate block vector parameter.
[0312] For example, in an embodiment of the present application, the BVC adjustment can be realized by adjusting the BVL to form four situations. Here, if the BVL is odd, the four situations are BVL=(BVLhor,BVLver), BVL=(BVLhor+1,BVLver), BVL=(BVLhor,BVLver+1), and BVL=(BVLhor+1,BVLver+1). Here, if the BVL is even, the BVL=(BVLhor,BVLver). Then, using Table 8, the BVL can be scaled based on the chrominance sampling format to obtain the BVC. In this way, if the BVL is odd, four BVC candidate block vector parameters are formed, and these candidate block vector parameters are added to the chrominance BVC candidate list.
[0313] For example, in an embodiment of the present application, the BVC adjustment can be achieved by adjusting the BVL to form four situations: when the BVL is odd, the four situations are BVL=(BVLhor,BVLver), BVL=(BVLhor+1,BVLver), BVL=(BVLhor,BVLver+1), and BVL=(BVLhor+1,BVLver+1); when the BVL is even, the four situations are BVL=(BVLhor,BVLver), BVL=(BVLhor-1,BVLver), BVL=(BVLhor,BVLver-1), and BVL=(BVLhor-1,BVLver-1). Then, using Table 8, the BVL can be scaled based on the chroma sampling format to obtain the BVC; in this way, whether the BVL is odd or even, four BVC candidates are formed, and these candidates are added to the chroma BVC candidate list.
[0314] For example, in the embodiment of the present application, the operations under different odd and even situations can be unified by the following calculation: directly take four situations: BVL=(BVLhor-1, BVLver-1), BVL=(BVLhor+1, BVLver-1), BVL=(BVLho-1r, BVLver+1), BVL=(BVLhor+1, BVLver+1).
[0315] For example, in an embodiment of the present application, the BVC can be adjusted by adjusting the BVL to form multiple scenarios, where if the BVL is an odd number, multiple scenarios are taken, such as BVL=(BVLhor,BVLver), BVL=(BVLhor+1,BVLver), BVL=(BVLhor,BVLver+1), BVL=(BVLhor+1,BVLver+1), BVL=(BVLhor+3,BVLver), BVL=(BVLhor,BVLver+3), BVL=(BVLhor+3,BVLver+3), BVL=(BVLhor-2,BVLver), and BVL=(BVLhor,BVLver-2), and these candidates are listed in order. When BVL is an even number, there are several situations, such as BVL=(BVLhor,BVLver), BVL=(BVLhor-1,BVLver), BVL=(BVLhor,BVLver-1), BVL=(BVLhor-1,BVLver-1), BVL=(BVLhor-3,BVLver), BVL=(BVLhor,BVLver-3), BVL=(BVLhor-3,BVLver-3), BVL=(BVLhor+2,BVLver), BVL=(BVLhor,BVLver+2), etc. Then, using Table 8, BVL can be scaled based on the chroma sampling format to obtain BVC. In this way, whether BVL is an odd number or an even number, multiple BVC candidates are formed, and these candidates are added to the chroma BVC candidate list.
[0316] For example, in the embodiment of the present application, the following calculation can be used to unify the behavior under different odd and even situations: directly take BVL=(BVLhor-1,BVLver-1), BVL=(BVLhor+1,BVLver-1), BVL=(BVLhor-1,BVLver+1), BVL=(BVLhor+1,BVLver+1), BVL=(BVLhor+3,BVLver-1), BVL=(BVLhor-1,BVLver+3), BVL=(BVLhor+3,BVLver+3), BVL=(BVLhor-3,BVLver-1), BVL=(BVLhor-1,BVLver-3), etc.
[0317] For example, in the embodiment of the present application, the obtained BVC can be further adjusted to obtain nine candidates, namely, set as follows: BVC=(BVChor,BVCver), BVC=(BVChor-1,BVCver), BVC=(BVChor,BVCver-1), BVC=(BVChor-1,BVCver-1), BVC=(BVChor+1,BVCver), BVC=(BVChor,BVCver+1), BVC=(BVChor+1,BVCver+1), BVC=(BVChor-1,BVCver+1), BVC=(BVChor+1,BVCver-1), thus forming nine BVC candidates, which are added to the chromaticity BVC candidate list.
[0318] Illustratively, in the embodiments of the present application, the obtained BVC can be further adjusted to obtain multiple candidates, i.e., BVC=(BVChor,BVCver), BVC=(BVChor-1,BVCver), BVC=(BVChor,BVCver-1), BVC=(BVChor-1,BVCver-1), BVC=(BVChor+1,BVCver), BVC=(BVChor,BVCver+1), BVC=(BVChor+1,BVCver+1), BVC=(BVChor-1,BVCver+1), BVC=(BVChor+1 ,BVCver-1), BVC=(BVChor-2,BVCver), BVC=(BVChor,BVCver-2), BVC=(BVChor-2,BVCver-2), BVC=(BVChor+2,BVCver), BVC=(BVChor,BVCver+2), BVC=(BVChor+2,BVCver+2), BVC=(BVChor-2,BVCver+2), BVC=(BVChor+2,BVCver-2), etc., multiple BVC candidates are formed, and these candidates are added to the chromaticity BVC candidate list.
[0319] Furthermore, in an embodiment of the present application, when determining a block vector parameter candidate list for a second color component block of a current block based on the first block vector parameters of the first color component block, the embodiment may first determine optimal block vector parameters based on the first block vector parameters, then determine a color sampling format of the current block, and perform a scaling process on the optimal block vector parameters based on the color sampling format to determine candidate block vector parameters for the second color component block, and then determine a block vector parameter candidate list based on the candidate block vector parameters.
[0320] For example, in the embodiment of the present application, in the IBC mode of single-tree inter prediction and single-tree partitioning, an optimal BVL (optimal block vector parameter) is determined from the luma BV (denoted as BVL) by RDO, and then the optimal block vector parameter is scaled based on the chroma sampling format to obtain the chroma BV (denoted as BVC). Here, the scaling process of the optimal block vector parameter can be performed using the above Table 8, and the optimal block vector parameter can also be adjusted in combination with any of the above adjustment or scaling methods to obtain the corresponding candidate block vector parameter, thereby completing the construction of the block vector parameter candidate list.
[0321] Furthermore, in an embodiment of the present application, when determining a block vector parameter candidate list for a second color component block of a current block based on a first block vector parameter of a first color component block, an optimal block vector parameter corresponding to the first color component block can be first determined, and then a block vector parameter candidate list for the second color component block of the current block can be determined based on the optimal block vector parameter.
[0322] For example, in the embodiment of the present application, in the case of IntraTmp mode, the optimal mode (optimal block vector parameter) of the luma block can be obtained by detailed search using a template, denoted as BVL; when IntraTmp is applied to chroma, any of the above-mentioned list construction methods can be used to complete the construction of the block vector parameter candidate list based on the optimal block vector parameter.
[0323] In this embodiment, a new prediction mode that can be introduced in this embodiment can be represented by INTRA_DBV, which performs a prediction process on the second color component of the current block based on the determined second block vector parameter, thereby determining a predicted value of the second color component.
[0324] It should be further noted that in the embodiment of the present application, when determining the second block vector parameters of the second color component block based on the block vector parameter candidate list, it is necessary to determine whether further candidate block vector parameters are available, i.e., it is necessary to select one or more available candidate block vector parameters from the block vector parameter candidate list.
[0325] In some embodiments, when determining the second block vector parameters of the second color component block based on the block vector parameter candidate list, it is first determined whether there are one or more candidate block vector parameters in the block vector parameter candidate list that satisfy the first availability condition, and if there are one or more candidate block vector parameters that satisfy the first availability condition, the second block vector parameters can be determined based on the one or more candidate block vector parameters.
[0326] Specifically, in the embodiment of the present application, only if the candidate block vector parameters satisfy the first availability condition, the candidate block vector parameters can be determined as the second block vector parameters.
[0327] Furthermore, in some embodiments, one or more candidate block vector parameters satisfying the first availability condition is determined by at least: the offset position indicated by one or more candidate block vector parameters does not cross an image boundary; the offset locations indicated by one or more candidate block vector parameters do not overlap with the current block; the offset position indicated by one or more candidate block vector parameters does not exceed a predetermined available area; The offset position indicated by one or more candidate block vector parameters may have already been reconstructed.
[0328] It should be understood that in the embodiment of the present application, only when all the above conditions are met, it is determined that the candidate block vector parameters satisfy the first availability condition, i.e., the candidate block vector parameters are available. In one specific embodiment, the candidate block vector parameters satisfying the first availability condition includes at least the following: the offset position indicated by the candidate block vector parameters does not cross an image boundary; the offset position indicated by the candidate block vector parameters does not overlap with the current block; the offset position indicated by the candidate block vector parameters does not exceed a predetermined available area; and the offset position indicated by the candidate block vector parameters has already been reconstructed.
[0329] 11, the black-filled block represents the current block, the shaded area represents the available area, and the unfilled area represents the unavailable area. If the offset position indicated by the candidate block vector parameter for the current block is in the unavailable area, a situation occurs in which the offset position overlaps with the current block.
[0330] 12, the black-filled block represents the current block, the shaded area represents the available area, and all reference blocks in the available area have been reconstructed. In the embodiment of the present application, considering the storage capacity of the buffer, the reference blocks adjacent to the current block (m, n), specifically, the reference blocks (m-2, n-2), (m-1, n-2), (m, n-2), (m+1, n-2), (m-2, n-1), (m-1, n-1), (m, n-1), (m+1, n-1), (m-2, n), (m-1, n), etc. can be set as the predetermined available area.
[0331] Furthermore, in an embodiment of the present application, when constructing a block vector parameter candidate list, first, a candidate block vector parameter of a second color component block is determined based on a first block vector parameter, and if the candidate block vector parameter satisfies a first availability condition, a modification process is performed on the candidate block vector parameter, and a block vector parameter candidate list can be determined based on the modified candidate block vector parameter.
[0332] Correspondingly, if the candidate block vector parameters do not satisfy the first availability condition, an adjustment process is performed on the candidate block vector parameters until the adjusted candidate block vector parameters satisfy the first availability condition.
[0333] In addition, in an embodiment of the present application, when performing a modification process on the candidate block vector parameters, the offset position of the second color component block is determined based on the candidate block vector parameters and the position information of the second color component block, and then a search process is performed based on the offset position of the second color component block to determine the modified candidate block vector parameters.
[0334] It should be further understood that in the embodiment of the present application, after performing a scaling process on the first block vector parameters of the first color component block based on the color sampling format, the obtained candidate block vector parameters need to be further modified. Here, before the modification process, it is also necessary to determine whether the candidate block vector parameters satisfy a first availability condition. If the candidate block vector parameters satisfy the first availability condition, the candidate block vector parameters of the current block are modified to determine the modified parameters as the second block vector parameters; or if the candidate block vector parameters do not satisfy the first availability condition, the candidate block vector parameters are adjusted until the adjusted block vector parameters satisfy the first availability condition, and then the adjusted block vector parameters are modified to determine the modified parameters as the second block vector parameters.
[0335] That is, in the present embodiment, a chromaticity BV can be modified and the modified BVC can be added to the chromaticity BVC candidate list, in which case only the modified BVC exists.
[0336] For example, after obtaining the scaled chromaticity BV based on the chromaticity sampling format, further modification is performed on it. Before the modification, it is necessary to first determine whether the BV is available. If it is available, the modification is performed; if it is not available, the BV is adjusted to be available and then the modification is performed. The modified BVC is added to the chromaticity BVC candidate list.
[0337] Here, when determining whether or not a chromaticity BV is available, the position (xCb, yCb) of the current chromaticity block is obtained, the chromaticity BVC = (BVChor, BVCver) is obtained, the corresponding offset position (xCb + BVChor, yCb + BVCver) is identified, and the following condition (i.e., the first availability condition) is determined. If all of the following conditions are met, the chromaticity BV is available.
[0338] Whether the obtained offset position does not exceed the image boundary, As shown in Figure 10 above, whether the obtained offset position does not overlap with the current block, As shown in FIG. 11, whether the obtained offset position does not exceed a predetermined available area or not, Whether the obtained offset position has already been reconstructed.
[0339] For example, in an embodiment of the present application, a template search can be adopted as the modification method, that is, after obtaining the modified chrominance BV parameters, an offset position can be found using the position of the current block and the modified chrominance BV parameters, and then a fine search can be performed near the offset position using a template matching method to obtain optimal chrominance BV parameters, and a chrominance predicted block for the current block can be obtained by copying the reference block at the optimal offset position obtained by the fine search. As shown in Figure 13, the shaded area represents the chrominance reconstruction area, and a template matching method can be adopted to find the optimal matching template and the corresponding optimal BV for the current block, and a reference block for the current block can be determined based on the optimal BV (i.e., IntraTMP BV), and thus a chrominance predicted value for the current block can be determined.
[0340] Since the availability of the BV has already been determined before the modification, there is no need to subsequently determine whether it is available (whether it satisfies the first availability condition), and the second block vector parameters can be determined directly.
[0341] Furthermore, in an embodiment of the present application, when constructing a block vector parameter candidate list, if a first block vector parameter satisfies a second availability condition, a modification process is performed on the first block vector parameter, and the block vector parameter candidate list is determined based on the modified first block vector parameter.
[0342] That is, before constructing the block vector parameter candidate list, a modification process can be performed on the first block vector parameter, for example, modifying the luminance BVL, and then constructing the BVC candidate list using any of the above list construction methods.
[0343] For example, in an embodiment of the present application, the co-located luma region corresponding to the current chroma block can be first obtained. Here, as shown in the schematic diagram of the coordinates and block sizes of the current chroma block and the co-located luma region in FIG. 14, the position of the current chroma block, chromaPos=(xCb, yCb), is obtained, and chromaPos is scaled based on the chroma sampling format in accordance with Table 7 above to obtain the co-located luma region position, lumaPos=(xCb_Y, yCb_Y), corresponding to the current chroma block. The size of the current chroma block, chromaSize=(cbWidth, cbHeight), is obtained, and chromaSize is scaled based on the chroma sampling format in accordance with the mapping relationship in Table 9 to obtain the co-located luma region size, lumaSize=(cbWidth_Y, cbHeight_Y), corresponding to the current chroma block.
[0344] For example, further correction is made to the luminance BVL, and before the correction, it is first necessary to determine whether the BVL is available (whether the second availability condition is met), and if it is available, the correction is made, or if it is not available, it is adjusted so that it becomes available and then the correction is made.
[0345] In some embodiments, when determining whether a BVL is available, the position (xCb_Y, yCb_Y) of the same-position luminance area is obtained, the luminance BVL=(BVLhor, BVLver) is obtained, the corresponding offset position (xCb_Y+BVLhor, yCb_Y+BVLver) is identified, and the following conditions are determined. If all of the following conditions are met, the luminance BVL (first block vector parameter) is available, and the first block vector parameter satisfies the second availability condition, which means at least: the offset position indicated by the first block vector parameter does not exceed the image boundary; As shown in FIG. 12, the offset position indicated by the first block vector parameter does not exceed a predetermined available area; The offset position indicated by the first block vector parameter has already been reconstructed.
[0346] Here, compared with the first usable condition, the second usable condition does not require determining whether the current block covers the same-position luminance area corresponding to the current block.
[0347] Furthermore, in an embodiment of the present application, when performing the modification process, the offset position of the first color component block is determined based on the first block vector parameters and the position information of the first color component block, and a search process is performed based on the offset position of the first color component block to determine the modified first block vector parameters.
[0348] For example, the correction process may include, but is not limited to, a correction method using a co-located luminance region search corresponding to the current chrominance block, that is, after obtaining the luminance BVL, use the position of the co-located luminance region and the obtained luminance BVL to find an offset position, and then use the co-located luminance region to perform a detailed search near the offset position, where the range of the detailed search must fill the limited available area, as shown in Figure 12. Finally, an optimal luminance BVL is obtained, as shown in Figure 15, by the co-located luminance region search.
[0349] It can be understood that in the embodiments of the present application, the construction method of the block vector parameter candidate list includes, but is not limited to, the above-mentioned multiple situations, and different methods can be used to construct one candidate list at the same time.
[0350] Furthermore, in the embodiments of the present application, if there are one or more candidate block vector parameters that satisfy the first availability condition, when determining the second block vector parameter based on the one or more candidate block vector parameters, one candidate block vector parameter that directly satisfies the first availability condition can be determined as the second block vector parameter.
[0351] That is, if there is only one BVC candidate that satisfies the first usable condition in the constructed usable BVC candidate list, the BV (second block vector parameter) that is finally selected becomes that BVC.
[0352] Furthermore, in embodiments of the present application, if there are one or more candidate block vector parameters that satisfy the first availability condition, when determining second block vector parameters based on the one or more candidate block vector parameters, the embodiment may include: for the plurality of candidate block vector parameters that satisfy the first availability condition, determining a first matching template based on the plurality of candidate block vector parameters; calculating a matching error between the first template of the current block and the first matching template based on a predetermined error criterion; and determining a first cost value corresponding to the plurality of candidate block vector parameters; and finally determining one or more second block vector parameters from the plurality of candidate block vector parameters based on the first cost value.
[0353] In other words, in an embodiment of the present application, if there are multiple available BVC candidates in the constructed available BVC candidate list, a decision process must be performed on these available BVCs to obtain the final BV, and the decision method includes, but is not limited to, a method of performing decision process using a template.
[0354] It can be appreciated that in the present embodiment, the predetermined error criterion comprises one of the following: sum of absolute differences (SAD), sum of absolute difference transform (SATD), sum of squared differences (SSE), mean absolute difference (MAD), mean absolute error (MAE), and mean squared error (MSE).
[0355] For example, in the embodiment of the present application, when calculating the cost, i.e., when determining the first cost value, there are multiple options for the cost function for calculating the cost of the template region, i.e., there are multiple options for the predetermined error criterion. For example, evaluation criteria such as sum of absolute differences (SAD), sum of absolute differences after transformation (SATD), sum of squared differences (SSE), mean absolute difference (MAD), mean absolute error (MAE), mean squared error (MSE), etc. can be selected. The evaluation criteria mentioned in the following content can be any one of the above criteria. Taking the evaluation criterion of SAD as an example, the calculation formula is as follows:
[0356] It should be noted that in the present embodiment, the first template includes one or more sample values in adjacent decoded regions of the current block.
[0357] For example, in an embodiment of the present application, when selecting a template (first template of a current block), it may be determined whether a pixel at the template position is available (including reconstructed luminance information) based on the availability of pixels in the neighboring regions of the current block. Figure 16 is a schematic diagram of template types. As shown in Figure 16, templates may be classified into template types such as top template, left template, top right template, bottom left template, and top left template based on the relative positional relationship between the template and the current block. Here, the template sizes of different types of different coding blocks may be fixed to the same size or may be different.
[0358] In some embodiments, when determining a first matching template based on multiple candidate block vector parameters, the position of the current point can be used as a starting point to determine an area indicated by the multiple candidate block vector parameters that has the same shape and contains the same number of sample values as the first template as the first matching template.
[0359] For example, in an embodiment of the present application, when determining the first matching template, motion compensation is performed using the first template of the current block for the obtained multiple BVC candidates (i.e., candidate block vector parameters that satisfy the first availability condition) to obtain a template in the corresponding BV (first matching template). Figure 17 is a schematic diagram of template motion compensation, and as shown in the figure, when a BV (BVC candidate) is available, motion compensation is performed using the first template and the new BV to obtain a template in the corresponding BV, i.e., the first matching template.
[0360] Here, there are several cases in which templates are used when calculating costs, as follows:
[0361] First case: If both the top template and the left template of the current block exist, and both the top template and the left template exist in the corresponding BV, then both the top template and the left template are available.
[0362] Second case: If both a top template and a left template exist for the current block, but only the top template exists for the corresponding BV, there are two methods: Method 1: Since the left template does not exist for the corresponding BV, it is not used directly, i.e., calculation is performed using only the top template; Method 2: Since the left template does not exist for the corresponding BV, the leftmost template-width column in the reference block is used as a substitute for the left template, i.e., calculation is performed using the top template and the left template.
[0363] Third case: If both the top and left templates of the current block exist, but only the left template exists in the corresponding BV, there are two methods: Method 1: Since the top template does not exist in the corresponding BV, it is not used directly, i.e., calculation is performed using only the left template. Method 2: If the top template does not exist in the corresponding BV, the row with the topmost template height in the reference block is used as a substitute for the top template, i.e., calculation is performed using the top template and the left template.
[0364] Fourth Case: If only the top template of the current block exists, there are three methods. Method 1: Since there is no top template for the corresponding BV, it is not used directly. In this case, the BV finally selected is the first BVC in the BVC candidate list or the BVC at a specified position. Method 2: If there is no top template for the corresponding BV, the row with the topmost template height in the reference block is used instead of the top template. Method 3: If there is a top template for the corresponding BV, it is used directly.
[0365] Fifth Case: When only the left template of the current block exists, there are three methods. Method 1: Since the left template does not exist in the corresponding BV, it is not used directly. In this case, the BV finally selected is the first BVC in the BVC candidate list or the BVC at a specified position. Method 2: When the left template does not exist in the corresponding BV, the leftmost template-width column in the reference block is used instead of the left template. Method 3: When the left template exists in the corresponding BV, it is used directly.
[0366] Sixth case: If neither the top template nor the left template of the current block exists, the BV finally selected is the first BVC in the BVC candidate list or the BVC at a specified position.
[0367] Illustratively, in the embodiment of the present application, when determining one or more second block vector parameters based on the first cost value, unless the cost cannot be calculated, in other cases, the cost of each candidate in the BVC candidate list is calculated and sorted, and the sorting method includes, but is not limited to, bubble sort, selection sort, insertion sort, shell sort, merge sort, quick sort, radix sort, heap sort, counting sort, bucket sort, etc. Any number of BVCs with the smallest cost are selected as the final BV (second block vector parameter), and BV-based chromaticity prediction is performed based on this.
[0368] Furthermore, in an embodiment of the present application, if all candidate block vector parameters in the block vector parameter candidate list do not satisfy the first availability condition, the predicted value of the second color component can be determined based on a first predetermined mode.
[0369] In some embodiments, the first predetermined mode includes at least one of, but is not limited to, a planar mode, a DM mode, a DC mode, a CCLM mode, and a skip mode.
[0370] For example, if the prediction mode of the first color component block is not the IBC mode, the first predetermined mode may include, but is not limited to, a planar mode, a cross-component prediction mode (e.g., a CCLM mode), or another angle prediction mode. Then, the reference pixels and related parameters are obtained to perform the prediction process. Furthermore, the first predetermined mode may be a skip mode, i.e., the current block may skip the prediction process of the corresponding mode.
[0371] Furthermore, in an embodiment of the present application, if all candidate block vector parameters in the block vector parameter candidate list do not satisfy the first availability condition, an adjustment process is performed on the candidate block vector parameters in the block vector parameter candidate list until one or more candidate block vector parameters that satisfy the first availability condition are present in the block vector parameter candidate list.
[0372] That is, in an embodiment of the present application, if all candidate block vector parameters in the block vector parameter candidate list are unavailable, i.e., if all candidate block vector parameters in the block vector parameter candidate list do not satisfy the first availability condition, it may be possible to select to adjust any one or more BVC candidates (candidate block vector parameters) in the block vector parameter candidate list until they become available. Here, adjustment methods include, but are not limited to, cropping, scaling, etc. Also, instead of a prediction method using BV information such as DBV mode, it may be possible to adopt PLANAR mode, CCLM mode, or other angle prediction mode, i.e., it may be possible to select to determine the predicted value of the second color component based on the first predetermined mode.
[0373] For example, in the embodiment of the present application, in the case of a planar mode, a CCLM-like mode, or other angle mode, the reference pixel and mode parameters can be obtained to perform chrominance mode prediction.
[0374] In step 203, a predicted value of the second color component is determined based on the second block vector parameters.
[0375] When determining the predicted value of the second color component based on the second block vector parameters, the offset position of the current block is determined based on the second block vector parameters and the position information of the current block, a block copy process is performed based on the offset position of the current block to obtain a first predicted block, and the predicted value of the second color component can be determined based on the first predicted block.
[0376] In some embodiments, in the present application, when the second color component of the current block is predicted using the second block vector parameters, the position information (xCb, yCb) and chromaticity BV=(BVChor, BVCver) of the current block can be obtained, and the offset position (xCb+BVChor, yCb+BVCver) can be determined to perform block copying, as shown in FIG. 18.
[0377] For example, cbWidth represents the width of the current block in chrominance samples, cbHeight represents the height of the current block in chrominance samples, predSamples[x][y] represents the chrominance predicted value of the current block, and cIdx specifies the color component index of the current block. The specific process is as follows:
[0378] For x=xCb...xCb+cbWidth-1 and y=yCb...yCb+cbHeight-1, we get
[0379] xVb= (xCb+BVChor)&(IbcBufWidthC-1) yVb= (yCb+BVCver)&(CtbSizeC-1) predSamples[x][y]= ibcVirChromaBuf[xVb][yVb] where BufWidthC represents the width of the chrominance pixel in the stored reconstruction buffer, CtbSizeC represents the size of the chrominance pixel in the CTU (Coding Tree Unit), and VirChromaBuf represents the stored reconstruction chrominance pixel. function() is a processing function for pixel values, which may be a direct copy, or a shift operation or filtering operation to ensure calculation accuracy.
[0380] Furthermore, when determining the predicted value of the second color component based on the second block vector parameters, multiple offset positions of the current block can be determined based on the multiple second block vector parameters and the position information of the current block, a block copy process can be performed based on the multiple offset positions of the current block to obtain multiple second predicted blocks, a weighting process can be performed on the second predicted blocks, a first predicted block can be determined, and the predicted value of the second color component can be determined based on the first predicted block.
[0381] That is, in an embodiment of the present application, when multiple BVs are determined, i.e., when multiple second block vector parameters are determined based on the block vector parameter candidate list, multiple second predicted values are obtained by prediction based on the multiple BVs, and then these multiple second predicted values are weighted to obtain weighted first predicted values.
[0382] Furthermore, in an embodiment of the present application, when determining a predicted value of the second color component based on the first predicted block, it is possible to choose to directly determine the first predicted block as the predicted value of the second color component.
[0383] Furthermore, in an embodiment of the present application, when determining a predicted value of the second color component based on the first predicted block, it may be possible to select to perform a correction process on the first predicted block and determine a predicted value of the second color component.
[0384] Here, after obtaining the first predicted value, the first predicted value may be further corrected, and the correction method may include, but is not limited to, weighting with CCLM-type modes or other modes.
[0385] For example, in an embodiment of the present application, the position (xCb, yCb) of the current chroma block is obtained, and the chroma BV=(BVChor, BVCver) is obtained, and the corresponding offset position (xCb+BVChor, yCb+BVCver) is determined, and then block copy is performed, and the copy value is modified to obtain the final predicted value, and the modification method includes, but is not limited to, weighting with CCLM-like modes or other modes.
[0386] Exemplarily, in one specific embodiment, determining a predicted value of a second color component based on the first predicted block may include: performing an intra prediction process on the second color component of the current block based on a second predetermined mode to obtain a second predicted block; and performing a weighted fusion process on the first predicted block and the second predicted block to determine a predicted value of the second color component, where the second predetermined mode includes at least one of a PLANAR mode, a DM mode, a DC mode, and a CCLM mode.
[0387] In the embodiment of the present application, when the predicted value of the second color component is obtained by performing block copying using the second block vector parameters, it is understood that the predicted value can be modified using a method such as weighting with the normal prediction mode, but is not limited to this.
[0388] Further, in an embodiment of the present application, prediction mode identification information is determined, and if the prediction mode identification information indicates that the second color component of the current block uses DBV mode, a second block vector parameter of the second color component block is determined, and a predicted value of the second color component is determined based on the second block vector parameter.
[0389] In an embodiment of the present application, it can be determined based on the prediction mode identification information whether the second color component of the current block can use DBV mode (prediction based on BV information), and by determining the value of the prediction mode identification information by decoding, it can be determined whether the prediction mode identification information indicates that the second color component of the current block uses DBV mode.
[0390] Illustratively, in an embodiment of the present application, if the value of the prediction mode identification information is a first value, it is determined that the prediction mode identification information indicates that the second color component of the current block is predicted using BV information, and if the value of the prediction mode identification information is a second value, it is determined that the prediction mode identification information indicates that the second color component of the current block is not predicted using BV information.
[0391] In the present embodiment, the prediction mode identification information may be represented by intra_dbv_flag or intra_chroma_ibc_flag, and indicates whether the second color component of the current block is predicted using BV information.
[0392] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value may be in a parameter format or a numerical format. Specifically, the prediction mode identification information may be a parameter written in a profile or a flag value, and there is no particular limitation thereto.
[0393] For example, taking the case where the first value is 1 and the second value is 0, the value of the prediction mode identification information is determined by decoding, and it may be determined that the second color component of the current block is predicted using BV information if the value of the prediction mode identification information is also 1. Then, based on the above method, a second block vector parameter of the second color component block may be determined, and a predicted value of the second color component may be determined based on the second block vector parameter.
[0394] It can be further understood that the decoding method proposed in the embodiments of the present application may modify the DM mode of the related art so that the modified DM mode is compatible with the INTRA_DBV mode.
[0395] In the present embodiment, in binary tree division and DM mode, if the corresponding luma domain has BV information, the current chroma block is predicted using DBV mode, i.e., it can be predicted based on the BV information. For example, If CuPredMode[0][xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to MODE_IBC, setting intra_dbv_flag=1 causes the chrominance intra prediction mode IntraPredModeC[xCb][yCb] to use DBV.
[0396] If CuPredMode[0][xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to MODE_INTRA, IntraTmpFlag[xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to 1, and you set intra_dbv_flag=1, the chrominance intra prediction mode IntraPredModeC[xCb][yCb] uses DBV.
[0397] Here, the chromaticity prediction mode is derived as follows.
[0398] The chromaticity intra prediction mode IntraPredModeC[xCb][yCb] uses cclm_mode_flag, cclm_mode_idx, and intra_chroma_pred_mode, lumaIntraPredMode, and lumaTempPredMode specified in Table 10. Here, 0 represents Planar mode, 1 represents DC, 18 represents horizontal prediction mode, 50 represents vertical prediction mode, and 81 to 83 represent CCLM prediction mode. Note that entries other than DBV mode are corresponding values given as examples, and do not necessarily need to be filled in with these values.
[0399] In some embodiments, in DM mode, if intra_dbv_flag==1, that is, if the information obtained from the central block of the co-located luminance region includes BV, the chrominance intra prediction mode IntraPredModeC[xCb][yCb] uses DBV. Then, the second color component can be predicted based on the decoding method of steps 101 to 103. Here, if the first color component block is the central block of the co-located luminance region, the BV of the corresponding luminance block can be directly obtained as the first block vector parameter. Furthermore, if the candidate block vector parameter (candidate chrominance BV) determined based on the first block vector parameter is unavailable, the corresponding luminance prediction mode can be obtained to predict the second color component.
[0400] In other words, when making predictions using INTRA_DBV mode, if the CU at the center of the acquired same-position luminance area is unavailable, the corresponding luminance prediction mode can be obtained to perform chromaticity prediction.
[0401] Furthermore, in an embodiment of the present application, when any block in the first color component region is intra-predicted based on the block vector, it is determined that the second color component of the current block uses DBV mode, second block vector parameters of the second color component block are determined, and a predicted value of the second color component is determined based on the second block vector parameters. That is, when it is determined that the second color component of the current block uses DBV mode, second block vector parameters of the second color component block can be determined based on the above method, and a predicted value of the second color component can be determined based on the second block vector parameters.
[0402] That is, the judgment condition of the DM scheme may be that BV information exists at any position in the entire corresponding luma region. In some embodiments, for the DM mode, if the prediction information of the corresponding luma region includes BV information, the current chroma block is coded using DBV mode. For example, in x=xCb...xCb+cbWidth-1, y=yCb...yCb+cbHeight-1, if there is any (x, y) that makes CuPredMode[0][x][y] equal to MODE_IBC, Intra_DBV_flag is set to 1, and the chroma intra prediction mode IntraPredModeC[xCb][yCb] uses DBV. If there is any (x, y) where x=xCb...xCb+cbWidth-1, y=yCb...yCb+cbHeight-1 that makes CuPredMode[0][x][y] equal to MODE_INTRA and IntraTmpFlag[x][y] equal to 1, then Intra_DBV_flag is set to 1, and the chrominance intra prediction mode IntraPredModeC[xCb][yCb] uses DBV. Here, IntraTmpFlag indicates whether to use IntraTmp mode.
[0403] Furthermore, in the present embodiment, when performing a transform and an inverse transform on the corresponding residual of the chroma block predicted in DBV mode, the following methods are included, but are not limited to: only one transform (e.g., only a discrete cosine transform (DCT) without a low-frequency non-separable transform (LFNST)) or two transforms (a linear transform and a secondary transform, e.g., a DCT transform is performed first on the encoding side, followed by an LFNST transform). The transform method performed on the decoding side is in the reverse order to the forward transform method performed on the encoding side.
[0404] In addition, according to the encoding / decoding method proposed in the embodiments of the present application, on the one hand, the uniformity of chromaticity prediction is improved and the information of the co-located luminance region is fully utilized, thereby effectively improving the accuracy of chromaticity prediction; on the other hand, by adjusting the accuracy of chromaticity BV and constructing a candidate list, multiple possibilities can be adaptively provided according to different content and sampling formats, thereby making DBV prediction more effective and further improving coding efficiency.
[0405] In summary, the encoding / decoding method proposed in the embodiments of this application fully considers available information such as reconstructed luma and BV, predicts chroma based on this information, improves the uniformity of chroma prediction, and after obtaining the luma BV, configures multiple chroma BV candidates by adjusting the luma BV or chroma BV, and can adaptively provide multiple options according to different content and sampling formats, thereby making DBV prediction more effective and further improving coding efficiency.
[0406] That is, in the embodiment of the present application, the BV parameters of the corresponding luminance block are obtained, and the BV parameters are adjusted and applied to the chrominance, thereby improving the uniformity of the chrominance prediction, and by fully utilizing the information of the co-located luminance region, the accuracy of the chrominance prediction is improved, and ultimately the encoding / decoding efficiency is effectively improved.
[0407] An embodiment of the present application provides an encoding / decoding method, in which a codec determines a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determines a second block vector parameter of a second color component block based on a first block vector parameter of the first color component block, and determines a predicted value of the second color component based on the second block vector parameter. As can be seen from this, in this embodiment, if a luma block corresponding to the current block is intra-predicted based on a block vector, determines a second block vector parameter to be applied to the chroma component based on the block vector parameter of the luma block, and predicts the chroma component using the second block vector parameter. In other words, the encoding / decoding method proposed in this embodiment overcomes the problem of unity in chroma prediction and fully utilizes related information of the co-located luma block to improve the accuracy of chroma prediction, thereby saving bitrate, improving encoding / decoding efficiency, and ultimately improving encoding / decoding performance.
[0408] Based on the above embodiments, the encoding / decoding method proposed in the embodiments of the present application may include a new prediction mode or may include a modified improvement of the DM mode. Here, for the new chromaticity prediction mode INTRA_DBV, Figure 20 is a schematic diagram of a detailed process of the encoding method according to the embodiments of the present application. As shown in Figure 20, the detailed process may include the following steps:
[0409] In step S1401, the luminance block corresponding to the current block is obtained.
[0410] In step S1402, it is determined whether the corresponding luminance block is coded in a mode with BV information.
[0411] In step S1403, the first BV parameter of the corresponding luminance block is obtained.
[0412] In step S1404, a BV candidate list is constructed based on the first BV parameters to be applied to the chromaticity.
[0413] In step S1405, it is determined whether the BVs in the BV candidate list are available.
[0414] In step S1406, the BV is adjusted until it is available.
[0415] In step S1407, a determination process is performed on the available BVs to determine the second BV parameters.
[0416] In step S1408, the mode identifier of DBV is not transmitted in the bitstream.
[0417] In step S1409, chromaticity prediction is performed using the second BV parameters.
[0418] In the present embodiment, the corresponding luminance block is used to indicate the co-located luminance CU of the chromaticity components of the current block. Regarding S1402, if the determination result is "yes", S1403 to S1407 can be executed, and if the determination result is "no", S1408 can be executed. Regarding S1405, if the determination result is "yes", S1407 can be executed, and if the determination result is "no", S1406 can be executed first, and then S1407 can be executed.
[0419] In another specific embodiment, Figure 21 is a schematic diagram of a detailed process of another encoding method according to an embodiment of the present application. As shown in Figure 21, the detailed process may include the following steps:
[0420] In step S1501, the luminance block corresponding to the current block is obtained.
[0421] In step S1502, it is determined whether the corresponding luminance block is coded in a mode with BV information.
[0422] In step S1503, the first BV parameter of the corresponding luminance block is obtained.
[0423] In step S1504, a BV candidate list is constructed based on the first BV parameters to be applied to the chromaticity.
[0424] In step S1505, it is determined whether the BVs in the BV candidate list are available.
[0425] In step S1506, chrominance prediction is performed on the current block using a first predetermined mode.
[0426] In step S1507, a determination process is performed on the available BVs to determine the second BV parameters.
[0427] In step S1508, the mode identifier of DBV is not transmitted in the bitstream.
[0428] In step S1509, chromaticity prediction is performed using the second BV parameters.
[0429] In this embodiment, the corresponding luminance block is used to indicate the co-located luminance CU of the chromaticity components of the current block. Regarding S1502, if the determination result is "yes", S1503 to S1507 can be executed, and if the determination result is "no", S1508 can be executed. Regarding S1505, if the determination result is "yes", S1507 can be executed, and if the determination result is "no", S1506 can be executed.
[0430] It should be further noted that in the embodiment of the present application, the first predetermined mode may be replaced or skipped by the planar mode or other chromaticity prediction modes, and there is no particular limitation thereto.
[0431] That is, the prediction process for predicting a chroma block is as follows: First, a corresponding luma block is obtained, and it is determined whether the corresponding luma block is coded in a mode with BV information. The following processing method can be adopted: If the corresponding luma block is not coded in a mode with BV information, the mode identifier is not transmitted in the bitstream. On the other hand, if the corresponding luma block is coded in a mode with BV information, the BV of the corresponding luma block is obtained, and the luma BV (BVL) is adjusted and applied to the chroma to construct a chroma BV (BVC) candidate list. Then, it is determined whether a BVC candidate item in the chroma BVC candidate list is available. If available, the process proceeds to the decision step. If unavailable, the BVC is adjusted to become available before proceeding to the decision step. Alternatively, if all BVC candidate items in the chroma BVC candidate list are unavailable, prediction is performed using the planar mode or another chroma prediction mode.
[0432] Furthermore, in the present embodiment, the encoding is done inside MODE_INTRA and is added before intra_chroma_pred_mode.Table 12 here shows an example of the bitstream parsing position and is for illustrative purposes only.
[0433] [Table 12]
[0434] If sps_ibc_enabled_flag is equal to 0 and sps_intratmp_enabled_flag is equal to 0, then DbvEnabled is equal to 0.
[0435] Otherwise, set a variable ModeIncludeBv, where ModeIncludeBv is equal to 0 if the corresponding luminance block is not coded in a mode with BV information, and ModeIncludeBv is equal to 1 otherwise.
[0436] DbvEnabled is equal to 1 if two or more of the following conditions are simultaneously true, including but not limited to the following:
[0437] ModeIncludeBv is equal to 1, sh_slice_type is equal to I, CtbLog2SizeC is equal to or less than MaxChromaIbcSize, MaxChromaIbcSize can be determined based on the size of the chromaticity CTU or a predetermined value.
[0438] Otherwise, DbvEnabled is equal to 0.
[0439] If DbvEnabled is equal to 0, dbv_flag is inferred to be FALSE.
[0440] dbv_flag being TRUE indicates that the current chromaticity prediction mode is DBV, and encoding can be performed using a context or bypass method, including but not limited to the binarization methods in the table below.
[0441] [Table 13]
[0442] [Table 14]
[0443] [Table 15]
[0444] [Table 16]
[0445] Furthermore, in the present embodiment, the encoding is done in MODE_IBC, as shown in the table below.
[0446] [Table 17]
[0447] If sps_ibc_enabled_flag is equal to 0 and sps_intratmp_enabled_flag is equal to 0, then DbvEnabled is equal to 0. Otherwise, set the variable ModeIncludeBv, and if the corresponding luma block is not coded in a mode with BV information, ModeIncludeBv is equal to 0, otherwise ModeIncludeBv is equal to 1.
[0448] DbvEnabled is equal to 1 if two or more of the following conditions are simultaneously true, including but not limited to the following:
[0449] ModeIncludeBv is equal to 1, sh_slice_type is equal to I, CtbLog2SizeC is equal to or less than MaxChromaIbcSize, MaxChromaIbcSize can be determined based on the size of the chromaticity CTU or a predetermined value.
[0450] Otherwise, DbvEnabled is equal to 0.
[0451] When treeType==DUAL_TREE_CHROMA, if DbvEnabled is equal to 0, pred_mode_ibc_flag is inferred to be FALSE.
[0452] When treeType==DUAL_TREE_CHROMA, pred_mode_ibc_flag being TRUE indicates that the current chromaticity prediction mode is DBV.
[0453] [Table 18]
[0454] [Table 19]
[0455] [Table 20]
[0456] [Table 21]
[0457] [Table 22]
[0458] The 0th bin of intra_chroma_pred_mode represents the DM mode, and the encoding method is the same as VVC.
[0459] The derivation process of DbvEnabled is as follows:
[0460] If sps_ibc_enabled_flag is equal to 0 and sps_intratmp_enabled_flag is equal to 0, then DbvEnabled is equal to 0.
[0461] Otherwise, DbvEnabled is equal to 1 if two or more of the following conditions are simultaneously true, including but not limited to the following conditions:
[0462] sh_slice_type is equal to I, CtbLog2SizeC is equal to or less than MaxChromaIbcSize, MaxChromaIbcSize can be determined based on the size of the chromaticity CTU or a predetermined value.
[0463] If DbvEnabled is equal to 1:
[0464] If intra_chroma_pred_mode is one of the four chrominance prediction modes 0, 1, 2, or 3, these four chrominance prediction modes refer to Table 4; if intra_chroma_pred_mode is equal to 4, then Scheme 2 is implemented.
[0465] Otherwise, refer to the chromaticity prediction process in the H.266 standard.
[0466] In summary, the encoding / decoding method proposed in the embodiments of this application fully considers available information such as reconstructed luma and BV, predicts chroma based on this information, improves the uniformity of chroma prediction, and after obtaining the luma BV, adjusts the luma BV or chroma BV to construct multiple chroma BV candidates, adaptively providing multiple options according to different content and sampling formats, thereby making DBV prediction more effective and further improving coding efficiency.
[0467] That is, in the embodiment of the present application, the BV parameters of the corresponding luminance block are obtained, and the BV parameters are adjusted and applied to the chrominance, thereby improving the uniformity of the chrominance prediction, and by fully utilizing the information of the co-located luminance region, the accuracy of the chrominance prediction is improved, and ultimately the encoding / decoding efficiency is effectively improved.
[0468] An embodiment of the present application provides an encoding / decoding method, in which a codec determines a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determines a second block vector parameter of a second color component block based on a first block vector parameter of the first color component block, and determines a predicted value of the second color component based on the second block vector parameter. As can be seen from this, in this embodiment, if a luma block corresponding to the current block is intra-predicted based on a block vector, determines a second block vector parameter to be applied to the chroma component based on the block vector parameter of the luma block, and predicts the chroma component using the second block vector parameter. In other words, the encoding / decoding method proposed in this embodiment overcomes the problem of unity in chroma prediction and fully utilizes related information of the co-located luma block to improve the accuracy of chroma prediction, thereby saving bitrate, improving encoding / decoding efficiency, and ultimately improving encoding / decoding performance.
[0469] In another embodiment of the present application, referring to Fig. 22, an exemplary structural diagram of an encoder configuration according to an embodiment of the present application is shown. As shown in Fig. 22, the encoder 180 may include a first determining unit 1801.
[0470] The first determination unit 1801 is configured to determine a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determine a second block vector parameter of the current block based on a first block vector parameter of the first color component block, and determine a predicted value of the second color component based on the second block vector parameter.
[0471] In the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and it should be understood that a "unit" may be modular or non-modular. Furthermore, each component in the present embodiment may be integrated into a single processing unit, each unit may be a separate, independent physical unit, or two or more units may be integrated into a single unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.
[0472] When the integrated unit is realized in the form of a software functional module rather than being sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the essential part of the technical solution of the present embodiment, i.e., the part contributing to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media capable of storing program code, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0473] Therefore, an embodiment of the present application provides a computer-readable storage medium applied to the encoder 180, the computer-readable storage medium storing a computer program, the computer program causing a first processor to perform the method in any of the above embodiments.
[0474] Based on the configuration of the encoder 180 and the computer-readable storage medium, reference is made to FIG. 23 , which shows a schematic diagram of a specific hardware structure of the encoder 180 according to an embodiment of the present application. As shown in FIG. 23 , the encoder 180 may include a first communication interface 1901, a first memory 1902, and a first processor 1903, and each component is coupled to each other by a first bus system 1904. As can be seen, the first bus system 1904 is configured to realize connection communication between these components. In addition to a data bus, the first bus system 1904 also includes a power bus, a control bus, and a status signal bus. However, for clarity of explanation, various buses are referred to as the first bus system 1904 in FIG. 19 .
[0475] The first communication interface 1901 is configured to send and receive signals in the process of sending and receiving information to and from other external network elements.
[0476] The first memory 1902 is configured to store a computer program executable by the first processor 1903 .
[0477] The first processor 1903 is configured to execute the computer program to perform the following process: determining a first color component block of the current block; determining second block vector parameters of a second color component block of the current block based on first block vector parameters of the first color component block when the first color component block is intra predicted based on block vectors; determining a predicted value of the second color component based on the second block vector parameters.
[0478] It should be understood that first memory 1902 in the present embodiment may be volatile or nonvolatile memory, or may include both volatile and nonvolatile memory. Here, nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct Rambus random access memory (DRRAM), and the first memory 1902 in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0479] The first processor 1903 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be performed by a hardware-type integrated logic circuit or software-type instructions in the first processor 1903. The first processor 1903 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., and can implement or execute each method, step, and logic block diagram disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be performed directly by a hardware processor or by a combination of hardware and software modules in the processor. The software modules may be located in conventional storage media such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is disposed in a first memory 1902, and a first processor 1903 reads the information in the first memory 1902 and performs the steps of the above-mentioned method in combination with its hardware.
[0480] As can be appreciated, the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing unit can be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof. For a software implementation, the techniques described herein can be implemented by modules (processes, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented within or external to the processor.
[0481] Illustratively, as another embodiment, the first processor 1903 is further configured to execute the computer program to perform the method in any of the above embodiments.
[0482] In yet another embodiment of the present application, referring to Figure 24, an exemplary structural diagram of a decoder configuration according to an embodiment of the present application is shown. As shown in Figure 24, the decoder 200 may include a second determination unit 2001.
[0483] The second determination unit 2001 is configured to determine a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determine a second block vector parameter of a second color component block of the current block based on a first block vector parameter of the first color component block, and determine a predicted value of the second color component based on the second block vector parameter.
[0484] In this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc. Of course, it should be understood that a "unit" may be modular or non-modular. Furthermore, each component in this embodiment may be integrated into a single processing unit, each unit may be a separate, independent physical unit, or two or more units may be integrated into a single unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.
[0485] When the integrated unit is realized in the form of a software functional module rather than being sold or used as an independent product, it can be stored in one computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium applied to the decoder 200, the computer-readable storage medium storing a computer program, and the computer program causes a second processor to execute the method in any of the above embodiments.
[0486] Based on the configuration of the decoder 200 and the computer-readable storage medium, reference is made to FIG. 25 , which shows a schematic diagram of a specific hardware structure of the decoder 200 according to an embodiment of the present application. As shown in FIG. 25 , the decoder 200 may include a second communication interface 2201, a second memory 2202, and a second processor 2203, and each component is coupled to each other by a second bus system 2204. As can be seen, the second bus system 2204 is configured to realize connection communication between these components. In addition to a data bus, the second bus system 2204 also includes a power bus, a control bus, and a status signal bus. However, for clarity of explanation, various buses are referred to as the second bus system 2204 in FIG. 22 .
[0487] The second communication interface 2201 is configured to send and receive signals in the process of sending and receiving information to and from other external network elements.
[0488] The second memory 2202 is configured to store a computer program executable by the second processor 2203 .
[0489] The second processor 2203 is configured to execute the computer program to perform the following process: The method includes determining a first color component block of a current block, and if the first color component block is intra predicted based on a block vector, determining a second block vector parameter of a second color component block of the current block based on a first block vector parameter of the first color component block, and determining a predicted value of the second color component based on the second block vector parameter.
[0490] Illustratively, as another embodiment, the second processor 2203 is further configured to execute the computer program to perform the method in any of the above embodiments.
[0491] It will be understood that the second memory 2202 has similar hardware functions to the first memory 1902, and the second processor 2203 has similar hardware functions to the first processor 1903, and these will not be described again in detail here.
[0492] This embodiment provides a codec that determines a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determines a second block vector parameter of a second color component block based on a first block vector parameter of the first color component block, and determines a predicted value of the second color component based on the second block vector parameter. As can be seen from this, in this embodiment, if a luma block corresponding to the current block is intra-predicted based on a block vector, determines a second block vector parameter to be applied to the chroma component based on the block vector parameter of the luma block, and predicts the chroma component using the second block vector parameter. In other words, the encoding / decoding method proposed in this embodiment can solve the problem of unity in chroma prediction and fully utilize related information of the co-located luma block to improve the accuracy of chroma prediction, thereby saving bitrate, improving encoding / decoding efficiency, and ultimately improving encoding / decoding performance.
[0493] In another embodiment of the present application, referring to Fig. 26, an exemplary structural diagram of a configuration of an encoding / decoding system according to an embodiment of the present application is shown. As shown in Fig. 26, an encoding / decoding system 230 may include an encoder 2301 and a decoder 2302.
[0494] In the embodiment of the present application, the encoder 2301 may be the encoder in any of the above embodiments, and the decoder 2302 may be the decoder in any of the above embodiments.
[0495] In addition, an embodiment of the present application further provides a bitstream, wherein the bitstream is generated by performing bit encoding based on encoding target information, wherein the encoding target information includes at least one of prediction mode identification information, a color sampling format of a current block.
[0496] It should be noted that in the examples of this application, the terms "comprise," "include," or any other variations thereof are intended to be non-exclusive inclusive, meaning that a process, method, article, or apparatus that includes a set of elements does not merely include those elements, but also includes other elements not expressly listed, as well as inherent elements of the process, method, article, or apparatus. Unless otherwise limited, an element qualified by the phrase "comprises a..." does not exclude the presence of other similar elements in the process, method, article, or apparatus that includes that element.
[0497] The numbers of the above-mentioned embodiments of the present application do not indicate the superiority or inferiority of the embodiments, but are used for the convenience of explanation.
[0498] The methods disclosed in the several method embodiments provided herein can be combined in any manner without conflict to obtain new method embodiments.
[0499] The features disclosed in the several product embodiments provided herein may be combined in any non-conflicting manner to obtain new product embodiments.
[0500] Features disclosed in any method or apparatus embodiment provided herein may be combined in any non-conflicting manner to obtain new method or apparatus embodiments.
[0501] The above content is merely a specific embodiment of the present application, and the protection scope of the present application is not limited thereto. Any modifications or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims. [Industrial Applicability]
[0502] The present embodiment provides an encoding / decoding method, an encoder, a decoder, and a storage medium, in which a codec determines a first color component block of a current block, and if the first color component block is intra-predicted based on a block vector, determines a second block vector parameter of a second color component block based on a first block vector parameter of the first color component block, and determines a predicted value of the second color component based on the second block vector parameter. As can be seen, in the present embodiment, if a luma block corresponding to the current block is intra-predicted based on a block vector, determines a second block vector parameter to be applied to the chroma component based on the block vector parameter of the luma block, and predicts the chroma component using the second block vector parameter. In other words, the encoding / decoding method proposed in the present embodiment overcomes the problem of chroma prediction unity and fully utilizes related information of the co-located luma block to improve the accuracy of chroma prediction, thereby saving bit rate, improving encoding / decoding efficiency, and ultimately improving encoding / decoding performance.
Claims
1. A decoding method applied to a decoder, comprising: determining a first color component block of the current block; determining second block vector parameters of a second color component block of the current block based on first block vector parameters of the first color component block when the first color component block is intra predicted based on block vectors; determining a predicted value of the second color component based on the second block vector parameters.
2. Determining a first color component block of the current block includes: determining a first color component region at the same location of the current block; determining a first color component block of the current block from a plurality of blocks divided from the first color component region; The decoding method of claim 1 .
3. determining a first color component block of the current block from a plurality of blocks divided from the first color component region, selecting a target block from a plurality of blocks divided from the first color component region, and setting the target block as a first color component block of the current block; The decoding method according to claim 2 .
4. The decoding method comprises: selecting a block at the center of the first color component region as the target block; or selecting a block located at the upper left corner of the first color component region as the target block; or selecting a block located at a lower right corner of the first color component region as the target block; The decoding method according to claim 3.
5. determining a first color component block of the current block from a plurality of blocks divided from the first color component region, determining at least one candidate block at a predetermined position from a plurality of blocks divided from the first color component region; traversing the at least one candidate block according to a predetermined order, and determining a first candidate block among the at least one candidate block that is intra-predicted based on a block vector as a first color component block of the current block; The decoding method according to claim 2 .
6. determining a first color component block of the current block from a plurality of blocks divided from the first color component region, determining at least one candidate block at a predetermined position from a plurality of blocks divided from the first color component region; determining the at least one candidate block as a first color component block of the current block; The decoding method according to claim 2 .
7. determining second block vector parameters of a second color component block of the current block based on first block vector parameters of the first color component block; determining first block vector parameters of the first color component block as second block vector parameters of the second color component block; The decoding method of claim 1 .
8. determining second block vector parameters of a second color component block of the current block based on first block vector parameters of the first color component block; determining a candidate list of block vector parameters for a second color component block of the current block based on a first block vector parameter of the first color component block; determining second block vector parameters for the second color component block based on the block vector parameter candidate list; The decoding method of claim 1 .
9. determining a block vector parameter candidate list for a second color component block of the current block based on a first block vector parameter of the first color component block; adjusting the first block vector parameters to determine candidate block vector parameters for the second color component block; determining the block vector parameter candidate list based on the candidate block vector parameters; The decoding method according to claim 8.
10. adjusting the first block vector parameters and determining candidate block vector parameters for the second color component block; determining a color sampling format of the current block; performing a scaling process on the first block vector parameters based on the color sampling format to determine the candidate block vector parameters; The decoding method according to claim 9.
11. adjusting the first block vector parameters and determining candidate block vector parameters for the second color component block; determining a color sampling format of the current block; performing a scaling process on the first block vector parameters based on the color sampling format to determine first initial block vector parameters; determining the candidate block vector parameters based on the first initial block vector parameters and one or more numerical values; The decoding method according to claim 9.
12. determining second block vector parameters of the second color component block based on the block vector parameter candidate list, determining whether there are one or more candidate block vector parameters in the block vector parameter candidate list that satisfy a first availability condition; if there are one or more candidate block vector parameters that satisfy the first availability condition, determining the second block vector parameters based on the one or more candidate block vector parameters. The decoding method according to claim 8.
13. The one or more candidate block vector parameters satisfying a first availability condition is the offset position indicated by the one or more candidate block vector parameters does not cross an image boundary; the offset location indicated by the one or more candidate block vector parameters does not overlap with the current block; the offset position indicated by the one or more candidate block vector parameters does not exceed a predetermined available area; and the offset position indicated by the one or more candidate block vector parameters has already been reconstructed. The decoding method according to claim 12.
14. Determining the second block vector parameters based on the one or more candidate block vector parameters includes: determining one candidate block vector parameter that satisfies a first availability condition as the second block vector parameter; The decoding method according to claim 12.
15. Determining the second block vector parameters based on the one or more candidate block vector parameters includes: For a plurality of candidate block vector parameters that satisfy the first availability condition, determining a first matching template based on the plurality of candidate block vector parameters; calculating a matching error between a first template of the current block and the first matching template based on a predetermined error criterion to determine a first cost value corresponding to the plurality of candidate block vector parameters; determining one or more of the second block vector parameters from the plurality of candidate block vector parameters based on the first cost value; The decoding method according to claim 12.
16. the first template includes one or more sample values in a neighboring decoded region of the current block; determining a first matching template based on the plurality of candidate block vector parameters; determining, as the first matching template, an area indicated by the plurality of candidate block vector parameters and including the same shape and number of sample values as the first template, using the position of the current point as a starting point; 16. The decoding method of claim 15.
17. The decoding method comprises: determining at least one candidate block at a predetermined position from a plurality of blocks divided from the first color component region; traversing the at least one candidate block according to a predetermined order, and determining a first candidate block among the at least one candidate block that satisfies a predetermined condition as a first color component block of the current block; The decoding method comprises: determining that the candidate block satisfies a predetermined condition if the candidate block is intra predicted based on a block vector and a block vector parameter of the second color component block determined based on the candidate block satisfies a first availability condition; The decoding method according to claim 12.
18. Determining a predicted value of the second color component based on the second block vector parameters includes: determining an offset position of the current block based on the second block vector parameters and position information of the current block; performing a block copy process based on the offset position of the current block to obtain a first predicted block; determining a predicted value of the second color component based on the first predicted block; Determining a predicted value of the second color component based on the first predicted block includes: determining the first predicted block as a predicted value of the second color component; The decoding method according to claim 12.
19. 1. A coding method applied to an encoder, comprising: determining a first color component block of the current block; determining second block vector parameters of a second color component block based on first block vector parameters of the first color component block if the first color component block is intra predicted based on block vectors; determining a predicted value of the second color component based on the second block vector parameters.
20. A decoder comprising: a processor and a memory configured to store a computer program executable by the processor; 19. A decoder, wherein the processor is configured to perform the decoding method according to any one of claims 1 to 18 by executing the computer program.
21. A computer-readable storage medium on which a computer program and a bitstream are stored, the computer program causing a processor to execute the encoding method described in claim 19 to generate the bitstream.