WO2020182168A1 - Decoding method and device - Google Patents

Decoding method and device Download PDF

Info

Publication number
WO2020182168A1
WO2020182168A1 PCT/CN2020/078874 CN2020078874W WO2020182168A1 WO 2020182168 A1 WO2020182168 A1 WO 2020182168A1 CN 2020078874 W CN2020078874 W CN 2020078874W WO 2020182168 A1 WO2020182168 A1 WO 2020182168A1
Authority
WO
WIPO (PCT)
Prior art keywords
image block
current image
mode
pixel value
component
Prior art date
Application number
PCT/CN2020/078874
Other languages
French (fr)
Chinese (zh)
Inventor
陈方栋
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2020182168A1 publication Critical patent/WO2020182168A1/en

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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • 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/136Incoming video signal characteristics or properties
    • 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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • This application relates to video coding and decoding technology, and in particular to a decoding method and device.
  • the intra-frame prediction technology in video coding reduces the redundancy of the information to be coded and improves the compression efficiency of image data by using the correlation between pixels within a frame of image.
  • the luminance and chrominance share the prediction partition mode (part_mode) for independent prediction, that is, the luminance component uses the surrounding reconstructed luminance value to predict the luminance value of the current block to be coded, and the chrominance
  • the prediction of the value is only based on the reconstructed chrominance values around it for intra prediction.
  • YUV a color coding method
  • RGB a color mode
  • the cross-component prediction technology uses the coded color component information to predict the color component to be coded, which further removes the correlation between the color components and improves the coding compression quality.
  • the current cross-component prediction technology does not limit the starting conditions of the cross-component prediction technology, which may lead to the use of the cross-component prediction technology in scenes that are not suitable for the use of the cross-component prediction technology, and thus lead to poor coding performance.
  • the present application provides a decoding method and device.
  • a decoding method which includes: determining whether the current image block allows the cross-component linear model prediction (CCLM) mode to be enabled based on the decoded information; if the current image block allows the CCLM to be enabled Mode, determine the target prediction mode used by the current image block; if the target prediction mode is the CCLM reference mode, obtain the reference pixel value according to the target prediction mode; determine the linear transformation parameter according to the reference pixel value ; Determine the pixel value of the current component of the current image block according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
  • CCLM cross-component linear model prediction
  • a decoding device including a processor and a machine-readable storage medium
  • the machine-readable storage medium stores machine-readable instructions that can be executed by the processor, and The processor is prompted by the machine-readable instructions to: determine whether the current image block allows the CCLM mode to be enabled based on the decoded information; if the current image block allows the CCLM mode to be enabled, determine the target prediction mode used by the current image block; If the target prediction mode is the CCLM reference mode, obtain reference pixel values according to the target prediction mode; determine linear transformation parameters according to the reference pixel values; determine linear transformation parameters according to the linear transformation parameters and the current image block has been decoded The pixel value of the other component of, determines the pixel value of the current component of the current image block.
  • the decoding method of the embodiment of the present application determines whether the current image block allows the CCLM mode to be enabled based on the decoded information.
  • the target prediction mode used by the current image block is determined, and when the target prediction mode is In CCLM reference mode, the reference pixel value is obtained according to the target prediction mode, and then the linear transformation parameter is determined according to the reference pixel value, and the current image block is determined according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded
  • the pixel value of the current component of the CCLM mode is restricted by limiting the enabling conditions of the CCLM mode, which avoids the use of the CCLM mode in scenes where the CCLM mode is not applicable, and improves the coding performance.
  • Fig. 1 is a schematic diagram of a reference pixel value acquisition position in a CCLM_T mode
  • Fig. 2 is a schematic diagram of a reference pixel value acquisition position in a CCLM_L mode
  • Fig. 3 is a schematic flowchart of a decoding method shown in an exemplary embodiment of the present application
  • Fig. 4A is a schematic diagram showing a reference pixel value acquisition position of a CCLM_L mode according to an exemplary embodiment of the present application
  • Fig. 4B is a schematic diagram showing a reference pixel value acquisition position of a CCLM_T mode according to an exemplary embodiment of the present application
  • Fig. 4C is a schematic diagram showing a reference pixel value acquisition position of a CCLM_T_L mode according to an exemplary embodiment of the present application
  • Fig. 4D is a schematic diagram of obtaining linear transformation parameters according to an exemplary embodiment of the present application.
  • Fig. 5 is a schematic diagram of the hardware structure of a decoding device shown in an exemplary embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of a decoding device shown in an exemplary embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a decoding method provided by an embodiment of this application, where the decoding method may be applied to a decoding end device.
  • the decoding method may include the following steps:
  • Step S300 based on the decoded information, determine whether the current image block allows the CCLM mode to be enabled. If yes, go to step S310; otherwise, end the current process.
  • Cross-Component Linear Model Prediction is a cross-component prediction technology, based on the area of the reference luminance block, it can include three CCLM reference modes: using the reconstructed value above the current chrominance block and the corresponding luminance area
  • the schematic diagram of the CCLM_T mode of the current chrominance block can be shown in Figure 1; the reconstruction value on the left side of the current chrominance block and the CCLM_L mode corresponding to the luminance area are used, and the schematic diagram can be shown in Figure 2; The reconstruction value of and the CCLM_T_L mode of the corresponding brightness area.
  • the starting conditions of the CCLM mode may be limited to ensure that the scenes using the CCLM mode are all scenes suitable for using the CCLM.
  • the decoding end device when the decoding end device decodes the received code stream, it can determine whether the current image block allows the CCLM mode to be started based on the decoded information.
  • the prediction mode of the current image block is intra mode
  • At least one other component of the current image block has decoded the required pixel information, and the current component exists and has not been decoded;
  • the prediction mode of the current image block is not the corresponding brightness component mode (Direct Mode, DM for short);
  • the decoding information of at least one side of the image block on the left side and the upper side of the current component of the current image block is available;
  • the size of the current image block is within the preset size range.
  • the current component refers to the component being decoded in the current image block, which may include, but is not limited to, a luminance component or a chrominance component.
  • the current image can be Whether the block is in intra mode, whether there is at least one other component that has decoded the required pixel information, and whether the decoding information of at least one of the left and upper sides of the current component of the current image block is available as the current image block Reference conditions for whether to enable CCLM mode.
  • the decoder device determines that the current image block is allowed to be enabled
  • the CCLM mode needs to ensure that the prediction mode of the current image block is not the DM mode.
  • the size range of the image blocks that allow the CCLM mode to be enabled can also be limited (referred to herein as the preset size range, which can be set according to the actual scene).
  • the decoder device may determine that the prediction mode of the current image block is intra mode, at least one other component of the current image block has decoded the required pixel information, and the current component exists and is not decoded, and the prediction of the current image block
  • the mode is not DM mode
  • the decoding information of at least one of the image blocks on the left and upper side of the current component of the current image block is available, and the size of the current image block is within the preset size range, it is determined that the current image block is allowed to be enabled CCLM mode.
  • At least one other component may be a luminance component; if the current component is a luminance component, at least one other component may be a chrominance component; Is a Cb component, then at least one other component may be a Cr component.
  • the encoding end device may also determine the current image block based on the corresponding reference conditions. Whether the CCLM mode is allowed to be enabled when the component is encoded, its specific implementation is not repeated here.
  • the size of the foregoing current image block is within a preset size range, which may include:
  • the area of the current image block is greater than or equal to the first area threshold and less than or equal to the second area threshold;
  • the first area threshold and the second area threshold are both the n-th power of 2, n is a positive integer, and the second area threshold is greater than the first area threshold.
  • the size of the current image block can be characterized based on the area of the current image block, that is, it is necessary to ensure that the area of the current image block is within the preset area range. To allow the current image block to enable CCLM mode.
  • the preset area range may be greater than or equal to the first area threshold (may be called Smin) and less than or equal to the second area threshold (Smax), that is, it is necessary to ensure that the area of the current image block is in the range of [Smin, Smax] Within; Smin ⁇ Smax; Smin and Smax are the nth power of 2, and n is a positive integer.
  • Smin first area threshold
  • Smax second area threshold
  • the size of the foregoing current image block is within a preset size range, which may include:
  • the width of the current image block is greater than or equal to the first width threshold and less than or equal to the second width threshold;
  • the height of the current image block is greater than or equal to the first height threshold and less than or equal to the second height threshold;
  • the first width threshold, the second width threshold, the first height threshold, and the second height threshold are the n-th power of 2, where n is a positive integer, the first width threshold is less than the second width threshold, and the first height threshold is less than the second Height threshold.
  • the size of the current image block can be characterized based on the width and height of the current image block, that is, it is necessary to ensure that the width and height of the current image block are at the preset width respectively. Within the range and the preset height range, the current image block is allowed to enable CCLM mode.
  • the preset width range may be greater than or equal to the first width threshold (may be called Wmin), and less than or equal to the second width threshold (Wmax), that is, it is necessary to ensure that the width of the current image block is in the range of [Wmin, Wmax] Within; Wmin ⁇ Wmax; Wmin and Wmax are the nth power of 2, and n is a positive integer.
  • Wmin first width threshold
  • Wmax second width threshold
  • the preset height range may be greater than or equal to the first height threshold (may be called Hmin) and less than or equal to the second height threshold (Hmax), that is, it is necessary to ensure that the height of the current image block is in the range of [Hmin, Hmax] Within; Hmin ⁇ Hmax; Hmin and Hmax are the nth power of 2, and n is a positive integer.
  • Hmin first height threshold
  • Hmax second height threshold
  • the above-mentioned characterizing the size of the image block by the area of the image block or characterizing the size of the image block by the width and height of the image block is only the representation of the image block in the embodiment of the present application.
  • the specific example of the size is not a limitation of the protection scope of this application.
  • the size of the image block may also be characterized by the area, width, and height of the image block, and its specific implementation is not described here.
  • the decoding end device may continue to decode the current component of the current image block in the manner of steps S310 to S340.
  • the decoding end device determines that the current image block does not allow the CCLM mode to be enabled, the decoding end device can continue to decode the current image block according to other strategies.
  • the specific implementation can refer to the related implementation of the related solution, which is not done here in the embodiment of the application. Repeat.
  • Step S310 Determine the target prediction mode used by the current image block.
  • the decoder device when the decoder device determines that the current image block allows the CCLM mode to be enabled, the decoder device can analyze the specific prediction mode used by the current image block (referred to herein as the target prediction mode) to determine the current image block used Whether the target prediction mode is the CCLM reference mode (CCLM_L, CCLM_T, or CCLM_T_L).
  • the target prediction mode is the CCLM reference mode (CCLM_L, CCLM_T, or CCLM_T_L).
  • the foregoing determination of the target prediction mode used by the current image block may include:
  • the target prediction mode used by the current image block is determined in the candidate prediction mode list.
  • the decoder device can determine the candidate prediction mode list of the current image block, that is, the prediction mode supported by the current image block; on the other hand, the decoder device can The index value of the prediction mode used by the current image block is parsed from the code stream, and then, based on the parsed index value, the target prediction mode used by the current image block is determined in the candidate prediction mode list.
  • the foregoing determination of the candidate prediction mode list of the current image block may include:
  • a default list as a candidate prediction mode list can be pre-configured on the encoding end device and the decoding end device.
  • the default list can be negotiated and determined by the encoding end device and the decoding end device, or manually configured by the user on the encoding end device. And decoding end equipment.
  • the above-mentioned default list is the first list or the second list including part of the prediction modes in the first list.
  • the first list is ⁇ CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode ⁇ .
  • the non-CCLM mode may include, but is not limited to, angular prediction mode, DM mode, Planar mode, or DC mode.
  • the order of the modes in the first list may be the order of the modes listed in the list, or other orders.
  • This article takes the order listed in the list as an example.
  • the second list may be ⁇ non-CCLM mode, CCLM_L mode, CCLM_T mode ⁇ , ⁇ CCLM_T_L mode, non-CCLM mode, CCLM_T mode ⁇ or ⁇ CCLM_T_L mode, CCLM_T mode ⁇ , etc.
  • the foregoing determination of the candidate prediction mode list of the current image block may include:
  • a list of candidate prediction modes for the current image block is determined.
  • the decoding end device may determine the candidate prediction mode list of the current image block based on the location information of the current image block.
  • the position information of the current image block may include: whether the decoding information of the left or upper image block of the current image block is available and the position of the current image block in the largest coding unit (LCU).
  • LCU largest coding unit
  • the decoder device can determine whether the decoding information of the left or upper image block of the current image block is available, and The position of the current image block in the LCU.
  • the CCLM_T_L mode and CCLM_L mode are excluded from the candidate prediction mode list; if the upper information of the current image block is not available, the CCLM_T_L mode and CCLM_T mode are removed from the candidate prediction mode list Exclude: If the current image block is at the upper boundary of the LCU, that is, the current image block is connected to the upper LCU, the CCLM_T_L mode and the CCLM_T mode are excluded.
  • the unavailability of the left or upper image block of the current image block includes, but is not limited to, the left or upper image block of the current image block does not exist, or exists but is not decoded.
  • the decoding end device when the decoding end device determines the candidate prediction mode list of the current image block, it may analyze the index value of the prediction mode used by the current image block.
  • the decoding end device can parse Max-1 bits to determine the index value of the prediction mode used by the current image block.
  • the decoding end device can parse up to 3 bits, or stop parsing immediately when the parsing reaches 1. At this time, if it is resolved to "1", the index value is determined to be 0; if it is resolved to "01”, the index value is determined to be 1; if it is resolved to "001", the index value is determined to be 2; if it is resolved to "000” ", the index value is determined to be 3.
  • the decoding end device when the decoding end device parses the index value of the prediction mode used by the current image block, it may determine the target prediction mode used by the current image block in the determined candidate prediction mode list based on the index value.
  • the decoding end device determines that the target prediction mode used by the current image block is the CCLM reference mode (CCLM_L, CCLM_T, or CCLM_T_L), the decoding end device can continue to follow the steps S320 to S340 Perform the decoding of the current component of the current image block.
  • the target prediction mode used by the current image block is the CCLM reference mode (CCLM_L, CCLM_T, or CCLM_T_L)
  • the decoding end device can continue to follow the steps S320 to S340 Perform the decoding of the current component of the current image block.
  • the decoding-end device determines that the target prediction mode used by the current image block is a non-CCLM reference mode, the decoding-end device can continue to decode the current image block according to other strategies, and its specific implementation can refer to related implementations of related solutions. This application implements The examples are not repeated here.
  • Step S320 If the target prediction mode is the CCLM reference mode, obtain the reference pixel value according to the target prediction mode.
  • the decoder device when the decoder device determines that the target prediction mode used by the current image block is the CCLM reference mode (CCLM_L, CCLM_T, or CCLM_T_L), the decoder device can determine the current component and the current image block according to the target prediction mode. The other component of the decoding obtains the reference pixel value.
  • the foregoing obtaining the reference pixel value according to the target prediction mode may include:
  • the size of the current component of the current image block is the same as that of another component that has been decoded, the same position and the same number of pixel values are obtained;
  • sampling is performed according to the aspect ratio to obtain the same number of pixel values.
  • the width of the current image block is width and the height is height.
  • the height of the current component is 1/H of the other component that has been decoded.
  • the decoder device can take the left L reference pixel values from the current component, and the reference decoded other component takes the L reference pixels at the corresponding position after H times upsampling. value.
  • L is 2*height.
  • the decoder device can take the upper T reference pixel values from the current component, and the reference decoded other component takes the corresponding position and the corresponding position after W times upsampling. value.
  • T is 2*width.
  • the decoding device can take the L reference pixel values on the left side and T reference pixel values on the upper side for the current component, and the decoded reference component takes the left side after H times upsampling.
  • the L reference pixel values of the corresponding position and the upper side take the T reference pixel values of the corresponding position after W times upsampling.
  • L is height and T is width.
  • Step S330 Determine linear transformation parameters according to the obtained reference pixel value.
  • the decoding end device when the decoding end device obtains the reference pixel value, it may determine the linear transformation parameter according to the obtained reference pixel value.
  • determining the linear transformation parameter according to the obtained reference pixel value may include:
  • the decoding device may first determine the maximum value (referred to as maxL in this article) and minimum value (referred to in this article as minL) of the reference pixel value of another component that has been decoded, and the current The maximum value (referred to herein as maxC) and the minimum value (referred to herein as minC) of the reference pixel value of the component.
  • the decoder device After the decoder device determines maxL, minL, maxC, and minC, it can determine the linear transformation parameters based on maxL, minL, maxC, and minC.
  • the foregoing determination of linear transformation parameters according to maxL, minL, maxC, and minC includes:
  • ⁇ and ⁇ are linear transformation parameters
  • Si is the average value of maxC, minC or maxC and minC.
  • the foregoing determination of linear transformation parameters according to maxL, minL, maxC, and minC includes:
  • the linear transformation parameters ⁇ and ⁇ can be determined according to the following formula:
  • the maximum and minimum values of the reference pixel value of the decoded luminance component are determined, and according to the reference pixel value of the decoded luminance component
  • the maximum and minimum values of, and the reference pixel value of the corresponding chrominance component determine the linear transformation parameters.
  • Li is the maximum value of the reference pixel value of the decoded luminance component
  • Lj is the minimum value of the reference pixel value of the decoded luminance component
  • Ci and Cj are the reference chrominance components corresponding to Li and Lj, respectively Pixel values.
  • linear transformation parameters ⁇ and ⁇ are determined according to the above formula, more multiplication and division operations are required, and the current hardware is less friendly to multiplication and division operations (especially division operations). Therefore, according to The above formula determines the hardware friendliness of linear transformation parameters will be relatively poor.
  • data can be multiplied and divided by shifting, so as to improve the hardware friendliness of the determination of linear transformation parameters.
  • the decoder device can determine the linear transformation parameters ⁇ and ⁇ according to the following formula:
  • diffL ⁇ 4 is 110000 (decimal is 48);
  • diffL>>1 is 111 (decimal is 7)
  • diffL>>2 is 11 (decimal is 3).
  • the multiplication and division operations are implemented by shifting left and shifting right, which improves the hardware friendliness.
  • Step S340 Determine the pixel value of the current component of the current image block according to the determined linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
  • the decoder device when the decoder device determines the linear transformation parameter, it can determine the pixel value of the current component of the current image block according to the determined linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
  • the foregoing determination of the pixel value of the current component of the current image block according to the determined linear transformation parameter and the pixel value of another component of the current image block that has been decoded can be implemented by the following formula :
  • Xi is the ith pixel value in another component that has been decoded
  • Yi is the ith pixel value in the current component
  • z is a natural number.
  • the pixel value of another component of the current image block that has been decoded may be referred to as the first reference pixel value
  • the pixel value of the current component of the current image block may be referred to as the target pixel value.
  • the reference pixel value on the left or upper side of the current component of the image block may be called the second reference pixel value
  • the reference pixel value on the left or upper side of the decoded other component of the current image block may be called the third reference pixel value.
  • the aforementioned first reference pixel value, second reference pixel value, and third reference pixel value may be reconstruction values; the target pixel value may be a predicted value.
  • the first reference pixel value, the second reference pixel value, and the third reference pixel value may be residual values; the target pixel value is a predicted value.
  • the pixel value of a certain component of an image block usually has a pixel value range (such as 0 to 255). Therefore, after the decoder device determines the pixel value of the current component in the above manner , It is also necessary to determine whether the pixel value of the current component is within the preset pixel value range.
  • the above determining the pixel value of the current component of the current image block it may further include:
  • the first preset pixel value threshold is used as the pixel value of the current component of the current image block
  • the second preset pixel value threshold is used as the pixel value of the current component of the current image block
  • the first preset pixel value threshold is greater than the second preset pixel value threshold.
  • the decoder device determines the pixel value of the pixel in the above manner, if the pixel value is greater than the first preset pixel value threshold (which can be set according to requirements, such as 2 to the power of D-1, D represents the number of bits of the current pixel value. For example, when D is 8, the first preset pixel value threshold is 255), then the decoder device can determine the pixel value of the pixel as the first The preset pixel value threshold.
  • the first preset pixel value threshold which can be set according to requirements, such as 2 to the power of D-1, D represents the number of bits of the current pixel value. For example, when D is 8, the first preset pixel value threshold is 255
  • the decoder device can determine the pixel value of the pixel as the first The preset pixel value threshold.
  • the decoder device can determine the pixel value of the pixel as the second preset pixel Threshold.
  • the decoder device determines that the pixel value of the current component is 300, the decoder device can use 255 as the current component Pixel value; when the decoder device determines that the pixel value of the current component is -2, the decoder device can use 0 as the pixel value of the current component.
  • the decoder device may use 255 as the current component
  • the decoder device determines that the pixel value of the current component is 1, the decoder device can use 2 as the pixel value of the current component.
  • CCLM_L CCLM_T, or CCLM_T_L
  • the encoding end device determines the rate-distortion cost of the CCLM reference mode or uses the CCLM reference mode for the current image block
  • the pixel value of the current component of the image block can be determined in the manner described in the above step S320 to step S340, and the specific implementation is not repeated here.
  • the current component of the current image block needs to be decoded, it can be implemented according to the following steps:
  • the decoding device can obtain the decoded information and determine whether the current image block meets the following conditions:
  • the prediction mode of the current image block is intra mode
  • At least one other component of the current image block has decoded the required pixel information, and the current component exists and has not been decoded;
  • the prediction mode of the current image block is not DM mode
  • the decoding information of at least one of the image blocks on the left side and the upper side of the current component of the current image block is available;
  • the size of the current image block is within the preset size range.
  • step 1.5 the following implementation manners may be included:
  • the size of the current image block is within the preset size range, which may include:
  • the area of the current image block is within the range of [Smin, Smax], Smin and Smax are the nth power of 2, and n is a positive integer.
  • the size of the current image block is within the preset size range, which may include:
  • the width of the current image block is within the range of [Wmin, Wmax];
  • the height of the current image block is within the range of [Hmin, Hmax];
  • Wmin, Wmax, Hmin, and Hmax are 2 to the nth power, and n is a positive integer.
  • the size of the current image block is within the preset size range, which may include:
  • the width of the current image block is within the range of [Wmin, Wmax];
  • the height of the current image block is within the range of [Hmin, Hmax];
  • the area of the current image block is within the range of [Smin, Smax];
  • Wmin, Wmax, Hmin, Hmax, Smin, and Smax are 2 to the nth power, and n is a positive integer.
  • the decoding end device determines that the current image block allows the CCLM mode to be enabled as an example.
  • the list of candidate prediction modes is the default list
  • the default list may be (in order) ⁇ CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode ⁇ .
  • the default list may be part of the modes in ⁇ CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode ⁇ .
  • the default list may be (in order) ⁇ CCLM_T_L mode, non-CCLM mode, CCLM_T mode ⁇ .
  • the default list may be (in order) ⁇ non-CCLM mode, CCLM_T mode ⁇ .
  • the position information of the current image block may include: whether the decoding information of the left or upper image block of the current image block is available and the position of the current image block in the LCU.
  • the decoder device can determine whether the decoding information of the left or upper image block of the current image block is available, and The position of the current image block in the LCU.
  • the CCLM_T_L mode and CCLM_L mode are excluded from the candidate prediction mode list; if the upper information of the current image block is not available, the CCLM_T_L mode and CCLM_T mode are removed from the candidate prediction mode list Exclude: If the current image block is at the upper boundary of the LCU, that is, the current image block is connected to the upper LCU, the CCLM_T_L mode and the CCLM_T mode are excluded.
  • the decoder device can parse up to 3 bits, or parse to 1. Then stop parsing immediately. At this time, if it is resolved to "1", the index value is determined to be 0; if it is resolved to "01”, the index value is determined to be 1; if it is resolved to "001", the index value is determined to be 2; if it is resolved to "000” ", the index value is determined to be 3.
  • the decoding end device can parse up to 2 bits, or immediately if it parses to 1 Stop parsing. At this time, if it is resolved to "1", the index value is determined to be 0; if it is resolved to "01”, the index value is determined to be 1; if it is resolved to "00", the index value is determined to be 2.
  • the candidate prediction mode list is (in order) ⁇ CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode ⁇ , if the resolved index value is 0, the target prediction mode is CCLM_T_L mode; If the index value is 2, the target prediction mode is CCLM_L mode.
  • the candidate prediction mode list is (in order) ⁇ CCLM_T_L mode, non-CCLM mode, CCLM_T mode ⁇ , if the parsed index value is 0, then the target prediction mode is CCLM_T_L mode; if the parsed index value Is 2, the target prediction mode is CCLM_T mode.
  • the target prediction mode is the CCLM reference mode as an example.
  • the decoding end device when the decoding end device determines the target prediction mode used by the current image block, it can obtain the reference pixel value from the current component of the current image block and another decoded component based on the target prediction mode.
  • the width of the current component is W and the height is H
  • the width of the current component is 1/2 of another component that has been decoded
  • the height of the current component is 1/2 of another component that has been decoded.
  • the target prediction mode is CCLM_L mode.
  • the decoding end device can take 2H reference pixel values from the left side of the current component, and take 2H reference pixel values from the corresponding position on the left side of another component that has been decoded after being upsampled twice. It can be as shown in Figure 4A.
  • the reference pixel value on the left side of the current component may be the pixel value of the first, second...2H chrominance block on the left side of the current image block;
  • the reference pixel value of the corresponding position on the left side of the other component (taking the luminance component as an example) after 2 times of upsampling is the first, third, fifth...2nd of the left side of the other component* Pixel values of 2H-1 luminance blocks.
  • the target prediction mode is CCLM_T mode.
  • the decoding device can take 2W reference pixel values from the upper side of the current component, and take 2W reference pixel values from the corresponding position of the upper side of the decoded another component after 2 times upsampling.
  • the schematic diagram It can be as shown in Figure 4B.
  • the reference pixel value on the upper side of the current component may be the pixel value of the first, second...2Wth chrominance block on the upper side of the current image block;
  • the reference pixel value of the corresponding position on the upper side of one component (take the luminance component as an example) after 2 times upsampling is the first, third, fifth... 2nd*2W of the other component’s upper side -1
  • the target prediction mode is CCLM_T_L mode.
  • the decoding end device can take H reference pixel values from the left side of the current component and W reference pixel values from the upper side of the current component; the decoded left side of another component is up-sampled by 2 times.
  • the corresponding position takes H reference pixel values, and the corresponding position after 2 times upsampling from the upper side of the decoded another component takes W reference pixel values.
  • the schematic diagram may be as shown in FIG. 4C.
  • the reference pixel value on the left side of the current component is the pixel value of the first, second...Hth chrominance block on the left side of the current image block.
  • the reference pixel value of can be the pixel value of the first, second...Wth chrominance block on the upper side of the current image block; the left side of the other component (taking the luminance component as an example) is upsampled twice
  • the reference pixel value of the corresponding position is the pixel value of the 1st, 3rd, 5th...2*H-1 luminance block on the left side of the other component, and the corresponding upper side after 2 times upsampling
  • the reference pixel value of the position is the pixel value of the first, third, fifth...2*W-1 luminance block above the other component.
  • the decoder device may first determine maxL, minL, maxC, and minC, and determine the linear transformation parameters according to maxL, minL, maxC, and minC.
  • determining the linear transformation parameters according to maxL, minL, maxC, and minC may include:
  • ⁇ and ⁇ are linear transformation parameters.
  • Floor means rounding down
  • Log2 means taking the logarithm of 2
  • a ⁇ x means a left shift by x bits
  • & means bitwise AND
  • abs means Absolute value
  • DivSigTable is a table
  • DivSigTable[] ⁇ 0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0 ⁇
  • Sign(x) means Take the sign bit of x.
  • the multiplication and division operations are implemented by shifting left and shifting right, which improves the hardware friendliness.
  • the pixel value of the current component of the current image block can be determined according to the determined linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
  • the decoder device may determine the pixel value of the current component of the current image block by using the following formula:
  • Xi is the value of the i-th pixel in another component that has been decoded
  • Yi is the value of the i-th pixel in the current component.
  • the value of shift can be determined by the formula in step 4 above.
  • the decoder device may determine the pixel value of the current component of the current image block by using the following formula:
  • Xi is the i-th pixel value in another component that has been decoded
  • Yi is the i-th pixel value in the current component.
  • the target prediction mode used by the current image block is determined.
  • the target prediction mode is the CCLM reference mode
  • the reference pixel value is obtained according to the target prediction mode.
  • the linear transformation parameter is determined.
  • the pixel value of the current component of the current image block is determined according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
  • FIG. 5 is a schematic diagram of the hardware structure of a decoding apparatus provided by an embodiment of this application.
  • the decoding apparatus may include a processor 501 and a machine-readable storage medium 502 storing machine-executable instructions.
  • the processor 501 and the machine-readable storage medium 502 may communicate via a system bus 503. Furthermore, by reading and executing the machine executable instructions corresponding to the decoding control logic in the machine-readable storage medium 502, the processor 501 can execute the decoding method described above.
  • the machine-readable storage medium 502 mentioned herein may be any electronic, magnetic, optical, or other physical storage device, and may contain or store information, such as executable instructions, data, and so on.
  • the machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard drive), solid state hard drive, any type of storage disk (Such as CD, DVD, etc.), or similar storage media, or a combination of them.
  • the above-mentioned decoding control logic may include a first determination unit 610, a second determination unit 620, an acquisition unit 630, a third determination unit 640, and a fourth determination unit 650 in terms of functions.
  • the first determining unit 610 is configured to determine whether the current image block allows the CCLM mode to be enabled based on the decoded information
  • the second determining unit 620 is configured to determine the target prediction mode used by the current image block if the CCLM mode is allowed to be enabled for the current image block;
  • the obtaining unit 630 is configured to obtain a reference pixel value according to the target prediction mode if the target prediction mode is the CCLM reference mode;
  • the third determining unit 640 is configured to determine linear transformation parameters according to the reference pixel value
  • the fourth determining unit 650 is configured to determine the pixel value of the current component of the current image block according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
  • the first determining unit 610 is specifically configured to determine that the current image block allows the CCLM mode to be enabled when the current image block meets the following conditions:
  • the prediction mode of the current image block is an intra mode
  • At least one other component of the current image block has decoded required pixel information, and the current component exists and has not been decoded;
  • the prediction mode of the current image block is not the DM mode
  • Decoding information of at least one of the image blocks on the left side and the upper side of the current component of the current image block is available
  • the size of the current image block is within a preset size range.
  • the size of the current image block is within a preset size range, including:
  • the area of the current image block is greater than or equal to the first area threshold and less than or equal to the second area threshold;
  • the first area threshold value and the second area threshold value are both n-th power of 2, n is a positive integer, and the second area threshold value is greater than the first area threshold value.
  • the size of the current image block is within a preset size range, including:
  • the width of the current image block is greater than or equal to the first width threshold and less than or equal to the second width threshold;
  • the height of the current image block is greater than or equal to the first height threshold and less than or equal to the second height threshold;
  • the first width threshold, the second width threshold, the first height threshold, and the second height threshold are the nth power of 2, where n is a positive integer, and the first width threshold is less than the A second width threshold, and the first height threshold is smaller than the second height threshold.
  • the second determining unit 620 is specifically configured to: determine the candidate prediction mode list of the current image block; analyze the index value of the prediction mode used by the current image block; and based on the index value, The target prediction mode used by the current image block is determined in the candidate prediction mode list.
  • the second determining unit 620 is specifically configured to use the default list as the candidate prediction mode list of the current image block.
  • the default list is a first list or a second list including some prediction modes in the first list
  • the first list is ⁇ CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode ⁇ .
  • the second determining unit 620 is specifically configured to determine the candidate prediction mode list of the current image block based on the position information of the current image block.
  • the position information of the current image block includes: whether the decoding information of the left or upper image block of the current image block is available and the position of the current image block in the LCU.
  • the acquiring unit 630 is specifically configured to: if the current component of the current image block has the same size as the other decoded component, acquire the same position and the same number of pixel values; If the size of the current component of the current image block is different from that of the other decoded component, sampling is performed in the aspect ratio to obtain the same number of pixel values.
  • the third determining unit 640 is specifically configured to determine the maximum value maxL and the minimum value minL of the reference pixel value of the decoded another component, and the maximum value maxC of the reference pixel value of the current component. And the minimum value minC; according to maxL, minL, maxC and minC, determine the linear transformation parameters.
  • the fourth determining unit 650 is further configured to: if the determined pixel value of the current component is greater than a first preset pixel value threshold, use the first preset pixel value threshold as the The pixel value of the current component of the current image block; if the determined pixel value of the current component is less than a second preset pixel value threshold, the second preset pixel value threshold is taken as the current component of the current image block Pixel values;
  • the first preset pixel value threshold is greater than the second preset pixel value threshold.

