WO2024077569A1 - 编解码方法、码流、编码器、解码器以及存储介质 - Google Patents

编解码方法、码流、编码器、解码器以及存储介质 Download PDF

Info

Publication number
WO2024077569A1
WO2024077569A1 PCT/CN2022/125208 CN2022125208W WO2024077569A1 WO 2024077569 A1 WO2024077569 A1 WO 2024077569A1 CN 2022125208 W CN2022125208 W CN 2022125208W WO 2024077569 A1 WO2024077569 A1 WO 2024077569A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
color component
current block
mode
value
Prior art date
Application number
PCT/CN2022/125208
Other languages
English (en)
French (fr)
Inventor
霍俊彦
马彦卓
杨付正
郝雪
李明
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/125208 priority Critical patent/WO2024077569A1/zh
Publication of WO2024077569A1 publication Critical patent/WO2024077569A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Definitions

  • 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.
  • VVC Video Coding
  • IBC intra-block copy
  • the chrominance prediction mode setting at this time is unreasonable, resulting in inaccurate chrominance prediction of the current block and loss of coding efficiency.
  • 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 improve coding and decoding performance.
  • an embodiment of the present application provides a method for determining a prediction mode, comprising:
  • 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;
  • 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.
  • an embodiment of the present application provides a decoding method, including:
  • 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 the second syntax element identification information;
  • 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.
  • an embodiment of the present application provides an encoding method, including:
  • 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;
  • 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.
  • an embodiment of the present application provides a code stream, which is generated by bit encoding according to 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.
  • an encoder comprising a first determination unit and a first prediction unit; wherein:
  • a first determining unit is configured to determine a first color component block of the current block when the prediction mode of the second color component of the current block is a target prediction mode; and to determine a first block vector parameter of the first color component block when the prediction mode of the first color component block is an IBC mode; and to determine a target block vector parameter of the second color component of the current block according to 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 the IBC extension mode according to the target block vector parameter to determine a prediction value of the second color component of the current block.
  • an encoder comprising a first memory and a first processor; wherein:
  • a first memory for storing a computer program that can be run on the first processor
  • the first processor is used to execute the method described in the third aspect when running a computer program.
  • an embodiment of the present application provides a decoder, comprising a second determination unit and a second prediction unit; wherein:
  • a second determination 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 a second color component of the current block according to 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 the IBC extension mode according to the target block vector parameter to determine a prediction value of the second color component of the current block.
  • an embodiment of the present application provides a decoder, comprising a decoding unit, a second determining unit, and a second predicting unit; wherein:
  • a second determining unit is configured to determine a value of the first syntax element identification information
  • a decoding unit configured to decode the bitstream and 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;
  • 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 to determine the prediction value of 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 uses the target prediction mode.
  • an embodiment of the present application provides a decoder, including a second memory and a second processor; wherein:
  • a second memory for storing a computer program that can be run on a second processor
  • the second processor is used to execute the method described in the first aspect or the second aspect when running a computer program.
  • an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed, it implements the method as described in the first aspect, or implements the method as described in the second aspect, or implements the method as described in the third aspect.
  • the embodiments of the present application provide a coding and decoding method, a bit stream, an encoder, a decoder and a storage medium.
  • 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;
  • 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; according to 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; according to the target block vector parameters, the second color component of the current block is predicted in an IBC extended mode to determine the predicted value of the second color component of the current block.
  • the decoding end 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, determine the first color component block of the current block; when the prediction mode of the first color component block is the IBC mode, determine the first block vector parameters of the first color component block; 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; perform IBC extension mode prediction processing on the second color component of the current block based on the target block vector parameters to determine the prediction value of the second color component of the current block.
  • the target block vector parameters of the 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.
  • FIG1 is a schematic diagram of a process for obtaining a reconstruction sample based on the IBC mode
  • FIG2 is a schematic diagram of the position distribution of adjacent blocks provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of the positional relationship between a luminance CU and a chrominance CU provided in an embodiment of the present application;
  • FIG4A is a schematic block diagram of a composition of an encoder provided in an embodiment of the present application.
  • FIG4B is a schematic block diagram of a decoder provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a network architecture of a coding and decoding system provided in an embodiment of the present application.
  • FIG5 is a flowchart diagram 1 of a decoding method provided in an embodiment of the present application.
  • FIG6 is a flow chart of a method for determining a prediction mode provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of another positional relationship between a luminance CU and a chrominance CU provided in an embodiment of the present application;
  • FIG8 is a schematic diagram of the position relationship between another luminance CU and chrominance CU provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of the position relationship between another luminance CU and chrominance CU provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of a structure of whether an offset position does not cover a current block provided by an embodiment of the present application.
  • FIG11 is a schematic diagram of a structure of whether an offset position exceeds an IBC available area provided in an embodiment of the present application
  • FIG12 is a schematic diagram of a structure for determining an optimal chromaticity BV parameter provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of a structure for performing block replication based on an IBC extension mode provided in an embodiment of the present application.
  • FIG14 is a detailed flowchart of a method for determining a prediction mode provided in an embodiment of the present application.
  • FIG15 is a detailed flowchart of another method for determining a prediction mode provided in an embodiment of the present application.
  • FIG16 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application.
  • FIG17 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application.
  • FIG18 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application.
  • FIG19 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application.
  • FIG20 is a schematic diagram of the composition structure of a decoder provided in an embodiment of the present application.
  • FIG21 is a schematic diagram of the composition structure of another decoder provided in an embodiment of the present application.
  • FIG22 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application.
  • FIG. 23 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application.
  • IBC Intra block copy
  • SCC Screen Content Coding
  • CU Coding Unit
  • DBV Direct Block Vector
  • AMVP Advanced Motion Vector Prediction
  • CCLM Cross-Component Linear Model prediction
  • PLANAR Mode Planar Mode
  • VVC Versatile Video Coding
  • VVC reference software test platform
  • VTM VVC Test Model
  • a first color component, a second color component, and a third color component are generally used to represent a coding block.
  • the three color components are a brightness component, a blue chroma component, and a red chroma component.
  • the brightness component is usually represented by the symbol Y
  • the blue chroma component is usually represented by the symbol Cb or U
  • the red chroma component is usually represented by the symbol Cr or V; in this way, the video image can be represented in the YCbCr format or the YUV format.
  • IBC is an extended tool of VVC for video sequence encoding of screen content types, which significantly improves the encoding efficiency of screen content sequences.
  • IBC is a block-level encoding mode. Similar to inter-frame technology, the encoding end performs motion search, specifically 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 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.
  • the specific process of obtaining the reconstructed pixels of the current block in the 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.
  • the process of obtaining a reconstruction sample in the IBC mode may include:
  • S101 derive a block vector.
  • the input includes: 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.
  • the output includes: the luma block vector (Block Vector Luma, bvL). It should be noted that the current block containing luma samples can also be called a "luma block”.
  • the IBC mode is divided into IBC MERGE mode and IBC AMVP mode.
  • IBC MERGE mode When deriving bvL, it is necessary to establish an IBC block vector candidate list bvCandList.
  • the following will introduce the establishment process of the IBC MERGE list in detail. Among them, the establishment process of the IBC AMVP list is consistent with that of the IBC MERGE list, but the maximum number of candidates for the two is inconsistent.
  • Step 1 When IsGt4by4 is equal to TRUE (the variable IsGt4by4 is TRUE when the width multiplied by the height of the luminance block is greater than 16), the derivation process of the spatial block vector candidate from the adjacent coding unit specified in the decoding specification is called using the luminance block position (xCb, yCb), the width cbWidth and the height cbHeight of the luminance block as input, and the output is the availability flag availableFlagA 1 , availableFlagB 1 and the block vector bvA 1 and bvB 1. Among them, the relative positions of the adjacent blocks where A 1 and B 1 are located and the current block are shown in Figure 2.
  • Step 2 When IsGt4by4 is equal to TRUE, the pseudo code for constructing the block vector candidate list bvCandList is as follows:
  • Step 3 The variable numCurrCand (the number of candidates currently obtained) is derived as follows:
  • numCurrCand is set equal to the number of candidates in bvCandList; otherwise numCurrCand is set to 0.
  • 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, and call the derivation process of the history-based IBC block vector candidates specified in the decoding specification.
  • MaxNumIbcMergeCand the maximum number of candidates in MERGE mode
  • NumHmvpIbcCand the maximum number of candidates for the historical optimal block vector Hmvp in IBC mode
  • Step 5 When numCurrCand is less than MaxNumIbcMergeCand, the following applies until numCurrCand equals MaxNumIbcMergeCand:
  • bvCandList[numCurrCand][0] is set equal to 0 (the horizontal component of BV);
  • bvCandList[numCurrCand][1] is set equal to 0 (the vertical component of BV);
  • 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:
  • bvIdx general_merge_flag[xCb][yCb]? merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb]
  • the specific bvL can be obtained according to the index bvIdx and the block vector candidate list bvCandList:
  • bvL[1] bvCandList[bvIdx][1].
  • the specific bvL can be obtained by indexing bvIdx and the block vector candidate list bvCandList as the predicted bvL, and the real bvL also needs to add the block vector difference (Block Vector Difference, BVD).
  • Block Vector Difference Block Vector Difference
  • Step 1 Get the horizontal and vertical components of BVD.
  • MvdL0 is the forward motion vector difference
  • the horizontal component of BVD is represented by bvd[0]
  • the vertical component of BVD is represented by bvd[1], as follows:
  • Step 2 Perform rounding operation on the above-obtained prediction bvL.
  • the right shift parameter AmvrShift is used for rounding
  • the left shift parameter AmvrShift is used to improve the resolution.
  • bvL[1] Sign(bvL[1])*(((Abs(bvL[1])+offset)>>AmvrShift) ⁇ AmvrShift).
  • Step 3 For the real bvL, its range needs to be controlled between -2 17 and 2 17 –1.
  • the specific derivation process is as follows:
  • u[1] (bvL[1]+bvd[1]+2 18 )%2 18 ;
  • the chroma component For the chroma component, if it is dual-tree partitioning, the chroma component does not use the IBC mode; if it is single-tree partitioning, the BV of the chroma component needs to be derived.
  • the input includes: brightness bvL (1/16 pixel accuracy).
  • the output includes: chrominance block vector (Block Vector Chroma, bvC) (1/32 pixel accuracy).
  • chrominance block vector Block Vector Chroma, bvC
  • bvC[1] ((bvL[1]>>(3+SubHeightC))*32).
  • S102 Use the block vector to derive a prediction sample.
  • the input includes: 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; a block vector BV; a variable cIdx, which specifies the color component index of the current block.
  • the output includes: an array of predicted samples predSamples.
  • xVb (x+(bv[0]>>4))&(IbcBufWidthY-1);
  • IbcBufWidthY is the width of the brightness pixels of the reconstructed buffer unit (Buffer) stored in IBC
  • CtbSizeY is the size of CTU (Coding Tree Unit)
  • ibcVirBuf is the reconstructed pixels stored in IBC.
  • xVb (x+(bv[0]>>5))&(IbcBufWidthC-1);
  • yVb (y+(bv[1]>>5))&((CtbSizeY/subHeightC)-1);
  • 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.
  • the residual decoding process specified by the decoding specification may be called.
  • an image reconstruction process of a specified color component specified by a decoding specification may be called.
  • the input includes: the luminance position (xCb, yCb), which specifies the upper left corner sample of the current block relative to the upper left corner luminance sample of the current image; a variable cbWidth, which specifies the width of the current block in luminance samples; a variable cbHeight, which specifies the height of the current block in luminance samples; a variable treeType, which specifies whether to use single tree partitioning or double tree partitioning.
  • the output includes: the chroma intra-frame prediction mode IntraPredModeC[xCb][yCb] and the MIP chroma direct mode flag MipChromaDirectFlag[xCb][yCb].
  • the MIP chroma direct mode flag MipChromaDirectFlag[xCb][yCb] is set to 1, that is, the chroma uses the luminance MIP mode.
  • IntraPredModeC[xCb][yCb] is set equal to IntraPredModeY[xCb][yCb].
  • IntraMipFlag[xCb+cbWidth/2][yCb+cbHeight/2] is equal to 1
  • lumaIntraPredMode is set equal to INTRA_PLANAR.
  • lumaIntraPredMode is set equal to INTRA_DC.
  • lumaIntraPredMode is set equal to IntraPredModeY[xCb+cbWidth/2][yCb+cbHeight/2].
  • IntraPredModeC[xCb][yCb] is derived as follows:
  • the chroma intra prediction mode X in Table 2 can be used to derive the chroma intra prediction mode Y.
  • the mapping process specification of mode X to mode Y shown in Table 3 refer to the mapping process specification of mode X to mode Y shown in Table 3, and then the chroma intra prediction mode X is set equal to the chroma intra prediction mode Y.
  • the DM mode refers to directly using the brightness prediction mode information of the corresponding position:
  • the luminance component and chrominance component are allowed to use independent block partitioning structures.
  • the luminance component corresponding to the chrominance CU may contain multiple luminance CUs, as shown in Figure 3.
  • the chrominance CU inherits the intra-frame prediction mode of the CU at the center of the corresponding luminance block, that is, intra_chroma_pred_mode is equal to 4.
  • the brightness position (xCb, yCb) specifies the position of the upper left brightness sample of the brightness area corresponding to the current block relative to the upper left brightness sample of the current image; a variable cbWidth specifies the width of the current block in brightness samples; a variable cbHeight specifies the height of the current block in brightness samples.
  • the positional relationship between the current chroma CU and the corresponding luminance area is shown in Figure 3.
  • the central luminance pixel position of the luminance 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 the pixel position is the CU at the center position of the luminance block corresponding to the chroma CU:
  • xCenter xCb + cbWidth >> 1;
  • the decoding process is shown in Table 4.
  • the value of the syntax element Value of intra_chroma_pred_mode 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 encoding bit is specifically shown in Table 6.
  • bypass indicates the bypass mode, and na indicates no processing.
  • the obtained chrominance prediction mode is DC mode, which results in a loss of coding efficiency.
  • a fixed DC mode is used for prediction, which not only results in the predicted pixels being 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 same-position luminance block of the IBC mode is not used, and there is no prediction algorithm for block copying similar to IBC, so that video sequences similar to screen content cannot be effectively compressed.
  • 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.
  • 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; 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 prediction value of the second color component of the current block.
  • An embodiment of the present application also provides a decoding method, which determines the value of a 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, decodes 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 a target prediction mode, determines the first color component block of the current block; when the prediction mode of the first color component block is the IBC mode, determines the first block vector parameters of the first color component block; 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; performs IBC extension mode prediction processing on the second color component of the current block based on the target block vector parameters to determine the prediction value of the second color component of the current block.
  • the target block vector parameters of the 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.
  • the 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.
  • the filtering unit 108 may implement deblocking filtering and sample adaptive offset (Sample Adaptive Offset, SAO) filtering
  • the encoding unit 109 may implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmetic Coding, CABAC).
  • a video coding block can be obtained by dividing the coding tree unit (CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transformation and quantization unit 101 to transform the video coding block, 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 of 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 a process of generating a motion vector, and the motion vector can estimate the motion of the video coding block, and then
  • the motion vector determined by the motion estimation unit 105 performs motion compensation; after determining the intra-frame prediction mode, the intra-frame prediction unit 103 is also used to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated and determined motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used to reconstruct the video coding block, reconstruct the residual block in the pixel domain, and the reconstructed residual block is removed by the filter control analysis unit 107 and the filtering unit 108.
  • the encoding unit 109 is used to encode various coding parameters and quantized transform coefficients.
  • 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; and the decoded image buffer unit 110 is used 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 .
  • the 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 cache unit 206, etc., wherein the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering.
  • the decoding unit 201 can implement header information decoding and CABAC decoding
  • the filtering unit 205 can implement deblocking filtering and SAO filtering.
  • 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 the decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate residual blocks in the pixel domain; the intra-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 the data from the previously decoded blocks of the current frame or picture; the motion compensation unit 204 is to determine the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and use The prediction information is used to generate a predictive block of 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 and 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 the block effect artifacts
  • the embodiment of the present application also provides a network architecture of a codec system including an encoder and a decoder, wherein FIG5 shows a schematic diagram of a network architecture of a codec system provided by an embodiment of the present application.
  • 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.
  • the electronic device can be various types of devices with video codec functions during implementation, 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 sensor device, a server, etc., and the embodiment of the present application is not specifically limited.
  • the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.
  • the method of the embodiment of the present application is mainly applied to the intra-frame prediction unit 103 part shown in FIG4A and the intra-frame prediction unit 203 part shown in FIG4B. That is to say, the embodiment of the present application can be applied to both the encoder and the decoder, and can even be applied to both the encoder and the decoder at the same time, but the embodiment of the present application is not specifically limited.
  • 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.
  • FIG6 a schematic diagram of a process of determining a prediction mode provided by an embodiment of the present application is shown. As shown in FIG6 , the method may include:
  • S601 Determine the first color component block of the current block.
  • the method of the embodiment of the present application can be applied to an encoder or a decoder.
  • the prediction mode here can specifically refer to an intra-frame prediction mode.
  • the first color component is a luminance component and the second color component is a chrominance component
  • here is a method for determining a chrominance intra-frame prediction mode.
  • the current block includes at least a first color component and a second color component.
  • the block at this time can be simply referred to as a first color component block; and when the first color component is a brightness component, the first color component block can also be referred to as a brightness block.
  • the block at this time 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.
  • 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.
  • determining the first color component block of the current block may include: determining a first color component region at the same position of the current block; and determining the first color component block of the current block from a plurality of blocks divided from the first color component region.
  • 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 divide the blocks, 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.
  • the area filled with oblique lines represents the same-position luminance area of the chrominance CU.
  • multiple blocks can be divided; the block at the center position can be selected from these blocks as the corresponding luminance block of the current block, for example, the block filled with black in FIG3 is the corresponding luminance block of the current block.
  • 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.
  • the target block may be a block at any position.
  • 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.
  • the target block as the first color component block may be a block at any position among the multiple blocks shown in FIG3.
  • a block at the center position in the co-located brightness region as shown in FIG3 (a block filled with black)
  • a block at the upper left corner position in the co-located brightness region as shown in FIG7 (a block filled with black)
  • a block at the lower right corner position in the co-located brightness region as shown in FIG8 (a block filled with black)
  • a block at the upper right corner position or a block at the lower left corner position in the co-located brightness region or even a block at the center position of the upper left region, etc., which is not specifically limited here.
  • determining the first color component block of the current block from a plurality of blocks divided by the first color component area may include: determining at least one candidate block at a preset position from a plurality of blocks divided by the first color component area; acquiring at least one candidate block in sequence according to a preset order and performing a mode judgment, and if the first candidate block determined uses the IBC mode, using the first candidate block as the first color component block of the current block.
  • the mode determination can also be performed on at least one candidate block at a preset position.
  • the mode determination can also be performed on at least one candidate block at a preset position.
  • FIG9 there are five CUs at brightness pixel positions, specifically: C, TL, TR, BL, and BR.
  • the embodiment of the present application is not limited to five positions, but can be a plurality of different positions; and it is not limited to the five positions shown in FIG9 , and no specific limitation is made to this.
  • the five positions shown in FIG. 9 can be acquired in sequence according to a preset order until the candidate block is determined to be in IBC mode, that is, the CU at the first brightness pixel position is found to be in IBC mode, and the CU at the first brightness pixel position is used as the corresponding brightness block of the current block.
  • 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:
  • 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 the luminance pixel TL
  • 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
  • the height is cbHeight.
  • the coordinate information of the position of the brightness pixel C is (xCb+cbWidth/2, yCb+cbHeight/2);
  • the coordinate information of the position of the brightness pixel TL is (xCb, yCb);
  • the coordinate information of the position of the brightness pixel TR is (xCb+cbWidth-1, yCb);
  • the coordinate information of the position of the brightness pixel BL is (xCb, yCb+cbHeight-1);
  • the coordinate information of the position of the brightness pixel BR is (xCb+cbWidth-1, yCb+cbHeight-1).
  • the corresponding first color component block needs to be determined first.
  • the brightness block i.e., brightness CU at the corresponding position needs to be determined.
  • the prediction mode of 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 parameter of the first color component block.
  • the first block vector parameter of the first color component block can be obtained.
  • the first block vector parameter represents a vector of the current block pointing 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.
  • 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, and determining the at least one candidate block as the first color component block of the current block.
  • 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 block; 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.
  • the first color component block of the current block is not limited to one block, but may be composed of multiple blocks.
  • the prediction modes of the multiple blocks at this time are all IBC modes.
  • multiple brightness CUs in the same brightness area are first obtained, and then the average value of the first block vector parameters is calculated as the first block vector parameter finally obtained.
  • the first block vector parameter finally obtained may also be determined by selecting the best block vector parameter by template matching. Therefore, in some embodiments, 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 also include: determining at least one target block using the IBC mode from at least one candidate block; searching for the at least one target block according to the template matching method to determine the best block vector parameter, and using the best block vector parameter as the first block vector parameter of the first color component block.
  • the positions of the multiple luma CUs are not limited to the five positions of C, TL, TR, BL, and BR, but may also be other positions, which are not specifically limited in the embodiments of the present application.
  • the prediction mode of the first color component block is the IBC mode
  • the process shown in FIG6 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 FIG6 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.
  • 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.
  • S603 Determine 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.
  • determining the target block vector parameter of the current block according to the first block vector parameter of the first color component block may include: directly using the first block vector parameter of the first color component block as the target block vector parameter of the current block; or adjusting the first block vector parameter of the first color component block to determine the target block vector parameter of the current block.
  • the first block vector parameters of the first color component block may not be adjusted.
  • 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.
  • 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, and the adjustment method includes but is not limited to:
  • 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 the color sampling format of the current block; 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.
  • 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 the 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.
  • the target block vector parameters of the current block can be directly determined based on the initial block vector parameters of the current block.
  • the initial block vector parameters of the current block can also be corrected to determine the target block vector parameters of the current block.
  • the luminance BV parameter can be adjusted to obtain the target block vector parameter (i.e., chrominance BV parameter) applied to the chrominance component.
  • the luminance BV parameter is (BVL hor , BVL ver ), and the chrominance BV parameter is (BVC hor , BVC ver ), wherein BVL hor represents the horizontal block vector of the luminance BV parameter, and BVL ver represents the vertical block vector of the luminance BV parameter; BVC hor represents the horizontal block vector of the chrominance BV parameter, and BVC ver represents the vertical block vector of the chrominance BV parameter.
  • the brightness BV parameter is scaled according to the color sampling format, and the mapping relationship between the brightness BV parameter and the scaled chrominance BV parameter is shown in Table 7.
  • the syntax element sps_chroma_format_idc is used to indicate the type of color sampling format, and the color sampling format here is specifically a chroma sampling format.
  • different types of chroma sampling formats have different corresponding scaling operations.
  • the chroma BV parameters scaled according to the chroma sampling format can be used directly, or they can be further modified.
  • the modification here can 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.
  • 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 prediction value of the second color component of the current block.
  • the IBC extended mode may refer to a prediction mode newly introduced in the embodiment of the present application, which may be represented by INTRA_DBV.
  • the second color component of the current block is predicted according to the determined target block vector parameter, thereby determining the predicted value of the second color component of the current block.
  • the method may also include: after determining the target block vector parameters of the current block, determining whether the target block vector parameters meet the available conditions; when the target block vector parameters meet the available conditions, performing a step of performing an IBC extended mode prediction process on the second color component of the current block according to the target block vector parameters to determine a predicted value of the second color component of the current block.
  • the second color component of the current block be predicted in IBC extension mode according to the target block vector parameters to determine the predicted value of the second color component of the current block.
  • whether the target block vector parameter satisfies the availability condition may at least include:
  • the target block vector parameter meets the availability condition, that is, the target block vector parameter is available.
  • the target block vector parameter meets the availability condition, which at least includes: 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; and the offset position indicated by the target block vector parameter has been reconstructed.
  • FIG10 shows a schematic diagram of a structure of whether an offset position provided by an embodiment of the present application does not cover the current block.
  • a block filled with black represents the current block
  • an area filled with oblique lines represents an available area
  • an unfilled area represents an unavailable area.
  • the offset position indicated by the target block vector parameter is in an unavailable area, then the offset position covers the current block.
  • FIG11 shows a structural diagram of whether an offset position provided by an embodiment of the present application exceeds the IBC available area.
  • a block filled with black represents a current block
  • an area filled with oblique lines represents an available area
  • the reference blocks in the available area have been reconstructed.
  • 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.
  • the method may further include: determining whether the initial block vector parameter meets the available condition; when the initial block vector parameter meets the available condition, correcting the initial block vector parameter of the current block to determine the target block vector parameter of the current block; or, when the initial block vector parameter does not meet the available condition, adjusting the initial block vector parameter of the current block until the adjusted block vector parameter meets the available condition; and then correcting the adjusted block vector parameter to determine the target block vector parameter of the current block.
  • the IntraTMP mode is used for correction, that is, after obtaining the corrected chroma BV parameters, the offset position is found using the position of the current block and the corrected chroma BV parameters, and then a template matching method is used to perform a fine search near the offset position to obtain the optimal chroma BV parameters, and 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.
  • the area filled with oblique lines represents the chroma reconstruction area.
  • the template matching method can be used to find the best matching template and the corresponding best BV.
  • the best BV i.e., IntraTMP BV
  • the reference block of the current block can be determined, and then the chroma prediction value of the current block can be determined.
  • At least one candidate block at a preset position is determined from the multiple blocks divided by the first color component area, and then at least one candidate block is sequentially obtained according to the preset order and the mode judgment is performed. 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. In this process, it is also necessary to determine whether the BV parameters of the first candidate block meet the availability conditions, so as to determine whether it is necessary to continue to perform the mode judgment of the next candidate block.
  • the method may also include: when the first candidate block is determined to use the IBC mode, determining the first block vector parameter of the first candidate block; determining whether the first block vector parameter of the first candidate block meets the available conditions; if the first block vector parameter of the first candidate block meets the available conditions, 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 available conditions, 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 parameter meeting the available conditions is determined, and using the target candidate block as the first color component block of the current block.
  • 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 satisfies the available condition, intra-frame prediction processing is performed 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.
  • FIG. 9 there are CUs at five brightness 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:
  • the PLANAR mode inter-component prediction mode (such as CCLM mode) or other angle prediction modes, etc.
  • 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.
  • this CU is selected as the luma block for the final BV acquisition.
  • the luma CU is not obtained, including but not limited to PLANAR mode or inter-component prediction mode or other angle prediction modes, 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 luma block for finally obtaining the BV.
  • performing 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 may include: determining the offset position of the current block according to the target block vector parameters and the position information of the current block; performing block copy processing according to 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 according to the first prediction block.
  • the position information (xCb, yCb) of the current block can be obtained, as well as the chrominance BV parameters (BVC hor , BVC ver ); thereby, the offset position (xCb+BVChor, yCb+BVCver) can be found for block copying, as shown in FIG13 .
  • cbWidth represents the width of the current block in chroma samples
  • cbHeight represents the height of the current block in chroma samples
  • predSamples[x][y] represents the chroma prediction value of the current block.
  • xVb (xCb+BVChor)&(IbcBufWidthC-1);
  • yVb (yCb+BVCver)&(CtbSizeC-1);
  • IbcBufWidthC is the width of the chroma pixels of the reconstructed buffer stored in IBC
  • CtbSizeC is the size of the chroma pixels of CTU
  • ibcVirChromaBuf is the reconstructed chroma pixels stored in IBC.
  • determining the predicted 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 predicted value of the second color component of the current block.
  • determining the predicted 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 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.
  • the predicted value of the second color component of the current block if it is obtained by block copying the target block vector parameter, the predicted value can be corrected by methods including but not limited to weighting with the conventional prediction mode.
  • the correction processing can also be to limit the predicted value to a preset numerical range, for example, between 0 and (1 ⁇ BitDepth)-1, where BitDepth is the bit depth required for the chrominance component; it can even be a filtering enhancement processing to improve the chrominance prediction quality in this mode; there is no specific limitation on this.
  • the chrominance prediction value can be corrected by methods including but not limited to weighting with conventional chrominance prediction modes; if it is a prediction value obtained by a PLANAR mode or an inter-component prediction mode or other angle prediction mode, the chrominance prediction value can be corrected by methods including but not limited to weighting with other conventional chrominance prediction modes.
  • This embodiment provides a method for determining a prediction mode.
  • a target block vector parameter for applying the chrominance component can be determined according to the block vector parameter of the luminance block, and the chrominance component is predicted according to the IBC extended mode according to the target block vector parameter to determine the chrominance prediction value of the current block.
  • 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 the bit rate can be saved, the encoding and decoding efficiency can be improved, and the encoding and decoding performance can be improved.
  • a new prediction mode INTRA_DBV may be introduced.
  • the first color component is a luminance component and the second color component is a chrominance component
  • 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 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 the corresponding chroma prediction or skipping processing is performed).
  • FIG14 is 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:
  • S1402 Determine whether the corresponding brightness block is in IBC mode.
  • S1407 Perform chrominance prediction in the IBC extended mode on the current block according to the second BV parameter.
  • the corresponding luminance block is used to indicate the co-located luminance CU of the chrominance component of the current block.
  • 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.
  • 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.
  • FIG15 is a detailed flow chart of another method for determining a prediction mode provided by an embodiment of the present application. As shown in FIG15 , the detailed flow chart may include:
  • S1502 Determine whether the corresponding brightness block is in IBC mode.
  • S1505 Determine whether the second BV parameter is available.
  • S1506 Use the second preset mode to perform chrominance prediction on the current block.
  • S1507 Perform chrominance prediction in the IBC extended mode on the current block according to the second BV parameter.
  • S1508 Use the first preset mode to perform chrominance prediction on the current block.
  • the corresponding luminance block is used to indicate the co-located luminance CU of the chrominance component of the current block.
  • 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.
  • S1505 if the judgment result is yes, then S1507 can be executed; if the judgment result is no, then S1506 can be executed first.
  • the first preset mode and the second preset mode may be the same or different.
  • the first preset mode may be replaced or skipped by the PLANAR mode or other chromaticity prediction mode
  • the second preset mode may be replaced or skipped by the PLANAR mode or other chromaticity prediction mode, but this is not specifically limited.
  • the brightness CU obtained here can be at any position, including but not limited to the following positions: the CU at the center position in the same brightness area as shown in Figure 3, the CU at the upper left corner position in the same brightness area as shown in Figure 7, the CU at the lower right corner position in the same brightness area as shown in Figure 8, the CU at a preset position in the same brightness area as shown in Figure 9, and so on. There is no specific limitation on this here.
  • IBC mode For judging whether the corresponding luminance block is in IBC mode, that is, judging whether the prediction mode of the corresponding luminance block is IBC mode. After obtaining the CU at the corresponding position, judge 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, and need 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 judgments at the same time.
  • the first BV parameter is adjusted and applied to chrominance.
  • the first BV parameter is adjusted to obtain the second BV parameter applied to chrominance.
  • the adjustment methods include but are not limited to the following:
  • Method 1 as shown in Table 7, the first BV parameter is scaled according to the color sampling format to obtain the second BV parameter applied to chrominance.
  • Method 2 correct the second BV parameter. After obtaining the second BV parameter scaled according to the color sampling format, it can be used directly, or it can be further corrected. Before the correction, it is necessary to determine whether the second BV parameter is available. If it is available, it is corrected, or if it is unavailable, it is adjusted to be available before correction.
  • the correction here includes but is not limited to: using the IntraTMP mode for correction, that is, after obtaining the second BV parameter, the position of the current block and the second BV parameter are used to find the offset position, and then a template matching method is used to perform a detailed search near the offset position to obtain the optimal BV parameter, and the reference block at the optimal offset position obtained after the detailed search is copied to obtain the chrominance prediction block of the current block, as shown in Figure 12.
  • the second BV parameter To determine whether the second BV parameter is available, obtain the position of the current block (xCb, yCb), obtain the second BV parameter (BVC hor , BVC ver ), find the corresponding offset position (xCb+BVC hor , yCb+BVC ver ), and determine the following conditions. If all of them are true, the second BV parameter is available:
  • the adjustment method includes but is not limited to cropping, scaling, etc.
  • PLANAR mode or CCLM mode or other angle prediction modes instead, obtain reference pixels and mode parameters for chroma prediction; you can even skip this mode.
  • the chroma prediction of the current block in IBC extended mode is performed according to the second BV parameter. If it is IBC extended mode, the position of the current block (xCb, yCb) is obtained, the second BV parameter is obtained as (BVChor, BVCver), the corresponding offset position (xCb+BVChor, yCb+BVCver) is found and the block is copied, as shown in Figure 13.
  • 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 for chrominance prediction.
  • the embodiment of the present application can also modify the DM mode of the related art so that the modified DM mode can take into account the INTRA_DBV mode.
  • the chrominance prediction mode is derived as follows:
  • IntraPredModeC[xCb][yCb] uses ccm_mode_flag, ccm_mode_idx, and intra_chroma_pred_mode, lumaIntraPredMode, and lumaIbcPredMode specified in Table 8.
  • the INTRA_DBV mode is used for prediction, and the specific process can be the same as the process shown in FIG. 14 or FIG. 15 in the aforementioned embodiment.
  • the corresponding brightness prediction mode can be obtained for chrominance prediction.
  • the specific implementation of the above embodiments is elaborated in detail, from which it can be seen that a new chrominance prediction mode INTRA_DBV is proposed here.
  • the DM mode in the case of dual-tree partitioning, if the prediction mode of the CU at its brightness center position is the IBC mode, then the acquired chrominance prediction mode is the DC mode.
  • the embodiment of the present application effectively improves this method of acquiring a fixed prediction mode, makes full use of the mode information of the same brightness area, and adopts a flexible BV parameter instead of the fixed prediction mode, which effectively improves the accuracy of chrominance prediction; on the other hand, for this new prediction mode, in the case of dual-tree partitioning, if the corresponding brightness block is the IBC mode, then the BV parameters of the corresponding brightness block are obtained, and then the BV parameters are adjusted and applied to the chrominance, which improves the singleness of the chrominance prediction, and implicitly adds the IBC algorithm to the chrominance prediction, making full use of the information of the same brightness area, thereby improving the accuracy of the chrominance prediction, and then effectively improving the encoding and decoding efficiency.
  • FIG16 a schematic flow chart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG16 , the method may include:
  • S1601 Determine a value of first syntax element identification information.
  • the method of the embodiment of the present application can be applied to a decoder.
  • the decoding method here can specifically refer to an intra-frame prediction method.
  • this is a chrominance intra-frame prediction method, and the IBC extension mode proposed in the above embodiment can be used to perform chrominance prediction, thereby improving the accuracy of chrominance prediction.
  • the current block includes at least a first color component and a second color component.
  • the block at this time can be simply referred to as a first color component block; and when the first color component is a brightness component, the first color component block can also be referred to as a brightness block.
  • the block at this time 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.
  • 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.
  • 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 (ie, INTRA_DBV mode).
  • the method may also include:
  • 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;
  • 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.
  • 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.
  • the first syntax element identification information can be a parameter written in the profile or a value of a flag, which is not specifically limited here.
  • 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.
  • the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
  • the value of the first syntax element identification information may be: decoding the code stream to determine the value of the first syntax element identification information.
  • it may be: decoding the code stream to determine the 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 the preset condition, then determining the value of the first syntax element identification information to be the first value; if the value of the third syntax element identification information is the second value, then determining the value of the first syntax element identification information to be the second value.
  • 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.
  • 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
  • MaxChromaIbcSize can be determined according to the size of the chroma CTU or a preset value.
  • 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.
  • the current image includes the current block.
  • the method may also include:
  • 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;
  • 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.
  • 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.
  • the third syntax element identification information can be a parameter written in the profile or a value of a flag, which is not specifically limited here.
  • the value of sps_ibc_enabled_flag is equal to 0; then the value of IbcEnabled is equal to 0; otherwise, when the value of sps_ibc_enabled_flag is equal to 1, if the following multiple conditions are true at the same time (including but not limited to the following conditions), then the value of IbcEnabled is equal to 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.
  • the value of the first syntax element identification information can be determined according to the third syntax element identification information and whether the current block meets the preset condition; or, it can be directly determined by decoding the bitstream, which is not specifically limited here.
  • the first syntax element identification information can be used as a syntax element not transmitted in the bitstream, but a derived value, which can be jointly determined by sps_ibc_enabled_flag, sh_slice_type and CtbLog2SizeY size.
  • the method may also include:
  • 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;
  • 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.
  • 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.
  • 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.
  • the second syntax element identification information can be a parameter written in the profile or a value of a flag, which is not specifically limited here.
  • the decoding determines the value of the second syntax element identification information; 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.
  • the prediction mode determined is the target prediction mode.
  • the target prediction mode can be represented by INTRA_DBV.
  • performing intra-frame prediction processing on the second color component of the current block according to the target prediction mode to determine the prediction value of the second color component of the current block may include:
  • 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 also include:
  • the chrominance component of the current block is to be predicted in the IBC extended mode
  • 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 according to the first BV parameter to determine the target BV parameter applied to the chrominance component
  • the chrominance prediction processing of the current block in the IBC extended mode is performed according to the target BV parameter to determine the chrominance prediction value of the current block.
  • the encoding end may write the target BV parameter into the bitstream after determining the target BV parameter applied to the chrominance component; thus, at the decoding end, the target BV parameter of the current block can be directly obtained through decoding, and then the chrominance prediction processing of the current block in the IBC extended mode is performed according to the target BV parameter to determine the chrominance prediction value of the current block.
  • 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 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; 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.
  • 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.
  • intra_dbv_flag or intra_chroma_ibc_flag when intra_dbv_flag or intra_chroma_ibc_flag is equal to 0, the target prediction mode is no longer used, but the chroma prediction process 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.
  • the decoding positions added include but are not limited to the following:
  • the chroma prediction mode INTRA_DBV can be added before intra_chroma_pred_mode, as shown in Table 9.
  • IbcEnabled is equal to 0.
  • IbcEnabled is equal to 1 if the following conditions are all true (including but not limited to the following conditions):
  • sh_slice_type is equal to I frame
  • CtbLog2SizeY is less than or equal to MaxChromaIbcSize.
  • MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.
  • intra_dbv_flag is TRUE, indicating that the current chrominance 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.
  • FL represents a fixed length.
  • IbcEnabled is equal to 0.
  • IbcEnabled is equal to 1 if the following conditions are all true (including but not limited to the following conditions):
  • sh_slice_type is equal to I frame
  • CtbLog2SizeY is less than or equal to MaxChromaIbcSize.
  • MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.
  • intra_chroma_ibc_flag is inferred to be FALSE.
  • intra_chroma_ibc_flag 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.
  • 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, determining the value of the fifth syntax element identification information; and determining the second intra-frame prediction mode of the second color component of the current block according to the value of the fifth syntax element identification information, performing intra-frame prediction processing on the second color component of the current block according to the second intra-frame prediction mode, and determining the prediction value of the second color component of the current block;
  • 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
  • decode the code stream and determine the value of the sixth syntax element identification information and determine the third intra-frame prediction mode of the second color component of the current block according to the value of the sixth syntax element identification information, 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 prediction 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.
  • the fifth syntax element identification information can be represented by intra_chroma_pred_mode_add
  • the sixth syntax element identification information can be represented by intra_chroma_pred_mode.
  • Intra_chroma_pred_mode_add is used to indicate that the INTRA_DBV mode is added
  • intra_chroma_pred_mode represents the chroma prediction mode in the related art.
  • the binarization processing processes for the fifth grammatical element identification information and the sixth grammatical element identification information are different, that is, there is a difference in the binarization mapping tables used by the two.
  • 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.
  • 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.
  • 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;
  • 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.
  • a chroma prediction mode INTRA_DBV provided in an embodiment of the present application, it also includes:
  • IbcEnabled is equal to 0.
  • IbcEnabled is equal to 1 if the following conditions are all true (including but not limited to the following conditions):
  • sh_slice_type is equal to I frame
  • CtbLog2SizeY is less than or equal to MaxChromaIbcSize.
  • MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.
  • the first preset binary mapping table can be as shown in Table 20, but is not specifically limited.
  • the second preset binary mapping table can be as shown in Table 21, but there is no specific limitation.
  • intra_chroma_pred_mode_add the 0th bit of intra_chroma_pred_mode_add represents the DM mode, and the encoding method is the same as VVC.
  • the 1st bit of intra_chroma_pred_mode_add represents the newly added INTRA_DBV mode, which can be encoded using the context model or the bypass model.
  • 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 using 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
  • 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.
  • 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.
  • different binarization methods can be used to implement it according to different values of IbcEnabled.
  • a chroma prediction mode INTRA_DBV provided in an embodiment of the present application, it also includes:
  • IbcEnabled is equal to 0.
  • IbcEnabled is equal to 1 if the following conditions are all true (including but not limited to the following conditions):
  • sh_slice_type is equal to I frame
  • CtbLog2SizeY is less than or equal to MaxChromaIbcSize.
  • MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.
  • intra_chroma_pred_mode includes but is not limited to the following binarization methods:
  • intra_chroma_pred_mode is binarized using Table 25, but is not limited to this.
  • intra_chroma_pred_mode is binarized using Table 26, but is not limited thereto.
  • the encoding method used for each coded bit is as follows:
  • intra_chroma_pred_mode 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.
  • 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 the 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 the fourth intra-frame prediction mode of 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 the prediction value of the second color component of the current block; or,
  • 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-predicted according to the target prediction mode to determine the predicted value of the second color component of the current block.
  • the second syntax element identification information is still represented by intra_chroma_pred_mode.
  • the first preset constant value may be 0, 1, 2, 3; the second preset constant value may be 4, but is not specifically limited.
  • a chroma prediction mode INTRA_DBV provided in an embodiment of the present application, it also includes:
  • 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.
  • intra_chroma_pred_mode represents the DM mode
  • the encoding method is the same as that of VVC.
  • IbcEnabled is equal to 0.
  • IbcEnabled is equal to 1 if the following conditions are all true (including but not limited to the following conditions):
  • sh_slice_type is equal to I frame
  • CtbLog2SizeY is less than or equal to MaxChromaIbcSize.
  • MaxChromaIbcSize can be determined according to the chroma CTU size or a preset value.
  • 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.
  • the present embodiment provides a decoding method.
  • the corresponding luminance block is in the IBC mode, the BV parameters of the corresponding luminance block are obtained, and then the BV parameters are 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, improve the accuracy of the chrominance prediction, and further improve the encoding and decoding efficiency and the encoding and decoding performance.
  • FIG17 a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application is shown. As shown in FIG17 , the method may include:
  • the method of the embodiment of the present application can be applied to an encoder.
  • the encoding method here can specifically refer to an intra-frame prediction method.
  • this is a chrominance intra-frame prediction method, and the IBC extension mode proposed in the above embodiment can be used to perform chrominance prediction, thereby improving the accuracy of chrominance prediction.
  • the prediction mode determined is the target prediction mode.
  • the target prediction mode is the IBC extension mode proposed in the above embodiment, which can be represented by INTRA_DBV.
  • determining the first color component block of the current block may include: determining a first color component region at the same position of the current block; and determining the first color component block of the current block from a plurality of blocks divided from the first color component region.
  • 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.
  • the method may also 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.
  • the target block as the first color component block may be a block at any position among the multiple blocks shown in FIG3.
  • a block at the center position in the co-located brightness region as shown in FIG3 (a block filled with black)
  • a block at the upper left corner position in the co-located brightness region as shown in FIG7 (a block filled with black)
  • a block at the lower right corner position in the co-located brightness region as shown in FIG8 (a block filled with black)
  • a block at the upper right corner position or a block at the lower left corner position in the co-located brightness region or even a block at the center position of the upper left region, etc., which is not specifically limited here.
  • determining the first color component block of the current block from a plurality of blocks divided by the first color component area may include: determining at least one candidate block at a preset position from a plurality of blocks divided by the first color component area; acquiring at least one candidate block in sequence according to a preset order and performing a mode judgment, and if the first candidate block determined uses the IBC mode, using the first candidate block as the first color component block of the current block.
  • 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 the 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.
  • the number of first color component blocks of the current block can be one or more, which is not specifically limited here.
  • the mode judgment can also be determined for at least one candidate block at a preset position, as shown in Figure 9.
  • the five positions shown in FIG. 9 can be acquired in sequence according to a preset order until the candidate block is determined to be in IBC mode, that is, the CU at the first brightness pixel position is found to be in IBC mode, and the CU at the first brightness pixel position is used as the corresponding brightness block of the current block.
  • the prediction mode of 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 parameter of the first color component block.
  • 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 block; 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.
  • the first color component block of the current block is not limited to one block, but may be composed of multiple blocks.
  • the prediction modes of the multiple blocks at this time are all IBC modes.
  • multiple brightness CUs in the same brightness area are first obtained, and then the first block vector parameters thereof are averaged as the first block vector parameters finally obtained.
  • the first block vector parameter finally obtained may also be determined by selecting the best block vector parameter by template matching. Therefore, in some embodiments, the method 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 according to the template matching method to determine the best block vector parameter, and using the best block vector parameter as the first block vector parameter of the first color component block.
  • the best block vector parameters can be selected by template matching as the first block vector parameters finally obtained.
  • the prediction mode of the first color component block is the IBC mode
  • the process shown in FIG. 17 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 FIG. 17 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.
  • S1703 Determine 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.
  • 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.
  • 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 the color sampling format of the current block; 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.
  • 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 the 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.
  • adjusting the first block vector parameter of the first color component block to determine the target block vector parameter of the current block may include: directly determining the target block vector parameter of the current block according to the initial block vector parameter of the current block.
  • the initial block vector parameters of the current block are corrected to determine the target block vector parameters of the current block, which 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 based on a template matching method to determine the best block vector parameters, and using the best block vector as the target block vector parameters of the current block.
  • the chroma BV parameters scaled according to the color sampling format shown in Table 7 they can be used directly, or they can be further modified.
  • the modification here can 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.
  • 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 prediction value of the second color component of the current block.
  • 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.
  • the method may also include: after determining the target block vector parameters of the current block, determining whether the target block vector parameters meet the available conditions; when the target block vector parameters meet the available conditions, performing a step of performing an IBC extended mode prediction process on the second color component of the current block according to the target block vector parameters to determine a predicted value of the second color component of the current block.
  • the second color component of the current block be predicted in IBC extension mode according to the target block vector parameters to determine the predicted value of the second color component of the current block.
  • whether the target block vector parameter satisfies the availability condition may at least include:
  • the target block vector parameter meets the availability condition, that is, the target block vector parameter is available.
  • the target block vector parameter meets the availability condition, which at least includes: 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; and the offset position indicated by the target block vector parameter has been reconstructed.
  • the method may further include: determining whether the initial block vector parameter meets the available condition; when the initial block vector parameter meets the available condition, correcting the initial block vector parameter of the current block to determine the target block vector parameter of the current block; or, when the initial block vector parameter does not meet the available condition, adjusting the initial block vector parameter of the current block until the adjusted block vector parameter meets the available condition; and then correcting the adjusted block vector parameter to determine the target block vector parameter of the current block.
  • At least one candidate block at a preset position is determined from the multiple blocks divided by the first color component area, and then at least one candidate block is sequentially obtained according to the preset order and the mode judgment is performed. 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. In this process, it is also necessary to determine whether the BV parameters of the first candidate block meet the availability conditions, so as to determine whether it is necessary to continue to perform the mode judgment of the next candidate block.
  • the method may also include: when the first candidate block is determined to use the IBC mode, determining the first block vector parameter of the first candidate block; determining whether the first block vector parameter of the first candidate block meets the available conditions; if the first block vector parameter of the first candidate block meets the available conditions, 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 available conditions, 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 parameter meeting the available conditions is determined, and using the target candidate block as the first color component block of the current block.
  • 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 satisfies the available condition, intra-frame prediction processing is performed 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.
  • the five positions can be re-acquired in sequence (until the first CU that meets the following conditions is found).
  • 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.
  • the luminance CU is not acquired, including but not limited to the PLANAR mode or the inter-component prediction mode or other angular prediction mode, and even the mode can be skipped; or the first CU that uses 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.
  • performing 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 may include: determining the offset position of the current block according to the target block vector parameters and the position information of the current block; performing block copy processing according to 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 according to the first prediction block.
  • determining the predicted 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 predicted value of the second color component of the current block.
  • determining the predicted 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 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.
  • the predicted value of the second color component of the current block if it is obtained by block copying the target block vector parameter, the predicted value can be corrected by methods including but not limited to weighting with the conventional prediction mode.
  • 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.
  • 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.
  • the first syntax element identification information can be represented by IbcEnabled or chromaIbcExMode Enabled, which is used to indicate whether the second color component of the current block is allowed to use the IBC extension mode.
  • 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).
  • 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.
  • the first syntax element identification information can be a parameter written in the profile or a value of a flag, which is not specifically limited here.
  • the first value can be set to 1 and the second value can be set to 0, but this is not specifically limited.
  • the encoder encodes the first syntax element identification information and writes it into the bitstream, and the decoder can subsequently 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.
  • the method may also 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 the value of the second syntax element identification information; encoding the value of the second syntax element identification information, and writing the obtained encoded bits into the bitstream.
  • 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.
  • 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 encoding bits into a bitstream.
  • 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.
  • the first syntax element identification information can be used as a syntax element transmitted in the bitstream, and the value is directly determined by subsequently decoding the bitstream; or the first syntax element identification information can be used as a syntax element not transmitted in the bitstream, and the value can be determined according to the third syntax element identification information and whether the current block meets the preset condition.
  • 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 satisfies a 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.
  • 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.
  • the second syntax element identification information can be represented by intra_dbv_flag, or represented by intra_chroma_ibc_flag, 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, to indicate whether the current image allows the use of the IBC mode.
  • the current image includes the current block.
  • 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., they can be parameters written in the profile, or they can be the value of a flag, which is not specifically limited here.
  • the value of sps_ibc_enabled_flag is equal to 0; then the value of IbcEnabled is equal to 0; otherwise, when the value of sps_ibc_enabled_flag is equal to 1, if the following multiple conditions are true at the same time (including but not limited to the following conditions), then the value of IbcEnabled is equal to 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.
  • 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.
  • the method may also include: determining a value of fourth syntax element identification information according to a first intra-frame prediction mode of a second color component of the current block; encoding the value of the fourth syntax element identification information, and writing the obtained encoding bits into a bitstream.
  • 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.
  • intra_dbv_flag or intra_chroma_ibc_flag is equal to 0
  • the target prediction mode is no longer used at this time, but the 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.
  • 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 of 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 of 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.
  • the method may also include: determining a value of fifth syntax element identification information according to a second intra-frame prediction mode of a 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 at least one character corresponding to the fifth syntax element identification information, and writing the obtained encoding bits into the bitstream.
  • the method may also include: determining a value of a sixth grammatical element identification information according to a third intra-frame prediction mode of the second color component of the current block; 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; encoding at least one character corresponding to the sixth grammatical element identification information, and writing the obtained coded bits into the bitstream.
  • the fifth syntax element identification information can be represented by intra_chroma_pred_mode_add
  • the sixth syntax element identification information can be represented by intra_chroma_pred_mode.
  • Intra_chroma_pred_mode_add is used to indicate that the INTRA_DBV mode is added
  • intra_chroma_pred_mode represents the chroma prediction mode in the related art.
  • the binarization processing process for the fifth grammatical element identification information and the sixth grammatical element identification information is different, that is, there is a difference in the binarization mapping tables used by the two.
  • the first preset binary mapping table can be as shown in Table 20
  • the second preset binary mapping table can be as shown in Table 21, but neither is specifically limited.
  • the method may further include:
  • 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 value of the second syntax element identification information is binarized using a second preset binary mapping table 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.
  • 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.
  • different binarization methods can be used to implement it according to different values of IbcEnabled.
  • the first preset binary mapping table can be shown in Table 25
  • the second preset binary mapping table can be shown in Table 26, but they are not specifically limited.
  • an embodiment of the present application further provides a code stream, wherein the code stream is generated by bit encoding according to 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.
  • first syntax element identification information 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, and the sixth syntax element identification information, for the values of these syntax element identification information, 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. Exemplarily, it can be a parameter written in the profile or a flag value, which is not specifically limited here.
  • the third syntax element identification information may be an SPS layer syntax element.
  • the IBC mode and dual-tree partitioning are turned on at the SPS layer, if the corresponding luminance block is in IBC mode, the BV of the corresponding luminance block is obtained, and then the BV is adjusted and applied to the chrominance, thereby improving the singleness of the chrominance prediction, implicitly adding the IBC algorithm to the chrominance prediction, making full use of the information of the same luminance area, and effectively improving the coding efficiency.
  • the encoding end can encode these syntax element identification information and write them into the bit 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 using the target prediction mode, which can also effectively improve the decoding efficiency.
  • This embodiment provides a coding method.
  • the target block vector parameter of the chrominance component can be determined according to the block vector parameter of the luminance block, and the chrominance component is predicted according to the IBC extended mode according to the target block vector parameter 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 the bit rate, improve the encoding and decoding efficiency, and thus improve the encoding and decoding performance.
  • FIG18 shows a schematic diagram of the structure of an encoder provided in an embodiment of the present application.
  • the encoder 180 may include: a first determination unit 1801 and a first prediction unit 1802; wherein,
  • 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 parameter of the first color component block when the prediction mode of the first color component block is the IBC mode; determine the target block vector parameter of the second color component of the current block according to the first block vector parameter of the first color component block;
  • 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 prediction value of the second color component of the current block.
  • the first determining unit 1801 is further configured to determine a first color component region at the same position of 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.
  • the first determining unit 1801 is further configured to select a target block from a plurality of blocks divided into the first color component region, and use the target block as the first color component block of the current block.
  • the first determination unit 1801 is further configured to select a block at a center position in the first color component area as a target block; or, select a block at an upper left corner position in the first color component area as a target block; or, select a block at a lower right corner position in the first color component area as a target block.
  • the first determination unit 1801 is further configured to determine at least one candidate block at a preset position from multiple blocks divided by the first color component area; and to obtain at least one candidate block in sequence according to a preset order and perform a 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.
  • the first determination 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 region, and determine the at least one candidate block as the first color component block of the current block;
  • the first determination unit 1801 is also 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.
  • the first determination unit 1801 is also configured to determine at least one target block using the IBC mode from at least one candidate block; and search for at least one target block according to a 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.
  • the encoder 180 may further include a first adjustment unit 1803 configured to adjust a first block vector parameter of a first color component block to determine a target block vector parameter of a current block.
  • the first determining unit 1801 is further configured to determine a color sampling format of the current block
  • 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 to determine the target block vector parameter of the current block.
  • 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 the target block vector parameters of the current block.
  • 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.
  • the first adjustment unit 1803 is further configured to determine a search area of the current block based on an initial block vector parameter of the current block and position information of the current block; and to search within the search area according to a template matching method to determine an optimal block vector parameter, and use the optimal block vector as a target block vector parameter of the current block.
  • 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 available conditions; and when the target block vector parameters meet the available 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.
  • 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.
  • the first determination unit 1801 is further configured to determine the first block vector parameter of the first candidate block when the first candidate block is determined to use the IBC mode; and determine whether the first block vector parameter of the first candidate block meets the available conditions; and if the first block vector parameter of the first candidate block meets the available conditions, use 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 available conditions, continue to perform mode judgment on the next candidate block until a target candidate block using the IBC mode and the corresponding first block vector parameter meeting the available conditions is determined, and use the target candidate block as the first color component block of the current block.
  • 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 available 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.
  • the first prediction unit 1802 is further configured to determine the offset position of the current block based on the target block vector parameters and the position information of the current block; and perform block copy processing according to 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.
  • the first prediction unit 1802 is further configured to perform a correction operation on the first prediction block to determine a prediction value of the second color component of the current block.
  • 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 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.
  • the encoder 180 may further include an encoding unit 1804, wherein:
  • the first determining unit 1801 is further configured to determine a value of the first syntax element identification information
  • 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.
  • 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.
  • 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;
  • 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.
  • 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.
  • the first determining unit 1801 is further configured to determine a value of the third syntax element identification information
  • 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.
  • 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 satisfies a 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.
  • the current block meets preset conditions, including at least: 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.
  • 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.
  • the first determination unit 1801 is further configured to determine the first intra-frame prediction mode of 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;
  • 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 prediction value of the second color component of the current block.
  • 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;
  • 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.
  • the first prediction unit 1802 is further configured to determine a second intra-frame prediction mode 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 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 a predicted value of the second color component of the current block; or, is further configured to determine a third intra-frame prediction mode 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, 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 a target prediction mode, and the third intra-frame prediction mode does not include a target prediction mode.
  • the first determining unit 1801 is further configured to determine a value of the fifth syntax element identification information according to a second intra prediction mode of a second color component of the current block;
  • the encoding unit 1804 is also configured to use the first preset binary mapping table to binarize the value of the fifth syntax element identification information, 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 encoding bits into the bit stream.
  • the first determining unit 1801 is further configured to determine a value of the sixth syntax element identification information according to a third intra-frame prediction mode of the second color component of the current block;
  • the encoding unit 1804 is also configured to use a second preset binary mapping table to binarize the value of the sixth grammatical element identification information to determine at least one character corresponding to the sixth grammatical element identification information; and encode at least one character corresponding to the sixth grammatical element identification information, and write the obtained encoding bits into the bit stream.
  • 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.
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course, it may be a module, or it may be non-modular.
  • the components in the present embodiment may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
  • an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 180, and 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.
  • 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.
  • the first bus system 1904 also includes a power bus, a control bus and a status signal bus.
  • various buses are labeled as the first bus system 1904 in Figure 19. Among them,
  • the first communication interface 1901 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • a first memory 1902 used to store a computer program that can be run on the first processor 1903;
  • the first processor 1903 is configured to, when running the computer program, execute:
  • 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 when the prediction mode of the first color component block is the IBC mode, determine the first block vector parameters of the first color component block; 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; perform prediction processing on the second color component of the current block in the IBC extended mode based on the target block vector parameters, and determine the prediction value of the second color component of the current block.
  • 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.
  • 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.
  • RAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate synchronous DRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous link DRAM
  • DRRAM direct RAM bus RAM
  • the first processor 1903 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 1903.
  • the above-mentioned first processor 1903 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed.
  • the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, 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.
  • the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing devices
  • PLD programmable logic devices
  • FPGA field programmable gate array
  • general processors controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this 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.
  • the first processor 1903 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program.
  • the present 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 in the IBC mode, then the target block vector parameters of the 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 code rate can be saved, the encoding efficiency can be improved, and the encoding performance can be improved.
  • FIG. 20 shows a schematic diagram of the structure of a decoder provided in an embodiment of the present application.
  • the decoder 200 may include: a second determination unit 2001 and a second prediction unit 2002; wherein,
  • 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 a second color component of the current block according to the first block vector parameter of the first color component block;
  • 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 prediction value of the second color component of the current block.
  • the second determining unit 2001 is further configured to determine a first color component region at the same position of 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.
  • the second determination unit 2001 is further configured to select a target block from a plurality of blocks divided into the first color component region, and use the target block as the first color component block of the current block.
  • the second determination unit 2001 is further configured to select a block at a center position in the first color component area as a target block; or, select a block at an upper left corner position in the first color component area as a target block; or, select a block at a lower right corner position in the first color component area as a target block.
  • the second determination unit 2001 is further configured to determine at least one candidate block at a preset position from multiple blocks divided by the first color component area; and to obtain at least one candidate block in sequence according to a preset order and perform a 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.
  • the second determination 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 region, and determine the at least one candidate block as the first color component block of the current block;
  • the second determination unit 2001 is also 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.
  • 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 at least one target block according to a 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.
  • 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.
  • the second determining unit 2001 is further configured to determine a color sampling format of the current block
  • 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 to determine the target block vector parameter of the current block.
  • 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 the target block vector parameters of the current block.
  • 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.
  • 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 available conditions; and when the target block vector parameters meet the available 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.
  • 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.
  • the second determination unit 2001 is further configured to determine the first block vector parameter of the first candidate block when the first candidate block is determined to use the IBC mode; and determine whether the first block vector parameter of the first candidate block meets the available conditions; and if the first block vector parameter of the first candidate block meets the available conditions, use 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 available conditions, continue to perform mode judgment on the next candidate block until a target candidate block using the IBC mode and the corresponding first block vector parameter meeting the available conditions is determined, and use the target candidate block as the first color component block of the current block.
  • 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 available 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.
  • the second prediction unit 2002 is further configured to determine the offset position of the current block based on the target block vector parameters and the position information of the current block; and perform block copy processing according to 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.
  • the second prediction unit 2002 is further configured to perform a correction operation on the first prediction block to determine a prediction value of a second color component of the current block.
  • 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 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.
  • FIG. 21 shows a schematic diagram of the composition structure of another decoder provided in an embodiment of the present application.
  • the decoder 200 may include: a decoding unit 2101, a second determination unit 2102, and a second prediction unit 2103; wherein,
  • the second determining unit 2102 is configured to determine a value of the first syntax element identification information
  • 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;
  • 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 to determine the prediction value of 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 uses the target prediction mode.
  • 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 a second color component of the current block according to the first block vector parameter of the first color component block;
  • 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 prediction value of the second color component of the current block.
  • the decoding unit 2101 is further configured to decode the bitstream and determine the target block vector parameters of the current block;
  • 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 prediction value of the second color component of the current block.
  • the decoding unit 2101 is further configured to decode the bitstream and determine the value of the third syntax element identification information
  • 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.
  • the current block meets preset conditions, including at least: 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.
  • the second determination unit 2102 is further configured to, if the value of the third syntax element identification information is a 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 a 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.
  • the second determination unit 2102 is further configured to determine that if the value of the first syntax element identification information is a first value, then 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, then 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.
  • the second determination unit 2102 is further configured to 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 first value; and to 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 if the value of the second syntax element identification information is a second value.
  • the decoding unit 2101 is further configured to decode the bitstream and determine the value of the fourth syntax element identification information when the value of the second syntax element identification information is the second value;
  • 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 prediction value of the second color component of the current block.
  • the second prediction unit 2103 is further configured to decode the code stream and determine the value of the fifth 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; and determine the second intra-frame prediction mode of the second color component of the current block according to the value of the fifth syntax element identification information, 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 prediction value of the second color component of the current block; or, it is further configured to decode the code stream and determine the value of the sixth 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; and determine the third intra-frame prediction mode of the second color component of the current block according to the value of the sixth syntax element identification information, 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 prediction value of the second color component of the current block; wherein the second intra
  • 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.
  • the decoding unit 2101 is further configured to decode the code stream to obtain at least one character corresponding to the sixth grammatical element identification information; and use 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.
  • the second determination unit 2102 is further configured to decode the code stream 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, and 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, it is further configured to decode the code stream 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, and 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.
  • 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 prediction 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 prediction value of the second color component of the current block.
  • a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular.
  • the 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 one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • this embodiment provides a computer-readable storage medium, which is applied to the decoder 200, and the computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the method described in any one of the above embodiments is implemented.
  • 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.
  • 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 marked as the second bus system 2204 in Figure 22. Among them,
  • the second communication interface 2201 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the second memory 2202 is used to store a computer program that can be run on the second processor 2203;
  • the second processor 2203 is configured to, when running the computer program, execute:
  • the second processor 2203 is further configured to, when running the computer program, execute:
  • the second processor 2203 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
  • the present 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 in the IBC mode, then the target block vector parameters of the 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 code rate can be saved, the encoding and decoding efficiency can be improved, and the encoding and decoding performance can be improved.
  • a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application is shown.
  • the coding and decoding system 230 may include an encoder 2301 and a decoder 2302.
  • the encoder 2301 may be the encoder described in any one of the aforementioned embodiments
  • the decoder 2302 may be the decoder described in any one of the aforementioned embodiments.
  • 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 parameter of the first color component block is determined; according to the first block vector parameter of the first color component block, the target block vector parameter of the second color component of the current block is determined; according to the target block vector parameter, 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.
  • 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 parameter of the first color component block is determined; according to the first block vector parameter of the first color component block, the target block vector parameter of the second color component of the current block is determined; according to the target block vector parameter, 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.
  • the target block vector parameters of the chrominance component can be determined according to the block vector parameters of the luminance block, and the chrominance component is predicted and processed 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请实施例公开了一种编解码方法、码流、编码器、解码器以及存储介质,该方法包括:确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。这样,可以提高色度预测的准确性,从而能够提高编解码效率。

