Encoding and decoding method, code stream, encoder, decoder and storage medium

CN120019652APending Publication Date: 2025-05-16GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280100888.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-10-13
Publication Date
2025-05-16

Smart Images

  • Figure CN120019652A_ABST
    Figure CN120019652A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a coding and decoding method, a code stream, a coder, a decoder and a storage medium. The method comprises the following steps: determining a first color component block of a current block; when the prediction mode of the first color component block is an IBC mode, determining a first block vector parameter of the first color component block; determining a target block vector parameter of a second color component of the current block according to a first block vector parameter of the first color component block; and according to the target block vector parameter, carrying out IBC expansion mode prediction processing on the second color component of the current block, and determining a prediction value of the second color component of the current block. In this way, the accuracy of chroma prediction can be improved, so that the coding and decoding efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Coding and decoding method, code stream, encoder, decoder and storage medium Technical Field

[0001] The embodiments of the present application relate to the field of video coding and decoding technology, and in particular to a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium. Background Art

[0002] As demand for video display quality increases, new video applications such as HD and UHD video have emerged. The Joint Video Exploration Team (JVET) of the ISO / IEC and ITU-T international standards organizations has developed the video coding standard H.266 / Versatile Video Coding (VVC). Intrablock copy (IBC) is a block-level coding mode provided by VVC for video sequences with specific screen content.

[0003] In the related art, for the Direct Mode (DM), if the luminance block uses the IBC mode, then the chrominance prediction mode is set improperly, resulting in inaccurate chrominance prediction of the current block and loss of coding efficiency.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium, which can save bit rate, improve coding and decoding efficiency, and thus enhance coding and decoding performance.

[0006] The technical solution of the embodiment of the present application can be implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for determining a prediction mode, comprising:

[0008] Determine a first color component block of the current block;

[0009] When the prediction mode of the first color component block is the IBC mode, determining a first block vector parameter of the first color component block;

[0010] determining a target block vector parameter for a second color component of a current block based on a first block vector parameter of the first color component block;

[0011] The second color component of the current block is predicted in the IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block.

[0012] In a second aspect, an embodiment of the present application provides a decoding method, including:

[0013] Determining a value of first syntax element identification information;

[0014] When the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decoding the code stream and determining a value of the second syntax element identification information;

[0015] When the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, intra-frame prediction processing is performed on the second color component of the current block according to the target prediction mode to determine a predicted value of the second color component of the current block.

[0016] In a third aspect, an embodiment of the present application provides an encoding method, including:

[0017] When the prediction mode of the second color component of the current block is the target prediction mode, determining the first color component block of the current block;

[0018] When the prediction mode of the first color component block is the IBC mode, determining a first block vector parameter of the first color component block;

[0019] determining a target block vector parameter for a second color component of a current block based on a first block vector parameter of the first color component block;

[0020] The second color component of the current block is predicted in the IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block.

[0021] In a fourth aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:

[0022] The target block vector parameter of the current block, the value of the first syntax element identification information, the value of the second syntax element identification information, the value of the third syntax element identification information, the value of the fourth syntax element identification information, the value of the fifth syntax element identification information, and the value of the sixth syntax element identification information.

[0023] In a fifth aspect, an embodiment of the present application provides an encoder, comprising a first determining unit and a first predicting unit; wherein,

[0024] a first determining unit configured to, when a prediction mode of the second color component of the current block is a target prediction mode, determine a first color component block of the current block; and, when the prediction mode of the first color component block is an IBC mode, determine a first block vector parameter of the first color component block; and determine a target block vector parameter of the second color component of the current block based on the first block vector parameter of the first color component block;

[0025] The first prediction unit is configured to perform prediction processing on the second color component of the current block in an IBC extension mode according to the target block vector parameter, and determine a predicted value of the second color component of the current block.

[0026] In a sixth aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor; wherein,

[0027] a first memory for storing a computer program capable of running on the first processor;

[0028] The first processor is configured to execute the method according to the third aspect when running a computer program.

[0029] In a seventh aspect, an embodiment of the present application provides a decoder, comprising a second determination unit and a second prediction unit; wherein,

[0030] a second determining unit configured to determine a first color component block of the current block; and when the prediction mode of the first color component block is the IBC mode, determine a first block vector parameter of the first color component block; and determine a target block vector parameter of the second color component of the current block based on the first block vector parameter of the first color component block;

[0031] The second prediction unit is configured to perform prediction processing on the second color component of the current block in the IBC extension mode according to the target block vector parameter, and determine a predicted value of the second color component of the current block.

[0032] In an eighth aspect, an embodiment of the present application provides a decoder, comprising a decoding unit, a second determining unit, and a second predicting unit; wherein,

[0033] A second determining unit is configured to determine a value of the first syntax element identification information;

[0034] A decoding unit configured to, when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decode the code stream and determine a value of the second syntax element identification information;

[0035] The second prediction unit is configured to perform intra-frame prediction processing on the second color component of the current block according to the target prediction mode when the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, and determine the predicted value of the second color component of the current block.

[0036] In a ninth aspect, an embodiment of the present application provides a decoder, comprising a second memory and a second processor; wherein,

[0037] a second memory for storing a computer program capable of running on the second processor;

[0038] The second processor is configured to execute the method according to the first aspect or the second aspect when running a computer program.

[0039] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, it implements the method as described in the first aspect, or the method as described in the second aspect, or the method as described in the third aspect.

[0040] An embodiment of the present application provides a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium. At the encoding end, when the prediction mode of the second color component of the current block is a target prediction mode, the first color component block of the current block is determined; when the prediction mode of the first color component block is an IBC mode, the first block vector parameters of the first color component block are determined; based on the first block vector parameters of the first color component block, the target block vector parameters of the second color component of the current block are determined; and based on the target block vector parameters, the second color component of the current block is predicted in an IBC extended mode to determine a predicted value of the second color component of the current block. At the decoding end, the value of the first syntax element identification information is determined; when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, the code stream is decoded to determine the value of the second syntax element identification information; when the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, the first color component block of the current block is determined; when the prediction mode of the first color component block is the IBC mode, the first block vector parameters of the first color component block are determined; based on the first block vector parameters of the first color component block, the target block vector parameters of the second color component of the current block are determined; based on the target block vector parameters, the second color component of the current block is predicted in the IBC extension mode to determine the predicted value of the second color component of the current block. In this way, in the process of determining the chrominance prediction mode according to the luminance prediction mode, if the luminance block corresponding to the current block is the IBC mode, then the target block vector parameters of the applied chrominance component can be determined according to the block vector parameters of the luminance block, and the chrominance component is predicted according to the IBC extended mode according to the target block vector parameters to determine the chrominance prediction value of the current block; in this way, not only the singleness problem of chrominance prediction is improved, the IBC mode is implicitly added to the chrominance prediction, and the relevant information of the same-position luminance block is fully utilized, which can improve the accuracy of chrominance prediction, but also save bit rate, improve encoding and decoding efficiency, and thus improve encoding and decoding performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] FIG1 is a schematic diagram of a process for obtaining reconstruction samples based on the IBC mode;

[0042] FIG2 is a schematic diagram of the position distribution of adjacent blocks provided in an embodiment of the present application;

[0043] FIG3 is a schematic diagram showing the positional relationship between a luma CU and a chroma CU according to an embodiment of the present application;

[0044] FIG4A is a schematic block diagram of an encoder provided in an embodiment of the present application;

[0045] FIG4B is a schematic block diagram of a decoder according to an embodiment of the present application;

[0046] FIG5 is a schematic diagram of a network architecture of a coding and decoding system provided in an embodiment of the present application;

[0047] FIG5 is a flowchart of a decoding method according to an embodiment of the present application;

[0048] FIG6 is a flow chart of a method for determining a prediction mode provided in an embodiment of the present application;

[0049] FIG7 is a schematic diagram showing another positional relationship between a luma CU and a chroma CU provided in an embodiment of the present application;

[0050] FIG8 is a schematic diagram showing another positional relationship between a luma CU and a chroma CU provided in an embodiment of the present application;

[0051] FIG9 is a schematic diagram showing the positional relationship between another luma CU and chroma CU provided in an embodiment of the present application;

[0052] FIG10 is a schematic diagram showing a structure of whether an offset position does not cover a current block according to an embodiment of the present application;

[0053] FIG11 is a schematic diagram showing a structure of whether an offset position exceeds an IBC usable area according to an embodiment of the present application;

[0054] FIG12 is a schematic diagram of a structure for determining optimal chromaticity BV parameters according to an embodiment of the present application;

[0055] FIG13 is a schematic diagram of a block replication structure based on the IBC extension mode provided in an embodiment of the present application;

[0056] FIG14 is a schematic diagram of a detailed flow chart of a method for determining a prediction mode provided in an embodiment of the present application;

[0057] FIG15 is a detailed flowchart of another method for determining a prediction mode provided by an embodiment of the present application;

[0058] FIG16 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0059] FIG17 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0060] FIG18 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0061] FIG19 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;

[0062] FIG20 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;

[0063] FIG21 is a schematic diagram of the composition structure of another decoder provided in an embodiment of the present application;

[0064] FIG22 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;

[0065] FIG23 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to enable 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 is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0068] In the following description, reference is made to "some embodiments," which describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. It should also be noted that the terms "first, second, and third" in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first, second, and third" may be interchanged in a specific order or sequential order where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0069] Before further explaining the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained first. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:

[0070] Coding Block (CB);

[0071] Intra block copy (IBC);

[0072] Screen Content Coding (SCC);

[0073] Block Maching (BM);

[0074] Coding Unit (CU);

[0075] Block Vector (BV);

[0076] Motion Vector (MV);

[0077] Direct Block Vector (DBV);

[0078] Advanced Motion Vector Prediction (IBC Advanced Motion Vector Prediction, AMVP);

[0079] Cross-Component Linear Model prediction (CCLM);

[0080] Merge Mode

[0081] Planar Mode;

[0082] H.266 / Versatile Video Coding (VVC);

[0083] VVC Test Model (VTM), a reference software testing platform for VVC.

[0084] It can be understood that in a video image, a first color component, a second color component, and a third color component are generally used to represent a coding block. These three color components are a luminance component, a blue chrominance component, and a red chrominance component. 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. Thus, a video image can be represented in either the YCbCr format or the YUV format.

[0085] It can also be understood that IBC is an extended tool of VVC for encoding video sequences of screen content types, which significantly improves the encoding efficiency of screen content sequences. Specifically, IBC is a block-level encoding mode. Similar to inter-frame technology, the encoding end performs motion search, specifically by finding the best block vector for each CU through block matching, which can also be called a motion vector. Among them, the block vector is a vector pointing from the current block to the reference block. The difference from inter-frame technology is that the best block vector of IBC is obtained by searching in the reconstructed area of ​​the frame where the current block is located (that is, the current coded frame), while the inter-frame motion vector is obtained by searching the adjacent reference frames of the current coded frame in the time domain.

[0086] 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 prediction sample using the block vector, deriving a residual sample, and deriving a reconstructed sample using the prediction sample and the residual sample.

[0087] In a specific implementation, the process of obtaining a reconstruction sample in the IBC mode, as shown in FIG1 , may include:

[0088] S101: Derive block vector.

[0089] For the luma component, the inputs include: the luma position (xCb, yCb), which specifies the luma sample of the top-left corner of the current block relative to the top-left luma sample of the current image; a variable cbWidth, which specifies the width of the current block in luma samples; and a variable cbHeight, which specifies the height of the current block in luma samples. The output includes: the luma block vector (bvL). It should be noted that the current block containing luma samples is also called the "luma block."

[0090] Here, the IBC mode is divided into IBC MERGE mode and IBC AMVP mode. When deriving bvL, it is necessary to establish an IBC block vector candidate list bvCandList. The following will introduce the process of establishing the IBC MERGE list in detail. Among them, the process of establishing the IBC AMVP list is consistent with that of the IBC MERGE list, but the maximum number of candidates for the two is different.

[0091] Step 1: When IsGt4by4 is equal to TRUE (the variable IsGt4by4 is TRUE when the width multiplied by the height of the luma block is greater than 16), the derivation process of the spatial block vector candidates from the adjacent coding units specified in the decoding specification is called using the luma block position (xCb, yCb), the width cbWidth and the height cbHeight of the luma block as input, and the output is the availability flags availableFlagA1 and availableFlagB1 and the block vectors bvA1 and bvB1. The relative positions of the adjacent blocks A1 and B1 with respect to the current block are shown in Figure 2.

[0092] Step 2: When IsGt4by4 is equal to TRUE, the pseudo code for constructing the block vector candidate list bvCandList is as follows:

[0093]

[0094] Step 3: The variable numCurrCand (the number of candidates currently obtained) is derived as follows:

[0095] If IsGt4by4 is equal to TRUE, numCurrCand is set equal to the number of candidates in bvCandList; otherwise numCurrCand is set to 0.

[0096] Step 4: When numCurrCand is less than MaxNumIbcMergeCand (the maximum number of candidates in MERGE mode) and NumHmvpIbcCand (the maximum number of candidates for the historical optimal block vector Hmvp in IBC mode) is greater than 0, use bvCandList and numCurrCand as input, and the modified bvCandList and numCurrCand as output to call the history-based IBC block vector candidate derivation process specified in the decoding specification.

[0097] Step 5: When numCurrCand is less than MaxNumIbcMergeCand, the following applies until numCurrCand equals MaxNumIbcMergeCand:

[0098] bvCandList[numCurrCand][0] is set equal to 0 (the horizontal component of BV);

[0099] bvCandList[numCurrCand][1] is set equal to 0 (the vertical component of BV);

[0100] numCurrCand increases by 1.

[0101] In this way, the block vector candidate list bvCandList is established, and the candidate index bvIdx is derived as follows. general_merge_flag indicates whether it is IBC MERGE mode:

[0102] bvIdx=general_merge_flag[xCb][yCb]? merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb]

[0103] In this way, the specific bvL can be obtained according to the index bvIdx and the block vector candidate list bvCandList:

[0104] bvL[0]=bvCandList[bvIdx][0];

[0105] bvL[1]=bvCandList[bvIdx][1].

[0106] For the IBC AMVP mode, the specific bvL can be obtained by indexing bvIdx and the block vector candidate list bvCandList as the predicted bvL. The real bvL also needs to be added with the block vector difference (BVD). The specific process is as follows:

[0107] Step 1: Get the horizontal and vertical components of BVD. Where MvdL0 is the forward motion vector difference, the horizontal component of BVD is represented by bvd[0], and the vertical component of BVD is represented by bvd[1], as follows:

[0108] bvd[0]=MvdL0[xCb][yCb][0];

[0109] bvd[1]=MvdL0[xCb][yCb][1].

[0110] Step 2: Round the predicted bvL obtained above. The right shift parameter AmvrShift is used for rounding, and the left shift parameter AmvrShift is used to increase the resolution. The details are as follows:

[0111] Offset=(AmvrShift==0)? 0:((1<<(AmvrShift-1))-1);

[0112] bvL[0]=Sign(bvL[0])*(((Abs(bvL[0])+offset)>>AmvrShift)< <AmvrShift);

[0113] bvL[1]=Sign(bvL[1])*(((Abs(bvL[1])+offset)>>AmvrShift)< <AmvrShift)。

[0114] Step 3: For the real bvL, its range needs to be controlled within -2 17 to 2 17 –1, the specific derivation process is as follows:

[0115] u[0]=(bvL[0]+bvd[0]+2 18 )%2 18 ;

[0116] bvL[0]=(u[0]>=2 17 )?(u[0]-2 18 ):u[0];

[0117] u[1]=(bvL[1]+bvd[1]+2 18 )%2 18 ;

[0118] bvL[1]=(u[1]>=2 17 )?(u[1]-2 18 ):u[1].

[0119] For the chroma component, if it is a dual-tree partition, the chroma component does not use the IBC mode; if it is a single-tree partition, the BV of the chroma component needs to be derived.

[0120] The input includes: luminance bvL (1 / 16 pixel accuracy). The output includes: chroma block vector (Block Vector Chroma, bvC) (1 / 32 pixel accuracy). The specific derivation process is as follows:

[0121] bvC[0]=((bvL[0]>>(3+SubWidthC))*32);

[0122] bvC[1]=((bvL[1]>>(3+SubHeightC))*32).

[0123] S102: Use the block vector to derive a prediction sample.

[0124] Here, the input includes: the luma position (xCb, yCb), which specifies the top left sample of the current block relative to the top left luma sample of the current image; a variable cbWidth, which specifies the width of the current block in luma samples; a variable cbHeight, which specifies the height of the current block in luma samples; a block vector BV; and a variable cIdx, which specifies the color component index of the current block. The output includes: an array of predicted samples predSamples.

[0125] For the prediction sample, the specific derivation process is as follows:

[0126] When cIdx is equal to 0, that is, the luminance component, for x = xCb ... xCb + cbWidth - 1 and y = yCb ... yCb + cbHeight - 1:

[0127] xVb=(x+(bv[0]>>4))&(IbcBufWidthY-1);

[0128] yVb=(y+(bv[1]>>4))&(CtbSizeY-1);

[0129] predSamples[x][y]=ibcVirBuf[0][xVb][yVb].

[0130] Among them, IbcBufWidthY is the width of the brightness pixel of the reconstruction buffer unit (Buffer) stored in IBC, CtbSizeY is the size of CTU (Coding Tree Unit), and ibcVirBuf is the reconstructed pixel stored in IBC.

[0131] When cIdx is not equal to 0, that is, the chrominance component, for x=xCb / SubWidthC...xCb / SubWidthC+cbWidth / SubWidthC-1 and y=yCb / SubHeightC...yCb / SubHeightC+cbHeight / SubHeightC-1:

[0132] xVb=(x+(bv[0]>>5))&(IbcBufWidthC-1);

[0133] yVb=(y+(bv[1]>>5))&((CtbSizeY / subHeightC)-1);

[0134] predSamples[x][y]=ibcVirBuf[cIdx][xVb][yVb].

[0135] Among them, the variables SubWidthC and SubHeightC depend on the chroma sampling format specified by sps_chroma_format_idc, and the specific corresponding relationship is shown in Table 1.

[0136] Table 1

[0137] sps_chroma_format_idc color sampling format SubWidthCSubHeightC0 monochrome 1114:2:02224:2:22134:4:411

[0138] S103: derive residual samples.

[0139] For residual samples, the residual decoding process specified by the decoding specification can be called.

[0140] S104: derive reconstructed samples using the predicted samples and the residual samples.

[0141] For reconstructing samples (ie, reconstructing pixel values), an image reconstruction process of a specified color component specified by a decoding specification may be called.

[0142] In another specific implementation, the derivation process of the chroma prediction mode in H.266 / VVC includes the following inputs: the luma position (xCb, yCb), which specifies the upper left corner sample of the current block relative to the upper left corner luma sample of the current image; a variable cbWidth, which specifies the width of the current block in luma samples; a variable cbHeight, which specifies the height of the current block in luma samples; and a variable treeType, which specifies whether to use single tree partitioning or dual tree partitioning. The output includes: the chroma intra prediction mode IntraPredModeC[xCb][yCb] and the MIP chroma direct mode flag MipChromaDirectFlag[xCb][yCb].

[0143] If treeType is equal to SINGLE_TREE, that is, in the case of single tree partitioning, sps_chroma_format_idc is equal to 3, that is, 4:4:4 format, intra_chroma_pred_mode is equal to 4, and IntraMipFlag[xCb][yCb] is equal to 1, that is, the prediction mode corresponding to the same-position luminance center block is MIP mode, then:

[0144] ① The MIP chroma direct mode flag MipChromaDirectFlag[xCb][yCb] is set to 1, that is, the chroma uses the luminance MIP mode.

[0145] ② The chroma intra prediction mode IntraPredModeC[xCb][yCb] is set equal to IntraPredModeY[xCb][yCb].

[0146] otherwise:

[0147] ① The MIP chroma direct mode flag MipChromaDirectFlag[xCb][yCb] is set to equal to 0.

[0148] ②The corresponding luma intra prediction mode lumaIntraPredMode is derived as follows:

[0149] If IntraMipFlag[xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to 1, lumaIntraPredMode is set equal to INTRA_PLANAR.

[0150] Otherwise, if CuPredMode[0][xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to MODE_IBC or MODE_PLT, then lumaIntraPredMode is set equal to INTRA_DC.

[0151] Otherwise, lumaIntraPredMode is set equal to IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2].

[0152] ③ The chroma intra prediction mode IntraPredModeC[xCb][yCb] is derived as follows:

[0153] If cu_act_enabled_flag[xCb][yCb] is equal to 1, the chroma intra prediction mode IntraPredModeC[xCb][yCb] is set equal to lumaIntraPredMode.

[0154] otherwise:

[0155] If BdpcmFlag[xCb][yCb][1] is equal to 1, then IntraPredModeC[xCb][yCb] is set equal to BdpcmDir[xCb][yCb][1]? INTRA_ANGULAR50:INTRA_ANGULAR18.

[0156] Otherwise, cu_act_enabled_flag[xCb][yCb] is equal to 0 and BdpcmFlag[xCb][yCb][1] is equal to 0, the chroma intra prediction mode IntraPredModeC[xCb][yCb] uses cclm_mode_flag, cclm_mode_idx, intra_chroma_pred_mode, and lumaIntraPredMode as specified in Table 2.

[0157] Table 2

[0158]

[0159] When sps_chroma_format_idc is equal to 2, chroma intra prediction mode X in Table 2 can be used to derive chroma intra prediction mode Y. For details, see the mapping process specification of mode X to mode Y shown in Table 3. Then, chroma intra prediction mode X is set equal to chroma intra prediction mode Y.

[0160] Table 3

[0161] mode X012345678910111213141516mode Y016162636465662356810121314mode Y1820222324262830313334353637383940mode X54555657585960616263646566 mode Y52535455555656575758595960

[0162] In another specific implementation, for the DM mode, the DM mode refers to directly using the brightness prediction mode information of the corresponding position:

[0163] When dual-tree partitioning is used for I-frames, independent block partitioning structures are allowed for the luma and chroma components. In this case, the luma component corresponding to the chroma CU may contain multiple luma CUs, as shown in Figure 3. In H.266 / VVC, the chroma CU inherits the intra prediction mode of the CU at the center of the corresponding luma block, that is, intra_chroma_pred_mode is equal to 4.

[0164] The CU positions used in the DM mode are described in detail as follows:

[0165] The luminance position (xCb, yCb) specifies the position of the upper left corner luminance sample of the luminance area corresponding to the current block relative to the upper left corner luminance sample of the current image; a variable cbWidth specifies the width of the current block in luminance samples; a variable cbHeight specifies the height of the current block in luminance samples.

[0166] The positional relationship between the current chroma CU and the corresponding luma area is shown in Figure 3. The central luma pixel position of the luma area corresponding to the current chroma CU is described as follows, where xCenter represents the horizontal coordinate position, yCenter represents the vertical coordinate position, and the CU containing this pixel position is the CU at the center position of the luma block corresponding to the chroma CU:

[0167] xCenter = xCb + cbWidth >> 1;

[0168] yCenter=yCb+cbHeight>>1.

[0169] In another specific implementation, the decoding process of chroma prediction in H.266 / VVC is shown in Table 4. In addition, for the value of the syntax element Value of intra_chroma_pred_mode, its corresponding binary mapping table is shown in Table 5; for different syntax elements (such as ccm_mode_flag, ccm_mode_idx, and intra_chroma_pred_mode, etc.), the encoding method used for each coded bit is shown in Table 6.

[0170] Table 4

[0171]

[0172] Table 5

[0173] Value of intra_chroma_pred_modeBin string010011012110311140

[0174] Table 6

[0175]

[0176] Wherein, binIdx indicates the number of bits. If binIdx = 0, it indicates bit 0; if binIdx = 1, it indicates bit 1. In addition, bypass indicates bypass mode, and na indicates no processing.

[0177] In the related art, under dual-tree partitioning: for the DM mode, if the corresponding luminance block is in IBC mode, then the obtained chrominance prediction mode is DC mode, which results in a loss of coding efficiency. For chrominance prediction, a fixed DC mode is used for prediction, which not only results in the predicted pixels all having the same value, but also fails to express the chrominance texture feature content of the current block; and in chrominance prediction, the information of the co-located luminance block of the IBC mode is not used, nor is there a prediction algorithm for block copying similar to IBC, making it impossible to effectively compress video sequences similar to screen content. In short, the current chrominance prediction mode is relatively simple, which makes the chrominance prediction of the current block inaccurate, resulting in a loss of coding efficiency.

[0178] Based on this, an embodiment of the present application provides an encoding method, which determines the first color component block of the current block when the prediction mode of the second color component of the current block is the target prediction mode; determines the first block vector parameters of the first color component block when the prediction mode of the first color component block is the IBC mode; determines the target block vector parameters of the second color component of the current block based on the first block vector parameters of the first color component block; and performs IBC extended mode prediction processing on the second color component of the current block based on the target block vector parameters to determine the predicted value of the second color component of the current block.

[0179] An embodiment of the present application also provides a decoding method for determining a value of first syntax element identification information; when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decoding the code stream to determine the value of the second syntax element identification information; when the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, determining the first color component block of the current block; when the prediction mode of the first color component block is the IBC mode, determining the first block vector parameters of the first color component block; determining the target block vector parameters of the second color component of the current block based on the first block vector parameters of the first color component block; performing IBC extension mode prediction processing on the second color component of the current block based on the target block vector parameters to determine the predicted value of the second color component of the current block.

[0180] In this way, in the process of determining the chrominance prediction mode according to the luminance prediction mode, if the luminance block corresponding to the current block is the IBC mode, then the target block vector parameters of the applied chrominance component can be determined according to the block vector parameters of the luminance block, and the chrominance component is predicted according to the IBC extended mode according to the target block vector parameters to determine the chrominance prediction value of the current block; in this way, not only the singleness problem of chrominance prediction is improved, the IBC mode is implicitly added to the chrominance prediction, and the relevant information of the same-position luminance block is fully utilized, which can improve the accuracy of chrominance prediction, but also save bit rate, improve encoding and decoding efficiency, and thus improve encoding and decoding performance.

[0181] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0182] Referring to FIG4A , which shows a schematic block diagram of the composition of an encoder provided in an embodiment of the present application. As shown in FIG4A , the encoder (specifically, a “video encoder”) 100 may include a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame 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 cache unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC).For the input original video signal, a video coding block can be obtained by dividing the coding tree unit (CTU). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transformation and quantization unit 101, including transforming the residual information from the pixel domain to the transform domain and quantizing the obtained transform coefficients to further reduce the bit rate; the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block; the motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding on the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information; the motion estimation performed by the motion estimation unit 105 is the process of generating a motion vector, which can estimate the motion of the video coding block. The motion compensation unit 104 then calculates the motion vector based on the motion vector determined by the motion estimation unit 105. After determining the intra-frame prediction mode, the intra-frame prediction unit 103 is further configured to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding unit 109. In addition, the inverse transform and inverse quantization unit 106 is configured to reconstruct the video coding block and reconstruct a residual block in the pixel domain. The reconstructed residual block is subjected to the filter control analysis unit 107 and the filtering unit 108 to remove the block effect artifacts. The reconstructed residual block is then added to a predictive block in the frame of 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. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode, and output the code stream of the video signal. The decoded image buffer unit 110 is configured to store the reconstructed video coding block for prediction reference. As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 110 .

[0183] Referring to FIG4B , which shows a block diagram of a decoder provided in an embodiment of the present application, as shown in FIG4B , the decoder (specifically, a "video decoder") 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image buffer unit 206. The decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering. After the input video signal is encoded as shown in FIG4A , a code stream of the video signal is output; the code stream is input to the decoder 200 and first passes through the decoding unit 201 to obtain decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate a residual block in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from the previously decoded block of the current frame or picture; the motion compensation unit 204 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses The prediction information is used to generate a predictive block for the video decoding block being decoded; a decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 with the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204; the decoded video signal passes through the filtering unit 205 to remove blocking artifacts, thereby improving video quality; the decoded video block is then stored in the decoded image buffer unit 206, which stores reference images used for subsequent intra-frame prediction or motion compensation, and is also used for outputting the video signal, thereby obtaining the restored original video signal.

[0184] Furthermore, the embodiment of the present application also provides a network architecture of a coding and decoding system including an encoder and a decoder, wherein FIG5 shows a schematic diagram of a network architecture of a coding and decoding system provided by the embodiment of the present application. As shown in FIG5 , the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During implementation, the electronic device can be various types of devices with video coding and decoding functions. For example, the electronic device can include a smart phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensing device, a server, etc., which is not specifically limited in the embodiment of the present application. Here, the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.

[0185] It should be noted that the method of the embodiment of the present application is mainly applied to the intra-frame prediction unit 103 shown in Figure 4A and the intra-frame prediction unit 203 shown in Figure 4B. In other words, the embodiment of the present application can be applied to both the encoder and the decoder, or even to both the encoder and the decoder at the same time, but the embodiment of the present application is not specifically limited thereto.

[0186] It should also be noted that, when applied to the intra-frame prediction unit 103, the "current block" specifically refers to the coding block currently to be intra-frame predicted; when applied to the intra-frame prediction unit 203, the "current block" specifically refers to the decoding block currently to be intra-frame predicted.

[0187] In one embodiment of the present application, referring to FIG6 , a flow chart of a method for determining a prediction mode provided by an embodiment of the present application is shown. As shown in FIG6 , the method may include:

[0188] S601: Determine the first color component block of the current block.

[0189] It should be noted that the method of the embodiment of the present application can be applied to an encoder or a decoder. In addition, the prediction mode here can specifically refer to an intra-frame prediction mode. Here, assuming that the first color component is a luma component and the second color component is a chroma component, then more specifically, this is a method for determining a chroma intra-frame prediction mode.

[0190] It should also be noted that in this embodiment of the present application, the current block includes at least a first color component and a second color component. For the first color component of the current block, the block can be simply referred to as a first color component block; and when the first color component is a luminance component, the first color component block can also be referred to as a luminance block. Similarly, for the second color component of the current block, the block can be simply referred to as a second color component block; and when the second color component is a chrominance component, the second color component block can also be referred to as a chrominance block.

[0191] It should also be noted that under dual-tree partitioning, for the DM mode, when the prediction mode of the luminance block at the same position is the IBC mode, the embodiment of the present application can determine the chrominance intra-frame prediction mode of the current block based on the prediction mode of the luminance block at the same position, which can improve the uniformity of the chrominance prediction and thus improve the coding efficiency.

[0192] In some embodiments, determining the first color component block of the current block may include: determining a first color component region at the same location 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.

[0193] It should be noted that in an embodiment of the present application, for the current block, the first color component area in the same position can be divided into blocks, for example, by using a binary tree structure, a ternary tree structure, a quadtree structure, etc. to perform block division, and multiple blocks can be obtained, each of which can be regarded as a CU; then the first color component block of the current block is determined from these multiple CUs.

[0194] For example, in Figure 3, the area filled with diagonal lines represents the luminance area at the same location of the chroma CU. This luminance area can be divided into multiple blocks; the block at the center can be selected from these blocks as the corresponding luminance block of the current block. For example, the block filled with black in Figure 3 is the corresponding luminance block of the current block.

[0195] Further, in some embodiments, determining the first color component block of the current block from the multiple blocks divided by the first color component area may include: selecting a target block from the multiple blocks divided by the first color component area, and using the target block as the first color component block of the current block.

[0196] The target block can be a block at any position. In a specific embodiment, the block at the center of the first color component area is selected as the target block; or the block at the upper left corner of the first color component area is selected as the target block; or the block at the lower right corner of the first color component area is selected as the target block.

[0197] It should be understood that in the embodiment of the present application, the target block serving as the first color component block may be a block at any position among the multiple blocks shown in FIG3 . For example, the target block may be the block at the center of the collocated luminance region shown in FIG3 (a block filled with black), the block at the upper left corner of the collocated luminance region shown in FIG7 (a block filled with black), the block at the lower right corner of the collocated luminance region shown in FIG8 (a block filled with black), or even the block at the upper right corner or the block at the lower left corner of the collocated luminance region, or even the block at the center of the upper left region, etc., and this is not specifically limited here.

[0198] Further, in some embodiments, determining the first color component block of the current block from the multiple blocks divided by the first color component area may include: determining at least one candidate block at a preset position from the multiple blocks divided by the first color component area; obtaining at least one candidate block in sequence according to a preset order and performing mode judgment, and if the first candidate block determined uses the IBC mode, then using the first candidate block as the first color component block of the current block.

[0199] It should be understood that in this embodiment of the present application, for the first color component block, the mode determination can also be performed on at least one candidate block at a preset position. For example, as shown in Figure 9 , this includes CUs at five luma pixel positions: C, TL, TR, BL, and BR. However, this embodiment of the present application is not limited to these five positions; multiple positions are possible, and the five positions shown in Figure 9 are not specifically limited to these positions.

[0200] It should also be understood that in an embodiment of the present application, the five positions shown in FIG9 can be obtained sequentially in a preset order until the candidate block is determined to be in IBC mode, that is, the CU at the first luminance pixel position is found to be in IBC mode, and the CU at the first luminance pixel position is used as the corresponding luminance block of the current block.

[0201] In addition, in the embodiment of the present application, the preset order may include but is not limited to the following order: C->TL->TR->BL->BR. The detailed position derivation process of C, TL, TR, BL, and BR is as follows:

[0202] Assume that the position of the co-located luminance pixel corresponding to the upper left corner of the current block relative to the luminance pixel in the upper left corner of the image (i.e., the position of luminance pixel TL) is (xCb, yCb), and the width of the co-located luminance area corresponding to the current block (i.e., the entire diagonal filled area of ​​the luminance component in Figure 9) is cbWidth, and the height is cbHeight.

[0203] The coordinate information of the position of the brightness pixel C is (xCb+cbWidth / 2, yCb+cbHeight / 2);

[0204] The coordinate information of the position of the luminance pixel TL is (xCb, yCb);

[0205] The coordinate information of the position of the brightness pixel TR is (xCb+cbWidth-1, yCb);

[0206] The coordinate information of the position of the brightness pixel BL is (xCb, yCb+cbHeight-1);

[0207] The coordinate information of the position of the luminance pixel BR is (xCb+cbWidth-1, yCb+cbHeight-1).

[0208] Thus, for the current block, the corresponding first color component block needs to be determined first. When the first color component is a luminance component, the luminance block (ie, luminance CU) at the corresponding position needs to be determined.

[0209] S602: When the prediction mode of the first color component block is the IBC mode, determine a first block vector parameter of the first color component block.

[0210] It should be noted that, in the embodiment of the present application, after determining the first color component block, it is necessary to determine the prediction mode of the first color component block. If the prediction mode of the first color component block is the IBC mode, it is necessary to further determine the first block vector parameters of the first color component block.

[0211] It should be understood that in this embodiment of the present application, if the prediction mode of the first color component block is the IBC mode, then the first block vector parameter of the first color component block can be obtained. The first block vector parameter represents the vector pointing from the current block to the reference block, and the reference block is obtained by searching the reconstructed area of ​​the frame (i.e., the current image) where the current block is located.

[0212] It should also be understood that in embodiments of the present application, if there are multiple first color component blocks, then the first block vector parameter may also be obtained by averaging the BVs of the multiple first color component blocks. Therefore, in some embodiments, determining the first color component block of the current block from the multiple blocks divided into the first color component region may include: determining at least one candidate block at a preset position from the multiple blocks divided into the first color component region, and determining the at least one candidate block as the first color component block of the current block.

[0213] In one possible implementation, when the prediction mode of the first color component block is the IBC mode, determining the first block vector parameter of the first color component block may include: determining at least one target block using the IBC mode from the at least one candidate block, and determining the first block vector parameter of each of the at least one target blocks; performing mean calculation based on the first block vector parameter of each of the at least one target block, and using the calculation result as the first block vector parameter of the first color component block.

[0214] It should be noted that in this embodiment of the present application, the first color component block of the current block is not limited to a single block and may also be composed of multiple blocks. When composed of multiple blocks, the prediction modes of all the multiple blocks are IBC mode. For example, multiple luma CUs in the same luma region are first obtained, and then their first block vector parameters are averaged to obtain the final first block vector parameters.

[0215] In another possible implementation, the first block vector parameters finally obtained may also be determined by selecting optimal block vector parameters using a template matching method. Therefore, in some embodiments, when the prediction mode of the first color component block is the IBC mode, determining the first block vector parameters of the first color component block may further include: determining at least one target block using the IBC mode from at least one candidate block; searching the at least one target block using the template matching method to determine the optimal block vector parameters, and using the optimal block vector parameters as the first block vector parameters of the first color component block.

[0216] Here, still taking Figure 9 as an example, for the luma CUs at the five positions C, TL, TR, BL, and BR, when all of these five luma CUs use the IBC mode, multiple luma CUs in the same luma region are obtained, and then the optimal block vector parameters are selected through template matching as the first block vector parameters finally obtained. The positions of these multiple luma CUs are not limited to the five positions C, TL, TR, BL, and BR, and can also be other positions, which is not specifically limited in this embodiment of the application.

[0217] It is understandable that in the embodiment of the present application, after determining the first color component block, it is necessary to determine the prediction mode of the first color component block. If the prediction mode of the first color component block is the IBC mode, then the process shown in FIG. 6 is continued to be executed, and the first block vector parameters of the first color component block need to be determined. Otherwise, if the prediction mode of the first color component block is not the IBC mode, then the process shown in FIG. 6 is no longer executed, and the second color component of the current block can be predicted according to the first preset mode to determine the predicted value of the second color component of the current block.

[0218] In some embodiments, the first preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode, CCLM mode, and skip mode, but is not limited thereto.

[0219] Exemplarily, when the prediction mode of the first color component block is not the IBC mode, the first preset mode may include but is not limited to the PLANAR mode, the inter-component prediction mode (such as the CCLM mode) or other angle prediction modes, and then obtain reference pixels and related parameters for prediction processing; in addition, the first preset mode can also be a skip mode, that is, the current block can skip the prediction processing of this mode.

[0220] S603: Determine target block vector parameters of the second color component of the current block according to the first block vector parameters of the first color component block.

[0221] It should be noted that in embodiments of the present application, after determining the first block vector parameters of the first color component block, it is necessary to further determine target block vector parameters to be applied to the second color component. In some embodiments, determining the target block vector parameters of the current 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 target block vector parameters of the current block; or adjusting the first block vector parameters of the first color component block to determine the target block vector parameters of the current block.

[0222] It should be understood that in an embodiment of the present application, for the target block vector parameters of the current block, the first block vector parameters of the first color component block may not be adjusted. In this case, the first block vector parameters of the first color component block may be directly used as the target block vector parameters of the current block.

[0223] It should also be understood that in the embodiment of the present application, the target block vector parameter of the current block may be obtained by adjusting the first block vector parameter of the first color component block. The adjustment method includes but is not limited to:

[0224] In one possible implementation, adjusting the first block vector parameters of the first color component block to determine the target block vector parameters of the current block may include: determining a color sampling format of the current block; and scaling the first block vector parameters of the first color component block according to the color sampling format to determine the target block vector parameters of the current block.

[0225] In another possible implementation, adjusting the first block vector parameters of the first color component block to determine the target block vector parameters of the current block may include: obtaining initial block vector parameters of the current block after scaling the first block vector parameters of the first color component block according to a color sampling format; and correcting the initial block vector parameters of the current block to determine the target block vector parameters of the current block.

[0226] It should be understood that in an embodiment of the present application, after the first block vector parameters of the first color component block are scaled according to the color sampling format, the target block vector parameters of the current block can be directly determined based on the initial block vector parameters of the current block.

[0227] It should also be understood that in an embodiment of the present application, after the first block vector parameters of the first color component block are scaled according to the color sampling format, the initial block vector parameters obtained can also be corrected for the initial block vector parameters of the current block to determine the target block vector parameters of the current block.