Landscapes

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

Abstract

The present application provides a decoding method and device. The decoding method comprises: determining, on the basis of decoded information, whether the current image block allows to enable a cross-component linear model prediction (CCLM) mode; if yes, determining a target prediction mode used by the current image block; if the target prediction mode is a CCLM reference mode, obtaining a reference pixel value according to the target prediction mode; determining a linear transformation parameter according to the reference pixel value; and determining a pixel value of the current component of the current image block according to the linear transformation parameter and a pixel value of another decoded component of the current image block.

Description

解码方法及装置Decoding method and device 技术领域Technical field
本申请涉及视频编解码技术,尤其涉及一种解码方法及装置。This application relates to video coding and decoding technology, and in particular to a decoding method and device.
背景技术Background technique
视频编码中的帧内预测技术通过利用一帧图像内部像素间的相关性,降低待编码信息的冗余,提高图像数据的压缩效率。The intra-frame prediction technology in video coding reduces the redundancy of the information to be coded and improves the compression efficiency of image data by using the correlation between pixels within a frame of image.
在H.265的帧内预测中,亮度和色度共享预测分块模式(part_mode)独立进行预测,即亮度分量利用周边已重建的亮度值对当前待编码块的亮度值进行预测,而色度值的预测仅基于周围已重建的色度值进行帧内预测。但是研究发现,虽然YUV(一种颜色编码方法)的格式相对于RGB(一种色彩模式)已经降低了不同颜色分量的相关性,然而色度与亮度在纹理上仍有一定的一致性。跨分量预测技术就是利用已编码的颜色分量信息去预测待编码的颜色分量,进一步去除了颜色分量间的相关性,提高编码压缩质量。In H.265 intra-frame prediction, the luminance and chrominance share the prediction partition mode (part_mode) for independent prediction, that is, the luminance component uses the surrounding reconstructed luminance value to predict the luminance value of the current block to be coded, and the chrominance The prediction of the value is only based on the reconstructed chrominance values around it for intra prediction. However, studies have found that although the format of YUV (a color coding method) has reduced the correlation of different color components relative to RGB (a color mode), the chroma and brightness are still consistent in texture. The cross-component prediction technology uses the coded color component information to predict the color component to be coded, which further removes the correlation between the color components and improves the coding compression quality.
然而实践发现,目前的跨分量预测技术中未对跨分量预测技术的启动条件进行限制,导致可能在不适合使用跨分量预测技术的场景使用跨分量预测技术,进而导致编码性能较差。However, it has been found in practice that the current cross-component prediction technology does not limit the starting conditions of the cross-component prediction technology, which may lead to the use of the cross-component prediction technology in scenes that are not suitable for the use of the cross-component prediction technology, and thus lead to poor coding performance.
发明内容Summary of the invention
有鉴于此,本申请提供一种解码方法及装置。In view of this, the present application provides a decoding method and device.
根据本申请实施例的第一方面,提供一种解码方法,其包括:基于已解码信息,确定当前图像块是否允许启用跨分量线性模型预测(CCLM)模式;若所述当前图像块允许启用CCLM模式,则确定所述当前图像块使用的目标预测模式;若所述目标预测模式为CCLM参考模式,则根据所述目标预测模式,获取参考像素值;根据所述参考像素值,确定线性变换参数;根据所述线性变换参数以及所述当前图像块已解码的另一分量的像素值,确定所述当前图像块的当前分量的像素值。According to a first aspect of the embodiments of the present application, a decoding method is provided, which includes: determining whether the current image block allows the cross-component linear model prediction (CCLM) mode to be enabled based on the decoded information; if the current image block allows the CCLM to be enabled Mode, determine the target prediction mode used by the current image block; if the target prediction mode is the CCLM reference mode, obtain the reference pixel value according to the target prediction mode; determine the linear transformation parameter according to the reference pixel value ; Determine the pixel value of the current component of the current image block according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
根据本申请实施例的第二方面,提供一种解码装置,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可读指令,所述处理器被所述机器可读指令促使:基于已解码信息,确定当前图像块是否允许启用CCLM模式;若所述当前图像块允许启用CCLM模式,则确定所述当前图像块使用的目标预测模式;若所述目标预测模式为CCLM参考模式,则根据所述目标预测模式,获取参考像素值;根据所述参考像素值,确定线性变换参数;根据所述线性变换参数以及所述当前图像块已解码的另一分量的像素值,确定所述当前图像块的当前分量的像素值。According to a second aspect of the embodiments of the present application, there is provided a decoding device, including a processor and a machine-readable storage medium, the machine-readable storage medium stores machine-readable instructions that can be executed by the processor, and The processor is prompted by the machine-readable instructions to: determine whether the current image block allows the CCLM mode to be enabled based on the decoded information; if the current image block allows the CCLM mode to be enabled, determine the target prediction mode used by the current image block; If the target prediction mode is the CCLM reference mode, obtain reference pixel values according to the target prediction mode; determine linear transformation parameters according to the reference pixel values; determine linear transformation parameters according to the linear transformation parameters and the current image block has been decoded The pixel value of the other component of, determines the pixel value of the current component of the current image block.
本申请实施例的解码方法,通过基于已解码信息,确定当前图像块是否允许启用CCLM模式,当当前图像块允许启用CCLM模式时,确定当前图像块使用的目标预测模式,并当目标预测模式为CCLM参考模式时,根据目标预测模式,获取参考像素值,进而,根据参考像素值,确定线性变换参数,并根据线性变换参数以及当前图像块已解码的另一分量的像素值,确定当 前图像块的当前分量的像素值,通过对CCLM模式的启用条件进行限定,避免了在不适用CCLM模式的场景使用CCLM模式,提高了编码性能。The decoding method of the embodiment of the present application determines whether the current image block allows the CCLM mode to be enabled based on the decoded information. When the current image block allows the CCLM mode to be enabled, the target prediction mode used by the current image block is determined, and when the target prediction mode is In CCLM reference mode, the reference pixel value is obtained according to the target prediction mode, and then the linear transformation parameter is determined according to the reference pixel value, and the current image block is determined according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded The pixel value of the current component of the CCLM mode is restricted by limiting the enabling conditions of the CCLM mode, which avoids the use of the CCLM mode in scenes where the CCLM mode is not applicable, and improves the coding performance.
附图说明Description of the drawings
图1是一种CCLM_T模式的参考像素值获取位置的示意图;Fig. 1 is a schematic diagram of a reference pixel value acquisition position in a CCLM_T mode;
图2是一种CCLM_L模式的参考像素值获取位置的示意图;Fig. 2 is a schematic diagram of a reference pixel value acquisition position in a CCLM_L mode;
图3是本申请一示例性实施例示出的一种解码方法的流程示意图;Fig. 3 is a schematic flowchart of a decoding method shown in an exemplary embodiment of the present application;
图4A是本申请一示例性实施例示出的一种CCLM_L模式的参考像素值获取位置的示意图;Fig. 4A is a schematic diagram showing a reference pixel value acquisition position of a CCLM_L mode according to an exemplary embodiment of the present application;
图4B是本申请一示例性实施例示出的一种CCLM_T模式的参考像素值获取位置的示意图;Fig. 4B is a schematic diagram showing a reference pixel value acquisition position of a CCLM_T mode according to an exemplary embodiment of the present application;
图4C是本申请一示例性实施例示出的一种CCLM_T_L模式的参考像素值获取位置的示意图;Fig. 4C is a schematic diagram showing a reference pixel value acquisition position of a CCLM_T_L mode according to an exemplary embodiment of the present application;
图4D是本申请一示例性实施例示出的一种线性变换参数获得示意图;Fig. 4D is a schematic diagram of obtaining linear transformation parameters according to an exemplary embodiment of the present application;
图5是本申请一示例性实施例示出的一种解码装置的硬件结构示意图;Fig. 5 is a schematic diagram of the hardware structure of a decoding device shown in an exemplary embodiment of the present application;
图6是本申请一示例性实施例示出的一种解码装置的结构示意图。Fig. 6 is a schematic structural diagram of a decoding device shown in an exemplary embodiment of the present application.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同标记表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same signs in different drawings indicate the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the application as detailed in the appended claims.
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括复数形式,除非上下文清楚地表示其他含义。The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit the application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
为了使本申请实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图对本申请实施例中技术方案作进一步详细的说明。In order to make the foregoing objectives, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
请参见图3,为本申请实施例提供的一种解码方法的流程示意图,其中,该解码方法可以应用于解码端设备,如图3所示,该解码方法可以包括以下步骤:Please refer to FIG. 3, which is a schematic flowchart of a decoding method provided by an embodiment of this application, where the decoding method may be applied to a decoding end device. As shown in FIG. 3, the decoding method may include the following steps:
步骤S300、基于已解码信息,确定当前图像块是否允许启用CCLM模式。若是,则转至步骤S310;否则,结束当前流程。Step S300, based on the decoded information, determine whether the current image block allows the CCLM mode to be enabled. If yes, go to step S310; otherwise, end the current process.
跨分量线性模型预测(Cross Component Linear Mode,简称CCLM)为一种跨分量预测技术,基于参考亮度块的区域,可以包括三种CCLM参考模式:采用当前色度块上方的重建值和对应亮度区域的CCLM_T模式,其示意图可以如图1所示;采用当前色度块左侧的重建值和对应亮度区域的CCLM_L模式,其示意图可以如图2所示;以及采用当前色度块上方和左侧的重建值和对应亮度区域的CCLM_T_L模式。Cross-Component Linear Model Prediction (CCLM for short) is a cross-component prediction technology, based on the area of the reference luminance block, it can include three CCLM reference modes: using the reconstructed value above the current chrominance block and the corresponding luminance area The schematic diagram of the CCLM_T mode of the current chrominance block can be shown in Figure 1; the reconstruction value on the left side of the current chrominance block and the CCLM_L mode corresponding to the luminance area are used, and the schematic diagram can be shown in Figure 2; The reconstruction value of and the CCLM_T_L mode of the corresponding brightness area.
本申请实施例中,为了提高编码性能,可以对CCLM模式的启动条件进行限定,以保证使用CCLM模式的场景均为适合使用CCLM的场景。In the embodiments of the present application, in order to improve the coding performance, the starting conditions of the CCLM mode may be limited to ensure that the scenes using the CCLM mode are all scenes suitable for using the CCLM.
作为一种示例,当解码端设备对接收到的码流进行解码时,可以基于已解码信息,确定当前图像块是否允许启动CCLM模式。As an example, when the decoding end device decodes the received code stream, it can determine whether the current image block allows the CCLM mode to be started based on the decoded information.
在本申请一种可能的实施方式中,当当前图像块满足以下全部条件时,确定当前图像块允许启用CCLM模式:In a possible implementation manner of this application, when the current image block meets all the following conditions, it is determined that the current image block allows the CCLM mode to be enabled:
当前图像块的预测模式为帧内模式;The prediction mode of the current image block is intra mode;
当前图像块的至少一个其他分量已解码出所需像素信息,当前分量存在且未解码;At least one other component of the current image block has decoded the required pixel information, and the current component exists and has not been decoded;
当前图像块的预测模式不为对应亮度分量模式(Direct Mode,简称DM);The prediction mode of the current image block is not the corresponding brightness component mode (Direct Mode, DM for short);
当前图像块的当前分量的左侧和上侧中至少有一侧的图像块的解码信息可用;The decoding information of at least one side of the image block on the left side and the upper side of the current component of the current image block is available;
当前图像块的尺寸在预设尺寸范围内。The size of the current image block is within the preset size range.
需要说明的是,在本申请实施例中,当前分量是指当前图像块正在解码的分量,其可以包括但不限于亮度分量或色度分量。It should be noted that in the embodiment of the present application, the current component refers to the component being decoded in the current image block, which may include, but is not limited to, a luminance component or a chrominance component.
作为一种示例,考虑到CCLM模式需要在帧内模式下使用,且CCLM模式需要参考其他分量的解码信息,以及当前分量的左侧和上侧的图像块的解码信息,因此,可以将当前图像块是否为帧内模式、是否存在至少一个其他分量已解码出所需像素信息以及是否当前图像块的当前分量的左侧和上侧中至少有一侧的图像块的解码信息可用,作为当前图像块是否允许启用CCLM模式的参考条件。As an example, considering that the CCLM mode needs to be used in the intra mode, and the CCLM mode needs to refer to the decoding information of other components, and the decoding information of the image blocks on the left and upper sides of the current component, the current image can be Whether the block is in intra mode, whether there is at least one other component that has decoded the required pixel information, and whether the decoding information of at least one of the left and upper sides of the current component of the current image block is available as the current image block Reference conditions for whether to enable CCLM mode.
作为一种示例,考虑到CCLM模式与DM模式为互斥的两种模式,即若当前图像块使用DM模式,则当前图像块不允许启用CCLM模式,因此,解码端设备确定当前图像块允许启用CCLM模式,需要保证当前图像块的预测模式不为DM模式。As an example, considering that the CCLM mode and the DM mode are mutually exclusive modes, that is, if the current image block uses the DM mode, the current image block does not allow the CCLM mode to be enabled. Therefore, the decoder device determines that the current image block is allowed to be enabled The CCLM mode needs to ensure that the prediction mode of the current image block is not the DM mode.
作为一种示例,为了保证CCLM模式的性能,提高编码性能,还可以限定允许启用CCLM模式的图像块的尺寸范围(本文中称为预设尺寸范围,可以根据实际场景设定)。As an example, in order to ensure the performance of the CCLM mode and improve the coding performance, the size range of the image blocks that allow the CCLM mode to be enabled can also be limited (referred to herein as the preset size range, which can be set according to the actual scene).
作为一种示例,解码端设备可以在确定当前图像块的预测模式为帧内模式、当前图像块的至少一个其他分量已解码出所需像素信息以及当前分量存在且未解码、当前图像块的预测模式不为DM模式、当前图像块的当前分量的左侧和上侧中至少有一侧的图像块的解码信息可用、以及当前图像块的尺寸在预设尺寸范围内时,确定当前图像块允许启用CCLM模式。As an example, the decoder device may determine that the prediction mode of the current image block is intra mode, at least one other component of the current image block has decoded the required pixel information, and the current component exists and is not decoded, and the prediction of the current image block When the mode is not DM mode, the decoding information of at least one of the image blocks on the left and upper side of the current component of the current image block is available, and the size of the current image block is within the preset size range, it is determined that the current image block is allowed to be enabled CCLM mode.
示例性的,在本申请实施例中,若当前分量为色度分量,则至少一个其他分量可以为亮度分量;若当前分量为亮度分量,则至少一个其他分量可以为色度分量;若当前分量为Cb分量,则至少一个其他分量可以为Cr分量。Exemplarily, in the embodiment of the present application, if the current component is a chrominance component, at least one other component may be a luminance component; if the current component is a luminance component, at least one other component may be a chrominance component; Is a Cb component, then at least one other component may be a Cr component.
需要说明的是,在本申请实施例中,基于上述实施方式中描述的确定当前图像块是否允许启用CCLM模式的参考条件,编码端设备也可以基于相对应的参考条件确定在对图像块的当前分量进行编码时是否允许启用CCLM模式,其具体实现在此不做赘述。It should be noted that, in the embodiments of this application, based on the reference conditions for determining whether the current image block allows the CCLM mode to be enabled, based on the reference conditions described in the foregoing implementation manners, the encoding end device may also determine the current image block based on the corresponding reference conditions. Whether the CCLM mode is allowed to be enabled when the component is encoded, its specific implementation is not repeated here.
作为该实施方式的一种实施例,上述当前图像块的尺寸在预设尺寸范围内,可以包括:As an example of this implementation manner, the size of the foregoing current image block is within a preset size range, which may include:
当前图像块的面积大于或等于第一面积阈值,且小于等于第二面积阈值;The area of the current image block is greater than or equal to the first area threshold and less than or equal to the second area threshold;
其中,第一面积阈值和第二面积阈值均为2的n次方,n为正整数,第二面积阈值大于第一面积阈值。Wherein, the first area threshold and the second area threshold are both the n-th power of 2, n is a positive integer, and the second area threshold is greater than the first area threshold.
作为一种示例,在确定当前图像块是否允许启用CCLM模式时,当前图像块的尺寸可以基 于当前图像块的面积来表征,即需要在保证当前图像块的面积在预设面积范围内的情况下,允许当前图像块启用CCLM模式。As an example, when determining whether the current image block allows the CCLM mode to be enabled, the size of the current image block can be characterized based on the area of the current image block, that is, it is necessary to ensure that the area of the current image block is within the preset area range. To allow the current image block to enable CCLM mode.
示例性的,预设面积范围可以为大于或等于第一面积阈值(可以称为Smin),且小于等于第二面积阈值(Smax),即需要保证当前图像块的面积在[Smin,Smax]范围内;Smin≤Smax;Smin、Smax为2的n次方,n为正整数。Exemplarily, the preset area range may be greater than or equal to the first area threshold (may be called Smin) and less than or equal to the second area threshold (Smax), that is, it is necessary to ensure that the area of the current image block is in the range of [Smin, Smax] Within; Smin≤Smax; Smin and Smax are the nth power of 2, and n is a positive integer.
作为该实施方式的另一种实施例,上述当前图像块的尺寸在预设尺寸范围内,可以包括:As another example of this implementation, the size of the foregoing current image block is within a preset size range, which may include:
当前图像块的宽大于或等于第一宽度阈值,且小于等于第二宽度阈值;The width of the current image block is greater than or equal to the first width threshold and less than or equal to the second width threshold;
当前图像块的高大于或等于第一高度阈值,且小于等于第二高度阈值;The height of the current image block is greater than or equal to the first height threshold and less than or equal to the second height threshold;
其中,第一宽度阈值、第二宽度阈值、第一高度阈值以及第二高度阈值为2的n次方,n为正整数,第一宽度阈值小于第二宽度阈值,第一高度阈值小于第二高度阈值。Among them, the first width threshold, the second width threshold, the first height threshold, and the second height threshold are the n-th power of 2, where n is a positive integer, the first width threshold is less than the second width threshold, and the first height threshold is less than the second Height threshold.
作为一种示例,在确定当前图像块是否允许启用CCLM模式时,当前图像块的尺寸可以基于当前图像块的宽和高来表征,即需要在保证当前图像块的宽和高分别在预设宽度范围内和预设高度范围内的情况下,允许当前图像块启用CCLM模式。As an example, when determining whether the current image block allows the CCLM mode to be enabled, the size of the current image block can be characterized based on the width and height of the current image block, that is, it is necessary to ensure that the width and height of the current image block are at the preset width respectively. Within the range and the preset height range, the current image block is allowed to enable CCLM mode.
示例性的,预设宽度范围可以为大于或等于第一宽度阈值(可以称为Wmin),且小于等于第二宽度阈值(Wmax),即需要保证当前图像块的宽在[Wmin,Wmax]范围内;Wmin≤Wmax;Wmin、Wmax为2的n次方,n为正整数。Exemplarily, the preset width range may be greater than or equal to the first width threshold (may be called Wmin), and less than or equal to the second width threshold (Wmax), that is, it is necessary to ensure that the width of the current image block is in the range of [Wmin, Wmax] Within; Wmin≤Wmax; Wmin and Wmax are the nth power of 2, and n is a positive integer.
示例性的,预设高度范围可以为大于或等于第一高度阈值(可以称为Hmin),且小于等于第二高度阈值(Hmax),即需要保证当前图像块的高在[Hmin,Hmax]范围内;Hmin≤Hmax;Hmin、Hmax为2的n次方,n为正整数。Exemplarily, the preset height range may be greater than or equal to the first height threshold (may be called Hmin) and less than or equal to the second height threshold (Hmax), that is, it is necessary to ensure that the height of the current image block is in the range of [Hmin, Hmax] Within; Hmin≤Hmax; Hmin and Hmax are the nth power of 2, and n is a positive integer.
应该认识到,在本申请实施例中,上述通过图像块的面积对图像块的尺寸进行表征或通过图像块的宽和高对图像块的尺寸进行表征仅仅是本申请实施例中表征图像块的尺寸的具体示例,而并不是对本申请保护范围的限定,。例如,在本申请实施例中,还可以通过图像块的面积、宽和高对图像块的尺寸进行表征,其具体实现在此不做赘述。It should be realized that, in the embodiment of the present application, the above-mentioned characterizing the size of the image block by the area of the image block or characterizing the size of the image block by the width and height of the image block is only the representation of the image block in the embodiment of the present application. The specific example of the size is not a limitation of the protection scope of this application. For example, in the embodiment of the present application, the size of the image block may also be characterized by the area, width, and height of the image block, and its specific implementation is not described here.
本申请实施例中,若解码端设备确定当前图像块允许启用CCLM模式,则解码端设备可以继续按照步骤S310~S340的方式进行当前图像块的当前分量的解码。In the embodiment of the present application, if the decoding end device determines that the current image block allows the CCLM mode to be enabled, the decoding end device may continue to decode the current component of the current image block in the manner of steps S310 to S340.
若解码端设备确定当前图像块不允许启用CCLM模式,则解码端设备可以继续按照其他策略进行当前图像块的解码,其具体实现可以参照相关方案进行的相关实现,本申请实施例在此不做赘述。If the decoding end device determines that the current image block does not allow the CCLM mode to be enabled, the decoding end device can continue to decode the current image block according to other strategies. The specific implementation can refer to the related implementation of the related solution, which is not done here in the embodiment of the application. Repeat.
步骤S310、确定当前图像块使用的目标预测模式。Step S310: Determine the target prediction mode used by the current image block.
本申请实施例中,当解码端设备确定当前图像块允许启用CCLM模式时,解码端设备可以解析当前图像块使用的具体预测模式(本文中称为目标预测模式),以确定当前图像块使用的目标预测模式是否为CCLM参考模式(CCLM_L、CCLM_T或CCLM_T_L)。In the embodiment of this application, when the decoder device determines that the current image block allows the CCLM mode to be enabled, the decoder device can analyze the specific prediction mode used by the current image block (referred to herein as the target prediction mode) to determine the current image block used Whether the target prediction mode is the CCLM reference mode (CCLM_L, CCLM_T, or CCLM_T_L).
在本申请一种可能的实施方式中,上述确定当前图像块使用的目标预测模式,可以包括:In a possible implementation manner of the present application, the foregoing determination of the target prediction mode used by the current image block may include:
确定当前图像块的候选预测模式列表;Determine a list of candidate prediction modes for the current image block;
解析当前图像块使用的预测模式的索引值;Analyze the index value of the prediction mode used by the current image block;
基于解析到的索引值,在候选预测模式列表中确定当前图像块使用的目标预测模式。Based on the parsed index value, the target prediction mode used by the current image block is determined in the candidate prediction mode list.
作为一种示例,为了确定当前图像块使用的目标预测模式,一方面,解码端设备可以确定当前图像块的候选预测模式列表,即当前图像块支持的预测模式;另一方面,解码端设备可以从码流中解析当前图像块使用的预测模式的索引值,进而,基于解析到的索引值,在候选预测模式列表中确定当前图像块使用的目标预测模式。As an example, in order to determine the target prediction mode used by the current image block, on the one hand, the decoder device can determine the candidate prediction mode list of the current image block, that is, the prediction mode supported by the current image block; on the other hand, the decoder device can The index value of the prediction mode used by the current image block is parsed from the code stream, and then, based on the parsed index value, the target prediction mode used by the current image block is determined in the candidate prediction mode list.
作为该实施方式的一种实施例,上述确定当前图像块的候选预测模式列表,可以包括:As an example of this implementation manner, the foregoing determination of the candidate prediction mode list of the current image block may include:
确定当前图像块的候选预测模式列表为默认列表。Determine the candidate prediction mode list of the current image block as the default list.
作为一种示例,可以预先在编码端设备和解码端设备上配置作为候选预测模式列表的默认列表,该默认列表可以由编码端设备和解码端设备协商确定,或者由用户手动配置在编码端设备和解码端设备。As an example, a default list as a candidate prediction mode list can be pre-configured on the encoding end device and the decoding end device. The default list can be negotiated and determined by the encoding end device and the decoding end device, or manually configured by the user on the encoding end device. And decoding end equipment.
在一个示例中,上述默认列表为第一列表或包括第一列表中的部分预测模式的第二列表。示例性的,第一列表为{CCLM_T_L模式、非CCLM模式、CCLM_L模式、CCLM_T模式}。示例性的,非CCLM模式可以包括但不限于角度预测模式、DM模式、Planar模式或DC模式等。In an example, the above-mentioned default list is the first list or the second list including part of the prediction modes in the first list. Exemplarily, the first list is {CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode}. Exemplarily, the non-CCLM mode may include, but is not limited to, angular prediction mode, DM mode, Planar mode, or DC mode.
需要说明的是,第一列表中各模式的顺序可以为列表中所列举各模式的顺序,也可以为其他顺序。本文中以列表中所列举顺序为例。It should be noted that the order of the modes in the first list may be the order of the modes listed in the list, or other orders. This article takes the order listed in the list as an example.
举例来说,第二列表可以为{非CCLM模式、CCLM_L模式、CCLM_T模式}、{CCLM_T_L模式、非CCLM模式、CCLM_T模式}或{CCLM_T_L模式、CCLM_T模式}等。For example, the second list may be {non-CCLM mode, CCLM_L mode, CCLM_T mode}, {CCLM_T_L mode, non-CCLM mode, CCLM_T mode} or {CCLM_T_L mode, CCLM_T mode}, etc.
作为该实施方式的另一种实施例,上述确定当前图像块的候选预测模式列表,可以包括:As another example of this implementation manner, the foregoing determination of the candidate prediction mode list of the current image block may include:
基于当前图像块的位置信息,确定当前图像块的候选预测模式列表。Based on the location information of the current image block, a list of candidate prediction modes for the current image block is determined.
作为一种示例,解码端设备可以基于当前图像块的位置信息,确定当前图像块的候选预测模式列表。As an example, the decoding end device may determine the candidate prediction mode list of the current image block based on the location information of the current image block.
示例性的,当前图像块的位置信息可以包括:当前图像块的左侧或上侧图像块的解码信息是否可用以及当前图像块在最大编码单元(Largest Code Unit,简称LCU)中的位置。Exemplarily, the position information of the current image block may include: whether the decoding information of the left or upper image block of the current image block is available and the position of the current image block in the largest coding unit (LCU).
举例来说,假设当前图像块的初始化候选预测模式列表为{非CCLM模式、CCLM_L模式、CCLM_T模式},解码端设备可以确定当前图像块的左侧或上侧图像块的解码信息是否可用,以及当前图像块在LCU中的位置。For example, assuming that the initial candidate prediction mode list of the current image block is {non-CCLM mode, CCLM_L mode, CCLM_T mode}, the decoder device can determine whether the decoding information of the left or upper image block of the current image block is available, and The position of the current image block in the LCU.
若当前图像块的左侧信息不可用,则将CCLM_T_L模式和CCLM_L模式从候选预测模式列表中排除;若当前图像块的上侧信息不可用,则将CCLM_T_L模式和CCLM_T模式从候选预测模式列表中排除;若当前图像块处于LCU上边界,即当前图像块与上侧LCU相接,则将CCLM_T_L模式和CCLM_T模式排除。If the left information of the current image block is not available, the CCLM_T_L mode and CCLM_L mode are excluded from the candidate prediction mode list; if the upper information of the current image block is not available, the CCLM_T_L mode and CCLM_T mode are removed from the candidate prediction mode list Exclude: If the current image block is at the upper boundary of the LCU, that is, the current image block is connected to the upper LCU, the CCLM_T_L mode and the CCLM_T mode are excluded.
示例性的,当前图像块左侧或上侧图像块不可用包括但不限于当前图像块左侧或上侧图像块不存在,或者,存在但未解码。Exemplarily, the unavailability of the left or upper image block of the current image block includes, but is not limited to, the left or upper image block of the current image block does not exist, or exists but is not decoded.
作为一种示例,解码端设备确定了当前图像块的候选预测模式列表时,可以解析当前图像块使用的预测模式的索引值。As an example, when the decoding end device determines the candidate prediction mode list of the current image block, it may analyze the index value of the prediction mode used by the current image block.
示例性的,假设当前块的候选预测模式列表中的预测模式的总数为Max,则解码端设备可以解析最多Max-1个比特,确定当前图像块使用的预测模式的索引值。Exemplarily, assuming that the total number of prediction modes in the candidate prediction mode list of the current block is Max, the decoding end device can parse Max-1 bits to determine the index value of the prediction mode used by the current image block.
举例来说,假设Max=4,结束位为1(即解码端设备在解析当前图像块使用的预测模式的索引值对应的二值化码字序列时,解析到1时,结束码流解析),则解码端设备可以最多解析3个比特,或解析到1时则立即停止解析。此时,若解析到“1”,则确定索引值为0;若解析到“01”,则确定索引值为1;若解析到“001”,则确定索引值为2;若解析到“000”,则确定索引值为3。For example, suppose Max=4 and the end bit is 1 (that is, when the decoding end device analyzes the binary codeword sequence corresponding to the index value of the prediction mode used by the current image block, when it resolves to 1, the code stream analysis ends) , The decoding device can parse up to 3 bits, or stop parsing immediately when the parsing reaches 1. At this time, if it is resolved to "1", the index value is determined to be 0; if it is resolved to "01", the index value is determined to be 1; if it is resolved to "001", the index value is determined to be 2; if it is resolved to "000" ", the index value is determined to be 3.
作为一种示例,解码端设备解析到当前图像块使用的预测模式的索引值时,可以基于该索引值,在所确定的候选预测模式列表中确定当前图像块使用的目标预测模式。As an example, when the decoding end device parses the index value of the prediction mode used by the current image block, it may determine the target prediction mode used by the current image block in the determined candidate prediction mode list based on the index value.
需要说明的是,在本申请实施例中,若解码端设备确定当前图像块使用的目标预测模式为CCLM参考模式(CCLM_L、CCLM_T或CCLM_T_L),则解码端设备可以继续按照步骤S320~S340的方式进行当前图像块的当前分量的解码。It should be noted that, in the embodiment of the present application, if the decoding end device determines that the target prediction mode used by the current image block is the CCLM reference mode (CCLM_L, CCLM_T, or CCLM_T_L), the decoding end device can continue to follow the steps S320 to S340 Perform the decoding of the current component of the current image block.
若解码端设备确定当前图像块使用的目标预测模式为非CCLM参考模式,则解码端设备可以继续按照其他策略进行当前图像块的解码,其具体实现可以参照相关方案进行的相关实现,本申请实施例在此不做赘述。If the decoding-end device determines that the target prediction mode used by the current image block is a non-CCLM reference mode, the decoding-end device can continue to decode the current image block according to other strategies, and its specific implementation can refer to related implementations of related solutions. This application implements The examples are not repeated here.
步骤S320、若目标预测模式为CCLM参考模式,则根据目标预测模式,获取参考像素值。Step S320: If the target prediction mode is the CCLM reference mode, obtain the reference pixel value according to the target prediction mode.
本申请实施例中,当解码端设备确定当前图像块使用的目标预测模式为CCLM参考模式(CCLM_L、CCLM_T或CCLM_T_L)时,解码端设备可以根据目标预测模式,从当前图像块的当前分量和已解码的另一分量获取参考像素值。In the embodiment of the present application, when the decoder device determines that the target prediction mode used by the current image block is the CCLM reference mode (CCLM_L, CCLM_T, or CCLM_T_L), the decoder device can determine the current component and the current image block according to the target prediction mode. The other component of the decoding obtains the reference pixel value.
在本申请的一种可能的实施方式中,上述根据目标预测模式,获取参考像素值,可以包括:In a possible implementation manner of the present application, the foregoing obtaining the reference pixel value according to the target prediction mode may include:
若当前图像块的当前分量与已解码的另一分量的尺寸相同,则获取相同位置,相同数量的像素值;If the size of the current component of the current image block is the same as that of another component that has been decoded, the same position and the same number of pixel values are obtained;
若当前图像块的当前分量与已解码的另一分量的尺寸不同,则按长宽比例采样以获取相同数量的像素值。If the size of the current component of the current image block is different from that of another component that has been decoded, sampling is performed according to the aspect ratio to obtain the same number of pixel values.
举例来说,假设当前图像块的宽为width,高为height。For example, suppose that the width of the current image block is width and the height is height.
若当前分量的宽为已解码的另一分量的1/W,当前分量的高为已解码的另一分量的1/H。If the width of the current component is 1/W of another component that has been decoded, the height of the current component is 1/H of the other component that has been decoded.
若目标预测模式为CCLM_L模式,则解码端设备可以从当前分量取左侧L个参考像素值,参考的已解码的另一分量取对应位置经过H倍上采样后的对应位置的L个参考像素值。If the target prediction mode is the CCLM_L mode, the decoder device can take the left L reference pixel values from the current component, and the reference decoded other component takes the L reference pixels at the corresponding position after H times upsampling. value.
示例性的,L为2*height。Exemplarily, L is 2*height.
若目标预测模式为CCLM_T模式,则解码端设备可以从当前分量取上侧T个参考像素值,参考的已解码的另一分量取对应位置经过W倍上采样后的对应位置的T个参考像素值。示例性的,T为2*width。If the target prediction mode is the CCLM_T mode, the decoder device can take the upper T reference pixel values from the current component, and the reference decoded other component takes the corresponding position and the corresponding position after W times upsampling. value. Exemplarily, T is 2*width.
若目标预测模式为CCLM_T_L模式,则解码端设备可以当前分量取左侧L个参考像素值和上侧T个参考像素值,参考的已解码的另一分量取左侧经过H倍上采样后的对应位置的L个参考像素值和上侧取经过W倍上采样后的对应位置的T个参考像素值。示例性的,L为height,T为width。If the target prediction mode is the CCLM_T_L mode, the decoding device can take the L reference pixel values on the left side and T reference pixel values on the upper side for the current component, and the decoded reference component takes the left side after H times upsampling. The L reference pixel values of the corresponding position and the upper side take the T reference pixel values of the corresponding position after W times upsampling. Exemplarily, L is height and T is width.
步骤S330、根据获取到的参考像素值,确定线性变换参数。Step S330: Determine linear transformation parameters according to the obtained reference pixel value.
本申请实施例中,解码端设备获取到参考像素值时,可以根据获取到的参考像素值,确定 线性变换参数。In the embodiment of the present application, when the decoding end device obtains the reference pixel value, it may determine the linear transformation parameter according to the obtained reference pixel value.
在本申请的一种可能的实施方式中,上述根据获取到的参考像素值,确定线性变换参数,可以包括:In a possible implementation manner of the present application, determining the linear transformation parameter according to the obtained reference pixel value may include:
确定已解码的另一分量的参考像素值的最大值maxL和最小值minL,以及当前分量的参考像素值的最大值maxC和最小值minC;Determine the maximum value maxL and minimum value minL of the reference pixel value of another component that has been decoded, and the maximum value maxC and minimum value minC of the reference pixel value of the current component;
根据maxL、minL、maxC以及minC,确定线性变换参数。According to maxL, minL, maxC and minC, determine the linear transformation parameters.
作为一种示例,为了确定线性变换参数,解码端设备可以先确定已解码的另一分量的参考像素值的最大值(本文中称为maxL)和最小值(本文中称为minL),以及当前分量的参考像素值的最大值(本文中称为maxC)和最小值(本文中称为minC)。As an example, in order to determine the linear transformation parameters, the decoding device may first determine the maximum value (referred to as maxL in this article) and minimum value (referred to in this article as minL) of the reference pixel value of another component that has been decoded, and the current The maximum value (referred to herein as maxC) and the minimum value (referred to herein as minC) of the reference pixel value of the component.
解码端设备确定了maxL、minL、maxC和minC之后,可以根据maxL、minL、maxC和minC确定线性变换参数。After the decoder device determines maxL, minL, maxC, and minC, it can determine the linear transformation parameters based on maxL, minL, maxC, and minC.
在一个示例中,上述根据maxL、minL、maxC以及minC,确定线性变换参数,包括:In an example, the foregoing determination of linear transformation parameters according to maxL, minL, maxC, and minC includes:
若maxL等于minL,则α=0,β=Si;If maxL is equal to minL, then α=0, β=Si;
其中,α和β为线性变换参数,Si为maxC、minC或maxC和minC的均值。Among them, α and β are linear transformation parameters, and Si is the average value of maxC, minC or maxC and minC.
作为一种示例,若maxL等于minL,即已解码的另一分量的参考像素值均相同,则解码端设备可以确定线性变换参数α=0,β=Si。示例性的,Si=maxC;或者,Si=minC;或者,Si=(maxC+minC)/2。As an example, if maxL is equal to minL, that is, the reference pixel values of another component that have been decoded are all the same, the decoding end device can determine the linear transformation parameter α=0, β=Si. Exemplarily, Si=maxC; or, Si=minC; or, Si=(maxC+minC)/2.
在另一个示例中,上述根据maxL、minL、maxC以及minC,确定线性变换参数,包括:In another example, the foregoing determination of linear transformation parameters according to maxL, minL, maxC, and minC includes:
若maxL不等于minL,则根据以下公式确定α和β:If maxL is not equal to minL, determine α and β according to the following formula:
diffL=maxL–minL;diffL=maxL-minL;
diffC=maxC–minC;diffC=maxC-minC;
x=Floor(Log2(diffL));x=Floor(Log2(diffL));
normDiff=((diffL<<4)>>x)&15,若normDiff!=0,则x=x+1;否则x不变;normDiff=((diffL<<4)>>x)&15, if normDiff! =0, then x=x+1; otherwise, x remains unchanged;
y=Floor(Log2(Abs(diffC)))+1;y=Floor(Log2(Abs(diffC)))+1;
add=(1<<y)>>1,value=DivSigTable[normDiff]|8add=(1<<y)>>1, value=DivSigTable[normDiff]|8
α=(diffC*value+add)>>y;α=(diffC*value+add)>>y;
shift=3+x–y;shift=3+x–y;
若shift<1,则令shift=1,α=Sign(α)*15;If shift<1, set shift=1 and α=Sign(α)*15;
β=minC-((α*minL)>>shift)β=minC-((α*minL)>>shift)
其中,Floor表示向下取整,Log2表示取2的对数,a<<x表示a左移x位,>>表示右移,&表示按位与,|表示按位或,abs表示绝对值,DivSigTable为表格,DivSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0},Sign(x)表示取x的符号位(若x等于0,则Sign(x)为0;若x大于0,则Sign(x)为1;否则,Sign(x)为-1)。Among them, Floor means rounding down, Log2 means taking the logarithm of 2, a<<x means a left shift by x bits, >> means right shift, & means bitwise AND, | means bitwise OR, abs means absolute value , DivSigTable is a table, DivSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0}, Sign(x) means x The sign bit of (if x is equal to 0, then Sign(x) is 0; if x is greater than 0, then Sign(x) is 1; otherwise, Sign(x) is -1).
作为一种示例,以当前分量为色度分量,已解码的另一分量为亮度分量为例,可以按照以下公式确定线性变换参数α和β:As an example, taking the current component as a chrominance component and another decoded component as a luminance component as an example, the linear transformation parameters α and β can be determined according to the following formula:
Figure PCTCN2020078874-appb-000001
Figure PCTCN2020078874-appb-000001
β=C j-α*L j β=C j -α*L j
如图4D所示,通过遍历当前图像块的已解码的亮度分量的参考像素值,以确定已解码的亮度分量的参考像素值的最大值和最小值,并根据已解码亮度分量的参考像素值的最大值和最小值,以及对应的色度分量的参考像素值,确定线性变换参数。As shown in Figure 4D, by traversing the reference pixel value of the decoded luminance component of the current image block, the maximum and minimum values of the reference pixel value of the decoded luminance component are determined, and according to the reference pixel value of the decoded luminance component The maximum and minimum values of, and the reference pixel value of the corresponding chrominance component, determine the linear transformation parameters.
在上述公式中,Li为已解码的亮度分量的参考像素值的最大值,Lj为已解码的亮度分量的参考像素值的最小值;Ci和Cj分别为Li和Lj对应的色度分量的参考像素值。In the above formula, Li is the maximum value of the reference pixel value of the decoded luminance component, Lj is the minimum value of the reference pixel value of the decoded luminance component; Ci and Cj are the reference chrominance components corresponding to Li and Lj, respectively Pixel values.
考虑到若按照上述公式确定线性变换参数α和β,则需要进行较多的乘法和除法运算,而目前的硬件对于乘法运算和除法运算(尤其是除法运算)的友好性较差,因此,按照上述公式确定线性变换参数的硬件友好性会比较差。Considering that if the linear transformation parameters α and β are determined according to the above formula, more multiplication and division operations are required, and the current hardware is less friendly to multiplication and division operations (especially division operations). Therefore, according to The above formula determines the hardware friendliness of linear transformation parameters will be relatively poor.
因而,在本申请实施例中,可以通过移位的方式来实现数据的乘除,以提高线性变换参数的确定的硬件友好性。Therefore, in the embodiment of the present application, data can be multiplied and divided by shifting, so as to improve the hardware friendliness of the determination of linear transformation parameters.
作为一种示例,解码端设备确定了maxL、minL、maxC以及minC,且确定maxL不等于minL时,解码端设备可以按照以下公式确定线性变换参数α和β:As an example, when the decoder device determines maxL, minL, maxC, and minC, and determines that maxL is not equal to minL, the decoder device can determine the linear transformation parameters α and β according to the following formula:
diffL=maxL–minL;diffL=maxL-minL;
diffC=maxC–minC;diffC=maxC-minC;
x=Floor(Log2(diffL));x=Floor(Log2(diffL));
normDiff=((diffL<<4)>>x)&15,若normDiff!=0,则x=x+1;否则x不变;normDiff=((diffL<<4)>>x)&15, if normDiff! =0, then x=x+1; otherwise, x remains unchanged;
y=Floor(Log2(Abs(diffC)))+1;y=Floor(Log2(Abs(diffC)))+1;
add=(1<<y)>>1,value=DivSigTable[normDiff]|8add=(1<<y)>>1, value=DivSigTable[normDiff]|8
α=(diffC*value+add)>>y;α=(diffC*value+add)>>y;
shift=3+x–y;shift=3+x–y;
若shift<1,则令shift=1,α=Sign(α)*15;If shift<1, set shift=1 and α=Sign(α)*15;
β=minC-((α*minL)>>shift)β=minC-((α*minL)>>shift)
举例来说,假设diffL=3(二进制为11),则diffL<<4为110000(十进制为48);假设diffL=15(二进制为1111),则diffL>>1为111(十进制为7),diffL>>2为11(十进制为3)。For example, suppose diffL=3 (binary is 11), then diffL<<4 is 110000 (decimal is 48); suppose diffL=15 (binary is 1111), then diffL>>1 is 111 (decimal is 7), diffL>>2 is 11 (decimal is 3).
DivSigTable[normDiff]表示取DivSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0}中的第normDiff位。DivSigTable[normDiff] represents taking the normDiff bit in DivSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0}.
例如,假设normDiff=1,则DivSigTable[normDiff]为7;假设normDiff=2,则DivSigTable[normDiff]为6;假设normDiff=4,则DivSigTable[normDiff]为5。For example, assuming normDiff=1, DivSigTable[normDiff] is 7; assuming normDiff=2, DivSigTable[normDiff] is 6; assuming normDiff=4, DivSigTable[normDiff] is 5.
可见,在该实施例中,通过左移和右移实现乘除运算,提高了硬件友好性。It can be seen that in this embodiment, the multiplication and division operations are implemented by shifting left and shifting right, which improves the hardware friendliness.
步骤S340、根据所确定的线性变换参数以及当前图像块已解码的另一分量的像素值,确定当前图像块的当前分量的像素值。Step S340: Determine the pixel value of the current component of the current image block according to the determined linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
本申请实施例中,解码端设备确定了线性变换参数时,可以根据所确定的线性变换参 数以及当前图像块已解码的另一分量的像素值,确定当前图像块的当前分量的像素值。In this embodiment of the application, when the decoder device determines the linear transformation parameter, it can determine the pixel value of the current component of the current image block according to the determined linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
在本申请的一种可能的实施方式中,上述根据所确定的线性变换参数以及当前图像块已解码的另一分量的像素值,确定当前图像块的当前分量的像素值,可以通过以下公式实现:In a possible implementation manner of the present application, the foregoing determination of the pixel value of the current component of the current image block according to the determined linear transformation parameter and the pixel value of another component of the current image block that has been decoded can be implemented by the following formula :
Yi=(αXi)>>z+βYi=(αXi)>>z+β
其中,Xi为已解码的另一分量中的第i个像素值,Yi为当前分量中的第i个像素值,z为自然数。Among them, Xi is the ith pixel value in another component that has been decoded, Yi is the ith pixel value in the current component, and z is a natural number.
作为一种示例,解码端设备确定了线性变换参数α和β时,解码端设备可以获取当前图像块已解码的另一分量的第i个像素值(本文中称为Xi),并根据α、β以及Xi,利用上述公式Yi=(αXi)>>z+β确定当前图像块的当前分量的第i个像素值(本文中称为Yi)。As an example, when the decoding end device determines the linear transformation parameters α and β, the decoding end device can obtain the i-th pixel value of another component decoded in the current image block (referred to as Xi in this article), and according to α, β and Xi, the above formula Yi=(αXi)>>z+β is used to determine the i-th pixel value of the current component of the current image block (herein referred to as Yi).
示例性的,z=shift(shift的值可以按照上述实施例中描述的方式确定);或,z=0。Exemplarily, z=shift (the value of shift can be determined in the manner described in the above embodiment); or, z=0.
需要说明的是,在本申请实施例中,当前图像块已解码的另一分量的像素值可以称为第一参考像素值,当前图像块的当前分量的像素值可以称为目标像素值,当前图像块的当前分量左侧或上侧的参考像素值可以称为第二参考像素值,当前图像块的已解码的另一分量的左侧或上侧的参考像素值可以称为第三参考像素值。It should be noted that in the embodiments of the present application, the pixel value of another component of the current image block that has been decoded may be referred to as the first reference pixel value, and the pixel value of the current component of the current image block may be referred to as the target pixel value. The reference pixel value on the left or upper side of the current component of the image block may be called the second reference pixel value, and the reference pixel value on the left or upper side of the decoded other component of the current image block may be called the third reference pixel value.
示例性的,上述第一参考像素值、第二参考像素值和第三参考像素值可以为重建值;目标像素值为预测值。Exemplarily, the aforementioned first reference pixel value, second reference pixel value, and third reference pixel value may be reconstruction values; the target pixel value may be a predicted value.
或者,示例性的,上述第一参考像素值、第二参考像素值和第三参考像素值可以为残差值;目标像素值为预测值。Or, exemplarily, the first reference pixel value, the second reference pixel value, and the third reference pixel value may be residual values; the target pixel value is a predicted value.
作为一种示例,考虑到实际应用场景中,图像块的某一分量的像素值通常会存在像素值范围(如0~255),因此,解码端设备按照上述方式确定了当前分量的像素值之后,还需要确定当前分量的像素值是否在预设像素值的取值范围内。As an example, considering that in actual application scenarios, the pixel value of a certain component of an image block usually has a pixel value range (such as 0 to 255). Therefore, after the decoder device determines the pixel value of the current component in the above manner , It is also necessary to determine whether the pixel value of the current component is within the preset pixel value range.
作为该实施方式的一个实施例,上述确定当前图像块的当前分量的像素值之后,还可以包括:As an example of this implementation manner, after the above determining the pixel value of the current component of the current image block, it may further include:
若所确定的当前分量的像素值大于第一预设像素值阈值,则将第一预设像素值阈值作为当前图像块的当前分量的像素值;If the determined pixel value of the current component is greater than the first preset pixel value threshold, the first preset pixel value threshold is used as the pixel value of the current component of the current image block;
若所确定的当前分量的像素值小于第二预设像素值阈值,则将第二预设像素值阈值作为当前图像块的当前分量的像素值;If the determined pixel value of the current component is less than the second preset pixel value threshold, the second preset pixel value threshold is used as the pixel value of the current component of the current image block;
示例性的,第一预设像素值阈值大于第二预设像素值阈值。Exemplarily, the first preset pixel value threshold is greater than the second preset pixel value threshold.
作为一种示例,对于当前图像块的任一像素点,解码端设备按照上述方式确定了该像素点的像素值之后,若该像素值大于第一预设像素值阈值(可以根据需求设置,如2的D次方-1,D表示当前像素值的比特数,如D为8时,第一预设像素值阈值为255),则解码端设备可以将该像素点的像素值确定为第一预设像素值阈值。As an example, for any pixel of the current image block, after the decoder device determines the pixel value of the pixel in the above manner, if the pixel value is greater than the first preset pixel value threshold (which can be set according to requirements, such as 2 to the power of D-1, D represents the number of bits of the current pixel value. For example, when D is 8, the first preset pixel value threshold is 255), then the decoder device can determine the pixel value of the pixel as the first The preset pixel value threshold.
若该像素值小于第二预设像素值阈值(如0,或者,也可以根据需求设置为其他大于0的值),则解码端设备可以将该像素点的像素值确定为第二预设像素阈值。If the pixel value is less than the second preset pixel value threshold (such as 0, or it can be set to other values greater than 0 according to requirements), the decoder device can determine the pixel value of the pixel as the second preset pixel Threshold.
举例来说,假设第一预设像素值阈值为255,第二预设像素值阈值为0,则当解码端设备确定当前分量的像素值为300时,解码端设备可以将255作为当前分量的像素值;当解码端 设备确定当前分量的像素值为-2时,解码端设备可以将0作为当前分量的像素值。For example, assuming that the first preset pixel value threshold is 255 and the second preset pixel value threshold is 0, when the decoder device determines that the pixel value of the current component is 300, the decoder device can use 255 as the current component Pixel value; when the decoder device determines that the pixel value of the current component is -2, the decoder device can use 0 as the pixel value of the current component.
又举例来说,假设第一预设像素值阈值为255,第二预设像素值阈值为2,则当解码端设备确定当前分量的像素值为300时,解码端设备可以将255作为当前分量的像素值;当解码端设备确定当前分量的像素值为1时,解码端设备可以将2作为当前分量的像素值。For another example, assuming that the first preset pixel value threshold is 255, and the second preset pixel value threshold is 2, then when the decoder device determines that the pixel value of the current component is 300, the decoder device may use 255 as the current component When the decoder device determines that the pixel value of the current component is 1, the decoder device can use 2 as the pixel value of the current component.
需要说明的是,在本申请实施例中,对于任一CCLM参考模式(CCLM_L、CCLM_T或CCLM_T_L),当编码端设备在确定该CCLM参考模式的率失真代价或者使用该CCLM参考模式对当前图像块的当前分量进行编码时,均可以按照上述步骤S320~步骤S340中描述的方式确定图像块的当前分量的像素值,其具体实现在此不做赘述。It should be noted that, in the embodiment of this application, for any CCLM reference mode (CCLM_L, CCLM_T, or CCLM_T_L), when the encoding end device determines the rate-distortion cost of the CCLM reference mode or uses the CCLM reference mode for the current image block When encoding the current component of the image block, the pixel value of the current component of the image block can be determined in the manner described in the above step S320 to step S340, and the specific implementation is not repeated here.
为了使本领域技术人员更好地理解本申请实施例提供的技术方案,下面结合具体实例对本申请实施例提供的技术方案进行说明。In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application will be described below with reference to specific examples.
作为一种示例,当需要对当前图像块的当前分量进行解码时,可以按照以下步骤实现:As an example, when the current component of the current image block needs to be decoded, it can be implemented according to the following steps:
1、解码端设备可以获取已解码信息,并确定当前图像块是否满足以下条件:1. The decoding device can obtain the decoded information and determine whether the current image block meets the following conditions:
1.1、当前图像块的预测模式为帧内模式;1.1. The prediction mode of the current image block is intra mode;
1.2、当前图像块的至少一个其他分量已解码出所需像素信息,当前分量存在且未解码;1.2. At least one other component of the current image block has decoded the required pixel information, and the current component exists and has not been decoded;
1.3、当前图像块的预测模式不为DM模式;1.3. The prediction mode of the current image block is not DM mode;
1.4、当前图像块的当前分量的左侧和上侧中至少有一侧的图像块的解码信息可用;1.4. The decoding information of at least one of the image blocks on the left side and the upper side of the current component of the current image block is available;
1.5、当前图像块的尺寸在预设尺寸范围内。1.5. The size of the current image block is within the preset size range.
在该实施例中,对于步骤1.5,可以包括以下实施方式:In this embodiment, for step 1.5, the following implementation manners may be included:
实施例一Example one
作为一种示例,当前图像块的尺寸在预设尺寸范围内,可以包括:As an example, the size of the current image block is within the preset size range, which may include:
当前图像块的面积在[Smin,Smax]范围内,Smin、Smax为2的n次方,n为正整数。The area of the current image block is within the range of [Smin, Smax], Smin and Smax are the nth power of 2, and n is a positive integer.
示例性的,Smin=8,Smax=4096。Exemplarily, Smin=8 and Smax=4096.
实施例二Example two
作为一种示例,当前图像块的尺寸在预设尺寸范围内,可以包括:As an example, the size of the current image block is within the preset size range, which may include:
当前图像块的宽在[Wmin,Wmax]范围内;The width of the current image block is within the range of [Wmin, Wmax];
当前图像块的高在[Hmin,Hmax]范围内;The height of the current image block is within the range of [Hmin, Hmax];
Wmin、Wmax、Hmin和Hmax为2的n次方,n为正整数。Wmin, Wmax, Hmin, and Hmax are 2 to the nth power, and n is a positive integer.
示例性的,Wmin=2,Wmax=64,Hmin=2,Hmax=64。Exemplarily, Wmin=2, Wmax=64, Hmin=2, Hmax=64.
实施例三Example three
作为一种示例,当前图像块的尺寸在预设尺寸范围内,可以包括:As an example, the size of the current image block is within the preset size range, which may include:
当前图像块的宽在[Wmin,Wmax]范围内;The width of the current image block is within the range of [Wmin, Wmax];
当前图像块的高在[Hmin,Hmax]范围内;The height of the current image block is within the range of [Hmin, Hmax];
当前图像块的面积在[Smin,Smax]范围内;The area of the current image block is within the range of [Smin, Smax];
Wmin、Wmax、Hmin、Hmax、Smin和Smax为2的n次方,n为正整数。Wmin, Wmax, Hmin, Hmax, Smin, and Smax are 2 to the nth power, and n is a positive integer.
示例性的,Wmin=2,Wmax=64,Hmin=2,Hmax=64,Smin=8,Smax=4096。Exemplarily, Wmin=2, Wmax=64, Hmin=2, Hmax=64, Smin=8, Smax=4096.
可见,在该实施例中,通过对CCLM模式的启用条件进行限定,避免了在不适用CCLM 模式的场景使用CCLM模式,提高了编码性能。It can be seen that, in this embodiment, by limiting the enabling conditions of the CCLM mode, the use of the CCLM mode in scenarios where the CCLM mode is not applicable is avoided, and the coding performance is improved.
下文中以解码端设备确定当前图像块允许启用CCLM模式为例。In the following, the decoding end device determines that the current image block allows the CCLM mode to be enabled as an example.
2、确定当前图像块使用的目标预测模式。2. Determine the target prediction mode used by the current image block.
2.1、确定当前图像块的候选预测模式列表。2.1. Determine the candidate prediction mode list of the current image block.
1)、候选预测模式列表为默认列表1), the list of candidate prediction modes is the default list
实施例四Example four
作为一种示例,默认列表可以为(区分顺序){CCLM_T_L模式、非CCLM模式、CCLM_L模式、CCLM_T模式}。As an example, the default list may be (in order) {CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode}.
实施例五Example five
作为一种示例,默认列表可以为{CCLM_T_L模式、非CCLM模式、CCLM_L模式、CCLM_T模式}中的部分模式。As an example, the default list may be part of the modes in {CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode}.
举例来说,默认列表可以为(区分顺序){CCLM_T_L模式、非CCLM模式、CCLM_T模式}。For example, the default list may be (in order) {CCLM_T_L mode, non-CCLM mode, CCLM_T mode}.
又举例来说,默认列表可以为(区分顺序){非CCLM模式、CCLM_T模式}。For another example, the default list may be (in order) {non-CCLM mode, CCLM_T mode}.
2)、基于当前图像块的位置信息,确定当前图像块的候选预测模式列表。2) Determine the candidate prediction mode list of the current image block based on the position information of the current image block.
示例性的,当前图像块的位置信息可以包括:当前图像块的左侧或上侧图像块的解码信息是否可用以及当前图像块在LCU中的位置。Exemplarily, the position information of the current image block may include: whether the decoding information of the left or upper image block of the current image block is available and the position of the current image block in the LCU.
举例来说,假设当前图像块的初始化候选预测模式列表为{非CCLM模式、CCLM_L模式、CCLM_T模式},解码端设备可以确定当前图像块的左侧或上侧图像块的解码信息是否可用,以及当前图像块在LCU中的位置。For example, assuming that the initial candidate prediction mode list of the current image block is {non-CCLM mode, CCLM_L mode, CCLM_T mode}, the decoder device can determine whether the decoding information of the left or upper image block of the current image block is available, and The position of the current image block in the LCU.
若当前图像块的左侧信息不可用,则将CCLM_T_L模式和CCLM_L模式从候选预测模式列表中排除;若当前图像块的上侧信息不可用,则将CCLM_T_L模式和CCLM_T模式从候选预测模式列表中排除;若当前图像块处于LCU上边界,即当前图像块与上侧LCU相接,则将CCLM_T_L模式和CCLM_T模式排除。If the left information of the current image block is not available, the CCLM_T_L mode and CCLM_L mode are excluded from the candidate prediction mode list; if the upper information of the current image block is not available, the CCLM_T_L mode and CCLM_T mode are removed from the candidate prediction mode list Exclude: If the current image block is at the upper boundary of the LCU, that is, the current image block is connected to the upper LCU, the CCLM_T_L mode and the CCLM_T mode are excluded.
2.2、解析当前图像块使用的预测模式的索引值。2.2. Analyze the index value of the prediction mode used by the current image block.
举例来说、假设候选预测模式列表为(区分顺序){CCLM_T_L模式、非CCLM模式、CCLM_L模式、CCLM_T模式},结束位为1,则解码端设备可以最多解析3个比特,或解析到1时则立即停止解析。此时,若解析到“1”,则确定索引值为0;若解析到“01”,则确定索引值为1;若解析到“001”,则确定索引值为2;若解析到“000”,则确定索引值为3。For example, suppose the list of candidate prediction modes is (in order) {CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode}, and the end bit is 1, then the decoder device can parse up to 3 bits, or parse to 1. Then stop parsing immediately. At this time, if it is resolved to "1", the index value is determined to be 0; if it is resolved to "01", the index value is determined to be 1; if it is resolved to "001", the index value is determined to be 2; if it is resolved to "000" ", the index value is determined to be 3.
又举例来说,假设候选预测模式列表为(区分顺序){CCLM_T_L模式、非CCLM模式、CCLM_T模式},结束位为1,则解码端设备可以最多解析2个比特,或解析到1时则立即停止解析。此时,若解析到“1”,则确定索引值为0;若解析到“01”,则确定索引值为1;若解析到“00”,则确定索引值为2。For another example, suppose that the list of candidate prediction modes is (in order) {CCLM_T_L mode, non-CCLM mode, CCLM_T mode}, and the end bit is 1, then the decoding end device can parse up to 2 bits, or immediately if it parses to 1 Stop parsing. At this time, if it is resolved to "1", the index value is determined to be 0; if it is resolved to "01", the index value is determined to be 1; if it is resolved to "00", the index value is determined to be 2.
2.3、根据解析到的索引值,从候选预测模式列表中确定当前图像块使用的目标预测模式。2.3. Determine the target prediction mode used by the current image block from the candidate prediction mode list according to the parsed index value.
举例来说,假设候选预测模式列表为(区分顺序){CCLM_T_L模式、非CCLM模式、 CCLM_L模式、CCLM_T模式},若解析到的索引值为0,则目标预测模式为CCLM_T_L模式;若解析到的索引值为2,则目标预测模式为CCLM_L模式。For example, suppose that the candidate prediction mode list is (in order) {CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode}, if the resolved index value is 0, the target prediction mode is CCLM_T_L mode; If the index value is 2, the target prediction mode is CCLM_L mode.
又举例来说,假设候选预测模式列表为(区分顺序){CCLM_T_L模式、非CCLM模式、CCLM_T模式},若解析到的索引值为0,则目标预测模式为CCLM_T_L模式;若解析到的索引值为2,则目标预测模式为CCLM_T模式。For another example, suppose that the candidate prediction mode list is (in order) {CCLM_T_L mode, non-CCLM mode, CCLM_T mode}, if the parsed index value is 0, then the target prediction mode is CCLM_T_L mode; if the parsed index value Is 2, the target prediction mode is CCLM_T mode.
下文中以目标预测模式为CCLM参考模式为例。In the following, the target prediction mode is the CCLM reference mode as an example.
3、根据目标预测模式,获取参考像素值。3. Obtain reference pixel values according to the target prediction mode.
作为一种示例,解码端设备确定了当前图像块使用的目标预测模式时,可以基于该目标预测模式,从当前图像块的当前分量和已解码的另一分量获取参考像素值。As an example, when the decoding end device determines the target prediction mode used by the current image block, it can obtain the reference pixel value from the current component of the current image block and another decoded component based on the target prediction mode.
假设当前分量的宽为W,高为H,当前分量的宽为已解码的另一分量的1/2,当前分量的高为已解码的另一分量的1/2。Assuming that the width of the current component is W and the height is H, the width of the current component is 1/2 of another component that has been decoded, and the height of the current component is 1/2 of another component that has been decoded.
实施例六Example Six
假设目标预测模式为CCLM_L模式。Assume that the target prediction mode is CCLM_L mode.
作为一种示例,解码端设备可以从当前分量左侧取2H个参考像素值,并从已解码的另一分量的左侧经过2倍上采样后的对应位置取2H个参考像素值,其示意图可以如图4A所示。As an example, the decoding end device can take 2H reference pixel values from the left side of the current component, and take 2H reference pixel values from the corresponding position on the left side of another component that has been decoded after being upsampled twice. It can be as shown in Figure 4A.
示例性的,当前分量(以当前分量为色度分量为例)左侧的参考像素值可以为当前图像块的左侧的第1个、第2个…第2H个色度块的像素值;另一分量(以亮度分量为例)的左侧经过2倍上采样后的对应位置的参考像素值为该另一分量的左侧的第1个、第3个、第5个…第2*2H-1个亮度块的像素值。Exemplarily, the reference pixel value on the left side of the current component (taking the current component as a chrominance component as an example) may be the pixel value of the first, second...2H chrominance block on the left side of the current image block; The reference pixel value of the corresponding position on the left side of the other component (taking the luminance component as an example) after 2 times of upsampling is the first, third, fifth...2nd of the left side of the other component* Pixel values of 2H-1 luminance blocks.
实施例七Example Seven
假设目标预测模式为CCLM_T模式。Assume that the target prediction mode is CCLM_T mode.
作为一种示例,解码端设备可以从当前分量上侧取2W个参考像素值,并从已解码的另一分量的上侧经过2倍上采样后的对应位置取2W个参考像素值,其示意图可以如图4B所示。As an example, the decoding device can take 2W reference pixel values from the upper side of the current component, and take 2W reference pixel values from the corresponding position of the upper side of the decoded another component after 2 times upsampling. The schematic diagram It can be as shown in Figure 4B.
示例性的,当前分量(以当前分量为色度分量为例)上侧的参考像素值可以为当前图像块上侧的第1个、第2个…第2W个色度块的像素值;另一分量(以亮度分量为例)的上侧经过2倍上采样后的对应位置的参考像素值为该另一分量的上侧的第1个、第3个、第5个…第2*2W-1个亮度块的像素值。Exemplarily, the reference pixel value on the upper side of the current component (taking the current component as a chrominance component as an example) may be the pixel value of the first, second...2Wth chrominance block on the upper side of the current image block; The reference pixel value of the corresponding position on the upper side of one component (take the luminance component as an example) after 2 times upsampling is the first, third, fifth... 2nd*2W of the other component’s upper side -1 The pixel value of a luminance block.
实施例八Example eight
假设目标预测模式为CCLM_T_L模式。Assume that the target prediction mode is CCLM_T_L mode.
作为一种示例,解码端设备可以从当前分量左侧取H个参考像素值,从当前分量上侧取W个参考像素值;从已解码的另一分量的左侧经过2倍上采样后的对应位置取H个参考像素值,从已解码的另一分量的上侧经过2倍上采样后的对应位置取W个参考像素值,其示意图可以如图4C所示。As an example, the decoding end device can take H reference pixel values from the left side of the current component and W reference pixel values from the upper side of the current component; the decoded left side of another component is up-sampled by 2 times. The corresponding position takes H reference pixel values, and the corresponding position after 2 times upsampling from the upper side of the decoded another component takes W reference pixel values. The schematic diagram may be as shown in FIG. 4C.
示例性的,当前分量(以当前分量为色度分量为例)左侧的参考像素值为当前图像块左侧的第1个、第2个…第H个色度块的像素值,上侧的参考像素值可以为当前图像块上侧的 第1个、第2个…第W个色度块的像素值;另一分量(以亮度分量为例)的左侧经过2倍上采样后的对应位置的参考像素值为该另一分量的左侧的第1个、第3个、第5个…第2*H-1个亮度块的像素值,上侧经过2倍上采样后的对应位置的参考像素值为该另一分量的上侧的第1个、第3个、第5个…第2*W-1个亮度块的像素值。Exemplarily, the reference pixel value on the left side of the current component (taking the current component as the chrominance component as an example) is the pixel value of the first, second...Hth chrominance block on the left side of the current image block. The reference pixel value of can be the pixel value of the first, second...Wth chrominance block on the upper side of the current image block; the left side of the other component (taking the luminance component as an example) is upsampled twice The reference pixel value of the corresponding position is the pixel value of the 1st, 3rd, 5th...2*H-1 luminance block on the left side of the other component, and the corresponding upper side after 2 times upsampling The reference pixel value of the position is the pixel value of the first, third, fifth...2*W-1 luminance block above the other component.
4、根据获取到的参考值,确定线性变换参数α和β。4. Determine the linear transformation parameters α and β according to the obtained reference value.
作为一种示例,解码端设备可以先确定maxL、minL、maxC和minC,并根据maxL、minL、maxC和minC确定线性变换参数。As an example, the decoder device may first determine maxL, minL, maxC, and minC, and determine the linear transformation parameters according to maxL, minL, maxC, and minC.
实施例九Example 9
作为一种示例,根据maxL、minL、maxC和minC确定线性变换参数,可以包括:As an example, determining the linear transformation parameters according to maxL, minL, maxC, and minC may include:
若maxL等于minL,则α=0,β=Si;If maxL is equal to minL, then α=0, β=Si;
其中,α和β为线性变换参数。Among them, α and β are linear transformation parameters.
示例性的,Si=maxC;或者,Si=minC;或者,Si=(maxC+minC)/2。Exemplarily, Si=maxC; or, Si=minC; or, Si=(maxC+minC)/2.
若maxL不等于minL,则根据以下公式确定α和β:If maxL is not equal to minL, determine α and β according to the following formula:
diffL=maxL–minL;diffL=maxL-minL;
diffC=maxC–minC;diffC=maxC-minC;
x=Floor(Log2(diffL));x=Floor(Log2(diffL));
normDiff=((diffL<<4)>>x)&15,若normDiff!=0,则x=x+1;否则x不变;normDiff=((diffL<<4)>>x)&15, if normDiff! =0, then x=x+1; otherwise, x remains unchanged;
y=Floor(Log2(Abs(diffC)))+1;y=Floor(Log2(Abs(diffC)))+1;
add=(1<<y)>>1,value=DivSigTable[normDiff]|8add=(1<<y)>>1, value=DivSigTable[normDiff]|8
α=(diffC*value+add)>>y;α=(diffC*value+add)>>y;
shift=3+x–y;shift=3+x–y;
若shift<1,则令shift=1,α=Sign(α)*15;If shift<1, set shift=1 and α=Sign(α)*15;
β=minC-((α*minL)>>shift)β=minC-((α*minL)>>shift)
示例性的,Floor表示向下取整,Log2表示取2的对数,a<<x表示a左移x位,>>表示右移,&为按位与,|表示按位或,abs表示绝对值,DivSigTable为表格,DivSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0},Sign(x)表示取x的符号位。Exemplarily, Floor means rounding down, Log2 means taking the logarithm of 2, a<<x means a left shift by x bits, >> means right shift, & means bitwise AND, | means bitwise OR, abs means Absolute value, DivSigTable is a table, DivSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0}, Sign(x) means Take the sign bit of x.
可见,在该实施例中,通过左移和右移实现乘除运算,提高了硬件友好性。It can be seen that in this embodiment, the multiplication and division operations are implemented by shifting left and shifting right, which improves the hardware friendliness.
5、根据所确定的线性变换参数α和β以及当前图像块已解码的另一分量的像素值,确定当前图像块的当前分量的像素值。5. Determine the pixel value of the current component of the current image block according to the determined linear transformation parameters α and β and the pixel value of another component of the current image block that has been decoded.
作为一种示例,解码端设备确定了线性变换参数α和β时,可以根据所确定的线性变换参数以及当前图像块已解码的另一分量的像素值,确定当前图像块的当前分量的像素值。As an example, when the decoder device determines the linear transformation parameters α and β, the pixel value of the current component of the current image block can be determined according to the determined linear transformation parameter and the pixel value of another component of the current image block that has been decoded. .
实施例十Example ten
作为一种示例,解码端设备可以通过以下公式确定当前图像块的当前分量的像素值:As an example, the decoder device may determine the pixel value of the current component of the current image block by using the following formula:
Yi=(αXi)>>shift+βYi=(αXi)>>shift+β
在该公式中,Xi为已解码的另一分量中的第i个像素值,Yi为当前分量中的第i个像 素值,shift的值可以通过上述步骤4中的公式确定。In this formula, Xi is the value of the i-th pixel in another component that has been decoded, and Yi is the value of the i-th pixel in the current component. The value of shift can be determined by the formula in step 4 above.
作为一种示例,确定了Yi之后,若Yi<0,则将Yi设为0;若Yi大于2的D次方减1(以Yi采用D比特编码为例),则将Yi设为2的D次方减1。As an example, after determining Yi, if Yi<0, set Yi to 0; if Yi is greater than 2 to the power of D minus 1 (taking Yi using D-bit encoding as an example), set Yi to 2. Subtract 1 to the power of D.
实施例十一Example 11
作为一种示例,解码端设备可以通过以下公式确定当前图像块的当前分量的像素值:As an example, the decoder device may determine the pixel value of the current component of the current image block by using the following formula:
Yi=(αXi)+βYi=(αXi)+β
在该公式中,Xi为已解码的另一分量中的第i个像素值,Yi为当前分量中的第i个像素值。In this formula, Xi is the i-th pixel value in another component that has been decoded, and Yi is the i-th pixel value in the current component.
作为一种示例,确定了Yi之后,若Yi<0,则将Yi设为0;若Yi大于2的D次方减1(以Yi采用D比特编码为例),则将Yi设为2的D次方减1。As an example, after determining Yi, if Yi<0, set Yi to 0; if Yi is greater than 2 to the power of D minus 1 (taking Yi using D-bit encoding as an example), set Yi to 2. Subtract 1 to the power of D.
本申请实施例中,通过基于已解码信息,确定当前图像块是否允许启用CCLM模式。当当前图像块允许启用CCLM模式时,确定当前图像块使用的目标预测模式。当目标预测模式为CCLM参考模式时,根据目标预测模式,获取参考像素值。进而,根据参考像素值,确定线性变换参数。然后,根据线性变换参数以及当前图像块已解码的另一分量的像素值,确定当前图像块的当前分量的像素值。通过对CCLM模式的启用条件进行限定,避免了在不适用CCLM模式的场景使用CCLM模式,提高了编码性能。In the embodiment of the present application, it is determined whether the current image block allows the CCLM mode to be enabled based on the decoded information. When the current image block allows the CCLM mode to be enabled, the target prediction mode used by the current image block is determined. When the target prediction mode is the CCLM reference mode, the reference pixel value is obtained according to the target prediction mode. Furthermore, based on the reference pixel value, the linear transformation parameter is determined. Then, the pixel value of the current component of the current image block is determined according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded. By limiting the enabling conditions of the CCLM mode, it is avoided to use the CCLM mode in scenarios where the CCLM mode is not applicable, and the coding performance is improved.
以上对本申请提供的方法进行了描述。下面对本申请提供的装置进行描述:The method provided by this application is described above. The following describes the device provided by this application:
请参见图5,为本申请实施例提供的一种解码装置的硬件结构示意图。该解码装置可包括处理器501、存储有机器可执行指令的机器可读存储介质502。处理器501与机器可读存储介质502可经由系统总线503通信。并且,通过读取并执行机器可读存储介质502中与解码控制逻辑对应的机器可执行指令,处理器501可执行上文描述的解码方法。Please refer to FIG. 5, which is a schematic diagram of the hardware structure of a decoding apparatus provided by an embodiment of this application. The decoding apparatus may include a processor 501 and a machine-readable storage medium 502 storing machine-executable instructions. The processor 501 and the machine-readable storage medium 502 may communicate via a system bus 503. Furthermore, by reading and executing the machine executable instructions corresponding to the decoding control logic in the machine-readable storage medium 502, the processor 501 can execute the decoding method described above.
本文中提到的机器可读存储介质502可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Random Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、DVD等),或者类似的存储介质,或者它们的组合。The machine-readable storage medium 502 mentioned herein may be any electronic, magnetic, optical, or other physical storage device, and may contain or store information, such as executable instructions, data, and so on. For example, the machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard drive), solid state hard drive, any type of storage disk (Such as CD, DVD, etc.), or similar storage media, or a combination of them.
如图6所示,从功能上划分,上述解码控制逻辑可以包括第一确定单元610、第二确定单元620、获取单元630、第三确定单元640以及第四确定单元650;其中:As shown in FIG. 6, the above-mentioned decoding control logic may include a first determination unit 610, a second determination unit 620, an acquisition unit 630, a third determination unit 640, and a fourth determination unit 650 in terms of functions.
第一确定单元610,用于基于已解码信息,确定当前图像块是否允许启用CCLM模式;The first determining unit 610 is configured to determine whether the current image block allows the CCLM mode to be enabled based on the decoded information;
第二确定单元620,用于若所述当前图像块允许启用CCLM模式,则确定所述当前图像块使用的目标预测模式;The second determining unit 620 is configured to determine the target prediction mode used by the current image block if the CCLM mode is allowed to be enabled for the current image block;
获取单元630,用于若所述目标预测模式为CCLM参考模式,则根据所述目标预测模式,获取参考像素值;The obtaining unit 630 is configured to obtain a reference pixel value according to the target prediction mode if the target prediction mode is the CCLM reference mode;
第三确定单元640,用于根据所述参考像素值,确定线性变换参数;The third determining unit 640 is configured to determine linear transformation parameters according to the reference pixel value;
第四确定单元650,用于根据所述线性变换参数以及所述当前图像块已解码的另一分量的像素值,确定所述当前图像块的当前分量的像素值。The fourth determining unit 650 is configured to determine the pixel value of the current component of the current image block according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
作为一种可能的实施方式,第一确定单元610具体用于在所述当前图像块满足以下条件时,确定所述当前图像块允许启用CCLM模式:As a possible implementation manner, the first determining unit 610 is specifically configured to determine that the current image block allows the CCLM mode to be enabled when the current image block meets the following conditions:
所述当前图像块的预测模式为帧内模式;The prediction mode of the current image block is an intra mode;
所述当前图像块的至少一个其他分量已解码出所需像素信息,当前分量存在且未解码;At least one other component of the current image block has decoded required pixel information, and the current component exists and has not been decoded;
所述当前图像块的预测模式不为DM模式;The prediction mode of the current image block is not the DM mode;
所述当前图像块的当前分量的左侧和上侧中至少有一侧的图像块的解码信息可用;Decoding information of at least one of the image blocks on the left side and the upper side of the current component of the current image block is available;
所述当前图像块的尺寸在预设尺寸范围内。The size of the current image block is within a preset size range.
作为一种可能的实施方式,所述当前图像块的尺寸在预设尺寸范围内,包括:As a possible implementation manner, the size of the current image block is within a preset size range, including:
所述当前图像块的面积大于或等于第一面积阈值,且小于等于第二面积阈值;The area of the current image block is greater than or equal to the first area threshold and less than or equal to the second area threshold;
其中,所述第一面积阈值和所述第二面积阈值均为2的n次方,n为正整数,所述第二面积阈值大于所述第一面积阈值。Wherein, the first area threshold value and the second area threshold value are both n-th power of 2, n is a positive integer, and the second area threshold value is greater than the first area threshold value.
作为一种可能的实施方式,所述当前图像块的尺寸在预设尺寸范围内,包括:As a possible implementation manner, the size of the current image block is within a preset size range, including:
所述当前图像块的宽大于或等于第一宽度阈值,且小于等于第二宽度阈值;The width of the current image block is greater than or equal to the first width threshold and less than or equal to the second width threshold;
所述当前图像块的高大于或等于第一高度阈值,且小于等于第二高度阈值;The height of the current image block is greater than or equal to the first height threshold and less than or equal to the second height threshold;
其中,所述第一宽度阈值、所述第二宽度阈值、所述第一高度阈值以及所述第二高度阈值为2的n次方,n为正整数,所述第一宽度阈值小于所述第二宽度阈值,所述第一高度阈值小于所述第二高度阈值。Wherein, the first width threshold, the second width threshold, the first height threshold, and the second height threshold are the nth power of 2, where n is a positive integer, and the first width threshold is less than the A second width threshold, and the first height threshold is smaller than the second height threshold.
作为一种可能的实施方式,第二确定单元620具体用于:确定所述当前图像块的候选预测模式列表;解析所述当前图像块使用的预测模式的索引值;基于所述索引值,在所述候选预测模式列表中确定所述当前图像块使用的目标预测模式。As a possible implementation manner, the second determining unit 620 is specifically configured to: determine the candidate prediction mode list of the current image block; analyze the index value of the prediction mode used by the current image block; and based on the index value, The target prediction mode used by the current image block is determined in the candidate prediction mode list.
作为一种可能的实施方式,第二确定单元620具体用于将默认列表作为所述当前图像块的候选预测模式列表。As a possible implementation manner, the second determining unit 620 is specifically configured to use the default list as the candidate prediction mode list of the current image block.
作为一种可能的实施方式,所述默认列表为第一列表或包括所述第一列表中的部分预测模式的第二列表;As a possible implementation manner, the default list is a first list or a second list including some prediction modes in the first list;
其中,所述第一列表为{CCLM_T_L模式、非CCLM模式、CCLM_L模式、CCLM_T模式}。Wherein, the first list is {CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode}.
作为一种可能的实施方式,所述第二确定单元620,具体用于基于所述当前图像块的位置信息,确定所述当前图像块的候选预测模式列表。As a possible implementation manner, the second determining unit 620 is specifically configured to determine the candidate prediction mode list of the current image block based on the position information of the current image block.
作为一种可能的实施方式,所述当前图像块的位置信息包括:所述当前图像块的左侧或上侧图像块的解码信息是否可用以及所述当前图像块在LCU中的位置。As a possible implementation manner, the position information of the current image block includes: whether the decoding information of the left or upper image block of the current image block is available and the position of the current image block in the LCU.
作为一种可能的实施方式,获取单元630具体用于:若所述当前图像块的当前分量与所述已解码的另一分量的尺寸相同,则获取相同位置,相同数量的像素值;若所述当前图像块的当前分量与所述已解码的另一分量的尺寸不同,则按长宽比例采样以获取相同数量的像素值。As a possible implementation manner, the acquiring unit 630 is specifically configured to: if the current component of the current image block has the same size as the other decoded component, acquire the same position and the same number of pixel values; If the size of the current component of the current image block is different from that of the other decoded component, sampling is performed in the aspect ratio to obtain the same number of pixel values.
作为一种可能的实施方式,第三确定单元640具体用于:确定所述已解码的另一分量的参考像素值的最大值maxL和最小值minL,以及当前分量的参考像素值的最大值maxC和最小值minC;根据maxL、minL、maxC以及minC,确定线性变换参数。As a possible implementation manner, the third determining unit 640 is specifically configured to determine the maximum value maxL and the minimum value minL of the reference pixel value of the decoded another component, and the maximum value maxC of the reference pixel value of the current component. And the minimum value minC; according to maxL, minL, maxC and minC, determine the linear transformation parameters.
作为一种可能的实施方式,所述第四确定单元650还用于:若所确定的当前分量的像素值大于第一预设像素值阈值,则将所述第一预设像素值阈值作为所述当前图像块的当前分量的像素值;若所确定的当前分量的像素值小于第二预设像素值阈值,则将所述第二预设像素值阈值作为所述当前图像块的当前分量的像素值;As a possible implementation manner, the fourth determining unit 650 is further configured to: if the determined pixel value of the current component is greater than a first preset pixel value threshold, use the first preset pixel value threshold as the The pixel value of the current component of the current image block; if the determined pixel value of the current component is less than a second preset pixel value threshold, the second preset pixel value threshold is taken as the current component of the current image block Pixel values;
示例性的,所述第一预设像素值阈值大于所述第二预设像素值阈值。Exemplarily, the first preset pixel value threshold is greater than the second preset pixel value threshold.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply one of these entities or operations. There is any such actual relationship or order between. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes those that are not explicitly listed Other elements of, or also include elements inherent to this process, method, article or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or equipment that includes the element.
以上所述仅为本申请的实施例,并不用以限制本申请。凡在本申请的精神和原则之内所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above descriptions are only examples of the application, and are not intended to limit the application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the scope of protection of this application.