Description

编解码方法、码流、编码器、解码器以及存储介质 技术领域
本申请实施例涉及视频编解码技术领域,尤其涉及一种编解码方法、码流、编码器、解码器以及存储介质。
背景技术
随着人们对视频显示质量要求的提高,高清和超高清视频等新视频应用形式应运而生。国际标准组织ISO/IEC和ITU-T的联合视频研究组(Joint Video Exploration Team,JVET)制定了视频编码标准H.266/多功能视频编码(Versatile Video Coding,VVC)。其中,帧内块拷贝(Intra block copy,IBC)是VVC针对屏幕内容类型的视频序列提供的一种块级的编码模式。
在相关技术中,对于直接模式(Direct Mode,DM)而言,如果亮度块使用IBC模式,那么这时候的色度预测模式设置不合理,导致当前块的色度预测不准确,损失了编码效率。
发明内容
本申请实施例提供一种编解码方法、码流、编码器、解码器以及存储介质,能够节省码率,提高编解码效率,进而提升编解码性能。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种确定预测模式的方法,包括:
确定当前块的第一颜色分量块;
在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;
根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;
根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
第二方面,本申请实施例提供了一种解码方法,包括:
确定第一语法元素标识信息的取值;
在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值;
在第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式时,根据目标预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
第三方面,本申请实施例提供了一种编码方法,包括:
在当前块的第二颜色分量的预测模式为目标预测模式时,确定当前块的第一颜色分量块;
在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;
根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;
根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
第四方面,本申请实施例提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:
当前块的目标块向量参数、第一语法元素标识信息的取值、第二语法元素标识信息的取值、第三语法元素标识信息的取值、第四语法元素标识信息的取值、第五语法元素标识信息的取值和第六语法元素标识信息的取值。
第五方面,本申请实施例提供了一种编码器,包括第一确定单元和第一预测单元;其中,
第一确定单元,配置为在当前块的第二颜色分量的预测模式为目标预测模式时,确定当前块的第一颜色分量块;以及在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;
第一预测单元,配置为根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
第六方面,本申请实施例提供了一种编码器,包括第一存储器和第一处理器;其中,
第一存储器,用于存储能够在第一处理器上运行的计算机程序;
第一处理器,用于在运行计算机程序时,执行如第三方面所述的方法。
第七方面,本申请实施例提供了一种解码器,包括第二确定单元和第二预测单元;其中,
第二确定单元,配置为确定当前块的第一颜色分量块;以及在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;
第二预测单元,配置为根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
第八方面,本申请实施例提供了一种解码器,包括解码单元、第二确定单元和第二预测单元;其中,
第二确定单元,配置为确定第一语法元素标识信息的取值;
解码单元,配置为在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值;
第二预测单元,配置为在第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式时,根据目标预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
第九方面,本申请实施例提供了一种解码器,包括第二存储器和第二处理器;其中,
第二存储器,用于存储能够在第二处理器上运行的计算机程序;
第二处理器,用于在运行计算机程序时,执行如第一方面或第二方面所述的方法。
第十方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如第一方面所述的方法、或者实现如第二方面所述的方法、或者实现如第三方面所述的方法。
本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在编码端,在当前块的第二颜色分量的预测模式为目标预测模式时,确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。在解码端,确定第一语法元素标识信息的取值;在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值;在第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式时,确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。这样,在根据亮度预测模式确定色度预测模式的过程中,如果当前块对应的亮度块为IBC模式,那么可以根据亮度块的块向量参数来确定应用色度分量的目标块向量参数,并根据这个目标块向量参数对色度分量按照IBC扩展模式进行预测处理,确定当前块块的色度预测值;如此,不仅改善了色度预测的单一性问题,隐式地将IBC模式增加到色度预测中,充分利用了同位亮度块的相关信息,能够提高色度预测的准确性,而且还能够节省码率,提高编解码效率,进而提升编解码性能。
附图说明
图1为一种基于IBC模式获取重建样本的流程示意图;
图2为本申请实施例提供的一种相邻块的位置分布示意图;
图3为本申请实施例提供的一种亮度CU与色度CU的位置关系示意图;
图4A为本申请实施例提供的一种编码器的组成框图示意图;
图4B为本申请实施例提供的一种解码器的组成框图示意图;
图5为本申请实施例提供的一种编解码系统的网络架构示意图;
图5为本申请实施例提供的一种解码方法的流程示意图一;
图6为本申请实施例提供的一种确定预测模式的方法的流程示意图;
图7为本申请实施例提供的另一种亮度CU与色度CU的位置关系示意图;
图8为本申请实施例提供的又一种亮度CU与色度CU的位置关系示意图;
图9为本申请实施例提供的再一种亮度CU与色度CU的位置关系示意图;
图10为本申请实施例提供的一种偏移位置是否未覆盖当前块的结构示意图;
图11为本申请实施例提供的一种偏移位置是否超出IBC可用区域的结构示意图;
图12为本申请实施例提供的一种确定最优色度BV参数的结构示意图;
图13为本申请实施例提供的一种基于IBC扩展模式进行块复制的结构示意图;
图14为本申请实施例提供的一种确定预测模式的方法的详细流程示意图;
图15为本申请实施例提供的另一种确定预测模式的方法的详细流程示意图;
图16为本申请实施例提供的一种解码方法的流程示意图;
图17为本申请实施例提供的一种编码方法的流程示意图;
图18为本申请实施例提供的一种编码器的组成结构示意图;
图19为本申请实施例提供的一种编码器的具体硬件结构示意图;
图20为本申请实施例提供的一种解码器的组成结构示意图;
图21为本申请实施例提供的另一种解码器的组成结构示意图;
图22为本申请实施例提供的一种解码器的具体硬件结构示意图;
图23为本申请实施例提供的一种编解码系统的组成结构示意图。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
对本申请实施例进行进一步详细说明之前,先对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释:
编码块(Coding Block,CB);
帧内块拷贝(Intra block copy,IBC);
屏幕内容编码(Screen Content Coding,SCC);
块匹配(Block Maching,BM);
编码单元(Coding Unit,CU);
块向量(Block Vector,BV);
运动向量(Motion Vector,MV);
直接块矢量(Direct Block Vector,DBV);
高级运动矢量预测(IBC Advanced Motion Vector Prediction,AMVP);
分量间线性模型预测(Cross-Component Linear Model prediction,CCLM);
合并模式(MERGE Mode);
平面模式(PLANAR Mode);
H.266/多功能视频编码(Versatile Video Coding,VVC);
VVC的参考软件测试平台(VVC Test Model,VTM)。
可以理解,在视频图像中,一般采用第一颜色分量、第二颜色分量和第三颜色分量来表征编码块。其中,这三个颜色分量分别为一个亮度分量、一个蓝色色度分量和一个红色色度分量,具体地,亮度分量通常使用符号Y表示,蓝色色度分量通常使用符号Cb或者U表示,红色色度分量通常使用符号Cr或者V表示;这样,视频图像可以用YCbCr格式表示,也可以用YUV格式表示。
还可以理解,IBC是VVC针对屏幕内容类型的视频序列编码的扩展工具,它显著提高了屏幕内容序列的编码效率。具体地,IBC是一种块级的编码模式,和帧间技术类似,编码端执行运动搜索,具体是通过块匹配为每个CU寻找到其最佳的块向量,也可以称为运动向量。其中,块向量是从当前块指向参考块的向量。和帧间技术不同的地方在于,IBC的最佳块向量是在当前块所处帧(即当前编码帧)的重建区域搜索得到的,而帧间的运动向量是通过当前编码帧在时间域上的相邻参考帧搜索得到的。
在H.266/VVC中,IBC模式下获取当前块的重建像素的具体过程可以包括:推导块向量、利用块向量推导预测样本、推导残差样本和利用预测样本以及残差样本推导重建样本。
在一种具体的实现方式中,对于IBC模式下获取重建样本的流程,如图1所示,该流程可以包括:
S101:推导块向量。
对于亮度分量而言,输入包括:亮度位置(xCb,yCb),指定当前块的左上角样本相对于当前图像的左上角亮度样本;一个变量cbWidth,指定亮度样本中当前块的宽度;一个变量cbHeight,指定亮度样本中当前块的高度。输出包括:亮度块向量(Block Vector Luma,bvL)。需要说明的是,包含亮度样本的当前块又可称为“亮度块”。
在这里,IBC模式分为IBC MERGE模式和IBC AMVP模式,在推导bvL的时候均需要建立IBC块向量候选列表bvCandList,下面将针对IBC MERGE列表的建立流程进行详细介绍,其中,IBC AMVP列表的建立流程与IBC MERGE列表一致,但两者的最大候选数量不一致。
步骤一:当IsGt4by4等于TRUE时(变量IsGt4by4为当亮度块的宽度乘以高度大于16时为TRUE),使用亮度块位置(xCb,yCb)、亮度块的宽度cbWidth和高度cbHeight调用解码规范所规定的来自相邻编码单元的空间块向量候选的推导过程作为输入,输出是可用性标志availableFlagA 1、availableFlagB 1和块向量bvA 1和bvB 1。其中,A 1和B 1所在的相邻块与当前块的相对位置如图2所示。
步骤二:当IsGt4by4等于TRUE时,对于块向量候选列表bvCandList的构造,伪代码如下:
Figure PCTCN2022125208-appb-000001
步骤三:变量numCurrCand(当前已经得到的候选数量)推导过程如下:
若IsGt4by4等于TRUE,numCurrCand设置为等于bvCandList中的候选数;否则numCurrCand设置为0。
步骤四:当numCurrCand小于MaxNumIbcMergeCand(MERGE模式下的最大候选数量)、且NumHmvpIbcCand(IBC模式下的历史最优块向量Hmvp的最大候选数量)大于0时,以bvCandList和numCurrCand作为输入,修改后的bvCandList和numCurrCand作为输出,调用解码规范所规定的基于历史的IBC块向量候选的推导过程。
步骤五:当numCurrCand小于MaxNumIbcMergeCand时,以下适用直至numCurrCand等于MaxNumIbcMergeCand:
bvCandList[numCurrCand][0]设置为等于0(BV的水平分量);
bvCandList[numCurrCand][1]设置为等于0(BV的垂直分量);
numCurrCand增加1。
这样,块向量候选列表bvCandList建立完成,候选的索引bvIdx采用如下方式推导,general_merge_flag表示是否为IBC MERGE模式:
bvIdx=general_merge_flag[xCb][yCb]?merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb]
这样,根据索引bvIdx以及块向量候选列表bvCandList就可以得到具体的bvL:
bvL[0]=bvCandList[bvIdx][0];
bvL[1]=bvCandList[bvIdx][1]。
对于IBC AMVP模式,通过索引bvIdx以及块向量候选列表bvCandList就可以得到具体的bvL为预测bvL,而真实bvL还需要加上块向量差异(Block Vector Difference,BVD),其具体流程如下:
步骤一:得到BVD的水平和垂直分量。其中,MvdL0为前向运动向量差异,BVD的水平分量用bvd[0]表示,BVD的垂直分量用bvd[1]表示,具体如下:
bvd[0]=MvdL0[xCb][yCb][0];
bvd[1]=MvdL0[xCb][yCb][1]。
步骤二:对上述获取的预测bvL进行舍入操作。其中,右移参数AmvrShift进行舍入,左移参数AmvrShift用于提高分辨率。具体如下:
Offset=(AmvrShift==0)?0:((1<<(AmvrShift-1))-1);
bvL[0]=Sign(bvL[0])*(((Abs(bvL[0])+offset)>>AmvrShift)<<AmvrShift);
bvL[1]=Sign(bvL[1])*(((Abs(bvL[1])+offset)>>AmvrShift)<<AmvrShift)。
步骤三:对于真实bvL,其范围需要控制在-2 17到2 17–1之间,具体推导过程如下:
u[0]=(bvL[0]+bvd[0]+2 18)%2 18
bvL[0]=(u[0]>=2 17)?(u[0]-2 18):u[0];
u[1]=(bvL[1]+bvd[1]+2 18)%2 18
bvL[1]=(u[1]>=2 17)?(u[1]-2 18):u[1]。
对于色度分量而言,如果是双树划分,色度分量不进行IBC模式;如果是单树划分,需要推导色度分量的BV。
其中,输入包括:亮度的bvL(1/16像素精度)。输出包括:色度块向量(Block Vector Chroma,bvC)(1/32像素精度)。具体推导过程如下:
bvC[0]=((bvL[0]>>(3+SubWidthC))*32);
bvC[1]=((bvL[1]>>(3+SubHeightC))*32)。
S102:利用块向量推导预测样本。
在这里,输入包括:亮度位置(xCb,yCb),指定当前块的左上角样本相对于当前图像的左上角亮度样本;一个变量cbWidth,指定亮度样本中当前块的宽度;一个变量cbHeight,指定亮度样本中当前块的高度;块向量BV;一个变量cIdx,指定当前块的颜色分量索引。输出包括:预测样本的数组predSamples。
对于预测样本而言,具体推导过程如下:
当cIdx等于0即为亮度分量的时候,对于x=xCb…xCb+cbWidth-1以及y=yCb…yCb+cbHeight–1:
xVb=(x+(bv[0]>>4))&(IbcBufWidthY-1);
yVb=(y+(bv[1]>>4))&(CtbSizeY-1);
predSamples[x][y]=ibcVirBuf[0][xVb][yVb]。
其中,IbcBufWidthY为IBC存储的重建缓存单元(Buffer)的亮度像素的宽度,CtbSizeY为CTU(Coding Tree Unit)的大小,ibcVirBuf为IBC存储的重建像素。
当cIdx不等于0即为色度分量时,对于x=xCb/SubWidthC…xCb/SubWidthC+cbWidth/SubWidthC-1以及y=yCb/SubHeightC…yCb/SubHeightC+cbHeight/SubHeightC-1:
xVb=(x+(bv[0]>>5))&(IbcBufWidthC-1);
yVb=(y+(bv[1]>>5))&((CtbSizeY/subHeightC)-1);
predSamples[x][y]=ibcVirBuf[cIdx][xVb][yVb]。
其中,变量SubWidthC和SubHeightC具体取决于通过sps_chroma_format_idc指定的色度采样格式,具体对应关系如表1所示。
表1
sps_chroma_format_idc 颜色采样格式 SubWidthC SubHeightC
0 单色 1 1
1 4:2:0 2 2
2 4:2:2 2 1
3 4:4:4 1 1
S103:推导残差样本。
对于残差样本而言,可以调用解码规范所规定的残差解码过程。
S104:利用预测样本以及残差样本推导重建样本。
对于重建样本(即重建像素值)而言,可以调用解码规范所规定的指定颜色分量的图像重建过程。
在另一种具体的实现方式中,对于H.266/VVC中的色度预测模式的推导过程,输入包括:亮度位置(xCb,yCb),指定当前块的左上角样本相对于当前图像的左上角亮度样本;一个变量cbWidth,指定亮度样本中当前块的宽度;一个变量cbHeight,指定亮度样本中当前块的高度;变量treeType,指定是使用单树划分还是双树划分。输出包括:色度帧内预测模式IntraPredModeC[xCb][yCb]和MIP色度直接模式标志MipChromaDirectFlag[xCb][yCb]。
若treeType等于SINGLE_TREE,即单树划分的情况下,sps_chroma_format_idc等于3,即4:4:4格式,intra_chroma_pred_mode等于4,并且IntraMipFlag[xCb][yCb]等于1,即对应同位亮度中心块的预测模式为MIP模式,则:
①MIP色度直接模式标志MipChromaDirectFlag[xCb][yCb]设置为等于1,即色度使用亮度的MIP模式。
②色度帧内预测模式IntraPredModeC[xCb][yCb]设置为等于IntraPredModeY[xCb][yCb]。
否则:
①MIP色度直接模式标志MipChromaDirectFlag[xCb][yCb]设置为等于0。
②对应的亮度帧内预测模式lumaIntraPredMode推导如下:
若IntraMipFlag[xCb+cbWidth/2][yCb+cbHeight/2]等于1,则lumaIntraPredMode设置为等于INTRA_PLANAR。
否则,若CuPredMode[0][xCb+cbWidth/2][yCb+cbHeight/2]等于MODE_IBC或MODE_PLT,则将 lumaIntraPredMode设置为等于INTRA_DC。
否则,lumaIntraPredMode设置为等于IntraPredModeY[xCb+cbWidth/2][yCb+cbHeight/2]。
③色度帧内预测模式IntraPredModeC[xCb][yCb]推导如下:
若cu_act_enabled_flag[xCb][yCb]等于1,则色度帧内预测模式IntraPredModeC[xCb][yCb]设置为等于lumaIntraPredMode。
否则:
若BdpcmFlag[xCb][yCb][1]等于1,则IntraPredModeC[xCb][yCb]设置为等于BdpcmDir[xCb][yCb][1]?INTRA_ANGULAR50:INTRA_ANGULAR18。
否则cu_act_enabled_flag[xCb][yCb]等于0并且BdpcmFlag[xCb][yCb][1]等于0,色度帧内预测模式IntraPredModeC[xCb][yCb]使用cclm_mode_flag、cclm_mode_idx、表2中指定的intra_chroma_pred_mode和lumaIntraPredMode。
表2
Figure PCTCN2022125208-appb-000002
当sps_chroma_format_idc等于2时,使用表2中的色度帧内预测模式X可以推导出色度帧内预测模式Y,具体参见表3所示的模式X到模式Y的映射过程规范,然后将色度帧内预测模式X设置为等于色度帧内预测模式Y。
表3
mode X 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
mode Y 0 1 61 62 63 64 65 66 2 3 5 6 8 10 12 13 14
mode X 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
mode Y 18 20 22 23 24 26 28 30 31 33 34 35 36 37 38 39 40
mode X 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
mode Y 41 42 43 43 44 44 45 45 46 47 48 48 49 49 50 51 51
mode X 54 55 56 57 58 59 60 61 62 63 64 65 66        
mode Y 52 53 54 55 55 56 56 57 57 58 59 59 60        
在又一种具体的实现方式中,对于DM模式而言,DM模式指的是直接使用对应位置的亮度预测模式信息:
当I帧使用双树划分时,允许亮度分量和色度分量使用独立的块划分结构。此时,色度CU对应位置的亮度分量可能包含多个亮度CU,如图3所示,在H.266/VVC中,色度CU继承相应亮度块中心位置CU的帧内预测模式,即intra_chroma_pred_mode等于4。
其中,DM模式所取CU位置具体描述如下:
亮度位置(xCb,yCb),指定当前块对应的亮度区域的左上角亮度样本相对于当前图像的左上角亮度样本的位置;一个变量cbWidth,指定亮度样本中当前块的宽度;一个变量cbHeight,指定亮度样本中当前块的高度。
当前色度CU及对应的亮度区域的位置关系如图3所示,当前色度CU对应的亮度区域的中心亮度像素位置描述如下,其中,xCenter表示水平坐标位置,yCenter表示垂直坐标位置,包含该像素位置的CU为色度CU对应亮度块中心位置的CU:
xCenter=xCb+cbWidth>>1;
yCenter=yCb+cbHeight>>1。
在又一种具体的实现方式中,对于H.266/VVC中色度预测的解码过程,其解码流程如表4所示。另外,对于语法元素Value of intra_chroma_pred_mode的取值,其对应的二值化映射表如表5所示;对于不同的语法元素(例如cclm_mode_flag、cclm_mode_idx和intra_chroma_pred_mode等),每一位编码比特所采用的编码方式具体如表6所示。
表4
Figure PCTCN2022125208-appb-000003
表5
Value of intra_chroma_pred_mode Bin string
0 100
1 101
2 110
3 111
4 0
表6
Figure PCTCN2022125208-appb-000004
其中,binIdx表示比特位数,若binIdx=0,则表示第0位比特;若binIdx=1,则表示第1位比特。另外,bypass表示旁路模式,na表示不作处理。
相关技术中,在双树划分下:对于DM模式,如果对应亮度块为IBC模式,那么获取的色度预测模式为DC模式,此时损失了编码效率。而对于色度预测,采用固定的DC模式进行预测,这样不仅会导致预测像素均为同一个值,无法表达当前块的色度纹理特征内容;并且在色度预测中,并未使用IBC模式的同位亮度块的信息,同样也没有类似于IBC这种块拷贝的预测算法,从而无法有效地压缩类似于屏幕内容的视频序列。简单来说,目前的色度预测模式比较单一,使得当前块的色度预测不准确,从而损失了编码效率。
基于此,本申请实施例提供了一种编码方法,在当前块的第二颜色分量的预测模式为目标预测模式时,确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
本申请实施例还提供了一种解码方法,确定第一语法元素标识信息的取值;在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值;在第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式时,确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
这样,在根据亮度预测模式确定色度预测模式的过程中,如果当前块对应的亮度块为IBC模式,那么可以根据亮度块的块向量参数来确定应用色度分量的目标块向量参数,并根据这个目标块向量参数对色度分量按照IBC扩展模式进行预测处理,确定当前块块的色度预测值;如此,不仅改善了色度预 测的单一性问题,隐式地将IBC模式增加到色度预测中,充分利用了同位亮度块的相关信息,能够提高色度预测的准确性,而且还能够节省码率,提高编解码效率,进而提升编解码性能。
下面将结合附图对本申请各实施例进行详细说明。
参见图4A,其示出了本申请实施例提供的一种编码器的组成框图示意图。如图4A所示,编码器(具体为“视频编码器”)100可以包括变换与量化单元101、帧内估计单元102、帧内预测单元103、运动补偿单元104、运动估计单元105、反变换与反量化单元106、滤波器控制分析单元107、滤波单元108、编码单元109和解码图像缓存单元110等,其中,滤波单元108可以实现去方块滤波及样本自适应缩进(Sample Adaptive 0ffset,SAO)滤波,编码单元109可以实现头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmetic Coding,CABAC)。针对输入的原始视频信号,通过编码树单元(Coding Tree Unit,CTU)的划分可以得到一个视频编码块,然后对经过帧内或帧间预测后得到的残差像素信息通过变换与量化单元101对该视频编码块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内估计单元102和帧内预测单元103是用于对该视频编码块进行帧内预测;明确地说,帧内估计单元102和帧内预测单元103用于确定待用以编码该视频编码块的帧内预测模式;运动补偿单元104和运动估计单元105用于执行所接收的视频编码块相对于一或多个参考帧中的一或多个块的帧间预测编码以提供时间预测信息;由运动估计单元105执行的运动估计为产生运动向量的过程,所述运动向量可以估计该视频编码块的运动,然后由运动补偿单元104基于由运动估计单元105所确定的运动向量执行运动补偿;在确定帧内预测模式之后,帧内预测单元103还用于将所选择的帧内预测数据提供到编码单元109,而且运动估计单元105将所计算确定的运动向量数据也发送到编码单元109;此外,反变换与反量化单元106是用于该视频编码块的重构建,在像素域中重构建残差块,该重构建残差块通过滤波器控制分析单元107和滤波单元108去除方块效应伪影,然后将该重构残差块添加到解码图像缓存单元110的帧中的一个预测性块,用以产生经重构建的视频编码块;编码单元109是用于编码各种编码参数及量化后的变换系数,在基于CABAC的编码算法中,上下文内容可基于相邻编码块,可用于编码指示所确定的帧内预测模式的信息,输出该视频信号的码流;而解码图像缓存单元110是用于存放重构建的视频编码块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频编码块,这些重构建的视频编码块都会被存放在解码图像缓存单元110中。
参见图4B,其示出了本申请实施例提供的一种解码器的组成框图示意图。如图4B所示,解码器(具体为“视频解码器”)200包括解码单元201、反变换与反量化单元202、帧内预测单元203、运动补偿单元204、滤波单元205和解码图像缓存单元206等,其中,解码单元201可以实现头信息解码以及CABAC解码,滤波单元205可以实现去方块滤波以及SAO滤波。输入的视频信号经过图4A的编码处理之后,输出该视频信号的码流;该码流输入解码器200中,首先经过解码单元201,用于得到解码后的变换系数;针对该变换系数通过反变换与反量化单元202进行处理,以便在像素域中产生残差块;帧内预测单元203可用于基于所确定的帧内预测模式和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元204是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换与反量化单元202的残差块与由帧内预测单元203或运动补偿单元204产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过滤波单元205以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元206中,解码图像缓存单元206存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,即得到了所恢复的原始视频信号。
进一步地,本申请实施例还提供了一种包含编码器和解码器的编解码系统的网络架构,其中,图5示出了本申请实施例提供的一种编解码系统的网络架构示意图。如图5所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有视频编解码功能的设备,例如,所述电子设备可以包括智能手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作具体限定。在这里,本申请实施例所述的解码器或编码器就可以为上述电子设备。
需要说明的是,本申请实施例的方法主要应用在如图4A所示的帧内预测单元103部分和如图4B所示的帧内预测单元203部分。也就是说,本申请实施例既可以应用于编码器,也可以应用于解码器,甚至还可以同时应用于编码器和解码器,但是本申请实施例不作具体限定。
还需要说明的是,当应用于帧内预测单元103部分时,“当前块”具体是指当前待进行帧内预测的编码块;当应用于帧内预测单元203部分时,“当前块”具体是指当前待进行帧内预测的解码块。
在本申请的一实施例中,参见图6,其示出了本申请实施例提供的一种确定预测模式的方法的流程 示意图。如图6所示,该方法可以包括:
S601:确定当前块的第一颜色分量块。
需要说明的是,本申请实施例的方法可以应用于编码器或解码器。另外,这里的预测模式具体可以是指一种帧内预测模式。其中,假定第一颜色分量为亮度分量,第二颜色分量为色度分量,那么更具体地,这里是一种确定色度帧内预测模式的方法。
还需要说明的是,在本申请实施例中,当前块至少包括第一颜色分量和第二颜色分量。对于当前块的第一颜色分量,这时候的块可简称为第一颜色分量块;而且在第一颜色分量为亮度分量时,那么第一颜色分量块又可称为亮度块。同理,对于当前块的第二颜色分量,这时候的块可简称为第二颜色分量块;而且在第二颜色分量为色度分量时,那么第二颜色分量块又可称为色度块。
还需要说明的是,在双树划分下,对于DM模式,当同位置亮度块的预测模式为IBC模式时,本申请实施例可以根据同位置亮度块的预测模式来确定当前块的色度帧内预测模式,能够改善色度预测的单一性,从而能够提升编码效率。
在一些实施例中,确定当前块的第一颜色分量块,可以包括:确定当前块的同位置的第一颜色分量区域;从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块。
需要说明的是,在本申请实施例中,对于当前块而言,在同位置的第一颜色分量区域,可以对其进行块划分,例如采用二叉树结构、三叉树结构、四叉树结构等进行块划分,能够得到多个块,每一个块可以看作是一个CU;然后从这多个CU中确定出当前块的第一颜色分量块。
示例性地,以图3为例,用斜线填充的区域表示色度CU的同位置亮度区域。在该同位置亮度区域中,可以划分有多个块;可以从这些块中选取中心位置的块作为当前块的对应亮度块,例如图3中用黑色填充的块即为当前块的对应亮度块。
进一步地,在一些实施例中,从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块,可以包括:在第一颜色分量区域划分的多个块中选取目标块,将目标块作为当前块的第一颜色分量块。
其中,目标块可以是任意位置的块。在一种具体的实施例中,将第一颜色分量区域中处于中心位置的块选取为目标块;或者,将第一颜色分量区域中处于左上角位置的块选取为目标块;或者,将第一颜色分量区域中处于右下角位置的块选取为目标块。
应理解,在本申请实施例中,对于作为第一颜色分量块的目标块,可以是图3所示多个块中的任意位置的块。例如,如图3所示的同位亮度区域中处于中心位置的块(用黑色填充的块),如图7所示的同位亮度区域中处于左上角位置的块(用黑色填充的块),如图8所示的同位亮度区域中处于右下角位置的块(用黑色填充的块),甚至还可以是同位亮度区域中处于右上角位置的块、处于左下角位置的块,更甚者可以是处于左上区域的中心位置的块等等,这里对此不作具体限定。
进一步地,在一些实施例中,从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块,可以包括:从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块;根据预设顺序依次获取至少一个候选块并进行模式判断,若判断出的首个候选块使用IBC模式,则将首个候选块作为当前块的第一颜色分量块。
应理解,在本申请实施例中,对于第一颜色分量块,还可以是针对处于预设位置的至少一个候选块进行模式判断确定的。例如,如图9所示,这里包括五个亮度像素位置的CU,具体为:C、TL、TR、BL和BR。但是本申请实施例并不局限于五个位置,可以是多个不同位置;而且也并不局限于图9所示的五个位置,对此均不作具体限定。
还应理解,在本申请实施例中,对于图9所示的五个位置,可以按照预设顺序依次获取,直到判断出的候选块为IBC模式为止,即查找到首个亮度像素位置的CU为IBC模式,将这首个亮度像素位置的CU作为当前块的对应亮度块。
另外,在本申请实施例中,预设顺序可以包括但不局限于以下顺序:C->TL->TR->BL->BR。其中,对于C、TL、TR、BL、BR的详细位置推导过程:
假设当前块左上角位置对应的同位亮度像素相对于图像左上角亮度像素的位置(即亮度像素TL的位置)为(xCb,yCb),当前块对应的同位亮度区域(即图9中亮度分量的整个斜线填充区域)的宽度为cbWidth,高度为cbHeight。
亮度像素C的位置的坐标信息为(xCb+cbWidth/2,yCb+cbHeight/2);
亮度像素TL的位置的坐标信息为(xCb,yCb);
亮度像素TR的位置的坐标信息为(xCb+cbWidth-1,yCb);
亮度像素BL的位置的坐标信息为(xCb,yCb+cbHeight-1);
亮度像素BR的位置的坐标信息为(xCb+cbWidth-1,yCb+cbHeight-1)。
这样,对于当前块而言,首先需要确定出对应的第一颜色分量块。其中,在第一颜色分量为亮度分 量时,这里需要确定出对应位置的亮度块(即亮度CU)。
S602:在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数。
需要说明的是,在本申请实施例中,在确定出第一颜色分量块之后,需要判断第一颜色分量块的预测模式。其中,如果第一颜色分量块的预测模式为IBC模式,那么需要进一步确定第一颜色分量块的第一块向量参数。
应理解,在本申请实施例中,如果第一颜色分量块的预测模式为IBC模式,那么可以获取到第一颜色分量块的第一块向量参数。其中,第一块向量参数表示当前块指向参考块的向量,而且参考块是在当前块所处帧(即当前图像)的重建区域搜索得到的。
还应理解,在本申请实施例中,如果第一颜色分量块存在有多个,那么第一块向量参数也可以是由这多个第一颜色分量块的BV进行求均值得到的。因此,在一些实施例中,从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块,可以包括:从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块,将这至少一个候选块确定为当前块的第一颜色分量块。
在一种可能的实现方式中,在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数,可以包括:从这至少一个候选块中,确定使用IBC模式的至少一个目标块,并确定至少一个目标块各自的第一块向量参数;根据至少一个目标块各自的第一块向量参数进行均值计算,将计算结果作为第一颜色分量块的第一块向量参数。
需要说明的是,在本申请实施例中,对于当前块的第一颜色分量块,这里并不局限于一个块,也可以是由多个块组成。其中,在由多个块组成时,这时候的多个块的预测模式全部都为IBC模式。示例性地,首先获取同位亮度区域中的多个亮度CU,然后对其的第一块向量参数求取平均值,作为最终获取的第一块向量参数。
在另一种可能的实现方式中,对于最终获取的第一块向量参数,也可以是通过模板匹配方式选取最佳块向量参数来确定的。因此,在一些实施例中,在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数,还可以包括:从至少一个候选块中,确定使用IBC模式的至少一个目标块;根据模板匹配方式对至少一个目标块进行搜索,确定最佳块向量参数,将最佳块向量参数作为第一颜色分量块的第一块向量参数。
在这里,仍以图9为例,对于C、TL、TR、BL、BR这五个位置的亮度CU,在这五个亮度CU均使用IBC模式时,获取同位亮度区域中的多个亮度CU,然后通过模板匹配方式选取最佳块向量参数,作为最终获取的第一块向量参数。其中,对于这多个亮度CU的位置并不局限于C、TL、TR、BL、BR这五个位置,也可以是其他位置,本申请实施例不作具体限定。
可以理解地,在本申请实施例中,在确定出第一颜色分量块之后,需要判断第一颜色分量块的预测模式。其中,如果第一颜色分量块的预测模式为IBC模式,那么继续执行图6所示的流程,需要确定第一颜色分量块的第一块向量参数;否则,如果第一颜色分量块的预测模式不为IBC模式,那么不再执行图6所示的流程,可以根据第一预设模式对当前块的第二颜色分量进行预测处理,确定当前块的第二颜色分量的预测值。
在一些实施例中,第一预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式、CCLM模式和跳过模式,但是并不局限于此。
示例性地,在第一颜色分量块的预测模式不为IBC模式时,第一预设模式可以包括但不局限于PLANAR模式、分量间预测模式(如CCLM模式)或者其他角度预测模式等,然后获取参考像素及相关参数进行预测处理;此外,第一预设模式还可以为跳过模式,即当前块可以跳过该模式的预测处理。
S603:根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数。
需要说明的是,在本申请实施例中,在确定出第一颜色分量块的第一块向量参数之后,需要进一步确定出应用于第二颜色分量的目标块向量参数。在一些实施例中,根据第一颜色分量块的第一块向量参数,确定当前块的目标块向量参数,可以包括:将第一颜色分量块的第一块向量参数直接作为当前块的目标块向量参数;或者,对第一颜色分量块的第一块向量参数进行调整,确定当前块的目标块向量参数。
应理解,在本申请实施例中,对于当前块的目标块向量参数,可以不对第一颜色分量块的第一块向量参数进行调整,这时候可以将第一颜色分量块的第一块向量参数直接作为当前块的目标块向量参数。
还应理解,在本申请实施例中,对于当前块的目标块向量参数,可以是对第一颜色分量块的第一块向量参数进行调整后得到的,关于调整方式包括但不限于:
在一种可能的实现方式中,对第一颜色分量块的第一块向量参数进行调整,确定当前块的目标块向量参数,可以包括:确定当前块的颜色采样格式;根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理,确定当前块的目标块向量参数。
在另一种可能的实现方式中,对第一颜色分量块的第一块向量参数进行调整,确定当前块的目标块 向量参数,可以包括:在根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理后,得到当前块的初始块向量参数;对当前块的初始块向量参数进行修正处理,确定当前块的目标块向量参数。
应理解,在本申请实施例中,在根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理后,对于所得到的初始块向量参数,可以根据当前块的初始块向量参数直接确定当前块的目标块向量参数。
还应理解,在本申请实施例中,在根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理后,对于所得到的初始块向量参数,还可以对当前块的初始块向量参数进行修正处理,以确定出当前块的目标块向量参数。
还应理解,在本申请实施例中,假设第一颜色分量为亮度分量,第二颜色分量为色度分量,那么在获取到对应的第一块向量参数(即亮度BV参数)之后,可以对亮度BV参数进行调整,得到应用于色度分量的目标块向量参数(即色度BV参数)。假设亮度BV参数为(BVL hor,BVL ver),色度BV参数为(BVC hor,BVC ver),其中,BVL hor表示亮度BV参数的水平块向量,BVL ver表示亮度BV参数的垂直块向量;BVC hor表示色度BV参数的水平块向量,BVC ver表示色度BV参数的垂直块向量。
这样,根据颜色采样格式对亮度BV参数进行缩放处理,亮度BV参数与缩放后的色度BV参数之间的映射关系如表7所示。
表7
sps_chroma_format_idc 颜色采样格式 BVC hor BVC ver
0 单色 - -
1 4:2:0 BVL hor>>1 BVL ver>>1
2 4:2:2 BVL hor>>1 BVL ver
3 4:4:4 BVL hor BVL ver
其中,语法元素sps_chroma_format_idc用于指示颜色采样格式的类型,这里的颜色采样格式具体为色度采样格式。在这里,色度采样格式的类型不同,其对应的缩放操作也是不同的。
示例性地,若sps_chroma_format_idc的取值为0,则确定色度采样格式为单色,这时候不会执行图6所示的流程,即不存在色度BV参数(BVC hor,BVC hor);若sps_chroma_format_idc的取值为1,则确定色度采样格式为4:2:0,这时候亮度BV参数与色度BV参数之间的映射关系为:BVC hor=BVL hor>>1,BVC hor=BVL ver>>1;若sps_chroma_format_idc的取值为2,则确定色度采样格式为4:2:2,这时候亮度BV参数与色度BV参数之间的映射关系为:BVC hor=BVL hor>>1,BVC hor=BVL ver;若sps_chroma_format_idc的取值为3,那么表示色度采样格式为4:4:4,这时候亮度BV参数与色度BV参数之间的映射关系为:BVC hor=BVL hor,BVC hor=BVL ver
示例性地,在得到根据色度采样格式缩放后的色度BV参数之后,可以直接使用,或者也可以对其进行进一步的修正。其中,这里的修正可以包括但不限于以下方式:采用IntraTMP模式进行修正,即得到色度BV参数后,然后利用当前块的位置和得到的色度BV参数查找到偏移位置,再采用模板匹配方式在该偏移位置附近进行细搜索,确定出最优色度BV参数,将最优色度BV参数作为最终得到的色度BV参数,即当前块的目标块向量参数。
S604:根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
需要说明的是,在本申请实施例中,IBC扩展模式可以是指本申请实施例新引入的一种预测模式,可以用INTRA_DBV表示。在这种预测模式下,根据所确定的目标块向量参数对当前块的第二颜色分量进行预测处理,从而确定出当前块的第二颜色分量的预测值。
还需要说明的是,在本申请实施例中,在得到当前块的目标块向量参数之后,还需要判断目标块向量参数是否可用,即目标块向量参数是否满足可用条件。在一些实施例中,该方法还可以包括:在确定当前块的目标块向量参数之后,判断目标块向量参数是否满足可用条件;在目标块向量参数满足可用条件时,执行根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值的步骤。
具体来讲,在本申请实施例中,只有在目标块向量参数满足可用条件时,才可以根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,以确定出当前块的第二颜色分量的预测值。
进一步地,在一些实施例中,目标块向量参数是否满足可用条件,至少可以包括:
根据目标块向量参数指示的偏移位置是否未超出图像边界;
根据目标块向量参数指示的偏移位置是否未覆盖当前块;
根据目标块向量参数指示的偏移位置是否未超出IBC模式的可用区域;
根据目标块向量参数指示的偏移位置是否已经重建。
应理解,在本申请实施例中,只有上述条件全部成立的情况下,这时候才可以确定目标块向量参数满足可用条件,即目标块向量参数可用。在一种具体的实施例中,对于目标块向量参数满足可用条件,至少包括:根据目标块向量参数指示的偏移位置未超出图像边界;以及根据目标块向量参数指示的偏移位置未覆盖当前块;以及根据目标块向量参数指示的偏移位置未超出IBC模式的可用区域;以及根据目标块向量参数指示的偏移位置已经重建。
示例性地,图10示出了本申请实施例提供的一种偏移位置是否未覆盖当前块的结构示意图。如图10所示,用黑色填充的块表示当前块,用斜线填充区域表示可用区域,无填充区域表示不可用区域。对于当前块而言,如果目标块向量参数指示的偏移位置处于不可用区域,那么就会发生偏移位置覆盖当前块的情况。
示例性地,图11示出了本申请实施例提供的一种偏移位置是否超出IBC可用区域的结构示意图。如图11所示,用黑色填充的块表示当前块,用斜线填充区域表示可用区域,而且可用区域内的参考块均已经重建。在本申请实施例中,考虑到Buffer的存储能力,通常情况下,可以将当前块(m,n)相邻的这些参考块,具体为:参考块(m-2,n-2)、参考块(m-1,n-2)、参考块(m,n-2)、参考块(m+1,n-2)、参考块(m-2,n-1)、参考块(m-1,n-1)、参考块(m,n-1)、参考块(m+1,n-1)、参考块(m-2,n)、参考块(m-1,n)等作为IBC模式的可用区域。
还应理解,在本申请实施例中,在根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理后,对于所得到的初始块向量参数,需要对其进行进一步的修正处理。其中,在修正处理之前,该方法还可以包括:判断初始块向量参数是否满足可用条件;在初始块向量参数满足可用条件时,对当前块的初始块向量参数进行修正处理,确定当前块的目标块向量参数;或者,在初始块向量参数不满足可用条件时,对当前块的初始块向量参数进行调整处理,直至调整后的块向量参数满足可用条件;再对调整后的块向量参数进行修正处理,确定当前块的目标块向量参数。
示例性地,在得到根据色度采样格式缩放后的色度BV参数之后,若色度BV参数满足可用条件,那么采用IntraTMP模式进行修正,即得到修正后的色度BV参数后,利用当前块的位置和修正后的色度BV参数查找到偏移位置,然后采用模板匹配方式在该偏移位置附近进行细搜索,可以得到最优色度BV参数,将该细搜索后得到的最优偏移位置处的参考块进行拷贝,即得到当前块的色度预测块。如图12所示,用斜线填充的区域表示色度重建区域,对于当前块来说,可以采用模板匹配方式查找到最佳匹配模板以及对应的最佳BV,根据最佳BV(即IntraTMP BV)即可确定当前块的参考块,进而能够确定出当前块的色度预测值。
还可以理解地,在本申请实施例中,从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块,然后根据预设顺序依次获取至少一个候选块并进行模式判断,若判断出的首个候选块使用IBC模式,则将首个候选块作为当前块的第一颜色分量块。在该过程中,还需要判断首个候选块的BV参数是否满足可用条件,以便确定是否需要继续执行下一候选块的模式判断。
在一些实施例中,该方法还可以包括:在判断出的首个候选块使用IBC模式时,确定首个候选块的第一块向量参数;判断首个候选块的第一块向量参数是否满足可用条件;若首个候选块的第一块向量参数满足可用条件,则将首个候选块作为当前块的第一颜色分量块;若首个候选块的第一块向量参数不满足可用条件,则继续进行下一候选块的模式判断,直至确定出使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,将目标候选块作为当前块的第一颜色分量块。
进一步地,在一些实施例中,该方法还可以包括:若至少一个候选块中不存在使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,则根据第一预设模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;其中,第一预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式、CCLM模式和跳过模式。
在本申请实施例中,仍以图9为例,这里包含五个亮度像素位置的CU(包括但不限于五个位置,可以是多个不同位置),并且依次获取的顺序包括但不限于以下顺序:
C->TL->TR->BL->BR。
首先判断获取的五个位置的CU中是否有使用IBC模式的CU;如果没有,那么不获取亮度CU,采用第一预设模式对当前块进行色度预测,包括但不限于PLANAR模式、分量间预测模式(如CCLM模式)或者其他角度预测模式等,甚至还可以跳过该模式,即编码端和解码端同时做判断。
如果五个位置中存在某个或某几个CU为使用IBC模式,那么可以重新依次获取这五个位置(直到找到第一个符合下述条件的CU),此时不仅判断该CU是否使用IBC模式,而且还会对该CU的亮度BV参数进行调整,确定应用于色度的BV参数;然后判断色度BV参数是否可用。
如果色度BV参数可用,那么选定此CU作为最终获取BV的亮度块。
如果色度BV参数不可用,那么不获取亮度CU,包括但不限于PLANAR模式或分量间预测模式或 其他角度预测模式,甚至还可以跳过该模式;或者找到第一个为使用IBC模式的CU,调整其BV直至可用,选定此CU为最终获取BV的亮度块。
进一步地,在一些实施例中,根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值,可以包括:根据目标块向量参数和当前块的位置信息,确定当前块的偏移位置;根据当前块的偏移位置进行块复制处理,得到第一预测块;根据第一预测块,确定当前块的第二颜色分量的预测值。
在本申请实施例中,如果当前块的第二颜色分量是按照IBC扩展模式进行预测,那么可以获取当前块的位置信息(xCb,yCb),以及获取色度BV参数(BVC hor,BVC ver);从而能够查找到偏移位置(xCb+BVChor,yCb+BVCver)进行块复制,具体如图13所示。
示例性地,cbWidth表示色度样本中当前块的宽度,cbHeight表示色度样本中当前块的高度,predSamples[x][y]表示当前块的色度预测值,具体过程如下:
对于x=xCb…xCb+cbWidth-1以及y=yCb…yCb+cbHeight-1:
xVb=(xCb+BVChor)&(IbcBufWidthC-1);
yVb=(yCb+BVCver)&(CtbSizeC-1);
predSamples[x][y]=ibcVirChromaBuf[xVb][yVb]。
其中,IbcBufWidthC为IBC存储的重建buffer的色度像素的宽度,CtbSizeC为CTU的色度像素的大小,ibcVirChromaBuf为IBC存储的重建色度像素。
进一步地,在一些实施例中,根据第一预测块,确定当前块的第二颜色分量的预测值,可以包括:对第一预测块进行修正操作,确定当前块的第二颜色分量的预测值。
在一种具体的实施例中,根据第一预测块,确定当前块的第二颜色分量的预测值,可以包括:根据第二预设模式对当前块的第二颜色分量进行帧内预测处理,得到第二预测块;对第一预测块与第二预测块进行加权融合处理,确定当前块的第二颜色分量的预测值;其中,第二预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式和CCLM模式。
应理解,在本申请实施例中,对于当前块的第二颜色分量的预测值,如果是通过目标块向量参数进行块复制得到的,可以采用包括但不限于与常规预测模式加权的方式对预测值进行修正处理。
还应理解,在本申请实施例中,对于当前块的第二颜色分量的预测值,这里的修正处理,也可以是将预测值限定在一预设数值范围内,例如0到(1<<BitDepth)-1之间,其中,BitDepth为色度分量所要求的比特深度;甚至还可以是进行滤波增强处理,以提高该模式下的色度预测质量;对此并不作具体限定。
示例性地,以确定当前块的色度预测值为例,如果是通过BV进行块复制得到的,那么可以采用包括但不限于与常规色度预测模式加权的方式,对色度预测值进行修正处理;如果是PLANAR模式或分量间预测模式或其他角度预测模式所得到的预测值,可以采用包括但不限于与其他常规色度预测模式加权的方式,对色度预测值进行修正处理。
本实施例提供了一种确定预测模式的方法,在根据亮度预测模式确定色度预测模式的过程中,如果当前块对应的亮度块为IBC模式,那么可以根据亮度块的块向量参数来确定应用色度分量的目标块向量参数,并根据这个目标块向量参数对色度分量按照IBC扩展模式进行预测处理,确定当前块块的色度预测值;如此,不仅改善了色度预测的单一性问题,隐式地将IBC模式增加到色度预测中,充分利用了同位亮度块的相关信息,能够提高色度预测的准确性,而且还能够节省码率,提高编解码效率,进而提升编解码性能。
在本申请的另一实施例中,基于前述实施例中所述确定预测模式的方法,这里可以是引入一种新的预测模式INTRA_DBV。假设第一颜色分量为亮度分量,第二颜色分量为色度分量,下面针对使用INTRA_DBV模式进行色度预测为例进行详细描述。
对于INTRA_DBV模式,预测流程可以包括:获取对应亮度块CU、判断对应亮度块CU的预测模式是否为IBC模式(如果是IBC模式,那么获取对应亮度块的BV参数;如果不是IBC模式,那么采用第一预设模式进行色度编码,如采用PLANAR模式或其他色度预测模式替代或跳过该模式)、如果是IBC模式,对BV参数进行调整应用于色度、判断调整后的BV参数是否可用(如果可用或者不可用调整BV直至可用,那么继续进行色度IBC预测;后者不可用的情况也可采用PLANAR模式或者其他色度预测模式替代或跳过该模式,然后进行相应的色度预测或跳过处理)。
在一种具体的实施例中,图14为本申请实施例提供的一种确定预测模式的方法的详细流程示意图。如图14所示,该详细流程可以包括:
S1401:获取当前块的对应亮度块。
S1402:判断对应亮度块是否为IBC模式。
S1403:获取对应亮度块的第一BV参数。
S1404:对第一BV参数进行调整,确定应用于色度的第二BV参数。
S1405:判断第二BV参数是否可用。
S1406:调整第二BV参数,直至第二BV参数可用。
S1407:根据第二BV参数对当前块进行IBC扩展模式的色度预测。
S1408:使用第一预设模式对当前块进行色度预测。
需要说明的是,在本申请实施例中,对应亮度块用于指示当前块的色度分量的同位亮度CU。对于S1402来说,如果判断结果为是,那么可以执行S1403~S1407;如果判断结果为否,那么可以执行S1408。对于S1405来说,如果判断结果为是,那么可以执行S1407;如果判断结果为否,那么可以先执行S1406,然后再执行S1407。
在另一种具体的实施例中,图15为本申请实施例提供的另一种确定预测模式的方法的详细流程示意图。如图15所示,该详细流程可以包括:
S1501:获取当前块的对应亮度块。
S1502:判断对应亮度块是否为IBC模式。
S1503:获取对应亮度块的第一BV参数。
S1504:对第一BV参数进行调整,确定应用于色度的第二BV参数。
S1505:判断第二BV参数是否可用。
S1506:使用第二预设模式对当前块进行色度预测。
S1507:根据第二BV参数对当前块进行IBC扩展模式的色度预测。
S1508:使用第一预设模式对当前块进行色度预测。
需要说明的是,在本申请实施例中,对应亮度块用于指示当前块的色度分量的同位亮度CU。对于S1502来说,如果判断结果为是,那么可以执行S1503~S1507;如果判断结果为否,那么可以执行S1508。对于S1505来说,如果判断结果为是,那么可以执行S1507;如果判断结果为否,那么可以先执行S1506。
还需要说明的是,在本申请实施例中,第一预设模式与第二预设模式可以相同,也可以不相同。示例性地,第一预设模式可以为PLANAR模式或其他色度预测模式替代或跳过该模式,第二预设模式可以为PLANAR模式或其他色度预测模式替代或跳过该模式,但是对此均不作具体限定。
可以理解地,基于图14或图15所示的详细流程,具体过程如下:
对于获取对应亮度块,这里获取的亮度CU可以为任意位置,包括但不限于以下位置:如图3所示的获取同位亮度区域中处于中心位置的CU,如图7所示的同位亮度区域中处于左上角位置的CU,如图8所示的同位亮度区域中处于右下角位置的CU,如图9所示的同位亮度区域中处于预设位置的CU等等,这里对此不作具体限定。
对于判断对应亮度块是否为IBC模式,即判断对应亮度块的预测模式是否为IBC模式。在获取对应位置的CU之后,判断是否为IBC模式,如果是IBC模式,那么获取对应亮度块的第一BV参数,如果不是IBC模式,则采用第一预设模式对色度分量进行编码,包括但不限于PLANAR模式或CCLM模式或者其他角度预测模式替代,需要获取参考像素及参数进行色度预测;还可以跳过该模式,即编码端和解码端同时做判断。
对于第一BV参数进行调整应用于色度,在获取对应亮度块的第一BV参数后,对第一BV参数进行调整以得到应用于色度的第二BV参数。其中,假设第一BV参数为(BVL hor,BVL ver),第二BV参数为(BVC hor,BVC ver),包括但不限于以下调整方式:
方式一,如表7所示,根据颜色采样格式对第一BV参数进行缩放,得到应用于色度的第二BV参数。
方式二,对第二BV参数进行修正。在得到根据颜色采样格式缩放后的第二BV参数后,可以直接使用,还可以对其进行进一步的修正。其中,在修正前,需要先来判断第二BV参数是否可用,如果可用进行修正,或者不可用调整至可用后再进行修正。这里的修正包括但不限于:采用IntraTMP模式进行修正,即得到第二BV参数后,利用当前块的位置和第二BV参数查找到偏移位置,然后采用模板匹配方式在该偏移位置附近进行细搜索,可以得到最优BV参数,将该细搜索后得到的最优偏移位置处的参考块进行拷贝,即得到当前块的色度预测块,具体如图12所示。
对于判断第二BV参数是否可用,获取当前块的位置(xCb,yCb),获取第二BV参数为(BVC hor,BVC ver),找到对应偏移位置(xCb+BVC hor,yCb+BVC ver),判断以下条件,如果均成立则第二BV参数可用:
得到的偏移位置是否不超出图像边界;
得到的偏移位置是否不覆盖当前块;
得到的偏移位置是否不超出IBC可用区域;
得到的偏移位置是否已经重建。
在这里,如果可用,那么执行基于IBC模式的色度预测。如果不可用,那么需要将其调整至可用,然后执行基于IBC模式的色度预测。其中,调整的方式包括但不限于裁剪、缩放等。另外,如果不可用,那么也可以采用包括但不限于PLANAR模式或CCLM模式或者其他角度预测模式替代,获取参考像素和模式参数进行色度预测;甚至也可以跳过该模式。
对于色度IBC预测,即根据第二BV参数对当前块进行IBC扩展模式的色度预测。如果是IBC扩展模式,那么获取当前块的位置(xCb,yCb),获取第二BV参数为(BVChor,BVCver),找到对应偏移位置(xCb+BVChor,yCb+BVCver)并进行块复制,具体如图13所示。
另外,如果第二BV参数不可用,这时候若是PLANAR模式或CCLM模式或其他角度模式,则获取参考像素和模式参数进行色度预测。
还可以理解地,对于前述实施例中所述确定预测模式的方法,本申请实施例也可以是修改相关技术的DM模式,以使修改后的DM模式能够兼顾INTRA_DBV模式。
在本申请实施例中,双树划分以及DM模式下,当其同位置亮度块的预测模式是IBC模式时,如果CuPredMode[0][xCb+cbWidth/2][yCb+cbHeight/2]等于MODE_IBC,而且lumaIbcPredMode为Y,Y不同于X,Y不是常规角度预测模式,那么色度帧内预测模式IntraPredModeC[xCb][yCb]使用INTRA_DBV。
其中,色度预测模式推导如下:
色度帧内预测模式IntraPredModeC[xCb][yCb]使用cclm_mode_flag、cclm_mode_idx、以及表8中指定的intra_chroma_pred_mode、lumaIntraPredMode和lumaIbcPredMode。
表8
Figure PCTCN2022125208-appb-000005
在本申请实施例中,采用INTRA_DBV模式进行预测,具体流程可以同前述实施例中图14或图15所示的流程。其中,对于获取同位亮度区域中处于中心位置的CU,如果获取的同位亮度区域中处于中心位置的CU不是IBC模式,那么可以获取其对应的亮度预测模式进行色度预测。
通过上述实施例,对前述实施例的具体实现进行了详细阐述,从中可以看出,这里提出了一种新的色度预测模式INTRA_DBV。一方面,对于DM模式,在双树划分情况下,如果其亮度中心位置处CU的预测模式为IBC模式,那么获取的色度预测模式为DC模式,本申请实施例有效改进了这种获取固定预测模式的方式,充分利用了同位亮度区域的模式信息,采用灵活的BV参数代替固定预测模式,有效提高了色度预测的准确性;另一方面,对于这种新的预测模式,在双树划分情况下,如果对应亮度块为IBC模式,那么获取对应亮度块的BV参数,然后对BV参数进行调整应用于色度,改善了色度预测的单一性,而且隐式地将IBC算法加入到色度预测中,充分利用了同位亮度区域的信息,从而提高了色度预测的准确性,进而有效地提高了编解码效率。
在本申请的又一实施例中,参见图16,其示出了本申请实施例提供的一种解码方法的流程示意图。如图16所示,该方法可以包括:
S1601:确定第一语法元素标识信息的取值。
需要说明的是,在本申请实施例中,本申请实施例的方法可以应用于解码器。另外,这里的解码方法具体可以是指一种帧内预测方法。其中,假定第一颜色分量为亮度分量,第二颜色分量为色度分量,那么更具体地,这里是一种色度帧内预测方法,可以利用前述实施例提出的IBC扩展模式进行色度预测,从而能够提高色度预测的准确性。
还需要说明的是,在本申请实施例中,当前块至少包括第一颜色分量和第二颜色分量。对于当前块的第一颜色分量,这时候的块可简称为第一颜色分量块;而且在第一颜色分量为亮度分量时,那么第一颜色分量块又可称为亮度块。同理,对于当前块的第二颜色分量,这时候的块可简称为第二颜色分量块; 而且在第二颜色分量为色度分量时,那么第二颜色分量块又可称为色度块。
还需要说明的是,在本申请实施例中,第一语法元素标识信息可以用IbcEnabled表示,或者也可以用chromaIbcExModeEnabled表示,它的取值决定是否会在CU层传输相关模式参数。其中,第一语法元素标识信息用于指示当前块的第二颜色分量是否允许使用IBC扩展模式;换句话说,第一语法元素标识信息可以用于指示当前块的第二颜色分量是否允许使用目标预测模式(即INTRA_DBV模式)。在一些实施例中,该方法还可以包括:
若第一语法元素标识信息的取值为第一值,则确定第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式;
若第一语法元素标识信息的取值为第二值,则确定第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式。
在本申请实施例中,第一值和第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第一语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。
示例性地,对于第一值和第二值而言,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true。其中,在本申请实施例中,第一值设置为1,第二值设置为0,但是并不作具体限定。
在本申请实施例中,对于第一语法元素标识信息的取值,可以是:解码码流,确定第一语法元素标识信息的取值。或者,也可以是:解码码流,确定第三语法元素标识信息的取值;若第三语法元素标识信息的取值为第一值且当前块满足预设条件,则确定第一语法元素标识信息的取值为第一值;若第三语法元素标识信息的取值为第二值,则确定第一语法元素标识信息的取值为第二值。
在一种具体的实施例中,当前块满足预设条件,至少可以包括:当前块所属的片类型满足I帧;当前块的尺寸参数满足预设上限值。
应理解,在本申请实施例中,当前块所属的片类型可以用sh_slice_type表示,预设上限值可以用MaxChromaIbcSize表示,而且MaxChromaIbcSize可根据色度CTU的大小或预设值确定。
还应理解,在本申请实施例中,第三语法元素标识信息可以用sps_ibc_enabled_flag表示,用于指示当前图像是否允许使用IBC模式。在这里,当前图像中包括当前块。在一些实施例中,该方法还可以包括:
若第三语法元素标识信息的取值为第一值,则确定第三语法元素标识信息指示当前图像允许使用IBC模式;
若第三语法元素标识信息的取值为第二值,则确定第三语法元素标识信息指示当前图像不允许使用IBC模式。
在本申请实施例中,第一值和第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第三语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。
示例性地,以第一值设置为1,第二值设置为0为例,如果sps_ibc_enabled_flag的取值等于0;那么IbcEnabled的取值等于0;否则,在sps_ibc_enabled_flag的取值等于1时,如果以下多个条件同时为真(包括但不限于以下条件),那么IbcEnabled的取值等于1。这些条件可以包括但不限于:sh_slice_type等于I帧;以及CtbLog2SizeY小于或等于MaxChromaIbcSize。
还需要说明的是,在本申请实施例中,对于第一语法元素标识信息的取值,可以是根据第三语法元素标识信息以及当前块是否满足预设条件来确定的;或者,也可以是通过解码码流直接确定的,这里不作具体限定。示例性地,本申请实施例是将第一语法元素标识信息可以作为一个不在码流中传输的语法元素,而是一个推导出来的取值,具体可以是由sps_ibc_enabled_flag、sh_slice_type以及CtbLog2SizeY尺寸来共同确定。
这样,在IbcEnabled的取值等于1时,可以确定第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式。
S1602:在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值。
在本申请实施例中,如果当前块的第二颜色分量允许使用IBC扩展模式,即当前块的第二颜色分量允许使用目标预测模式,那么这时候还需要进一步确定当前块的第二颜色分量是否使用目标预测模式,即解码确定第二语法元素标识信息的取值。在一些实施例中,该方法还可以包括:
若第二语法元素标识信息的取值为第一值,则确定第二语法元素标识信息指示当前块的第二颜色分 量使用目标预测模式;
若第二语法元素标识信息的取值为第二值,则确定第二语法元素标识信息指示当前块的第二颜色分量不使用目标预测模式。
在本申请实施例中,第二语法元素标识信息可以用intra_dbv_flag表示,或者用intra_chroma_ibc_flag表示,用于指示当前块的第二颜色分量是否使用目标预测模式。
在本申请实施例中,第一值和第二值是不同的,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第二语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此也不作具体限定。
示例性地,以第一值设置为1,第二值设置为0为例,如果第一语法元素标识信息的取值为1,即当前块的第二颜色分量允许使用IBC扩展模式时,这时候解码确定第二语法元素标识信息的取值;如果第二语法元素标识信息的取值也为1,那么即可确定出当前块的第二颜色分量使用目标预测模式。
S1603:在第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式时,根据目标预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
应理解,在本申请实施例中,根据前述实施例中确定预测模式的方法,所确定的预测模式即为目标预测模式。这里,目标预测模式可以用INTRA_DBV表示。
进一步地,在一些实施例中,根据目标预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值,可以包括:
确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数,并根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
进一步地,在一些实施例中,根据目标预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量块,还可以包括:
解码码流,确定当前块的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
还应理解,在本申请实施例中,如果确定当前块的色度分量进行IBC扩展模式的预测处理,那么可以是在对应亮度块的预测模式为IBC模式时,确定对应亮度块的第一BV参数,并根据第一BV参数进行调整,确定应用于色度分量的目标BV参数;然后根据目标BV参数对当前块进行IBC扩展模式的色度预测处理,确定当前块的色度预测值。或者,也可以是编码端在确定出应用于色度分量的目标BV参数之后,将目标BV参数写入码流;从而在解码端,通过解码就可以直接获得当前块的目标BV参数,然后根据目标BV参数对当前块进行IBC扩展模式的色度预测处理,确定当前块的色度预测值。
进一步地,在一些实施例中,该方法还可以包括:在第二语法元素标识信息的取值为第二值时,解码码流,确定第四语法元素标识信息的取值;根据第四语法元素标识信息的取值,确定当前块的第二颜色分量的第一帧内预测模式;根据第一帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
在本申请实施例中,第四语法元素标识信息可以用intra_chroma_pred_mode表示,用于指示当前块使用的色度帧内预测模式。
示例性地,在intra_dbv_flag或intra_chroma_ibc_flag等于0的情况下,这时候不再使用目标预测模式,而是根据intra_chroma_pred_mode所指示的色度帧内预测模式对当前块进行色度预测处理,确定当前块的色度预测值。
在一种具体的实施例中,对于本申请实施例提供的一种色度预测模式INTRA_DBV,在解码实现中,包括但不限于以下添加的解码位置:
(1)色度预测模式INTRA_DBV可以添加在intra_chroma_pred_mode前面,具体如表9所示。
表9
Figure PCTCN2022125208-appb-000006
Figure PCTCN2022125208-appb-000007
如果sps_ibc_enabled_flag等于0,则IbcEnabled等于0。
否则,如果以下条件同时为真(包括但不限于以下条件),则IbcEnabled等于1:
sh_slice_type等于I帧;
CtbLog2SizeY小于或等于MaxChromaIbcSize。
其中,MaxChromaIbcSize可以根据色度CTU大小或预设值确定。
另外,intra_dbv_flag为TRUE表示当前色度预测模式为INTRA_DBV,包括但不限于以下二值化方式,可以采用上下文模型或者旁路模型的方式进行编码。示例性地,如表10、表11、表12或表13所示。在这里,FL表示定长。
表10
intra_dbv_flag FL cMax=1
表11
Value of intra_chroma_pred_mode Bin string
0 100
1 101
2 110
3 111
4 0
表12
Figure PCTCN2022125208-appb-000008
表13
Figure PCTCN2022125208-appb-000009
Figure PCTCN2022125208-appb-000010
(2)色度预测模式INTRA_DBV可以添加在intra_chroma_pred_mode前面的另一种实现方式,具体如表14所示。
表14
Figure PCTCN2022125208-appb-000011
如果sps_ibc_enabled_flag等于0,则IbcEnabled等于0。
否则,如果以下条件同时为真(包括但不限于以下条件),则IbcEnabled等于1:
sh_slice_type等于I帧;
CtbLog2SizeY小于或等于MaxChromaIbcSize。
其中,MaxChromaIbcSize可以根据色度CTU大小或预设值确定。
如果IbcEnabled等于0,则intra_chroma_ibc_flag推断为FALSE。
如果intra_chroma_ibc_flag为TRUE表示当前色度预测模式为INTRA_DBV,包括但不限于以下二值化方式,可以采用上下文模型或者旁路模型的方式进行编码。示例性地,如表15、表16、表17或表18所示。
表15
intra_chroma_ibc_flag FL cMax=1
表16
Value of intra_chroma_pred_mode Bin string
0 100
1 101
2 110
3 111
4 0
表17
Figure PCTCN2022125208-appb-000012
表18
Figure PCTCN2022125208-appb-000013
进一步地,对于添加语法元素的情况,在一些实施例中,该方法还可以包括:在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第五语法元素标识信息的取值;以及根据第五语法元素标识信息的取值,确定当前块的第二颜色分量的第二帧内预测模式,根据第二帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;
或者,
在第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,解码码流,确定第六语法元素标识信息的取值;以及根据第六语法元素标识信息的取值,确定当前块的第二颜色分量的第三帧内预测模式,根据第三帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
其中,第二帧内预测模式包括目标预测模式,且第三帧内预测模式不包括目标预测模式。
在本申请实施例中,第五语法元素标识信息可以用intra_chroma_pred_mode_add表示,第六语法元素标识信息可以用intra_chroma_pred_mode表示。其中,intra_chroma_pred_mode_add用于指示增加了INTRA_DBV模式,而intra_chroma_pred_mode表示相关技术中的色度预测模式。
在本申请实施例中,对于第五语法元素标识信息和第六语法元素标识信息的二值化处理过程不同,即两者使用的二值化映射表存在差异。
在一些实施例中,解码码流,确定第五语法元素标识信息的取值,包括:解码码流,获得第五语法元素标识信息对应的至少一个字符;利用第一预设二值映射表对第五语法元素标识信息对应的至少一个字符进行映射处理,确定第五语法元素标识信息的取值。
在一些实施例中,解码码流,确定第六语法元素标识信息的取值,包括:解码码流,获得第六语法元素标识信息对应的至少一个字符;利用第二预设二值映射表对第六语法元素标识信息对应的至少一个字符进行映射处理,确定第六语法元素标识信息的取值。
示例性地,在IbcEnabled等于1的情况下,利用第一预设二值映射表解码intra_chroma_pred_mode_add,根据intra_chroma_pred_mode_add所指示的色度帧内预测模式对当前块进行色度预测处理,确定当前块的色度预测值;在IbcEnabled等于0的情况下,利用第二预设二值映射表解码intra_chroma_pred_mode,根据intra_chroma_pred_mode所指示的色度帧内预测模式对当前块进行色度预测处理,确定当前块的色度预测值。
在另一种具体的实施例中,对于本申请实施例提供的一种色度预测模式INTRA_DBV,在解码实现中,还包括:
(3)添加语法元素intra_chroma_pred_mode_add,具体如表19所示。
表19
Figure PCTCN2022125208-appb-000014
Figure PCTCN2022125208-appb-000015
如果sps_ibc_enabled_flag等于0,则IbcEnabled等于0。
否则,如果以下条件同时为真(包括但不限于以下条件),则IbcEnabled等于1:
sh_slice_type等于I帧;
CtbLog2SizeY小于或等于MaxChromaIbcSize。
其中,MaxChromaIbcSize可以根据色度CTU大小或预设值确定。
另外,对于intra_chroma_pred_mode_add的二值化方式,即第一预设二值映射表可以如表20所示,但是并不作具体限定。
表20
Value of intra_chroma_pred_mode_add Bin string
0 1100
1 1101
2 1110
3 1111
4 10
5 0
另外,对于Value of intra_chroma_pred_mode的二值化方式,即第二预设二值映射表可以如表21所示,但是也不作具体限定。
表21
Value of intra_chroma_pred_mode Bin string
0 100
1 101
2 110
3 111
4 0
另外,对于不同的语法元素(例如cclm_mode_flag、cclm_mode_idx、intra_chroma_pred_mode_add和intra_chroma_pred_mode等),每一位编码比特所采用的编码方式具体如表22或表23所示。
表22
Figure PCTCN2022125208-appb-000016
Figure PCTCN2022125208-appb-000017
表23
Figure PCTCN2022125208-appb-000018
在这里,以intra_chroma_pred_mode_add为例,对于intra_chroma_pred_mode_add的第0位比特,代表DM模式,编码方式与VVC相同。对于intra_chroma_pred_mode_add的第1位比特,代表新增的INTRA_DBV模式,可以采用上下文模型或者旁路模型的方式编码。
进一步地,对于保持语法元素的情况,在一些实施例中,解码码流,确定第二语法元素标识信息的取值,可以包括:在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,获得第二语法元素标识信息对应的至少一个字符;以及利用第一预设二值映射表对第二语法元素标识信息对应的至少一个字符进行映射处理,确定第二语法元素标识信息的取值;或者
在第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,解码码流,获得第二语法元素标识信息对应的至少一个字符;以及利用第二预设二值映射表对第二语法元素标识信息对应的至少一个字符进行映射处理,确定第二语法元素标识信息的取值。
在本申请实施例中,第二语法元素标识信息可以用intra_chroma_pred_mode表示,即保持语法元素intra_chroma_pred_mode。这种情况下,根据IbcEnabled的取值不同,可以使用不同的二值化方式来实现。
在又一种具体的实施例中,对于本申请实施例提供的一种色度预测模式INTRA_DBV,在解码实现中,还包括:
(4)保持语法元素intra_chroma_pred_mode,具体如表24所示。
表24
Figure PCTCN2022125208-appb-000019
如果sps_ibc_enabled_flag等于0,则IbcEnabled等于0。
否则,如果以下条件同时为真(包括但不限于以下条件),则IbcEnabled等于1:
sh_slice_type等于I帧;
CtbLog2SizeY小于或等于MaxChromaIbcSize。
其中,MaxChromaIbcSize可以根据色度CTU大小或预设值确定。
另外,intra_chroma_pred_mode包括但不限于以下二值化方式:
当IbcEnabled等于1时,使用表25对intra_chroma_pred_mode进行二值化处理,但并不局限于此。
表25
Value of intra_chroma_pred_mode Bin string
0 1100
1 1101
2 1110
3 1111
4 10
5 0
否则,如果IbcEnabled等于0,那么使用表26对intra_chroma_pred_mode进行二值化处理,但并不局限于此。
图26
Value of intra_chroma_pred_mode Bin string
0 100
1 101
2 110
3 111
4 0
另外,对于不同的语法元素(例如cclm_mode_flag、cclm_mode_idx和intra_chroma_pred_mode等),每一位编码比特所采用的编码方式具体如下:
当IbcEnabled等于1时,如图27或图28所示。
图27
Figure PCTCN2022125208-appb-000020
图28
Figure PCTCN2022125208-appb-000021
在这里,以intra_chroma_pred_mode为例,当IbcEnabled等于1时,对于intra_chroma_pred_mode的第0位比特,代表DM模式,编码方式与VVC相同;对于intra_chroma_pred_mode的第1位比特,代表新增的INTRA_DBV模式,可以采用上下文模型或者旁路模型的方式编码。
当IbcEnabled等于0时,如图29所示。
图29
Figure PCTCN2022125208-appb-000022
进一步地,对于修改DM模式的情况,在一些实施例中,解码码流,确定第二语法元素标识信息的取值,可以包括:若第二语法元素标识信息的取值满足第一预设常数值,则确定第二语法元素标识信息指示当前块的第二颜色分量不使用目标预测模式,在确定当前块的第二颜色分量的第四帧内预测模式之后,根据第四帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;或者,
若第二语法元素标识信息的取值满足第二预设常数值,则确定第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式,根据目标预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
在本申请实施例中,第二语法元素标识信息仍用intra_chroma_pred_mode表示。另外,第一预设常数值可以为0,1,2,3;第二预设常数值可以为4,但是不作具体限定。
在又一种具体的实施例中,对于本申请实施例提供的一种色度预测模式INTRA_DBV,在解码实现中,还包括:
(5)修改DM模式,具体如表30所示。
表30
Figure PCTCN2022125208-appb-000023
另外,对于intra_chroma_pred_mode包括但不限于以下二值化方式,可以采用上下文模型或者旁路模型的方式进行编码。示例性地,如表31、表32所示。
表31
Value of intra_chroma_pred_mode Bin string
0 100
1 101
2 110
3 111
4 0
表32
Figure PCTCN2022125208-appb-000024
在这里,对于intra_chroma_pred_mode的第0位比特,代表DM模式,编码方式与VVC相同。
IbcEnabled的推导过程如下:
如果sps_ibc_enabled_flag等于0,则IbcEnabled等于0。
否则,如果以下条件同时为真(包括但不限于以下条件),则IbcEnabled等于1:
sh_slice_type等于I帧;
CtbLog2SizeY小于或等于MaxChromaIbcSize。
其中,MaxChromaIbcSize可以根据色度CTU大小或预设值确定。
如果IbcEnabled等于1,那么,当intra_chroma_pred_mode等于0、1、2或3这四种色度预测模式时,保持这四种色度预测模式不变;当intra_chroma_pred_mode等于4时,实行表30所示的解码过程。
否则,维持H.266/VVC标准中的色度预测过程不变。
简言之,在本申请实施例中,对于DM模式,在双树划分的情况下,如果其亮度中心位置处的模式为IBC模式,则获取的色度预测模式为DC模式,本实施例有效改进了这种获取固定预测模式的方式,能够充分利用同位亮度区域的模式信息,采用灵活的BV代替固定预测模式,提高了色度预测的准确性;另外,对于一种新的预测模式INTRA_DBV,当双树划分的情况下,如果对应亮度块为IBC模式,则获取对应亮度块的BV,然后对BV进行调整应用于色度,改善了色度预测的单一性,隐式地将IBC算法加入到色度预测中,充分利用了同位亮度区域的信息,有效提高了色度预测的准确性。
本实施例提供了一种解码方法,在使用亮度预测模式推导色度预测模式的过程中,本实施例在SPS层开启IBC模式以及双树划分的情况下,如果对应亮度块为IBC模式,则获取对应亮度块的BV参数,然后对BV参数进行调整应用于色度,改善了色度预测的单一性,隐式地将IBC算法加入到色度预测中,充分利用了同位亮度区域的信息,从而有效地对色度块进行准确的预测,能够提高色度预测的准确性,进而提高了编解码效率,提升了编解码性能。
在本申请的又一实施例中,参见图17,其示出了本申请实施例提供的一种编码方法的流程示意图。如图17所示,该方法可以包括:
S1701:在当前块的第二颜色分量的预测模式为目标预测模式时,确定当前块的第一颜色分量块。
需要说明的是,在本申请实施例中,本申请实施例的方法可以应用于编码器。另外,这里的编码方法具体可以是指一种帧内预测方法。其中,假定第一颜色分量为亮度分量,第二颜色分量为色度分量,那么更具体地,这里是一种色度帧内预测方法,可以利用前述实施例提出的IBC扩展模式进行色度预测,从而能够提高色度预测的准确性。
还需要说明的是,在本申请实施例中,根据前述实施例中确定预测模式的方法,所确定的预测模式即为目标预测模式。这里,目标预测模式即为前述实施例提出的IBC扩展模式,可以用INTRA_DBV表示。
在一些实施例中,确定当前块的第一颜色分量块,可以包括:确定当前块的同位置的第一颜色分量区域;从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块。
进一步地,在一些实施例中,从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块,可以包括:在第一颜色分量区域划分的多个块中选取目标块,将目标块作为当前块的第一颜色分量块。
在一种具体的实施例中,该方法还可以包括:将第一颜色分量区域中处于中心位置的块选取为目标块;或者,将第一颜色分量区域中处于左上角位置的块选取为目标块;或者,将第一颜色分量区域中处于右下角位置的块选取为目标块。
应理解,在本申请实施例中,对于作为第一颜色分量块的目标块,可以是图3所示多个块中的任意位置的块。例如,如图3所示的同位亮度区域中处于中心位置的块(用黑色填充的块),如图7所示的同位亮度区域中处于左上角位置的块(用黑色填充的块),如图8所示的同位亮度区域中处于右下角位置的块(用黑色填充的块),甚至还可以是同位亮度区域中处于右上角位置的块、处于左下角位置的块,更甚者可以是处于左上区域的中心位置的块等等,这里对此不作具体限定。
进一步地,在一些实施例中,从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块,可以包括:从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块;根据预设顺序依次获取至少一个候选块并进行模式判断,若判断出的首个候选块使用IBC模式,则将首个候选块作为当前块的第一颜色分量块。
进一步地,在一些实施例中,从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块,可以包括:从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块,将至少一个候选块确定为当前块的第一颜色分量块。
应理解,在本申请实施例中,当前块的第一颜色分量块的数量可以是一个,也可以是多个,这里并不作具体限定。其中,对于第一颜色分量块,还可以是针对处于预设位置的至少一个候选块进行模式判断确定的,具体如图9所示。
还应理解,在本申请实施例中,对于图9所示的五个位置,可以按照预设顺序依次获取,直到判断出的候选块为IBC模式为止,即查找到首个亮度像素位置的CU为IBC模式,将这首个亮度像素位置的CU作为当前块的对应亮度块。
S1702:在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数。
需要说明的是,在本申请实施例中,在确定出第一颜色分量块之后,需要判断第一颜色分量块的预测模式。其中,如果第一颜色分量块的预测模式为IBC模式,那么需要进一步确定第一颜色分量块的第一块向量参数。
还需要说明的是,在本申请实施例中,如果第一颜色分量块存在有多个,那么第一块向量参数也可以是由这多个第一颜色分量块的BV进行求均值得到的。因此,在一些实施例中,针对处于预设位置的至少一个候选块,在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数,可以包括:从这至少一个候选块中,确定使用IBC模式的至少一个目标块,并确定至少一个目标块各自的第一块向量参数;根据至少一个目标块各自的第一块向量参数进行均值计算,将计算结果作为第一颜色分量块的第一块向量参数。
应理解,在本申请实施例中,对于当前块的第一颜色分量块,这里并不局限于一个块,也可以是由多个块组成。其中,在由多个块组成时,这时候的多个块的预测模式全部都为IBC模式。示例性地,首先获取同位亮度区域中的多个亮度CU,然后对其的第一块向量参数求取平均值,作为最终获取的第一块向量参数。
进一步地,在本申请实施例中,对于最终获取的第一块向量参数,也可以是通过模板匹配方式选取最佳块向量参数来确定的。因此,在一些实施例中,该方法还可以包括:从至少一个候选块中,确定使用IBC模式的至少一个目标块;根据模板匹配方式对至少一个目标块进行搜索,确定最佳块向量参数,将最佳块向量参数作为第一颜色分量块的第一块向量参数。
还应理解,在本申请实施例中,对于当前块的第一颜色分量块,在获取同位亮度区域中的多个亮度CU之后,可以通过模板匹配方式选取最佳块向量参数,作为最终获取的第一块向量参数。
还需要说明的是,在本申请实施例中,在确定出第一颜色分量块之后,需要判断第一颜色分量块的预测模式。其中,如果第一颜色分量块的预测模式为IBC模式,那么继续执行图17所示的流程,需要确定第一颜色分量块的第一块向量参数;否则,如果第一颜色分量块的预测模式不为IBC模式,那么不再执行图17所示的流程,可以根据第一预设模式对当前块的第二颜色分量进行预测处理,确定当前块的第二颜色分量的预测值。其中,第一预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式、CCLM模式和跳过模式,但是并不局限于此。
S1703:根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数。
需要说明的是,在本申请实施例中,对于当前块的目标块向量参数,可以是:将第一颜色分量块的第一块向量参数直接作为当前块的目标块向量参数;或者,对第一颜色分量块的第一块向量参数进行调整,确定当前块的目标块向量参数。
在一种可能的实现方式中,对第一颜色分量块的第一块向量参数进行调整,确定当前块的目标块向量参数,可以包括:确定当前块的颜色采样格式;根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理,确定当前块的目标块向量参数。
在另一种可能的实现方式中,对第一颜色分量块的第一块向量参数进行调整,确定当前块的目标块向量参数,可以包括:在根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理后,得到当前块的初始块向量参数;对当前块的初始块向量参数进行修正处理,确定当前块的目标块向量参数。
在又一种可能的实现方式中,对第一颜色分量块的第一块向量参数进行调整,确定当前块的目标块向量参数,可以包括:根据当前块的初始块向量参数直接确定当前块的目标块向量参数。
进一步地,在一些实施例中,对当前块的初始块向量参数进行修正处理,确定当前块的目标块向量 参数,可以包括:根据当前块的初始块向量参数和当前块的位置信息,确定当前块的搜索区域;根据模板匹配方式在搜索区域内进行搜索,确定最佳块向量参数,将最佳块向量作为当前块的目标块向量参数。
示例性地,在得到根据表7所示颜色采样格式缩放后的色度BV参数之后,可以直接使用,或者也可以对其进行进一步的修正。其中,这里的修正可以包括但不限于以下方式:采用IntraTMP模式进行修正,即得到色度BV参数后,然后利用当前块的位置和得到的色度BV参数查找到偏移位置,再采用模板匹配方式在该偏移位置附近进行细搜索,确定出最优色度BV参数,将最优色度BV参数作为最终得到的色度BV参数,即当前块的目标块向量参数。
S1704:根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
需要说明的是,在本申请实施例中,对于IBC扩展模式(即本申请实施例所述的目标预测模式),可以根据所确定的目标块向量参数对当前块的第二颜色分量进行预测处理,从而确定出当前块的第二颜色分量的预测值。
还需要说明的是,在本申请实施例中,在得到当前块的目标块向量参数之后,还需要判断目标块向量参数是否可用,即目标块向量参数是否满足可用条件。在一些实施例中,该方法还可以包括:在确定当前块的目标块向量参数之后,判断目标块向量参数是否满足可用条件;在目标块向量参数满足可用条件时,执行根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值的步骤。
具体来讲,在本申请实施例中,只有在目标块向量参数满足可用条件时,才可以根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,以确定出当前块的第二颜色分量的预测值。
进一步地,在一些实施例中,目标块向量参数是否满足可用条件,至少可以包括:
根据目标块向量参数指示的偏移位置是否未超出图像边界;
根据目标块向量参数指示的偏移位置是否未覆盖当前块;
根据目标块向量参数指示的偏移位置是否未超出IBC模式的可用区域;
根据目标块向量参数指示的偏移位置是否已经重建。
应理解,在本申请实施例中,只有上述条件全部成立的情况下,这时候才可以确定目标块向量参数满足可用条件,即目标块向量参数可用。在一种具体的实施例中,对于目标块向量参数满足可用条件,至少包括:根据目标块向量参数指示的偏移位置未超出图像边界;以及根据目标块向量参数指示的偏移位置未覆盖当前块;以及根据目标块向量参数指示的偏移位置未超出IBC模式的可用区域;以及根据目标块向量参数指示的偏移位置已经重建。
还应理解,在本申请实施例中,在根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理后,对于所得到的初始块向量参数,需要对其进行进一步的修正处理。其中,在修正处理之前,该方法还可以包括:判断初始块向量参数是否满足可用条件;在初始块向量参数满足可用条件时,对当前块的初始块向量参数进行修正处理,确定当前块的目标块向量参数;或者,在初始块向量参数不满足可用条件时,对当前块的初始块向量参数进行调整处理,直至调整后的块向量参数满足可用条件;再对调整后的块向量参数进行修正处理,确定当前块的目标块向量参数。
还可以理解地,在本申请实施例中,从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块,然后根据预设顺序依次获取至少一个候选块并进行模式判断,若判断出的首个候选块使用IBC模式,则将首个候选块作为当前块的第一颜色分量块。在该过程中,还需要判断首个候选块的BV参数是否满足可用条件,以便确定是否需要继续执行下一候选块的模式判断。
在一些实施例中,该方法还可以包括:在判断出的首个候选块使用IBC模式时,确定首个候选块的第一块向量参数;判断首个候选块的第一块向量参数是否满足可用条件;若首个候选块的第一块向量参数满足可用条件,则将首个候选块作为当前块的第一颜色分量块;若首个候选块的第一块向量参数不满足可用条件,则继续进行下一候选块的模式判断,直至确定出使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,将目标候选块作为当前块的第一颜色分量块。
进一步地,在一些实施例中,该方法还可以包括:若至少一个候选块中不存在使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,则根据第一预设模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;其中,第一预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式、CCLM模式和跳过模式。
示例性地,仍以图9为例,如果五个位置中存在某个或某几个CU为使用IBC模式,那么可以重新依次获取这五个位置(直到找到第一个符合下述条件的CU),此时不仅判断该CU是否使用IBC模式,而且还会对该CU的亮度BV参数进行调整,确定应用于色度的BV参数;然后判断色度BV参数是否可用。如果色度BV参数可用,那么选定此CU作为最终获取BV的亮度块。如果色度BV参数不 可用,那么不获取亮度CU,包括但不限于PLANAR模式或分量间预测模式或其他角度预测模式,甚至还可以跳过该模式;或者找到第一个为使用IBC模式的CU,调整其BV直至可用,选定此CU为最终获取BV的亮度块。
进一步地,在一些实施例中,根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值,可以包括:根据目标块向量参数和当前块的位置信息,确定当前块的偏移位置;根据当前块的偏移位置进行块复制处理,得到第一预测块;根据第一预测块,确定当前块的第二颜色分量的预测值。
进一步地,在一些实施例中,根据第一预测块,确定当前块的第二颜色分量的预测值,可以包括:对第一预测块进行修正操作,确定当前块的第二颜色分量的预测值。
在一种具体的实施例中,根据第一预测块,确定当前块的第二颜色分量的预测值,可以包括:根据第二预设模式对当前块的第二颜色分量进行帧内预测处理,得到第二预测块;对第一预测块与第二预测块进行加权融合处理,确定当前块的第二颜色分量的预测值;其中,第二预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式和CCLM模式。
应理解,在本申请实施例中,对于当前块的第二颜色分量的预测值,如果是通过目标块向量参数进行块复制得到的,可以采用包括但不限于与常规预测模式加权的方式对预测值进行修正处理。
还可以理解地,在一些实施例中,该方法还可以包括:确定第一语法元素标识信息的取值;对第一语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
在一种具体的实施例中,确定第一语法元素标识信息的取值,可以包括:若第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式,则确定第一语法元素标识信息的取值为第一值;若第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式,则确定第一语法元素标识信息的取值为第二值。
应理解,在本申请实施例中,第一语法元素标识信息可以用IbcEnabled或者chromaIbcExMode Enabled表示,用于指示当前块的第二颜色分量是否允许使用IBC扩展模式。换句话说,第一语法元素标识信息可以用于指示当前块的第二颜色分量是否允许使用目标预测模式(即INTRA_DBV模式)。
还应理解,在本申请实施例中,第一值和第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第一语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。示例性地,第一值可以设置为1,第二值可以设置为0,但是并不作具体限定。
这样,编码端对第一语法元素标识信息进行编码并写入码流中,后续解码端就可以通过解码直接确定第一语法元素标识信息的取值,进而确定出当前块的第二颜色分量是否允许使用IBC扩展模式。
进一步地,在一些实施例中,该方法还可以包括:在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,确定第二语法元素标识信息的取值;对第二语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
在一种具体的实施例中,确定第二语法元素标识信息的取值,可以包括:若第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式,则确定第二语法元素标识信息的取值为第一值;若第二语法元素标识信息指示当前块的第二颜色分量不使用目标预测模式,则确定第二语法元素标识信息的取值为第二值。
进一步地,在一些实施例中,该方法还可以包括:确定第三语法元素标识信息的取值;对第三语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
在一种具体的实施例中,确定第三语法元素标识信息的取值,可以包括:若第三语法元素标识信息指示当前图像允许使用IBC模式,则确定第三语法元素标识信息的取值为第一值;若第三语法元素标识信息指示当前图像不允许使用IBC模式,则确定第三语法元素标识信息的取值为第二值。
应理解,在本申请实施例中,对于第一语法元素标识信息的取值,可以是将第一语法元素标识信息可以作为一个在码流中传输的语法元素,后续通过解码码流直接确定取值;或者也可以是将第一语法元素标识信息可以作为一个不在码流中传输的语法元素,这时候可以根据第三语法元素标识信息以及当前块是否满足预设条件来确定取值。
在一些实施例中,确定第一语法元素标识信息的取值,还可以包括:若第三语法元素标识信息的取值为第一值且当前块满足预设条件,则确定第一语法元素标识信息的取值为第一值;若第三语法元素标识信息的取值为第二值,则确定第一语法元素标识信息的取值为第二值。
还需要说明的是,在本申请实施例中,当前块满足预设条件,至少可以包括:当前块所属的片类型满足I帧;以及当前块的尺寸参数满足预设上限值。
另外,在本申请实施例中,第二语法元素标识信息可以用intra_dbv_flag表示,或者用 intra_chroma_ibc_flag表示,用于指示当前块的第二颜色分量是否使用目标预测模式。第三语法元素标识信息可以用sps_ibc_enabled_flag表示,用于指示当前图像是否允许使用IBC模式。在这里,当前图像中包括当前块。
在本申请实施例中,第一值和第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,无论是第一语法元素标识信息,还是第二语法元素标识信息、第三语法元素标识信息等,均可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。
示例性地,以第一值设置为1,第二值设置为0为例,如果sps_ibc_enabled_flag的取值等于0;那么IbcEnabled的取值等于0;否则,在sps_ibc_enabled_flag的取值等于1时,如果以下多个条件同时为真(包括但不限于以下条件),那么IbcEnabled的取值等于1。这些条件可以包括但不限于:sh_slice_type等于I帧;以及CtbLog2SizeY小于或等于MaxChromaIbcSize。
在一些实施例中,该方法还可以包括:在第二语法元素标识信息指示当前块的第二颜色分量不使用目标预测模式时,确定当前块的第二颜色分量的第一帧内预测模式;根据第一帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
进一步地,在一些实施例中,该方法还可以包括:根据当前块的第二颜色分量的第一帧内预测模式,确定第四语法元素标识信息的取值;对第四语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
在本申请实施例中,第四语法元素标识信息可以用intra_chroma_pred_mode表示,用于指示当前块使用的色度帧内预测模式。示例性地,在intra_dbv_flag或intra_chroma_ibc_flag等于0的情况下,这时候不再使用目标预测模式,而是根据intra_chroma_pred_mode所指示的色度帧内预测模式对当前块进行色度预测处理,确定当前块的色度预测值。
对于添加语法元素的情况,在一些实施例中,该方法还可以包括:在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,确定当前块的第二颜色分量的第二帧内预测模式,根据第二帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;在第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,确定当前块的第二颜色分量的第三帧内预测模式,根据第三帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;其中,第二帧内预测模式包括目标预测模式,且第三帧内预测模式不包括目标预测模式。
进一步地,在一些实施例中,该方法还可以包括:根据当前块的第二颜色分量的第二帧内预测模式,确定第五语法元素标识信息的取值;利用第一预设二值映射表对第五语法元素标识信息的取值进行二值化处理,确定第五语法元素标识信息对应的至少一个字符;对第五语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流。
进一步地,在一些实施例中,该方法还可以包括:根据当前块的第二颜色分量的第三帧内预测模式,确定第六语法元素标识信息的取值;利用第二预设二值映射表对第六语法元素标识信息的取值进行二值化处理,确定第六语法元素标识信息对应的至少一个字符;对第六语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流。
在本申请实施例中,第五语法元素标识信息可以用intra_chroma_pred_mode_add表示,第六语法元素标识信息可以用intra_chroma_pred_mode表示。其中,intra_chroma_pred_mode_add用于指示增加了INTRA_DBV模式,而intra_chroma_pred_mode表示相关技术中的色度预测模式。
在本申请实施例中,对于第五语法元素标识信息和第六语法元素标识信息的二值化处理过程不同,即两者使用的二值化映射表存在差异。示例性地,第一预设二值映射表可以如表20所示,第二预设二值映射表可以如表21所示,但是均不作具体限定。
对于保持语法元素的情况,在一些实施例中,该方法还可以包括:
在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,利用第一预设二值映射表对第二语法元素标识信息的取值进行二值化处理,确定第二语法元素标识信息对应的至少一个字符;以及对第二语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流;
或者,
在第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,利用第二预设二值映射表对第二语法元素标识信息的取值进行二值化处理,确定第二语法元素标识信息对应的至少一个字符;以及对第二语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流。
在本申请实施例中,第二语法元素标识信息可以用intra_chroma_pred_mode表示,即保持语法元素intra_chroma_pred_mode。这种情况下,根据IbcEnabled的取值不同,可以使用不同的二值化方式来实现。示例性地,第一预设二值映射表可以如表25所示,第二预设二值映射表可以如表26所示,但是均 不作具体限定。
进一步地,本申请实施例还提供了一种码流,其中,码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:
当前块的目标块向量参数、第一语法元素标识信息的取值、第二语法元素标识信息的取值、第三语法元素标识信息的取值、第四语法元素标识信息的取值、第五语法元素标识信息的取值和第六语法元素标识信息的取值。
需要说明的是,在本申请实施例中,无论是第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息,还是第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息,对于这些语法元素标识信息的取值来说,第一值和第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。示例性地,可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里不作具体限定。
还需要说明的是,在本申请实施例中,第三语法元素标识信息可以为SPS层语法元素。其中,在SPS层开启IBC模式以及双树划分下,如果对应亮度块为IBC模式,则获取对应亮度块的BV,然后对BV进行调整应用于色度,改善了色度预测的单一性,隐式地将IBC算法加入到色度预测中,充分利用了同位亮度区域的信息,有效地提高了编码效率。
还需要说明的是,在本申请实施例中,针对这些语法元素标识信息,编码端可以进行编码并写入码流中,后续解码端通过解码就可以确定出这些语法元素标识信息的取值,进而确定出当前块的第二颜色分量是否使用目标预测模式,并在使用目标预测模式的情况下对当前块进行色度预测,还能够有效提高解码效率。
本实施例提供了一种编码方法,在使用亮度预测模式推导色度预测模式的过程中,如果当前块对应的亮度块为IBC模式,那么可以根据亮度块的块向量参数来确定应用色度分量的目标块向量参数,并根据这个目标块向量参数对色度分量按照IBC扩展模式进行预测处理,确定当前块块的色度预测值;如此,不仅改善了色度预测的单一性问题,隐式地将IBC模式增加到色度预测中,充分利用了同位亮度块的相关信息,能够提高色度预测的准确性,而且还能够节省码率,提高编解码效率,进而提升编解码性能。
在本申请的再一实施例中,参见图18,其示出了本申请实施例提供的一种编码器的组成结构示意图。如图18所示,该编码器180可以包括:第一确定单元1801和第一预测单元1802;其中,
第一确定单元1801,配置为在当前块的第二颜色分量的预测模式为目标预测模式时,确定当前块的第一颜色分量块;以及在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;
第一预测单元1802,配置为根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
在一些实施例中,第一确定单元1801,还配置为确定当前块的同位置的第一颜色分量区域;以及从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块。
在一些实施例中,第一确定单元1801,还配置为在第一颜色分量区域划分的多个块中选取目标块,将目标块作为当前块的第一颜色分量块。
在一些实施例中,第一确定单元1801,还配置为将第一颜色分量区域中处于中心位置的块选取为目标块;或者,将第一颜色分量区域中处于左上角位置的块选取为目标块;或者,将第一颜色分量区域中处于右下角位置的块选取为目标块。
在一些实施例中,第一确定单元1801,还配置为从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块;以及根据预设顺序依次获取至少一个候选块并进行模式判断,若判断出的首个候选块使用IBC模式,则将首个候选块作为当前块的第一颜色分量块。
在一些实施例中,第一确定单元1801,还配置为从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块,将至少一个候选块确定为当前块的第一颜色分量块;
相应地,第一确定单元1801,还配置为从至少一个候选块中,确定使用IBC模式的至少一个目标块,并确定至少一个目标块各自的第一块向量参数;以及对至少一个目标块各自的第一块向量参数进行均值计算,将计算结果作为第一颜色分量块的第一块向量参数。
在一些实施例中,第一确定单元1801,还配置为从至少一个候选块中,确定使用IBC模式的至少一个目标块;以及根据模板匹配方式对至少一个目标块进行搜索,确定最佳块向量参数,将最佳块向量参数作为第一颜色分量块的第一块向量参数。
在一些实施例中,参见图18,编码器180还可以包括第一调整单元1803,配置为对第一颜色分量块的第一块向量参数进行调整,确定当前块的目标块向量参数。
在一些实施例中,第一确定单元1801,还配置为确定当前块的颜色采样格式;
第一调整单元1803,还配置为根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理,确定当前块的目标块向量参数。
在一些实施例中,第一调整单元1803,配置为在根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理后,得到当前块的初始块向量参数;以及对当前块的初始块向量参数进行修正处理,确定当前块的目标块向量参数。
在一些实施例中,第一调整单元1803,还配置为根据当前块的初始块向量参数直接确定当前块的目标块向量参数。
在一些实施例中,第一调整单元1803,还配置为根据当前块的初始块向量参数和当前块的位置信息,确定当前块的搜索区域;以及根据模板匹配方式在搜索区域内进行搜索,确定最佳块向量参数,将最佳块向量作为当前块的目标块向量参数。
在一些实施例中,第一预测单元1802,还配置为在确定当前块的目标块向量参数之后,判断目标块向量参数是否满足可用条件;以及在目标块向量参数满足可用条件时,执行根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值的步骤。
在一些实施例中,目标块向量参数满足可用条件,至少包括:根据目标块向量参数指示的偏移位置未超出图像边界;以及根据目标块向量参数指示的偏移位置未覆盖当前块;以及根据目标块向量参数指示的偏移位置未超出IBC模式的可用区域;以及根据目标块向量参数指示的偏移位置已经重建。
在一些实施例中,第一确定单元1801,还配置为在判断出的首个候选块使用IBC模式时,确定首个候选块的第一块向量参数;以及判断首个候选块的第一块向量参数是否满足可用条件;以及若首个候选块的第一块向量参数满足可用条件,则将首个候选块作为当前块的第一颜色分量块;若首个候选块的第一块向量参数不满足可用条件,则继续进行下一候选块的模式判断,直至确定出使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,将目标候选块作为当前块的第一颜色分量块。
在一些实施例中,第一预测单元1802,还配置为若至少一个候选块中不存在使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,则根据第一预设模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;其中,第一预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式、CCLM模式和跳过模式。
在一些实施例中,第一预测单元1802,还配置为根据目标块向量参数和当前块的位置信息,确定当前块的偏移位置;以及根据当前块的偏移位置进行块复制处理,得到第一预测块;以及根据第一预测块,确定当前块的第二颜色分量的预测值。
在一些实施例中,第一预测单元1802,还配置为对第一预测块进行修正操作,确定当前块的第二颜色分量的预测值。
在一些实施例中,第一预测单元1802,还配置为根据第二预设模式对当前块的第二颜色分量进行帧内预测处理,得到第二预测块;以及对第一预测块与第二预测块进行加权融合处理,确定当前块的第二颜色分量的预测值;其中,第二预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式和CCLM模式。
在一些实施例中,参见图18,编码器180还可以包括编码单元1804,其中:
第一确定单元1801,还配置为确定第一语法元素标识信息的取值;
编码单元1804,配置为对第一语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
在一些实施例中,第一确定单元1801,还配置为若第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式,则确定第一语法元素标识信息的取值为第一值;若第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式,则确定第一语法元素标识信息的取值为第二值。
在一些实施例中,第一确定单元1801,还配置为在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,确定第二语法元素标识信息的取值;
编码单元1804,还配置为对第二语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
在一些实施例中,第一确定单元1801,还配置为若第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式,则确定第二语法元素标识信息的取值为第一值;若第二语法元素标识信息指示当前块的第二颜色分量不使用目标预测模式,则确定第二语法元素标识信息的取值为第二值。
在一些实施例中,第一确定单元1801,还配置为确定第三语法元素标识信息的取值;
编码单元1804,还配置为对第三语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
在一些实施例中,第一确定单元1801,还配置为若第三语法元素标识信息的取值为第一值且当前块满足预设条件,则确定第一语法元素标识信息的取值为第一值;若第三语法元素标识信息的取值为第二值,则确定第一语法元素标识信息的取值为第二值。
在一些实施例中,当前块满足预设条件,至少包括:当前块所属的片类型满足I帧;以及当前块的尺寸参数满足预设上限值。
在一些实施例中,第一确定单元1801,还配置为若第三语法元素标识信息指示当前图像允许使用IBC模式,则确定第三语法元素标识信息的取值为第一值;若第三语法元素标识信息指示当前图像不允许使用IBC模式,则确定第三语法元素标识信息的取值为第二值。
在一些实施例中,第一确定单元1801,还配置为在第二语法元素标识信息指示当前块的第二颜色分量不使用目标预测模式时,确定当前块的第二颜色分量的第一帧内预测模式;
第一预测单元1802,还配置为根据第一帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
在一些实施例中,第一确定单元1801,还配置为根据当前块的第二颜色分量的第一帧内预测模式,确定第四语法元素标识信息的取值;
编码单元1804,还配置为对第四语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
在一些实施例中,第一预测单元1802,还配置为在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,确定当前块的第二颜色分量的第二帧内预测模式,根据第二帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;或者,还配置为在第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,确定当前块的第二颜色分量的第三帧内预测模式,根据第三帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;其中,第二帧内预测模式包括目标预测模式,且第三帧内预测模式不包括目标预测模式。
在一些实施例中,第一确定单元1801,还配置为根据当前块的第二颜色分量的第二帧内预测模式,确定第五语法元素标识信息的取值;
编码单元1804,还配置为利用第一预设二值映射表对第五语法元素标识信息的取值进行二值化处理,确定第五语法元素标识信息对应的至少一个字符;以及对第五语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流。
在一些实施例中,第一确定单元1801,还配置为根据当前块的第二颜色分量的第三帧内预测模式,确定第六语法元素标识信息的取值;
编码单元1804,还配置为利用第二预设二值映射表对第六语法元素标识信息的取值进行二值化处理,确定第六语法元素标识信息对应的至少一个字符;以及对第六语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流。
在一些实施例中,编码单元1804,还配置为在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,利用第一预设二值映射表对第二语法元素标识信息的取值进行二值化处理,确定第二语法元素标识信息对应的至少一个字符;以及对第二语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流;或者,还配置为在第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,利用第二预设二值映射表对第二语法元素标识信息的取值进行二值化处理,确定第二语法元素标识信息对应的至少一个字符;以及对第二语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流。
可以理解地,在本申请实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器180,该计算机可读存储介质 存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。
基于编码器180的组成以及计算机可读存储介质,参见图19,其示出了本申请实施例提供的编码器180的具体硬件结构示意图。如图19所示,编码器180可以包括:第一通信接口1901、第一存储器1902和第一处理器1903;各个组件通过第一总线系统1904耦合在一起。可理解,第一总线系统1904用于实现这些组件之间的连接通信。第一总线系统1904除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图19中将各种总线都标为第一总线系统1904。其中,
第一通信接口1901,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第一存储器1902,用于存储能够在第一处理器1903上运行的计算机程序;
第一处理器1903,用于在运行所述计算机程序时,执行:
在当前块的第二颜色分量的预测模式为目标预测模式时,确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
可以理解,本申请实施例中的第一存储器1902可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器1902旨在包括但不限于这些和任意其它适合类型的存储器。
而第一处理器1903可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器1903中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器1903可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器1902,第一处理器1903读取第一存储器1902中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
可选地,作为另一个实施例,第一处理器1903还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
本实施例提供了一种编码器,在该编码器中,根据亮度预测模式确定色度预测模式的过程中,如果当前块对应的亮度块为IBC模式,那么可以根据亮度块的块向量参数来确定应用色度分量的目标块向量参数,并根据这个目标块向量参数对色度分量按照IBC扩展模式进行预测处理,确定当前块块的色度预测值;如此,不仅改善了色度预测的单一性问题,隐式地将IBC模式增加到色度预测中,充分利用了同位亮度块的相关信息,能够提高色度预测的准确性,而且还能够节省码率,提高编码效率,进而提升编码性能。
在本申请的再一实施例中,参见图20,其示出了本申请实施例提供的一种解码器的组成结构示意图。如图20所示,该解码器200可以包括:第二确定单元2001和第二预测单元2002;其中,
第二确定单元2001,配置为确定当前块的第一颜色分量块;以及在第一颜色分量块的预测模式为 IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;
第二预测单元2002,配置为根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
在一些实施例中,第二确定单元2001,还配置为确定当前块的同位置的第一颜色分量区域;以及从第一颜色分量区域划分的多个块中,确定当前块的第一颜色分量块。
在一些实施例中,第二确定单元2001,还配置为在第一颜色分量区域划分的多个块中选取目标块,将目标块作为当前块的第一颜色分量块。
在一些实施例中,第二确定单元2001,还配置为将第一颜色分量区域中处于中心位置的块选取为目标块;或者,将第一颜色分量区域中处于左上角位置的块选取为目标块;或者,将第一颜色分量区域中处于右下角位置的块选取为目标块。
在一些实施例中,第二确定单元2001,还配置为从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块;以及根据预设顺序依次获取至少一个候选块并进行模式判断,若判断出的首个候选块使用IBC模式,则将首个候选块作为当前块的第一颜色分量块。
在一些实施例中,第二确定单元2001,还配置为从第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块,将至少一个候选块确定为当前块的第一颜色分量块;
相应地,第二确定单元2001,还配置为从至少一个候选块中,确定使用IBC模式的至少一个目标块,并确定至少一个目标块各自的第一块向量参数;以及根据至少一个目标块各自的第一块向量参数进行均值计算,将计算结果作为第一颜色分量块的第一块向量参数。
在一些实施例中,第二确定单元2001,还配置为从至少一个候选块中,确定使用IBC模式的至少一个目标块;以及根据模板匹配方式对至少一个目标块进行搜索,确定最佳块向量参数,将最佳块向量参数作为第一颜色分量块的第一块向量参数。
在一些实施例中,参见图20,解码器200还可以包括第二调整单元2003,配置为对第一颜色分量块的第一块向量参数进行调整,确定当前块的目标块向量参数。
在一些实施例中,第二确定单元2001,还配置为确定当前块的颜色采样格式;
第二调整单元2003,还配置为根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理,确定当前块的目标块向量参数。
在一些实施例中,第二调整单元2003,还配置为在根据颜色采样格式对第一颜色分量块的第一块向量参数进行缩放处理后,得到当前块的初始块向量参数;以及对当前块的初始块向量参数进行修正处理,确定当前块的目标块向量参数。
在一些实施例中,第二调整单元2003,还配置为根据当前块的初始块向量参数直接确定当前块的目标块向量参数。
在一些实施例中,第二预测单元2002,还配置为在确定当前块的目标块向量参数之后,判断目标块向量参数是否满足可用条件;以及在目标块向量参数满足可用条件时,执行根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值的步骤。
在一些实施例中,目标块向量参数满足可用条件,至少包括:根据目标块向量参数指示的偏移位置未超出图像边界;以及根据目标块向量参数指示的偏移位置未覆盖当前块;以及根据目标块向量参数指示的偏移位置未超出IBC模式的可用区域;以及根据目标块向量参数指示的偏移位置已经重建。
在一些实施例中,第二确定单元2001,还配置为在判断出的首个候选块使用IBC模式时,确定首个候选块的第一块向量参数;以及判断首个候选块的第一块向量参数是否满足可用条件;以及若首个候选块的第一块向量参数满足可用条件,则将首个候选块作为当前块的第一颜色分量块;若首个候选块的第一块向量参数不满足可用条件,则继续进行下一候选块的模式判断,直至确定出使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,将目标候选块作为当前块的第一颜色分量块。
在一些实施例中,第二预测单元2002,还配置为若至少一个候选块中不存在使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,则根据第一预设模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;其中,第一预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式、CCLM模式和跳过模式。
在一些实施例中,第二预测单元2002,还配置为根据目标块向量参数和当前块的位置信息,确定当前块的偏移位置;以及根据当前块的偏移位置进行块复制处理,得到第一预测块;以及根据第一预测块,确定当前块的第二颜色分量的预测值。
在一些实施例中,第二预测单元2002,还配置为对第一预测块进行修正操作,确定当前块的第二颜色分量的预测值。
在一些实施例中,第二预测单元2002,还配置为根据第二预设模式对当前块的第二颜色分量进行帧内预测处理,得到第二预测块;以及对第一预测块与第二预测块进行加权融合处理,确定当前块的第二颜色分量的预测值;其中,第二预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式和CCLM模式。
在本申请的再一实施例中,参见图21,其示出了本申请实施例提供的另一种解码器的组成结构示意图。如图21所示,该解码器200可以包括:解码单元2101、第二确定单元2102和第二预测单元2103;其中,
第二确定单元2102,配置为确定第一语法元素标识信息的取值;
解码单元2101,配置为在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值;
第二预测单元2103,配置为在第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式时,根据目标预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
在一些实施例中,第二确定单元2102,还配置为确定当前块的第一颜色分量块;以及在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数,并根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;
第二预测单元2103,还配置为根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
在一些实施例中,解码单元2101,还配置为解码码流,确定当前块的目标块向量参数;
第二预测单元2103,还配置为根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
在一些实施例中,解码单元2101,还配置为解码码流,确定第三语法元素标识信息的取值;
第二确定单元2102,还配置为若第三语法元素标识信息的取值为第一值且当前块满足预设条件,则确定第一语法元素标识信息的取值为第一值;若第三语法元素标识信息的取值为第二值,则确定第一语法元素标识信息的取值为第二值。
在一些实施例中,当前块满足预设条件,至少包括:当前块所属的片类型满足I帧;以及当前块的尺寸参数满足预设上限值。
在一些实施例中,第二确定单元2102,还配置为若第三语法元素标识信息的取值为第一值,则确定第三语法元素标识信息指示当前图像允许使用IBC模式;若第三语法元素标识信息的取值为第二值,则确定第三语法元素标识信息指示当前图像不允许使用IBC模式;其中,当前图像包括当前块。
在一些实施例中,第二确定单元2102,还配置为若第一语法元素标识信息的取值为第一值,则确定第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式;若第一语法元素标识信息的取值为第二值,则确定第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式。
在一些实施例中,第二确定单元2102,还配置为若第二语法元素标识信息的取值为第一值,则确定第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式;若第二语法元素标识信息的取值为第二值,则确定第二语法元素标识信息指示当前块的第二颜色分量不使用目标预测模式。
在一些实施例中,解码单元2101,还配置为在第二语法元素标识信息的取值为第二值时,解码码流,确定第四语法元素标识信息的取值;
第二预测单元2103,还配置为根据第四语法元素标识信息的取值,确定当前块的第二颜色分量的第一帧内预测模式;以及根据第一帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
在一些实施例中,第二预测单元2103,还配置为在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第五语法元素标识信息的取值;以及根据第五语法元素标识信息的取值,确定当前块的第二颜色分量的第二帧内预测模式,根据第二帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;或者,还配置为在第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,解码码流,确定第六语法元素标识信息的取值;以及根据第六语法元素标识信息的取值,确定当前块的第二颜色分量的第三帧内预测模式,根据第三帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;其中,第二帧内预测模式包括目标预测模式,且第三帧内预测模式不包括目标预测模式。
在一些实施例中,解码单元2101,还配置为解码码流,获得第五语法元素标识信息对应的至少一个字符;以及利用第一预设二值映射表对第五语法元素标识信息对应的至少一个字符进行映射处理,确 定第五语法元素标识信息的取值。
在一些实施例中,解码单元2101,还配置为解码码流,获得第六语法元素标识信息对应的至少一个字符;以及利用第二预设二值映射表对第六语法元素标识信息对应的至少一个字符进行映射处理,确定第六语法元素标识信息的取值。
在一些实施例中,第二确定单元2102,还配置为在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,获得第二语法元素标识信息对应的至少一个字符;以及利用第一预设二值映射表对第二语法元素标识信息对应的至少一个字符进行映射处理,确定第二语法元素标识信息的取值;或者,还配置为在第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,解码码流,获得第二语法元素标识信息对应的至少一个字符;以及利用第二预设二值映射表对第二语法元素标识信息对应的至少一个字符进行映射处理,确定第二语法元素标识信息的取值。
在一些实施例中,第二预测单元2103,还配置为若第二语法元素标识信息的取值满足第一预设常数值,则确定第二语法元素标识信息指示当前块的第二颜色分量不使用目标预测模式,在确定当前块的第二颜色分量的第四帧内预测模式之后,根据第四帧内预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值;或者,若第二语法元素标识信息的取值满足第二预设常数值,则确定第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式,根据目标预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机可读存储介质,应用于解码器200,该计算机可读存储介质存储有计算机程序,所述计算机程序被第二处理器执行时实现前述实施例中任一项所述的方法。
基于解码器200的组成以及计算机可读存储介质,参见图22,其示出了本申请实施例提供的解码器200的具体硬件结构示意图。如图22所示,解码器200可以包括:第二通信接口2201、第二存储器2202和第二处理器2203;各个组件通过第二总线系统2204耦合在一起。可理解,第二总线系统2204用于实现这些组件之间的连接通信。第二总线系统2204除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图22中将各种总线都标为第二总线系统2204。其中,
第二通信接口2201,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第二存储器2202,用于存储能够在第二处理器2203上运行的计算机程序;
第二处理器2203,用于在运行所述计算机程序时,执行:
确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。
或者,第二处理器2203,还用于在运行所述计算机程序时,执行:
确定第一语法元素标识信息的取值;在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值;在第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式时,根据目标预测模式对当前块的第二颜色分量进行帧内预测处理,确定当前块的第二颜色分量的预测值。
可选地,作为另一个实施例,第二处理器2203还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
可以理解,第二存储器2202与第一存储器1902的硬件功能类似,第二处理器2203与第一处理器1903的硬件功能类似;这里不再详述。
本实施例提供了一种解码器,在该解码器中,根据亮度预测模式确定色度预测模式的过程中,如果当前块对应的亮度块为IBC模式,那么可以根据亮度块的块向量参数来确定应用色度分量的目标块向量参数,并根据这个目标块向量参数对色度分量按照IBC扩展模式进行预测处理,确定当前块块的色度预测值;如此,不仅改善了色度预测的单一性问题,隐式地将IBC模式增加到色度预测中,充分利用了同位亮度块的相关信息,能够提高色度预测的准确性,而且还能够节省码率,提高编解码效率,进而提升编解码性能。
在本申请的再一实施例中,参见图23,其示出了本申请实施例提供的一种编解码系统的组成结构 示意图。如图23所示,编解码系统230可以包括编码器2301和解码器2302。
在本申请实施例中,编码器2301可以为前述实施例中任一项所述的编码器,解码器2302可以为前述实施例中任一项所述的解码器。
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例中,在编码端,在当前块的第二颜色分量的预测模式为目标预测模式时,确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。在解码端,确定第一语法元素标识信息的取值;在第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值;在第二语法元素标识信息指示当前块的第二颜色分量使用目标预测模式时,确定当前块的第一颜色分量块;在第一颜色分量块的预测模式为IBC模式时,确定第一颜色分量块的第一块向量参数;根据第一颜色分量块的第一块向量参数,确定当前块的第二颜色分量的目标块向量参数;根据目标块向量参数对当前块的第二颜色分量进行IBC扩展模式的预测处理,确定当前块的第二颜色分量的预测值。这样,本申请实施例在根据亮度预测模式确定色度预测模式的过程中,如果当前块对应的亮度块为IBC模式,那么可以根据亮度块的块向量参数来确定应用色度分量的目标块向量参数,并根据这个目标块向量参数对色度分量按照IBC扩展模式进行预测处理,确定当前块块的色度预测值;如此,不仅改善了色度预测的单一性问题,隐式地将IBC模式增加到色度预测中,充分利用了同位亮度块的相关信息,能够提高色度预测的准确性,而且还能够节省码率,提高编解码效率,进而提升编解码性能。

