Encoding mode signaling reordering for video coding
By using adaptive DIMD mode signaling reordering technology, the signaling process of intra-frame merging mode is optimized, which solves the problem of low efficiency in removing redundant information in video coding and achieves more efficient video coding compression.
Patent Information
- Application Number
- CN202580026301.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-04-03
- Filing Date
- 2025-04-01
- Publication Date
- 2026-11-27
AI Technical Summary
Existing video coding technologies suffer from low efficiency in removing redundant information when processing video sequences, resulting in low coding efficiency.
Adaptive DIMD mode signaling reordering technology is adopted to improve coding efficiency by optimizing the signaling process of intra-frame merging mode at the encoder and decoder and dynamically adjusting the activation and deactivation of intra-frame merging mode.
It improves the encoding efficiency of video, reduces the transmission of redundant information, and enhances the compression effect of video sequences.
Smart Images

Figure CN123187430A_ABST
Abstract
Description
Cross-references to related applications
[0001] This application claims the benefit of U.S. Provisional Application No. 63 / 573,820, filed April 3, 2024, which is incorporated herein by reference in its entirety. Attached Figure Description
[0002] Some features are shown in the accompanying drawings by way of example rather than limitation. In the accompanying drawings, the same reference numerals refer to similar elements.
[0003] Figure 1 An example video encoding / decoding system in which embodiments of the present disclosure may be implemented is shown.
[0004] Figure 2 An example encoder in which embodiments of the present disclosure may be implemented is shown.
[0005] Figure 3 An example decoder in which embodiments of the present disclosure may be implemented is shown.
[0006] Figure 4 An example quadtree partitioning of the Coding Tree Block (CTB) is shown.
[0007] Figure 5 It shows the relationship with Figure 4 The example quadtree partitioning of the CTB corresponds to the example quadtree.
[0008] Figure 6 Examples of binary tree partitioning and ternary tree partitioning are shown.
[0009] Figure 7A An example of a quadtree combined with a multi-type tree partitioning of CTB is shown.
[0010] Figure 7B It shows the relationship with Figure 7A The example tree shown is a combination of a quadtree and a multi-type tree for the CTB partitioning.
[0011] Figure 8 An example of a partitioning pattern in AV1 is shown.
[0012] Figure 9 An example set of reference samples is shown for intra-frame prediction of the current block.
[0013] Figure 10A , Figure 10B and Figure 10C An example intra-frame prediction mode is shown.
[0014] Figure 11 An example of the current block and its corresponding reference sample is shown.
[0015] Figure 12 An example of applying an intra-frame prediction mode (e.g., angular mode) to predict the current block is shown.
[0016] Figure 13A An example of inter-frame prediction performed on the current block in the current image is shown.
[0017] Figure 13B An example motion vector is shown.
[0018] Figure 14 An example of bidirectional prediction performed on the current block is shown.
[0019] Figure 15A Example spatial candidate neighboring blocks are shown relative to the current block being encoded or decoded.
[0020] Figure 15B Example positions of two time-coordinated blocks relative to the current block are shown.
[0021] Figure 16 An example of Intra-Block Copy (IBC) is shown.
[0022] Figure 17 An example of Intra-Template Matching Prediction (IntraTMP) for predicting or determining the current block is shown according to some embodiments.
[0023] Figure 18 An example of decoder-side intra-frame mode derivation (DIMD) for encoding and decoding the current block is shown according to some embodiments.
[0024] Figure 19 An example of a template (e.g., a template region) for calculating the gradient histogram (HoG) used in DIMD is shown according to some embodiments.
[0025] Figure 20 The following are examples of embodiments, such as those shown. Figure 18 An example flowchart of the derivation process of the described DIMD predictor.
[0026] Figure 21 An example of a spatially non-adjacent neighboring block of the current block is shown according to some embodiments.
[0027] Figure 22A An example is shown of IPM information from multiple (previously reconstructed) adjacent blocks from a block, according to some embodiments, the IPM information being used to determine (e.g., generate, reconstruct, predict) the block.
[0028] Figure 22B This illustrates, according to some embodiments, the combination of data from... Figure 22AThe IPM information of multiple adjacent blocks is used to generate an example graphical representation of the merged gradient histogram (MHoG).
[0029] Figure 22C This illustrates, according to some embodiments, the combination of data from... Figure 22A The IPM information of multiple adjacent blocks is used to generate an example graphical representation of an occurrence count histogram (HoC).
[0030] Figure 23 An example flowchart of an intra-merge list mode for deriving an intra-merge candidate list according to some embodiments is shown.
[0031] Figure 24 A flowchart of an example process for generating a history-based table of intra-frame merge candidates, according to some embodiments, is shown.
[0032] Figure 25 A flowchart illustrating an example of an adaptive DIMD mode signaling process based on DIMD mode activation according to some embodiments of the present disclosure is shown.
[0033] Figure 26 An example of a signaling tree for signaling DIMD mode flags according to an embodiment of the present disclosure is shown.
[0034] Figure 27 Another example of a signaling tree for signaling DIMD mode flags according to embodiments of the present disclosure is shown.
[0035] Figure 28 A flowchart illustrating an example of an adaptive DIMD mode signaling process based on a DIMD mode activation mechanism at the encoder, according to an embodiment of the present disclosure, is shown.
[0036] Figure 29 A flowchart illustrating an example of an adaptive DIMD mode signaling process based on a DIMD mode activation mechanism at the decoder according to an embodiment of the present disclosure is shown.
[0037] Figure 30A Another example of a signaling tree for signaling DIMD mode flags according to embodiments of the present disclosure is shown.
[0038] Figure 30B The illustration shows an embodiment of the present disclosure after the DIMD mode is determined to be disabled or deactivated. Figure 30A An example of the updated signaling tree shown.
[0039] Figure 31A Another example of a signaling tree for signaling DIMD mode flags according to embodiments of the present disclosure is shown.
[0040] Figure 31B The illustration shows an embodiment of the present disclosure after the DIMD mode is determined to be disabled or deactivated. Figure 31A An example of the updated signaling tree shown.
[0041] Figure 32 A flowchart illustrating an example of a DIMD mode signaling reordering process at the encoder according to some embodiments of the present disclosure is shown.
[0042] Figure 33 A flowchart illustrating an example of a DIMD mode signaling reordering process at a decoder according to some embodiments of the present disclosure is shown.
[0043] Figure 34 A flowchart illustrating an example of combining DIMD mode signaling reordering and mode activation at the decoder according to some embodiments of this disclosure is shown.
[0044] Figure 35 A flowchart illustrating an example of an encoding mode signaling reordering process at the encoder according to some embodiments of the present disclosure is shown.
[0045] Figure 36 A flowchart illustrating an example of an encoded mode signaling reordering process at a decoder according to some embodiments of the present disclosure is shown.
[0046] Figure 37 A block diagram of an example computer system in which embodiments of the present disclosure may be implemented is shown. Detailed Implementation
[0047] Numerous specific details are set forth in the following description to provide a thorough understanding of this disclosure. However, it will be apparent to those skilled in the art that this disclosure (including structures, systems, and methods) can be practiced without these specific details. The descriptions and representations herein are common means by which those experienced or skilled in the art most effectively communicate the substance of their work to others of similar skill in the art. In other instances, well-known methods, processes, components, and circuits have not been described in detail to avoid unnecessarily obscuring aspects of this disclosure.
[0048] References to "an embodiment," "an embodiment," "an exemplary embodiment," etc., in this specification indicate that the described embodiment may include specific features, structures, or characteristics, but each embodiment may not necessarily include that specific feature, structure, or characteristic. Furthermore, these phrases do not necessarily refer to the same embodiment. Additionally, when a specific feature, structure, or characteristic is described in connection with an embodiment, it is believed that, whether explicitly described or not, implementing such a feature, structure, or characteristic in conjunction with other embodiments is within the knowledge of those skilled in the art.
[0049] Furthermore, it should be noted that the various embodiments can be described as processes depicted as flowcharts, flow diagrams, data flow diagrams, structure diagrams, or block diagrams. Although a flowchart can describe operations as a sequential process, many operations can be performed in parallel or simultaneously. Additionally, the order of operations can be rearranged. A process terminates when its operations are completed, but may have additional steps not included in the diagram. A process can correspond to a method, function, flow, subroutine, subprogram, etc. When a process corresponds to a function, its termination can correspond to the function returning to the calling function or the main function.
[0050] The term "computer-readable medium" includes, but is not limited to, portable or non-portable storage devices, optical storage devices, and various other media capable of storing, containing, or carrying instructions and / or data. Computer-readable media may include non-transitory media on which data can be stored, and which do not contain carrier waves and / or transient electronic signals propagated wirelessly or via a wired connection. Examples of non-transitory media may include, but are not limited to, magnetic disks or magnetic tapes, optical storage media such as optical discs (CDs) or digital versatile optical discs (DVDs), flash memory, memory, or memory devices. Code and / or machine-executable instructions may be stored on a computer-readable medium, which may represent flows, functions, subroutines, programs, routines, subroutines, modules, software packages, classes, or any combination of instructions, data structures, or program statements. Code segments can be coupled to another code segment or hardware circuitry by passing and / or receiving information, data, arguments, parameters, or memory contents. Information, independent variables, parameters, data, etc. can be transmitted, forwarded, or transmitted through any suitable means (including memory sharing, message passing, token passing, network transmission, etc.).
[0051] Furthermore, embodiments can be implemented using hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented as software, firmware, middleware, or microcode, program code or code segments (e.g., a computer program product) for performing the necessary tasks can be stored in a computer-readable or machine-readable medium. The processor can perform the necessary tasks.
[0052] Video sequences comprising multiple images / frames can be represented digitally for storage and / or transmission. Representing video sequences digitally can require a large number of bits. The large data size that may be associated with a video sequence can require significant resources for storage and / or transmission. Video encoding can be used to compress the size of video sequences for more efficient storage and / or transmission. Video decoding can be used to decompress compressed video sequences for display and / or other uses.
[0053] Figure 1An example video encoding / decoding system 100 in which embodiments of the present disclosure may be implemented is shown. The video encoding / decoding system 100 includes a source device 102, a transmission medium 104, and a destination device 106. The source device 102 encodes a video sequence 108 into a bitstream 110 for more efficient storage and / or transmission. The source device 102 may store the bitstream 110 and / or send / transmit it to the destination device 106 via the transmission medium 104. The destination device 106 decodes the bitstream 110 to display the video sequence 108. The destination device 106 may receive the bitstream 110 from the source device 102 via the transmission medium 104. The source device 102 and / or the destination device 106 may be any of a plurality of different devices (e.g., a desktop computer, laptop computer, tablet computer, smartphone, wearable device, television, camera, video game console, set-top box, video streaming device, etc.).
[0054] Source device 102 may include one or more of the following: video source 112, encoder 114, and / or output interface 116 (e.g., for encoding video sequence 108 into bitstream 110). Video source 112 may provide and / or generate video sequence 108 based on the capture of natural scenes and / or synthetically generated scenes. Synthetically generated scenes may be scenes including computer-generated graphics and / or screen content. Video source 112 may include video capture device (e.g., camera), video archives including previously captured natural scenes and / or synthetically generated scenes, video feed interface for receiving captured natural scenes and / or synthetically generated scenes from a video content provider, and / or processor for generating synthetic scenes.
[0055] Video sequences (such as video sequence 108) may include a series of images (also called frames). A video sequence can create the impression of motion based on the continuous presentation of images of the video sequence using constant or variable time intervals between images. Images may include one or more sample arrays of intensity values. Intensity values may be acquired (e.g., measured, determined, provided) at a series of regularly spaced locations within the image. Color images may include (e.g., typically include) a luminance sample array and two chrominance sample arrays. The luminance sample array may include intensity values representing the luminance (e.g., luminance component, Y) of the image. The chrominance sample arrays may include intensity values representing the blue and red components (e.g., chrominance components, Cb and Cr) of the image, separate from the luminance. Other color image sample arrays are also possible based on different color schemes (e.g., red, green, blue (RGB) color schemes). A pixel in a color image may refer to / include / be associated with all intensity values (e.g., luminance component, chrominance component) for a given location in the sample array used to represent the color image (e.g., three sample arrays for one luminance component and two chrominance components, respectively). Monochrome images may include a single luminance sample array. A pixel in a monochrome image can refer to / include / be associated with an intensity value (e.g., a luminance component) at a given location in a single luminance sample array used to represent the monochrome image.
[0056] Encoder 114 can encode video sequence 108 into bitstream 110. Encoder 114 can apply / use (e.g., for encoding video sequence 108) one or more prediction techniques to reduce redundant information in video sequence 108. Redundant information is information that can be predicted at the decoder and does not need to be transmitted to the decoder for accurate decoding of video sequence 108. For example, encoder 114 can apply spatial prediction (e.g., intra-frame prediction), temporal prediction (e.g., inter-frame prediction), inter-layer prediction, and / or other prediction techniques to reduce redundant information in video sequence 108. For example, before applying one or more prediction techniques, encoder 114 can divide the image including video sequence 108 into rectangular regions called blocks. Encoder 114 can then use the one or more prediction techniques to encode the blocks.
[0057] For temporal prediction, encoder 114 can search for blocks similar to the block being encoded in another image of video sequence 108 (e.g., referred to as a reference image). Blocks identified during the search (e.g., referred to as prediction blocks) can then be used to predict the block being encoded. For spatial prediction, encoder 114 can form prediction blocks based on data from reconstructed neighboring samples of the block to be encoded within the same image of video sequence 108. Reconstructed samples refer to samples that have been encoded and then decoded. Encoder 114 can determine prediction errors (e.g., also referred to as residuals) based on the difference between the block being encoded and the prediction blocks. Prediction errors can represent non-redundant information that can be sent / transmitted to the decoder for accurate decoding of video sequence 108.
[0058] Encoder 114 may apply a transform (e.g., using Discrete Cosine Transform (DCT) or any other transform) to the prediction error to generate transform coefficients. Encoder 114 may form bitstream 110 based on the transform coefficients and other information used to determine prediction blocks using / based on prediction type, motion vector, and / or prediction mode. For example, before forming bitstream 110, encoder 114 may perform one or more of quantization and entropy coding on the transform coefficients and / or other information used to determine prediction blocks. Quantization and / or entropy coding may further reduce the number of bits required to store and / or transmit video sequence 108.
[0059] Output interface 116 may be configured to write and / or store bitstream 110 onto transmission medium 104 for transmission to destination device 106. Alternatively or additionally, output interface 116 may be configured to send / transmit, upload, and / or stream bitstream 110 to destination device 106 via transmission medium 104. Output interface 116 may include wired and / or wireless transmitters configured to send / transmit, upload, and / or stream bitstream 110 according to one or more proprietary, open-source, and / or standardized communication protocols (e.g., Digital Video Broadcasting (DVB) standards, Advanced Television Systems Committee (ATSC) standards, Integrated Services Digital Broadcasting (ISDB) standards, Cable Data Service Interface Specification (DOCSIS) standards, 3rd Generation Partnership Project (3GPP) standards, Institute of Electrical and Electronics Engineers (IEEE) standards, Internet Protocol (IP) standards, Wireless Application Protocol (WAP) standards, and / or any other communication protocols).
[0060] The transmission medium 104 may include wireless, wired, and / or computer-readable media. For example, the transmission medium 104 may include one or more wires, cables, air interfaces, optical discs, flash memory, and / or magnetic storage. Additionally or alternatively, the transmission medium 104 may include one or more networks (e.g., the Internet) or file servers configured to store and / or send / transmit encoded video data.
[0061] The destination device 106 can decode the bitstream 110 into a video sequence 108 for display. The destination device 106 may include one or more of an input interface 118, a decoder 120, and / or a video display 122. The input interface 118 may be configured to read the bitstream 110 stored by the source device 102 on the transmission medium 104. Alternatively or additionally, the input interface 118 may be configured to receive, download, and / or stream the bitstream 110 from the source device 102 via the transmission medium 104. The input interface 118 may include a wired and / or wireless receiver configured to receive, download, and / or stream the bitstream 110 according to one or more proprietary, open-source, standardized communication protocols and / or any other communication protocol (e.g., such as those cited herein).
[0062] Decoder 120 can decode video sequence 108 from encoded bitstream 110. For example, to decode video sequence 108, decoder 120 can generate prediction blocks for the image of video sequence 108 in a manner similar to encoder 114, and determine the prediction error for said blocks. Decoder 120 can generate prediction blocks using / based on prediction type, prediction mode, and / or motion vectors received in bitstream 110. Decoder 120 can determine the prediction error using transform coefficients received in bitstream 110. Decoder 120 can determine the prediction error by weighting the transform basis function using the transform coefficients. Decoder 120 can combine prediction blocks and prediction errors to decode video sequence 108. Video sequence 108 at destination device 106 may or may not be the same video sequence transmitted, such as video sequence 108 transmitted by source device 102. For example, due to lossy compression of video sequence 108 by encoder 114 and / or errors introduced into encoded bitstream 110 during transmission to destination device 106, decoder 120 can decode a video sequence that approximates video sequence 108.
[0063] The video display 122 can display the video sequence 108 to a user. The video display 122 may include a cathode ray tube (CRT) display, a liquid crystal display (LCD), a plasma display, a light-emitting diode (LED) display, and / or any other display device suitable for displaying the video sequence 108.
[0064] The video encoding / decoding system 100 is merely an example, and video encoding / decoding systems different from and / or modified versions of the video encoding / decoding system 100 may similarly perform the methods and processes described herein. For example, the video encoding / decoding system 100 may include other components and / or arrangements. For example, the video source 112 may be external to the source device 102. Similarly, the video display 122 may be external to the destination device 106 or may be omitted entirely (e.g., if the video sequence 108 is intended for use by a machine and / or storage device). In this example, the source device 102 may also include a video decoder, and the destination device 106 may also include a video encoder. For example, the source device 102 may be configured to further receive an encoded bitstream from the destination device 106 to support bidirectional video transmission between devices.
[0065] Encoder 114 and / or decoder 120 may operate according to one or more proprietary or industry video codec standards. For example, encoder 114 and / or decoder 120 may operate according to one or more proprietary, open-source and / or standardized protocols, such as ITU-T H.263, ITU-T H.264 and Moving Picture Experts Group (MPEG)-4 Visual (also known as Advanced Video Coding (AVC)), ITU-T H.265 and MPEG-H Part 2 (also known as High Efficiency Video Coding (HEVC)), ITU-T H.265 and MPEG-I Part 3 (also known as Multi-Functional Video Coding (VVC)), WebMVP8 and VP9 codecs, and / or AOMedia Video 1 (AV1), and / or any other video codec protocol.
[0066] Figure 2 An example encoder is shown. (e.g.) Figure 2 The encoder 200 shown can implement one or more of the processes described herein. Encoder 200 can encode video sequence 202 into bitstream 204 for more efficient storage and / or transmission. Encoder 200 can, for example... Figure 1 Implemented in the video encoding / decoding system 100 shown (e.g., as encoder 114), or in any computing, communication, or electronic device (e.g., desktop computer, laptop computer, tablet computer, smartphone, wearable device, television, camera, video game console, set-top box, video streaming device, etc.). Encoder 200 may include one or more of the following: inter-frame prediction unit 206, intra-frame prediction unit 208, combiners 210 and 212, transform and quantization unit (TR + Q) 214, inverse transform and quantization unit (iTR + iQ) 216, entropy coding unit 218, one or more filters 220, and / or buffers 222.
[0067] Encoder 200 can divide (e.g., include) images (e.g., frames) of video sequence 202 into blocks and encode video sequence 202 block by block. Encoder 200 can perform / apply prediction techniques on the blocks being encoded using inter-frame prediction unit 206 or intra-frame prediction unit 208. Inter-frame prediction unit 206 can perform inter-frame prediction by searching for blocks similar to the blocks being encoded in another reconstructed image (e.g., a reference image) of video sequence 202. The reconstructed image refers to the image that has been encoded and then decoded. Blocks determined during the search (e.g., referred to as prediction blocks) can then be used to predict the blocks being encoded to remove redundant information. Inter-frame prediction unit 206 can utilize temporal redundancy or scene content similarity between images in video sequence 202 to determine prediction blocks. For example, scene content between images in video sequence 202 can be similar, except for differences due to motion and / or affine transformations of screen content over time.
[0068] Intra-prediction unit 208 can perform intra-prediction by forming prediction blocks based on data from reconstructed neighboring samples of the block to be encoded within the same image of video sequence 202. Reconstructed samples refer to samples that have been encoded and then decoded. Intra-prediction unit 208 can utilize spatial redundancy or scene content similarity within the images of video sequence 202 to determine prediction blocks. For example, the texture of a region of scene content in an image can be similar to the texture of the immediately surrounding regions of that region of scene content in the same image.
[0069] Combiner 210 can determine the prediction error (e.g., referred to as the residual) based on the difference between the block being encoded and the predicted block. The prediction error can represent non-redundant information that can be sent / transmitted to the decoder for accurate decoding of the video sequence 202.
[0070] The transform and quantization unit (TR + Q) 214 can transform and quantize the prediction error. The transform and quantization unit 214 can transform the prediction error into transform coefficients by applying, for example, DCT, to reduce relevant information in the prediction error. The transform and quantization unit 214 can quantize the coefficients by mapping the data of the transform coefficients to a predefined set of representative values. The transform and quantization unit 214 can quantize the coefficients to reduce irrelevant information in the bitstream 204. Irrelevant information refers to information that can be removed from the coefficients and will not produce visible and / or perceptible distortion in the video sequence 202 after decoding (e.g., at the receiving device).
[0071] Entropy coding unit 218 can apply one or more entropy coding methods to the quantized transform coefficients to further reduce the bit rate. For example, entropy coding unit 218 can apply context-adaptive variable-length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), and / or syntax-based context-based binary arithmetic coding (SBAC). The entropy-coded coefficients can be packed to form bitstream 204.
[0072] The inverse transform and quantization unit (iTR + iQ) 216 can perform inverse quantization and inverse transform on the quantized transform coefficients to determine the reconstruction prediction error. The combiner 212 can combine the reconstruction prediction error with the prediction block to form a reconstructed block. The filter 220 can filter the reconstructed block, for example, using a deblocking filter, a sample adaptive offset (SAO) filter, a constrained orientation enhancement filter (CDEF), and / or a loop recovery (LR) filter. The buffer 222 can store the reconstructed block for use in predicting one or more other blocks in the same and / or different images of the video sequence 202.
[0073] The encoder 200 may also include an encoder control unit. The encoder control unit can be configured to control, for example... Figure 2 The encoder 200 shown includes one or more units. The encoder control unit can control these units such that the bitstream 204 can be generated in a manner conforming to one or more proprietary codec protocols, industry video codec standards, and / or any other video codec protocols. For example, the encoder control unit can control these units such that the bitstream 204 can be generated in a manner conforming to one or more of ITU-T H.263, AVC, HEVC, VVC, VP8, VP9, AV1, and / or any other video codec standards / formats.
[0074] The encoder control unit can be configured to attempt to minimize (or reduce) the bit rate of bitstream 204 and / or maximize (or improve) the reconstructed video quality (e.g., within the constraints of proprietary codec protocols, industry video codec standards, and / or any other video codec protocols). For example, the encoder control unit can be configured to attempt to minimize or reduce the bit rate of bitstream 204 such that the reconstructed video quality is not lower than a certain level / threshold, and / or to attempt to maximize or improve the reconstructed video quality such that the bit rate of bitstream 204 does not exceed a certain level / threshold. The encoder control unit can determine / control one or more of the following: dividing the image of video sequence 202 into blocks, whether the blocks are inter-frame predicted by inter-frame prediction unit 206 or intra-frame predicted by intra-frame prediction unit 208, motion vectors for inter-frame prediction of blocks, intra-frame prediction mode among multiple intra-frame prediction modes for intra-frame prediction of blocks, filtering performed by filter 220, and / or one or more transform types and / or quantization parameters applied by transform and quantization unit 214. The encoder control unit can determine / control one or more of the above based on the rate-distortion metric for the block or image being encoded. The encoder control unit can determine / control one or more of the above to reduce the rate-distortion metric for the block or image being encoded.
[0075] The prediction type (intra-frame prediction or inter-frame prediction), prediction information (intra-frame prediction mode, motion vectors, etc. in the case of intra-frame prediction), and / or transform and / or quantization parameters used for coding blocks can be sent to entropy coding unit 218 for further compression (e.g., to reduce the bit rate). For example, entropy coding unit 218 can apply context-adaptive variable-length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), syntax-based context-based binary arithmetic coding (SBAC), and / or symbol-by-symbol adaptive multi-symbol (non-binary) arithmetic coding to achieve further compression. The prediction type, prediction information, and / or transform and / or quantization parameters can be packaged together with the prediction error to form bitstream 204.
[0076] Encoder 200 is merely an example; different encoders and / or modified versions of encoder 200 may perform the methods and processes described herein. For example, encoder 200 may include other components and / or arrangements. Figure 2 One or more of the components shown may optionally be included in encoder 200 (e.g., entropy coding unit 218 and / or filter 220).
[0077] Figure 3 An example decoder is shown. (e.g.) Figure 3The decoder 300 shown can implement one or more of the processes described herein. Decoder 300 can decode bitstream 302 into a decoded video sequence 304 for display and / or some other form of consumption. Figure 1 The video encoding / decoding system 100 is implemented in and / or in computing, communication, or electronic devices (e.g., desktop computers, laptop computers, tablet computers, smartphones, wearable devices, televisions, cameras, video game consoles, set-top boxes, and / or video streaming devices). The decoder 300 may include an entropy decoding unit 306, an inverse transform and quantization (iTR + iQ) unit 308, a combiner 310, one or more filters 312, a buffer 314, an inter-frame prediction unit 316, and / or an intra-frame prediction unit 318.
[0078] Decoder 300 may include a decoder control unit configured to control one or more units of decoder 300. The decoder control unit can control the one or more units of decoder 300 such that bitstream 302 is decoded in a manner conforming to one or more proprietary codec protocols, industry video codec standards, and / or any other communication protocols. For example, the decoder control unit can control the one or more units of decoder 300 such that bitstream 302 is decoded in a manner conforming to one or more of ITU-T H.263, AVC, HEVC, VVC, VP8, VP9, AV1, and / or any other video codec standards / formats.
[0079] The decoder control unit can determine / control one or more of the following: whether the block is inter-predicted by the inter-frame prediction unit 316 or intra-frame prediction by the intra-frame prediction unit 318; the motion vector for the inter-frame prediction of the block; the intra-frame prediction mode among multiple intra-frame prediction modes for the intra-frame prediction of the block; the filtering performed by the filter 312; and / or one or more inverse transform types and / or inverse quantization parameters to be applied by the inverse transform and quantization unit 308. One or more of the control parameters used by the decoder control unit can be packed into the bitstream 302.
[0080] Entropy decoding unit 306 can perform entropy decoding on bitstream 302. For example, entropy decoding unit 306 can apply context-adaptive variable-length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), and syntax-based context-based binary arithmetic coding (SBAC) to decompress the prediction type (intra-frame prediction or inter-frame prediction) used to encode the block, the block's prediction information (intra-frame prediction mode, motion vectors, etc. if intra-frame prediction is used), and transform and quantization parameters. Inverse transform and quantization unit 308 can perform inverse quantization and / or inverse transform on the quantized transform coefficients to determine the decoding prediction error. Combiner 310 can combine the decoding prediction error with the prediction block to form the decoded block. The prediction block can be generated by intra-frame prediction unit 318 or inter-frame prediction unit 316 (e.g., as described above regarding...). Figure 2 (As described in encoder 200). Filter 312 may, for example, use a deblocking filter, a sample adaptive offset (SAO) filter, a constrained direction enhancement filter (CDEF), and / or a loop recovery (LR) filter to filter the decoded blocks. Buffer 314 may store the decoded blocks for prediction of one or more other blocks in the same and / or different images of the video sequence in bitstream 302. Figure 3 As shown, the decoded video sequence 304 can be output from filter 312.
[0081] Decoder 300 is merely an example; different decoders and / or modified versions of decoder 300 may perform the methods and processes described herein. For example, decoder 300 may have other components and / or arrangements. Figure 3 One or more of the components shown may optionally be included in decoder 300 (e.g., entropy decoding unit 306 and / or filter 312).
[0082] Although Figure 2 and Figure 3 Not shown, but each of encoder 200 and decoder 300 may include an intra-block copying unit in addition to the inter-frame prediction unit and intra-frame prediction unit. The intra-block copying unit may perform / operate similarly to the inter-frame prediction unit, but may predict blocks within the same image. For example, the intra-block copying unit may utilize repeating patterns appearing in the screen content. The screen content may contain computer-generated text, graphics, animations, etc.
[0083] Video encoding and / or decoding can be performed block-by-block. The process of dividing an image into blocks can be based on the image's content or adaptively. For example, larger block divisions can be used in regions of an image with a high level of homogeneity to improve coding efficiency.
[0084] An image (e.g., in HEVC or any other codec standard / format) can be divided into non-overlapping square blocks, which may be referred to as Code Tree Blocks (CTBs). A CTB may comprise samples of a sample array. A CTB may have a size of 2nx2n samples, where n can be specified by parameters of the coding system. For example, n can be 4, 5, 6, or any other value. A CTB can have any other size. A CTB can be further divided into Code Blocks (CBs) with half vertical and half horizontal dimensions by a recursive quadtree partition. A CTB can form the root of a quadtree. CBs that are not further partitioned as part of a recursive quadtree partition can be referred to as leaf CBs of the quadtree; otherwise, they can be referred to as non-leaf CBs of the quadtree. A CB can have a minimum size specified by parameters of the coding system. For example, a CB can have a minimum size of 4x4, 8x8, 16x16, 32x32, 64x64 samples, or any other minimum size. A CB can be further divided into one or more Prediction Blocks (PBs) for performing inter-frame prediction and / or intra-frame prediction. A PB can be a rectangular block of samples to which the same prediction type / pattern can be applied. A CB can also be further divided into intra-segment sub-partitions (ISPs), where reconstructed samples from each sub-partition can be used to generate predictions for the next sub-partition. For example, a CB can be divided into 2 to 4 sub-partitions. For transforms, a CB can be divided into one or more transform blocks (TBs). A TB can be a rectangular block of samples to which the size of the applied transform can be determined / indicated.
[0085] Figure 4 An example quadtree partitioning of CTB 400 is shown. Figure 5 It shows the relationship with Figure 4 The example quadtree partitioning of CTB 400 corresponds to the example quadtree 500. For example... Figure 4 and Figure 5 As shown in the example, CTB 400 can initially be divided into four leaf CBs, each with half a vertical dimension and half a horizontal dimension. Three of the leaf CBs resulting from the first-level division of CTB 400 are leaf CBs. These three leaf CBs from the first-level division of CTB 400 are... Figure 4 and Figure 5 The non-leaf CBs in the first-level division of CTB 400 are labeled 7, 8, and 9 respectively. The non-leaf CBs in the first-level division of CTB 400 are divided into four sub-CBs with half vertical and half horizontal dimensions. Three of the sub-CBs obtained from the second-level division of CTB 400 are leaf CBs. These three leaf CBs in the second-level division of CTB 400 are... Figure 4 and Figure 5 The CBs were labeled 0, 5, and 6 respectively. Finally, the non-leaf CBs of the second-level division of the CTB 400 were divided into four leaf CBs with half vertical and half horizontal dimensions. These four leaf CBs are... Figure 4 and Figure 5 The numbers are labeled 1, 2, 3, and 4 respectively.
[0086] Figure 4 The example CTB 400 is divided into 10 leaf CBs labeled 0-9, but it can be divided into other numbers of leaf CBs. These 10 leaf CBs can correspond to 10 CB leaf nodes (e.g., as shown in the example). Figure 5 The quadtree shown is 500 with 10 leaf nodes of the leaf CB. In other examples, the CTB can be divided into different numbers of leaf CBs. The resulting quadtree partition of the CTB 400 can be scanned using a z-scan (e.g., from left to right, from top to bottom) to form a sequence order for encoding / decoding the leaf nodes of the CBs. Figure 4 and Figure 5 The numeric label (e.g., indicator, index) of each CB leaf node can correspond to the sequence order used for encoding / decoding. For example, CB leaf node 0 can be encoded / decoded first, and CB leaf node 9 can be encoded / decoded last. Although in Figure 4 and Figure 5 Not shown, but each CB leaf node may include one or more PBs and / or TBs.
[0087] In VVC (or in any other codec standard / format), an image can be partitioned in a similar way (such as in HEVC). The image can first be partitioned into non-overlapping square CTBs. Then, a recursive quadtree partition can be used to divide the CTBs into CBs with half vertical and half horizontal dimensions. Quadtree leaf nodes (e.g., in VVC) can be further partitioned into CBs of varying sizes using binary or ternary tree partitions (or any other partitioning method).
[0088] Figure 6 Example binary tree partitioning and ternary tree partitioning are shown. Binary tree partitioning can divide the parent block in two along the vertical direction 602 or the horizontal direction 604. The resulting partition can be half the size of the parent block. In other examples, the resulting partition can correspond to a size smaller than and / or larger than half the size of the parent block. Ternary tree partitioning can divide the parent block into three parts along the vertical direction 606 or the horizontal direction 608. Figure 6 An example is shown below: In a ternary tree partition, the middle partition can be twice the size of the other two end partitions. In other examples, partitions can have other sizes relative to each other and relative to the parent block. Binary and ternary tree partitions are examples of multi-type tree partitions. Multi-type tree partitions can include partitioning the parent block into an additional number of smaller blocks. Due to the addition of binary and / or ternary tree partitions to quadtree partitions, a block partitioning strategy (e.g., in VVC) can be referred to as a combination of quadtree and multi-type tree partitions (quadritree + multi-type tree partition).
[0089] Figure 7A Examples of quadtree and multi-type tree partitioning combined with CTB 700A are shown. Figure 7B It shows the relationship with Figure 7A The example tree 700B shows a combination of quadtrees and multi-type tree partitioning of the CTB 700A. Figure 7A and Figure 7B In both cases, quadtree partitioning is shown with solid lines, and multi-type tree partitioning is shown with dashed lines. For ease of explanation, the CTB 700A is shown as having the same characteristics as... Figure 4 The quadtree partitioning described herein is the same as that of the CTB 400, and the description of quadtree partitioning for the CTB 700A, which is similar to that of the CTB 400, is omitted. The quadtree partitioning of the CTB 700A is merely an example, and the CTB can perform quadtree partitioning in a manner different from that of the CTB 700A. Additional multi-type tree partitioning of the CTB 700A can be performed relative to... Figure 4 The three leaves CB shown are processed. Figure 4 In Figure 7A The three leaf CBs shown as being further subdivided can be leaf CBs 5, 8, and 9. These three leaf CBs can be further subdivided using one or more binary and / or ternary tree partitions.
[0090] Figure 4 Leaf CB 5 can be partitioned into two CBs based on a vertical binary tree partition. The resulting two CBs can be in... Figure 7A and Figure 7B The leaves CB are marked as 5 and 6 respectively. Figure 4 Leaf CB 8 can be partitioned into three CBs based on a vertical ternary tree partition. Two of the resulting three CBs can be in... Figure 7A and Figure 7B The leaf branches (CBs) are labeled 9 and 14 respectively. The remaining non-leaf CBs can first be divided into two CBs based on horizontal binary tree partitioning. One of these two CBs can be the leaf CB labeled 10. The other of these two CBs can be further divided into three CBs based on vertical ternary tree partitioning. The resulting three CBs can be... Figure 7A and Figure 7B Leaves CB are labeled as 11, 12 and 13 respectively. Figure 4 Leaf CB 9 can be partitioned into three CBs based on a horizontal ternary tree partition. Two of these three CBs can be in... Figure 7A and Figure 7B The leaf CBs are labeled 15 and 19 respectively. The remaining non-leaf CBs can be partitioned into three CBs based on another horizontal ternary tree partition. All three resulting CBs can be in... Figure 7A and Figure 7BLeaves CB are labeled as 16, 17 and 18 respectively.
[0091] In summary, the CTB 700A can be divided into 20 leaf CBs, labeled 0-19. These 20 leaf CBs can correspond to 20 leaf nodes (e.g., Figure 7B The tree 700B shown has 20 leaf nodes. The resulting combination of quadtree and multi-type tree partitioning of the CTB 700A can be scanned using a z-scan (from left to right, from top to bottom) to form a sequence order for encoding / decoding the CB leaf nodes. Figure 7A and Figure 7B The numerical label of each CB leaf node can correspond to the sequence order used for encoding / decoding, where CB leaf node 0 is encoded / decoded first, and CB leaf node 19 is encoded / decoded last. Although in Figure 7A and Figure 7B Not shown, but it should be noted that each CB leaf node may include one or more PBs and / or TBs.
[0092] Encoding / decoding standards / formats (e.g., HEVC, VVC, or any other encoding / decoding standard / format) can define various units (e.g., in addition to specifying various blocks (e.g., CTB, CB, PB, TB)). A block can include a rectangular sample region in a sample array. A unit can include co-located sample blocks from different sample arrays forming an image (e.g., a luminance sample array and a chrominance sample array), along with the syntax elements and prediction data for these blocks. A coding tree unit (CTU) can include co-located CTBs from different sample arrays and can form a complete entity in the encoded bitstream. A coding unit (CU) can include co-located CBs from different sample arrays and the syntax structure for encoding and decoding samples of the CBs. A prediction unit (PU) can include co-located PBs from different sample arrays and the syntax elements for predicting the PBs. A transform unit (TU) can include TBs from different sample arrays and the syntax elements for transforming the TBs.
[0093] In some implementations of partitioning (e.g., AV1), an image can be divided into multiple coded blocks. The largest coded block, also called a superblock, has a size of 128x128 or 64x64. The superblock can be divided into smaller coded blocks, which can be done in nine partitioning modes. Figure 8Nine partitioning patterns are shown, of which only PARTITION_SPLIT allows recursive partitioning. Furthermore, PARTITION_VERT_4 and PARTITION_HORZ_4 patterns are not allowed for 8x8 or 128x128 coded blocks, and the T-shaped partitioning pattern is not allowed for 8x8 coded blocks. The minimum coded block size is 4x4. Intra-coded blocks and inter-coded blocks can be further divided into transform blocks, with a maximum partitioning depth of two levels.
[0094] A block can refer to any of CTB, CB, PB, TB, CTU, CU, PU, and / or TU (e.g., in the context of HEVC, VVC, or any other codec format / standard). A block can be used to refer to a similar data structure in the context of any video codec format / standard / protocol. For example, a block can refer to a macroblock in the AVC standard, a macroblock or subblock in the VP8 codec format, a superblock or subblock in the VP9 codec format, and / or a superblock or subblock (encoded block or transform block) in the AV1 codec format.
[0095] In intra-frame prediction, samples of the block to be encoded (e.g., also referred to as the current block) can be predicted based on samples in the sample rows directly adjacent to the current block. For example, a sample row might contain samples from the column directly adjacent to the leftmost column of the current block and samples from the row directly adjacent to the topmost row of the current block. Samples from the directly adjacent columns and rows can collectively be referred to as reference samples. Each sample of the current block can be predicted by projecting the position of that sample in the current block along a given direction onto a point along the reference sample (e.g., in intra-frame prediction mode). If the projection does not fall directly on the reference sample, the sample can be predicted by interpolating between the two nearest reference samples at the projection point. The prediction error (e.g., referred to as the residual) of the current block can be determined based on the difference between the predicted sample values of the current block and the original sample values.
[0096] Predicting samples and determining prediction errors based on the difference between the predicted samples and the original samples can be performed (e.g., at the encoder) for multiple different intra-prediction modes (e.g., including non-directional intra-prediction modes). The encoder can select one of the multiple intra-prediction modes and its corresponding prediction error to encode the current block. The encoder can send an indication of the selected prediction mode and its corresponding prediction error to the decoder for decoding the current block. The decoder can decode the current block by predicting samples of the current block using the intra-prediction mode indicated by the encoder, and / or by combining the predicted samples with the prediction error.
[0097] Figure 9A set of example reference samples 902 is shown, determined for intra-frame prediction of the current block 904. The current block 904 may correspond to a block being encoded and / or decoded. The current block 904 may correspond to, for example... Figure 7A The diagram shows block 3 of the CTB 700. As described herein, the numerical tags 0-19 of the divided CTB 700A blocks can correspond to the sequence order used for encoding / decoding the blocks, and can be... Figure 9 Use it as shown in the example.
[0098] In some embodiments, reference sample 902 may include sample rows directly adjacent to the current block 904, and samples from columns and rows directly adjacent to the current block 904. For example, sample rows may include reference samples to the left and / or above the current block 904. In some embodiments, reference sample 902 may be obtained (or selected) from reference rows in a multiple reference rows (MRL), which may include sample rows adjacent to the current block 904 as well as non-adjacent sample rows. The MRL may include reference rows identified by corresponding reference row indices, which indicate the i-th (i-th) sample row adjacent to the current block 904, such that row 0 indicates the reference row directly adjacent to (or closest to) the current block 904, and the i-th row with higher numbers indicates sample rows farther from the current block 904. The encoder may select reference rows from the MRL set and signal the MRL index in the bitstream to indicate the selected reference row. For example, the encoder may signal the codeword encoded by the MRL index. The decoder can decode the codewords to determine the MRL index, which identifies the specific reference line used in the intra-frame prediction of the current block 904.
[0099] For a current block 904 of size w x h samples, reference samples 902 may include: 2w samples (or any other number of samples) in the i-th row (e.g., indicated by the MRL index) adjacent to the topmost row of the current block 904, 2h samples (or any other number of samples) in the i-th column (e.g., adjacent to the leftmost column of the current block 904), and the top-left adjacent corner sample extending from the i-th column and i-th row relative to the current block 904. The current block 904 may be square, such that w = h = s. In other examples, the current block need not be square, such that w ≠ h. Available samples from neighboring blocks of the current block 904 may be used to construct the reference sample set 902. For example, samples may not be available to construct the reference sample set 902 if they are located outside the image of the current block, are part of a different stripe of the current block (e.g., if the concept of stripes is used), and / or belong to a block that has been inter-frame encoded and indicates constrained intra-frame prediction. For example, if constrained intra-prediction is indicated, intra-prediction may not depend on blocks of inter-prediction.
[0100] Samples that may not be suitable for constructing the reference sample 902 set may include samples from blocks that have not yet been encoded and reconstructed at the encoder and / or decoded at the decoder, based on the sequence order used for encoding / decoding. Restricting the inclusion of such samples in the reference sample 902 set allows for determining the same prediction at both the encoder and decoder. Figure 9 In the example, samples from adjacent blocks 0, 1, 2, and 8 can be used to construct reference sample 902 because these blocks are encoded and reconstructed at the encoder and decoded at the decoder before the encoding and decoding of the current block 904. For example, if there are no other issues preventing the availability of samples from adjacent blocks 0, 1, 2, and 8 (e.g., as described above), samples from adjacent blocks 0, 1, 2, and 8 can be used to construct reference sample 902. Due to the sequence order used for encoding / decoding, the portion of reference sample 902 from adjacent block 6 may not be available (e.g., because block 6 may not have been encoded and reconstructed at the encoder and / or decoded at the decoder based on the sequence order used for encoding / decoding).
[0101] In some examples, unavailable samples in reference sample 902 can be filled with one or more available reference samples 902. For example, unavailable reference samples can be filled with the nearest available reference sample. The nearest available reference sample can be determined by moving clockwise through reference sample 902 starting from the position of the unavailable reference. For example, if no reference sample is available, reference sample 902 can be filled with the median value of the dynamic range of the image being encoded / decoded.
[0102] Samples of the current block 904 can be intra-frame predicted based on reference sample 902, for example, based on (e.g., after) the determination and (optionally) filtering of reference sample 902. In some examples, a filtering scheme (e.g., a filtering algorithm) can be applied to reference sample 902 to improve prediction accuracy. The filtering scheme can be one of several filter types, including at least: a smoothing filter (or a reference sample smoothing filter) or an interpolation filter. In some examples, if the reference sample of a given block is to be filtered, only one of several filter types is selected (e.g., activated) to be applied to the reference sample. For example, if a smoothing filter is selected (e.g., activated), an interpolation filter is not selected (e.g., disabled), and vice versa.
[0103] Many encoders / decoders can support multiple intra-frame prediction modes according to one or more video codec standards. For example, HEVC supports 35 intra-frame prediction modes, including planar mode, DC mode, and 33 angular modes. VVC supports 67 intra-frame prediction modes, including planar mode, DC mode, and 65 angular modes. Planar and DC modes can be used to predict smooth and gradually changing regions of an image. Angular modes can be used to predict directional structures within regions of an image. Any number of intra-frame prediction modes can be supported.
[0104] Figure 10A -B shows an example intra-frame prediction mode. Figure 10A This illustrates 35 intra-frame prediction modes supported by HEVC. These 35 intra-frame prediction modes can be indicated / identified by indices 0 to 34. Prediction mode 0 can correspond to planar mode. Prediction mode 1 can correspond to DC mode. Prediction modes 2-34 can correspond to angular modes. Prediction modes 2-18 can be called horizontal prediction modes because the main source of prediction is in the horizontal direction. Prediction modes 19-34 can be called vertical prediction modes because the main source of prediction is in the vertical direction.
[0105] Figure 10B This illustrates 67 intra-frame prediction modes supported by VVC. These 67 intra-frame prediction modes can be indicated / identified by indices 0 to 66. Prediction mode 0 can correspond to planar mode. Prediction mode 1 corresponds to DC mode. Prediction modes 2-66 can correspond to angular modes. Prediction modes 2-34 can be called horizontal prediction modes because the main source of prediction is in the horizontal direction. Prediction modes 35-66 can be called vertical prediction modes because the main source of prediction is in the vertical direction. Since blocks in VVC do not have to be square, Figure 10B Some of the intra-prediction modes shown can be adaptively replaced in the wide-angle direction.
[0106] In some implementations of intra-frame prediction modes (e.g., those supported by AV1), angle modes can be defined by specifying a set of nominal modes, and a set of angle increment offsets can be defined around each nominal mode. For example, there could be eight nominal angle prediction modes, each with a set of angle increment offsets indexed between -3 and +3, where the nominal angle is at 0. Figure 10CEight nominal modes (shown as solid arrows) and a set of angular increment offsets (shown as dotted arrows) around the nominal angle D67_PRED are shown. The predicted angle can be derived by adding the offset to the associated nominal angle. Therefore, there are 56 angular modes in AV1. Note that for small blocks, such as 4x4, 4x8, and 8x4, only the nominal angular modes are applied. In addition to the 56 angular modes, there are five non-angular intra-prediction modes in AV1, including the DC_PRED mode (averaging samples from reconstructed neighboring blocks), the SMOOTH_V and SMOOTH_H modes (using quadratic interpolation in the vertical and horizontal directions, respectively), the SMOOTH mode (averaging the quadratic interpolation results in both directions), and the Paeth mode (predicting a sample based on reference samples above, to the left, and to the upper left of each sample). Recursive intra-prediction modes can also be used, where the coded block is divided into sub-blocks, and each intra-predicted sub-block can be used to intra-predict the next sub-block.
[0107] Figure 11 Showing from Figure 9 The current block 904 and the corresponding reference sample 902. To further describe how the intra-frame prediction mode is applied to determine the prediction of the current block 904 (e.g., the prediction block). Figure 11 The current block 904 and a reference sample 902 from a reference row in the set of multiple reference rows (MRLs) 908-912 are shown in a two-dimensional x, y plane, where the sample can be represented as... To simplify the prediction process, reference sample 902 can be placed in two one-dimensional arrays. Reference rows belonging to the MRL908-912 set... The reference sample 902 above the current block 904 can be placed in a one-dimensional array. middle:
[0108] Reference row l、 The reference sample 902 to the left of the current block 904 can be placed in a one-dimensional array. middle:
[0109] variable l This indicates how many lines the selected reference line is from the current block. For example, if reference line #0908 is selected, then... l It is set to 1 to indicate the reference line adjacent to the current block 904. For example, if reference line #1 910 is selected, then l It is set to 2. For example, if reference line #2 912 is selected, then l It was set to 3.
[0110] In some examples, if the MRL is not activated or not selected, reference sample 902 can come from reference line #0 908 immediately adjacent to the current block 904. In this example, the variables in equations (1) and (2) l It is set to 1.
[0111] The prediction process may include determining the prediction sample. (For example, a predicted value), the location of the predicted sample within the current block 904. For planar mode, the position in the current block 904 can be predicted by determining / calculating the mean of two interpolated values. The sample at that location. The first of the two interpolated values can be based on the position in the current block 904. The horizontal linear interpolation at that location. The second of the two interpolated values can be based on the position in the current block 904. Vertical linear interpolation at the current location. Predicted samples in current block 904. It can be determined / calculated as:
[0112] in
[0113] It can be the position in the current block 904. Horizontal linear interpolation at the location, and
[0114] It can be the position in the current block 904. Vertical linear interpolation at the location. It can be equal to the length of the edge of the current block 904 (e.g., the number of samples on the edge).
[0115] For DC mode, the position in the current block 904 can be predicted by referring to the mean of sample 902. The sample at this location. The predicted sample in the current block 904. It can be determined / calculated as:
[0116] For angle mode, the position in the current block 904 The sample at that location can be obtained by taking the location Prediction is made by projecting along the direction specified by the given angle pattern onto points on either the horizontal or vertical sample rows, including the reference sample 902. If the projection does not fall directly on the reference sample, the position can be predicted by interpolating between the two nearest reference samples of the projected point. For samples at a given location. For vertical prediction modes (e.g., modes 19-34 in HEVC and modes 35-66 in VVC), the direction specified by the angle mode can be given by an angle φ defined relative to the y-axis. For horizontal prediction modes (e.g., modes 2-18 in HEVC and modes 2-34 in VVC), the direction specified by the angle mode can be given by an angle φ defined relative to the x-axis.
[0117] Figure 12 An example is shown of applying an intra-frame prediction mode (e.g., an angle mode such as vertical prediction mode 906) to predict the current block 904. Figure 12 Specifically, it shows the position in the current block 904 for vertical prediction mode 906. The prediction of the sample at that location. Vertical prediction mode 906 can be given by the angle φ relative to the vertical axis. In vertical prediction mode, the position in the current block 904... It can be projected onto the reference sample Points on the horizontal row (e.g., referred to as projection points). For ease of illustration, reference sample 902 is shown in... Figure 12 Only a portion is shown, and it is shown as the reference row with reference row index 0. For example... Figure 9 As explained in the text, reference sample 902 can come from another reference row in the MRL set. For example... Figure 12 As shown, reference sample The projection point on the horizontal row may not lie exactly on the reference sample. For example, if the projection point falls at the fractional sample position between two reference samples, the predicted sample in the current block 904 can be determined / calculated by performing linear interpolation between the two reference samples. Predicted samples It can be determined / calculated as:
[0118] It can be the projection point relative to the position The integer part of the horizontal displacement. The function that can be determined / calculated as the tangent of the angle φ of the vertical prediction pattern 906 is as follows:
[0119] It can be the projection point relative to the position The fractional part of the horizontal displacement, which can be determined / calculated as:
[0120] in It is a function for rounding down integers.
[0121] For the horizontal prediction mode, the position [x][y] of the sample in the current block 904 can be projected onto the reference sample. On the vertical rows. Prediction samples for the horizontal prediction pattern. It can be determined / calculated as:
[0122] It can be the projection point relative to the position The integer part of the vertical displacement. The function that can be determined / calculated as the tangent of the angle φ of the horizontal prediction pattern is as follows:
[0123] It can be the projection point relative to the position The fractional part of the vertical displacement. It can be determined / calculated as:
[0124] in It is a function for rounding down integers.
[0125] The interpolation functions given by equations (7) and (10) can be derived from the encoder and / or decoder (e.g., Figure 2 encoder 200 and / or Figure 3 The decoder (300) in the code is used for implementation. The interpolation function can be implemented using a finite impulse response (FIR) filter. For example, the interpolation function can be implemented as a set of two-tap FIR filters. The coefficients of the two-tap FIR filters can be respectively derived from (1- )and Given. In intra-frame angular prediction, the predicted samples... It can be calculated at a predefined level of sample precision (e.g., 1 / 32 sample precision, or precision defined by any other metric). For 1 / 32 sample precision, the set of two-tap FIR interpolation filters can include up to 32 different two-tap FIR interpolation filters—projection-shifted. Each of the 32 possible values for the fractional part corresponds to one. In other examples, different levels of sample precision can be used.
[0126] In some examples, FIR filters can be used to predict chroma and / or luminance samples. For instance, a two-tap interpolation FIR filter can be used to predict chroma samples, and the same and / or different interpolation techniques / filters can be used for luminance samples. For example, a four-tap FIR filter can be used to determine the predicted values for luminance samples. The coefficients of a four-tap FIR filter can be based on... To determine (e.g., similar to a two-tap FIR filter). For 1 / 32 sample accuracy, a set of 32 different four-tap FIR filters can include up to 32 different four-tap FIR filters—projection-shifted. Each of the 32 possible values for the fractional part corresponds to one. In other examples, different levels of sample precision can be used. The set of four-tap FIR filters can be stored in a lookup table (LUT) and based on... Cited. For vertical prediction patterns, prediction samples It can be determined based on a four-tap FIR filter as follows:
[0127] in fT [ i ], i = 0...3, can be filter coefficients, and It is an integer displacement. For horizontal prediction modes, the predicted samples... It can be determined based on a four-tap FIR filter as follows:
[0128] If the position of the sample to be predicted in the current block 904 Projected onto a negative x-coordinate, supplementary reference samples can be determined / constructed. For example, if a negative vertical prediction angle φ is used, the position of the sample... It can be projected onto a negative x-coordinate. The vertical row of reference sample 902 can be projected using a negative vertical prediction angle φ. The reference sample in block 904 is projected onto the horizontal row of reference sample 902 to determine / construct supplementary reference samples. For example, if the position of the sample to be predicted in the current block 904 is... Projected onto a negative y-coordinate, supplementary reference samples can be similarly determined / constructed. For example, if a negative horizontal prediction angle φ is used, the position of the sample... It can be projected onto a negative y-coordinate. The horizontal row of reference sample 902 can be projected using a negative horizontal prediction angle φ. The reference sample in the image is projected onto the vertical row of reference sample 902 to determine / construct supplementary reference samples.
[0129] The encoder can determine / predict samples of the current block being encoded (e.g., current block 904) for multiple intra prediction modes (e.g., using one or more of the functions described herein). For example, the encoder can determine / predict samples of the current block for each of the 35 intra prediction modes in HEVC and / or the 67 intra prediction modes in VVC and / or extended intra prediction modes from WAIP that include rectangular blocks. For each applied intra prediction mode, the encoder can determine the corresponding prediction error of the current block based on the difference (e.g., sum of squared differences (SSD), sum of absolute differences (SAD), or sum of absolute transform differences (SATD)) between the predicted samples generated from reference samples 902 from the reference row (e.g., from the set of MRLs) determined for that intra prediction mode and the original samples of the current block. Based on the determined prediction error, the encoder can determine / select one of the intra prediction modes to encode the current block. For example, the encoder can determine / select the intra prediction mode that results in the smallest prediction error for the current block. In some examples, the encoder may determine / select an intra-prediction mode and associated reference line to encode the current block based on a rate-distortion metric (e.g., Lagrange rate-distortion cost) determined using the prediction error. The encoder may signal the determined / selected intra-prediction mode and associated MRL index (which may indicate the reference line index) to the decoder in the bitstream for decoding the current block. The encoder may also signal the corresponding prediction error (e.g., residual) of the intra-prediction mode to the decoder in the bitstream.
[0130] The decoder can determine / predict samples for the current block being decoded (e.g., current block 904) for an intra-prediction mode. For example, the decoder can receive an indication of a reference line (e.g., a reference line index or an MRL index associated with the reference line index) and an intra-prediction mode (e.g., an angular intra-prediction mode) from the encoder for the current block. The decoder can retrieve a set of reference samples and perform intra-prediction based on the MRL index indicated by the encoder for the current block and the intra-prediction mode, in a similar manner (e.g., as described above for the encoder). For example, the decoder can obtain reference samples from reference lines indicated / identified by the decoded MRL index. In some examples, when the MRL is not enabled / activated / selected, the reference line has a reference line index of 0 and is immediately adjacent to the current block. In these examples, the indication of the MRL index is not signaled.
[0131] The decoder can reconstruct the current block by adding the predicted values of the samples of the current block (e.g., determined based on the intra-prediction mode) to the residual of the current block. In some examples, the decoder does not need an indication of the intra-prediction mode received from the encoder for the current block. Instead, the decoder can determine the intra-prediction mode using other decoding-end means (e.g., by applying template-based intra-mode derivation (TIMD) tools / techniques).
[0132] While the various examples in this paper correspond to intra-prediction modes in HEVC and VVC, the methods, devices and systems described herein can be applied to / used for other intra-prediction modes (e.g., those used in other video codec standards / formats, such as VP8, VP9, AV1, etc.).
[0133] Intra-frame prediction can perform video compression by leveraging the correlation between spatially adjacent samples in the same image of a video sequence. Inter-frame prediction is another encoding / decoding tool that can be used to perform video compression. Inter-frame prediction can leverage the temporal correlation between sample blocks in different images of a video sequence. For example, an object can be seen in multiple images of a video sequence. The object may move (e.g., by some translation and / or affine motion) or remain stationary in the multiple images. The current sample block in the current image being encoded may have / belong to a corresponding sample block in a previously decoded image. This corresponding sample block can accurately predict the current sample block. For example, the corresponding sample block may be displaced relative to the current sample block due to the movement of an object represented in both blocks between the respective images of the blocks. The previously decoded image can be a reference image. The corresponding sample block in the reference image can be a reference block for motion compensation prediction. The encoder can use block matching techniques to estimate the displacement (or motion) of the object and / or determine the reference block in the reference image.
[0134] Similar to intra-frame prediction, the encoder can determine the difference between the current block and the prediction for the current block. For example, the encoder can determine the difference based on / after determining / generating the prediction for the current block (e.g., using inter-frame prediction). This difference can be a prediction error (e.g., a residual). The encoder can store and / or transmit (e.g., signal) the prediction error and / or other relevant prediction information in / via the bitstream. The prediction error and / or other relevant prediction information can be used for decoding and / or other forms of use. The decoder can decode the current block by predicting samples of the current block (e.g., by using relevant prediction information) and combining the predicted samples with the prediction error.
[0135] Figure 13A An example of inter-frame prediction is shown. Inter-frame prediction can be performed for the current block 1300 in the current image 1302 being encoded. The encoder (e.g., such as...) Figure 2The encoder 200 shown can perform inter-frame prediction to determine and / or generate a reference block 1304 in a reference image 1306. Reference block 1304 can be used to predict the current block 1300. The reference image (e.g., reference image 1306) can be a previously decoded image available at the encoder and / or decoder. The availability of the previously decoded image can depend on / based on whether the previously decoded image is available in the decoded image buffer at the moment the current block 1300 is being encoded and / or decoded. The encoder can search for blocks (e.g., candidate reference blocks) in the one or more reference images 1306 that are similar (or substantially similar) to the current block 1300. The encoder can determine the best-matching block from the blocks (e.g., candidate reference blocks) tested during the search process. The best-matching block can be reference block 1304. The encoder can determine that reference block 1304 is the best-matching reference block based on one or more cost criteria. The one or more cost criteria can include rate-distortion criteria (e.g., Lagrange rate-distortion cost). The one or more cost criteria may be based on the difference between the predicted sample of reference block 1304 and the original sample of the current block 1300 (e.g., SSD, SAD and / or SATD).
[0136] The encoder can search for reference block 1304 within a reference region (e.g., search range 1308). The reference region (e.g., search range 1308) can be located around a co-located block (or position) 1310 of the current block 1300 in reference image 1306. Co-located block 1310 can have the same position in reference image 1306 as the current block 1300 in current image 1302. The reference region (e.g., search range 1308) can extend at least partially beyond reference image 1306. For example, if the reference region (e.g., search range 1308) extends beyond reference image 1306, constant boundary extension can be used. Constant boundary extension can be used such that the values of samples in rows or columns of reference image 1306 immediately adjacent to the portion of the reference region (e.g., search range 1308) extending beyond reference image 1306 can be used for sample positions outside reference image 1306. A subset or all potential locations can be searched within a reference region (e.g., search range 1308) to find reference block 1304. The encoder can utilize one or more search implementations to determine and / or generate reference block 1304. For example, the encoder can determine a set of candidate search locations based on motion information (e.g., motion vector 1312) of neighboring blocks of the current block 1300.
[0137] During inter-frame prediction, the encoder may search for one or more reference images to determine and / or generate the best-matching reference block. The reference images searched by the encoder may be included (e.g., added to) one or more reference image lists. For example, in HEVC and VVC (and / or in one or more other communication protocols), two reference image lists (e.g., reference image list 0 and reference image list 1) may be used. A reference image list may contain one or more images. The reference image 1306 of reference block 1304 may be indicated by a reference index pointing to a reference image list that includes reference image 1306. Reference frames may contain different types of frames. For example, in some implementations (e.g., such as in AV1), up to seven frames may be used as reference frames, and four types of frames exist, including LAST frames (frames displayed in the near past), BWD frames (frames to be displayed in the future), GOLDEN frames (frames displayed in the far past), and ARF frames (frames from the past or future).
[0138] Figure 13B An example motion vector is shown. The displacement between reference block 1304 and current block 1300 can be interpreted as an estimate of the motion between reference block 1304 and current block 1300 across their respective images. This displacement can be represented by motion vector 1312. For example, motion vector 1312 can be indicated by a horizontal component (MVx) and a vertical component (MVy) relative to the position of current block 1300. The motion vector (e.g., motion vector 1312) can have fractional or integer resolution. A motion vector with fractional resolution can be pointed between two samples in the reference image to provide a better estimate of the motion of current block 1300. For example, the motion vector can have a fractional sample resolution of 1 / 2, 1 / 4, 1 / 8, 1 / 16, 1 / 32, or any other fractional sample resolution. For example, if the motion vector points to a non-integer sample value in the reference image, interpolation between two samples at integer positions can be used to generate the reference block and its corresponding sample at the fractional position. Interpolation can be performed by a filter with two or more taps.
[0139] The encoder can determine the difference (e.g., corresponding per-sample difference) between reference block 1304 and current block 1300. For example, the encoder can determine the difference between reference block 1304 and current block 1300 based on / after determining and / or generating reference block 1304 for current block 1300 using inter-frame prediction. This difference can be a prediction error (e.g., residual). The encoder can store and / or transmit (e.g., signal) the prediction error and / or associated motion information in / via the bitstream. The prediction error and / or associated motion information can be used for decoding (e.g., decoding current block 1300) and / or other forms of use. Motion information can include motion vector 1312 and reference indicator / index. The reference indicator can indicate reference image 1306 in a list of reference images. In other examples, motion information can include an indication of motion vector 1312 and / or an indication of reference indicator / index. The reference indicator can indicate reference image 1306 in a list of reference images that includes reference image 1306. The decoder can decode the current block 1300 by determining and / or generating a reference block 1304, which may correspond to / form (e.g., be considered as) a prediction of the current block 1300. For example, the decoder can determine and / or generate the reference block 1304 based on relevant motion information. The decoder can decode the current block 1300 by combining the prediction (e.g., the reference block) with the prediction error (e.g., the residual block).
[0140] like Figure 13A As shown, inter-frame prediction can be performed using a reference image 1306 as the source of prediction for the current block 1300. Inter-frame prediction based on predictions made for the current block using a single image can be referred to as unidirectional prediction or single-reference inter-frame prediction.
[0141] Inter-frame prediction of the current block using bidirectional or composite prediction can be based on two images (e.g., the source of the prediction can be from said two images). For example, bidirectional prediction can be useful if the video sequence includes fast motion, camera panning, zooming, and / or scene changes. Bidirectional prediction can also help capture a fade-out of a scene or a fade-out from one scene to another, where the two images can be effectively displayed simultaneously at different intensity levels.
[0142] One or both of unidirectional and bidirectional prediction can be used / used to perform inter-frame prediction (e.g., at the encoder and / or at the decoder). Performing a particular type of inter-frame prediction (e.g., unidirectional prediction / single-reference prediction and / or bidirectional prediction / composite prediction) can depend on the stripe type of the current block. For example, for a P-strip, only unidirectional prediction can be used / used to perform inter-frame prediction. For a B-strip, either unidirectional or bidirectional prediction can be used / used to perform inter-frame prediction. For example, if the encoder is using unidirectional prediction, the encoder can determine and / or generate a reference block from reference image list 0 for predicting the current block. For example, if the encoder is using bidirectional prediction, the encoder can determine and / or generate a first reference block from reference image list 0 for predicting the current block, and determine and / or generate a second reference block from reference image list 1 for predicting the current block.
[0143] Figure 14 An example of bidirectional / composite prediction is shown. Two reference blocks 1402 and 1404 can be used to predict the current block 1400. For example, reference block 1402 can be in the reference image of either reference image list 0 or reference image list 1. Reference block 1404 can be in the reference image of the other one of reference image list 0 or reference image list 1. Figure 14 As shown, reference block 1402 may be in a first image (e.g., temporally) preceding the current image of current block 1400, and reference block 1404 may be in a second image (e.g., temporally) following the current image of current block 1400. The first image may precede the current image in terms of image order count (POC) or display order. The second image may follow the current image in terms of POC or display order. In other examples, reference images may both precede or both follow the current image in terms of POC or display order. A POC may be / indicate the order in which images are output (e.g., output from a decoded image buffer). A POC may be / indicate the order in which images are generally intended to be displayed. The output images are not necessarily displayed, but may undergo different processing and / or use (e.g., transcoding). Two reference blocks determined and / or generated using / for bidirectional prediction may correspond to (e.g., be included in) the same reference image. For example, if two reference blocks correspond to the same reference image, that reference image may be included in both reference image list 0 and reference image list 1.
[0144] Configurable weights and / or offset values can be applied to one or more inter-frame prediction reference blocks. The encoder can enable the use of weighted prediction using flags in a Picture Parameter Set (PPS) or a similar level of parameter set. The encoder can send / signal the weights and / or offset parameters in the strip segment header for the current block 1400. Different weights and / or offset parameters can be sent / signaled for the luma and / or chroma components.
[0145] The encoder can use inter-frame prediction to determine and / or generate reference blocks 1402 and 1404 for the current block 1400. The encoder can determine the differences between the current block 1400 and each of the reference blocks 1402 and 1404. These differences can be prediction errors or residuals. The encoder can store and / or transmit / signal the prediction errors and / or their respective associated motion information in / via the bitstream. The prediction errors and their respective associated motion information can be used for decoding and / or other forms of use.
[0146] The motion information of reference block 1402 may include motion vector 1406 and / or reference indicator / index. The reference indicator may indicate a reference image of reference block 1402 in a list of reference images. In some examples, the motion information of reference block 1402 may include an indication of motion vector 1406 and / or an indication of a reference index. The reference index may indicate a reference image of reference block 1402 in a list of reference images.
[0147] The motion information of reference block 1404 may include motion vector 1408 and / or reference index / indicator. The reference indicator may indicate a reference image of reference block 1404 in a list of reference images. The motion information of reference block 1404 may include an indication of motion vector 1408 and / or an indication of reference index. The reference index may indicate a reference image of reference block 1404 in a list of reference images.
[0148] The decoder can decode the current block 1400 by determining and / or generating reference blocks 1402 and 1404. For example, the decoder can determine and / or generate reference blocks 1402 and 1404 based on their respective associated motion information. Reference blocks 1402 and 1404 can correspond to / form (e.g., be considered as) predictions of the current block 1400 (e.g., used to generate prediction blocks). The decoder can decode the current block 1400 based on combining the predictions with prediction errors.
[0149] For example, motion information can be predictively encoded / decoded before it is stored and / or transmitted / signaled in / via the bitstream (e.g., in HEVC, VVC, and / or other video codec standards / formats / protocols). The motion information of the current block can be predictively encoded / decoded based on the motion information of one or more blocks adjacent to the current block. The motion information of adjacent blocks can often be correlated with the motion information of the current block because the motion of objects represented in the current block is often the same (or similar) to the motion of objects in adjacent blocks. Motion information prediction techniques (such as those in HEVC and VVC) can include Advanced Motion Vector Prediction (AMVP) and / or inter-frame prediction block merging (e.g., merge mode).
[0150] Encoder (e.g., such as) Figure 2 The encoder 200 shown can encode and decode motion vectors. The encoder can encode and decode a motion vector (e.g., using an AMVP) into the difference between the motion vector of the current block being encoded and the motion vector predictor (MVP). The encoder can determine / select an MVP from a list of candidate MVPs. A candidate MVP can be a previously decoded motion vector corresponding to an adjacent block in the current image of the current block, and / or a block at or near the co-location of the current block in another reference image. The encoder and / or decoder can generate and / or determine lists of candidate MVPs corresponding to each other.
[0151] The encoder can determine / select an MVP from a list of candidate MVPs. The encoder can then indicate the selected MVP and / or motion vector difference (MVD) in the bitstream / via the bitstream / by signaling. The encoder can indicate the selected MVP in the bitstream using an index / indicator. The index can indicate the MVP selected from the list of candidate MVPs. The MVD can be determined / calculated based on the difference between the motion vector of the current block and the selected MVP. For example, for a motion vector indicating the position relative to the current block being encoded (e.g., including a horizontal component (MVx) and a vertical component (MVy)), the MVD can consist of two components. and express. and It can be determined / calculated as:
[0152] MVDx and MVDy can represent the horizontal and vertical components of MVD, respectively. MVPx and MVPy can represent the horizontal and vertical components of MVP, respectively.
[0153] Decoder (e.g., such as) Figure 3 The decoder 300 shown can decode motion vectors by adding the MVD to the MVP indicated in / via the bitstream. The decoder can decode the current block by determining and / or generating a reference block. The decoder can determine and / or generate the reference block, for example, based on the decoded motion vectors. The reference block can correspond to / form (e.g., be considered) a prediction (e.g., a prediction block) of the current block. The decoder can decode the current block by combining the prediction with the prediction error.
[0154] The candidate MVP list used for AMVP (e.g., in HEVC, VVC, and / or one or more other communication protocols) may include two or more candidates (e.g., candidates A and B). Candidates A and B may include: at most two (or any other number) spatial candidate MVPs determined / derived from five (or any other number) spatially adjacent blocks of the current block being encoded / decoded; one (or any other number) temporal candidate MVP determined / derived from two (or any other number) temporally co-located blocks (e.g., if both spatial candidate MVPs are unavailable or identical); and / or a zero motion vector candidate MVP (e.g., if one or both of the spatial or temporal candidate MVPs are unavailable). Other numbers of spatial candidate MVPs, spatially adjacent blocks, temporal candidate MVPs, and / or temporally co-located blocks may be used in the candidate MVP list.
[0155] Figure 15A Example spatial candidate neighbor blocks of the current block are shown. For example, five (or any other number) spatial candidate neighbor blocks may be located relative to the current block 1500 being encoded. The five spatial candidate neighbor blocks may be A0, A1, B0, B1, and B2. Figure 15B The temporal co-location blocks of the current block are shown. For example, two (or any other number) temporal co-location blocks may be positioned relative to the current block 1500 being encoded or decoded. The two temporal co-location blocks may be C0 and C1. The two temporal co-location blocks may be in one or more reference images that may be different from the current image of the current block 1500.
[0156] Encoder (e.g., such as) Figure 2The encoder 200 shown can encode and decode motion vectors using inter-frame prediction block merging (e.g., merging mode). For example, the encoder (e.g., using merging mode) can reuse the same motion information from neighboring blocks (e.g., one of neighboring blocks A0, A1, B0, B1, and B2) for the inter-frame prediction of the current block. For example, the encoder (e.g., using merging mode) can reuse the same motion information from temporally co-located blocks (e.g., one of temporally co-located blocks C0 and C1) for the inter-frame prediction of the current block. Since the same motion information as the motion information of neighboring blocks or temporally co-located blocks can be used for the current block (e.g., at the encoder and / or decoder), it is not necessary to send (e.g., indicate, signal) MVD for the current block. Since it is not necessary to indicate MVD for the current block, the signaling overhead for sending / signaling motion information for the current block can be reduced. The encoder and / or decoder can (e.g., in a manner similar to AMVP) generate a candidate list of motion information from neighboring blocks or temporally co-located blocks of the current block on an equal footing. The encoder can determine motion information from a neighboring block or a temporally co-located block in a candidate list, using (e.g., inheriting) it, to predict the motion information of the current block being encoded / decoded. The encoder can signal / send an indication of the determined motion information from the candidate list within / via the bitstream. For example, the encoder can signal / send an indicator / index. This index can indicate the determined motion information from the candidate motion information list. The encoder can signal / send the index to indicate the determined motion information.
[0157] The list of candidate motion information used for merging modes (e.g., in HEVC, VVC, or any other codec format / standard / protocol) may include: from five (or any other number) spatially adjacent blocks (e.g., such as...). Figure 15A (As shown) Derive / determine at most four (or any other number) spatial merge candidates; from two (or any other number) temporally co-located blocks (e.g., as shown) Figure 15B (As shown) One (or any other number) temporal merge candidate derived; and / or additional merge candidates including bidirectional prediction candidates and zero motion vector candidates. In some examples, the spatial neighbor blocks and temporal co-occurrence blocks used for the merge mode can be the same as those used for AMVP.
[0158] In some examples (e.g., AV1), a derived MV prediction sublist can be generated by aggregating spatial and temporal MV candidates and ranking them based on a weight determined by evaluating each candidate. Up to four candidates can be added to the MV prediction sublist, which can also be referred to as a Dynamic Reference List (DRL). The DRL can be used for dynamic MV prediction patterns.
[0159] Inter-frame prediction can be performed in ways and variations other than those described herein. For example, motion information prediction techniques other than AMVP and merge mode can be used. While the various examples herein correspond to inter-frame prediction modes such as those used in HEVC and VVC or AV1, the methods, apparatus, and systems described herein can be applied to / used for other inter-frame prediction modes (e.g., inter-frame prediction modes for other video codec standards / formats such as VP8, VP9, etc.). History-based motion vector prediction (HMVP), combined intra / inter-frame prediction mode (CIIP) or composite inter-intra-frame prediction, warped motion compensation, overlap block motion compensation (OBMC), and / or merge mode with motion vector difference (MMVD) (e.g., as described in VVC) can be performed / used and are within the scope of this disclosure.
[0160] Block matching operations (or techniques) can be applied / used (e.g., in inter-frame prediction) to determine reference blocks in images different from the current block being encoded / decoded (e.g., encoded and / or decoded). Block matching operations can also be applied / used to determine reference blocks in the same image as the current block being encoded / decoded. Reference blocks determined using block matching in the same image as the current block may often fail to accurately predict the current block (e.g., for camera-captured video). For example, the prediction accuracy of screen content video may not be similarly affected if reference blocks in the same image as the current block are used for encoding. Screen content video can include, for example, computer-generated text, graphics, animations, etc. Screen content video may include (e.g., may typically include) repeating patterns (e.g., repeating patterns of text and / or graphics) within the same image. Using reference blocks in the same image as the current block being encoded (e.g., as determined using block matching) can provide efficient compression for screen content video.
[0161] Prediction techniques (e.g., in HEVC, VVC, AV1, and / or any other codec standard / format / protocol) can be used to leverage the correlation between sample blocks within the same image (e.g., screen content video). The prediction technique can be intra-frame block copying (IBC or IntraBC) or current image reference (CPR). The encoder can apply / use block matching techniques (e.g., similar to inter-frame prediction) to determine displacement vectors (e.g., block vectors (BV)). The BV can indicate the relative position of a reference block that best matches the current block (e.g., predicted according to intra-frame block compensation) relative to the current block. For example, the relative position of the reference block could be the relative position of the top-left corner (or any other point / sample) of the reference block. The BV can indicate the relative displacement from the current block to the reference block that best matches the current block. The encoder can determine the best-matching reference block from blocks tested during the search process (e.g., in a manner similar to that used for inter-frame prediction). The encoder can determine that a reference block is the best-matching reference block based on one or more cost criteria. The one or more cost criteria can include rate-distortion criteria (e.g., Lagrange rate-distortion cost). The one or more cost criteria may be based, for example, on one or more differences between the predicted samples of the reference block and the original samples of the current block (e.g., SSD, SAD, SATD, and / or differences determined based on a hash function). The reference block may correspond to / include previously decoded sample blocks of the current image (e.g., reconstructed samples). The reference block may include sample blocks of the current image decoded before being processed by in-loop filtering operations (e.g., deblocking, SAO filtering, CDEF, and / or LR filtering). In some examples, the reference block may be restricted to a specific region. For example, in AV1, if the top-left pixel coordinates of the superblock are (x0, y0), then the reference block is defined only if the value of the vertical coordinate y is less than y0 and the value of the horizontal coordinate x is less than x0 + 2(y0 + y0). IntraBC prediction is only available at pixel location (x, y) when the pixel is (x, y). Furthermore, due to hardware write-back latency, adjacent reconstructed regions may not be accessible through IntraBC prediction.
[0162] Figure 16 An example of IBC (e.g., IBC mode or IntraBC mode) is shown. Figure 16 The examples shown can correspond to screen content. A rectangular section / segment with an arrow starting from its boundary can be the current block being encoded. The rectangular section / segment the arrow points to can be a reference block used to predict the corresponding current block.
[0163] IBC can be used to determine and / or generate a reference block for the current block. The encoder can determine the difference between the reference block and the current block (e.g., the corresponding per-sample difference). This difference can be a prediction error or a residual. The encoder can store and / or signal the prediction error and / or related prediction information in / via the bitstream. The prediction error and / or related prediction information can be used for decoding and / or other forms of consumption. The prediction information can include a BV (Best Value). The prediction information can include an indication of the BV. The decoder (e.g., as...) Figure 3 The decoder 300 shown can decode the current block by determining and / or generating a reference block. The decoder can determine and / or generate the current block, for example, based on prediction information (e.g., BV). The reference block can correspond to / form (e.g., be considered as) a prediction (e.g., a prediction block) of the current block. The decoder can decode the current block by combining the prediction (e.g., the prediction block) with the prediction error (e.g., the residual or the residual block).
[0164] BVs can be predictively encoded and / or encoded in the bitstream / transmitted via the bitstream / notified by signaling (e.g., in HEVC, VVC, and / or any other codec standard / format / protocol). For example, the BV of the current block can be predictively encoded and encoded based on the BVs of one or more blocks adjacent to the current block. For example, the encoder can use a merging mode (e.g., in a manner similar to that described herein for inter-frame prediction), AMVP (e.g., as described herein for inter-frame prediction), or an AMVP-like technique to predictively encode and decode BVs. The AMVP-like technique could be BV prediction and interpolation encoding / decoding (or AMVP for IBC).
[0165] Encoders that perform BV prediction and encoding / decoding (e.g., such as...) Figure 2 The encoder 200 shown can encode / decode the BV into the difference between the BV of the current block being encoded and the block vector predictor (BVP). The encoder can select / determine a BVP from a list of candidate BVPs. Candidate BVPs may include / correspond to previously decoded BVs of neighboring blocks in the current image of the current block. The encoder and / or decoder can generate or determine the list of candidate BVPs on an equal footing.
[0166] The encoder can indicate the selected BVP and the block vector difference (BVD) in the bitstream / via the bitstream / by signaling. The encoder can indicate the selected BVP in the bitstream using an index / indicator. The index can indicate (e.g., point to) the selected BVP in a list of candidate BVPs. The BVD can be determined / calculated based on the difference between the current block's BV and the selected BVP. For example, for a BV indicating the position relative to the current block being encoded / decoded (e.g., represented by a horizontal component (BVx) and a vertical component (BVy)), the BVD can be composed of two components. and express. and It can be determined / calculated as:
[0167] BVDx and BVDy can represent the horizontal and vertical components of BVD, respectively. BVPx and BVPy can represent the horizontal and vertical components of BVP, respectively. Decoders (e.g., such as...) Figure 3 The decoder 300 shown can decode a BV by adding the BVD to the BVP indicated in / via the bitstream. The decoder can decode the current block by determining and / or generating a reference block. The decoder can determine and / or generate the reference block, for example, based on the decoded BV. The reference block can correspond to / form (e.g., be considered) a prediction (e.g., a prediction block) of the current block. The decoder can decode the current block by combining the prediction (e.g., the prediction block) with the prediction error (e.g., a residual or a residual block).
[0168] In merged modes, for example, a BV identical to that of an adjacent block can be used for the current block, and there is no need to separately signal / send a BVD for the current block. A BVP (among candidate BVPs) that corresponds to the decoded BV of an adjacent block can itself be used as the BV of the current block. Not sending a BVD reduces signaling overhead.
[0169] A candidate BVP list (e.g., in HEVC, VVC, and / or any other codec standard / format / protocol) may include two (or more) candidates. These candidates may include candidates A and B. Candidates A and B may include: at most two (or any other number) spatial candidate BVPs determined / derived from five (or any other number) spatial neighboring blocks of the current block being encoded; and / or one or more of the last two (or any other number) encoded BVs (e.g., if spatial neighboring candidates are unavailable). For example, spatial neighboring candidates may be unavailable if the neighboring blocks are encoded using intra-frame prediction or inter-frame prediction. The positions of spatial candidate neighboring blocks relative to the current block being encoded using IBC can be shown in a similar manner to spatial candidate neighboring blocks used for encoding and decoding motion vectors in inter-frame prediction (e.g., as shown in the image). Figure 15A (As shown). For example, the five spatial candidate neighboring blocks of the current block being encoded and decoded using IBC can be represented as A0, A1, B0, B1, and B2, respectively, as shown. Figure 15A As shown.
[0170] The Most Probable Mode (MPM) is the intra-prediction mode (IPM) that is most likely the best mode for the current block being encoded or decoded. In current intra-prediction techniques, the MPM is determined by analyzing the intra-prediction modes of neighboring CUs (also referred to as blocks) of the current block (or CU) to be encoded or decoded. For example, a list of six MPMs (referred to as the "MPM list") can be constructed for intra-prediction. The MPM list is derived from the intra-prediction modes of neighboring CUs and is updated as the encoder progresses through video frames. When encoding a block, the encoder can determine whether the current block is a candidate for any MPM in the MPM list. If so, the encoder then compares the prediction errors of the corresponding MPMs to determine which MPM from the MPM list is the best mode for the current block. If the current block is not a candidate for any MPM in the MPM list, the encoder can then evaluate the remaining intra-prediction modes (e.g., from a total of 67 intra-prediction modes, which may include planar modes, DC modes, and 65 angular orientation modes) to determine the best mode for the current block.
[0171] The use of MPMs can significantly improve coding efficiency because if the intra-prediction mode of the current block is one of the MPMs, the encoder does not need to explicitly signal that intra-prediction mode. Instead, the decoder can infer the intra-prediction mode of the current block from the corresponding list of MPMs generated at the decoder. Therefore, signaling overhead in the bitstream can be reduced.
[0172] In some examples, three types of intra-frame modes can be considered to construct the MPM list: default intra-frame mode; adjacent intra-frame mode; and derived intra-frame mode. Regardless of whether Multi-Reference Line (MRL) and Intra-Segmentation (ISP) codecs are applied, a uniform 6-MPM list can be used for intra-frame blocks. The MPM list for the current block is based on the left-hand neighboring block (e.g., with...). Figure 15A The block corresponding to A1 in the diagram) and the adjacent block above (e.g., with...). Figure 15A The MPM list is constructed based on the intra-frame mode of the block corresponding to B1 in the MPM list. Assuming the mode of the left adjacent block is represented as Left and the mode of the upper adjacent block is represented as Above, the unified MPM list can be constructed as follows: when the adjacent block is unavailable, its intra-frame mode is set to planar mode by default; if both Left and Above modes are non-angular modes, the MPM list is set to include {planar, DC, V, H, V}. 4, V + 4}, where “V” and “H” refer to vertical mode and horizontal mode, respectively; if one of the modes Left and Above is an angular mode and the other is a non-angular mode, then set the mode Max to the larger of Left and Above, and set the MPM list to contain {planar, Max, Max}. 1, Max + 1, Max If Left and Above are both angle modes and they are different, then set the mode Max and mode Min to the larger of Left and Above and the smaller of Left and Above, respectively. Then, if Max – Min equals 1, set the MPM list to contain {planar, Left, Above, Min – 1, Max + 1, Min – 2}; if Max – Min is greater than or equal to 62, set the MPM list to contain {planar, Left, Above, Min + 1, Max – 1, Min + 2}; if Max – Min equals 2, set the MPM list to contain {planar, Left, Above, Min + 1, Min – 1, Max + 1}; otherwise, set the MPM list to contain {planar, Left, Above, Min – 1, –Min + 1, Max – 1}; and if Left and Above are both angle modes and they are the same, set the MPM list to contain {planar, Left, Left – 2}. 1, Left + 1, Left – 2, Left + 2}.
[0173] The encoder can encode an MPM index in the bitstream to indicate to the decoder the position of the selected intra-prediction mode in the MPM list. The encoder can represent the MPM index as a codeword and encode that codeword entropy into the bitstream. The decoder can derive the MPM list in the same way as the encoder and use the MPM index obtained from the codeword decoded from the bitstream to obtain the intra-prediction mode from the MPM list derived at the decoder. In some cases, the first binary bit (bin) of the codeword representing the MPM index is context-encoded using an arithmetic encoder (e.g., CABAC) to achieve additional coding efficiency. For example, three contexts can be used, corresponding to whether the current intra-block is an MRL-enabled block, an ISP-enabled block, or a normal intra-block.
[0174] In some examples, during the 6-MPM list generation process, pruning can be used to remove duplicate intra-frame modes, so that the MPM list contains only unique intra-frame modes. For entropy coding of the 61 non-MPM modes (i.e., the 67 modes in VVC minus 6 MPMs), truncated binary code (TBC) can be used.
[0175] In some implementations, the MPM list is expanded to include 16 additional candidates and divided into two parts: the primary MPM (PMPM) (e.g., containing 6 entries) and the secondary MPM (SMPM) (e.g., containing 16 entries). In some implementations, the first entry in the general MPM list is a planar pattern. The remaining entries include those corresponding to the left (L), top (A), bottom left (BL), top right (AR), and top left (AL) positions (e.g., in...). Figure 15A The intra-modes of adjacent blocks (A1, B1, A0, B0, and B2) are shown in the diagram, along with decoder-side intra-mode derivation (DIMD) modes ordered in ascending order of cost (e.g., SAD, SSD, SATD, etc.). In some examples, at most a pre-configured / pre-defined number (e.g., 5) of modes with the minimum cost are added to the MPM list. The cost of the corresponding MPM (e.g., the IPM corresponding to the entry in the MPM list) can be calculated between the prediction of a reconstructed sample of the template for the current block and the reconstructed sample. For example, the prediction can be generated by applying the corresponding MPM to the template. The sorted orientation modes are added to the general MPM list, and then default modes are added until a general MPM list with 22 entries is constructed. In some examples, if the CU block is vertically oriented, the order of adjacent blocks corresponds to A, L, BL, AR, AL; otherwise, the order is L, A, AL, AR, BL.
[0176] Return to reference Figure 16 In IBC mode applied to screen content, a reference block (RB) can be identified as the reference block that best matches the current block. For example, an arrow corresponds to a block vector (BV) that indicates the corresponding displacement from the corresponding current block (CB) to the corresponding reference block that best matches the corresponding current block. Figure 16 In the example shown, the reference block matches the corresponding current block, and the calculated residual is small even if it is not zero. However, video content can often be encoded more efficiently by taking symmetry properties into account. For example, symmetry has been observed to be prevalent in video content, particularly in text character regions and computer-generated graphics in screen content videos.
[0177] In some implementations, Reconstructed Reordered Intra-Block Copy (RRIBC) mode (e.g., also known as IBC mirror mode) is used for screen content video encoding and decoding to further improve the coding efficiency of IBC by leveraging the symmetry within the video content. In some examples, the RRIBC mode can be signaled based on the IBC mode, using an indication (or flag) to indicate whether a flip is applied, and if a flip is applied, further signaling an indication (or flag) indicating the flip direction.
[0178] In some embodiments, when an RRIBC mode is indicated for encoding the current block, the residual of the current block can be calculated based on samples of a reference block (e.g., corresponding to the original reference block encoded and decoded to form the reconstructed block) that is flipped relative to the current block according to the flip direction indicated for the current block. In one example, on the encoder side, the current block (to be predicted) can be flipped before matching and residual calculation, while the reference block (used to predict the current block) can be derived without flipping. Similarly, on the decoder side, the current block (flipped at the encoder) can be determined based on the reference block and residual information, and then flipped back to restore the original orientation of the current block before it was flipped on the encoder side. In another example, instead of flipping the current block, the reference block can be flipped such that it is flipped to encode the current block (at the encoder) and then flipped back (at the decoder) to restore the original orientation of the reference block at the encoder. As described in this specification, references to flipping the current block can alternatively refer to flipping the reference block without flipping the current block, such that the reference block and the current block are flipped relative to each other in the indicated direction.
[0179] In one example, in RRIBC mode, for a block encoded / decoded by RRIBC, the flip direction can include either a horizontal direction (e.g., along the x-axis) or a vertical direction (e.g., along the y-axis). In one embodiment, for a current block encoded / decoded in RRIBC mode (e.g., a block encoded / decoded by IBC Advanced Motion Vector Prediction (AMVP)), a first indication (e.g., a first syntax flag) can indicate / signal whether to use a flip (e.g., also known as a mirror flip) to encode / decode the current block. Additionally, for the current block, a second indication (e.g., a second syntax flag) can indicate / signal the flip direction (e.g., vertical or horizontal). For IBC merging, the flip direction can be inherited from adjacent blocks without syntax signaling. In one example, for RRIBC, the flip of the current block (or, in an alternative embodiment, a reference block) in the horizontal and vertical directions can be represented by (19) and (20), respectively:
[0180] in, w and h These are the width and height of the current block, respectively. Sample(x,y) indicates the sample value at (x,y). Reference(x,y) indicates the corresponding reference sample value after the flip. In other words, for a horizontal flip, (19) shows that the current block is flipped horizontally by sampling from right to left. Similarly, for a vertical flip, (20) shows that the current block is flipped vertically by sampling from bottom to top.
[0181] Considering horizontal or vertical symmetry, the current block and the reference block are typically aligned horizontally or vertically, respectively. Therefore, in one example, based on the RRIBC mode and flip direction, the reference block can be determined from a reference region (containing candidate reference blocks) aligned in the same flip direction, as will be further described below. As a result, when a flip is applied / indicated in the horizontal direction, the vertical component (BVy) of BV (indicating the displacement from the current block to the reference block) does not need to be signaled, as it can be inferred to be equal to 0. Similarly, when a flip is applied / indicated in the vertical direction, the horizontal component (BVx) of BV does not need to be signaled, as it can be inferred to be equal to 0. In other words, in one example, only one component of BV aligned with the flip direction can be encoded and signaled for the current block.
[0182] For a current block encoded and decoded in IBC mode, the BV of the current block can be constrained to indicate the relative displacement from the current block to a reference block within the IBC reference region. In some examples, the BVP used for predictive encoding and decoding of the BV can be similarly constrained. This is because, as explained above, the BVP can be derived from the BV of spatially adjacent blocks of the current block or from previously encoded and decoded BVs. Based on the BVP, the BVD can be determined as the difference between the BV and the BVP. As described above, this BVD can be encoded and transmitted in the bitstream along with an indication of the selected BVP to enable decoding of the current block.
[0183] Figure 17 An example of Intra-Template Matching Prediction (IntraTMP) for predicting or determining the current block 1700 according to some embodiments is shown. IntraTMP is an intra-frame prediction mode that copies a reference block from a reconstructed portion of the current image 1702 (e.g., the current frame) to predict the current block 1700, the template of which (e.g., an L-shaped template, a top-only template, or a left-only template) is determined to be the best match for the current template 1708 (e.g., an L-shaped template, a top-only template, or a left-only template) of the current block 1700. The current block 1700 comprises a rectangular block of samples from an image or video frame of the current image 1702 to be encoded by an encoder or decoded by a decoder. The current template 1708 may be determined based on samples in a reconstructed region adjacent to the current block 1700. For example, the current template 1708 may include samples adjacent to the current block 1700, such as one or more rows of samples above the current block 1700 and / or one or more columns of samples to the left of the current block 1700. In some examples, the current template 1708 can be an L-shaped template of the current block 1700, a top-only template, or a left-only template. For example, an L-shaped template can contain both a top-only template and a left-only template. For example, an L-shaped template can also contain a top-left template.
[0184] In IntraTMP, multiple reference templates from each candidate reference block 1714 of the predefined TMP search region 1706 are matched against the current template 1708 to determine or select the reference template 1712 that best matches or is most similar to the current template 1708. A reference block (RB) 1710 from the candidate reference blocks 1714 and indicated by the selected reference template 1712 can be used as a prediction block to determine or predict the current block 1700. A block vector (BV) 1730 indicates the displacement from the current block 1700 (e.g., the top-left sample of the current block 1700) to the reference block 1710 (e.g., the top-left sample of the reference block 1710).
[0185] In some examples, the TMP search region 1706 includes a portion of the reconstructed region of the current image 1702. The TMP search region 1706 instructs the encoder or decoder to search for candidate templates (such as candidate reference block 1714) within it to determine the regions of reference template 1712 and the corresponding reference block 1710. In some examples, the TMP search region 1706 may include region 1706A (R1) from the current CTU 1704, region 1706B (R3) containing a portion of the upper CTU, region 1706C (R2) containing a portion of the upper left CTU, and region 1706D (R4) containing a portion of the left CTU. These CTUs are the result of the image segmentation operation described above. It should be understood that the TMP search region 1706 may include other regions of the reconstructed sample of the current image 1702.
[0186] In some examples, the dimensions (SearchRange_w, SearchRange_h) of the TMP search region 1706 can be set to be proportional to the dimensions (BlkW, BlkH) of the current block 1700 to ensure a fixed number of cost comparisons (e.g., SAD) per pixel. For example, the dimensions of the TMP search region 1706 can be calculated as follows:
[0187] α (or alpha) is a constant that controls the gain / complexity tradeoff of the encoder or decoder. For example, α It can equal 5. In Figure 17 It should also be noted that the dimensions of TMP search region 1706 are shown as an example rather than a limitation. In actual implementations, for example, the dimensions of these regions can vary, and / or one or more of these regions may not exist. Figure 17 In the example shown, portions of the reconstructed region directly above and to the left of the current block 1700 may be unavailable for prediction or determination and can be excluded from the TMP search region 1706. This could be because reference blocks in these portions would overlap with the current block 1700, making them invalid locations for prediction or determination of the current block 1700. Similar limitations can also be based on the unavailability of samples due to the sequence order of encoding or decoding, or on the fact that samples may be outside the TMP search region or the current image 1702.
[0188] In some examples, the candidate template of candidate reference block 1714 has the same shape and size as the current template 1708. In one example, the candidate template also has the same orientation as the current template 1708. In some examples, template matching involves calculating a template matching (TM) cost between a sample of the candidate reference template (indicated by the corresponding candidate block vector) and a corresponding sample of the current template 1708. For example, this difference can be based on the sum of squared differences (SSD), the sum of absolute differences (SAD), the sum of absolute transformation differences (SATD), or a difference determined by a hash function. The template matching cost represents the similarity between templates, where a smaller cost indicates a more similar template.
[0189] In some examples, the location of each sample in the TMP search region 1706 can be selected as the location of a candidate reference block, the corresponding reference template of which is compared with the current template 1708 to determine the TM cost. This location can be indicated by a candidate block vector representing the displacement from the current block 1700 (e.g., the top-left sample of the current block 1700) to that location. To accelerate the template matching process, one or more of the TMP search regions 1706 can be subsampled at subsampling intervals (e.g., 3), such that not every location is considered a candidate reference block location. After finding a candidate set (e.g., to generate a candidate list), a refinement process can be performed to select additional candidate block vectors. The refinement process can be performed via a second template matching search in a search region surrounding one or more of the candidate sets. This search region can be a narrowed search range associated with the subsampling interval.
[0190] In some examples, based on the encoder's selection of IntraTMP to encode and decode the current block, the encoder can signal the use of the mode and perform the same prediction and matching operations at the decoder.
[0191] In some examples, by performing template matching operations on candidate reference templates in the TMP search regions 1706A-D, the decoder (and encoder) can construct a candidate list of up to a predetermined maximum number (e.g., 19) of candidate block vectors (or candidate block vector predictors). These candidate block vectors can be sorted in ascending order based on the template matching cost of the corresponding reference template of the candidate reference block indicated by the candidate block vector. In some examples, the predicted block (e.g., predictor) of the current block 1700 can be generated using one or more reference blocks (e.g., reference block 1710) determined using IntraTMP and by applying one or more optional filters. For example, the following modes can be supported: single predictor, multi-predictor fusion, sub-pixel precision, and linear filter model. In the single predictor mode, a single predictor is selected from the candidate list, such as selecting reference block 1710. In the multi-predictor fusion mode, multiple predictors are blended to derive the final predicted block, such as selecting two or more candidate reference blocks 1714. The blending weights can be calculated based on the template matching cost of each predictor, or using a Wiener filter-based weight derivation method. In subpixel precision mode, when using a single predictor, subpixel precision can be used at 1 / 2 pixel, 1 / 4 pixel, or 3 / 4 pixel precision, each with eight possible directions. In linear filter model mode, a linear filter can be learned (e.g., generated or derived) between the reference template and the current template and applied to the reference block. This mode can be used with a single predictor when subpixel precision is not used.
[0192] exist Figure 17 In the example shown, the best match between the reference template 1712 and the current template 1708 for reference block 1710 can be determined based on the template matching cost between reference template 1712 and current template 1708 being the minimum TM cost. In another example, the encoder can select reference block 1710 as the prediction for the current block 1700 and signal the index of the candidate block vector indicating reference block 1710 in the candidate list. The decoder can generate the same candidate list and determine reference block 1710 based on decoding that index from the bitstream. The block vector (BV) can indicate the displacement of the reference block (e.g., reference block 1710) relative to the current block 1700.
[0193] In some examples, IntraTMP mode can be enabled for blocks (e.g., CUs) whose size (e.g., width multiplied by height) is less than or equal to a threshold size (e.g., 64). In one example, the threshold size for IntraTMP is configurable. The IntraTMP prediction mode can be signaled at the block (e.g., per CU) level via a dedicated flag.
[0194] In some examples, the encoder can determine the difference (e.g., the corresponding sample-by-sample difference) between the current block 1700 and the reference block 1710 used to predict the current block 1700. This difference can be referred to as the prediction error or residual. The encoder can store and / or signal this prediction error or residual in the bitstream for the decoder to decode.
[0195] To perform TMP encoding and decoding of the current block 1700, the decoder can perform the same operations as the encoder as described above. For example, based on the indication received from the encoder of the IntraTMP used to predict the current block 1700 (e.g., via a flag), the decoder can similarly determine or construct the current template 1708 for the current block 1700. After determining or constructing the current template 1708, the decoder can further similarly search the TMP search region 1706 to generate a candidate list from which the reference block 1710 can be determined. Because in some examples, the reference block can be indicated by the block vector candidate with the lowest cost in the candidate list, the decoder can obtain the block vector candidate by decoding the index of that block vector candidate in the candidate list from the bitstream. The decoder can combine the residual decoded from the bitstream with the reference block 1710 to reconstruct the current block 1700. In this way, the encoder does not need to encode the BV1730 indicating the reference block 1710 in the bitstream.
[0196] Various decoder-side techniques, such as decoder-side intra-mode derivation (DIMD), have been introduced. These techniques allow intra-prediction of the current block to be performed without explicitly signaling any particular intra-prediction mode (IPM) in the bitstream. Such techniques are possible by having the encoder and decoder independently and identically derive one or more of the same IPMs used for encoding / decoding the current block, based on previously encoded / decoded samples (e.g., reconstructed samples). If the encoder and decoder identically determine / derive the same IPMs, the signaling for the IPMs can be omitted.
[0197] Figure 18 This diagram illustrates an example of decoder-side intra-frame mode derivation (DIMD) for encoding and decoding the current block 1810 according to some embodiments. DIMD is an intra-frame coding mode in which one or more IPMs used to generate the prediction block 1824 of the current block 1810 are not transmitted in the bitstream. Instead, the one or more IPMs can be deduced by the decoder using gradient analysis of neighboring reconstructed pixels (or reference samples) of the current block 1810. In some examples, the one or more IPMs can be determined by the encoder, for example, through a rate-distortion optimization (RDO) algorithm.
[0198] In DIMD, texture gradient analysis is performed on samples in template 1812 (e.g., a reference template) associated with the current block 1810 to generate a gradient histogram (HoG) 1820. From HoG 1820, several (e.g., two) DIMD modes, such as one or more of DIMD modes 1818A-B, can be derived. Each entry in HoG 1820 corresponds to a corresponding angular intra-prediction mode (IPM), where the magnitude (or amount) of the entry is determined based on gradient analysis.
[0199] In some examples, to derive the DIMD modes 1818A-B (and DIMD predictor 1822) of the current block 1810, a template 1812 containing a set of reference samples (e.g., neighboring pixels) can be selected and used to perform gradient analysis. These reference samples are part of the reconstructed portion of the image containing the current block 1810. The template 1812 can be a template region (composed of a left region, an upper region, and a top-left region) defined relative to the position of the current block 1810 with a width of 3 samples (in width or height).
[0200] In some examples, gradient analysis can be performed using an edge detection filter applied to a 3×3 window location centered on a reference sample / pixel selected from template 1812. The edge detection filter can determine the magnitude and angle of the brightness direction (e.g., orientation) of each reference sample. For example, the set of reference samples selected from template 1812 may contain samples from the middle row of template 1812. In some examples, the edge detection filter may include a horizontal Sobel gradient filter (…). M hor ) and / or vertical Sobel gradient filter ( M ver It is represented by the following 3x3 matrix, which will be convolved with the selected reference sample of template 1812:
[0201] For each of the selected reference samples (e.g., pixels) in template 1812, pointwise multiplication of each of these two matrices with a 3x3 Sobel filter window can be performed, and the results summed. The 3x3 Sobel filter window can be centered on the current reference sample and composed of its eight direct neighbors. Thus, two values corresponding to the gradient intensities in the horizontal and vertical directions at the current sample are obtained. G hor (from and) M hor (multiplication) and G ver (from and) M ver(Multiplication). The angle of the window can be calculated as... The calculated angle may correspond to (e.g., be converted to) one of the angle IPMs (e.g., one of 65 angle IPMs), and associated with the amplitude (i.e., the amplitude at that window position). It can be added to the HoG indexed by the corresponding IPM. After processing the magnitude and angle for each window position in template 1812, each entry in the resulting HoG1820 represents the cumulative magnitude of the corresponding IPM.
[0202] Figure 19 Examples of templates 1812 (e.g., template regions) for calculating HoGs used in DIMD according to some embodiments are shown. A reference template 1812 (e.g., an L-shaped template) for the current block 1810 is shown located in the reconstruction region 1902 (or reconstruction area) of the image frame. Examples of HoGs of different sizes for the current block 1810 are shown. For example, for a 4×4 pixel square current block 1908, a 3×3 window 1910 in the template region is shown, and a corresponding HoG 1912 can be generated for the current block 1908. In another example, for a rectangular current block 1904 with a template region 1906 3 pixels deep, a HoG 1914 corresponding to the rectangular current block 1904 can be generated by gradient analysis of a reference sample based on a filter window. As shown, each coordinate position on the x-axis of the illustrated HoG is the corresponding IPM, and the y-axis represents the cumulative magnitude (e.g., count) of the corresponding IPM.
[0203] return Figure 18 Several DIMD modes 1818A-B can be determined by selecting IPMs from the HoG1820 based on their amplitude. For example, IPMs M1 and M2 in the HoG1820 have the highest corresponding amplitudes A1 and A2, which can be selected and used to determine DIMD modes 1818A and 1818B, respectively. For example, up to a predetermined number (e.g., 4) of angular intra-frame modes with the highest amplitudes can be selected from the HoG1820. In some examples, this number of DIMD modes 1818A-B can be combined in a fusion / mixing scheme to generate a DIMD predictor 1822.
[0204] In some examples, multiple IPMs, such as DIMD modes 1818A-B, can be determined and combined with non-angular mode 1816 in a mixing / fusion process corresponding to DIMD predictor 1822. DIMD predictor 1822 may include a linear combination (e.g., a weighted average) of DIMD modes 1818A-B and non-angular mode 1816, respectively, with weights 1828A-B and 1826. In some examples, the weights 1828A-B of DIMD modes 1818A-B can be determined based on the magnitude (e.g., magnitude) associated with DIMD modes 1818A-B. For example, the weight 1828A of DIMD mode 1818A may correspond to DIMD weight 1832A (e.g., ...). wDIMD 1) It can be based on the amplitude A1 (which comes from HoG1820 and is associated with DIMD mode 1818A (e.g., IPM M1)) divided by the sum of the amplitudes of DIMD modes 1818A-B. For example, the weight 1828B of DIMD mode 1818B can correspond to DIMD weight 1832B (e.g., wDIMD 2), which can be based on the amplitude A2 (which comes from HoG1820 and is associated with DIMD mode 1818B (e.g., IPM M2)) divided by the sum.
[0205] In some examples, the non-angular mode 1816 (e.g., non-directional) can be, but is not limited to, a planar mode (or alternatively, a DC mode). In other examples, the non-angular mode 1816 can be a neural network-based intra-frame prediction (NNIP) mode. For ease of illustration, the following description may refer to the non-angular mode 1816 as a planar mode, although it can be other types of non-angular / non-directional modes. The non-angular mode 1816 can have weights 1826 corresponding to planar weights 1833, which can be fixed weights. f 1 (e.g., 1 / 4, or 16 / 64 in 6-bit integer precision). The remaining DIMD weights 1832A-B may contain a fixed-weight portion based on the fixed weights of the planar weights 1833. f 2 (e.g., 3 / 4). For example, fixed weights. f 1 and f The sum of 2s can equal 1.
[0206] DIMD predictor 1822 can be applied to template 1812 (e.g., the current template) to determine prediction block 1824 for the current block 1810. For example, each sample (x,y)1814 of prediction block 1824 (denoted as...) fusionPred ) can be determined based on the application of DIMD predictor 1822, which includes corresponding weights ( wi The weighted average (e.g., linear combination) of DIMD pattern 1818A-B and non-angle pattern 1816 is applied as follows:
[0207] In some examples, weights ( w i ) can be the DIMD weights 1832A-B used for DIMD modes 1818A-B ( , targeting the pattern i ) and planar weights 1833 for non-angular mode 1816 ( wPlanar Weights ( w i The value can be constant and applied uniformly to determine each sample (x, y)1814 in the prediction block 1824. Pred i For the pattern i In other words, it can be a DIMD mode predictor for DIMD modes 1818A-B ( dimdPred i ) or for planar mode predictors for non-angular mode 1816 ( dimdPlanar Therefore, the DIMD predictor 1822 can be equivalently represented and computed as follows: .
[0208] Note that a shift operation is performed because 6 bits of integer precision are used.
[0209] For intra-frame encoded / decoded blocks, the selection of DIMD is signaled in the bitstream using a flag. At the decoder, if the DIMD flag is true, the intra-frame prediction mode is derived during reconstruction using the same previously encoded neighboring pixels. Otherwise, the intra-frame prediction mode is parsed from the bitstream as in classic intra-frame coding modes.
[0210] In some examples, position-dependent DIMD patterns are introduced to adjust the weights 1828A-B of the angular IPMs (e.g., DIMD patterns 1818A-B) in the DIMD. During DIMD IPM derivation, a position-dependent process is applied to determine the influence of different template regions of template 1812 on the selection of each IPM. To determine how specific samples in template 1812 contribute to the inference of a particular DIMD pattern, template 1812 can be divided into three separate regions—the region above the current block 1810, the region to the left of the current block 1810, and the region to the upper left of the current block 1810. Gradient analysis can be performed separately for samples in each region, resulting in three histograms: HoG1819C ( ), HoG1819A ( ) and HoG1819B ( For directional IPM , For the region i (For example, above, left, or upper left) refers to a region. i All samples in the orientation (or IPM) The cumulative value at that location.
[0211] The HoG1820 corresponding to the complete gradient histogram of the entire template 1812 can be calculated as the sum of three separate HoG1819A-C. In some examples, the two directional IPMs with the largest and second largest cumulative magnitudes (e.g., magnitude values) in HoG1820 can be selected as the primary DIMD mode and the secondary DIMD mode, respectively. and .
[0212] In some examples, corresponding to histograms and HoG1819C and 1819A can be used to determine and / or Whether it depends on a specific template region ABOVE or LEFT. In the first example, Position dependency, represented as (For example, in) Figure 18 The middle is shown as L i = L ( M i , H left , H above For DIMD mode i ), can be defined as: if: ,but: ,Right now Depends on region ABOVE.
[0213] Otherwise if: ,but: ,Right now Depends on region LEFT.
[0214] otherwise: ,Right now It is not position-dependent.
[0215] In the second example, Position dependency, represented as (For example, in) Figure 18 The middle is shown as L i = L ( M i , H left , H above For DIMD mode i ), can be defined as: if: ,but: ,Right now Depends on region ABOVE.
[0216] Otherwise if: ,but: ,Right now Depends on region LEFT.
[0217] otherwise: ,Right now It is not position-dependent.
[0218] In this example, the position dependency indicator can be determined by comparing the magnitude of the HoG corresponding to a particular template portion with the average magnitude of the HoG across all template portions of the template.
[0219] Therefore, position dependence in DIMD can be determined based on the analysis of the HoG peak magnitude of the IPM at the selected angle. For example, position dependence indicators 1830A-B can be determined separately for DIMD modes 1818A-B. The position dependence indicator for DIMD mode 1816 (which can be a planar mode) can be determined as a value indicating that it is not position dependent or is diagonally dependent.
[0220] In some embodiments, the fusion / hybridization scheme for determining the DIMD predictor 1822 can be adjusted based on a position-dependent DIMD pattern. For example, fusion can be performed to combine the primary DIMD predictor and the secondary DIMD predictor. and Planar predictor Fusion. If no DIMD pattern is determined to be position-dependent (e.g., Then, as explained above, a uniform weighting method can be applied. , and The mixture / fusion.
[0221] In some embodiments, if at least one of the DIMD patterns 1818A-B is inferred to be position-dependent, a sample-based mixture can be used to determine the DIMD predictor 1822. Position-variable / related weights can be used in the sample mixture. Mixed predictors at each location.
[0222] In some examples, if Then, based on the sample weights For predictors It can be calculated such that the average weight used within the block is approximately equal to the uniform weight. Higher weights are used in portions of the block closer to regions (e.g., ABOVE or LEFT), which correspond to... (For example, instructions) L i Fixed range It can be determined and is predefined (e.g., ), which corresponds to Compared to The maximum deviation. Higher. The value causes a significant change in the weights within the block. For a size of... The block: if ,but:
[0223] Otherwise if ,but:
[0224] If DIMD mode 1818A-B ( i=0 and i=1 Both are related to location-dependent indicators. L i Associatedly, the location dependency indicator indicates location dependency (i.e., , targeting the pattern Then the weight It can be based on two predictors The value is used to calculate, as shown above.
[0225] In some examples, if only one of the DIMD patterns 1818A-B is associated with a position-dependent indicator L i Relatedly, this position dependency indicator indicates that it is position-dependent, for example, and ,but The weights can be calculated as follows:
[0226] Finally, the planar predictor The weight 1826 can be calculated as: 64 -
[0227] In some examples, the final position-dependent DIMD predictor 1822 can be applied to each sample (x,y) that generates prediction block 1824, as shown below:
[0228] In some examples, as explained above, the non-angle mode 1816 can be used with fixed weights. f 1 (e.g., ¼ or 21 / 64) is systematically applied during the mixing process. Note that shifting operations are performed because 6-bit integer precision is used.
[0229] In some embodiments, when encoding and decoding are performed using DIMD based on the current block 1810, the IPM information 1834 (e.g., DIMD information) may include DIMD parameters generated and stored in association with the current block 1810. For example, the DIMD parameters may include an indication of the selected DIMD mode 1818A-B. M 1 , M 2 , …, M i The amplitude from HoG1820 for the selected DIMD mode 1818A-B ( A 1 , A 2 , …, A i ) and / or the weights of the selected DIMD modes 1818A-B and 1828A-B ( w 1 , w 2 , …, w i For example, weights 1828A-B could be DIMD weights 1832A-B corresponding to the selected DIMD patterns 1818A-B. In some examples, the DIMD parameters may also include a positional dependency indication of the selected DIMD patterns 1818A-B. L 1 , L 2 , …, L iIn some examples, the IPM information 1834 may contain multiple lists (e.g., arrays) of DIMD parameters, where each list corresponds to a different DIMD parameter type. For example, the multiple lists may contain an IPM list, an amplitude list, a weight list, and / or a position dependency indicator list. Parameters at the same index in the multiple lists correspond to the same DIMD mode or IPM indicated by that index in the IPM list.
[0230] In some embodiments, instead of the non-angle mode 1816, a non-angle / non-directional intra-prediction mode is used. The non-angle mode 1816 may be an intra-coding mode for derivation of block vectors (BV), such as block vectors obtained through IntraTMP or IBC modes.
[0231] In some examples, BV is obtained based on performing the TMP procedure against the current block 1810, for example, as referenced. Figure 17 The explanation given.
[0232] In some examples, the BV can be obtained based on one of the neighboring (previously reconstructed) blocks of the current block 1810. For example, the BV could be a candidate BV obtained via IntraTMP or IBC for encoding and decoding neighboring blocks. The reference block pointed to by the BV (instead of the prediction block obtained using a non-angular intra-prediction mode) can be used to mix with prediction samples from a DIMD mode. Other DIMD-based modes can be modified in a similar manner to use a reference block pointed to by the BV of a neighboring block for mixing. In some examples, the template matching (TM) cost for each candidate BV of a neighboring block encoded and decoded based on the BV can be obtained, and the candidate BV with the lowest TM cost can be selected. (The above is about...) Figure 17 The process of calculating the TM cost based on candidate BV is described.
[0233] Therefore, in some embodiments, the DIMD mode (including any DIMD-based mode) can adaptively select between a prediction block obtained using a non-angular intra-prediction mode (e.g., planar mode, DC, NNIP, etc.) and a reference block pointed to by the BV of an adjacent block (e.g., obtained via IntraTMP or IBC mode) to blend with the prediction samples obtained from angular intra-prediction.
[0234] Figure 20 The following are examples of embodiments, such as those shown. Figure 18 Example flowchart 2000 describes the DIMD predictor derivation process. The operations of flowchart 2000 can be performed identically at the encoder (e.g., encoder 200) and decoder (e.g., decoder 300).
[0235] At box 2001, a histogram of the intra-prediction mode (IPM) is determined for the current block (e.g., CU). This histogram is used to encode and decode the current block based on an intra-frame coding mode. For example, the intra-frame coding mode can be any of various DIMD-related modes. For example, the intra-frame coding mode can be a DIMD mode (e.g., default / normal DIMD mode), as per [reference to...]. Figure 18-19 As described. For example, the intra-frame based coding mode can be OBIC mode, MIMD mode, or intra-frame merge mode (e.g., DIMD merge list mode), as further described below.
[0236] In some examples, when the intra-frame coding mode is DIMD mode, box 2001 may contain boxes 2002-2004. At box 2002, neighboring samples of the current block are determined. For example, the availability of neighboring samples may be determined based on whether, for example, the blocks above, above right, below left, above left, and / or to the left of the current block (e.g., CUs) have been identified or reconstructed. In some examples, neighboring samples may be part of a template of the current block (such as template 1812), as per [reference to...]. Figure 18-19 As described.
[0237] At box 2004, the histogram is a gradient histogram (HoG) generated for neighboring samples (e.g., templates from the current block). Specifically, the HoG can be generated based on available samples of the template (e.g., from available template regions), as per [reference to...]. Figure 18-19 As described.
[0238] At box 2006, multiple IPMs are selected from the histogram (e.g., HoG) based on their magnitudes. In some examples, an IPM may be selected based on the highest magnitude in the histogram, and thus represent the most representative IPM. The number of IPMs selected can be up to a predetermined number (e.g., 5).
[0239] At box 2008, determine the location dependency indication for each of the selected IPMs.
[0240] For example, when the intra-frame coding mode is DIMD and the histogram is HoG, the indication of the positional dependency of each selected IPM can be determined based on the magnitude of the template portion (e.g., template portion or template region). For example, the template portion could include the left template portion and the top template portion. (See also: Regarding...) Figure 18As described, two separate HoGs can be generated, corresponding respectively to the processed samples in the left and upper template portions. The positional dependence of each selected IPM can then be determined based on a comparison of the amplitude of the selected IPM between the upper and left template portions. For example, this comparison could be related to the ratio of IPM amplitudes within the template portions.
[0241] Specifically, in some examples, the positional dependency indicator of the selected IPM can be determined as follows: By default, the positional dependency indicator can be set to 0, indicating no positional dependency; if the magnitude of the IPM in the left stencil portion is less than the average magnitude of the IPM across all stencil portions (e.g., across three stencil portions, such as the left stencil, the top stencil, and the top-left stencil), the positional dependency indicator can be set to a first value (e.g., 1), indicating vertical positional dependency; otherwise, if the magnitude of the IPM in the top stencil portion is less than the average magnitude of the IPM across all stencil portions, the positional dependency indicator can be set to a second value (e.g., 2), indicating horizontal positional dependency. (See also: Regarding...) Figure 18 As described, to determine the position-dependent indication and during HoG generation, the magnitude can be accumulated in separate HoGs for each of the left stencil portion, the upper stencil portion, and the upper left stencil portion. The magnitudes in the separate HoGs can be summed to determine a HoG representing the combined magnitude of the entire stencil.
[0242] At box 2010, it is determined whether mode blending (e.g., also known as mode combination or fusion) is enabled. If mode blending is disabled, then at box 2012, one of the IPMs selected at box 2006 is determined as the DIMD predictor for generating the prediction block used to encode and decode the current block. For example, the IPM with the highest amplitude can be determined as the primary DIMD mode and selected as the DIMD predictor.
[0243] If mode blending is enabled at box 2010, then at box 2014, the number of angular IPMs to be blended is determined. In some examples, for instance, mode blending can be enabled when both the first and second selected IPMs are angular modes.
[0244] In some examples, the IPM range can be defined as non-angular. For example, the IPM range can be one or more predetermined IPMs corresponding to an angular range that includes the diagonal direction (e.g., corresponding to...). G ver / G hor (equal to or close to 1 or -1).
[0245] At box 2016, it is determined whether the number of angle IPMs to be mixed is greater than 1. If the number of angle IPMs to be mixed is not greater than 1, then at box 2018, a DIMD predictor is obtained (e.g., determined) based on mixing a selected angle IPM with a planar pattern. For example, the DIMD predictor can be determined as a linear combination of the selected angle IPM and the planar pattern, where each has a corresponding fixed weight. For example, the selected angle IPM may have a first fixed weight (e.g., 2 / 3), and the planar pattern may have a second fixed weight (e.g., 1 / 3). The sum of the first fixed weight and the second fixed weight may equal one.
[0246] If the number of angle IPMs to be mixed is determined to be greater than 1 at box 2016, then at box 2020, the weights of the selected IPMs are determined based on their magnitudes in the histogram. For example, the weights of the selected IPMs can be based on the ratio of the magnitude of the selected IPM to the magnitude of the selected IPM, for example, as with... Figure 18 As described. In some examples, the planar pattern can be used for blending with a first fixed weight, such as 1 / 4 or 16 / 64 with 6-bit integer precision. The weights of the angular IPM can be further weighted (e.g., scaled) based on a second fixed weight. For example, the sum of the first and second fixed weights can be equal to one. For example, if the first fixed weight is 1 / 4, the second fixed weight can be set to 3 / 4 or 48 / 64 with 6-bit integer precision.
[0247] At box 2022, DIMD predictors are obtained (e.g., generated or derived) by mixing (e.g., fusing or combining) the selected IPM with non-angular modes according to appropriate weights, as described above regarding... Figure 18 As described.
[0248] In some examples, DIMD predictors can be further derived using a position-dependent blending pattern. For instance, the weights determined at box 2020 can be applied uniformly to determine all samples in the prediction block and can be referred to as uniform weights. For position-dependent blending, box 2022 can contain boxes 2024-2028.
[0249] At box 2024, a blending weight is determined for each of the multiple location dependencies. In some examples, the multiple location dependencies may include horizontal location dependencies, vertical location dependencies, or no location dependencies. The blending weight may be sample-based weights for the predictors (e.g., for each selected IPM), determined such that the average weight of the predicted samples used to generate the current block (the prediction block) is approximately equal to the corresponding uniform weight (e.g., calculated at box 2020), and such that, depending on whether the location dependency of the corresponding selected IPM is a horizontal or vertical location dependency, a higher weight is used in the portion of the block closer to the left or top template region. In some examples, the range used in the location dependency blending may be a predefined value and corresponds to the maximum deviation of the sample-based weights relative to the corresponding uniform weights. The higher the value of the predefined range, the greater the variation in weights within the prediction block.
[0250] After determining the mixing weights for each location dependency (e.g., vertical, horizontal, no location dependency) at box 2024, a location dependency predictor is determined for each location dependency at box 2026. For example, the predictions for each location dependency are mixed. For instance, for each of the horizontal, vertical, and no location dependency (i.e., diagonal location dependency) used by any of the selected IPMs in the DIMD predictor, the selected IPMs with the same location dependency are mixed based on their respective magnitudes. At box 2028, the DIMD predictor can be obtained based on mixing the location dependency predictors together. For example, the location dependency predictors can be mixed based on the respective sum of the magnitudes of the selected IPMs in each location dependency. This provides a directional, sample-by-sample mixing that depends on the location dependency and uses a fixed weight bias calculated at box 2024.
[0251] In some examples, the various DIMD parameters determined / derived in flowchart 2000 can be stored as IPM information used by the current block (e.g., Figure 18 (IPM information 1834). For example, the DIMD parameter may contain the selected IPM, such as the selected IPM from box 2012 or box 2014. For example, the DIMD parameter may contain the weights of the selected IPM, such as the weights from box 2020. For example, the DIMD parameter may contain the magnitude of the selected IPM, such as the magnitude obtained from the histogram at box 2006. For example, the DIMD parameter may contain an indication of the location dependence of the selected IPM, such as the indication determined at box 2008.
[0252] In some embodiments, the DIMD intra-prediction mode (e.g., DIMD IPM) corresponding to the DIMD predictor determined at block 2022 can be added to the MPM list along with the IPM considered for the current block. At the encoder, if the DIMD IPM is determined to be the optimal intra-prediction mode (e.g., based on the lowest RDO cost, etc.), the current block can be encoded using the DIMD IPM, and only a flag indicating that the current block is encoded using DIMD is transmitted in the bitstream along with the residual of the current block. The specific IPM used in the DIMD IPM is not transmitted in the bitstream. The decoder can receive a flag indicating that DIMD has been performed and perform the operations of flowchart 2000 to determine the DIMD predictor for determining the prediction block used to reconstruct the current block. Since the derived intra-prediction mode is included in the MPM list, the DIMD process can be performed before the MPM list is constructed. The master derived IPM of the DIMD block can be stored with the block and used for the construction of the MPM list for adjacent blocks. In some examples, when DIMD is signaled, the MPM and MRL are not signaled. The DIMD intra-prediction mode described above can also be called "regular DIMD intra-prediction mode" or "regular DIMD mode".
[0253] To enhance DIMD, a decoder-side technique has been proposed to merge DIMD information (e.g., IPM information 1834) from neighboring blocks of the current block to generate a prediction block for encoding and decoding the current block. When neighboring blocks encoded using intra-frame mode coding, such as intra-prediction mode or DIMD, are available, the DIMD histograms of the selected neighboring blocks (e.g., neighboring CU blocks) are combined to form the merged gradient histogram (MHoG) of the current block. The DIMD mode and weights can be derived from this MHoG, similar to the method described above. Figure 18-20 The explanation outlines the method for deriving DIMD modes and weights from the HoG generated for regular DIMD. In some examples, the HoG of the current block is not used for MHoG construction. This intra-frame mode prediction technique for generating MHoG can be called Combined Intra-Frame Mode Derivation (MIMD).
[0254] The DIMD merge process is similar to that of... Figure 20 The DIMD process is described. However, the DIMD merge process includes alternatives. Figure 20 A set of operations prior to Middleframe 2010. In MIMD, in order to encode and decode the current block, up to a predetermined number (e.g., 13) of previously reconstructed neighboring blocks based on DIMD encoding and decoding (e.g., neighboring CU blocks of the current block) can be selected from the DIMD merge candidate list. For example, up to a predetermined number of neighboring blocks can be selected based on using DIMD encoding and decoding and being spatially closest to the current block.
[0255] In some examples, adjacent blocks can come from, for example Figure 15A The spatially adjacent block family is shown. For example, one or more intra-frame merge candidates (DIMD merge candidates) can be added to the list according to the inclusion order of the blocks that correspond to (e.g., contain) the left sample (A1), the top sample (B1), the top-left sample (B2), the top-right sample (B0), and the bottom-left sample (A0).
[0256] Figure 21 An example of neighboring blocks of the current block is shown according to some embodiments, which are used to determine merge candidates for the current block or histograms of the IPM used for encoding and decoding the current block. For example, the histogram may be MHoG or HoC. For example, merge candidates may be part of an intra-frame merge list (e.g., a DIMD merge list).
[0257] Such as about Figure 15A As described, the spatially adjacent block family adjacent to the current block can correspond to sample positions 1-5 adjacent to the current block. In some examples, the adjacent blocks can come from the spatially non-adjacent adjacent block family of the current block, such as the blocks corresponding to sample positions 6 and above. For example, blocks 2102-2106 can be selected as intra-merge candidates and added to the intra-merge candidate list. For example, the first block 2102 associated with sample 11 (e.g., containing the sample), the second block 2104 associated with sample 13 (e.g., containing the sample), and the third block 2106 associated with sample 10 (e.g., containing the sample) are spatially non-adjacent blocks relative to the current block.
[0258] The IPM / DIMD information (e.g., representing a HoG or a merged HoG) of each of the selected neighboring blocks (e.g., neighboring CU blocks) can be retrieved and combined to generate an MHoG. For example, the magnitudes of the same IPM in the IPM / DIMD information of the selected neighboring blocks can be accumulated in the MHoG. Similar to... Figure 18 , Figure 19 and Figure 20The method described in box 2006 for selecting multiple IPMs based on the HoG in conventional DIMD can similarly select the number of IPMs from the MHoG (e.g., up to a predetermined number, such as 5). The number of IPMs can be selected, for example, based on the highest amplitude in the MHoG. In some examples, regarding box 2008 in the MIMD mode, if multiple neighboring blocks are selected to determine the MHoG, the positional dependency indicator for each of the selected IPMs can be set to a value indicating the diagonal (e.g., or non-positional dependency) (e.g., 0). In one example, if only one neighboring block is selected, the positional dependency indicator for each selected IPM can be set to the positional dependency of the selected IPM obtained from the IPM information of the neighboring block. Therefore, DIMD predictors can be generated from the selected IPMs of the MHoG and used to generate predictive blocks for encoding and decoding the current block.
[0259] In some examples, if the encoder selects the MIMD mode, it can signal the use of the MIMD mode as a sub-mode of DIMD using a flag at the block or prediction unit level. The decoder can parse this flag from the bitstream and derive the DIMD predictor using the generated MHoG.
[0260] In some examples, to reduce computational complexity, the IPM information (DIMD information) of the selected neighboring blocks (e.g., neighboring CUs) can be restricted to storing only a predetermined number (e.g., 5) of IPMs corresponding to the highest amplitudes and those highest amplitudes corresponding to the IPMs. In these examples, the MHoG can be generated by combining a predetermined number of pairs (IPM, IPM amplitude) for each selected neighboring block. The resulting MHoG can be used to derive the prediction patterns and weights as described above.
[0261] Another decoding-end technique for enhancing DIMD is based on generating an occurrence count histogram (HoC), which represents the sample-by-sample occurrence count of IPMs in the neighborhood of the current block. This enhancement is called Occurrence Count-Based Intra-Frame Coding (OBIC) mode and can be a sub-mode of DIMD. Similar to a regular DIMD mode, the OBIC mode can mix (e.g., fuse or combine) up to a predetermined number (e.g., 5) of IPMs with the highest occurrence count from the HoC along with planar modes to obtain DIMD predictors. The weight of each mode can be determined based on the magnitude in the HoC, similar to how the weights of IPMs are determined from the HoG in regular DIMD.
[0262] The OBIC procedure can be similar to the MIMD procedure described above (e.g., the DIMD merge procedure), and can differ from that procedure only in that it replaces MHoG with HoC. Therefore, the OBIC procedure is similar to... Figure 20 The DIMD procedure is described. However, the OBIC procedure includes alternatives. Figure 20 This refers to a set of operations prior to 2010. In OBIC, to encode and decode the current block, up to a predetermined number (e.g., 13) of previously reconstructed neighboring blocks based on DIMD encoding and decoding (e.g., neighboring CU blocks of the current block) can be selected from an intra / DIMD merge candidate list. For example, up to a predetermined number of neighboring blocks can be selected based on using DIMD encoding and decoding and being spatially closest to the current block. Similar to MIMD, generating the intra / DIMD merge candidate list can include checks such as... Figure 15A The adjacent blocks in the current block's adjacency space, as shown above, and the adjacent blocks in the adjacency space, as shown above, are all related to this. Figure 21 The non-adjacent spatial adjacent blocks described.
[0263] Multiple (e.g., up to a predetermined number) intra / DIMD merging candidates can be selected from the list, and the IPM / DIMD information of the selected intra / DIMD merging candidates can be combined into a HoC. For example, the HoC can contain IPMs with accumulated per-sample occurrence counts, where each occurrence count value of the corresponding IPM is calculated based on the number of samples encoded or decoded using that IPM in the selected intra / DIMD merging candidate. For example, if the selected DIMD candidate is a wide... w And the height is h And use intra-frame prediction mode IPM For adjacent blocks in the encoding and decoding process, the number of occurrences of the IPM in the associated block is calculated as follows: The occurrence count of this specific IPM is accumulated over all considered neighboring blocks (e.g., adjacent spatial neighboring blocks and / or non-adjacent spatial neighboring blocks).
[0264] In some examples, up to a predetermined number (e.g., 5) of the angle IPMs with the highest amplitude (representing the highest number of occurrences) in the HoC can be selected and mixed together with the planar mode to obtain OBIC predictors for generating prediction blocks for encoding and decoding the current block (e.g., DIMD predictors based on the generated HoC).
[0265] In some examples, some IPMs used by neighboring blocks include more than one intra-mode for prediction, such as DIMD using up to 5 angular modes, Template-based Intra-Mode Derivation (TIMD) using up to 2 modes, Spatial Geometry Partitioning (SGPM) using 2 modes, or OBIC using up to 5 angular modes. In these examples, all intra-modes of such blocks are considered in histogram generation. However, neighboring blocks encoded using non-angular modes such as IntraTMP, IBC, or Matrix-based Intra-Prediction (MIP) are not selected and are not used to generate HoCs. In some examples, the weights used in generating OBIC predictors can be calculated similarly to those of regular DIMD modes, and can differ only in that the gradient values from the template are replaced with occurrence values associated with the selected IPMs from the HoC. In some examples, if the encoder selects an OBIC mode, the encoder can signal the use of the OBIC mode as a sub-mode of DIMD using a flag at the block or prediction unit level. The decoder can parse this flag from the bitstream and derive the OBIC predictor.
[0266] Figure 22A Examples are shown of IPM information (e.g., DIMD information) previously used to determine (e.g., generate, reconstruct, predict) said block from a plurality of (previously reconstructed) adjacent blocks from a block (e.g., block 0) according to some embodiments. Figure 22B The diagram illustrates how, when the block is encoded and decoded using MIMD mode, IPM information from multiple adjacent blocks is combined to generate a graphical representation of the MHoG. In contrast, Figure 22C The diagram illustrates how IPM information from multiple adjacent blocks is combined to generate a graphical representation of the HoC when the block is encoded and decoded using OBIC mode.
[0267] In both OBIC mode and MIMD mode, the codec (e.g., Figure 2 encoder in Figure 3 The decoder in the code obtains (e.g., accesses, collects, receives) IPM information from multiple (previously reconstructed) adjacent blocks (e.g., block 1, block 2, and block 3) and generates information for generating prediction blocks to encode and decode said block (e.g., block 0). For example, as Figure 22AAs shown, the codec obtains first IPM information from block 1, which includes HoG information such as the amplitudes of IPM 1, IPM 7, IPM 9, IPM 13, and IPM 17. For example, the codec obtains second IPM information from block 2, which also includes HoG information such as the amplitudes of IPM 7, IPM 9, and IPM 13. For example, the codec obtains third IPM information from block 3, which includes HoG information such as the amplitudes of IPM 1, IPM 7, IPM 9, IPM 13, and IPM 17.
[0268] like Figure 22B As shown, if the block is encoded and decoded using MIMD mode, the codec can combine the amplitudes of the same IPM from the first IPM information, second IPM information, and third IPM information corresponding to the respective blocks 1-3 to generate MHoG 2202. For example, the codec determines the amplitude of IPM 1 in MHoG 2202 by adding all the amplitudes of IPM 1 from blocks 1-3. Similarly, the codec determines the amplitude of IPM 7 in MHoG 2202 by adding all the amplitudes of IPM 7 from blocks 1-3. Likewise, the codec determines the amplitude of IPM 9 in MHoG 2202 by adding all the amplitudes of IPM 9 from blocks 1-3. Furthermore, the codec determines the amplitude of IPM 13 in MHoG 2202 by adding all the amplitudes of IPM 13 from blocks 1-3. Furthermore, the codec determines the amplitude of IPM 17 in MHoG 2202 by summing all amplitudes of IPM 17 from blocks 1-3. In some implementations, using various techniques described above (e.g., MIMD), the codec determines (e.g., generates, reconstructs, predicts) block 0 based on MHoG 2202. For example, a prediction block can be generated based on MHoG 2202 for encoding and decoding the current block. For example, the encoder can signal a residual block in the bitstream indicating the difference between the prediction block and the current block. For example, the decoder can obtain the residual block from the bitstream and combine it with the prediction block generated in the same manner at the encoder to reconstruct the current block.
[0269] like Figure 22CAs shown, if the block is encoded and decoded using OBIC mode, the codec can combine the occurrence counts of the same IPM from the first IPM information, second IPM information, and third IPM information corresponding to the respective blocks 1-3 to generate HoC 2204. For example, the codec determines the amplitude (occurrence count) of IPM 1 in HoC 2204 by adding the sizes of blocks 1 and 3, where each uses at least IPM 1 encoding and decoding. Similarly, the codec determines the amplitude (occurrence count) of IPM 7 in HoC 2204 by adding the sizes of blocks 1, 2, and 3. Similarly, the codec determines the amplitude (occurrence count) of IPM 9 in HoC 2204 by adding the sizes of blocks 1, 2, and 3. Furthermore, the codec determines the amplitude (occurrence count) of IPM 13 in HoC 2204 by adding the sizes of blocks 1, 2, and 3. Furthermore, the codec determines the magnitude (occurrence count) of IPM 17 in HoC 2204 by adding the sizes of block 1 and block 3. Here, since the second IPM information does not indicate IPM 1 and IPM 17, the size of block 2 is not used to determine IPM 1 and 17. In some examples, using the various techniques disclosed above, the codec determines (e.g., generates, reconstructs, predicts) block 0 based on HoC 2204.
[0270] Another decoding-side technique for enhancing DIMD is based on using a list of merge candidates (e.g., intra-frame merge candidates) generated identically at the encoder and decoder, and signaling an index indicating which merge candidate from that list should be used to encode or decode the current block. Each merge candidate can contain IPM information from one or more of the adjacent reconstructed blocks relative to the current block. This process is called intra-frame merge mode, or equivalently, DIMD merge list mode.
[0271] Figure 23 An example flowchart 2300 is shown for deriving an intra-merging mode (e.g., also referred to as an intra-merging list) according to some embodiments. Flowchart 2300 includes a block 2302 in which the intra-merging list is derived, and a block 2304 in which DIMD parameters for intra-merging candidates selected from the list are derived. For example, these DIMD parameters may include the mode to be merged (e.g., DIMD mode), weights, and indications of positional dependencies. The operation of flowchart 2300 can be performed by an encoder (such as, for example, ...). Figure 2 The encoder 200 in the code or the decoder (such as, for example, Figure 3 The decoder 300 in the middle is executed.
[0272] Box 2302 may include several operations, shown as boxes 2306-2314, each operation adding a family of intra-merge candidates to the intra-merge candidate list. These intra-merge candidates are obtained from spatially adjacent blocks (e.g., intra-blocks) selected from the current block based on different selection criteria, from combinations of existing IPM information in the list, or from configured default IPM information. In the example implementation, the intra-merge candidates in the intra-merge candidate list are arranged as a list or table; however, embodiments are not limited to a specific arrangement structure of the intra-merge candidates.
[0273] At box 2306, consider adding intra-merge candidates from spatially adjacent block families to the intra-merge candidate list. For example, as per [reference to...] Figure 15A As explained, the block family can contain spatially adjacent blocks corresponding to the adjacent samples of the current block. In some examples, intra-merge candidates from spatially adjacent blocks can be added to the intra-merge candidate list in the order of inclusion of the blocks corresponding to the left sample (L), top sample (A), top-left sample (AL), top-right sample (AR), and bottom-left sample (BL). In some examples, another inclusion order can be used, such as L, A, AR, BL, and AL, or yet another different inclusion order. Blocks in the spatially adjacent block family are also considered in the derivation of the MPM list. At box 2306, 1 to 5 candidates (all spatially adjacent neighbors) can be added to the intra- / DIMD merge candidate list. In order to include the IPM information of a particular spatial block in the intra-merge candidate list, the block must at least already have (e.g., during the reconstruction of the block in the current frame) the IPM information derived for that block. IPM information can be derived for blocks using DIMD parameters, such as MIMD modes (e.g., DIMD HoG merge mode), intra-merge mode, DIMD mode, OBIC mode, intra-prediction mode, or MPM list derivation. In some examples, a merge candidate is added to the intra-merge candidate list only if the corresponding neighboring block is encoded or decoded based on DIMD or another intra-prediction mode using DIMD parameters. In some cases, such as when none of the adjacent spatial neighboring blocks are reconstructed using a mode utilizing DIMD parameters (e.g., DIMD mode, MIMD mode, intra-merge mode (e.g., DIMD merge list mode), OBIC mode, intra-prediction mode, MPM list derivation, etc.), at box 2306, a spatial adjacency candidate is not added to the intra-merge candidate list.
[0274] At box 2308, intra-merge candidates from the spatially non-adjacent block family of the current block are added to the intra-merge candidate list. The positions and inclusion order of intra-merge candidates of non-adjacent candidates in the same frame as the current block can conform to a predetermined sequence, such as... Figure 21The sequence shown in . Figure 21 The pattern and sequence of blocks indicated in the code are the same as those defined for inter-frame merge prediction candidates in some implementations.
[0275] Figure 21 The numbers 1-5 shown refer to the spatially adjacent neighbors of the current block (shown in shaded order) L, A, AR, BL, and AL, which have already been added to the merge candidate list at box 2306 or otherwise considered for inclusion in the merge candidate list, and therefore may not be considered at box 2308. At box 2308, the corresponding IPM information of the block sequence indicated by sample positions 6-23 may be considered for inclusion in the intra-frame merge candidate list. Figure 21 As shown, the non-adjacent neighboring blocks corresponding to (e.g., containing) sample positions 6-23 that are considered for inclusion in the intra-frame merge candidate list can be arranged in the frame along the left horizontal direction, the top vertical direction, the top left diagonal direction, the top right diagonal direction, and the bottom left diagonal direction.
[0276] Similar to determining whether to include spatially adjacent blocks in the intra-merge candidate list, in order to include the IPM information of a specific spatially non-adjacent block in the intra-merge candidate list, the block must have already been encoded / decoded using DIMD, or at least have IPM information derived for that block. In some examples, an intra-merge candidate is added to the intra-merge candidate list only if the corresponding neighboring block is reconstructed based on DIMD or another intra-prediction mode using DIMD parameters. In some cases, such as when none of the spatially non-adjacent blocks are reconstructed using a mode utilizing DIMD parameters, at box 2308, a spatially non-adjacent candidate is not added to the intra-merge candidate list.
[0277] At 2310, the merge candidate families from the history-based table of IPM information are added to the intra-merge candidate list. For example, one or more intra-merge candidates (e.g., a predetermined number) from the history-based table can be added to the intra-merge candidate list. For example, a predetermined number of recently encoded / decoded blocks from the history-based table can be selected.
[0278] A history-based table can be maintained to contain a predetermined number of the most recently encoded intra-frame blocks that used IPM information. In some examples, this history-based table can be updated whenever an intra-frame block (e.g., a CU) is encoded using a DIMD process, such as when IPM information is derived (e.g., using DIMD mode, or MPM-based mode, or based on the direction derived from DIMD, or MIMD mode, or intra-frame merge mode, or OBIC mode). This table contains a limited number of IPM information entries from previously encoded blocks and does not contain any duplicate IPM information.
[0279] For a specific spatial block's IPM information to be included in a history-based table, the block must have already been encoded / decoded using DIMD, or at least have IPM information derived for that block. IPM information can be derived for a block for encoding / decoding based on DIMD or another intra-prediction mode using DIMD parameters. In some examples, IPM information entries are added to the history-based table only if the corresponding neighboring block was reconstructed based on DIMD or another intra-prediction mode using DIMD parameters.
[0280] In some embodiments, spatial adjacent blocks and spatial non-adjacent blocks of the current block may have been considered in a predetermined inclusion order (e.g., based on boxes 2306 and 2308), and only the IPM information of spatial blocks that are neither spatial adjacent blocks nor spatial non-adjacent blocks according to the predetermined inclusion pattern is added to the history-based table.
[0281] In some examples, when a new IPM information entry is inserted into a history-based table, a constrained First-In-First-Out (FIFO) rule can be applied, where a redundancy check is first applied to determine if the same IPM information already exists in the table. If found, the entry with the same IPM information is removed from the table, and all entries after that entry are shifted forward in FIFO order, with the new IPM information inserted as the last entry. The table can be reset at intervals, such as, for example, at the beginning of each CTU row. This reset can be performed due to hardware constraints. This reset can also help ensure that only the nearest neighboring block is in the table. In some implementations, the history-based table of IPM information can be analogous to the history-based table of motion vectors (HMVP) in the block-based Advanced Motion Vector Predictor (AMVP) mode used for inter-frame prediction in VVC.
[0282] Figure 24A flowchart 2400 illustrates an example process for generating a history-based table of intra-frame merge candidates according to some embodiments. The operations of flowchart 2400 can be performed identically at both the encoder (e.g., encoder 200) and the decoder (e.g., decoder 300). Flowchart 2400 begins at box 2402 when the current block is considered as a merge candidate. The current block can be considered as a merge candidate based on whether it is encoded or decoded using DIMD or another intra-frame mode in which IPM information is derived. At box 2402, it is determined whether the IPM information to be added (to the merge candidate) already exists in the table. If it is determined at box 2402 that the IPM information to be added is not in the table, then at box 2406, it can be determined whether the table is full. This determination can be based on a maximum size threshold pre-configured for the history-based table. If the table is not full, then at box 2410, the IPM information of the merge candidate can be added to the history-based table.
[0283] If the IPM information to be added (e.g., DIMD information) is determined to be in the table at box 2402, then at box 2404, the duplicate IPM information of the existing merge candidate in the historical table is already in the table and is removed from the table.
[0284] If it is determined at box 2406 that the history-based table is full, then at box 2408, remove the oldest entry from the table.
[0285] Following box 2404 or box 2408, at box 2412, the entries in the table that follow the removed entry are shifted up or upward sequentially (e.g., according to a FIFO sequence). After rearranging the list entries at box 2412, at box 2410, the new IPM information for the merged candidate is added to the table as the last entry.
[0286] Based on the example inclusion order, after considering intra-merge candidates derived from spatially adjacent and spatially non-adjacent blocks of the current block, intra-merge candidates derived from IPM information in the history-based table are added to the intra-merge candidate list.
[0287] Return to Figure 23In some embodiments, at block 2312, a set of combined intra-merging candidates is added to the intra-merging candidate list. In some examples, one or more combined intra-merging candidates may be added to the intra-merging candidate list based on existing intra-merging candidates in the list (and their corresponding IPM information), such as intra-merging candidates considered and selected from one or more of the families of intra-merging candidates described above with respect to blocks 2306-2310. In some examples, combined intra-merging candidates may be generated based on IPM information combined from intra-merging candidates already in the intra-merging candidate list. In some examples, intra-merging candidates already in the list but combined based on other intra-merging candidates in the list are not used to derive further combined intra-merging candidates.
[0288] In some examples, the IPM information corresponding to the HoGs of at least two intra-merge candidates from the intra-merge candidate list is combined to create a new combined HoG. The blending mode and weights are then derived from this new combined HoG to obtain the IPM information of the new intra-merge candidates. For example, the IPM information of at least two merge candidates (e.g., magnitudes of the same IPM) can be averaged to generate an MHoG, and the blending mode and weights are derived from this MHoG in a manner similar to the blending mode derivation in DIMD and MIMD, such as regarding... Figures 19-20 As described. In some examples, taking into account new combined intra-frame merge candidates, positional dependency can be set, for example, diagonally (e.g., indicated by a predetermined value of 0) as a default value, or can be set accordingly based on the blending mode, i.e., setting a vertical positional dependency for a vertical blending mode, or setting a horizontal positional dependency for a horizontal blending mode.
[0289] In some examples, multiple combined intra-merge candidates can be derived, and the multiple combined intra-merge candidates include two or more of the following: candidates derived from the first and second intra-merge candidates in the intra-merge candidate list; candidates derived from the first and third intra-merge candidates in the intra-merge candidate list; candidates derived from the second and third intra-merge candidates in the intra-merge candidate list; candidates with vertical position dependence derived from the first two intra-merge candidates in the intra-merge candidate list; candidates with horizontal position dependence derived from the first two intra-merge candidates in the intra-merge candidate list; and / or candidates derived from the IPM information of all spatially adjacent blocks of the current block.
[0290] In some implementations, if a combined intra-merge candidate cannot be derived, it is not added to the list. For example, if there are only two candidates in the intra-merge candidate list before adding the combined merge candidate, the second combined candidate derived from the first and third candidates can be skipped because there is no third merge candidate.
[0291] According to some embodiments, at box 2314, a set of default intra-merge candidates are added to the intra-merge candidate list.
[0292] In some examples, one or more default IPM information entries are added as intra-frame merge candidates to the intra-frame merge candidate list. For example, the DIMD parameters of two example default IPM information entries are shown in Table 1 below.
[0293]
[0294] Table 1: Example Default DIMD Parameters. This table shows default mode 0 and default mode 1, each specifying a set of predetermined DIMD parameters. One or more intra-frame merge candidates with predetermined default IPM information (e.g., the DIMD parameters specified in Table 1 above) can be added as one or more default merge candidates to the intra-frame merge candidate list.
[0295] In some examples, the addition of combined intra-merge candidates (if any), optionally followed by the addition of default intra-merge candidates, completes the addition of merge candidates to the intra-merge candidate list.
[0296] The operation at box 2302 (which includes boxes 2306-2314 and generates the intra-merge candidate list) can be identical at both the encoder and decoder. After box 2302 is completed (i.e., the intra-merge candidate list is constructed), at box 2304, the mode, weights, and positional dependencies of the merge are derived. At the encoder, this may involve determining the best intra-merge candidate in the candidate list based on the cost difference (e.g., SAD, SATD, etc.) between the predicted block obtained using the DIMD predictor and the current block and / or based on the rate-distortion optimization (RDO cost) of each intra-merge candidate starting from the top of the candidate list (e.g., the lowest SAD, SATD cost). An index pointing to the position of the best (selected) intra-merge candidate in the candidate list is determined. Subsequently, in some examples, the selected predictor can be added to the MPM list. If the current block is predicted by the DIMD predictor and encoded based on the DIMD prediction for transmission, the DIMD enable flag and this index can be transmitted in the bitstream.
[0297] At the decoder, box 2304 may contain one or both of the following: a DIMD enable flag or an index pointing to a list of intra-merging candidates to resolve the bitstream. This index can be used to obtain a selected intra-merging candidate from which the DIMD predictor is derived.
[0298] The DIMD merging mode has the advantage of utilizing available neighbor information (e.g., particularly IPM / DIMD information derived for spatially adjacent blocks) to better adapt to the signal characteristics of the current block to be predicted.
[0299] In some examples, the intra-frame merging modes discussed above (e.g., DIMD merge list mode), OBIC mode, and MIMD are designed as DIMD sub-modes; that is, these modes are only signaled when the DIMD function is activated. Accordingly, if the encoder selects one of these three modes to generate the current block prediction, a DIMD flag is activated to indicate that a DIMD mode is used. Since these three modes are DIMD sub-modes whose use depends on the activation of the DIMD mode, using basic signaling will reduce compression efficiency. For example, a flag could be used for each sub-mode to indicate whether such a sub-mode has been selected. Including the DIMD flag, there would be a total of four flags. As a result, whenever one of these DIMD modes is selected, all four flags are signaled and decoded. These drawbacks may lead to reduced coding efficiency and competitiveness of DIMD compared to other intra-frame modes.
[0300] Embodiments of this disclosure relate to improved signaling for DIMD modes and sub-modes. As used herein, conventional DIMD modes and sub-modes, such as intra-frame merging modes (e.g., DIMD merge list modes), OBIC modes, and MIMD, are collectively referred to as "DIMD modes". Improved signaling can reduce the number of bits used to signal the DIMD mode used for each block, thereby improving coding efficiency. These and other features of this disclosure will be further described below.
[0301] This disclosure provides an example embodiment of a technique for adaptive DIMD mode signaling for blocks. More specifically, the technique relates to using adaptive signaling for DIMD modes to reduce signaling load and improve compression efficiency. Each DIMD submode flag can be included or discarded according to a dedicated activation function for that DIMD submode. The activation function can be determined based on block attributes such as the availability of neighboring blocks, QP, and the stripe type of the current block. The block can be a CU block, PB, or any coding unit used for DIMD-related intra-frame prediction.
[0302] Figure 25A flowchart illustrating an example of an adaptive DIMD mode signaling procedure 2500 based on a DIMD mode activation mechanism is shown. DIMD modes include one or more of regular DIMD modes and DIMD sub-modes, such as intra-frame merging modes (e.g., DIMD merge list mode), OBIC modes, and MIMD modes. The method in this flowchart may include several operations, such as 2502-2520, each of which can be processed to determine the DIMD mode to be used for predicting or reconstructing the current block. Procedure 2500 can be implemented in an encoder or decoder.
[0303] Process 2500 begins at 2502 by verifying whether the DIMD function is enabled or activated. For the encoder, the intra-prediction mode for the current block has already been selected. Therefore, the encoder can determine whether the DIMD function is enabled based on the determination made when selecting the intra-prediction mode for the current block. For the decoder, whether the DIMD function is enabled or activated can be determined based on high-level syntax flags (such as those in the Sequence Parameter Set (SPS)) that have been decoded or parsed from the video bitstream.
[0304] If it is determined at 2502 that the DIMD function is disabled or deactivated, the DIMD mode is disabled and not used in the prediction process, and process 2500 proceeds to 2520. If the DIMD function is enabled or activated, the DIMD flag can be determined at 2504. For the encoder, the DIMD flag can be determined based on the intra-prediction mode selected for the current block. If the selected intra-prediction mode is the DIMD mode, the DIMD flag can be determined to be a value indicating that the DIMD mode is used (e.g., true or 1); otherwise, the DIMD flag can be set to another value indicating that the DIMD mode is not used (e.g., false or 0). The determined DIMD flag can be signaled or encoded into the bitstream. For the decoder, the DIMD flag can be parsed or decoded from the bitstream.
[0305] At 2506, the value of the DIMD flag for the current block is evaluated and used to determine whether DIMD mode is used for the current block. If the DIMD flag indicates that DIMD mode is not used for the current block, no further DIMD-related flags are encoded or parsed. Procedure 2500 proceeds to 2520. If the DIMD flag indicates that DIMD mode is being used for the current block, the signaling for DIMD mode is then determined.
[0306] Therefore, at position 2507, the activation state of the first DIMD sub-mode is determined. In some examples, the activation state of the DIMD sub-mode is determined via an activation function used for that DIMD sub-mode. The activation function can be defined based on the attributes of the current block, such as available neighboring blocks, the block size, the block stripe type, etc. Additional details about the activation function will be provided later. The activation function can be computed in the same way by both the encoder and decoder.
[0307] Based on the activation state of the first DIMD sub-mode determined at 2507, the presence state of the first flag can be determined at 2508 to indicate whether the first flag is present (so as to signal the selected DIMD mode). In some examples, the first flag alone indicates whether the first DIMD sub-mode is used. In other examples, the first flag is combined with one or more other flags to indicate whether the DIMD sub-mode is used. If the presence state indicates that the first flag is present, the value of the first flag is determined at 2510.
[0308] For the encoder, the first flag can be determined based on the DIMD mode selected for the block and the signaling scheme used. For example, if the first flag specifically indicates the use of a first sub-DIMD mode, then the first flag can be determined based on whether that sub-DIMD mode has been selected for the block. If not, the first flag can be determined to be "false", "0", or any other value agreed upon between the encoder and decoder; otherwise, the first flag can be determined to be "true", "1", or another value. For example, Table 1 illustrates a signaling scheme in which a flag is used for each DIMD sub-mode to indicate the use of the corresponding DIMD sub-mode.
[0309] Table 1. Example DIMD signaling scheme
[0310] In this example, the first flag alone indicates the use of the first DIMD subpattern by the current block. If the first DIMD subpattern is used by the current block, the first flag has a value of 1; otherwise, it has a value of 0. Similarly, the second flag alone indicates the use of the second DIMD subpattern by the current block. If the second DIMD subpattern is used by the current block, the second flag has a value of 1; otherwise, it has a value of 0. Other flags indicate their respective DIMD subpatterns in a similar manner. Note that values 0 and 1 are listed only as example flag values, and other values can be used to indicate whether a DIMD subpattern is used.
[0311] Figure 26An example of another signaling scheme is shown. In this example, flags used to signal the DIMD mode of the current block form a flag tree 2600. The root of the flag tree 2600 is a DIMD flag indicating whether a DIMD mode is used for the current block. Each leaf of the flag tree 2600 is associated with a DIMD mode decision (no DIMD mode or a specific DIMD mode). If a DIMD flag has a value of 0, it means that no DIMD mode is used for the current block; if a DIMD flag has a value of 1, it means that a DIMD mode is used for the current block. In the latter case, additional flags are used to signal the DIMD mode used by the current block. For example, in Figure 26 In this example, if the first flag, i.e., flag 1, has a value of 1, then the first DIMD sub-pattern is used. If the first flag has a value of 0, then the second flag, i.e., flag 2, is used to signal the DIMD pattern, and so on. Similarly, if flag 2 has a value of 1, then the second DIMD sub-pattern is used. If the second flag has a value of 0, then the third flag, i.e., flag 3, is used to signal the DIMD pattern. In this example, the first to third flags are associated with the corresponding DIMD sub-patterns.
[0312] Figure 27 An example of another signaling scheme is shown. In this example, flags used to signal the DIMD mode of the current block form a flag tree 2700. Similar to flag tree 2600, the root node is the DIMD flag, and each leaf is associated with a DIMD mode decision. Unlike flag tree 2600, two of the first to third flags are used to identify the DIMD mode. For example, flag 1 and flag 2 together determine whether the first or second DIMD mode is used. Similarly, flag 1 and flag 3 together determine whether the third or fourth DIMD mode is used. In this example, the value of the first flag can be determined based on the DIMD mode and signaling scheme selected for the current block. For example, according to... Figure 27 The signaling scheme in the code assumes that the first DIMD mode is DIMD submode 1. If the activation status of DIMD submode 1 indicates that DIMD submode 1 is activated (at 2507), then the presence of flag 1 can be determined according to signaling scheme 2700 (so that DIMD submode 1 can be signaled if it is being used). The value of flag 1 can be determined at 2510 based on whether the encoder is using DIMD submode 1. If DIMD submode 1 is used, flag 1 has a value of 0. If DIMD submode 1 is not used but DIMD submode 2 is used instead, the value of flag 1 is also 0. In either case, an additional flag (e.g., flag 2) needs to be signaled to identify the DIMD mode used.
[0313] On the decoder side, the decoder can determine the value of flag 1 by parsing the bitstream.
[0314] At 2512, it is determined whether the value of the first flag identifies the DIMD mode used by the current block. If so, the signaling or decoding of the additional flags used for the DIMD mode can be skipped, thereby reducing the number of bits used for signaling the DIMD mode and improving coding efficiency. In the example above, if the first flag has a value of 1, then the first flag shown in Table 1 can identify the use of the first DIMD sub-mode. Similarly, if the first flag has a value of 1, then... Figure 26 The first flag shown, flag 1, indicates that the first DIMD sub-mode has been used. As a result, the signaling of other flags can be skipped, and process 2500 proceeds to 2520.
[0315] If the value of the first flag cannot identify the DIMD pattern, additional flags may be required. (See Table 1 and...) Figure 26 In the example shown, if flag 1 has a value of 0, the DIMD mode for the current block cannot be recognized, and process 2500 proceeds to 2514. Figure 27 In the example shown, neither value of flag 1 can identify the DIMD mode used for the current block, so 2514 is executed.
[0316] At 2514, the activation state of the second DIMD sub-mode is determined. Similar to 2507, the activation state of the second DIMD sub-mode is determined via its activation function. Based on the activation state of the second DIMD sub-mode, the presence state of the second flag can be determined at 2516 to indicate whether the second flag is present (so as to signal the selected DIMD mode). Similar to the first flag, in some examples, the second flag alone indicates whether the second DIMD sub-mode is used. In other examples, the second flag is combined with one or more other flags to indicate whether the second DIMD sub-mode is used. For example, in Table 1 and... Figure 26 In the example, if the activation function of the second DIMD sub-mode indicates that the second DIMD sub-mode is activated, then the second flag exists; otherwise, it does not exist. Figure 27 In the example shown, if the activation function of DIMD submode 2 indicates that DIMD submode 2 is activated, then flag 2 exists (because flag 2 is used together with flag 1 to mark DIMD submode 2); otherwise, it does not exist.
[0317] If a status indicator shows the presence of a second flag, the second flag is determined at 2518. For encoders, the second flag can be determined based on the DIMD mode selected for the block and the signaling scheme used. For example, for Table 1 and Figure 26For the signaling scheme, if DIMD submode 2 is selected by the encoder, flag 2 can be set to 0; otherwise, flag 2 can be set to 1. For Figure 27 In the signaling scheme, if DIMD submode 2 is selected, flag 2 can be set to 1 (and flag 1 can be set to 0 in 2512). For the decoder, the value of flag 2 can be determined by parsing the bitstream.
[0318] If two DIMD sub-modes exist and the second flag is absent, process 2500 proceeds from 2516 to 2520. At 2520, the current block can be encoded based on the mode corresponding to the DIMD flag, flag 1 (if present), and flag 2 (if present). For example, if at 2502 the DIMD flag indicates that the DIMD function is not enabled, an intra-frame mode other than the DIMD mode is used to encode and decode the current block. Similarly, if at 2506 the DIMD flag indicates that the DIMD mode is enabled but not used, an intra-frame mode other than the DIMD mode can be used to encode and decode the current block. If the DIMD mode is used and at 2512 the value of flag 1 identifies the DIMD mode used for the current block, the identified DIMD mode can be used to encode and decode the current block. If both flag 1 and flag 2 exist, the DIMD mode identified by the combination of flag 1 and flag 2 can be used to encode and decode the current block. If neither flag 1 nor flag 2 exists, a default DIMD mode (such as the regular DIMD mode) can be used to encode and decode the current block.
[0319] Note that in Figure 25 In the example shown, the DIMD pattern contains two DIMD sub-patterns and a regular DIMD pattern. There may be more or fewer than two DIMD sub-patterns. For example, if there are more than two DIMD sub-patterns, additional operations can be performed, such as determining, similar to 2512, whether the values of flag 2 and flag 1 recognize the DIMD pattern. If not, the activation state of another DIMD sub-pattern needs to be determined. Based on this activation state, the presence and value of additional flags are determined in a manner similar to 2508-2512. If only one DIMD sub-pattern exists, 2512-2518 can be omitted.
[0320] It should also be noted that a DIMD submode can be enabled or disabled for the entire sequence or a portion of a sequence by signaling the DIMD submode using SPS, PPS, or high-level syntax flags in the strip header. In this case, the activation state of the DIMD submode is determined based on both the activation function and the high-level syntax flags.
[0321] In some implementations, each DIMD sub-mode can be one of an intra-frame merge mode (e.g., DIMD merge list mode), an OBIC mode, and a MIMD mode, and the different DIMD sub-modes are different.
[0322] As discussed above, at least one DIMD sub-mode can be enabled (activated) or disabled (deactivated) via an activation function defined based on whether the attributes of the current block satisfy one or more conditions. The attributes of the current block may include, for example, CU shape or size, characteristics of adjacent blocks, or the QP of the current block.
[0323] In some examples, conditions in the activation function are defined based on the block shape or size. For example, conditions may include one or more of the following: whether the block's height or width is greater than a threshold (e.g., 32x32), or whether both the height and width are greater than or equal to a threshold (e.g., 8 luminance samples). Conditions may also include: whether the block's width or height is greater than a threshold when the width and height are equal (e.g., 128); whether the block's width or height is less than or equal to a threshold when the width and height are equal (e.g., 64); or whether the block's width or height is greater than a threshold when the width and height are different (e.g., 64).
[0324] In some implementations, the condition can include whether the block has a specific shape. The shape can be defined based on maximum and / or minimum dimensions (such as maximum and minimum width and / or height). If the block's width and / or height is between the minimum and maximum values, the block has a specific shape. Minimum and maximum height / width values can be transmitted in higher-level syntax (such as SPS).
[0325] In some examples, the block shape can be defined by the minimum and / or maximum ratio between the block's width and height. The activation function's condition can include whether the current block's aspect ratio is below the minimum ratio, above the maximum ratio, or between the minimum and maximum ratios.
[0326] As discussed above, DIMD sub-modes (such as intra-merge / DIMD merge list mode, OBIC mode, and MIMD) reuse available information from neighboring blocks to construct specific information (e.g., intra-merge / DIMD merge list, occurrence histogram, merged gradient histogram), which is used to derive IPM / DIMD information for predicting the current block. By merging IPM / DIMD information from multiple neighboring blocks, the derived IPM / DIMD information may be diluted, potentially reducing the prediction efficiency. Therefore, it may be beneficial to adaptively enable or disable DIMD sub-modes based on neighborhood information (such as the number of neighboring blocks used, the distance between neighboring blocks and the current block, etc.). For example, the condition in the activation function could include whether a minimum number (e.g., 3) of available neighboring blocks are available for reuse to derive the IPM / DIMD information for the current block. If this minimum number of neighboring CU blocks is not reached, the DIMD sub-mode is not activated.
[0327] In another example, the condition could include whether the number of available neighboring blocks for deriving the IPM / DIMD information for the current block is less than a maximum number (e.g., 5). If that maximum number of neighboring blocks is reached, the DIMD sub-mode is not activated.
[0328] In a further example, the activation function's condition could include whether the number of neighboring blocks available for deriving IPM / DIMD information for the DIMD sub-pattern is higher than, lower than, or equal to a threshold. For example, the DIMD sub-pattern is activated if the number of available neighboring blocks is greater than 3 (or less than 6, or greater than 2 and less than 6).
[0329] In some examples, the activation function conditions for the corresponding DIMD submode can be defined based on the quantization parameters of the current block. The use and signaling of DIMD submodes can be adaptively enabled or disabled using minimum thresholds, maximum thresholds, or both of the minimum and maximum thresholds for the quantization parameters. . As an example, the DIMD submode is activated if the quantization parameter of the current block is higher than the minimum threshold (e.g., 17 or 23). The DIMD submode is activated if the quantization parameter of the current block is lower than the maximum threshold (e.g., 43 or 37).
[0330] In some examples, the activation function for the corresponding DIMD submode can be defined based on the current strip type, such as INTRA, unidirectional prediction image, or bidirectional prediction image. For example, if the current strip is a bidirectional prediction strip, the activation function can determine that the DIMD submode is deactivated; otherwise, the DIMD submode is activated.
[0331] The activation function may include one or more of the conditions discussed above. If one or more conditions are met, the activation function determines that the corresponding DIMD sub-mode is activated. In other implementations, the activation function determines that the corresponding DIMD sub-mode is activated if one or more conditions are not met. In a further implementation, the activation function determines that the corresponding DIMD sub-mode is activated if some of the one or more conditions are met while others are not. For example, the conditions of the activation function may include multiple conditions based on QP and stripe type. For example, if the quantization parameter of the current block is greater than 13, the activation function may indicate that the DIMD sub-mode is activated. If the quantization parameter of the current block is less than 39, the activation function may indicate that the DIMD sub-mode is activated. If the current block belongs to an INTRA stripe or if the current block belongs to a prediction stripe, the activation function may indicate that the DIMD sub-mode is activated.
[0332] Figure 28 A flowchart 2800 illustrates an example of an adaptive DIMD mode signaling process based on a DIMD mode activation mechanism at the encoder. The method of flowchart 2800 may include several operations, such as 2802-2812, each of which can be processed to determine the signaling selected for predicting the DIMD mode for the current block. Flowchart 2800 can be implemented in the encoder after the encoder has determined that DIMD is used for the current block and that a DIMD mode has been selected for the current block.
[0333] Flowchart 2800 begins at 2802, where the encoder can encode the DIMD instruction used to encode or decode the current block. This instruction can be, for example, as described above regarding... Figure 25 The DIMD flags discussed. At 2804, the encoder can determine the presence of the first flag based on this indication and the activation state of the DIMD mode for the current block. In some examples, the activation state of the DIMD mode is determined if the indication indicates that DIMD is used for the current block. As mentioned above regarding... Figure 25 In more detail, the encoder can determine the activation state of the DIMD mode based on the attributes of the current block (such as the block size and / or shape, the block stripe type, the availability of adjacent blocks, the block's QP, etc.) via the activation function of the DIMD mode. If the activation state indicates that the DIMD mode is activated for the current block, the encoder can determine the presence state of the first flag as "true" (or any value indicating the presence of the first flag); otherwise, it can determine the presence state as indicating that the first flag does not exist.
[0334] At 2806, the encoder can determine whether to encode the first flag in the video bitstream based on the presence status of the DIMD mode. If the presence status indicates that the first flag is present, the encoder can encode the first flag into the bitstream at 2808. The value of the first flag can be determined based on whether the DIMD mode selected for the current block is the DIMD mode currently being evaluated. For example, if the current DIMD mode is the DIMD mode selected for the block, the value of the first flag can be set to "1", otherwise it is set to "0". Alternatively, if the current DIMD mode is the DIMD mode selected for the block, the value of the first flag can be set to "0", otherwise it is set to "1". In some implementations, the value of the first flag is determined according to the signaling scheme (such as Table 1, ...). Figure 26 or Figure 27 The signaling scheme shown in the figure is used to set it.
[0335] If the encoder determines at 2806 that the first flag is not encoded in the bitstream, the encoder can proceed to encoding the next bit in the bitstream at 2810 without encoding the first flag. The next bit can be a next flag used to signal the next DIMD mode, or a bit containing information unrelated to the DIMD mode. At 2812, the encoder can encode the current block using the DIMD mode corresponding to the determination of whether the first flag is encoded. In other words, if it is determined that the first flag is not encoded in the bitstream, the DIMD mode used to encode the current block is a mode that does not require the first flag to signal. If it is determined that the first flag is encoded in the bitstream, the DIMD mode used to encode the current block is a mode whose signaling includes the first flag.
[0336] Figure 29 A flowchart 2900 illustrates an example of an adaptive DIMD mode signaling process based on a DIMD mode activation mechanism at the decoder. The method in flowchart 2900 may include several operations, such as 2902-2912, each of which can be processed to determine the signaling for the DIMD mode selected to reconstruct the current block. Flowchart 2900 begins at 2902, where the decoder obtains an indication from the video bitstream of the DIMD mode used to encode the current block. (This is related to the above...) Figure 28 The instructions discussed in section 2802 are similar, and the instructions may be, for example, those mentioned above regarding Figure 25 The DIMD flag under discussion. The decoder can determine whether DIMD is enabled for a block, and obtain this indication can be based on determining that DIMD is enabled.
[0337] At 2904, the decoder can determine the presence of the first flag in the bitstream based on this indication and the activation state of the DIMD mode for the current block. In some examples, the activation state of the DIMD mode is determined if the indication indicates that DIMD is used for the current block. (See above regarding...) Figure 25 In more detail, the decoder can determine the activation state of a DIMD mode via an activation function, similar to the encoder. For example, the activation function can be based on attributes of the current block, such as the block's size and / or shape, the block's stripe type, the availability of neighboring blocks, the block's QP, etc. The decoder can determine the activation state of a DIMD mode based on determining whether one or more attributes satisfy one or more conditions of the DIMD mode. In some examples, the one or more conditions include: the size of the CU containing the block is equal to, less than, or greater than one or more of a threshold CU size. This condition may also specify that the height and width of the CU are different or the same. In further examples, the one or more conditions may include: the number of available neighboring blocks of the block that can be used to derive IPM / DIMD information is equal to, less than, or greater than one or more of a neighboring block number threshold. The one or more conditions may also include: the block's quantization parameter (QP) value is equal to, less than, or greater than one or more of a threshold QP value; the block's stripe type belongs to or does not belong to a predetermined set of stripe types, etc. In some examples, determining the activation status of a DIMD mode can also be based on a syntax value for a video partition, which indicates that the first DIMD mode is activated for a block. This partition can be a sequence, frame, or stripe of video, and the syntax value can be in the SPS, frame header, or stripe header.
[0338] If the activation state indicates that the DIMD mode is activated for the current block, the decoder can determine the presence state of the first flag as true or another value indicating the presence of the first flag; otherwise, it can determine the presence state as indicating that the first flag does not exist in the bitstream.
[0339] At 2906, the decoder can determine whether the first flag is in the bitstream based on the presence status of the DIMD mode (and thus determine whether to decode the first flag from the bitstream). If the presence status indicates that the first flag is present, the decoder can decode (or parse) the first flag from the bitstream at 2908. The value of the first flag can be used to determine the DIMD mode used to encode the current block according to the signaling scheme. For example, if a separate flag is used to signal each DIMD mode, the value of the decoded or parsed first flag can be used to determine whether the DIMD mode signaled by the first flag is used. In another example, such as Figure 26In the signaling scheme shown, if the first flag being decoded has a value of "1", the decoder can determine that DIMD submode 1 is being used; otherwise, the decoder will need to decode (or parse) more flags from the bitstream to identify the DIMD mode used by the encoder. For Figure 27 In the signaling scheme shown, the decoder will need to decode (or parse) at 2910 from the bitstream at least one more flag in order to identify the DIMD mode used by the encoder. In some examples, a DIMD mode is associated with multiple DIMD modes, including a first DIMD mode, a second DIMD mode, and a third DIMD mode. Based on the value of the first flag being a first predetermined value, the decoder can determine the DIMD mode as either the first DIMD mode or the third DIMD mode even if the activation state of the second DIMD mode of the undetermined block is uncertain.
[0340] If it is determined at 2906 that the first flag is not present in the bitstream, the decoder can proceed to decoding the next bit in the bitstream at 2910 without decoding the first flag. The next bit can be a next flag used to signal the DIMD mode, as discussed above, or a bit containing information unrelated to the DIMD mode. At 2912, the decoder can decode the current block using the DIMD mode corresponding to the determination of whether the first flag has been decoded (or parsed). In other words, if it is determined that the first flag is not present in the bitstream, the DIMD mode is a mode signaled in the absence of the first flag. If it is determined that the first flag is present in the bitstream, the DIMD mode is a mode signaled by the first flag alone or in combination with other flags.
[0341] In examples where there are more flags in the signaling scheme, the decoder can determine the second presence state of the second flag of the block based on the indication and the second activation state of the second DIMD mode, either by not parsing the first flag or by the value of the parsed first flag being a predetermined value. The decoder can then determine whether to parse the second flag from the bitstream based on the second presence state. In these examples, the DIMD mode is determined based on the indication, the determination of whether to parse the first flag, and the determination of whether to parse the second flag.
[0342] In some signaling schemes, such as Figure 26 and Figure 27 The signaling scheme shown in the table uses a combination of multiple flags to signal at least one of the DIMD modes. Compared to the signaling scheme shown in Table 1, this type of signaling scheme can reduce the number of bits used to signal the DIMD modes. For example, in Figure 26In DIMD, it's not always the case that four bits are used to signal DIMD modes; some DIMD modes use fewer than four bits. For example, two bits (DIMD flag and flag 1) are used to signal DIMD submode 1, and three bits (DIMD flag, flag 1, and flag 2) are used to signal DIMD submode 2. Figure 27 In this document, three bits are used to signal each DIMD mode. As used herein, the flag used to identify a DIMD mode is called the "DIMD mode identification flag." The DIMD mode identification flag may include Table 1, Figure 26 , Figure 27 And what will be discussed later Figure 30A and Figure 31B The DIMD logo, logo 1, logo 2 and logo 3 are shown.
[0343] Furthermore, the example signaling scheme can apply variable-length signaling, where one DIMD mode can be signaled using more flags (e.g., more bits) than another DIMD mode. If a DIMD mode with a higher probability of being selected for a block is signaled with fewer bits than a DIMD mode with a lower probability of being selected, the total number of bits used to signal DIMD modes for multiple blocks can be further reduced. However, the statistics of the selected DIMD modes may vary depending on the content in the video, video frames, etc. A DIMD mode configured to signal with one flag may have a lower probability of being selected for a block than another DIMD mode configured to signal with, for example, two flags. As a result, more dual-flag DIMD mode signaling may be used in the bitstream than single-flag DIMD mode signaling, leading to more bits being used for DIMD mode signaling. Therefore, using a fixed signaling scheme for different videos or different frames of a video can lead to encoding / decoding inefficiencies. Furthermore, since multiple DIMD modes are mutually exclusive (i.e., only one DIMD mode can be selected for a block), parsing additional DIMD mode identification flags from the bitstream after the first DIMD mode identification flag parsed from the bitstream identifies the DIMD mode for the block increases the bitrate and the computational complexity of the decoder (and encoder).
[0344] To address the aforementioned issues, an adaptive DIMD mode signaling reordering is described, where available DIMD modes are adaptively ordered for each block based on block attributes. In this way, DIMD modes with a higher probability of selection for a block are signaled with fewer bits than DIMD modes with a lower probability of selection. Furthermore, the parsing (and encoding) of DIMD mode identification flags can be configured to terminate after the first DIMD mode identification flag parsed from the bitstream identifies the DIMD mode for the block. This reduces the number of bits and computational cost required to signal DIMD modes for a block, thereby improving coding efficiency.
[0345] Figure 30A It shows the relationship with Figure 26 Similarly, signaling schemes can be used for the adaptive signaling described in this paper. Figure 30A The example shown illustrates the number of bits used to signal the DIMD pattern associated with each leaf. From Figure 30A It can be seen that Leaf 1 uses two bits to signal its associated DIMD mode; Leaf 2 uses three bits; and Leaf 3 and Leaf 4 each use four bits to signal their respective associated DIMD modes. Therefore, to reduce the number of bits used to signal DIMD modes, the DIMD mode associated with Leaf 1 (the first DIMD mode) should be more likely to be selected for a block than the DIMD mode associated with Leaf 2 (the second DIMD mode). Similarly, the DIMD mode associated with Leaf 2 (the second DIMD mode) should be more likely to be selected for a block than the DIMD mode associated with Leaf 3 (the third DIMD mode) and the DIMD mode associated with Leaf 4 (the fourth DIMD mode).
[0346] In some examples, the likelihood of a DIMD mode being selected for a block can be determined based on the occurrence of individual DIMD modes observed so far in the partition (such as a sequence, frame, or stripe) containing the block. For example, an encoder or decoder can determine a count for each DIMD mode. This count indicates how many times the corresponding DIMD mode has been used in a block within the partition of the video that contains the block. DIMD modes can be sorted in descending order of their counts.
[0347] For example Figure 26The signaling scheme shown (where each flag can be used to represent a mode / submode or otherwise associated with a mode / submode) can adaptively determine the signaling order of these modes based on the context ID (used for the context model) of the flags corresponding to these modes (e.g., DIMD flag, OBIC flag, etc.). A “context model” is a probabilistic model of one or more binary bits (bins) used for binarizing symbols. This model can be selected from a set of available models, depending on the statistics of recently encoded / decoded data symbols. The context model stores the probability that each binary bit is “1” or “0”. For example, the context model of a flag can be used to estimate the conditional probability of that flag and can be derived using encoded / decoded flags from neighboring blocks. For example, for a flag with four context models, the context ID of the flag can be the first value (e.g., 0) if none of the neighboring blocks of the current block use the flag. In some implementations, such as in CABAC / CAVLC, neighboring blocks refer to the block above or to the left. If the block above the current block uses this flag, the context ID can be incremented by one (e.g., 1); if the block to the left uses this flag, the context ID can be incremented by two (e.g., 2); and if both the block above and the block to the left use this flag, the context ID can be incremented by three (e.g., 3). Once the context ID of the flag is derived, the corresponding context model can be selected from four context models and used to entropy encode the flag representing the pattern / subpattern of the current block.
[0348] As seen above, the context ID reflects the number of adjacent blocks using the same mode or submode. Therefore, the context ID can be used to determine the signaling order of flags for a mode / submode. For example, signaling for a mode / submode can be ordered based on the order / value of the context ID. For instance, if the context ID of a flag for one mode / submode is less than the context ID of another flag, that flag is ordered after the other flag. In other examples, the signaling order is determined by a specific order of the context IDs. For example, the signaling order can be determined by the sequence {3, 1, 2, 0} of context IDs. In this example, the flag with context ID 3 is ordered before the flag with context ID 1, the flag with context ID 1 is ordered before the flag with context ID 2, and so on. By determining the signaling order of these modes / submodes based on the context ID of the mode / submode, signaling reordering can adapt to the local usage of flags, whereas the occurrence-based method discussed above is based on the number of times the flag has appeared since the start of a partition (e.g., a tile or frame).
[0349] In further examples, context-based mechanisms can be combined with occurrence-based mechanisms to reorder the flags of modes / submodes. When combining these two mechanisms, a relative priority between them can be defined. In some examples, context-based reordering can have a higher priority than occurrence-based reordering. For example, consider three modes / submodes: DIMD regular mode, OBIC mode, and intra-frame merge / DIMD merge list mode, which are initially ordered based on their context IDs. If two modes / submodes have the same context ID, occurrence-based reordering can be used to break the tie and determine the signaling order. For example, if neither the upper nor left adjacent block of the current block uses DIMD regular mode or OBIC mode encoding / decoding, then both modes / submodes have a context ID of zero. In this case, the occurrence counts of the two modes / submodes in the partition can be calculated, and the mode / submode with the higher occurrence count can be signaled before the other. In alternative examples, occurrence-based reordering can be set to have a higher priority than context-based reordering. In these examples, when patterns / subpatterns have the same occurrence count value, the context ID of the pattern / subpattern can be used to determine the order of these patterns / subpatterns. Various other methods can be used to reorder the flags of patterns / subpatterns by combining context-based mechanisms with occurrence count-based mechanisms.
[0350] While the above examples focus on using the context ID of a pattern / sub-pattern to determine the signaling order of these patterns / sub-patterns, the signaling order can be determined based on the encoding patterns of adjacent blocks, either alone or in combination with other metrics such as the number of occurrences. For example, instead of using the context ID, the signaling order can be determined based on the patterns / sub-patterns of adjacent blocks. For instance, if a first pattern / sub-pattern is used to encode / decode N1 adjacent blocks (left or top), and a second pattern / sub-pattern is used to encode / decode N2 adjacent blocks, where N1 > N2, then the first pattern / sub-pattern can be signaled before the second pattern / sub-pattern. In the case where N1 = N2 = 1, the left adjacent block can be given a higher (or lower) priority than the top adjacent block. In other words, the first pattern / sub-pattern used only for encoding / decoding the left adjacent block is given a higher (or lower) priority than the second pattern / sub-pattern used only for encoding / decoding the top adjacent block.
[0351] In other examples, the signaling order in DIMD modes can be adaptively determined based on block attributes, such as block size or shape, block QP, characteristics of adjacent blocks, and block stripe type. For instance, the signaling order can be determined as an order based on one or more conditions being met (or not met). These conditions can be defined based on block attributes. The order can be a predetermined order, such as {regular DIMD mode, intra-frame merge / DIMD merge list mode, OBIC mode, MIMD mode}. This order, along with... Figure 26 , Figure 27 , Figure 30A and Figure 31A The signaling scheme shown is as follows: the first DIMD mode will be the regular DIMD mode; the second DIMD mode will be the intra-frame merge / DIMD merge list mode; the third DIMD mode will be the OBIC mode; and the fourth DIMD mode will be the MIMD mode.
[0352] In some implementations, the signaling order can be adapted to the size and / or shape of the current CU block. As an example, a condition for determining the signaling order could be that, when the width and height are equal, the block's width or height is above a threshold (e.g., 128). If these conditions are met, the signaling order can be determined as {DIMD mode, intra-frame merge / DIMD merge list mode, OBIC mode, MIMD mode}. In other implementations, a condition could be that, when the width and height are equal, the block's width or height is below a threshold (e.g., 64). If these conditions are met, the signaling order can be determined as {OBIC mode, MIMD mode, DIMD mode, intra-frame merge / DIMD merge list mode}. In a further implementation, a condition could be that, when the width and height are different, the block's width or height is above a threshold (e.g., 32). If these conditions are met, the signaling order can be determined as {OBIC mode, MIMD mode, DIMD mode, intra-frame merge / DIMD merge list mode}.
[0353] In some examples, the signaling order can be adapted to the shape of the current block. As an example, a specific shape corresponding to a specific signaling order for a DIMD mode can be signaled (e.g., in high-level syntax) by signaling the maximum and / or minimum dimensions. For instance, the maximum (or minimum) size can be signaled by signaling the maximum (or minimum) width and / or height measured in pixels. Therefore, the condition could be that the block width is between the maximum and minimum width, and the block height is between the maximum and minimum height. If these conditions are met, the signaling order can be determined as {Intra-Frame Merge / DIMD Merge List Mode, OBIC Mode, MIMD, DIMD Mode}.
[0354] Similarly, a block shape can be represented by a shape ratio defined in the dimensions (width or height) of the CU. For example, a shape ratio can be defined as the larger of the width and height divided by the smaller of the width and height, or vice versa. A block shape can be defined by a maximum shape ratio and / or a minimum shape ratio. For example, a block can be considered to have that particular block shape if its shape ratio is lower than the maximum shape ratio of a given block shape, higher than the minimum shape ratio of that block shape, or falls between the maximum and minimum shape ratios of that block shape. In this example, the block shape corresponding to a specific signaling order for a DIMD mode can be signaled by (e.g., in high-level syntax) by signaling the minimum shape ratio and / or the maximum shape ratio. For example, a condition could include that the block's shape ratio falls between (or higher than) the minimum shape ratio and the maximum shape ratio, or lower than the maximum shape ratio. If this condition is met, the signaling order for the DIMD mode can be determined as {Intra-Frame Merge / DIMD Merge List Mode, DIMD Mode, OBIC Mode, MIMD}.
[0355] In some implementations, the DIMD mode signaling order can be adapted to the characteristics of the current block's neighboring blocks. The signaling order can be determined based on one or more of the following: the mode of the neighboring blocks, the IPM / DIMD information of the neighboring blocks, the distance from the neighboring blocks to the current block (e.g., average distance, minimum distance, or maximum distance), the area of the neighboring CU blocks (e.g., average area, minimum area, or maximum area), etc.
[0356] In some implementations, the DIMD mode signaling order can be determined based on the available neighboring IPM / DIMD information for each DIMD mode. The available neighboring IPM / DIMD information can differ for different DIMD modes. Some DIMD modes may consider only the DIMD mode; some may consider all available IPM / DIMD information regardless of neighboring block modes; and other DIMD modes may discard specific neighboring block modes. As an example, if the DIMD mode uses... N The IPM / DIMD information is derived from each of the adjacent blocks (e.g., N=2, 3, or 5), and the OBIC mode uses... M The IPM / DIMD information of each adjacent block is derived, among which M <N MIMD can be signaled before OBIC mode. In some implementations, the N neighboring blocks used by MIMD mode can be blocks encoded using any mode, and the M neighboring blocks used by OBIC mode can also be blocks encoded using any mode. In other implementations, the N neighboring blocks used by MIMD mode are blocks encoded using MIMD mode, and the M neighboring blocks used by OBIC mode are blocks encoded using OBIC mode.
[0357] As another example, if the intra-frame merge / DIMD merge list mode is used N The IPM / DIMD information is derived from each of the neighboring blocks (e.g., N=2, 3, or 5), and the MIMD mode uses... M The IPM / DIMD information of each adjacent block is derived, among which M>N In this case, the intra-frame merging / DIMD merging list mode can be signaled before the MIMD mode. In some implementations, the MIMD mode uses... N Each adjacent block can be a block encoded or decoded using any mode, and the OBIC mode used... M Adjacent blocks can also be blocks encoded or decoded using any mode. In other implementations, the intra-frame merge / DIMD merge list mode uses... N Each adjacent block is a block encoded and decoded using the intra-frame merge / DIMD merge list mode, and the MIMD mode uses... M Each adjacent block is a block encoded and decoded using MIMD mode.
[0358] In some implementations, the DIMD mode signaling order can be adapted to the distance and / or area of available neighboring blocks for each DIMD mode. In some examples, the criteria used to consider a neighboring block as a available neighboring block can vary for different DIMD modes. Some DIMD modes may only consider neighboring blocks encoded by the DIMD mode as available neighboring blocks; some DIMD modes may consider neighboring blocks with IPM / DIMD information as available neighboring blocks, regardless of the neighboring block's mode; other DIMD modes may exclude neighboring blocks encoded using at least one specific mode from being considered as available neighboring blocks. One condition for signaling ordering may be that the average (correspondingly, minimum or maximum) distance between the current block and available neighboring blocks used by the first mode is less than (or greater than) the average (correspondingly, minimum or maximum) distance between the current block and available neighboring blocks used by the second mode. If this condition is met, the first mode may be signaled before the second mode. In another example, a condition for signaling ordering may be that the average (correspondingly, minimum or maximum) area of available neighboring blocks used by a mode is less than (or greater than) the average (correspondingly, minimum or maximum) area of available neighboring blocks used by the second mode. If this condition is met, the first DIMD mode can be signaled before the second DIMD mode.
[0359] In some examples, the DIMD mode signaling order can be adapted based on the quantization parameters (QP) of the current block. A minimum threshold, a maximum threshold, or both of these quantization parameters can be used to adaptively reorder DIMD mode signaling. .For example, a condition for signaling ordering could include the current block's QP being higher than a minimum threshold (e.g., 17 or 23). A condition could also include the current block's QP being lower than a maximum threshold (e.g., 43 or 37). A condition could also include the current block's QP being both higher than the minimum threshold and lower than the maximum threshold. If one or more of these conditions are met, the signaling order can be a predetermined order. Different conditions can lead to different predetermined orders. As an example, if the current block's QP is higher than the minimum threshold, the signaling order could be {OBIC mode, intra-frame merge / DIMD merge list mode, regular DIMD mode, MIMD mode}. If the current block's QP is lower than the maximum threshold, the signaling order could be {OBIC mode, MIMD mode, intra-frame merge / DIMD merge list mode, regular DIMD mode}.
[0360] In some examples, the DIMD mode signaling order can be adapted based on the stripe type of the current block. As an example, and not a limitation, the stripe type can include INTRA, unidirectional prediction image, or bidirectional prediction image. For instance, a condition for the signaling order could be that the stripe type of the current block is a specific stripe type. If this condition is met, the signaling order can be determined to be one order; otherwise, the signaling order can be determined to be another order. As an example, if the stripe type of the current block is bidirectional prediction stripe, the DIMD mode signaling order could be {OBIC mode, MIMD, intra-frame merge / DIMD merge list mode, DIMD mode}.
[0361] It should be understood that the signaling orders listed in the examples above are for illustrative purposes only and should not be construed as restrictive. Other signaling orders may be used when one or more conditions for the signaling order are met. Furthermore, in the examples above, since the signaling order is adaptively determined for each block, the signaling order can vary from one block to another. In some implementations, one or more DIMD modes may have a fixed position in the DIMD signaling when available and may not be reordered.
[0362] As discussed above, activation functions can be used to determine whether a DIMD mode is activated for a block. Furthermore, high-level syntaxes (e.g., SPS, image header, strip header) can also be used to disable DIMD modes. If one or more DIMD modes are determined to be deactivated, the signaling scheme can be updated to reduce the number of bits used to signal the DIMD modes. Figure 30B This shows the behavior after the second DIMD mode is determined to be disabled or deactivated. Figure 30AThe example shown is an updated signaling tree. In this example, leaf 2 (corresponding to the disabled second DIMD mode) can be removed from signaling tree 3000A, resulting in the updated signaling tree 3000B. As shown in signaling tree 3000B, in addition to leaf 2, flag 2 (e.g., the last flag in a set of flags used to signal the mode associated with leaf 2) used to distinguish leaf 2 from other leaves is also removed. As a result, signaling tree 3000B has only three flags: DIMD flag, flag 1, and flag 3. The number of bits used to signal the third and fourth DIMD modes is reduced from 4 to 3.
[0363] Figure 31A It shows the use of with Figure 27 Similarly, another example signaling scheme that can be used for the adaptive signaling described in this paper is the signaling tree 3100A. Figure 31A The diagram shows the number of bits used to signal the corresponding DIMD mode associated with each leaf in the signaling tree 3100A. Figure 31B This shows the behavior after the first DIMD mode is determined to be disabled or deactivated. Figure 31A The example shown is an updated signaling tree. In this example, leaf 1 (corresponding to the disabled first DIMD mode) can be removed from signaling tree 3100A, resulting in the updated signaling tree 3100B. As shown in signaling tree 3100B, in addition to leaf 1, flag 2 (e.g., the last flag in a set of flags used to signal the mode associated with leaf 1) used to distinguish leaf 1 from other leaves is also removed. As a result, signaling tree 3100B has only three flags: the DIMD flag, flag 1, and flag 3. The number of bits used to signal the second DIMD mode is also reduced from 3 to 2. As a result, the total number of bits used to signal the DIMD mode of video blocks can be reduced, thereby improving coding efficiency.
[0364] Figure 32 A flowchart 3200 illustrates an example of a DIMD mode signaling reordering process at the encoder according to some embodiments of the present disclosure. The method of flowchart 3200 may include several operations, such as 3202-3212, wherein each operation may be processed to determine the signaling selected for predicting the DIMD mode of the current block. Flowchart 3200 may be implemented in the encoder after the encoder has already selected the intra-prediction mode for the current block.
[0365] Flowchart 3200 begins at 3202, where the encoder can determine whether DIMD functionality is used or selected. Since the encoder has already selected the intra-prediction mode for the current block, it can thus determine whether the selected intra-prediction mode is a DIMD mode. If it is determined that a DIMD mode is selected, the encoder can determine the signaling order for the available DIMD modes at 3204. As discussed in more detail above, the signaling order can be determined based on one or more attributes of the block. Attributes can include one or more of the following: block size and / or shape, block stripe type, characteristics of available neighboring blocks, block quantization parameters, etc. The encoder can determine a predetermined signaling order based on whether one or more conditions defined on the block's attributes are met or not met.
[0366] At 3206, the encoder can determine a flag for signaling the DIMD mode based on the DIMD mode selected for the block and the signaling sequence determined at 3204. In some implementations, the flag determined at 3206 does not include a DIMD flag indicating whether the DIMD function is enabled. For example, if a signaling scheme (e.g., ...) is used... Figure 26 , Figure 27 , Figure 30A -B and Figure 31A (As shown in -B signaling scheme), the encoder can assign DIMD modes to the leaves of the signaling tree based on the determined signaling order. One or more flags used to signal the selected DIMD mode can be identified from the signaling tree. As an example, using... Figure 30A The signaling scheme is shown, and the signaling order is determined as {Intra-Frame Merging / DIMD Merging List Mode, MIMD Mode, Regular DIMD Mode, OBIC Mode}. If the selected DIMD mode is Intra-Frame Merging / DIMD Merging List Mode (First DIMD Mode), the flag used to signal this mode is "10", and the flag determined at 3206 (Flag 1) has a value of 0. In examples where more flags are needed to signal the selected DIMD mode, the encoder will determine more flags based on the signaling order and signaling scheme. In the example above, if the selected DIMD mode is OBIC Mode (Fourth DIMD Mode), the encoder can determine that the flag used to signal this mode is "1111". In this example, the flag determined at 3206 (Flag 1) has a value of "1".
[0367] At 3208, the encoder can encode the determined flags into the video bitstream. At 3212, the encoder can encode the block into the bitstream using the selected DIMD mode. If it is determined at 3202 that no DIMD mode has been selected for the current block, the encoder can determine one or more signaling flags for the non-DIMD encoding mode selected for the current block. In this case, the block is encoded using the selected non-DIMD encoding mode at 3212.
[0368] Figure 33 A flowchart 3300 illustrates an example of a DIMD mode signaling reordering process at a decoder according to some embodiments of the present disclosure. The method of flowchart 3300 may include several operations, such as 3302-3312, where each operation may be processed to determine the signaling of the DIMD mode selected for reconstructing the current block. Flowchart 3300 begins at 3302, where the decoder may determine whether a DIMD mode has been used for the current block. In some examples, the decoder may obtain an indication from the video bitstream that the DIMD mode used to encode the current block. This indication may be, for example, as described above... Figure 25 The DIMD flags discussed. The decoder can determine whether DIMD was used for a block based on the obtained DIMD flags.
[0369] If it is determined that a DIMD mode is used for the current block, the decoder can determine the signaling order of the DIMD mode for the current block at 3304. Similar to the encoder, the decoder can determine the signaling order based on one or more attributes of the block. Attributes can include one or more of the following: block size and / or shape, block stripe type, characteristics of available adjacent blocks, block quantization parameters, etc. The encoder can determine a predetermined signaling order based on whether one or more conditions defined on the block's attributes are met or not met.
[0370] For example, one or more conditions may include a block size that is equal to, less than, or greater than a threshold block size. The condition may also specify that the block height and width are different or the same. One or more conditions may also include: the number of available neighboring blocks of a block that can be used to derive IPM / DIMD information for a first DIMD pattern is equal to, less than, or greater than the number of available neighboring blocks of a block that can be used to derive IPM / DIMD information for a second DIMD pattern. If the conditions are met, the first DIMD pattern can be ranked before the second DIMD pattern.
[0371] In a further example, one or more conditions include: the number of available neighboring blocks of a block encoded and decoded using a first DIMD mode and used to derive IPM / DIMD information for the first DIMD mode is equal to, less than, or greater than one or more of the number of available neighboring blocks of a block encoded and decoded using a second DIMD tool and used to derive IPM / DIMD information for the second DIMD tool. If the conditions are met, the first DIMD mode can be ranked before the second DIMD mode. In other examples, one or more conditions include: the number of available neighboring blocks of a block used to derive IPM / DIMD information for the first DIMD mode is equal to, less than, or greater than one or more of the area of available neighboring blocks of a block used to derive IPM / DIMD information for the second DIMD mode. If the conditions are met, the first DIMD mode can be ranked before the second DIMD mode.
[0372] In some examples, one or more conditions include: the distance between available neighboring blocks that can be used to derive IPM / DIMD information for a first DIMD mode is equal to, less than, or greater than one or more of the distance between available neighboring blocks that can be used to derive IPM / DIMD information for a second DIMD mode. One or more conditions may also include: the block's quantization parameter (QP) value is equal to, less than, or greater than one or more of a threshold QP value. One or more conditions may also include: the block's stripe type belongs to or does not belong to a predetermined set of stripe types, such as INTRA, unidirectional prediction image, or bidirectional prediction image.
[0373] In alternative or additional examples, the signaling order can be determined by analyzing the count for each DIMD mode. This count indicates the number of times the DIMD mode was used in a block within the partition of the video that contains that block. A partition can be a sequence, frame, or stripe. The signaling order of the DIMD modes can be determined in descending order of their counts.
[0374] At 3306, the decoder can parse flags from the bitstream. At 3308, the decoder can determine the DIMD mode used for encoding and decoding the current block based on the parsed flags and signaling order. For example, if using... Figure 30A If the signaling scheme is shown and the parsed flag has a value of 0, the decoder can determine that the first DIMD mode is used. Based on the signaling order, the decoder can identify the DIMD mode corresponding to the first DIMD mode. If the parsed flag cannot identify the DIMD mode, the decoder can parse more flags from the bitstream until the decoded flags lead to a leaf in the signaling tree, thereby identifying the DIMD mode.
[0375] At 3312, the decoder can use the identified DIMD mode to reconstruct the current block. If it is determined at 3302 that no DIMD mode is used, the decoder can determine the non-DIMD encoding mode for the current block at 3310 and use the determined encoding mode at 3312 to reconstruct the block.
[0376] As mentioned above Figure 30B and Figure 31B The discussion suggests that an activation function can be used for each block to determine whether to activate the DIMD mode, which can be combined with signaling order to achieve higher coding efficiency. Figure 34 A flowchart 3400 illustrates an example of combining DIMD mode signaling reordering with mode activation at the decoder according to some embodiments of the present disclosure. The method of flowchart 3400 may include several operations, such as 3402-3416, where each operation may be processed to determine the signaling of the DIMD mode selected for reconstructing the current block. Flowchart 3400 begins at 3402, where the decoder obtains an indication from the video bitstream that the DIMD mode used to encode the current block. This indication may, for example, be as described above regarding... Figure 25 The DIMD flags under discussion. The decoder can determine that DIMD is enabled for this block, and obtaining this indication can be based on determining that DIMD is in use.
[0377] At position 3404, the decoder can determine the signaling order of the DIMD mode for the current block. (As mentioned above...) Figure 33 In more detail, the decoder can determine the signaling order based on one or more attributes of a block. These attributes may include one or more of the following: block size and / or shape, block stripe type, characteristics of available adjacent blocks, block quantization parameters, etc. The encoder can determine the signaling order to a predetermined order based on whether one or more conditions defined on the block's attributes are met or not met.
[0378] At position 3406, the decoder can determine the activation state of the first DIMD mode based on the signaling sequence. (As mentioned above...) Figure 25 In more detail, the decoder can determine the activation state of a DIMD mode via an activation function specific to the DIMD mode, in a manner similar to that of the encoder. For example, the activation function can be based on attributes of the current block, such as the block's size and / or shape, the block's stripe type, the availability of adjacent blocks, the block's QP, etc. The decoder can determine the activation state of the DIMD mode based on whether one or more of these attributes satisfy one or more conditions specific to the DIMD mode.
[0379] At 3408, the decoder can determine whether the flag associated with the first DIMD mode exists in the bitstream. In some examples, such as when using Figure 30AWhen using a signaling scheme, if the activation status of the first DIMD mode indicates that the first DIMD mode is not activated, the decoder can determine that the first flag (flag 1) does not exist in the bitstream (e.g., ...). Figure 30B (As shown). In such cases, the decoder can continue at 3410 to determine the activation state of the next DIMD mode according to the signaling sequence. In other examples, such as when using Figure 31A In the signaling scheme, if the activation status of the first DIMD mode indicates that the first DIMD mode is not activated, the decoder can determine that flag 1 exists, but flag 2 does not exist (e.g., ...). Figure 31B (As shown). Based on the activation status of the DIMD mode, indicating that the DIMD mode is not activated, the decoder can determine that the last flag in the set of flags used to signal the first DIMD mode does not exist.
[0380] At 3412, the decoder can determine whether a flag associated with the next DIMD mode according to the signaling order exists in the bitstream. If it does not exist, the decoder can continue checking the next DIMD mode according to the signaling order. If it is determined at 3412 that a flag associated with the next DIMD mode exists, or at 3408 that a first flag associated with the first DIMD mode exists, the decoder can parse the flag from the bitstream at 3414. At 3416, the decoder can use the DIMD mode determined based on the parsed flag to decode the current block. For example, if the first flag does not exist in the bitstream, but the second flag exists, the DIMD mode can be determined based on the absence of the first flag and the presence of the second flag (e.g., using a flag associated with the first DIMD mode). Figure 30B and Figure 31B The signaling tree shown is similar to the updated signaling tree. In some examples, additional operations may be required to parse more flags in order to identify DIMD patterns.
[0381] In some examples, modifications can be made. Figure 25 The flowchart in the code includes signaling ordering to further improve coding efficiency. For example, if the DIMD mode is determined to be used at 2506, an operation to determine the signaling order can be added before 2507. The determined signaling order can be used to determine which mode is the first sub-mode, the second sub-mode, etc.
[0382] It should be understood that while the above examples focus on signaling reordering for DIMD modes / submodes, the same mechanism can be applied to other types of coding modes with multiple submodes. For example, the signaling reordering for coding modes described above can be applied to TIMD modes / submodes. Submodes of a TIMD mode can include regular TIMD modes, TIMD SAD (TIMD using SAD as a cost metric), and TIMD merge modes.
[0383] Similarly, the signaling reordering of the coding mode described above can also be applied to intra-prediction (EIP) modes / sub-modes based on extrapolation filters. In EIP mode, samples in the CU are predicted from the top left to the bottom right by applying extrapolation filters to adjacent reconstructed or predicted samples. Sub-modes of EIP mode can include regular EIP mode, EIP merging mode, and multi-model EIP mode.
[0384] In another example, the coding mode signaling reordering described above can also be applied to intra template matching prediction (TMP) modes / submodes. Submodes of TMP modes can include regular TMP / Intra-TMP modes, TMP fusion modes, and TMP LIC modes.
[0385] In yet another example, the signaling reordering of the coding pattern described above can also be applied to the Spatial Geometry Partitioning (SGPM) pattern. Sub-patterns of SGPM can include regular SGPM and SGPM merging patterns.
[0386] The coding mode signaling reordering presented in this paper can also be applied to other tools with different derivation processes for a given tool, such as inter-frame prediction tools. Examples of other modes to which adaptive signaling can be applied include, but are not limited to, intra-block copy prediction (IBC), merged mode inter-frame prediction, or adaptive motion vector prediction (AMVP).
[0387] Figure 35 A flowchart illustrating an example of an encoding mode signaling reordering process at an encoder according to some embodiments of this disclosure is shown. The operation of process 3000 can be performed by the encoder, such as, for example... Figure 2 Encoder 200 in the middle.
[0388] At 3502, process 3500 involves determining the signaling order of multiple sub-modes of the encoding mode of a block of video. In some examples, the signaling order is determined based on one or more attributes of the block. These attributes may include one or more of the following: block size, block shape, block stripe type, characteristics of available adjacent blocks, and block quantization parameters. In some examples, determining the signaling order involves determining a first order based on whether one or more conditions defined on the block's attributes are met or not met. These conditions may include conditions that the block size is equal to, less than, or greater than a threshold block size. This condition may further specify that the block height and width are different or the same.
[0389] In some examples, the encoding mode is either end-to-end intra-mode derivation (DIMD) mode or template-based intra-mode derivation (TIMD) mode. In some examples, the one or more conditions may include: the number of available neighboring blocks of a block that can be used to derive the encoding information of the first sub-mode is equal to, less than, or greater than one or more of the number of available neighboring blocks of a block that can be used to derive the encoding information of the second sub-mode. In some examples, the one or more conditions may include: the number of available neighboring blocks of a block encoded and decoded using the first sub-mode and used to derive the encoding information of the first sub-mode is equal to, less than, or greater than one or more of the number of available neighboring blocks of a block encoded and decoded using the second sub-mode and used to derive the encoding information of the second sub-mode. In some examples, the one or more conditions may include: the number of available neighboring blocks of a block that can be used to derive the encoding information of the first sub-mode is equal to, less than, or greater than one or more of the number of available neighboring blocks of a block that can be used to derive the encoding information of the second sub-mode. In some examples, the one or more conditions include: the distance between available adjacent blocks of blocks that can be used to derive the encoded information of the first sub-mode is equal to, less than or greater than one or more of the distance between available adjacent blocks of blocks that can be used to derive the encoded information of the second sub-mode.
[0390] In some examples, the one or more conditions include the block's quantization parameter (QP) value being equal to, less than, or greater than a threshold QP value or more. In some examples, the one or more conditions include the block's stripe type belonging to or not belonging to a predetermined set of stripe types.
[0391] In a further example, determining the signaling order includes: determining a count for each of the plurality of sub-modes, the count indicating the number of times the sub-mode has been used in a block within a partition of the video containing the block; and sorting the plurality of sub-modes in descending order of their counts. The partition may be a sequence, frame, or stripe. In some examples, determining the signaling order may further include: for each of the plurality of sub-modes in the block, determining a context ID for selecting a context model for that sub-mode, and further sorting the plurality of sub-modes based on the context IDs of the plurality of sub-modes.
[0392] In some examples, determining the signaling order includes: for each of the plurality of sub-modes of the block, determining a context ID for selecting a context model for that sub-mode; and sorting the plurality of sub-modes according to the context IDs of the plurality of sub-modes. In some examples, determining the signaling order may further include: determining a count for each of the plurality of sub-modes, the count indicating the number of times the sub-mode has been used in a block within a partition of the video containing the block, and further sorting the plurality of sub-modes according to a descending order of the counts of the plurality of sub-modes. The partition may be a sequence, a frame, or a stripe.
[0393] In some examples, the encoding mode is the decoder-side intra-mode derivation (DIMD) mode. The various sub-modes of the DIMD mode include DIMD regular mode, intra-frame merge / DIMD merge list mode, intra-frame codec based on occurrence count (OBIC) mode, or merged intra-frame mode derivation (MIMD) mode. In other examples, the encoding mode is template-based intra-frame mode derivation (TIMD), intra-frame template matching prediction (TMP) mode, spatial geometry partitioning mode (SGPM), intra-frame prediction based on extrapolation filters (EIP) mode, intra-frame block copy prediction (IBC), merged mode inter-frame prediction, or adaptive motion vector prediction (AMVP).
[0394] At 3504, process 3500 involves determining the value of a first flag based on the signaling order and the selected sub-mode from the plurality of sub-modes for use as a block. At 3506, process 3500 involves encoding the first flag into the bitstream, and at 3508, process 3500 involves using the sub-mode to encode the block as discussed above.
[0395] Figure 36 A flowchart illustrating an example of an encoded mode signaling reordering process at a decoder according to some embodiments of the present disclosure is shown. The operation of process 3000 can be performed by the decoder, such as, for example... Figure 3 Decoder 300 in the middle.
[0396] At 3602, process 3600 involves determining the signaling order of multiple sub-modes of the encoding mode of a block of video. In some examples, the signaling order is determined based on one or more attributes of the block. These attributes may include one or more of the following: block size, block shape, block stripe type, characteristics of available adjacent blocks, and block quantization parameters. In some examples, determining the signaling order involves determining a first order based on whether one or more conditions defined on the block's attributes are met or not met. These conditions may include conditions that the block size is equal to, less than, or greater than a threshold block size. This condition may further specify that the block height and width are different or the same.
[0397] In some examples, the encoding mode is either end-to-end intra-mode derivation (DIMD) mode or template-based intra-mode derivation (TIMD) mode. In some examples, the one or more conditions may include: the number of available neighboring blocks of a block that can be used to derive the encoding information of the first sub-mode is equal to, less than, or greater than one or more of the number of available neighboring blocks of a block that can be used to derive the encoding information of the second sub-mode. In some examples, the one or more conditions may include: the number of available neighboring blocks of a block encoded and decoded using the first sub-mode and used to derive the encoding information of the first sub-mode is equal to, less than, or greater than one or more of the number of available neighboring blocks of a block encoded and decoded using the second sub-mode and used to derive the encoding information of the second sub-mode. In some examples, the one or more conditions may include: the number of available neighboring blocks of a block that can be used to derive the encoding information of the first sub-mode is equal to, less than, or greater than one or more of the number of available neighboring blocks of a block that can be used to derive the encoding information of the second sub-mode. In some examples, the one or more conditions include: the distance between available adjacent blocks of blocks that can be used to derive the encoded information of the first sub-mode is equal to, less than or greater than one or more of the distance between available adjacent blocks of blocks that can be used to derive the encoded information of the second sub-mode.
[0398] In some examples, the one or more conditions include the block's quantization parameter (QP) value being equal to, less than, or greater than a threshold QP value or more. In some examples, the one or more conditions include the block's stripe type belonging to or not belonging to a predetermined set of stripe types.
[0399] In a further example, determining the signaling order includes: determining a count for each of the plurality of sub-modes, the count indicating the number of times the sub-mode has been used in a block within a partition of the video containing the block; and sorting the plurality of sub-modes in descending order of their counts. The partition may be a sequence, frame, or stripe. In some examples, determining the signaling order may further include: for each of the plurality of sub-modes in the block, determining a context ID for selecting a context model for that sub-mode, and further sorting the plurality of sub-modes based on the context IDs of the plurality of sub-modes.
[0400] In some examples, determining the signaling order includes: for each of the plurality of sub-modes of the block, determining a context ID for selecting a context model for that sub-mode; and sorting the plurality of sub-modes according to the context IDs of the plurality of sub-modes. In some examples, determining the signaling order may further include: determining a count for each of the plurality of sub-modes, the count indicating the number of times the sub-mode has been used in a block within a partition of the video containing the block, and further sorting the plurality of sub-modes according to a descending order of the counts of the plurality of sub-modes. The partition may be a sequence, a frame, or a stripe.
[0401] In some examples, the encoding mode is the decoder-side intra-mode derivation (DIMD) mode. The various sub-modes of the DIMD mode include DIMD regular mode, intra-frame merge / DIMD merge list mode, intra-frame codec based on occurrence count (OBIC) mode, or merged intra-frame mode derivation (MIMD) mode. In other examples, the encoding mode is template-based intra-frame mode derivation (TIMD), intra-frame template matching prediction (TMP) mode, spatial geometry partitioning mode (SGPM), intra-frame prediction based on extrapolation filters (EIP) mode, intra-frame block copy prediction (IBC), merged mode inter-frame prediction, or adaptive motion vector prediction (AMVP).
[0402] At 3604, procedure 3600 involves parsing a first flag from the bitstream. At 3606, procedure 3600 involves determining a sub-mode among the plurality of sub-modes based on the value of the first flag and the signaling order. In some examples, the value of the first flag, based on the signaling order, indicates whether a particular sub-mode is selected. For example, in Figure 26 In this context, a value of 1 for flag 1 indicates that the first sub-mode in the signaling sequence has been selected. A value of 0 for flag 1 indicates that the first sub-mode in the signaling sequence has not been selected. In some examples, process 3600 also includes parsing a second flag from the code stream. Based on the signaling sequence, the values of at least the first and second flags indicate whether a specific sub-mode has been selected. Figure 26 In the example shown, the values of flag 1 and flag 2 can specify whether the second sub-mode is selected according to the signaling order. A value of 0 for flag 1 and a value of 1 for flag 2 indicates that the second sub-mode is selected; a value of 0 for flag 1 and a value of 0 for flag 2 indicates that the second sub-mode is not selected. In another example, such as Figure 27 As shown, the values of flag 1 (0) and flag 2 (0) indicate that the first sub-mode is selected according to the signaling order; the values of flag 1 (0) and flag 2 (1) indicate that the second sub-mode is selected according to the signaling order.
[0403] At 3608, procedure 3600 involves using the sub-pattern to reconstruct the block as discussed above. In some examples, procedure 3600 also involves determining the activation state of a sub-pattern among the plurality of sub-patterns. The second flag is the last flag in a set of flags used to signal the sub-pattern. Based on the activation state indicating that the sub-pattern is disabled for the block, procedure 3600 involves reconstructing the block without resolving the second flag.
[0404] Embodiments of this disclosure can be implemented in hardware using analog and / or digital circuitry, in software, by instructions executed by one or more general-purpose or special-purpose processors, or as a combination of hardware and software. Therefore, embodiments of this disclosure can be implemented in a computer system or other processing system environment. Examples of such computer systems 3700 are described in... Figure 37 As shown in the figures above. The blocks depicted in the figures above, such as... Figure 1 , Figure 2 and Figure 3 The blocks in the flowchart can be executed on one or more computer systems 3700. Furthermore, each step of the flowchart depicted in this disclosure can be implemented on one or more computer systems 3700.
[0405] Computer system 3700 includes one or more processors, such as processor 3704. Processor 3704 may be, for example, a dedicated processor, a general-purpose processor, a microprocessor, or a digital signal processor. Processor 3704 may be connected to communication infrastructure 3702 (e.g., a bus or network). Computer system 3700 may also include main memory 3706, such as random access memory (RAM), and may also include auxiliary memory 3708.
[0406] Auxiliary storage 3708 may include, for example, a hard disk drive 3710 and / or a removable storage drive 3712, which may represent a magnetic tape drive, an optical disc drive, etc. The removable storage drive 3712 may read from and / or write to the removable storage unit 3716 in a known manner. The removable storage unit 3716 may represent a magnetic tape, optical disc, etc., read from and written to by the removable storage drive 3712. As those skilled in the art will understand, the removable storage unit 3716 includes a computer-usable storage medium in which computer software and / or data are stored.
[0407] In an alternative implementation, auxiliary storage 3708 may include other similar means for allowing computer programs or other instructions to be loaded into computer system 3700. Such means may include, for example, removable storage unit 3718 and interface 3714. Examples of such means may include a program box and box interface (such as those seen in video game devices), a removable memory chip (such as EPROM or PROM) and associated sockets, thumb drives and USB ports, as well as other removable storage units 3718 and interfaces 3714 that allow software and data to be transferred from removable storage unit 3718 to computer system 3700.
[0408] Computer system 3700 may also include communication interface 3720. Communication interface 3720 allows the transfer of software and data between computer system 3700 and external devices. Examples of communication interface 3720 may include modems, network interfaces (such as Ethernet cards), communication ports, etc. Software and data transferred via communication interface 3720 are in the form of signals, which may be electronic signals, electromagnetic signals, optical signals, or other signals that can be received by communication interface 3720. These signals are provided to communication interface 3720 via communication path 3722. Communication path 3722 carries signals and may be implemented using wires or cables, optical fibers, telephone lines, cellular telephone links, RF links, and other communication channels.
[0409] As used herein, the terms "computer program medium" and "computer-readable medium" are used to refer to tangible storage media, such as removable storage units 3716 and 3718 or a hard disk installed in hard disk drive 3710. These computer program products are means for providing software to computer system 3700. The computer program (also referred to as computer control logic) may be stored in main memory 3706 and / or auxiliary memory 3708. The computer program may also be received via communication interface 3720. When executed, such a computer program enables computer system 3700 to implement the present disclosure as discussed herein. Specifically, when executed, the computer program enables processor 3704 to implement the processes of the present disclosure, such as any methods described herein. Therefore, such a computer program represents a controller of computer system 3700.
[0410] In another embodiment, the features of this disclosure can be implemented in hardware using hardware components such as application-specific integrated circuits (ASICs) and gate arrays. Implementing a hardware state machine to perform the functions described herein will also be apparent to those skilled in the art.
Claims
1. A method comprising: The Intra-Frame Mode Derivation (DIMD) obtained at the decoding end is used as an instruction for encoding and decoding blocks; Based on the indication, the signaling order of multiple decoding end intra-frame mode derivation DIMD modes for the block is determined, the multiple DIMD modes including DIMD regular mode, intra-frame codec OBIC mode based on occurrence count, merged intra-frame mode derivation MIMD mode, or intra-frame merging mode. Parse the first flag from the bitstream; Based on the value of the first flag and the signaling order, a sub-mode among the plurality of sub-modes is determined; as well as The block is reconstructed using the sub-pattern.
2. A method comprising: Determine the signaling order of multiple sub-modes of the encoding mode used for video blocks; Parse the first flag from the bitstream; Based on the value of the first flag and the signaling order, a sub-mode among the plurality of sub-modes is determined; as well as The block is reconstructed using the sub-pattern.
3. The method according to claim 1 or 2, wherein, Based on the signaling sequence, the value of the first flag indicates whether a specific sub-mode is selected.
4. The method according to claim 1 or 2, further comprising parsing a second flag from the bitstream, wherein, Based on the signaling sequence, at least the values of the first flag and the second flag indicate whether a specific sub-mode is selected.
5. The method according to any one of claims 1 to 4, wherein, The signaling order is determined based on one or more attributes of the block.
6. The method according to claim 5, wherein, The one or more attributes include one or more of the following: the size of the block, the shape of the block, the stripe type of the block, the characteristics of available adjacent blocks, and the quantization parameters of the block.
7. The method according to claim 5 or 6, wherein, Determining the signaling order includes determining the signaling order as a first order based on whether one or more conditions defined for the attribute of the block are met or not met.
8. The method according to claim 7, wherein, The one or more conditions include conditions where the size of the block is equal to, less than, or greater than one or more of the threshold block size.
9. The method according to claim 8, wherein, The conditions also specify that the height and width of the blocks may be different or the same.
10. The method according to any one of claims 7 to 9, wherein, The encoding mode is either the intra-frame mode derived from the decoding end (DIMD mode) or the template-based intra-frame mode derived from the TIMD mode.
11. The method according to claim 10, wherein, The one or more conditions include one or more of the following: the number of available neighboring blocks of the block that can be used to derive the encoded information of the first sub-mode is equal to, less than, or greater than the number of available neighboring blocks of the block that can be used to derive the encoded information of the second sub-mode.
12. The method according to claim 10 or 11, wherein, The one or more conditions include one or more of the following: the number of available neighboring blocks of the block encoded using the first sub-mode and used to derive the encoded information of the first sub-mode is equal to, less than, or greater than the number of available neighboring blocks of the block encoded using the second sub-mode and used to derive the encoded information of the second sub-mode.
13. The method according to any one of claims 10 to 12, wherein, The one or more conditions include one or more of the following: the number of available neighboring blocks of the block that can be used to derive the encoded information of the first sub-mode is equal to, less than, or greater than the number of available neighboring blocks of the block that can be used to derive the encoded information of the second sub-mode.
14. The method according to any one of claims 10 to 13, wherein, The one or more conditions include one or more of the following: the distance between the block and the available adjacent blocks that can be used to derive the encoding information of the first sub-mode is equal to, less than, or greater than the distance between the block and the available adjacent blocks that can be used to derive the encoding information of the second sub-mode.
15. The method according to any one of claims 7 to 14, wherein, The one or more conditions include one or more of the block's quantization parameter QP value being equal to, less than, or greater than a threshold QP value.
16. The method according to any one of claims 7 to 15, wherein, The one or more conditions include whether the stripe type of the block belongs to or does not belong to a predetermined set of stripe types.
17. The method according to any one of claims 1 to 16, wherein, Determining the signaling sequence includes: For each of the plurality of sub-modes, a count is determined, the count indicating the number of times the sub-mode is used in a block within a partition of the video containing the block, wherein the partition is a sequence, frame, or stripe; and The multiple sub-patterns are sorted in descending order of their counts.
18. The method according to claim 17, wherein, Determining the signaling sequence includes: For each of the plurality of sub-patterns used for the block, a context ID is determined for selecting a context model for the sub-pattern, wherein the sorting of the plurality of sub-patterns is also based on the context ID of the plurality of sub-patterns.
19. The method according to any one of claims 1 to 18, wherein, Determining the signaling sequence includes: For each of the plurality of sub-patterns used for the block, determine a context ID for selecting a context model for that sub-pattern; and The multiple sub-patterns are sorted according to their context IDs.
20. The method according to claim 19, wherein, Determining the signaling sequence also includes: A count is determined for each of the plurality of sub-modes, the count indicating the number of times the sub-mode is used in a block of the video containing the block, wherein the block is a sequence, frame, or stripe, and wherein the plurality of sub-modes are sorted in descending order of the counts of the plurality of sub-modes.
21. The method according to any one of claims 1 to 20, further comprising: Determine the activation state of a sub-mode among the plurality of sub-modes, wherein the second flag is the last flag in the flag set used to signal the sub-mode; and Based on the activation state indicating that the sub-mode is disabled for the block, the block is reconstructed without parsing the second flag.
22. The method according to any one of claims 2 to 21, wherein, The encoding mode is a DIMD mode derived from the intra-frame mode at the decoding end.
23. The method according to claim 22, wherein, The multiple sub-modes of the encoding mode include DIMD regular mode, intra-frame encoding / decoding OBIC mode based on occurrence count, merged intra-frame mode derivation MIMD mode, or intra-frame merging mode.
24. The method according to any one of claims 2 to 21, wherein, The coding modes are: Template-based Intra-Frame Mode Derivation (TIMD), Intra-Frame Template Matching Prediction (TMP), Spatial Geometry Partitioning (SGPM), Intra-Frame Prediction (EIP) Based on Extrapolation Filters, Intra-Frame Block Copy Prediction (IBC), Merged Mode Inter-Frame Prediction, or Adaptive Motion Vector Prediction (AMVP).
25. A method comprising: The intra-frame mode derivation (DIMD) obtained from the video bitstream is used as an instruction for encoding and decoding the current block. Based on the indication, the signaling order of multiple DIMD modes for the block is determined; Based on the activation state of the first DIMD mode for the current block, determine the presence state of the first flag associated with the first DIMD mode according to the signaling order; Based on the existence state, determine whether to parse the first flag from the bitstream; as well as The current block is reconstructed using a DIMD pattern determined at least in part based on the signaling order and the determination of whether to parse the first flag.
26. A method comprising: Determine the signaling order of multiple sub-modes of the encoding mode used for video blocks; The value of the first flag is determined based on the signaling order and the sub-pattern selected for the block from among the plurality of sub-patterns; Encode the first flag into the bitstream; as well as The block is encoded using the sub-pattern.
27. The method according to claim 26, wherein, The signaling order is determined based on one or more attributes of the block.
28. The method according to claim 27, wherein, The one or more attributes include one or more of the following: the size of the block, the shape of the block, the stripe type of the block, the characteristics of available adjacent blocks, and the quantization parameters of the block.
29. The method according to claim 27 or 28, wherein, Determining the signaling order includes determining the signaling order as a first order based on whether one or more conditions defined for the attribute of the block are met or not met.
30. The method according to claim 29, wherein, The one or more conditions include conditions where the size of the block is equal to, less than, or greater than one or more of the threshold block size.
31. The method according to claim 30, wherein, The conditions also specify that the height and width of the blocks may be different or the same.
32. The method according to any one of claims 29 to 31, wherein, The encoding mode is either the intra-frame mode derived from the decoding end (DIMD mode) or the template-based intra-frame mode derived from the TIMD mode.
33. The method according to claim 32, wherein, The one or more conditions include one or more of the following: the number of available neighboring blocks of the block that can be used to derive the encoded information of the first sub-mode is equal to, less than, or greater than the number of available neighboring blocks of the block that can be used to derive the encoded information of the second sub-mode.
34. The method according to claim 32 or 33, wherein, The one or more conditions include one or more of the following: the number of available neighboring blocks of the block encoded using the first sub-mode and used to derive the encoded information of the first sub-mode is equal to, less than, or greater than the number of available neighboring blocks of the block encoded using the second sub-mode and used to derive the encoded information of the second sub-mode.
35. The method according to any one of claims 32 to 34, wherein, The one or more conditions include one or more of the following: the number of available neighboring blocks of the block that can be used to derive the encoded information of the first sub-mode is equal to, less than, or greater than the number of available neighboring blocks of the block that can be used to derive the encoded information of the second sub-mode.
36. The method according to any one of claims 32 to 35, wherein, The one or more conditions include one or more of the following: the distance between the block and the available adjacent blocks that can be used to derive the encoding information of the first sub-mode is equal to, less than, or greater than the distance between the block and the available adjacent blocks that can be used to derive the encoding information of the second sub-mode.
37. The method according to any one of claims 29 to 36, wherein, The one or more conditions include one or more of the block's quantization parameter QP value being equal to, less than, or greater than a threshold QP value.
38. The method according to any one of claims 29 to 37, wherein, The one or more conditions include whether the stripe type of the block belongs to or does not belong to a predetermined set of stripe types.
39. The method according to any one of claims 26 to 38, wherein, Determining the signaling sequence includes: For each of the plurality of sub-modes, a count is determined, the count indicating the number of times the sub-mode is used in a block within a partition of the video containing the block, wherein the partition is a sequence, frame, or stripe; and The multiple sub-patterns are sorted in descending order of their counts.
40. The method according to claim 39, wherein, Determining the signaling sequence includes: For each of the plurality of sub-patterns used for the block, a context ID is determined for selecting a context model for the sub-pattern, wherein the sorting of the plurality of sub-patterns is also based on the context ID of the plurality of sub-patterns.
41. The method according to any one of claims 26 to 40, wherein, Determining the signaling sequence includes: For each of the plurality of sub-patterns used for the block, determine a context ID for selecting a context model for that sub-pattern; and The multiple sub-patterns are sorted according to their context IDs.
42. The method according to claim 41, wherein, Determining the signaling sequence also includes: A count is determined for each of the plurality of sub-modes, the count indicating the number of times the sub-mode is used in a block of the video containing the block, wherein the block is a sequence, frame, or stripe, and wherein the plurality of sub-modes are sorted in descending order of the counts of the plurality of sub-modes.
43. The method according to any one of claims 26 to 42, wherein, The encoding mode is a DIMD mode derived from the intra-frame mode at the decoding end.
44. The method according to claim 43, wherein, The multiple sub-modes of the encoding mode include DIMD regular mode, intra-frame encoding / decoding OBIC mode based on occurrence count, merged intra-frame mode derivation MIMD mode, or intra-frame merging mode.
45. The method according to any one of claims 26 to 42, wherein, The coding modes are: Template-based Intra-Frame Mode Derivation (TIMD), Intra-Frame Template Matching Prediction (TMP), Spatial Geometry Partitioning (SGPM), Intra-Frame Prediction (EIP) Based on Extrapolation Filters, Intra-Frame Block Copy Prediction (IBC), Merged Mode Inter-Frame Prediction, or Adaptive Motion Vector Prediction (AMVP).
46. A non-transitory computer-readable medium comprising instructions that, when executed by one or more processors of a device, cause the device to perform the method according to any one of claims 1 to 45.
47. An encoder, comprising: One or more processors; as well as A memory for storing instructions that, when executed by the one or more processors, cause the encoder to perform the method according to any one of claims 26 to 45.
48. A non-transitory computer-readable recording medium storing a bitstream generated by the method for encoding video according to any one of claims 26 to 45.
49. A decoder, comprising: One or more processors; as well as A memory for storing instructions that, when executed by the one or more processors, cause the decoder to perform the method according to any one of claims 1 to 25.
50. A non-transitory computer-readable medium storing a bitstream, which, when decoded by a decoder, causes the decoder to perform the method according to any one of claims 1 to 25.
51. A bitstream generated according to any one of claims 26 to 45.