Claims (13)

  1. 一种解码方法,应用于解码端设备,所述方法包括:A decoding method applied to a decoding terminal device, the method including:
    基于已解码信息,确定当前图像块是否允许启用跨分量预测线性模型跨分量线性模型预测CCLM模式;Based on the decoded information, determine whether the current image block is allowed to enable the cross-component prediction linear model and the cross-component linear model prediction CCLM mode;
    若所述当前图像块允许启用CCLM模式,则确定所述当前图像块使用的目标预测模式;If the current image block allows the CCLM mode to be enabled, determining the target prediction mode used by the current image block;
    若所述目标预测模式为CCLM参考模式,则根据所述目标预测模式,获取参考像素值;If the target prediction mode is the CCLM reference mode, obtain reference pixel values according to the target prediction mode;
    根据所述参考像素值,确定线性变换参数;Determining linear transformation parameters according to the reference pixel value;
    根据所述线性变换参数以及所述当前图像块已解码的另一分量的像素值,确定所述当前图像块的当前分量的像素值。Determine the pixel value of the current component of the current image block according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
  2. 根据权利要求1所述的方法,其中,当所述当前图像块满足以下条件时,确定所述当前图像块允许启用CCLM模式:The method according to claim 1, wherein when the current image block satisfies the following conditions, it is determined that the current image block allows the CCLM mode to be enabled:
    所述当前图像块的预测模式为帧内模式;The prediction mode of the current image block is an intra mode;
    所述当前图像块的至少一个其他分量已解码出所需像素信息,当前分量存在且未解码;At least one other component of the current image block has decoded required pixel information, and the current component exists and has not been decoded;
    所述当前图像块的预测模式不为对应亮度分量模式DM模式;The prediction mode of the current image block is not the corresponding brightness component mode DM mode;
    所述当前图像块的当前分量的左侧和上侧中至少有一侧的图像块的解码信息可用;Decoding information of at least one of the image blocks on the left side and the upper side of the current component of the current image block is available;
    所述当前图像块的尺寸在预设尺寸范围内。The size of the current image block is within a preset size range.
  3. 根据权利要求2所述的方法,其中,所述当前图像块的尺寸在预设尺寸范围内,包括:The method according to claim 2, wherein the size of the current image block is within a preset size range, comprising:
    所述当前图像块的面积大于或等于第一面积阈值,且小于等于第二面积阈值;The area of the current image block is greater than or equal to the first area threshold and less than or equal to the second area threshold;
    其中,所述第一面积阈值和所述第二面积阈值均为2的n次方,n为正整数,所述第二面积阈值大于所述第一面积阈值。Wherein, the first area threshold value and the second area threshold value are both n-th power of 2, n is a positive integer, and the second area threshold value is greater than the first area threshold value.
  4. 根据权利要求2或3所述的方法,其中,所述当前图像块的尺寸在预设尺寸范围内,包括:The method according to claim 2 or 3, wherein the size of the current image block is within a preset size range, comprising:
    所述当前图像块的宽大于或等于第一宽度阈值,且小于等于第二宽度阈值;The width of the current image block is greater than or equal to the first width threshold and less than or equal to the second width threshold;
    所述当前图像块的高大于或等于第一高度阈值,且小于等于第二高度阈值;The height of the current image block is greater than or equal to the first height threshold and less than or equal to the second height threshold;
    其中,所述第一宽度阈值、所述第二宽度阈值、所述第一高度阈值以及所述第二高度阈值均为2的n次方,n为正整数,所述第一宽度阈值小于所述第二宽度阈值,所述第一高度阈值小于所述第二高度阈值。Wherein, the first width threshold, the second width threshold, the first height threshold, and the second height threshold are all 2 to the nth power, n is a positive integer, and the first width threshold is less than The second width threshold, the first height threshold is less than the second height threshold.
  5. 根据权利要求1所述的方法,其中,所述确定所述当前图像块使用的目标预测模式,包括:The method according to claim 1, wherein the determining the target prediction mode used by the current image block comprises:
    确定所述当前图像块的候选预测模式列表;Determining a candidate prediction mode list of the current image block;
    解析所述当前图像块使用的预测模式的索引值;Parse the index value of the prediction mode used by the current image block;
    基于所述索引值,在所述候选预测模式列表中确定所述当前图像块使用的目标预测模式。Based on the index value, the target prediction mode used by the current image block is determined in the candidate prediction mode list.
  6. 根据权利要求5所述的方法,其中,所述确定所述当前图像块的候选预测模式列表,包括:The method according to claim 5, wherein the determining the candidate prediction mode list of the current image block comprises:
    将默认列表作为所述当前图像块的候选预测模式列表。The default list is used as the candidate prediction mode list of the current image block.
  7. 根据权利要求6所述的方法,其中,所述默认列表为第一列表或包括所述第一列表中的部分预测模式的第二列表;The method according to claim 6, wherein the default list is a first list or a second list including some prediction modes in the first list;
    其中,所述第一列表为{CCLM_T_L模式、非CCLM模式、CCLM_L模式、CCLM_T模式}。Wherein, the first list is {CCLM_T_L mode, non-CCLM mode, CCLM_L mode, CCLM_T mode}.
  8. 根据权利要求5所述的方法,其中,所述确定所述当前图像块的候选预测模式列表,包括:The method according to claim 5, wherein the determining the candidate prediction mode list of the current image block comprises:
    基于所述当前图像块的位置信息,确定所述当前图像块的候选预测模式列表。Based on the location information of the current image block, a candidate prediction mode list of the current image block is determined.
  9. 根据权利要求8所述的方法,其中,所述当前图像块的位置信息包括:The method according to claim 8, wherein the position information of the current image block comprises:
    所述当前图像块的左侧或上侧图像块的解码信息是否可用以及所述当前图像块在最大编码单元LCU中的位置。Whether the decoding information of the left or upper image block of the current image block is available and the position of the current image block in the largest coding unit LCU.
  10. 根据权利要求1所述的方法,其中,所述根据所述目标预测模式,获取参考像素值,包括:The method according to claim 1, wherein the obtaining a reference pixel value according to the target prediction mode comprises:
    若所述当前图像块的当前分量与所述已解码的另一分量的尺寸相同,则获取相同位置,相同数量的像素值;If the size of the current component of the current image block is the same as that of the other decoded component, acquiring the same position and the same number of pixel values;
    若所述当前图像块的当前分量与所述已解码的另一分量的尺寸不同,则按长宽比例采样以获取相同数量的像素值。If the size of the current component of the current image block is different from that of the other decoded component, sampling is performed according to the aspect ratio to obtain the same number of pixel values.
  11. 根据权利要求1所述的方法,其中,所述根据所述参考像素值,确定线性变换参数,包括:The method according to claim 1, wherein the determining a linear transformation parameter according to the reference pixel value comprises:
    确定所述已解码的另一分量的参考像素值的最大值maxL和最小值minL,以及当前分量的参考像素值的最大值maxC和最小值minC;Determining the maximum value maxL and the minimum value minL of the reference pixel value of the decoded another component, and the maximum value maxC and the minimum value minC of the reference pixel value of the current component;
    根据maxL、minL、maxC以及minC,确定所述线性变换参数。According to maxL, minL, maxC and minC, the linear transformation parameters are determined.
  12. 根据权利要求1所述的方法,所述确定所述当前图像块的当前分量的像素值之后,还包括:The method according to claim 1, after the determining the pixel value of the current component of the current image block, further comprising:
    若所确定的当前分量的像素值大于第一预设像素值阈值,则将所述第一预设像素值阈值作为所述当前图像块的当前分量的像素值;If the determined pixel value of the current component is greater than the first preset pixel value threshold, use the first preset pixel value threshold as the pixel value of the current component of the current image block;
    若所确定的当前分量的像素值小于第二预设像素值阈值,则将所述第二预设像素值阈值作为所述当前图像块的当前分量的像素值,If the determined pixel value of the current component is less than the second preset pixel value threshold, the second preset pixel value threshold is used as the pixel value of the current component of the current image block,
    其中,所述第一预设像素值阈值大于所述第二预设像素值阈值。Wherein, the first preset pixel value threshold is greater than the second preset pixel value threshold.
  13. 一种解码装置,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可读指令,所述处理器被所述机器可读指令促使:A decoding device includes a processor and a machine-readable storage medium, the machine-readable storage medium stores machine-readable instructions that can be executed by the processor, and the processor is prompted by the machine-readable instructions:
    基于已解码信息,确定当前图像块是否允许启用跨分量线性模型预测CCLM模式;Based on the decoded information, determine whether the current image block allows the cross-component linear model prediction CCLM mode to be enabled;
    若所述当前图像块允许启用CCLM模式,则确定所述当前图像块使用的目标预测模式;If the current image block allows the CCLM mode to be enabled, determining the target prediction mode used by the current image block;
    若所述目标预测模式为CCLM参考模式,则根据所述目标预测模式,获取参考像素值;If the target prediction mode is the CCLM reference mode, obtain reference pixel values according to the target prediction mode;
    根据所述参考像素值,确定线性变换参数;Determining linear transformation parameters according to the reference pixel value;
    根据所述线性变换参数以及所述当前图像块已解码的另一分量的像素值,确定所述当前图像块的当前分量的像素值。Determine the pixel value of the current component of the current image block according to the linear transformation parameter and the pixel value of another component of the current image block that has been decoded.
