The present disclosure is related to video coding and compression, and in particular but not limited to, methods and apparatus on improving the coding efficiency of intra block copy (IBC) and intra template matching prediction (Intra TMP).
Digital video is supported by a variety of electronic devices, such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video gaming consoles, smart phones, video teleconferencing devices, video streaming devices, etc. The electronic devices transmit and receive or otherwise communicate digital video data across a communication network, and/or store the digital video data on a storage device. Due to a limited bandwidth capacity of the communication network and limited memory resources of the storage device, video coding may be used to compress the video data according to one or more video coding standards before it is communicated or stored. For example, video coding standards include Versatile Video Coding (VVC), Joint Exploration test Model (JEM), High-Efficiency Video Coding (HEVC/H.265), Advanced Video Coding (AVC/H.264), Moving Picture Expert Group (MPEG) coding, or the like. Video coding generally utilizes prediction methods (e.g., inter-prediction, intra-prediction, or the like) that take advantage of redundancy inherent in the video data. Video coding aims to compress video data into a form that uses a lower bit rate, while avoiding or minimizing degradations to video quality.
The present disclosure provides examples of techniques relating to improving the Intra Block Copy method in a video encoding or decoding process.
According to a first aspect of the present disclosure, there is provided a method for video decoding. In the method, a decoder may obtain a current coding unit (CU) that is coded based on IBC mode combined with Geometric Partitioning Mode (GPM). Additionally, the decoder may obtain a prediction for the current CU based on the IBC mode combined with GPM.
According to a second aspect of the present disclosure, there is provided a method for video encoding. In the method, an encoder may encode a current CU based on IBC mode combined with GPM. Additionally, the encoder may transmit the current CU that is coded based on the IBC mode combined with GPM to a decoder.
According to a third aspect of the present disclosure, there is provided a method for video decoding. In the method, a decoder may obtain a first prediction for a current CU, where the first prediction is associated with IBC mode. Additionally, the decoder may obtain a second prediction for the current CU, where the second prediction is associated with one of intra mode or inter mode. Furthermore, the decoder may obtain a final prediction for the current CU based on the first prediction and the second prediction.
According to a fourth aspect of the present disclosure, there is provided a method for video encoding. In the method, an encoder may obtain a first prediction for a current CU, where the first prediction is associated with IBC mode. Additionally, the encoder may obtain a second prediction for the current CU, where the second prediction is associated with one of intra mode or inter mode. Furthermore, the encoder may obtain a final prediction for the current CU based on the first prediction and the second prediction.
According to a fifth aspect of the present disclosure, there is provided a method for video decoding. In the method, a decoder may obtain a plurality of block vectors for a current CU based on IBC mode. Additionally, the decoder may obtain a final prediction for the current CU based on the plurality of block vectors.
According to a sixth aspect of the present disclosure, there is provided a method for video encoding. In the method, an encoder may obtain a plurality of block vectors for a current CU based on IBC mode. Additionally, the encoder may obtain a final prediction for the current CU based on the plurality of block vectors.
According to a seventh aspect of the present disclosure, there is provided a method for video decoding. In the method, a decoder may obtain a current coding unit (CU) that is coded based on a combined mode that combines an Intra template matching prediction (TMP) mode and at least one of following modes: an intra prediction mode, an inter prediction mode, a template-based intra mode derivation (TIMD) mode, a local illumination compensation (LIC) mode, or an Overlapped Block Motion Compensation (OBMC) mode. Additionally, the decoder may obtain a final prediction for the current CU based on the combined mode.
According to an eighth aspect of the present disclosure, there is provided a method for video encoding. In the method, an encoder may encode a current CU based on a combined mode that combines an Intra TMP mode and at least one of following modes: an intra prediction mode, an inter prediction mode, a TIMD mode, a LIC mode, or an OBMC mode. Additionally, the encoder may transmit the current CU that is coded based on the combined mode to a decoder.
According to a ninth aspect of the present disclosure, there is provided a method for video decoding. In the method, a decoder may obtain a current CU that is coded based on an Intra TMP mode combined with a GPM mode. Additionally, the decoder may obtain a final prediction for the current CU based on the intra TMP mode combined with the GPM mode.
According to a tenth aspect of the present disclosure, there is provided a method for video encoding. In the method, an encoder may encode a current CU based on an Intra TMP mode combined with a GPM mode. Additionally, the encoder may transmit the current CU that is coded based on the intra TMP mode combined with the GPM mode to a decoder.
According to an eleventh aspect of the present disclosure, there is provided a method for video decoding. In the method, a decoder may obtain a current CU coded based on a combined mode that combines an IBC mode and at least one of a TIMD mode or an OBMC mode. Additionally, the decoder may obtain a final prediction for the current CU based on the combined mode.
According to a twelfth aspect of the present disclosure, there is provided a method for video encoding. In the method, an encoder may encode a current CU based on a combined mode that combines an IBC mode and at least one of a TIMD mode or an OBMC mode. Additionally, the encoder may transmit the current CU that is coded based on the combined mode to a decoder.
According to a thirteenth aspect of the present disclosure, there is provided a method for video decoding. In the method, a decoder may obtain a first weight of a first prediction for a current coding unit (CU), where the first prediction is associated with intra block copy (IBC) mode. Additionally, the decoder may obtain a second weight of a second prediction for the current CU, where the second prediction is associated with intra mode. Additionally, the decoder may obtain a final prediction for the current CU based on the first weight, the first prediction, the second weight, and the second prediction.
According to a fourteenth aspect of the present disclosure, there is provided a method for video encoding. In the method, an encoder may obtain a first weight of a first prediction for a current coding unit (CU), where the first prediction is associated with intra block copy (IBC) mode. Additionally, the encoder may obtain a second weight of a second prediction for the current CU, where the second prediction is associated with intra mode. Additionally, the encoder may obtain a final prediction for the current CU based on the first weight, the first prediction, the second weight, and the second prediction.
According to a fifteenth aspect of the present disclosure, there is provided a method for video decoding. In the method, a decoder may obtain a first block and a second block, where the first block is coded based on one of an intra block copy (IBC) mode or an intra template matching prediction (TMP) mode, and where the second block is coded based on an intra mode. Additionally, the decoder may obtain, based on template matching, a first weight corresponding to the first block and a second weight corresponding to the second block. Additionally, the decoder may obtain a final prediction for a current block based on the first block, the first weight, the second block, and the second weight.
According to a sixteenth aspect of the present disclosure, there is provided a method for video encoding. In the method, an encoder may obtain a first block and a second block, where the first block is coded based on one of an intra block copy (IBC) mode or an intra template matching prediction (TMP) mode, and where the second block is coded based on an intra mode. Additionally, the encoder may obtain, based on template matching, a first weight corresponding to the first block and a second weight corresponding to the second block. Furthermore, the encoder may obtain a final prediction for a current block based on the first block, the first weight, the second block, and the second weight. Moreover, the encoder may generate a bitstream based on the final prediction.
According to a seventeenth aspect of the present disclosure, there is provided an apparatus for video decoding. The apparatus may include one or more processors and a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors. Furthermore, the one or more processors, upon execution of the instructions, are configured to perform the method according to the first aspect, the third aspect, the fifth aspect, the seventh aspect, the ninth aspect, the eleventh aspect, the thirteenth aspect, or the fifteenth aspect.
According to an eighteenth aspect of the present disclosure, there is provided an apparatus for video encoding. The apparatus may include one or more processors and a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors. Furthermore, the one or more processors, upon execution of the instructions, are configured to perform the method according to the second aspect, the fourth aspect, the sixth aspect, the eighth aspect, the tenth aspect, the twelfth aspect, the fourteenth aspect, or the sixteenth aspect.
According to a nineteenth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium for storing computer-executable instructions that, when executed by one or more computer processors, cause the one or more computer processors to perform the method according to the first aspect, the third aspect, the fifth aspect, the seventh aspect, the ninth aspect, the eleventh aspect, the thirteenth aspect, or the fifteenth aspect.
According to a twentieth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium for storing computer-executable instructions that, when executed by one or more computer processors, cause the one or more computer processors to perform the method according to the second aspect, the fourth aspect, the sixth aspect, the eighth aspect, the tenth aspect, the twelfth aspect, the fourteenth aspect, or the sixteenth aspect.
According to a twenty-first aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium for storing a bitstream to be decoded by the method according to the first aspect, the third aspect, the fifth aspect, the seventh aspect, the ninth aspect, the eleventh aspect, the thirteenth aspect, or the fifteenth aspect.
According to a twenty-second aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium for storing a bitstream generated by the method according to the second aspect, the fourth aspect, the sixth aspect, the eighth aspect, the tenth aspect, the twelfth aspect, the fourteenth aspect, or the sixteenth aspect.
A more particular description of the examples of the present disclosure will be rendered by reference to specific examples illustrated in the appended drawings. Given that these drawings depict only some examples and are not therefore considered to be limiting in scope, the examples will be described and explained with additional specificity and details through the use of the accompanying drawings.
Reference will now be made in detail to specific implementations, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth in order to assist in understanding the subject matter presented herein. But various alternatives may be used without departing from the scope of claims and the subject matter may be practiced without these specific details. For example, the subject matter presented herein can be implemented on many types of electronic devices with digital video capabilities.
Terms used in the disclosure are only adopted for the purpose of describing specific embodiments and not intended to limit the disclosure. “A/an,” “said,” and “the” in a singular form in the disclosure and the appended claims are also intended to include a plural form, unless other meanings are clearly denoted throughout the disclosure. It is also to be understood that term “and/or” used in the disclosure refers to and includes one or any or all possible combinations of multiple associated items that are listed.
Reference throughout this specification to “one embodiment,” “an embodiment,” “an example,” “some embodiments,” “some examples,” or similar language means that a particular feature, structure, or characteristic described is included in at least one embodiment or example. Features, structures, elements, or characteristics described in connection with one or some embodiments are also applicable to other embodiments, unless expressly specified otherwise.
Throughout the disclosure, the terms “first,” “second,” “third,” etc. are all used as nomenclature only for references to relevant elements, e.g., devices, components, compositions, steps, etc., without implying any spatial or chronological orders, unless expressly specified otherwise. For example, a “first device” and a “second device” may refer to two separately formed devices, or two parts, components, or operational states of a same device, and may be named arbitrarily.
The terms “module,” “sub-module,” “circuit,” “sub-circuit,” “circuitry,” “sub-circuitry,” “unit,” or “sub-unit” may include memory (shared, dedicated, or group) 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. The module or circuit may include one or more components that are directly or indirectly connected. These components may or may not be physically attached to, or located adjacent to, one another.
As used herein, the term “if” or “when” may be understood to mean “upon” or “in response to” depending on the context. These terms, if appear in a claim, may not indicate that the relevant limitations or features are conditional or optional. For example, a method may comprise steps of: i) when or if condition X is present, function or action X′ is performed, and ii) when or if condition Y is present, function or action Y′ is performed. The method may be implemented with both the capability of performing function or action X′, and the capability of performing function or action Y′. Thus, the functions X′ and Y′ may both be performed, at different times, on multiple executions of the method.
A unit or module may be implemented purely by software, purely by hardware, or by a combination of hardware and software. In a pure software implementation, for example, the unit or module may include functionally related code blocks or software components, that are directly or indirectly linked together, so as to perform a particular function.
In some implementations, the destination device 14 may receive the encoded video data to be decoded via a 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 destination device 14. In one example, the link 16 may include a communication medium to enable the source device 12 to transmit the encoded video data directly to the destination device 14 in real time. The encoded video data may be modulated according to a communication standard, such as a wireless communication protocol, and transmitted to the destination 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 part of a packet-based network, such as a local area network, a wide-area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful to facilitate communication from the source device 12 to the destination device 14.
In some other implementations, the encoded video data may be transmitted from an output interface 22 to a storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the destination device 14 via an 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, Blu-ray discs, Digital Versatile Disks (DVDs), Compact Disc Read-Only Memories (CD-ROMs), flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing the encoded video data. In a further example, the storage device 32 may correspond to a file server or another intermediate storage device that may hold the encoded video data generated by the source device 12. The destination device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing the encoded video data and transmitting the encoded video data to the destination device 14. Exemplary file servers include a web server (e.g., for a website), a File Transfer Protocol (FTP) server, Network Attached Storage (NAS) devices, or a local disk drive. The destination device 14 may access the encoded video data through any standard data connection, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., Digital Subscriber Line (DSL), cable modem, etc.), or a combination of both that is suitable for accessing encoded video data stored on a file server. 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.
As shown in
The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may be transmitted directly to the destination device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored onto the storage device 32 for later access by the destination device 14 or other devices, for decoding and/or playback. The output interface 22 may further include a modem and/or a transmitter.
The destination device 14 includes the input interface 28, a video decoder 30, and a display device 34. The input interface 28 may include a receiver and/or a modem and receive the encoded video data over the link 16. The encoded video data communicated over the link 16, or provided on the storage device 32, may include a variety of syntax elements generated by the video encoder 20 for use by the video decoder 30 in decoding the video data. Such syntax elements may be included within the encoded video data transmitted on a communication medium, stored on a storage medium, or stored on a file server.
In some implementations, the destination device 14 may include the display device 34, which can be an integrated display device and an external display device that is configured to communicate with the destination device 14. The display device 34 displays the decoded video data to a 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.
The video encoder 20 and the video decoder 30 may operate according to proprietary or industry standards, such as VVC, HEVC, MPEG-4, Part 10, AVC, or extensions of such standards. 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 contemplated that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current or future standards. Similarly, it is also generally contemplated that the video decoder 30 of the destination device 14 may be configured to decode video data according to any of these current or future standards.
The video encoder 20 and the video decoder 30 each may be implemented as any of a variety of suitable encoder and/or decoder circuitry, such as one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof. When implemented partially in software, an electronic device may store instructions for the software in a suitable, non-transitory computer-readable medium and execute the instructions in hardware using one or more processors 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, either of which may be integrated as part of a combined encoder/decoder (CODEC) in a respective device.
In some implementations, at least a part of components of the source device 12 (for example, the video source 18, the video encoder 20 or components included in the video encoder 20 as described below with reference to
As shown in
The video data memory 40 may store video data to be encoded by the components of the video encoder 20. The video data in the video data memory 40 may be obtained, for example, from the video source 18 as shown in
As shown in
The prediction processing unit 41 may select one of a plurality of possible predictive coding modes, such as one of a plurality of intra predictive coding modes or one of a plurality of inter predictive coding modes, for the current video block based on error results (e.g., coding rate and the level of distortion). The prediction processing unit 41 may provide the resulting intra or inter prediction coded block to the summer 50 to generate a residual block and to the summer 62 to reconstruct the encoded block for use as part of a reference frame subsequently. The prediction processing unit 41 also provides syntax elements, such as motion vectors, intra-mode indicators, partition information, and other such syntax information, to the entropy encoding unit 56.
In order to select an appropriate intra predictive coding mode for the current video block, the intra prediction processing unit 46 within the prediction processing unit 41 may perform intra predictive coding of the current video block relative to one or more neighbor blocks in the same frame as the current block to be coded to provide spatial prediction. The motion estimation unit 42 and the motion compensation unit 44 within the prediction processing unit 41 perform inter predictive coding of the current video block relative to one or more predictive blocks in one or more reference frames to provide temporal prediction. The video encoder 20 may perform multiple coding passes, e.g., to select an appropriate coding mode for each block of video data.
In some implementations, the motion estimation unit 42 determines the inter prediction mode for a current video frame by generating a motion vector, which indicates the displacement of a video block within the current video frame relative to a predictive block within a reference video frame, according to a predetermined pattern within a sequence of video frames. Motion estimation, performed by the motion estimation unit 42, is the process of generating motion vectors, which estimate motion for video blocks. A motion vector, for example, may indicate the displacement of a video block within a current video frame or picture relative to a predictive block within a reference frame relative to the current block being coded within the current frame. The predetermined pattern may designate video frames in the sequence as P frames or B frames. The intra BC unit 48 may determine vectors, e.g., block vectors, for intra BC coding in a manner similar to the determination of motion vectors by the motion estimation unit 42 for inter prediction, or may utilize the motion estimation unit 42 to determine the block vector.
A predictive block for the video block may be or may correspond to a block or a reference block of a reference frame that is deemed as closely matching the video block to be coded in terms of pixel difference, which may be determined by Sum of Absolute Difference (SAD), Sum of Square Difference (SSD), or other difference metrics. In some implementations, the video encoder 20 may calculate values for sub-integer pixel positions of reference frames stored in the DPB 64. For example, the video encoder 20 may interpolate values of one-quarter pixel positions, one-eighth pixel positions, or other fractional pixel positions of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and fractional pixel positions and output a motion vector with fractional pixel precision.
The 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 predictive 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 the DPB 64. The motion estimation unit 42 sends the calculated motion vector to the motion compensation unit 44 and then to the entropy encoding unit 56.
Motion compensation, performed by the motion compensation unit 44, may involve fetching or generating the predictive block based on the motion vector determined by the motion estimation unit 42. Upon receiving the motion vector for the current video block, the motion compensation unit 44 may locate a predictive block to which the motion vector points in one of the reference frame lists, retrieve the predictive block from the DPB 64, and forward the predictive block to the summer 50. The summer 50 then forms a residual video block of pixel difference values by subtracting pixel values of the predictive block provided by the motion compensation unit 44 from the pixel values of the current video block being coded. The pixel difference values forming the residual video block may include luma or chroma component differences or both. The motion compensation unit 44 may also generate syntax elements associated with the video blocks of a video frame for use by the video decoder 30 in decoding the video blocks of the video frame. The syntax elements may include, for example, syntax elements defining the motion vector used to identify the predictive block, any flags indicating the 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 illustrated separately for conceptual purposes.
In some implementations, the intra BC unit 48 may generate vectors and fetch predictive blocks in a manner similar to that described above in connection with the motion estimation unit 42 and the motion compensation unit 44, but with the predictive blocks being in the same frame as the current block being coded and with the vectors being referred to as block vectors as opposed to motion vectors. In particular, the intra BC unit 48 may determine an intra-prediction mode to use to encode a current block. In some examples, the intra BC unit 48 may encode a current block using various intra-prediction modes, e.g., during separate encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select, among the various tested intra-prediction modes, an appropriate intra-prediction mode to use and generate an intra-mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values using a rate-distortion analysis for the various tested intra-prediction modes, and select the intra-prediction mode having the best rate-distortion characteristics among the tested modes as the appropriate intra-prediction mode to use. Rate-distortion analysis generally determines an amount of distortion (or error) between an encoded block and an original, unencoded block that was encoded to produce the encoded block, as well as a bitrate (i.e., a number of bits) used to produce the encoded block. Intra BC unit 48 may calculate ratios from the distortions and rates for the various encoded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.
In other examples, the intra BC unit 48 may use the motion estimation unit 42 and the motion compensation unit 44, in whole or in part, to perform such functions for Intra BC prediction according to the implementations described herein. In either case, for Intra block copy, a predictive block may be a block that is deemed as closely matching the block to be coded, in terms of pixel difference, which may be determined by SAD, SSD, or other difference metrics, and identification of the predictive block may include calculation of values for sub-integer pixel positions.
Whether the predictive block is from the same frame according to intra prediction, or a different frame according to inter prediction, the video encoder 20 may form a residual video block by subtracting pixel values of the predictive block from the pixel values of the current video block being coded, forming pixel difference values. The pixel difference values forming the residual video block may include both luma and chroma component differences.
The intra prediction processing unit 46 may intra-predict a current video block, as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44, or the intra block copy prediction performed by the intra BC unit 48, as described above. In particular, the intra prediction processing unit 46 may determine an intra prediction mode to use to encode a current block. To do so, the intra prediction processing unit 46 may encode a current block using various intra prediction modes, e.g., during separate encoding passes, and the intra prediction processing unit 46 (or a mode selection unit, in some examples) may select an appropriate intra prediction mode to use from the tested intra prediction modes. The intra prediction processing unit 46 may provide information indicative of the selected intra-prediction mode for the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-prediction mode in the bitstream.
After the prediction processing unit 41 determines the predictive block for the current video block via either inter prediction or intra prediction, the summer 50 forms a residual video block by subtracting the predictive block from the current video block. The residual video data in the residual block may be included in one or more TUs and is provided to the transform processing unit 52. The 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.
The transform processing unit 52 may send the resulting transform coefficients to the quantization unit 54. The 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, the quantization unit 54 may then perform a scan of a matrix including the quantized transform coefficients. Alternatively, the entropy encoding unit 56 may perform the scan.
Following quantization, the entropy encoding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, e.g., 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 encoding methodology or technique. The encoded bitstream may then be transmitted to the video decoder 30 as shown in
The inverse quantization unit 58 and the inverse transform processing unit 60 apply inverse quantization and inverse transformation, respectively, to reconstruct the residual video block in the pixel domain for generating a reference block for prediction of other video blocks. As noted above, the motion compensation unit 44 may generate a motion compensated predictive block from one or more reference blocks of the frames stored in the DPB 64. The motion compensation unit 44 may also apply one or more interpolation filters to the predictive block to calculate sub-integer pixel values for use in motion estimation.
The summer 62 adds the reconstructed residual block to the motion compensated predictive block produced by the motion compensation unit 44 to produce a reference block for storage in the DPB 64. The reference block may then be used by the intra BC unit 48, the motion estimation unit 42 and the motion compensation unit 44 as a predictive block to inter predict another video block in a subsequent video frame.
In some examples, a unit of the video decoder 30 may be tasked to perform the implementations of the present application. Also, in some examples, the implementations of the present disclosure may be divided among one or more of the units of the video decoder 30. For example, the intra BC unit 85 may perform the implementations 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 functionality of intra BC unit 85 may be performed by other components of the prediction processing unit 81, such as the motion compensation unit 82.
The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by the 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 wired or wireless network communication of video data, or by accessing physical data storage media (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 in decoding video data by the video decoder 30 (e.g., in intra or inter predictive coding modes). 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), Magneto-resistive RAM (MRAM), Resistive RAM (RRAM), or other types of memory devices. For illustrative purpose, the video data memory 79 and the DPB 92 are depicted as two distinct components of the video decoder 30 in
During the decoding process, the video decoder 30 receives an encoded video bitstream that represents video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive the 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 quantized coefficients, motion vectors or intra-prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-prediction mode indicators and other syntax elements to the prediction processing unit 81.
When the video frame is coded as an intra predictive coded (I) frame or for intra coded predictive blocks in other types of frames, the intra prediction unit 84 of the prediction processing unit 81 may generate prediction data for a video block of the current video frame based on a signaled intra prediction mode and reference data from previously decoded blocks of the current frame.
When the video frame is coded as an inter-predictive coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 produces one or more predictive blocks for a 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 predictive blocks may be produced 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 default construction techniques based on reference frames stored in the DPB 92.
In some examples, when the video block is coded according to the intra BC mode described herein, the intra BC unit 85 of the prediction processing unit 81 produces predictive blocks for the current video block based on block vectors and other syntax elements received from the entropy decoding unit 80. The predictive blocks may be within a reconstructed region of the same picture as the current video block defined by the video encoder 20.
The motion compensation unit 82 and/or the intra BC unit 85 determines prediction information for a video block of the current video frame by parsing the motion vectors and other syntax elements, and then uses the prediction information to produce the predictive blocks for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra or inter prediction) used to code video blocks of the video frame, an inter prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, motion vectors for each inter predictive encoded video block of the frame, inter prediction status for each inter predictive coded video block of the frame, and other information to decode the video blocks in the current video frame.
Similarly, the intra BC unit 85 may use some of the received syntax elements, e.g., a flag, to determine that the current video block was predicted using the intra BC mode, construction information of which video blocks of the frame are within the reconstructed region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information to decode the video blocks in the current video frame.
The motion compensation unit 82 may also perform interpolation using the interpolation filters as used by the video encoder 20 during encoding of the video blocks to calculate interpolated values for sub-integer pixels of reference blocks. In this case, the motion compensation unit 82 may determine the interpolation filters used by the video encoder 20 from the received syntax elements and use the interpolation filters to produce predictive blocks.
The inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by the entropy decoding unit 80 using the same quantization parameter calculated by the video encoder 20 for each video block in the video frame to determine a degree of quantization. The 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 in order to reconstruct the residual blocks in the pixel domain.
After the motion compensation unit 82 or the intra BC unit 85 generates the predictive block for the current video block based on the vectors and other syntax elements, the summer 90 reconstructs decoded video block for the current video block by summing the residual block from the inverse transform processing unit 88 and a corresponding predictive block generated by the motion compensation unit 82 and the intra BC unit 85. An in-loop filter 91 such as deblocking filter, SAO filter, CCSAO filter and/or ALF may be positioned between the summer 90 and the DPB 92 to further process the decoded video block. In some examples, the in-loop filter 91 may be omitted, and the decoded video block may be directly provided by the summer 90 to the DPB 92. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames used for subsequent motion compensation of next video blocks. The DPB 92, or a memory device separate from the DPB 92, may also store decoded video for later presentation on a display device, such as the display device 34 of
In a typical video coding process, a video sequence typically includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted 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 instances, a frame may be monochrome and therefore includes only one two-dimensional array of luma samples.
As shown in
To achieve a better performance, the video encoder 20 may recursively perform tree partitioning such as binary-tree partitioning, ternary-tree partitioning, quad-tree partitioning or a combination thereof on the coding tree blocks of the CTU and divide the CTU into smaller CUs.
In some implementations, the video encoder 20 may further partition a coding block of a CU into one or more M×N PBs. A PB is a rectangular (square or non-square) block of samples on which the same prediction, inter or intra, is applied. A PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements used to predict the PBs. In monochrome pictures or pictures having three separate color planes, a PU may include a single PB and syntax structures used to predict the PB. The video encoder 20 may generate predictive luma, Cb, and Cr blocks for luma, Cb, and Cr PBs of each PU of the CU.
The video encoder 20 may use intra prediction or inter prediction to generate the predictive blocks for a PU. If the video encoder 20 uses intra prediction to generate the predictive blocks of a PU, the video encoder 20 may generate the predictive blocks of the PU based on decoded samples of the frame associated with the PU. If the video encoder 20 uses inter prediction to generate the predictive blocks of a PU, the video encoder 20 may generate the predictive blocks of the PU based on decoded samples of one or more frames other than the frame associated with the PU.
After the video encoder 20 generates predictive luma, Cb, and Cr blocks for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the CU's predictive luma blocks from its original luma coding block such that each sample in the CU's luma residual block indicates a difference between a luma sample in one of the CU's predictive luma blocks and a corresponding sample in the CU's original luma coding block. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, such that each sample in the CU's Cb residual block indicates a difference between a Cb sample in one of the CU's predictive Cb blocks and a corresponding sample in the CU's original Cb coding block and each sample in the CU's Cr residual block may indicate a difference between a Cr sample in one of the CU's predictive Cr blocks and a corresponding sample in the CU's original Cr coding block.
Furthermore, as illustrated in
The video encoder 20 may apply one or more transforms to a luma transform block of a TU to generate a luma coefficient block for the TU. A coefficient block may be a two-dimensional array of transform coefficients. A transform coefficient may be a scalar quantity. The video encoder 20 may apply one or more transforms to a Cb transform block of a TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to a Cr transform block of a TU to generate a Cr coefficient block for the TU.
After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, providing further compression. After the video encoder 20 quantizes a coefficient block, the video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream that includes a sequence of bits that forms a representation of coded frames and associated data, which is either saved in the storage device 32 or transmitted to the destination device 14.
After receiving a 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 the frames of the video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally reciprocal to the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform inverse transforms on the coefficient blocks associated with TUs of a current CU to reconstruct residual blocks associated with the TUs of the current CU. The video decoder 30 also reconstructs the coding blocks of the current CU by adding the samples of the predictive blocks for PUs of the current CU to corresponding samples of the transform blocks of the TUs of the current CU. After reconstructing the coding blocks for each CU of a frame, video decoder 30 may reconstruct the frame.
As noted above, video coding achieves video compression using primarily two modes, i.e., intra-frame prediction (or intra-prediction) and inter-frame prediction (or inter-prediction). It is noted that IBC could be regarded as either intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to the coding efficiency than intra-frame prediction because of the use of motion vectors for predicting a current video block from a reference video block.
But with the ever improving video data capturing technology and more refined video block size for preserving details in the video data, the amount of data required for representing motion vectors for a current frame also increases substantially. One way of overcoming this challenge is to benefit from the fact that not only a group of neighboring CUs in both the spatial and temporal domains have similar video data for predicting purpose but the motion vectors between these neighboring CUs are also similar. Therefore, it is possible to use the motion information of spatially neighboring CUs and/or temporally co-located CUs as an approximation of the motion information (e.g., motion vector) of a current CU by exploring their spatial and temporal correlation, which is also referred to as “Motion Vector Predictor (MVP)” of the current CU.
Instead of encoding, into the video bitstream, an actual motion vector of the current CU determined by the motion estimation unit as described above in connection with
Like the process of choosing a predictive block in a reference frame during inter-frame prediction of a code block, a set of rules need to be adopted by both the video encoder 20 and the video decoder 30 for constructing a motion vector candidate list (also known as a “merge list”) for a current CU using those potential candidate motion vectors associated with spatially neighboring CUs and/or temporally co-located CUs of the current CU and then selecting one member from the motion vector candidate list as a motion vector predictor for the current CU. By doing so, there is no need to transmit the motion vector candidate list itself from the video encoder 20 to the video decoder 30 and an index of the selected motion vector predictor within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor within the motion vector candidate list for encoding and decoding the current CU.
In general, the basic inter prediction scheme applied in VVC is almost kept the same as that of HEVC, except that several prediction tools are further extended, added and/or improved, e.g., extended merge prediction, MMVD, and GPM.
With the ever improving video data capturing technology and more refined video block size for preserving details in the video data, an amount of data required for representing motion vectors for a current picture also increases substantially. One way of overcoming this challenge is to use motion information (e.g., a motion vector) of a spatially neighboring CU, a temporally collocated CU etc. of a current CU as an approximation (e.g., prediction) of motion information of the current CU, which is also referred to as “Motion Vector Predictor (MVP)” of the current CU.
Like a process of choosing a predictive block in a reference picture during inter-prediction of a coding block, a set of rules need to be adopted by both the video encoder 20 and the video decoder 30 for constructing an MVP candidate list for a current CU and then selecting one MVP candidate from the MVP candidate list as an MVP for the current CU. By doing so, there is no need to transmit the MVP candidate list itself between the video encoder 20 and the video decoder 30, and an index of the MVP candidate selected from the MVP candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same MVP candidate selected from the MVP candidate list for encoding and decoding the current CU.
In VVC, the MVP candidate list is constructed by including the following five types of MVPs in order:
A size of the MVP candidate list is signalled in a sequence parameter set header and a maximum allowed size of the MVP candidate list is 6. For each CU coded in merge mode, an index of the best MVP candidate is encoded using truncated unary binarization. A first bin of the index is coded with contexts and bypass coding is used for other bins of the index.
A derivation process of each type of MVPs is provided as follows. As in HEVC, VVC also supports parallel derivation of MVP candidate lists for all CUs within a certain size of area.
Derivation of MVPs from Spatial Candidates
The derivation of MVPs from spatial candidates (for example, CUs neighboring a current CU 101 in
After a CU at the position B0 is added as a candidate to a merge candidate list, the addition of the remaining candidates to the merge candidate list is subject to redundancy check, which ensures that candidates with the same motion information are excluded from the merge candidate list, so that coding efficiency is improved. To reduce computational complexity, not all possible candidate pairs are considered in the redundancy check. Instead, only pairs linked using a line with an arrow in
Derivation of MVPs from Temporal Candidates
During the derivation of MVPs from temporal candidates, only one temporal candidate is added to the merge candidate list. Particularly, in the derivation of an MVP from this temporal candidate, a scaled motion vector is derived based on a collocated CU (for example, col_CU 301 in
A position for the temporal candidate (i.e., the collocated CU) in the current CU 401 is selected between positions C0 and C1, as depicted in
HMVP candidates are added to the MVP candidate list after the spatial MVPs and the temporal MVP. Motion information of a previously coded block is stored in an HMVP table and used as an MVP for the current CU. The table with multiple HMVP candidates is maintained during the encoding/decoding process. The table is reset (emptied) when a new row of CTUs is encountered. Whenever there is a non-subblock inter-coded CU, associated motion information is added to a last entry of the HMVP table as a new HMVP candidate.
A size of the HMVP table is set to 6. When a new HMVP candidate is inserted into the HMVP table, a constrained FIFO rule is utilized, wherein redundancy check is firstly applied to find whether there is an identical HMVP in the HMVP table. If found, the identical HMVP is removed from the HMVP table and all the HMVP candidates afterwards are moved forward, and the identical HMVP is added to the last entry of the HMVP table.
HMVP candidates may be used in the MVP candidate list construction process. The latest several HMVP candidates in the HMVP table are checked in order and inserted into the MVP candidate list after the temporal MVP candidate. Redundancy check is applied on the HMVP candidates relative to the spatial candidates and/or temporal MVP candidate.
To reduce a number of redundancy check operations, the following simplifications are introduced:
Pairwise average MVP candidates are generated by averaging MVPs derived using a predefined pair of first two merge candidates in the existing merge candidate list. A first merge candidate in the predefined pair may be defined as p0Cand and a second merge candidate in the predefined pair may be defined as p1Cand. Averaged motion vectors are calculated according to availability of motion vectors of p0Cand and p1Cand separately for each reference picture list. If both motion vectors are available for one reference picture list, these two motion vectors are averaged even when they point to different reference pictures, and a reference picture of the averaged motion vector is set to a reference picture of p0Cand; if only one motion vector is available for one reference picture list, the motion vector is used directly; if no motion vector is available for one reference picture list, the motion vector and the reference picture index for this reference picture list are kept invalid.
When the MVP candidate list is not full after the pairwise average MVP candidates are added, zero MVPs are inserted at the end of the MVP candidate list until the maximum allowed size of the MVP candidate list is reached.
As described above, in the merge mode, motion information (i.e., an MVP candidate) is implicitly derived from an MVP candidate list constructed for a current CU and is directly used as an MV of the current CU for generation of prediction samples of the current CU, which may result in a certain error between an actual MV of the current CU and the implicitly derived MVP. In order to increase the accuracy of an MV of the current CU, MMVD is introduced in VVC where a Motion Vector Difference (MVD) of the current CU is added to the implicitly derived MVP to obtain the MV of the current CU. An MMVD flag is signalled after a regular merge flag is transmitted to specify whether an MMVD mode is used for the current CU.
In the MMVD mode, after an MVP candidate is selected from first two MVP candidates in the MVP candidate list, MMVD information is signalled, wherein the MMVD information includes an MMVD candidate flag which is used to specify which one of the first two MVP candidates is selected to be used as an MV basis, a distance index for indication of motion magnitude information of the MVD, and a direction index for indication of motion direction information of the MVD.
The distance index, which specifies the motion magnitude information of the MVD, indicates a pre-defined offset from a starting point (represented by, for example, a dotted circle in
The direction index specifies a sign of the MVD, which represents a direction of the MVD relative to the starting point. Table 2 specifies a relation between direction indexes and pre-defined signs. In some examples, the meaning of a sign of the MVD may be variant according to information of the selected MVP candidate. When the selected MVP candidate is an un-prediction MV or bi-prediction MVs with both MVs pointing to the same side of the current picture (i.e., POCs of two reference pictures (for example, reference pictures of list 0 and list 1, which are also referred to as L0 reference picture and L1 reference picture respectively) of the current picture are both greater than a POC of the current picture, or are both less than the POC of the current picture), the sign in Table 2 specifies the sign of the MVD added to the selected MVP candidate. When the selected MVP candidate is bi-prediction MVs with both MVs pointing to different sides of the current picture (i.e. a POC of one reference picture of the current picture is greater than the POC of the current picture, and a POC of the other reference picture of the current picture is less than the POC of the current picture), if a POC distance for L0 reference picture (i.e., a POC distance between the L0 reference picture and the current picture) is greater than a POC distance for L1 reference picture (i.e., a POC distance between the L1 reference picture and the current picture), the sign in Table 2 specifies a sign of an MVD for list 0 MVD0 added to an MVP for list 0 MVP0 of the selected MVP candidate and a sign of an MVD for list 1 MVD1 added to an MVP for list 1 MVP1 of the selected MVP candidate is opposite to the sign in Table 2; otherwise, if the POC distance for L1 reference picture is greater than the POC distance for L0 reference picture, the sign in Table 2 specifies the sign of MVD1 added to MVP1 and the sign of MVD0 added to MVP0 is opposite to the sign in Table 2.
The MVD is scaled according to the POC distances. If the POC distances for both L0 reference picture and L1 reference picture are the same, no scaling is needed for the MVD. Otherwise, if the POC distance for L0 reference picture is greater than the POC distance for L1 reference picture, MVD1 is scaled. If the POC distance for L1 reference picture is greater than the POC distance for L0 reference picture, MVD0 is scaled.
In VVC, GPM is supported for inter prediction. The GPM is signalled using a CU-level flag as one kind of merge mode, with other merge modes including the regular merge mode, the MMVD mode, the CIIP mode and the subblock merge mode. A total of 64 partitions are supported by GPM for each possible CU size W×H (W=2m and H=2n, with m, n∈{3, 4, 5, 6}) excluding 8×64 and 64×8.
When the GPM is used, a CU is split into two parts by a geometrically located straight line. The position of the splitting line is mathematically derived from angle and offset parameters of a specific partition. Each part of the CU obtained by the geometrical partitioning is inter-predicted using its own motion; and only uni-prediction is allowed for each partition, that is, each part has one motion vector and one reference index. The uni-prediction motion constraint is applied to ensure that like the conventional bi-prediction, only two motion compensated predictions are needed for each CU.
If the GPM is used for the current CU, then a geometric partition index indicating a partition mode of the geometric partitioning (indicating an angle and an offset of the geometric partitioning), and two merge indexes (one for each partition) are further signalled.
A uni-prediction candidate list is derived directly from a merge candidate list constructed according to the extended merge prediction process described above. Denote n as an index of a uni-prediction motion vector in the uni-prediction candidate list. An LX motion vector of an nth merge candidate in the merge candidate list, with X equal to a parity of n, is used as the nth uni-prediction motion vector for the GPM. These motion vectors are marked with “x” in
In VVC, when a CU is coded in a merge mode, if the CU contains at least 64 luma samples (that is, a width of CU times a height of the CU is equal to or larger than 64), and if both the width and the height of the CU are less than 128 luma samples, an additional flag is signalled to indicate if a CIIP mode is applied to the current CU. In the CIIP mode, a prediction signal is obtained by combining an inter prediction signal with an intra prediction signal. The inter prediction signal in the CIIP mode is derived using the same inter prediction process as that applied in the regular merge mode; and the intra prediction signal in the CIIP mode is derived following the regular intra prediction process with a planar mode. Then, the intra prediction signal and the inter prediction signal are combined using weighted averaging, where a weight value is calculated depending on coding modes of top and left neighboring blocks of the current CU 1601 (as shown in
Where Pinter is the inter prediction signal in the CIIP mode, Pintra is the intra prediction signal in the CIIP mode, wt is the weight value, and >> represents a right shift operation.
Intra block copy (IBC) is a tool adopted in HEVC extensions on SCC. The IBC significantly improves the coding efficiency of screen content materials. Since IBC mode is implemented as a block level coding mode, block matching (BM) is performed at the encoder to find the optimal block vector (or motion vector) for each CU. Here, a block vector is used to indicate the displacement from the current block to a reference block, which is already reconstructed inside the current picture. The luma block vector of an IBC-coded CU is in integer precision. The chroma block vector rounds to integer precision as well. When combined with AMVR, the IBC mode can switch between 1-pel and 4-pel motion vector precisions. An IBC-coded CU is treated as the third prediction mode other than intra or inter prediction modes. The IBC mode is applicable to the CUs with both width and height smaller than or equal to 64 luma samples.
At the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD check for blocks with either width or height no larger than 16 luma samples. For non-merge mode, the block vector search is performed using hash-based search first. If hash search does not return valid candidate, block matching based local search will be performed.
In the hash-based search, hash key matching (32-bit CRC) between the current block and a reference block is extended to all allowed block sizes. The hash key calculation for every position in the current picture is based on 4×4 subblocks. For the current block of a larger size, a hash key is determined to match that of the reference block when all the hash keys of all 4×4 subblocks match the hash keys in the corresponding reference locations. If hash keys of multiple reference blocks are found to match that of the current block, the block vector costs of each matched reference block are calculated and the one with the minimum cost is selected.
In block matching search, the search range is set to cover both the previous and current CTUs.
At CU level, IBC mode is signalled with a flag and it can be signaled as IBC AMVP mode or IBC skip/merge mode as follows:
IBC skip/merge mode: a merge candidate index is used to indicate which of the block vectors in the list from neighboring candidate IBC coded blocks is used to predict the current block. The merge list consists of spatial, HMVP, and pairwise candidates.
IBC AMVP mode: block vector difference is coded in the same way as a motion vector difference. The block vector prediction method uses two candidates as predictors, one from left neighbor and one from above neighbor (if IBC coded). When either neighbor is not available, a default block vector will be used as a predictor. A flag is signaled to indicate the block vector predictor index.
To reduce memory consumption and decoder complexity, the IBC in VVC allows only the reconstructed portion of the predefined area including the region of current CTU and some region of the left CTU.
Depending on the location of the current coding CU within the current CTU, the following applies:
If current block falls into the top-left 64×64 block of the current CTU, then in addition to the already reconstructed samples in the current CTU, it can also refer to the reference samples in the bottom-right 64×64 blocks of the left CTU, using CPR mode. The current block can also refer to the reference samples in the bottom-left 64×64 block of the left CTU and the reference samples in the top-right 64×64 block of the left CTU, using CPR mode.
If current block falls into the top-right 64×64 block of the current CTU, then in addition to the already reconstructed samples in the current CTU, if luma location (0, 64) relative to the current CTU has not yet been reconstructed, the current block can also refer to the reference samples in the bottom-left 64×64 block and bottom-right 64×64 block of the left CTU, using CPR mode; otherwise, the current block can also refer to reference samples in bottom-right 64×64 block of the left CTU.
If current block falls into the bottom-left 64×64 block of the current CTU, then in addition to the already reconstructed samples in the current CTU, if luma location (64, 0) relative to the current CTU has not yet been reconstructed, the current block can also refer to the reference samples in the top-right 64×64 block and bottom-right 64×64 block of the left CTU, using CPR mode. Otherwise, the current block can also refer to the reference samples in the bottom-right 64×64 block of the left CTU, using CPR mode.
If current block falls into the bottom-right 64×64 block of the current CTU, it can only refer to the already reconstructed samples in the current CTU, using CPR mode.
This restriction allows the IBC mode to be implemented using local on-chip memory for hardware implementations.
IBC Interaction with Other Coding Tools
The interaction between IBC mode and other inter coding tools in VVC, such as pairwise merge candidate, history based motion vector predictor (HMVP), combined intra/inter prediction mode (CIIP), merge mode with motion vector difference (MMVD), and geometric partitioning mode (GPM) are as follows:
IBC can be used with pairwise merge candidate and HMVP. A new pairwise IBC merge candidate can be generated by averaging two IBC merge candidates. For HMVP, IBC motion is inserted into history buffer for future referencing.
IBC cannot be used in combination with the following inter tools: affine motion, CIIP, MMVD, and GPM.
IBC is not allowed for the chroma coding blocks when DUAL_TREE partition is used.
Unlike in the HEVC screen content coding extension, the current picture is no longer included as one of the reference pictures in the reference picture list 0 for IBC prediction. The derivation process of motion vectors for IBC mode excludes all neighboring blocks in inter mode and vice versa. The following IBC design aspects are applied:
IBC shares the same process as in regular MV merge including with pairwise merge candidate and history-based motion predictor, but disallows TMVP and zero vector because they are invalid for IBC mode.
Separate HMVP buffer (5 candidates each) is used for conventional MV and IBC.
Block vector constraints are implemented in the form of bitstream conformance constraint, the encoder needs to ensure that no invalid vectors are present in the bitstream, and merge shall not be used if the merge candidate is invalid (out of range or 0). Such bitstream conformance constraint is expressed in terms of a virtual buffer as described below.
For deblocking, IBC is handled as inter mode.
If the current block is coded using IBC prediction mode, AMVR does not use quarter-pel; instead, AMVR is signaled to only indicate whether MV is 1 integer-pel or 4 integer-pel.
The number of IBC merge candidates can be signalled in the slice header separately from the numbers of regular, subblock, and geometric merge candidates.
A virtual buffer concept is used to describe the allowable reference region for IBC prediction mode and valid block vectors. Denote CTU size as ctbSize, the virtual buffer, ibcBuf, has width being wIbcBuf=128×128/ctbSize and height hIbcBuf=ctbSize. For example, for a CTU size of 128×128, the size of ibcBuf is also 128×128; for a CTU size of 64×64, the size of ibcBuf is 256×64; and a CTU size of 32×32, the size of ibcBuf is 512×32.
The size of a VPDU is min (ctbSize, 64) in each dimension, Wv=min (ctbSize, 64).
The virtual IBC buffer, ibcBuf is maintained as follows.
At the beginning of decoding each CTU row, refresh the whole ibcBuf with an invalid value −1.
At the beginning of decoding a VPDU (xVPDU, yVPDU) relative to the top-left corner of the picture, set the ibcBuf[x][y]=−1, with x=xVPDU % wIbcBuf, . . . , xVPDU % wIbcBuf+Wv−1; y=yVPDU % ctbSize, . . . , yVPDU % ctbSize+Wv−1.
After decoding a CU contains (x, y) relative to the top-left corner of the picture, set
For a block covering the coordinates (x, y), if the following is true for a block vector bv=(bv[0], bv[1]), then it is valid; otherwise, it is not valid:
ibcBuf[(x+bv[0]) % wIbcBuf][(y+bv[1]) % ctbSize] shall not be equal to −1.
In ECM, IBC is improved from below aspects.
The IBC merge/AMVP list construction is modified as follows:
Only if an IBC merge/AMVP candidate is valid, it can be inserted into the IBC merge/AMVP candidate list.
Above-right, bottom-left, and above-left spatial candidates and one pairwise average candidate can be added into the IBC merge/AMVP candidate list.
Template based adaptive reordering (ARMC-TM) is applied to IBC merge list.
The HMVP table size for IBC is increased to 25. After up to 20 IBC merge candidates are derived with full pruning, they are reordered together. After reordering, the first 6 candidates with the lowest template matching costs are selected as the final candidates in the IBC merge list.
The zero vectors' candidates to pad the IBC Merge/AMVP list are replaced with a set of BVP candidates located in the IBC reference region. A zero vector is invalid as a block vector in IBC merge mode, and consequently, it is discarded as BVP in the IBC candidate list.
Three candidates are located on the nearest corners of the reference region, and three additional candidates are determined in the middle of the three sub-regions (A, B, and C), whose coordinates are determined by the width, and height of the current block and the ΔX and ΔY parameters, as is depicted in
IBC with Template Matching
Template Matching is used in IBC for both IBC merge mode and IBC AMVP mode.
The IBC-TM merge list is modified compared to the one used by regular IBC merge mode such that the candidates are selected according to a pruning method with a motion distance between the candidates as in the regular TM merge mode. The ending zero motion fulfillment is replaced by motion vectors to the left (−W, 0), top (0, −H) and top-left (−W, −H), where W is the width and H the height of the current CU.
In the IBC-TM merge mode, the selected candidates are refined with the Template Matching method prior to the RDO or decoding process. The IBC-TM merge mode has been put in competition with the regular IBC merge mode and a TM-merge flag is signaled.
In the IBC-TM AMVP mode, up to 3 candidates are selected from the IBC-TM merge list. Each of those 3 selected candidates are refined using the Template Matching method and sorted according to their resulting Template Matching cost. Only the 2 first ones are then considered in the motion estimation process as usual.
The Template Matching refinement for both IBC-TM merge and AMVP modes is quite simple since IBC motion vectors are constrained (i) to be integer and (ii) within a reference region as shown in
The reference area for IBC is extended to two CTU rows above.
IBC Merge Mode with Block Vector Differences
IBC merge mode with block vector differences is adopted in ECM. The distance set is {1-pel, 2-pel, 4-pel, 8-pel, 12-pel, 16-pel, 24-pel, 32-pel, 40-pel, 48-pel, 56-pel, 64-pel, 72-pel, 80-pel, 88-pel, 96-pel, 104-pel, 112-pel, 120-pel, 128-pel}, and the BVD directions are two horizontal and two vertical directions.
The base candidates are selected from the first five candidates in the reordered IBC merge list. And based on the SAD cost between the template (one row above and one column left to the current block) and its reference for each refinement position, all the possible MBVD refinement positions (20×4) for each base candidate are reordered. Finally, the top 8 refinement positions with the lowest template SAD costs are kept as available positions, consequently for MBVD index coding.
When adapt IBC for camera-captured content, IBC reference range is reduced from 2 CTU rows to 2×128 rows as shown in
Combination of CIIP with TIMD and TM Merge
In CIIP mode, the prediction samples are generated by weighting an inter prediction signal predicted using CIIP-TM merge candidate and an intra prediction signal predicted using TIMD derived intra prediction mode. The method is only applied to coding blocks with an area less than or equal to 1024.
The TIMD derivation method is used to derive the intra prediction mode in CIIP. Specifically, the intra prediction mode with the smallest SATD values in the TIMD mode list is selected and mapped to one of the 67 regular intra prediction modes.
In addition, it is also proposed to modify the weights (wIntra, wInter) for the two tests if the derived intra prediction mode is an angular mode. For near-horizontal modes (2<=angular mode index<34), the current block is vertically divided as shown in
The (wIntra, wInter) for different sub-blocks are shown in Table 3.
With CIIP-TM, a CHIP-TM merge candidate list is built for the CIIP-TM mode. The merge candidates are refined by template matching. The CIIP-TM merge candidates are also reordered by the ARMC method as regular merge candidates. The maximum number of CIIP-TM merge candidates is equal to two.
In the multi-hypothesis inter prediction mode, one or more additional motion-compensated prediction signals are signaled, in addition to the conventional bi prediction signal. The resulting overall prediction signal is obtained by sample-wise weighted superposition. With the bi prediction signal pbi and the first additional inter prediction signal/hypothesis h3, the resulting overall prediction signal p3 is obtained as follows:
The weighting factor α is specified by the new syntax element add_hyp_weight_idx, according to the mapping presented in Table 4:
Analogously to above, more than one additional prediction signal can be used. The resulting overall prediction signal is accumulated iteratively with each additional prediction signal.
The resulting overall prediction signal is obtained as the last pn (i.e., the pn having the largest index n). Within this mode, up to two additional prediction signals can be used (i.e., n is limited to 2).
The motion parameters of each additional prediction hypothesis can be signaled either explicitly by specifying the reference index, the motion vector predictor index, and the motion vector difference, or implicitly by specifying a merge index. A separate multi-hypothesis merge flag distinguishes between these two signalling modes.
For inter AMVP mode, MHP is only applied if non-equal weight in BCW is selected in bi-prediction mode.
Combination of MHP and BDOF is possible, however the BDOF is only applied to the bi-prediction signal part of the prediction signal (i.e., the ordinary first two hypotheses).
GPM with merge motion vector differences (MMVD)
GPM in VVC is extended by applying motion vector refinement on top of the existing GPM uni-directional MVs. A flag is first signalled for a GPM CU, to specify whether this mode is used. If the mode is used, each geometric partition of a GPM CU can further decide whether to signal MVD or not. If MVD is signalled for a geometric partition, after a GPM merge candidate is selected, the motion of the partition is further refined by the signalled MVDs information. All other procedures are kept the same as in GPM.
The MVD is signaled as a pair of distance and direction, similar as in MMVD. There are nine candidate distances (¼-pel, ½-pel, 1-pel, 2-pel, 3-pel, 4-pel, 6-pel, 8-pel, 16-pel), and eight candidate directions (four horizontal/vertical directions and four diagonal directions) involved in GPM with MMVD (GPM-MMVD). In addition, when pic_fpel_mmvd_enabled_flag is equal to 1, the MVD is left shifted by 2 as in MMVD.
GPM with Template Matching (TM)
Template matching is applied to GPM. When GPM mode is enabled for a CU, a CU-level flag is signaled to indicate whether TM is applied to both geometric partitions. Motion information for each geometric partition is refined using TM. When TM is chosen, a template is constructed using left, above or left and above neighboring samples according to partition angle, as shown in Table 5. 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 half-pel interpolation filter disabled.
A GPM candidate list is constructed as follows:
1. Interleaved List-0 MV candidates and List-1 MV candidates are derived directly from the regular merge candidate list, where List-0 MV candidates are higher priority than List-1 MV candidates. A pruning method with an adaptive threshold based on the current CU size is applied to remove redundant MV candidates.
2. Interleaved List-1 MV candidates and List-0 MV candidates are further derived directly from the regular merge candidate list, where List-1 MV candidates are higher priority than List-0 MV candidates. The same pruning method with the adaptive threshold is also applied to remove redundant MV candidates.
3. Zero MV candidates are padded until the GPM candidate list is full.
The GPM-MMVD and GPM-TM are exclusively enabled to one GPM CU. This is done by firstly signaling the GPM-MMVD syntax. When both two GPM-MMVD control flags are equal to false (i.e., the GPM-MMVD are disabled for two GPM partitions), the GPM-TM flag is signaled to indicate whether the template matching is applied to the two GPM partitions. Otherwise (at least one GPM-MMVD flag is equal to true), the value of the GPM-TM flag is inferred to be false. GPM with inter and intra prediction
In GPM with inter and intra prediction, the final prediction samples are generated by weighting inter predicted samples and intra predicted samples for each GPM-separated region. The inter predicted samples are derived by inter GPM whereas the intra predicted samples are derived by an intra prediction mode (IPM) candidate list and an index signaled from the encoder. The IPM candidate list size is pre-defined as 3. The available IPM candidates are the parallel angular mode against the GPM block boundary (Parallel mode), the perpendicular angular mode against the GPM block boundary (Perpendicular mode), and the Planar mode as shown
In DIMD and neighboring mode based IPM derivation Parallel mode is registered first. Therefore, max two IPM candidates derived from the decoder-side intra mode derivation (DIMD) method and/or the neighboring blocks can be registered if there is not the same IPM candidate in the list. As for the neighboring mode derivation, there are five positions for available neighboring blocks at most, but they are restricted by the angle of GPM block boundary as shown in Table 6, which are already used for GPM with template matching (GPM-TM).
GPM-intra can be combined with GPM with merge with motion vector difference (GPM-MMVD). TIMD is used for on IPM candidates of GPM-intra to further improve the coding performance. The Parallel mode can be registered first, then IPM candidates of TIMD, DIMD, and neighboring blocks.
In template matching based reordering for GPM split modes, given the motion information of the current GPM block, the respective TM cost values of GPM split modes are computed. Then, all GPM split modes are reordered in ascending ordering based on the TM cost values. Instead of sending GPM split mode, an index using Golomb-Rice code to indicate where the exact GPM split mode is located in the reordering list is signaled.
The reordering method for GPM split modes is a two-step process performed after the respective reference templates of the two GPM partitions in a coding unit are generated, as follows:
The edge on the template is extended from that of the current CU, as
After ascending reordering using TM cost, an index is signaled.
Intra template matching prediction (Intra TMP) is a special intra prediction mode that copies the best prediction block from the reconstructed part of the current frame, whose L-shaped template matches the current template. For a predefined search range, the encoder searches for the most similar template to the current template in a reconstructed part of the current frame and uses the corresponding block as a prediction block. The encoder then signals the usage of this mode, and the same prediction operation is performed at the decoder side.
The prediction signal is generated by matching the L-shaped causal neighbor of the current block with another block in a predefined search area in
Within each region, the decoder searches for the template that has least SAD with respect to the current one and uses its corresponding block as a prediction block.
The dimensions of all regions (SearchRange_w, SearchRange_h) are set proportional to the block dimension (BlkW, BlkH) to have a fixed number of SAD comparisons per pixel. That is:
where ‘a’ is a constant that controls the gain/complexity trade-off. In practice, ‘a’ is equal to 5.
The Intra template matching tool is enabled for CUs with size less than or equal to 64 in width and height. This maximum CU size for Intra template matching is configurable.
The Intra template matching prediction mode is signaled at CU level through a dedicated flag when DIMD is not used for current CU.
For each intra prediction mode in MPMs, The SATD between the prediction and reconstruction samples of the template is calculated. First two intra prediction modes with the minimum SATD are selected as the TIMD modes. These two TIMD modes are fused with the weights after applying PDPC process, and such weighted intra prediction is used to code the current CU. Position dependent intra prediction combination (PDPC) is included in the derivation of the TIMD modes.
The costs of the two selected modes are compared with a threshold, in the test the cost factor of 2 is applied as follows:
If this condition is true, the fusion is applied, otherwise the only model is used.
Weights of the modes are computed from their SATD costs as follows:
The division operations are conducted using the same lookup table (LUT) based integerization scheme used by the CCLM.
LIC is an inter prediction technique to model local illumination variation between current block and its prediction block as a function of that between current block template and reference block template. The parameters of the function can be denoted by a scale α and an offset β, which forms a linear equation, that is, α*p[x]+β to compensate illumination changes, where p[x] is a reference sample pointed to by MV at a location x on reference picture. When wrap around motion compensation is enabled, the MV shall be clipped with wrap around offset taken into consideration. Since α and β can be derived based on current block template and reference block template, no signaling overhead is required for them, except that an LIC flag is signaled for AMVP mode to indicate the use of LIC.
The local illumination compensation proposed in JVET-00066 is used for uni-prediction inter CUs with the following modifications.
When OBMC is applied, top and left boundary pixels of a CU are refined using neighboring block's motion information with a weighted prediction as described in JVET-L0101. Conditions of not applying OBMC are as follows:
A subblock-boundary OBMC is performed by applying the same blending to the top, left, bottom, and right subblock boundary pixels using neighboring subblocks' motion information. It is enabled for the subblock based coding tools:
When OBMC mode is used in CIIP mode with LMCS, inter blending is performed prior to LMCS mapping of inter samples. LMCS is applied to blended inter samples which are combined with LMCS applied intra samples in CIIP mode,
where InterpredY represents the samples predicted by the motion of current block in the original domain, IntrapredY represents the samples predicted in the mapped domain, OBMCpredY represents the samples predicted by the motion of neighboring blocks in the original domain, and w0 and w1 are the weights.
In template matching based OBMC scheme, instead of directly using the weighted prediction, the prediction value of CU boundary samples derivation approach is decided according to the template matching costs, including using current block's motion information only, or using neighboring block's motion information as well with one of the blending modes.
In this scheme for each block with a size of 4×4 at the top CU boundary, the above template size equals to 4×1. If N adjacent blocks have the same motion information, then the above template size is enlarged to 4N×1 since the MC operation can be processed at one time. For each left block with a size of 4×4 at the left CU boundary, the left template size equals to 1×4 or 1×4N (
For each 4×4 top block (or N 4×4 blocks group), the prediction value of boundary samples is derived following the below steps.
Take block A as the current block and its above neighboring block AboveNeighbor_A for example. The operation for left blocks is conducted in the same manner.
First, three template matching costs (Cost1, Cost2, Cost3) are measured by SAD between the reconstructed samples of a template and its corresponding reference samples derived by MC process according to the following three types of motion information: Cost1 is calculated according to A's motion information.
Cost2 is calculated according to AboveNeighbor_A's motion information.
Cost3 is calculated according to weighted prediction of A's and AboveNeighbor_A's motion information with weighting factors as ¾ and ¼ respectively.
Second, choose one approach to calculate the final prediction results of boundary samples by comparing Cost1, Cost2 and Cost 3.
The original MC result using current block's motion information is denoted as Pixel1, and the MC result using neighboring block's motion information is denoted as Pixel2. The final prediction result is denoted as NewPixel.
If Cost1 is minimum, then NewPixel(i,j)=Pixel1(i,j).
If (Cost2+(Cost2>>2)+(Cost2>>3))<=Cost1, then blending mode 1 is used.
For luma blocks, the number of blending pixel rows is 4.
NewPixel(i,0)=(26×Pixel1(i,0)+6×Pixel2(i,0)+16)>>5
NewPixel(i,1)−(7×Pixel1(i,1)+Pixel2(i,1)+4)>>3
NewPixel(i,2)−(15×Pixel1(1,2)+Pixel2(1,2)+8)>>4
NewPixel(1,3)−(31×Pixel1(1,3)+Pixel2(1,3)+16)>>5
For chroma blocks, the number of blending pixel rows is 1.
NewPixel(i,0)−(26×Pixel1(i,0)+6×Pixel2(i,0)+16)>>5
If Cost1<=Cost2, then blending mode 2 is used.
For luma blocks, the number of blending pixel rows is 2.
NewPixel(i,0)−(15×Pixel1(i,0)+Pixel2(i,0)+8)>>4
NewPixel(i,1)=(31×Pixel1(i,1)+Pixel2(i,1)+16)>>5
For chroma blocks, the number of blending pixel rows/columns is 1.
NewPixel(i,0)=(15×Pixel1(i,0)+Pixel2(i,0)+8)>>4
Otherwise, blending mode 3 is used.
For luma blocks, the number of blending pixel rows is 4.
NewPixel(i,1)−(7×Pixel1(i,1)+Pixel2(i,1)+4)>>3
NewPixel(i,2)=(15×Pixel1(1,2)+Pixel2(1,2)+8)>>4
NewPixel(i,3)−(31×Pixel1(1,3)+Pixel2(1,3)+16)>>5
For chroma blocks, the number of blending pixel rows is 1. NewPixel(i,0)−(7×Pixel1(i,0)+Pixel2(i,0)+4)>>3 Currently, the IBC tool is not combined with the GPM tool. Thus, the the present disclosure provides examples to combine them together, which may improve the prediction accuracy and improve the coding performance.
Currently, the coding block coded with IBC mode is not combined with the coding block coded with intra mode or inter mode. Thus, the the present disclosure provides examples to combine them together, which may improve the prediction accuracy and improve the coding performance.
Currently, the block vector (BV) number in the IBC tool is singular. Thus, the the present disclosure provides examples to increase the block vector (BV) number and the prediction results can be combined, which may improve the prediction accuracy and improve the coding performance.
Currently, the coding block coded with Intra TMP mode is not combined with the coding block coded with intra mode or inter mode Thus, the the present disclosure provides examples to combine them together, which may improve the prediction accuracy and improve the coding performance.
Currently, the Intra TMP tool is not combined with the GPM tool Thus, the the present disclosure provides examples to combine them together, which may improve the prediction accuracy and improve the coding performance.
Currently, the IBC tool is not combined with the TIMD tool Thus, the the present disclosure provides examples to combine them together, which may improve the prediction accuracy and improve the coding performance.
Currently, the Intra TMP tool is not combined with the TIMD tool Thus, the the present disclosure provides examples to combine them together, which may improve the prediction accuracy and improve the coding performance.
Currently, the Intra TMP tool is not combined with the LIC tool Thus, the the present disclosure provides examples to combine them together, which may improve the prediction accuracy and improve the coding performance.
Currently, the IBC tool is not combined with the OBMC tool Thus, the the present disclosure provides examples to combine them together, which may improve the prediction accuracy and improve the coding performance.
Currently, the Intra TMP tool is not combined with the OBMC tool Thus, the the present disclosure provides examples to combine them together, which may improve the prediction accuracy and improve the coding performance.
In this disclosure, to address the issues as pointed out above, methods are provided to further improve the existing design of the IBC. In general, the main features of the proposed technologies in this disclosure are summarized as follows.
1. The IBC tool is combined with GPM tool, the combined form can be GPM with IBC and IBC prediction, GPM with IBC and Intra prediction or GPM with IBC and inter prediction.
2. As a simplified version of IBC tool combined with GPM tool, for a predefined direction (such as 45 degree), the upper left part is predicted with intra mode, the bottom right part is predicted with IBC mode, then they are average weighted to obtain the final prediction signal.
3. The IBC tool is combined with CIIP tool, where the IBC prediction is combined with intra prediction mode, or the IBC prediction is combined with inter prediction mode.
4. The IBC tool is combined with MHP tool, where more than one BV prediction are obtained and they are weighted averaged to obtain the final prediction signal.
5. The Intra TMP tool is combined with CIIP tool, where the Intra TMP is combined with intra prediction mode, or the Intra TMP is combined with inter prediction mode.
6. The Intra TMP tool is combined with GPM tool, the combined form can be GPM with Intra TMP and Intra TMP prediction, GPM with Intra TMP and Intra prediction or GPM with Intra TMP and inter prediction.
7. As a simplified version of Intra TMP tool combined with GPM tool, for a predefined direction (such as 45 degree), the upper left part is predicted with intra mode, the bottom right part is predicted with Intra TMP mode, then they are average weighted to obtain the final prediction signal.
8. The IBC tool is combined with TIMD tool, where IBC mode is used together with the intra prediction modes in MPMs to conduct TIMD fusion.
9. The Intra TMP tool is combined with TIMD tool, where Intra TMP mode is used together with the intra prediction modes in MPMs to conduct TIMD fusion.
10. The Intra TMP tool is combined with LIC tool, where the local illumination variation between current block and its Intra TMP prediction block is compensated with the LIC tool.
11. The IBC tool is combined with OBMC tool, where top and left boundary pixels of current block predicted with IBC are refined with OBMC tool.
12. The Intra TMP tool is combined with OBMC tool, where top and left boundary pixels of current block predicted with Intra TMP are refined with OBMC tool.
In some examples, the disclosed methods may be applied independently or jointly.
GPM with IBC and IBC Prediction
According to the one or more embodiments of the disclosure, the IBC tool is combined with GPM tool in the form of GPM with IBC and IBC prediction. Different methods may be used to achieve this goal.
In the first method, both “inter” parts of GPM with inter and inter prediction method in VVC is replaced with IBC. That means that two IBC merge prediction results are weighted averaged with each other according to a splitting line in the coding block. The weight can be obtained referring to GPM with inter and inter prediction method in VVC.
In the second method, both “inter” parts of GPM with inter and inter prediction method in ECM is replaced with IBC, where some template matching tools can be utilized to further improve the coding performance.
GPM with IBC and Intra Prediction
According to the one or more embodiments of the disclosure, the IBC tool is combined with GPM tool in the form of GPM with IBC and intra prediction. Different methods may be used to achieve this goal.
In the first method, the “inter” part of GPM with inter and intra prediction method in ECM is replaced with IBC, where the IBC merge predicted results are weighted averaged with the intra prediction results to obtain the final prediction signal.
GPM with IBC and Inter Prediction
According to the one or more embodiments of the disclosure, the IBC tool is combined with GPM tool in the form of GPM with IBC and inter prediction. Different methods may be used to achieve this goal.
In the first method, one “inter” part of GPM with inter and inter prediction method in VVC is replaced with IBC, where the IBC merge predicted results are weighted averaged with the inter merge prediction results to obtain the final prediction signal.
In the second method, one “inter” part of GPM with inter and inter prediction method in ECM is replaced with IBC, where some template matching tools can be utilized to further improve the coding performance.
According to the one or more embodiments of the disclosure, the IBC tool is combined with GPM tool in the form of simplified GPM with IBC and intra prediction, such as IBC and intra prediction is combined at a certain splitting mode, which can save the bits overhead of the splitting representation. Different methods may be used to achieve this goal.
In the first method, aiming at one splitting line, such as 45 degree, the upper left parts of the coding block is coded with intra prediction mode, and the bottom right parts of the coding block is coded with IBC prediction mode, then they are averaged in GPM form to obtain the final prediction signal.
According to the one or more embodiments of the disclosure, the coding block coded with IBC mode are combined with the coding block coded with intra mode or inter mode. Different methods may be used to achieve this goal.
In the first method, the encoder/decoder may combine the coding block coded with IBC mode with the coding block coded with intra mode. Various methods can be utilized in this combination. In one example, similar to the CIIP technology in VVC, the coding block coded with IBC merge mode is regarded as the coding block coded with inter merge mode, and it is combined with the coding block coded with planar intra prediction mode. In another example, similar to the Combination of CIIP with TIMD and TM merge technology in ECM, the coding block coded with IBC merge-TM mode is combined with the coding block coded with TIMD derived intra prediction mode.
When combining the coding block coded with IBC mode with the coding block coded with intra mode, the weights may be designed similar to the CIIP technology in VVC and the Combination of CIIP with TIMD and TM merge technology in ECM, i.e. 1) the weights for both IBC coded block and intra coded block are bigger than zero and less than one, or the weights for intra coded block gradually change from one to zero from one area to another area in current block (vice verse for the weights for IBC coded block); 2) the weights for IBC coded block and intra coded block may be decided based on coding modes of neighboring blocks and intra mode of current block; 3) the weights for IBC coded block and intra coded block may be uniform in the whole current block or different in different positions of current block.
For example, the weights for IBC coded block and intra coded block may be decided as follows: When the up and left neighboring blocks of current block are both intra coded and the intra mode of current block is planar mode, the weights for IBC coded block and intra coded block are ¼ and ¾ in the whole current block. When the up and left neighboring blocks of current block are both IBC coded and the intra mode of current block is planar mode, the weights for IBC coded block and intra coded block are ¾ and ¼ in the whole current block. When one up or left neighboring block is IBC coded, the other neighboring block is intra coded, and the intra mode of current block is planar mode, the weights for IBC coded block and intra coded block are ½ and ½ in the whole current block.
When the intra mode of current block is near horizontal angular modes (2<=angular mode index<34), the current block is vertically divided as shown in
When combining the coding block coded with IBC mode with the coding block coded with intra mode, the weights may also be designed in a mask version, i.e. the weights for IBC coded block and intra coded block may be one or zero for different areas of current block. The specific weights for IBC coded block and intra coded block may be decided based on coding modes of neighboring blocks and intra mode of current block. For example, the weights for IBC coded block and intra coded block may be decided as follows: when the intra mode of current block is near horizontal angular modes (2<=angular mode index<34), if the up and left neighboring blocks of current block are both intra coded, the weights for intra coded block is one in the left ¾ area of current block and zero in the right ¼ area of current block as shown in
When the intra mode of current block is near vertical angular modes (34<=angular mode index<=66), if the up and left neighboring blocks of current block are both intra coded, the weights for intra coded block is one in the top ¾ area of current block and zero in the bottom ¼ area of current block as shown in
When the intra mode of current block is planar mode, if the up and left neighboring blocks of current block are both intra coded, the weights for intra coded block is one in the top left ¾ area (horizontal index is smaller than ½ width of current block or vertical index is smaller than ½ height of current block) of current block and zero in the right bottom ¼ area (horizontal index is equal or bigger than ½ width of current block and vertical index is equal or bigger than ½ height of current block) of current block as shown in
The above two weights design methods may be utilized independently or combined together. For example, when the intra mode of current block is planar mode, if none of the up and left neighboring blocks of current block are intra coded, the weights for IBC coded block and intra coded block may be designed similar to the CIIP technology in VVC. In other conditions, the weights for IBC coded block and intra coded block may be designed in a mask version.
When combining the coding block coded with IBC mode with the coding block coded with intra mode, the weights may also be designed based on template matching methods, where the sum of absolute difference (SAD), sum of square difference (SSD) or sum of absolute transformed difference (SATD) between the prediction and reconstruction samples of the current block template may be utilized to compute the weights for IBC coded block and intra coded block. The SATD is a block matching criterion widely used in scenarios such as fractional motion estimation for video compression. For example, the weights for IBC coded block and intra coded block may be decided as follows: For intra coded block, as shown in
When utilizing the template of current block for computing the weights of IBC coded block and intra coded block, both left and top template may be utilized if they are available, or only left template or only top template is utilized if it is available. The utilization of both left and top template, only top template or only left template may be decided in a Rate-Distortion Optimization (RDO) process or in a predefined criteria. The RDO technique generally minimizes the amount of distortion (loss of video quality) against the amount of data required to encode the video. For a predefined criteria, for example, if the intra mode of current block is planar mode or DC mode, both left and top template are utilized; if the intra mode of current block is near horizontal angular modes (2<=angular mode index<34), only left template is utilized; if the intra mode of current block is near vertical angular modes (34<=angular mode index<=66), only top template is utilized.
In the second method, the encoder/decoder may combine the coding block coded with IBC mode with the coding block coded with inter mode. Various methods can be utilized in this combination. In one example, similar to the CIIP technology in VVC, the coding block coded with IBC merge mode is regarded as the coding block coded with planar intra mode, and it is combined with the coding block coded with inter merge mode. In another example, the coding block coded with IBC merge mode is regarded as the coding block coded with inter merge mode, and it is combined with the coding block coded with inter merge mode by equally averaging.
In the third method, the encoder/decoder may combine the coding block coded with IBC mode with the coding block coded with intra mode and the coding block coded with inter mode. Various methods can be utilized in this combination. In one example, the coding block coded with IBC mode, the coding block coded with intra mode, and the coding block coded with inter mode are directly combined by equally averaging. In another example, firstly the coding block coded with IBC mode is separately combined with the coding block coded with intra mode and inter mode as presented in the first and second method. Then, the separate combined results are combined by equally averaging.
According to the one or more embodiments of the disclosure, the block vector (BV) number in IBC tool is increased to 2 or more, and 2 or more hypothesis are combined to obtain the final prediction result. Different methods may be used to achieve this goal.
In the first method, the encoder/decoder may combine 2 hypothesis corresponding to 2 BVs to obtain the final prediction result. Various methods can be utilized to achieve this goal. In one example, the 2 BVs corresponding the smallest and the second smallest rate distortion metrics in IBC AMVP mode are equally averaged to obtain the final prediction result. In another example, the prediction result corresponding to IBC AMVP mode and the prediction result corresponding to IBC merge mode are equally averaged to obtain the final prediction result.
In the second method, the encoder/decoder may combine more hypothesis corresponding to more BVs to obtain the final prediction result. Various methods can be utilized to achieve this goal. In one example, the iterative accumulation method proposed in Multi-hypothesis prediction (MHP) technology is utilized to obtain the final prediction result. In another example, all the BVs corresponding the smallest, the second smallest, the third smallest, . . . , rate distortion metrics in IBC AMVP mode are equally averaged to obtain the final prediction result.
In some embodiments, the prediction block candidates are searched and selected according to the criterion of minimizing template matching cost, i.e., the top N candidates which lead to the minimum BV matching cost are selected. The BV matching cost can be not limited to SAD (sum of absolute difference) and SSE (sum of square error).
In some embodiments, the prediction block candidates may be selected according to the predefine mode, i.e., planar mode.
In some embodiments, the prediction block candidates may be selected according to the neighbor predefine mode, i.e., top predefine mode, left predefine mode.
In this embodiment, the weighting factors to generate the final prediction block are predefined and fixed at both the encoder and decoder side. As an example, equal weighting factors can be used, i.e., 1/N for all the candidate blocks.
To adapt to the diverse characteristics of video content, adaptive multi-hypothesis IBC methods are also proposed.
In some embodiments, the weighting factors may be derived based on the BV matching costs. Denote the BV matching costs of the N candidates as C1, C2, . . . , CN, the weighting factors are calculated as follow.
It should be noted that the BV matching cost can be measured with (but not limited to) SAD and SSE.
In yet another embodiment, the weighting factors may be derived/switched based on the size or block syntax element signaled in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels.
In yet another embodiment, the weighting factors may be derived at the encoder side and then signaled in the bitstream to the decoder. Denote the N prediction block candidates as P1, P2, . . . , PN and the current block as X, then the weighting factors can be solved by the following equation:
Equation (5) may be solved using Wiener-Hopf equations as ALF. The derived filter coefficients are then quantized to integer type and signaled in the block level.
In yet another embodiment, the weighting factors may be derived at the encoder side and then signaled in the bitstream to the decoder. Denote the N prediction block candidates as P1, P2, . . . , PN and the current block as X, then the weighting factors may be solved by the following equation:
Equation (6) may be solved using LDL decomposition or Gaussian elimination.
In yet another embodiment, the weighting factors are derived based on the templates and the derived weighting factors are applied to the prediction block candidates to generate the final prediction block. Denote the templates of the prediction candidates as T1, T2, . . . , TN and the current block as T, then the weighting factors can be derived using the following equation:
Equation (7) may be solved using Wiener-Hopf equations. Then the final prediction block can be calculated as Σi=1NωiPi, where Pi represents the i-th prediction block candidate.
IBC mode exploits the nonlocal correlation to improve the prediction accuracy, in which similar blocks are searched and used to generate the final prediction block. In this embodiment, it is proposed to combine the nonlocal mean filtering and multi-hypothesis IBC, which is described as follow. In the first step, N prediction block candidates are searched and identified as conducted in the IBC. In the second step, the weighting factor is calculated as follows.
Where Di is used to measure the distance between the template of the i-th prediction block candidate and the template of the current block, h is used as the degree of weighting and Z[i] is the normalization constant:
To calculate the weighting factor in equation (8), the strength of weighting should be determined first. In this disclosure, several methods are proposed to decide the weighting strength.
In the first method, a weighting strength candidate list including some typical weighting strength values is defined and fixed at both encoder and decoder side. At the encoder side, the weighting strength values are checked using rate distortion optimization and the optimal weighting strength value is identified and signaled in the bitstream to the decoder side.
In the second method, the weighting strength value is estimated using the template of the prediction block candidates and the template of the current block. Denote the templates of the prediction candidates as T1, T2, . . . , TN and the current block as T. Then the weighting strength value can be solved using the following equation:
In the third method, the weighting strength value can be estimated using the QP value and variance of the template of the current block, i.e., the relationship between the weighting strength value, QP value and the template variance can be fitted offline.
To better exploit the nonlocal correlation in the IBC, in this embodiment singular value decomposition (SVD) is utilized to generate the final prediction block from the prediction block candidates. The width and height of the current block are denoted as W and H, the area of the current block is denoted as d=H×W.
Step1. K prediction block candidates y; are searched and identified as conducted in the FIBC.
Step2. The K prediction block candidates of the current block y construct the block group G and are arranged as a matrix:
Where YG is a matrix with size of d×K by arranging every candidate in group G as a column vector.
Step3. Perform SVD decomposition on the matrix YG.
Step4. Apply soft-thresholding operation on the singular value matrix ΛG.
Where softTh( ) is a function which shrinks the diagonal elements of ΛG with the threshold τ. For the k-th diagonal element in ΛG, it is shrunken by the nonlinear function Dτ(k) at level τ(k):
ΛG,τ is the matrix composed of the shrunken singular values, λk,τ(k) at diagonal positions.
Step5. Perform inverse SVD to obtain the filtered patch group.
One of the key steps is to determine the thresholding values for each diagonal elements in step 4. In the present disclosure, the thresholding values are calculated as follows. The threshold is estimated for each group of image patches with the following equation:
Where σn,G is the standard deviation of noise, and σx,G,k is the standard deviation of the original block in the k-th dimension of SVD space for group G. The deviation of the original block in SVD space is estimated as follow.
Where λG,k2 is the k-th singular value of YG
Where σy is calculated as follows,
Here yk(i) represents the i-th pixel of prediction block candidate vector yk.
In this disclosure, the proposed multi-hypothesis IBC can be utilized as a replacement of the current IBC mode or the encoder can adaptively select IBC mode or multi-hypothesis IBC mode.
In some embodiments, the multi-hypothesis IBC may be used as a replacement of the current IBC mode, i.e., always using multiple hypothesis for prediction.
In yet another embodiment, one of the multi-hypothesis IBC methods in the above sections is used jointly with the current IBC mode. A flag is signaled in the bitstream to indicate whether multi-hypothesis IBC mode is applied to the CU.
In yet another embodiment, more than one multi-hypothesis IBC methods in the above sections are used jointly with the current IBC mode. A flag is firstly signaled in the bitstream to indicate whether multi-hypothesis IBC mode is applied. Then an index is signaled to indicate which of the multi-hypothesis IBC methods is applied to the CU.
In yet another embodiment, multi-hypothesis IBC method in the above sections is used jointly with the current IBC mode. The multi-hypothesis IBC may be used as a replacement of the current IBC mode according to certain coded information of the current block, e.g., SAD (sum of absolute difference), SSE (sum of square error), quantization parameter (QP) associated with the TB/CB and/or the slice, the neighbor prediction modes of the CU (e.g., IBC mode or intra or inter) and/or the slice type (e.g. I slice, P slice or B slice).
According to the one or more embodiments of the disclosure, the coding block coded with Intra TMP mode are combined with the coding block coded with intra mode or inter mode. Different methods may be used to achieve this goal.
In the first method, the encoder/decoder may combine the coding block coded with Intra TMP mode with the coding block coded with intra mode. Various methods can be utilized in this combination. In one example, similar to the CIIP technology in VVC, the coding block coded with Intra TMP mode is regarded as the coding block coded with inter merge mode, and it is combined with the coding block coded with planar intra prediction mode. In another example, similar to the Combination of CIIP with TIMD and TM merge technology in ECM, the coding block coded with Intra TMP mode is combined with the coding block coded with TIMD derived intra prediction mode.
When combining the coding block coded with Intra TMP mode with the coding block coded with intra mode, the weights can be decided refer to the weights design of the CIIP technology in VVC or ECM, or the weights can also be designed based on template matching methods, where the sum of absolute difference (SAD), sum of square difference (SSD) or sum of absolute transformed difference (SATD) between the prediction and reconstruction samples of the current block template can be utilized to compute the weights for Intra TMP coded block and intra coded block. For example, the weights for Intra TMP coded block and intra coded block can be decided as follows: For intra coded block, as shown in
When utilizing the template of current block for computing the weights of Intra TMP coded block and intra coded block, both left and top template can be utilized if they are available, or only left template or only top template is utilized if it is available. The utilization of both left and top template, only top template or only left template can be decided in a RDO process or in a predefined criteria. For example, if the intra mode of current block is planar mode or DC mode, both left and top template are utilized; if the intra mode of current block is near horizontal angular modes (2<=angular mode index<34), only left template is utilized; if the intra mode of current block is near vertical angular modes (34<=angular mode index<=66), only top template is utilized.
In the second method, the encoder/decoder may combine the coding block coded with Intra TMP mode with the coding block coded with inter mode. Various methods can be utilized in this combination. In one example, similar to the CIIP technology in VVC, the coding block coded with Intra TMP mode is regarded as the coding block coded with planar intra mode, and it is combined with the coding block coded with inter merge mode. In another example, the coding block coded with Intra TMP mode is regarded as the coding block coded with inter merge mode, and it is combined with the coding block coded with inter merge mode by equally averaging.
In the third method, the encoder/decoder may combine the coding block coded with Intra TMP mode with the coding block coded with intra mode and the coding block coded with inter mode. Various methods can be utilized in this combination. In one example, the coding block coded with Intra TMP mode, the coding block coded with intra mode, and the coding block coded with inter mode are directly combined by equally averaging. In another example, firstly the coding block coded with Intra TMP mode is separately combined with the coding block coded with intra mode and inter mode as presented in the first and second method. Then, the separate combined results are combined by equally averaging.
GPM with Intra TMP and Intra TMP Prediction
According to the one or more embodiments of the disclosure, the Intra TMP tool is combined with GPM tool in the form of GPM with Intra TMP and Intra TMP prediction. Different methods may be used to achieve this goal.
In the first method, both “inter” parts of GPM with inter and inter prediction method in VVC is replaced with Intra TMP. That means that two Intra TMP prediction results are weighted averaged with each other according to a splitting line in the coding block. The weight can be obtained referring to GPM with inter and inter prediction method in VVC.
In the second method, both “inter” parts of GPM with inter and inter prediction method in ECM is replaced with Intra TMP, where some template matching tools can be utilized to further improve the coding performance.
GPM with Intra TMP and Intra Prediction
According to the one or more embodiments of the disclosure, the Intra TMP tool is combined with GPM tool in the form of GPM with Intra TMP and intra prediction. Different methods may be used to achieve this goal.
In the first method, the “inter” part of GPM with inter and intra prediction method in ECM is replaced with Intra TMP, where the Intra TMP predicted results are weighted averaged with the intra prediction results to obtain the final prediction signal.
GPM with Intra TMP and Inter Prediction
According to the one or more embodiments of the disclosure, the Intra TMP tool is combined with GPM tool in the form of GPM with Intra TMP and inter prediction. Different methods may be used to achieve this goal.
In the first method, one “inter” part of GPM with inter and inter prediction method in VVC is replaced with Intra TMP, where the Intra TMP predicted results are weighted averaged with the inter merge prediction results to obtain the final prediction signal.
In the second method, one “inter” part of GPM with inter and inter prediction method in ECM is replaced with Intra TMP, where some template matching tools can be utilized to further improve the coding performance.
According to the one or more embodiments of the disclosure, the Intra TMP tool is combined with GPM tool in the form of simplified GPM with Intra TMP and intra prediction, such as Intra TMP and intra prediction is combined at a certain splitting mode, which can save the bits overhead of the splitting representation. Different methods may be used to achieve this goal.
In the first method, aiming at one splitting line, such as 45 degree, the upper left parts of the coding block is coded with intra prediction mode, and the bottom right parts of the coding block is coded with Intra TMP prediction mode, then they are averaged in GPM form to obtain the final prediction signal.
Combine IBC with TIMD Mode
According to the one or more embodiments of the disclosure, the IBC tool is combined with TIMD tool. Different methods may be used to achieve this goal.
In the first method, the IBC mode is regarded as one intra prediction mode added in the MPM list, then the IBC mode is compared with other intra prediction modes in the MPM list using template matching cost, finally two modes with the minimum and second minimum costs are fused using TIMD method to obtain the final prediction result.
In the second method, first the regular TIMD prediction result is obtained, then the template matching cost of the IBC mode and the regular TIMD prediction result are calculated, finally the IBC mode and the regular TIMD prediction result are fused using TIMD method to obtain the final prediction result.
Combine Intra TMP with TIMD Mode
According to the one or more embodiments of the disclosure, the Intra TMP tool is combined with TIMD tool. Different methods may be used to achieve this goal.
In the first method, the Intra TMP mode is regarded as one intra prediction mode added in the MPM list, then the Intra TMP mode is compared with other intra prediction modes in the MPM list using template matching cost, finally two modes with the minimum and second minimum costs are fused using TIMD method to obtain the final prediction result.
In the second method, first the regular TIMD prediction result is obtained, then the template matching cost of the Intra TMP mode and the regular TIMD prediction result are calculated, finally the Intra TMP mode and the regular TIMD prediction result are fused using TIMD method to obtain the final prediction result.
Combine Intra TMP with LIC
According to the one or more embodiments of the disclosure, the Intra TMP tool is combined with LIC tool. Different methods may be used to achieve this goal.
In the first method, the Intra TMP mode is regarded as inter mode, and LIC is used to model local illumination variation between current block and its Intra TMP prediction block as a function of that between current block template and reference block template. The function is a linear equation as used in the regular LIC method.
Combine IBC with OBMC
According to the one or more embodiments of the disclosure, the IBC tool is combined with OBMC tool. Different methods may be used to achieve this goal.
In the first method, the IBC mode is regarded as inter mode, and the regular OBMC method is applied to refine the top and left boundary pixels of an IBC coded CU using neighboring block's block vector information with a weighted prediction.
In the second method, the IBC mode is regarded as inter mode, and the template matching based OBMC method is applied to refine the top and left boundary pixels of an IBC coded CU using template matching based methods.
Combine Intra TMP with OBMC
According to the one or more embodiments of the disclosure, the Intra TMP tool is combined with OBMC tool. Different methods may be used to achieve this goal.
In the first method, the Intra TMP mode is regarded as inter mode, and the regular OBMC method is applied to refine the top and left boundary pixels of an Intra TMP coded CU using neighboring block's block vector information with a weighted prediction.
In the second method, the Intra TMP mode is regarded as inter mode, and the template matching based OBMC method is applied to refine the top and left boundary pixels of an Intra TMP coded CU using template matching based methods.
The processor 1620 typically controls overall operations of the computing environment 1610, such as the operations associated with display, data acquisition, data communications, and image processing. The processor 1620 may include one or more processors to execute instructions to perform all or some of the steps in the above-described methods. Moreover, the processor 1620 may include one or more modules that facilitate the interaction between the processor 1620 and other components. The processor may be a Central Processing Unit (CPU), a microprocessor, a single chip machine, a Graphical Processing Unit (GPU), or the like.
The memory 1630 is configured to store various types of data to support the operation of the computing environment 1610. The memory 1630 may include predetermined software 1632. Examples of such data includes instructions for any applications or methods operated on the computing environment 1610, video datasets, image data, etc. The memory 1630 may be implemented by using any type of volatile or non-volatile memory devices, or a combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic memory, a flash memory, a magnetic or optical disk.
The I/O interface 1640 provides an interface between the processor 1620 and peripheral interface modules, such as a keyboard, a click wheel, buttons, and the like. The buttons may include but are not limited to, a home button, a start scan button, and a stop scan button. The I/O interface 1640 can be coupled with an encoder and decoder.
In Step 2001, the processor 1620, at the side of a decoder, may obtain a current CU that is coded based on IBC mode combined with GPM.
In Step 2002, the processor 1620 may obtain a prediction for the current CU based on the IBC mode combined with GPM.
In some examples, the current CU is partitioned into a first IBC-predicted part and a second IBC-predicted part.
In one or more examples, the current CU is partitioned into the two IBC-predicted parts following GPM with inter and inter prediction method in VVC. Both “inter” parts of GPM with inter and inter prediction method in VVC is replaced with IBC. That means that two IBC merge prediction results are weighted averaged with each other according to a splitting line in the coding block. The weight can be obtained referring to GPM with inter and inter prediction method in VVC. For example, the processor 1620 may obtain a first IBC merge prediction for the first IBC-predicted part and a second IBC merge prediction for the second IBC-predicted part, and obtain the prediction for the current CU based on the first IBC merge prediction and the second IBC merge prediction. The prediction for the current CU may be obtained by weighted-averaging the first IBC merge prediction and the second IBC merge prediction.
In one or more examples, the current CU is partitioned into the two IBC-predicted parts following GPM with inter and inter prediction method in ECM. Both “inter” parts of GPM with inter and inter prediction method in ECM is replaced with IBC, where some template matching tools can be utilized to further improve the coding performance. For example, the processor 1620 may obtain a first IBC-TM prediction for the first IBC-predicted part and a second IBC-TM prediction for the second IBC-predicted part, and obtain the prediction for the current CU based on the first IBC-TM prediction and the second IBC-TM prediction.
In some examples, the current CU is partitioned into a first IBC-predicted part and a second intra-predicted part. In these examples, the “inter” part of GPM with inter and intra prediction method in ECM is replaced with IBC, where the IBC merge predicted results are weighted averaged with the intra prediction results to obtain the final prediction signal. For example, the processor 1620 may obtain a first IBC merge prediction for the first IBC-predicted part and a second intra prediction for the second intra-predicted part, and obtain the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second intra prediction.
In some examples, the current CU is partitioned into a first IBC-predicted part and a second inter-predicted part. In these examples, one “inter” part of GPM with inter and inter prediction method in VVC or in ECM is replaced with IBC. For example, the processor 1620 may obtain a first IBC merge prediction for the first IBC-predicted part and a second inter prediction for the second inter-predicted part, and obtain the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second inter prediction. For another example, the processor 1620 may obtain a first IBC-TM prediction for the first IBC-predicted part and a second inter prediction for the second inter-predicted part, and obtain the prediction for the current CU based on the first IBC TM prediction and the second inter prediction.
In some examples, the IBC tool may be combined with GPM tool in the form of simplified GPM with IBC and intra prediction. For example, the current CU is partitioned into a first part and a second part based on a predefined direction, corresponding to a certain splitting mode used in GPM. In these examples, the processor 1620 may obtain a first IBC prediction for the first part and a second intra prediction for the second part, and obtain the prediction for the current CU by weighted-averaging the first IBC prediction and the second intra prediction. In some examples, the predefined direction may be one splitting line at 45 degrees, the upper left parts of the coding block is coded with intra prediction mode, and the bottom right parts of the coding block is coded with IBC prediction mode, then they are averaged in GPM form to obtain the final prediction signal.
In Step 2101, the processor 1620, at the side of an encoder, may encode a current CU based on IBC mode combined with GPM.
In Step 2102, the processor 1620 may transmit the current CU that is coded based on the IBC mode combined with GPM to a decoder.
In some examples, the current CU is partitioned into a first IBC-predicted part and a second IBC-predicted part.
In one or more examples, the current CU is partitioned into the two IBC-predicted parts following GPM with inter and inter prediction method in VVC. Both “inter” parts of GPM with inter and inter prediction method in VVC is replaced with IBC. That means that two IBC merge prediction results are weighted averaged with each other according to a splitting line in the coding block. The weight can be obtained referring to GPM with inter and inter prediction method in VVC. For example, the processor 1620 may obtain a first IBC merge prediction for the first IBC-predicted part and a second IBC merge prediction for the second IBC-predicted part, and obtain the prediction for the current CU based on the first IBC merge prediction and the second IBC merge prediction. The prediction for the current CU may be obtained by weighted-averaging the first IBC merge prediction and the second IBC merge prediction.
In one or more examples, the current CU is partitioned into the two IBC-predicted parts following GPM with inter and inter prediction method in ECM. Both “inter” parts of GPM with inter and inter prediction method in ECM is replaced with IBC, where some template matching tools can be utilized to further improve the coding performance. For example, the processor 1620 may obtain a first IBC-TM prediction for the first IBC-predicted part and a second IBC-TM prediction for the second IBC-predicted part, and obtain the prediction for the current CU based on the first IBC-TM prediction and the second IBC-TM prediction.
In some examples, the current CU is partitioned into a first IBC-predicted part and a second intra-predicted part. In these examples, the “inter” part of GPM with inter and intra prediction method in ECM is replaced with IBC, where the IBC merge predicted results are weighted averaged with the intra prediction results to obtain the final prediction signal. For example, the processor 1620 may obtain a first IBC merge prediction for the first IBC-predicted part and a second intra prediction for the second intra-predicted part, and obtain the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second intra prediction.
In some examples, the current CU is partitioned into a first IBC-predicted part and a second inter-predicted part. In these examples, one “inter” part of GPM with inter and inter prediction method in VVC or in ECM is replaced with IBC. For example, the processor 1620 may obtain a first IBC merge prediction for the first IBC-predicted part and a second inter prediction for the second inter-predicted part, and obtain the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second inter prediction. For another example, the processor 1620 may obtain a first IBC-TM prediction for the first IBC-predicted part and a second inter prediction for the second inter-predicted part, and obtain the prediction for the current CU based on the first IBC TM prediction and the second inter prediction.
In some examples, the IBC tool may be combined with GPM tool in the form of simplified GPM with IBC and intra prediction. For example, the current CU is partitioned into a first part and a second part based on a predefined direction, corresponding to a certain splitting mode used in GPM. In these examples, the processor 1620 may obtain a first IBC prediction for the first part and a second intra prediction for the second part, and obtain the prediction for the current CU by weighted-averaging the first IBC prediction and the second intra prediction. In some examples, the predefined direction may be one splitting line at 45 degrees, the upper left parts of the coding block is coded with intra prediction mode, and the bottom right parts of the coding block is coded with IBC prediction mode, then they are averaged in GPM form to obtain the final prediction signal.
In Step 2201, the processor 1620, at the side of a decoder, may obtain a first prediction for a current CU, where the first prediction is associated with intra block copy (IBC) mode.
In Step 2202, the processor 1620, may obtain a second prediction for the current CU, where the second prediction is associated with one of intra mode or inter mode.
In Step 2203, the processor 1620, may obtain a final prediction for the current CU based on the first prediction and the second prediction.
In some examples, similar to the CIIP technology in VVC, the first prediction is associated with IBC merge mode and the second prediction is obtained based on planar intra prediction mode.
In some examples, similar to the Combination of CIIP with TIMD and TM merge technology in ECM, the first prediction is obtained based on IBC merge-TM mode and the second prediction is obtained based on Template-based intra mode derivation (TIMD) derived intra prediction mode.
In some examples, similar to the CIIP technology in VVC, the first prediction is associated with IBC merge mode and the second prediction is obtained based on inter merge mode, and the final prediction is obtained by equally averaging the first prediction and the second prediction.
In some examples, the processor 1620 may combine the coding block coded with IBC mode with the coding block coded with intra mode and the coding block coded with inter mode.
For example, the processor 1620 may further obtain a third prediction for the current CU, where the third prediction is associated with the other of intra mode or inter mode and obtain the final prediction for the current CU by equally averaging the first prediction, the second prediction, and the third prediction.
For another example, the processor 1620 may obtain a first intermediate prediction based on the first prediction and the second prediction and a second intermediate prediction based on the first prediction and the third prediction, and obtain final prediction for the current CU by equally averaging the first intermediate prediction and the second intermediate prediction.
In Step 2301, the processor 1620, at the side of an encoder, may obtain a first prediction for a current CU, where the first prediction is associated with intra block copy (IBC) mode.
In Step 2302, the processor 1620, may obtain a second prediction for the current CU, where the second prediction is associated with one of intra mode or inter mode.
In Step 2303, the processor 1620, may obtain a final prediction for the current CU based on the first prediction and the second prediction.
In some examples, similar to the CIIP technology in VVC, the first prediction is associated with IBC merge mode and the second prediction is obtained based on planar intra prediction mode.
In some examples, similar to the Combination of CIIP with TIMD and TM merge technology in ECM, the first prediction is obtained based on IBC merge-TM mode and the second prediction is obtained based on Template-based intra mode derivation (TIMD) derived intra prediction mode.
In some examples, similar to the CIIP technology in VVC, the first prediction is associated with IBC merge mode and the second prediction is obtained based on inter merge mode, and the final prediction is obtained by equally averaging the first prediction and the second prediction.
In some examples, the processor 1620 may combine the coding block coded with IBC mode with the coding block coded with intra mode and the coding block coded with inter mode.
For example, the processor 1620 may further obtain a third prediction for the current CU, where the third prediction is associated with the other of intra mode or inter mode and obtain the final prediction for the current CU by equally averaging the first prediction, the second prediction, and the third prediction.
For another example, the processor 1620 may obtain a first intermediate prediction based on the first prediction and the second prediction and a second intermediate prediction based on the first prediction and the third prediction, and obtain final prediction for the current CU by equally averaging the first intermediate prediction and the second intermediate prediction.
In Step 2401, the processor 1620, at the side of a decoder, may obtain a plurality of block vectors for a current CU based on IBC mode.
In Step 2402, the processor 1620, at the side of the decoder, may obtain a final prediction for the current CU based on the plurality of block vectors.
In some examples, the plurality of block vectors may include two block vectors, i.e., a first block vector and a second block vector. The processor 1620 may obtain the first block vector based on a smallest rate distortion metric in IBC AMVP mode and the second block vector based on a second smallest rate distortion metric in the IBC AMVP mode, and obtain the final prediction for the current CU by equally averaging the prediction result of the first block vector and the prediction result of the second block vector.
In some examples, the plurality of block vectors may include two block vectors, i.e., a first block vector and a second block vector. The processor 1620 may obtain the first block vector based on a smallest rate distortion metric in IBC AMVP mode and the second block vector based on a smallest rate distortion metric in the IBC merge mode, and obtain the final prediction for the current CU by equally averaging the prediction result of the first block vector and the prediction result of the second block vector.
In some examples, the processor 1620 may obtain the plurality of block vectors based on distortion metrics in IBC AMVP mode and obtain the final prediction for the current CU by equally averaging the prediction results corresponding to the plurality of block vectors.
In some examples, the processor 1620 may obtain the plurality of block vectors. The iterative accumulation method in Multi-hypothesis prediction (MHP) technology may be utilized to obtain the final prediction result.
In Step 2501, the processor 1620, at the side of an encoder, may obtain a plurality of block vectors for a current CU based on IBC mode.
In Step 2502, the processor 1620, at the side of the encoder, may obtain a final prediction for the current CU based on the plurality of block vectors.
In some examples, the plurality of block vectors may include two block vectors, i.e., a first block vector and a second block vector. The processor 1620 may obtain the first block vector based on a smallest rate distortion metric in IBC AMVP mode and the second block vector based on a second smallest rate distortion metric in the IBC AMVP mode, and obtain the final prediction for the current CU by equally averaging the prediction result of the first block vector and the prediction result of the second block vector.
In some examples, the plurality of block vectors may include two block vectors, i.e., a first block vector and a second block vector. The processor 1620 may obtain the first block vector based on a smallest rate distortion metric in IBC AMVP mode and the second block vector based on a smallest rate distortion metric in the IBC merge mode, and obtain the final prediction for the current CU by equally averaging the prediction result of the first block vector and the prediction result of the second block vector.
In some examples, the processor 1620 may obtain the plurality of block vectors based on distortion metrics in IBC AMVP mode and obtain the final prediction for the current CU by equally averaging the prediction results corresponding to the plurality of block vectors.
In some examples, the processor 1620 may obtain the plurality of block vectors. The iterative accumulation method in Multi-hypothesis prediction (MHP) technology may be utilized to obtain the final prediction result.
In Step 2801, the processor 1620, at the side of a decoder, may obtain a current CU coded based on a combined mode that combines an Intra TMP mode and at least one of following modes: an intra prediction mode, an inter prediction mode, a TIMD mode, a LIC mode, or an OBMC mode.
In Step 2802, the processor 1620 may obtain a final prediction for the current CU based on the combined mode.
In some examples, the processor 1620 may obtain a first prediction for the current CU, where the first prediction is associated with the Intra TMP mode; obtain a second prediction for the current CU, where the second prediction is associated with the intra prediction mode; and obtain the final prediction for the current CU based on the first prediction and the second prediction. In some examples, intra prediction mode may include one of following modes: planar intra prediction mode or TIMD derived intra prediction mode.
In some examples, the processor 1620 may obtain a first prediction for the current CU, where the first prediction is associated with the Intra TMP mode; obtain a second prediction for the current CU, where the second prediction is associated with the inter prediction mode; and obtain the final prediction for the current CU based on the first prediction and the second prediction.
In some examples, the inter prediction mode may include an inter merge mode and the processor 1620 may obtain the final prediction for the current CU by equally averaging the first prediction and the second prediction.
In some examples, the processor 1620 may obtain a first prediction for the current CU, where the first prediction is associated with the Intra TMP mode; obtain a second prediction for the current CU, where the second prediction is associated with the intra prediction mode; obtain a third prediction for the current CU, where the third prediction is associated with the inter prediction mode; and obtain the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction. In some examples, the processor 1620 may obtain the final prediction for the current CU by equally averaging the first prediction, the second prediction, and the third prediction.
In some examples, the processor 1620 may obtain a first intermediate prediction based on the first prediction and the second prediction, obtain a second intermediate prediction based on the first prediction and the third prediction, and obtain the final prediction for the current CU by equally averaging the first intermediate prediction and the second intermediate prediction.
In some examples, the processor 1620 may obtain a most probable mode (MPM) list that includes the Intra TMP mode and one or more other intra prediction modes, calculate a plurality of TM costs by comparing the Intra TMP mode and the one or more other intra prediction modes, and select a first TM cost and a second TM cost from the plurality of TM costs, where the first TM cost is a minimum TM cost in the plurality of TM costs and associated with a first mode in the MPM list, and the second TM cost is a second minimum TM cost in the plurality of TM costs and associated with a second mode in the MPM list. Furthermore, the processor 1620 may obtain the final prediction for the current CU by fusing the first mode and the second mode using the TIMD mode.
In some examples, the processor 1620 may obtain an Intra TMP prediction for the current CU, where the Intra TMP prediction is associated with the Intra TMP mode; obtain a regular TIMD prediction for the current CU, where the regular TIMD prediction is associated with the TIMD; and fuse the Intra TMP prediction and the regular TIMD prediction using template-based intra mode derivation (TIMD) mode to obtain the final prediction of the current CU.
In some examples, the processor 1620 may obtain an Intra TMP prediction for the current CU, where the Intra TMP prediction is associated with the Intra TMP mode; obtain a modelled function by modelling local illumination variation between the current CU and the Intra TMP prediction using a function of a local illumination variation between a current CU template and a reference block template, where the function is a linear equation; and obtain a local illumination compensated Intra TMP prediction based on the modelled function.
In some examples, the processor 1620 may obtain the current CU that is coded based on the Intra TMP mode and refine top and left boundary pixels of the current CU that is coded based on the Intra TMP mode using neighboring block's block vector information with a weighted prediction, e.g., using block vector information of a neighboring block with a weighted prediction. For example, assuming current CU and its above CU are both coded with Intra TMP mode but with different block vector, then to refine top boundary pixels of current CU, another prediction result of top boundary pixels of current CU is obtained with the block vector of above CU, then original prediction result and another prediction result are weighted averaged to obtain the final prediction.
In some examples, the processor 1620 may obtain the current CU that is coded based on the Intra TMP mode and refine top and left boundary pixels of the current CU that is coded based on the Intra TMP mode using template matching based methods.
In Step 2901, the processor 1620, at the side of an encoder, may encode a current CU based on a combined mode that combines an Intra TMP mode and at least one of following modes: an intra prediction mode, an inter prediction mode, a TIMD mode, a LIC mode, or an OBMC mode.
In Step 2902, the processor 1620, at the side of the encoder, may transmit the current CU that is coded based on the combined mode to a decoder.
In some examples, the processor 1620 may obtain a first prediction for the current CU, where the first prediction is associated with the Intra TMP mode; obtain a second prediction for the current CU, where the second prediction is associated with the intra prediction mode; and obtain the final prediction for the current CU based on the first prediction and the second prediction. In some examples, intra prediction mode may include one of following modes: planar intra prediction mode or TIMD derived intra prediction mode.
In some examples, the processor 1620 may obtain a first prediction for the current CU, where the first prediction is associated with the Intra TMP mode; obtain a second prediction for the current CU, where the second prediction is associated with the inter prediction mode; and obtain the final prediction for the current CU based on the first prediction and the second prediction.
In some examples, the inter prediction mode may include an inter merge mode and the processor 1620 may obtain the final prediction for the current CU by equally averaging the first prediction and the second prediction.
In some examples, the processor 1620 may obtain a first prediction for the current CU, where the first prediction is associated with the Intra TMP mode; obtain a second prediction for the current CU, where the second prediction is associated with the intra prediction mode; obtain a third prediction for the current CU, where the third prediction is associated with the inter prediction mode; and obtain the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction. In some examples, the processor 1620 may obtain the final prediction for the current CU by equally averaging the first prediction, the second prediction, and the third prediction.
In some examples, the processor 1620 may obtain a first intermediate prediction based on the first prediction and the second prediction, obtain a second intermediate prediction based on the first prediction and the third prediction, and obtain the final prediction for the current CU by equally averaging the first intermediate prediction and the second intermediate prediction.
In some examples, the processor 1620 may obtain a most probable mode (MPM) list that includes the Intra TMP mode and one or more other intra prediction modes, calculate a plurality of TM costs by comparing the Intra TMP mode and the one or more other intra prediction modes, and select a first TM cost and a second TM cost from the plurality of TM costs, where the first TM cost is a minimum TM cost in the plurality of TM costs and associated with a first mode in the MPM list, and the second TM cost is a second minimum TM cost in the plurality of TM costs and associated with a second mode in the MPM list. Furthermore, the processor 1620 may obtain the final prediction for the current CU by fusing the first mode and the second mode using the TIMD mode.
In some examples, the processor 1620 may obtain an Intra TMP prediction for the current CU, where the Intra TMP prediction is associated with the Intra TMP mode; obtain a regular TIMD prediction for the current CU, where the regular TIMD prediction is associated with the TIMD; and fuse the Intra TMP prediction and the regular TIMD prediction using template-based intra mode derivation (TIMD) mode to obtain the final prediction of the current CU.
In some examples, the processor 1620 may obtain an Intra TMP prediction for the current CU, where the Intra TMP prediction is associated with the Intra TMP mode; obtain a modelled function by modelling local illumination variation between the current CU and the Intra TMP prediction using a function of a local illumination variation between a current CU template and a reference block template, where the function is a linear equation; and obtain a local illumination compensated Intra TMP prediction based on the modelled function.
In some examples, the processor 1620 may obtain the current CU that is coded based on the Intra TMP mode and refine top and left boundary pixels of the current CU that is coded based on the Intra TMP mode using neighboring block's block vector information with a weighted prediction, e.g., using block vector information of a neighboring block with a weighted prediction. For example, assuming current CU and its above CU are both coded with Intra TMP mode but with different block vector, then to refine top boundary pixels of current CU, another prediction result of top boundary pixels of current CU is obtained with the block vector of above CU, then original prediction result and another prediction result are weighted averaged to obtain the final prediction.
In some examples, the processor 1620 may obtain the current CU that is coded based on the Intra TMP mode and refine top and left boundary pixels of the current CU that is coded based on the Intra TMP mode using template matching based methods.
In Step 3001, the processor 1620, at the side of a decoder, may obtain a current CU that is coded based on an Intra template matching prediction (TMP) mode combined with a Geometric Partitioning Mode (GPM) mode.
In Step 3002, the processor 1620, at the side of the decoder, may obtain a final prediction for the current CU based on the intra TMP mode combined with the GPM mode.
In some examples, the current CU is partitioned into a first Intra TMP-predicted part and a second Intra TMP-predicted part and the processor 1620 may obtain a first Intra TMP prediction for the first Intra TMP-predicted part, obtain a second Intra TMP prediction for the second Intra TMP-predicted part, and obtain the final prediction for the current CU based on the first Intra TMP-prediction and the second Intra TMP-prediction. In some examples, the processor 1620 may further obtain a reordered GPM split mode utilizing TM based methods, as discussed in the section of Template matching based reordering for GPM split modes.
In some examples, the processor 1620 may obtain the final prediction for the current CU by weighted-averaging the first Intra TMP prediction and the second Intra TMP prediction.
In some examples, the current CU is partitioned into a first Intra TMP-predicted part and a second intra-predicted part. The processor 1620 may further obtain a first Intra TMP prediction for the first Intra TMP-predicted part, obtain a second intra prediction for the second intra-predicted part, and obtain the final prediction for the current CU based on the first Intra TMP-prediction and the second intra prediction.
In some examples, the decoder may obtain the final prediction for the current CU by weighted-averaging the first Intra TMP-prediction and the second intra prediction.
In some examples, the current CU is partitioned into a first Intra TMP-predicted part and a second inter-predicted part. The processor 1620 may further obtain a first Intra TMP prediction for the first Intra TMP-predicted part, obtain a second inter merge prediction for the second inter-predicted part, and obtain the final prediction for the current CU by weighted-averaging the first Intra TMP prediction and the second inter merge prediction. In some examples, the processor 1620 may further obtain a reordered GPM split mode utilizing TM based methods, as discussed in the section of Template matching based reordering for GPM split modes.
In some examples, the current CU is partitioned into a first part and a second part based on a predefined direction. Furthermore, the processor 1620 may obtain a first intra prediction for the first part, obtain a second Intra TMP prediction for the second part, and obtain the final prediction for the current CU by weighted-averaging the first intra prediction and the second Intra TMP prediction.
In some examples, the predefined direction is 45 degrees, the first intra prediction is located in an upper left part of the current CU and the second Intra TMP prediction is located in a bottom right part of the current CU.
In Step 3101, the processor 1620, at the side of an encoder, may encode a current CU based on an Intra TMP mode combined with a GPM mode.
In Step 3102, the processor 1620, at the side of the encoder, may transmit the current CU that is coded based on the intra TMP mode combined with the GPM mode to a decoder.
In some examples, the current CU is partitioned into a first Intra TMP-predicted part and a second Intra TMP-predicted part. Furthermore, the processor 1620 may obtain a first Intra TMP prediction for the first Intra TMP-predicted part, obtain a second Intra TMP prediction for the second Intra TMP-predicted part, and obtain the final prediction for the current CU based on the first Intra TMP-prediction and the second Intra TMP-prediction.
In some examples, the current CU is partitioned into a first Intra TMP-predicted part and a second Intra TMP-predicted part and the processor 1620 may obtain a first Intra TMP prediction for the first Intra TMP-predicted part, obtain a second Intra TMP prediction for the second Intra TMP-predicted part, and obtain the final prediction for the current CU based on the first Intra TMP-prediction and the second Intra TMP-prediction. In some examples, the processor 1620 may further obtain a reordered GPM split mode utilizing TM based methods, as discussed in the section of Template matching based reordering for GPM split modes.
In some examples, the processor 1620 may obtain the final prediction for the current CU by weighted-averaging the first Intra TMP prediction and the second Intra TMP prediction.
In some examples, the current CU is partitioned into a first Intra TMP-predicted part and a second intra-predicted part. The processor 1620 may further obtain a first Intra TMP prediction for the first Intra TMP-predicted part, obtain a second intra prediction for the second intra-predicted part, and obtain the final prediction for the current CU based on the first Intra TMP-prediction and the second intra prediction.
In some examples, the processor 1620 at the encoder side may obtain the final prediction for the current CU by weighted-averaging the first Intra TMP-prediction and the second intra prediction.
In some examples, the current CU is partitioned into a first Intra TMP-predicted part and a second inter-predicted part. The processor 1620 may further obtain a first Intra TMP prediction for the first Intra TMP-predicted part, obtain a second inter merge prediction for the second inter-predicted part, and obtain the final prediction for the current CU by weighted-averaging the first Intra TMP prediction and the second inter merge prediction. In some examples, the processor 1620 may further obtain a reordered GPM split mode utilizing TM based methods, as discussed in the section of Template matching based reordering for GPM split modes.
In some examples, the current CU is partitioned into a first part and a second part based on a predefined direction. Furthermore, the processor 1620 may obtain a first intra prediction for the first part, obtain a second Intra TMP prediction for the second part, and obtain the final prediction for the current CU by weighted-averaging the first intra prediction and the second Intra TMP prediction.
In some examples, the predefined direction is 45 degrees, the first intra prediction is located in an upper left part of the current CU and the second Intra TMP prediction is located in a bottom right part of the current CU.
In Step 3201, the processor 1620, at the side of a decoder, may obtain a current CU coded based on a combined mode that combines an IBC mode and at least one of a TIMD mode or an OBMC mode.
In Step 3202, the processor 1620, at the side of the decoder, may obtain a final prediction for the current CU based on the combined mode.
In some examples, the processor 1620 may obtain a most probable mode (MPM) list that includes the IBC mode and one or more other intra prediction modes, calculate a plurality of template matching TM costs by comparing the IBC mode and the one or more other intra prediction modes, select a first TM cost and a second TM cost from the plurality of TM costs, where the first TM cost is a minimum TM cost in the plurality of TM costs and associated with a first mode in the MPM list, and the second TM cost is a second minimum TM cost in the plurality of TM costs and associated with a second mode in the MPM list, and obtain the final prediction for the current CU by fusing the first mode and the second mode using the TIMD mode.
In some examples, the processor 1620 may obtain an IBC prediction for the current CU, obtain a regular TIMD prediction for the current CU, and fuse the IBC mode and the regular TIMD prediction using the TIMD mode to obtain the final prediction of the current CU, where the IBC prediction is associated with the IBC mode, and the regular TIMD prediction is associated with the TIMD mode.
In some examples, the processor 1620 may obtain the current CU that is coded based on IBC mode and refine top and left boundary pixels of the current CU that is coded based on the IBC mode using neighboring block's block vector information with a weighted prediction, e.g., using block vector information of a neighboring block with a weighted prediction. For example, assuming current CU and its above CU are both coded with IBC mode but with different block vector, then to refine top boundary pixels of current CU, another prediction result of top boundary pixels of current CU is obtained with the block vector of above CU, then original prediction result and another prediction result are weighted averaged to obtain the final prediction.
In some examples, the processor 1620 may obtain the current CU that is coded based on IBC mode and refine top and left boundary pixels of the current CU that is coded based on the IBC mode using template matching based methods.
In Step 3301, the processor 1620, at the side of an encoder, may encode a current CU based on a combined mode that combines an IBC mode and at least one of a TIMD mode or an OBMC mode.
In Step 3302, the processor 1620, at the side of the encoder, may transmit the current CU that is coded based on the combined mode to a decoder.
In some examples, the processor 1620 may obtain a most probable mode (MPM) list that includes the IBC mode and one or more other intra prediction modes, calculate a plurality of template matching TM costs by comparing the IBC mode and the one or more other intra prediction modes, select a first TM cost and a second TM cost from the plurality of TM costs, where the first TM cost is a minimum TM cost in the plurality of TM costs and associated with a first mode in the MPM list, and the second TM cost is a second minimum TM cost in the plurality of TM costs and associated with a second mode in the MPM list, and obtain the final prediction for the current CU by fusing the first mode and the second mode using the TIMD mode.
In some examples, the processor 1620 may obtain an IBC prediction for the current CU, obtain a regular TIMD prediction for the current CU, and fuse the IBC mode and the regular TIMD prediction using the TIMD mode to obtain the final prediction of the current CU, where the IBC prediction is associated with the IBC mode, and the regular TIMD prediction is associated with the TIMD mode.
In some examples, the processor 1620 may obtain the current CU that is coded based on IBC mode and refine top and left boundary pixels of the current CU that is coded based on the IBC mode using neighboring block's block vector information with a weighted prediction, e.g., using block vector information of a neighboring block with a weighted prediction. For example, assuming current CU and its above CU are both coded with IBC mode but with different block vector, then to refine top boundary pixels of current CU, another prediction result of top boundary pixels of current CU is obtained with the block vector of above CU, then original prediction result and another prediction result are weighted averaged to obtain the final prediction.
In some examples, the processor 1620 may obtain the current CU that is coded based on IBC mode and refine top and left boundary pixels of the current CU that is coded based on the IBC mode using template matching based methods.
In Step 3501, the processor 1620, at the side of a decoder, may obtain a first weight of a first prediction for a current coding unit (CU), where the first prediction is associated with intra block copy (IBC) mode.
In Step 3502, the processor 1620 may obtain a second weight of a second prediction for the CU, where the second prediction is associated with intra mode.
In Step 3503, the processor 1620 may obtain a final prediction for the current CU based on the first weight, the first prediction, the second weight, and the second prediction.
In some examples, in Steps 3501 and 3502, the processor 1620 may compute the first weight and the second weight based on modes associated with neighboring CUs or the intra mode associated with the second prediction for the current CU.
In some examples, the processor 1620 may set the first weight to be a first real number greater than 0 and smaller than 1 in the current CU in Step 3501, and set the second weight to be a second real number smaller than 1 and greater than 0 in the current CU in Step 3502. In some examples, the processor 1620 may gradually change the first weight from 0 in a first area of the current CU to 1 in a second area of the current CU in Step 3501, and gradually change the second weight from 1 in a first area of the current CU to 0 in a second area of the current CU in Step 3502. In some examples, in Steps 3501 and 3502, the processor 1620 may set the first weight and the second weight to a same value in all areas of the current CU, or set the first weight and the second weight to different values in different areas of the current CU.
In some examples, the processor 1620 may perform one of following acts:
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, vertically divide the current CU into four equal subunits, and then perform following acts:
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with near vertical angular mode, horizontally divide the current CU into four equal subunits, and then perform following acts:
In some examples, the processor 1620 may set the second prediction for the current CU to be associated with planar intra mode. Furthermore, in Steps 3501 and 3502, the processor 1620 may gradually increase the first weight from a top-left area of the current CU to a bottom-right area of the current CU in Step 3501, and gradually decrease the second weight from a top-left area of the current CU to a bottom-right area of the current CU in Step 3502.
In some examples, the processor 1620 may determine, before obtaining the final prediction in Step 3503, that the second prediction is associated with planar intra mode, and that both an upper neighboring CU of the current CU and a left neighboring CU of the current CU are associated with IBC mode.
In the above examples, the processor 1620 performs Steps 3501 and 3502 by determining the first weight and the second weight in a manner similar to combined intra/inter prediction (CIIP) technology in Versatile Video Coding (VVC), where a prediction signal is obtained by combining an inter prediction signal with an intra prediction signal.
In some examples, in Step 3501 the processor 1620 may set the first weight to be 1 in a subarea of the current CU and 0 in remaining area of the current CU, where remaining area is an area of the current CU other than the subarea; and in Step 3502 the processor 1620 may set the second weight to be 0 in the subarea and 1 in the remaining area.
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, vertically divide the current CU into four equal subunits, and then perform one of following acts:
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with near vertical angular mode, horizontally divide the current CU into four equal subunits, and then perform one of following acts:
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with planar intra mode, horizontally and vertically divide the current CU into four equal subunits, and then perform one of following acts:
In some examples, the processor 1620 may determine, before obtaining the final prediction in Step 3503, that the second prediction is associated with planar intra mode, and that at least one of an upper neighboring CU of the current CU or a left neighboring CU of the current CU is associated with intra mode.
In the above examples, the processor 1620 performs Steps 3501 and 3502 by determining the first weight and the second weight in a mask version, i.e., the processor 1620 may set the first weight and the second weight to be one or zero for different areas of current block/CU.
In Step 3601, the processor 1620, at the side of an encoder, may obtain a first weight of a first prediction for a current coding unit (CU), where the first prediction is associated with intra block copy (IBC) mode.
In Step 3602, the processor 1620 may obtain a second weight of a second prediction for the CU, where the second prediction is associated with intra mode.
In Step 3603, the processor 1620 may obtain a final prediction for the current CU based on the first weight, the first prediction, the second weight, and the second prediction.
In some examples, in Steps 3601 and 3602, the processor 1620 may compute the first weight and the second weight based on modes associated with neighboring CUs or the intra mode associated with the second prediction for the current CU.
In some examples, the processor 1620 may set the first weight to be a first real number greater than 0 and smaller than 1 in the current CU in Step 3601, and set the second weight to be a second real number smaller than 1 and greater than 0 in the current CU in Step 3602. In some examples, the processor 1620 may gradually change the first weight from 0 in a first area of the current CU to 1 in a second area of the current CU in Step 3601, and gradually change the second weight from 1 in a first area of the current CU to 0 in a second area of the current CU in Step 3602. In some examples, in Steps 3601 and 3602, the processor 1620 may set the first weight and the second weight to same values in all areas of the current CU, or set the first weight and the second weight to different values in different areas of the current CU.
In some examples, the processor 1620 may perform one of following acts:
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, vertically divide the current CU into four equal subunits, and then perform following acts:
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with near vertical angular mode, horizontally divide the current CU into four equal subunits, and then perform following acts:
In some examples, the processor 1620 may set the second prediction for the current CU to be associated with planar intra mode. Furthermore, in Steps 3601 and 3602, the processor 1620 may gradually increase the first weight from a top-left area of the current CU to a bottom-right area of the current CU in Step 3601, and gradually decrease the second weight from a top-left area of the current CU to a bottom-right area of the current CU in Step 3602.
In some examples, the processor 1620 may determine, before obtaining the final prediction in Step 3603, that the second prediction is associated with planar intra mode, and that both an upper neighboring CU of the current CU and a left neighboring CU of the current CU are associated with IBC mode.
In the above examples, the processor 1620 performs Steps 3601 and 3602 by determining the first weight and the second weight in a manner similar to combined intra/inter prediction (CIIP) technology in Versatile Video Coding (VVC), where a prediction signal is obtained by combining an inter prediction signal with an intra prediction signal.
In some examples, in Step 3601 the processor 1620 may set the first weight to be 1 in a subarea of the current CU and 0 in remaining area of the current CU, where remaining area is an area of the current CU other than the subarea; and in Step 3602 the processor 1620 may set the second weight to be 0 in the subarea and 1 in the remaining area.
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, vertically divide the current CU into four equal subunits, and then perform one of following acts:
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with near vertical angular mode, horizontally divide the current CU into four equal subunits, and then perform one of following acts:
In some examples, the processor 1620 may, in response to determining that the second prediction for the current CU is associated with planar intra mode, horizontally and vertically divide the current CU into four equal subunits, and then perform one of following acts:
In some examples, the processor 1620 may determine, before obtaining the final prediction in Step 3603, that the second prediction is associated with planar intra mode, and that at least one of an upper neighboring CU of the current CU or a left neighboring CU of the current CU is associated with intra mode.
In the examples, the processor 1620 performs Steps 3601 and 3602 by determining the first weight and the second weight in a mask version, i.e., the processor 1620 may set the first weight and the second weight to be one or zero for different areas of current block/CU.
In Step 3901, the processor 1620, at the side of a decoder, may obtain a first block and a second block, where the first block is coded based on one of an intra block copy (IBC) mode or an intra template matching prediction (TMP) mode, and where the second block is coded based on an intra mode.
In Step 3902, the processor 1620 may obtain, based on template matching, a first weight corresponding to the first block and a second weight corresponding to the second block.
In Step 3903, the processor 1620 may obtain a final prediction for a current block based on the first block, the first weight, the second block, and the second weight.
In some examples, the processor 1620 may further obtain, at the side of the decoder, one or more current block templates. Additionally, the processor 1620 may obtain prediction samples and reconstruction samples of the one or more current block templates. Furthermore, the processor 1620 may compute one of following differences between the prediction samples and the reconstruction samples: sum of absolute difference (SAD), sum of square difference (SSD), or sum of absolute transformed difference (SATD). The SATD is a block matching criterion widely used in, for example, fractional motion estimation for video compression. Moreover, the processor 1620 may obtain the first weight and the second weight based on the one of the differences.
In some examples, to compute, at the side of the decoder, the one of the differences between the prediction samples and the reconstruction samples, the processor 1620 may compute, at the side of the decoder, a first SATD between first prediction samples and first reconstruction samples of a first current block template, where the first current block template corresponds to the first block coded based on the one of the IBC mode or the intra IMP mode; additionally, the processor 1620 may compute a second SATD between second prediction samples and second reconstruction samples of a second current block template, where the second current block template corresponds to the second block coded based on the intra mode. To obtain the first weight and the second weight based on the one of the differences, the processor may, at the side of the decoder, obtain the first weight and the second weight based on the first SATD and the second SATD.
In some examples, to obtain the first weight and the second weight based on the first SATD and the second SATD, the processor 1620 may, at the side of the decoder, obtain a sum of the first SATD and the second SATD, set the first weight to be the second SATD divided by the sum, and set the second weight to be the first SATD divided by the sum.
In some examples, the first prediction samples are predicted using first reference samples pointed by a block vector of the first block, and the second prediction samples are intra-predicted using second reference samples with the intra mode of the current block, the first reference samples correspond to the first current block template, and the second reference samples correspond to the second current block template.
In some examples, to obtain, at the side of the decoder, the one or more current block templates, the processor 1620 may select, using a received index or a predefined criterion, at least one of a left template or a top template as the one or more current block templates.
In some examples, to select, using the predefined criterion, the at least one of the left template or the top template as the one or more current block templates, the processor 1620 may, at the side of the decoder, perform one of following acts: in response to determining that an intra mode of the current block is a planar mode or a direct current (DC) mode, selecting both the left template and the top template as the one or more current block templates; in response to determining that the intra mode of the current block is a near horizontal angular mode, selecting the left template as the one or more current block templates; or in response to determining that the intra mode of the current block is a near vertical angular mode, selecting the top template as the one or more current block templates.
In Step 4001, the processor 1620, at the side of an encoder, may obtain a first block and a second block, where the first block is coded based on one of an intra block copy (IBC) mode or an intra template matching prediction (TMP) mode, and where the second block is coded based on an intra mode.
In Step 4002, the processor 1620 may obtain, based on template matching, a first weight corresponding to the first block and a second weight corresponding to the second block.
In Step 4003, the processor 1620 may obtain a final prediction for a current block based on the first block, the first weight, the second block, and the second weight.
In Step 4004, the processor 1620 may generate a bitstream based on the final prediction.
In some examples, the processor 1620 may further obtain, at the side of the encoder, one or more current block templates. Additionally, the processor 1620 may obtain prediction samples and reconstruction samples of the one or more current block templates. Furthermore, the processor 1620 may compute one of following differences between the prediction samples and the reconstruction samples: sum of absolute difference (SAD), sum of square difference (SSD), or sum of absolute transformed difference (SATD). The SATD is a block matching criterion widely used in, for example, fractional motion estimation for video compression. Moreover, the processor 1620 may obtain the first weight and the second weight based on the one of the differences.
In some examples, to compute, at the side of the encoder, the one of the differences between the prediction samples and the reconstruction samples, the processor 1620 may compute, at the side of the encoder, a first SATD between first prediction samples and first reconstruction samples of a first current block template, where the first current block template corresponds to the first block coded based on the one of the IBC mode or the intra IMP mode; additionally, the processor 1620 may compute a second SATD between second prediction samples and second reconstruction samples of a second current block template, where the second current block template corresponds to the second block coded based on the intra mode. To obtain the first weight and the second weight based on the one of the differences, the processor may, at the side of the encoder, obtain the first weight and the second weight based on the first SATD and the second SATD.
In some examples, to obtain the first weight and the second weight based on the first SATD and the second SATD, the processor 1620 may, at the side of the encoder, obtain a sum of the first SATD and the second SATD, set the first weight to be the second SATD divided by the sum, and set the second weight to be the first SATD divided by the sum.
In some examples, the first prediction samples are predicted using first reference samples pointed by a block vector of the first block, and the second prediction samples are intra-predicted using second reference samples with the intra mode of the current block, the first reference samples correspond to the first current block template, and the second reference samples correspond to the second current block template.
In some examples, to obtain, at the side of the encoder, the one or more current block templates, the processor 1620 may select, using a signaling index decided with a rate distortion optimization (RDO) process or a predefined criterion, at least one of a left template or a top template as the one or more current block templates. The RDO technique generally minimizes the amount of distortion (loss of video quality) against the amount of data required to encode the video.
In some examples, to select, using the predefined criterion, the at least one of the left template or the top template as the one or more current block templates, the processor 1620 may, at the side of the encoder, perform one of following acts: in response to determining that an intra mode of the current block is a planar mode or a direct current (DC) mode, selecting both the left template and the top template as the one or more current block templates; in response to determining that the intra mode of the current block is a near horizontal angular mode, selecting the left template as the one or more current block templates; or in response to determining that the intra mode of the current block is a near vertical angular mode, selecting the top template as the one or more current block templates.
In some examples, there is provided an apparatus for video coding. The apparatus includes a processor 1620 and a memory 1630 configured to store instructions executable by the processor; where the processor, upon execution of the instructions, is configured to perform any method as illustrated in
In an embodiment, there is also provided a non-transitory computer-readable storage medium comprising a plurality of programs, for example, in the memory 1630, executable by the processor 1620 in the computing environment 1610, for performing the above-described methods and/or storing a bitstream generated by the encoding method described above or a bitstream to be decoded by the decoding method described above. In one example, the plurality of programs may be executed by the processor 1620 in the computing environment 1610 to receive (for example, from the video encoder 20 in
In an embodiment, there is provided a bitstream generated by the encoding method described above or a bitstream to be decoded by the decoding method described above. In an embodiment, there is provided a bitstream comprising encoded video information generated by the encoding method described above or encoded video information to be decoded by the decoding method described above.
In an embodiment, the is also provided a computing device comprising one or more processors (for example, the processor 1620); and the non-transitory computer-readable storage medium or the memory 1630 having stored therein a plurality of programs executable by the one or more processors, where the one or more processors, upon execution of the plurality of programs, are configured to perform the above-described methods.
In an embodiment, there is also provided a computer program product having instructions for storage or transmission of a bitstream comprising encoded video information generated by the encoding method described above or encoded video information to be decoded by the decoding method described above. In an embodiment, there is also provided a computer program product comprising a plurality of programs, for example, in the memory 1630, executable by the processor 1620 in the computing environment 1610, for performing the above-described methods. For example, the computer program product may include the non-transitory computer-readable storage medium.
In an embodiment, the computing environment 1610 may be implemented with one or more ASICs, DSPs, Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), FPGAs, GPUs, controllers, micro-controllers, microprocessors, or other electronic components, for performing the above methods.
In an embodiment, there is also provided a method of storing a bitstream, comprising storing the bitstream on a digital storage medium, where the bitstream includes encoded video information generated by the encoding method described above or encoded video information to be decoded by the decoding method described above.
In an embodiment, there is also provided a method for transmitting a bitstream generated by the encoder described above. In an embodiment, there is also provided a method for receiving a bitstream to be decoded by the decoder described above.
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 implementations will be apparent to those of ordinary skill in the art having the benefit of the teachings presented in the foregoing descriptions and the associated drawings.
Unless specifically stated otherwise, an order of steps of the method according to the present disclosure is only intended to be illustrative, 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 practical conditions. In addition, at least one of the steps of the method according to the present disclosure may be adjusted, combined or deleted according to practical requirements.
The examples were chosen and described in order to explain the principles of the disclosure and to enable others skilled in the art to understand the disclosure for various implementations and to best utilize the underlying principles and various implementations with various modifications as are suited to the particular use contemplated. Therefore, it is to be understood that the scope of the disclosure is not to be limited to the specific examples of the implementations disclosed and that modifications and other implementations are intended to be included within the scope of the present disclosure.
In some aspects, there is provided a method for video decoding, comprising: obtaining, by a decoder, a current coding unit (CU) that is coded based on Intra Block Copy (IBC) mode combined with Geometric Partitioning Mode (GPM); and obtaining, by the decoder, a prediction for the current CU based on the IBC mode combined with GPM.
In some aspects, the current CU is partitioned into a first IBC-predicted part and a second IBC-predicted part, and the obtaining, by the decoder, the prediction for the current CU based on the IBC mode combined with GPM comprises: obtaining, by the decoder, a first IBC merge prediction for the first IBC-predicted part; obtaining, by the decoder, a second IBC merge prediction for the second IBC-predicted part; and obtaining, by the decoder, the prediction for the current CU based on the first IBC merge prediction and the second IBC merge prediction.
In some aspects, the obtaining, by the decoder, the prediction for the current CU based on the first IBC merge prediction and the second IBC merge prediction comprises: obtaining, by the decoder, the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second IBC merge prediction.
In some aspects, the current CU is partitioned into a first IBC-predicted part and a second IBC-predicted part, and the obtaining, by the decoder, the prediction for the current CU based on the IBC mode combined with GPM comprises: obtaining, by the decoder, a first IBC-Template Matching (TM) prediction for the first IBC-predicted part; obtaining, by the decoder, a second IBC-TM prediction for the second IBC-predicted part; and obtaining, by the decoder, the prediction for the current CU based on the first IBC-TM prediction and the second IBC-TM prediction.
In some aspects, the current CU is partitioned into a first IBC-predicted part and a second intra-predicted part, and the obtaining, by the decoder, the prediction for the current CU based on the IBC mode combined with GPM comprises: obtaining, by the decoder, a first IBC merge prediction for the first IBC-predicted part; obtaining, by the decoder, a second intra prediction for the second intra-predicted part; and obtaining, by the decoder, the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second intra prediction.
In some aspects, the current CU is partitioned into a first IBC-predicted part and a second inter-predicted part, and the obtaining, by the decoder, the prediction for the current CU based on the IBC mode combined with GPM comprises: obtaining, by the decoder, a first IBC merge prediction for the first IBC-predicted part; obtaining, by the decoder, a second inter prediction for the second inter-predicted part; and obtaining, by the decoder, the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second inter prediction.
In some aspects, the current CU is partitioned into a first IBC-predicted part and a second inter-predicted part, and the obtaining, by the decoder, the prediction for the current CU based on the IBC mode combined with GPM comprises: obtaining, by the decoder, a first IBC-Template Matching (TM) prediction for the first IBC-predicted part; obtaining, by the decoder, a second inter prediction for the second inter-predicted part; and obtaining, by the decoder, the prediction for the current CU based on the first IBC TM prediction and the second inter prediction.
In some aspects, the current CU is partitioned into a first part and a second part based on a predefined direction, the obtaining, by the decoder, the prediction for the current CU based on the IBC mode combined with GPM comprises: obtaining, by the decoder, a first IBC prediction for the first part; obtaining, by the decoder, a second intra prediction for the second part; and obtaining, by the decoder, the prediction for the current CU by averaging the first IBC prediction and the second intra prediction.
In some aspects, the predefined direction is 45 degrees, the first IBC prediction is located in a bottom-right part and the second intra prediction is located in a upper-left part of the current CU.
In some aspects, there is provided a method for video encoding, comprising: encoding, by an encoder, a current coding unit (CU) based on Intra Block Copy (IBC) mode combined with Geometric Partitioning Mode (GPM); and transmitting, by the encoder, the current CU that is coded based on the IBC mode combined with GPM to a decoder.
In some aspects, the current CU is partitioned into a first IBC-predicted part and a second IBC-predicted part, and the method further comprises: obtaining, by the encoder, a first IBC merge prediction for the first IBC-predicted part; obtaining, by the encoder, a second IBC merge prediction for the second IBC-predicted part; and obtaining, by the encoder, the prediction for the current CU based on the first IBC merge prediction and the second IBC merge prediction.
In some aspects, the obtaining, by the encoder, the prediction for the current CU based on the first IBC merge prediction and the second IBC merge prediction comprises: obtaining, by the encoder, the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second IBC merge prediction.
In some aspects, the current CU is partitioned into a first IBC-predicted part and a second IBC-predicted part, and the method further comprises: obtaining, by the encoder, a first IBC-Template Matching (TM) prediction for the first IBC-predicted part; obtaining, by the encoder, a second IBC-TM prediction for the second IBC-predicted part; and obtaining, by the encoder, the prediction for the current CU based on the first IBC-TM prediction and the second IBC-TM prediction.
In some aspects, wherein the current CU is partitioned into a first IBC-predicted part and a second intra-predicted part, and the method further comprises: obtaining, by the encoder, a first IBC merge prediction for the first IBC-predicted part; obtaining, by the encoder, a second intra prediction for the second intra-predicted part; and obtaining, by the encoder, the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second intra prediction.
In some aspects, the current CU is partitioned into a first IBC-predicted part and a second inter-predicted part, and the method further comprises: obtaining, by the encoder, a first IBC merge prediction for the first IBC-predicted part; obtaining, by the encoder, a second inter prediction for the second inter-predicted part; and obtaining, by the encoder, the prediction for the current CU by weighted-averaging the first IBC merge prediction and the second inter prediction.
In some aspects, the current CU is partitioned into a first IBC-predicted part and a second inter-predicted part, and the method further comprises: obtaining, by the encoder, a first IBC-Template Matching (TM) prediction for the first IBC-predicted part; obtaining, by the encoder, a second inter prediction for the second inter-predicted part; and obtaining, by the encoder, the prediction for the current CU based on the first IBC TM prediction and the second inter prediction.
In some aspects, the current CU is partitioned into a first part and a second part based on a predefined direction, the method further comprises: obtaining, by the encoder, a first IBC prediction for the first part; obtaining, by the encoder, a second intra prediction for the second part; and obtaining, by the encoder, the prediction for the current CU by weighted-averaging the first IBC prediction and the second intra prediction.
In some aspects, the predefined direction is 45 degrees, the first IBC prediction is located in a bottom-right part and the second intra prediction is located in a upper-left part of the current CU.
In some aspects, there is provided a method for video decoding, comprising: obtaining, by a decoder, a first prediction for a current coding unit (CU), wherein the first prediction is associated with intra block copy (IBC) mode; obtaining, by the decoder, a second prediction for the current CU, wherein the second prediction is associated with one of intra mode or inter mode; and obtaining, by the decoder, a final prediction for the current CU based on the first prediction and the second prediction.
In some aspects, the first prediction is associated with IBC merge mode, and the obtaining, by the decoder, the second prediction for the current CU comprises: obtaining, by the decoder, the second prediction based on planar intra prediction mode.
In some aspects, the obtaining, by the decoder, the first prediction for the current CU comprises: obtaining, by the decoder, the first prediction based on IBC merge-Template Matching (TM) mode; and the obtaining, by the decoder, the second prediction for the current CU comprises: obtaining, by the decoder, the second prediction based on Template-based intra mode derivation (TIMD) derived intra prediction mode.
In some aspects, the first prediction is associated with IBC merge mode, and the obtaining, by the decoder, the second prediction for the current CU comprises: obtaining, by the decoder, the second prediction based on inter merge mode.
In some aspects, the obtaining, by the decoder, the final prediction for the current CU based on the first prediction and the second prediction comprises: obtaining, by the decoder, the final prediction for the current CU by equally averaging the first prediction and the second prediction.
In some aspects, the method further comprises: obtaining, by the decoder, a third prediction for the current CU, wherein the third prediction is associated with the other of intra mode or inter mode; and the obtaining, by the decoder, the final prediction for the current CU based on the first prediction and the second prediction comprises: obtaining, by the decoder, the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction.
In some aspects, the obtaining, by the decoder, the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction comprises: obtaining, by the decoder, the final prediction for the current CU by equally averaging the first prediction, the second prediction, and the third prediction.
In some aspects, the obtaining, by the decoder, the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction comprises: obtaining, by the decoder, a first intermediate prediction based on the first prediction and the second prediction; obtaining, by the decoder, a second intermediate prediction based on the first prediction and the third prediction; and obtaining, by the decoder, the final prediction for the current CU by equally averaging the first intermediate prediction and the second intermediate prediction.
In some aspects, there is provided a method for video encoding, comprising: obtaining, by an encoder, a first prediction for a current coding unit (CU), wherein the first prediction is associated with intra block copy (IBC) mode; obtaining, by the encoder, a second prediction for the current CU, wherein the second prediction is associated with one of intra mode or inter mode; and obtaining, by the encoder, a final prediction for the current CU based on the first prediction and the second prediction.
In some aspects, the first prediction is associated with IBC merge mode, and the obtaining, by the encoder, the second prediction for the current CU comprises: obtaining, by the encoder, the second prediction based on planar intra prediction mode.
In some aspects, the obtaining, by the encoder, the first prediction for the current CU comprises: obtaining, by the encoder, the first prediction based on IBC merge-Template Matching (TM) mode; and the obtaining, by the encoder, the second prediction for the current CU comprises: obtaining, by the encoder, the second prediction based on Template-based intra mode derivation (TIMD) derived intra prediction mode.
In some aspects, the first prediction is associated with IBC merge mode, and
In some aspects, the obtaining, by the encoder, the final prediction for the current CU based on the first prediction and the second prediction comprises: obtaining, by the encoder, the final prediction for the current CU by equally averaging the first prediction and the second prediction.
In some aspects, the method further comprises: obtaining, by the encoder, a third prediction for the current CU, wherein the third prediction is associated with the other of intra mode or inter mode; and the obtaining, by the encoder, the final prediction for the current CU based on the first prediction and the second prediction comprises: obtaining, by the encoder, the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction.
In some aspects, the obtaining, by the encoder, the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction comprises: obtaining, by the encoder, the final prediction for the current CU by equally averaging the first prediction, the second prediction, and the third prediction.
In some aspects, the obtaining, by the encoder, the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction comprises: obtaining, by the encoder, a first intermediate prediction based on the first prediction and the second prediction; obtaining, by the encoder, a second intermediate prediction based on the first prediction and the third prediction; and obtaining, by the encoder, the final prediction for the current CU by equally averaging the first intermediate prediction and the second intermediate prediction.
In some aspects, there is provided a method for video decoding, comprising: obtaining, by a decoder, a plurality of block vectors for a current coding unit (CU) based on intra block copy (IBC) mode; and obtaining, by the decoder, a final prediction for the current CU based on the plurality of block vectors.
In some aspects, the plurality of block vectors comprise a first block vector and a second block vector, and the obtaining, by the decoder, the plurality of block vectors for the current CU based on the IBC mode comprises: obtaining, by the decoder, the first block vector based on a smallest rate distortion metric in IBC Advanced Motion Vector Prediction (AMVP) mode; obtaining, by the decoder, the second block vector based on a second smallest rate distortion metric in the IBC AMVP mode; and the obtaining, by the decoder, the final prediction for the current CU based on the plurality of block vectors comprises: obtaining, by the decoder, the final prediction for the current CU by equally averaging a prediction result of the first block vector and a prediction result of the second block vector.
In some aspects, the plurality of block vectors comprise a first block vector and a second block vector, and the obtaining, by the decoder, the plurality of block vectors for the current CU based on IBC mode comprises: obtaining, by the decoder, the first block vector based on a smallest rate distortion metric in IBC Advanced Motion Vector Prediction (AMVP) mode; obtaining, by the decoder, the second block vector based on a smallest rate distortion metric in IBC merge mode; and the obtaining, by the decoder, the final prediction for the current CU based on the plurality of block vectors comprises: obtaining, by the decoder, the final prediction for the current CU by equally averaging a prediction result of the first block vector and a prediction result of the second block vector.
In some aspects, the obtaining, by the decoder, the plurality of block vectors for the current CU based on IBC mode comprises: obtaining, by the decoder, the plurality of block vectors based on distortion metrics in IBC Advanced Motion Vector Prediction (AMVP) mode; and the obtaining, by the decoder, the final prediction for the current CU based on the plurality of block vectors comprises: obtaining, by the decoder, the final prediction for the current CU by equally averaging prediction results corresponding to the plurality of block vectors.
In some aspects, the obtaining, by the decoder, the final prediction for the current CU based on the plurality of block vectors comprises: obtaining, by the decoder, the final prediction for the current CU based on the plurality of block vectors using iterative accumulation in multi-hypothesis prediction (MHP).
In some aspects, there is provided a method for video encoding, comprising: obtaining, by an encoder, a plurality of block vectors for a current coding unit (CU) based on intra block copy (IBC) mode; and obtaining, by the encoder, a final prediction for the current CU based on the plurality of block vectors.
In some aspects, the plurality of block vectors comprise a first block vector and a second block vector, and the obtaining, by the encoder, the plurality of block vectors for the current CU based on the IBC mode comprises: obtaining, by the encoder, the first block vector based on a smallest rate distortion metric in IBC Advanced Motion Vector Prediction (AMVP) mode; obtaining, by the encoder, the second block vector based on a second smallest rate distortion metric in the IBC AMVP mode; and the obtaining, by the encoder, the final prediction for the current CU based on the plurality of block vectors comprises: obtaining, by the encoder, the final prediction for the current CU by equally averaging a prediction result of the first block vector and a prediction result of the second block vector.
In some aspects, the plurality of block vectors comprise a first block vector and a second block vector, and the obtaining, by the encoder, the plurality of block vectors for the current CU based on IBC mode comprises: obtaining, by the encoder, the first block vector based on a smallest rate distortion metric in IBC Advanced Motion Vector Prediction (AMVP) mode; obtaining, by the encoder, the second block vector based on a smallest rate distortion metric in IBC merge mode; and the obtaining, by the encoder, the final prediction for the current CU based on the plurality of block vectors comprises: obtaining, by the encoder, the final prediction for the current CU by equally averaging a prediction result of the first block vector and a prediction result of the second block vector.
In some aspects, the obtaining, by the encoder, the plurality of block vectors for the current CU based on IBC mode comprises: obtaining, by the encoder, the plurality of block vectors based on distortion metrics in IBC Advanced Motion Vector Prediction (AMVP) mode; and the obtaining, by the encoder, the final prediction for the current CU based on the plurality of block vectors comprises: obtaining, by the encoder, the final prediction for the current CU by equally averaging prediction results corresponding to the plurality of block vectors.
In some aspects, the obtaining, by the encoder, the final prediction for the current CU based on the plurality of block vectors comprises: obtaining, by the encoder, the final prediction for the current CU based on the plurality of block vectors using iterative accumulation in multi-hypothesis prediction (MHP).
In some aspects, there is provided a method for video decoding, comprising: obtaining, by a decoder, a current coding unit (CU) coded based on a combined mode that combines an Intra template matching prediction (TMP) mode and at least one of following modes: an intra prediction mode, an inter prediction mode, a template-based intra mode derivation (TIMD) mode, a local illumination compensation (LIC) mode, or an Overlapped Block Motion Compensation (OBMC) mode; and obtaining, by the decoder, a final prediction for the current CU based on the combined mode.
In some aspects, the method further comprises: obtaining, by the decoder, a first prediction for the current CU, wherein the first prediction is associated with the Intra TMP mode; obtaining, by the decoder, a second prediction for the current CU, wherein the second prediction is associated with the intra prediction mode; and obtaining, by the decoder, the final prediction for the current CU based on the first prediction and the second prediction.
In some aspects, the intra prediction mode comprises one of following modes: planar intra prediction mode or TIMD derived intra prediction mode.
In some aspects, the method further comprises: obtaining, by the decoder, a first prediction for the current CU, wherein the first prediction is associated with the Intra TMP mode; obtaining, by the decoder, a second prediction for the current CU, wherein the second prediction is associated with the inter prediction mode; and obtaining, by the decoder, the final prediction for the current CU based on the first prediction and the second prediction.
In some aspects, the inter prediction mode comprises an inter merge mode, and the method further comprises: obtaining, by the decoder, the final prediction for the current CU by equally averaging the first prediction and the second prediction.
In some aspects, the method further comprises: obtaining, by the decoder, a first prediction for the current CU, wherein the first prediction is associated with the Intra TMP mode; obtaining, by the decoder, a second prediction for the current CU, wherein the second prediction is associated with the intra prediction mode; obtaining, by the decoder, a third prediction for the current CU, wherein the third prediction is associated with the inter prediction mode; and obtaining, by the decoder, the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction.
In some aspects, the method further comprises: obtaining, by the decoder, the final prediction for the current CU by equally averaging the first prediction, the second prediction, and the third prediction.
In some aspects, the method further comprises: obtaining, by the decoder, a first intermediate prediction based on the first prediction and the second prediction; obtaining, by the decoder, a second intermediate prediction based on the first prediction and the third prediction; and obtaining, by the decoder, the final prediction for the current CU by equally averaging the first intermediate prediction and the second intermediate prediction.
In some aspects, the method further comprises: obtaining, by the decoder, a most probable mode (MPM) list that includes the Intra TMP mode and one or more other intra prediction modes; calculating, by the decoder, a plurality of template matching TM costs by comparing the Intra TMP mode and the one or more other intra prediction modes; selecting, by the decoder, a first TM cost and a second TM cost from the plurality of TM costs, wherein the first TM cost is a minimum TM cost in the plurality of TM costs and associated with a first mode in the MPM list, and the second TM cost is a second minimum TM cost in the plurality of TM costs and associated with a second mode in the MPM list; and obtaining, by the decoder, the final prediction for the current CU by fusing the first mode and the second mode using the TIMD mode.
In some aspects, the method further comprises: obtaining, by the decoder, an Intra TMP prediction for the current CU, wherein the Intra TMP prediction is associated with the Intra TMP mode; obtaining, by the decoder, a regular TIMD prediction for the current CU, wherein the regular TIMD prediction is associated with the TIMD mode; and fusing, by the decoder, the Intra TMP prediction and the regular TIMD prediction using template-based intra mode derivation (TIMD) mode to obtain the final prediction of the current CU.
In some aspects, the method further comprises: obtaining, by the decoder, an Intra TMP prediction for the current CU, wherein the Intra TMP prediction is associated with the Intra TMP mode; and obtaining, by the decoder, a modelled function by modelling local illumination variation between the current CU and the Intra TMP prediction using a function of a local illumination variation between a current CU template and a reference block template, wherein the function is a linear equation; and obtaining, by the decoder, a local illumination compensated Intra TMP prediction based on the modelled function.
In some aspects, the method further comprises: obtaining, by the decoder, the current CU that is coded based on the Intra TMP mode; and refining, by the decoder, top and left boundary pixels of the current CU that is coded based on the Intra TMP mode using block vector information of a neighboring block with a weighted prediction.
In some aspects, the method further comprises: obtaining, by the decoder, the current CU that is coded based on the Intra TMP mode; and refining, by the decoder, top and left boundary pixels of the current CU that is coded based on the Intra TMP mode using template matching based methods.
In some aspects, there is provided a method for video encoding, comprising: encoding, by an encoder, a current coding unit (CU) based on a combined mode that combines an Intra template matching prediction (TMP) mode and at least one of following modes: an intra prediction mode, an inter prediction mode, a template-based intra mode derivation (TIMD) mode, a local illumination compensation (LIC) mode, or an Overlapped Block Motion Compensation (OBMC) mode; and transmitting, by the encoder, the current CU that is coded based on the combined mode to a decoder.
In some aspects, the method further comprises: obtaining, by the encoder, a first prediction for the current CU, wherein the first prediction is associated with the Intra TMP mode; obtaining, by the encoder, a second prediction for the current CU, wherein the second prediction is associated with the intra prediction mode; and obtaining, by the encoder, the final prediction for the current CU based on the first prediction and the second prediction.
In some aspects, the intra prediction mode comprises one of following modes: planar intra prediction mode or TIMD derived intra prediction mode.
In some aspects, the method further comprises: obtaining, by the encoder, a first prediction for the current CU, wherein the first prediction is associated with the Intra TMP mode;
obtaining, by the encoder, a second prediction for the current CU, wherein the second prediction is associated with the inter prediction mode; and obtaining, by the encoder, the final prediction for the current CU based on the first prediction and the second prediction.
In some aspects, the inter prediction mode comprises an inter merge mode, and the method further comprises: obtaining, by the encoder, the final prediction for the current CU by equally averaging the first prediction and the second prediction.
In some aspects, the method further comprises: obtaining, by the encoder, a first prediction for the current CU, wherein the first prediction is associated with the Intra TMP mode;
obtaining, by the encoder, a second prediction for the current CU, wherein the second prediction is associated with the intra prediction mode; obtaining, by the encoder, a third prediction for the current CU, wherein the third prediction is associated with the inter prediction mode; and obtaining, by the encoder, the final prediction for the current CU based on the first prediction, the second prediction, and the third prediction.
In some aspects, the method further comprises: obtaining, by the encoder, the final prediction for the current CU by equally averaging the first prediction, the second prediction, and the third prediction.
In some aspects, the method further comprises: obtaining, by the encoder, a first intermediate prediction based on the first prediction and the second prediction; obtaining, by the encoder, a second intermediate prediction based on the first prediction and the third prediction; and obtaining, by the encoder, the final prediction for the current CU by equally averaging the first intermediate prediction and the second intermediate prediction.
In some aspects, the method further comprises: obtaining, by the encoder, a most probable mode (MPM) list that includes the Intra TMP mode and one or more other intra prediction modes; calculating, by the encoder, a plurality of template matching TM costs by comparing the Intra TMP mode and the one or more other intra prediction modes; selecting, by the encoder, a first TM cost and a second TM cost from the plurality of TM costs, wherein the first TM cost is a minimum TM cost in the plurality of TM costs and associated with a first mode in the MPM list, and the second TM cost is a second minimum TM cost in the plurality of TM costs and associated with a second mode in the MPM list; and obtaining, by the encoder, the final prediction for the current CU by fusing the first mode and the second mode using the TIMD mode.
In some aspects, the method further comprises: obtaining, by the encoder, an Intra TMP prediction for the current CU, wherein the Intra TMP prediction is associated with the Intra TMP mode; obtaining, by the encoder, a regular TIMD prediction for the current CU, wherein the regular TIMD prediction is associated with the TIMD mode; and fusing, by the encoder, the Intra TMP prediction and the regular TIMD prediction using template-based intra mode derivation (TIMD) mode to obtain the final prediction of the current CU.
In some aspects, the method further comprises: obtaining, by the encoder, an Intra TMP prediction for the current CU, wherein the Intra TMP prediction is associated with the Intra TMP mode; obtaining, by the encoder, a modeled function by modelling local illumination variation between the current CU and the Intra TMP prediction using a function of a local illumination variation between a current CU template and a reference block template, wherein the function is a linear equation; and obtaining, by the encoder, the local illumination compensated Intra TMP prediction based on the modelled function.
In some aspects, the method further comprises: obtaining, by the encoder, the current CU that is coded based on the Intra TMP mode; and refining, by the encoder, top and left boundary pixels of the current CU that is coded based on the Intra TMP mode using block vector information of a neighboring block with a weighted prediction.
In some aspects, the method further comprises: obtaining, by the encoder, the current CU that is coded based on the Intra TMP mode; and refining, by the encoder, top and left boundary pixels of the current CU that is coded based on the Intra TMP mode using template matching based methods.
In some aspects, there is provided a method for video decoding, comprising: obtaining, by a decoder, a current coding unit (CU) that is coded based on an Intra template matching prediction (TMP) mode combined with a Geometric Partitioning Mode (GPM) mode; and obtaining, by the decoder, a final prediction for the current CU based on the intra TMP mode combined with the GPM mode.
In some aspects, the current CU is partitioned into a first Intra TMP-predicted part and a second Intra TMP-predicted part, and the method further comprises: obtaining, by the decoder, a first Intra TMP prediction for the first Intra TMP-predicted part; obtaining, by the decoder, a second Intra TMP prediction for the second Intra TMP-predicted part; and obtaining, by the decoder, the final prediction for the current CU based on the first Intra TMP-prediction and the second Intra TMP-prediction.
In some aspects, the method further comprises: obtaining, by the decoder, the final prediction for the current CU by weighted-averaging the first Intra TMP prediction and the second Intra TMP prediction.
In some aspects, the method further comprises: obtaining, by the decoder, a reordered GPM split mode utilizing Template Matching (TM) based methods.
In some aspects, the current CU is partitioned into a first Intra TMP-predicted part and a second intra-predicted part, and the method further comprises: obtaining, by the decoder, a first Intra TMP prediction for the first Intra TMP-predicted part; obtaining, by the decoder, a second intra prediction for the second intra-predicted part; and obtaining, by the decoder, the final prediction for the current CU based on the first Intra TMP-prediction and the second intra prediction.
In some aspects, the method further comprises: obtaining, by the decoder, the final prediction for the current CU by weighted-averaging the first Intra TMP-prediction and the second intra prediction.
In some aspects, the current CU is partitioned into a first Intra TMP-predicted part and a second inter-predicted part, and the method further comprises: obtaining, by the decoder, a first Intra TMP prediction for the first Intra TMP-predicted part; obtaining, by the decoder, a second inter merge prediction for the second inter-predicted part; and obtaining, by the decoder, the final prediction for the current CU by weighted-averaging the first Intra TMP prediction and the second inter merge prediction.
In some aspects, the method further comprises: obtaining, by the decoder, a reordered GPM split mode utilizing Template Matching (TM) based methods.
In some aspects, the current CU is partitioned into a first part and a second part based on a predefined direction, and the method further comprises: obtaining, by the decoder, a first intra prediction for the first part; obtaining, by the decoder, a second Intra TMP prediction for the second part; and obtaining, by the decoder, the final prediction for the current CU by weighted-averaging the first intra prediction and the second Intra TMP prediction.
In some aspects, the predefined direction is 45 degrees, the first intra prediction is located in an upper left part of the current CU and the second Intra TMP prediction is located in a bottom right part of the current CU.
In some aspects, there is provided a method for video encoding, comprising: encoding, by an encoder, a current coding unit (CU) based on an Intra template matching prediction (TMP) mode combined with a Geometric Partitioning Mode (GPM) mode; and transmitting, by the encoder, the current CU that is coded based on the intra TMP mode combined with the GPM mode to a decoder.
In some aspects, the current CU is partitioned into a first Intra TMP-predicted part and a second Intra TMP-predicted part, and the method further comprises: obtaining, by the encoder, a first Intra TMP prediction for the first Intra TMP-predicted part; obtaining, by the encoder, a second Intra TMP prediction for the second Intra TMP-predicted part; and obtaining, by the encoder, the final prediction for the current CU based on the first Intra TMP-prediction and the second Intra TMP-prediction.
In some aspects, the method further comprises: obtaining, by the encoder, the final prediction for the current CU by weighted-averaging the first Intra TMP prediction and the second Intra TMP prediction.
In some aspects, the method further comprises: obtaining, by the encoder, a reordered GPM split mode utilizing Template Matching (TM) based methods.
In some aspects, the current CU is partitioned into a first Intra TMP-predicted part and a second intra-predicted part, and the method further comprises: obtaining, by the encoder, a first Intra TMP prediction for the first Intra TMP-predicted part; obtaining, by the encoder, a second intra prediction for the second intra-predicted part; and obtaining, by the encoder, the final prediction for the current CU based on the first Intra TMP-prediction and the second intra prediction.
In some aspects, the method further comprises: obtaining, by the encoder, the final prediction for the current CU by weighted-averaging the first Intra TMP-prediction and the second intra prediction.
In some aspects, the current CU is partitioned into a first Intra TMP-predicted part and a second inter-predicted part, and the method further comprises: obtaining, by the encoder, a first Intra TMP prediction for the first Intra TMP-predicted part; obtaining, by the encoder, a second inter merge prediction for the second inter-predicted part; and obtaining, by the encoder, the final prediction for the current CU by weighted-averaging the first Intra TMP prediction and the second inter merge prediction.
In some aspects, the method further comprises: obtaining, by the encoder, a reordered GPM split mode utilizing Template Matching (TM) based methods.
In some aspects, the current CU is partitioned into a first part and a second part based on a predefined direction, the method further comprises:
In some aspects, the predefined direction is 45 degrees, the first intra prediction is located in an upper left part of the current CU and the second Intra TMP prediction is located in a bottom right part of the current CU.
In some aspects, there is provided a method for video decoding, comprising: obtaining, by a decoder, a current coding unit (CU) coded based on a combined mode that combines an Intra Block Copy (IBC) mode and at least one of a template-based intra mode derivation (TIMD) mode or an overlapped block motion compensation (OBMC) mode; and obtaining, by the decoder, a final prediction for the current CU based on the combined mode.
In some aspects, the method further comprises: obtaining, by the decoder, a most probable mode (MPM) list that includes the IBC mode and one or more other intra prediction modes; calculating, by the decoder, a plurality of template matching TM costs by comparing the IBC mode and the one or more other intra prediction modes; selecting, by the decoder, a first TM cost and a second TM cost from the plurality of TM costs, wherein the first TM cost is a minimum TM cost in the plurality of TM costs and associated with a first mode in the MPM list, and the second TM cost is a second minimum TM cost in the plurality of TM costs and associated with a second mode in the MPM list; and obtaining, by the decoder, the final prediction for the current CU by fusing the first mode and the second mode using the TIMD mode.
In some aspects, the method further comprises: obtaining, by the decoder, an IBC prediction for the current CU, wherein the IBC prediction is associated with the IBC mode; obtaining, by the decoder, a regular TIMD prediction for the current CU, wherein the regular TIMD prediction is associated with the TIMD mode; fusing, by the decoder, the IBC mode and the regular TIMD prediction using the TIMD mode to obtain the final prediction of the current CU.
In some aspects, the method further comprises: obtaining, by the decoder, the current CU that is coded based on IBC mode; and refining, by the decoder, top and left boundary pixels of the current CU that is coded based on the IBC mode using block vector information of a neighboring block with a weighted prediction.
In some aspects, the method further comprises: obtaining, by the decoder, the current CU that is coded based on IBC mode; and refining, by the decoder, top and left boundary pixels of the current CU that is coded based on the IBC mode using template matching based methods.
In some aspects, there is provided a method for video encoding, comprising: encoding, by an encoder, a current coding unit (CU) based on a combined mode that combines an Intra Block Copy (IBC) mode and at least one of a template-based intra mode derivation (TIMD) mode or an overlapped block motion compensation (OBMC) mode; and transmitting, by the encoder, the current CU that is coded based on the combined mode to a decoder.
In some aspects, the method further comprises: obtaining, by the encoder, a most probable mode (MPM) list that includes the IBC mode and one or more other intra prediction modes; calculating, by the encoder, a plurality of template matching TM costs by comparing the IBC mode and the one or more other intra prediction modes; selecting, by the encoder, a first TM cost and a second TM cost from the plurality of TM costs, wherein the first TM cost is a minimum TM cost in the plurality of TM costs and associated with a first mode in the MPM list, and the second TM cost is a second minimum TM cost in the plurality of TM costs and associated with a second mode in the MPM list; and obtaining, by the encoder, the final prediction for the current CU by fusing the first mode and the second mode using the TIMD mode.
In some aspects, the method further comprises: obtaining, by the encoder, an IBC prediction for the current CU, wherein the IBC prediction is associated with the IBC mode; obtaining, by the encoder, a regular TIMD prediction for the current CU, wherein the regular TIMD prediction is associated with the TIMD mode; and fusing, by the encoder, the IBC mode and the regular TIMD prediction using the TIMD mode to obtain the final prediction of the current CU.
In some aspects, the method further comprises: obtaining, by the encoder, the current CU that is coded based on IBC mode; and refining, by the encoder, top and left boundary pixels of the current CU that is coded based on the IBC mode using block vector information of a neighboring block with a weighted prediction.
In some aspects, the method further comprises: obtaining, by the encoder, the current CU that is coded based on IBC mode; and refining, by the encoder, top and left boundary pixels of the current CU that is coded based on the IBC mode using template matching based methods.
In some aspects, there is provided a method for video decoding, comprising: obtaining, by a decoder, a first weight of a first prediction for a current coding unit (CU), wherein the first prediction is associated with intra block copy (IBC) mode; obtaining, by the decoder, a second weight of a second prediction for the current CU, wherein the second prediction is associated with intra mode; and obtaining, by the decoder, a final prediction for the current CU based on the first weight, the first prediction, the second weight, and the second prediction.
In some aspects, obtaining, by the decoder, the first weight of the first prediction for the current CU and obtaining, by the decoder, the second weight of the second prediction for the current CU comprise: computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU.
In some aspects, obtaining, by the decoder, the first weight of the first prediction for the current CU comprises: setting the first weight to be a first real number greater than 0 and smaller than 1 in the current CU; and obtaining, by the decoder, the second weight of the second prediction for the current CU comprises: setting the second weight to be a second real number smaller than 1 and greater than 0 in the current CU.
In some aspects, obtaining, by the decoder, the first weight of the first prediction for the current CU comprises: gradually changing the first weight from 0 in a first area of the current CU to 1 in a second area of the current CU; and obtaining, by the decoder, the second weight of the second prediction for the current CU comprises: gradually changing the second weight from 1 in the first area of the current CU to 0 in the second area of the current CU.
In some aspects, obtaining, by the decoder, the first weight of the first prediction for the current CU and obtaining, by the decoder, the second weight of the second prediction for the current CU comprise: setting the first weight and the second weight to a same value in all areas of the current CU, or setting the first weight and the second weight to different values in different areas of the current CU.
In some aspects, computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: performing, by the decoder, one of following acts: in response to determining that an upper neighboring CU and a left neighboring CU are both associated with intra mode and that the second prediction is associated with planar intra mode, setting the first weight to be ¼ in all areas of the current CU, and setting the second weight to be ¾ in all areas of the current CU; in response to determining that the upper neighboring CU and the left neighboring CU are both associated with IBC mode and that the second prediction is associated with planar intra mode, setting the first weight to be ¾ in all areas of the current CU, and setting the second weight to be ¼ in all areas of the current CU; or in response to determining that one of the upper neighboring CU and the left neighboring CU is associated with IBC mode, that the other is associated with intra mode, and that the second prediction is associated with planar intra mode, setting both the first weight and the second weight to be ½ in all areas of the current CU.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, vertically dividing, by the decoder, the current CU into four equal subunits; computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, in a leftmost subunit, setting the first weight to be ¼, and setting the second weight to be ¾; in a second-leftmost subunit, setting the first weight to be ⅜, and setting the second weight to be ⅝; in a rightmost subunit, setting the first weight to be ¾, and setting the second weight to be ¼; and in a second-rightmost subunit, setting the first weight to be ⅝, and setting the second weight to be ⅜.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with near vertical angular mode, horizontally dividing, by the decoder, the current CU into four equal subunits; computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with near vertical angular mode, in an uppermost subunit, setting the first weight to be ¼, and setting the second weight to be ¾; in a second-uppermost subunit, setting the first weight to be ⅜, and setting the second weight to be ⅝; in a lowermost subunit, setting the first weight to be ¾, and setting the second weight to be ¼; and in a second-lowermost subunit, setting the first weight to be ⅝, and setting the second weight to be ⅜.
In some aspects, the method further comprises: setting, by the decoder, the second prediction for the current CU to be associated with planar intra mode; computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: gradually increasing the first weight from a top-left area of the current CU to a bottom-right area of the current CU, and gradually decreasing the second weight from a top-left area of the current CU to a bottom-right area of the current CU.
In some aspects, the method further comprises: determining, by the decoder and before obtaining the final prediction, that the second prediction is associated with planar intra mode, and that both an upper neighboring CU of the current CU and a left neighboring CU of the current CU are associated with IBC mode.
In some aspects, obtaining, by the decoder, the first weight of the first prediction for the current CU comprises: setting the first weight to be 1 in a subarea of the current CU and 0 in remaining area of the current CU, wherein remaining area is an area of the current CU other than the subarea; and obtaining, by the decoder, the second weight of the second prediction for the current CU comprises: setting the second weight to be 0 in the subarea and 1 in the remaining area.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, vertically dividing, by the decoder, the current CU into four equal subunits, computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, performing, by the decoder, one of following acts: in response to determining that an upper neighboring CU and a left neighboring CU are both associated with intra mode, setting the first weight to be 0 in a leftmost subunit, 0 in a second-leftmost subunit, 1 in a rightmost subunit, and 0 in a second-rightmost subunit; and setting the second weight to be 1 in the leftmost subunit, 1 in the second-leftmost subunit, 0 in the rightmost subunit, and 1 in the second-rightmost subunit; in response to determining that the upper neighboring CU and the left neighboring CU are both associated with IBC mode, setting the first weight to be 0 in the leftmost subunit, 1 in the second-leftmost subunit, 1 in the rightmost subunit, and 1 in the second-rightmost subunit; and setting the second weight to be 1 in the leftmost subunit, 0 in the second-leftmost subunit, 0 in the rightmost subunit, and 0 in the second-rightmost subunit; or in response to determining that one of the upper neighboring CU and the left neighboring CU is associated with IBC mode and the other is associated with intra mode, setting the first weight to be 0 in the leftmost subunit, 0 in the second-leftmost subunit, 1 in the rightmost subunit, and 1 in the second-rightmost subunit; and setting the second weight to be 1 in the leftmost subunit, 1 in the second-leftmost subunit, 0 in the rightmost subunit, and 0 in the second-rightmost subunit.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with near vertical angular mode, horizontally dividing, by the decoder, the current CU into four equal subunits, computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with near vertical angular mode, performing, by the decoder, one of following acts: in response to determining that an upper neighboring CU and a left neighboring CU are both associated with intra mode, setting the first weight to be 0 in an uppermost subunit, 0 in a second-uppermost subunit, 1 in a lowermost subunit, and 0 in a second-lowermost subunit; and setting the second weight to be 1 in the uppermost subunit, 1 in the second-uppermost subunit, 0 in the lowermost subunit, and 1 in the second-lowermost subunit; in response to determining that the upper neighboring CU and the left neighboring CU are both associated with IBC mode, setting the first weight to be 0 in the uppermost subunit, 1 in the second-uppermost subunit, 1 in the lowermost subunit, and 1 in the second-lowermost subunit; and setting the second weight to be 1 in the uppermost subunit, 0 in the second-uppermost subunit, 0 in the lowermost subunit, and 0 in the second-lowermost subunit; or in response to determining that one of the upper neighboring CU and the left neighboring CU is associated with IBC mode and the other is associated with intra mode, setting the first weight to be 0 in the uppermost subunit, 0 in the second-uppermost subunit, 1 in the lowermost subunit, and 1 in the second-lowermost subunit; and setting the second weight to be 1 in the uppermost subunit, 1 in the second-uppermost subunit, 0 in the lowermost subunit, and 0 in the second-lowermost subunit.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with planar intra mode, horizontally and vertically dividing, by the decoder, the current CU into four equal subunits, computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with planar intra mode, performing, by the decoder, one of following acts: in response to determining that an upper neighboring CU and a left neighboring CU are both associated with intra mode, setting the first weight to be 0 in an upper-left subunit, 0 in an upper-right subunit, 0 in a lower-left subunit, and 1 in a lower-right subunit; and setting the second weight to be 1 in the upper-left subunit, 1 in the upper-right subunit, 1 in the lower-left subunit, and 0 in the lower-right subunit; in response to determining that the upper neighboring CU and the left neighboring CU are both associated with IBC mode, setting the first weight to be 0 in the upper-left subunit, 1 in the upper-right subunit, 1 in the lower-left subunit, and 1 in the lower-right subunit; and setting the second weight to be 1 in the upper-left subunit, 0 in the upper-right subunit, 0 in the lower-left subunit, and 0 in the lower-right subunit; in response to determining that the upper neighboring CU is associated with intra mode and the left neighboring CU is associated with IBC mode, setting the first weight to be 0 in the upper-left subunit, 0 in the upper-right subunit, 1 in the lower-left subunit, and 1 in the lower-right subunit; and setting the second weight to be 1 in the upper-left subunit, 1 in the upper-right subunit, 0 in the lower-left subunit, and 0 in the lower-right subunit; or in response to determining that the upper neighboring CU is associated with IBC mode and the left neighboring CU is associated with intra mode, setting the first weight to be 0 in the upper-left subunit, 1 in the upper-right subunit, 0 in the lower-left subunit, and 1 in the lower-right subunit; and setting the second weight to be 1 in the upper-left subunit, 0 in the upper-right subunit, 1 in the lower-left subunit, and 0 in the lower-right subunit.
In some aspects, the method further comprises: determining, by the decoder and before obtaining the final prediction, that the second prediction is associated with planar intra mode, and that at least one of an upper neighboring CU of the current CU or a left neighboring CU of the current CU is associated with intra mode.
In some aspects, there is provided a method for video encoding, comprising: obtaining, by an encoder, a first weight of a first prediction for a current coding unit (CU), wherein the first prediction is associated with intra block copy (IBC) mode; obtaining, by the encoder, a second weight of a second prediction for the current CU, wherein the second prediction is associated with intra mode; and obtaining, by the encoder, a final prediction for the current CU based on the first weight, the first prediction, the second weight, and the second prediction.
In some aspects, obtaining, by the encoder, the first weight of the first prediction for the current CU and obtaining, by the encoder, the second weight of the second prediction for the current CU comprise: computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU.
In some aspects, obtaining, by the encoder, the first weight of the first prediction for the current CU comprises: setting the first weight to be a first real number greater than 0 and smaller than 1 in the current CU; and obtaining, by the encoder, the second weight of the second prediction for the current CU comprises: setting the second weight to be a second real number smaller than 1 and greater than 0 in the current CU.
In some aspects, obtaining, by the encoder, the first weight of the first prediction for the current CU comprises: gradually changing the first weight from 0 in a first area of the current CU to 1 in a second area of the current CU; and obtaining, by the encoder, the second weight of the second prediction for the current CU comprises: gradually changing the second weight from 1 in the first area of the current CU to 0 in the second area of the current CU.
In some aspects, obtaining, by the encoder, the first weight of the first prediction for the current CU and obtaining, by the encoder, the second weight of the second prediction for the current CU comprise: setting the first weight and the second weight to a same value in all areas of the current CU, or setting the first weight and the second weight to different values in different areas of the current CU.
In some aspects, computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: performing, by the encoder, one of following acts: in response to determining that an upper neighboring CU and a left neighboring CU are both associated with intra mode and that the second prediction is associated with planar intra mode, setting the first weight to be ¼ in all areas of the current CU, and setting the second weight to be ¾ in all areas of the current CU; in response to determining that the upper neighboring CU and the left neighboring CU are both associated with IBC mode and that the second prediction is associated with planar intra mode, setting the first weight to be ¾ in all areas of the current CU, and setting the second weight to be ¼ in all areas of the current CU; or in response to determining that one of the upper neighboring CU and the left neighboring CU is associated with IBC mode, that the other is associated with intra mode, and that the second prediction is associated with planar intra mode, setting both the first weight and the second weight to be ½ in all areas of the current CU.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, vertically dividing, by the encoder, the current CU into four equal subunits; computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, in a leftmost subunit, setting the first weight to be ¼, and setting the second weight to be ¾; in a second-leftmost subunit, setting the first weight to be ⅜, and setting the second weight to be ⅝; in a rightmost subunit, setting the first weight to be ¾, and setting the second weight to be ¼; and in a second-rightmost subunit, setting the first weight to be ⅝, and setting the second weight to be ⅜.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with near vertical angular mode, horizontally dividing, by the encoder, the current CU into four equal subunits; computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with near vertical angular mode, in an uppermost subunit, setting the first weight to be ¼, and setting the second weight to be ¾; in a second-uppermost subunit, setting the first weight to be ⅜, and setting the second weight to be ⅝; in a lowermost subunit, setting the first weight to be ¾, and setting the second weight to be ¼; and in a second-lowermost subunit, setting the first weight to be ⅝, and setting the second weight to be ⅜.
In some aspects, the method further comprises: setting, by the encoder, the second prediction for the current CU to be associated with planar intra mode; computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: gradually increasing the first weight from a top-left area of the current CU to a bottom-right area of the current CU, and gradually decreasing the second weight from a top-left area of the current CU to a bottom-right area of the current CU.
In some aspects, the method further comprises: determining, by the encoder and before obtaining the final prediction, that the second prediction is associated with planar intra mode, and that both an upper neighboring CU of the current CU and a left neighboring CU of the current CU are associated with IBC mode.
In some aspects, obtaining, by the encoder, the first weight of the first prediction for the current CU comprises: setting the first weight to be 1 in a subarea of the current CU and 0 in remaining area of the current CU, wherein remaining area is an area of the current CU other than the subarea; and obtaining, by the encoder, the second weight of the second prediction for the current CU comprises: setting the second weight to be 0 in the subarea and 1 in the remaining area.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, vertically dividing, by the encoder, the current CU into four equal subunits, computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with near horizontal angular mode, performing, by the encoder, one of following acts: in response to determining that an upper neighboring CU and a left neighboring CU are both associated with intra mode, setting the first weight to be 0 in a leftmost subunit, 0 in a second-leftmost subunit, 1 in a rightmost subunit, and 0 in a second-rightmost subunit; and setting the second weight to be 1 in the leftmost subunit, 1 in the second-leftmost subunit, 0 in the rightmost subunit, and 1 in the second-rightmost subunit; in response to determining that the upper neighboring CU and the left neighboring CU are both associated with IBC mode, setting the first weight to be 0 in the leftmost subunit, 1 in the second-leftmost subunit, 1 in the rightmost subunit, and 1 in the second-rightmost subunit; and setting the second weight to be 1 in the leftmost subunit, 0 in the second-leftmost subunit, 0 in the rightmost subunit, and 0 in the second-rightmost subunit; or in response to determining that one of the upper neighboring CU and the left neighboring CU is associated with IBC mode and the other is associated with intra mode, setting the first weight to be 0 in the leftmost subunit, 0 in the second-leftmost subunit, 1 in the rightmost subunit, and 1 in the second-rightmost subunit; and setting the second weight to be 1 in the leftmost subunit, 1 in the second-leftmost subunit, 0 in the rightmost subunit, and 0 in the second-rightmost subunit.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with near vertical angular mode, horizontally dividing, by the encoder, the current CU into four equal subunits, computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with near vertical angular mode, performing, by the encoder, one of following acts: in response to determining that an upper neighboring CU and a left neighboring CU are both associated with intra mode, setting the first weight to be 0 in an uppermost subunit, 0 in a second-uppermost subunit, 1 in a lowermost subunit, and 0 in a second-lowermost subunit; and setting the second weight to be 1 in the uppermost subunit, 1 in the second-uppermost subunit, 0 in the lowermost subunit, and 1 in the second-lowermost subunit; in response to determining that the upper neighboring CU and the left neighboring CU are both associated with IBC mode, setting the first weight to be 0 in the uppermost subunit, 1 in the second-uppermost subunit, 1 in the lowermost subunit, and 1 in the second-lowermost subunit; and setting the second weight to be 1 in the uppermost subunit, 0 in the second-uppermost subunit, 0 in the lowermost subunit, and 0 in the second-lowermost subunit; or in response to determining that one of the upper neighboring CU and the left neighboring CU is associated with IBC mode and the other is associated with intra mode, setting the first weight to be 0 in the uppermost subunit, 0 in the second-uppermost subunit, 1 in the lowermost subunit, and 1 in the second-lowermost subunit; and setting the second weight to be 1 in the uppermost subunit, 1 in the second-uppermost subunit, 0 in the lowermost subunit, and 0 in the second-lowermost subunit.
In some aspects, the method further comprises: in response to determining that the second prediction for the current CU is associated with planar intra mode, horizontally and vertically dividing, by the encoder, the current CU into four equal subunits, computing the first weight and the second weight based on modes associated with neighboring CUs and/or the intra mode associated with the second prediction for the current CU comprises: in response to determining that the second prediction for the current CU is associated with planar intra mode, performing, by the encoder, one of following acts: in response to determining that an upper neighboring CU and a left neighboring CU are both associated with intra mode, setting the first weight to be 0 in an upper-left subunit, 0 in an upper-right subunit, 0 in a lower-left subunit, and 1 in a lower-right subunit; and setting the second weight to be 1 in the upper-left subunit, 1 in the upper-right subunit, 1 in the lower-left subunit, and 0 in the lower-right subunit; in response to determining that the upper neighboring CU and the left neighboring CU are both associated with IBC mode, setting the first weight to be 0 in the upper-left subunit, 1 in the upper-right subunit, 1 in the lower-left subunit, and 1 in the lower-right subunit; and setting the second weight to be 1 in the upper-left subunit, 0 in the upper-right subunit, 0 in the lower-left subunit, and 0 in the lower-right subunit; in response to determining that the upper neighboring CU is associated with intra mode and the left neighboring CU is associated with IBC mode, setting the first weight to be 0 in the upper-left subunit, 0 in the upper-right subunit, 1 in the lower-left subunit, and 1 in the lower-right subunit; and setting the second weight to be 1 in the upper-left subunit, 1 in the upper-right subunit, 0 in the lower-left subunit, and 0 in the lower-right subunit; or in response to determining that the upper neighboring CU is associated with IBC mode and the left neighboring CU is associated with intra mode, setting the first weight to be 0 in the upper-left subunit, 1 in the upper-right subunit, 0 in the lower-left subunit, and 1 in the lower-right subunit; and setting the second weight to be 1 in the upper-left subunit, 0 in the upper-right subunit, 1 in the lower-left subunit, and 0 in the lower-right subunit.
In some aspects, the method further comprises: determining, by the encoder and before obtaining the final prediction, that the second prediction is associated with planar intra mode, and that at least one of an upper neighboring CU of the current CU or a left neighboring CU of the current CU is associated with intra mode.
In some aspects, there is provided a method for video decoding, comprising: obtaining, by a decoder, a first block and a second block, wherein the first block is coded based on one of an intra block copy (IBC) mode or an intra template matching prediction (TMP) mode, and wherein the second block is coded based on an intra mode; obtaining, by the decoder and based on template matching, a first weight corresponding to the first block and a second weight corresponding to the second block; and obtaining, by the decoder, a final prediction for a current block based on the first block, the first weight, the second block, and the second weight.
In some aspects, the method further comprises: obtaining, by the decoder, one or more current block templates; obtaining, by the decoder, prediction samples and reconstruction samples of the one or more current block templates; computing, by the decoder, a difference between the prediction samples and the reconstruction samples, the difference being one of: sum of absolute difference (SAD), sum of square difference (SSD), or sum of absolute transformed difference (SATD); and obtaining, by the decoder, the first weight and the second weight based on the difference.
In some aspects, computing, by the decoder, the difference between the prediction samples and the reconstruction samples comprises: computing, by the decoder, a first SATD between first prediction samples and first reconstruction samples of a first current block template, wherein the first current block template corresponds to the first block; and computing, by the decoder, a second SATD between second prediction samples and second reconstruction samples of a second current block template, wherein the second current block template corresponds to the second block; and obtaining, by the decoder, the first weight and the second weight based on the difference comprises: obtaining, by the decoder, the first weight and the second weight based on the first SATD and the second SATD.
In some aspects, obtaining, by the decoder, the first weight and the second weight based on the first SATD and the second SATD comprises: obtaining, by the decoder, a sum of the first SATD and the second SATD; setting, by the decoder, the first weight to be the second SATD divided by the sum; and setting, by the decoder, the second weight to be the first SATD divided by the sum.
In some aspects, the first prediction samples are predicted using first reference samples pointed by a block vector of the first block, and the second prediction samples are intra-predicted using second reference samples with the intra mode of the current block; and the first reference samples correspond to the first current block template, and the second reference samples correspond to the second current block template.
In some aspects, obtaining, by the decoder, the one or more current block templates comprises: selecting, by the decoder and using a received index or a predefined criterion, at least one of a left template or a top template as the one or more current block templates.
In some aspects, selecting, by the decoder and using the predefined criterion, the at least one of the left template or the top template as the one or more current block templates comprises one of following acts: in response to determining that an intra mode of the current block is a planar mode or a direct current (DC) mode, selecting, by the decoder, both the left template and the top template as the one or more current block templates; in response to determining that the intra mode of the current block is a near horizontal angular mode, selecting, by the decoder, the left template as the one or more current block templates; or in response to determining that the intra mode of the current block is a near vertical angular mode, selecting, by the decoder, the top template as the one or more current block templates.
In some aspects, there is provided a method for video encoding, comprising: obtaining, by an encoder, a first block and a second block, wherein the first block is coded based on one of an intra block copy (IBC) mode or an intra template matching prediction (TMP) mode, and wherein the second block is coded based on an intra mode; obtaining, by the encoder and based on template matching, a first weight corresponding to the first block and a second weight corresponding to the second block; obtaining, by the encoder, a final prediction for a current block based on the first block, the first weight, the second block, and the second weight; and generating, by the encoder, a bitstream based on the final prediction.
In some aspects, the method further comprises: obtaining, by the encoder, one or more current block templates; obtaining, by the encoder, prediction samples and reconstruction samples of the one or more current block templates; computing, by the encoder, a difference between the prediction samples and the reconstruction samples, the difference being one of: sum of absolute difference (SAD), sum of square difference (SSD), or sum of absolute transformed difference (SATD); and obtaining, by the encoder, the first weight and the second weight based on the difference.
In some aspects, computing, by the encoder, the difference between the prediction samples and the reconstruction samples comprises: computing, by the encoder, a first SATD between first prediction samples and first reconstruction samples of a first current block template, wherein the first current block template corresponds to the first block coded; and computing, by the encoder, a second SATD between second prediction samples and second reconstruction samples of a second current block template, wherein the second current block template corresponds to the second block coded; and obtaining, by the encoder, the first weight and the second weight based on the difference comprises: obtaining, by the encoder, the first weight and the second weight based on the first SATD and the second SATD.
In some aspects, obtaining, by the encoder, the first weight and the second weight based on the first SATD and the second SATD comprises: obtaining, by the encoder, a sum of the first SATD and the second SATD; setting, by the encoder, the first weight to be the second SATD divided by the sum; and setting, by the encoder, the second weight to be the first SATD divided by the sum.
In some aspects, the first prediction samples are predicted using first reference samples pointed by a block vector of the first block, and the second prediction samples are intra-predicted using second reference samples with the intra mode of the current block; and the first reference samples correspond to the first current block template, and the second reference samples correspond to the second current block template.
In some aspects, obtaining, by the encoder, the one or more current block templates comprises: selecting, by the encoder and using a signaling index decided with a rate distortion optimization (RDO) process or a predefined criterion, at least one of a left template or a top template as the one or more current block templates.
In some aspects, selecting, by the encoder and using the predefined criterion, the at least one of the left template or the top template as the one or more current block templates comprises one of following acts: in response to determining that an intra mode of the current block is a planar mode or a direct current (DC) mode, selecting, by the encoder, both the left template and the top template as the one or more current block templates; in response to determining that the intra mode of the current block is a near horizontal angular mode, selecting, by the encoder, the left template as the one or more current block templates; or in response to determining that the intra mode of the current block is a near vertical angular mode, selecting, by the encoder, the top template as the one or more current block templates.
The present application is a continuation of PCT Application No. PCT/US2023/034855 filed on Oct. 10, 2023, which claims priority to U.S. Provisional Application No. 63/414,895 filed on Oct. 10, 2022; PCT Application No. PCT/US2023/080612 filed on Nov. 20, 2023, which claims priority to U.S. Provisional Application No. 63/426,712 filed on Nov. 18, 2022; PCT Application No. PCT/US2023/082394 filed on Dec. 4, 2023, which claims priority to U.S. Provisional Application No. 63/430,016 filed on Dec. 3, 2022; and PCT Application No. PCT/US2024/015657 filed on Feb. 13, 2024, which claims priority to U.S. Provisional Application No. 63/445,630 filed on Feb. 14, 2023. The disclosures of each of the foregoing applications are hereby incorporated by reference in their entireties for all purposes.
Number | Date | Country | |
---|---|---|---|
63414895 | Oct 2022 | US | |
63426712 | Nov 2022 | US | |
63430016 | Dec 2022 | US | |
63445630 | Feb 2023 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/US2023/034855 | Oct 2023 | WO |
Child | 19175853 | US | |
Parent | PCT/US2023/080612 | Nov 2023 | WO |
Child | 19175853 | US | |
Parent | PCT/US2023/082394 | Dec 2023 | WO |
Child | 19175853 | US | |
Parent | PCT/US2024/015657 | Feb 2024 | WO |
Child | 19175853 | US |