WO2024031691A1 - 一种视频编解码方法、装置和*** - Google Patents

一种视频编解码方法、装置和*** Download PDF

Info

Publication number
WO2024031691A1
WO2024031691A1 PCT/CN2022/112282 CN2022112282W WO2024031691A1 WO 2024031691 A1 WO2024031691 A1 WO 2024031691A1 CN 2022112282 W CN2022112282 W CN 2022112282W WO 2024031691 A1 WO2024031691 A1 WO 2024031691A1
Authority
WO
WIPO (PCT)
Prior art keywords
tmrl
allowed
mode
value
flag
Prior art date
Application number
PCT/CN2022/112282
Other languages
English (en)
French (fr)
Inventor
徐陆航
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/112282 priority Critical patent/WO2024031691A1/zh
Publication of WO2024031691A1 publication Critical patent/WO2024031691A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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

  • the embodiments of the present disclosure relate to, but are not limited to, video technology, and more specifically, to a video encoding and decoding method, device and system.
  • Digital video compression technology mainly compresses huge digital image and video data to facilitate transmission and storage.
  • Current common video encoding and decoding standards such as H.266/Versatile Video Coding (VVC), all use block-based hybrid coding frameworks.
  • Each frame in the video is divided into square largest coding units (LCU: largest coding unit) of the same size (such as 128x128, 64x64, etc.).
  • Each maximum coding unit can be divided into rectangular coding units (CU: coding unit) according to rules.
  • Coding units may also be divided into prediction units (PU: prediction unit), transformation units (TU: transform unit), etc.
  • the hybrid coding framework includes prediction, transform, quantization, entropy coding, in loop filter and other modules.
  • the prediction module includes intra prediction and inter prediction, which are used to reduce or remove the inherent redundancy of the video.
  • Intra-frame blocks are predicted using the surrounding pixels of the block as a reference, while inter-frame blocks refer to spatially adjacent block information and reference information in other frames.
  • the residual information is encoded into a code stream through block-based transformation, quantization and entropy encoding.
  • An embodiment of the present disclosure provides a video decoding method, applied to a decoder, including:
  • An embodiment of the present disclosure also provides a video coding method, applied to an encoder, including:
  • An embodiment of the present disclosure also provides a code stream, wherein the code stream is generated by the video encoding method described in any embodiment of the present disclosure.
  • An embodiment of the present disclosure also provides a video decoding device, including a processor and a memory storing a computer program, wherein when the processor executes the computer program, it can implement the video decoding described in any embodiment of the present disclosure. method.
  • An embodiment of the present disclosure also provides a video encoding device, including a processor and a memory storing a computer program, wherein when the processor executes the computer program, it can implement the video encoding described in any embodiment of the present disclosure. method.
  • An embodiment of the present disclosure also provides a video encoding and decoding system, which includes the video encoding device described in any embodiment of the present disclosure and the video decoding device described in any embodiment of the present disclosure.
  • An embodiment of the present disclosure also provides a non-transitory computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, can implement any implementation of the present disclosure.
  • Figure 1A is a schematic diagram of a coding and decoding system according to an embodiment of the present disclosure
  • Figure 1B is a frame diagram of the encoding end according to an embodiment of the present disclosure.
  • Figure 1C is a frame diagram of the decoding end according to an embodiment of the present disclosure.
  • Figure 2 is a schematic diagram of an intra prediction mode according to an embodiment of the present disclosure
  • Figure 3 is a schematic diagram of adjacent intra prediction blocks of the current block according to an embodiment of the present disclosure
  • Figure 4 is a schematic diagram of the template and template reference area of the current block according to an embodiment of the present disclosure
  • Figure 5 is a schematic diagram of multiple reference lines around the current block according to an embodiment of the present disclosure.
  • Figure 6 is a flow chart of a video encoding method according to an embodiment of the present disclosure.
  • Figure 7 is a flow chart of a method for constructing a TMRL pattern candidate list according to an embodiment of the present disclosure
  • Figure 8A is a schematic diagram of the template area and extended reference lines around the current block according to an embodiment of the present disclosure
  • Figure 8B is a schematic diagram of the template area and extended reference lines around the current block according to another embodiment of the present disclosure.
  • Figure 9 is a flow chart of a video decoding method according to an embodiment of the present disclosure.
  • Figure 10 is a flow chart of a video decoding method according to another embodiment of the present disclosure.
  • Figure 11 is a flow chart of a video encoding method according to another embodiment of the present disclosure.
  • Figure 12 is a schematic diagram of a video decoding device according to an embodiment of the present disclosure.
  • the words “exemplary” or “such as” are used to mean an example, illustration, or explanation. Any embodiment described in this disclosure as “exemplary” or “such as” is not intended to be construed as preferred or advantageous over other embodiments.
  • "And/or” in this article is a description of the relationship between associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and they exist alone. B these three situations.
  • "Plural” means two or more than two.
  • words such as “first” and “second” are used to distinguish the same or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as “first” and “second” do not limit the number and execution order, and words such as “first” and “second” do not limit the number and execution order.
  • the video encoding and decoding method proposed in the embodiment of the present disclosure can be applied to various video encoding and decoding standards, such as: H.264/Advanced Video Coding (AVC), H.265/High Efficiency Video Coding (High Efficiency Video Coding, HEVC), H.266/Versatile Video Coding (VVC), AVS (Audio Video coding Standard, audio and video coding standard), and MPEG (Moving Picture Experts Group), AOM (Open Media) Alliance for Open Media), JVET (Joint Video Experts Team) and other standards developed by these standards, or any other customized standards.
  • AVC Advanced Video Coding
  • HEVC High Efficiency Video Coding
  • VVC Very Low Efficiency Video Coding
  • AVS Ad Video coding Standard
  • MPEG Motion Picture Experts Group
  • AOM Open Media Alliance for Open Media
  • JVET Joint Video Experts Team
  • FIG. 1A is a block diagram of a video encoding and decoding system that can be used in embodiments of the present disclosure. As shown in the figure, the system is divided into an encoding end device 1 and a decoding end device 2.
  • the encoding end device 1 generates a code stream.
  • the decoding end device 2 can decode the code stream.
  • the decoding end device 2 can receive the code stream from the encoding end device 1 via the link 3 .
  • Link 3 includes one or more media or devices capable of moving the code stream from the encoding end device 1 to the decoding end device 2 .
  • the link 3 includes one or more communication media that enable the encoding end device 1 to directly send the code stream to the decoding end device 2 .
  • the encoding end device 1 modulates the code stream according to the communication standard (such as a wireless communication protocol), and sends the modulated code stream to the decoding end device 2 .
  • the one or more communication media may include wireless and/or wired communication media and may form part of a packet network.
  • the code stream can also be output from the output interface 15 to a storage device, and the decoding end device 2 can read the stored data from the storage device via streaming or downloading.
  • the code end device 1 includes a data source 11, a video encoding device 13 and an output interface 15.
  • Data sources 11 include a video capture device (eg, a video camera), an archive containing previously captured data, a feed interface to receive data from a content provider, a computer graphics system to generate the data, or a combination of these sources.
  • the video encoding device 13 encodes the data from the data source 11 and outputs the data to the output interface 15.
  • the output interface 15 may include at least one of a regulator, a modem and a transmitter.
  • the decoding end device 2 includes an input interface 21 , a video decoding device 23 and a display device 25 .
  • the input interface 21 includes at least one of a receiver and a modem.
  • the input interface 21 may receive the code stream via link 3 or from a storage device.
  • the video decoding device 23 decodes the received code stream.
  • the display device 25 is used to display the decoded data.
  • the display device 25 can be integrated with other devices of the decoding end device 2 or set up separately.
  • the display device 25 is optional for the decoding end. In other examples, the decoding end may include other devices or devices that apply decoded data.
  • FIG. 1B is a block diagram of an exemplary video encoding device that can be used in embodiments of the present disclosure.
  • the video encoding device 1000 includes a prediction unit 1100, a division unit 1101, a residual generation unit 1102 (indicated by a circle with a plus sign after the division unit 1101 in the figure), a transformation processing unit 1104, a quantization unit 1106, Inverse quantization unit 1108, inverse transform processing unit 1110, reconstruction unit 1112 (indicated by a circle with a plus sign after the inverse transform processing unit 1110 in the figure), filter unit 1113, decoded image buffer 1114, and entropy encoding unit 1115.
  • the prediction unit 1100 includes an inter prediction unit 1121 and an intra prediction unit 1126, and the decoded image buffer 1114 may also be called a decoded image buffer, a decoded picture buffer, a decoded picture buffer, etc.
  • Video encoder 20 may also include more, fewer, or different functional components than this example, such that transform processing unit 1104, inverse transform processing unit 1110, etc. may be eliminated in some cases.
  • the dividing unit 1101 cooperates with the prediction unit 1100 to divide the received video data into slices, coding tree units (CTU: Coding Tree Unit) or other larger units.
  • the video data received by the dividing unit 1101 may be a video sequence including video frames such as I frames, P frames, or B frames.
  • the prediction unit 1100 can divide the CTU into coding units (CU: Coding Unit), and perform intra prediction encoding or inter prediction encoding on the CU.
  • CU Coding Unit
  • the CU can be divided into one or more prediction units (PU: prediction unit).
  • the inter prediction unit 1121 may perform inter prediction on the PU to generate prediction data for the PU, including prediction blocks of the PU, motion information of the PU, and various syntax elements.
  • the inter prediction unit 1121 may include a motion estimation (ME: motion estimation) unit and a motion compensation (MC: motion compensation) unit.
  • the motion estimation unit may be used for motion estimation to generate motion vectors, and the motion compensation unit may be used to obtain or generate prediction blocks based on the motion vectors.
  • Intra prediction unit 1126 may perform intra prediction on the PU to generate prediction data for the PU.
  • the prediction data of the PU may include the prediction block of the PU and various syntax elements.
  • Residual generation unit 1102 may generate a residual block of the CU based on the original block of the CU minus the prediction blocks of the PU into which the CU is divided.
  • the transformation processing unit 1104 may divide the CU into one or more transformation units (TU: Transform Unit), and the divisions of prediction units and transformation units may be different.
  • the residual block associated with the TU is the sub-block obtained by dividing the residual block of the CU.
  • a TU-associated coefficient block is generated by applying one or more transforms to the TU-associated residual block.
  • the quantization unit 1106 can quantize the coefficients in the coefficient block based on the selected quantization parameter, and the degree of quantization of the coefficient block can be adjusted by adjusting the quantization parameter (QP: Quantizer Parameter).
  • QP Quantizer Parameter
  • Inverse quantization unit 1108 and inverse transform unit 1110 may apply inverse quantization and inverse transform to the coefficient block, respectively, to obtain a TU-associated reconstructed residual block.
  • the reconstruction unit 1112 may add the reconstruction residual block and the prediction block generated by the prediction unit 1100 to generate a reconstructed image.
  • the filter unit 1113 performs loop filtering on the reconstructed image, and stores the filtered reconstructed image in the decoded image buffer 1114 as a reference image.
  • Intra prediction unit 1126 may extract reference images of blocks adjacent to the PU from decoded image buffer 1114 to perform intra prediction.
  • the inter prediction unit 1121 may perform inter prediction on the PU of the current frame image using the reference image of the previous frame buffered by the decoded image buffer 1114 .
  • the entropy encoding unit 1115 may perform an entropy encoding operation on received data (such as syntax elements, quantized coefficient blocks, motion information, etc.).
  • the video decoding device 101 includes an entropy decoding unit 150, a prediction unit 152, an inverse quantization unit 154, an inverse transform processing unit 156, and a reconstruction unit 158 (indicated by a circle with a plus sign after the inverse transform processing unit 155 in the figure). ), filter unit 159, and decoded image buffer 160.
  • the video decoder 30 may include more, fewer, or different functional components, such as the inverse transform processing unit 155 may be eliminated in some cases.
  • the entropy decoding unit 150 may perform entropy decoding on the received code stream, and extract syntax elements, quantized coefficient blocks, motion information of the PU, etc.
  • the prediction unit 152, the inverse quantization unit 154, the inverse transform processing unit 156, the reconstruction unit 158 and the filter unit 159 may all perform corresponding operations based on syntax elements extracted from the code stream.
  • Inverse quantization unit 154 may inversely quantize the quantized TU-associated coefficient block.
  • Inverse transform processing unit 156 may apply one or more inverse transforms to the inverse quantized coefficient block to produce a reconstructed residual block of the TU.
  • Prediction unit 152 includes inter prediction unit 162 and intra prediction unit 164 .
  • intra prediction unit 164 may determine the intra prediction mode of the PU based on the syntax elements decoded from the codestream, based on the determined intra prediction mode and the PU's neighbors obtained from decoded image buffer 160 Intra prediction is performed on the reconstructed reference information to generate the prediction block of the PU.
  • inter prediction unit 162 may determine one or more reference blocks for the PU based on the motion information of the PU and corresponding syntax elements, generated based on the reference blocks obtained from decoded image buffer 160 Prediction block of PU.
  • Reconstruction unit 158 may obtain a reconstructed image based on the reconstruction residual block associated with the TU and the prediction block of the PU generated by prediction unit 152 .
  • the filter unit 159 may perform loop filtering on the reconstructed image, and the filtered reconstructed image is stored in the decoded image buffer 160 .
  • the decoded image buffer 160 can provide a reference image for subsequent motion compensation, intra-frame prediction, inter-frame prediction, etc., and can also output the filtered reconstructed image as decoded video data for presentation on the display device.
  • a frame of image is divided into blocks, and intra-frame prediction or inter-frame prediction or other algorithms are performed on the current block to generate the prediction of the current block.
  • Block use the original block of the current block to subtract the prediction block to obtain the residual block, transform and quantize the residual block to obtain the quantization coefficient, and perform entropy encoding on the quantization coefficient to generate a code stream.
  • intra-frame prediction or inter-frame prediction is performed on the current block to generate the prediction block of the current block.
  • the quantized coefficients obtained from the decoded code stream are inversely quantized and inversely transformed to obtain the residual block.
  • the prediction block and residual The blocks are added to obtain the reconstructed block, the reconstructed block constitutes the reconstructed image, and the reconstructed image is loop filtered based on the image or block to obtain the decoded image.
  • the encoding end also obtains the decoded image through similar operations as the decoding end.
  • the decoded image obtained by the encoding end is also usually called a reconstructed image.
  • the decoded image can be used as a reference frame for inter-frame prediction of subsequent frames.
  • the block division information determined by the encoding end, mode information and parameter information such as prediction, transformation, quantization, entropy coding, loop filtering, etc. can be written into the code stream if necessary.
  • the decoding end determines the same block division information as the encoding end by decoding the code stream or analyzing the existing information, and determines the mode information and parameter information such as prediction, transformation, quantization, entropy coding, loop filtering, etc., thereby ensuring the decoding obtained by the encoding end.
  • the image is the same as the decoded image obtained at the decoding end.
  • block-based hybrid coding framework is used as an example above, the embodiments of the present disclosure are not limited thereto. With the development of technology, one or more modules in the framework, and one or more steps in the process Can be replaced or optimized.
  • the current block can be a block-level coding and decoding unit such as the current coding unit (current CU) or the current prediction unit (current PU) in the current image.
  • the encoding end When the encoding end performs intra prediction, it usually uses various angle modes and non-angle modes to predict the current block to obtain the prediction block; based on the rate distortion information calculated between the prediction block and the original block, the optimal intra prediction is selected for the current block. mode, encode the intra prediction mode and transmit it to the decoder via the code stream. The decoder obtains the currently selected intra prediction mode through decoding, and performs intra prediction on the current block according to the intra prediction mode.
  • the reference line and intra prediction mode selected for the current block are also expressed as the reference line and intra prediction mode selected for the current block.
  • FIG. 2 shows the angular directions of angle prediction modes with mode indexes 2 to 66.
  • the angle prediction mode is also referred to as the angle mode.
  • each angle prediction mode predModeIntra 14 ⁇ 80 will have an angle value intraPredAngle, as shown in the following table. The angle value of the angle mode will be used for subsequent angle prediction.
  • each angle mode predModeIntra corresponds to an angle.
  • the angle of each angle prediction mode is the angle in the rectangular coordinate system of the line segment corresponding to the angle prediction mode in Figure 1.
  • angle mode with index number 34, angle The value intraPredAngle is -32, and the angle is -45° or 45° or 135°, which is related to the 0° direction defined by this Cartesian coordinate system.
  • the intra prediction mode mentioned in this article refers to the traditional intra prediction mode including Planar mode, DC mode and angle mode, unless there are other limitations.
  • ECM Enhanced Compression Model
  • MPM first builds an MPM list, and fills the MPM list with the six intra prediction modes most likely to be selected by the current block. If the intra prediction mode selected in the current block is in the MPM list, you only need to encode its index number (only 3 bits are needed). If the intra prediction mode selected in the current block is not in the MPM list but in the 61 non-MPM (non -MPM) mode, the intra prediction mode is encoded using the truncated binary code (TBC) in the entropy coding stage.
  • TBC truncated binary code
  • the MPM list has 6 prediction modes.
  • the MPM in ECM is divided into MPM and Secondary MPM (Secondary MPM).
  • MPM and Secondary MPM use lists of length 6 and length 16 respectively.
  • the Planar mode is always filled in the first position in the MPM.
  • the remaining 5 positions are filled in according to the set steps until all 5 positions are filled.
  • the extra modes will be entered automatically.
  • Secondary MPM The Secondary MPM list can be composed of some main angle modes except the intra prediction mode in MPM.
  • the encoding and decoding order of the MPM flag (mpm_flag) is after the MRL mode, the encoding and decoding of MPM in ECM needs to depend on the MRL flag bit.
  • the MPM flag needs to be decoded to determine whether the current block uses MPM.
  • the current block uses MRL mode, there is no need to decode the MPM flag, and the current block uses MPM by default.
  • Template based intra mode derivation (TIMD: Template based intra mode derivation) and decoder-side intra mode derivation (DIMD: Decoder-side intra mode derivation) are two intra predictions for luminance frames adopted into the ECM reference software These two technologies can derive the intra prediction mode of the current block based on the reconstructed pixel values around the current block at the decoding end, thus saving the bits required to encode the index of the intra prediction mode.
  • the left adjacent area and the upper adjacent area of the current block (such as the current CU) 11 constitute the template area 12 of the current block.
  • the adjacent area on the left is called the left template area (referred to as the left template), and the adjacent area above is called the upper template area or the upper template area (referred to as the upper template).
  • a template reference (reference of the template) area 13 is provided outside the template area 12 (referring to the left and upper sides). The exemplary size and position of each area are as shown in the figure. In an example, the width L1 of the left template and the height L2 of the upper template are both 4.
  • the template reference area 13 may be an adjacent row above the template area or an adjacent column to the left.
  • TIMD assumes that the distribution characteristics of the current block and the template area of the current block are consistent, uses the reconstruction value of the template reference area as the reconstruction value of the reference row, traverses all intra prediction modes in MPM and Secondary MPM to predict the template area, and obtains the prediction result. . Then calculate the sum of absolute transformed differences (SATD: Sum of absolute transformed differences) between the reconstructed value on the template area and the prediction result of each mode (predicted value on the template area), and then determine the TIMD mode of the current block.
  • the decoder derives the TIMD pattern in the same way.
  • the intra prediction mode selected for the current block is TIMD mode
  • only one flag bit is needed to indicate that the current block uses TIMD mode for prediction, and the remaining syntax elements related to intra prediction such as ISP, MPM, etc. are decoded Can be skipped, thereby significantly reducing encoding bits.
  • the TIMD mode can be determined according to the following method: Assume that mode1 and mode2 are the two angle modes used for intra prediction in MPM, and mode1 is the minimum SATD The angle mode of , its SATD is cost1; mode2 is the angle mode with the second smallest SATD, and its SATD is cost2:
  • the prediction mode that weights the prediction results of mode1 and mode2 is used as the TMID mode of the current block, also called TIMD fusion mode.
  • the two angle modes with the highest and second highest amplitude values and the prediction values of the planar mode are weighted to obtain the final prediction result when the current block uses DIMD.
  • the prediction mode at this time combines three intra-frame prediction modes: planar mode, and the two angle modes with the highest and second highest amplitude values. It is called DIMD fusion mode in the article. In the absence of the highest and second highest amplitude angular modes, predictions using DIMD are equivalent to predictions using planar mode.
  • intra prediction uses the previous row and left column closest to the current block as reference rows for prediction. If the reconstruction value of this row and column has a large error with the original pixel value, the prediction quality of the current block will also be affected. Have a great impact.
  • MRL technology is adopted in VVC. In addition to using the reference line with index 0 (Reference line0), you can also use the reference line with index 1 (Reference line1) and the reference line with index 2 (Reference line2) is used as an extended reference line for intra prediction. To reduce coding complexity, MRL is only used in non-planar mode in MPM.
  • the encoding end When the encoding end predicts the current block based on each angle mode, it must try all three reference lines and select the reference line with the smallest rate distortion cost (RD Cost).
  • the index of the finally selected reference row is encoded and sent to the decoding end.
  • the decoding end decodes to obtain the index of the reference line, and determines the reference line selected by the current block based on the index of the reference line, which is used for prediction of the current block.
  • Figure 5 shows the four reference lines of the current block, which are reference line 221 with index 0 (reference line 0), reference line 222 with index 1 (reference line1), and reference line 2 with index 2 (reference line2). 223, and reference line 3 (reference line3) 224.
  • the current block can have more reference rows, and only the reconstructed values of the reference rows can be used for prediction.
  • MRL mode can use more reference lines, and the indexes of multiple candidate reference lines are filled in a list. It is called MRL index list, MRL list, candidate reference row list or reference row index list, etc.
  • MRL index list When the current block does not use TIMD, the length of the MRL index list is 6, and the indexes of 6 reference rows can be filled in. The indexes and order of these 6 reference rows are fixed, which are 0, 1, 3, 5,7,12. The first position is filled with the index.
  • MRL the position of the reference row selected in the current block in the MRL index list is represented by encoding the MRL index.
  • the MRL indexes corresponding to indexes 0,1,3,5,7,12 in the table are 0,1,2,3,4, respectively. 5.
  • the MRL index can be encoded by a unary truncation code based on the context model. After encoding, a binary identifier based on the context model is obtained.
  • the binary identifier can also be called a binary identifier, a binary symbol, a binary bit, etc. The smaller the value of the MRL index, the shorter the code length and the faster the decoding.
  • the length of the MRL index list is 3, and the indexes of 3 reference rows can be filled in and the order between the indexes is fixed, expressed as ⁇ 0,1,3 ⁇ .
  • reference row is called a "row", this is for convenience of expression.
  • a reference row actually includes one row and one column.
  • the reconstructed value of the reference row used in prediction also includes the reconstruction of one row and one column. value, which is the same as the usual description method in the industry.
  • a technique like MPM that uses blocks around the current block to derive a list of the most likely modes is called Adaptive Intra Mode Coding (AIMC) in AV2 (AVM).
  • AIMC Adaptive Intra Mode Coding
  • FIMC Frequency-based Intra Mode Coding
  • MRL multiple reference lines for intra prediction technology
  • MRLS Multiple reference line selection for intra prediction
  • IPF Intra prediction fusion
  • IPF is the angle mode selected for the current block.
  • Two reference lines and the angle mode are used to form two reference lines and intra prediction modes.
  • Combination the current block is predicted based on the two combinations, and the two prediction results obtained are weighted and used as the final prediction result of the current block, as follows:
  • p a is the result of predicting the current block using the combination of the reference line with index a and the angle mode
  • p b is the result of predicting the current block using the reference line with index b and the angle mode
  • p fusion is the prediction result after fusion of the current block
  • w a is the weight of p a when weighting
  • w b is the weight of p b when weighting.
  • b a+1
  • w a is 3/4
  • w b is 1/4.
  • IPF defaults to turning on all the angle modes selected in the current block when the following conditions are met: the angle mode selected in the current block is not the angle mode with integer slope; the width multiplied by the height of the current block is greater than 16; the current block is not selected.
  • Intra-frame sub-block division ISP mode when the angle value of the angle mode (intraPredAngle) divides by 32 and the remainder is 0, the angle mode is an angle mode with an integer slope.
  • intraPredAngle intraPredAngle
  • IPF can also add other constraints such as mode number constraints. For example, using IPF will cause the prediction of the current block to need to fuse more than 3 intra prediction modes, or using IPF will cause the prediction of the current block to need to be fused. When using more than 2 angle modes, IPF is not allowed to be used.
  • One embodiment provides a template-based multiple reference line & intra_intra prediction mode, abbreviated as TMRL mode.
  • the TMRL mode constructs a candidate list based on a combination of extended reference lines and intra prediction modes.
  • the extended reference An intra prediction mode that encodes and decodes using a combination of row and intra prediction modes.
  • the combined encoding and decoding method of TMRL mode can reduce encoding costs and improve encoding performance.
  • the video coding method in this embodiment is applied to the encoder, as shown in Figure 6, including:
  • Step 110 Construct a candidate list of the TMRL mode of the current block.
  • the candidate list is filled with a combination of the extended reference line of the current block candidate and the intra prediction mode;
  • Step 120 Through rate-distortion optimization, the current block selects a combination of reference line and intra prediction mode for intra prediction;
  • the reference line includes the reference line with index 0 and the extended reference line.
  • the combination of the reference line selected in the current block and the intra prediction mode may be a combination of the reference line with index 0 and an intra prediction mode, or it may Is a combination of an extended reference line and an intra prediction mode.
  • Step 130 When the encoding condition of the TMRL mode of the current block is met, encode the TMRL mode flag of the current block to indicate that the current block uses the TMRL mode, and encode the TMRL mode index of the current block to indicate that the selected combination is in the candidate list. s position;
  • the encoding condition includes: the selected combination is in the candidate list (at this time, the current block selects the extended reference line), and may also include any one or more of the following: Condition 1, the current block is brightness Blocks in the frame; that is, TMRL mode is only used for luminance frames; Condition 2, the current block is not located at the upper boundary of the coding tree unit CTU; Condition 3, the sequence where the current block is located allows the use of MRL; Condition 4, the size of the current block meets the requirements Size requirements of TMRL mode; Condition 5, the aspect ratio of the current block meets the requirements for the aspect ratio of the current block using TMRL mode.
  • the TMRL pattern index can use the Columbus-Rice encoding method to more reasonably classify candidate combinations into categories with different codeword lengths for encoding and decoding, thereby improving encoding efficiency.
  • the MPM mode can be skipped, and the intra-frame sub-block division ISP mode, multi-transform selection MTS mode, low-frequency indivisible transform LFNST mode, etc.
  • the reference line and intra prediction mode selected in the current block can be simultaneously represented through the TMRL mode flag and TMRL mode index. At this time, there is no need to encode and decode MPM related syntax elements.
  • the candidate list is filled with the combination of the extended reference line of the current block candidate and the intra prediction mode, which means that the combination in the candidate list needs to participate in the rate-distortion optimization of the current block, that is, the current block is selected through the rate-distortion cost.
  • Mode selection process for block prediction modes is
  • the encoding of the TMRL mode flag and TMRL mode index of the current block is skipped; when the current block does not use TIMD but the selected combination is not in the candidate list, the encoding of the current block is skipped.
  • the TMRL mode flag of the block indicates that the TMRL mode is not used and the encoding of the TMRL mode index is skipped.
  • the TMRL mode flag and TMRL mode index provided in this embodiment can replace the original MRL index.
  • An embodiment provides a method for constructing a TMRL pattern candidate list, which can be applied to an encoder or a decoder. As shown in Figure 7, the method includes:
  • Step 210 Obtain N ⁇ M combinations of extended reference lines and intra prediction modes based on the N extended reference lines and M intra prediction modes of the current block, N ⁇ 1, M ⁇ 1, N ⁇ M ⁇ 2;
  • Step 220 Predict the template area of the current block according to the N ⁇ M combinations, and calculate the error between the reconstructed value of the template area and the predicted value;
  • the error in this step can also be expressed in terms of the sum of squared differences (SSD: Sum of Squared Difference) and mean absolute difference (MAD: Mean Absolute Difference). ), mean squared error (MSE: Mean Squared Error), etc.
  • Step 230 Fill in the K combinations corresponding to the errors into the candidate list of the TMRL mode of the current block in order of the errors from small to large, 1 ⁇ K ⁇ N ⁇ M.
  • the candidate list created in this embodiment can implement combined coding of extended reference lines and intra prediction modes, thereby improving coding efficiency. Placing combinations with a high probability of being selected at the front of the candidate list can make the TMRL pattern index of the selected combination smaller during encoding, reducing encoding costs.
  • the template area of the current block can be set on one or more reference lines closest to the current block.
  • the N extended reference lines participating in the combination are extended reference lines located outside the template area and not exceeding the CTU boundary.
  • all extended reference rows that do not exceed the CTU boundary are selected from the predefined extended reference rows with indexes ⁇ 1, 3, 5, 7, 12 ⁇ , N ⁇ 5 .
  • the template area of the current block is set on the reference line with index 0 (that is, the reference line with index 0 is called the reference line where the template area is located), and other reference lines are called reference lines located outside the template area.
  • Figure 8A shows five extended reference rows participating in the combination: reference row 31 with index 1, reference row 33 with index 3, reference row 35 with index 5, reference row 37 with index 7, and reference row 37 with index 12 Reference line 39.
  • the template area 40 of the current block is set on two reference lines with indexes 0 and 1, and the extended reference lines participating in the combination are the reference line 42 with index 2 and the reference line 42 with index 3. All extended reference rows that do not exceed the CTU boundary among the reference row 43, the reference row 45 with index 5, the reference row 47 with index 7, and the reference row 49 with index 12.
  • the M intra prediction modes participating in the combination are only allowed to be selected from the angle mode, or are only allowed to be selected from the angle mode and the DC mode, or are allowed to be selected from the angle mode, the DC mode and the Planar mode. Select from mode. It can be selected from the MPM, or the intra prediction mode selected by the MPM and the second MPM, or it can be selected step by step according to predetermined rules.
  • One embodiment provides a video decoding method related to TMRL mode, which is applied to the decoder. As shown in Figure 9, the method includes: ⁇
  • Step 310 decode the multi-reference line intra prediction TMRL mode flag of the current block and determine whether the current block uses the TMRL mode;
  • Step 320 If it is determined that the current block uses the TMRL mode, continue to decode the TMRL mode index of the current block, and construct a candidate list of the TMRL mode of the current block.
  • the candidate list is filled with the extended reference lines and frames of the current block candidates.
  • Step 330 Determine the combination of the extended reference line and the intra prediction mode selected in the current block according to the candidate list and the TMRL mode index, and predict the current frame according to the selected combination; wherein the TMRL mode index is used to represent the selected The position of the combination of the selected extended reference line and the intra prediction mode in the candidate list.
  • the TMRL mode index can be used to simultaneously indicate the extended reference line and the intra prediction mode selected in the current block, and there is no need to use two indexes to complete. Can reduce encoding cost.
  • the decoding of syntax elements related to MPM mode, ISP mode, MTS mode, and LFNST mode can be skipped.
  • the video decoding method in this example includes:
  • Step 1 The decoder decodes syntax elements related to TMRL mode. This example includes relevant syntax elements of TIMD, MRL and other modes.
  • "cu_tmrl_flag” in the table is the TMRL mode flag. When equal to 1, it means that the current block uses TMRL mode, which means that the intra prediction type of the current brightness sample is defined as TMRL mode; when “cu_tmrl_flag” is equal to 0, it means that the current block does not use TMRL mode. That is, it is defined that the intra prediction mode type of the current brightness sample is not the TMRL mode.
  • "tmrl_idx” in the table is the TMRL mode index, which indicates the position of the combination of the extended reference line and intra prediction mode selected in the current block in the candidate list of the TMRL mode. It can also be said to define the sorting of the selected combination in the TMRL mode. The index in the candidate list (the index indicating the position of the combination).
  • the TMRL model can be regarded as the evolution of the MRL model or an integral part of the MRL model.
  • the decoding method of MRL mode syntax elements remains unchanged. If the current block does not use TIMD mode, it is necessary to decode the syntax elements of TMRL mode.
  • the current block is allowed to use MRL (that is, whether sps_mrl_enabled_flag is 1 is true), the current block is not located at the upper boundary of the CTU (that is, whether (y0%CtbSizeY)>0 is true), and The current block does not use TIMD. When these conditions are met, decode cu_tmrl_flag. If the other two conditions are true and the current block uses TIMD, decode the multi-reference row index intra_luma_ref_idx of the current block.
  • Step 2 If the current block uses the TMRL mode, a candidate list of the TMRL mode needs to be constructed.
  • the construction of the candidate list of the TMRL mode is an operation that both the encoder and the decoder need to perform.
  • In the first step non-overlapping intra prediction modes are selected sequentially from the intra prediction modes used by the prediction blocks in the 5 adjacent positions around the current block, as shown in Figure 3 Show.
  • the second step perform an expansion operation on the angle patterns selected in the first step, and add 1 and subtract 1 to each angle pattern in sequence; select non-repeating angle patterns obtained by the expansion until the number of selected patterns is 6. End. If 6 intra prediction modes have not been selected after the expansion operation, or the angle mode has not been selected in the first step, proceed to the third step: select non-repeating modes from the predefined mode set until the selected mode is selected. Quantity is 6.
  • Step 3 Determine the combination of the selected extended reference line and intra prediction mode of the current block based on the constructed TMRL mode candidate list and the decoded TMRL mode index, and perform intra prediction on the current block based on the selected combination.
  • the index refIdx and the intra prediction mode represented by the variable predModeIntra
  • the reference line selected by the current block in this case, the extended reference line
  • TMRL mode can save codewords. But template-based techniques usually increase the complexity of the decoder. And using TMRL mode means that the codec needs to support this complex calculation, and not all codecs can support it. To this end, high-level syntax elements can be used to indicate whether to use TMRL mode, making the video encoding and decoding mode selection more flexible and better adaptable.
  • the high-level syntax elements in this article refer to sequence-level, image-level, slice-level syntax elements that have a constraint effect on block-level intra prediction syntax elements.
  • An embodiment of the present disclosure provides a video decoding method that controls the use of TMRL mode through high-level syntax.
  • the video decoding method in this embodiment includes:
  • Step 410 Determine the value of the TMRL allowed use flag through decoding; as the name indicates, the TMRL allowed use flag is used to indicate whether the TMRL mode is allowed to be used;
  • the value of the TMRL allowed use flag is determined by decoding, either by decoding the TMRL allowed use flag itself to determine the value of the TMRL allowed use flag, or by decoding other syntax elements related to TMRL to determine the value of the TMRL allowed use flag. , or by decoding other syntax elements related to TMRL and the TMRL allowed flag to determine the value of the TMRL allowed flag.
  • Step 420 When decoding the current block, if the value of the TMRL allowable flag indicates that the use of TMRL mode is allowed, the TMRL mode syntax element of the current block is allowed to be decoded; if the value of the TMRL allowable flag indicates that the use of TMRL mode is not allowed, , skips decoding of the TMRL pattern syntax elements of the current block.
  • a value of 0 means that the corresponding mode is not allowed to be used, and a value of 1 means that the corresponding mode is allowed to be used.
  • the present disclosure is not limited to this. It is also possible to use 1 to indicate that the use mode is not allowed and 0 to indicate that the use mode is allowed.
  • This embodiment sets the TMRL permission flag to indicate whether the TMRL mode is allowed to be used, thereby increasing the flexibility and adaptability of the TMRL mode. According to the value of the TMRL permission flag, correct decoding of the TMRL mode syntax elements of the current block can be achieved.
  • the TMRL permission flag is a sequence-level identifier, but in other embodiments, the TMRL permission flag may also be an image-level or slice-level identifier.
  • the TMRL allowed flag can be decoded independently and does not depend on other flags. At this time, by decoding the TMRL use permission flag, the value of the TMRL use permission flag is obtained.
  • sps_mrl_enabled_flag is used to represent the sequence-level MRL allowed flag.
  • Sequence parameter set original byte sequence layer syntax (Sequence parameter set RBSP syntax)
  • sps_mrl_enabled_flag is 0, indicating that the use of MRL is not allowed
  • sps_mrl_enabled_flag is 1, indicating that the use of MRL is allowed.
  • sequence-level TMRL permission flag sps_tmrl_enabled_flag is added without dependencies to control whether the TMRL mode is allowed to be used.
  • the relevant syntax is as shown in the following table:
  • TMRL allows the use of the flag sps_tmrl_enabled_flag and MRL allows the use of the flag sps_mrl_enabled_flag for independent decoding, and there is no dependency.
  • the TMRL mode uses an extended reference line, and the reference line with index 0 is usually used when making mode selection for intra prediction, thus allowing intra prediction of the current block when using the TMRL mode. Will involve the use of multiple reference lines.
  • the decoding of TMRL allowed flags can depend on the MRL allowed flags. Determining the value of the TMRL allowed use flag through decoding at this time includes: decoding the MRL allowed use flag to obtain the value of the MRL allowed use flag: when the value of the MRL allowed use flag indicates that the use of MRL is not allowed, skip the TMRL Decoding of the allowed use flag.
  • the default value of the TMRL allowed use flag is the value indicating that the use of TMRL mode is not allowed.
  • the TMRL allowed use flag indicates that the use of MRL is allowed, the TMRL allowed use flag is decoded to obtain the value of the TMRL allowed use flag. value.
  • This embodiment adds a sequence-level TMRL allowed flag in the form of a dependency relationship to control whether the TMRL mode is allowed to be used.
  • the relevant syntax is as shown in the following table:
  • TMRL allows the use of identifiers marked as sequence level
  • MRL allows the use of identifiers marked as sequence level
  • the TMRL usage permission flag may be an image-level identifier
  • the MRL usage permission flag may be a sequence-level or image-level identifier.
  • TMRL allows the use of identifiers marked as slice level
  • MRL allows the use of identifiers marked as sequence level or image level or slice level.
  • template-based encoding and decoding tools in ECM, such as DIMD, TIMD, and TMRL, all of which use templates as prediction tools. It is also possible to have a unified identity to control all template-based technologies.
  • an embodiment of the present disclosure introduces a sequence-level identifier: a template use allowed flag, represented by sps_tm_enabled_flag in an example.
  • the template use permission flag is used to indicate whether the use of templates is allowed, that is, whether the use of template-based encoding and decoding tools is allowed.
  • template-based encoding and decoding tools such as DIMD, TIMD, and TMRL cannot be used.
  • the decoding of the TMRL permission flag depends on the template permission flag. Determining the value of the TMRL allowed use flag through decoding includes: decoding the template allowed use flag to obtain the value of the template allowed use flag; when the value of the template allowed use flag indicates that the template is not allowed to be used, skipping the TMRL allowed use flag Decoding of the flag, the default value of the TMRL allowed use flag is the value indicating that the use of TMRL mode is not allowed; in the case where the template allowed use flag indicates that the template is allowed to be used, decode the TMRL allowed use flag to obtain the value of the TMRL allowed use flag.
  • This embodiment adds a sequence-level TMRL allowed flag in the form of a dependency relationship to control whether the TMRL mode is allowed to be used.
  • the relevant syntax is as shown in the following table:
  • the TMRL allows the use of identifiers marked as sequence level, and the template allows the use of identifiers marked as sequence level.
  • TMRL allows the use of identifiers marked as image level, and the template allows the use of identifiers marked as either sequence level or image level.
  • TMRL allows the use of identifiers marked as slice level, and the template allows the use of identifiers marked as sequence level or image level or slice level. In these embodiments, when the TMRL permission flag and the template permission flag are identifiers of the same level, the decoding order of the template permission flag is before the TMRL permission flag.
  • the decoding of the TMRL permission flag depends on the MRL permission flag and the template permission flag.
  • Determining the value of the TMRL allowed use flag through decoding includes: decoding the MRL allowed use flag and the template allowed use flag to obtain the value of the MRL allowed use flag and the value of the template allowed use flag; the value of the MRL allowed use flag indicates that the use is allowed MRL, and the value of the template allowed use flag indicates that the template is allowed to be used, then decode the TMRL allowed use flag to obtain the value of the TMRL allowed use flag; when the value of the MRL allowed use flag indicates that the use of MRL is not allowed, or the template allowed use flag If the value indicates that the template is not allowed to be used, skip the decoding of the TMRL allowed use flag.
  • the default value of the TMRL allowed use flag is the value that indicates that the TMRL mode is not allowed to be used.
  • sps_tm_enabled_flag and MRL allowed use flag sps_mrl_enabled_flag are both 1, that is, when the template and MRL are allowed to be used, then decode the TMRL allowed use flag sps_tmrl_enabled_flag to determine the value of sps_tmrl_enabled_flag.
  • TMRL allows the use of identifiers marked as sequence level
  • MRL allows the use of identifiers
  • templates allows the use of identifiers marked as sequence level.
  • TMRL allows the use of flags that are image-level identifiers
  • MRL allows the use of flags
  • the template allows the use of flags that can be sequence-level or image-level identifiers.
  • TMRL allows the use of identifiers whose flags are slice-level
  • MRL allows the use of flags
  • the template allows the use of identifiers whose flags may be sequence-level or image-level or slice-level.
  • GCI General Constraints Information
  • GCI includes a series of identification bits, which are used to limit whether some sequence-level identifiers exist in the code stream. In an example, when a certain identification bit of GCI is greater than 0 (for example, 1), it means that the sequence-level identifier corresponding to the identification bit in the code stream is restricted and does not need to be decoded.
  • the sequence-level identifier is, for example, The identifier of a certain encoding and decoding tool (such as MRL, TMRL, DIMD, TIMD, etc.). If the identification bit is equal to 0, it means that no restrictions are imposed on the sequence-level identifier corresponding to the identification bit in the code stream.
  • the sequence-level identifier needs to be The identifier is decoded.
  • whether the TMRL mode is restricted is indicated by a flag bit set in the GCI.
  • the TMRL allowed use flag is a sequence-level identifier. Determining the value of the TMRL allowed use flag through decoding includes: decoding the GCI, and based on the value of the flag bit in the GCI used to indicate whether the TMRL mode is restricted, Determine whether the TMRL mode is restricted; in the case where the TMRL mode is restricted, skip the decoding of the TMRL allowed use flag, and determine that the value of the TMRL allowed use flag is a value indicating that the TMRL mode is not allowed to be used; in the case where the TMRL mode is not restricted In this case, continue decoding the sequence-level identifier to determine the value of the TMRL allowed flag.
  • This embodiment introduces the sequence-level TMRL allowed use flag sps_tmrl_enabled_flag, and when the decoding of sps_tmrl_enabled_flag does not depend on the value of the sequence-level MRL allowed use flag sps_mrl_enabled_flag, the GCI can be adjusted accordingly, and a flag bit is added to indicate whether the TMRL mode is affected by restrictions, as shown in the following syntax table:
  • this embodiment adds a gci_no_tmrl_constraint_flag to indicate whether to limit the TMRL mode, that is, whether to limit the value of the TMRL allowed use flag sps_tmrl_enabled_flag.
  • gci_no_tmrl_constraint_flag 1
  • sps_tmrl_enabled_flag 0
  • TMRL mode is not allowed.
  • gci_no_tmrl_constraint_flag When gci_no_tmrl_constraint_flag is 0, it means that no limit is imposed on the value of sps_tmrl_enabled_flag, and the relevant sequence-level identifier needs to be decoded to determine the value of sps_tmrl_enabled_flag.
  • the gci_no_mrl_constraint_flag in the above table is used to indicate whether the MRL mode is restricted, that is, whether the value of the MRL allowed flag sps_mrl_enabled_flag is restricted.
  • gci_no_mrl_constraint_flag 1
  • the value of sps_mrl_enabled_flag defaults to 0.
  • gci_no_mrl_constraint_flag it means that no limit is imposed on the value of sps_mrl_enabled_flag.
  • the value of sps_mrl_enabled_flag can be determined by decoding.
  • a flag bit set in the GCI indicates whether the MRL mode is restricted, and when the MRL mode is restricted, the TMRL mode is also restricted.
  • the TMRL allowed use flag is a sequence-level identifier. Determining the value of the TMRL allowed use flag through decoding includes: decoding the GCI, and determining according to the value of the flag bit in the GCI used to indicate whether the MRL is restricted.
  • the MRL mode is restricted; in the case where the MRL mode is restricted, skip the decoding of the TMRL allowed use flag and determine the value of the TMRL allowed use flag to be the value indicating that the TMRL mode is not allowed to be used; in the case where the MRL mode is not restricted Next, continue decoding the sequence-level identifier to determine the value of the TMRL allowed flag.
  • the decoding of the TMRL allowed use flag sps_tmrl_enabled_flag depends on the value of the MRL allowed use flag sps_mrl_enabled_flag
  • gci_no_mrl_constraints_flag When gci_no_mrl_constraints_flag is 1, the default sps_tmrl_enabled_flag is 0, and there is no need to decode sps_tmrl_enabled_flag. When gci_no_mrl_constraints_flag is 0, the value of sps_tmrl_enabled_flag is determined by decoding the relevant sequence-level identifier.
  • a flag bit set in the GCI indicates whether template use is restricted.
  • template-based tools including TMRL mode
  • the TMRL allowed use flag is a sequence-level identifier.
  • Determining the value of the TMRL allowed use flag through decoding includes: decoding the GCI, and based on the value of the flag bit in the GCI used to indicate whether template use is restricted, Determine whether the use of the template is restricted; in the case where the use of the template is restricted, skip the decoding of the TMRL allowed use flag and determine that the value of the TMRL allowed use flag is a value indicating that the use of the TMRL mode is not allowed; in the case where the use of the template is not restricted In this case, continue decoding the sequence-level identifier to determine the value of the TMRL allowed flag.
  • gci_no_tm_constraints_flag is used to simultaneously determine whether template usage and TMRL mode are restricted, as shown in the following syntax table:
  • a flag bit gci_no_tm_constraints_flag is set in GCI to indicate whether the MRL mode is restricted.
  • gci_no_tm_constraints_flag 1
  • the default sps_tmrl_enabled_flag is 0, and there is no need to decode sps_tmrl_enabled_flag.
  • gci_no_tm_constraints_flag the value of sps_tmrl_enabled_flag needs to be determined by decoding the relevant sequence-level identifier.
  • two flag bits set in the GCI respectively indicate whether the MRL mode is restricted and whether template use is restricted.
  • TMRL mode is also restricted.
  • the TMRL allowed use flag is a sequence-level identifier.
  • Determining the value of the TMRL allowed use flag through decoding includes: decoding the GCI, and based on the value of the flag bit in the GCI used to indicate whether the MRL mode is restricted, Determine whether the MRL mode is restricted, and determine whether the template use is restricted based on the value of the flag bit in the GCI used to indicate whether the template use is restricted; in the case where the MRL mode is restricted or the template use is restricted, skip the TMRL Decoding of the allowed use flag determines that the value of the TMRL allowed use flag is a value indicating that the use of the TMRL mode is not allowed; in the case where neither the MRL mode nor the use of templates is restricted, continue to decode the sequence-level identifier to determine the TMRL allowed use flag. value.
  • the sequence-level identifier when continuing to decode the sequence-level identifier to determine the value of the TMRL allowed use flag, it can be decoded independently according to the TMRL allowed use flag in the foregoing embodiment, or it can rely on the MRL allowed use flag and/or the template allowed use flag. decoding method to decode.
  • the TMRL of the above embodiment allows the use of identifiers marked as sequence level.
  • the corresponding flag bit can also be set in the GCI to indicate whether to limit the TMRL mode (that is, whether there is an image level or slice level in the code stream).
  • Level TMRL allows the use of flags). If the corresponding flag bit indicates that the TMRL mode is restricted, determine that the value of the TMRL permission flag is a value indicating that the TMRL mode is not allowed, and skip decoding the TMRL permission flag.
  • the sequence level and image level identifiers can be continued to be decoded to determine the value of the TMRL allowed use flag; when the TMRL allows use flag is
  • the sequence-level, image-level, and slice-level identifiers may be continued to be decoded to determine the value of the TMRL allowed flag.
  • the TMRL permission flag is used, combined with whether the current block uses the TIMD mode, to control decoding switching between the traditional MRL mode and the evolved TMRL mode.
  • Whether the current block uses TIMD mode can be determined by decoding the TIMD mode flag (intra_timd_flag).
  • the method also includes: determining whether the current block uses the TIMD mode; in the case where the current block uses the TIMD mode, decoding the MRL index of the current block and skipping the decoding of the TMRL mode syntax element of the current block; and not using the TIMD in the current block. In the case of mode, decode the TMRL mode syntax element of the current block and skip decoding the MRL index of the current block.
  • decoding the TMRL mode syntax element of the current block includes: decoding the TMRL mode flag of the current block to obtain the value of the TMRL mode flag.
  • the TMRL mode flag is used to indicate whether the current block uses the TMRL mode. ; Determine whether the current block uses TMRL mode based on the value of the TMRL mode flag: if the TMRL mode is determined to be used, decode the TMRL mode index of the current block; if the TMRL mode is not used, skip the TMRL mode index of the current block decoding.
  • this embodiment After decoding the TMRL mode index of the current block, this embodiment also includes: constructing a candidate list of the TMRL mode of the current block; determining a combination of the extended reference line and intra prediction mode selected in the current block according to the TMRL mode index and the candidate list; and , predict the current block according to the selected combination, and obtain the predicted value of the current block.
  • Whether to decode cu_tmrl_flag can also depend on other things that cannot be used in combination with TMRL mode Mode is not used.
  • MRL mode is allowed (sps_mrl_enabled_flag is 1)
  • the current block is not at the upper edge of the CTU (((y0%CtbSizeY)>0) is established, and the current block uses TIMD mode (intra_timd_flag is 0) and is not allowed to be used
  • TIMD mode intra_timd_flag is 0
  • intra_luma_ref_idx is decoded.
  • the combination of the extended reference line and the intra prediction mode may be the original combination of the extended reference line and the intra prediction mode, or it may be a corresponding fusion combination obtained by performing IPF on the original combination including the predetermined angle mode.
  • the fusion combination corresponding to the original combination refers to a combination of the extended reference line and the predetermined angle pattern, and another reference line and the predetermined angle pattern.
  • the current block is predicted based on the extended reference line and the predetermined angle pattern to obtain the first prediction result, and the current block is predicted based on another reference line and the predetermined angle pattern to obtain the third prediction result.
  • the weighted sum of the first prediction result and the second prediction result is used as the prediction value of the current block.
  • the above-mentioned predetermined angle mode may include all angle modes, or include part of the angle mode, for example, include other angle modes except the angle mode with integer slope, or include angles except -45°, 0°, 45°, 90°, 135
  • Another reference line in the fusion combination may be an adjacent line corresponding to the extended reference line in the original combination (it may be an inner adjacent line or an outer adjacent line), or a reference line with an index of 0.
  • the corresponding fusion combination includes the index The combination of the reference line with index 1 and the angle pattern and the combination of the reference line with index 2 (or index 0) with the angle pattern.
  • the reference row with index 1 and the prediction result of the angle mode are weighted, and the reference row with index 2 (or index 0) and the prediction result of the angle mode are weighted to obtain the current block.
  • the predicted value of the block is weighted.
  • the candidate list for constructing the TMRL mode of the current block includes:
  • N extended reference lines and M intra prediction modes of the current block N ⁇ M original combinations of extended reference lines and intra prediction modes are obtained;
  • K combinations corresponding to the errors are filled in the candidate list of the TMRL mode of the current block, K, N, M are positive integers, 1 ⁇ K ⁇ N ⁇ M.
  • the construction of the candidate list of the TMRL mode of the current block includes:
  • N extended reference lines and M intra prediction modes of the current block N ⁇ M original combinations of extended reference lines and intra prediction modes are obtained;
  • K, N, M are positive integers, 1 ⁇ K ⁇ N ⁇ M.
  • the template area of the current block is predicted based on the fusion combination corresponding to the original combination, and the error between the reconstructed value of the template area and the predicted value is calculated. If the error corresponding to the original combination is greater than the error corresponding to the fusion combination, it is determined that fusion is required; if the error corresponding to the original combination is less than or equal to the error corresponding to the fusion combination, it is determined that fusion is not required.
  • the candidate list for constructing the TMRL mode of the current block includes:
  • N extended reference lines and M intra prediction modes of the current block N ⁇ M original combinations of extended reference lines and intra prediction modes are obtained;
  • the fusion processing includes: for each original combination including a predetermined angle pattern among the N ⁇ M original combinations, when the set conditions are met, the original The combination is replaced by the corresponding fusion combination obtained by performing IPF on the original combination;
  • K combinations corresponding to the errors are filled in the candidate list of the TMRL mode of the current block;
  • K, N, M are positive integers, 1 ⁇ K ⁇ N ⁇ M.
  • the setting conditions include any one or more of the following conditions: the size of the current block is greater than NxM, and N and M are positive integers; the intra prediction mode selected for the current block is not an angle mode with an integer slope.
  • the conditions that can be set in this example are not limited to this.
  • the above three examples of this embodiment provide three ways of combining IPF in constructing the candidate list of TMRL, and the IPF method can be used to improve the coding efficiency of the TMRL mode.
  • the weighted sum of the first prediction result and the second prediction result is used as the prediction value of the current block; where the first prediction result is based on the extended reference in the original combination corresponding to the fusion combination
  • the second prediction result is the result of predicting the current block based on another reference row and the predetermined angle pattern in the original combination corresponding to the fusion combination.
  • the other reference row may be adjacent to the extended reference row in the original combination corresponding to the fusion combination, or may be a reference row with an index of 0.
  • the weighted sum of the first prediction result and the second prediction result can be calculated according to the following formula:
  • p a is the first prediction result
  • p b is the second prediction result
  • p fusion is the final prediction result of the current block
  • w a is the weight of p a
  • w b is the weight of p b ;
  • the formula uses a right shift operation to restore the size of the predicted value. ">>” in the formula is a right shift symbol, " ⁇ " is a left shift symbol, and the right side of the symbol is the number of digits to be shifted right or left.
  • An embodiment of the present disclosure also provides a video encoding method, applied to an encoder, as shown in Figure 11, including:
  • Step 510 determine the value of the TMRL allowed use flag
  • Step 520 when encoding the current block: when the value of the TMRL allowable flag indicates that the use of the TMRL mode is allowed, encoding of the TMRL mode syntax element of the current block is allowed; when the value of the TMRL allowable flag indicates that the use of the TMRL mode is not allowed, , skips encoding of the TMRL pattern syntax elements of the current block.
  • This embodiment uses the value of the TMRL allowed flag to control the use of the TMRL mode and the encoding of syntax elements, which can improve the flexibility and adaptability of the use of the TMRL mode.
  • the TMRL mode can be allowed. Set the value of the use flag to 0, which means that the use of TMRL mode is not allowed. If the hardware supports TMRL mode, set the value of the TMRL permission flag to 1, which means that the use of TMRL mode is allowed.
  • the TMRL permission flag is a sequence-level identifier. In other embodiments, the TMRL permission flag may be an image-level or slice-level identifier.
  • the TMRL allowed use flag can be encoded independently and does not depend on other flags.
  • the value of the TMRL permission flag can be determined based on the configuration information or set conditions, and the TMRL permission flag can be encoded.
  • the above configuration information can be recorded in the configuration file.
  • the above setting conditions may be conditions set in addition to other flags, such as image size, image quality requirements, transmission bandwidth, available computing resources, etc.
  • the TMRL allowed use flag is a 1-bit identifier with a value of 0 or 1. The value of the TMRL allowed use flag can be directly written into the code stream during encoding.
  • the encoding of the TMRL permission flag depends on the MRL permission flag.
  • Determining the value of the TMRL allowed use flag includes: determining the value of the MRL allowed use flag; when the value of the MRL allowed use flag indicates that the use of MRL is not allowed, skip encoding the TMRL allowed use flag and default to TMRL allowed use.
  • the value of the flag is a value indicating that the use of TMRL mode is not allowed; when the MRL allowed use flag indicates that the use of MRL is allowed, the value of the TMRL allowed use flag is determined based on the configuration information or set conditions, and the TMRL allowed use flag is encoded.
  • the value of the MRL use permission flag may be determined based on configuration information or setting conditions.
  • TMRL allows the use of identifiers marked as sequence level
  • MRL allows the use of identifiers marked as sequence level
  • TMRL allows the use of identifiers marked as image level
  • MRL allows the use of identifiers marked as either sequence level or image level
  • TMRL allows the use of identifiers marked as slice level
  • MRL allows the use of identifiers marked as sequence level or image level or slice level.
  • the encoding of the TMRL permission flag depends on the template permission flag.
  • Determining the value of the TMRL allowed use flag includes: determining the value of the template allowed use flag; when the value of the template allowed use flag indicates that the template is not allowed to be used, skip encoding the TMRL allowed use flag and default to TMRL allowed use.
  • the value of the flag is a value indicating that the use of the TMRL mode is not allowed; when the template allowed use flag indicates that the template is allowed to be used, the value of the TMRL allowed use flag is determined based on the configuration information or set conditions, and the TMRL allowed use flag is encoded.
  • the value of the template allowed flag can be determined based on configuration information or set conditions.
  • the TMRL allows the use of identifiers marked as sequence level, and the template allows the use of identifiers marked as sequence level.
  • TMRL allows the use of identifiers marked as image-level identifiers, and the template allows the use of identifiers marked as sequence-level or image-level.
  • TMRL allows the use of identifiers marked as slice level, and the template allows the use of identifiers marked as sequence level or image level or slice level.
  • the encoding of the TMRL allowed use flag depends on the template allowed use flag and the template allowed use flag. Determining the value of the TMRL allowed use flag includes: determining the value of the MRL allowed use flag and the template allowed use flag; the value of the MRL allowed use flag indicates that the MRL is allowed to be used, and the value of the template allowed use flag indicates that the template is allowed to be used. In this case, the value of the TMRL allowed use flag is determined based on the configuration information or set conditions, and the TMRL allowed use flag is encoded; the value of the MRL allowed use flag indicates that the use of MRL is not allowed, or the value of the template allowed use flag indicates that the use is not allowed. In the case of a template, the encoding of the TMRL allowed flag is skipped, and the default value of the TMRL allowed flag is the value indicating that the TMRL mode is not allowed.
  • TMRL allows the use of identifiers marked as sequence level
  • MRL allows the use of identifiers
  • templates allows the use of identifiers marked as sequence level.
  • TMRL allows the use of flags that are image-level identifiers
  • MRL allows the use of flags
  • the template allows the use of flags that can be sequence-level or image-level identifiers.
  • TMRL allows the use of identifiers whose flags are slice-level
  • MRL allows the use of flags
  • the template allows the use of identifiers whose flags may be sequence-level or image-level or slice-level.
  • the encoding sequence of the MRL allowed use flag and the template allowed use flag is located before the TMRL allowed use flag.
  • the use of the TMRL mode can be restricted by the flag bit set in the GCI.
  • the value of the flag bit indicates restricting the MRL mode, there is no need to encode the TMRL permission flag. .
  • a flag bit is set in the GCI to indicate whether the TMRL mode is restricted. Whether the TMRL mode is restricted does not depend on other flag bits in the GCI.
  • the TMRL allowed use flag is a sequence-level identifier. Determining the value of the TMRL allowed use flag includes: determining whether the TMRL mode is restricted based on the value of the flag bit in the GCI used to indicate whether the TMRL mode is restricted.
  • a flag bit is set in the GCI to indicate whether the MRL mode is restricted, and when the MRL mode is restricted, the TMRL mode is also restricted.
  • the TMRL allowed use flag is a sequence-level identifier. Determining the value of the TMRL allowed use flag includes: determining whether the MRL mode is restricted based on the value of the flag bit in the GCI used to indicate whether the MRL is restricted.
  • a flag bit is set in the GCI to indicate whether template use is restricted, and when the MRL mode is restricted or the template use is restricted, the TMRL mode is also restricted.
  • the TMRL allowed use flag is a sequence-level identifier. Determining the value of the TMRL allowed use flag includes: determining whether the use of the template is restricted based on the value of the flag bit in the GCI used to indicate whether the use of the template is restricted.
  • two flag bits are set in the GCI to respectively indicate whether the MRL mode is restricted and whether the template use is restricted.
  • the TMRL mode is also restricted.
  • the TMRL allowed use flag is a sequence-level identifier. Determining the value of the TMRL allowed use flag includes: determining whether the MRL mode is restricted based on the value of the flag bit in the GCI used to indicate whether the MRL mode is restricted.
  • Restriction and determine whether the use of the template is restricted based on the value of the flag bit in the GCI used to indicate whether the use of the template is restricted; in the case where the MRL mode is restricted or the use of the template is restricted, skip encoding the TMRL allowed use flag , determine the value of the TMRL allowed use flag to be the value indicating that the TMRL mode is not allowed to be used; when the MRL mode is not restricted and the template use is not restricted, continue to encode the sequence-level identifier to determine the value of the TMRL allowed use flag.
  • the independent encoding method of the TMRL allowed use flag in the previous embodiment can be used to determine the value of the TMRL allowed use flag according to the configuration information or setting conditions. value; or use the encoding method of the TMRL allowed use flag to depend on the MRL allowed use flag and/or the template allowed use flag to determine the value of the TMRL allowed use flag.
  • TMRL allows the use of identifiers marked as sequence level.
  • the corresponding flag bit can also be set in the GCI to indicate whether to limit the TMRL mode (that is, whether there is an image level or slice level in the code stream).
  • Level TMRL allows the use of flags). If the corresponding flag bit indicates that the TMRL mode is restricted, determine that the value of the TMRL allowed use flag is the value indicating that the TMRL mode is not allowed to be used, and skip encoding the TMRL allowed use flag.
  • the TMRL allows the use of image-level identifiers
  • slice-level identifiers you can continue to encode sequence-level, image-level, and slice-level identifiers to determine the value of the TMRL allowed flag.
  • the TMRL permission flag is used, combined with whether the current block uses the TIMD mode, to control the encoding switching between the traditional MRL mode and the evolved TMRL mode. Whether the current block uses TIMD mode can be determined by the value of the TIMD mode flag (intra_timd_flag). In this embodiment, if the value of the TMRL permission flag indicates that the TMRL mode is allowed to be used, the method further includes: determining whether the current block uses the TIMD mode; if the current block uses the TIMD mode, encoding the MRL of the current block. Index, skip encoding the TMRL mode syntax element of the current block; when the current block does not use TIMD mode, encode the TMRL mode syntax element of the current block, skip encoding the MRL index of the current block.
  • encoding the TMRL mode syntax element of the current block includes: constructing a candidate list of the TMRL mode of the current block; selecting a reference line and intra prediction for the current block through rate-distortion optimization A combination of modes; and, when the encoding condition of the TMRL mode of the current block is met, encoding the TMRL mode flag of the current block to indicate that the current block uses the TMRL mode, encoding the TMRL mode index of the current block to indicate that the selected combination is in the The position in the candidate list; wherein the encoding condition at least includes: the selected combination is in the candidate list (at this time, the selected reference row is an extended reference row).
  • the encoding conditions also include any one or more of the following: the current block is a block in the luma frame; the current block is not located at the upper boundary of the coding tree unit CTU; the current block is allowed to use multiple reference lines MRL; the current block allows the use of templates; the size of the current block meets the size requirements for the current block using TMRL mode; the aspect ratio of the current block meets the aspect ratio requirements for the current block using TMRL mode.
  • IPF when constructing the candidate list of TMRL, IPF can be performed on the original combination of the extended reference line and the angle pattern to obtain the corresponding fusion combination, and the fusion combination is filled in the candidate list.
  • the above-mentioned combination of the reference line and the intra prediction mode can be a combination of the reference line with index 0 and the intra prediction mode, an extended original combination of the reference line and the intra prediction mode, or an expansion obtained by performing IPF on the original combination. Fusion combination of reference line and intra prediction modes.
  • the method of filling the candidate list with the fusion combination can be any method of using IPF to construct the candidate list of the TMRL mode of the current block in the previous embodiment, which will not be described again here.
  • An embodiment of the present disclosure also provides a code stream, wherein the code stream is generated by the video encoding method described in any embodiment of the present disclosure.
  • An embodiment of the present disclosure also provides a video decoding device. As shown in Figure 12, it includes a processor 71 and a memory 73 storing a computer program. When the processor 71 executes the computer program, it can implement any of the tasks herein.
  • a video decoding method according to an embodiment.
  • An embodiment of the present disclosure also provides a video encoding device, including a processor and a memory storing a computer program.
  • a processor executes the computer program, it can implement the video encoding described in any embodiment of the present disclosure. method.
  • An embodiment of the present disclosure also provides a video encoding and decoding system, which includes the video encoding device described in any embodiment of the present disclosure and the video decoding device described in any embodiment of the present disclosure.
  • An embodiment of the present disclosure also provides a non-transitory computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, wherein the computer program implements any embodiment of the present disclosure when executed by a processor.
  • the processor in the above embodiments of the present disclosure may be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP for short), a microprocessor, etc., or it may be other conventional processors, etc.;
  • the processor may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), a discrete logic or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, or other equivalent integrated or discrete logic circuits, or a combination of the above devices.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • the processor in the above embodiments can be any processing device or device combination that implements the methods, steps and logical block diagrams disclosed in the embodiments of the present invention. If embodiments of the present disclosure are implemented in part in software, instructions for the software may be stored in a suitable non-volatile computer-readable storage medium and may be executed in hardware using one or more processors. Instructions are provided to perform the methods of embodiments of the present disclosure.
  • the term "processor” as used herein may refer to the structure described above or any other structure suitable for implementing the techniques described herein.
  • Computer-readable media may include computer-readable storage media that corresponds to tangible media, such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another, such as according to a communications protocol.
  • Computer-readable media generally may correspond to non-transitory, tangible computer-readable storage media or communication media such as a signal or carrier wave.
  • Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and/or data structures for implementing the techniques described in this disclosure.
  • a computer program product may include computer-readable media.
  • Such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory or may be used to store instructions or data. Any other medium that stores the desired program code in the form of a structure and that can be accessed by a computer.
  • any connection is also termed a computer-readable medium if, for example, a connection is sent from a website, server, or using any of the following: coaxial cable, fiber-optic cable, twisted pair, digital subscriber line (DSL), or wireless technology such as infrared, radio, and microwave or other remote source transmits instructions, then coaxial cable, fiber optic cable, twin-wire, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium.
  • coaxial cable, fiber optic cable, twin-wire, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium.
  • disks and optical discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, or Blu-ray discs. Disks usually reproduce data magnetically, while optical discs use lasers to reproduce data. Regenerate data optically. Combinations of the above should also be included within the scope of computer-readable media.
  • the functionality described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated in a combined codec. Furthermore, the techniques may be implemented entirely in one or more circuits or logic elements.
  • inventions of the present disclosure may be implemented in a wide variety of devices or equipment, including wireless handsets, integrated circuits (ICs), or a set of ICs (eg, chipsets).
  • ICs integrated circuits
  • a set of ICs eg, chipsets.
  • Various components, modules or units are depicted in embodiments of the present disclosure to emphasize functional aspects of devices configured to perform the described techniques, but do not necessarily require implementation by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit or provided by a collection of interoperating hardware units (including one or more processors as described above) in conjunction with suitable software and/or firmware.