PCT/CN2020/078874 2019-03-11 2020-03-11 Decoding method and device WO2020182168A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910181866.X 2019-03-11
CN201910181866.XA CN111698501B (en) 2019-03-11 2019-03-11 Decoding method and device

Publications (1)

Publication Number Publication Date
WO2020182168A1 true WO2020182168A1 (en) 2020-09-17

Family

ID=69052582

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2020/078874 WO2020182168A1 (en) 2019-03-11 2020-03-11 Decoding method and device
PCT/CN2020/078875 WO2020182169A1 (en) 2019-03-11 2020-03-11 Decoding method and device

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078875 WO2020182169A1 (en) 2019-03-11 2020-03-11 Decoding method and device

Country Status (2)

Country Link
CN (2) CN111698501B (en)
WO (2) WO2020182168A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116668704A (en) * 2023-08-02 2023-08-29 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698501B (en) * 2019-03-11 2022-03-01 杭州海康威视数字技术股份有限公司 Decoding method and device
CN113129294A (en) * 2021-04-28 2021-07-16 桂林电子科技大学 Multi-scale connection deep learning one-step phase unwrapping method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105009590A (en) * 2013-03-15 2015-10-28 高通股份有限公司 Device and method for scalable coding of video information
CN106576164A (en) * 2014-06-27 2017-04-19 三菱电机株式会社 Method and decoder for predicting and filtering color components in pictures
JP2018056685A (en) * 2016-09-27 2018-04-05 株式会社ドワンゴ Image encoder, image encoding method and image encoding program, and image decoder, image decoding method and image decoding program

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101590633B1 (en) * 2008-11-11 2016-02-02 삼성전자주식회사 / /apparatus for processing video encoding and decoding using video separation based on slice level and method therefor
US9998742B2 (en) * 2015-01-27 2018-06-12 Qualcomm Incorporated Adaptive cross component residual prediction
EP3254466A1 (en) * 2015-02-05 2017-12-13 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. 3d-video codec supporting inter-component prediction
CN115150630B (en) * 2016-05-27 2024-02-20 松下电器(美国)知识产权公司 Encoding device and decoding device
US10419757B2 (en) * 2016-08-31 2019-09-17 Qualcomm Incorporated Cross-component filter
CN109274969B (en) * 2017-07-17 2020-12-22 华为技术有限公司 Method and apparatus for chroma prediction
CN111698501B (en) * 2019-03-11 2022-03-01 杭州海康威视数字技术股份有限公司 Decoding method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105009590A (en) * 2013-03-15 2015-10-28 高通股份有限公司 Device and method for scalable coding of video information
CN106576164A (en) * 2014-06-27 2017-04-19 三菱电机株式会社 Method and decoder for predicting and filtering color components in pictures
JP2018056685A (en) * 2016-09-27 2018-04-05 株式会社ドワンゴ Image encoder, image encoding method and image encoding program, and image decoder, image decoding method and image decoding program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CANON: "CE3-5.1: On cross-component linear model simplification", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11, no. JVET-L0191, 12 October 2018 (2018-10-12), pages 1 - 4, XP030250267 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116668704A (en) * 2023-08-02 2023-08-29 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium
CN116668704B (en) * 2023-08-02 2024-02-06 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium

Also Published As

Publication number Publication date
CN110662031A (en) 2020-01-07
CN111698501A (en) 2020-09-22
WO2020182169A1 (en) 2020-09-17
CN111698501B (en) 2022-03-01
CN110662031B (en) 2021-03-23

Similar Documents

Publication Publication Date Title
JP6553220B2 (en) Adaptive color space transformation coding
WO2020182168A1 (en) Decoding method and device
US8509310B2 (en) Method, medium, and system encoding and/or decoding an image
JP5775083B2 (en) Method and apparatus for encoding and decoding mode information
US9743080B2 (en) Encoding or decoding method and apparatus
US20140205006A1 (en) Super macro block based intra coding method and apparatus
US20130114687A1 (en) Fixed intra run-level mode for cavlc in hevc
EP2406953B1 (en) A method of compression of graphics images and videos
JP2015084577A (en) Methods and apparatus for video encoding and decoding
JP4440308B2 (en) Rate control method and system in image compression
US20130114684A1 (en) Electronic devices for selective run-level coding and decoding
TW201737706A (en) Apparatus and method for vector-based entropy coding for display stream compression
CN113489974B (en) Intra-frame prediction method, video/image encoding and decoding method and related devices
CN112449201B (en) Decoding method, encoding method, corresponding devices, electronic equipment and storage medium
CN112449186B (en) Encoding method, decoding method, corresponding devices, electronic equipment and storage medium
US20110051815A1 (en) Method and apparatus for encoding data and method and apparatus for decoding data
WO2023131221A2 (en) Image coding and decoding method and apparatus, and storage medium
US11706410B2 (en) Methods and systems for combined lossless and lossy coding
US20230269380A1 (en) Encoding method, decoding method, encoder, decoder and storage medium
WO2010018494A1 (en) Image compression
KR102538197B1 (en) Determination of co-located luminance samples of color component samples for HDR coding/decoding
JP4986906B2 (en) Decoding device, decoding method, program, and recording medium
JP2006140967A (en) Image coder, image coding method, computer program and a computer readable storage medium
JP2010011114A (en) Image processor, image processing method, image processing program, and recording medium with image processing program recorded

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: 20770372

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20770372

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20770372

Country of ref document: EP

Kind code of ref document: A1