[0228] It should also be understood that in the embodiment of the present application, assuming that the first color component is the luminance component and the second color component is the chrominance component, then after obtaining the corresponding first block vector parameter (i.e., the luminance BV parameter), the luminance BV parameter can be adjusted to obtain the target block vector parameter (i.e., the chrominance BV parameter) applied to the chrominance component. Assuming that the luminance BV parameter is (BVL hor , BVL ver ), the chroma BV parameter is (BVC hor , BVC ver ), where BVL hor The horizontal block vector representing the brightness BV parameter, BVL ver BVC represents the vertical block vector of the brightness BV parameter; hor Horizontal block vector representing chroma BV parameters, BVC ver A vertical block vector representing the chroma BV parameters.

[0229] In this way, the luminance BV parameter is scaled according to the color sampling format, and the mapping relationship between the luminance BV parameter and the scaled chrominance BV parameter is shown in Table 7.

[0230] Table 7

[0231] sps_chroma_format_idc color sampling format BVC hor BVC ver 0 monochrome--14:2:0BVL hor >>1BVL ver >>124:2:2BVL hor >>1BVL ver 34:4:4BVL hor BVL ver

[0232] The syntax element sps_chroma_format_idc is used to indicate the type of color sampling format, which is specifically the chroma sampling format. Different types of chroma sampling formats have different corresponding scaling operations.

[0233] For example, if the value of sps_chroma_format_idc is 0, the chroma sampling format is determined to be monochrome, and the process shown in FIG6 will not be executed at this time, that is, there is no chroma 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. At this time, the mapping relationship between the brightness 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, the chroma sampling format is determined to be 4:2:2. At this time, the mapping relationship between the brightness BV parameter and the chroma BV parameter is: BVC hor =BVL hor >>1, BVC hor =BVL ver If the value of sps_chroma_format_idc is 3, it means that the chroma sampling format is 4:4:4. At this time, the mapping relationship between the brightness BV parameters and the chroma BV parameters is: BVC hor =BVL hor , BVC hor =BVL ver .

[0234] For example, after obtaining the chroma BV parameters scaled according to the chroma sampling format, they can be used directly or further modified. The modification here may include, but is not limited to, the following methods: using the IntraTMP mode for modification, that is, after obtaining the chroma BV parameters, using the current block position and the obtained chroma BV parameters to find the offset position, and then using template matching to perform a detailed search near the offset position to determine the optimal chroma BV parameters, and using the optimal chroma BV parameters as the final chroma BV parameters, i.e., the target block vector parameters of the current block.

[0235] S604: Perform prediction processing on the second color component of the current block in the IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block.

[0236] It should be noted that, in the embodiments of the present application, the IBC extended mode may refer to a newly introduced prediction mode in the embodiments of the present application, which may be represented by INTRA_DBV. In this prediction mode, the second color component of the current block is predicted based on the determined target block vector parameters to determine a predicted value of the second color component of the current block.

[0237] It should also be noted that, in embodiments of the present application, after obtaining the target block vector parameters of the current block, it is necessary to determine whether the target block vector parameters are available, that is, whether the target block vector parameters meet an availability condition. In some embodiments, the method may further include: after determining the target block vector parameters of the current block, determining whether the target block vector parameters meet an availability condition; and when the target block vector parameters meet the availability condition, performing IBC extended mode prediction processing on the second color component of the current block based on the target block vector parameters to determine a predicted value for the second color component of the current block.

[0238] Specifically, in an embodiment of the present application, only when the target block vector parameters meet the availability conditions can the second color component of the current block be predicted in the IBC extension mode according to the target block vector parameters to determine the predicted value of the second color component of the current block.

[0239] Furthermore, in some embodiments, whether the target block vector parameters meet the availability condition may at least include:

[0240] Whether the offset position indicated by the target block vector parameter does not exceed the image boundary;

[0241] Whether the offset position indicated by the target block vector parameter does not overlap the current block;

[0242] Whether the offset position indicated by the target block vector parameter does not exceed the available area of ​​the IBC mode;

[0243] Whether the offset position indicated by the target block vector parameter has been reconstructed.

[0244] It should be understood that in the embodiment of the present application, only when all of the above conditions are met can it be determined that the target block vector parameters meet the availability condition, that is, the target block vector parameters are available. In a specific embodiment, the target block vector parameters meeting the availability condition at least includes: the offset position indicated by the target block vector parameters does not exceed the image boundary; the offset position indicated by the target block vector parameters does not overlap the current block; the offset position indicated by the target block vector parameters does not exceed the available area of ​​the IBC mode; and the offset position indicated by the target block vector parameters has been reconstructed.

[0245] For example, Figure 10 shows a schematic diagram of a structure for determining whether an offset position does not overlap a current block, provided by an embodiment of the present application. As shown in Figure 10, a block filled with black represents the current block, an area filled with diagonal lines represents an available area, and an unfilled area represents an unavailable area. For the current block, if the offset position indicated by the target block vector parameter is in an unavailable area, then the offset position overlaps the current block.

[0246] For example, FIG11 shows a structural diagram of whether an offset position exceeds the IBC available area provided by an embodiment of the present application. As shown in FIG11 , the block filled with black represents the current block, the area filled with slashes represents the available area, and the reference blocks in the available area have all been reconstructed. In an embodiment of the present application, taking into account the storage capacity of the Buffer, under normal circumstances, the reference blocks adjacent to the current block (m, n) can be 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. as the available area of ​​the IBC mode.

[0247] It should also be understood that in the embodiment of the present application, after scaling the first block vector parameters of the first color component block according to the color sampling format, the obtained initial block vector parameters need to be further corrected. Prior to the correction, the method may further include: determining whether the initial block vector parameters meet an availability condition; if the initial block vector parameters meet the availability condition, correcting the initial block vector parameters of the current block to determine the target block vector parameters of the current block; or, if the initial block vector parameters do not meet the availability condition, adjusting the initial block vector parameters of the current block until the adjusted block vector parameters meet the availability condition; and then correcting the adjusted block vector parameters to determine the target block vector parameters of the current block.

[0248] For example, after obtaining the chroma BV parameters scaled according to the chroma sampling format, if the chroma BV parameters meet the availability conditions, then the IntraTMP mode is used for correction. That is, after obtaining the corrected chroma BV parameters, the offset position is found using the current block position and the corrected chroma BV parameters. Then, a template matching method is used to perform a fine search near the offset position to obtain the optimal chroma BV parameters. The reference block at the optimal offset position obtained after the fine search is copied to obtain the chroma prediction block of the current block. As shown in Figure 12, the area filled with diagonal lines represents the chroma reconstruction area. For the current block, the template matching method can be used to find the best matching template and the corresponding best BV. Based on the best BV (i.e., the IntraTMP BV), the reference block of the current block can be determined, and the chroma prediction value of the current block can be determined.

[0249] It will also be appreciated that in this embodiment of the present application, at least one candidate block at a preset position is determined from the multiple blocks divided into the first color component region. Then, at least one candidate block is sequentially obtained according to a preset order and a mode determination is performed. If the first candidate block determined to use the IBC mode is used, the first candidate block is used as the first color component block of the current block. During this process, it is also necessary to determine whether the BV parameters of the first candidate block meet the availability conditions in order to determine whether to proceed to the mode determination for the next candidate block.

[0250] In some embodiments, the method may further include: when the first candidate block is determined to use the IBC mode, determining the first block vector parameters of the first candidate block; determining whether the first block vector parameters of the first candidate block meet the available conditions; if the first block vector parameters of the first candidate block meet the available conditions, then using the first candidate block as the first color component block of the current block; if the first block vector parameters of the first candidate block do not meet the available conditions, then continuing to perform mode judgment on the next candidate block until a target candidate block using the IBC mode and the corresponding first block vector parameters meeting the available conditions is determined, and using the target candidate block as the first color component block of the current block.

[0251] Furthermore, in some embodiments, the method may also include: if there is no target candidate block in at least one candidate block that uses the IBC mode and the corresponding first block vector parameter meets the availability condition, then performing intra-frame prediction processing on the second color component of the current block according to the first preset mode to determine the predicted value of the second color component of the current block; wherein the first preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode, CCLM mode and skip mode.

[0252] In the embodiment of the present application, still taking FIG. 9 as an example, there are CUs at five luma pixel positions (including but not limited to five positions, which may be multiple different positions), and the order of sequential acquisition includes but is not limited to the following order:

[0253] C->TL->TR->BL->BR.

[0254] First, determine whether there is a CU using the IBC mode among the CUs at the five acquired positions; if not, then the luminance CU is not acquired, and the first preset mode is used to perform chrominance prediction on the current block, including but not limited to the PLANAR mode, inter-component prediction mode (such as CCLM mode) or other angle prediction modes, etc., and even the mode can be skipped, that is, the encoding end and the decoding end make judgments at the same time.

[0255] If one or more CUs in the five positions use the IBC mode, then the five positions can be re-acquired in sequence (until the first CU that meets the following conditions is found). At this time, not only is it determined whether the CU uses the IBC mode, but the luminance BV parameters of the CU are also adjusted to determine the BV parameters applied to the chrominance; then it is determined whether the chrominance BV parameters are available.

[0256] If the chroma BV parameters are available, then this CU is selected as the luma block for the final BV.

[0257] If the chroma BV parameters are not available, then the luma CU is not obtained, including but not limited to PLANAR mode or inter-component prediction mode or other angular prediction mode, and even the mode can be skipped; or the first CU using IBC mode is found, its BV is adjusted until it is available, and this CU is selected as the luma block for finally obtaining the BV.

[0258] Furthermore, in some embodiments, performing IBC extended mode prediction processing on the second color component of the current block based on the target block vector parameters to determine the predicted value of the second color component of the current block may include: determining the offset position of the current block based on the target block vector parameters and the position information of the current block; performing block copy processing based on the offset position of the current block to obtain a first prediction block; and determining the predicted value of the second color component of the current block based on the first prediction block.

[0259] In the embodiment of the present application, if the second color component of the current block is predicted according to the IBC extension mode, the position information (xCb, yCb) of the current block can be obtained, and the chroma BV parameter (BVC hor , BVC ver ); thereby being able to find the offset position (xCb+BVChor, yCb+BVCver) for block copying, as shown in FIG13 .

[0260] For example, cbWidth represents the width of the current block in chroma samples, cbHeight represents the height of the current block in chroma samples, and predSamples[x][y] represents the chroma prediction value of the current block. The specific process is as follows:

[0261] For x=xCb...xCb+cbWidth-1 and y=yCb...yCb+cbHeight-1:

[0262] xVb=(xCb+BVChor)&(IbcBufWidthC-1);

[0263] yVb=(yCb+BVCver)&(CtbSizeC-1);

[0264] predSamples[x][y] = ibcVirChromaBuf[xVb][yVb].

[0265] Where, IbcBufWidthC is the width of the chroma pixels of the reconstructed buffer stored by IBC, CtbSizeC is the size of the chroma pixels of the CTU, and ibcVirChromaBuf is the reconstructed chroma pixels stored by IBC.

[0266] Further, in some embodiments, determining the prediction value of the second color component of the current block according to the first prediction block may include: performing a correction operation on the first prediction block to determine the prediction value of the second color component of the current block.

[0267] In a specific embodiment, determining the prediction value of the second color component of the current block according to the first prediction block may include: performing intra-frame prediction processing on the second color component of the current block according to a second preset mode to obtain a second prediction block; performing weighted fusion processing on the first prediction block and the second prediction block to determine the prediction value of the second color component of the current block; wherein the second preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode, and CCLM mode.

[0268] It should be understood that in the embodiments of the present application, for the prediction value of the second color component of the current block, if it is obtained by block copying through the target block vector parameter, the prediction value can be corrected by, including but not limited to, weighting with a conventional prediction mode.

[0269] It should also be understood that in the embodiments of the present application, for the prediction value of the second color component of the current block, the correction process here can also be to limit the prediction value within a preset numerical range, for example, between 0 and (1 << BitDepth)-z, where BitDepth is the bit depth required for the chroma component; or even perform filtering enhancement processing to improve the chroma prediction quality in this mode; specific limitations are not made thereto.

[0270] Exemplarily, taking the determination of the chroma prediction value of the current block as an example, if it is obtained by block copying through BV, then the chroma prediction value can be corrected by, including but not limited to, weighting with a conventional chroma prediction mode; if the prediction value is obtained by the PLANAR mode or the inter-component prediction mode or other angular prediction modes, the chroma prediction value can be corrected by, including but not limited to, weighting with other conventional chroma prediction modes.

[0271] This embodiment provides a method for determining a prediction mode. In the process of determining a chroma prediction mode based on a luminance prediction mode, if the luminance block corresponding to the current block is in IBC mode, then the target block vector parameters of the chroma component can be determined based on the block vector parameters of the luminance block, and the chroma component is predicted according to the IBC extended mode based on the target block vector parameters to determine the chroma prediction value of the current block. In this way, not only the singleness problem of the chroma prediction is improved, the IBC mode is implicitly added to the chroma prediction, and the relevant information of the same-position luminance block is fully utilized, which can improve the accuracy of the chroma prediction, but also the bit rate can be saved, the encoding and decoding efficiency can be improved, and the encoding and decoding performance can be improved.

[0272] In another embodiment of the present application, based on the method for determining the prediction mode described in the previous embodiment, a new prediction mode, INTRA_DBV, may be introduced. Assuming the first color component is a luminance component and the second color component is a chrominance component, the following describes in detail the use of the INTRA_DBV mode for chrominance prediction as an example.

[0273] For the INTRA_DBV mode, the prediction process may include: obtaining the corresponding luminance block CU, determining whether the prediction mode of the corresponding luminance block CU is the IBC mode (if it is the IBC mode, then obtaining the BV parameters of the corresponding luminance block; if it is not the IBC mode, then using the first preset mode for chroma encoding, such as using the PLANAR mode or other chroma prediction modes to replace or skip the mode), if it is the IBC mode, adjusting the BV parameters and applying them to the chroma, and determining whether the adjusted BV parameters are available (if available or unavailable, adjusting the BV until it is available, and then continuing the chroma IBC prediction; if the latter is unavailable, the PLANAR mode or other chroma prediction modes can also be used to replace or skip the mode, and then performing the corresponding chroma prediction or skipping processing).

[0274] In a specific embodiment, FIG14 is a schematic diagram of a detailed flow chart of a method for determining a prediction mode provided by an embodiment of the present application. As shown in FIG14 , the detailed flow chart may include:

[0275] S1401: Obtain the corresponding luminance block of the current block.

[0276] S1402: Determine whether the corresponding luminance block is in IBC mode.

[0277] S1403: Obtain a first BV parameter corresponding to the luminance block.

[0278] S1404: Adjust the first BV parameter to determine a second BV parameter applied to chroma.

[0279] S1405: Determine whether the second BV parameter is available.

[0280] S1406: Adjust the second BV parameter until the second BV parameter is available.

[0281] S1407: Perform chroma prediction in the IBC extended mode on the current block according to the second BV parameter.

[0282] S1408: Perform chroma prediction on the current block using the first preset mode.

[0283] It should be noted that in this embodiment of the present application, the corresponding luma block is used to indicate the co-located luma CU of the chroma component of the current block. For S1402, if the judgment result is yes, then S1403 to S1407 can be executed; if the judgment result is no, then S1408 can be executed. For S1405, if the judgment result is yes, then S1407 can be executed; if the judgment result is no, then S1406 can be executed first, and then S1407 can be executed.

[0284] In another specific embodiment, FIG15 is a detailed flowchart of another method for determining a prediction mode provided by an embodiment of the present application. As shown in FIG15 , the detailed flowchart may include:

[0285] S1501: Obtain the corresponding luminance block of the current block.

[0286] S1502: Determine whether the corresponding luminance block is in IBC mode.

[0287] S1503: Obtain a first BV parameter corresponding to the luminance block.

[0288] S1504: Adjust the first BV parameter to determine a second BV parameter applied to chroma.

[0289] S1505: Determine whether the second BV parameter is available.

[0290] S1506: Perform chroma prediction on the current block using the second preset mode.

[0291] S1507: Perform chroma prediction in the IBC extended mode on the current block according to the second BV parameter.

[0292] S1508: Perform chroma prediction on the current block using the first preset mode.

[0293] It should be noted that in this embodiment of the present application, the corresponding luma block is used to indicate the co-located luma CU of the chroma component of the current block. For S1502, if the judgment result is yes, then S1503 to S1507 can be executed; if the judgment result is no, then S1508 can be executed. For S1505, if the judgment result is yes, then S1507 can be executed; if the judgment result is no, then S1506 can be executed first.

[0294] It should also be noted that in the embodiments of the present application, the first preset mode and the second preset mode may be the same or different. For example, the first preset mode may be replaced by or skipped over the PLANAR mode or other chroma prediction mode, and the second preset mode may be replaced by or skipped over the PLANAR mode or other chroma prediction mode, but this is not specifically limited.

[0295] It can be understood that based on the detailed process shown in FIG. 14 or FIG. 15 , the specific process is as follows:

[0296] For obtaining the corresponding luminance block, the luminance CU obtained here can be at any position, including but not limited to the following positions: the CU at the center position in the co-located luminance area as shown in Figure 3, the CU at the upper left corner position in the co-located luminance area as shown in Figure 7, the CU at the lower right corner position in the co-located luminance area as shown in Figure 8, the CU at a preset position in the co-located luminance area as shown in Figure 9, etc., and there is no specific limitation on this here.

[0297] For determining whether the corresponding luminance block is in IBC mode, that is, determining whether the prediction mode of the corresponding luminance block is IBC mode. After obtaining the CU at the corresponding position, determine whether it is in IBC mode. If it is in IBC mode, obtain the first BV parameter of the corresponding luminance block. If it is not in IBC mode, use the first preset mode to encode the chrominance component, including but not limited to PLANAR mode or CCLM mode or other angle prediction mode as an alternative. It is necessary to obtain reference pixels and parameters for chrominance prediction. You can also skip this mode, that is, the encoding end and the decoding end make the judgment at the same time.

[0298] The first BV parameter is adjusted and applied to the chrominance. After obtaining the first BV parameter of the corresponding luminance block, the first BV parameter is adjusted to obtain the second BV parameter applied to the chrominance. Assume that the first BV parameter is (BVL hor , BVL ver ), the second BV parameter is (BVC hor , BVC ver ), including but not limited to the following adjustments:

[0299] Method 1, as shown in Table 7, scales the first BV parameter according to the color sampling format to obtain the second BV parameter applied to chrominance.

[0300] Method 2 is to correct the second BV parameter. After obtaining the second BV parameter scaled according to the color sampling format, it can be used directly or further corrected. Before the correction, it is necessary to determine whether the second BV parameter is available. If it is available, correct it, or adjust it to be available before correcting it. The correction here includes but is not limited to: using the IntraTMP mode for correction, that is, after obtaining the second BV parameter, the offset position is found using the position of the current block and the second BV parameter, and then a template matching method is used to perform a fine search near the offset position to obtain the optimal BV parameter. The reference block at the optimal offset position obtained after the fine search is copied to obtain the chrominance prediction block of the current block, as shown in Figure 12.

[0301] To determine whether the second BV parameter is available, obtain the position of the current block (xCb, yCb), and obtain the second BV parameter (BVC hor , BVC ver ), find the corresponding offset position (xCb+BVC hor ,yCb+BVC ver ), judge the following conditions, if all are true, the second BV parameter is available:

[0302] Whether the obtained offset position does not exceed the image boundary;

[0303] Whether the obtained offset position does not overlap the current block;

[0304] Whether the obtained offset position does not exceed the IBC available area;

[0305] Whether the obtained offset position has been reconstructed.

[0306] Here, if available, chroma prediction based on the IBC mode is performed. If not, it is adjusted to be available, and then chroma prediction based on the IBC mode is performed. Adjustments include, but are not limited to, cropping, scaling, etc. Furthermore, if not available, alternatives including, but not limited to, the PLANAR mode, CCLM mode, or other angular prediction modes can be used to obtain reference pixels and mode parameters for chroma prediction; or even skipping this mode is possible.

