Method and apparatus for geometric partitioning mode with adaptive mixing
By adopting an adaptive mixing scheme and variable-length code optimization signaling design in video encoding and decoding, the problem of insufficient encoding and decoding efficiency caused by fixed mixing intensity settings in the prior art is solved, and more efficient video encoding and decoding performance is achieved.
Patent Information
- Application Number
- CN202380034121.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-04-14
- Filing Date
- 2023-04-12
- Publication Date
- 2024-12-06
AI Technical Summary
The existing video encoding and decoding technology has shortcomings in improving the encoding and decoding efficiency of geometric partitioning modes, especially when processing complex video content, the fixed setting of mixing intensity cannot meet the optimal mixing quality requirements for different types of video content, resulting in codec Inefficient.
Adaptive hybrid scheme is used to dynamically adjust the width of the mixing area around the partition boundary of the geometric partition mode, and binarize the mixed index through variable length codes, optimize signaling design to adapt to the characteristics of different video contents and improve encoding and decoding efficiency.
By dynamically adjusting the width of the hybrid area and optimizing the signaling design, the encoding efficiency of video encoding and decoding is improved, adapting to the needs of different types of video content, reducing signaling costs, and improving encoding and decoding performance.
Smart Images

Figure CN119096540A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on and claims priority from U.S. Provisional Application No. 63 / 331,249, filed on April 14, 2022, entitled “Methods and Devices for Geometric Partitioning Mode with Adaptive Blending,” the entire contents of which are incorporated herein by reference for all purposes. Technical Field
[0003] The present disclosure relates to video coding and compression, and in particular, but not limited to, methods and apparatus for improving coding efficiency of Geometric Partitioning Mode (GPM). Background Art
[0004] Various video codec technologies can be used to compress video data. Video coding and decoding are performed according to one or more video codec standards. For example, today, some well-known video codec standards include Versatile Video Coding (VVC, also known as H.266 or MPEG-IPart 3), High Efficiency Video Coding (HEVC, also known as H.265 or MPEG-H Part 2), and Advanced Video Coding (AVC, also known as H.264 or MPEG-4 Part 10), which are jointly developed by ISO / IEC MPEG and ITU-T VECG. AOMedia Video 1 (AV1) was developed by the Alliance for Open Media (AOM) as a successor to its previous standard VP9. Audio Video Coding (AVS), a digital audio and digital video compression standard, is another video compression standard family developed by the Chinese Audio and Video Codec Standard Working Group. Most existing video coding standards are based on the well-known hybrid video coding framework, that is, using block-based prediction methods (e.g., inter-frame prediction, intra-frame prediction) to reduce the redundancy present in video images or sequences, and using transform coding to compress the energy of prediction errors. An important goal of video coding technology is to compress video data into a form that uses a lower bit rate while avoiding or minimizing video quality degradation.
[0005] The first version of the VVC standard was completed in July 2020, providing approximately 50% bitrate savings or equivalent perceptual quality compared to the previous generation video codec standard HEVC. Although the VVC standard provides significant codec improvements over its predecessor, there is evidence that better codec efficiency can be achieved with additional codec tools. Recently, the Joint Video Exploration Team (JVET), in collaboration with ITU-TVECG and ISO / IEC MPEG, began exploring advanced technologies that can achieve significantly enhanced codec efficiency over VVC. In April 2021, a software code base called the Enhanced Compression Model (ECM) was established for future video codec exploration work. The ECM reference software is based on the VVC Test Model (VTM) developed by JVET for VVC, in which several existing modules (e.g., intra / inter prediction, transform, loop filter, etc.) are further extended and / or improved. In the future, any new codec tools beyond the VVC standard will need to be integrated into the ECM platform and tested using the JVET Common Test Conditions (CTC). Summary of the invention
[0006] The present disclosure provides examples of techniques related to improving the encoding and decoding efficiency of geometric partitioning patterns in a video encoding or decoding process.
[0007] According to a first aspect of the present disclosure, a method for video decoding is provided. In the method for video decoding, a decoder may obtain a mixing strength set for a current block, wherein the current block is divided into two parts along a partition line for prediction in a geometric partitioning mode. In addition, the decoder may obtain a mapping relationship between a plurality of mixing indexes and a plurality of mixing strengths in the mixing strength set. In addition, the decoder may obtain a binarization value indicating one of the plurality of mixing indexes, wherein the plurality of mixing indexes are binarized using a variable length code. In addition, the decoder may determine the mixing strength of the current block based on the binarization value and the mapping relationship.
[0008] According to a second aspect of the present disclosure, a method for video encoding is provided. In the method for video encoding, an encoder may obtain a mixed strength set for a current block, wherein the current block is divided into two parts along a partition line for prediction in a geometric partitioning mode. In addition, the encoder may obtain a mapping relationship between a plurality of mixed indexes and a plurality of mixed strengths in the mixed strength set. In addition, the encoder may determine the mixed strength of the current block among the plurality of mixed strengths in the mixed strength set. In addition, the encoder may determine a binarized value indicating a mixed index corresponding to the mixed strength of the current block, wherein the plurality of mixed indexes are binarized using a variable length code.
[0009] According to a third aspect of the present disclosure, a device for video decoding is provided. The device includes one or more processors and a memory, the memory is coupled to the one or more processors and is configured to store instructions executable by the one or more processors. In addition, the one or more processors are configured to perform the method according to the first aspect above when executing the instructions.
[0010] According to a fourth aspect of the present disclosure, a device for video encoding is provided. The device includes one or more processors and a memory, the memory is coupled to the one or more processors and is configured to store instructions executable by the one or more processors. In addition, the one or more processors are configured to perform the method according to the second aspect above when executing the instructions.
[0011] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer-executable instructions is provided, wherein when the computer-executable instructions are executed by one or more computer processors, the one or more computer processors receive a bit stream and execute the method according to the first aspect.
[0012] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer-executable instructions is provided, wherein when the computer-executable instructions are executed by one or more computer processors, the one or more computer processors execute the method according to the second aspect to encode a current block into a bit stream and send the bit stream. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] A more particular description of examples of the present disclosure will be presented by reference to specific examples shown in the accompanying drawings. Given that these drawings depict only some examples and are therefore not to be considered limiting in scope, the examples will be described and explained with additional specificity and detail through use of the accompanying drawings.
[0014] Figure 1A is a block diagram of a video encoder according to some examples of the present disclosure.
[0015] Figure 1B is a block diagram of a video decoder according to some examples of the present disclosure.
[0016] Figure 2 is a block diagram illustrating a system for encoding and decoding video blocks according to some examples of the present disclosure.
[0017] Figure 3A is a block diagram illustrating an exemplary video encoder according to some examples of the present disclosure.
[0018] Figure 3B is a block diagram illustrating an exemplary video decoder according to some examples of the present disclosure.
[0019] Figure 4A is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0020] Figure 4B is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0021] Figure 4C is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0022] Figure 4D is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0023] Figure 4E is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0024] Figure 5 Allowable GPM partitions according to some examples of the present disclosure are shown.
[0025] Figure 6 Selection of a unidirectional prediction motion vector from a motion vector in a merge candidate list for a GPM according to some examples of the present disclosure is shown.
[0026] Figure 7 Template matching algorithms according to some examples of the present disclosure are shown.
[0027] Figure 8 A set of selected pixels are shown on which gradient analysis is performed according to some examples of the present disclosure.
[0028] Fig. 9 Convolution of a 3x3 Sobel gradient filter is shown according to some examples of the present disclosure.
[0029] Fig.10 Prediction fusion by weighted averaging of two HoG modes and planes according to some examples of the present disclosure is shown.
[0030] Fig.11 Templates and their reference samples used in TIMD according to some examples of the present disclosure are shown.
[0031] Fig.12 A mix of templates for reordering of GPM partitioning patterns according to some examples of the present disclosure is shown.
[0032] FIG. 13A to FIG. 13C Available IPM candidates for a GPM with inter prediction and intra prediction according to some examples of the present disclosure are shown.
[0033] Fig.13D Disabling combinations for a GPM with inter prediction and intra prediction are shown according to some examples of the present disclosure.
[0034] Fig.14 The distance from any location within a block to a partition edge for a geometric partitioning pattern is shown according to some examples of the present disclosure.
[0035] Fig.15 Some examples according to the present disclosure are shown Fig.14 Example of quantization of distances in .
[0036] Fig.16 Soft blending regions on both sides of a partition boundary are shown according to some examples of the present disclosure.
[0037] Fig.17 is a diagram illustrating a computing environment coupled with a user interface according to some examples of the present disclosure.
[0038] Fig.18 is a flowchart illustrating a method for video decoding according to some examples of the present disclosure.
[0039] Fig.19 is a diagram showing some examples according to the present disclosure. Fig.18 The method for video decoding shown in FIG. 1 corresponds to a flowchart of a method for video encoding. DETAILED DESCRIPTION
[0040] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.
[0041] The terms used in this disclosure are only suitable for the purpose of describing specific embodiments and are not intended to limit the present disclosure. In the present disclosure and the appended claims, singular forms are also intended to include plural forms, unless other meanings are clearly indicated throughout the disclosure. It should also be understood that the term "and / or" used in this disclosure refers to and includes one or any or all possible combinations of the listed multiple related items.
[0042] References throughout this specification to "one embodiment," "an embodiment," "an example," "some embodiments," "some examples," or similar language indicate that the particular features, structures, or characteristics being described are included in at least one embodiment or example. Unless explicitly stated otherwise, features, structures, elements, or characteristics described in conjunction with one or some embodiments are also applicable to other embodiments.
[0043] Throughout the disclosure, the terms "first", "second", "third", etc. are used as nomenclatures for referring only to related elements (e.g., devices, components, compositions, steps, etc.), without implying any spatial or temporal order, unless otherwise explicitly stated. For example, "first device" and "second device" may refer to two separately formed devices, or two parts, components, or operating states of the same device, and may be named arbitrarily.
[0044] The terms "module", "sub-module", "circuit", "sub-circuit", "circuitry", "sub-circuitry", "unit", or "sub-unit" may include memory (shared, dedicated, or combined) that stores code or instructions that can be executed by one or more processors. A module may include one or more circuits with or without stored code or instructions. A module or circuit may include one or more components connected directly or indirectly. These components may or may not be physically attached to or located adjacent to each other.
[0045] As used herein, the terms "if" or "when" may be understood to mean "on" or "in response to" depending on the context. These terms, if they appear in a claim, may not indicate that the associated limitation or feature is conditional or optional. For example, a method may include the following steps: i) when condition X exists or if condition X exists, perform function or action X', and ii) when condition Y exists or if condition Y exists, perform function or action Y'. The method may be implemented using both the ability to perform function or action X' and the ability to perform function or action Y'. Therefore, both functions X' and Y' may be performed at different times when the method is performed multiple times.
[0046] A unit or module may be implemented only by software, only by hardware, or by a combination of hardware and software. In a software-only implementation, for example, a unit or module may include functionally related code blocks or software components that are linked together directly or indirectly to perform a specific function.
[0047] Similar to all previous video codec standards, ECM is built on a block-based hybrid video codec framework. Figure 1A is a block diagram of a video encoder according to some embodiments of the present disclosure. In the block-based hybrid video encoder 100, the input video signal is processed block by block (called coding unit (CU)). In ECM-1.0, a CU can be up to 128×128 pixels. However, like VVC, a coding tree unit (CTU) is split into multiple CUs based on a quadtree / binary tree / ternary tree to adapt to changing local characteristics.
[0048] In the multi-type tree structure, a CTU is first divided into a quadtree structure, and then each quadtree leaf CU can be further divided into a binary tree structure and a ternary tree structure.
[0049] Figure 4E is a schematic diagram showing a multi-type tree partitioning mode according to some embodiments of the present disclosure. Figure 4E As shown, there are five types of partitioning: quadruple partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.
[0050] For each given video block, spatial prediction and / or temporal prediction may be performed. Spatial prediction (or "intra-frame prediction") uses pixels from samples of coded neighboring blocks in the same video picture or slice (which are called reference samples) to predict the current video block. Spatial prediction reduces the spatial redundancy inherent in video signals. Temporal prediction (also called "inter-frame prediction" or "motion compensated prediction") uses reconstructed pixels from coded video pictures to predict the current video block. Temporal prediction reduces the temporal redundancy inherent in video signals. The temporal prediction signal for a given CU is typically signaled by one or more motion vectors (MVs), which indicate the amount and direction of motion between the current CU and its temporal reference.
[0051] In addition, if multiple reference pictures are supported, a reference picture index is additionally sent, which is used to identify which reference picture in the reference picture repository the temporal prediction signal comes from. After spatial prediction and / or temporal prediction, the intra / inter mode decision circuit 121 in the encoder 100 selects the best prediction mode, for example, based on a rate-distortion optimization method. The block prediction factor 120 is then subtracted from the current video block; and the resulting prediction residual is decorrelated using the transform circuit 102 and the quantization circuit 104. The resulting quantized residual coefficients are dequantized by the dequantization circuit 116 and inversely transformed by the inverse transform circuit 118 to form a reconstructed residual, which is then added back to the prediction block to form a reconstructed signal for the CU. In addition, before the reconstructed CU is placed in the reference picture repository of the picture buffer 117 and used to encode and decode future video blocks, loop filtering 115, such as a deblocking filter, sample adaptive offset (SAO) and / or adaptive loop filter (ALF), may be applied to the reconstructed CU. To form the output video bitstream 114, the coding mode (inter or intra), prediction mode information, motion information, and quantized residual coefficients are all sent to the entropy coding unit 106 for further compression and packing to form a bitstream.
[0052] Figure 1Bis a block diagram of a video decoder according to some embodiments of the present disclosure. In a block-based hybrid video decoder 200, a video bitstream 201 is first entropy decoded at an entropy decoding unit 202. The coding mode and prediction information are sent to a spatial prediction unit (in the case of intra-frame coding) or a temporal prediction unit (in the case of inter-frame coding) to form a prediction block. The residual transform coefficients are sent to an inverse quantization unit 204 and an inverse transform unit 206 to reconstruct the residual block. The prediction block and the residual block are then added together. Before the reconstructed block is stored in a reference picture buffer 213, a loop filter 209 may be further performed on the reconstructed block. The reconstructed video in the reference picture buffer 213 is then sent out to drive a display device and used to predict future video blocks.
[0053] Figure 2 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 2 As shown in , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a destination device 14. Source device 12 and destination device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.
[0054] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium that enables the source device 12 to send the encoded video data directly to the target device 14 in real time. The encoded video data may be modulated according to a communication standard (such as a wireless communication protocol) and sent to the target device 14. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network (e.g., a local area network, a wide area network, or a global network such as the Internet). The communication medium may include a router, a switch, a base station, or any other device that may be useful in facilitating communication from the source device 12 to the target device 14.
[0055] In some other embodiments, the encoded video data may be sent from the output interface 22 to the storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a digital versatile disk (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, the storage device 32 may correspond to a file server or another intermediate storage device that can store the encoded video data generated by the source device 12. The target device 14 can access the stored video data from the storage device 2 via streaming or downloading. The file server can be any type of computer capable of storing encoded video data and sending the encoded video data to the target device 14. Exemplary file servers include a web server (e.g., for a website), a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS) device, or a local disk drive. The target device 14 may access the encoded video data through any standard data connection suitable for accessing the encoded video data stored on the file server, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., a Digital Subscriber Line (DSL), a cable modem, etc.), or a combination of both. The transmission of the encoded video data from the storage device 32 may be a streaming transmission, a download transmission, or a combination of both a streaming transmission and a download transmission.
[0056] like Figure 2 As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in this application are generally applicable to video encoding and decoding, and may be applied to wireless and / or wired applications.
[0057] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may be sent directly to the target device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on a storage device 32 for later access by the target device 14 or other devices for decoding and / or playback. The output interface 22 may also include a modem and / or a transmitter.
[0058] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data communicated via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such syntax elements may be included in the encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.
[0059] In some embodiments, the target device 14 may include a display device 34, which may be an integrated display device and an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to the user and may include any of a variety of display devices, such as a Liquid Crystal Display (LCD), a plasma display, an Organic Light Emitting Diode (OLED) display, or another type of display device.
[0060] The video encoder 20 and the video decoder 30 may operate according to a proprietary standard or an industry standard (e.g., VVC, HEVC, MPEG-4, Part 10, AVC) or an extension of such a standard. It should be understood that the present application is not limited to a specific video encoding / decoding standard and may be applicable to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 may be configured to decode video data according to any of these current standards or future standards.
[0061] The video encoder 20 and the video decoder 30 may be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), discrete logic, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device may store instructions for the software in a suitable non-volatile computer-readable medium, and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and any of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.
[0062] Figure 3A is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 may perform intra-frame prediction encoding and inter-frame prediction encoding of video blocks within a video frame. Intra-frame prediction encoding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction encoding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. It should be noted that the term "frame" may be used as a synonym for the term "image" or "picture" in the field of video coding and decoding.
[0063] like Figure 3AAs shown in FIG. 1 , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 also includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A loop filter 63 (such as a deblocking filter) may be located between the adder 62 and the DPB 64 to filter the block boundaries to remove blocking artifacts from the reconstructed video. In addition to using a deblocking filter, additional loop filters, such as a Sample Adaptive Offset (SAO) filter and / or an Adaptive in-Loop Filter (ALF), may be used to filter the output of adder 62. In some examples, the loop filter may be omitted, and the decoded video block may be provided directly by adder 62 to DPB 64. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be distributed in one or more of the illustrated fixed or programmable hardware units.
[0064] Video data memory 40 may store video data to be encoded by components of video encoder 20. The video data in video data memory 40 may be obtained, for example, from Figure 2 The video data memory 40 and the DPB 64 are obtained from the video source 18 shown. The DPB 64 is a buffer that stores reference video data (reference frames or pictures) for use by the video encoder 20 (e.g., in intra-frame or inter-frame prediction coding mode) when encoding video data. The video data memory 40 and the DPB 64 may be formed by any of a variety of memory devices. In various examples, the video data memory 40 may be on-chip with other components of the video encoder 20, or off-chip relative to those components.
[0065] like Figure 3AAs shown in , after receiving the video data, the partitioning unit 45 within the prediction processing unit 41 partitions the video data into video blocks. This partitioning operation may also include partitioning the video frame into strips, tiles (e.g., a set of video blocks) or other larger coding units (Coding Unit, CU) according to a predefined splitting structure associated with the video data (e.g., a quadtree (Quad-Tree, QT) structure). A video frame is or can be considered to be a two-dimensional array or matrix of samples with sample values. The samples in the array may also be referred to as pixels or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the video frame. The video frame may be divided into multiple video blocks by (for example) using QT partitioning. A video block is also or can be considered to be a two-dimensional array or matrix of samples with sample values, but the size of the video block is smaller than the video frame. The number of samples in the horizontal and vertical directions (or axes) of the video block defines the size of the video block. The video block may be further divided into one or more block partitions or sub-blocks (which may again form blocks) by, for example, iteratively using QT partitioning, binary-tree (BT) partitioning or ternary-tree (TT) partitioning or any combination thereof. It should be noted that the term "block" or "video block" as used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a block or video block may be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU) and / or may be or correspond to a corresponding block, such as a coding tree block (CTB), a coding block (CB), a prediction block (PB) or a transform block (TB) and / or correspond to a sub-block.
[0066] The prediction processing unit 41 may select one of a plurality of feasible prediction coding modes for the current video block based on the error results (e.g., code rate and distortion level), such as one of one or more inter-frame prediction coding modes in a plurality of intra-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block (e.g., prediction block) or inter-frame prediction coding block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements (such as motion vectors, intra-frame mode indicators, partition information, and other such syntax information) to the entropy coding unit 56.
[0067] To select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction coding of the current video block relative to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, e.g., to select an appropriate coding mode for each block of video data.
[0068] In some embodiments, motion estimation unit 42 determines the inter-prediction mode for a current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating a motion vector that estimates the motion for a video block. For example, a motion vector may indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame, the prediction block in the reference frame relative to the current block being encoded in the current frame. The predetermined pattern may designate video frames in a sequence as P frames or B frames. Intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC coding in a manner similar to the motion vectors determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine the block vector.
[0069] In terms of pixel differences, the prediction block of the video block may be or may correspond to a block or reference block of a reference frame that closely matches the video block to be encoded, and the pixel difference may be determined by the sum of absolute differences (SAD), the sum of square differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate values for sub-integer pixel positions of the reference frame stored in the DPB 64. For example, the video encoder 20 may interpolate values for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and the fractional pixel positions and output a motion vector with fractional pixel precision.
[0070] Motion estimation unit 42 calculates a motion vector for a video block in an inter-prediction coded frame by comparing the position of the video block to the position of a prediction block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.
[0071] The motion compensation performed by the motion compensation unit 44 may involve extracting or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector for the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, retrieve the prediction block from the DPB 64, and forward the prediction block to the adder 50. The adder 50 then forms a residual video block of pixel difference values by subtracting the pixel values of the prediction block provided by the motion compensation unit 44 from the pixel values of the current video block being encoded. The pixel difference values forming the residual video block may include luma component differences or chroma component differences or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining a motion vector for identifying the prediction block, any flag indicating a prediction mode, or any other syntax information described herein. Note that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are shown separately for conceptual purposes.
[0072] In some embodiments, the intra BC unit 48 may generate vectors and extract prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded, and these vectors are referred to as block vectors rather than motion vectors. Specifically, the intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during different encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values for the various tested intra prediction modes using rate-distortion analysis, and select the intra prediction mode with the best rate-distortion characteristics among the tested modes as the suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was encoded to generate the coded block, as well as the bit rate (i.e., the number of bits) used to generate the coded block. Intra BC unit 48 may calculate ratios from the distortions and rates for the various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.
[0073] In other examples, intra BC unit 48 may use, in whole or in part, motion estimation unit 42 and motion compensation unit 44 to perform such functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by SAD, SSD, or other difference metrics, and identification of the prediction block may include calculating values for sub-integer pixel positions.
[0074] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, video encoder 20 can form pixel difference values by subtracting the pixel values of the prediction block from the pixel values of the current video block being encoded, thereby forming a residual video block. The pixel difference values forming the residual video block may include both luma component differences and chroma component differences.
[0075] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-frame block copy prediction performed by the intra BC unit 48 as described above, the intra-frame prediction processing unit 46 may perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 may determine an intra-frame prediction mode for encoding the current block. To this end, the intra-frame prediction processing unit 46 may use various intra-frame prediction modes to encode the current block, for example, during different encoding passes, and the intra-frame prediction processing unit 46 (or in some examples, the mode selection unit) may select a suitable intra-frame prediction mode from the tested intra-frame prediction modes to use. The intra-frame prediction processing unit 46 may provide information indicating the intra-frame prediction mode selected for the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-frame prediction mode into the bitstream.
[0076] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform.
[0077] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan on the matrix including the quantized transform coefficients. Optionally, entropy encoding unit 56 may perform the scan.
[0078] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream may then be sent to a video bitstream such as Figure 2 The video decoder 30 shown, or archived as Figure 2 The video frame may be stored in storage device 32 as shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.
[0079] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values for use in motion estimation.
[0080] Adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.
[0081] Figure 3B 30 is a block diagram showing an exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above combined Figure 3AThe encoding process is substantially the inverse of the decoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.
[0082] In some examples, units of the video decoder 30 may be tasked to perform embodiments of the present application. In addition, in some examples, embodiments of the present disclosure may be dispersed in one or more of the multiple units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (such as the motion compensation unit 82).
[0083] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source (such as a camera), via a wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard disk). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use by the video decoder 30 when decoding the video data (e.g., in an intra-frame or inter-frame prediction decoding mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. Figure 3B 9 as two different components of video decoder 30. However, it will be apparent to those skilled in the art that video data memory 79 and DPB 92 may be provided by the same memory device or separate memory devices. In some examples, video data memory 79 may be on-chip with other components of video decoder 30, or off-chip relative to those components.
[0084] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators and other syntax elements to the prediction processing unit 81.
[0085] When a video frame is encoded as an intra-prediction coded (I) frame or for intra-coded prediction blocks in other types of frames, intra-prediction unit 84 of prediction processing unit 81 may generate prediction data for a video block of a current video frame based on a signaled intra-prediction mode and reference data from a previously decoded block of the current frame.
[0086] When the video frame is encoded as an inter-frame prediction coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks may be generated from a reference frame within one of the reference frame lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference frames stored in the DPB 92.
[0087] In some examples, when a video block is decoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.
[0088] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for the video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) for decoding the video block of the video frame, the inter prediction frame type (e.g., B or P), the construction information for one or more of the reference frame lists for the frame, the motion vector for each inter prediction encoded video block of the frame, the inter prediction state for each inter prediction encoded video block of the frame, and other information for decoding the video block in the current video frame.
[0089] Similarly, the intra BC unit 85 may use some of the received syntax elements, such as a flag to determine whether the current video block is predicted using intra BC mode, construction information of which video blocks of the frame are within the reconstruction region and should be stored in the DPB 92, a block vector for each intra BC predicted video block of the frame, an intra BC prediction state for each intra BC predicted video block of the frame, and other information for decoding the video blocks in the current video frame.
[0090] Motion compensation unit 82 may also perform interpolation using interpolation filters as used during encoding of the video blocks by video encoder 20 to calculate interpolated values for sub-integer pixels of reference blocks. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use these interpolation filters to generate the prediction blocks.
[0091] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.
[0092] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (such as a deblocking filter, an SAO filter, and / or an ALF) may be located between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 may be omitted, and the decoded video block may be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (e.g., Figure 2 on a display device 34).
[0093] In a typical video encoding and decoding process, a video sequence usually includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other cases, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.
[0094] like Figure 4A As shown in , the video encoder 20 (or more specifically, a partitioning unit in a prediction processing unit of the video encoder 20) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs. A video frame may include an integer number of CTUs sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 4B As shown in , each CTU may include one CTB for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding and decoding samples of the coding tree blocks. The syntax elements describe the properties of different types of units of coding pixel blocks and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors, and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding and decoding samples of the coding tree block. The coding tree block may be an N×N sample block.
[0095] To achieve better performance, video encoder 20 may recursively perform tree partitioning, such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination thereof, on the coding tree block of the CTU and divide the CTU into smaller CUs. Figure 4C As depicted in , a 64×64 CTU 400 is first partitioned into four smaller CUs, each CU having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are partitioned into four CUs of a block size of 16×16, respectively. Two 16×16 CUs 430 and CU 440 are further partitioned into four CUs of a block size of 8×8, respectively. Figure 4D Depicted is a diagram showing Figure 4C The quadtree data structure of the final result of the partitioning process of CTU 400 depicted in FIG. 4 is a quadtree data structure, each leaf node of the quadtree corresponds to a CU of each size ranging from 32×32 to 8×8. Figure 4BEach CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of the same size frame, and syntax elements for encoding and decoding the samples of the coding blocks. In a monochrome picture or a picture with three separate color planes, a CU may include a single coding block and syntax structures for encoding and decoding the samples of the coding block. It should be noted that Figure 4C-4D The quadtree partitioning depicted in FIG is for illustrative purposes only, and one CTU may be split into CUs based on quadtree / ternary tree / binary tree partitioning to adapt to varying local characteristics. In a multi-type tree structure, one CTU is divided by a quadtree structure, and each quadtree leaf CU may be further divided by a binary tree structure and a ternary tree structure. Figure 4E As shown, there are five possible partition types for a coding block with a width of W and a height of H, namely, quadruple partition, vertical binary partition, horizontal binary partition, vertical ternary partition and horizontal ternary partition.
[0096] In some embodiments, the video encoder 20 may further divide the coding block of the CU into one or more M×NPBs. A PB is a rectangular (square or non-square) sample block to which the same prediction (inter or intra) is applied. The PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements for predicting the PBs. In a monochrome picture or a picture with three separate color planes, a PU may include a single PB and a syntax structure for predicting the PB. The video encoder 20 may generate a predicted luma block, a predicted Cb block, and a predicted Cr block for the luma PB, Cb PB, and Cr PB of each PU of the CU.
[0097] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.
[0098] After the video encoder 20 generates the predicted luma block, the predicted Cb block, and the predicted Cr block for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the predicted luma block of the CU from the original luma coding block of the CU, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.
[0099] In addition, if Figure 4C As shown in , the video encoder 20 may use quadtree partitioning to decompose the luma residual block, Cb residual block and Cr residual block of the CU into one or more luma transform blocks, Cb transform blocks and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) sample block to which the same transform is applied. A TU of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements for transforming the transform block samples. Therefore, each TU of a CU may be associated with a luma transform block, a Cb transform block and a Cr transform block. In some examples, the luma transform block associated with a TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.
[0100] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block for the TU.
[0101] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After video encoder 20 quantizes the coefficient block, video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, video encoder 20 may output a bitstream including a sequence of bits that form a representation of an encoded frame and associated data, and the bitstream is stored in storage device 32 or sent to target device 14.
[0102] After receiving the bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may reconstruct a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally the inverse of the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform an inverse transform on a coefficient block associated with a TU of the current CU to reconstruct a residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding samples of the prediction block for the PU of the current CU to corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block for each CU of the frame, the video decoder 30 may reconstruct the frame.
[0103] As mentioned above, video codecs mainly use two modes, namely, intra-frame prediction (or intra-frame prediction) and inter-frame prediction (or inter-frame prediction) to achieve video compression. It should be noted that IBC can be regarded as intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to codec efficiency than intra-frame prediction because motion vectors are used to predict the current video block from the reference video block.
[0104] However, with the ever-improving video data capture technology and more refined video block sizes for retaining details in the video data, the amount of data required to represent the motion vector of the current frame has also increased significantly. One way to overcome this challenge is to benefit from the fact that not only a group of neighboring CUs in both the spatial domain and the temporal domain have similar video data for prediction purposes, but the motion vectors between these neighboring CUs are also similar. Therefore, the motion information of spatially neighboring CUs and / or temporally co-located CUs can be used as an approximation of the motion information (e.g., motion vector) of the current CU by exploring the spatial and temporal correlation of the spatially neighboring CUs and / or the temporally co-located CUs, which is also referred to as the "motion vector predictor (MVP)" of the current CU.
[0105] Instead of combining as above Figure 3A The actual motion vector of the current CU determined by the motion estimation unit is encoded into the video bitstream, and the motion vector prediction factor of the current CU is subtracted from the actual motion vector of the current CU to generate the motion vector difference (MVD) of the current CU. By doing so, the motion vector determined by the motion estimation unit for each CU of the frame does not need to be encoded into the video bitstream, and the amount of data used to represent motion information in the video bitstream can be significantly reduced.
[0106] As in the process of selecting a prediction block in a reference frame during inter-frame prediction of a coding block, both the video encoder 20 and the video decoder 30 need to adopt a set of rules for constructing a motion vector candidate list (also called a "merge list") of the current CU using those potential candidate motion vectors associated with the spatial neighboring CUs and / or the temporal co-located CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector predictor of the current CU. By doing so, the motion vector candidate list itself does not need to be sent from the video encoder 20 to the video decoder 30, and the index of the selected motion vector predictor in the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor in the motion vector candidate list to encode and decode the current CU.
[0107] The main focus of this disclosure is to further enhance the codec efficiency of the symbol prediction tools applied in ECM. In the following, some relevant codec tools applied in the transform and entropy coding and decoding process in ECM are briefly reviewed. Some deficiencies existing in the existing symbol prediction design are discussed, and solutions to improve the existing symbol prediction design are proposed.
[0108] Geometric partitioning mode (GPM)
[0109] In VVC, for inter prediction, geometric partitioning mode is supported. Geometric partitioning mode is signaled as a special merge mode through a CU level flag. In the current GPM design, for each possible CU size (excluding 8×64 and 64×8) with width and height not less than 8 and not more than 64, GPM mode supports a total of 64 partitions.
[0110] When using this mode, the CU Figure 5 The geometric positioning line shown in is divided into two parts, Figure 5Some allowed GPM partitions according to some examples of the present disclosure are shown. The position of the split line or partition line is mathematically derived from the angle and offset parameters of the specific partition. Each part of the geometric partition in the CU is inter-predicted using its own motion; only unidirectional prediction is allowed for each partition, that is, each part has one motion vector and one reference index. Unidirectional prediction motion constraints are applied to ensure that only two motion compensated predictions are required for each CU, the same as conventional bidirectional prediction. If a geometric partitioning mode is used for the current CU, a geometric partitioning index indicating the partitioning mode (angle and offset) of the geometric partition, and two merge indexes (one merge index for each partition) are further signaled. The number of the maximum GPM candidate size is explicitly signaled at the sequence level.
[0111] One-way prediction merge candidate list construction
[0112] To derive the unidirectional prediction motion vector for a geometric partition, first derive a unidirectional prediction candidate list directly from the regular merge candidate list generation process. Denote n as the index of the unidirectional prediction motion in the geometric unidirectional prediction candidate list. The LX motion vector of the nth merge candidate (where X is an odd or even number of n) is used as the nth unidirectional prediction motion vector for the geometric partition mode. These motion vectors are in Figure 6 In the case where the corresponding LX motion vector of the n-th extended merge candidate does not exist, the L(1-X) motion vector of the same candidate is used as the unidirectional prediction motion vector for the geometric partitioning mode instead.
[0113] Blending along the edges of geometric partitions
[0114] After obtaining each geometric partition using its own motion, blending is applied to the two unidirectional prediction signals to derive samples around the edges of the geometric partitions. A blending weight for each position of the CU is derived based on the distance from each individual sample position to the corresponding partition edge.
[0115] Fig.14 1 shows the distance from any position within a block to the partition edge for a geometric partitioning mode according to some examples of the present disclosure. Fig.14 As shown, the distance (or displacement) d(x c ,y c ) is mathematically defined in the Hessian norm form:
[0116]
[0117] where x c and c Indicates the position relative to the center of the block; represents the angle parameter, and ρ represents the offset parameter of the partition boundary.
[0118] In order to realize displacement calculation in practice, the angle parameter and the offset parameter are quantized into integers.
[0119] d(x c ,y c )=((x c +ρ x,j )cosLut[i])>>3+((y c +ρ y,j )cosLut[(i+8)%32])>>3,
[0120] where ρ x,j and ρ y,j is a quantized offset that depends on the width and height of the block; and cosLut[i] represents the quantized cosine lookup table for angle parameter index i.
[0121] Finally, the continuous sample point positions (x c ,y c ) is quantized to integer positions (m,n), and the displacement d(m,n) is given by:
[0122] d(m,n)=((m+ρ x.j )<<1-w+1)cosLut[i]+((n+ρ y,j )<<1-h+1)cosLut[(i+8)%32].
[0123] Fig.15 Some examples according to the present disclosure are shown Fig.14 Quantification of the distance in .
[0124] Quantized d(m,n) and d(x c ,y c ) is given by the following formula:
[0125]
[0126] Fig.16 Soft blending regions on both sides of a partition boundary are shown according to some examples of the present disclosure. Fig.16 As shown in FIG. 1 , a soft mix region with a width of θ luminance samples is defined on both sides of the partition boundary. Outside the soft mix region, only weighting values 0 or 8 can be selected. In the soft mix region, the weighting value ω(x c ,y c ):
[0127]
[0128] The ramp function is also quantized to integer positions to obtain weighted values ω(m,n), which are used in the mixing process of GPM, i.e.,
[0129] ω(m,n)=Clip3(0,8,(d(m,n)+32+4)>>3).
[0130] Two mixing matrices (W0 and W1) are generated using these values in different locations.
[0131] The GPM predictor is then given by:
[0132]
[0133] GPM signaling design
[0134] According to the current GPM design, the use of GPM is indicated by signaling a flag at the CU level. The flag is signaled only when the current CU is encoded through merge mode or skip mode. Specifically, when the flag is equal to one, it indicates that the current CU is predicted through GPM. Otherwise (that is, the flag is equal to zero), the CU is encoded and decoded through another merge mode, such as normal merge mode, merge mode with motion vector difference, combined inter and intra prediction, etc. When GPM is enabled for the current CU, a syntax element (that is, merge_gpm_partition_idx) is further signaled to indicate the applied geometric partitioning mode (which specifies the direction and offset of the straight line from the CU center that divides the CU into two partitions, such as Figure 5). Thereafter, two syntax elements merge_gpm_idx0 and merge_gpm_idx1 are signaled to indicate the indices of the unidirectional prediction merge candidates used for the first GPM partition and the second GPM partition. More specifically, these two syntax elements are used to determine the unidirectional MVs of the two GPM partitions from the unidirectional prediction merge list as described in the "Unidirectional Prediction Merge List Construction" section. According to the current GPM design, in order to make the two unidirectional MVs more different, the two indexes cannot be the same. Based on such a priori knowledge, the unidirectional prediction merge index of the first GPM partition is first signaled and used as a prediction factor to reduce the signaling overhead of the unidirectional prediction merge index of the second GPM partition. In detail, if the second unidirectional prediction merge index is less than the first unidirectional prediction merge index, the original value of the second unidirectional prediction merge index is directly signaled. Otherwise (the second unidirectional prediction merge index is greater than the first unidirectional prediction merge index), the value of the second unidirectional prediction merge index is subtracted by 1 before being signaled to the bitstream. On the decoder side, the first unidirectional prediction merge index is first decoded. Then, for decoding of the second unidirectional prediction merge index, if the resolved value is less than the first unidirectional prediction merge index, the second unidirectional prediction merge index is set equal to the resolved value; otherwise (the resolved value is equal to or greater than the first unidirectional prediction merge index), the second unidirectional prediction merge index is set equal to the resolved value plus 1. Table 1 shows the existing syntax elements for the GPM mode in the current VVC specification.
[0135] Table 1 Existing GPM syntax elements in the merged data syntax table of the VVC specification
[0136]
[0137] On the other hand, in the current GPM design, truncated unary codes are used for binarization of two unidirectional prediction merge indexes (i.e., merge_gpm_idx0 and merge_gpm_idx1). In addition, because the two unidirectional prediction merge indexes cannot be the same, different maximum values are used to truncate the codewords of the two unidirectional prediction merge indexes, which are set equal to MaxGPMMergeCand-1 and MaxGPMMergeCand-2 for merge_gpm_idx0 and merge_gpm_idx1, respectively. MaxGPMMergeCand is the number of candidates in the unidirectional prediction merge list. On the decoder side, when the received value of merge_gpm_idx1 is equal to or greater than merge_gpm_idx0, the value of merge_gpm_idx1 will be increased by 1, taking into account that the values of merge_gpm_idx0 and merge_gpm_idx1 cannot be the same. When the GPM mode is applied, two different binarization methods are applied to translate the syntax element merge_gpm_partition_idx into a string of binary bits. Specifically, in VVC, the syntax element is binarized by fixed-length coding and truncated binary coding.
[0138] Motion signaling for regular inter-mode
[0139] Similar to the HEVC standard, in addition to merge mode / skip mode, both VVC and AVS3 allow an inter-CU to explicitly specify its motion information in the bitstream. In general, the motion information signaling in both VVC and AVS3 remains the same as that in the HEVC standard. Specifically, an inter-prediction syntax (i.e., inter_pred_idc) is first signaled to indicate whether the prediction signal is from list L0, list L1, or both. For each reference list used, the corresponding reference picture is identified by signaling a reference picture index ref_idx_lx (x=0, 1) for the corresponding reference list, and the corresponding MV is represented by an MVP index mvp_lx_flag (x=0, 1) used to select the MV predictor (MVP), followed by its motion vector difference (MVD) between the target MV and the selected MVP. In addition, in the VVC standard, a control flag mvd_l1_zero_flag is signaled at the slice level. When mvd_l1_zero_flag is equal to 0, L1 MVD is signaled in the bitstream; otherwise (when mvd_l1_zero_flag flag is equal to 1), L1 MVD is not signaled and its value is always inferred to be zero at the encoder and decoder.
[0140] Bidirectional prediction with CU-level weights
[0141] In previous standards before VVC and AVS3, when weighted prediction (WP) is not applied, a bidirectional prediction signal is generated by averaging the unidirectional prediction signals obtained from two reference pictures. In VVC, a tool codec, bidirectional prediction with CU-level weights (BCW), is introduced to improve the efficiency of bidirectional prediction. Specifically, instead of simple averaging, the bidirectional prediction in BCW is extended by allowing a weighted average of two prediction signals, as depicted below:
[0142] P'(i,j)=((8-w)·P0(i,j)+w·P1(i,j)+4)>>3.
[0143] In VVC, when the current picture is a low-latency picture, the weight of a BCW coding block is allowed to be selected from a predefined set of weight values w∈{-2,3,4,5,10}, and a weight of 4 represents the traditional bidirectional prediction case where two unidirectional prediction signals are equally weighted. For low latency, only 3 weights w∈{3,4,5} are allowed. In general, although there are some design similarities between WP and BCW, the two coding tools aim to solve the problem of brightness changes at different granularities. However, because the interaction between WP and BCW may potentially complicate the VVC design, it is not allowed to enable both tools at the same time. Specifically, when WP is enabled for a slice, the BCW weights of all bidirectional predicted CUs in the slice are not signaled and are inferred to be 4 (i.e., equal weights are applied).
[0144] Template Matching
[0145] Template Matching (TM) is a decoder-side MV derivation method used to refine the motion information of the current CU by finding the best match between a template consisting of the top and left neighboring reconstructed samples of the current CU and a reference block in a reference picture (i.e., the same size as the template). Figure 7 The template matching algorithm according to some examples of the present disclosure is shown. Figure 7 As shown in , an MV is searched around the initial motion of the current CU in the [-8, +8] pixel search range. The best match can be defined as the MV that achieves the lowest matching cost (e.g., sum of absolute difference (SAD), sum of absolute transform difference (SATD), etc.) between the current template and the reference template. There are two different ways to apply TM mode to inter-frame coding.
[0146] In AMVP mode, MVP candidates are determined based on template matching differences to pick the MVP candidate that achieves the minimum difference between the current block template and the reference block template, and then TM is performed only for this specific MVP candidate for MV refinement. TM refines this MVP candidate starting from full-pixel MVD accuracy (or 4 pixels for 4-pixel AMVR mode) within the [-8, +8] pixel search range using an iterative diamond search. Depending on the AMVR mode specified as shown in Table 2 below, the AMVP candidate can be further refined by using a cross search with full-pixel MVD accuracy (or 4 pixels for 4-pixel AMVR mode), followed by half-pixel accuracy and 1 / 4 pixel accuracy. This search process ensures that the MVP candidate still maintains the same MV accuracy as indicated by the AMVR mode after the TM process.
[0147] In merge mode, a similar search method is applied to the merge candidate indicated by the merge index. As shown in Table 2, depending on whether an alternative interpolation filter is used according to the merge motion information (which is used when AMVR is in half-pixel mode), TM can be performed all the way to 1 / 8 pixel MVD precision or skip those MVD precisions beyond half-pixel MVD precision.
[0148] Table 2 Search patterns for AMVR mode and merge mode
[0149]
[0150]
[0151] Decoder-side Intra Mode Derivation (DIMD)
[0152] DIMD is an intra-frame codec tool in which the luma intra prediction mode (IPM) is not sent via the bitstream. Instead, it is derived in the same way at the encoder and decoder using previously encoded / decoded pixels. The DIMD method performs texture gradient processing to derive 2 best modes. These two modes and the planar mode are then applied to the block, and their prediction factors are weighted averaged. For intra-coded blocks, the selection of DIMD is signaled in the bitstream using a flag. At the decoder, if the DIMD flag is true, the same previously encoded neighboring pixels are used to derive the intra prediction mode during the reconstruction process. If the DIMD flag is false, the intra prediction mode is parsed from the bitstream as in traditional intra-frame coding mode.
[0153] To derive the intra prediction mode for a block, we first select a set of neighboring pixels for which we will perform gradient analysis. For normative purposes, these pixels should be in the decoded / reconstructed pixel pool. Figure 8 As shown, a template is selected that surrounds the current block T pixels to the left and T pixels upward. Next, a gradient analysis is performed on the pixels of the template. This allows the principal direction for the template to be determined, assuming (and this may be a premise of the disclosed method) that there is a high probability that the principal direction is the same as the principal direction of the current block. Therefore, a simple 3×3 Sobel gradient filter is used, which is defined by the following matrix that will be convolved with the template:
[0154] and
[0155] For each pixel of the template, each of these two matrices is point-wise multiplied with a 3×3 window centered on the current pixel and consisting of its 8 immediate neighbors, and the results are summed. Thus, two values Gx (from the multiplication result with Mx) and Gy (from the multiplication result with My) corresponding to the gradient at the current pixel are obtained in the horizontal and vertical directions, respectively.
[0156] Fig. 9 The convolution process is shown. The blue pixel is the current pixel. The red pixels (including blue) are pixels that can be gradient analyzed. The gray pixels are pixels that cannot be gradient analyzed due to the lack of some neighbors. The purple pixels are available (reconstructed) pixels outside the template under consideration, which are used for gradient analysis of red pixels. In the case where the purple pixel is not available (for example, because the block is too close to the boundary of the picture), the gradient analysis of all red pixels using the purple pixel is not performed. For each red pixel, we use Gx and Gy to calculate the strength (G) and direction (O) of the gradient, as follows:
[0157] G=|G x |+|G y | and
[0158] The direction of the gradient is then converted to an intra-frame angular prediction mode, which is used to index the histogram (initialized to zero first). The histogram values in this intra-frame angular mode are increased by G. Once all red pixels in the template have been processed, the histogram will contain the cumulative value of the gradient strength for each intra-frame angular mode. The IPM corresponding to the two highest histogram bars is selected for the current block. If the maximum value in the histogram is 0 (meaning that gradient analysis cannot be performed, or the area that makes up the template is flat), DC mode is selected as the intra-frame prediction mode for the current block.
[0159] The two IPMs corresponding to the two highest Histogram of Oriented Gradients (HoG) bins are combined with the plane mode. Prediction fusion is applied as a weighted average of the above three predictors. For this purpose, the weight of the plane is fixed to 21 / 64 (~1 / 3). The remaining weight 43 / 64 (~2 / 3) is then shared between the two HoG IPMs in proportion to the magnitude of their HoG bins. Fig. 9 The process was visualized.
[0160] The derived intra modes are included in the master list of intra most probable modes (MPMs), so the DIMD process is performed before building the MPM list. The master derived intra modes of a DIMD block are stored with the block and used for MPM list construction for neighboring blocks.
[0161] Template-based intra mode derivation (TIMD)
[0162] For each intra mode in MPM, calculate Fig.11 The sum of absolute transformed differences (SATD) between the predicted samples and the reconstructed samples of the template area shown, and the intra modes of the first two modes with the smallest SATD cost are selected, and then they are merged with the weights, and this weighted intra prediction is used to encode and decode the current CU.
[0163] The cost of the two selected patterns is compared to the threshold. In the test, a cost factor of 2 is applied as follows:
[0164] costMode2<2×costMode1.
[0165] If this condition is true, then fusion is applied, otherwise only mode 1 is used.
[0166] The weights of the modes are calculated according to their SATD costs as follows:
[0167] weight1=costMode2 / (costMode1+costMode2)
[0168] weight2=1-weight1.
[0169] Geometric Partitioning Mode with Template Matching (TM)
[0170] In ECM, template matching (TM) is applied on top of the geometric partitioning mode. When GPM is enabled for the current CU, two unidirectional motion information sets of GPM are derived from the GPM merge candidate list for each part of the GPM. The GPM merge candidate list is constructed as follows:
[0171] 1. Derive interleaved list 0 MV candidates and list 1 MV candidates directly from the regular merge candidate list, where list 0 MV candidates have higher priority than list 1 MV candidates. Apply a pruning method with an adaptive threshold based on the current CU size to remove redundant MV candidates.
[0172] 2. Further derive interleaved list-1 MV candidates and list-0 MV candidates directly from the regular merge candidate list, where list-1 MV candidates have higher priority than list-0 MV candidates. The same pruning method with adaptive threshold is also applied to remove redundant MV candidates.
[0173] 3. Fill in zero MV candidates until the GPM candidate list is full.
[0174] A CU level flag is further signaled to indicate that TM is enabled for GPM, i.e., the two motion vectors of the GPM are further refined using template matching. During this template matching, one of the following template types may be used for refinement, i.e., above (A), left (L), above plus left (A+L) of the current block. In the current ECM 3.1 (adopted from JVET W0065), the template type is selected based on the angle parameter of the GPM, as shown in Table 3 below.
[0175] Table 3 Template type selection
[0176] Partition Angle 0 2 3 4 5 8 11 12 13 14 First Division A A A A L+A L+A L+A L+A A A Second Division L+A L+A L+A L L L L L+A L+A L+A Partition Angle 16 18 19 20 21 24 27 28 29 30 First Division A A A A L+A L+A L+A L+A A A Second Division L+A L+A L+A L L L L L+A L+A L+A
[0177] The motion is then refined by minimizing the difference between the current template and the template in the reference picture using the same search pattern of merge mode with the half-pixel interpolation filter disabled.
[0178] Template matching based reordering for GPM segmentation mode
[0179] In VVC and ECM-3.1, there are 64 GPM partition modes, and the use of the partition mode for each GPM coding unit (CU) is signaled using a fixed-length binary code. This coding approach may mean that all GPM partition modes are treated as equally probable events, so a fixed-length code can be used for signaling accordingly.
[0180] A template matching based GPM segmentation pattern reordering method was first proposed in JVET document JVET-Y0135. The template matching cost for each GPM segmentation pattern is calculated, and the segmentation patterns are reordered based on the cost at both the encoder and decoder sides. Only the best N candidates are available, where N is less than or equal to 64. Golomb-Rice codes are used instead of fixed-length binary codes to signal the GPM pattern index.
[0181] The reordering method for the GPM partitioning mode is a two-step process after generating the corresponding reference templates of the two GPM partitions in the coding unit, as follows:
[0182] Mix the reference templates of the two GPM partitions using the corresponding weights of the partitioning mode (i.e., generate 64 mixed reference templates), and calculate the corresponding TM costs of these mixed reference templates;
[0183] Re-sort the TM costs in ascending order and mark the best N candidates as available segmentation patterns.
[0184] The edges on the template extend from the edges of the current CU, such as Fig.12 The corresponding weights used in the template's blending process are calculated similarly to the GPM weight derivation process. The only differences are as follows:
[0185] The sample point positions on the template (relative to the original positions of the CU) are used to derive weights;
[0186] • The weights are mapped to 0 and 8 before use, depending on which one is closer, and so the edges on the template are cleanly cut to simplify calculations during blending of the templates.
[0187] GPM with inter-frame prediction and intra-frame prediction
[0188] In previous GPM designs, inter prediction with two unidirectional predictions is used to generate the final prediction. JVET-X0166 and JVET-Y0065 introduced a method that combines inter prediction and intra prediction for GPM.
[0189] In GPM with inter prediction and intra prediction, for each GPM separated region, the final prediction samples are generated by weighting the inter prediction samples and the intra prediction samples. Each part contains a flag to indicate whether inter prediction or intra prediction is used. The inter prediction samples are derived by the same scheme as the current GPM, while the intra prediction samples are derived by the intra prediction mode (IPM) candidate list and the index signaled from the encoder. The IPM candidate list size is predefined to be 3. The available IPM candidates are parallel angle modes (such as Fig.13Aparallel mode as shown in ), perpendicular angle mode relative to the GPM block boundary (as shown in Fig. 13B vertical mode as shown in Fig. 13C In addition, as shown in Fig.12 The GPM with intra prediction and intra prediction shown in D is restricted in this method to reduce the signaling overhead for IPM and avoid increasing the size of the intra prediction circuit on the hardware decoder. In addition, direct motion vector and IPM storage are introduced on the GPM mixed region to further improve the encoding and decoding performance.
[0190] In addition, the IPM list within the GPM frame can be further improved by DIMD, TIMD and angle mode from neighboring blocks. More specifically, parallel mode is used in the first position of the IPM list, and then the IPM candidates from the neighbors' TIMD, DIMD and angle mode are used to perform cropping between candidates.
[0191] Regarding neighbor mode derivation, there are up to five positions for available neighbor blocks, but they are restricted by the angles of the GPM block boundaries, as shown in Table 4 below.
[0192] Table 4. Location of neighboring blocks subject to angle constraints of GPM
[0193] GPM Angle 0 2 3 4 5 8 11 12 13 14 First Division A A A A L+A L+A L+A L+A A A Second Division L+A L+A L+A L L L L L+A L+A L+A Partition Angle 16 18 19 20 21 24 27 28 29 30 First Division A A A A L+A L+A L+A L+A A A Second Division L+A L+A L+A L L L L L+A L+A L+A
[0194] GPM Adaptive Mixing
[0195] The GPM adaptive hybrid method has been disclosed in JVET-Z0127.
[0196] During the development of VVC, the Geometric Partitioning Mode (GPM) was adopted. During the development of ECM, GPM was further enhanced by, for example, GPM+TM, GPM+MMVD, and inter+intra GPM. However, the mixing strength of GPM has not been improved since the original GPM design. That is, Fig.16 As shown, for all different contents, the blending strength or blending area width θ is fixed. In an embodiment, the blending strength is related to the blending area between two GPM partitions. For example, the blending strength indicates the size of the blending area between two GPM partitions. The blending strength can be a parameter that defines the width of the blending area between two GPM partitions.
[0197] The weighting values in the blending mask can be given by a ramp function:
[0198]
[0199] With θ=2 pixels fixed in the current ECM (VVC) design, the ramp function can be quantized as:
[0200] ω m,n =Clip3(0,8,(d(m,n)+32+4)>>3).
[0201] It is discussed that this design may not always be optimal, because a fixed blending region width may not always provide the best blending quality for various types of video content. For example, screen video content often contains strong textures and sharp edges, which prefer narrow blending regions to preserve edge information. For camera-captured content, blending is often desired; however, the blending region width depends on multiple factors, such as the actual boundaries of moving objects and the uniqueness of the motion of the two partitions.
[0202] To solve the above problems, an adaptive blending scheme is proposed for GPM, which dynamically adjusts the width of the blending region around the GPM partition boundary. Specifically, the width of the blending region (i.e., θ) is allowed to be selected from a set of predefined values (e.g., {0, 1, 2, 4, 8}). The optimal blending region width is determined for each GPM CU at the encoder and is signaled to the decoder based on a syntax element merge_gpm_blending_width_idx. In this scheme, all predefined blending strength values are shiftable, while all cropping and shifting operations in the existing GPM blending process can be maintained without any changes.
[0203] In addition, the range of weights is increased from [0, 8] to [0, 32] to accommodate the increased width of the GPM mixing region. Specifically, the weights are calculated as:
[0204]
[0205] In the current GPM adaptive mixing, several mixing strengths are predefined and indexed. For example, for θ={0,1,2,4,8}, the index of the mixing strength for the block using GPM (for example, an index value of 0 may indicate θ=0) needs to be signaled into the bitstream at the encoder, and this index needs to be parsed at the decoder. This index is binarized with a fixed length code and signaled without a context model, which is inefficient. In order to improve performance, several schemes are proposed to improve signaling. Specifically, the index signaling method for geometric partitioning patterns with adaptive mixing is improved to obtain better coding and decoding efficiency.
[0206] In some examples, the mixing indexes corresponding to predefined values of θ are binarized using a variable length code.
[0207] For example, the mixing index is binarized using a truncated unary code. An example is shown in Table 5 below. In this example, it is assumed that for a predefined set of mixing strength values θ={0, 1, 2, 4, 8}, the corresponding mixing index is {0, 1, 2, 3, 4}, as shown in the first two columns of Table 5. For a coding block, the binarized value in the third column can be signaled to indicate the mixing index corresponding to the mixing strength.
[0208] Table 5 Binarization of mixed index using truncated unary code
[0209] index Mixed Theta Binarization value 0 0 0 1 1 10 2 2 110 3 4 1110 4 8 1111
[0210] The benefit of truncated unary codes is that low-frequency indices can use longer codewords, while high-frequency indices can use shorter codewords. Therefore, the average signaling cost is lower. That is, lower index values correspond to higher frequency mixed strengths and are binarized with shorter codewords.
[0211] For example, for some video content, based on statistics, θ=2 is the most frequently used; θ={0,1} is more frequently used than θ={4,8}. Therefore, the binarization table can be the following Table 6, where the shortest binarization value (i.e., one bit '0') corresponds to the most frequently used mixing strength (i.e., θ=2).
[0212] Table 6 Binarization of mixed index using truncated unary code
[0213] index Mixed Theta Binarization value 0 2 0 1 0 10 2 1 110 3 4 1110 4 8 1111
[0214] As shown in the examples shown in Tables 5 and 6, the mapping relationship between the mixing index and the mixing strength (i.e., the signaling order) is variable. For example, it can be controlled by an advanced flag to suit different content types. Therefore, for screen content that prefers a sharper mix with θ={0,1} and natural content that prefers a soft mix with θ=2, different mapping relationships (i.e., different binarization tables) can be used.
[0215] In some examples, the mixing index is binarized using a truncated Rice code. An example is shown in Table 7 below, which shows the binarized values for θ={0,1,2,4,8} and the corresponding mixing indexes {0,1,2,3,4}.
[0216] Table 7 Binarization of mixed index using truncated Rice code
[0217] index Mixed Theta Binarization value 0 0 00 1 1 01 2 2 100 3 4 101 4 8 1100
[0218] Similar to truncated unary codes, using truncated Rice codes also provides the following benefits: low-frequency indices can use longer codewords, while high-frequency indices can use shorter codewords. Therefore, the average signaling cost is lower.
[0219] For example, for some video content, based on statistics, θ=2 is the most frequently used; θ={0,1} is more frequently used than θ={4,8}. Therefore, the binarization table can be the following Table 8, where the shortest binarization value (i.e., one bit '0') corresponds to the most frequently used mixing strength (i.e., θ=2).
[0220] Table 8 Binarization of mixed index using truncated Rice code
[0221] index Mixed Theta Binarization value 0 2 00 1 0 01 2 1 100 3 4 101 4 8 1100
[0222] As shown in the examples shown in Tables 7 and 8, the mapping relationship between the mixing index and the mixing strength (i.e., the signaling order) is variable. For example, it can be controlled by an advanced flag to suit different content types. Therefore, for screen content that prefers a sharper mix with θ={0,1} and natural content that prefers a soft mix with θ=2, different mapping relationships (i.e., different binarization tables) can be used.
[0223] In some examples, the mixing index is binarized using an exp-golomb code. An example is shown in Table 9 below, which shows the binarized values for θ == {0, 1, 2, 4, 8} and the corresponding mixing index {0, 1, 2, 3, 4}.
[0224] Table 9 Binarization of mixed index using Exp-golomb code
[0225] index Mixed Theta Binarization value 0 0 1 1 1 010 2 2 011 3 4 00100 4 8 00101
[0226] Similar to truncated unary codes, using exp-golomb codes also provides the following benefits: low-frequency indices can use longer codewords, while high-frequency indices can use shorter codewords. Therefore, the average signaling cost is lower.
[0227] For example, for some video content, based on statistics, θ=2 is the most frequently used; θ={0,1} is more frequently used than θ={4,8}. Therefore, the binarization table can be the following Table 10, where the shortest binarization value (i.e., one bit '0') corresponds to the most frequently used mixing strength (i.e., θ=2).
[0228] Table 10 Binarization of mixed index using Exp-golomb code
[0229] index Mixed Theta Binarization value 0 2 1 1 0 010 2 1 011 3 4 00100 4 8 00101
[0230] As shown in the examples shown in Tables 9 and 10, the mapping relationship between the mixing index and the mixing strength (i.e., the signaling order) is variable. For example, it can be controlled by advanced flags to suit different content types. Therefore, for screen content that prefers a sharper mix with θ={0,1} and natural content that prefers a soft mix with θ=2, different mapping relationships (i.e., different binarization tables) can be used.
[0231] In some examples, a context modeling approach is used instead of directly signaling the binarized value. For example, three context models can be used.
[0232] If no neighboring blocks (left and above the current block) contain blocks using GPM (ie, gpm_flag=1) and the blending strength is equal to X (X is one of the predefined values, eg, X=2), the first context model is used.
[0233] Otherwise, if one of the neighboring blocks (left and above) contains a block using GPM (ie, gpm_flag=1) and the blending strength is equal to X (X is one of the predefined values, eg, X=2), the second context model is used.
[0234] Otherwise, if both neighboring blocks (left and above) contain blocks using GPM (ie, gpm_flag=1) and the blending strength is equal to X (X is one of the predefined values, eg, X=2), the third context model is used.
[0235] That is, in an example, a context model may be selected based on whether a neighboring block of the current block includes a block using a geometric partitioning pattern and a mixed strength of the current block.
[0236] In another example, the following three context models may be used.
[0237] If no neighboring blocks (to the left and above the current block) contain blocks using GPM (ie, gpm_flag=1), the first context model is used.
[0238] Otherwise, if a neighboring block (to the left and above) contains a block using GPM (ie, gpm_flag=1), the second context model is used.
[0239] Otherwise, if the two neighboring blocks (left and above) contain blocks using GPM (ie, gpm_flag=1), the third context model is used.
[0240] That is, in this example, a context model may be selected based on whether a neighboring block of the current block includes a block using a geometric partitioning pattern.
[0241] In some examples, different sets of predefined mixing strengths may be used.The signaling of the set of predefined indices may depend on certain conditions, such as parameters related to the current block, such as the size of the block.
[0242] In an example, if the block size condition is met (eg, the width of the block is greater than 16 or the height is greater than 16), the predefined set 1 with θ={0,1,2,4,8} is used and signaled using any of the signaling schemes mentioned above.
[0243] Otherwise, if the block size condition is not met (eg, width is less than or equal to 16 and height is less than or equal to 16), a predefined set 2 with θ = {0, 1, 2, 4} is used and signaled using any of the signaling schemes mentioned above.
[0244] Using different predefined sets may be able to save unnecessary signaling overhead.
[0245] In some examples, the signaling of the predefined index set may depend on a signaled GPM angle parameter, ie, the angle of the partition lines of the block.
[0246] For example, if the angle parameter condition is met (eg, the angle parameter is greater than or equal to X, where X is a predefined value), the predefined set 1 with θ={0,1,2,4,8} is used and signaled using any of the signaling schemes mentioned above.
[0247] Otherwise, if the angle parameter condition is not met (eg, the angle parameter is less than X, where X is a predefined value), the predefined set 2 with θ={0,1,2,4} is used and signaled using any of the signaling schemes mentioned above.
[0248] Using different predefined sets may be able to save unnecessary signaling overhead.
[0249] Fig.17 A computing environment 1710 is shown coupled to a user interface 1750. The computing environment 1710 may be part of a data processing server. The computing environment 1710 may include a processor 1720, a memory 1730, and an input / output (I / O) interface 1740.
[0250] The processor 1720 generally controls the overall operation of the computing environment 1710, such as operations associated with display, data acquisition, data communication, and image processing. The processor 1720 may include one or more processors to execute instructions to perform all or some steps in the above method. In addition, the processor 1720 may include one or more modules that facilitate interaction between the processor 1720 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a graphics processing unit (GPU), etc.
[0251] The memory 1730 is configured to store various types of data to support the operation of the computing environment 1710. The memory 1730 may include predetermined software 1732. Examples of such data include instructions for any application or method operating on the computing environment 1710, video data sets, image data, etc. The memory 1730 may be implemented by using any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0252] I / O interface 1740 provides an interface between processor 1720 and peripheral interface modules such as a keyboard, click wheel, buttons, etc. Buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. I / O interface 1740 may be coupled to an encoder and a decoder.
[0253] In an embodiment, a non-transitory computer-readable storage medium is also provided, which includes, for example, a plurality of programs in a memory 1730, which can be executed by a processor 1720 in a computing environment 1710 to perform the above method. Optionally, the non-transitory computer-readable storage medium may store therein a bit stream or a data stream, the bit stream or the data stream including the bit stream or the data stream generated by an encoder (e.g., Figure 3A The video encoder 20 in the example generates a video signal for a decoder (e.g., Figure 3BThe non-transitory computer-readable storage medium may be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0254] In an embodiment, a computing device is also provided, comprising: one or more processors (e.g., processor 1720); and a non-transitory computer-readable storage medium or memory 1730 storing therein a plurality of programs executable by the one or more processors, wherein the one or more processors are configured to perform the above-mentioned method when executing the plurality of programs.
[0255] In an embodiment, a computer program product is also provided, including multiple programs, for example, in the memory 1730, which can be executed by the processor 1720 in the computing environment 1710 to perform the above method. For example, the computer program product may include a non-transitory computer-readable storage medium.
[0256] In an embodiment, the computing environment 1710 may be implemented using one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0257] The description of the present disclosure has been presented for purposes of illustration and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative embodiments will be apparent to one of ordinary skill in the art having the benefit of the teachings presented in the foregoing description and the associated drawings.
[0258] Unless otherwise explicitly stated, the order of the steps of the method according to the present disclosure is intended to be illustrative only, and the steps of the method according to the present disclosure are not limited to the order specifically described above, but may be changed according to actual circumstances. In addition, at least one step of the method according to the present disclosure may be adjusted, combined or deleted according to actual needs.
[0259] The examples are chosen and described in order to explain the principles of the present disclosure and to enable other persons skilled in the art to understand the various embodiments of the present disclosure and to best utilize the basic principles and various embodiments with various modifications suitable for the specific use contemplated. Therefore, it should be understood that the scope of the present disclosure is not limited to the specific examples of the disclosed embodiments, and modifications and other embodiments are intended to be included within the scope of the present disclosure.
[0260] Fig.18 is a flow chart illustrating a method for video decoding according to an example of the present disclosure. The example method may be implemented by a decoder.
[0261] In step 1801, the processor 1720 on the decoder side may obtain a set of mixed strengths for the current block, where the current block is divided into two parts along a partition line for prediction in a geometric partitioning mode. For example, as shown in Tables 9 and 10, the mapping relationship between the mixed index and the mixed strength (i.e., the signaling order) is variable, which may be controlled by one or more flags.
[0262] In step 1802, the processor 1720 may obtain a mapping relationship between a plurality of mixing indexes and mixing strengths in a mixing strength set. For example, the processor 1720 obtains a mapping relationship between a predefined value set θ={0, 1, 2, 4, 8} and an index {0, 1, 2, 3, 4} as shown in the first two columns of any one of Tables 5 to 10.
[0263] In step 1803, the processor 1720 may obtain a binarized value indicating one of the mixed indexes, wherein the mixed index is binarized using a variable length code. For example, the mixed indexes shown in Table 5 or Table 6 are binarized using a truncated unary code, so that a low-frequency index can use a longer codeword and a high-frequency index can use a shorter codeword, thereby reducing the average signaling cost.
[0264] In step 1804, the processor 1720 may determine the mixing strength of the current block based on the binarization value and the mapping relationship. For example, the binarization value '0' sent to the decoder by the signal indicates that the mixing strength is 0 (ie, the mixing area width θ=0) when the mapping relationship shown in Table 5 is used, or indicates that the mixing strength is 2 when the mapping relationship shown in Table 6 is used.
[0265] Fig.19 is shown as Fig.18 The method for video decoding shown corresponds to a flow chart of a method for video encoding. The example method may be implemented by an encoder.
[0266] In step 1901, the processor 1720 on the encoder side may obtain a mixed strength set for the current block, where the current block is divided into two parts along a partition line for prediction in a geometric partitioning mode. For example, if the block size condition is met (for example, the width of the block is greater than 16 or the height is greater than 16), the processor 1720 obtains a predefined value set θ={0,1,2,4,8}; or if the block size condition is not met, the processor 1720 obtains θ={0,1,2,4}.
[0267] In step 1902, the processor 1720 may obtain a mapping relationship between multiple mixing indexes and mixing strengths in a mixing strength set. For example, as shown in Tables 9 and 10, the mapping relationship between the mixing index and the mixing strength (ie, the signaling order) is variable and may be controlled by one or more flags.
[0268] In step 1903, the processor 1720 may determine a mixing strength of the current block among the mixing strengths in the mixing strength set. For example, for a block of natural content that prefers soft mixing, θ=2 may be determined.
[0269] In step 1904, the processor 1720 may determine a binarization value indicating a mixing index corresponding to the mixing strength of the current block, wherein the mixing index is binarized using a variable length code. For example, the mixing index shown in Table 5 or Table 6 is binarized using a truncated unary code, so that a low-frequency index can use a longer codeword and a high-frequency index can use a shorter codeword, thereby reducing an average signaling cost.
[0270] In some examples, a device for video decoding is provided. The device includes a processor 1720 and a memory 1730 configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Fig.18 The method shown.
[0271] In some examples, an apparatus for video encoding is provided. The apparatus includes a processor 1720 and a memory 1730 configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Fig.19 The method shown.
[0272] In some other examples, a non-transitory computer-readable storage medium is provided having instructions stored therein. For example, the instructions may be stored as predetermined software 1732 or as part of the software. When the instructions are executed by processor 1720, the instructions cause the processor to perform the following steps: Figure 18-Figure 19 In one example, multiple programs may be executed by processor 1720 in computing environment 1710 to (e.g., Figure 3AThe video encoder 20 in the computing environment 1710 receives a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or one or more associated syntax elements, etc.), and can also be executed by the processor 1720 in the computing environment 1710 to perform the decoding method described above according to the received bitstream or data stream. In another example, multiple programs can be executed by the processor 1720 in the computing environment 1710 to perform the encoding method described above to encode video information (e.g., video blocks representing video frames, and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1720 in the computing environment 1710 to send a bitstream or data stream (e.g., to Figure 3B Optionally, the non-transitory computer-readable storage medium may store therein a bitstream or data stream, the bitstream or data stream comprising the video decoder 30 in the encoder (e.g., Figure 3A The video encoder 20 in the example generates a video signal for a decoder (e.g., Figure 3B The video decoder 30 in the memory 30 may be a computer readable medium that is used to decode the video data (e.g., video blocks representing video frames, and / or associated one or more syntax elements, etc.). The non-transitory computer readable storage medium may be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0273] The above method can be implemented using an apparatus including one or more circuits, including an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components. The apparatus can use circuits combined with other hardware or software components to perform the above method. Each module, submodule, unit or subunit disclosed above can be implemented at least in part using one or more circuits.
[0274] In view of the specification and practice of the present disclosure disclosed herein, other examples of the present disclosure will be apparent to those skilled in the art. This application is intended to cover any variation, use or adaptation of the present disclosure that follows the general principles of the present disclosure, and includes deviations from the present disclosure that fall within known or customary practices in the art. It is intended that the specification and examples be considered exemplary only.
[0275] It should be understood that the present disclosure is not limited to the specific examples described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for video decoding, comprising: Obtaining, by a decoder, a set of mixed strengths for a current block, wherein the current block is partitioned into two parts along a partition line for prediction in a geometric partitioning mode; The decoder obtains a mapping relationship between a plurality of mixing indexes and a plurality of mixing strengths in the mixing strength set; obtaining, by the decoder, a binarized value indicating one of the plurality of mixed indexes, wherein the plurality of mixed indexes are binarized using a variable length code; as well as The decoder determines the mixing strength of the current block based on the binarization value and the mapping relationship. 2 . The method of claim 1 , wherein the plurality of mixed indexes are binarized using a truncated unary code.
3. The method according to claim 1, wherein the plurality of mixed indexes are binarized using truncated Rice codes. 4 . The method of claim 1 , wherein the plurality of mixed indexes are binarized using an exp-golomb code. The method according to claim 1 , wherein the mapping relationship is determined according to statistical usage frequencies of the plurality of mixing intensities.
6. The method of claim 5, wherein lower index values correspond to more frequently used mixing strengths and are binarized using shorter codewords. 7 . The method according to claim 1 , wherein the mapping relationship between the plurality of mix indices and the plurality of mix intensities in the mix strength set is changed by a syntax element.
8. The method of claim 7, wherein the syntax element is signaled in one or more of: a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, or a coding unit.
9. The method according to claim 1, further comprising: The set of mixing strengths is determined by the decoder according to parameters associated with the current block.
10. The method of claim 9, wherein the parameter is related to a block size of the current block. The method of claim 9 , wherein the parameter is related to an angle of a partition line of the current block. 12 . The method according to claim 1 , wherein the binarized value indicating one of the plurality of mixed indexes is included in a context model, and the context model is selected from a plurality of context models based on a predefined condition. 13 . The method according to claim 12 , wherein the context model is selected based on whether a neighboring block of the current block includes a block using the geometric partitioning pattern and a mixed strength of the current block. 14 . The method of claim 12 , wherein the context model is selected based on whether a neighboring block of the current block includes a block using the geometric partitioning pattern.
15. A method for video encoding, comprising: Obtaining, by an encoder, a set of mixed strengths for a current block, wherein the current block is partitioned into two parts along a partition line for prediction in a geometric partitioning mode; The encoder obtains a mapping relationship between a plurality of mixing indexes and a plurality of mixing intensities in the mixing intensity set; determining, by the decoder, a mixing strength for the current block from among the plurality of mixing strengths in the mixing strength set; as well as A binarization value indicating a mixing index corresponding to a mixing strength of the current block is determined by the encoder, wherein the plurality of mixing indexes are binarized using a variable length code. The method of claim 15 , wherein the plurality of mixed indexes are binarized using a truncated unary code.
17. The method of claim 15, wherein the plurality of mixed indexes are binarized using truncated Rice codes.
18. The method of claim 15, wherein the plurality of hybrid indexes are binarized using an exp-golomb code. The method according to claim 15 , wherein the mapping relationship is determined according to statistical usage frequencies of the plurality of mixing intensities.
20. The method of claim 19, wherein lower index values correspond to more frequently used mixing strengths and are binarized using shorter codewords.
21. The method according to claim 15, wherein the mapping relationship between the plurality of mixing indexes and the plurality of mixing strengths in the mixing index set is changed by a syntax element.
22. The method of claim 21, wherein the syntax element is signaled in one or more of: a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, or a coding unit.
23. The method of claim 15, further comprising: The size of the mixed strength set is determined by the encoder according to parameters related to the current block.
24. The method of claim 23, wherein the parameter is related to a block size of the current block.
25. The method of claim 23, wherein the parameter is related to an angle of a partition line of the current block.
26. The method of claim 15, wherein the binarized value indicating one of the plurality of mixed indexes is contained in a context model, and the context model is selected from a plurality of context models based on a predefined condition. 27 . The method of claim 26 , wherein the context model is selected based on whether a neighboring block of the current block includes a block using the geometric partitioning pattern and a mixed strength of the current block.
28. The method of claim 26, wherein the context model is selected based on whether a neighboring block of the current block includes a block using the geometric partitioning pattern.
29. An apparatus comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, Wherein the one or more processors are configured to perform the method according to any one of claims 1 to 28 when executing the instructions.
30. A non-transitory computer-readable storage medium for storing computer-executable instructions which, when executed by one or more computer processors, cause the one or more computer processors to receive a bitstream and perform the method of any one of claims 1 to 14 based on the bitstream.
31. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the method according to any one of claims 15 to 28 to encode a current block into a bitstream, and send the bitstream.
Citation Information
Cited By
Image processing method, processing equipment and storage medium
CN121125987A
Image processing method, processing device and storage medium
CN121125987B