Claims (73)

  1. 一种确定预测模式的方法,包括:
    确定当前块的第一颜色分量块;
    在所述第一颜色分量块的预测模式为IBC模式时,确定所述第一颜色分量块的第一块向量参数;
    根据所述第一颜色分量块的第一块向量参数,确定所述当前块的第二颜色分量的目标块向量参数;
    根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值。
  2. 根据权利要求1所述的方法,其中,所述确定当前块的第一颜色分量块,包括:
    确定所述当前块的同位置的第一颜色分量区域;
    从所述第一颜色分量区域划分的多个块中,确定所述当前块的第一颜色分量块。
  3. 根据权利要求2所述的方法,其中,所述从所述第一颜色分量区域划分的多个块中,确定所述当前块的第一颜色分量块,包括:
    在所述第一颜色分量区域划分的多个块中选取目标块,将所述目标块作为所述当前块的第一颜色分量块。
  4. 根据权利要求3所述的方法,其中,所述方法还包括:
    将所述第一颜色分量区域中处于中心位置的块选取为所述目标块;
    或者,
    将所述第一颜色分量区域中处于左上角位置的块选取为所述目标块;
    或者,
    将所述第一颜色分量区域中处于右下角位置的块选取为所述目标块。
  5. 根据权利要求2所述的方法,其中,所述从所述第一颜色分量区域划分的多个块中,确定所述当前块的第一颜色分量块,包括:
    从所述第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块;
    根据预设顺序依次获取所述至少一个候选块并进行模式判断,若判断出的首个候选块使用IBC模式,则将所述首个候选块作为所述当前块的第一颜色分量块。
  6. 根据权利要求2所述的方法,其中,所述从所述第一颜色分量区域划分的多个块中,确定所述当前块的第一颜色分量块,包括:
    从所述第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块,将所述至少一个候选块确定为所述当前块的第一颜色分量块;
    相应地,所述在所述第一颜色分量块的预测模式为IBC模式时,确定所述第一颜色分量块的第一块向量参数,包括:
    从所述至少一个候选块中,确定使用IBC模式的至少一个目标块,并确定所述至少一个目标块各自的第一块向量参数;
    根据所述至少一个目标块各自的第一块向量参数进行均值计算,将计算结果作为所述第一颜色分量块的第一块向量参数。
  7. 根据权利要求6所述的方法,其中,所述在所述第一颜色分量块的预测模式为IBC模式时,确定所述第一颜色分量块的第一块向量参数,还包括:
    从所述至少一个候选块中,确定使用IBC模式的至少一个目标块;
    根据模板匹配方式对所述至少一个目标块进行搜索,确定最佳块向量参数,将所述最佳块向量参数作为所述第一颜色分量块的第一块向量参数。
  8. 根据权利要求1所述的方法,其中,所述根据所述第一颜色分量块的第一块向量参数,确定所述当前块的目标块向量参数,包括:
    对所述第一颜色分量块的第一块向量参数进行调整,确定所述当前块的目标块向量参数。
  9. 根据权利要求8所述的方法,其中,所述对所述第一颜色分量块的第一块向量参数进行调整,确定所述当前块的目标块向量参数,包括:
    确定所述当前块的颜色采样格式;
    根据所述颜色采样格式对所述第一颜色分量块的第一块向量参数进行缩放处理,确定所述当前块的目标块向量参数。
  10. 根据权利要求9所述的方法,其中,所述对所述第一颜色分量块的第一块向量参数进行调整,确定所述当前块的目标块向量参数,还包括:
    在根据所述颜色采样格式对所述第一颜色分量块的第一块向量参数进行缩放处理后,得到所述当前块的初始块向量参数;
    对所述当前块的初始块向量参数进行修正处理,确定所述当前块的目标块向量参数。
  11. 根据权利要求10所述的方法,其中,所述方法还包括:
    根据所述当前块的初始块向量参数直接确定所述当前块的目标块向量参数。
  12. 根据权利要求1所述的方法,其中,所述方法还包括:
    在确定所述当前块的目标块向量参数之后,判断所述目标块向量参数是否满足可用条件;
    在所述目标块向量参数满足可用条件时,执行根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值的步骤。
  13. 根据权利要求12所述的方法,其中,所述目标块向量参数满足可用条件,至少包括:
    根据所述目标块向量参数指示的偏移位置未超出图像边界;
    根据所述目标块向量参数指示的偏移位置未覆盖所述当前块;
    根据所述目标块向量参数指示的偏移位置未超出IBC模式的可用区域;
    根据所述目标块向量参数指示的偏移位置已经重建。
  14. 根据权利要求5所述的方法,其中,所述方法还包括:
    在判断出的首个候选块使用IBC模式时,确定所述首个候选块的第一块向量参数;
    判断所述首个候选块的第一块向量参数是否满足可用条件;
    若所述首个候选块的第一块向量参数满足可用条件,则将所述首个候选块作为所述当前块的第一颜色分量块;
    若所述首个候选块的第一块向量参数不满足可用条件,则继续进行下一候选块的模式判断,直至确定出使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,将所述目标候选块作为所述当前块的第一颜色分量块。
  15. 根据权利要求14所述的方法,其中,所述方法还包括:
    若所述至少一个候选块中不存在使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,则根据第一预设模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值;
    其中,所述第一预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式、CCLM模式和跳过模式。
  16. 根据权利要求1所述的方法,其中,所述根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值,包括:
    根据所述目标块向量参数和所述当前块的位置信息,确定所述当前块的偏移位置;
    根据所述当前块的偏移位置进行块复制处理,得到第一预测块;
    根据所述第一预测块,确定所述当前块的第二颜色分量的预测值。
  17. 根据权利要求16所述的方法,其中,所述根据所述第一预测块,确定所述当前块的第二颜色分量的预测值,包括:
    对所述第一预测块进行修正操作,确定所述当前块的第二颜色分量的预测值。
  18. 根据权利要求16所述的方法,其中,所述根据所述第一预测块,确定所述当前块的第二颜色分量的预测值,包括:
    根据第二预设模式对所述当前块的第二颜色分量进行帧内预测处理,得到第二预测块;
    对所述第一预测块与所述第二预测块进行加权融合处理,确定所述当前块的第二颜色分量的预测值;
    其中,所述第二预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式和CCLM模式。
  19. 一种解码方法,包括:
    确定第一语法元素标识信息的取值;
    在所述第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值;
    在所述第二语法元素标识信息指示所述当前块的第二颜色分量使用目标预测模式时,根据所述目标预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值。
  20. 根据权利要求19所述的方法,其中,所述目标预测模式为根据权利要求1至18中任一项所述的方法确定的预测模式。
  21. 根据权利要求19所述的方法,其中,所述根据所述目标预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量块,包括:
    确定所述当前块的第一颜色分量块;
    在所述第一颜色分量块的预测模式为IBC模式时,确定所述第一颜色分量块的第一块向量参数,并根据所述第一颜色分量块的第一块向量参数,确定所述当前块的第二颜色分量的目标块向量参数;
    根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值。
  22. 根据权利要求19所述的方法,其中,所述根据所述目标预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量块,包括:
    解码码流,确定所述当前块的目标块向量参数;
    根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值。
  23. 根据权利要求19所述的方法,其中,所述确定第一语法元素标识信息的取值,包括:
    解码码流,确定第三语法元素标识信息的取值;
    若所述第三语法元素标识信息的取值为第一值且所述当前块满足预设条件,则确定所述第一语法元素标识信息的取值为第一值;
    若所述第三语法元素标识信息的取值为第二值,则确定所述第一语法元素标识信息的取值为第二值。
  24. 根据权利要求23所述的方法,其中,所述当前块满足预设条件,至少包括:
    所述当前块所属的片类型满足I帧;
    所述当前块的尺寸参数满足预设上限值。
  25. 根据权利要求23所述的方法,其中,所述方法还包括:
    若所述第三语法元素标识信息的取值为第一值,则确定所述第三语法元素标识信息指示当前图像允许使用IBC模式;
    若所述第三语法元素标识信息的取值为第二值,则确定所述第三语法元素标识信息指示当前图像不允许使用IBC模式;
    其中,所述当前图像包括所述当前块。
  26. 根据权利要求19所述的方法,其中,所述方法还包括:
    若所述第一语法元素标识信息的取值为第一值,则确定所述第一语法元素标识信息指示所述当前块的第二颜色分量允许使用IBC扩展模式;
    若所述第一语法元素标识信息的取值为第二值,则确定所述第一语法元素标识信息指示所述当前块的第二颜色分量不允许使用IBC扩展模式。
  27. 根据权利要求19所述的方法,其中,所述方法还包括:
    若所述第二语法元素标识信息的取值为第一值,则确定所述第二语法元素标识信息指示所述当前块的第二颜色分量使用目标预测模式;
    若所述第二语法元素标识信息的取值为第二值,则确定所述第二语法元素标识信息指示所述当前块的第二颜色分量不使用目标预测模式。
  28. 根据权利要求27所述的方法,其中,所述方法还包括:
    在所述第二语法元素标识信息的取值为第二值时,解码码流,确定第四语法元素标识信息的取值;
    根据所述第四语法元素标识信息的取值,确定所述当前块的第二颜色分量的第一帧内预测模式;
    根据所述第一帧内预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值。
  29. 根据权利要求19所述的方法,其中,所述方法还包括:
    在所述第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第五语法元素标识信息的取值;以及根据所述第五语法元素标识信息的取值,确定所述当前块的第二颜色分量的第二帧内预测模式,根据所述第二帧内预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值;
    在所述第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,解码码流,确定第六语法元素标识信息的取值;以及根据所述第六语法元素标识信息的取值,确定所述当前块的第二颜色分量的第三帧内预测模式,根据所述第三帧内预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值;
    其中,所述第二帧内预测模式包括所述目标预测模式,且所述第三帧内预测模式不包括所述目标预测模式。
  30. 根据权利要求29所述的方法,其中,所述解码码流,确定第五语法元素标识信息的取值,包括:
    解码码流,获得所述第五语法元素标识信息对应的至少一个字符;
    利用第一预设二值映射表对所述第五语法元素标识信息对应的至少一个字符进行映射处理,确定所述第五语法元素标识信息的取值;
    所述解码码流,确定第六语法元素标识信息的取值,包括:
    解码码流,获得所述第六语法元素标识信息对应的至少一个字符;
    利用第二预设二值映射表对所述第六语法元素标识信息对应的至少一个字符进行映射处理,确定所述第六语法元素标识信息的取值。
  31. 根据权利要求19所述的方法,其中,所述解码码流,确定第二语法元素标识信息的取值,包括:
    在所述第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,获得所述第二语法元素标识信息对应的至少一个字符;以及利用第一预设二值映射表对所述第二语法元素标识信息对应的至少一个字符进行映射处理,确定所述第二语法元素标识信息的取值;
    在所述第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,解码码流,获得所述第二语法元素标识信息对应的至少一个字符;以及利用第二预设二值映射表对所述第二语法元素标识信息对应的至少一个字符进行映射处理,确定所述第二语法元素标识信息的取值。
  32. 根据权利要求19所述的方法,其中,所述解码码流,确定第二语法元素标识信息的取值,包括:
    若所述第二语法元素标识信息的取值满足第一预设常数值,则确定所述第二语法元素标识信息指示所述当前块的第二颜色分量不使用目标预测模式,在确定所述当前块的第二颜色分量的第四帧内预测模式之后,根据所述第四帧内预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值;
    若所述第二语法元素标识信息的取值满足第二预设常数值,则确定所述第二语法元素标识信息指示所述当前块的第二颜色分量使用目标预测模式,根据所述目标预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值。
  33. 一种编码方法,包括:
    在当前块的第二颜色分量的预测模式为目标预测模式时,确定所述当前块的第一颜色分量块;
    在所述第一颜色分量块的预测模式为IBC模式时,确定所述第一颜色分量块的第一块向量参数;
    根据所述第一颜色分量块的第一块向量参数,确定所述当前块的第二颜色分量的目标块向量参数;
    根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值。
  34. 根据权利要求33所述的方法,其中,所述目标预测模式为根据权利要求1至18中任一项所述的方法确定的预测模式。
  35. 根据权利要求33所述的方法,其中,所述确定当前块的第一颜色分量块,包括:
    确定所述当前块的同位置的第一颜色分量区域;
    从所述第一颜色分量区域划分的多个块中,确定所述当前块的第一颜色分量块。
  36. 根据权利要求35所述的方法,其中,所述从所述第一颜色分量区域划分的多个块中,确定所述当前块的第一颜色分量块,包括:
    在所述第一颜色分量区域划分的多个块中选取目标块,将所述目标块作为所述当前块的第一颜色分量块。
  37. 根据权利要求36所述的方法,其中,所述方法还包括:
    将所述第一颜色分量区域中处于中心位置的块选取为所述目标块;
    或者,
    将所述第一颜色分量区域中处于左上角位置的块选取为所述目标块;
    或者,
    将所述第一颜色分量区域中处于右下角位置的块选取为所述目标块。
  38. 根据权利要求35所述的方法,其中,所述从所述第一颜色分量区域划分的多个块中,确定所述当前块的第一颜色分量块,包括:
    从所述第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块;
    根据预设顺序依次获取所述至少一个候选块并进行模式判断,若判断出的首个候选块使用IBC模式,则将所述首个候选块作为所述当前块的第一颜色分量块。
  39. 根据权利要求35所述的方法,其中,所述从所述第一颜色分量区域划分的多个块中,确定所述当前块的第一颜色分量块,包括:
    从所述第一颜色分量区域划分的多个块中,确定处于预设位置的至少一个候选块,将所述至少一个候选块确定为所述当前块的第一颜色分量块;
    相应地,所述在所述第一颜色分量块的预测模式为IBC模式时,确定所述第一颜色分量块的第一块向量参数,包括:
    从所述至少一个候选块中,确定使用IBC模式的至少一个目标块,并确定所述至少一个目标块各自的第一块向量参数;
    对所述至少一个目标块各自的第一块向量参数进行均值计算,将计算结果作为所述第一颜色分量块的第一块向量参数。
  40. 根据权利要求39所述的方法,其中,所述方法还包括:
    从所述至少一个候选块中,确定使用IBC模式的至少一个目标块;
    根据模板匹配方式对所述至少一个目标块进行搜索,确定最佳块向量参数,将所述最佳块向量参数作为所述第一颜色分量块的第一块向量参数。
  41. 根据权利要求33所述的方法,其中,所述根据所述第一颜色分量块的第一块向量参数,确定所述当前块的目标块向量参数,包括:
    对所述第一颜色分量块的第一块向量参数进行调整,确定所述当前块的目标块向量参数。
  42. 根据权利要求41所述的方法,其中,所述对所述第一颜色分量块的第一块向量参数进行调整,确定所述当前块的目标块向量参数,包括:
    确定所述当前块的颜色采样格式;
    根据所述颜色采样格式对所述第一颜色分量块的第一块向量参数进行缩放处理,确定所述当前块的目标块向量参数。
  43. 根据权利要求42所述的方法,其中,所述对所述第一颜色分量块的第一块向量参数进行调整,确定所述当前块的目标块向量参数,还包括:
    在根据所述颜色采样格式对所述第一颜色分量块的第一块向量参数进行缩放处理后,得到所述当前块的初始块向量参数;
    对所述当前块的初始块向量参数进行修正处理,确定所述当前块的目标块向量参数。
  44. 根据权利要求43所述的方法,其中,所述方法还包括:
    根据所述当前块的初始块向量参数直接确定所述当前块的目标块向量参数。
  45. 根据权利要求43所述的方法,其中,所述对所述当前块的初始块向量参数进行修正处理,确定所述当前块的目标块向量参数,包括:
    根据所述当前块的初始块向量参数和所述当前块的位置信息,确定所述当前块的搜索区域;
    根据模板匹配方式在所述搜索区域内进行搜索,确定最佳块向量参数,将所述最佳块向量作为所述当前块的目标块向量参数。
  46. 根据权利要求33所述的方法,其中,所述方法还包括:
    在确定所述当前块的目标块向量参数之后,判断所述目标块向量参数是否满足可用条件;
    在所述目标块向量参数满足可用条件时,执行根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值的步骤。
  47. 根据权利要求46所述的方法,其中,所述目标块向量参数满足可用条件,至少包括:
    根据所述目标块向量参数指示的偏移位置未超出图像边界;
    根据所述目标块向量参数指示的偏移位置未覆盖所述当前块;
    根据所述目标块向量参数指示的偏移位置未超出IBC模式的可用区域;
    根据所述目标块向量参数指示的偏移位置已经重建。
  48. 根据权利要求38所述的方法,其中,所述方法还包括:
    在判断出的首个候选块使用IBC模式时,确定所述首个候选块的第一块向量参数;
    判断所述首个候选块的第一块向量参数是否满足可用条件;
    若所述首个候选块的第一块向量参数满足可用条件,则将所述首个候选块作为所述当前块的第一颜色分量块;
    若所述首个候选块的第一块向量参数不满足可用条件,则继续进行下一候选块的模式判断,直至确定出使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,将所述目标候选块作为所述当前块的第一颜色分量块。
  49. 根据权利要求48所述的方法,其中,所述方法还包括:
    若所述至少一个候选块中不存在使用IBC模式且对应的第一块向量参数满足可用条件的目标候选块,则根据第一预设模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色 分量的预测值;
    其中,所述第一预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式、CCLM模式和跳过模式。
  50. 根据权利要求33所述的方法,其中,所述根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值,包括:
    根据所述目标块向量参数和所述当前块的位置信息,确定所述当前块的偏移位置;
    根据所述当前块的偏移位置进行块复制处理,得到第一预测块;
    根据所述第一预测块,确定所述当前块的第二颜色分量的预测值。
  51. 根据权利要求50所述的方法,其中,所述根据所述第一预测块,确定所述当前块的第二颜色分量的预测值,包括:
    对所述第一预测块进行修正操作,确定所述当前块的第二颜色分量的预测值。
  52. 根据权利要求50所述的方法,其中,所述根据所述第一预测块,确定所述当前块的第二颜色分量的预测值,包括:
    根据第二预设模式对所述当前块的第二颜色分量进行帧内预测处理,得到第二预测块;
    对所述第一预测块与所述第二预测块进行加权融合处理,确定所述当前块的第二颜色分量的预测值;
    其中,所述第二预设模式至少包括下述其中一项:PLANAR模式、DM模式、DC模式和CCLM模式。
  53. 根据权利要求33所述的方法,其中,所述方法还包括:
    确定第一语法元素标识信息的取值;
    对所述第一语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
  54. 根据权利要求53所述的方法,其中,所述确定第一语法元素标识信息的取值,包括:
    若所述第一语法元素标识信息指示所述当前块的第二颜色分量允许使用IBC扩展模式,则确定所述第一语法元素标识信息的取值为第一值;
    若所述第一语法元素标识信息指示所述当前块的第二颜色分量不允许使用IBC扩展模式,则确定所述第一语法元素标识信息的取值为第二值。
  55. 根据权利要求53所述的方法,其中,所述方法还包括:
    在所述第一语法元素标识信息指示所述当前块的第二颜色分量允许使用IBC扩展模式时,确定第二语法元素标识信息的取值;
    对所述第二语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
  56. 根据权利要求55所述的方法,其中,所述确定第二语法元素标识信息的取值,包括:
    若所述第二语法元素标识信息指示所述当前块的第二颜色分量使用目标预测模式,则确定所述第二语法元素标识信息的取值为第一值;
    若所述第二语法元素标识信息指示所述当前块的第二颜色分量不使用目标预测模式,则确定所述第二语法元素标识信息的取值为第二值。
  57. 根据权利要求53所述的方法,其中,所述方法还包括:
    确定第三语法元素标识信息的取值;
    对所述第三语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
  58. 根据权利要求57所述的方法,其中,所述确定第一语法元素标识信息的取值,还包括:
    若所述第三语法元素标识信息的取值为第一值且所述当前块满足预设条件,则确定所述第一语法元素标识信息的取值为第一值;
    若所述第三语法元素标识信息的取值为第二值,则确定所述第一语法元素标识信息的取值为第二值。
  59. 根据权利要求58所述的方法,其中,所述当前块满足预设条件,至少包括:
    所述当前块所属的片类型满足I帧;
    所述当前块的尺寸参数满足预设上限值。
  60. 根据权利要求57所述的方法,其中,所述确定第三语法元素标识信息的取值,包括:
    若所述第三语法元素标识信息指示当前图像允许使用IBC模式,则确定所述第三语法元素标识信息的取值为第一值;
    若所述第三语法元素标识信息指示当前图像不允许使用IBC模式,则确定所述第三语法元素标识信息的取值为第二值。
  61. 根据权利要求55所述的方法,其中,所述方法还包括:
    在所述第二语法元素标识信息指示所述当前块的第二颜色分量不使用目标预测模式时,确定所述当前块的第二颜色分量的第一帧内预测模式;
    根据所述第一帧内预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值。
  62. 根据权利要求61所述的方法,其中,所述方法还包括:
    根据所述当前块的第二颜色分量的第一帧内预测模式,确定第四语法元素标识信息的取值;
    对所述第四语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
  63. 根据权利要求53所述的方法,其中,所述方法还包括:
    在所述第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,确定所述当前块的第二颜色分量的第二帧内预测模式,根据所述第二帧内预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值;
    在所述第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,确定所述当前块的第二颜色分量的第三帧内预测模式,根据所述第三帧内预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值;
    其中,所述第二帧内预测模式包括所述目标预测模式,且所述第三帧内预测模式不包括所述目标预测模式。
  64. 根据权利要求63所述的方法,其中,所述方法还包括:
    根据所述当前块的第二颜色分量的第二帧内预测模式,确定第五语法元素标识信息的取值;
    利用第一预设二值映射表对所述第五语法元素标识信息的取值进行二值化处理,确定所述第五语法元素标识信息对应的至少一个字符;
    对所述第五语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流。
  65. 根据权利要求63所述的方法,其中,所述方法还包括:
    根据所述当前块的第二颜色分量的第三帧内预测模式,确定第六语法元素标识信息的取值;
    利用第二预设二值映射表对所述第六语法元素标识信息的取值进行二值化处理,确定所述第六语法元素标识信息对应的至少一个字符;
    对所述第六语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流。
  66. 根据权利要求53所述的方法,其中,所述方法还包括:
    在所述第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,利用第一预设二值映射表对所述第二语法元素标识信息的取值进行二值化处理,确定所述第二语法元素标识信息对应的至少一个字符;以及对所述第二语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流;或者,
    在所述第一语法元素标识信息指示当前块的第二颜色分量不允许使用IBC扩展模式时,利用第二预设二值映射表对所述第二语法元素标识信息的取值进行二值化处理,确定所述第二语法元素标识信息对应的至少一个字符;以及对所述第二语法元素标识信息对应的至少一个字符进行编码,将所得到的编码比特写入码流。
  67. 一种码流,其中,所述码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:
    当前块的目标块向量参数、第一语法元素标识信息的取值、第二语法元素标识信息的取值、第三语法元素标识信息的取值、第四语法元素标识信息的取值、第五语法元素标识信息的取值和第六语法元素标识信息的取值。
  68. 一种编码器,包括第一确定单元和第一预测单元;其中,
    所述第一确定单元,配置为在当前块的第二颜色分量的预测模式为目标预测模式时,确定所述当前块的第一颜色分量块;以及在所述第一颜色分量块的预测模式为IBC模式时,确定所述第一颜色分量块的第一块向量参数;根据所述第一颜色分量块的第一块向量参数,确定所述当前块的第二颜色分量的目标块向量参数;
    所述第一预测单元,配置为根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值。
  69. 一种编码器,包括第一存储器和第一处理器;其中,
    所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;
    所述第一处理器,用于在运行所述计算机程序时,执行如权利要求33至66中任一项所述的方法。
  70. 一种解码器,包括第二确定单元和第二预测单元;其中,
    所述第二确定单元,配置为确定当前块的第一颜色分量块;以及在所述第一颜色分量块的预测模式为IBC模式时,确定所述第一颜色分量块的第一块向量参数;根据所述第一颜色分量块的第一块向量参数,确定所述当前块的第二颜色分量的目标块向量参数;
    所述第二预测单元,配置为根据所述目标块向量参数对所述当前块的第二颜色分量进行IBC扩展模式的预测处理,确定所述当前块的第二颜色分量的预测值。
  71. 一种解码器,包括解码单元、第二确定单元和第二预测单元;其中,
    所述第二确定单元,配置为确定第一语法元素标识信息的取值;
    所述解码单元,配置为在所述第一语法元素标识信息指示当前块的第二颜色分量允许使用IBC扩展模式时,解码码流,确定第二语法元素标识信息的取值;
    所述第二预测单元,配置为在所述第二语法元素标识信息指示所述当前块的第二颜色分量使用目标预测模式时,根据所述目标预测模式对所述当前块的第二颜色分量进行帧内预测处理,确定所述当前块的第二颜色分量的预测值。
  72. 一种解码器,所述解码器包括第二存储器和第二处理器;其中,
    所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;
    所述第二处理器,用于在运行所述计算机程序时,执行如权利要求1至18中任一项所述的方法、或者如权利要求19至32中任一项所述的方法。
  73. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如权利要求1至18中任一项所述的方法、或者实现如权利要求19至32中任一项所述的方法、或者实现如权利要求33至66中任一项所述的方法。