[0307] For chroma IBC prediction, the chroma prediction of the current block in IBC extended mode is performed based on the second BV parameters. If it is IBC extended mode, the current block position (xCb, yCb) is obtained, the second BV parameters are obtained as (BVChor, BVCver), the corresponding offset position (xCb+BVChor, yCb+BVCver) is found, and the block is copied, as shown in Figure 13.

[0308] In addition, if the second BV parameter is not available, if it is PLANAR mode or CCLM mode or other angle mode, the reference pixels and mode parameters are obtained to perform chrominance prediction.

[0309] It can also be understood that, for the method of determining the prediction mode described in the aforementioned embodiment, the embodiment of the present application may also modify the DM mode of the related art so that the modified DM mode can take into account the INTRA_DBV mode.

[0310] In an embodiment of the present application, in dual-tree partitioning and DM mode, when the prediction mode of the luma block at the same position is IBC mode, if CuPredMode[0][xCb+cbWidth / 2][yCb+cbHeight / 2] is equal to MODE_IBC, and lumaIbcPredMode is Y, Y is different from X, and Y is not a conventional angle prediction mode, then the chroma intra-frame prediction mode IntraPredModeC[xCb][yCb] uses INTRA_DBV.

[0311] Among them, the chroma prediction mode is derived as follows:

[0312] The chroma intra prediction mode IntraPredModeC[xCb][yCb] uses ccm_mode_flag, ccm_mode_idx, and intra_chroma_pred_mode, lumaIntraPredMode, and lumaIbcPredMode specified in Table 8.

[0313] Table 8

[0314]

[0315] In the embodiment of the present application, the INTRA_DBV mode is used for prediction, and the specific process can be the same as the process shown in Figure 14 or Figure 15 in the above embodiment. Among them, for obtaining the CU at the center position in the same luminance area, if the CU at the center position in the obtained same luminance area is not in IBC mode, then its corresponding luminance prediction mode can be obtained for chrominance prediction.

[0316] Through the above embodiments, the specific implementation of the above embodiments is elaborated in detail, from which it can be seen that a new chroma prediction mode INTRA_DBV is proposed here. On the one hand, for the DM mode, in the case of dual-tree partitioning, if the prediction mode of the CU at its luminance center position is the IBC mode, then the chroma prediction mode obtained is the DC mode. The embodiment of the present application effectively improves this method of obtaining a fixed prediction mode, makes full use of the mode information of the same-position luminance area, and adopts a flexible BV parameter instead of the fixed prediction mode, effectively improving the accuracy of chroma prediction; on the other hand, for this new prediction mode, in the case of dual-tree partitioning, if the corresponding luminance block is the IBC mode, then the BV parameter of the corresponding luminance block is obtained, and then the BV parameter is adjusted and applied to the chroma, improving the singleness of the chroma prediction, and implicitly adding the IBC algorithm to the chroma prediction, making full use of the information of the same-position luminance area, thereby improving the accuracy of the chroma prediction, and then effectively improving the encoding and decoding efficiency.

[0317] In another embodiment of the present application, referring to FIG16 , a flowchart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG16 , the method may include:

[0318] S1601: Determine a value of first syntax element identification information.

[0319] It should be noted that in the embodiments of the present application, the method of the embodiments of the present application can be applied to a decoder. Furthermore, the decoding method herein can specifically refer to an intra-frame prediction method. Assuming that the first color component is a luma component and the second color component is a chroma component, more specifically, this is a chroma intra-frame prediction method. The IBC extended mode proposed in the aforementioned embodiments can be used for chroma prediction, thereby improving the accuracy of chroma prediction.

[0320] It should also be noted that in this embodiment of the present application, the current block includes at least a first color component and a second color component. For the first color component of the current block, the block can be simply referred to as a first color component block. Furthermore, if the first color component is a luminance component, the first color component block can also be referred to as a luminance block. Similarly, for the second color component of the current block, the block can be simply referred to as a second color component block. Furthermore, if the second color component is a chrominance component, the second color component block can also be referred to as a chrominance block.

[0321] It should also be noted that, in an embodiment of the present application, the first syntax element identification information can be represented by IbcEnabled, or can also be represented by chromaIbcExModeEnabled, and its value determines whether the relevant mode parameters will be transmitted at the CU layer. Among them, the first syntax element identification information is used to indicate whether the second color component of the current block is allowed to use the IBC extended mode; in other words, the first syntax element identification information can be used to indicate whether the second color component of the current block is allowed to use the target prediction mode (i.e., INTRA_DBV mode). In some embodiments, the method may further include:

[0322] If the value of the first syntax element identification information is the first value, determining that the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode;

[0323] If the value of the first syntax element identification information is the second value, it is determined that the first syntax element identification information indicates that the second color component of the current block is not allowed to use the IBC extension mode.

[0324] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form. Specifically, the first syntax element identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.

[0325] For example, for the first value and the second value, the first value can be set to 1 and the second value can be set to 0; or the first value can be set to 0 and the second value can be set to 1; or the first value can be set to true and the second value can be set to false; or the first value can be set to false and the second value can be set to true. In the embodiment of the present application, the first value is set to 1 and the second value is set to 0, but this is not a specific limitation.

[0326] In the embodiment of the present application, the value of the first syntax element identification information may be determined by decoding the bitstream. Alternatively, the value of the third syntax element identification information may be determined by decoding the bitstream; if the value of the third syntax element identification information is the first value and the current block meets a preset condition, the value of the first syntax element identification information is determined to be the first value; if the value of the third syntax element identification information is the second value, the value of the first syntax element identification information is determined to be the second value.

[0327] In a specific embodiment, the current block meets the preset conditions, which may at least include: the slice type to which the current block belongs meets the I frame; and the size parameter of the current block meets the preset upper limit value.

[0328] It should be understood that in the embodiment of the present application, the slice type to which the current block belongs can be represented by sh_slice_type, the preset upper limit value can be represented by MaxChromaIbcSize, and MaxChromaIbcSize can be determined according to the size of the chroma CTU or a preset value.

[0329] It should also be understood that in the embodiment of the present application, the third syntax element identification information can be represented by sps_ibc_enabled_flag, which is used to indicate whether the current image allows the use of IBC mode. Here, the current image includes the current block. In some embodiments, the method may further include:

[0330] If the value of the third syntax element identification information is the first value, determining that the third syntax element identification information indicates that the current image allows the use of the IBC mode;

[0331] If the value of the third syntax element identification information is the second value, it is determined that the third syntax element identification information indicates that the current image is not allowed to use the IBC mode.

[0332] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form. Specifically, the third syntax element identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.

[0333] For example, taking the first value as 1 and the second value as 0, if the value of sps_ibc_enabled_flag is 0, then the value of IbcEnabled is 0. Otherwise, when the value of sps_ibc_enabled_flag is 1, if the following multiple conditions are simultaneously true (including but not limited to the following conditions), then the value of IbcEnabled is 1. These conditions may include but are not limited to: sh_slice_type is equal to I frame; and CtbLog2SizeY is less than or equal to MaxChromaIbcSize.

[0334] It should also be noted that, in this embodiment of the present application, the value of the first syntax element identification information can be determined based on the third syntax element identification information and whether the current block meets a preset condition; or it can be directly determined by decoding the bitstream, which is not specifically limited here. For example, in this embodiment of the present application, the first syntax element identification information can be treated as a syntax element not transmitted in the bitstream, but as a derived value, which can be determined by sps_ibc_enabled_flag, sh_slice_type, and CtbLog2SizeY.

[0335] In this way, when the value of IbcEnabled is equal to 1, it can be determined that the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extended mode.

[0336] S1602: When the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decode the code stream and determine the value of the second syntax element identification information.

[0337] In an embodiment of the present application, if the second color component of the current block allows the use of the IBC extended mode, that is, the second color component of the current block allows the use of the target prediction mode, then it is necessary to further determine whether the second color component of the current block uses the target prediction mode, that is, decode and determine the value of the second syntax element identification information. In some embodiments, the method may further include:

[0338] If the value of the second syntax element identification information is the first value, determining that the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode;

[0339] If the value of the second syntax element identification information is the second value, it is determined that the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode.

[0340] In an embodiment of the present application, the second syntax element identification information may be represented by intra_dbv_flag or intra_chroma_ibc_flag, and is used to indicate whether the second color component of the current block uses the target prediction mode.

[0341] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in numerical form. Specifically, the second syntax element identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.

[0342] For example, taking the first value being set to 1 and the second value being set to 0 as an example, if the value of the first syntax element identification information is 1, that is, when the second color component of the current block allows the use of the IBC extension mode, the decoding determines the value of the second syntax element identification information at this time; if the value of the second syntax element identification information is also 1, then it can be determined that the second color component of the current block uses the target prediction mode.

[0343] S1603: When the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, perform intra-frame prediction processing on the second color component of the current block according to the target prediction mode to determine a predicted value of the second color component of the current block.

[0344] It should be understood that in the embodiment of the present application, according to the method for determining the prediction mode in the above embodiment, the prediction mode determined is the target prediction mode. Here, the target prediction mode can be represented by INTRA_DBV.

[0345] Furthermore, in some embodiments, performing intra-frame prediction processing on the second color component of the current block according to the target prediction mode to determine the predicted value of the second color component of the current block may include:

[0346] Determine a first color component block of a current block; when a prediction mode of the first color component block is an IBC mode, determine a first block vector parameter of the first color component block, and determine a target block vector parameter of a second color component of the current block based on the first block vector parameter of the first color component block; perform prediction processing on the second color component of the current block in an IBC extended mode based on the target block vector parameter to determine a predicted value of the second color component of the current block.

[0347] Furthermore, in some embodiments, performing intra-frame prediction processing on the second color component of the current block according to the target prediction mode to determine the second color component block of the current block may further include:

[0348] Decode the code stream to determine the target block vector parameters of the current block; perform IBC extended mode prediction processing on the second color component of the current block according to the target block vector parameters to determine the predicted value of the second color component of the current block.

[0349] It should also be understood that in the embodiment of the present application, if it is determined that the chroma component of the current block is to be predicted in the IBC extended mode, then when the prediction mode of the corresponding luminance block is the IBC mode, the first BV parameter of the corresponding luminance block is determined, and the adjustment is performed based on the first BV parameter to determine the target BV parameter applied to the chroma component; then, the chroma prediction processing of the IBC extended mode is performed on the current block based on the target BV parameter to determine the chroma prediction value of the current block. Alternatively, after determining the target BV parameter applied to the chroma component, the encoding end writes the target BV parameter into the bitstream; thus, at the decoding end, the target BV parameter of the current block can be directly obtained through decoding, and then the chroma prediction processing of the IBC extended mode is performed on the current block based on the target BV parameter to determine the chroma prediction value of the current block.

[0350] Furthermore, in some embodiments, the method may also include: when the value of the second syntax element identification information is the second value, decoding the code stream to determine the value of the fourth syntax element identification information; determining the first intra-frame prediction mode of the second color component of the current block according to the value of the fourth syntax element identification information; performing intra-frame prediction processing on the second color component of the current block according to the first intra-frame prediction mode to determine the predicted value of the second color component of the current block.

[0351] In the embodiment of the present application, the fourth syntax element identification information can be represented by intra_chroma_pred_mode, which is used to indicate the chroma intra prediction mode used by the current block.

[0352] Exemplarily, when intra_dbv_flag or intra_chroma_ibc_flag is equal to 0, the target prediction mode is no longer used. Instead, chroma prediction processing is performed on the current block according to the chroma intra prediction mode indicated by intra_chroma_pred_mode to determine the chroma prediction value of the current block.

[0353] In a specific embodiment, for a chroma prediction mode INTRA_DBV provided in an embodiment of the present application, in decoding implementation, the decoding positions added include but are not limited to the following:

[0354] (1) The chroma prediction mode INTRA_DBV can be added before intra_chroma_pred_mode, as shown in Table 9.

[0355] Table 9

[0356]

[0357]

[0358] If sps_ibc_enabled_flag is equal to 0, IbcEnabled is equal to 0.

[0359] Otherwise, IbcEnabled is equal to 1 if all of the following conditions are true (including but not limited to the following):

[0360] sh_slice_type is equal to I frame;

[0361] CtbLog2SizeY is less than or equal to MaxChromaIbcSize.

[0362] Among them, MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.

[0363] In addition, if intra_dbv_flag is TRUE, it indicates that the current chroma prediction mode is INTRA_DBV, including but not limited to the following binarization methods, which can be encoded using a context model or a bypass model. For example, as shown in Table 10, Table 11, Table 12, or Table 13. Here, FL indicates fixed length.

[0364] Table 10

[0365] intra_dbv_flagFLcMax=1

[0366] Table 11

[0367] Value of intra_chroma_pred_modeBin string010011012110311140

[0368] Table 12

[0369]

[0370] Table 13

[0371]

[0372]

[0373] (2) Another implementation method in which the chroma prediction mode INTRA_DBV can be added before intra_chroma_pred_mode is shown in Table 14.

[0374] Table 14

[0375]

[0376] If sps_ibc_enabled_flag is equal to 0, IbcEnabled is equal to 0.

[0377] Otherwise, IbcEnabled is equal to 1 if all of the following conditions are true (including but not limited to the following):

[0378] sh_slice_type is equal to I frame;

[0379] CtbLog2SizeY is less than or equal to MaxChromaIbcSize.

[0380] Among them, MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.

[0381] If IbcEnabled is equal to 0, intra_chroma_ibc_flag is inferred to be FALSE.

[0382] If intra_chroma_ibc_flag is TRUE, it indicates that the current chroma prediction mode is INTRA_DBV, including but not limited to the following binarization methods, and encoding can be performed using a context model or a bypass model. For example, as shown in Table 15, Table 16, Table 17, or Table 18.

[0383] Table 15

[0384] intra_chroma_ibc_flagFLcMax=1

[0385] Table 16

[0386] Value of intra_chroma_pred_modeBin string010011012110311140

[0387] Table 17

[0388]

[0389] Table 18

[0390]

[0391] Furthermore, in the case of adding a syntax element, in some embodiments, the method may further include: when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decoding the bitstream and determining a value of fifth syntax element identification information; and determining a second intra-frame prediction mode for the second color component of the current block based on the value of the fifth syntax element identification information, performing intra-frame prediction processing on the second color component of the current block based on the second intra-frame prediction mode, and determining a predicted value for the second color component of the current block;

[0392] or,

[0393] When the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, the code stream is decoded to determine the value of the sixth syntax element identification information; and based on the value of the sixth syntax element identification information, a third intra-frame prediction mode of the second color component of the current block is determined, and intra-frame prediction processing is performed on the second color component of the current block according to the third intra-frame prediction mode to determine a predicted value of the second color component of the current block.

[0394] The second intra-frame prediction mode includes the target prediction mode, and the third intra-frame prediction mode does not include the target prediction mode.

[0395] In the embodiment of the present application, the fifth syntax element identification information can be represented by intra_chroma_pred_mode_add, and the sixth syntax element identification information can be represented by intra_chroma_pred_mode, wherein intra_chroma_pred_mode_add is used to indicate the addition of the INTRA_DBV mode, and intra_chroma_pred_mode represents the chroma prediction mode in the related art.

[0396] In the embodiment of the present application, the binarization processing processes for the fifth syntax element identification information and the sixth syntax element identification information are different, that is, there is a difference in the binarization mapping tables used by the two.

[0397] In some embodiments, decoding the code stream to determine the value of the fifth syntax element identification information includes: decoding the code stream to obtain at least one character corresponding to the fifth syntax element identification information; using a first preset binary mapping table to map the at least one character corresponding to the fifth syntax element identification information to determine the value of the fifth syntax element identification information.

[0398] In some embodiments, decoding the code stream to determine the value of the sixth grammatical element identification information includes: decoding the code stream to obtain at least one character corresponding to the sixth grammatical element identification information; using a second preset binary mapping table to map the at least one character corresponding to the sixth grammatical element identification information to determine the value of the sixth grammatical element identification information.

[0399] Exemplarily, when IbcEnabled is equal to 1, intra_chroma_pred_mode_add is decoded using the first preset binary mapping table, and chroma prediction processing is performed on the current block according to the chroma intra-frame prediction mode indicated by intra_chroma_pred_mode_add to determine the chroma prediction value of the current block; when IbcEnabled is equal to 0, intra_chroma_pred_mode is decoded using the second preset binary mapping table, and chroma prediction processing is performed on the current block according to the chroma intra-frame prediction mode indicated by intra_chroma_pred_mode to determine the chroma prediction value of the current block.

[0400] In another specific embodiment, for a chroma prediction mode INTRA_DBV provided in an embodiment of the present application, in the decoding implementation, the following is further included:

[0401] (3) Add the syntax element intra_chroma_pred_mode_add, as shown in Table 19.

[0402] Table 19

[0403]

[0404]

[0405] If sps_ibc_enabled_flag is equal to 0, IbcEnabled is equal to 0.

[0406] Otherwise, IbcEnabled is equal to 1 if all of the following conditions are true (including but not limited to the following):

[0407] sh_slice_type is equal to I frame;

[0408] CtbLog2SizeY is less than or equal to MaxChromaIbcSize.

[0409] Among them, MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.

[0410] In addition, for the binarization method of intra_chroma_pred_mode_add, that is, the first preset binary mapping table can be as shown in Table 20, but is not specifically limited.

[0411] Table 20

[0412] Value of intra_chroma_pred_mode_addBin string0110011101211103111141050

[0413] In addition, the binarization method of Value of intra_chroma_pred_mode, that is, the second preset binary mapping table can be as shown in Table 21, but is not specifically limited.

[0414] Table 21

[0415] Value of intra_chroma_pred_modeBin string010011012110311140

[0416] In addition, for different syntax elements (such as ccm_mode_flag, ccm_mode_idx, intra_chroma_pred_mode_add and intra_chroma_pred_mode, etc.), the encoding method used for each coded bit is specifically shown in Table 22 or Table 23.

[0417] Table 22

[0418]

[0419]

[0420] Table 23

[0421]

[0422] Here, taking intra_chroma_pred_mode_add as an example, the 0th bit of intra_chroma_pred_mode_add represents the DM mode, which is coded in the same way as VVC. The first bit of intra_chroma_pred_mode_add represents the newly added INTRA_DBV mode, which can be coded using either the context model or the bypass model.

[0423] Further, for the case of retaining the syntax element, in some embodiments, decoding the code stream and determining the value of the second syntax element identification information may include: when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decoding the code stream to obtain at least one character corresponding to the second syntax element identification information; and mapping the at least one character corresponding to the second syntax element identification information using a first preset binary mapping table to determine the value of the second syntax element identification information; or

[0424] When the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, the code stream is decoded to obtain at least one character corresponding to the second syntax element identification information; and the at least one character corresponding to the second syntax element identification information is mapped using a second preset binary mapping table to determine the value of the second syntax element identification information.

[0425] In the embodiment of the present application, the second syntax element identification information can be represented by intra_chroma_pred_mode, that is, the syntax element intra_chroma_pred_mode is maintained. In this case, different binarization methods can be used to implement it according to different values ​​of IbcEnabled.

[0426] In another specific embodiment, for a chroma prediction mode INTRA_DBV provided in an embodiment of the present application, in the decoding implementation, the following is further included:

[0427] (4) Maintain the syntax element intra_chroma_pred_mode, as shown in Table 24.

[0428] Table 24

[0429]

[0430] If sps_ibc_enabled_flag is equal to 0, IbcEnabled is equal to 0.

[0431] Otherwise, IbcEnabled is equal to 1 if all of the following conditions are true (including but not limited to the following):

[0432] sh_slice_type is equal to I frame;

[0433] CtbLog2SizeY is less than or equal to MaxChromaIbcSize.

[0434] Among them, MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.

[0435] In addition, intra_chroma_pred_mode includes but is not limited to the following binarization methods:

[0436] When IbcEnabled is equal to 1, intra_chroma_pred_mode is binarized using Table 25, but is not limited thereto.

[0437] Table 25

[0438] Value of intra_chroma_pred_modeBin string0110011101211103111141050

[0439] Otherwise, if IbcEnabled is equal to 0, intra_chroma_pred_mode is binarized using Table 26, but is not limited thereto.