Landscapes

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

Abstract

一种视频编解码方法、装置和***,使用TMRL允许使用标志,对当前块解码时,通过TMRL允许使用标志的值来确定是否允许编码或解码当前块的TMRL模式语法元素。本公开实施例通过高层语法元素表示是否使用TMRL模式,使得视频编解码的模式选择更为灵活,具有更好的适应性。

Description

一种视频编解码方法、装置和*** 技术领域
本公开实施例涉及但不限于视频技术,更具体地,涉及一种视频编解码方法、装置和***。
背景技术
数字视频压缩技术主要是将庞大的数字影像视频数据进行压缩,以便于传输以及存储等。目前通用的视频编解码标准,如H.266/Versatile Video Coding(多功能视频编码,VVC),都采用基于块的混合编码框架。视频中的每一帧被分割成相同大小(如128x128,64x64等)的正方形的最大编码单元(LCU:largest coding unit)。每个最大编码单元可根据规则划分成矩形的编码单元(CU:coding unit)。编码单元可能还会划分预测单元(PU:prediction unit),变换单元(TU:transform unit)等。混合编码框架包括预测(prediction)、变换(transform)、量化(quantization)、熵编码(entropy coding)、环路滤波(in loop filter)等模块。预测模块包括用于减少或取出视频内在冗余的帧内预测(intra prediction)和帧间预测(inter prediction)。帧内块通过块周边像素作为参考进行预测,帧间块则参考空间上的邻近块信息和其他帧里的参考信息。与预测信号相对,残差信息通过以块为单位的变换、量化和熵编码成码流。这些技术被描述在标准里并实施在的各种与视频压缩相关的领域。
随着互联网视频的激增以及人们对视频清晰度的要求越来越高,尽管已有的数字视频压缩标准能够节省不少视频数据,但目前仍然需要追求更好的数字视频压缩技术,以减少数字视频传输的带宽和流量压力。
发明概述
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本公开一实施例提供了一种视频解码方法,应用于解码器,包括:
通过解码确定基于模板的多参考行帧内预测TMRL允许使用标志的值;
对当前块解码时:
在所述TMRL允许使用标志的值表示允许使用TMRL模式的情况下,允许解码当前块的TMRL模式语法元素;
在所述TMRL允许使用标志的值表示不允许使用TMRL模式的情况下,跳过对当前块的TMRL模式语法元素的解码。
本公开一实施例还提供了一种视频编码方法,应用于编码器,包括:
确定基于模板的多参考行帧内预测TMRL允许使用标志的值;
对当前块编码时:
在所述TMRL允许使用标志的值表示允许使用TMRL模式的情况下,允许编码当前块的TMRL模式语法元素;
在所述TMRL允许使用标志的值表示不允许使用TMRL模式的情况下,跳过对当前块的TMRL模式语法元素的编码。
本公开一实施例还提供了一种码流,其中,所述码流通过本公开任一实施例所述的视频编码方法生成。
本公开一实施例还提供了一种视频解码装置,包括处理器以及存储有计算机程序的存储器,其中,所述处理器执行所述计算机程序时能够实现本公开任一实施例所述的视频解码方法。
本公开一实施例还提供了一种视频编码装置,包括处理器以及存储有计算机程序的存储器,其中,所述处理器执行所述计算机程序时能够实现本公开任一实施例所述的视频编码方法。
本公开一实施例还提供了一种视频编解码***,其中,包括本公开任一实施例所述的视频编码装置和本公开任一实施例所述的视频解码装置。
本公开一实施例还提供了一种非瞬态计算机可读存储介质,所述计算机可读存储介质存储有计算 机程序,其中,所述计算机程序时被处理器执行时能够实现本公开任一实施例所述的视频解码方法,或实现本公开任一实施例所述的视频编码方法。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
附图用来提供对本公开实施例的理解,并且构成说明书的一部分,与本公开实施例一起用于解释本公开的技术方案,并不构成对本公开技术方案的限制。
图1A是本公开一实施例编解码***的示意图;
图1B是本公开一实施例编码端的框架图;
图1C是本公开一实施例解码端的框架图;
图2是本公开一实施例帧内预测模式的示意图;
图3是本公开一实施例当前块的相邻帧内预测块的示意图;
图4是本公开一实施例当前块的模板及模板参考区域的示意图;
图5是本公开一实施例当前块周围的多个参考行的示意图;
图6是本公开一实施例视频编码方法的流程图;
图7是本公开一实施例TMRL模式候选列表构建方法的流程图;
图8A是本公开一实施例当前块周围模板区域及扩展参考行的示意图;
图8B是本公开另一实施例当前块周围模板区域及扩展参考行的示意图;
图9是本公开一实施例视频解码方法的流程图;
图10是本公开另一实施例视频解码方法的流程图;
图11是本公开另一实施例视频编码方法的流程图;
图12是本公开一实施例视频解码装置的示意图。
详述
本公开描述了多个实施例,但是该描述是示例性的,而不是限制性的,并且对于本邻域的普通技术人员来说显而易见的是,在本公开所描述的实施例包含的范围内可以有更多的实施例和实现方案。
本公开的描述中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本公开中被描述为“示例性的”或者“例如”的任何实施例不应被解释为比其他实施例更优选或更具优势。本文中的“和/或”是对关联对象的关联关系的一种描述,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。“多个”是指两个或多于两个。另外,为了便于清楚描述本公开实施例的技术方案,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本邻域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
在描述具有代表性的示例性实施例时,说明书可能已经将方法和/或过程呈现为特定的步骤序列。然而,在该方法或过程不依赖于本文所述步骤的特定顺序的程度上,该方法或过程不应限于所述的特定顺序的步骤。如本邻域普通技术人员将理解的,其它的步骤顺序也是可能的。因此,说明书中阐述的步骤的特定顺序不应被解释为对权利要求的限制。此外,针对该方法和/或过程的权利要求不应限于按照所写顺序执行它们的步骤,本邻域技术人员可以容易地理解,这些顺序可以变化,并且仍然保持在本公开实施例的精神和范围内。
本公开实施例提出的视频编解码方法可以应用于各种视频编解码标准,例如:H.264/Advanced Video Coding(高级视频编码,AVC),H.265/High Efficiency Video Coding(高效视频编码,HEVC),H.266/Versatile Video Coding(多功能视频编码,VVC),AVS(Audio Video coding Standard,音视频编码标准),以及MPEG(Moving Picture Experts Group,动态图像专家组)、AOM(开放媒体联盟,Alliance for Open Media)、JVET(联合视频专家组,Joint Video Experts Team)制订的其他标准以及这些标准的拓展,或任何自定义的其他标准等。
图1A是可用于本公开实施例的一种视频编解码***的框图。如图所示,该***分为编码端装置1和解码端装置2,编码端装置1产生码流。解码端装置2可对码流进行解码。解码端装置2可经由链路3从编码端装置1接收码流。链路3包括能够将码流从编码端装置1移动到解码端装置2的一个或多个媒体或装置。在一个示例中,链路3包括使得编码端装置1能够将码流直接发送到解码端装置2的一个或多个通信媒体。编码端装置1根据通信标准(例如无线通信协议)来调制码流,将经调制的码流发送到解码端装置2。所述一个或多个通信媒体可包含无线和/或有线通信媒体,可形成分组网络的一部分。在另一示例中,也可将码流从输出接口15输出到一个存储装置,解码端装置2可经由流式传输或下载从该存储装置读取所存储的数据。
如图所示,码端装置1包含数据源11、视频编码装置13和输出接口15。数据源11包括视频捕获装置(例如摄像机)、含有先前捕获的数据的存档、用以从内容提供者接收数据的馈入接口,用于产生数据的计算机图形***,或这些来源的组合。视频编码装置13对来自数据源11的数据进行编码后输出到输出接口15,输出接口15可包含调节器、调制解调器和发射器中的至少之一。解码端装置2包含输入接口21、视频解码装置23和显示装置25。输入接口21包含接收器和调制解调器中的至少之一。输入接口21可经由链路3或从存储装置接收码流。视频解码装置23对接收的码流进行解码。显示装置25用于显示解码后的数据,显示装置25可以与解码端装置2的其他装置集成在一起或者单独设置,显示装置25对于解码端来说是可选的。在其他示例中,解码端可以包含应用解码后数据的其他装置或设备。
基于图1A所示的视频编解码***,可以使用各种视频编解码方法来实现视频压缩和解压缩。
图1B为可用于本公开实施例的一示例性的视频编码装置的框图。如图所示,该视频编码装置1000包含预测单元1100、划分单元1101、残差产生单元1102(图中用划分单元1101后的带加号的圆圈表示)、变换处理单元1104、量化单元1106、反量化单元1108、反变换处理单元1110、重建单元1112(图中用反变换处理单元1110后的带加号的圆圈表示)、滤波器单元1113、解码图像缓冲器1114以及熵编码单元1115。其中,预测单元1100包含帧间预测单元1121和帧内预测单元1126,解码图像缓冲器1114也可以称为已解码图像缓冲器、解码图片缓冲器、已解码图片缓冲器等。视频编码器20也可以包含比该示例更多、更少或不同功能组件,如在某些情况下可以取消变换处理单元1104、反变换处理单元1110等。
划分单元1101与预测单元1100配合将接收的视频数据划分为切片(Slice)、编码树单元(CTU:Coding Tree Unit)或其它较大的单元。划分单元1101接收的视频数据可以是包括I帧、P帧或B帧等视频帧的视频序列。
预测单元1100可以将CTU划分为编码单元(CU:Coding Unit),对CU执行帧内预测编码或帧间预测编码。对CU做帧内预测和帧间预测时,可以将CU划分为一个或多个预测单元(PU:prediction unit)。
帧间预测单元1121可对PU执行帧间预测,产生PU的预测数据,所述预测数据包括PU的预测块、PU的运动信息和各种语法元素。帧间预测单元1121可以包括运动估计(ME:motion estimation)单元和运动补偿(MC:motion compensation)单元。运动估计单元可以用于运动估计以产生运动矢量,运动补偿单元可以用于根据运动矢量获得或生成预测块。
帧内预测单元1126可对PU执行帧内预测,产生PU的预测数据。PU的预测数据可包含PU的预测块和各种语法元素。
残差产生单元1102可基于CU的原始块减去CU划分成的PU的预测块,产生CU的残差块。
变换处理单元1104可将CU划分为一个或多个变换单元(TU:Transform Unit),预测单元和变换单元的划分可以不同。TU关联的残差块是CU的残差块划分得到的子块。通过将一种或多种变换应用于TU关联的残差块来产生TU关联的系数块。
量化单元1106可基于选定的量化参数对系数块中的系数进行量化,通过调整量化参数(QP:Quantizer Parameter)可以调整对系数块的量化程度。
反量化单元1108和反变换单元1110可分别将反量化和反变换应用于系数块,得到TU关联的重建残差块。
重建单元1112可将所述重建残差块和预测单元1100产生的预测块相加,产生重建图像。
滤波器单元1113对重建图像执行环路滤波,将滤波后的重建图像存储在解码图像缓冲器1114中作为参考图像。帧内预测单元1126可以从解码图像缓冲器1114中提取PU邻近的块的参考图像以执行帧内预测。帧间预测单元1121可使用解码图像缓冲器1114缓存的上一帧的参考图像对当前帧图像的PU执行帧间预测。
熵编码单元1115可以对接收的数据(如语法元素、量化后的系数块、运动信息等)执行熵编码操作。
图1C为可用于本公开实施例的一示例性的视频解码装置的框图。如图所示,视频解码装置101包含熵解码单元150、预测单元152、反量化单元154、反变换处理单元156、重建单元158(图中用反变换处理单元155后的带加号的圆圈表示)、滤波器单元159,以及解码图像缓冲器160。在其它实施例中,视频解码器30可以包含更多、更少或不同的功能组件,如在某些情况下可以取消反变换处理单元155等。
熵解码单元150可对接收的码流进行熵解码,提取语法元素、量化后的系数块和PU的运动信息等。预测单元152、反量化单元154、反变换处理单元156、重建单元158以及滤波器单元159均可基于从码流提取的语法元素来执行相应的操作。
反量化单元154可对量化后的TU关联的系数块进行反量化。
反变换处理单元156可将一种或多种反变换应用于反量化后的系数块以便产生TU的重建残差块。
预测单元152包含帧间预测单元162和帧内预测单元164。如果PU使用帧内预测编码,帧内预测单元164可基于从码流解码出的语法元素确定PU的帧内预测模式,根据确定的帧内预测模式和从解码图像缓冲器160获取的PU邻近的已重建参考信息执行帧内预测,产生PU的预测块。如果PU使用帧间预测编码,帧间预测单元162可基于PU的运动信息和相应的语法元素来确定PU的一个或多个参考块,基于从解码图像缓冲器160获取的所述参考块来产生PU的预测块。
重建单元158可基于TU关联的重建残差块和预测单元152产生的PU的预测块,得到重建图像。
滤波器单元159可对重建图像执行环路滤波,滤波后的重建图像存储在解码图像缓冲器160中。解码图像缓冲器160可提供参考图像以用于后续运动补偿、帧内预测、帧间预测等,也可将滤波后的重建图像作为已解码视频数据输出,在显示装置上的呈现。
基于上述视频编码装置和视频解码装置,可以执行以下基本的编解码流程,在编码端,将一帧图像划分成块,对当前块进行帧内预测或帧间预测或其他算法产生当前块的预测块,使用当前块的原始块减去预测块得到残差块,对残差块进行变换和量化得到量化系数,对量化系数进行熵编码生成码流。在解码端,对当前块进行帧内预测或帧间预测产生当前块的预测块,另一方面对解码码流得到的量化系数进行反量化、反变换得到残差块,将预测块和残差块相加得到重建块,重建块组成重建图像,基于图像或基于块对重建图像进行环路滤波得到解码图像。编码端同样通过和解码端类似的操作以获得解码图像,编码端获得的解码图像通常也叫做重建图像。解码图像可以作为对后续帧进行帧间预测的参考帧。编码端确定的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息和参数信息如果需要可以写入码流。解码端通过解码码流或根据已有信息进行分析,确定与编码端相同的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息和参数信息,从而保证编码端获得的解码图像和解码端获得的解码图像相同。
以上虽然是以基于块的混合编码框架为示例,但本公开实施例并不局限于此,随着技术的发展,该框架中的一个或多个模块,及该流程中的一个或多个步骤可以被替换或优化。
本文中,当前块(current block)可以是当前图像中的当前编码单元(current CU)、当前预测单元(current PU)等块级的编解码单位。
编码端进行帧内预测时,通常借助各种角度模式与非角度模式对当前块进行预测得到预测块;根据预测块与原始块计算得到的率失真信息,为当前块选中最优的帧内预测模式,将该帧内预测模式编码,经码流传输到解码端。解码端通过解码得到为当前选中的该帧内预测模式,按照该帧内预测模式对当前块进行帧内预测。本文中,为当前块选中的参考行和帧内预测模式也表述为当前块选中的参考行和帧内预测模式。
在VVC和ECM中,多种的传统帧内预测模式使用当前块周围已经重建的信息预测当前块。包括:平面模式(即Planar模式,模式索引为0)、均值模式(即DC模式、模式索引为1)和65个角度预测 模式(模式索引2~66)。图2示出了模式索引为2~66的角度预测模式的角度方向。文中,也将角度预测模式简称为角度模式。
由于在VVC中引入了长方形的预测块,对于长方形的块,索引为2~66的角度模式中一些角度模式的角度方向可以被替换成了更宽的角度方向,如图所示,索引为-14~-1,67~80的角度模式是因宽角度替换而得到的角度模式,这些角度模式的选中不需要通过标识位去表示,而是通过当前块的形状和当前块选中的预测模式索引(2~66)通过对应关系得到。完成了宽角度模式的匹配后,每个角度预测模式predModeIntra(-14~80)都会有一个角度值intraPredAngle,如下表所示。角度模式的角度值将用于后续的角度预测。
表1.角度预测模式与角度值的对应关系
predModeIntra -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 2 3 4
intraPredAngle 512 341 256 171 128 102 86 73 64 57 51 45 39 35 32 29 26
predModeIntra 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
intraPredAngle 23 20 18 16 14 12 10 8 6 4 3 2 1 0 -1 -2 -3
predModeIntra 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
intraPredAngle -4 -6 -8 -10 -12 -14 -16 -18 -20 -23 -26 -29 -32 -29 -26 -23 -20
predModeIntra 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
intraPredAngle -18 -16 -14 -12 -10 -8 -6 -4 -3 -2 -1 0 1 2 3 4 6
predModeIntra 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
intraPredAngle 8 10 12 14 16 18 20 23 26 29 32 35 39 45 51 57 64
predModeIntra 73 74 75 76 77 78 79 80                  
intraPredAngle 73 86 102 128 171 256 341 512                  
本文中,每个角度模式predModeIntra均对应一个角度,每个角度预测模式的角度是图1中该角度预测模式对应的线段在直角坐标系中的角度,例如,索引号为34的角度模式,角度值intraPredAngle为-32,角度为-45°或45°或135°,这与该直角坐标***定义的0°方向有关。
本文中所说的帧内预测模式在没有其他限定时,是指包括Planar模式、DC模式和角度模式的传统帧内预测模式。
根据统计特性,距离当前块越近的像素区域往往越容易与当前块选中同样的帧内预测模式,根据这一特性,在HEVC、VVC以及增强的压缩模型(ECM:Enhanced Compression Model)中都采纳了最可能模式(MPM:most probable mode)技术。ECM是基于VTM-10.0参考软件,集成各类新工具,从而进一步挖掘编解码性能的参考软件。
MPM先构建MPM列表,在MPM列表中填充最有可能被当前块选中的6种帧内预测模式。如果当前块选中的帧内预测模式在MPM列表中,只需要编码其索引号(只需要3bit)即可,如果当前块选中的帧内预测模式不在MPM列表中而是在61个非MPM(non-MPM)模式中,则在熵编码阶段使用截断二元码(Truncated Binary Code,TBC)编码该帧内预测模式。
在VVC内,无论是否应用多参考行(MRL:Multiple reference line)和帧内子块划分(ISP:Intra Sub-Partitions),MPM列表均有6种预测模式。而ECM中的MPM分为MPM和第二MPM(Secondary MPM),MPM和Secondary MPM分别使用长度为6与长度为16的列表。MPM列表的6个模式中,Planar模式始终填充在MPM中的第一个位置,其余5个位置的填充由设定的步骤依次进行,直到填 充满5个位置为止,多出来的模式将自动进入Secondary MPM。Secondary MPM列表可以由除MPM中的帧内预测模式以外的一些主要角度模式构成。由于MPM标志(mpm_flag)的编解码顺序在MRL模式之后,ECM中MPM的编解码需依赖于MRL标识位,当前块不使用MRL模式时,需解码MPM标志以确定当前块是否使用MPM,而在当前块使用MRL模式时,无需解码MPM标志,默认当前块使用MPM。
基于模板的帧内模式推导(TIMD:Template based intra mode derivation)和解码端帧内预测模式导出(DIMD:Decoder-side intra mode derivation)是采纳进ECM参考软件的两项针对亮度帧的帧内预测技术,这两项技术可在解码端根据当前块周边已重建的像素值导出当前块的帧内预测模式,从而节省编码帧内预测模式的索引所需的bit。
在ECM中,如图4所示,当前块(如当前CU)11的左侧相邻区域和上方相邻区域构成当前块的模板区域12。其中的左侧相邻区域称为左侧模板区域(简称左模板),上方相邻区域称为上方模板区域或上侧模板区域(简称上模板)。模板区域12外侧(指左侧和上侧)设置有模板参考(reference of the template)区域13,各区域示例性的尺寸和位置如图所示。在一示例中,左模板的宽度L1和上模板的高度L2均为4。模板参考区域13可以是模板区域上方相邻的一行或左侧相邻的一列。
TIMD假定当前块和当前块的模板区域的分布特性一致,以模板参考区域的重建值作为参考行的重建值,遍历MPM和Secondary MPM中的所有帧内预测模式对模板区域进行预测,得到预测结果。再计算模板区域上的重建值与每种模式的预测结果(模板区域上的预测值)之间的误差变换绝对值和(SATD:Sum of absolute transformed differences),再确定当前块的TIMD模式。解码端通过相同方式推导TIMD模式。如果序列允许使用TIMD,且当前块选中的帧内预测模式为TIMD模式,仅需要一个标志位表示当前块使用TIMD模式进行预测,剩余的与帧内预测相关的语法元素如ISP、MPM等的解码可以跳过,从而大幅降低编码比特。
在求得模板区域的重建值与每种模式预测结果之间的SATD后,可根据以下方式确定TIMD模式:假设mode1和mode2为MPM中用于帧内预测的两种角度模式,mode1为SATD最小的角度模式,其SATD为cost1;mode2为SATD次小的角度模式,其SATD为cost2:
当cost1×2≤cost2时,将mode1作为当前块的TIMD模式;
当cost1×2>cost2时,将对mode1和mode2的预测结果进行加权的预测模式作为当前块的TMID模式,也称TIMD融合(fusion)模式。
DIMD是以当前块周边已重建的像素值为模板,通过索贝尔(sobel)算子在模板上的每个3x3区域上扫描并计算水平方向和竖直方向的梯度,根据水平和竖直方向上求得梯度Dx和Dy,根据Dx和Dy求得每个位置上的幅度值Amp=abs(Dx)+abs(Dy)和角度值angular=arctan(Dy/Dx)。根据模板上每个位置的角度值对应到传统的角度模式,累加相同角度模式的幅度值得到幅度值与角度模式的直方图。在存在幅度值最高和次高的两种角度模式的情况下,对幅度值最高和次高的两种角度模式以及planar模式的预测值进行加权,得到当前块使用DIMD时最终的预测结果。此时的预测模式融合了三种帧内预测模式:planar模式、以及幅度值最高和次高的两种角度模式。文中称为DIMD融合模式。在不存在幅度最高和次高的角度模式的情况下,使用DIMD的预测与使用planar模式的预测等同。
在HEVC中,帧内预测使用距离当前块最近的上一行和左一列作为参考行进行预测,如果这一行和一列的重建值与原始像素值有着较大的误差,对当前块的预测质量也会有很大的影响。为了解决这一问题,VVC中采纳了MRL技术,除了使用索引为0的参考行(Reference line0)之外,还可以使用索引为1的参考行(Reference line1)和索引为2的参考行(Reference line2)作为扩展参考行进行帧内预测。为了减小编码复杂度,MRL仅在MPM中的非planar模式上使用。编码端基于每个角度模式对当前块进行预测时,要将这三个参考行都尝试过,选中率失真代价(RD Cost)最小的一个参考行。最终选中的参考行的索引被编码发送到解码端。解码端解码得到参考行的索引,根据参考行的索引确定当前块选中的参考行,用于对当前块的预测。
图5示出了当前块的4个参考行,分别是索引为0的参考行221(reference line 0)、索引为1的参考行222(reference line1);索引为2的参考行(reference line2)223,以及索引为3的参考行(reference line3)224。当前块的参考行可以有更多,在预测时可以只使用参考行部分的重建值进行预测。
ECM中,MRL模式可以使用更多的参考行,多个候选的参考行的索引填入一个列表。称为MRL索引列表、MRL列表、候选参考行列表或参考行索引列表等。在当前块不使用TIMD的情况下,MRL 索引列表的长度为6,可填入6个参考行的索引,这6个参考行的索引及其顺序是固定的,依次为0,1,3,5,7,12。第1个位置填入的是索引。使用MRL的情况下,通过编码MRL索引表示当前块选中的参考行在MRL索引列表中的位置。以MRL索引列表{0,1,3,5,7,12}为例,表中索引0,1,3,5,7,12对应的MRL索引分别为0,1,2,3,4,5。MRL索引可以采用基于上下文模型的一元截断码编码,编码后得到基于上下文模型的二元标识,二元标识也可以称为二元标识位、二进制符号、二进制位等。MRL索引的值越小,码长越少,解码越快。
MRL模式与TIMD模式同时使用的情况下,MRL索引列表长度为3,可填入3个参考行的索引且索引之间的顺序固定,表示为{0,1,3}。
本文中,参考行虽然称之为“行”,但这是为了表述方便,一个参考行实际上包括一行和一列,一般情况下,预测时使用的参考行的重建值也包括一行和一列的重建值,这与业界通常的描述方法是一样的。
在不同的标准中,同样的技术可能有不同的名称。例如象MPM那样利用当前块周围的块导出一个最可能模式的列表的技术,在AV2(AVM)中称为自适应帧内模式编码(AIMC:Adaptive Intra Mode Coding),在AVS3中,在屏幕内容编码情况下,称为基于频数信息的帧内编码(FIMC:Frequency-based Intra Mode Coding)。在非屏幕内容编码情况下,类似MPM的技术常开。而如MRL那样,利用多参考行进行帧内预测技术,在AV2(AVM)中称为用于帧内预测的多参考行选择(MRLS:Multiple reference line selection for intra prediction)。但这仅仅是名称的不同,本实施例使用MPM、MRL等术语时,同样应覆盖到其他标准中的这些实质相同的技术。
一实施例提供了一种帧内预测融合(IPF:Intra prediction fusion)技术,IPF是对当前块选中的角度模式,使用两个参考行和该角度模式组成参考行和帧内预测模式的两种组合,基于两种组合分别对当前块进行预测,得到的两个预测结果加权后,作为当前块最终的预测结果,如下:
p fusion=w a×p a+w b×p b
其中,p a为使用索引为a的参考行和该角度模式的组合对当前块进行预测的结果,p b为使用索引为b的参考行和该角度模式对当前块进行预测的结果,p fusion为当前块融合后的预测结果;w a为加权时p a的权重,w b为加权时p b的权重。在一示例中,b=a+1,w a为3/4,w b为1/4。当前块使用IPF时,将上述融合后的预测结果作为当前块最终的预测结果即当前块的预测值。
在一个示例中,IPF默认在以下条件均满足时,对当前块选中的角度模式都开启:当前块选中的角度模式不是整数斜率的角度模式;当前块的宽乘高大于16;当前块没有选中帧内子块划分ISP模式。其中,当角度模式的角度值(intraPredAngle)除32余数为0时,该角度模式为整数斜率(integer slope)的角度模式,intraPredAngle与角度模式的对应关系可见上文的表1。在其他示例中,IPF也可以增加其他限制条件如模式数量限制条件,例如,使用IPF会导致当前块的预测需要融合3种以上的帧内预测模式,或者使用IPF会导致当前块的预测需要融合2种以上的角度模式时,不允许使用IPF。
一实施例提供了一种基于模板的多参考行帧内预测(Multiple reference line&intra_intra prediction)模式,简写为TMRL模式,TMRL模式是基于扩展参考行与帧内预测模式的组合构建候选列表,对扩展参考行与帧内预测模式的组合进行编解码的帧内预测模式。TMRL模式的组合编解码方式可以减少编码代价,提升编码性能。
本实施例视频编码方法应用于编码器,如图6所示,包括:
步骤110,构建当前块的TMRL模式的候选列表,所述候选列表中填入有当前块候选的扩展参考行与帧内预测模式的组合;
步骤120,通过率失真优化,当前块选中一种参考行和帧内预测模式的组合用于帧内预测;
本文中,参考行包括索引为0的参考行和扩展参考行,当前块选中的参考行和帧内预测模式的组合可能是索引为0的参考行与一种帧内预测模式的组合,也可能是一个扩展参考行与一种帧内预测模式的组合。
步骤130,在当前块的TMRL模式的编码条件满足时,编码当前块的TMRL模式标志以表示当前块使用TMRL模式,编码当前块的TMRL模式索引以表示所述选中的组合在所述候选列表中的位置;
其中,所述编码条件包括:所述选中的组合在所述候选列表中(此时当前块选中的是扩展参考行), 还可以包括以下任意一种或多种:条件1,当前块为亮度帧中的块;即TMRL模式只用于亮度帧;条件2,当前块不位于编码树单元CTU的上边界;.条件3,当前块所在序列允许使用MRL;条件4,当前块的尺寸满足使用TMRL模式的尺寸要求;条件5,当前块的长宽比满足使用TMRL模式对当前块长宽比的要求。TMRL模式索引可以采用哥伦布-莱斯编码方法,将候选的组合更合理的归类成码字长度不同的类别进行编码和解码,提升编码效率。
在当前块使用TMRL模式的情况下,可以跳过MPM模式,帧内子块划分ISP模式、多变换选择MTS模式、低频不可分割变换LFNST模式等。通过TMRL模式标志和TMRL模式索引可以同时表示当前块选中的参考行和帧内预测模式,此时无需要再对MPM相关语法元素进行编解码。
本文中,候选列表中填入的是当前块候选的扩展参考行与帧内预测模式的组合,这意味着候选列表中的组合需要参与当前块的率失真优化,即通过率失真代价来选择当前块预测模式的模式选择过程。
本实施例的一示例中,在当前块使用TIMD时,跳过当前块的TMRL模式标志和TMRL模式索引的编码;在当前块不使用TIMD但选中的组合不在候选列表中的情况下,编码当前块的TMRL模式标志以表示不使用TMRL模式,跳过TMRL模式索引的编码。在当前块不使用TIMD时,本实施例提供的TMRL模式标志和TMRL模式索引可以替代原有的MRL索引。
一实施例提供了一种TMRL模式候选列表的构建方法,可以应用于编码器,也可以应用于解码器。如图7所示,所述方法包括:
步骤210,根据当前块的N个扩展参考行和M个帧内预测模式得到扩展参考行与帧内预测模式的N×M种组合,N≥1,M≥1,N×M≥2;
步骤220,根据所述N×M种组合分别对当前块的模板区域进行预测,并计算所述模板区域的重建值和预测得到的预测值之间的误差;
本步骤的误差除用SATD和绝对误差和(SAD:the sum of absolute difference)表示外,也可以用差值的平方和(SSD:Sum of Squared Difference)、平均绝对差值(MAD:Mean Absolute Difference)、平均平方误差(MSE:Mean Squared Error)等表示。
步骤230,按照所述误差从小到大的顺序,将所述误差对应的K种组合填入当前块的TMRL模式的候选列表,1≤K≤N×M。
本实施例创建的候选列表可以实现扩展参考行与帧内预测模式的组合编码,提升编码效率。将被选中可能性大的组合排在候选列表的前面,可使得编码时被选中的组合的TMRL模式索引较小,减少编码代价。
当前块的模板区域可设置在距离当前块最近的一个或多个参考行上。参与组合的N个扩展参考行是位于模板区域外侧且不超过CTU边界的扩展参考行。在一示例中,在构建TMRL模式的候选列表时,从预定义的索引为{1,3,5,7,12}的扩展参考行中选择不超过CTU边界的所有扩展参考行,N≤5。当前块的模板区域设置在索引为0的参考行上(即索引为0的参考行称之为模板区域所在的参考行),其他参考行称之为位于模板区域外侧的参考行。图8A示出了参与组合的5个扩展参考行:索引为1的参考行31、索引为3的参考行33、索引为5的参考行35、索引为7的参考行37以及索引为12的参考行39。而图8B所示的另一示例中,当前块的模板区域40设置在索引为0和1的两个参考行上,参与组合的扩展参考行是索引为2的参考行42、索引为3的参考行43、索引为5的参考行45、索引为7的参考行47、及索引为12的参考行49中不超过CTU边界的所有扩展参考行。
在本实施例的一示例中,参与组合的M个帧内预测模式只允许从角度模式中选出,或者只允许从角度模式和DC模式中选出,或者允许从角度模式、DC模式和Planar模式中选出。可以从MPM,或者MPM和第二MPM选定的帧内预测模式中选择,也可以按照预定的规则逐步选出。
一实施例提供了TMRL模式相关的视频解码方法,应用于解码器,如图9所示,所述方法包括:\
步骤310,解码当前块的多参考行帧内预测TMRL模式标志,确定当前块是否使用TMRL模式;
步骤320,确定当前块使用TMRL模式的情况下,继续解码当前块的TMRL模式索引,并构建当前块的TMRL模式的候选列表,所述候选列表中填入有当前块候选的扩展参考行与帧内预测模式的组合;
步骤330,根据所述候选列表和TMRL模式索引,确定当前块选中的扩展参考行和帧内预测模式的组合,根据选中的组合对当前帧进行预测;其中,所述TMRL模式索引用于表示所述选中的扩展参考行与帧内预测模式的组合在所述候选列表中的位置。
本实施例通过TMRL模式索引可以同时指示当前块选中的扩展参考行和帧内预测模式,不需要使用两个索引来完成。可以减少编码代价。根据TMRL模式标志确定当前块使用TMRL模式的情况下,可以跳过MPM模式、ISP模式、MTS模式、LFNST模式相关语法元素的解码。
本实施例的一个示例中,本示例的视频解码方法包括:
步骤一,解码器解码TMRL模式相关的语法元素,本示例包括TIMD、MRL等模式的相关语法元素。
当前块解码相关的语法如下表所示:
Figure PCTCN2022112282-appb-000001
Figure PCTCN2022112282-appb-000002
表中的“cu_tmrl_flag”即TMRL模式标志,等于1表示当前块使用TMRL模式,也即定义了当前亮度样本的帧内预测类型为TMRL模式;“cu_tmrl_flag”等于0表示当前块不使用TMRL模式,也即定义了当前亮度样本的帧内预测模式类型不是TMRL模式。表中的“tmrl_idx”即TMRL模式索引,表示当前块选中的扩展参考行与帧内预测模式的组合在TMRL模式的候选列表中的位置,也可以说是定义了选中的组合在TMRL模式所排序的候选列表中的索引(表示组合所在位置的索引)。
TMRL模式可以视为MRL模式的演进,也可视为MRL模式的组成部分。本示例中,当前块使用TIMD模式的情况下,对MRL模式语法元素的解码方式不变。当前块不使用TIMD模式的情况下,则需要解码TMRL模式的语法元素。如上表,在解码cu_tmrl_flag之前,先判断以下条件是否成立:当前块允许使用MRL(即sps_mrl_enabled_flag为1是否成立),当前块不位于CTU上边界(即(y0%CtbSizeY)>0是否成立),以及当前块不使用TIMD。在这些条件成立时,再解码cu_tmrl_flag。如果其他两个条件成立而当前块使用TIMD,则解码当前块的多参考行索引intra_luma_ref_idx。
步骤二,如果当前块使用TMRL模式,需构建TMRL模式的候选列表,TMRL模式的候选列表的构建是一个编码器和解码器都需要进行的操作。
■确定候选的扩展参考行。候选的扩展参考行从预定义的扩展参考行中选出。根据当前块在图像中的位置来确定预定义的扩展参考行中哪些是可以使用的,本示例在索引为0的参考行上构建模板,N=5,将索引为{1,3,5,7,12}的扩展参考行中,没有超出CTU边界的扩展参考行都加入候选的扩展参考行。
■确定候选的帧内预测模式。本示例M=6,即候选的帧内预测模式的数量为6,首先,在67种 传统的预测模式中,去除Planar模式和DC模式,或者仅去除Planar模式而保留DC模式,然后分步选出6个参与组合的帧内预测模式:第一步,从当前块周围5个邻近位置的预测块使用的帧内预测模式中,依序选出不重复的帧内预测模式,如图3所示。第二步,对第一步选出的角度模式进行扩展操作,按序对每一角度模式进行加1减1操作;将扩展得到的不重复的角度模式选出,直至选出的模式数量为6,结束。若进行扩展操作后还没有选出6个帧内预测模式,或者第一步没有选出角度模式,则进行第三步:从预定义的模式集中选出不重复的模式,直到选出的模式数量为6。
■构建TMRL模式的候选列表。确定候选的扩展参考行及帧内预测模式后,逐一尝试扩展参考行列表和候选列表中的所有组合,对这些组合在reference line 0所在行的模板区域上分别进行预测,计算模板区域的重建值和每种组合预测得到的预测值之间的误差,将对应误差最小的K种组合按误差从小到大的顺序填入TMRL模式的候选列表,本示例K=12。
步骤三,根据构建的TMRL模式的候选列表和解码得到的TMRL模式索引确定当前块选中的扩展参考行和帧内预测模式的组合,根据选中的组合对当前块进行帧内预测。当前块使用TMRL模式时,当前块选中的参考行(此时为扩展参考行)的索引refIdx和帧内预测模式(变量predModeIntra表示)包含在确定的组合中。
使用TMRL模式可以节省码字。但是基于模板的技术通常会增加解码器的复杂度。且使用TMRL模式意味着编解码器需要支持这一复杂的计算,并非所有编解码器都可以支持。为此可通过高层语法元素表示是否使用TMRL模式,使得视频编解码的模式选择更为灵活,具有更好的适应性。
本文的高层语法元素指对块级的帧内预测语法元素具有约束作用的序列级、图像级、切片(slice)级等级别的语法元素。
本公开一实施例提供了一种视频解码方法,通过高层语法控制TMRL模式的使用。如图10所示,本实施例的视频解码方法包括:
步骤410:通过解码确定TMRL允许使用标志的值;如名称所表示的,TMRL允许使用标志用于表示是否允许使用TMRL模式;
本步骤中,通过解码确定TMRL允许使用标志的值,可以是通过解码TMRL允许使用标志本身来确定TMRL允许使用标志的值,或者通过解码与TMRL相关的其他语法元素来确定TMRL允许使用标志的值,或者通过解码与TMRL相关的其他语法元素以及TMRL允许使用标志来确定TMRL允许使用标志的值。
步骤420,对当前块解码时,在TMRL允许使用标志的值表示允许使用TMRL模式的情况下,允许解码当前块的TMRL模式语法元素;在TMRL允许使用标志的值表示不允许使用TMRL模式的情况下,跳过对当前块的TMRL模式语法元素的解码。
对于TMRL允许使用标志以及MRL允许使用标志、模板允许使用标志等标识符,通常在值为0时表示不允许使用相应的模式,值为1时表示允许使用相应的模式。但本公开并不局限于此,用1表示不允许使用模式,0表示允许使用模式也是可以的。
本实施例通过设置TMRL允许使用标志表示是否允许使用TMRL模式,增加TMRL模式使用的灵活性和适应性;根据TMRL允许使用标志的值可以实现对当前块的TMRL模式语法元素的正确解码。
本公开一示例性的实施例中,TMRL允许使用标志是序列级的标识符,但其他实施例中,TMRL允许使用标志也可以是图像级或切片级的标识符。
本公开一示例性的实施例中,TMRL允许使用标志可单独解码,不依赖于其他标志。此时通过解码TMRL允许使用标志,得到所述TMRL允许使用标志的值。
在VVC中的标准文本中,为了确定是否对当前块打开MRL模式(也可称为MRL技术、MRL工具),用sps_mrl_enabled_flag表示序列级的MRL允许使用标志,相关语法如下表所示:
序列级参数集原始字节序列层语法(Sequence parameter set RBSP syntax)
Figure PCTCN2022112282-appb-000003
其中,sps_mrl_enabled_flag为0表示不允许使用MRL,而sps_mrl_enabled_flag为1表示允许使用MRL。
本实施例以没有依赖关系的形式增加序列级的TMRL允许使用标志sps_tmrl_enabled_flag以控制是否允许使用TMRL模式,相关语法如下表所示:
Sequence parameter set RBSP syntax
Figure PCTCN2022112282-appb-000004
上表中,TMRL允许使用标志sps_tmrl_enabled_flag和MRL允许使用标志sps_mrl_enabled_flag独立解码,不存在依赖关系。
本公开一示例性的实施例中,TMRL模式使用扩展参考行,在做帧内预测的模式选择时通常也会使用索引为0的参考行,因此允许使用TMRL模式时对当前块进行帧内预测会涉及多个参考行的使用。做高层语法设计时,TMRL允许使用标志的解码可以依赖于MRL允许使用标志。此时所述通过解码确定TMRL允许使用标志的值,包括:解码MRL允许使用标志,得到MRL允许使用标志的值:在MRL允许使用标志的值表示不允许使用MRL的情况下,跳过对TMRL允许使用标志的解码,默认TMRL允许使用标志的值为表示不允许使用TMRL模式的值;而在MRL允许使用标志表示允许使用MRL的情况下,再解码TMRL允许使用标志,得到TMRL允许使用标志的值。
本实施例以有依赖关系的形式增加一个序列级的TMRL允许使用标志,以控制是否允许使用TMRL模式,相关语法如下表所示:
Sequence parameter set RBSP syntax
Figure PCTCN2022112282-appb-000005
Figure PCTCN2022112282-appb-000006
依照上表,解码时先解码MRL允许使用标志sps_mrl_enabled_flag,在序列级的sps_mrl_enabled_flag为1即表示允许使用MRL时,再解码TMRL允许使用标志sps_tmrl_enabled_flag以确定sps_tmrl_enabled_flag的值。
本实施例中,TMRL允许使用标志为序列级的标识符,MRL允许使用标志为序列级的标识符。在另一实施例中,TMRL允许使用标志可以为图像级的标识符,MRL允许使用标志可以为序列级或图像级的标识符。在又一实施例中,TMRL允许使用标志为切片级的标识符,MRL允许使用标志可以为序列级或图像级或切片级的标识符。这些实施例中,TMRL允许使用标志和MRL允许使用标志为同一级别的标识符时,MRL允许使用标志的解码顺序位于TMRL允许使用标志之前。
在ECM中有着多种基于模板的编解码工具,例如DIMD、TIMD及TMRL等,均使用模板作为预测的工具。也可以有一个统一的标识去控制所有的基于模板的技术。为此,本公开一实施例引入一个序列级的标识符:模板使用允许标志,在一示例中用sps_tm_enabled_flag表示。本文中,如其名称表达的含义,模板使用允许标志用于表示是否允许使用模板,也即是否允许使用基于模板的编解码工具。模板使用允许标志的值表示不允许使用模板时,DIMD、TIMD及TMRL等基于模板的编解码工具均不能使用。
本公开一示例性的实施例中。本实施例中,TMRL允许使用标志的解码依赖于模板允许使用标志。所述通过解码确定TMRL允许使用标志的值,包括:解码模板允许使用标志,得到模板允许使用标志的值;在模板允许使用标志的值表示不允许使用模板的情况下,跳过对TMRL允许使用标志的解码,默认TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在模板允许使用标志表示允许使用模板的情况下,再解码TMRL允许使用标志,得到TMRL允许使用标志的值。
本实施例以有依赖关系的形式增加一个序列级的TMRL允许使用标志,以控制是否允许使用TMRL模式,相关语法如下表所示:
Sequence parameter set RBSP syntax
Figure PCTCN2022112282-appb-000007
依照上表,解码时先解码模板允许使用标志sps_tm_enabled_flag,在序列级的sps_tm_enabled_flag为1即表示允许使用模板时,再解码TMRL允许使用标志sps_tmrl_enabled_flag以确定sps_tmrl_enabled_flag的值。
本实施例中,TMRL允许使用标志为序列级的标识符,模板允许使用标志为序列级的标识符。在 另一实施例中,TMRL允许使用标志为图像级的标识符,模板允许使用标志可以为序列级或图像级的标识符。在又一实施例中,TMRL允许使用标志为切片级的标识符,模板允许使用标志可以为序列级或图像级或切片级的标识符。这些实施例中,TMRL允许使用标志和模板允许使用标志为同一级别的标识符时,模板允许使用标志的解码顺序位于TMRL允许使用标志之前。
本公开一示例性的实施例中,TMRL允许使用标志的解码依赖于MRL允许使用标志和模板允许使用标志。所述通过解码确定TMRL允许使用标志的值,包括:解码MRL允许使用标志和模板允许使用标志,得到MRL允许使用标志的值和模板允许使用标志的值;在MRL允许使用标志的值表示允许使用MRL,且模板允许使用标志的值表示允许使用模板的情况下,再解码TMRL允许使用标志,得到TMRL允许使用标志的值;在MRL允许使用标志的值表示不允许使用MRL,或模板允许使用标志的值表示不允许使用模板的情况下,跳过对TMRL允许使用标志的解码,默认TMRL允许使用标志的值为表示不允许使用TMRL模式的值。
本实施例的依赖关系可以用下表的语法表示:
Sequence parameter set RBSP syntax
Figure PCTCN2022112282-appb-000008
依照上表,解码时先解码模板允许使用标志sps_tm_enabled_flag和MRL允许使用标志sps_mrl_enabled_flag,在序列级的sps_tm_enabled_flag和sps_mrl_enabled_flag均为1即允许使用模板和MRL时,再解码TMRL允许使用标志sps_tmrl_enabled_flag以确定sps_tmrl_enabled_flag的值。
本实施例中,TMRL允许使用标志为序列级的标识符,MRL允许使用标志和模板允许使用标志为序列级的标识符。在另一实施例中,TMRL允许使用标志为图像级的标识符,MRL允许使用标志和模板允许使用标志可以为序列级或图像级的标识符。在又一实施例中,TMRL允许使用标志为切片级的标识符,MRL允许使用标志和模板允许使用标志可以为序列级或图像级或切片级的标识符。这些实施例中,TMRL允许使用标志、MRL允许使用标志和模板允许使用标志为同一级别的标识符时,MRL允许使用标志和模板允许使用标志的解码顺序位于TMRL允许使用标志之前。
在ECM中,有一类语法元素称为通用限制信息(GCI:General constraints information),GCI包括一系列的标识位,这些标识位用于限制码流中是否存在一些序列级的标识符。在一示例中,当GCI的某个标识位大于0(如为1)时,意味着码流中该标识位对应的序列级的标识符被限制,无需解码,该序列级的标识符例如是某个编解码工具(如MRL、TMRL、DIMD、TIMD等)的标识符,而该标识位等于0则表示不对码流中该标识位对应的序列级的标识符施加限制,需要对该序列级的标识符进行解码。
本公开一示例性的实施例中,通过GCI中设置的一个标识位表示TMRL模式是否受到限制。本实施例中,TMRL允许使用标志为序列级的标识符,所述通过解码确定TMRL允许使用标志的值,包括:解码GCI,根据GCI中用于表示TMRL模式是否受到限制的标识位的值,确定TMRL模式是 否受到限制;在TMRL模式受到限制的情况下,跳过对TMRL允许使用标志的解码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在TMRL模式没有受到限制的情况下,继续解码序列级的标识符以确定TMRL允许使用标志的值。
本实施例引入序列级的TMRL允许使用标志sps_tmrl_enabled_flag,且在sps_tmrl_enabled_flag的解码不依赖于序列级的MRL允许使用标志sps_mrl_enabled_flag的取值时,可以对GCI做相应调整,增加一个标识位表示TMRL模式是否受到限制,如以下的语法表所示:
GCI语法(General constraints information syntax)
Figure PCTCN2022112282-appb-000009
如上表所示,本实施例增加一个gci_no_tmrl_constraint_flag表示是否限制TMRL模式,也即是否限制TMRL允许使用标志sps_tmrl_enabled_flag的值。在gci_no_tmrl_constraint_flag为1时,无需解码sps_tmrl_enabled_flag,默认sps_tmrl_enabled_flag为0,即表示不允许使用TMRL模式。而在gci_no_tmrl_constraint_flag为0时,表示对sps_tmrl_enabled_flag的值不施加限制,需要解码相关的序列级标识符来确定sps_tmrl_enabled_flag的值。
上表中的gci_no_mrl_constraint_flag用于表示MRL模式是否受到限制,也即MRL允许使用标志sps_mrl_enabled_flag的值是否受到限制。当gci_no_mrl_constraint_flag为1时,sps_mrl_enabled_flag的值默认为0,gci_no_mrl_constraint_flag为0时,表示对sps_mrl_enabled_flag的值不施加限制,可通过解码确定sps_mrl_enabled_flag的值。
本公开一示例性的实施例中,通过GCI中设置的一个标识位表示MRL模式是否受到限制,而在MRL模式受到限制时,TMRL模式也受到限制。本实施例中,TMRL允许使用标志为序列级的标识符,所述通过解码确定TMRL允许使用标志的值,包括:解码GCI,根据GCI中用于表示MRL是否受到限制的标识位的值,确定MRL模式是否受到限制;在MRL模式受到限制的情况下,跳过对TMRL允许使用标志的解码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在MRL模式没有受到限制的情况下,继续解码序列级的标识符以确定TMRL允许使用标志的值。
参见上一实施例的语法表,在TMRL允许使用标志sps_tmrl_enabled_flag的解码依赖于MRL允许使用标志sps_mrl_enabled_flag的取值的情况下,根据GCI中表示MRL模式是否受到限制的标志位gci_no_mrl_constraints_flag同时确定MRL模式是否受到限制和TMRL模式是否受到限制,在gci_no_mrl_constraints_flag为1时,默认sps_tmrl_enabled_flag为0,无需解码sps_tmrl_enabled_flag。在gci_no_mrl_constraints_flag为0时,通过解码相关序列级的标识符来确定sps_tmrl_enabled_flag的值。
本公开一示例性的实施例中,通过GCI中设置的一个标识位表示模板使用是否受到限制,而在模板使用受到限制时,基于模板的工具(包括TMRL模式)也受到限制。本实施例中,TMRL允许使用标志为序列级的标识符,所述通过解码确定TMRL允许使用标志的值,包括:解码GCI,根据GCI中用于表示模板使用是否受到限制的标识位的值,确定模板使用是否受到限制;在模板使用受到限制的情况下,跳过对TMRL允许使用标志的解码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在模板使用没有受到限制的情况下,继续解码序列级的标识符以确定TMRL允许使用标志的值。
本实施例在sps_tmrl_enabled_flag的解码依赖于序列级的模板允许使用标志sps_tm_enabled_flag的取值时,使用gci_no_tm_constraints_flag同时确定模板使用和TMRL模式是否受到限制,如以下的语法表所示:
General constraints information syntax
Figure PCTCN2022112282-appb-000010
如上表所示,GCI中设置了一个标志位gci_no_tm_constraints_flag表示MRL模式是否受到限制,在gci_no_tm_constraints_flag为1时,默认sps_tmrl_enabled_flag为0,无需解码sps_tmrl_enabled_flag。在gci_no_tm_constraints_flag为0时,需通过解码相关序列级的标识符来确定sps_tmrl_enabled_flag的值。
本公开一示例性的实施例中,通过GCI中设置的两个标识位分别表示MRL模式是否受到限制和模板使用是否受到限制。在MRL模式或模板使用受到限制时,TMRL模式也受到限制。本实施例中,TMRL允许使用标志为序列级的标识符,所述通过解码确定TMRL允许使用标志的值,包括:解码GCI,根据GCI中用于表示MRL模式是否受到限制的标识位的值,确定MRL模式是否受到限制,及根据GCI中用于表示模板使用是否受到限制的标识位的值,确定模板使用是否受到限制;在MRL模式受到限制或模板使用受到限制的情况下,跳过对TMRL允许使用标志的解码,确定TMRL允许 使用标志的值为表示不允许使用TMRL模式的值;在MRL模式和模板使用均没有受到限制的情况下,继续解码序列级的标识符以确定TMRL允许使用标志的值。
上述实施例中,继续解码序列级的标识符以确定TMRL允许使用标志的值时,可以根据前述实施例中TMRL允许使用标志独立解码,或依赖于MRL允许使用标志和/或模板允许使用标志的解码方法进行解码。
上述实施例的TMRL允许使用标志为序列级的标识符。在其他实施例中,TMRL允许使用标志为图像级或切片级的标识符时,也可以在GCI中设置相应的标识位来表示是否限制TMRL模式(也即表示码流中是否存在图像级或切片级的TMRL允许使用标志)。如果相应的标识位表示限制TMRL模式,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值,跳过对TMRL允许使用标志的解码。如果相应的标识位表示不限制TMRL模式,在TMRL允许使用标志为图像级的标识符时,可继续解码序列级和图像级的标识符以确定TMRL允许使用标志的值;在TMRL允许使用标志为切片级的标识符时,可继续解码序列级、图像级和切片级的标识符以确定TMRL允许使用标志的值。
本公开一示例性的实施例中,使用TMRL允许使用标志,结合当前块是否使用TIMD模式,来控制解码传统的MRL模式和演进后的TMRL模式之间的切换。当前块是否使用TIMD模式可通过解码TIMD模式标志(intra_timd_flag)确定。所述方法还包括:确定当前块是否使用TIMD模式;在当前块使用TIMD模式的情况下,解码当前块的MRL索引,跳过对当前块的TMRL模式语法元素的解码;在当前块不使用TIMD模式的情况下,解码当前块的TMRL模式语法元素,跳过对当前块的MRL索引的解码。
本公开一示例性的实施例中,所述解码当前块的TMRL模式语法元素,包括:解码当前块的TMRL模式标志,得到TMRL模式标志的值,TMRL模式标志用于表示当前块是否使用TMRL模式;根据TMRL模式标志的值确定当前块是否使用TMRL模式:在确定使用TMRL模式的情况下,解码当前块的TMRL模式索引;在不使用TMRL模式的情况下,跳过对当前块的TMRL模式索引的解码。本实施例在解码当前块的TMRL模式索引之后,还包括:构建当前块的TMRL模式的候选列表;根据TMRL模式索引和候选列表确定当前块选中的扩展参考行和帧内预测模式的组合;及,根据选中的组合对当前块预测,得到当前块的预测值。
本实施例相关的CU级的语法元素变化如下表所示:
Figure PCTCN2022112282-appb-000011
Figure PCTCN2022112282-appb-000012
Figure PCTCN2022112282-appb-000013
与前述实施例的语法表不同的时,本实施例是否解码块级的TMRL模式标志cu_tmrl_flag不再仅仅依赖于允许使用MRL模式(sps_mrl_enabled_flag为1),当前块不处于CTU上边缘(((y0%CtbSizeY)>0)和当前块不使用TIMD模式(intra_timd_flag为0即!intra_timd_flag),还依赖于允许使用TMRL模式(sps_tmrl_enabled_flag为1)。是否解码cu_tmrl_flag还可以依赖于其他的不能与TMRL模式组合使用的模式没有被使用。在允许使用MRL模式(sps_mrl_enabled_flag为1),当前块不处于CTU上边缘(((y0%CtbSizeY)>0)成立,以及当前块使用TIMD模式(intra_timd_flag为0)和不允许使用TMRL模式(sps_tmrl_enabled_flag为0)中任一条件成立时,则解码多参考行索引intra_luma_ref_idx。
本实施例中,扩展参考行和帧内预测模式的组合可以是扩展参考行和帧内预测模式的原始组合,也可以是对包括预定角度模式的原始组合进行IPF得到的对应的融合组合。例如一原始组合包括一扩展参考行和一预定角度模式,则该原始组合对应的融合组合是指该扩展参考行和该预定角度模式,以及另一参考行和该预定角度模式的组合。根据该融合组合对当前块进行预测时,是根据该扩展参考行和该预定角度模式对当前块进行预测得到第一预测结果,根据另一参考行和该预定角度模式对当前块进行预测得到第二预测结果,将第一预测结果和第二预测结果的加权和作为当前块的预测值。
上述预定角度模式可以包括全部角度模式,或者包括部分角度模式,例如包括除整数斜率的角度模式之外的其他角度模式,或包括除角度为-45°、0°、45°、90°、135°的角度模式之外的其他角度模式。融合组合中的另一参考行,可以是对应原始组合中的该扩展参考行的相邻行(可以是内侧的相邻行或外侧的相邻行),或者是索引为0的参考行。
以参与组合的扩展参考行为索引为{1,3,5,7,12}的参考行为例,在原始组合为索引为1的参考行与某一角度模式的组合时,对应的融合组合包括索引为1的参考行与该角度模式的组合及索引为2(或索引为0)的参考行与该角度模式的组合。基于该融合组合对当前块预测时,根据索引为1的参考行和该角度模式的预测结果,以及索引为2(或索引为0)的参考行和该角度模式的预测结果进行加权,得到当前块的预测值。
本实施例的一示例中,所述构建当前块的TMRL模式的候选列表,包括:
根据当前块的N个扩展参考行和M个帧内预测模式得到扩展参考行与帧内预测模式的N×M种原始组合;
根据所述N×M种原始组合中包括预定角度模式的原始组合进行帧内预测融合IPF,得到对应的融合组合;
根据所述N×M种原始组合和得到的融合组合分别对当前块的模板区域进行预测,计算所述模板区域的重建值和预测得到的预测值之间的误差;
按照所述误差从小到大的顺序,将所述误差对应的K种组合填入当前块的TMRL模式的候选列表,K,N,M为正整数,1≤K≤N×M。
本实施例另一示例中,所述构建当前块的TMRL模式的候选列表,包括:
根据当前块的N个扩展参考行和M个帧内预测模式得到扩展参考行与帧内预测模式的N×M种原始组合;
根据所述N×M种原始组合分别对当前块的模板区域进行预测,并计算所述模板区域的重建值和 预测得到的预测值之间的误差;
对误差最小的K种原始组合中包括预定角度模式的每一种组合,确定是否需要融合;在需要融合的情况下,对该原始组合进行IPF得到对应的融合组合,将该融合组合填入所述候选列表;在不需要融合的情况下,将该原始组合填入所述候选列表,K,N,M为正整数,1≤K≤N×M。
本示例对每一种组合确定是否需要融合时,根据该原始组合对应的融合组合对当前块的模板区域进行预测,计算所述模板区域的重建值和预测得到的预测值之间的误差,在该原始组合对应的误差大于该融合组合对应的误差的情况下,确定需要融合;在该原始组合对应的误差小于或等于该融合组合对应的误差的情况下,确定不需要融合。
本实施例又一示例中,所述构建当前块的TMRL模式的候选列表,包括:
根据当前块的N个扩展参考行和M个帧内预测模式得到扩展参考行与帧内预测模式的N×M种原始组合;
对所述N×M种原始组合进行融合处理,所述融合处理包括:对所述N×M种原始组合中包括预定角度模式的每一种原始组合,在满足设定条件时,将该原始组合替换为对该原始组合进行IPF得到的对应的融合组合;
根据融合处理后的N×M种组合分别对当前块的模板区域进行预测,并计算所述模板区域的重建值和预测得到的预测值之间的误差;
按照所述误差从小到大的顺序,将所述误差对应的K种组合填入当前块的TMRL模式的候选列表;K,N,M为正整数,1≤K≤N×M。
本示例中,所述设定条件包括以下条件中的任意一种或多种:当前块的尺寸大于NxM,N,M为正整数;当前块选中的帧内预测模式不是整数斜率的角度模式。但本示例可以设定的条件不局限于此。
本实施例的上述三个示例,提供了三种在构建TMRL的候选列表里结合IPF的方式,可以利用IPF方式提高TMRL模式的编码效率。
本实施例的上述结合IPF的示例中,在根据选中的组合对当前块进行预测,得到当前块的预测值时,包括:
在选中的组合为原始组合的情况下,根据该原始组合中的扩展参考行和帧内预测模式对当前块进行预测,得到当前块的预测值;
在选中的组合为融合组合的情况下,将第一预测结果和第二预测结果的加权和作为当前块的预测值;其中,第一预测结果是根据该融合组合对应的原始组合中的扩展参考行和预定角度模式对当前块进行预测的结果,第二预测结果是根据另一参考行和该融合组合对应的原始组合中的预定角度模式对当前块进行预测的结果。如前所述,该另一参考行可以与该融合组合对应的原始组合中的扩展参考行相邻,或者为索引为0的参考行。
本示例中,所述第一预测结果和第二预测结果的加权和可以按照以下公式计算:
p fusion=(w ap a+w bp b)>>shift;或者
p fusion=(w ap a+w bp b+offset)>>shift
其中,p a为所述第一预测结果,p b为所述第二预测结果,p fusion当前块最终的预测结果,w a为p a的权重,w b为p b的权重;
其中,w a+w b=(1<<shift),offset=1<<(shift-1),shift≥1,shift和offset为设定的参数。
通常对两个预测结果加权使用的两个权重之和为1,为了避免小数运算,上述公式中的w a和w b是经过左移操作放大后的权重,故w a+w b=(1<<shift)。公式中通过右移操作来恢复预测值的大小。公式中的">>”是右移符号,“<<”是左移符号,符号右侧是右移或左移的位数。
本公开一实施例还提供了一种视频编码方法,应用于编码器,如图11所示,包括:
步骤510,确定TMRL允许使用标志的值;
步骤520,对当前块编码时:在TMRL允许使用标志的值表示允许使用TMRL模式的情况下,允许编码当前块的TMRL模式语法元素;在TMRL允许使用标志的值表示不允许使用TMRL模式的情况下,跳过对当前块的TMRL模式语法元素的编码。
本实施例通过TMRL允许使用标志的值来控制TMRL模式的使用及语法元素的编码,可提高TMRL模式使用的灵活性和适应性,作为一个示例,可以在硬件不支持TMRL模式时,将TMRL允许使用标志的值设为0,表示不允许使用TMRL模式,如硬件支持TMRL模式,将TMRL允许使用标志的值设为1,表示允许使用TMRL模式。
本公开一示例性的实施例中,TMRL允许使用标志是序列级的标识符,在其他实施例,TMRL允许使用标志可以是图像级或切片级的标识符。
本公开一示例性的实施例中,TMRL允许使用标志可单独编码,不依赖于其他标志。此时,可以根据配置信息或设定条件确定TMRL允许使用标志的值,编码TMRL允许使用标志。上述配置信息可以记录在配置文件中。上述设定条件可以是其他标志外设定的条件,如图像尺寸、图像质量要求、传输带宽、可使用的计算资源等等。TMRL允许使用标志是1bit的标识符,值为0或1,编码时可直接将TMRL允许使用标志的值写入码流。
本公开一示例性的实施例中,TMRL允许使用标志的编码依赖于MRL允许使用标志。所述确定TMRL允许使用标志的值,包括:确定MRL允许使用标志的值;在MRL允许使用标志的值表示不允许使用MRL的情况下,跳过对TMRL允许使用标志的编码,默认TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在MRL允许使用标志表示允许使用MRL的情况下,再根据配置信息或设定条件确定TMRL允许使用标志的值,编码TMRL允许使用标志。本实施例中,MRL允许使用标志的值可根据配置信息或设定条件确定。
本实施例中,TMRL允许使用标志为序列级的标识符,MRL允许使用标志为序列级的标识符。在另一实施例中,TMRL允许使用标志为图像级的标识符,MRL允许使用标志可以为序列级或图像级的标识符。在又一实施例中,TMRL允许使用标志为切片级的标识符,MRL允许使用标志可以为序列级或图像级或切片级的标识符。这些实施例中,TMRL允许使用标志和MRL允许使用标志为同一级别的标识符时,MRL允许使用标志的编码顺序位于TMRL允许使用标志之前。
本公开一示例性的实施例中,TMRL允许使用标志的编码依赖于模板允许使用标志。所述确定TMRL允许使用标志的值,包括:确定模板允许使用标志的值;在模板允许使用标志的值表示不允许使用模板的情况下,跳过对TMRL允许使用标志的编码,默认TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在模板允许使用标志表示允许使用模板的情况下,再根据配置信息或设定条件确定TMRL允许使用标志的值,编码TMRL允许使用标志。模板允许使用标志的值可根据配置信息或设定条件确定。
本实施例中,TMRL允许使用标志为序列级的标识符,模板允许使用标志为序列级的标识符。在另一实施例中,TMRL允许使用标志为图像级的标识符,模板允许使用标志可以为序列级或图像级的标识符。在又一实施例中,TMRL允许使用标志为切片级的标识符,模板允许使用标志可以为序列级或图像级或切片级的标识符。这些实施例中,TMRL允许使用标志和模板允许使用标志为同一级别的标识符时,模板允许使用标志的编码顺序位于TMRL允许使用标志之前。
本公开一示例性的实施例中,TMRL允许使用标志的编码依赖于模板允许使用标志和模板允许使用标志。所述确定TMRL允许使用标志的值,包括:确定MRL允许使用标志的值和模板允许使用标志的值;在MRL允许使用标志的值表示允许使用MRL,且模板允许使用标志的值表示允许使用模板的情况下,再根据配置信息或设定条件确定TMRL允许使用标志的值,编码TMRL允许使用标志;在MRL允许使用标志的值表示不允许使用MRL,或模板允许使用标志的值表示不允许使用模板的情况下,跳过对TMRL允许使用标志的编码,默认TMRL允许使用标志的值为表示不允许使用TMRL模式的值。
本实施例中,TMRL允许使用标志为序列级的标识符,MRL允许使用标志和模板允许使用标志为序列级的标识符。在另一实施例中,TMRL允许使用标志为图像级的标识符,MRL允许使用标志和模板允许使用标志可以为序列级或图像级的标识符。在又一实施例中,TMRL允许使用标志为切片级的标识符,MRL允许使用标志和模板允许使用标志可以为序列级或图像级或切片级的标识符。这些实施例中,TMRL允许使用标志、MRL允许使用标志和模板允许使用标志为同一级别的标识符 时,MRL允许使用标志和模板允许使用标志的编码顺序位于TMRL允许使用标志之前。
在TMRL允许使用标志为序列级的标识符时,可以通过在GCI中设置的标识位来限制TMRL模式的使用,当该标识位的值表示限制MRL模式的情况下,不需要编码TMRL允许使用标志。
本公开一示例性的实施例中,在GCI中设置一个标识位表示TMRL模式是否受到限制,TMRL模式是否受到限制不依赖于GCI中的其他标识位。本实施例中,TMRL允许使用标志是序列级的标识符,所述确定TMRL允许使用标志的值,包括:根据GCI中用于表示TMRL模式是否受到限制的标识位的值,确定TMRL模式是否受到限制;在TMRL模式受到限制的情况下,跳过对TMRL允许使用标志的编码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在TMRL模式没有受到限制的情况下,继续编码序列级的标识符以确定TMRL允许使用标志的值。
本公开一示例性的实施例中,在GCI中设置一个标识位表示MRL模式是否受到限制,而在MRL模式受到限制时,TMRL模式也受到限制。本实施例中,TMRL允许使用标志是序列级的标识符,所述确定TMRL允许使用标志的值,包括:根据GCI中用于表示MRL是否受到限制的标识位的值,确定MRL模式是否受到限制;在MRL模式受到限制时,跳过对TMRL允许使用标志的编码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在MRL模式没有受到限制时,继续编码序列级的标识符以确定所述TMRL允许使用标志的值。
本公开一示例性的实施例中,在GCI中设置一个标识位表示模板使用是否受到限制,而在MRL模式受到限制或模板使用受到限制时,TMRL模式也受到限制。本实施例中,TMRL允许使用标志是序列级的标识符,所述确定TMRL允许使用标志的值,包括:根据GCI中用于表示模板使用是否受到限制的标识位的值,确定模板使用是否受到限制;在模板使用受到限制的情况下,跳过对TMRL允许使用标志的编码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在模板使用没有受到限制的情况下,继续编码序列级的标识符以确定TMRL允许使用标志的值。
本公开一示例性的实施例中,在GCI中设置两个标识位分别表示MRL模式是否受到限制和模板使用是否受到限制,而在MRL模式受到限制或模板使用受到限制时,TMRL模式也受到限制。本实施例中,TMRL允许使用标志是序列级的标识符,所述确定TMRL允许使用标志的值,包括:根据GCI中用于表示MRL模式是否受到限制的标识位的值,确定MRL模式是否受到限制,及根据GCI中用于表示模板使用是否受到限制的标识位的值,确定模板使用是否受到限制;在MRL模式受到限制或模板使用受到限制的情况下,跳过对TMRL允许使用标志的编码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;在MRL模式没有受到限制且模板使用没有受到限制的情况下,继续编码序列级的标识符以确定TMRL允许使用标志的值。
上述实施例中,继续编码序列级的标识符以确定TMRL允许使用标志的值时,可以采用前述实施例中TMRL允许使用标志独立编码的方式,根据配置信息或设定条件确定TMRL允许使用标志的值;或采用TMRL允许使用标志依赖于MRL允许使用标志和/或模板允许使用标志的编码方法进行编码,以确定TMRL允许使用标志的值。
上述实施例TMRL允许使用标志为序列级的标识符。在其他实施例中,TMRL允许使用标志为图像级或切片级的标识符时,也可以在GCI中设置相应的标识位来表示是否限制TMRL模式(也即表示码流中是否存在图像级或切片级的TMRL允许使用标志)。如果相应的标识位表示限制TMRL模式,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值,跳过对TMRL允许使用标志的编码。如果相应的标识位表示不限制TMRL模式,在TMRL允许使用标志为图像级的标识符时,可继续编码序列级和图像级的标识符以确定TMRL允许使用标志的值;在TMRL允许使用标志为切片级的标识符时,可继续编码序列级、图像级和切片级的标识符以确定TMRL允许使用标志的值。
本公开一示例性的实施例中,使用TMRL允许使用标志,结合当前块是否使用TIMD模式,来控制编码传统的MRL模式和演进后的TMRL模式之间的切换。当前块是否使用TIMD模式可通过TIMD模式标志(intra_timd_flag)的值确定。本实施例在所述TMRL允许使用标志的值表示允许使用TMRL模式的情况下,所述方法还包括:确定当前块是否使用TIMD模式;在当前块使用TIMD模式的情况下,编码当前块的MRL索引,跳过对当前块的TMRL模式语法元素的编码;在当前块不使用TIMD模式的情况下,编码当前块的TMRL模式语法元素,跳过对当前块的MRL索引的编码。
本公开一示例性的实施例中,所述编码当前块的TMRL模式语法元素,包括:构建当前块的TMRL模式的候选列表;通过率失真优化,为当前块选中一种参考行和帧内预测模式的组合;及,在当前 块的TMRL模式的编码条件满足时,编码当前块的TMRL模式标志以表示当前块使用TMRL模式,编码当前块的TMRL模式索引以表示所述选中的组合在所述候选列表中的位置;其中,所述编码条件至少包括:所述选中的组合在所述候选列表中(此时选中的参考行为扩展参考行)。
本实施例的一个示例中,所述编码条件还包括以下任意一种或多种:当前块为亮度帧中的块;当前块不位于编码树单元CTU的上边界;当前块允许使用多参考行MRL;当前块允许使用模板;当前块的尺寸满足使用TMRL模式对当前块的尺寸要求;当前块的长宽比满足使用TMRL模式对当前块长宽比的要求。
本实施例的一个示例中,在构建TMRL的候选列表时,可以对扩展参考行和角度模式的原始组合进行IPF得到对应的融合组合,将融合组合填入候选列表。此时,上述参考行和帧内预测模式的组合可以是索引为0的参考行与帧内预测模式的组合,扩展参考行和帧内预测模式的原始组合,或对原始组合进行IPF得到的扩展参考行和帧内预测模式的融合组合。将融合组合填入候选列表的方法可以采用前述实施例中使用IPF构建当前块的TMRL模式的候选列表的任意方法,在此不再赘述。
本公开一实施例还提供了一种码流,其中,所述码流通过本公开任一实施例所述的视频编码方法生成。
本公开一实施例还提供了一种视频解码装置,如图12所示,包括处理器71以及存储有计算机程序的存储器73,其中,所述处理器71执行所述计算机程序时能够实现本文任一实施例所述的视频解码方法。
本公开一实施例还提供了一种视频编码装置,包括处理器以及存储有计算机程序的存储器,其中,所述处理器执行所述计算机程序时能够实现本公开任一实施例所述的视频编码方法。
本公开一实施例还提供了一种视频编解码***,其中,包括本公开任一实施例所述的视频编码装置和本公开任一实施例所述的视频解码装置。
本公开一实施例还提供了一种非瞬态计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序时被处理器执行时实现本公开任一实施例所述的视频解码方法,或实现本公开任一实施例所述的视频编码方法。
本公开上述实施例的处理器可以是通用处理器,包括中央处理器(CPU)、网络处理器(Network Processor,简称NP)、微处理器等等,也可以是其他常规的处理器等;所述处理器还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)、离散逻辑或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,或其它等效集成或离散的逻辑电路,也可以是上述器件的组合。即上述实施例的处理器可以是实现本发明实施例中公开的各方法、步骤及逻辑框图的任何处理器件或器件组合。如果部分地以软件来实施本公开实施例,那么可将用于软件的指令存储在合适的非易失性计算机可读存储媒体中,且可使用一个或多个处理器在硬件中执行所述指令从而实施本公开实施例的方法。本文中所使用的术语“处理器”可指上述结构或适合于实施本文中所描述的技术的任意其它结构。
在以上一个或多个示例性实施例中,所描述的功能可以硬件、软件、固件或其任一组合来实施。如果以软件实施,那么功能可作为一个或多个指令或代码存储在计算机可读介质上或经由计算机可读介质传输,且由基于硬件的处理单元执行。计算机可读介质可包含对应于例如数据存储介质等有形介质的计算机可读存储介质,或包含促进计算机程序例如根据通信协议从一处传送到另一处的任何介质的通信介质。以此方式,计算机可读介质通常可对应于非暂时性的有形计算机可读存储介质或例如信号或载波等通信介质。数据存储介质可为可由一个或多个计算机或者一个或多个处理器存取以检索用于实施本公开中描述的技术的指令、代码和/或数据结构的任何可用介质。计算机程序产品可包含计算机可读介质。
举例来说且并非限制,此类计算机可读存储介质可包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储装置、磁盘存储装置或其它磁性存储装置、快闪存储器或可用来以指令或数据结构的形式存储所要程序代码且可由计算机存取的任何其它介质。而且,还可以将任何连接称作计算机可读介质举例来说,如果使用同轴电缆、光纤电缆、双绞线、数字订户线(DSL)或例如红外线、无线电及微波等无线技术从网站、服务器或其它远程源传输指令,则同轴电缆、光纤电缆、双纹线、DSL或例如 红外线、无线电及微波等无线技术包含于介质的定义中。然而应了解,计算机可读存储介质和数据存储介质不包含连接、载波、信号或其它瞬时(瞬态)介质,而是针对非瞬时有形存储介质。如本文中所使用,磁盘及光盘包含压缩光盘(CD)、激光光盘、光学光盘、数字多功能光盘(DVD)、软磁盘或蓝光光盘等,其中磁盘通常以磁性方式再生数据,而光盘使用激光以光学方式再生数据。上文的组合也应包含在计算机可读介质的范围内。
在一些方面中,本文描述的功能性可提供于经配置以用于编码和解码的专用硬件和/或软件模块内,或并入在组合式编解码器中。并且,可将所述技术完全实施于一个或多个电路或逻辑元件中。
本公开实施例的技术方案可在广泛多种装置或设备中实施,包含无线手机、集成电路(IC)或一组IC(例如,芯片组)。本公开实施例中描各种组件、模块或单元以强调经配置以执行所描述的技术的装置的功能方面,但不一定需要通过不同硬件单元来实现。而是,如上所述,各种单元可在编解码器硬件单元中组合或由互操作硬件单元(包含如上所述的一个或多个处理器)的集合结合合适软件和/或固件来提供。

Claims (38)

  1. 一种视频解码方法,应用于解码器,包括:
    通过解码确定基于模板的多参考行帧内预测TMRL允许使用标志的值;
    对当前块解码时:
    在所述TMRL允许使用标志的值表示允许使用TMRL模式的情况下,允许解码当前块的TMRL模式语法元素;
    在所述TMRL允许使用标志的值表示不允许使用TMRL模式的情况下,跳过对当前块的TMRL模式语法元素的解码。
  2. 如权利要求1所述的方法,其中,
    所述TMRL允许使用标志是序列级的标识符,或者是图像级的标识符,或者是切片级的标识符。
  3. 如权利要求1所述的方法,其中,
    所述通过解码确定TMRL允许使用标志的值,包括:通过解码TMRL允许使用标志,得到所述TMRL允许使用标志的值。
  4. 如权利要求1所述的方法,其中,
    所述通过解码确定TMRL允许使用标志的值,包括:
    解码MRL允许使用标志,得到所述MRL允许使用标志的值;
    在所述MRL允许使用标志的值表示不允许使用MRL的情况下,跳过对所述TMRL允许使用标志的解码,默认所述TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在所述MRL允许使用标志表示允许使用MRL的情况下,再解码所述TMRL允许使用标志,得到所述TMRL允许使用标志的值。
  5. 如权利要求1所述的方法,其中,
    所述通过解码确定TMRL允许使用标志的值,包括:
    解码模板允许使用标志,得到所述模板允许使用标志的值;
    在所述模板允许使用标志的值表示不允许使用模板的情况下,跳过对所述TMRL允许使用标志的解码,默认所述TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在所述模板允许使用标志表示允许使用模板的情况下,再解码所述TMRL允许使用标志,得到所述TMRL允许使用标志的值。
  6. 如权利要求1所述的方法,其中,
    所述通过解码确定TMRL允许使用标志的值,包括:
    解码MRL允许使用标志和模板允许使用标志,得到所述MRL允许使用标志的值和所述模板允许使用标志的值;
    在所述MRL允许使用标志的值表示允许使用MRL,且所述模板允许使用标志的值表示允许使用模板的情况下,再解码所述TMRL允许使用标志,,得到所述TMRL允许使用标志的值;
    在所述MRL允许使用标志的值表示不允许使用MRL,或所述模板允许使用标志的值表示不允许使用模板的情况下,跳过对所述TMRL允许使用标志的解码,默认所述TMRL允许使用标志的值为表示不允许使用TMRL模式的值。
  7. 如权利要求1所述的方法,其中,
    所述TMRL允许使用标志为序列级的标识符,所述通过解码确定TMRL允许使用标志的值,包括:
    解码通用限制信息GCI,根据GCI中用于表示TMRL模式是否受到限制的标识位的值,确定TMRL模式是否受到限制;
    在TMRL模式受到限制的情况下,跳过对TMRL允许使用标志的解码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在TMRL模式没有受到限制的情况下,继续解码序列级的标识符以确定TMRL允许使用标志的值。
  8. 如权利要求1所述的方法,其中,
    所述TMRL允许使用标志为序列级的标识符,所述通过解码确定TMRL允许使用标志的值,包括:
    解码GCI,根据GCI中用于表示MRL是否受到限制的标识位的值,确定MRL模式是否受到限制;
    在MRL模式受到限制的情况下,跳过对TMRL允许使用标志的解码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在MRL模式没有受到限制的情况下,继续解码序列级的标识符以确定TMRL允许使用标志的值。
  9. 如权利要求1所述的方法,其中,所述TMRL允许使用标志为序列级的标识符,所述通过解码确定TMRL允许使用标志的值,包括:
    解码GCI,根据GCI中用于表示模板使用是否受到限制的标识位的值,确定模板使用是否受到限制;
    在模板使用受到限制的情况下,跳过对TMRL允许使用标志的解码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在模板使用没有受到限制的情况下,继续解码序列级的标识符以确定TMRL允许使用标志的值。
  10. 如权利要求1所述的方法,其中,所述TMRL允许使用标志为序列级的标识符,所述通过解码确定TMRL允许使用标志的值,包括:
    解码GCI,根据GCI中用于表示MRL模式是否受到限制的标识位的值,确定MRL模式是否受到限制,及根据GCI中用于表示模板使用是否受到限制的标识位的值,确定模板使用是否受到限制;
    在MRL模式受到限制或模板使用受到限制的情况下,跳过对TMRL允许使用标志的解码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在MRL模式没有受到限制且模板使用没有受到限制的情况下,继续解码序列级的标识符以确定TMRL允许使用标志的值。
  11. 如权利要求1所述的方法,其中,
    在所述TMRL允许使用标志的值表示允许使用TMRL模式的情况下,所述方法还包括:
    确定当前块是否使用基于模板的帧内预测模式导出TIMD模式;
    在当前块使用TIMD模式的情况下,解码当前块的多参考行MRL索引,跳过对当前块的TMRL模式语法元素的解码;
    在当前块不使用TIMD模式的情况下,解码当前块的TMRL模式语法元素,跳过对当前块的MRL索引的解码。
  12. 如权利要求1所述的方法,其中,
    所述解码当前块的TMRL模式语法元素,包括:
    解码当前块的TMRL模式标志,得到所述TMRL模式标志的值;所述TMRL模式标志用于表示当前块是否使用TMRL模式;
    根据所述TMRL模式标志的值确定当前块是否使用TMRL模式;在确定使用TMRL模式的情况下,解码当前块的TMRL模式索引;在确定不使用TMRL模式的情况下,跳过对当前块的TMRL模式索引的解码;
    解码当前块的TMRL模式索引之后,所述方法还包括:构建当前块的TMRL模式的候选列表;根据所述TMRL模式索引和候选列表确定当前块选中的扩展参考行和帧内预测模式的组合;及根据 选中的组合对当前块预测,得到当前块的预测值。
  13. 如权利要求12所述的方法,其中,
    所述构建当前块的TMRL模式的候选列表,包括:
    根据当前块的N个扩展参考行和M个帧内预测模式得到扩展参考行与帧内预测模式的N×M种原始组合;
    根据所述N×M种原始组合中包括预定角度模式的原始组合进行帧内预测融合IPF,得到对应的融合组合;
    根据所述N×M种原始组合和得到的融合组合分别对当前块的模板区域进行预测,计算所述模板区域的重建值和预测得到的预测值之间的误差;
    按照所述误差从小到大的顺序,将所述误差对应的K种组合填入当前块的TMRL模式的候选列表,K,N,M为正整数,1≤K≤N×M。
  14. 如权利要求12所述的方法,其中,
    所述构建当前块的TMRL模式的候选列表,包括:
    根据当前块的N个扩展参考行和M个帧内预测模式得到扩展参考行与帧内预测模式的N×M种原始组合;
    根据所述N×M种原始组合分别对当前块的模板区域进行预测,并计算所述模板区域的重建值和预测得到的预测值之间的误差;
    对误差最小的K种原始组合中包括预定角度模式的每一种原始组合,确定是否需要融合;在需要融合的情况下,对该原始组合进行IPF得到对应的融合组合,将该融合组合填入所述候选列表;在不需要融合的情况下,将该原始组合填入所述候选列表,K,N,M为正整数,1≤K≤N×M。
  15. 如权利要求12所述的方法,其中,
    所述对误差最小的K种原始组合中包括预定角度模式的每一种原始组合,确定是否需要融合,包括:
    根据该原始组合对应的融合组合对当前块的模板区域进行预测,并计算所述模板区域的重建值和预测得到的预测值之间的误差,在该原始组合对应的误差大于该融合组合对应的误差的情况下,确定需要融合;在该原始组合对应的误差小于或等于该融合组合对应的误差的情况下,确定不需要融合。
  16. 如权利要求12所述的方法,其中,
    所述构建当前块的TMRL模式的候选列表,包括:
    根据当前块的N个扩展参考行和M个帧内预测模式得到扩展参考行与帧内预测模式的N×M种原始组合;
    对所述N×M种原始组合进行融合处理,所述融合处理包括:对所述N×M种原始组合中包括预定角度模式的每一种原始组合,在满足设定条件时,将该原始组合替换为对该原始组合进行IPF得到的对应的融合组合;
    根据融合处理后的N×M种组合分别对当前块的模板区域进行预测,并计算所述模板区域的重建值和预测得到的预测值之间的误差;
    按照所述误差从小到大的顺序,将所述误差对应的K种组合填入当前块的TMRL模式的候选列表;K,N,M为正整数,1≤K≤N×M。
  17. 如权利要求16所述的方法,其中,
    所述设定条件包括以下条件中的任意一种或多种:
    当前块的尺寸大于NxM,N,M为正整数;
    当前块选中的帧内预测模式不是整数斜率的角度模式。
  18. 如权利要求13至17中任一所述的方法,其中,
    所述根据选中的组合对当前块进行预测,得到当前块的预测值,包括:
    在选中的组合为原始组合的情况下,根据该原始组合中的扩展参考行和帧内预测模式对当前块进行预测,得到当前块的预测值;
    在选中的组合为融合组合的情况下,将第一预测结果和第二预测结果的加权和作为当前块的预测值;其中,所述第一预测结果是根据该融合组合对应的原始组合中的扩展参考行和预定角度模式对当前块进行预测的结果,所述第二预测结果是根据另一参考行和该融合组合对应的原始组合中的预定角度模式对当前块进行预测的结果。
  19. 如权利要求18所述的方法,其中,
    所述预定角度模式包括全部角度模式,或包括除整数斜率的角度模式之外的其他角度模式;
    所述另一参考行与该融合组合对应的原始组合中的扩展参考行相邻,或者,所述另一参考行为索引为0的参考行。
  20. 如权利要求18所述的方法,其中,
    所述第一预测结果和第二预测结果的加权和按照以下公式计算:
    p fusion=(w ap a+w bp b)>>shift
    或者
    p fusion=(w ap a+w bp b+offset)>>shift
    其中,p a为所述第一预测结果,p b为所述第二预测结果,p fusion当前块最终的预测结果,w a为p a的权重,w b为p b的权重;
    其中,w a+w b=(1<<shift),offset=1<<(shift-1),shift≥1,shift和offset为设定的参数。
  21. 一种视频编码方法,应用于编码器,包括:
    确定基于模板的多参考行帧内预测TMRL允许使用标志的值;
    对当前块编码时:
    在所述TMRL允许使用标志的值表示允许使用TMRL模式的情况下,允许编码当前块的TMRL模式语法元素;
    在所述TMRL允许使用标志的值表示不允许使用TMRL模式的情况下,跳过对当前块的TMRL模式语法元素的编码。
  22. 如权利要求21所述的方法,其中,
    所述TMRL允许使用标志是序列级的标识符,或者是图像级的标识符,或者是切片级的标识符。
  23. 如权利要求21所述的方法,其中,
    所述确定TMRL允许使用标志的值,包括:根据配置信息或设定条件确定所述TMRL允许使用标志的值,编码所述TMRL允许使用标志。
  24. 如权利要求21所述的方法,其中,
    所述确定TMRL允许使用标志的值,包括:确定多参考行MRL允许使用标志的值;
    在所述MRL允许使用标志的值表示不允许使用MRL的情况下,跳过对所述TMRL允许使用标志的编码,默认所述TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在所述MRL允许使用标志表示允许使用MRL的情况下,再根据配置信息或设定条件确定所述TMRL允许使用标志的值,编码所述TMRL允许使用标志。
  25. 如权利要求21所述的方法,其中,
    所述确定TMRL允许使用标志的值,包括:确定模板允许使用标志的值;
    在所述模板允许使用标志的值表示不允许使用模板的情况下,跳过对所述TMRL允许使用标志的编码,默认所述TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在所述模板允许使用标志表示允许使用模板的情况下,再根据配置信息或设定条件确定所述 TMRL允许使用标志的值,编码所述TMRL允许使用标志。
  26. 如权利要求21所述的方法,其中,
    所述确定TMRL允许使用标志的值,包括:
    确定MRL允许使用标志的值和模板允许使用标志的值;
    在所述MRL允许使用标志的值表示允许使用MRL,且所述模板允许使用标志的值表示允许使用模板的情况下,再根据配置信息或设定条件确定所述TMRL允许使用标志的值,编码所述TMRL允许使用标志;
    在所述MRL允许使用标志的值表示不允许使用MRL,或所述模板允许使用标志的值表示不允许使用模板的情况下,跳过对所述TMRL允许使用标志的编码,默认所述TMRL允许使用标志的值为表示不允许使用TMRL模式的值。
  27. 如权利要求21所述的方法,其中,
    所述TMRL允许使用标志是序列级的标识符,所述确定TMRL允许使用标志的值,包括:
    根据GCI中用于表示TMRL模式是否受到限制的标识位的值,确定TMRL模式是否受到限制;
    在TMRL模式受到限制的情况下,跳过对TMRL允许使用标志的编码,确定所述TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在TMRL模式没有受到限制的情况下,继续编码序列级的标识符以确定TMRL允许使用标志的值。
  28. 如权利要求21所述的方法,其中,
    所述TMRL允许使用标志是序列级的标识符,所述确定TMRL允许使用标志的值,包括:
    根据GCI中用于表示MRL是否受到限制的标识位的值,确定MRL模式是否受到限制;
    在MRL模式受到限制的情况下,跳过对TMRL允许使用标志的编码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在MRL模式没有受到限制的情况下,继续编码序列级的标识符以确定TMRL允许使用标志的值。
  29. 如权利要求21所述的方法,其中,
    所述TMRL允许使用标志是序列级的标识符,所述确定TMRL允许使用标志的值,包括:
    根据GCI中用于表示模板使用是否受到限制的标识位的值,确定模板使用是否受到限制;
    在模板使用受到限制的情况下,跳过对TMRL允许使用标志的编码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在模板使用没有受到限制的情况下,继续编码序列级的标识符以确定TMRL允许使用标志的值。
  30. 如权利要求21所述的方法,其中,
    所述TMRL允许使用标志是序列级的标识符,所述确定TMRL允许使用标志的值,包括:
    根据GCI中用于表示MRL模式是否受到限制的标识位的值,确定MRL模式是否受到限制,及根据GCI中用于表示模板使用是否受到限制的标识位的值,确定模板使用是否受到限制;
    在MRL模式受到限制或模板使用受到限制的情况下,跳过对TMRL允许使用标志的编码,确定TMRL允许使用标志的值为表示不允许使用TMRL模式的值;
    在MRL模式没有受到限制且模板使用没有受到限制的情况下,继续编码序列级的标识符以确定TMRL允许使用标志的值。
  31. 如权利要求21所述的方法,其中,
    在所述TMRL允许使用标志的值表示允许使用TMRL模式的情况下,所述方法还包括:
    确定当前块是否使用基于模板的帧内预测模式导出TIMD模式;
    在当前块使用TIMD模式的情况下,编码当前块的MRL索引,跳过对当前块的TMRL模式语法元素的编码;
    在当前块不使用TIMD模式的情况下,编码当前块的TMRL模式语法元素,跳过对当前块的MRL索引的编码。
  32. 如权利要求21或31所述的方法,其中,
    所述编码当前块的TMRL模式语法元素,包括:
    构建当前块的TMRL模式的候选列表;
    通过率失真优化,为当前块选中一种参考行和帧内预测模式的组合;
    在当前块的TMRL模式的编码条件满足时,编码当前块的TMRL模式标志以表示当前块使用TMRL模式,编码当前块的TMRL模式索引以表示当前块选中的所述组合在所述候选列表中的位置;
    其中,所述编码条件至少包括:所述选中的组合在所述候选列表中。
  33. 如权利要求32所述的方法,其中,
    所述编码条件还包括以下任意一种或多种:
    当前块为亮度帧中的块;
    当前块不位于编码树单元CTU的上边界;
    当前块允许使用多参考行MRL;
    当前块允许使用模板;
    当前块的尺寸满足使用TMRL模式对当前块的尺寸要求;
    当前块的长宽比满足使用TMRL模式对当前块长宽比的要求。
  34. 一种码流,其中,所述码流通过如权利要求21至33中任一所述的视频编码方法生成。
  35. 一种视频解码装置,包括处理器以及存储有计算机程序的存储器,其中,所述处理器执行所述计算机程序时能够实现如权利要求1至20中任一所述的视频解码方法。
  36. 一种视频编码装置,包括处理器以及存储有计算机程序的存储器,其中,所述处理器执行所述计算机程序时能够实现如权利要求21至33中任一所述的视频编码方法。
  37. 一种视频编解码***,其中,包括如权利要求36所述的视频编码装置和如权利要求35所述的视频解码装置。
  38. 一种非瞬态计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序时被处理器执行时能够实现如权利要求1至20中任一所述的视频解码方法,或实现如权利要求21至33中任一所述的视频编码方法。
PCT/CN2022/112282 2022-08-12 2022-08-12 一种视频编解码方法、装置和*** WO2024031691A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/112282 WO2024031691A1 (zh) 2022-08-12 2022-08-12 一种视频编解码方法、装置和***

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/112282 WO2024031691A1 (zh) 2022-08-12 2022-08-12 一种视频编解码方法、装置和***

Publications (1)

Publication Number Publication Date
WO2024031691A1 true WO2024031691A1 (zh) 2024-02-15

Family

ID=89850509

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/112282 WO2024031691A1 (zh) 2022-08-12 2022-08-12 一种视频编解码方法、装置和***

Country Status (1)

Country Link
WO (1) WO2024031691A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114128266A (zh) * 2019-07-19 2022-03-01 韦勒斯标准与技术协会公司 视频信号处理方法和设备
CN114175635A (zh) * 2019-05-27 2022-03-11 Sk电信有限公司 用于推导帧内预测模式的方法及装置
US20220132171A1 (en) * 2019-07-10 2022-04-28 Lg Electronics Inc. Image coding method and device in image coding system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114175635A (zh) * 2019-05-27 2022-03-11 Sk电信有限公司 用于推导帧内预测模式的方法及装置
US20220132171A1 (en) * 2019-07-10 2022-04-28 Lg Electronics Inc. Image coding method and device in image coding system
CN114128266A (zh) * 2019-07-19 2022-03-01 韦勒斯标准与技术协会公司 视频信号处理方法和设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
L. XU (OPPO), Y. YU (OPPO), H. YU (OPPO), D. WANG (OPPO): "Non-EE2: Template-based multiple reference line intra prediction", 27. JVET MEETING; 20220713 - 20220722; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 18 July 2022 (2022-07-18), XP030302945 *

Similar Documents

Publication Publication Date Title
TWI745594B (zh) 與視訊寫碼中之變換處理一起應用之內部濾波
TWI827609B (zh) 基於區塊之自適應迴路濾波器(alf)之設計及發信令
CN110393010B (zh) 视频译码中的帧内滤波旗标
TWI759389B (zh) 用於視訊寫碼之低複雜度符號預測
US10419757B2 (en) Cross-component filter
JP7382951B2 (ja) 復元されたビデオデータにデブロッキングフィルタを適用するためのシステム及び方法
TWI693822B (zh) 基於調色板之視訊寫碼中之最大調色板參數
TWI670971B (zh) 基於調色板之視訊寫碼中之逃脫樣本寫碼
EP2829064B1 (en) Parameter determination for exp-golomb residuals binarization for lossless intra hevc coding
TW201830964A (zh) 基於在視訊寫碼中之一預測模式導出雙邊濾波器資訊
CN112514386B (zh) 网格编解码量化系数编解码
TW201838415A (zh) 在視訊寫碼中判定用於雙邊濾波之鄰近樣本
TW201737710A (zh) 為視訊寫碼中非方形區塊判定預測參數
TW201722164A (zh) 調色盤模式視訊寫碼中脫逃像素訊號值之限制
US9277211B2 (en) Binarization scheme for intra prediction residuals and improved intra prediction in lossless coding in HEVC
TW201445981A (zh) 視訊寫碼中之禁用符號資料隱藏
JP7393366B2 (ja) 画像の符号化方法、復号化方法、エンコーダおよびデコーダ
WO2024031691A1 (zh) 一种视频编解码方法、装置和***
WO2024007366A1 (zh) 一种帧内预测融合方法、视频编解码方法、装置和***
WO2024007158A1 (zh) 一种候选列表构建方法、视频编解码方法、装置和***
CN114402602A (zh) 用于视频编解码的算术编解码器字节填料信令
WO2024007157A1 (zh) 多参考行索引列表排序方法、视频编解码方法、装置和***
TW202425624A (zh) 一種視訊編解碼方法、裝置和系統
WO2024145851A1 (zh) 帧内模板匹配预测方法、视频编解码方法、装置和***
WO2024145857A1 (zh) 帧内模板匹配预测方法、视频编解码方法、装置和***

Legal Events

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

Ref document number: 22954643

Country of ref document: EP

Kind code of ref document: A1