PCT/CN2022/125208 2022-10-13 2022-10-13 编解码方法、码流、编码器、解码器以及存储介质 WO2024077569A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/125208 WO2024077569A1 (zh) 2022-10-13 2022-10-13 编解码方法、码流、编码器、解码器以及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/125208 WO2024077569A1 (zh) 2022-10-13 2022-10-13 编解码方法、码流、编码器、解码器以及存储介质

Publications (1)

Publication Number Publication Date
WO2024077569A1 true WO2024077569A1 (zh) 2024-04-18

Family

ID=90668560

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/125208 WO2024077569A1 (zh) 2022-10-13 2022-10-13 编解码方法、码流、编码器、解码器以及存储介质

Country Status (1)

Country Link
WO (1) WO2024077569A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200120353A1 (en) * 2018-10-11 2020-04-16 Tencent America LLC Method and apparatus for video coding
US20220007034A1 (en) * 2019-07-24 2022-01-06 Huawei Technologies Co., Ltd. Encoder, a decoder and corresponding methods related to intra prediction mode
US20220078410A1 (en) * 2019-06-28 2022-03-10 Bytedance Inc. Chroma intra mode derivation in screen content coding
US20220295101A1 (en) * 2019-12-27 2022-09-15 Fujitsu Limited Coding and decoding methods and apparatuses for adaptive color transform and video codec device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200120353A1 (en) * 2018-10-11 2020-04-16 Tencent America LLC Method and apparatus for video coding
US20220078410A1 (en) * 2019-06-28 2022-03-10 Bytedance Inc. Chroma intra mode derivation in screen content coding
US20220007034A1 (en) * 2019-07-24 2022-01-06 Huawei Technologies Co., Ltd. Encoder, a decoder and corresponding methods related to intra prediction mode
US20220295101A1 (en) * 2019-12-27 2022-09-15 Fujitsu Limited Coding and decoding methods and apparatuses for adaptive color transform and video codec device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
H. YANG (INTERDIGITAL), Y. HE (INTERDIGITAL): "CE8-related: 4x4 sub-block based dual-tree chroma IBC block-vector derivation", 15. JVET MEETING; 20190703 - 20190712; GOTHENBURG; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 5 July 2019 (2019-07-05), XP030220265 *
W. ZHU (BYTEDANCE), L. ZHANG (BYTEDANCE), J. XU (BYTEDANCE), K. ZHANG (BYTEDANCE): "CE8-related: Signalling of chroma IBC prediction modes", 15. JVET MEETING; 20190703 - 20190712; GOTHENBURG; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 26 June 2019 (2019-06-26), XP030219917 *