[0440] Figure 26

[0441] Value of intra_chroma_pred_modeBin string010011012110311140

[0442] In addition, for different syntax elements (such as ccm_mode_flag, ccm_mode_idx and intra_chroma_pred_mode, etc.), the encoding method used for each coded bit is as follows:

[0443] When IbcEnabled is equal to 1, as shown in FIG27 or FIG28.

[0444] Figure 27

[0445]

[0446] Figure 28

[0447]

[0448] Here, taking intra_chroma_pred_mode as an example, when IbcEnabled is equal to 1, the 0th bit of intra_chroma_pred_mode represents the DM mode, and the encoding method is the same as VVC; the 1st bit of intra_chroma_pred_mode represents the newly added INTRA_DBV mode, which can be encoded using the context model or the bypass model.

[0449] When IbcEnabled is equal to 0, as shown in Figure 29.

[0450] Figure 29

[0451]

[0452] Further, for the case of modifying the DM mode, in some embodiments, decoding the code stream and determining the value of the second syntax element identification information may include: if the value of the second syntax element identification information satisfies a first preset constant value, determining that the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode, and after determining a fourth intra-frame prediction mode for the second color component of the current block, performing intra-frame prediction processing on the second color component of the current block according to the fourth intra-frame prediction mode to determine a predicted value of the second color component of the current block; or,

[0453] If the value of the second syntax element identification information satisfies the second preset constant value, it is determined that the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, and the second color component of the current block is intra-frame predicted according to the target prediction mode to determine the predicted value of the second color component of the current block.

[0454] In the embodiment of the present application, the second syntax element identification information is still represented by intra_chroma_pred_mode. In addition, the first preset constant value can be 0, 1, 2, or 3; and the second preset constant value can be 4, but this is not specifically limited.

[0455] In another specific embodiment, for a chroma prediction mode INTRA_DBV provided in an embodiment of the present application, in the decoding implementation, the following is further included:

[0456] (5) Modify the DM mode, as shown in Table 30.

[0457] Table 30

[0458]

[0459] In addition, intra_chroma_pred_mode includes but is not limited to the following binarization methods, and can be encoded using a context model or a bypass model. For example, as shown in Table 31 and Table 32.

[0460] Table 31

[0461] Value of intra_chroma_pred_modeBin string010011012110311140

[0462] Table 32

[0463]

[0464] Here, the 0th bit of intra_chroma_pred_mode represents the DM mode, and the encoding method is the same as VVC.

[0465] The derivation process of IbcEnabled is as follows:

[0466] If sps_ibc_enabled_flag is equal to 0, IbcEnabled is equal to 0.

[0467] Otherwise, IbcEnabled is equal to 1 if all of the following conditions are true (including but not limited to the following):

[0468] sh_slice_type is equal to I frame;

[0469] CtbLog2SizeY is less than or equal to MaxChromaIbcSize.

[0470] Among them, MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.

[0471] If IbcEnabled is equal to 1, then when intra_chroma_pred_mode is equal to the four chroma prediction modes of 0, 1, 2, or 3, these four chroma prediction modes remain unchanged; when intra_chroma_pred_mode is equal to 4, the decoding process shown in Table 30 is implemented.

[0472] Otherwise, the chroma prediction process in the H.266 / VVC standard remains unchanged.

[0473] In short, in an embodiment of the present application, for the DM mode, in the case of dual-tree partitioning, if the mode at the center position of its brightness is the IBC mode, the obtained chrominance prediction mode is the DC mode. This embodiment effectively improves this method of obtaining a fixed prediction mode, can make full use of the mode information of the same-position brightness area, and adopts a flexible BV instead of the fixed prediction mode, thereby improving the accuracy of chrominance prediction; in addition, for a new prediction mode INTRA_DBV, in the case of dual-tree partitioning, if the corresponding brightness block is the IBC mode, the BV of the corresponding brightness block is obtained, and then the BV is adjusted and applied to the chrominance, thereby improving the uniformity of the chrominance prediction, implicitly adding the IBC algorithm to the chrominance prediction, making full use of the information of the same-position brightness area, and effectively improving the accuracy of the chrominance prediction.

[0474] This embodiment provides a decoding method. In the process of deriving the chrominance prediction mode using the luminance prediction mode, this embodiment turns on the IBC mode and dual-tree partitioning at the SPS layer. If the corresponding luminance block is in the IBC mode, the BV parameter of the corresponding luminance block is obtained, and then the BV parameter is adjusted and applied to the chrominance, thereby improving the uniformity of the chrominance prediction, implicitly adding the IBC algorithm to the chrominance prediction, and making full use of the information of the same-position luminance area, so as to effectively and accurately predict the chrominance block, thereby improving the accuracy of the chrominance prediction, thereby improving the encoding and decoding efficiency, and improving the encoding and decoding performance.

[0475] In another embodiment of the present application, referring to FIG17 , a schematic flow chart of an encoding method provided by an embodiment of the present application is shown. As shown in FIG17 , the method may include:

[0476] S1701: When the prediction mode of the second color component of the current block is the target prediction mode, determine the first color component block of the current block.

[0477] It should be noted that in the embodiments of the present application, the method of the embodiments of the present application can be applied to an encoder. In addition, the encoding method here can specifically refer to an intra-frame prediction method. Here, assuming that the first color component is a luminance component and the second color component is a chrominance component, then more specifically, this is a chrominance intra-frame prediction method, which can use the IBC extended mode proposed in the above embodiments to perform chrominance prediction, thereby improving the accuracy of chrominance prediction.

[0478] It should also be noted that in the embodiment of the present application, according to the method for determining the prediction mode in the above embodiment, the prediction mode determined is the target prediction mode. Here, the target prediction mode is the IBC extended mode proposed in the above embodiment, which can be represented by INTRA_DBV.

[0479] In some embodiments, determining the first color component block of the current block may include: determining a first color component region at the same location 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.

[0480] Further, in some embodiments, determining the first color component block of the current block from the multiple blocks divided by the first color component area may include: selecting a target block from the multiple blocks divided by the first color component area, and using the target block as the first color component block of the current block.

[0481] In a specific embodiment, the method may further include: selecting a block at a center position in the first color component area as a target block; or selecting a block at an upper left corner position in the first color component area as a target block; or selecting a block at a lower right corner position in the first color component area as a target block.

[0482] It should be understood that in the embodiment of the present application, the target block serving as the first color component block may be a block at any position among the multiple blocks shown in FIG3 . For example, the target block may be the block at the center of the collocated luminance region shown in FIG3 (a block filled with black), the block at the upper left corner of the collocated luminance region shown in FIG7 (a block filled with black), the block at the lower right corner of the collocated luminance region shown in FIG8 (a block filled with black), or even the block at the upper right corner or the block at the lower left corner of the collocated luminance region, or even the block at the center of the upper left region, etc., and this is not specifically limited here.

[0483] Further, in some embodiments, determining the first color component block of the current block from the multiple blocks divided by the first color component area may include: determining at least one candidate block at a preset position from the multiple blocks divided by the first color component area; obtaining at least one candidate block in sequence according to a preset order and performing mode judgment, and if the first candidate block determined uses the IBC mode, then using the first candidate block as the first color component block of the current block.

[0484] Further, in some embodiments, determining the first color component block of the current block from a plurality of blocks divided from the first color component area may include: determining at least one candidate block at a preset position from a plurality of blocks divided from the first color component area, and determining the at least one candidate block as the first color component block of the current block.

[0485] It should be understood that in the embodiment of the present application, the number of first color component blocks of the current block can be one or more, and is not specifically limited here. Specifically, for the first color component block, a mode determination can also be performed on at least one candidate block at a preset position, as specifically shown in FIG9 .

[0486] It should also be understood that in an embodiment of the present application, the five positions shown in FIG9 can be obtained sequentially in a preset order until the candidate block is determined to be in IBC mode, that is, the CU at the first luminance pixel position is found to be in IBC mode, and the CU at the first luminance pixel position is used as the corresponding luminance block of the current block.

[0487] S1702: When the prediction mode of the first color component block is the IBC mode, determine a first block vector parameter of the first color component block.

[0488] It should be noted that, in the embodiment of the present application, after determining the first color component block, it is necessary to determine the prediction mode of the first color component block. If the prediction mode of the first color component block is the IBC mode, it is necessary to further determine the first block vector parameters of the first color component block.

[0489] It should also be noted that, in an embodiment of the present application, if there are multiple first color component blocks, then the first block vector parameter may also be obtained by averaging the BVs of the multiple first color component blocks. Therefore, in some embodiments, for at least one candidate block at a preset position, when the prediction mode of the first color component block is the IBC mode, determining the first block vector parameter of the first color component block may include: determining at least one target block using the IBC mode from the at least one candidate block, and determining the first block vector parameter of each of the at least one target blocks; performing mean calculation based on the first block vector parameters of each of the at least one target block, and using the calculation result as the first block vector parameter of the first color component block.

[0490] It should be understood that in this embodiment of the present application, the first color component block of the current block is not limited to a single block and may also be composed of multiple blocks. When composed of multiple blocks, the prediction modes of all the multiple blocks are IBC mode. For example, multiple luma CUs in the same luma region are first obtained, and then their first block vector parameters are averaged to obtain the final first block vector parameters.

[0491] Furthermore, in embodiments of the present application, the ultimately obtained first block vector parameters may also be determined by selecting optimal block vector parameters using a template matching method. Therefore, in some embodiments, the method may further include: determining at least one target block using an IBC mode from at least one candidate block; searching the at least one target block using the template matching method to determine optimal block vector parameters, and using the optimal block vector parameters as the first block vector parameters of the first color component block.

[0492] It should also be understood that in an embodiment of the present application, for the first color component block of the current block, after obtaining multiple luminance CUs in the same luminance area, the best block vector parameters can be selected by template matching as the first block vector parameters finally obtained.

[0493] It should also be noted that, in an embodiment of the present application, after determining the first color component block, it is necessary to determine the prediction mode of the first color component block. If the prediction mode of the first color component block is the IBC mode, then the process shown in FIG17 is continued to be executed, and the first block vector parameter of the first color component block needs to be determined; otherwise, if the prediction mode of the first color component block is not the IBC mode, then the process shown in FIG17 is no longer executed, and the second color component of the current block can be predicted according to the first preset mode to determine the predicted value of the second color component of the current block. The first preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode, CCLM mode and skip mode, but is not limited thereto.

[0494] S1703: Determine target block vector parameters of the second color component of the current block according to the first block vector parameters of the first color component block.

[0495] It should be noted that, in an embodiment of the present application, for the target block vector parameters of the current block, it can be: directly using the first block vector parameters of the first color component block as the target block vector parameters of the current block; or adjusting the first block vector parameters of the first color component block to determine the target block vector parameters of the current block.

[0496] In one possible implementation, adjusting the first block vector parameters of the first color component block to determine the target block vector parameters of the current block may include: determining a color sampling format of the current block; and scaling the first block vector parameters of the first color component block according to the color sampling format to determine the target block vector parameters of the current block.

[0497] In another possible implementation, adjusting the first block vector parameters of the first color component block to determine the target block vector parameters of the current block may include: obtaining initial block vector parameters of the current block after scaling the first block vector parameters of the first color component block according to a color sampling format; and correcting the initial block vector parameters of the current block to determine the target block vector parameters of the current block.

[0498] In yet another possible implementation, adjusting the first block vector parameters of the first color component block to determine the target block vector parameters of the current block may include directly determining the target block vector parameters of the current block according to the initial block vector parameters of the current block.

[0499] Furthermore, in some embodiments, correcting the initial block vector parameters of the current block to determine the target block vector parameters of the current block may include: determining a search area for the current block based on the initial block vector parameters of the current block and the position information of the current block; searching within the search area according to a template matching method to determine the optimal block vector parameters, and using the optimal block vector as the target block vector parameters of the current block.

[0500] For example, after obtaining the chroma BV parameters scaled according to the color sampling format shown in Table 7, they can be used directly or further modified. The modification here may include, but is not limited to, the following methods: using the IntraTMP mode for modification, that is, after obtaining the chroma BV parameters, then using the position of the current block and the obtained chroma BV parameters to find the offset position, and then using the template matching method to perform a detailed search near the offset position to determine the optimal chroma BV parameters, and using the optimal chroma BV parameters as the final chroma BV parameters, that is, the target block vector parameters of the current block.

[0501] S1704: Perform prediction processing on the second color component of the current block in the IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block.

[0502] It should be noted that in an embodiment of the present application, for the IBC extended mode (i.e., the target prediction mode described in the embodiment of the present application), the second color component of the current block can be predicted based on the determined target block vector parameters to determine the predicted value of the second color component of the current block.

[0503] It should also be noted that, in embodiments of the present application, after obtaining the target block vector parameters of the current block, it is necessary to determine whether the target block vector parameters are available, that is, whether the target block vector parameters meet an availability condition. In some embodiments, the method may further include: after determining the target block vector parameters of the current block, determining whether the target block vector parameters meet an availability condition; and when the target block vector parameters meet the availability condition, performing IBC extended mode prediction processing on the second color component of the current block based on the target block vector parameters to determine a predicted value for the second color component of the current block.

[0504] Specifically, in an embodiment of the present application, only when the target block vector parameters meet the availability conditions can the second color component of the current block be predicted in the IBC extension mode according to the target block vector parameters to determine the predicted value of the second color component of the current block.

[0505] Furthermore, in some embodiments, whether the target block vector parameters meet the availability condition may at least include:

[0506] Whether the offset position indicated by the target block vector parameter does not exceed the image boundary;

[0507] Whether the offset position indicated by the target block vector parameter does not overlap the current block;

[0508] Whether the offset position indicated by the target block vector parameter does not exceed the available area of ​​the IBC mode;

[0509] Whether the offset position indicated by the target block vector parameter has been reconstructed.

[0510] It should be understood that in the embodiment of the present application, only when all of the above conditions are met can it be determined that the target block vector parameters meet the availability condition, that is, the target block vector parameters are available. In a specific embodiment, the target block vector parameters meeting the availability condition at least includes: the offset position indicated by the target block vector parameters does not exceed the image boundary; the offset position indicated by the target block vector parameters does not overlap the current block; the offset position indicated by the target block vector parameters does not exceed the available area of ​​the IBC mode; and the offset position indicated by the target block vector parameters has been reconstructed.

[0511] It should also be understood that in the embodiment of the present application, after scaling the first block vector parameters of the first color component block according to the color sampling format, the obtained initial block vector parameters need to be further corrected. Prior to the correction, the method may further include: determining whether the initial block vector parameters meet an availability condition; if the initial block vector parameters meet the availability condition, correcting the initial block vector parameters of the current block to determine the target block vector parameters of the current block; or, if the initial block vector parameters do not meet the availability condition, adjusting the initial block vector parameters of the current block until the adjusted block vector parameters meet the availability condition; and then correcting the adjusted block vector parameters to determine the target block vector parameters of the current block.

[0512] It will also be appreciated that in this embodiment of the present application, at least one candidate block at a preset position is determined from the multiple blocks divided into the first color component region. Then, at least one candidate block is sequentially obtained according to a preset order and a mode determination is performed. If the first candidate block determined to use the IBC mode is used, the first candidate block is used as the first color component block of the current block. During this process, it is also necessary to determine whether the BV parameters of the first candidate block meet the availability conditions in order to determine whether to proceed to the mode determination for the next candidate block.

[0513] In some embodiments, the method may further include: when the first candidate block is determined to use the IBC mode, determining the first block vector parameters of the first candidate block; determining whether the first block vector parameters of the first candidate block meet the available conditions; if the first block vector parameters of the first candidate block meet the available conditions, then using the first candidate block as the first color component block of the current block; if the first block vector parameters of the first candidate block do not meet the available conditions, then continuing to perform mode judgment on the next candidate block until a target candidate block using the IBC mode and the corresponding first block vector parameters meeting the available conditions is determined, and using the target candidate block as the first color component block of the current block.

[0514] Furthermore, in some embodiments, the method may also include: if there is no target candidate block in at least one candidate block that uses the IBC mode and the corresponding first block vector parameter meets the availability condition, then performing intra-frame prediction processing on the second color component of the current block according to the first preset mode to determine the predicted value of the second color component of the current block; wherein the first preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode, CCLM mode and skip mode.

[0515] For example, still taking Figure 9 as an example, if one or more CUs in the five positions use the IBC mode, then the five positions can be re-acquired in sequence (until the first CU that meets the following conditions is found). At this time, not only is it determined whether the CU uses the IBC mode, but the luminance BV parameters of the CU are also adjusted to determine the BV parameters applied to the chrominance; then it is determined whether the chrominance BV parameters are available. If the chrominance BV parameters are available, then this CU is selected as the luminance block for the final BV acquisition. If the chrominance BV parameters are not available, then the luminance CU is not acquired, including but not limited to the PLANAR mode or inter-component prediction mode or other angular prediction mode, and the mode can even be skipped; or the first CU using the IBC mode is found, its BV is adjusted until it is available, and this CU is selected as the luminance block for the final BV acquisition.

[0516] Furthermore, in some embodiments, performing IBC extended mode prediction processing on the second color component of the current block based on the target block vector parameters to determine the predicted value of the second color component of the current block may include: determining the offset position of the current block based on the target block vector parameters and the position information of the current block; performing block copy processing based on the offset position of the current block to obtain a first prediction block; and determining the predicted value of the second color component of the current block based on the first prediction block.

[0517] Furthermore, in some embodiments, determining the predicted value of the second color component of the current block based on the first prediction block may include: performing a correction operation on the first prediction block to determine the predicted value of the second color component of the current block.

[0518] In a specific embodiment, determining the predicted value of the second color component of the current block based on the first prediction block may include: performing intra-frame prediction processing on the second color component of the current block according to a second preset mode to obtain a second prediction block; performing weighted fusion processing on the first prediction block and the second prediction block to determine the predicted value of the second color component of the current block; wherein the second preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode and CCLM mode.

[0519] It should be understood that in an embodiment of the present application, if the predicted value of the second color component of the current block is obtained by block copying the target block vector parameters, the predicted value can be corrected using methods including but not limited to weighting with the conventional prediction mode.

[0520] It can also be understood that, in some embodiments, the method may further include: determining a value of the first syntax element identification information; encoding the value of the first syntax element identification information, and writing the obtained coded bits into the bitstream.

[0521] In a specific embodiment, determining the value of the first syntax element identification information may include: if the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, determining that the value of the first syntax element identification information is a first value; if the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, determining that the value of the first syntax element identification information is a second value.

[0522] It should be understood that in this embodiment of the present application, the first syntax element identification information can be represented by IbcEnabled or chromaIbcExMode Enabled to indicate whether the second color component of the current block is allowed to use the IBC extended mode. In other words, the first syntax element identification information can be used to indicate whether the second color component of the current block is allowed to use the target prediction mode (i.e., INTRA_DBV mode).

[0523] It should also be understood that in the embodiments of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form. Specifically, the first syntax element identification information can be a parameter written in the profile or a flag value, which is not specifically limited here. For example, the first value can be set to 1 and the second value can be set to 0, but this is not specifically limited.

[0524] In this way, the encoder encodes the first syntax element identification information and writes it into the bitstream. The decoder can then directly determine the value of the first syntax element identification information through decoding, and further determine whether the second color component of the current block is allowed to use the IBC extension mode.

[0525] Furthermore, in some embodiments, the method may also include: determining a value of the second syntax element identification information when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode; encoding the value of the second syntax element identification information, and writing the obtained encoded bits into the bitstream.

[0526] In a specific embodiment, determining the value of the second syntax element identification information may include: if the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, determining the value of the second syntax element identification information to be a first value; if the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode, determining the value of the second syntax element identification information to be a second value.

[0527] Furthermore, in some embodiments, the method may further include: determining a value of third syntax element identification information; encoding the value of the third syntax element identification information, and writing the obtained coded bits into the bitstream.

