WO2025007253A1 - 解码方法、编码方法、解码器以及编码器 - Google Patents

解码方法、编码方法、解码器以及编码器 Download PDF

Info

Publication number
WO2025007253A1
WO2025007253A1 PCT/CN2023/105582 CN2023105582W WO2025007253A1 WO 2025007253 A1 WO2025007253 A1 WO 2025007253A1 CN 2023105582 W CN2023105582 W CN 2023105582W WO 2025007253 A1 WO2025007253 A1 WO 2025007253A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
block vector
vector information
historical
current
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2023/105582
Other languages
English (en)
French (fr)
Inventor
张莱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to PCT/CN2023/105582 priority Critical patent/WO2025007253A1/zh
Priority to KR1020257041960A priority patent/KR20260030061A/ko
Priority to CN202380099902.2A priority patent/CN121488470A/zh
Publication of WO2025007253A1 publication Critical patent/WO2025007253A1/zh
Priority to MX2025015139A priority patent/MX2025015139A/es
Priority to US19/422,083 priority patent/US20260106970A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

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/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Definitions

  • the present application relates to the technical field of coding and decoding, and more specifically, to a decoding method, an encoding method, a decoder and an encoder.
  • Digital video compression technology is mainly used to compress huge digital image video data for easy transmission and storage.
  • the present application provides a decoding method, an encoding method, a decoder and an encoder, which can improve the decoding performance of an IBC block and improve the decoding performance of a decoder.
  • the present application provides a decoding method, comprising:
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block, where the IBC block is a block decoded after the current block using the IBC mode.
  • the present application provides an encoding method, comprising:
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block, where the IBC block is a block encoded using the IBC mode after the current block.
  • the present application provides a decoder, comprising:
  • a first determining unit configured to determine block vector information used by a current block based on a first prediction mode different from an intra block copy (IBC) mode;
  • IBC intra block copy
  • a second determining unit configured to determine first historical block vector information based on the block vector information used by the current block
  • an updating unit configured to update a first history block vector information list based on the first history block vector information
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block, where the IBC block is a block decoded after the current block using the IBC mode.
  • an encoder comprising:
  • a first determining unit configured to determine block vector information used by a current block based on a first prediction mode different from an intra block copy (IBC) mode;
  • IBC intra block copy
  • a second determining unit configured to determine first historical block vector information based on the block vector information used by the current block
  • an updating unit configured to update a first history block vector information list based on the first history block vector information
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block, where the IBC block is a block encoded using the IBC mode after the current block.
  • the present application provides a decoder, comprising:
  • a processor adapted to implement computer instructions
  • a computer-readable storage medium stores computer instructions, wherein the computer instructions are suitable for being loaded by a processor and executing the decoding method in the first aspect or its various implementation modes involved above.
  • the number of the processor is one or more, and the number of the memory is one or more.
  • the computer-readable storage medium may be integrated with the processor, or the computer-readable storage medium may be disposed separately from the processor.
  • an encoder comprising:
  • a processor adapted to implement computer instructions
  • a computer-readable storage medium stores computer instructions, wherein the computer instructions are suitable for being loaded by a processor and executing the encoding method in the second aspect or its various implementation modes involved above.
  • the number of the processor is one or more, and the number of the memory is one or more.
  • the computer-readable storage medium may be integrated with the processor, or the computer-readable storage medium may be disposed separately from the processor.
  • the present application provides a computer-readable storage medium, which stores computer instructions.
  • the computer instructions When the computer instructions are read and executed by a processor of a computer device, the computer device executes the decoding method involved in the first aspect mentioned above or the encoding method involved in the second aspect mentioned above.
  • the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium.
  • a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the decoding method involved in the first aspect mentioned above or the encoding method involved in the second aspect mentioned above.
  • the present application provides a code stream, which is a code stream as described in the method of the first aspect or a code stream generated by the method of the second aspect.
  • the first historical block vector information list used to determine the candidate block vector information list is updated based on a first prediction mode different from the IBC mode. Since the candidate block vector information list is a list used by the IBC block decoded using the IBC mode after the current block, updating the first historical block vector information list using the first prediction mode is equivalent to enriching the candidate block vector information of the IBC block using the first prediction mode, which can improve the decoding performance of the IBC block and improve the decoding performance of the decoder.
  • FIG1 is a schematic block diagram of a video encoding and decoding system provided in the present application.
  • FIG. 2 is a schematic block diagram of a video encoder provided by the present application.
  • FIG3 is a schematic structural diagram of the relationship between a coding tree unit and a coding unit provided in the present application.
  • FIG. 4 is a schematic block diagram of a video decoder provided in the present application.
  • FIG. 5 is an example of the principle of the IntraTMP mode provided in the present application.
  • FIG. 6 is an example of the principle of the template matching process adopted by the IntraTMP mode provided in the present application.
  • FIG. 7 is an example of the IntraTMP adaptation technology for camera-captured content provided by the present application.
  • FIG. 8 is an example of the construction principle of the candidate block list provided in the present application.
  • FIG. 9 is an example of the principle of the IntraTMP fusion prediction technology provided in the present application.
  • FIG. 10 is an example of the filtering principle of the filter provided by the present application.
  • FIG. 11 is an example of the principle of determining filter coefficients provided by the present application.
  • FIG. 12 is an example of a method of dividing regions of a current block provided in the present application.
  • FIG13 is a schematic flowchart of the decoding method provided in the present application.
  • FIG14 is a schematic flowchart of the encoding method provided in the present application.
  • FIG15 is a schematic block diagram of a decoder of the present application.
  • FIG16 is a schematic block diagram of an encoder of the present application.
  • FIG. 17 is a schematic structural diagram of an electronic device provided in the present application.
  • the solution provided by the present application can be applied to the field of digital compression technology.
  • digital video compression technology is mainly used to compress huge digital image video data for easy transmission and storage.
  • the solution provided by the present application can be applied to the field of digital video encoding technology.
  • the field of digital video coding technology includes but is not limited to at least one of the following: image coding and decoding field, video coding and decoding field, hardware video coding and decoding field, dedicated circuit video coding and decoding field and real-time video coding and decoding field.
  • the scheme provided in this application can be combined with the following standards: Audio Video Coding Standard (AVS), the second generation AVS standard (AVS2) or the third generation AVS standard (AVS3).
  • AVS Audio Video Coding Standard
  • AVC H.264/Audio Video Coding
  • HEVC High Efficiency Video Coding
  • VVC Very-Versatile Video Coding
  • the scheme provided in this application can be used for lossy compression of images, and can also be used for lossless compression of images.
  • the lossless compression can be visually lossless compression or mathematically lossless compression.
  • the video coding standard may adopt a block-based hybrid coding framework.
  • the hybrid coding framework includes prediction, transform, quantization, entropy coding, in-loop filter and other modules.
  • the prediction module includes intra prediction and/or inter prediction. There is a strong correlation between adjacent pixels in a frame. Intra prediction is used in video coding and decoding technology to eliminate spatial redundancy between adjacent pixels. Intra prediction only refers to the information of the same frame image to predict the pixel information within the current partition block. Since there is a strong similarity between adjacent frames in a video, inter prediction is used in video coding and decoding technology to eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency. Inter prediction includes motion estimation and motion compensation. Inter prediction can refer to image information of different frames and use motion estimation to search for motion vector information that best matches the current partition block.
  • Transformation converts the predicted image block to the frequency domain, redistributes the energy, and combines quantization to remove information that is not sensitive to the human eye, which is used to eliminate visual redundancy.
  • Entropy coding can eliminate character redundancy based on the current context model and the probability information of the binary code stream.
  • the basic process of the video encoder is as follows:
  • the encoder first divides a frame of image into blocks; then predicts the current block (current block) in the current image to obtain the predicted block of the current block; then subtracts the predicted block from the original block of the current block to obtain the residual block; transforms and quantizes the residual block to obtain a quantization coefficient matrix; then entropy codes the quantization coefficient matrix to obtain the output bit stream.
  • the basic process of the video decoder is as follows:
  • the decoder predicts the current block to obtain the prediction block of the current block, and on the other hand, parses the bitstream to obtain the quantization coefficient matrix, dequantizes and inversely transforms the quantization coefficient matrix to obtain the residual block; then the prediction block and the residual block are added to obtain the reconstructed block.
  • the reconstructed blocks form a reconstructed image, and the reconstructed image is loop-filtered based on the image or block to obtain the decoded image.
  • the current block can be the current codec unit (CU) or the current prediction unit (PU), etc.
  • the encoder also needs similar operations as the decoder to obtain a decoded image.
  • the decoded image can provide a reference frame for inter prediction for subsequent frames.
  • the block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information determined by the encoder need to be written into the bitstream if necessary.
  • the decoder determines the same block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information as the encoder by parsing and analyzing the existing information, thereby ensuring that the decoded image obtained by the encoder is the same as the decoded image obtained by the decoder.
  • the decoded image obtained by the encoder is also usually called a reconstructed image.
  • the codec can divide the current block into prediction units during prediction, and can divide the current block into transformation units during transformation.
  • the division of prediction units and transformation units can be different.
  • a and/or B in this article is only a way to describe the association relationship of associated objects, indicating that three relationships may exist.
  • a and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
  • the term "at least one" is only a way to describe the combination relationship of listed objects, indicating that one or more items may exist.
  • at least one of the following: A, B, C can mean the following combinations: A exists alone, B exists alone, C exists alone, A and B exist at the same time, A and C exist at the same time, B and C exist at the same time, and A, B, and C exist at the same time.
  • the term “multiple” means two or more.
  • the character "/" generally indicates that the objects associated before and after are in an "or” relationship.
  • the term “corresponding” may indicate that there is a direct or indirect correspondence between the two, or that there is an association relationship between the two, or that there is an indication and being indicated, configuration and being configured, etc.
  • the term “indication” may be a direct indication, an indirect indication, or an indication of an association relationship.
  • A indicates B, which may indicate that A directly indicates B, such as B can be obtained through A; it may also indicate that A indirectly indicates B, such as A indicates C, B can be obtained through C; it may also indicate that there is an association relationship between A and B.
  • predefined or “preconfigured” may refer to the pre-storage of corresponding codes, tables or other relevant information that can be used for indication in a device (for example, including an encoder or decoder), or it may refer to an agreement by protocol.
  • Protocol may refer to any standard protocol in the field of encoding and decoding, and this application does not limit this.
  • when may be interpreted as “if” or “if” or “when" or “in response to” and other similar descriptions.
  • the phrase “if determined” or “if (stated condition or event) is detected” can be interpreted as “when determined” or “in response to determining” or “when (stated condition or event) is detected” or “in response to detecting (stated condition or event)” and other similar descriptions.
  • the terms “first”, “second”, “third”, “fourth”, “A”, “B”, etc. are used to distinguish different objects, not to describe a specific order.
  • the terms “including” and “having” and any variations thereof are intended to cover non-exclusive inclusions.
  • FIG1 is a schematic block diagram of a video encoding and decoding system involved in an embodiment of the present application.
  • the video encoding and decoding system 100 includes an encoding device 110 and a decoding device 120 .
  • the encoding device 110 is used to encode (which can be understood as compressing) the video data to generate a code stream, and transmit the code stream to the decoding device 120.
  • the decoding device 120 decodes the code stream generated by the encoding device 110 to obtain decoded video data.
  • the encoding device 110 can be understood as a device having a video encoding function
  • the decoding device 120 can be understood as a device having a video decoding function. That is, the encoding device 110 and the decoding device 120 in the present application embodiment include a wider range of devices, such as smartphones, desktop computers, etc. computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, etc.
  • the encoding device 110 may transmit the encoded video data (eg, a bitstream) to the decoding device 120 via the channel 130 .
  • Channel 130 may include one or more media and/or devices capable of transmitting encoded video data from encoding device 110 to decoding device 120 .
  • the channel 130 may include one or more communication media that enable the encoding device 110 to transmit the encoded video data directly to the decoding device 120 in real time.
  • the encoding device 110 may modulate the encoded video data according to a communication standard and transmit the modulated video data to the decoding device 120.
  • the communication media may include wireless communication media, such as radio frequency spectrum.
  • the communication media may also include wired communication media, such as one or more physical transmission lines.
  • the channel 130 may include a storage medium that can store the video data encoded by the encoding device 110.
  • the storage medium includes a variety of locally accessible data storage media, such as an optical disk, a DVD, a flash memory, etc.
  • the decoding device 120 may obtain the encoded video data from the storage medium.
  • the channel 130 may include a storage server that can store the video data encoded by the encoding device 110.
  • the decoding device 120 can download the stored encoded video data from the storage server.
  • the storage server can store the encoded video data and transmit the encoded video data to the decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.
  • FTP file transfer protocol
  • the encoding device 110 includes a video encoder 112 and an output interface 113 .
  • the output interface 113 may include a modulator/demodulator (modem) and/or a transmitter.
  • the video encoder 112 transmits the encoded video data directly to the decoding device 120 via the output interface 113.
  • the encoded video data may also be stored in a storage medium or a storage server for subsequent reading by the decoding device 120.
  • the encoding device 110 may include a video source 111 in addition to the video encoder 112 and the input interface 113 .
  • the video source 111 may include at least one of a video acquisition device (e.g., a video camera), a video archive, a video input interface, and a computer graphics system, wherein the video input interface is used to receive video data from a video content provider, and the computer graphics system is used to generate video data.
  • the video encoder 112 encodes the video data from the video source 111 to generate a bitstream.
  • the video data may include one or more pictures or a sequence of pictures.
  • the bitstream contains the encoding information of the picture or the sequence of pictures in the form of a bitstream.
  • the encoding information may include the encoded picture data and associated data.
  • the associated data may include a sequence parameter set (SPS), a picture parameter set (PPS), and other syntax structures.
  • the SPS may contain parameters applied to one or more sequences.
  • the PPS may contain parameters applied to one or more pictures.
  • the syntax structure refers to a set of zero or more syntax elements arranged in a specified order in the bit
  • the decoding device 120 includes an input interface 121 and a video decoder 122.
  • the input interface 121 may include a receiver and/or a modem.
  • the decoding device 120 may include a display device 123 in addition to the input interface 121 and the video decoder 122 .
  • the input interface 121 may receive the encoded video data through the channel 130.
  • the video decoder 122 is used to decode the encoded video data to obtain decoded video data, and transmit the decoded video data to the display device 123.
  • the display device 123 displays the decoded video data.
  • the display device 123 may be integrated with the decoding device 120 or outside the decoding device 120.
  • the display device 123 may include a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
  • LCD liquid crystal display
  • OLED organic light emitting diode
  • Figure 1 is only an example of the present application and should not be understood as a display of the present application. That is to say, the technical solution of the embodiment of the present application is not limited to the system framework shown in Figure 1.
  • the technology of the present application can also be applied to unilateral video encoding or unilateral video decoding.
  • FIG. 2 is a schematic block diagram of a video encoder 200 according to an embodiment of the present application.
  • the video encoder 200 can be applied to image data in luminance and chrominance (YCbCr, YUV) format.
  • the YUV ratio can be 4:2:0, 4:2:2 or 4:4:4, Y represents brightness (Luma), Cb (U) represents blue chrominance, Cr (V) represents red chrominance, and U and V represent chrominance (Chroma) for describing color and saturation.
  • 4:2:0 means that every 4 pixels have 4 luminance components and 2 chrominance components (YYYYCbCr)
  • 4:2:2 means that every 4 pixels have 4 luminance components and 4 chrominance components (YYYYCbCrCbCr)
  • 4:4:4 represents full pixel display (YYYYCbCrCbCrCbCrCbCr).
  • RGB red-green-blue
  • CTUs can be called “tree blocks", “largest coding units” (LCU) or “coding tree blocks” (CTB).
  • LCU largest coding units
  • CTB coding tree blocks
  • Each CTU can be associated with a pixel block of equal size in the image.
  • Each pixel can correspond to one luminance (luminance or luma) sample and two chrominance (chroma) samples. Therefore, each A CTU can be associated with a luminance sampling block and two chrominance sampling blocks.
  • the size of a CTU can be, for example, 128 ⁇ 128, 64 ⁇ 64, 32 ⁇ 32, etc.
  • FIG 3 is a schematic structural diagram of the relationship between the coding tree unit and the coding unit provided in the present application.
  • a CTU can be further divided into several coding units (Coding Unit, CU) for encoding, and the CU can be a rectangular block or a square block.
  • the CU can be further divided into prediction units (prediction Unit, PU) and transform units (transform unit, TU), thereby separating encoding, prediction, and transformation, and making processing more flexible.
  • the CTU is divided into CUs in a tree manner (such as a quadtree), and the CU is divided into TUs and PUs in a tree manner (such as a quadtree).
  • the video encoder and the video decoder may support various PU sizes.
  • the video encoder and the video decoder may support a PU size of 2N ⁇ 2N or N ⁇ N for intra prediction, and support symmetric PUs of 2N ⁇ 2N, 2N ⁇ N, N ⁇ 2N, N ⁇ N or similar sizes for inter prediction.
  • the video encoder and the video decoder may also support asymmetric PUs of 2N ⁇ nU, 2N ⁇ nD, nL ⁇ 2N, and nR ⁇ 2N for inter prediction.
  • the video encoder 200 may include: a prediction unit 210, a residual unit 220, a transform/quantization unit 230, an inverse transform/quantization unit 240, a reconstruction unit 250, a loop filter unit 260, a decoded image cache 270, and an entropy coding unit 280.
  • the current block may be referred to as a current coding unit (CU) or a current prediction unit (PU), etc.
  • a prediction block may also be referred to as a predicted image block or an image prediction block, and a reconstructed image block may also be referred to as a reconstructed block or an image reconstructed image block.
  • the prediction unit 210 includes an inter prediction unit 211 and an intra prediction unit 212. Since there is a strong correlation between adjacent pixels in an image in a video, an intra prediction method is used to eliminate spatial redundancy between adjacent pixels in video coding and decoding technology. Since there is a strong similarity between adjacent images in a video, an inter prediction method is used to eliminate temporal redundancy between adjacent images, thereby improving coding efficiency.
  • the inter prediction unit 211 can be used for inter prediction, which may include motion estimation and motion compensation. It may refer to the image information of different frames. Inter prediction uses motion information to find a reference block from a reference frame, and generates a prediction block based on the reference block to eliminate temporal redundancy.
  • the reference frame may be a P frame and/or a B frame.
  • a P frame refers to a forward prediction frame
  • a B frame refers to a bidirectional prediction frame.
  • After inter prediction uses motion information to find a reference block, a prediction block is generated based on the reference block.
  • the motion information includes a frame list, a frame index, and a motion vector to which the reference frame belongs.
  • the motion vector may be an integer pixel or a sub-pixel.
  • the motion vector is a sub-pixel
  • an interpolation filter is required in the reference frame to make the required sub-pixel block.
  • the reference block is the integer pixel or sub-pixel block found based on the motion vector.
  • the intra prediction unit 212 only refers to the information of the same frame image to predict the pixel information in the current code image block to eliminate spatial redundancy.
  • the reference frame used for intra prediction can be an I frame.
  • Intra prediction has multiple prediction modes.
  • the image block to be encoded can be predicted with the help of angle prediction mode and non-angle prediction mode to obtain the prediction block.
  • the rate distortion information is calculated to select the optimal prediction mode of the image block to be encoded, and the prediction mode is written into the bitstream for transmission to the decoder.
  • the decoder parses the prediction mode, predicts the prediction block of the target decoding block and superimposes the time domain residual block obtained based on the bitstream to obtain the reconstructed block.
  • the H.264/AVC standard has 8 angle prediction modes and 1 non-angle prediction mode
  • H.265/HEVC is expanded to 33 angle prediction modes and 2 non-angle prediction modes.
  • the intra prediction modes used by HEVC include planar mode, DC and 33 angle modes, a total of 35 prediction modes.
  • the intra-frame modes used by VVC include Planar, DC and 65 angle modes, a total of 67 prediction modes, which include traditional prediction modes and non-traditional prediction modes.
  • Non-traditional prediction modes may include matrix weighted intra-frame prediction (MIP) mode.
  • Traditional prediction modes include: planar mode with mode number 0, DC mode with mode number 1, and angle prediction modes with mode numbers 2 to 66.
  • the residual unit 220 may generate a residual block of the CU based on the pixel blocks of the CU and the prediction blocks of the PUs of the CU. For example, the residual unit 220 may generate a residual block of the CU so that each sample in the residual block has a value equal to the difference between the following two: a sample in the pixel blocks of the CU and a corresponding sample in the prediction blocks of the PUs of the CU.
  • the transform/quantization unit 230 may quantize the transform coefficients.
  • the transform/quantization unit 230 may quantize the transform coefficients associated with the TUs of the CU based on a quantization parameter (QP) value associated with the CU.
  • QP quantization parameter
  • the video encoder 200 may adjust the degree of quantization applied to the transform coefficients associated with the CU by adjusting the QP value associated with the CU.
  • the inverse transform/quantization unit 240 may apply inverse quantization and inverse transform to the quantized transform coefficients, respectively, to reconstruct a residual block from the quantized transform coefficients.
  • the reconstruction unit 250 may add the samples of the reconstructed residual block to the corresponding samples of one or more prediction blocks generated by the prediction unit 210 to generate a reconstructed image block associated with the TU. By reconstructing the sample blocks of each TU of the CU in this manner, the video encoder 200 may reconstruct the pixel blocks of the CU.
  • the loop filter unit 260 is used to process the pixels after inverse transformation and inverse quantization, compensate for the distortion information, and provide a better reference for the subsequent coded pixels. For example, a deblocking filter operation can be performed to reduce the blocking effect of the pixel blocks associated with the CU.
  • the loop filter unit 260 includes: a deblocking filter (DBF) unit and a sample adaptive compensation/adaptive loop filter (SAO/ALF) unit, wherein the DBF unit is used to remove the block effect, and the SAO/ALF unit is used to remove the ringing effect.
  • DBF deblocking filter
  • SAO/ALF sample adaptive compensation/adaptive loop filter
  • the decoded image buffer 270 may store the reconstructed pixel blocks.
  • the inter prediction unit 211 may use the reference image containing the reconstructed pixel block in the decoded image buffer 270 to perform inter prediction on the PU of other images.
  • the intra prediction unit 212 may use the reconstructed pixel block in the decoded image buffer 270 to perform intra prediction on other PUs in the same image as the CU.
  • the entropy encoding unit 280 may receive the quantized transform coefficients from the transform/quantization unit 230.
  • the entropy encoding unit 280 may perform one or more entropy encoding operations on the quantized transform coefficients to generate entropy-encoded data.
  • FIG. 4 is a schematic block diagram of a video decoder according to an embodiment of the present application.
  • the video decoder 300 includes an entropy decoding unit 310, a prediction unit 320, an inverse quantization/transformation unit 330, a reconstruction unit 340, a loop filter unit 350, and a decoded image buffer 360. It should be noted that the video decoder 300 may include more, fewer, or different functional components.
  • the video decoder 300 may receive a bitstream.
  • the entropy decoding unit 310 may parse the bitstream to extract syntax elements from the bitstream. As part of parsing the bitstream, the entropy decoding unit 310 may parse the syntax elements in the bitstream that have been entropy encoded.
  • the prediction unit 320, the inverse quantization/transformation unit 330, the reconstruction unit 340, and the loop filter unit 350 may decode the video data according to the syntax elements extracted from the bitstream, that is, generate decoded video data.
  • the prediction unit 320 includes an intra prediction unit 322 and an inter prediction unit 321 .
  • the intra prediction unit 322 may perform intra prediction to generate a prediction block of the PU.
  • the intra prediction unit 322 may use an intra prediction mode to generate a prediction block of the PU based on a pixel block of a spatially neighboring PU.
  • the intra prediction unit 322 may also determine the intra prediction mode of the PU according to one or more syntax elements parsed from the code stream.
  • the inter prediction unit 321 may construct a first reference image list (list 0) and a second reference image list (list 1) according to the syntax elements parsed from the code stream.
  • the entropy decoding unit 310 may parse the motion information of the PU.
  • the inter prediction unit 321 may determine one or more reference blocks of the PU according to the motion information of the PU.
  • the inter prediction unit 321 may generate a prediction block of the PU according to one or more reference blocks of the PU.
  • the inverse quantization/transform unit 330 may inversely quantize (i.e., dequantize) the transform coefficients associated with the TU.
  • the inverse quantization/transform unit 330 may use the QP value associated with the CU of the TU to determine the degree of quantization. After inverse quantizing the transform coefficients, the inverse quantization/transform unit 330 may apply one or more inverse transforms to the inverse quantized transform coefficients to generate a residual block associated with the TU.
  • the reconstruction unit 340 uses the residual block associated with the TU of the CU and the prediction block of the PU of the CU to reconstruct the pixel block of the CU. For example, the reconstruction unit 340 may add samples of the residual block to corresponding samples of the prediction block to reconstruct the pixel block of the CU to obtain a reconstructed image block.
  • the loop filtering unit 350 may perform a deblocking filtering operation to reduce blocking effects of pixel blocks associated with a CU.
  • the video decoder 300 may store the reconstructed image of the CU in the decoded image buffer 360.
  • the video decoder 300 may use the reconstructed image in the decoded image buffer 360 as a reference image for subsequent prediction, or transmit the reconstructed image to a display device for presentation.
  • a frame of image is divided into image blocks.
  • the prediction unit 210 uses intra prediction or inter prediction to predict the prediction block of the current block (i.e., the block to be encoded).
  • the residual unit 220 can calculate the residual block based on the original block of the prediction block and the current block (i.e., the block to be encoded), that is, the difference between the prediction block and the original block, and the residual block can also be called residual information.
  • the residual block can remove information that is not sensitive to the human eye through the transformation and quantization process of the transformation/quantization unit 230 to eliminate visual redundancy.
  • the residual block before transformation and quantization by the transformation/quantization unit 230 can be called a time domain residual block, and the time domain residual block after transformation and quantization by the transformation/quantization unit 230 can be called a frequency residual block or a frequency domain residual block.
  • the entropy coding unit 280 receives the quantized change coefficient output by the change quantization unit 230, and can entropy encode the quantized change coefficient and output a code stream. For example, the entropy coding unit 280 can eliminate character redundancy according to the target context model and the probability information of the binary code stream.
  • the entropy decoding unit 310 can parse the bitstream to obtain the prediction information, quantization coefficient matrix, etc. of the current block (i.e., the block to be decoded).
  • the prediction unit 320 uses intra prediction or inter prediction based on the prediction information to predict the prediction block of the current block (i.e., the block to be decoded).
  • the inverse quantization/transformation unit 330 uses the quantization coefficient matrix obtained from the bitstream to inversely quantize and inversely transform the quantization coefficient matrix to obtain a residual block.
  • the reconstruction unit 340 adds the prediction block and the residual block to obtain a reconstructed block.
  • the reconstructed blocks form a reconstructed image
  • the loop filter unit 350 generates a reconstructed image based on the image or
  • the reconstructed image is loop filtered based on the block to obtain a decoded image. It is worth noting that the encoder also needs to use similar operations as the decoder to obtain a decoded image.
  • the decoded image can also be called a reconstructed image, which can be a subsequent frame and used as a reference frame for inter prediction.
  • the block division information determined by the encoder as well as the mode information or parameter information such as prediction, transformation, quantization, entropy coding, loop filtering, etc., are carried in the bitstream when necessary.
  • the decoder parses the bitstream and determines the same block division information, prediction, transformation, quantization, entropy coding, loop filtering, etc. mode information or parameter information as the encoder by analyzing the existing information, thereby ensuring that the decoded image obtained by the encoder is the same as the decoded image obtained by the decoder.
  • the image can be divided into slices, etc., and the slices in the same image can be processed in parallel, that is, there is no data dependency between them.
  • the term "frame” can be understood as an image or a slice, etc.
  • the above is the basic process of the video codec under the block-based codec framework.
  • IntraTMP mode is a special luminance block intra-frame prediction coding tool, which is mainly used for screen content coding.
  • FIG. 5 is an example of the principle of the IntraTMP mode provided in the present application.
  • the IntraTMP mode is mainly implemented through the following processes:
  • the encoder selects the L-shaped reconstructed pixels adjacent to the current coding block as a template, searches for the most similar template in the reconstructed area of the given current frame, and uses the reconstructed block corresponding to the most similar template as a matching block, which is used as the prediction block of the current coding block.
  • R1 to R4 in the figure are search areas available in the IntraTMP mode.
  • matching blocks can be searched point by point in R1 to R4 in raster scan order.
  • FIG. 6 is an example of the principle of the template matching process adopted by the IntraTMP mode provided in the present application.
  • the template of the current block may include L columns of pixels on the left side of the current block, M columns of pixels on the upper side, and M rows and L columns of pixels in the upper left corner, where M and L are both positive integers, for example, the values of M and L are both 4.
  • the matching block of the current block can be represented by a block vector pointing from the current block to the matching block, and the similarity between the template of the current block and the template of the matching block is represented by the size of the template error value.
  • the smaller the template error value the higher the similarity.
  • the template error value can be calculated using the Sum of Absolute Difference (SAD). The smaller the SAD, the more similar the templates are.
  • the encoder uses the flag cu_tmp_flag to indicate whether the current coding block uses the IntraTMP mode. If so, the same template matching process is performed at the decoding end to obtain the same prediction block at the decoding end. For the IntraTMP mode, no additional coding block vector information is required in the bitstream.
  • block vector in the present application may also be referred to as a block vector or other descriptions with similar meanings.
  • FIG. 7 is an example of the IntraTMP adaptation technology for camera-captured content provided by the present application.
  • the IntraTMP adaptation technology for the content captured by the camera proposes to perform template matching with a step size S (i.e., every S points in the horizontal and vertical directions, S>1) on the basis of the original IntraTMP mode.
  • a step size S i.e., every S points in the horizontal and vertical directions, S>1
  • the search area is searched every S points in the horizontal and vertical directions. For example, if the block vector currently being matched with the template is (X 0 ,Y 0 ), the block vector of the next template match in the horizontal direction should be (X 0 +S,Y 0 ), and the ordinate of the block vector of the next template match in the vertical direction should be Y 0 +S.
  • the best matching block is refined within a certain range (i.e., template matching is performed with a smaller step size S'), for example, the matching block vector is refined within the method of performing template matching with a smaller step size to optimize the matching result.
  • This technology effectively reduces the complexity of the IntraTMP mode while maintaining good coding efficiency.
  • IntraTMP multi-candidate technology obtains N candidate matching blocks in the reference area through the template matching process, or builds a candidate block list of length N.
  • the candidate blocks in the list can be sorted according to the template error value between the current block.
  • a candidate block in the list is selected as the final prediction block by index.
  • intra_tmp_idx For the coded block using IntraTMP multi-candidate technology, after the decoder decodes the IntraTMP flag intra_tmp_flag as true, it continues to decode intra_tmp_idx.
  • the intra_tmp_idx syntax element can represent the index of the selected candidate block.
  • the process of decoding syntax elements by the decoder can be as follows:
  • intraTMP calculates the cost of the template under the BV every time it searches for a BV.
  • the cost on the template is generally the cost of matching the template of the current block and the template of the block of the same size as the current block determined by the current BV. This cost can be SAD, SATD, SSE, etc.
  • IntraTMP can sort the searched blocks or BVs in ascending order according to these costs, and the top N candidates are the N candidates of intraTmpCandList. Or only the top N candidates with the smallest cost are maintained, and the candidates with more than N in the ranking can be directly discarded, thereby saving calculations.
  • the BV of integer pixels can be searched in sequence. If the current searched BV is (x0, y0), the next one is (x0+1, y0), provided that the boundary of the search range has not been reached. But here we can do a sparse search first. For example, for the BV of integer pixels, if the current searched BV is (x0, y0), the next one is (x0+4, y0), provided that the boundary of the search range has not been reached. That is, template matching is performed every certain number of pixels, or it can be called template matching every certain step length.
  • the step length here can be a preset value, such as 2, 4, 8, etc.
  • the same process can be done in the vertical direction.
  • N 3 if N is 3, it can be improved as follows:
  • the first search is performed with a certain step size, for example, the horizontal step size and the vertical step size are both K. N optimal matching blocks with a certain spacing are obtained (the first N with the smallest template error value).
  • a second search is performed on the N neighboring regions of the matching blocks obtained in the first step, and these neighboring regions can be set to multiple non-overlapping regions according to the step length in the first step.
  • M optimal matching blocks (which may include the matching blocks obtained in the first step) are obtained from these regions.
  • the sub-pixel BV can be further refined. For example, based on the whole pixel BV selected in the second step, a 1/2 pixel search can be performed within a pixel range of the top, bottom, left, and right.
  • the construction of the candidate list is done by both the encoder and the decoder, so as to ensure that the candidate list obtained by the encoder and the candidate list obtained by the decoder are consistent.
  • FIG. 8 is an example of the construction principle of the candidate block list provided in the present application.
  • the first search is performed according to the preset step size, and the upper left corner of the searched block is shown as a gray dot.
  • the three sorted BVs are found, and the upper left corner of the corresponding block is shown as a black dot.
  • the horizontal step size is 4, and the vertical step size is also 4.
  • a second search can be performed based on the three sorted BVs. This time the search range is 4x4. In each 4x4 BV, the BV with the lowest cost is found to replace the original BV and re-participate in the sorting of intraTmpCandList. Of course, if the BV with the lowest cost is still the original BV, it does not need to be re-sorted.
  • variable-length encoding or truncated unary can be set for the encoding of intra_tmp_idx.
  • the variable-length encoding method is shown in Table 1 below.
  • the encoder can use the method shown in Table 2 for encoding.
  • indexes 3 to 6 use codewords of the same length
  • indexes 7 to 14 use codewords of the same length.
  • the x in the above table can be obtained using truncated binary.
  • the template error values of the reconstructed block and the current coding block at different positions can be obtained.
  • These reconstructed blocks can be represented by the block vector pointing to the reconstructed block by the current coding block; a candidate block vector information list is constructed to record the block vector with a smaller template error value during the template matching process; one or more block vectors are selected from the candidate block vector information list according to conditions such as block vector spacing and template error value, and the reconstructed block they point to is used as the matching block of the current coding block; a weight value is determined for each matching block; these matching blocks are weightedly fused according to their weight values to obtain the final prediction block, thereby realizing IntraTMP combined fusion prediction.
  • the weight of each matching block can be determined by using a preset fixed value, calculating according to a template error value, or deducing according to a template.
  • FIG. 9 is an example of the principle of the IntraTMP fusion prediction technology provided in the present application.
  • the matching blocks used for fusion include matching block 1, matching block 2 and matching block 3
  • the weight of matching block 1 is W1
  • the weight of matching block 2 is W2
  • the weight of matching block 3 is W3
  • the prediction block of the current block can be: W1 ⁇ matching block 1+W2 ⁇ matching block 2+W3 ⁇ matching block 3.
  • the matching block (also referred to as the reference block) obtained by intra-frame template matching can be directly used as the prediction block of the current block. Furthermore, the prediction block can be filtered to improve the prediction effect. A block-level flag can be used to indicate whether the current block uses the filtering process on the prediction block.
  • predC c0C+c1N+c2S+c3E+c4W+c5B.
  • the filter uses a cross shape consisting of a pixel to be filtered and one pixel adjacent to it, one pixel above, one pixel adjacent to it, and one pixel adjacent to it, to perform filtering.
  • C is the pixel to be filtered
  • N is the pixel above it
  • S is the pixel below it
  • W is the pixel to the left of it
  • E is the pixel to the right of it.
  • B bias
  • B can be the median of the pixel value range, that is, if the pixel value is the 10-bit maximum value 1023, then B is set to 512.
  • c0 to c5 are the coefficients of the filter.
  • one method of determining filter coefficients is to train the coefficients of the filter using a template of a reference block and a template of a current block.
  • FIG. 11 is an example of the principle of determining filter coefficients provided by the present application.
  • the template area is the reconstruction area of the 4 rows above and 4 columns to the left of the current block.
  • an additional row of areas on the upper, lower, left and right sides of the template area is also required as a reference. It should be noted that if part of the additional area is not encoded, it can be copied from the template area.
  • one method of training the filter coefficients is to calculate a set of coefficients so that the mean square error (MSE) between the filtered reference block template and the current block template is minimized.
  • MSE mean square error
  • the prediction block directly obtained from the reference block is filtered.
  • One method is to filter each pixel in turn from left to right and from top to bottom, and use the filtered value as the prediction value.
  • the intraTMP multi-candidate method uses templates to screen out a small number of promising candidates from a large number of possible BVs, and then the encoder selects a candidate to determine the reference block or prediction block of the current block. Due to the correlation between the current block and the template, the template can effectively filter out most of the unreasonable BVs. On the other hand, the encoder can access the original pixel values of the current block, so it can make more accurate judgments than the decoder. In this way, by utilizing the collaboration of the encoder and decoder, better compression efficiency can be achieved. IntraTMP filtering can use templates to train filter coefficients and improve on the original prediction values of intraTMP.
  • IntraTMP fusion prediction can obtain multiple reference blocks through the intra-frame template matching process and perform weighted fusion on these reference blocks.
  • the weight value is usually a predefined fixed value or calculated based on the template error of each reference block.
  • the weights used for fusion prediction are obtained based on the training of each reference block template and the current block template. For example, using 5 reference blocks for weighted fusion, the form is as follows:
  • Wn represents the weight of the nth reference block
  • refBlock n represents the nth reference block
  • Bias is a fixed value.
  • Another weighting method is to calculate a set of coefficients so that the MSE of the reference block template fused with the current block template is minimized.
  • TDD Template-Based Intra Mode Derivation
  • TIMD technology uses the reconstructed pixels of the L-shaped part adjacent to the current coding block as a template.
  • the encoder can calculate the predicted pixels of the template area under different intra-frame prediction modes by traversing the Most Probable Mode (MPM) list; and then obtain the template error values of the predicted pixels and reconstructed pixels under different intra-frame prediction modes; for example, the template error value can be represented by the Sum of Absolute Transformed Difference (SATD); thus, the encoder can select the optimal intra-frame prediction mode according to the template error value.
  • the intra-frame prediction mode is obtained through the same derivation method, thereby reducing the coding bits of the mode information.
  • the CIIP mode combines intra-frame prediction and inter-frame prediction, and uses the weighted combination of intra-frame prediction blocks and inter-frame prediction blocks to obtain the prediction block of the current coding block.
  • the CIIP mode in the enhanced compression reference software test platform (Enhanced Compression Model, ECM) is combined with template-based prediction technology, and different weights are designed for different regions, which further improves the accuracy of the prediction.
  • ECM Enhanced Compression Model
  • its intra-frame prediction block pred_intra is obtained by the TIMD mode
  • the inter-frame prediction block pred_inter is obtained by the template-based merge (Merge) mode.
  • the encoder determines the weight values wIntra and wInter based on the derived intra-frame prediction mode and the position of the pixel to be predicted.
  • Pred represents the prediction block of the current block
  • pred_intra represents the intra-frame prediction block
  • wIntra represents the weight value of the intra-frame prediction block
  • winter represents the inter-frame prediction block
  • pred_inter represents the weight value of the inter-frame prediction block.
  • the weight values wIntra and wInter of each region can be determined by referring to Table 3:
  • different region indexes correspond to different wIntra and different wInter. That is, when the region identifier is 0, wIntra is 6 and wInter is 2, when the region identifier is 1, wIntra is 5 and wInter is 3, when the region identifier is 2, wIntra is 3 and wInter is 5, and when the region identifier is 3, wIntra is 2 and wInter is 6.
  • the IBC mode can be divided into IBC advanced motion vector prediction (AMVP) mode and IBC merge mode.
  • AMVP advanced motion vector prediction
  • IBC merge mode IBC advanced motion vector prediction
  • the IBC-AMVP mode can obtain the predicted block vector through the constructed candidate block vector information list, through hash search, full
  • the reference block of the current block and the corresponding final block vector are obtained through the search process, and the final block vector is encoded according to the predicted block vector, for example, the residual between the predicted block vector and the final block vector is encoded to improve the coding efficiency.
  • the IBC-Merge mode predicts through the constructed candidate block vector information list, selects the best block vector in the list as the final block vector through the SATD, RDO and other coding processes, and uses the reconstructed block it points to as the reference block to complete the prediction.
  • the encoder encodes the index of the block vector in the list instead of the block vector itself to improve the coding efficiency.
  • the candidate block vector information list may be composed of coding information such as block vectors of adjacent coding blocks, historical block vectors, and average block vectors.
  • IBC is a historical MV prediction technique.
  • FIG. 13 is a schematic flow chart of a decoding method 400 provided by the present application.
  • the decoding method 400 can be performed by a decoder.
  • the decoding method 400 can be performed by the video decoder 122 shown in FIG. 1 or the video decoder 300 shown in FIG. 4 .
  • the following description is made by taking a decoder as an example.
  • the decoding method 400 can be specifically applied to the intra prediction part in a video decoder, for example, to the IntraTMP part of the intra prediction.
  • the decoding method 400 may include part or all of the following:
  • the first prediction mode may be an intra prediction mode.
  • the first prediction mode may be any prediction mode capable of acquiring block vector information of the current block.
  • S420 Determine first historical block vector information based on the block vector information used by the current block.
  • the decoder may directly determine the block vector information used by the current block as the first historical block vector information, or the decoder may determine part of the block vector information used by the current block as the first historical block vector information, or the decoder may determine the first historical block vector information based on a calculation result obtained by calculating the block vector information used by the current block.
  • S430 Update a first historical block vector information list based on the first historical block vector information.
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block, where the IBC block is a block decoded after the current block using the IBC mode.
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block in an IBC advanced motion vector prediction (AMVP) mode; in other words, the IBC block may be a block decoded using the IBC AMVP mode after the current block.
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block in an IBC merge mode; in other words, the IBC block may be a block decoded using the IBC merge mode after the current block.
  • the candidate block vector information list is constructed based on the first historical block vector information list, and then the IBC block is decoded based on the candidate block vector information list.
  • the encoder can construct a candidate block vector information list in the same way as the decoder, and then obtain the reference block and the corresponding final block vector of the IBC block through hash search, full search and other processes, and then encode the final block vector according to a certain prediction block vector in the candidate block vector information list, for example, encode the residual between the certain prediction block vector and the final block vector to improve the coding efficiency; in addition, the encoder can indicate the prediction block vector index to the decoder, and the prediction block index is used to indicate in the candidate block vector information list: the prediction block vector used to encode the final block vector.
  • the decoder can determine the prediction block vector index by decoding the code stream, and based on the prediction block vector index, determine the prediction block vector used by the IBC block in the candidate block vector information; then, the decoder can obtain the final block vector of the IBC block based on the prediction block vector used by the IBC block and the block vector residual determined by decoding the code stream, and then determine the reference block of the IBC block based on the final block vector of the IBC block, thereby determining the prediction of the IBC block based on the reference block of the IBC block. piece.
  • the encoder can construct a candidate block vector information list in the same way as the decoder, and then select the best block vector in the candidate block vector information list as the final block vector through SATD, RDO and other encoding processes.
  • the encoder can encode the index of the final block vector in the candidate block vector information list to improve the encoding efficiency.
  • the decoder can determine the index of the final block vector in the candidate block vector information list by decoding the bitstream, and then determine the reference block of the IBC block based on the final block vector indicated by the index.
  • the decoder can determine the prediction block of the IBC block based on the reference block of the IBC block.
  • the decoder updates the first historical block vector information list used to determine the candidate block vector information list based on the first prediction mode different from the IBC mode. Since the candidate block vector information list is a list used by the IBC block decoded using the IBC mode after the current block, the decoder updates the first historical block vector information list using the first prediction mode, which is equivalent to the decoder enriching the candidate block vector information of the IBC block using the first prediction mode, that is, when the decoder decodes the IBC block, it can improve the decoding performance of the IBC block and improve the decoding performance of the decoder.
  • the decoder may not execute or ignore this step, that is, the decoder may directly update the first historical block vector information list based on the block vector information of the current block, and the present application does not make specific limitations on this.
  • the coding information of the IntraTMP block is used to enrich the block vector candidates of the IBC, which can improve the decoding performance of the decoder.
  • Table 4 shows the test results after the decoding method provided by the present application is integrated into the latest ECM9.0.
  • Class F and class TGM are special sequence classes for screen content encoding.
  • Y represents brightness (Luma)
  • U represents blue chroma
  • V represents red chroma.
  • EncT represents the change in encoding complexity
  • DecT represents the change in decoding complexity. From the simulation results, it can be seen that the decoding method provided in this application can improve the decoding performance, especially on TGM, the gain effect is most obvious.
  • the first prediction mode includes an intra template matching prediction (Intra Template Matching Prediction, IntraTMP) mode.
  • IntraTMP Intra Template Matching Prediction
  • the IntraTMP mode may be a mode using any one of the following techniques:
  • IntraTMP adaptation technology for camera captured content IntraTMP multi-candidate technology, IntraTMP fusion prediction technology, IntraTMP filtering technology, and template-derived IntraTMP fusion technology.
  • the S420 may include:
  • the block vector in the first historical block vector information is determined based on at least one block vector in the block vector information used by the current block and the number of the at least one block vector.
  • the decoder may, based on the number of the at least one block vector, determine the at least one block vector as a block vector in the first historical block vector information, or determine a portion of block vectors selected from the at least one block vector as a block vector in the first historical block vector information, or determine a block vector calculated from the at least one block vector as a block vector in the first historical block vector information.
  • the at least one block vector is determined as a block vector in the first historical block vector information.
  • the first preset value may be implemented by pre-saving a corresponding code, table or other method that can be used to indicate relevant information in the decoder, or the first preset value may be agreed or defined by a standard protocol.
  • the first preset value may be any positive integer.
  • the decoder determines the at least one block vector as a block vector in the first historical block vector information; in other words, only when the number of the at least one block vector is 1, the decoder can directly determine the at least one block vector as a block vector in the first historical block vector information. In other words, if the current block uses one block vector to complete the prediction process, the decoder can directly determine the one block vector as a block vector in the first historical block vector information.
  • the decoder can determine part of the block vectors in the at least one block vector or the block vector obtained by calculating the at least one block vector as the block vector in the first historical block vector information when the number of the at least one block vector meets a specific condition.
  • the number of the at least one block vector being greater than the second preset value is only an example of the specific condition and should not be understood as a limitation to the present application.
  • the decoder can determine part of the block vectors in the at least one block vector or the block vector obtained by calculating the at least one block vector as the block vector in the first historical block vector information.
  • the decoder determines the first block vector or the second block vector as a block vector in the first historical block vector information. In other words, if the current block uses a sub-pixel interpolation prediction method based on the first block vector, the decoder determines the first block vector or the second block vector as a block vector in the first historical block vector information.
  • the accuracy of the first block vector may be integer pixel accuracy or sub-pixel accuracy.
  • the sub-pixel accuracy may also be referred to as fractional pixel accuracy.
  • the sub-pixel accuracy may be 1/2 pixel, 1/3 pixel, or 1/4 pixel accuracy.
  • the accuracy of the first block vector is integer pixel accuracy
  • the reference block pointed to by the first block vector is the block including integer pixels found according to the first block vector.
  • the accuracy of the first block vector is sub-pixel accuracy
  • the reference block corresponding to the first block vector is the block including sub-pixels found according to the first block vector. Therefore, the accuracy of the first block vector may also be referred to as the accuracy of the reference block of the first block vector.
  • the sub-pixel interpolation prediction method may be understood as being similar to an inter-frame sub-pixel precision prediction method.
  • the sub-pixel interpolation prediction method may refer to: a prediction method of determining a sub-pixel block after sub-pixel interpolation as a prediction block.
  • the adjustment amount of the first block vector may include an offset direction and/or an offset amount of the first block vector.
  • the first block vector is determined as the block vector in the first historical block vector information.
  • the precision of the first block vector is equal to the precision of the sub-pixel interpolation, it means that the precision of the reference block pointed to by the first block vector matches the precision of the prediction block, that is, the reference block pointed to by the first block vector can be directly used as the prediction block of the current block, or in other words, the precision of the first block vector is sub-pixel precision, and the prediction block of the current block is directly obtained based on the block vector of sub-pixel precision.
  • the decoder when the decoder predicts the current block, the decoder can directly determine the sub-pixel block pointed to by the first block vector as the prediction block of the current block, and accordingly, the decoder can directly determine the first block vector as the block vector in the first historical block vector information.
  • the second block vector is determined as the block vector in the first historical block vector information.
  • the precision of the first block vector is greater than the precision of the sub-pixel interpolation, it means that the precision of the reference block pointed to by the first block vector does not match the precision of the prediction block, that is, the reference block pointed to by the first block vector cannot be directly used as the prediction block of the current block, or the prediction block of the current block is not directly obtained according to the block vector with sub-pixel precision.
  • the precision of the first block vector is integer pixel precision
  • the decoder adjusts the integer pixel block pointed to by the first block vector based on the offset direction and offset of the first block vector to obtain a sub-pixel block, and determines the obtained sub-pixel block as the prediction block of the current block.
  • the S420 may include:
  • the decoder may determine the accuracy of the first block vector as the accuracy of the third block vector. If the third block vector is a block vector obtained by the decoder based on weighted averaging of multiple block vectors in the block vector information used by the current block, the decoder may determine the accuracy of the multiple block vectors as the accuracy of the third block vector. If the third block vector is a second block vector obtained by adjusting the first block vector in the block vector information used by the current block, the decoder may determine the accuracy of the second block vector as the accuracy of the third block vector.
  • the S420 may include:
  • At least one of the following items included in the block vector information used by the current block is determined as information in the first historical block vector information:
  • An index used to indicate weights of multiple reference blocks used by the current block is an index used to indicate weights of multiple reference blocks used by the current block.
  • the coordinate information of the current block includes coordinate information of at least one of the following positions:
  • the upper left corner, lower left corner, upper right corner, lower right corner, and center point of the current block are the upper left corner, lower left corner, upper right corner, lower right corner, and center point of the current block.
  • the flag for indicating whether to perform illumination compensation on the prediction block of the current block may include:
  • LIC local illumination compensation
  • the index for indicating the prediction mode used by the current block may include at least one of the following: an index for indicating that the current block uses the first prediction mode, an index for indicating that the current block uses a sub-mode belonging to the first prediction mode, and an index for indicating that the current block uses the IBC mode.
  • the sub-mode may be a mode using any one of the following technologies: IntraTMP adaptation technology for camera-captured content, IntraTMP multi-candidate technology, IntraTMP fusion prediction technology, IntraTMP filtering technology, and template-derived IntraTMP fusion technology.
  • the decoder directly determines the information in the block vector information used by the current block as the information in the first historical block vector information. It can also be understood that: the decoder inherits the information in the block vector information used by the current block or other descriptions with similar meanings. This application does not make specific limitations on this.
  • the S420 may include:
  • the first historical block vector information is determined based on the block vector information used by the current block.
  • the decoder decodes the bitstream to determine the first identifier, and if the first identifier indicates that the first prediction mode To update the first historical block vector information list, the first historical block vector information is determined based on the block vector information used by the current block, and then the first historical block vector information list is updated based on the first historical block vector information. Otherwise, the decoder does not use the first prediction mode to update the first historical block vector information list.
  • the value of the first identifier when the value of the first identifier is a first numerical value, it indicates that the first historical block vector information list is updated based on the first prediction mode; when the value of the first identifier is a second numerical value, it indicates that the first historical block vector information list is not updated based on the first prediction mode.
  • the first numerical value is 1 and the second numerical value is 0, or the first numerical value is 0 and the second numerical value is 1.
  • the value of the first identifier may be assumed to be the first numerical value, or the value of the first identifier may be assumed to be the second numerical value.
  • the first flag when the first flag is activated or enabled, it indicates that the first historical block vector information list is updated based on the first prediction mode; when the first flag is deactivated or disabled, it indicates that the first historical block vector information list is not updated based on the first prediction mode.
  • the first flag when the first flag does not exist in the bitstream obtained by the decoder, the first flag can be activated or enabled by default, or the first flag can be deactivated or disabled by default.
  • the first identifier may be a sequence-level identifier.
  • the first identifier indicates whether the current sequence to which the current block belongs allows updating the first historical block vector information list based on the first prediction mode.
  • the decoder may determine the first identifier by decoding a sequence parameter set (Sequence Parameter Set, SPS) in the bitstream.
  • SPS Sequence Parameter Set
  • the first identifier may be carried in the SPS in the bitstream.
  • the decoder may maintain two historical block vector information lists corresponding to the two regions for the current image, and the first historical block vector information list is a historical block vector information list corresponding to the region where the current block is located.
  • the decoder may update the historical block vector information list corresponding to the region where the current block is located based on the first historical block vector information according to the position of the current block. For example, if the current block is located in the clean area, the decoder may update the historical block vector information list corresponding to the clean area based on the first historical block vector information; otherwise, the decoder updates the historical block vector information list corresponding to the dirty area based on the first historical vector information.
  • the IntraTMP decoding block completes decoding and confirms the block vector that needs to be saved.
  • the coordinates of the current decoded block may be saved.
  • the accuracy of the block vector determined in step 1 may be saved.
  • whether the current decoded block uses the LIC method or the filtering method, etc. may be saved.
  • whether the current decoded block flips the reference block may be saved.
  • a flag bit may be introduced to indicate whether the block vector determined in step 1 belongs to the IBC.
  • the bidirectional weighted weight index of the current block may be saved.
  • the block vector determined in step 1 and the information associated with the block vector determined in step 2 may constitute block vector information.
  • the block vector information is saved in the IBC historical block vector list. If the block vector information is already in the historical block vector list, the block vector information in the list is moved to the end; otherwise, first determine whether the IBC historical block vector list is full. If it is full, remove the block vector information at the front of the list, and then add the block vector information to the end of the IBC historical block vector list to complete the update of the IBC historical block vector list.
  • the current frame is a GDR frame
  • the current image will be divided into a clean area (clean area) and a dirty area (dirty area) according to the division boundary.
  • the decoder maintains two IBC historical block vector lists.
  • the block vector information can be saved to different lists according to the position of the current block in the current image. For example, if the current block is in the clean area, the block vector information is saved to IBC historical block vector list 1; otherwise, the block vector information is saved to IBC historical block vector list 2.
  • the IBC decoding block constructs a candidate block vector list and uses the block vector information in the IBC historical block vector list as candidates to complete the prediction of the IBC decoding block.
  • embodiment 1 is only an example of the present application and should not be construed as limiting the present application.
  • embodiment 1 may be adaptively modified, adjusted or replaced according to one or more of the following alternatives to form a new implementation.
  • step 1 if the IntraTMP decoding block uses a weighted fusion prediction of a reference block based on multiple block vectors, the mean values of these block vectors may be saved.
  • step 1 if the IntraTMP decoding block uses a weighted fusion prediction based on multiple block vectors, the two block vectors with the smallest template error value among these block vectors can be saved.
  • the two block vectors can be used for bidirectional IBC prediction, that is, an IBC-GPM prediction block composed of two IBC reference blocks, etc.
  • step 1 if the IntraTMP decoding block uses a weighted fusion prediction of reference blocks based on multiple block vectors, the optimal block vector can be selected and saved according to the current reconstructed block. For example, the error between the reference block corresponding to each block vector and the current reconstructed block is calculated, and the error can be calculated by SAD. The block vector with the smallest error is the optimal block vector and saved.
  • a flag bit may be introduced to indicate whether the block vector determined in step 1 belongs to IntraTMP.
  • block vectors belonging to different decoding methods can be processed differently. For example, first add all block vectors belonging to the IBC mode in the IBC historical block vector list, and then add block vectors belonging to the IntraTMP mode.
  • the judgment condition in step 3 may be: the width of the current block is smaller than W and the height is smaller than H, or other conditions related to the width or height.
  • a historical block vector list of IntraTMP may be constructed, which is different from the historical block vector list of IBC, and the block vector information of the IntraTMP decoded block may be saved in the historical block vector list of IntraTMP.
  • the judgment condition in step 3 may include: judging whether to save the block vector information according to the prediction method of the current IntraTMP decoding block. For example, if the IntraTMP decoding block uses a weighted fusion prediction of reference blocks based on multiple block vectors, the block vector information is not saved in the historical block vector list.
  • the judgment condition may include a flag bit according to the sequence level, frame level, slice level, or image block, which is used to indicate whether it is allowed to update the IBC history block vector list based on the IntraTMP mode.
  • FIG. 14 is a schematic flowchart of the encoding method 500 provided in the present application.
  • the encoding method 500 may be performed by an encoder, for example, the encoding method 500 may be performed by the video encoder 112 shown in FIG. 1 or the video encoder 200 shown in FIG. 2 .
  • the encoding method 500 may include:
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block, where the IBC block is a block encoded using the IBC mode after the current block.
  • the first prediction mode comprises an intra template matching prediction IntraTMP mode.
  • the S520 may include:
  • the block vector in the first historical block vector information is determined based on at least one block vector in the block vector information used by the current block and the number of the at least one block vector.
  • the at least one block vector is determined as a block vector in the first historical block vector information.
  • the block vector in the first historical block vector information is determined according to any one of the following:
  • One or more block vectors with the smallest error value of the reference block in the at least one block vector are determined as block vectors in the first historical block vector information.
  • the S520 may include:
  • a first block vector in the block vector information used by the current block is determined as a block vector in the first historical block vector information, or a second block vector obtained by adjusting the first block vector based on an adjustment amount of the first block vector is determined as a block vector in the first historical block vector information.
  • the first block vector is determined as the block vector in the first historical block vector information.
  • the second block vector is determined as the block vector in the first historical block vector information.
  • the S520 may include:
  • the first historical block vector information includes a third block vector
  • the accuracy in the block vector information used by the current block and corresponding to one or more block vectors used to determine the third block vector is determined as the accuracy of the third block vector; the first historical block vector information includes the accuracy of the third block vector.
  • the S520 may include:
  • the first historical block vector information list includes the first historical block vector information
  • the first historical block vector information is moved to the end of the first historical block vector information list.
  • the S530 may include:
  • the first historical block vector information list is a historical block vector information list common to the first prediction mode and the IBC mode.
  • the priority of the second historical block vector information in the first historical block vector information list and belonging to the first prediction mode is lower than the priority of the third historical block vector information in the first historical block vector information list and belonging to the IBC mode.
  • the first historical block vector information list is a historical block vector information list of the first prediction mode, and the first historical block vector information and the second historical block vector information list of the IBC mode are both used to determine the candidate block vector information list.
  • the current image to which the current block belongs is divided into multiple regions, the multiple regions include the region where the current block is located, and the first historical block vector information list is a historical block vector information list corresponding to the region.
  • the encoding method can be understood as the inverse process of the decoding method. Therefore, the specific scheme of the encoding method 500 can refer to the relevant content of the decoding method 400. For the convenience of description, this application will not go into details.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • the current block mentioned above is the IntraTMP coding block, that is, the method of saving the block vector and other information of the IntraTMP coding block to the IBC historical block vector list, using the block vector and other information of the IntraTMP coding block to enrich the block vector candidates of IBC, thereby improving the coding efficiency.
  • the encoding method comprises the following steps:
  • the IntraTMP encoding block completes encoding and confirms the block vector that needs to be saved.
  • the IntraTMP coding block uses a single block vector to complete the prediction process, and the block vector can be directly saved.
  • the coding block uses sub-pixel interpolation prediction based on a single integer pixel precision block vector, and the integer pixel precision block vector can be adjusted according to the sub-pixel interpolation type and then saved.
  • the IntraTMP coding block uses reference block weighted fusion prediction based on multiple block vectors, and the block vector with the smallest template error value among these block vectors can be saved.
  • the coordinates of the current coding block may be saved.
  • the accuracy of the block vector determined in step 1 may be saved.
  • whether the current coding block uses the LIC method or the filtering method, etc. may be saved.
  • whether the current coding block flips the reference block may be saved.
  • a flag bit may be introduced to indicate whether the block vector determined in step 1 belongs to IBC.
  • the bidirectional weighted weight index of the current block may be saved.
  • the block vector determined in step 1 and the information associated with the block vector determined in step 2 may constitute block vector information.
  • the encoder may determine whether to save the block vector information (i.e., including the block vector determined in step 1 and the information associated with the block vector determined in step 2) to the IBC historical block vector list according to the conditions. For example, it may be saved to the IBC historical block vector list only when the size of the current block is not greater than WxH.
  • the block vector information is saved in the IBC historical block vector list. If the block vector information is already in the historical block vector list, the block vector information in the list is moved to the end; otherwise, first determine whether the IBC historical block vector list is full. If it is full, remove the block vector information at the front of the list, and then add the block vector information to the end of the IBC historical block vector list to complete the update of the IBC historical block vector list.
  • the current frame is a GDR frame
  • the current image will be divided into a clean area (clean area) and a dirty area (dirty area) according to the division boundary.
  • the encoder maintains two IBC historical block vector lists.
  • the block vector information can be saved to different lists according to the position of the current block in the current image. For example, if the current block is in the clean area, the block vector information is saved to IBC historical block vector list 1; otherwise, the block vector information is saved to IBC historical block vector list 2.
  • the IBC coding block constructs a candidate block vector list and uses the block vector information in the IBC historical block vector list as candidates to complete the prediction of the IBC coding block.
  • Embodiment 2 is only an example of the present application and should not be construed as limiting the present application.
  • Embodiment 1 may be adaptively modified, adjusted or replaced according to one or more of the following alternatives to form a new implementation.
  • step 1 if the IntraTMP coding block uses a weighted fusion prediction of reference blocks based on multiple block vectors, the mean values of these block vectors may be saved.
  • step 1 if the IntraTMP coding block uses a weighted fusion prediction based on multiple block vectors, the two block vectors with the smallest template error value among these block vectors can be saved.
  • the two block vectors can be used for bidirectional IBC prediction, that is, an IBC-GPM prediction block composed of two IBC reference blocks, etc.
  • a flag bit can be introduced to indicate whether the block vector determined in step 1 belongs to IntraTMP.
  • the IBC coding block can process block vectors belonging to different coding methods differently. For example, first add all block vectors belonging to the IBC mode in the IBC historical block vector list, and then add block vectors belonging to the IntraTMP mode.
  • the judgment condition in step 3 may be: the width of the current block is smaller than W and the height is smaller than H, or other conditions related to the width or height.
  • a historical block vector list of IntraTMP may be constructed, which is different from the historical block vector list of IBC, and the block vector information of the IntraTMP encoding block may be saved in the historical block vector list of IntraTMP.
  • the judgment condition in step 3 may include: judging whether to save the block vector information according to the prediction method of the current IntraTMP coding block. For example, if the IntraTMP coding block uses a weighted fusion prediction of reference blocks based on multiple block vectors, the block vector information is not saved in the historical block vector list.
  • the judgment condition may include a flag bit according to the sequence level, frame level, slice level, or image block, which is used to indicate whether it is allowed to update the IBC history block vector list based on the IntraTMP mode.
  • FIG. 15 is a schematic block diagram of a decoder 600 provided in the present application.
  • the decoder 600 may include:
  • a first determining unit 610 is configured to determine block vector information used by a current block based on a first prediction mode different from an intra block copy (IBC) mode;
  • IBC intra block copy
  • a second determining unit 620 configured to determine first historical block vector information based on the block vector information used by the current block
  • An updating unit 630 configured to update a first historical block vector information list based on the first historical block vector information
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block, where the IBC block is a block decoded after the current block using the IBC mode.
  • the first prediction mode comprises an intra template matching prediction IntraTMP mode.
  • the second determining unit 620 is specifically configured to:
  • the block vector in the first historical block vector information is determined based on at least one block vector in the block vector information used by the current block and the number of the at least one block vector.
  • the second determining unit 620 is specifically configured to:
  • the at least one block vector is determined as a block vector in the first historical block vector information.
  • the second determining unit 620 is specifically configured to:
  • the block vector in the first historical block vector information is determined according to any one of the following:
  • One or more block vectors with the smallest error value of the reference block in the at least one block vector are determined as block vectors in the first historical block vector information.
  • the second determining unit 620 is specifically configured to:
  • a first block vector in the block vector information used by the current block is determined as a block vector in the first historical block vector information, or a second block vector obtained by adjusting the first block vector based on an adjustment amount of the first block vector is determined as a block vector in the first historical block vector information.
  • the second determining unit 620 is specifically configured to:
  • the first block vector is determined as the block vector in the first historical block vector information.
  • the second determining unit 620 is specifically configured to:
  • the second determining unit 620 is specifically configured to:
  • the first historical block vector information includes a third block vector
  • the accuracy in the block vector information used by the current block and corresponding to one or more block vectors used to determine the third block vector is determined as the accuracy of the third block vector; the first historical block vector information includes the accuracy of the third block vector.
  • the second determining unit 620 is specifically configured to:
  • At least one of the following items included in the block vector information used by the current block is determined as information in the first historical block vector information:
  • An index used to indicate weights of multiple reference blocks used by the current block is an index used to indicate weights of multiple reference blocks used by the current block.
  • the second determining unit 620 is specifically configured to:
  • the first historical block vector information is determined based on the block vector information used by the current block.
  • the second determining unit 620 is specifically configured to:
  • the first historical block vector information is determined based on the block vector information used by the current block.
  • the second determining unit 620 is specifically configured to:
  • the first historical block vector information is determined based on the block vector information used by the current block:
  • the area of the current block is greater than or equal to a first threshold
  • the width of the current block is greater than or equal to a second threshold
  • the height of the current block is greater than or equal to a third threshold
  • the type of the current image to which the current block belongs is a preset type.
  • the updating unit 630 is specifically configured to:
  • the first historical block vector information list includes the first historical block vector information
  • the first historical block vector information is moved to the end of the first historical block vector information list.
  • the updating unit 630 is specifically configured to:
  • the first historical block vector information in the first historical block vector information list is less than a fourth preset value, the first historical block vector information is added to the first historical block vector information list; otherwise, the historical block vector information at the front of the first historical block vector information list is removed, and the first historical block vector information is added to the end of the first historical block vector information list.
  • the first historical block vector information list is a historical block vector information list common to the first prediction mode and the IBC mode.
  • the priority of the second historical block vector information in the first historical block vector information list and belonging to the first prediction mode is lower than the priority of the third historical block vector information in the first historical block vector information list and belonging to the IBC mode.
  • the first historical block vector information list is a historical block vector information list of the first prediction mode, and the first historical block vector information and the second historical block vector information list of the IBC mode are both used to determine the candidate block vector information list.
  • the first historical block vector information list is used to determine the priority of the candidate block vector information list, which is lower than the priority of the second historical block vector information list is used to determine the priority of the candidate block vector information list.
  • the current image to which the current block belongs is divided into multiple regions, the multiple regions include the region where the current block is located, and the first historical block vector information list is a historical block vector information list corresponding to the region.
  • the device embodiment of the decoder and the method embodiment of the decoding method can correspond to each other, and similar descriptions can refer to the method embodiment. To avoid repetition, it will not be repeated here.
  • the decoder 600 shown in Figure 15 can correspond to the corresponding subject in the decoding method 400 of the embodiment of the present application, and the aforementioned and other operations and/or functions of each unit in the decoder 600 are respectively for implementing the corresponding processes in the decoding method 400.
  • FIG. 16 is a schematic block diagram of an encoder 700 provided in the present application.
  • the encoder 700 may include:
  • a first determining unit 710 is configured to determine block vector information used by a current block based on a first prediction mode different from an intra block copy (IBC) mode;
  • IBC intra block copy
  • a second determining unit 720 configured to determine first historical block vector information based on the block vector information used by the current block
  • An updating unit 730 configured to update a first history block vector information list based on the first history block vector information
  • the first historical block vector information list is used to determine a candidate block vector information list used by an IBC block, where the IBC block is a block encoded using the IBC mode after the current block.
  • the first prediction mode comprises an intra template matching prediction IntraTMP mode.
  • the second determining unit 720 is specifically configured to:
  • the block vector in the first historical block vector information is determined based on at least one block vector in the block vector information used by the current block and the number of the at least one block vector.
  • the second determining unit 720 is specifically configured to:
  • the at least one block vector is determined as a block vector in the first historical block vector information.
  • the second determining unit 720 is specifically configured to:
  • the block vector in the first historical block vector information is determined according to any one of the following:
  • One or more block vectors with the smallest error value of the reference block in the at least one block vector are determined as block vectors in the first historical block vector information.
  • the second determining unit 720 is specifically configured to:
  • a first block vector in the block vector information used by the current block is determined as a block vector in the first historical block vector information, or a second block vector obtained by adjusting the first block vector based on an adjustment amount of the first block vector is determined as a block vector in the first historical block vector information.
  • the second determining unit 720 is specifically configured to:
  • the first block vector is determined as the block vector in the first historical block vector information.
  • the second determining unit 720 is specifically configured to:
  • the second block vector is determined as the block vector in the first historical block vector information.
  • the second determining unit 720 is specifically configured to:
  • the first historical block vector information includes a third block vector
  • the accuracy in the block vector information used by the current block and corresponding to one or more block vectors used to determine the third block vector is determined as the accuracy of the third block vector; the first historical block vector information includes the accuracy of the third block vector.
  • the second determining unit 720 is specifically configured to:
  • At least one of the following items included in the block vector information used by the current block is determined as information in the first historical block vector information:
  • An index used to indicate weights of multiple reference blocks used by the current block is an index used to indicate weights of multiple reference blocks used by the current block.
  • the encoder further comprises:
  • An encoding unit used for encoding the first identifier
  • the first identifier indicates that the first historical block vector information list is updated based on the first prediction mode.
  • the second determining unit 720 is specifically configured to:
  • the first historical block vector information is determined based on the block vector information used by the current block.
  • the second determining unit 720 is specifically configured to:
  • the first historical block vector information is determined based on the block vector information used by the current block:
  • the area of the current block is greater than or equal to a first threshold
  • the width of the current block is greater than or equal to a second threshold
  • the height of the current block is greater than or equal to a third threshold
  • the type of the current image to which the current block belongs is a preset type.
  • the updating unit 730 is specifically used to:
  • the first historical block vector information list includes the first historical block vector information
  • the first historical block vector information is moved to the end of the first historical block vector information list.
  • the updating unit 730 is specifically used to:
  • the first historical block vector information in the first historical block vector information list is less than a fourth preset value, the first historical block vector information is added to the first historical block vector information list; otherwise, the historical block vector information at the front of the first historical block vector information list is removed, and the first historical block vector information is added to the end of the first historical block vector information list.
  • the first historical block vector information list is a historical block vector information list common to the first prediction mode and the IBC mode.
  • the priority of the second historical block vector information in the first historical block vector information list and belonging to the first prediction mode is lower than the priority of the third historical block vector information in the first historical block vector information list and belonging to the IBC mode.
  • the first historical block vector information list is a historical block vector information list of the first prediction mode, and the first historical block vector information and the second historical block vector information list of the IBC mode are both used to determine the candidate block vector information list.
  • the first historical block vector information list is used to determine the priority of the candidate block vector information list, which is lower than the priority of the second historical block vector information list used to determine the candidate block vector information list.
  • the current image to which the current block belongs is divided into multiple regions, the multiple regions include the region where the current block is located, and the first historical block vector information list is a historical block vector information list corresponding to the region.
  • the device embodiment of the encoder and the method embodiment of the encoding method can correspond to each other, and similar descriptions can refer to the method embodiment. To avoid repetition, it is not repeated here.
  • the encoder 700 shown in Figure 16 can correspond to the corresponding subject in the encoding method 500 of the embodiment of the present application, and the aforementioned and other operations and/or functions of each unit in the encoder 700 are respectively for implementing the corresponding processes in each method such as the encoding method 500.
  • each unit in the decoder 600 or encoder 700 involved in the embodiment of the present application is divided based on logical functions.
  • the function of a unit can also be realized by multiple units, or the function of multiple units is realized by one unit, and even, these functions can also be assisted by one or more other units.
  • part or all of the decoder 600 or encoder 700 are merged into one or several other units.
  • a certain (some) unit in the decoder 600 or encoder 700 can also be split into multiple units smaller in function to constitute, which can realize the same operation without affecting the realization of the technical effect of the embodiment of the present application.
  • the decoder 600 or encoder 700 can also include other units, and in practical applications, these functions can also be assisted by other units, and can be realized by the collaboration of multiple units.
  • a computer program capable of executing each step involved in the corresponding method can be run on a general computing device of a general-purpose computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read-only storage medium (ROM) to construct the decoder 600 or encoder 700 involved in the embodiment of the present application, and to implement the encoding method or decoding method of the embodiment of the present application.
  • the computer program can be recorded on, for example, a computer-readable storage medium, and loaded into an electronic device through a computer-readable storage medium, and run therein to implement the corresponding method of the embodiment of the present application.
  • the units involved above can be implemented in hardware form, can be implemented in software form, and can also be implemented in the form of a combination of hardware and software.
  • the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and/or software form of the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software in the decoding processor to perform.
  • the software may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the method embodiment mentioned above in combination with its hardware.
  • FIG. 17 is a schematic structural diagram of an electronic device 800 provided in the present application.
  • the electronic device 800 at least includes a processor 810 and a computer-readable storage medium 820.
  • the processor 810 and the computer-readable storage medium 820 may be connected via a bus or other means.
  • the computer-readable storage medium 820 is used to store a computer program 821, which includes computer instructions, and the processor 810 is used to execute the computer instructions stored in the computer-readable storage medium 820.
  • the processor 810 is the computing core and control core of the electronic device 800, which is suitable for implementing one or more computer instructions, and is specifically suitable for loading and executing one or more computer instructions to implement the corresponding method flow or corresponding function.
  • the processor 810 may also be referred to as a central processing unit (CPU).
  • the processor 810 may include, but is not limited to, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, discrete hardware components, and the like.
  • DSP digital signal processor
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • the computer-readable storage medium 820 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory; optionally, it may be at least one computer-readable storage medium located away from the aforementioned processor 810.
  • the computer-readable storage medium 820 includes but is not limited to: a volatile memory and/or a non-volatile memory. Volatile memory.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory can be a random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • DR RAM direct memory bus random access memory
  • the electronic device 800 may be a decoder or decoding framework involved in an embodiment of the present application; a second computer instruction is stored in the computer-readable storage medium 820; the processor 810 loads and executes the second computer instruction stored in the computer-readable storage medium 820 to implement the corresponding steps in the decoding method provided in the present application; in other words, the second computer instruction in the computer-readable storage medium 820 is loaded by the processor 810 and the corresponding steps are executed. To avoid repetition, it will not be repeated here.
  • the electronic device 800 may be an encoder or encoding framework involved in an embodiment of the present application; a first computer instruction is stored in the computer-readable storage medium 820; the processor 810 loads and executes the first computer instruction stored in the computer-readable storage medium 820 to implement the corresponding steps in the encoding method provided in the present application; in other words, the first computer instruction in the computer-readable storage medium 820 is loaded by the processor 810 and the corresponding steps are executed. To avoid repetition, it will not be repeated here.
  • the present application also provides a coding and decoding system, including the encoder and decoder mentioned above.
  • the present application also provides a computer-readable storage medium (Memory), which is a memory device in the electronic device 800 for storing programs and data.
  • a computer-readable storage medium 820 is a memory device in the electronic device 800 for storing programs and data.
  • a computer-readable storage medium 820 can include both the built-in storage medium in the electronic device 800 and the extended storage medium supported by the electronic device 800.
  • the computer-readable storage medium provides a storage space, which stores the operating system of the electronic device 800.
  • one or more computer instructions suitable for being loaded and executed by the processor 810 are also stored in the storage space, and these computer instructions can be one or more computer programs 821 (including program codes).
  • the present application also provides a computer program product or computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • computer program 821 the data processing device 800 can be a computer, and the processor 810 reads the computer instructions from the computer-readable storage medium 820, and the processor 810 executes the computer instructions so that the computer executes the encoding method or decoding method provided in the various optional methods mentioned above.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
  • wired e.g., coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless e.g., infrared, wireless, microwave, etc.
  • the present application further provides a code stream, which may be a code stream decoded using the decoding method provided by the present application or a code stream generated using the encoding method provided by the present application.

Landscapes

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

Abstract

本申请提供了一种解码方法、编码方法、解码器以及编码器,该解码方法涉及图像或视频解码技术领域,该解码方法包括:基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;基于该当前块使用的块矢量信息确定第一历史块矢量信息;基于该第一历史块矢量信息更新第一历史块矢量信息列表;其中,该第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,该IBC块为在该当前块之后使用该IBC模式解码的块。本申请提供的解码方法利用第一预测模式更新第一历史块矢量信息列表,相当于,利用第一预测模式丰富了IBC块的候选块矢量信息,能够提升IBC块的解码性能以及提升解码器的解码性能。

Description

解码方法、编码方法、解码器以及编码器 技术领域
本申请涉及编解码技术领域,并且更具体地,涉及解码方法、编码方法、解码器以及编码器。
背景技术
数字视频压缩技术主要是将庞大的数字影像视频数据进行压缩,以便于传输以及存储等。
随着互联网视频的激增以及人们对视频清晰度的要求越来越高,尽管已有的数字视频压缩标准能够节省不少视频数据,但目前仍然需要追求更好的数字视频压缩技术,以减少数字视频传输的带宽和流量压力。
发明内容
本申请提供了一种解码方法、编码方法、解码器以及编码器,能够提升IBC块的解码性能以及提升解码器的解码性能。
第一方面,本申请提供了一种解码方法,包括:
基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式解码的块。
第二方面,本申请提供了一种编码方法,包括:
基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式编码的块。
第三方面,本申请提供了一种解码器,包括:
第一确定单元,用于基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
第二确定单元,用于基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
更新单元,用于基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式解码的块。
第四方面,本申请提供了一种编码器,包括:
第一确定单元,用于基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
第二确定单元,用于基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
更新单元,用于基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式编码的块。
第五方面,本申请提供了一种解码器,包括:
处理器,适于实现计算机指令;以及,
计算机可读存储介质,计算机可读存储介质存储有计算机指令,计算机指令适于由处理器加载并执行上文涉及的第一方面或其各实现方式中的解码方法。
在一种实现方式中,该处理器为一个或多个,该存储器为一个或多个。
在一种实现方式中,该计算机可读存储介质可以与该处理器集成在一起,或者该计算机可读存储介质与处理器分离设置。
第六方面,本申请提供了一种编码器,包括:
处理器,适于实现计算机指令;以及,
计算机可读存储介质,计算机可读存储介质存储有计算机指令,计算机指令适于由处理器加载并执行上文涉及的第二方面或其各实现方式中的编码方法。
在一种实现方式中,该处理器为一个或多个,该存储器为一个或多个。
在一种实现方式中,该计算机可读存储介质可以与该处理器集成在一起,或者该计算机可读存储介质与处理器分离设置。
第七方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机指令,该计算机指令被计算机设备的处理器读取并执行时,使得计算机设备执行上文涉及的第一方面涉及的解码方法或上文涉及的第二方面涉及的编码方法。
第八方面,本申请提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上文涉及的第一方面涉及的解码方法或上文涉及的第二方面涉及的编码方法。
第九方面,本申请提供了一种码流,该码流如上文涉及的第一方面所述的方法中涉及的码流或如上文涉及的第二方面所述的方法生成的码流。
基于以上技术方案,针对本申请提供的解码方法,基于与IBC模式不同的第一预测模式更新用于确定候选块矢量信息列表的第一历史块矢量信息列表,由于候选块矢量信息列表是当前块之后使用IBC模式解码的IBC块使用的列表,因此,利用第一预测模式更新第一历史块矢量信息列表,相当于,利用第一预测模式丰富了IBC块的候选块矢量信息,能够提升IBC块的解码性能以及提升解码器的解码性能。
附图说明
图1为本申请提供的视频编解码系统的示意性框图。
图2是本申请提供的视频编码器的示意性框图。
图3是本申请提供的编码树单元和编码单元的关系的示意性结构图。
图4是本申请提供的视频解码器的示意性框图。
图5是本申请提供的IntraTMP模式的原理的示例。
图6是本申请提供的IntraTMP模式采用的模板匹配过程的原理的示例。
图7是本申请提供的针对摄像机捕获内容的IntraTMP适应技术的示例。
图8是本申请提供的候选块列表的构建原理的示例。
图9是本申请提供的IntraTMP融合预测技术的原理的示例。
图10是本申请提供的滤波器的滤波原理的示例。
图11是本申请提供的确定滤波器系数的原理的示例。
图12是本申请提供的当前块的区域划分方式的示例。
图13是本申请提供的解码方法的示意性流程图。
图14是本申请提供的编码方法的示意性流程图。
图15是本申请的解码器的示意性框图。
图16是本申请的编码器的示意性框图。
图17是本申请提供的电子设备的示意结构图。
具体实施方式
本申请提供的方案可应用于数字压缩技术领域。
其中,数字视频压缩技术主要是将庞大的数字影像视频数据进行压缩,以便于传输以及存储等。
本申请提供的方案可应用数字视频编码技术领域。
其中,数字视频编码技术领域包括但不限于以下中的至少一项:图像编解码领域、视频编解码领域、硬件视频编解码领域、专用电路视频编解码领域以及实时视频编解码领域。此外,本申请提供的方案可结合到以下标准:音视频编码标准(Audio Video coding Standard,AVS)、第二代AVS标准(AVS2)或第三代AVS标准(AVS3)。例如,包括但不限于:H.264/音视频编码(Audio Video coding,AVC)标准、H.265/高效视频编码(High Efficiency Video Coding,HEVC)标准以及H.266/多功能视频编码(Versatile Video Coding,VVC)标准。另外,本申请提供的方案可以用于对图像进行有损压缩(lossy compression),也可以用于对图像进行无损压缩(lossless compression)。其中,该无损压缩可以是视觉无损压缩(visually lossless compression),也可以是数学无损压缩(mathematically lossless compression)。
视频编解码标准可以采用基于块的混合编码框架。
混合编码框架包括预测(prediction)、变换(transform)、量化(quantization)、熵编码(entropy coding)、环路滤波(in loop filter)等模块。预测模块包括帧内(intra)预测和/或帧间(inter)预测。由于视频的一 帧中的相邻像素之间存在很强的相关性,在视频编解码技术中使用intra预测的方法消除相邻像素之间的空间冗余。intra预测只参考同一帧图像的信息,预测当前划分块内的像素信息。由于视频中的相邻帧之间存在着很强的相似性,在视频编解码技术中使用inter预测方法消除相邻帧之间的时间冗余,从而提高编码效率。inter预测包括运动估计(motion estimation)和运动补偿(motion compensation)。inter预测可以参考不同帧的图像信息,利用运动估计搜索最匹配当前划分块的运动矢量信息。变换将预测后的图像块转换到频率域,能量重新分布,结合量化可以将人眼不敏感的信息去除,用于消除视觉冗余。熵编码可以根据当前上下文模型以及二进制码流的概率信息消除字符冗余。
视频编码器的基本流程如下:
编码器先将一帧图像划分成块;然后对当前图像中的当前块(current block)进行预测,得到当前块的预测块;接着利用当前块的原始块减去预测块,得到残差块;对残差块进行变换、量化得到量化系数矩阵;然后对量化系数矩阵进行熵编码,得到输出码流。
视频解码器的基本流程如下:
解码器一方面对当前块进行预测得到当前块的预测块,另一方面解析码流得到量化系数矩阵,对量化系数矩阵进行反量化、反变换得到残差块;然后将预测块和残差块相加得到重建块。重建块组成重建图像,基于图像或基于块对重建图像进行环路滤波得到解码图像。
值得注意的是,当前块(current block)可以是当前编解码单元(CU)或当前预测单元(PU)等。
此外,编码器同样需要和解码器类似的操作获得解码图像。解码图像可以为后续的帧,提供作为inter预测的参考帧。编码器确定的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息或者参数信息如果有必要需要写入码流。解码器通过解析及根据已有信息进行分析确定与编码器相同的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息或者参数信息,从而保证编码器获得的解码图像和解码器获得的解码图像相同。编码器获得的解码图像通常也叫做重建图像。编解码器在预测时可以将当前块划分成预测单元,在变换时可以将当前块,划分成变换单元,预测单元和变换单元的划分可以不同。上述是基于块的混合编码框架下的视频编解码器的基本流程,随着技术的发展,该框架或流程的一些模块或步骤可能会被优化,本申请对此不作具体限定。
需要说明的是,本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
例如,本文中的术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。术语“至少一项”,仅仅是一种描述列举对象的组合关系,表示可以存在一项或多项,例如,以下中的至少一项:A、B、C,可以表示以下几种组合情况:单独存在A,单独存在B,单独存在C,同时存在A和B,同时存在A和C,同时存在B和C,同时存在A、B以及C。术语“多个”是指两个或两个以上。字符“/”,一般表示前后关联对象是一种“或”的关系。
再如,术语“对应”可表示两者之间具有直接对应或间接对应的关系,也可以表示两者之间具有关联关系,也可以是指示与被指示、配置与被配置等关系。术语“指示”可以是直接指示,也可以是间接指示,还可以是表示具有关联关系。举例说明,A指示B,可以表示A直接指示B,例如B可以通过A获取;也可以表示A间接指示B,例如A指示C,B可以通过C获取;还可以表示A和B之间具有关联关系。术语“预定义”或“预配置”可以在设备(例如,包括编码器或解码器)中预先保存相应的代码、表格或其他可用于指示的相关信息,也可以是指由协议约定。“协议”可以指编解码领域的任意一种标准协议,本申请对此不做限定。术语“在……时”可以被解释成为“如果”或“若”或“当……时”或“响应于”等类似描述。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”等类似描述。术语“第一”、“第二”、“第三”、“第四”、“第A”、“第B”等是用于区别不同对象,而不是用于描述特定顺序。术语“包括”和“具有”以及它们任何变形,意图在于覆盖不(或非)排他的包含。
为了便于理解,首先结合图1对本申请实施例涉及的视频编解码系统进行介绍。
图1为本申请实施例涉及的一种视频编解码系统的示意性框图。
如图1所示,该视频编解码系统100包含编码设备110和解码设备120。
其中,编码设备110用于对视频数据进行编码(可以理解成压缩)产生码流,并将码流传输给解码设备120。解码设备120对编码设备110编码产生的码流进行解码,得到解码后的视频数据。
编码设备110可以理解为具有视频编码功能的设备,解码设备120可以理解为具有视频解码功能的设备,即本申请实施例对编码设备110和解码设备120包括更广泛的装置,例如包含智能手机、台式计 算机、移动计算装置、笔记本(例如,膝上型)计算机、平板计算机、机顶盒、电视、相机、显示装置、数字媒体播放器、视频游戏控制台、车载计算机等。
编码设备110可以经由信道130将编码后的视频数据(例如码流)传输给解码设备120。
信道130可以包括能够将编码后的视频数据从编码设备110传输到解码设备120的一个或多个媒体和/或装置。
信道130可以包括使编码设备110能够实时地将编码后的视频数据直接发射到解码设备120的一个或多个通信媒体。编码设备110可根据通信标准来调制编码后的视频数据,且将调制后的视频数据发射到解码设备120。其中通信媒体包含无线通信媒体,例如射频频谱。通信媒体还可以包含有线通信媒体,例如一根或多根物理传输线。
信道130可以包括存储介质,该存储介质可以存储编码设备110编码后的视频数据。存储介质包含多种本地存取式数据存储介质,例如光盘、DVD、快闪存储器等。在该实例中,解码设备120可从该存储介质中获取编码后的视频数据。
信道130可以包含存储服务器,该存储服务器可以存储编码设备110编码后的视频数据。在此实例中,解码设备120可以从该存储服务器中下载存储的编码后的视频数据。可选的,该存储服务器可以存储编码后的视频数据且可以将该编码后的视频数据发射到解码设备120,例如web服务器(例如,用于网站)、文件传送协议(FTP)服务器等。
编码设备110包含视频编码器112及输出接口113。
其中,输出接口113可以包含调制器/解调器(调制解调器)和/或发射器。视频编码器112经由输出接口113将编码后的视频数据直接传输到解码设备120。编码后的视频数据还可存储于存储介质或存储服务器上,以供解码设备120后续读取。
编码设备110除了包括视频编码器112和输入接口113外,还可以包括视频源111。
视频源111可包含视频采集装置(例如,视频相机)、视频存档、视频输入接口、计算机图形系统中的至少一个,其中,视频输入接口用于从视频内容提供者处接收视频数据,计算机图形系统用于产生视频数据。视频编码器112对来自视频源111的视频数据进行编码,产生码流。视频数据可包括一个或多个图像(picture)或图像序列(sequence of pictures)。码流以比特流的形式包含了图像或图像序列的编码信息。编码信息可以包含编码图像数据及相关联数据。相关联数据可包含序列参数集(sequence parameter set,SPS)、图像参数集(picture parameter set,PPS)及其它语法结构。SPS可含有应用于一个或多个序列的参数。PPS可含有应用于一个或多个图像的参数。语法结构是指:码流中以指定次序排列的零个或多个语法元素的集合。
解码设备120包含输入接口121和视频解码器122。输入接口121可包含接收器及/或调制解调器。
解码设备120除包括输入接口121和视频解码器122外,还可以包括显示装置123。
其中,输入接口121可通过信道130接收编码后的视频数据。视频解码器122用于对编码后的视频数据进行解码,得到解码后的视频数据,并将解码后的视频数据传输到显示装置123。显示装置123显示解码后的视频数据。显示装置123可与解码设备120整合或在解码设备120外部。显示装置123可包括多种显示装置,例如液晶显示器(LCD)、等离子体显示器、有机发光二极管(OLED)显示器或其它类型的显示装置。
应当理解,图1仅为本申请的示例,不应理解为对本申请的显示,也即是说,本申请实施例的技术方案不限于图1所示的系统框架,例如本申请的技术还可以应用于单侧的视频编码或者单侧的视频解码。
下面对本申请实施例涉及的视频编码框架进行介绍。
图2是本申请实施例涉及的视频编码器200的示意性框图。
应当理解,该视频编码器200可应用于亮度色度(YCbCr,YUV)格式的图像数据上。例如,YUV比例可以为4:2:0、4:2:2或者4:4:4,Y表示明亮度(Luma),Cb(U)表示蓝色色度,Cr(V)表示红色色度,U和V表示为色度(Chroma)用于描述色彩及饱和度。例如,在颜色格式上,4:2:0表示每4个像素有4个亮度分量,2个色度分量(YYYYCbCr),4:2:2表示每4个像素有4个亮度分量,4个色度分量(YYYYCbCrCbCr),4:4:4表示全像素显示(YYYYCbCrCbCrCbCrCbCr)。当然,也可以应用于红绿蓝(Red-Green-Blue,RGB)格式的图像数据,本申请对此不作具体限定。
视频编码器200读取视频流后,针对视频流中的每帧图像,可将其划分成若干个编码树单元(coding tree unit,CTU)。在一些例子中,CTU可被称作“树型块”、“最大编码单元”(Largest Coding unit,LCU)或“编码树型块”(coding tree block,CTB)。每一个CTU可以与图像内的具有相等大小的像素块相关联。每一像素可对应一个亮度(luminance或luma)采样及两个色度(chrominance或chroma)采样。因此,每一 个CTU可与一个亮度采样块及两个色度采样块相关联。一个CTU大小例如可以为128×128、64×64、32×32等。图3是本申请提供的编码树单元和编码单元的关系的示意性结构图。如图3所示,一个CTU又可以继续被划分成若干个编码单元(Coding Unit,CU)进行编码,CU可以为矩形块也可以为方形块。CU可以进一步划分为预测单元(prediction Unit,PU)和变换单元(transform unit,TU),进而使得编码、预测、变换分离,处理的时候更灵活。在一种示例中,CTU以树(例如四叉树)方式划分为CU,CU以树方式(例如四叉树)划分为TU、PU。
视频编码器及视频解码器可支持各种PU大小。
假定特定CU的大小为2N×2N,视频编码器及视频解码器可支持2N×2N或N×N的PU大小以用于帧内(intra)预测,且支持2N×2N、2N×N、N×2N、N×N或类似大小的对称PU以用于帧间(inter)预测。视频编码器及视频解码器还可支持2N×nU、2N×nD、nL×2N及nR×2N的不对称PU以用于帧间(inter)预测。
如图2所示,该视频编码器200可包括:预测单元210、残差单元220、变换/量化单元230、反变换/量化单元240、重建单元250、环路滤波单元260、解码图像缓存270和熵编码单元280。需要说明的是,视频编码器200可包含更多、更少或不同的功能组件。在本申请中,当前块(current block)可以称为当前编码单元(CU)或当前预测单元(PU)等。预测块也可称为预测图像块或图像预测块,重建图像块也可称为重建块或图像重建图像块。
预测单元210包括帧间(inter)预测单元211、帧内(intra)预测单元212。由于视频中一个图像中的相邻像素之间存在很强的相关性,在视频编解码技术中,使用intra预测的方法消除相邻像素之间的空间冗余。由于视频中的相邻图像之间存在着很强的相似性,使用inter预测方法消除相邻图像之间的时间冗余,从而提高编码效率。
inter预测单元211可用于inter预测,其可以包括运动估计(motion estimation)和运动补偿(motion compensation),可以参考不同帧的图像信息,inter预测使用运动信息,从参考帧中,找到参考块,根据参考块生成预测块,用于消除时间冗余;该参考帧可以为P帧和/或B帧,P帧指:向前预测帧,B帧指:双向预测帧。inter预测使用运动信息找到参考块后,根据参考块生成预测块。运动信息包括参考帧所属的帧列表、帧索引以及运动矢量。运动矢量可以是整像素的或者是分像素的,如果运动矢量是分像素的,那么需要在参考帧中,使用插值滤波做出所需的分像素的块,参考块就是根据运动矢量找到的整像素或者分像素的块。有的技术会直接把参考块作为预测块,有的技术会在参考块的基础上再处理生成预测块。在参考块的基础上再处理生成预测块也可以理解为把参考块作为预测块然后再在预测块的基础上处理生成新的预测块。
intra预测单元212只参考同一帧图像的信息,预测当前码图像块内的像素信息,用于消除空间冗余。intra预测所使用的参考帧可以为I帧。
intra预测有多种预测模式,可借助角度预测模式与非角度(Non-angle)预测模式对待编码图像块进行预测,以得到预测块,根据预测块与待编码图像块,计算得到的率失真信息,筛选出待编码图像块最优的预测模式,并将该预测模式写入码流以传输到解码端。解码端解析出预测模式,预测得到目标解码块的预测块并叠加基于码流而获取的时域残差块,可得到重建块。
以国际数字视频编码标准H系列为例,H.264/AVC标准有8种角度预测模式和1种非角度(Non-angle)预测模式,H.265/HEVC扩展到33种角度预测模式和2种非角度(Non-angle)预测模式。HEVC使用的intra预测模式有平面模式(Planar)、直流(DC)和33种角度模式,共35种预测模式。VVC使用的帧内模式有Planar、DC和65种角度模式,共67种预测模式,其包括传统预测模式和非传统的预测模式,非传统的预测模式可以包括矩阵加权intra预测(Matrix weighted intra-frame prediction,MIP)模式。传统预测模式包括:模式编号0的平面(planar)模式、模式编号1的DC模式和模式编号2到模式编号66的角度预测模式。需要说明的是,随着角度模式的增加,intra预测的预测结果将会更加精确,也更加符合对高清以及超高清的数字视频发展的需求,上述intra预测模式仅为本申请的示例,不应对本申请产生限定。
残差单元220可基于CU的像素块及CU的PU的预测块来产生CU的残差块。举例来说,残差单元220可产生CU的残差块,使得残差块中的每一采样具有等于以下两者之间的差的值:CU的像素块中的采样,及CU的PU的预测块中的对应采样。
变换/量化单元230可量化变换系数。变换/量化单元230可基于与CU相关联的量化参数(QP)值来量化与CU的TU相关联的变换系数。视频编码器200可通过调整与CU相关联的QP值来调整应用于与CU相关联的变换系数的量化程度。
反变换/量化单元240可分别将逆量化及逆变换应用于量化后的变换系数,以从量化后的变换系数重建残差块。
重建单元250可将重建后的残差块的采样加到预测单元210产生的一个或多个预测块的对应采样,以产生与TU相关联的重建图像块。通过此方式重建CU的每一个TU的采样块,视频编码器200可重建CU的像素块。
环路滤波单元260用于对反变换与反量化后的像素进行处理,弥补失真信息,为后续编码像素提供更好的参考,例如可执行消块滤波操作以减少与CU相关联的像素块的块效应。在一些实施例中,环路滤波单元260包括:去块(DeBlocking)滤波(DeBlocking Filter,DBF)单元和样点自适应补偿/自适应环路滤波(SAO/ALF)单元,其中,DBF单元用于去方块效应,SAO/ALF单元用于去除振铃效应。
解码图像缓存270可存储重建后的像素块。
其中,inter预测单元211可使用解码图像缓存270中含有重建后的像素块的参考图像来对其它图像的PU执行inter预测。另外,intra预测单元212可使用解码图像缓存270中的重建后的像素块来对在与CU相同的图像中的其它PU执行intra预测。
熵编码单元280可接收来自变换/量化单元230的量化后的变换系数。熵编码单元280可对量化后的变换系数执行一个或多个熵编码操作以产生熵编码后的数据。
图4是本申请实施例涉及的视频解码器的示意性框图。
如图4所示,视频解码器300包含:熵(entropy)解码单元310、预测单元320、反量化/变换单元330、重建单元340、环路滤波单元350及解码图像缓存360。需要说明的是,视频解码器300可包含更多、更少或不同的功能组件。
视频解码器300可接收码流。熵(entropy)解码单元310可解析码流以从码流提取语法元素。作为解析码流的一部分,熵解码单元310可解析码流中的经熵编码后的语法元素。预测单元320、反量化/变换单元330、重建单元340及环路滤波单元350可根据从码流中提取的语法元素来解码视频数据,即产生解码后的视频数据。
预测单元320包括:帧内(intra)预测单元322、帧间(inter)预测单元321。
intra预测单元322可执行intra预测以产生PU的预测块。intra预测单元322可使用intra预测模式以基于空间相邻PU的像素块来产生PU的预测块。intra预测单元322还可根据从码流解析的一个或多个语法元素来确定PU的intra预测模式。
inter预测单元321可根据从码流解析的语法元素来构造第一参考图像列表(列表0)及第二参考图像列表(列表1)。此外,如果PU使用inter预测编码,则熵解码单元310可解析PU的运动信息。inter预测单元321可根据PU的运动信息来确定PU的一个或多个参考块。inter预测单元321可根据PU的一个或多个参考块来产生PU的预测块。
反量化/变换单元330可逆量化(即,解量化)与TU相关联的变换系数。反量化/变换单元330可使用与TU的CU相关联的QP值来确定量化程度。在逆量化变换系数之后,反量化/变换单元330可将一个或多个逆变换应用于逆量化变换系数,以便产生与TU相关联的残差块。
重建单元340使用与CU的TU相关联的残差块及CU的PU的预测块以重建CU的像素块。例如,重建单元340可将残差块的采样加到预测块的对应采样以重建CU的像素块,得到重建图像块。
环路滤波单元350可执行消块滤波操作以减少与CU相关联的像素块的块效应。
视频解码器300可将CU的重建图像存储于解码图像缓存360中。视频解码器300可将解码图像缓存360中的重建图像作为参考图像用于后续预测,或者,将重建图像传输给显示装置呈现。
结合图2和图4来说,视频编解码的基本流程如下:
在编码端,将一帧图像划分成图像块,针对当前块,预测单元210使用intra预测或inter预测,预测当前块(即待编码块)的预测块。残差单元220可基于预测块与当前块(即待编码块)的原始块,计算残差块,即预测块和原始块的差值,该残差块也可称为残差信息。该残差块经由变换/量化单元230变换与量化等过程,可以去除人眼不敏感的信息,以消除视觉冗余。可选的,经过变换/量化单元230变换与量化之前的残差块可称为时域残差块,经过变换/量化单元230变换与量化之后的时域残差块可称为频率残差块或频域残差块。熵编码单元280接收到变化量化单元230输出的量化后的变化系数,可对该量化后的变化系数进行熵编码,输出码流。例如,熵编码单元280可根据目标上下文模型以及二进制码流的概率信息消除字符冗余。
在解码端,熵解码单元310可解析码流得到当前块(即待解码块)的预测信息、量化系数矩阵等,预测单元320基于预测信息,使用intra预测或inter预测,预测当前块(即待解码块)的预测块。反量化/变换单元330使用从码流得到的量化系数矩阵,对量化系数矩阵进行反量化、反变换得到残差块。重建单元340将预测块和残差块相加得到重建块。重建块组成重建图像,环路滤波单元350基于图像或 基于块对重建图像进行环路滤波,得到解码图像。值得注意的是,编码端同样需要采用和解码器类似的操作获得解码图像。该解码图像也可以称为重建图像,重建图像可以为后续的帧,作为inter预测的参考帧。
此外,编码器确定的块划分信息,以及预测、变换、量化、熵编码、环路滤波等模式信息或者参数信息等在必要时携带在码流中。解码端通过解析码流及根据已有信息进行分析确定与编码端相同的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息或者参数信息,从而保证编码器获得的解码图像和解码器获得的解码图像相同。
需要说明的是,由于并行处理的需要,图像可以被划分成片(slice)等,同一个图像中的片可以并行处理,也就是说它们之间没有数据依赖。术语“帧”可以理解为图像或slice等。此外,上述是基于块的编解码框架下的视频编解码器的基本流程,随着技术的发展,该框架或流程的一些模块或步骤可能会被优化,即本申请不限于该框架及流程。
为了便于理解本申请的技术方案,下面对相关内容进行说明。
(1)、帧内模板匹配预测(Intra Template Matching Prediction,IntraTMP)模式。
IntraTMP模式是一种特殊的亮度块帧内预测编码工具,主要应用于屏幕内容编码。
图5是本申请提供的IntraTMP模式的原理的示例。
如图5所示,IntraTMP模式主要通过以下流程实现:
编码器(或解码器)选择当前编码块邻近的L型部分已重建像素作为模板,在给定的当前帧已重建区域中搜索最相似的模板,将最相似模板对应的重建块作为匹配块,用作当前编码块的预测块。例如,图中R1至R4是IntraTMP模式可用的搜索区域。例如可以依次在R1至R4中按栅格扫描(raster scan)顺序逐点寻找匹配块。
图6是本申请提供的IntraTMP模式采用的模板匹配过程的原理的示例。
如图6所示,当前块的模板可包括当前块左侧的L列像素、上侧的M列像素、以及左上角的M行L列像素,其中,M和L均为正整数,例如M和L的取值均为4。当前块的匹配块可以由当前块指向匹配块的块矢量表示,当前块的模板和匹配块的模板间的相似程度由模板误差值的大小表示,模板误差值越小则相似程度越高。例如,可以使用绝对误差和(Sum of Absolute Difference,SAD)计算模板误差值,SAD越小,表示模板越相似。
编码器通过标志位cu_tmp_flag表示当前编码块是否使用IntraTMP模式。若是则在解码端进行同样的模板匹配过程,以在解码端获得同样的预测块,对于IntraTMP模式,码流中不需要额外编码块矢量信息。
应当理解,本申请涉及的术语“块矢量”也可以称为块向量或其他具有类似含义的描述。
(2)、针对摄像机捕获内容的IntraTMP适应(IntraTMP adaption for camera-captured content)技术。
图7是本申请提供的针对摄像机捕获内容的IntraTMP适应技术的示例。
如图7中的(a)所示,针对摄像机捕获内容的IntraTMP适应技术在原有IntraTMP模式的基础上,提出以步长S(即水平、垂直方向每隔S点,S>1)进行模板匹配。例如,在搜索区域,不是按栅格扫描(raster scan)逐点寻找匹配块,而是在搜索区域水平、垂直方向每隔S点搜索。例如,当前进行模板匹配的块矢量是(X0,Y0),则水平方向上进行的下一个模板匹配的块矢量应为(X0+S,Y0),在垂直方向上进行的下一个模板匹配的块矢量纵坐标应为Y0+S。完成模板匹配后,如图7的(b)所示,在一定范围内对最佳的匹配块进行精炼(即以更小步长S'进行模板匹配),例如,以更小步长进行模板匹配的方法内对匹配的块矢量进行精炼,以优化匹配结果。该技术在保持较好编码效率的同时有效降低IntraTMP模式的复杂度。
(3)、IntraTMP多候选技术。
IntraTMP多候选技术通过模板匹配过程在参考区域内获取N个候选匹配块,或者说构建一个长度为N的候选块列表,列表内候选块可以根据与当前块之间的模板误差值大小排序。通过索引选中列表中某一候选块作为最终的预测块。对使用IntraTMP多候选技术的编码块,解码器在解码IntraTMP标志位intra_tmp_flag为真后,继续解码intra_tmp_idx,该intra_tmp_idx语法元素可以表示选中候选块的索引。
解码器解码语法元素的过程可如下所示:
intra_tmp_flag
If(intra_tmp_flag)
{
   intra_tmp_idx
}。
那么应该如何构建候选块列表(intraTmpCandList)。一个例子如下:
由于intraTMP每搜索一个BV,会计算BV下的模板上的代价。模板上的代价一般由当前块的模板和当前BV确定的与当前块相同大小的块的模板匹配的代价。这个代价可以是SAD,SATD,SSE等。IntraTMP可以按这些代价按从小到大的顺序将搜索到的块或者说搜索到的BV进行排序,排在最前面的N个候选即为intraTmpCandList的N个候选。或者只维护代价最小的前N个候选,对排序超过N的候选可以直接抛弃,从而节约计算量。
通常相邻BV对应的块之间是比较接近的,特别是如果BV支持分像素精度,如1/2,1/4,1/8,1/16精度等。那么如果不加控制的只按照模板上的代价进行排序,很容易将多个候选集中到一个很小的范围内。所以这里需要做一些控制以避免intraTmpCandList中候选的BV过于集中。
一种方法如下:
在搜索的过程中,并不对每一个可能的BV依次进行搜索。比如通常的搜索顺序是从左到右,从上到下。一般而言,对整像素的BV,可以依次搜索。如当前搜索的BV为(x0,y0),则下一个为(x0+1,y0),前提是未到达搜索范围的边界。但是这里我们可以先做一个稀疏的搜索。比如整像素的BV,如当前搜索的BV为(x0,y0),则下一个为(x0+4,y0),前提是未到达搜索范围的边界。即每隔一定的像素个数进行一次模板匹配,也可以叫每个一定的步长进行一次模板匹配。这里的步长可以是一个预设的值,如2,4,8,等。当然竖直方向也可以做相同的处理。先找到N代价最小的BV。再在N隔代价最小的BV的基础上,以每个BV为基础在一个小范围内进行改善。如上面的搜索间隔是4像素,那么这里改善的范围可以设为4x4,改善的BV可以代替原来的BV重新在N个候选中进行排序。这样就可以得到N个有一定距离的BV的候选。
比如,设N为3,可按照以下方式进行改善:
第一步:
以一定步长进行第一遍搜索,例如水平步长、竖直步长均为K。得到N个有一定间距的最优匹配块(模板误差值最小的前N个)。
第二步:
在第一步得到的N个匹配块邻近区域进行第二遍搜索,这些邻近区域可以根据第一步中的步长设置为不重叠的多个区域。从这些区域中得到M个最优的匹配块(可以包含第一步中得到的匹配块)。
如果支持分像素精度,后续可以继续细化到分像素BV。例如,在第二步选出的整像素BV的基础上可以上下左右一个像素范围内进行1/2像素的搜索等。
值得注意的是,构建候选列表是编码端和解码端都会做的,从而保证编码端得到的候选列表和解码端得到的候选列表是一致的。
图8是本申请提供的候选块列表的构建原理的示例。
如图8中的(a)所示,在第一步中,先按预设的步长进行第一遍搜索,搜索的块的左上角如灰色点所示。如图8中的(b)所示,找到已排序的3个BV,对应的块的左上角如黑色点所示。这里水平方向的步长是4,竖直方向的步长也是4。在第二步中,可以在已排序的3个BV的基础上进行第二遍搜索,这次的搜索范围是4x4,每一个4x4的BV里找出代价最小的BV代替原来的BV重新参与intraTmpCandList的排序,当然如果代价最小的BV仍然是原来的BV可以不再重新排序。
由于intraTmpCandList是排序的,统计上来说,越靠前的候选被选中的概率越大。因此,可以为intra_tmp_idx的编码设置变长编码或者截断一元码(truncated unary)。例如,变长编码方式如下表1所示。
表1
当然,如果概率上差不多,可以使用定长编码或截断二进制(truncated binary)。
如果N比较大,前面的候选概率大,越往后概率越小,而且越往后概率越趋于接近,因而可以前面的码字短后面的码字长,后面的一些候选使用相同的码长。比如,编码器可以采用表2所示的方式进行编码。
表2
如表2所示,假设N为15,索引3~6使用相同长度的码字,索引7~14使用相同长度的码字,上表中的x可以用截断二进制(truncated binary)来得到。
(4)、IntraTMP融合预测技术。
通过帧内模板匹配,可以得到不同位置下重建块与当前编码块的模板误差值,这些重建块可以由当前编码块指向重建块的块矢量表示;构建候选块矢量信息列表用于记录模板匹配过程中模板误差值更小的块矢量;根据块矢量间距、模板误差值等条件从候选块矢量信息列表中选择一个或以上的块矢量,其指向的重建块作为当前编码块的匹配块;为每一个匹配块,确定权重值;将这些匹配块根据其权重值进行加权融合,得到最终的预测块,实现IntraTMP组合融合预测。
待融合匹配块的数量可以为固定数值,也可以根据各匹配块模板误差值的大小关系确定。例如,对可用的N个匹配块,设置阈值Threshold=minSAD<<1,minSAD为这些匹配块的模板误差值中的最小值。只有模板误差值小于等于该阈值的匹配块才被用于融合过程。通过该方法可以确定用于融合的匹配块。
确定好用于融合的匹配块后,可以使用预设的固定值、根据模板误差值计算和根据模板推导等方式确定各匹配块的权重。
图9是本申请提供的IntraTMP融合预测技术的原理的示例。
如图9所示,假设用于融合的匹配块的数量为3,即用于融合的匹配块包括匹配块1、匹配块2以及匹配块3,假设匹配块1的权重为W1,匹配块2的权重为W2,匹配块3的权重为W3,则当前块的预测块可以为:W1×匹配块1+W2×匹配块2+W3×匹配块3。
(5)、IntraTMP滤波技术。
由帧内模板匹配得到的匹配块(也可以称作参考块)可以直接用作当前块的预测块。进一步的,可以对预测块进行滤波以改善预测效果。可以用一个块级别的标志位来指示当前块是否对预测块使用所述滤波处理。
滤波器的形式可以有多种,一种可能的滤波器形式如下:
predC=c0C+c1N+c2S+c3E+c4W+c5B。
其中,该滤波器使用待滤波的像素以及其相邻的上下左右各一个像素所构成的一个十字形进行滤波。
具体地,如图10所示,C为待滤波像素,N为其上侧的像素,S为其下侧的像素,W为其左侧的像素,E为其右侧的像素,B(bias)是一个固定的值,例如B可以是像素值范围的中值,即如果像素值是10bit最大值1023,那B则设为512。c0至c5是滤波器的系数。
此外,一种确定滤波器系数的方法是用参考块的模板和当前块的模板训练滤波器的系数。
图11是本申请提供的确定滤波器系数的原理的示例。
如图11所示。模板区域为当前块上侧4行及左侧4列的重建区域。对参考块,还需要模板区域上下左右侧额外的一行的区域作为参考。需要说明的是。若部分的额外区域未完成编码,可以从模板区域中复制。
另外,一种训练滤波器系数的方法是计算一组系数使得滤波后的参考块模板和当前块模板的均方误差(Mean Square Error,MSE)最小。
如果当前块使用intraTMP滤波,对根据参考块直接得到的预测块进行滤波,一种方法是按从左到右从上到下的顺序依次对每一个像素进行滤波,将滤波后的值作为预测值。
值得注意的是,intraTMP多候选方法利用模板从海量的可能的BV中筛选出一小部分有希望的候选,再由编码器选择一个候选来确定当前块的参考块或预测块。由于当前块和模板之间的相关性,利用模板可以有效地滤除大部分的不合理BV,而另一方面编码器可以访问当前块的原始像素值,所以能做出比解码器更准确的判断。这样利用编码器和解码器的协同,可以达到更好的压缩效率。IntraTMP滤波可以利用模板来训练滤波系数,在intraTMP原有的预测值的基础上进行改善。
(6)、模板推导的IntraTMP融合技术。
IntraTMP融合预测可以通过帧内模板匹配过程得到多个参考块,并对这些参考块进行加权融合。权重值通常使用预定义的固定值或根据各参考块模板误差计算得到。模板推导的IntraTMP融合方法使 用类似滤波器系数训练的方法,根据各参考块模板和当前块模板训练得到用于融合预测的权重。例如,使用5个参考块进行加权融合,形式如下:
其中,Wn表示第n个参考块的权重,refBlockn表示第n个参考块,Bias是一个固定的值。
此外,另一种权重的方法是计算一组系数使得参考块模板融合后和当前块模板的MSE最小。
(7)、基于模板的帧内模式推导(Template-Based Intra Mode Derivation,TIMD)技术。
TIMD技术将当前编码块邻近的L型部分已重建像素作为模板,具体地,编码端可以通过遍历最可能模式(Most Probable Mode,MPM)列表,计算不同帧内预测模式下模板区域的预测像素的方式;进而得到不同帧内预测模式下预测像素和重建像素的模板误差值;例如,该模板误差值可以由绝对变换误差和(Sum of Absolute Transformed Difference,SATD)表示;由此,编码端可以根据模板误差值选出最优的帧内预测模式。在解码端,通过相同的推导方式得到帧内预测模式,从而降低模式信息的编码比特。
(8)、联合帧内帧间预测(Combined Inter and Intra Prediction,CIIP)模式。
CIIP模式通过联合帧内预测和帧间预测,利用帧内预测块和帧间预测块的加权组合得到当前编码块的预测块。增强压缩的参考软件测试平台(Enhanced Compression Model,ECM)中CIIP模式与基于模板的预测技术相结合,同时不同区域不同权重值得设计,进一步提升了预测的准确性。具体地,其帧内预测块pred_intra由TIMD模式得到,帧间预测块pred_inter由基于模板的合并(Merge)模式得到。编码端根据推导的帧内预测模式以及待预测像素的位置,确定权重值wIntra、wInter。最终的预测块Pred计算如下:
Pred=(wIntra*pred_intra+wInter*pred_inter+4)>>3。
其中,Pred表示当前块的预测块,pred_intra表示帧内预测块,wIntra表示帧内预测块的权重值,wInter表示帧间预测块,pred_inter表示帧间预测块的权重值。
wIntra和wInter可以根据TIMD推导得到的帧内预测模式intra_dir确定。ECM中有65种帧内角度预测模式(2≤intra_dir<=66),当2≤intra_dir<34时,将当前编码块垂直四等分;当34<=intra_dir<=66时,将当前编码块水平四等分。例如,各区域的权重值wIntra和wInter可参考表3确定:
表3
如表3所示,不同的区域索引对应不同的wIntra和不同的wInter。即,区域标识为0时wIntra为6且wInter为2,区域标识为1时wIntra为5且wInter为3,区域标识为2时wIntra为3且wInter为5,区域标识为3时wIntra为2且wInter为6。
图12是本申请提供的当前块的区域划分方式的示例。
如图12中的(a)所示,将当前编码块垂直四等分时,按照由左到右的顺序,其区域索引分别为0,1,2,3;如图12中的(b)所示,将当前编码块水平四等分时,按照由上到下的顺序,其区域索引分别为0,1,2,3。
需要说明的是,当intra_dir等于0或1时,可以通过其他方式确定wIntra和wInter。例如,当intra_dir等于0或1时,不划分子区域,wIntra和wInter根据位于左侧和位于上侧的两个编码块的编码类型(帧内还是帧间),从(3,1),(2,2),(1,3)中选择。例如,若这两个编码块的编码类型均为帧内编码,则编码端确定(wIntra,wInter)为(3,1),若这两个编码块中的一个编码块的编码类型为帧内编码且另一个编码块的编码类型为帧间编码,则确定(wIntra,wInter)为(2,2),若这两个编码块的编码类型均为帧间编码,则确定(wIntra,wInter)为(3,1)。
(9)、帧内块复制(Intra Block Copy,IBC)模式。
IBC模式是一种基于块匹配来获得预测像素的帧内预测技术。类似帧间预测,通过由当前块指向参考块的块矢量实现预测,区别在于帧间预测的参考块来自于已编码的重建帧,而IBC的参考块来自于当前帧的已重建部分。块矢量信息需要由码流传输,因而与帧内预测类似。
IBC模式可细分为IBC高级运动矢量预测(Advanced Motion Vector Prediction,AMVP)模式和IBC合并(merge)模式。
其中,IBC-AMVP模式可以通过构建的候选块矢量信息列表得到预测块矢量,通过哈希搜索、全 搜索等过程得到当前块的参考块和对应的最终块矢量,根据预测块矢量对最终块矢量编码,例如对预测块矢量和最终块矢量之间的残差进行编码,以提升编码效率。IBC-Merge模式通过构建的候选块矢量信息列表进行预测,通过SATD、RDO等编码过程选择出列表中最佳的块矢量作为最终块矢量,其指向的重建块作为参考块,完成预测,编码器编码该块矢量在列表中的索引而非块矢量本身,以提升编码效率。
候选块矢量信息列表可以由相邻编码块的块矢量、历史的块矢量、平均块矢量等编码信息组成。
(10)、IBC基于历史的MV预测技术。
IBC基于历史的MV预测技术会维护一个最大长度为N的历史块矢量信息列表,记录已编码IBC块的块矢量。当某一编码块使用IBC模式完成编码时,更新历史块矢量信息列表。若当前块矢量已在历史块矢量信息列表中,则将列表中的该块矢量移动至末尾;否则,先判断历史块矢量信息列表是否已满,若满则将列表最前的块矢量移出。之后将该块矢量添加到历史块矢量信息列表末尾。
该历史块矢量信息列表可以用于IBC的Merge列表构建。
由上可知,IBC基于历史的MV预测技术可以保存已编码IBC块的块矢量,用于后续IBC编码块Merge列表的构建,丰富了IBC的块矢量候选,从而能够提升编码效率。此外,IntraTMP技术可以通过帧内模板匹配的方法得到块矢量进行预测,不需要编码块矢量。也即是说,IntraTMP技术的预测过程与IBC技术相似,IBC技术根据块矢量从当前帧已重建部分获取参考块。有鉴于此,本申请将这两个技术结合,可以将IntraTMP编码块的块矢量保存至IBC的历史块矢量信息列表中,丰富IBC的块矢量候选,从而提升编码效率。
图13是本申请提供的解码方法400的示意性流程图。应理解,该解码方法400可由解码器执行。例如该解码方法400可由图1所示的视频解码器122或图4所示视频解码器300执行。为便于描述,下面以解码器为例进行说明。解码方法400具体可应用于视频解码器中的帧内(intra)预测部分,例如,应用于帧内预测的IntraTMP部分。
如图13所示,所述解码方法400可包括以下中的部分或全部:
S410,基于与帧内块复制(Intra Block Copy,IBC)不同的第一预测模式确定当前块使用的块矢量信息。
示例性地,所述第一预测模式可以是帧内预测模式。
示例性地,所述第一预测模式可以是任意一种能够获取所述当前块的块矢量信息的预测模式。
S420,基于所述当前块使用的块矢量信息确定第一历史块矢量信息。
示例性地,解码器可以直接将所述当前块使用的块矢量信息确定为所述第一历史块矢量信息,或者,解码器可以将所述当前块使用的块矢量信息中的部分信息确定为所述第一历史块矢量信息,或者,解码器可以基于对所述当前块使用的块矢量信息进行运算得到的运算结果,确定为所述第一历史块矢量信息。
S430,基于所述第一历史块矢量信息更新第一历史块矢量信息列表。
其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式解码的块。
示例性地,所述第一历史块矢量信息列表用于确定IBC高级运动矢量预测(Advanced Motion Vector Prediction,AMVP)模式下的IBC块使用的候选块矢量信息列表;换言之,所述IBC块可以是在所述当前块之后使用所述IBC AMVP模式解码的块。或者,所述第一历史块矢量信息列表用于确定IBC合并(merge)模式下的IBC块使用的候选块矢量信息列表;换言之,所述IBC块可以在所述当前块之后使用所述IBC合并模式解码的块。
示例性地,解码器解码所述IBC块时,基于所述第一历史块矢量信息列表构建所述候选块矢量信息列表,然后基于所述候选块矢量信息列表解码所述IBC块。
若所述IBC块使用IBC-AMVP模式,则编码器可以基于与解码器相同的方式构建候选块矢量信息列表,然后通过哈希搜索、全搜索等过程得到所述IBC块的参考块和对应的最终块矢量,接着根据所述候选块矢量信息列表中的某一个预测块矢量对最终块矢量编码,例如对所述某一个预测块矢量和最终块矢量之间的残差进行编码,以提升编码效率;此外,编码器可将预测块矢量索引指示给解码器,所述预测块索引用于在所述候选块矢量信息列表中指示:用于对所述最终块矢量进行编码的预测块矢量。相应的,解码器可以通过对码流的解码确定所述预测块矢量索引,并基于所述预测块矢量索引,在所述候选块矢量信息中,确定所述IBC块使用的预测块矢量;然后,解码器可以基于所述IBC块使用的预测块矢量和对码流进行解码确定的块矢量残差,得到所述IBC块的最终块矢量,进而基于所述IBC块的最终块矢量确定所述IBC块的参考块,由此,可以基于所述IBC块的参考块,确定所述IBC块的预测 块。
若所述IBC块使用IBC-Merge模式,则编码器可以基于与解码器相同的方式构建候选块矢量信息列表,然后通过SATD、RDO等编码过程选择出候选块矢量信息列表中最佳的块矢量作为最终块矢量,编码器可以编码最终块矢量在候选块矢量信息列表中的索引,以提升编码效率。相应的,解码器可以通过对码流的解码,确定所述最终块矢量在所述候选块矢量信息列表中的索引,进而基于索引指示的最终块矢量确定所述IBC块的参考块,由此,解码器可以基于所述IBC块的参考块,确定所述IBC块的预测块。
本实施例中,解码器基于与IBC模式不同的第一预测模式更新用于确定候选块矢量信息列表的第一历史块矢量信息列表,由于候选块矢量信息列表是当前块之后使用IBC模式解码的IBC块使用的列表,因此,解码器利用第一预测模式更新第一历史块矢量信息列表,相当于,解码器利用第一预测模式丰富了IBC块的候选块矢量信息,即解码器对IBC块进行解码时,能够提升IBC块的解码性能以及提升解码器的解码性能。
值得注意的是,若解码器直接将所述当前块使用的块矢量信息确定为所述第一历史块矢量信息,则解码器可以不执行或忽略该步骤,即解码器可以直接基于所述当前块的块矢量信息更新第一历史块矢量信息列表,本申请对此不作具体限定。
本实施例中,利用IntraTMP块的编码信息,丰富IBC的块矢量候选,能够提升解码器的解码性能。
下面基于测试结果对本申请提供的方案的有益效果进行说明。
其中,表4是将本申请提供的解码方法集成到最新ECM9.0上后的测试结果。
表4
如表4所示,Class F和class TGM为屏幕内容编码专用序列类。表格中,Y表示明亮度(Luma),U表示蓝色色度,V表示红色色度,其对应的数值为负数时代表性能的增益。EncT表示编码复杂度的变化,DecT表示解码复杂度的变化。从仿真结果可知,本申请提供的解码方法能够提升解码性能,尤其是在TGM上增益效果最为明显。
在一些实施例中,所述第一预测模式包括帧内模板匹配预测(Intra Template Matching Prediction,IntraTMP)模式。
示例性地,所述IntraTMP模式可以是使用以下技术中的任一项的模式:
针对摄像机捕获内容的IntraTMP适应技术、IntraTMP多候选技术、IntraTMP融合预测技术、IntraTMP滤波技术、模板推导的IntraTMP融合技术。
在一些实施例中,所述S420可包括:
基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量。
示例性地,解码器可基于所述至少一个块矢量的数量,将所述至少一个块矢量,确定为所述第一历史块矢量信息中的块矢量、或从所述至少一个块矢量中选择的部分块矢量作为所述第一历史块矢量信息中的块矢量、或将对所述至少一个块矢量进行计算得到的块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,若所述至少一个块矢量的数量小于或等于第一预设数值,则将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量。
示例性地,所述第一预设数值可通过在解码器中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,或所述第一预设数值可由标准协议约定或定义。
示例性地,所述第一预设数值可以是任意正整数。
例如,以所述第一预设数值等于1为例,若所述至少一个块矢量的数量小于或等于1,则解码器将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量;换言之,只有所述至少一个块矢量的数量为1时,解码器可以直接将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量。或者说,若所述当前块使用一个块矢量完成预测过程,则解码器可以直接将所述一个块矢量确定为所述第一历史块矢量信息中的块矢量。
再如,以所述第一预设数值等于2为例,若所述至少一个块矢量的数量小于或等于2,则解码器将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量;换言之,只有所述至少一个块矢量的数量为1或2时,所述解码器可以直接将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢 量。或者说,若所述当前块使用两个块矢量完成预测过程,则解码器可以直接将所述两个块矢量确定为所述第一历史块矢量信息中的块矢量。
值得注意的是,本实施例旨在说明解码器可以在所述至少一个块矢量的数量满足特定条件的情况下,可以将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量。所述至少一个块矢量的数量小于或等于第一预设数值仅为所述特定条件的示例,不应理解为对本申请的限制。例如,在其他可替代实施例中,若所述至少一个块矢量的数量在预设数值范围内,则解码器将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量。其中,所述预设数值范围可以是多个预设数值形成的数值集合,或者,所述预设数值范围可以是预设的数值区间。所述预设数值范围可通过在解码器中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,或者,所述预设数值范围可以由标准协议约定或定义。
在一些实施例中,若所述至少一个块矢量的数量大于第二预设数值,则按照以下中的任一项确定所述第一历史块矢量信息中的块矢量:
将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量;
将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量;
将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。
示例性地,所述第二预设数值可通过在解码器中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,或所述第二预设数值可由标准协议约定或定义。
示例性地,所述第二预设数值可以是任意正整数。
例如,以所述第二预设数值等于1为例,若所述至少一个块矢量的数量大于1,则解码器按照以下中的任一项确定所述第一历史块矢量信息中的块矢量:将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量;将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量;将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。或者说,若所述当前块使用基于多个块矢量的参考块加权融合预测,则按照以下中的任一项确定所述第一历史块矢量信息中的块矢量:将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量;将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量;将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。
再如,以所述第二预设数值等于2为例,若所述至少一个块矢量的数量大于2,则按照以下中的任一项确定所述第一历史块矢量信息中的块矢量:将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量;将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量;将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。
示例性地,若所述至少一个块矢量的数量大于第二预设数值,则解码器将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量。例如,解码器可以基于所述至少一个块矢量的权重,对所述至少一个块矢量进行加权平均计算,得到所述至少一个块矢量的加权平均值。其中,所述至少一个块矢量的权重可以是:基于所述至少一个块矢量对应的至少一个参考块,对所述当前块进行预测时使用的权重;换言之,所述至少一个块矢量的权重可以是对所述至少一个块矢量对应的至少一个参考块进行加权时使用的权重。所述至少一个块矢量的权重可以是预定义权重。所述预定义权重可通过在解码器中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,或所述预定义权重可由标准协议约定或定义。应当理解,所述至少一个块矢量中不同的块矢量的权重可以相同或不同,例如,所述至少一个块矢量中所有块矢量的权重相同时,所述至少一个块矢量的加权平均值为所述至少一个块矢量的均值。
示例性地,若所述至少一个块矢量的数量大于第二预设数值,则解码器将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。其中,所述至少一个块矢量中块矢量的模板误差值可以是所述当前块的模板区域和块矢量的模板区域之间的相似度,例如SAD。例如,解码器可以将所述至少一个块矢量中模板误差值最小的一个块矢量,确定为所述第一历史块矢量信息中的块矢量。再如,解码器可以将所述至少一个块矢量中模板误差值最小的两个块矢量,确定为所述第一历史块矢量信息中的块矢量。
示例性地,若所述至少一个块矢量的数量大于第二预设数值,则解码器将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。所述至少一个块 矢量对应至少一个参考块,由于当前块是已经完成编解码的块,因此,所述参考块的误差值可以是所述参考块与所述当前块的重建块的相似度,例如SAD。例如,解码器可以将所述至少一个块矢量中误差值最小的一个块矢量,确定为所述第一历史块矢量信息中的块矢量。再如,解码器可以将所述至少一个块矢量中误差值最小的两个块矢量,确定为所述第一历史块矢量信息中的块矢量。
值得注意的是,本实施例旨在说明解码器可以在所述至少一个块矢量的数量满足特定条件的情况下,可以将所述至少一个块矢量中的部分块矢量或对所述至少一个块矢量进行计算得到的块矢量确定为所述第一历史块矢量信息中的块矢量。所述至少一个块矢量的数量大于第二预设数值仅为所述特定条件的示例,不应理解为对本申请的限制。例如,在其他可替代实施例中,若所述至少一个块矢量的数量不在预设数值范围内,则解码器可将所述至少一个块矢量中的部分块矢量或对所述至少一个块矢量进行计算得到的块矢量确定为所述第一历史块矢量信息中的块矢量。其中,所述预设数值范围可以是多个预设数值形成的数值集合,或者,所述预设数值范围可以是预设的数值区间。所述预设数值范围可通过在解码器中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,或者,所述预设数值范围可以由标准协议约定或定义。
此外,本申请对所述第一历史块矢量信息中包括的块矢量的具体使用不作限定。
例如,若所述第一历史块矢量信息包括一个块矢量,则解码器可以使用所述一个块矢量对所述IBC块进行单向IBC预测。
再如,若所述第一历史块矢量信息包括两个块矢量,则解码器可以使用所述两个块矢量对所述IBC块进行双向IBC预测。例如,若所述第一历史块矢量信息包括两个块矢量,则解码器可以基于所述两个块矢量对应的两个参考块,确定所述IBC块的IBC几何划分模式(Geometric partitioning mode,GPM)预测块。
在一些实施例中,所述S420可包括:
若所述当前块使用亚像素插值的预测方式,则将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量。
示例性地,若所述当前块使用的块矢量信息仅包括所述第一块矢量,且所述当前块使用亚像素插值的预测方式,则解码器将所述第一块矢量或所述第二块矢量,确定为所述第一历史块矢量信息中的块矢量。或者说,若所述当前块使用基于所述第一块矢量的亚像素插值的预测方式,则解码器将所述第一块矢量或所述第二块矢量,确定为所述第一历史块矢量信息中的块矢量。
示例性地,所述第一块矢量的精度可以是整像素精度或亚像素精度。所述亚像素精度也可以称为分像素精度。例如,所述亚像素精度可以是1/2像素、1/3像素或1/4像素等精度。如果所述第一块矢量精度为整像素精度,则所述第一块矢量指向的参考块就是根据所述第一块矢量找到的包括整像素的块。如果所述第一块矢量的精度为亚像素精度,则所述第一块矢量对应的参考块就是根据所述第一块矢量找到的包括亚像素的块。因此,所述第一块矢量的精度也可以称为所述第一块矢量的参考块的精度。
示例性地,所述亚像素插值的预测方式可以理解为类似与帧间(inter)的亚像素精度预测方式。
示例性地,所述亚像素插值的预测方式可以指:将经过亚像素插值后的亚像素块确定为预测块的预测方式。
示例性地,所述第一块矢量的调整量可以包括所述第一块矢量的偏移方向和/或偏移量。
示例性地,解码器可以通过对码流的解码,确定所述第一块矢量的偏移方向和/或偏移量。
示例性地,解码器对当前块所在的当前块图像进行亚像素插值得到插值图像后,可以基于所述第一块矢量在所述插值图像中查找参考块。例如,如果所述第一块矢量的精度为整像素精度,则解码器基于所述第一块矢量的偏移方向和偏移量对所述第一块矢量指向的整像素块进行调整,得到亚像素块,并将得到的亚像素块确定为所述当前块的预测块。比如,解码器将所述第一块矢量指向的整像素块,向右偏移1/2像素,得到亚像素块。如果所述第一块矢量的精度为亚像素精度,则解码器可以直接将所述第一块矢量指向的亚像素块确定为所述当前块的预测块。
在一些实施例中,若所述第一块矢量的精度等于所述亚像素插值的精度,则将所述第一块矢量确定为所述第一历史块矢量信息中的块矢量。
示例性地,若所述第一块矢量的精度等于所述亚像素插值的精度,说明所述第一块矢量指向的参考块的精度与所述预测块的精度是匹配的,即所述第一块矢量指向的参考块可以直接作为所述当前块的预测块,或者说,所述第一块矢量的精度是亚像素精度的,所述当前块的预测块是根据亚像素精度的块矢量直接得到。这种情况下,解码器在对当前块进行预测时,解码器可以直接将所述第一块矢量指向的亚像素块确定为所述当前块的预测块,相应的,解码器可以直接将所述第一块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,若所述第一块矢量的精度大于所述亚像素插值的精度,则将所述第二块矢量确定为所述第一历史块矢量信息中的块矢量。
示例性地,所述第一块矢量的精度为整像素精度。
示例性地,若所述第一块矢量的精度大于所述亚像素插值的精度,说明所述第一块矢量指向的参考块的精度与所述预测块的精度是不匹配的,即所述第一块矢量指向的参考块不能直接作为所述当前块的预测块,或者说,所述当前块的预测块不是根据亚像素精度的块矢量直接得到。例如,如果所述第一块矢量的精度为整像素精度,则解码器基于所述第一块矢量的偏移方向和偏移量对所述第一块矢量指向的整像素块进行调整,得到亚像素块,并将得到的亚像素块确定为所述当前块的预测块。比如,解码器将所述第一块矢量指向的整像素块,向右偏移1/2像素,得到亚像素块。解码器可以通过对码流的解码,确定所述第一块矢量的偏移方向和偏移量。本实施例中,解码器可以根据偏移方向和偏移量对所述第一块矢量进行调整并得到第二块矢量,然后将所述第二块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述S420可包括:
若所述第一历史块矢量信息包括第三块矢量,则将所述当前块使用的块矢量信息中的且与用于确定所述第三块矢量的一个或多个块矢量对应的精度,确定为所述第三块矢量的精度;所述第一历史块矢量信息包括所述第三块矢量的精度。
示例性地,若所述一个或多个块矢量的精度相同,则将所述一个或多个块矢量的精度,确定为所述第三块矢量的精度。
示例性地,若所述第三块矢量为所述当前块使用的块矢量信息中的第一块矢量,则解码器可以将所述第一块矢量的精度,确定为所述第三块矢量的精度。若所述第三块矢量为解码器基于对所述当前块使用的块矢量信息中的多个块矢量进行加权平均的的块矢量,则解码器可将所述多个块矢量的精度,确定为所述第三块矢量的精度。若所述第三块矢量为基于所述当前块使用的块矢量信息中的第一块矢量进行调整得到的第二块矢量,则解码器可将所述第二块矢量的精度,确定为所述第三块矢量的精度。
在一些实施例中,所述S420可包括:
将所述当前块使用的块矢量信息包括的以下中的至少一项,确定为所述第一历史块矢量信息中的信息:
所述当前块的坐标信息;
用于指示是否对所述当前块的预测块光照补偿的标识;
用于指示是否对所述当前块的预测块滤波的标识;
用于指示是否翻转所述当前块的参考块的标识;
用于指示所述当前块使用的预测模式是否为所述IBC模式的标识;
用于指示所述当前块使用的预测模式是否为所述第一预测模式的标识;
用于指示所述当前块使用的预测模式的索引;
用于指示所述当前块使用的多个参考块的权重的索引。
示例性地,所述当前块的坐标信息包括以下位置中的至少一项的坐标信息:
所述当前块的左上角、左下角、右上角、右下角、中心点。
示例性地,所述用于指示是否对所述当前块的预测块光照补偿的标识,可以包括:
用于指示是否对所述当前块的预测块进行局部光照补偿(Local Illuminance Compensation,LIC)的标识。
示例性地,所述用于指示所述当前块使用的预测模式的索引,可以包括以下中的至少一项:用于指示所述当前块使用所述第一预测模式的所有,用于指示所述当前块使用的且属于所述第一预测模式的子模式的索引、用于指示所述当前块使用所述IBC模式的索引。所述子模式可以是使用以下技术中的任一项的模式:针对摄像机捕获内容的IntraTMP适应技术、IntraTMP多候选技术、IntraTMP融合预测技术、IntraTMP滤波技术、模板推导的IntraTMP融合技术。
值得注意的是,解码器直接将所述当前块使用的块矢量信息中的信息,确定为所述第一历史块矢量信息中的信息,也可以理解为:解码器继承所述当前块使用的块矢量信息中的信息或其他具有类似含义的描述,本申请对此不作具体限定。
在一些实施例中,所述S420可包括:
解码码流,确定第一标识;
若所述第一标识指示基于所述第一预测模式更新所述第一历史块矢量信息列表,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。
示例性地,解码器对所述码流解码确定所述第一标识,若所述第一标识指示基于所述第一预测模式 更新所述第一历史块矢量信息列表,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息,然后基于所述第一历史块矢量信息更新第一历史块矢量信息列表。否则,解码器不使用所述第一预测模式更新所述第一历史块矢量信息列表。
示例性地,该第一标识的取值为第一数值时,指示基于所述第一预测模式更新所述第一历史块矢量信息列表;所述第一标识的取值为第二数值时,指示基于所述第一预测模式不更新所述第一历史块矢量信息列表。其中,所述第一数值为1且所述第二数值为0,或者,所述第一数值为0且所述第二数值为1。解码器获取的码流中不存在该第一标识时,可以默认该第一标识的取值为所述第一数值,或者,可以默认该第一标识的取值为所述第二数值。
示例性地,该第一标识激活或使能(enable)时,指示基于所述第一预测模式更新所述第一历史块矢量信息列表;所述第一标识的去激活或去使能(enable)时,指示基于所述第一预测模式不更新所述第一历史块矢量信息列表。解码器获取的码流中不存在该第一标识时,可以默认该第一标识激活或使能,或者,可以默认该第一标识去激活或去使能。
示例性地,所述第一标识可以是序列级别的标识符。例如,所述第一标识指示所述当前块所属的当前序列是否允许基于所述第一预测模式更新所述第一历史块矢量信息列表。所述解码器可通过解码所述码流中的序列参数集(Sequence Parameter Set,SPS),确定所述第一标识。或者说,所述第一标识可以携带在所述码流中的SPS内。
示例性地,所述第一标识可以是图像级别的标识符。例如,所述第一标识指示所述当前块所属的当前图像是否允许基于所述第一预测模式更新所述第一历史块矢量信息列表。所述解码器可通过解码所述码流中的图像头信息,确定所述第一标识。或者说,所述第一标识可以携带在所述码流中的图像头信息内。
示例性地,所述第一标识可以是片(slice)级的标识符。例如,所述第一标识指示所述当前块所属的当前片是否允许基于所述第一预测模式更新所述第一历史块矢量信息列表。解码器可以对当前图像进行划分得到的所述当前片。所述解码器可通过解码所述码流中的片级信息,确定所述第一标识。或者说,所述第一标识可以携带在所述码流中的片级信息内。
示例性地,所述第一标识可以是图像块级别的标识符。例如,所述第一标识指示所述当前块是否允许基于所述第一预测模式更新所述第一历史块矢量信息列表。所述解码器可通过解码所述码流中的所述当前块的块级信息,确定所述第一标识。或者说,所述第一标识可以携带在所述码流中的所述当前块的块级信息内。
值得注意的是,所述第一标识为序列级别的标识符时,解码器还可以进一步解码所述码流确定图像级别的标识符、片级的标识符、图像块级别的标识符中的至少一项。例如,以解码器进一步解码所述码流确定图像级别的标识符和图像块级别的标识符为例,若所述第一标识指示所述当前块所属的当前序列允许基于所述第一预测模式更新所述第一历史块矢量信息列表,则解码器解码所述码流确定所述图像级别的标识符,若所述图像级别的标识符用于指示所述当前块所属的当前图像允许基于所述第一预测模式更新所述第一历史块矢量信息列表,则解码器解码所述码流确定所述图像块级别的标识符,其中,所述图像块级别的标识符用于指示所述当前块是否允许基于所述第一预测模式更新所述第一历史块矢量信息列表。当然,所述序列级别的标识符、所述图像级别的标识符、或所述图像块级别的标识符可以是可选的标识符,本申请对此不作具体限定。
在一些实施例中,所述S420可包括:
若所述当前块使用的块矢量信息中的块矢量的数量小于或等于第三预设数值,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。
示例性地,所述第三预设数值可通过在解码器中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,或所述第三预设数值可由标准协议约定或定义。
示例性地,所述第三预设数值可以是任意正整数。
例如,所述第三预设数值可以大于上文涉及的第一预设数值。再如,所述第三预设数值可以大于或等于上文涉及的第二预设数值。
在一些实施例中,所述S420可包括:
若满足以下条件中的至少一项,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息:
所述当前块的面积大于或等于第一阈值;
所述当前块的宽大于或等于第二阈值;
所述当前块的高大于或等于第三阈值;
所述当前块所属的当前图像的类型为预设的类型。
示例性地,所述当前块的面积为所述当前块的宽乘以所述当前块的高。
示例性地,所述当前块的宽指所述当前块在宽度上包括的像素的数量。
示例性地,所述当前块的高指所述当当前馈在高度上包括的像素的数量。
示例性地,若所述当前块的面积大于或等于预设的第一阈值,则解码器基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。或者说,只有所述当前块的面积大于或等于预设的第一阈值时,解码器才基于所述第一历史块矢量信息更新所述第一历史块矢量信息列表。
示例性地,若所述当前块的宽大于或等于第二阈值且所述当前块的高大于或等于第三阈值,则解码器基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。或者说,只有所述当前块的宽大于或等于第二阈值且所述当前块的高大于或等于第三阈值时,解码器才基于所述第一历史块矢量信息更新所述第一历史块矢量信息列表。
示例性地,若所述当前块所属的当前图像的类型为预设的类型,解码器基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。所述预设的类型可以是I帧、B帧或P帧。或者说,只有所述当前块所属的当前图像的类型为预设的类型时,解码器才基于所述第一历史块矢量信息更新所述第一历史块矢量信息列表。例如,可以基于图像的类型对本申请提供的解码方法的使用做限制,如仅在当前图像的类型为I帧的情况下,允许解码器使用本申请提供的解码方法,而当前图像的类型为B帧或P帧的情况下,不允许解码器使用本申请提供的解码方法。
示例性地,所述第一阈值、所述第二阈值、所述第三阈值或所述预设的类型可以是预设数值,且可以通过在解码器中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,或者其可以由标准协议约定或定义。
值得注意的是,本实施例旨在说明:解码器可以满足特定条件的情况下,可以基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息;或者说,解码器可以满足特定条件的情况下,才基于所述第一历史块矢量信息更新所述第一历史块矢量信息列表。上述条件仅为所述特定条件的示例,不应理解为对本申请的限制。例如,在其他可替代实施例中,若满足以下中的至少一项:所述当前块的面积小于或等于第四阈值、所述当前块的宽小于或等于第五阈值、所述当前块的高小于或等于第六阈值、所述当前块的面积在预设数值范围内,则解码器基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息,或解码器基于所述第一历史块矢量信息更新所述第一历史块矢量信息列表。其中,所述预设数值范围可以是多个预设数值形成的数值集合,或者,所述预设数值范围可以是预设的数值区间。所述第四阈值至所述第六阈值或所述预设数值范围可通过在解码器中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,或者,可以由标准协议约定或定义。
在一些实施例中,所述S430可包括:
若所述第一历史块矢量信息列表包括所述第一历史块矢量信息,则将所述第一历史块矢量信息,移动至所述第一历史块矢量信息列表的末尾。
示例性地,所述第一历史块矢量信息列表的末尾为所述第一历史块矢量信息列表的最后一个位置。
示例性地,解码器基于所述第一历史块矢量信息列表确定所述候选块矢量信息列表时,可以按照由后到前的顺序从所述第一历史块矢量信息列表选择历史块矢量信息作为所述候选矢量信息列表中的候选矢量信息。例如,若解码器基于所述第一历史块矢量信息列表确定所述候选块矢量信息列表时,按照由后到前的顺序从所述第一历史块矢量信息列表选择历史块矢量信息作为所述候选矢量信息列表中的候选矢量信息;那么,若所述第一历史块矢量信息列表包括所述第一历史块矢量信息,则解码器将所述第一历史块矢量信息,移动至所述第一历史块矢量信息列表的末尾。
示例性地,所述第一历史块矢量信息列表中的历史块矢量信息按照先入先出的机制进行更新,即最先添加的历史块矢量信息最先移除。其中,所述第一历史块矢量信息列表中位于首位的历史块矢量信息为最先添加的历史块矢量信息,其也是更新所述第一历史块矢量信息列表时最先移除的历史块矢量信息,所述第一历史块矢量信息列表中位于末尾的历史块矢量信息为最新添加的历史块矢量信息。这种情况下,解码器将所述第一历史块矢量信息,移动至所述第一历史块矢量信息列表的末尾,相当于,解码器将所述第一历史块矢量信息调整为最新添加的历史块矢量信息。
示例性地,若所述第一历史块矢量信息列表包括与所述第一历史块矢量信息相同的块矢量信息,则所述第一历史块矢量信息列表包括所述第一历史块矢量信息。是否是相同块矢量信息的判断可通过以下方式实现:
若两个块矢量信息中存在的块矢量个数不同,则判断不相同;
若两个块矢量信息中存在的块矢量个数相同,则判断是否存在不同的块矢量,若存在不同的块矢量,则不相同;否则,判断为相同块矢量信息。
当然,在其他可替代实施例中,也可以通过其他方式进行是否是相同块矢量信息的判断,本申请对 此不作具体限定。
例如,若块矢量信息中的光照补偿标志位、滤波标志位或翻转标志位存在不同,则判断不相同。
值得注意的是,本实施例旨在说明:若所述第一历史块矢量信息列表包括所述第一历史块矢量信息,则解码器将所述第一历史块矢量信息调整为最新添加的历史块矢量信息。因此,在其他可替代实施例中,所述第一历史块矢量信息列表中位于末尾的历史块矢量信息为最先添加的历史块矢量信息,其也是更新所述第一历史块矢量信息列表时最先移除的历史块矢量信息时,若所述第一历史块矢量信息列表包括所述第一历史块矢量信息,则解码器可以将所述第一历史块矢量信息,移动至所述第一历史块矢量信息列表的首位,本申请对此不作具体限定。
在一些实施例中,所述S430可包括:
若所述第一历史块矢量信息列表中的历史块矢量信息的数量小于第四预设数值,则将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表;否则,将所述第一历史块矢量信息列表中排在最前的历史块矢量信息移出,并将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表的末尾。
示例性地,所述第四预设数值可通过在解码器中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,或所述第四预设数值可由标准协议约定或定义。
示例性地,所述第四预设数值可以是任意正整数。
示例性地,假设将所述第四预设数值记为N,若所述第一历史块矢量信息列表中的历史块矢量信息的数量小于N,则解码器将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表;否则,将所述第一历史块矢量信息列表中排在最前的历史块矢量信息移出,并将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表的末尾。
示例性地,所述第四预设数值也可称为所述第一历史块矢量信息列表的长度或最大长度。换言之,若所述第一历史块矢量信息列表中的历史块矢量信息的数量小于所述第四预设数值,则说明所述第一历史块矢量信息列表未满,这种情况下,解码器可以直接将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表;若所述第一历史块矢量信息列表中历史块矢量信息的数量等于所述第四预设数值,则说明所述第一历史块矢量信息列表已满,这种情况下,解码器需要先将所述第一历史块矢量信息列表中排在最前的历史块矢量信息移出,然后将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表的末尾。
在一些实施例中,所述第一历史块矢量信息列表为所述第一预测模式和所述IBC模式共同的历史块矢量信息列表。
示例性地,所述第一历史块矢量信息列表为所述第一预测模式和所述IBC模式共同维护的历史块矢量信息列表。换言之,解码器可以基于所述第一预测模式和所述IBC模式更新所述第一历史块矢量信息列表。
在一些实施例中,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表时,所述第一历史块矢量信息列表中的且属于所述第一预测模式的第二历史块矢量信息的优先级,低于所述第一历史块矢量信息列表中的且属于所述IBC模式的第三历史块矢量信息的优先级。
示例性地,解码器基于所述第一历史块矢量信息列表确定所述候选块矢量信息列表时,所述第一历史块矢量信息列表中的且属于所述第一预测模式的第二历史块矢量信息的优先级,低于所述第一历史块矢量信息列表中的且属于所述IBC模式的第三历史块矢量信息的优先级。换言之,解码器基于所述第一历史块矢量信息列表确定所述候选块矢量信息列表时,优先将所述第一历史块矢量信息列表中的所述第三历史块矢量信息,作为所述候选块矢量信息列表中的候选块矢量信息。或者说,解码器基于所述第一历史块矢量信息列表确定所述候选块矢量信息列表时,优先将所述第一历史块矢量信息列表中的所述第三历史块矢量信息添加至所述候选块矢量信息列表。
示例性地,解码器可通过所述第一历史块矢量信息列表中历史块矢量信息1中包括的以下信息中的至少一项,确定历史矢量信息1所属的预测模式:
用于指示历史矢量信息1使用的预测模式的索引1、用于指示历史矢量信息1是否使用所述第一预测模式的索引2、用于指示历史矢量信息1是否使用所述IBC模式的索引3或其他信息。
例如,若索引1指示所述第一预测模式,则所述历史矢量信息1属于所述第一预测模式;若索引1指示所述IBC模式,则所述历史矢量信息1属于所述IBC模式。再如,若索引2指示使用所述第一预测模式,则所述历史矢量信息1属于所述第一预测模式;若索引2指示不使用所述第一预测模式,则所述历史矢量信息1属于所述IBC模式。再如,若索引3指示使用所述IBC模式,则所述历史矢量信息1属于所述IBC模式;若索引1指示不使用所述IBC模式,则所述历史矢量信息1属于所述第一预测模式。
值得注意的是,本实施例旨在说明,针对所述第一历史块矢量信息列表中属于不同预测模式的历史 块矢量信息,可以使用不同的选择策略将其添加至所述候选块矢量信息列表。所述优先级仅是选择策略的示例,不应理解为对本申请的限制。例如,在其他可替代实施例中,所述第一历史块矢量信息列表中的且属于所述第一预测模式的第二历史块矢量信息的选择方式,可以不同于所述第一历史块矢量信息列表中的且属于所述IBC模式的第三历史块矢量信息的选择方式。例如,解码器基于所述第一历史块矢量信息列表确定所述候选块矢量信息列表时,在所述第一历史块矢量信息列表中的且属于所述第一预测模式的第二历史块矢量信息的数量,小于在所述第一历史块矢量信息列表中的且属于所述IBC模式的第三历史块矢量信息的数量。
本实施例中,解码器针对所述第一预测模式和所述IBC模式仅需要维护一个共同的历史块矢量信息列表,能够降低解码器维护历史块矢量信息列表的复杂度,进而能够提升解码器的解码效率以及解码性能。
在一些实施例中,所述第一历史块矢量信息列表为所述第一预测模式的历史块矢量信息列表,所述第一历史块矢量信息和所述IBC模式的第二历史块矢量信息列表均用于确定所述候选块矢量信息列表。
示例性地,解码器针对所述第一预测模式维护所述第一历史块矢量信息列表,并且,针对所述IBC模式维护所述第二历史块矢量信息列表。换言之,解码器基于所述第一预测模式更新所述第一历史块矢量信息列表,并且,基于所述IBC模式更新所述第二历史块矢量信息列表。或者说,针对所述第一预测模式和所述IBC模式,所述解码器需要维护各自的历史块矢量信息列表。
在一些实施例中,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级,低于所述第二历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级。
示例性地,解码器基于所述第一历史块矢量信息列表和所述第二历史块矢量信息列表,确定所述候选块矢量信息列表时,所述第一历史块矢量信息列表的优先级,低于所述第二历史块矢量信息列表的优先级。换言之,解码器基于所述第一历史块矢量信息列表和所述第二历史块矢量信息列表,确定所述候选块矢量信息列表时,优先将所述第一历史块矢量信息列表中的历史块矢量信息,作为所述候选块矢量信息列表中的候选块矢量信息。或者说,解码器基于所述第一历史块矢量信息列表和所述第二历史块矢量信息列表,确定所述候选块矢量信息列表时,优先将所述第一历史块矢量信息列表中的历史块矢量信息添加至所述候选块矢量信息列表。
值得注意的是,本实施例旨在说明,针对所述第一历史块矢量信息列表和所述第二历史块矢量信息列表,可以使用不同的选择策略将各个表中的历史块矢量信息添加至所述候选块矢量信息列表。所述优先级仅是选择策略的示例,不应理解为对本申请的限制。例如,在其他可替代实施例中,所述第一历史块矢量信息列表中的历史块矢量信息的选择方式,可以不同于所述第二历史块矢量信息列表中的历史块矢量信息的选择方式。例如,解码器基于所述第一历史块矢量信息列表和所述第二历史块矢量信息列表,确定所述候选块矢量信息列表时,在所述第一历史块矢量信息列表中选择的历史块矢量信息的数量,可以小于在所述第二历史块矢量信息列表中选择历史块矢量信息的数量。
本实施例中,解码器针对所述第一预测模式和所述IBC模式维护不同的历史块矢量信息列表,能够丰富用于构建所述候选块矢量信息列表的信息,进而能够提升解码器的解码性能。
在一些实施例中,所述当前块所属的当前图像经过划分包括多个区域,所述多个区域包括所述当前块的所在区域,所述第一历史块矢量信息列表为所述所在区域对应的历史块矢量信息列表。
示例性地,所述多个区域对应多个历史块矢量信息列表。所述多个历史块矢量信息列表是所述IBC模式的历史块矢量信息列表;或者,所述多个历史块矢量信息列表是所述第一预测模式的历史块矢量信息列表;或者,所述多个历史块矢量信息列表是所述IBC模式和所述第一预测模式共同的历史块矢量信息列表。
示例性地,若当前帧为渐进解码刷新(Gradual Decoder Refresh,GDR)帧,则所述当前块所属的当前图像经过划分包括多个区域;其中,所述多个区域包括所述当前块的所在区域,所述第一历史块矢量信息列表为所述所在区域对应的历史块矢量信息列表。例如,解码器可以根据划分边界将所述当前图像分为两个区域,记为干净区域(clean area)和污浊区域(dirty area),干净区域中的图像块只能使用帧内预测,且不能使用污浊区域中的任何信息,包括重建像素、MV、编码模式、参考列表等。换言之,解码器针对所述当前图像可以维护与所述两个区域对应的两个历史块矢量信息列表,所述第一历史块矢量信息列表为所述当前块所在的区域对应的历史块矢量信息列表。或者说,解码器可以根据所述当前块的位置基于所述第一历史块矢量信息更新与所述当前块所在的区域对应的历史块矢量信息列表。例如,若当前块位于干净区域区内,则解码器可以基于所述第一历史块矢量信息更新所述干净区域对应的历史块矢量信息列表;否则,解码器基于所述第一历史矢量信息更新所述污浊区域对应的历史块矢量信息列表。
下面结合实施例对本申请提供的解码方法进行说明。
实施例1:
本实施例中,假设上文涉及的第一预测模式为IntraTMP模式,则上文涉及的当前块为IntraTMP解码块,即将IntraTMP解码块的块矢量等信息保存至IBC历史块矢量列表中的方法,利用IntraTMP解码块的块矢量等信息,丰富IBC的块矢量候选,从而提升解码效率。
具体的,所述解码方法包括如下步骤:
步骤1:
IntraTMP解码块完成解码,确认需要保存的块矢量。
例如,该IntraTMP解码块使用单个块矢量完成预测过程,可以直接保存该块矢量。再如,该IntraTMP解码块使用基于单个整像素精度块矢量的亚像素插值预测,可以根据亚像素插值类型调整该整像素精度块矢量后保存。再如,该IntraTMP解码块使用基于多个块矢量的参考块加权融合预测,可以将这些块矢量中模板误差值最小的块矢量保存。
步骤2:
确定与需要保存的块矢量关联的信息。
例如,可以保存当前解码块坐标,例如,当前块中心点坐标。再如,可以保存步骤1确定的块矢量的精度。再如,可以保存当前解码块是否使用LIC方法或滤波方法等。再如,可以保存当前解码块是否翻转参考块。再如,可以引入用于表示步骤1确定的块矢量是否属于IBC的标志位。再如,可以保存当前块的双向加权权重索引。
其中,步骤1中确定的块矢量和步骤2中确定的与块矢量关联的信息可以组成块矢量信息。
步骤3:
解码器可以根据条件判断是否将该块矢量信息(即包括步骤1中确定的块矢量和步骤2中确定的与块矢量关联的信息)保存至IBC历史块矢量列表中。例如,可以在当前块的大小不大于WxH时,才保存至IBC历史块矢量列表中。
步骤4:
满足条件时,将该块矢量信息保存至IBC历史块矢量列表中。若该块矢量信息已在历史块矢量列表中,则将列表中的该块矢量信息移动至末尾;否则,先判断IBC历史块矢量列表是否已满,若满则将列表最前的块矢量信息移出,之后将该块矢量信息添加到IBC历史块矢量列表的末尾,完成对IBC历史块矢量列表的更新。
步骤5:
若当前帧为GDR帧,会根据划分边界将当前图像分为干净区域(clean area)和污浊区域(dirty area)。解码器维护两个IBC历史块矢量列表。可以根据当前块在当前图像中的位置将块矢量信息保存至不同列表。例如,若当前块位于干净区域内,将该块矢量信息保存至IBC历史块矢量列表1;否则,将该块矢量信息保存至IBC历史块矢量列表2。
步骤6:
IBC解码块构建候选块矢量列表并使用IBC历史块矢量列表中的块矢量信息作为候选,完成对IBC解码块的预测。
应当理解,实施例1仅为本申请的示例,不应理解为对本申请的限制。例如,在其他可替代实施例中,可以按照以下替代方案中的一项或多项对实施例1进行适应性修改、调整或替换,以形成新的实现方式。
替代方案1:
步骤1中,若IntraTMP解码块使用基于多个块矢量的参考块加权融合预测,可以将保存这些块矢量的均值。
替代方案2:
步骤1中,若IntraTMP解码块使用基于多个块矢量的参考块加权融合预测,可以将这些块矢量中模板误差值最小的两个块矢量保存。两个块矢量可用于双向的IBC预测,即可以由两个IBC参考块组成的IBC-GPM预测块等。
替代方案3:
步骤1中,若IntraTMP解码块使用基于多个块矢量的参考块加权融合预测,可以根据当前重建块选择最优的块矢量保存。例如,计算各个块矢量对应的参考块与当前重建块间的误差,误差可以由SAD计算。误差最小的块矢量为最优块矢量并保存。
替代方案4:
步骤2中,可以引入用于表示步骤1确定的块矢量是否属于IntraTMP的标志位。IBC解码块在构 建候选块矢量列表或添加历史块矢量候选时,可以对属于不同解码方法的块矢量做不同处理。例如,先添加IBC历史块矢量列表中所有属于IBC模式的块矢量,再添加属于IntraTMP模式的块矢量。
替代方案5:
步骤3中的判断条件可以是:当前块的宽小于W且高小于H,或者其余与宽或高相关的条件。
替代方案6:
可以改为构建IntraTMP的历史块矢量列表,区别于IBC的历史块矢量列表,并将IntraTMP解码块的块矢量信息保存至IntraTMP的历史块矢量列表中。
替代方案7:
步骤3中的判断条件可以包括:根据当前IntraTMP解码块的预测方法判断是否保存块矢量信息。例如,该IntraTMP解码块使用基于多个块矢量的参考块加权融合预测,则不保存块矢量信息至历史块矢量列表。
替代方案8:
步骤3中,判断条件可以包括根据序列级、帧级、片级、或图像块的标志位,其用于指示是否允许基于IntraTMP模式更新IBC历史块矢量列表。
下面将结合图14从编码器的角度描述根据本申请实施例的编码方法。
图14是本申请提供的编码方法500的示意性流程图。
应理解,该编码方法500可由编码器执行。例如该编码方法500可由图1所示的视频编码器112或图2所示视频编码器200执行。
如图14所示,所述编码方法500可包括:
S510,基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
S520,基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
S530,基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式编码的块。
在一些实施例中,所述第一预测模式包括帧内模板匹配预测IntraTMP模式。
在一些实施例中,所述S520可包括:
基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量。
在一些实施例中,若所述至少一个块矢量的数量小于或等于第一预设数值,则将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,若所述至少一个块矢量的数量大于第二预设数值,则按照以下中的任一项确定所述第一历史块矢量信息中的块矢量:
将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量;
将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量;
将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述S520可包括:
若所述当前块使用亚像素插值的预测方式,则将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,若所述第一块矢量的精度等于所述亚像素插值的精度,则将所述第一块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,若所述第一块矢量的精度大于所述亚像素插值的精度,则将所述第二块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述S520可包括:
若所述第一历史块矢量信息包括第三块矢量,则将所述当前块使用的块矢量信息中的且与用于确定所述第三块矢量的一个或多个块矢量对应的精度,确定为所述第三块矢量的精度;所述第一历史块矢量信息包括所述第三块矢量的精度。
在一些实施例中,所述S520可包括:
将所述当前块使用的块矢量信息包括的以下中的至少一项,确定为所述第一历史块矢量信息中的信 息:
所述当前块的坐标信息;
用于指示是否对所述当前块的预测块光照补偿的标识;
用于指示是否对所述当前块的预测块滤波的标识;
用于指示是否翻转所述当前块的参考块的标识;
用于指示所述当前块使用的预测模式是否为所述IBC模式的标识;
用于指示所述当前块使用的预测模式是否为所述第一预测模式的标识;
用于指示所述当前块使用的预测模式的索引;
用于指示所述当前块使用的多个参考块的权重的索引。
在一些实施例中,所述500方法还可包括:
对第一标识进行编码;
其中,所述第一标识指示基于所述第一预测模式更新所述第一历史块矢量信息列表。
在一些实施例中,所述S520可包括:
若所述当前块使用的块矢量信息中的块矢量的数量小于或等于第三预设数值,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。
在一些实施例中,所述S520可包括:
若满足以下条件中的至少一项,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息:
所述当前块的面积大于或等于第一阈值;
所述当前块的宽大于或等于第二阈值;
所述当前块的高大于或等于第三阈值;
所述当前块所属的当前图像的类型为预设的类型。
在一些实施例中,所述S530可包括:
若所述第一历史块矢量信息列表包括所述第一历史块矢量信息,则将所述第一历史块矢量信息,移动至所述第一历史块矢量信息列表的末尾。
在一些实施例中,所述S530可包括:
若所述第一历史块矢量信息列表中的历史块矢量信息的数量小于第四预设数值,则将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表;否则,将所述第一历史块矢量信息列表中排在最前的历史块矢量信息移出,并将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表的末尾。
在一些实施例中,所述第一历史块矢量信息列表为所述第一预测模式和所述IBC模式共同的历史块矢量信息列表。
在一些实施例中,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表时,所述第一历史块矢量信息列表中的且属于所述第一预测模式的第二历史块矢量信息的优先级,低于所述第一历史块矢量信息列表中的且属于所述IBC模式的第三历史块矢量信息的优先级。
在一些实施例中,所述第一历史块矢量信息列表为所述第一预测模式的历史块矢量信息列表,所述第一历史块矢量信息和所述IBC模式的第二历史块矢量信息列表均用于确定所述候选块矢量信息列表。
在一些实施例中,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级,低于所述第二历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级。
在一些实施例中,所述当前块所属的当前图像经过划分包括多个区域,所述多个区域包括所述当前块的所在区域,所述第一历史块矢量信息列表为所述所在区域对应的历史块矢量信息列表。
应当理解,编码方法可以理解为解码方法的逆过程,因此,所述编码方法500的具体方案可参见解码方法400的相关内容,为便于描述,本申请对此不再赘述。
下面结合实施例对本申请提供的编码方法进行说明。
实施例1:
本实施例中,假设上文涉及的第一预测模式为IntraTMP模式,则上文涉及的当前块为IntraTMP编码块,即将IntraTMP编码块的块矢量等信息保存至IBC历史块矢量列表中的方法,利用IntraTMP编码块的块矢量等信息,丰富IBC的块矢量候选,从而提升编码效率。
具体的,所述编码方法包括如下步骤:
步骤1:
IntraTMP编码块完成编码,确认需要保存的块矢量。
例如,该IntraTMP编码块使用单个块矢量完成预测过程,可以直接保存该块矢量。再如,该IntraTMP 编码块使用基于单个整像素精度块矢量的亚像素插值预测,可以根据亚像素插值类型调整该整像素精度块矢量后保存。再如,该IntraTMP编码块使用基于多个块矢量的参考块加权融合预测,可以将这些块矢量中模板误差值最小的块矢量保存。
步骤2:
确定与需要保存的块矢量关联的信息。
例如,可以保存当前编码块坐标,例如,当前块中心点坐标。再如,可以保存步骤1确定的块矢量的精度。再如,可以保存当前编码块是否使用LIC方法或滤波方法等。再如,可以保存当前编码块是否翻转参考块。再如,可以引入用于表示步骤1确定的块矢量是否属于IBC的标志位。再如,可以保存当前块的双向加权权重索引。
其中,步骤1中确定的块矢量和步骤2中确定的与块矢量关联的信息可以组成块矢量信息。
步骤3:
编码器可以根据条件判断是否将该块矢量信息(即包括步骤1中确定的块矢量和步骤2中确定的与块矢量关联的信息)保存至IBC历史块矢量列表中。例如,可以在当前块的大小不大于WxH时,才保存至IBC历史块矢量列表中。
步骤4:
满足条件时,将该块矢量信息保存至IBC历史块矢量列表中。若该块矢量信息已在历史块矢量列表中,则将列表中的该块矢量信息移动至末尾;否则,先判断IBC历史块矢量列表是否已满,若满则将列表最前的块矢量信息移出,之后将该块矢量信息添加到IBC历史块矢量列表的末尾,完成对IBC历史块矢量列表的更新。
步骤5:
若当前帧为GDR帧,会根据划分边界将当前图像分为干净区域(clean area)和污浊区域(dirty area)。编码器维护两个IBC历史块矢量列表。可以根据当前块在当前图像中的位置将块矢量信息保存至不同列表。例如,若当前块位于干净区域内,将该块矢量信息保存至IBC历史块矢量列表1;否则,将该块矢量信息保存至IBC历史块矢量列表2。
步骤6:
IBC编码块构建候选块矢量列表并使用IBC历史块矢量列表中的块矢量信息作为候选,完成对IBC编码块的预测。
应当理解,实施例2仅为本申请的示例,不应理解为对本申请的限制。例如,在其他可替代实施例中,可以按照以下替代方案中的一项或多项对实施例1进行适应性修改、调整或替换,以形成新的实现方式。
替代方案1:
步骤1中,若IntraTMP编码块使用基于多个块矢量的参考块加权融合预测,可以将保存这些块矢量的均值。
替代方案2:
步骤1中,若IntraTMP编码块使用基于多个块矢量的参考块加权融合预测,可以将这些块矢量中模板误差值最小的两个块矢量保存。两个块矢量可用于双向的IBC预测,即可以由两个IBC参考块组成的IBC-GPM预测块等。
替代方案3:
步骤1中,若IntraTMP编码块使用基于多个块矢量的参考块加权融合预测,可以根据当前重建块选择最优的块矢量保存。例如,计算各个块矢量对应的参考块与当前重建块间的误差,误差可以由SAD计算。误差最小的块矢量为最优块矢量并保存。
替代方案4:
步骤2中,可以引入用于表示步骤1确定的块矢量是否属于IntraTMP的标志位。IBC编码块在构建候选块矢量列表或添加历史块矢量候选时,可以对属于不同编码方法的块矢量做不同处理。例如,先添加IBC历史块矢量列表中所有属于IBC模式的块矢量,再添加属于IntraTMP模式的块矢量。
替代方案5:
步骤3中的判断条件可以是:当前块的宽小于W且高小于H,或者其余与宽或高相关的条件。
替代方案6:
可以改为构建IntraTMP的历史块矢量列表,区别于IBC的历史块矢量列表,并将IntraTMP编码块的块矢量信息保存至IntraTMP的历史块矢量列表中。
替代方案7:
步骤3中的判断条件可以包括:根据当前IntraTMP编码块的预测方法判断是否保存块矢量信息。 例如,该IntraTMP编码块使用基于多个块矢量的参考块加权融合预测,则不保存块矢量信息至历史块矢量列表。
替代方案8:
步骤3中,判断条件可以包括根据序列级、帧级、片级、或图像块的标志位,其用于指示是否允许基于IntraTMP模式更新IBC历史块矢量列表。
上文详细描述了本申请的方法实施例,下文结合图15至图17,详细描述本申请的装置实施例。
图15是本申请提供的解码器600的示意性框图。
如图15所示,所述解码器600可包括:
第一确定单元610,用于基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
第二确定单元620,用于基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
更新单元630,用于基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式解码的块。
在一些实施例中,所述第一预测模式包括帧内模板匹配预测IntraTMP模式。
在一些实施例中,所述第二确定单元620具体用于:
基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元620具体用于:
若所述至少一个块矢量的数量小于或等于第一预设数值,则将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元620具体用于:
若所述至少一个块矢量的数量大于第二预设数值,则按照以下中的任一项确定所述第一历史块矢量信息中的块矢量:
将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量;
将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量;
将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元620具体用于:
若所述当前块使用亚像素插值的预测方式,则将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元620具体用于:
若所述第一块矢量的精度等于所述亚像素插值的精度,则将所述第一块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元620具体用于:
若所述第一块矢量的精度大于所述亚像素插值的精度,则将所述第二块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元620具体用于:
若所述第一历史块矢量信息包括第三块矢量,则将所述当前块使用的块矢量信息中的且与用于确定所述第三块矢量的一个或多个块矢量对应的精度,确定为所述第三块矢量的精度;所述第一历史块矢量信息包括所述第三块矢量的精度。
在一些实施例中,所述第二确定单元620具体用于:
将所述当前块使用的块矢量信息包括的以下中的至少一项,确定为所述第一历史块矢量信息中的信息:
所述当前块的坐标信息;
用于指示是否对所述当前块的预测块光照补偿的标识;
用于指示是否对所述当前块的预测块滤波的标识;
用于指示是否翻转所述当前块的参考块的标识;
用于指示所述当前块使用的预测模式是否为所述IBC模式的标识;
用于指示所述当前块使用的预测模式是否为所述第一预测模式的标识;
用于指示所述当前块使用的预测模式的索引;
用于指示所述当前块使用的多个参考块的权重的索引。
在一些实施例中,所述第二确定单元620具体用于:
解码码流,确定第一标识;
若所述第一标识指示基于所述第一预测模式更新所述第一历史块矢量信息列表,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。
在一些实施例中,所述第二确定单元620具体用于:
若所述当前块使用的块矢量信息中的块矢量的数量小于或等于第三预设数值,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。
在一些实施例中,所述第二确定单元620具体用于:
若满足以下条件中的至少一项,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息:
所述当前块的面积大于或等于第一阈值;
所述当前块的宽大于或等于第二阈值;
所述当前块的高大于或等于第三阈值;
所述当前块所属的当前图像的类型为预设的类型。
在一些实施例中,所述更新单元630具体用于:
若所述第一历史块矢量信息列表包括所述第一历史块矢量信息,则将所述第一历史块矢量信息,移动至所述第一历史块矢量信息列表的末尾。
在一些实施例中,所述更新单元630具体用于:
若所述第一历史块矢量信息列表中的历史块矢量信息的数量小于第四预设数值,则将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表;否则,将所述第一历史块矢量信息列表中排在最前的历史块矢量信息移出,并将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表的末尾。
在一些实施例中,所述第一历史块矢量信息列表为所述第一预测模式和所述IBC模式共同的历史块矢量信息列表。
在一些实施例中,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表时,所述第一历史块矢量信息列表中的且属于所述第一预测模式的第二历史块矢量信息的优先级,低于所述第一历史块矢量信息列表中的且属于所述IBC模式的第三历史块矢量信息的优先级。
在一些实施例中,所述第一历史块矢量信息列表为所述第一预测模式的历史块矢量信息列表,所述第一历史块矢量信息和所述IBC模式的第二历史块矢量信息列表均用于确定所述候选块矢量信息列表。
在一些实施例中,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级,低于所述第二历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级。
在一些实施例中,所述当前块所属的当前图像经过划分包括多个区域,所述多个区域包括所述当前块的所在区域,所述第一历史块矢量信息列表为所述所在区域对应的历史块矢量信息列表。
应理解,解码器的装置实施例与解码方法的方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图15所示的解码器600可以对应于执行本申请实施例的解码方法400中的相应主体,并且解码器600中的各个单元的前述和其它操作和/或功能分别为了实现解码方法400中的相应流程。
图16是本申请提供的编码器700的示意性框图。
如图16所示,所述编码器700可包括:
第一确定单元710,用于基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
第二确定单元720,用于基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
更新单元730,用于基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式编码的块。
在一些实施例中,所述第一预测模式包括帧内模板匹配预测IntraTMP模式。
在一些实施例中,所述第二确定单元720具体用于:
基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元720具体用于:
若所述至少一个块矢量的数量小于或等于第一预设数值,则将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元720具体用于:
若所述至少一个块矢量的数量大于第二预设数值,则按照以下中的任一项确定所述第一历史块矢量信息中的块矢量:
将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量;
将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量;
将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元720具体用于:
若所述当前块使用亚像素插值的预测方式,则将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元720具体用于:
若所述第一块矢量的精度等于所述亚像素插值的精度,则将所述第一块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元720具体用于:
若所述第一块矢量的精度大于所述亚像素插值的精度,则将所述第二块矢量确定为所述第一历史块矢量信息中的块矢量。
在一些实施例中,所述第二确定单元720具体用于:
若所述第一历史块矢量信息包括第三块矢量,则将所述当前块使用的块矢量信息中的且与用于确定所述第三块矢量的一个或多个块矢量对应的精度,确定为所述第三块矢量的精度;所述第一历史块矢量信息包括所述第三块矢量的精度。
在一些实施例中,所述第二确定单元720具体用于:
将所述当前块使用的块矢量信息包括的以下中的至少一项,确定为所述第一历史块矢量信息中的信息:
所述当前块的坐标信息;
用于指示是否对所述当前块的预测块光照补偿的标识;
用于指示是否对所述当前块的预测块滤波的标识;
用于指示是否翻转所述当前块的参考块的标识;
用于指示所述当前块使用的预测模式是否为所述IBC模式的标识;
用于指示所述当前块使用的预测模式是否为所述第一预测模式的标识;
用于指示所述当前块使用的预测模式的索引;
用于指示所述当前块使用的多个参考块的权重的索引。
在一些实施例中,所述编码器还包括:
编码单元,用于对第一标识进行编码;
其中,所述第一标识指示基于所述第一预测模式更新所述第一历史块矢量信息列表。
在一些实施例中,所述第二确定单元720具体用于:
若所述当前块使用的块矢量信息中的块矢量的数量小于或等于第三预设数值,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。
在一些实施例中,所述第二确定单元720具体用于:
若满足以下条件中的至少一项,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息:
所述当前块的面积大于或等于第一阈值;
所述当前块的宽大于或等于第二阈值;
所述当前块的高大于或等于第三阈值;
所述当前块所属的当前图像的类型为预设的类型。
在一些实施例中,所述更新单元730具体用于:
若所述第一历史块矢量信息列表包括所述第一历史块矢量信息,则将所述第一历史块矢量信息,移动至所述第一历史块矢量信息列表的末尾。
在一些实施例中,所述更新单元730具体用于:
若所述第一历史块矢量信息列表中的历史块矢量信息的数量小于第四预设数值,则将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表;否则,将所述第一历史块矢量信息列表中排在最前的历史块矢量信息移出,并将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表的末尾。
在一些实施例中,所述第一历史块矢量信息列表为所述第一预测模式和所述IBC模式共同的历史块矢量信息列表。
在一些实施例中,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表时,所述第一历史块矢量信息列表中的且属于所述第一预测模式的第二历史块矢量信息的优先级,低于所述第一历史块矢量信息列表中的且属于所述IBC模式的第三历史块矢量信息的优先级。
在一些实施例中,所述第一历史块矢量信息列表为所述第一预测模式的历史块矢量信息列表,所述第一历史块矢量信息和所述IBC模式的第二历史块矢量信息列表均用于确定所述候选块矢量信息列表。
在一些实施例中,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级,低于所述第二历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级。
在一些实施例中,所述当前块所属的当前图像经过划分包括多个区域,所述多个区域包括所述当前块的所在区域,所述第一历史块矢量信息列表为所述所在区域对应的历史块矢量信息列表。
应理解,编码器的装置实施例与编码方法的方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图16所示的编码器700可以对应于执行本申请实施例的编码方法500中的相应主体,并且编码器700中的各个单元的前述和其它操作和/或功能分别为了实现编码方法500等各个方法中的相应流程。
还应理解,本申请实施例涉及的解码器600或编码器700中的各个单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现,甚至,这些功能也可以由一个或多个其它单元协助实现。例如,解码器600或编码器700中的部分或全部合并为一个或若干个另外的单元。再如,解码器600或编码器700中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。再如,该解码器600或编码器700也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。
根据本申请的另一个实施例,可以通过在包括例如中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的通用计算机的通用计算设备上运行能够执行相应方法所涉及的各步骤的计算机程序(包括程序代码),来构造本申请实施例涉及的解码器600或编码器700,以及来实现本申请实施例的编码方法或解码方法。计算机程序可以记载于例如计算机可读存储介质上,并通过计算机可读存储介质装载于电子设备中,并在其中运行,来实现本申请实施例的相应方法。换言之,上文涉及的单元可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过软硬件结合的形式实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件组合执行完成。可选地,软件可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上文涉及的方法实施例中的步骤。
图17是本申请提供的电子设备800的示意结构图。
如图17所示,该电子设备800至少包括处理器810以及计算机可读存储介质820。其中,处理器810以及计算机可读存储介质820可通过总线或者其它方式连接。计算机可读存储介质820用于存储计算机程序821,计算机程序821包括计算机指令,处理器810用于执行计算机可读存储介质820存储的计算机指令。处理器810是电子设备800的计算核心以及控制核心,其适于实现一条或多条计算机指令,具体适于加载并执行一条或多条计算机指令从而实现相应方法流程或相应功能。
示例性地,处理器810也可称为中央处理器(Central Processing Unit,CPU)。处理器810可以包括但不限于:通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、分立硬件组件等等。
示例性地,计算机可读存储介质820可以是高速RAM存储器,也可以是非不稳定的存储器(Non-VolatileMemory),例如至少一个磁盘存储器;可选的,还可以是至少一个位于远离前述处理器810的计算机可读存储介质。具体而言,计算机可读存储介质820包括但不限于:易失性存储器和/或非 易失性存储器。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
示例性地,该电子设备800可以是本申请实施例涉及的解码器或解码框架;该计算机可读存储介质820中存储有第二计算机指令;由处理器810加载并执行计算机可读存储介质820中存放的第二计算机指令,以实现本申请提供的解码方法中的相应步骤;换言之,计算机可读存储介质820中的第二计算机指令由处理器810加载并执行相应步骤,为避免重复,此处不再赘述。
示例性地,该电子设备800可以是本申请实施例涉及的编码器或编码框架;该计算机可读存储介质820中存储有第一计算机指令;由处理器810加载并执行计算机可读存储介质820中存放的第一计算机指令,以实现本申请提供的编码方法中的相应步骤;换言之,计算机可读存储介质820中的第一计算机指令由处理器810加载并执行相应步骤,为避免重复,此处不再赘述。
根据本申请的另一方面,本申请还提供了一种编解码系统,包括上文涉及的编码器和解码器。
根据本申请的另一方面,本申请还提供了一种计算机可读存储介质(Memory),计算机可读存储介质是电子设备800中的记忆设备,用于存放程序和数据。例如,计算机可读存储介质820。可以理解的是,此处的计算机可读存储介质820既可以包括电子设备800中的内置存储介质,当然也可以包括电子设备800所支持的扩展存储介质。计算机可读存储介质提供存储空间,该存储空间存储了电子设备800的操作系统。并且,在该存储空间中还存放了适于被处理器810加载并执行的一条或多条的计算机指令,这些计算机指令可以是一个或多个的计算机程序821(包括程序代码)。
根据本申请的另一方面,本申请还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。例如,计算机程序821。此时,数据处理设备800可以是计算机,处理器810从计算机可读存储介质820读取该计算机指令,处理器810执行该计算机指令,使得该计算机执行上文涉及的各种可选方式中提供的编码方法或解码方法。换言之,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地运行本申请实施例的流程或实现本申请实施例的功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质进行传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。
根据本申请的另一方面,本申请还提供了一种码流,该码流可以是利用本申请提供的解码方法进行解码的码流或利用本申请提供的编码方法生成的码流。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元以及流程步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
最后需要说明的是,以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (46)

  1. 一种解码方法,其特征在于,包括:
    基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
    基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
    基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
    其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式解码的块。
  2. 根据权利要求1所述的方法,其特征在于,所述第一预测模式包括帧内模板匹配预测IntraTMP模式。
  3. 根据权利要求1或2所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量。
  4. 根据权利要求3所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量,包括:
    若所述至少一个块矢量的数量小于或等于第一预设数值,则将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量。
  5. 根据权利要求3所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量,包括:
    若所述至少一个块矢量的数量大于第二预设数值,则按照以下中的任一项确定所述第一历史块矢量信息中的块矢量:
    将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量;
    将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量;
    将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    若所述当前块使用亚像素插值的预测方式,则将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量。
  7. 根据权利要求6所述的方法,其特征在于,所述将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量,包括:
    若所述第一块矢量的精度等于所述亚像素插值的精度,则将所述第一块矢量确定为所述第一历史块矢量信息中的块矢量。
  8. 根据权利要求6所述的方法,其特征在于,所述将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量,包括:
    若所述第一块矢量的精度大于所述亚像素插值的精度,则将所述第二块矢量确定为所述第一历史块矢量信息中的块矢量。
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    若所述第一历史块矢量信息包括第三块矢量,则将所述当前块使用的块矢量信息中的且与用于确定所述第三块矢量的一个或多个块矢量对应的精度,确定为所述第三块矢量的精度;所述第一历史块矢量信息包括所述第三块矢量的精度。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    将所述当前块使用的块矢量信息包括的以下中的至少一项,确定为所述第一历史块矢量信息中的信息:
    所述当前块的坐标信息;
    用于指示是否对所述当前块的预测块光照补偿的标识;
    用于指示是否对所述当前块的预测块滤波的标识;
    用于指示是否翻转所述当前块的参考块的标识;
    用于指示所述当前块使用的预测模式是否为所述IBC模式的标识;
    用于指示所述当前块使用的预测模式是否为所述第一预测模式的标识;
    用于指示所述当前块使用的预测模式的索引;
    用于指示所述当前块使用的多个参考块的权重的索引。
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    解码码流,确定第一标识;
    若所述第一标识指示基于所述第一预测模式更新所述第一历史块矢量信息列表,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。
  12. 根据权利要求1至11中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    若所述当前块使用的块矢量信息中的块矢量的数量小于或等于第三预设数值,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。
  13. 根据权利要求1至12中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    若满足以下条件中的至少一项,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息:
    所述当前块的面积大于或等于第一阈值;
    所述当前块的宽大于或等于第二阈值;
    所述当前块的高大于或等于第三阈值;
    所述当前块所属的当前图像的类型为预设的类型。
  14. 根据权利要求1至13中任一项所述的方法,其特征在于,所述基于所述第一历史块矢量信息更新第一历史块矢量信息列表,包括:
    若所述第一历史块矢量信息列表包括所述第一历史块矢量信息,则将所述第一历史块矢量信息,移动至所述第一历史块矢量信息列表的末尾。
  15. 根据权利要求1至13中任一项所述的方法,其特征在于,所述基于所述第一历史块矢量信息更新第一历史块矢量信息列表,包括:
    若所述第一历史块矢量信息列表中的历史块矢量信息的数量小于第四预设数值,则将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表;否则,将所述第一历史块矢量信息列表中排在最前的历史块矢量信息移出,并将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表的末尾。
  16. 根据权利要求1至15中任一项所述的方法,其特征在于,所述第一历史块矢量信息列表为所述第一预测模式和所述IBC模式共同的历史块矢量信息列表。
  17. 根据权利要求16所述的方法,其特征在于,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表时,所述第一历史块矢量信息列表中的且属于所述第一预测模式的第二历史块矢量信息的优先级,低于所述第一历史块矢量信息列表中的且属于所述IBC模式的第三历史块矢量信息的优先级。
  18. 根据权利要求1至15中任一项所述的方法,其特征在于,所述第一历史块矢量信息列表为所述第一预测模式的历史块矢量信息列表,所述第一历史块矢量信息和所述IBC模式的第二历史块矢量信息列表均用于确定所述候选块矢量信息列表。
  19. 根据权利要求18所述的方法,其特征在于,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级,低于所述第二历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级。
  20. 根据权利要求1至15中任一项所述的方法,其特征在于,所述当前块所属的当前图像经过划分包括多个区域,所述多个区域包括所述当前块的所在区域,所述第一历史块矢量信息列表为所述所在区域对应的历史块矢量信息列表。
  21. 一种编码方法,其特征在于,包括:
    基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
    基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
    基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
    其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式编码的块。
  22. 根据权利要求21所述的方法,其特征在于,所述第一预测模式包括帧内模板匹配预测IntraTMP模式。
  23. 根据权利要求21或22所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量。
  24. 根据权利要求23所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量,包括:
    若所述至少一个块矢量的数量小于或等于第一预设数值,则将所述至少一个块矢量确定为所述第一历史块矢量信息中的块矢量。
  25. 根据权利要求23所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息中的至少一个块矢量和所述至少一个块矢量的数量,确定所述第一历史块矢量信息中的块矢量,包括:
    若所述至少一个块矢量的数量大于第二预设数值,则按照以下中的任一项确定所述第一历史块矢量信息中的块矢量:
    将所述至少一个块矢量的加权平均值,确定为所述第一历史块矢量信息中的块矢量;
    将所述至少一个块矢量中模板误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量;
    将所述至少一个块矢量中参考块的误差值最小的一个或多个块矢量,确定为所述第一历史块矢量信息中的块矢量。
  26. 根据权利要求21至25中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    若所述当前块使用亚像素插值的预测方式,则将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量。
  27. 根据权利要求26所述的方法,其特征在于,所述将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量,包括:
    若所述第一块矢量的精度等于所述亚像素插值的精度,则将所述第一块矢量确定为所述第一历史块矢量信息中的块矢量。
  28. 根据权利要求26所述的方法,其特征在于,所述将所述当前块使用的块矢量信息中的第一块矢量确定为所述第一历史块矢量信息中的块矢量,或将基于所述第一块矢量的调整量对所述第一块矢量进行调整得到的第二块矢量,确定为所述第一历史块矢量信息中的块矢量,包括:
    若所述第一块矢量的精度大于所述亚像素插值的精度,则将所述第二块矢量确定为所述第一历史块矢量信息中的块矢量。
  29. 根据权利要求21至28中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    若所述第一历史块矢量信息包括第三块矢量,则将所述当前块使用的块矢量信息中的且与用于确定所述第三块矢量的一个或多个块矢量对应的精度,确定为所述第三块矢量的精度;所述第一历史块矢量信息包括所述第三块矢量的精度。
  30. 根据权利要求21至29中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    将所述当前块使用的块矢量信息包括的以下中的至少一项,确定为所述第一历史块矢量信息中的信息:
    所述当前块的坐标信息;
    用于指示是否对所述当前块的预测块光照补偿的标识;
    用于指示是否对所述当前块的预测块滤波的标识;
    用于指示是否翻转所述当前块的参考块的标识;
    用于指示所述当前块使用的预测模式是否为所述IBC模式的标识;
    用于指示所述当前块使用的预测模式是否为所述第一预测模式的标识;
    用于指示所述当前块使用的预测模式的索引;
    用于指示所述当前块使用的多个参考块的权重的索引。
  31. 根据权利要求21至30中任一项所述的方法,其特征在于,所述方法还包括:
    对第一标识进行编码;
    其中,所述第一标识指示基于所述第一预测模式更新所述第一历史块矢量信息列表。
  32. 根据权利要求21至31中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    若所述当前块使用的块矢量信息中的块矢量的数量小于或等于第三预设数值,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息。
  33. 根据权利要求21至32中任一项所述的方法,其特征在于,所述基于所述当前块使用的块矢量信息确定第一历史块矢量信息,包括:
    若满足以下条件中的至少一项,则基于所述当前块使用的块矢量信息确定所述第一历史块矢量信息:
    所述当前块的面积大于或等于第一阈值;
    所述当前块的宽大于或等于第二阈值;
    所述当前块的高大于或等于第三阈值;
    所述当前块所属的当前图像的类型为预设的类型。
  34. 根据权利要求21至33中任一项所述的方法,其特征在于,所述基于所述第一历史块矢量信息更新第一历史块矢量信息列表,包括:
    若所述第一历史块矢量信息列表包括所述第一历史块矢量信息,则将所述第一历史块矢量信息,移动至所述第一历史块矢量信息列表的末尾。
  35. 根据权利要求21至33中任一项所述的方法,其特征在于,所述基于所述第一历史块矢量信息更新第一历史块矢量信息列表,包括:
    若所述第一历史块矢量信息列表中的历史块矢量信息的数量小于第四预设数值,则将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表;否则,将所述第一历史块矢量信息列表中排在最前的历史块矢量信息移出,并将所述第一历史块矢量信息添加至所述第一历史块矢量信息列表的末尾。
  36. 根据权利要求21至35中任一项所述的方法,其特征在于,所述第一历史块矢量信息列表为所述第一预测模式和所述IBC模式共同的历史块矢量信息列表。
  37. 根据权利要求36所述的方法,其特征在于,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表时,所述第一历史块矢量信息列表中的且属于所述第一预测模式的第二历史块矢量信息的优先级,低于所述第一历史块矢量信息列表中的且属于所述IBC模式的第三历史块矢量信息的优先级。
  38. 根据权利要求21至35中任一项所述的方法,其特征在于,所述第一历史块矢量信息列表为所述第一预测模式的历史块矢量信息列表,所述第一历史块矢量信息和所述IBC模式的第二历史块矢量信息列表均用于确定所述候选块矢量信息列表。
  39. 根据权利要求38所述的方法,其特征在于,所述第一历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级,低于所述第二历史块矢量信息列表用于确定所述候选块矢量信息列表的优先级。
  40. 根据权利要求21至35中任一项所述的方法,其特征在于,所述当前块所属的当前图像经过划分包括多个区域,所述多个区域包括所述当前块的所在区域,所述第一历史块矢量信息列表为所述所在区域对应的历史块矢量信息列表。
  41. 一种解码器,其特征在于,包括:
    第一确定单元,用于基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
    第二确定单元,用于基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
    更新单元,用于基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
    其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式解码的块。
  42. 一种编码器,其特征在于,包括:
    第一确定单元,用于基于与帧内块复制IBC模式不同的第一预测模式确定当前块使用的块矢量信息;
    第二确定单元,用于基于所述当前块使用的块矢量信息确定第一历史块矢量信息;
    更新单元,用于基于所述第一历史块矢量信息更新第一历史块矢量信息列表;
    其中,所述第一历史块矢量信息列表用于确定IBC块使用的候选块矢量信息列表,所述IBC块为在所述当前块之后使用所述IBC模式编码的块。
  43. 一种电子设备,其特征在于,包括:
    处理器,适于执行计算机程序;
    计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被所述处理器执行时,实现根据权利要求1至20中任一项所述的方法或根据权利要求21至40中任一项所述的方法。
  44. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,当所述计算机程序在计算机上运行时,使得计算机执行根据权利要求1至20中任一项所述的方法或根据权利要求21至40中任一项所述的方法。
  45. 一种计算机程序产品,包括计算机程序/指令,其特征在于,所述计算机程序/指令被处理器执行时实现根据权利要求1至20中任一项所述的方法或根据权利要求21至40中任一项所述的方法。
  46. 一种码流,其特征在于,所述码流为根据权利要求1至20中任一项所述的方法解码的码流,或所述码流为根据权利要求25至40中任一项所述的方法生成的码流。
PCT/CN2023/105582 2023-07-03 2023-07-03 解码方法、编码方法、解码器以及编码器 Ceased WO2025007253A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
PCT/CN2023/105582 WO2025007253A1 (zh) 2023-07-03 2023-07-03 解码方法、编码方法、解码器以及编码器
KR1020257041960A KR20260030061A (ko) 2023-07-03 2023-07-03 디코딩 방법, 인코딩 방법, 디코더 및 인코더
CN202380099902.2A CN121488470A (zh) 2023-07-03 2023-07-03 解码方法、编码方法、解码器以及编码器
MX2025015139A MX2025015139A (es) 2023-07-03 2025-12-15 Metodo de decodificacion, metodo de codificacion, decodificador y codificador
US19/422,083 US20260106970A1 (en) 2023-07-03 2025-12-16 Decoding method, encoding method, decoder and encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2023/105582 WO2025007253A1 (zh) 2023-07-03 2023-07-03 解码方法、编码方法、解码器以及编码器

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US19/422,083 Continuation US20260106970A1 (en) 2023-07-03 2025-12-16 Decoding method, encoding method, decoder and encoder

Publications (1)

Publication Number Publication Date
WO2025007253A1 true WO2025007253A1 (zh) 2025-01-09

Family

ID=94171085

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/105582 Ceased WO2025007253A1 (zh) 2023-07-03 2023-07-03 解码方法、编码方法、解码器以及编码器

Country Status (5)

Country Link
US (1) US20260106970A1 (zh)
KR (1) KR20260030061A (zh)
CN (1) CN121488470A (zh)
MX (1) MX2025015139A (zh)
WO (1) WO2025007253A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708541A (zh) * 2018-07-09 2020-01-17 腾讯美国有限责任公司 视频编解码方法、设备和存储介质
CN113924779A (zh) * 2019-06-20 2022-01-11 韩国电子通信研究院 视频编码/解码方法和装置以及比特流存储介质
WO2022242645A1 (en) * 2021-05-17 2022-11-24 Beijing Bytedance Network Technology Co., Ltd. Method, device, and medium for video processing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708541A (zh) * 2018-07-09 2020-01-17 腾讯美国有限责任公司 视频编解码方法、设备和存储介质
CN113924779A (zh) * 2019-06-20 2022-01-11 韩国电子通信研究院 视频编码/解码方法和装置以及比特流存储介质
WO2022242645A1 (en) * 2021-05-17 2022-11-24 Beijing Bytedance Network Technology Co., Ltd. Method, device, and medium for video processing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
J.-K. LEE (OFINNO), D. RUIZ COLL (OFINNO), V. WARUDKAR (OFINNO): "AHG12: Using block vector derived from IntraTMP as an IBC candidate for the current block", 29. JVET MEETING; 20230111 - 20230120; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. 030306800, 4 January 2023 (2023-01-04), XP030306800 *
W. LIM, D. KIM, J. KIM, S.-C. LIM (ETRI): "EE2-3.2: Using block vector derived from IntraTMP for IBC", 28. JVET MEETING; 20221021 - 20221028; MAINZ; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-AB0061 ; m60789, 14 October 2022 (2022-10-14), XP030304484 *

Also Published As

Publication number Publication date
KR20260030061A (ko) 2026-03-05
US20260106970A1 (en) 2026-04-16
MX2025015139A (es) 2026-02-03
CN121488470A (zh) 2026-02-06

Similar Documents

Publication Publication Date Title
US20250317604A1 (en) Multiple neural network models for filtering during video coding
CN111226438B (zh) 视频解码的方法及解码器
RU2586003C2 (ru) Определение значений уровня границы фильтрования удаления блочности для кодирования видео
WO2020069655A1 (zh) 插值滤波器的训练方法、装置及视频图像编解码方法、编解码器
TW201817236A (zh) 用於視頻寫碼之線性模型色度內預測
JP7277586B2 (ja) モードおよびサイズに依存したブロックレベル制限の方法および装置
KR20210107131A (ko) 이미지 예측 방법, 장치 및 시스템, 디바이스 및 저장 매체
KR20230111256A (ko) 비디오 인코딩 및 디코딩 방법과 시스템, 비디오 인코더및 비디오 디코더
US11516470B2 (en) Video coder and corresponding method
CN113556566A (zh) 用于预测译码的插值滤波的方法及装置
CN118525513A (zh) 帧内预测方法、设备、系统、及存储介质
US11917203B2 (en) Non-separable transform method and device
CN111327894A (zh) 块划分方法、视频编解码方法、视频编解码器
CN112135128A (zh) 图像预测方法、编码树节点划分方法及其装置
WO2024216632A1 (zh) 视频编解码方法、装置、设备、系统、及存储介质
WO2025007253A1 (zh) 解码方法、编码方法、解码器以及编码器
CN116746152A (zh) 视频编解码方法与系统、及视频编码器与视频解码器
WO2025000289A9 (zh) 解码方法、编码方法、解码器以及编码器
WO2024239260A1 (zh) 解码方法、编码方法、训练方法、解码器以及编码器
WO2025010571A9 (zh) 编码方法、编码器以及电子设备
WO2025098301A1 (zh) 滤波方法、装置、电子设备以及存储介质
WO2024254872A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2025097878A1 (zh) 滤波方法、装置、电子设备以及存储介质
WO2024192733A9 (zh) 视频编解码方法、装置、设备、系统、及存储介质
WO2026081207A1 (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: 23943987

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: MX/A/2025/015139

Country of ref document: MX

WWE Wipo information: entry into national phase

Ref document number: 202617008764

Country of ref document: IN

WWE Wipo information: entry into national phase

Ref document number: 2026102125

Country of ref document: RU

WWP Wipo information: published in national office

Ref document number: MX/A/2025/015139

Country of ref document: MX

NENP Non-entry into the national phase

Ref country code: DE

WWP Wipo information: published in national office

Ref document number: 2026102125

Country of ref document: RU

WWP Wipo information: published in national office

Ref document number: 202617008764

Country of ref document: IN