Similar Documents

Publication Publication Date Title
TWI663872B (zh) 用於視訊編解碼的基於雙向光流的運動細化的方法及裝置
CN113748676A (zh) 帧内编解码模式下的矩阵推导
CN111131830B (zh) 重叠块运动补偿的改进
WO2022104498A1 (zh) 帧内预测方法、编码器、解码器以及计算机存储介质
CN113853791B (zh) 数字视频中的变换旁路编解码残差块
WO2021139572A1 (zh) 编码方法、解码方法、编码器、解码器以及存储介质
US20230262212A1 (en) Picture prediction method, encoder, decoder, and computer storage medium
WO2021203924A1 (zh) 编码方法、解码方法、编码器、解码器以及存储介质
CN114287133A (zh) 帧内模式中的预测样点滤波的加权因子
CN115668923A (zh) 编解码视频中多重变换矩阵的指示
CN115004697A (zh) 来自多个跨分量的预测
CA3113787A1 (en) Decoding prediction method, apparatus and computer storage medium which use reference samples adjacent to at least one side of decoding block
CN114979631A (zh) 用于利用光流的预测细化、双向光流和解码器侧运动矢量细化的方法和装置
CN114788278A (zh) 使用多个分量的跨分量预测
WO2024077569A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024119521A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024098263A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023123736A1 (zh) 预测方法、装置、设备、系统、及存储介质
WO2024108391A1 (zh) 视频编解码方法、装置、设备、系统、及存储介质
WO2024119522A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024077553A1 (zh) 视频编解码方法、装置、设备、系统、及存储介质
WO2024007116A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2024092425A1 (zh) 视频编解码方法、装置、设备、及存储介质
RU2815175C2 (ru) Составление списка наиболее вероятных режимов для матричного внутрикадрового предсказания
WO2023197194A1 (zh) 编解码方法、装置、编码设备、解码设备以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22961758

Country of ref document: EP

Kind code of ref document: A1