[0528] In a specific embodiment, determining the value of the third syntax element identification information may include: if the third syntax element identification information indicates that the current image allows the use of the IBC mode, determining that the value of the third syntax element identification information is a first value; if the third syntax element identification information indicates that the current image does not allow the use of the IBC mode, determining that the value of the third syntax element identification information is a second value.

[0529] It should be understood that in the embodiment of the present application, the value of the first syntax element identification information can be determined by treating the first syntax element identification information as a syntax element transmitted in the bitstream, and then directly determining the value by decoding the bitstream; or the first syntax element identification information can be determined as a syntax element not transmitted in the bitstream, in which case the value can be determined based on the third syntax element identification information and whether the current block meets a preset condition.

[0530] In some embodiments, determining the value of the first syntax element identification information may also include: if the value of the third syntax element identification information is the first value and the current block meets the preset condition, determining the value of the first syntax element identification information is the first value; if the value of the third syntax element identification information is the second value, determining the value of the first syntax element identification information is the second value.

[0531] It should also be noted that, in the embodiment of the present application, the current block meets the preset conditions, which may at least include: the slice type to which the current block belongs meets the I frame; and the size parameter of the current block meets the preset upper limit value.

[0532] In addition, in an embodiment of the present application, the second syntax element identification information can be represented by intra_dbv_flag or intra_chroma_ibc_flag, which is used to indicate whether the second color component of the current block uses the target prediction mode. The third syntax element identification information can be represented by sps_ibc_enabled_flag, which is used to indicate whether the current image allows the use of the IBC mode. Here, the current image includes the current block.

[0533] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form. Specifically, whether it is the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, etc., can be a parameter written in the profile or the value of a flag, and this is not specifically limited here.

[0534] For example, taking the first value as 1 and the second value as 0, if the value of sps_ibc_enabled_flag is 0, then the value of IbcEnabled is 0. Otherwise, when the value of sps_ibc_enabled_flag is 1, if the following multiple conditions are simultaneously true (including but not limited to the following conditions), then the value of IbcEnabled is 1. These conditions may include but are not limited to: sh_slice_type is equal to I frame; and CtbLog2SizeY is less than or equal to MaxChromaIbcSize.

[0535] In some embodiments, the method may further include: determining a first intra-frame prediction mode for the second color component of the current block when the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode; performing intra-frame prediction processing on the second color component of the current block according to the first intra-frame prediction mode to determine a predicted value of the second color component of the current block.

[0536] Furthermore, in some embodiments, the method may also include: determining a value of fourth syntax element identification information based on the first intra-frame prediction mode of the second color component of the current block; encoding the value of the fourth syntax element identification information, and writing the obtained encoding bits into the bitstream.

[0537] In an embodiment of the present application, the fourth syntax element identification information may be represented by intra_chroma_pred_mode, which is used to indicate the chroma intra prediction mode used by the current block. For example, when intra_dbv_flag or intra_chroma_ibc_flag is equal to 0, the target prediction mode is no longer used. Instead, chroma prediction processing is performed on the current block according to the chroma intra prediction mode indicated by intra_chroma_pred_mode to determine the chroma prediction value of the current block.

[0538] For the case of adding syntax elements, in some embodiments, the method may further include: when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, determining a second intra-frame prediction mode for the second color component of the current block, performing intra-frame prediction processing on the second color component of the current block according to the second intra-frame prediction mode, and determining a predicted value of the second color component of the current block; when the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, determining a third intra-frame prediction mode for the second color component of the current block, performing intra-frame prediction processing on the second color component of the current block according to the third intra-frame prediction mode, and determining a predicted value of the second color component of the current block; wherein, the second intra-frame prediction mode includes a target prediction mode, and the third intra-frame prediction mode does not include a target prediction mode.

[0539] Furthermore, in some embodiments, the method may also include: determining a value of the fifth syntax element identification information based on the second intra-frame prediction mode of the second color component of the current block; binarizing the value of the fifth syntax element identification information using a first preset binary mapping table to determine at least one character corresponding to the fifth syntax element identification information; encoding the at least one character corresponding to the fifth syntax element identification information, and writing the obtained encoding bits into the bitstream.

[0540] Furthermore, in some embodiments, the method may also include: determining a value of the sixth syntax element identification information based on the third intra-frame prediction mode of the second color component of the current block; binarizing the value of the sixth syntax element identification information using a second preset binary mapping table to determine at least one character corresponding to the sixth syntax element identification information; encoding the at least one character corresponding to the sixth syntax element identification information, and writing the obtained encoding bits into the bitstream.

[0541] In the embodiment of the present application, the fifth syntax element identification information can be represented by intra_chroma_pred_mode_add, and the sixth syntax element identification information can be represented by intra_chroma_pred_mode, wherein intra_chroma_pred_mode_add is used to indicate the addition of the INTRA_DBV mode, and intra_chroma_pred_mode represents the chroma prediction mode in the related art.

[0542] In this embodiment of the present application, the binarization processes for the fifth and sixth syntax element identification information are different, that is, the binarization mapping tables used by the two differ. For example, the first preset binary mapping table may be as shown in Table 20, and the second preset binary mapping table may be as shown in Table 21, but these are not specifically limited.

[0543] For the case of retaining grammatical elements, in some embodiments, the method may further include:

[0544] When the first syntax element identification information indicates that the second color component of the current block allows use of the IBC extended mode, binarizing the value of the second syntax element identification information using a first preset binary mapping table to determine at least one character corresponding to the second syntax element identification information; and encoding the at least one character corresponding to the second syntax element identification information, and writing the obtained coded bits into a bitstream.

[0545] or,

[0546] When the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, a second preset binary mapping table is used to binarize the value of the second syntax element identification information to determine at least one character corresponding to the second syntax element identification information; and the at least one character corresponding to the second syntax element identification information is encoded, and the obtained encoded bits are written into the bitstream.

[0547] In an embodiment of the present application, the second syntax element identification information can be represented by intra_chroma_pred_mode, that is, the syntax element intra_chroma_pred_mode is maintained. In this case, different binarization methods can be used depending on the value of IbcEnabled. For example, the first preset binary mapping table can be shown in Table 25, and the second preset binary mapping table can be shown in Table 26, but these are not specifically limited.

[0548] Furthermore, an embodiment of the present application further provides a code stream, wherein the code stream is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:

[0549] The target block vector parameter of the current block, the value of the first syntax element identification information, the value of the second syntax element identification information, the value of the third syntax element identification information, the value of the fourth syntax element identification information, the value of the fifth syntax element identification information, and the value of the sixth syntax element identification information.

[0550] It should be noted that in the embodiments of the present application, whether it is the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, or the fourth syntax element identification information, the fifth syntax element identification information, or the sixth syntax element identification information, the first value and the second value of these syntax element identification information are different, and the first value and the second value can be in parameter form or in numerical form. For example, they can be parameters written in the profile or the value of a flag, which is not specifically limited here.

[0551] It should also be noted that in the embodiment of the present application, the third syntax element identification information can be an SPS layer syntax element. When IBC mode and dual-tree partitioning are enabled at the SPS layer, if the corresponding luma block is in IBC mode, the BV of the corresponding luma block is obtained, and then the BV is adjusted and applied to the chroma, thereby improving the uniformity of the chroma prediction and implicitly incorporating the IBC algorithm into the chroma prediction, making full use of the information of the co-located luma area and effectively improving the coding efficiency.

[0552] It should also be noted that in the embodiment of the present application, the encoding end can encode these syntax element identification information and write them into the code stream. The subsequent decoding end can determine the values ​​of these syntax element identification information through decoding, and then determine whether the second color component of the current block uses the target prediction mode, and perform chrominance prediction on the current block when the target prediction mode is used, which can also effectively improve decoding efficiency.

[0553] This embodiment provides a coding method. In the process of using the luminance prediction mode to derive the chrominance prediction mode, if the luminance block corresponding to the current block is the IBC mode, then the target block vector parameters of the applied chrominance component can be determined based on the block vector parameters of the luminance block, and the chrominance component is predicted according to the IBC extended mode based on the target block vector parameters to determine the chrominance prediction value of the current block; in this way, not only the singleness problem of the chrominance prediction is improved, the IBC mode is implicitly added to the chrominance prediction, and the relevant information of the same-position luminance block is fully utilized, which can improve the accuracy of the chrominance prediction, but also the bit rate can be saved, the encoding and decoding efficiency can be improved, and the encoding and decoding performance can be improved.

[0554] In another embodiment of the present application, see FIG18 , which shows a schematic diagram of the structure of an encoder provided by an embodiment of the present application. As shown in FIG18 , the encoder 180 may include: a first determination unit 1801 and a first prediction unit 1802; wherein,

[0555] The first determining unit 1801 is configured to determine the first color component block of the current block when the prediction mode of the second color component of the current block is the target prediction mode; and determine the first block vector parameters of the first color component block when the prediction mode of the first color component block is the IBC mode; and determine the target block vector parameters of the second color component of the current block based on the first block vector parameters of the first color component block;

[0556] The first prediction unit 1802 is configured to perform prediction processing on the second color component of the current block in the IBC extension mode according to the target block vector parameter, and determine a predicted value of the second color component of the current block.

[0557] In some embodiments, the first determining unit 1801 is further configured to determine a first color component region at the same position as the current block; and determine a first color component block of the current block from a plurality of blocks divided from the first color component region.

[0558] In some embodiments, the first determining unit 1801 is further configured to select a target block from the multiple blocks divided into the first color component area, and use the target block as the first color component block of the current block.

[0559] In some embodiments, the first determination unit 1801 is further configured to select the block at the center position in the first color component area as the target block; or, select the block at the upper left corner position in the first color component area as the target block; or, select the block at the lower right corner position in the first color component area as the target block.

[0560] In some embodiments, the first determination unit 1801 is further configured to determine at least one candidate block at a preset position from multiple blocks divided into the first color component area; and to obtain at least one candidate block in sequence according to a preset order and perform mode judgment. If the first candidate block determined uses the IBC mode, the first candidate block is used as the first color component block of the current block.

[0561] In some embodiments, the first determining unit 1801 is further configured to determine at least one candidate block at a preset position from the plurality of blocks divided into the first color component area, and determine the at least one candidate block as the first color component block of the current block;

[0562] Accordingly, the first determination unit 1801 is further configured to determine at least one target block using the IBC mode from at least one candidate block, and determine the first block vector parameters of each of the at least one target block; and perform mean calculation on the first block vector parameters of each of the at least one target block, and use the calculation result as the first block vector parameter of the first color component block.

[0563] In some embodiments, the first determination unit 1801 is further configured to determine at least one target block using the IBC mode from at least one candidate block; and search for the at least one target block according to the template matching method, determine the optimal block vector parameters, and use the optimal block vector parameters as the first block vector parameters of the first color component block.

[0564] In some embodiments, referring to FIG. 18 , the encoder 180 may further include a first adjustment unit 1803 configured to adjust a first block vector parameter of the first color component block to determine a target block vector parameter of the current block.

[0565] In some embodiments, the first determining unit 1801 is further configured to determine a color sampling format of the current block;

[0566] The first adjustment unit 1803 is further configured to perform scaling processing on the first block vector parameter of the first color component block according to the color sampling format, and determine the target block vector parameter of the current block.

[0567] In some embodiments, the first adjustment unit 1803 is configured to obtain initial block vector parameters of the current block after scaling the first block vector parameters of the first color component block according to the color sampling format; and to correct the initial block vector parameters of the current block to determine target block vector parameters of the current block.

[0568] In some embodiments, the first adjustment unit 1803 is further configured to directly determine the target block vector parameters of the current block according to the initial block vector parameters of the current block.

[0569] In some embodiments, the first adjustment unit 1803 is further configured to determine a search area for the current block based on the initial block vector parameters of the current block and the position information of the current block; and to search within the search area according to a template matching method to determine the optimal block vector parameters, and use the optimal block vector as the target block vector parameters of the current block.

[0570] In some embodiments, the first prediction unit 1802 is further configured to, after determining the target block vector parameters of the current block, determine whether the target block vector parameters meet the availability conditions; and when the target block vector parameters meet the availability conditions, perform prediction processing of the second color component of the current block in the IBC extension mode according to the target block vector parameters to determine the predicted value of the second color component of the current block.

[0571] In some embodiments, the target block vector parameters satisfy the availability conditions, including at least: the offset position indicated by the target block vector parameters does not exceed the image boundary; and the offset position indicated by the target block vector parameters does not overlap the current block; and the offset position indicated by the target block vector parameters does not exceed the available area of ​​the IBC mode; and the offset position indicated by the target block vector parameters has been reconstructed.

[0572] In some embodiments, the first determination unit 1801 is further configured to determine the first block vector parameters of the first candidate block when the first candidate block is determined to use the IBC mode; and determine whether the first block vector parameters of the first candidate block meet the available conditions; and if the first block vector parameters of the first candidate block meet the available conditions, then use the first candidate block as the first color component block of the current block; if the first block vector parameters of the first candidate block do not meet the available conditions, then continue to perform mode judgment on the next candidate block until it is determined that the target candidate block uses the IBC mode and the corresponding first block vector parameters meet the available conditions, and use the target candidate block as the first color component block of the current block.

[0573] In some embodiments, the first prediction unit 1802 is further configured to perform intra-frame prediction processing on the second color component of the current block according to the first preset mode to determine the predicted value of the second color component of the current block if there is no target candidate block using the IBC mode and the corresponding first block vector parameters meet the availability conditions in at least one candidate block; wherein the first preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode, CCLM mode and skip mode.

[0574] In some embodiments, the first prediction unit 1802 is further configured to determine the offset position of the current block based on the target block vector parameter and the position information of the current block; and perform block copy processing based on the offset position of the current block to obtain a first prediction block; and determine the predicted value of the second color component of the current block based on the first prediction block.

[0575] In some embodiments, the first prediction unit 1802 is further configured to perform a correction operation on the first prediction block to determine a predicted value of the second color component of the current block.

[0576] In some embodiments, the first prediction unit 1802 is further configured to perform intra-frame prediction processing on the second color component of the current block according to a second preset mode to obtain a second prediction block; and perform weighted fusion processing on the first prediction block and the second prediction block to determine the predicted value of the second color component of the current block; wherein the second preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode and CCLM mode.

[0577] In some embodiments, referring to FIG. 18 , the encoder 180 may further include an encoding unit 1804 , wherein:

[0578] The first determining unit 1801 is further configured to determine a value of the first syntax element identification information;

[0579] The encoding unit 1804 is configured to encode the value of the first syntax element identification information and write the obtained coded bits into the bitstream.

[0580] In some embodiments, the first determination unit 1801 is further configured to determine that the value of the first syntax element identification information is a first value if the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode; if the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, determine that the value of the first syntax element identification information is a second value.

[0581] In some embodiments, the first determining unit 1801 is further configured to determine a value of the second syntax element identification information when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode;

[0582] The encoding unit 1804 is further configured to encode the value of the second syntax element identification information and write the obtained coded bits into the bitstream.

[0583] In some embodiments, the first determination unit 1801 is further configured to determine that the value of the second syntax element identification information is a first value if the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode; if the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode, determine that the value of the second syntax element identification information is a second value.

[0584] In some embodiments, the first determining unit 1801 is further configured to determine a value of the third syntax element identification information;

[0585] The encoding unit 1804 is further configured to encode the value of the third syntax element identification information and write the obtained coded bits into the bitstream.

[0586] In some embodiments, the first determination unit 1801 is further configured to determine that the value of the first syntax element identification information is the first value if the value of the third syntax element identification information is the first value and the current block meets the preset condition; if the value of the third syntax element identification information is the second value, determine that the value of the first syntax element identification information is the second value.

[0587] In some embodiments, the current block meets a preset condition, which at least includes: the slice type to which the current block belongs meets the I frame; and the size parameter of the current block meets a preset upper limit value.

[0588] In some embodiments, the first determination unit 1801 is further configured to determine that the value of the third syntax element identification information is a first value if the third syntax element identification information indicates that the current image allows the use of the IBC mode; if the third syntax element identification information indicates that the current image does not allow the use of the IBC mode, determine that the value of the third syntax element identification information is a second value.

[0589] In some embodiments, the first determining unit 1801 is further configured to determine the first intra prediction mode for the second color component of the current block when the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode;

[0590] The first prediction unit 1802 is further configured to perform intra-frame prediction processing on the second color component of the current block according to the first intra-frame prediction mode to determine a predicted value of the second color component of the current block.

[0591] In some embodiments, the first determining unit 1801 is further configured to determine a value of the fourth syntax element identification information according to the first intra prediction mode of the second color component of the current block;

[0592] The encoding unit 1804 is further configured to encode the value of the fourth syntax element identification information and write the obtained coded bits into the bitstream.

[0593] In some embodiments, the first prediction unit 1802 is further configured to determine a second intra-frame prediction mode for the second color component of the current block when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, perform intra-frame prediction processing on the second color component of the current block according to the second intra-frame prediction mode, and determine the predicted value of the second color component of the current block; or, is further configured to determine a third intra-frame prediction mode for the second color component of the current block when the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, perform intra-frame prediction processing on the second color component of the current block according to the third intra-frame prediction mode, and determine the predicted value of the second color component of the current block; wherein the second intra-frame prediction mode includes a target prediction mode, and the third intra-frame prediction mode does not include a target prediction mode.

[0594] In some embodiments, the first determining unit 1801 is further configured to determine a value of the fifth syntax element identification information according to the second intra prediction mode of the second color component of the current block;

[0595] The encoding unit 1804 is further configured to perform binarization processing on the value of the fifth syntax element identification information using the first preset binary mapping table to determine at least one character corresponding to the fifth syntax element identification information; and encode the at least one character corresponding to the fifth syntax element identification information, and write the obtained encoded bits into the bitstream.

[0596] In some embodiments, the first determining unit 1801 is further configured to determine a value of the sixth syntax element identification information according to the third intra prediction mode of the second color component of the current block;

[0597] The encoding unit 1804 is further configured to perform binarization processing on the value of the sixth grammatical element identification information using a second preset binary mapping table to determine at least one character corresponding to the sixth grammatical element identification information; and encode the at least one character corresponding to the sixth grammatical element identification information, and write the obtained coded bits into the bitstream.

[0598] In some embodiments, the encoding unit 1804 is further configured to, when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, use a first preset binary mapping table to binarize the value of the second syntax element identification information, determine at least one character corresponding to the second syntax element identification information; and encode the at least one character corresponding to the second syntax element identification information, and write the obtained encoded bits into the bitstream; or, when the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, use a second preset binary mapping table to binarize the value of the second syntax element identification information, determine at least one character corresponding to the second syntax element identification information; and encode the at least one character corresponding to the second syntax element identification information, and write the obtained encoded bits into the bitstream.

[0599] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.

[0600] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0601] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 180. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method described in any one of the aforementioned embodiments.

[0602] Based on the composition of the encoder 180 and the computer-readable storage medium, refer to Figure 19, which shows a specific hardware structure diagram of the encoder 180 provided in an embodiment of the present application. As shown in Figure 19, the encoder 180 may include: a first communication interface 1901, a first memory 1902 and a first processor 1903; each component is coupled together through a first bus system 1904. It can be understood that the first bus system 1904 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 1904 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 1904 in Figure 19. Among them,

[0603] The first communication interface 1901 is used to receive and send signals when sending and receiving information with other external network elements;

[0604] A first memory 1902 is used to store computer programs that can be run on the first processor 1903;

[0605] The first processor 1903 is configured to, when running the computer program, execute:

[0606] When the prediction mode of the second color component of the current block is the target prediction mode, the first color component block of the current block is determined; when the prediction mode of the first color component block is the IBC mode, the first block vector parameters of the first color component block are determined; based on the first block vector parameters of the first color component block, the target block vector parameters of the second color component of the current block are determined; based on the target block vector parameters, the second color component of the current block is predicted in the IBC extended mode to determine the predicted value of the second color component of the current block.

[0607] It is understood that the first memory 1902 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is 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), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 1902 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0608] The first processor 1903 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 1903. The above-mentioned first processor 1903 can 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, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 1902 , and the first processor 1903 reads the information in the first memory 1902 and completes the steps of the above method in combination with its hardware.

[0609] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0610] Optionally, as another embodiment, the first processor 1903 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

[0611] This embodiment provides an encoder, in which, in the process of determining the chrominance prediction mode according to the luminance prediction mode, if the luminance block corresponding to the current block is the IBC mode, then the target block vector parameters of the applied chrominance component can be determined according to the block vector parameters of the luminance block, and the chrominance component is predicted according to the IBC extended mode according to the target block vector parameters to determine the chrominance prediction value of the current block; in this way, not only the singleness problem of the chrominance prediction is improved, the IBC mode is implicitly added to the chrominance prediction, and the relevant information of the same-position luminance block is fully utilized, which can improve the accuracy of the chrominance prediction, but also the bit rate can be saved, the encoding efficiency can be improved, and the encoding performance can be improved.

[0612] In another embodiment of the present application, see FIG20 , which shows a schematic diagram of the structure of a decoder provided by an embodiment of the present application. As shown in FIG20 , the decoder 200 may include: a second determination unit 2001 and a second prediction unit 2002; wherein,

[0613] The second determining unit 2001 is configured to determine a first color component block of the current block; and when the prediction mode of the first color component block is the IBC mode, determine a first block vector parameter of the first color component block; and determine a target block vector parameter of the second color component of the current block based on the first block vector parameter of the first color component block;

[0614] The second prediction unit 2002 is configured to perform prediction processing on the second color component of the current block in the IBC extension mode according to the target block vector parameter, and determine a predicted value of the second color component of the current block.

[0615] In some embodiments, the second determining unit 2001 is further configured to determine a first color component region at the same position as the current block; and determine a first color component block of the current block from a plurality of blocks divided from the first color component region.

[0616] In some embodiments, the second determining unit 2001 is further configured to select a target block from the multiple blocks divided into the first color component area, and use the target block as the first color component block of the current block.

[0617] In some embodiments, the second determination unit 2001 is further configured to select the block at the center position in the first color component area as the target block; or, select the block at the upper left corner position in the first color component area as the target block; or, select the block at the lower right corner position in the first color component area as the target block.

[0618] In some embodiments, the second determination unit 2001 is further configured to determine at least one candidate block at a preset position from multiple blocks divided into the first color component area; and to obtain at least one candidate block in sequence according to a preset order and perform mode judgment. If the first candidate block determined uses the IBC mode, the first candidate block is used as the first color component block of the current block.

[0619] In some embodiments, the second determining unit 2001 is further configured to determine at least one candidate block at a preset position from the plurality of blocks divided into the first color component area, and determine the at least one candidate block as the first color component block of the current block;

[0620] Accordingly, the second determination unit 2001 is further configured to determine at least one target block using the IBC mode from at least one candidate block, and determine the first block vector parameters of each of the at least one target block; and perform mean calculation based on the first block vector parameters of each of the at least one target block, and use the calculation result as the first block vector parameter of the first color component block.

[0621] In some embodiments, the second determination unit 2001 is further configured to determine at least one target block using the IBC mode from at least one candidate block; and search for the at least one target block according to the template matching method, determine the optimal block vector parameters, and use the optimal block vector parameters as the first block vector parameters of the first color component block.

[0622] In some embodiments, referring to FIG. 20 , the decoder 200 may further include a second adjustment unit 2003 configured to adjust the first block vector parameter of the first color component block to determine a target block vector parameter of the current block.

[0623] In some embodiments, the second determining unit 2001 is further configured to determine a color sampling format of the current block;

[0624] The second adjustment unit 2003 is further configured to perform scaling processing on the first block vector parameter of the first color component block according to the color sampling format, and determine the target block vector parameter of the current block.

[0625] In some embodiments, the second adjustment unit 2003 is further configured to obtain initial block vector parameters of the current block after scaling the first block vector parameters of the first color component block according to the color sampling format; and to correct the initial block vector parameters of the current block to determine target block vector parameters of the current block.

[0626] In some embodiments, the second adjustment unit 2003 is further configured to directly determine the target block vector parameters of the current block according to the initial block vector parameters of the current block.

[0627] In some embodiments, the second prediction unit 2002 is further configured to, after determining the target block vector parameters of the current block, determine whether the target block vector parameters meet the availability conditions; and when the target block vector parameters meet the availability conditions, perform prediction processing of the second color component of the current block in the IBC extension mode according to the target block vector parameters to determine the predicted value of the second color component of the current block.

[0628] In some embodiments, the target block vector parameters satisfy the availability conditions, including at least: the offset position indicated by the target block vector parameters does not exceed the image boundary; and the offset position indicated by the target block vector parameters does not overlap the current block; and the offset position indicated by the target block vector parameters does not exceed the available area of ​​the IBC mode; and the offset position indicated by the target block vector parameters has been reconstructed.

[0629] In some embodiments, the second determination unit 2001 is further configured to determine the first block vector parameters of the first candidate block when the first candidate block is determined to use the IBC mode; and determine whether the first block vector parameters of the first candidate block meet the available conditions; and if the first block vector parameters of the first candidate block meet the available conditions, then use the first candidate block as the first color component block of the current block; if the first block vector parameters of the first candidate block do not meet the available conditions, then continue to perform mode judgment on the next candidate block until it is determined that the target candidate block uses the IBC mode and the corresponding first block vector parameters meet the available conditions, and use the target candidate block as the first color component block of the current block.

[0630] In some embodiments, the second prediction unit 2002 is further configured to perform intra-frame prediction processing on the second color component of the current block according to the first preset mode to determine the predicted value of the second color component of the current block if there is no target candidate block using the IBC mode and the corresponding first block vector parameters meet the availability conditions in at least one candidate block; wherein the first preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode, CCLM mode and skip mode.

[0631] In some embodiments, the second prediction unit 2002 is further configured to determine the offset position of the current block based on the target block vector parameter and the position information of the current block; and perform block copy processing based on the offset position of the current block to obtain a first prediction block; and determine the predicted value of the second color component of the current block based on the first prediction block.

[0632] In some embodiments, the second prediction unit 2002 is further configured to perform a correction operation on the first prediction block to determine a predicted value of the second color component of the current block.

[0633] In some embodiments, the second prediction unit 2002 is further configured to perform intra-frame prediction processing on the second color component of the current block according to a second preset mode to obtain a second prediction block; and perform weighted fusion processing on the first prediction block and the second prediction block to determine the predicted value of the second color component of the current block; wherein the second preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode and CCLM mode.

[0634] In another embodiment of the present application, see Figure 21, which shows a schematic diagram of the composition structure of another decoder provided by the embodiment of the present application. As shown in Figure 21, the decoder 200 may include: a decoding unit 2101, a second determination unit 2102 and a second prediction unit 2103; wherein,

[0635] The second determining unit 2102 is configured to determine a value of the first syntax element identification information;

[0636] The decoding unit 2101 is configured to decode the bitstream and determine the value of the second syntax element identification information when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode;

[0637] The second prediction unit 2103 is configured to perform intra-frame prediction processing on the second color component of the current block according to the target prediction mode when the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, and determine the predicted value of the second color component of the current block.

[0638] In some embodiments, the second determining unit 2102 is further configured to determine a first color component block of the current block; and when the prediction mode of the first color component block is the IBC mode, determine a first block vector parameter of the first color component block, and determine a target block vector parameter of the second color component of the current block based on the first block vector parameter of the first color component block;

[0639] The second prediction unit 2103 is further configured to perform prediction processing on the second color component of the current block in the IBC extension mode according to the target block vector parameter, and determine a predicted value of the second color component of the current block.

[0640] In some embodiments, the decoding unit 2101 is further configured to decode the code stream and determine target block vector parameters of the current block;

[0641] The second prediction unit 2103 is further configured to perform prediction processing on the second color component of the current block in the IBC extension mode according to the target block vector parameter, and determine a predicted value of the second color component of the current block.

[0642] In some embodiments, the decoding unit 2101 is further configured to decode the code stream and determine the value of the third syntax element identification information;

[0643] The second determination unit 2102 is further configured to determine that the value of the first syntax element identification information is the first value if the value of the third syntax element identification information is the first value and the current block meets the preset condition; and to determine that the value of the first syntax element identification information is the second value if the value of the third syntax element identification information is the second value.

[0644] In some embodiments, the current block meets a preset condition, which at least includes: the slice type to which the current block belongs meets the I frame; and the size parameter of the current block meets a preset upper limit value.

[0645] In some embodiments, the second determination unit 2102 is further configured to, if the value of the third syntax element identification information is the first value, determine that the third syntax element identification information indicates that the current image allows the use of the IBC mode; if the value of the third syntax element identification information is the second value, determine that the third syntax element identification information indicates that the current image does not allow the use of the IBC mode; wherein the current image includes the current block.

[0646] In some embodiments, the second determination unit 2102 is further configured to, if the value of the first syntax element identification information is a first value, determine that the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode; if the value of the first syntax element identification information is a second value, determine that the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode.

[0647] In some embodiments, the second determination unit 2102 is further configured to, if the value of the second syntax element identification information is a first value, determine that the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode; if the value of the second syntax element identification information is a second value, determine that the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode.

[0648] In some embodiments, the decoding unit 2101 is further configured to, when the value of the second syntax element identification information is the second value, decode the bitstream and determine the value of the fourth syntax element identification information;

[0649] The second prediction unit 2103 is further configured to determine a first intra-frame prediction mode of the second color component of the current block according to the value of the fourth syntax element identification information; and perform intra-frame prediction processing on the second color component of the current block according to the first intra-frame prediction mode to determine a predicted value of the second color component of the current block.

[0650] In some embodiments, the second prediction unit 2103 is further configured to, when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decode the code stream and determine the value of the fifth syntax element identification information; and determine, based on the value of the fifth syntax element identification information, a second intra-frame prediction mode for the second color component of the current block, perform intra-frame prediction processing on the second color component of the current block according to the second intra-frame prediction mode, and determine a predicted value of the second color component of the current block; or, is further configured to, when the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, decode the code stream and determine the value of the sixth syntax element identification information; and determine, based on the value of the sixth syntax element identification information, determine a third intra-frame prediction mode for the second color component of the current block, perform intra-frame prediction processing on the second color component of the current block according to the third intra-frame prediction mode, and determine a predicted value of the second color component of the current block; wherein the second intra-frame prediction mode includes the target prediction mode, and the third intra-frame prediction mode does not include the target prediction mode.

[0651] In some embodiments, the decoding unit 2101 is further configured to decode the code stream to obtain at least one character corresponding to the fifth syntax element identification information; and use the first preset binary mapping table to map the at least one character corresponding to the fifth syntax element identification information to determine the value of the fifth syntax element identification information.

[0652] In some embodiments, the decoding unit 2101 is further configured to decode the code stream to obtain at least one character corresponding to the sixth syntax element identification information; and use a second preset binary mapping table to map the at least one character corresponding to the sixth syntax element identification information to determine the value of the sixth syntax element identification information.

[0653] In some embodiments, the second determination unit 2102 is further configured to, when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decode the code stream to obtain at least one character corresponding to the second syntax element identification information; and use a first preset binary mapping table to map the at least one character corresponding to the second syntax element identification information to determine the value of the second syntax element identification information; or, further configured to, when the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, decode the code stream to obtain at least one character corresponding to the second syntax element identification information; and use a second preset binary mapping table to map the at least one character corresponding to the second syntax element identification information to determine the value of the second syntax element identification information.

[0654] In some embodiments, the second prediction unit 2103 is further configured to, if the value of the second syntax element identification information satisfies the first preset constant value, determine that the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode, and after determining the fourth intra-frame prediction mode of the second color component of the current block, perform intra-frame prediction processing on the second color component of the current block according to the fourth intra-frame prediction mode to determine the predicted value of the second color component of the current block; or, if the value of the second syntax element identification information satisfies the second preset constant value, determine that the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, perform intra-frame prediction processing on the second color component of the current block according to the target prediction mode, and determine the predicted value of the second color component of the current block.

[0655] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.

[0656] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium, which is applied to the decoder 200 and stores a computer program. When the computer program is executed by the second processor, it implements any of the methods in the aforementioned embodiments.

[0657] Based on the composition of the decoder 200 and the computer-readable storage medium, refer to Figure 22, which shows a specific hardware structure diagram of the decoder 200 provided in an embodiment of the present application. As shown in Figure 22, the decoder 200 may include: a second communication interface 2201, a second memory 2202 and a second processor 2203; each component is coupled together through a second bus system 2204. It can be understood that the second bus system 2204 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 2204 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 2204 in Figure 22. Among them,

[0658] The second communication interface 2201 is used to receive and send signals during the process of sending and receiving information between other external network elements;

[0659] The second memory 2202 is used to store computer programs that can be run on the second processor 2203;

[0660] The second processor 2203 is configured to, when running the computer program, execute:

[0661] Determine a first color component block of a current block; when a prediction mode of the first color component block is an IBC mode, determine a first block vector parameter of the first color component block; determine a target block vector parameter of a second color component of the current block based on the first block vector parameter of the first color component block; perform prediction processing on the second color component of the current block in an IBC extended mode based on the target block vector parameter to determine a predicted value of the second color component of the current block.

[0662] Alternatively, the second processor 2203 is further configured to, when running the computer program, execute:

[0663] Determine the value of the first syntax element identification information; when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decode the code stream and determine the value of the second syntax element identification information; when the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, perform intra-frame prediction processing on the second color component of the current block according to the target prediction mode to determine the predicted value of the second color component of the current block.

[0664] Optionally, as another embodiment, the second processor 2203 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

[0665] It can be understood that the hardware functions of the second memory 2202 are similar to those of the first memory 1902, and the hardware functions of the second processor 2203 are similar to those of the first processor 1903; they will not be described in detail here.

[0666] This embodiment provides a decoder, in which, in the process of determining the chrominance prediction mode according to the luminance prediction mode, if the luminance block corresponding to the current block is the IBC mode, then the target block vector parameters of the applied chrominance component can be determined according to the block vector parameters of the luminance block, and the chrominance component is predicted according to the IBC extended mode according to the target block vector parameters to determine the chrominance prediction value of the current block; in this way, not only the singleness problem of the chrominance prediction is improved, the IBC mode is implicitly added to the chrominance prediction, and the relevant information of the same-position luminance block is fully utilized, which can improve the accuracy of the chrominance prediction, but also the bit rate can be saved, the encoding and decoding efficiency can be improved, and the encoding and decoding performance can be improved.

[0667] In yet another embodiment of the present application, referring to FIG23 , a schematic diagram of the structure of a coding and decoding system provided by an embodiment of the present application is shown. As shown in FIG23 , the coding and decoding system 230 may include an encoder 2301 and a decoder 2302 .

[0668] In the embodiment of the present application, the encoder 2301 may be the encoder described in any one of the aforementioned embodiments, and the decoder 2302 may be the decoder described in any one of the aforementioned embodiments.

[0669] It should be noted that, in this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0670] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0671] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0672] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0673] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0674] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims. Industrial Applicability

[0675] In an embodiment of the present application, at the encoding end, when the prediction mode of the second color component of the current block is the target prediction mode, the first color component block of the current block is determined; when the prediction mode of the first color component block is the IBC mode, the first block vector parameters of the first color component block are determined; based on the first block vector parameters of the first color component block, the target block vector parameters of the second color component of the current block are determined; based on the target block vector parameters, the second color component of the current block is predicted in the IBC extended mode to determine the predicted value of the second color component of the current block. At the decoding end, the value of the first syntax element identification information is determined; when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, the code stream is decoded to determine the value of the second syntax element identification information; when the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, the first color component block of the current block is determined; when the prediction mode of the first color component block is the IBC mode, the first block vector parameters of the first color component block are determined; based on the first block vector parameters of the first color component block, the target block vector parameters of the second color component of the current block are determined; based on the target block vector parameters, the second color component of the current block is predicted in the IBC extension mode to determine the predicted value of the second color component of the current block. In this way, in the process of determining the chrominance prediction mode according to the luminance prediction mode, if the luminance block corresponding to the current block is the IBC mode, then the target block vector parameters of the applied chrominance component can be determined according to the block vector parameters of the luminance block, and the chrominance component is predicted according to the IBC extended mode according to the target block vector parameters to determine the chrominance prediction value of the current block; in this way, not only the singleness problem of the chrominance prediction is improved, the IBC mode is implicitly added to the chrominance prediction, and the relevant information of the same-position luminance block is fully utilized, which can improve the accuracy of the chrominance prediction, but also save bit rate, improve encoding and decoding efficiency, and thus improve encoding and decoding performance.

Claims

1. A method for determining a prediction mode, comprising: Determine a first color component block of the current block; When the prediction mode of the first color component block is the IBC mode, determining a first block vector parameter of the first color component block; determining a target block vector parameter of a second color component of the current block according to a first block vector parameter of the first color component block; Perform prediction processing on the second color component of the current block in an IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block.

2. The method according to claim 1, wherein The determining of the first color component block of the current block includes: Determining a first color component region at a same position as the current block; A first color component block of the current block is determined from a plurality of blocks divided into the first color component area.

3. The method according to claim 2, wherein: The step of determining the first color component block of the current block from the plurality of blocks divided from the first color component area includes: A target block is selected from a plurality of blocks divided into the first color component area, and the target block is used as the first color component block of the current block.

4. The method according to claim 3, wherein: The method further comprises: Selecting a block at a center position in the first color component area as the target block; or, Selecting a block at the upper left corner in the first color component area as the target block; or, The block at the lower right corner in the first color component area is selected as the target block.

5. The method according to claim 2, wherein: The step of determining the first color component block of the current block from the plurality of blocks divided from the first color component area includes: Determining at least one candidate block at a preset position from a plurality of blocks divided into the first color component area; The at least one candidate block is sequentially acquired according to a preset order and a mode determination is performed. If the first candidate block determined to use the IBC mode is used, the first candidate block is used as the first color component block of the current block.

6. The method according to claim 2, wherein: The step of determining the first color component block of the current block from the plurality of blocks divided from the first color component area includes: Determine at least one candidate block at a preset position from a plurality of blocks divided into the first color component area, and determine the at least one candidate block as the first color component block of the current block; Accordingly, when the prediction mode of the first color component block is the IBC mode, determining the first block vector parameter of the first color component block includes: Determine at least one target block using the IBC mode from the at least one candidate block, and determine a first block vector parameter for each of the at least one target block; A mean value calculation is performed according to the first block vector parameter of each of the at least one target block, and the calculation result is used as the first block vector parameter of the first color component block.

7. The method according to claim 6, wherein: The determining, when the prediction mode of the first color component block is the IBC mode, a first block vector parameter of the first color component block further includes: Determining at least one target block using the IBC mode from the at least one candidate block; The at least one target block is searched according to a template matching method to determine an optimal block vector parameter, and the optimal block vector parameter is used as a first block vector parameter of the first color component block.

8. The method according to claim 1, wherein The determining, according to the first block vector parameter of the first color component block, the target block vector parameter of the current block includes: A first block vector parameter of the first color component block is adjusted to determine a target block vector parameter of the current block.

9. The method according to claim 8, wherein The adjusting the first block vector parameter of the first color component block to determine the target block vector parameter of the current block includes: Determining a color sampling format of the current block; Scaling processing is performed on the first block vector parameter of the first color component block according to the color sampling format to determine the target block vector parameter of the current block.

10. The method according to claim 9, wherein: The adjusting the first block vector parameter of the first color component block to determine the target block vector parameter of the current block further includes: After scaling the first block vector parameter of the first color component block according to the color sampling format, obtaining the initial block vector parameter of the current block; Correction processing is performed on the initial block vector parameters of the current block to determine the target block vector parameters of the current block.

11. The method according to claim 10, wherein: The method further comprises: The target block vector parameters of the current block are directly determined according to the initial block vector parameters of the current block.

12. The method according to claim 1, wherein The method further comprises: After determining the target block vector parameters of the current block, determining whether the target block vector parameters meet an availability condition; When the target block vector parameter meets the availability condition, a step of performing IBC extension mode prediction processing on the second color component of the current block according to the target block vector parameter to determine a predicted value of the second color component of the current block is performed.

13. The method according to claim 12, wherein: The target block vector parameters meet the availability conditions, including at least: The offset position indicated by the target block vector parameter does not exceed the image boundary; The offset position indicated by the target block vector parameter does not cover the current block; The offset position indicated by the target block vector parameter does not exceed the available area of ​​the IBC mode; The offset position indicated by the target block vector parameter has been reconstructed.

14. The method according to claim 5, wherein The method further comprises: When the first candidate block is determined to use the IBC mode, determining a first block vector parameter of the first candidate block; Determining whether a first block vector parameter of the first candidate block meets an availability condition; If the first block vector parameter of the first candidate block meets the availability condition, using the first candidate block as the first color component block of the current block; If the first block vector parameter of the first candidate block does not meet the availability condition, the mode judgment of the next candidate block is continued until a target candidate block using the IBC mode and whose corresponding first block vector parameter meets the availability condition is determined, and the target candidate block is used as the first color component block of the current block.

15. The method according to claim 14, wherein The method further comprises: If there is no target candidate block using the IBC mode and whose corresponding first block vector parameter meets the availability condition among the at least one candidate block, performing intra-frame prediction processing on the second color component of the current block according to the first preset mode to determine a predicted value of the second color component of the current block; The first preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode, CCLM mode and skip mode.

16. The method according to claim 1, wherein The performing prediction processing on the second color component of the current block in the IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block includes: determining an offset position of the current block according to the target block vector parameter and the position information of the current block; Performing block copying processing according to the offset position of the current block to obtain a first prediction block; A predicted value of a second color component of the current block is determined according to the first prediction block.

17. The method according to claim 16, wherein The determining, according to the first prediction block, a predicted value of the second color component of the current block, includes: A correction operation is performed on the first prediction block to determine a predicted value of the second color component of the current block.

18. The method according to claim 16, wherein The determining, according to the first prediction block, a predicted value of the second color component of the current block, includes: Performing intra-frame prediction processing on the second color component of the current block according to a second preset mode to obtain a second predicted block; Performing weighted fusion processing on the first prediction block and the second prediction block to determine a prediction value of the second color component of the current block; The second preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode and CCLM mode.

19. A decoding method comprising: Determining a value of first syntax element identification information; When the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, decoding the code stream and determining a value of the second syntax element identification information; When the second syntax element identification information indicates that the second color component of the current block uses a target prediction mode, intra-frame prediction processing is performed on the second color component of the current block according to the target prediction mode to determine a predicted value of the second color component of the current block.

20. The method according to claim 19, wherein The target prediction mode is a prediction mode determined according to the method according to any one of claims 1 to 18.

21. The method according to claim 19, wherein The performing intra-frame prediction processing on the second color component of the current block according to the target prediction mode to determine the second color component block of the current block includes: Determining a first color component block of the current block; When the prediction mode of the first color component block is the IBC mode, determining a first block vector parameter of the first color component block, and determining a target block vector parameter of the second color component of the current block based on the first block vector parameter of the first color component block; Perform prediction processing on the second color component of the current block in an IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block.

22. The method according to claim 19, wherein The performing intra-frame prediction processing on the second color component of the current block according to the target prediction mode to determine the second color component block of the current block includes: Decoding a code stream to determine target block vector parameters of the current block; Perform prediction processing on the second color component of the current block in an IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block.

23. The method according to claim 19, wherein The determining a value of the first syntax element identification information includes: Decoding the code stream and determining a value of the third syntax element identification information; If the value of the third syntax element identification information is the first value and the current block meets a preset condition, determining that the value of the first syntax element identification information is the first value; If the value of the third syntax element identification information is the second value, it is determined that the value of the first syntax element identification information is the second value.

24. The method according to claim 23, wherein The current block meets the preset conditions, including at least: The slice type to which the current block belongs satisfies an I frame; The size parameter of the current block meets a preset upper limit value.

25. The method according to claim 23, wherein The method further comprises: If the value of the third syntax element identification information is the first value, determining that the third syntax element identification information indicates that the current image allows the use of the IBC mode; If the value of the third syntax element identification information is the second value, determining that the third syntax element identification information indicates that the current image does not allow the use of the IBC mode; The current image includes the current block.

26. The method according to claim 19, wherein The method further comprises: If the value of the first syntax element identification information is the first value, determining that the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode; If the value of the first syntax element identification information is the second value, it is determined that the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode.

27. The method according to claim 19, wherein The method further comprises: If the value of the second syntax element identification information is the first value, determining that the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode; If the value of the second syntax element identification information is the second value, it is determined that the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode.

28. The method according to claim 27, wherein The method further comprises: When the value of the second syntax element identification information is the second value, decoding the code stream to determine the value of the fourth syntax element identification information; Determining, according to a value of the fourth syntax element identification information, a first intra-frame prediction mode for a second color component of the current block; Performing intra-frame prediction processing on the second color component of the current block according to the first intra-frame prediction mode to determine a predicted value of the second color component of the current block.

29. The method according to claim 19, wherein The method further comprises: When the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extended mode, decoding the bitstream and determining a value of the fifth syntax element identification information; and determining a second intra-frame prediction mode for the second color component of the current block based on the value of the fifth syntax element identification information, performing intra-frame prediction processing on the second color component of the current block based on the second intra-frame prediction mode to determine a predicted value for the second color component of the current block; When the first syntax element identification information indicates that the second color component of the current block does not allow use of the IBC extended mode, decoding the bitstream and determining a value of a sixth syntax element identification information; and determining a third intra-frame prediction mode for the second color component of the current block based on the value of the sixth syntax element identification information, performing intra-frame prediction processing on the second color component of the current block based on the third intra-frame prediction mode to determine a predicted value for the second color component of the current block; The second intra-frame prediction mode includes the target prediction mode, and the third intra-frame prediction mode does not include the target prediction mode.

30. The method according to claim 29, wherein The decoding code stream, and determining the value of the fifth syntax element identification information, includes: Decoding the code stream to obtain at least one character corresponding to the fifth syntax element identification information; Performing mapping processing on at least one character corresponding to the fifth grammatical element identification information using a first preset binary mapping table to determine a value of the fifth grammatical element identification information; The decoding code stream determines the value of the sixth syntax element identification information, including: Decoding the code stream to obtain at least one character corresponding to the sixth syntax element identification information; A second preset binary mapping table is used to perform mapping processing on at least one character corresponding to the sixth grammatical element identification information to determine a value of the sixth grammatical element identification information.

31. The method according to claim 19, wherein The decoding code stream, and determining the value of the second syntax element identification information, includes: When the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extended mode, decoding the bitstream to obtain at least one character corresponding to the second syntax element identification information; and mapping the at least one character corresponding to the second syntax element identification information using a first preset binary mapping table to determine a value of the second syntax element identification information. When the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, decoding the code stream to obtain at least one character corresponding to the second syntax element identification information; and using a second preset binary mapping table to map the at least one character corresponding to the second syntax element identification information to determine the value of the second syntax element identification information.

32. The method of claim 19, wherein: The decoding code stream, and determining the value of the second syntax element identification information, includes: If the value of the second syntax element identification information satisfies a first preset constant value, determining that the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode, and after determining a fourth intra-frame prediction mode for the second color component of the current block, performing intra-frame prediction processing on the second color component of the current block according to the fourth intra-frame prediction mode to determine a predicted value of the second color component of the current block; If the value of the second syntax element identification information satisfies a second preset constant value, it is determined that the second syntax element identification information indicates that the second color component of the current block uses a target prediction mode, and intra-frame prediction processing is performed on the second color component of the current block according to the target prediction mode to determine a predicted value of the second color component of the current block.

33. A coding method comprising: When the prediction mode of the second color component of the current block is the target prediction mode, determining the first color component block of the current block; When the prediction mode of the first color component block is the IBC mode, determining a first block vector parameter of the first color component block; determining a target block vector parameter of a second color component of the current block according to a first block vector parameter of the first color component block; Perform prediction processing on the second color component of the current block in an IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block.

34. The method according to claim 33, wherein The target prediction mode is a prediction mode determined according to the method according to any one of claims 1 to 18.

35. The method of claim 33, wherein: The determining of the first color component block of the current block includes: Determining a first color component region at a same position as the current block; A first color component block of the current block is determined from a plurality of blocks divided into the first color component area.

36. The method according to claim 35, wherein The step of determining the first color component block of the current block from the plurality of blocks divided from the first color component area includes: A target block is selected from a plurality of blocks divided into the first color component area, and the target block is used as the first color component block of the current block.

37. The method according to claim 36, wherein The method further comprises: Selecting a block at a center position in the first color component area as the target block; or, Selecting a block at the upper left corner in the first color component area as the target block; or, The block at the lower right corner in the first color component area is selected as the target block.

38. The method of claim 35, wherein: The step of determining the first color component block of the current block from the plurality of blocks divided from the first color component area includes: Determining at least one candidate block at a preset position from a plurality of blocks divided into the first color component area; The at least one candidate block is sequentially acquired according to a preset order and a mode determination is performed. If the first candidate block determined to use the IBC mode is used, the first candidate block is used as the first color component block of the current block.

39. The method of claim 35, wherein: The step of determining the first color component block of the current block from the plurality of blocks divided from the first color component area includes: Determine at least one candidate block at a preset position from a plurality of blocks divided into the first color component area, and determine the at least one candidate block as the first color component block of the current block; Accordingly, when the prediction mode of the first color component block is the IBC mode, determining the first block vector parameter of the first color component block includes: Determine at least one target block using the IBC mode from the at least one candidate block, and determine a first block vector parameter for each of the at least one target block; A mean calculation is performed on the first block vector parameter of each of the at least one target block, and the calculation result is used as the first block vector parameter of the first color component block.

40. The method of claim 39, wherein The method further comprises: Determining at least one target block using the IBC mode from the at least one candidate block; The at least one target block is searched according to a template matching method to determine an optimal block vector parameter, and the optimal block vector parameter is used as a first block vector parameter of the first color component block.

41. The method of claim 33, wherein: The determining, according to the first block vector parameter of the first color component block, the target block vector parameter of the current block includes: A first block vector parameter of the first color component block is adjusted to determine a target block vector parameter of the current block.

42. The method according to claim 41, wherein The adjusting the first block vector parameter of the first color component block to determine the target block vector parameter of the current block includes: Determining a color sampling format of the current block; Scaling processing is performed on the first block vector parameter of the first color component block according to the color sampling format to determine the target block vector parameter of the current block.

43. The method according to claim 42, wherein The adjusting the first block vector parameter of the first color component block to determine the target block vector parameter of the current block further includes: After scaling the first block vector parameter of the first color component block according to the color sampling format, obtaining the initial block vector parameter of the current block; Correction processing is performed on the initial block vector parameters of the current block to determine the target block vector parameters of the current block.

44. The method according to claim 43, wherein The method further comprises: The target block vector parameters of the current block are directly determined according to the initial block vector parameters of the current block.

45. The method of claim 43, wherein The correcting the initial block vector parameters of the current block to determine the target block vector parameters of the current block includes: determining a search area of ​​the current block according to an initial block vector parameter of the current block and position information of the current block; A search is performed within the search area in a template matching manner to determine an optimal block vector parameter, and the optimal block vector is used as a target block vector parameter of the current block.

46. ​​The method of claim 33, wherein The method further comprises: After determining the target block vector parameters of the current block, determining whether the target block vector parameters meet an availability condition; When the target block vector parameter meets the availability condition, a step of performing IBC extension mode prediction processing on the second color component of the current block according to the target block vector parameter to determine a predicted value of the second color component of the current block is performed.

47. The method of claim 46, wherein The target block vector parameters meet the availability conditions, including at least: The offset position indicated by the target block vector parameter does not exceed the image boundary; The offset position indicated by the target block vector parameter does not cover the current block; The offset position indicated by the target block vector parameter does not exceed the available area of ​​the IBC mode; The offset position indicated by the target block vector parameter has been reconstructed.

48. The method of claim 38, wherein The method further comprises: When the first candidate block is determined to use the IBC mode, determining a first block vector parameter of the first candidate block; Determining whether a first block vector parameter of the first candidate block meets an availability condition; If the first block vector parameter of the first candidate block meets the availability condition, using the first candidate block as the first color component block of the current block; If the first block vector parameter of the first candidate block does not meet the availability condition, the mode judgment of the next candidate block is continued until a target candidate block using the IBC mode and whose corresponding first block vector parameter meets the availability condition is determined, and the target candidate block is used as the first color component block of the current block.

49. The method according to claim 48, wherein The method further comprises: If there is no target candidate block using the IBC mode and whose corresponding first block vector parameter meets the availability condition among the at least one candidate block, performing intra-frame prediction processing on the second color component of the current block according to the first preset mode to determine a predicted value of the second color component of the current block; The first preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode, CCLM mode and skip mode.

50. The method of claim 33, wherein The performing prediction processing on the second color component of the current block in the IBC extension mode according to the target block vector parameter to determine a predicted value of the second color component of the current block includes: determining an offset position of the current block according to the target block vector parameter and the position information of the current block; Performing block copying processing according to the offset position of the current block to obtain a first prediction block; A predicted value of a second color component of the current block is determined according to the first prediction block.

51. The method of claim 50, wherein: The determining, according to the first prediction block, a predicted value of the second color component of the current block, includes: A correction operation is performed on the first prediction block to determine a predicted value of the second color component of the current block.

52. The method of claim 50, wherein: The determining, according to the first prediction block, a predicted value of the second color component of the current block, includes: Performing intra-frame prediction processing on the second color component of the current block according to a second preset mode to obtain a second predicted block; Performing weighted fusion processing on the first prediction block and the second prediction block to determine a prediction value of the second color component of the current block; The second preset mode includes at least one of the following: PLANAR mode, DM mode, DC mode and CCLM mode.

53. The method of claim 33, wherein: The method further comprises: Determining a value of first syntax element identification information; The value of the first syntax element identification information is encoded, and the obtained encoded bits are written into a bitstream.

54. The method of claim 53, wherein: The determining a value of the first syntax element identification information includes: If the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, determining that the value of the first syntax element identification information is a first value; If the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, it is determined that the value of the first syntax element identification information is a second value.

55. The method of claim 53, wherein The method further comprises: When the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode, determining a value of the second syntax element identification information; The value of the second syntax element identification information is encoded, and the obtained encoded bits are written into a bitstream.

56. The method of claim 55, wherein: The determining a value of the second syntax element identification information includes: If the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, determining that the value of the second syntax element identification information is a first value; If the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode, it is determined that the value of the second syntax element identification information is a second value.

57. The method of claim 53, wherein: The method further comprises: Determining a value of third syntax element identification information; The value of the third syntax element identification information is encoded, and the obtained encoded bits are written into a bitstream.

58. The method of claim 57, wherein The determining of the value of the first syntax element identification information further includes: If the value of the third syntax element identification information is the first value and the current block meets a preset condition, determining that the value of the first syntax element identification information is the first value; If the value of the third syntax element identification information is the second value, it is determined that the value of the first syntax element identification information is the second value.

59. The method of claim 58, wherein The current block meets the preset conditions, including at least: The slice type to which the current block belongs satisfies an I frame; The size parameter of the current block meets a preset upper limit value.

60. The method of claim 57, wherein The determining a value of the third syntax element identification information includes: If the third syntax element identification information indicates that the current image allows the use of the IBC mode, determining that the value of the third syntax element identification information is the first value; If the third syntax element identification information indicates that the current image does not allow the use of the IBC mode, it is determined that the value of the third syntax element identification information is the second value.

61. The method of claim 55, wherein: The method further comprises: When the second syntax element identification information indicates that the second color component of the current block does not use the target prediction mode, determining a first intra prediction mode for the second color component of the current block; Performing intra-frame prediction processing on the second color component of the current block according to the first intra-frame prediction mode to determine a predicted value of the second color component of the current block.

62. The method of claim 61, wherein The method further comprises: determining, according to the first intra-frame prediction mode of the second color component of the current block, a value of fourth syntax element identification information; The value of the fourth syntax element identification information is encoded, and the obtained encoded bits are written into a bitstream.

63. The method of claim 53, wherein: The method further comprises: When the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extended mode, determining a second intra prediction mode for the second color component of the current block, performing intra prediction processing on the second color component of the current block according to the second intra prediction mode, and determining a predicted value of the second color component of the current block; When the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, determining a third intra prediction mode for the second color component of the current block, performing intra prediction processing on the second color component of the current block according to the third intra prediction mode, and determining a predicted value of the second color component of the current block; The second intra-frame prediction mode includes the target prediction mode, and the third intra-frame prediction mode does not include the target prediction mode.

64. The method of claim 63, wherein The method further comprises: determining, according to a second intra prediction mode of a second color component of the current block, a value of fifth syntax element identification information; Binarizing the value of the fifth syntax element identification information using a first preset binary mapping table to determine at least one character corresponding to the fifth syntax element identification information; Encode at least one character corresponding to the fifth syntax element identification information, and write the obtained encoded bits into a bitstream.

65. The method of claim 63, wherein The method further comprises: determining, according to a third intra-frame prediction mode of the second color component of the current block, a value of sixth syntax element identification information; Binarizing the value of the sixth grammatical element identification information using a second preset binary mapping table to determine at least one character corresponding to the sixth grammatical element identification information; Encode at least one character corresponding to the sixth syntax element identification information, and write the obtained encoded bits into a bitstream.

66. The method of claim 53, wherein The method further comprises: When the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extended mode, binarizing the value of the second syntax element identification information using a first preset binary mapping table to determine at least one character corresponding to the second syntax element identification information; and encoding the at least one character corresponding to the second syntax element identification information, and writing the obtained coded bits into a bitstream; or When the first syntax element identification information indicates that the second color component of the current block does not allow the use of the IBC extension mode, binarize the value of the second syntax element identification information using a second preset binary mapping table to determine at least one character corresponding to the second syntax element identification information; and encode the at least one character corresponding to the second syntax element identification information, and write the obtained encoded bits into a bitstream.

67. A code stream, wherein The code stream is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following: The target block vector parameter of the current block, the value of the first syntax element identification information, the value of the second syntax element identification information, the value of the third syntax element identification information, the value of the fourth syntax element identification information, the value of the fifth syntax element identification information, and the value of the sixth syntax element identification information.

68. An encoder comprising a first determining unit and a first predicting unit; wherein, The first determining unit is configured to, when a prediction mode of a second color component of the current block is a target prediction mode, determine a first color component block of the current block; and when a prediction mode of the first color component block is an IBC mode, determine a first block vector parameter of the first color component block; and determine a target block vector parameter of the second color component of the current block based on the first block vector parameter of the first color component block; The first prediction unit is configured to perform prediction processing on the second color component of the current block in an IBC extension mode according to the target block vector parameter, and determine a predicted value of the second color component of the current block.

69. An encoder comprising a first memory and a first processor; wherein, The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 33 to 66 when running the computer program.

70. A decoder comprising a second determination unit and a second prediction unit; wherein The second determining unit is configured to determine a first color component block of the current block; and when the prediction mode of the first color component block is the IBC mode, determine a first block vector parameter of the first color component block; and determine a target block vector parameter of the second color component of the current block based on the first block vector parameter of the first color component block; The second prediction unit is configured to perform prediction processing on the second color component of the current block in an IBC extension mode according to the target block vector parameter, and determine a predicted value of the second color component of the current block.

71. A decoder comprising a decoding unit, a second determining unit, and a second predicting unit; wherein: The second determining unit is configured to determine a value of the first syntax element identification information; The decoding unit is configured to decode the code stream and determine the value of the second syntax element identification information when the first syntax element identification information indicates that the second color component of the current block allows the use of the IBC extension mode; The second prediction unit is configured to perform intra-frame prediction processing on the second color component of the current block according to the target prediction mode when the second syntax element identification information indicates that the second color component of the current block uses the target prediction mode, and determine the predicted value of the second color component of the current block.

72. A decoder comprising a second memory and a second processor; wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 1 to 18, or the method according to any one of claims 19 to 32, when running the computer program.

73. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, which, when executed, implements the method according to any one of claims 1 to 18, or the method according to any one of claims 19 to 32, or the method according to any one of claims 33 to 66.