Video decoding method, computer equipment, device and computer readable medium
The bidirectional prediction method with context-adaptive weights solves the problem of high signaling overhead in motion vector prediction, improves the compression efficiency of video coding, reduces the amount of data, and improves coding efficiency.
Patent Information
- Application Number
- CN202180030433.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-09-29
- Filing Date
- 2021-10-04
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2041-10-04
AI Technical Summary
Existing video coding technologies have high signaling overhead in motion vector prediction, making it difficult to efficiently utilize the similarity of surrounding MVs for compression.
A bidirectional prediction method based on context-adaptive weights is adopted. By decoding the encoded information of the current block, the samples in the current block are reconstructed using the adjacent reconstructed samples of the current block and the weights of the prediction block, thereby reducing signaling overhead.
The compression efficiency of video coding is improved, the amount of data for motion vector prediction is reduced, and the coding efficiency is improved.
Smart Images

Figure CN115428445B_ABST
Abstract
Description
[0001] Incorporation by reference
[0002] This application claims the benefit of priority to U.S. Patent Application No. 17 / 489,258, filed September 29, 2021, entitled "Method and Apparatus For Video Coding," which claims the benefit of priority to U.S. Provisional Application No. 63 / 138,201, filed January 15, 2021, entitled "BI-PREDICTION WITH CONTEXT ADAPTIVE WEIGHTS." The entire disclosure of the prior application is hereby incorporated by reference herein in its entirety. Technical Field
[0003] The present disclosure describes embodiments generally related to video encoding, and more particularly to a method, computer device, apparatus, and computer-readable medium for video decoding. Background Art
[0004] The background description provided herein is for the purpose of generally presenting the context of the present disclosure. To the extent that the work described in this background section is prior art, neither the work of the presently named inventors nor any aspects of the description that may not otherwise be qualified as prior art at the time of filing are admitted, either explicitly or implicitly, as prior art to the present disclosure.
[0005] Video encoding and decoding can be performed using inter-picture prediction with motion compensation. An uncompressed digital video may comprise a series of pictures, each picture having, for example, 1920×1080 luma samples and associated chroma samples in spatial dimensions. The series of pictures may have a fixed or variable picture rate (also informally referred to as a frame rate), for example, 60 pictures per second or 60 Hz. Uncompressed video has high bitrate requirements. For example, 1080p60 4:2:0 video with 8 bits per sample (1920×1080 luma sample resolution at 60 Hz frame rate) requires a bandwidth of nearly 1.5 Gbit / s. One hour of such video would require more than 600 gigabytes of storage space.
[0006] One purpose of video encoding and video decoding can be to reduce the redundancy of the input video signal through compression. Compression can help reduce the bandwidth requirements or storage space requirements mentioned above, in some cases by two or more orders of magnitude. Lossless compression, lossy compression, and combinations thereof can be used. Lossless compression refers to techniques that can reconstruct an exact copy of the original signal from the compressed original signal. When lossy compression is used, the reconstructed signal may not be the same as the original signal, but the distortion between the original signal and the reconstructed signal is small enough that the reconstructed signal can be used for the target application. In the case of video, lossy compression is widely used. The amount of distortion that can be tolerated depends on the application; for example, users of certain consumer streaming applications may tolerate higher distortion than users of television distribution applications. The achievable compression ratio can reflect that higher allowable / tolerable distortion can produce higher compression ratios.
[0007] Motion compensation can be a lossy compression technique and can involve predicting a newly reconstructed picture or picture portion using a block of sample data from a previously reconstructed picture or portion thereof (reference picture) after spatially shifting in the direction indicated by a motion vector (hereinafter referred to as MV). In some cases, the reference picture can be the same as the picture currently being reconstructed. The MV can have two dimensions, X and Y, or three, with the third dimension being an indication of the reference picture in use (the latter can indirectly be a temporal dimension).
[0008] In some video compression techniques, the MV applicable to a particular region of sample data can be predicted based on other MVs, for example, based on an MV associated with another region of sample data that is spatially adjacent to the region being reconstructed and precedes the MV in decoding order. This can significantly reduce the amount of data required to encode the MV, thereby eliminating redundancy and improving compression. For example, when encoding an input video signal obtained from a camera (referred to as natural video), there is a statistical probability that regions larger than the region to which a single MV applies will move in similar directions, and therefore, in some cases similar motion vectors derived from MVs of neighboring regions can be used for prediction. This allows the MV found for a given region to be similar or identical to the MV predicted based on surrounding MVs, and thus, after entropy coding, it can be represented with fewer bits than would be used if the MV were encoded directly. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., an MV) derived from the original signal (i.e., a sample stream). In other cases, MV prediction can itself be lossy, for example due to rounding errors when calculating the predicted value based on several surrounding MVs.
[0009] Various MV prediction mechanisms are described in H.265 / HEVC (ITU-T Recommendation H.265, "High Efficiency Video Coding," December 2016). Among the various MV prediction mechanisms provided by H.265, this article describes a technique referred to as "spatial merging." Summary of the Invention
[0010] According to an embodiment, a method for video decoding in a decoder is provided. The method includes: decoding encoded information of a current block from an encoded video bitstream, the encoded information indicating a bidirectional prediction motion compensation mode for the current block; determining weights used in the bidirectional prediction motion compensation mode based on current neighboring reconstructed samples of the current block, first neighboring reconstructed samples of a first prediction block, and second neighboring reconstructed samples of a second prediction block; and reconstructing samples in the current block based on a weighted average of corresponding samples in the first prediction block and the second prediction block using the determined weights.
[0011] According to an embodiment, a computer device is provided. The computer device includes: one or more computer-readable non-transitory storage media configured to store computer program code; and one or more computer processors configured to access the computer program code and execute the above method for video decoding as instructed by the computer program code.
[0012] According to an embodiment, a non-transitory computer-readable storage medium storing a program is provided. The program can be executed by at least one processor to perform the above method for video decoding.
[0013] According to an embodiment, a device for video decoding includes a processing circuit. The processing circuit is configured to: decode encoded information of a current block from an encoded video bitstream, the encoded information indicating a bidirectional prediction motion compensation mode for the current block; determine weights used in the bidirectional prediction motion compensation mode based on current adjacent reconstructed samples of the current block, first adjacent reconstructed samples of a first prediction block, and second adjacent reconstructed samples of a second prediction block; and reconstruct samples in the current block based on a weighted average of corresponding samples in the first prediction block and the second prediction block using the determined weights.
[0014] The video decoding method, computer equipment, device and computer-readable medium of the present invention provide a bidirectional prediction method based on context adaptive weights to save signaling overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Further features, nature, and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings, in which:
[0016] Figure 1 FIG. 1 is a schematic diagram of spatial merging candidates of a current block and its surroundings in one example.
[0017] Figure 2 is a schematic diagram of a simplified block diagram of a communication system according to an embodiment.
[0018] Figure 3 is a schematic diagram of a simplified block diagram of a communication system according to another embodiment.
[0019] Figure 4 is a schematic diagram of a simplified block diagram of a decoder according to an embodiment.
[0020] Figure 5 is a schematic diagram of a simplified block diagram of an encoder according to an embodiment.
[0021] Figure 6 A block diagram of an encoder according to another embodiment is shown.
[0022] Figure 7 A block diagram of a decoder according to another embodiment is shown.
[0023] Figure 8 An example of a segmentation technique used in video encoding according to an embodiment of the present disclosure is shown.
[0024] Figure 9 An example of a segmentation technique used in video encoding according to another embodiment of the present disclosure is shown.
[0025] FIG. 10A to FIG. 10B An example of a quad tree plus binary tree (QTBT) block partitioning technique according to an embodiment of the present disclosure is shown.
[0026] Figures 11A to 11B Examples of vertical center-side ternary-tree partitioning and horizontal center-side ternary-tree partitioning according to an embodiment of the present disclosure are shown.
[0027] Figure 12 A diagram showing neighboring samples of a current CU and a reference block of the current CU according to an embodiment of the present disclosure.
[0028] Figure 13 Examples of templates of a current block and a predicted block according to an embodiment of the present disclosure are shown.
[0029] Figure 14A flowchart outlining a process according to one embodiment of the present disclosure is shown.
[0030] Figure 15 A flowchart outlining a process according to another embodiment of the present disclosure is shown.
[0031] Figure 16 is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION
[0032] Reference Figure 1 , the current block (101) includes samples that have been found by the encoder during the motion search process to be predicted from a previous block of the same size that has been spatially shifted. Rather than encoding the MV directly, the MV may be derived from metadata associated with one or more reference pictures, for example, using the MV associated with any of the five surrounding samples denoted A0, A1 and B0, B1, B2 (102 to 106 respectively), derived from metadata of the nearest reference picture (in decoding order). In H.265, MV prediction can use prediction values from the same reference picture also being used by neighboring blocks.
[0033] Figure 2 A simplified block diagram of a communication system (200) according to an embodiment of the present disclosure is shown. The communication system (200) includes a plurality of terminal devices that can communicate with each other via, for example, a network (250). For example, the communication system (200) includes a first pair of terminal devices (210) and (220) interconnected by the network (250). Figure 2 In the example, a first pair of terminal devices (210) and (220) perform unidirectional data transmission. For example, the terminal device (210) can encode video data (e.g., a video picture stream captured by the terminal device (210)) for transmission to another terminal device (220) via the network (250). The encoded video data can be transmitted in the form of one or more encoded video bitstreams. The terminal device (220) can receive the encoded video data from the network (250), decode the encoded video data to recover the video picture, and display the video picture based on the recovered video data. In media service applications, etc., unidirectional data transmission may be common.
[0034] In another example, the communication system (200) includes a second pair of terminal devices (230) and (240) that perform bidirectional transmission of encoded video data, which bidirectional transmission can occur, for example, during a video conference. For bidirectional data transmission, in the example, each of the terminal devices (230) and (240) can encode video data (e.g., a video picture stream captured by the terminal device) for transmission to the other of the terminal devices (230) and (240) via the network (250). Each of the terminal devices (230) and (240) can also receive the encoded video data transmitted by the other of the terminal devices (230) and (240), and can decode the encoded video data to restore the video picture, and can display the video picture at an accessible display device based on the restored video data.
[0035] exist Figure 2 In the example, terminal devices (210), (220), (230) and (240) may be shown as servers, personal computers and smart phones, but the principles of the present disclosure may not be limited thereto. Implementations of the present disclosure are applicable to laptop computers, tablet computers, media players and / or dedicated video conferencing equipment. Network (250) represents any number of networks that transmit encoded video data between terminal devices (210), (220), (230) and (240), including, for example, wired (wired) and / or wireless communication networks. The communication network (250) may exchange data in circuit-switched channels and / or packet-switched channels. Representative networks include telecommunications networks, local area networks, wide area networks and / or the Internet. For the purposes of the present discussion, unless otherwise explained below, the architecture and topology of the network (250) may be immaterial to the operation of the present disclosure.
[0036] As examples of applications of the disclosed subject matter, Figure 3 The arrangement of a video encoder and a video decoder in a streaming environment is shown. The disclosed subject matter is equally applicable to other video-enabled applications including, for example, video conferencing, digital television, storing compressed video on digital media including CDs, DVDs, memory sticks, etc.
[0037] The streaming system may include a capture subsystem (313) that may include a video source (301), such as a digital camera, that creates, for example, an uncompressed video picture stream (302). In an example, the video picture stream (302) includes samples captured by the digital camera. The video picture stream (302), depicted as a thick line to emphasize the high data volume when compared to the encoded video data (304) (or encoded video bitstream), may be processed by an electronic device (320) including a video encoder (303) coupled to the video source (301). The video encoder (303) may include hardware, software, or a combination thereof to implement or implement various aspects of the disclosed subject matter as described in more detail below. The encoded video data (304) (or encoded video bitstream (304)), depicted as a thin line to emphasize the lower data volume when compared to the video picture stream (302), may be stored on a streaming server (305) for future use. One or more streaming client subsystems, such as Figure 3 The client subsystems (306) and (308) in the streaming server (305) can access the streaming server (305) to retrieve copies (307) and (309) of the encoded video data (304). The client subsystem (306) can include, for example, a video decoder (310) in an electronic device (330). The video decoder (310) decodes the incoming copy (307) of the encoded video data and creates an output video picture stream (311) that can be presented on a display (312) (e.g., a display screen) or another rendering device (not depicted). In some streaming systems, the encoded video data (304), (307), and (309) (e.g., a video bitstream) can be encoded according to certain video encoding / compression standards. Examples of such standards include ITU-T Recommendation H.265. In the example, the developing video coding standard is informally referred to as Versatile Video Coding (VVC). The disclosed subject matter can be used in the context of VVC.
[0038] Note that electronic devices (320) and (330) may include other components (not shown). For example, electronic device (320) may include a video decoder (not shown), and electronic device (330) may also include a video encoder (not shown).
[0039] Figure 4 A block diagram of a video decoder (410) according to an embodiment of the present disclosure is shown. The video decoder (410) may be included in an electronic device (430). The electronic device (430) may include a receiver (431) (e.g., a receiving circuit). The video decoder (410) may be used to replace Figure 3 The video decoder (310) in the example.
[0040] A receiver (431) can receive one or more encoded video sequences to be decoded by a video decoder (410); in the same or another embodiment, one encoded video sequence is decoded at a time, wherein the decoding of each encoded video sequence is independent of the decoding of the other encoded video sequences. The encoded video sequences can be received from a channel (401), which can be a hardware / software link to a storage device storing the encoded video data. The receiver (431) can receive the encoded video data as well as other data, such as encoded audio data and / or auxiliary data streams that can be forwarded to their respective consuming entities (not shown). The receiver (431) can separate the encoded video sequences from the other data. To prevent network jitter, a buffer memory (415) can be coupled between the receiver (431) and the entropy decoder / parser (420) (hereinafter referred to as "parser (420)"). In some applications, the buffer memory (415) is part of the video decoder (410). In other applications, the buffer memory (415) can be external to the video decoder (410) (not depicted). In yet other applications, a buffer memory (not depicted) may be external to the video decoder (410) to, for example, prevent network jitter, and another buffer memory (415) may be internal to the video decoder (410) to, for example, handle playout timing. When the receiver (431) receives data from a store / forward device with sufficient bandwidth and controllability or from an isochronous network, the buffer memory (415) may not be required, or the buffer memory (415) may be smaller. For use over a traffic packet network such as the Internet, the buffer memory (415) may be required, which may be relatively large and advantageously have an adaptive size, and may be implemented at least partially in an operating system or similar element (not depicted) external to the video decoder (410).
[0041] The video decoder (410) may include a parser (420) to reconstruct symbols (421) from the encoded video sequence. The categories of these symbols include information for managing the operation of the video decoder (410) and may include information for controlling a presentation device such as a presentation device (412) (e.g., a display screen) that is not part of the electronic device (430) but can be coupled to the electronic device (430), such as Figure 4As shown. The control information for the presentation device may be in the form of a Supplemental Enhancement Information (SEI) message or a Video Usability Information (VUI) parameter set fragment (not depicted). The parser (420) may parse / entropy decode the received coded video sequence. The encoding of the coded video sequence may be performed according to a video coding technique or a video coding standard, and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, etc. The parser (420) may extract a subgroup parameter set for at least one subgroup of the subgroups of pixels in the video decoder from the coded video sequence based on at least one parameter corresponding to the group. The subgroup may include: Group of Pictures (GOP), picture, tile, slice, macroblock, Coding Unit (CU), block, Transform Unit (TU), Prediction Unit (PU), etc. The parser (420) may also extract information from the encoded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, etc.
[0042] The parser (420) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (415), thereby creating symbols (421).
[0043] Depending on the type of coded video picture or portion of a coded video picture (such as inter-frame and intra-frame pictures, inter-frame blocks and intra-frame blocks) and other factors, the reconstruction of the symbol (421) may involve multiple different units. Which units are involved and how they are involved can be controlled by subgroup control information parsed from the coded video sequence by the parser (420). For the sake of brevity, the flow of such subgroup control information between the parser (420) and the multiple units below is not described.
[0044] In addition to the functional blocks already mentioned, the video decoder (410) can be conceptually subdivided into several functional units as described below. In practical implementations operating under commercial constraints, many of these units interact closely with each other and may be at least partially integrated with each other. However, for the purposes of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.
[0045] The first unit is a scaler / inverse transform unit (451). The scaler / inverse transform unit (451) receives quantized transform coefficients as symbols (421) from the parser (420) along with control information, including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The scaler / inverse transform unit (451) can output a block including sample values, which can be input to an aggregator (455).
[0046] In some cases, the output samples of the scaler / inverse transform (451) may belong to an intra-coded block; that is, a block that does not use predictive information from a previously reconstructed picture, but may use predictive information from a previously reconstructed portion of the current picture. Such predictive information may be provided by an intra-picture prediction unit (452). In some cases, the intra-picture prediction unit (452) uses surrounding already reconstructed information obtained from the current picture buffer (458) to generate a block of the same size and shape as the block being reconstructed. For example, the current picture buffer (458) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (455) adds the prediction information already generated by the intra-prediction unit (452) to the output sample information provided by the scaler / inverse transform unit (451) on a per-sample basis.
[0047] In other cases, the output samples of the scaler / inverse transform unit (451) may belong to a block that has been inter-coded and possibly motion compensated. In this case, the motion compensated prediction unit (453) may access the reference picture memory (457) to retrieve samples for prediction. After motion compensation of the retrieved samples according to the symbols (421) belonging to the block, these samples may be added by the aggregator (455) to the output of the scaler / inverse transform unit (451) (in this case referred to as residual samples or residual signal) to generate output sample information. The address in the reference picture memory (457) from which the motion compensated prediction unit (453) retrieves the predicted samples may be controlled by a motion vector, which may be available to the motion compensated prediction unit (453) in the form of a symbol (421) having, for example, X, Y, and reference picture components. Motion compensation may also include interpolation of sample values retrieved from the reference picture memory (457) when using sub-sample accurate motion vectors, motion vector prediction mechanisms, etc.
[0048] The output samples of the aggregator (455) may be subjected to various loop filtering techniques in a loop filter unit (456). The video compression techniques may include in-loop filtering techniques controlled by parameters included in the coded video sequence (also referred to as the coded video bitstream) and available to the loop filter unit (456) as symbols (421) from the parser (420), but may also be responsive to meta-information obtained during decoding of a previous (in decoding order) portion of the coded picture or coded video sequence, and to previously reconstructed and loop filtered sample values.
[0049] The output of the loop filter unit (456) may be a sample stream that may be output to a renderer device (412) and stored in a reference picture memory (457) for future inter-picture prediction.
[0050] Once fully reconstructed, certain coded pictures can be used as reference pictures for future prediction. For example, once the coded picture corresponding to the current picture is fully reconstructed and the coded picture is identified as a reference picture (e.g., by the parser (420)), the current picture buffer (458) can become part of the reference picture memory (457) and a new current picture buffer can be reallocated before starting to reconstruct a subsequent coded picture.
[0051] The video decoder (410) may perform decoding operations according to a predetermined video compression technology or standard, such as ITU-T Recommendation H.265. The encoded video sequence may conform to the syntax specified by the video compression technology or standard used, in the sense that the encoded video sequence follows both the syntax of the video compression technology or standard and the profile recorded in the video compression technology or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technology or standard as tools that are only usable under the profile. For compliance, the complexity of the encoded video sequence is also required to be within the range defined by the hierarchy of the video compression technology or standard. In some cases, the hierarchy limits the maximum picture size, maximum frame rate, maximum reconstruction sampling rate (measured in, for example, megasamples per second), maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further defined by the Hypothetical Reference Decoder (HRD) specification and metadata of the HRD buffer management signaled in the encoded video sequence.
[0052] In an embodiment, a receiver (431) may receive additional (redundant) data along with the encoded video. The additional data may be included as part of the encoded video sequence. The video decoder (410) may use the additional data to properly decode the data and / or more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial, or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, and the like.
[0053] Figure 5 A block diagram of a video encoder (503) according to an embodiment of the present disclosure is shown. The video encoder (503) is included in an electronic device (520). The electronic device (520) includes a transmitter (540) (e.g., a transmission circuit). The video encoder (503) can be used to replace Figure 3 The video encoder (303) in the example of FIG.
[0054] The video encoder (503) can capture video images to be encoded by the video encoder (503) from a video source (501) (not Figure 5 In another example, the video source (501) is a part of the electronic device (520).
[0055] The video source (501) can provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (503), which digital video sample stream can have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, etc.), any color space (e.g., BT.601 Y CrCB, RGB, etc.), and any suitable sampling structure (e.g., Y CrCb 4:2:0, YCrCb 4:4:4). In a media serving system, the video source (501) can be a storage device that stores previously prepared videos. In a video conferencing system, the video source (501) can be a camera that captures local image information as a video sequence. The video data can be provided as multiple individual pictures that are given motion when viewed in sequence. The pictures themselves can be organized as a spatial pixel array, where each pixel can include one or more samples, depending on the sampling structure, color space, etc. used. The relationship between pixels and samples can be easily understood by those skilled in the art. The following description focuses on samples.
[0056] According to an embodiment, the video encoder (503) can encode and compress the pictures of the source video sequence into an encoded video sequence (543) in real time or under any other time constraints required by the application. Implementing an appropriate encoding speed is a function of the controller (550). In some embodiments, the controller (550) controls other functional units described below and is functionally coupled to the other functional units. The coupling is not depicted for the sake of brevity. The parameters set by the controller (550) can include rate control related parameters (picture skipping, quantizer, lambda value for rate-distortion optimization techniques, etc.), picture size, picture group (GOP) layout, maximum motion vector search range, etc. The controller (550) can be configured with other suitable functions related to the video encoder (503) optimized for a specific system design.
[0057] In some embodiments, the video encoder (503) is configured to operate in a coding loop. As a simplified description, in embodiments, the coding loop may include a source encoder (530) (e.g., responsible for creating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture) and a (local) decoder (533) embedded in the video encoder (503). The decoder (533) reconstructs the symbols to create sample data in a manner similar to how the (remote) decoder creates sample data (because in the video compression techniques considered in this application, any compression between the symbols and the encoded video code stream is lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (534). Since the decoding of the symbol stream produces bit-accurate results regardless of the decoder location (local or remote), the contents of the reference picture memory (534) are also bit-accurate between the local encoder and the remote encoder. In other words, the reference picture samples "seen" by the prediction portion of the encoder are exactly the same as the sample values that the decoder will "see" when using the prediction during decoding. This basic principle of reference picture synchronization (and the resulting drift when synchronization cannot be maintained, eg due to channel errors) is also used in some related techniques.
[0058] The operation of the "local" decoder (533) can be combined with the "remote" decoder such as has been described above. Figure 4 The operation of the video decoder (410) described in detail is the same. However, reference is briefly made to Figure 4 , when symbols are available and the entropy encoder (545) and the parser (420) are capable of losslessly encoding / decoding the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (410) including the buffer memory (415) and the parser (420) may not be fully implemented in the local decoder (533).
[0059] At this point, it can be observed that any decoder technology other than parsing / entropy decoding present in the decoder must also be present in substantially the same functional form in the corresponding encoder. For this reason, the disclosed subject matter focuses on decoder operation. The description of encoder technology can be simplified because encoder technology is mutually inverse to the decoder technology described comprehensively. A more detailed description is required only in certain areas and is provided below.
[0060] In some examples, during operation, the source encoder (530) may perform motion-compensated predictive coding, which predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures." In this manner, the encoding engine (532) encodes the differences between pixel blocks of the input picture and pixel blocks of a reference picture that may be selected as a prediction reference for the input picture.
[0061] The local video decoder (533) can decode the coded video data of the picture that can be designated as the reference picture based on the symbols created by the source encoder (530). The operation of the encoding engine (532) can advantageously be a lossy process. When the coded video data can be decoded at the video decoder ( Figure 5 When decoded at a remote location (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (533) replicates the decoding process that the video decoder may perform on the reference pictures and may cause the reconstructed reference pictures to be stored in the reference picture cache (534). In this way, the video encoder (503) may locally store a copy of the reconstructed reference pictures that has common content (absent transmission errors) with the reconstructed reference pictures that will be obtained by the remote video decoder.
[0062] The predictor (535) can perform a prediction search for the encoding engine (532). That is, for a new picture to be encoded, the predictor (535) can search the reference picture memory (534) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that can be used as suitable prediction references for the new picture. The predictor (535) can operate on a pixel block-by-pixel block basis based on sample blocks to find a suitable prediction reference. In some cases, based on the search results obtained by the predictor (535), it can be determined that the input picture can have prediction references taken from multiple reference pictures stored in the reference picture memory (534).
[0063] The controller (550) may manage encoding operations of the source encoder (530), including, for example, setting parameters and subgroup parameters for encoding video data.
[0064] The outputs of all the above functional units may be entropy coded in an entropy encoder (545). The entropy encoder (545) converts the symbols generated by the various functional units into a coded video sequence by losslessly compressing them according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc.
[0065] The transmitter (540) can buffer the encoded video sequence created by the entropy encoder (545) in preparation for transmission via a communication channel (560), which can be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (540) can combine the encoded video data from the video encoder (503) with other data to be transmitted, such as encoded audio data and / or an auxiliary data stream (source not shown).
[0066] The controller (550) can manage the operation of the video encoder (503). During encoding, the controller (550) can assign each encoded picture a certain coded picture type that may affect the encoding techniques that can be applied to the corresponding picture. For example, a picture can generally be assigned to any of the following picture types:
[0067] An intra picture (I picture) is a picture that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow for different types of intra pictures, including, for example, Independent Decoder Refresh (IDR) pictures. Those skilled in the art are aware of these variations of I pictures and their corresponding applications and features.
[0068] A predictive picture (P picture) may be a picture that can be encoded and decoded using intra prediction or inter prediction, which uses at most one motion vector and a reference index to predict sample values for each block.
[0069] Bidirectionally predictive pictures (B pictures), which can be pictures that can be encoded and decoded using intra prediction or inter prediction, which uses up to two motion vectors and reference indices to predict the sample values of each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstructing a single block.
[0070] A source picture may typically be spatially subdivided into blocks of samples (e.g., blocks of 4×4, 8×8, 4×8, or 16×16 samples, respectively) and coded block by block. These blocks may be predictively coded with reference to other (already coded) blocks, determined by the coding allocation applied to the block's corresponding picture. For example, blocks of an I picture may be non-predictively coded, or they may be predictively coded (spatial prediction or intra prediction) with reference to already coded blocks of the same picture. Pixel blocks of a P picture may be predictively coded with reference to one previously coded reference picture via spatial prediction or via temporal prediction. Blocks of a B picture may be predictively coded with reference to one or two previously coded reference pictures via spatial prediction or via temporal prediction.
[0071] The video encoder (503) may perform encoding operations according to a predetermined video coding technique or standard, such as ITU-T Recommendation H.265. In operation of the video encoder (503), the video encoder (503) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in the input video sequence. Thus, the encoded video data may conform to the syntax specified by the video coding technique or standard used.
[0072] In an embodiment, the transmitter (540) may transmit additional data when transmitting the encoded video. The source encoder (530) may include such data as part of the encoded video sequence. The additional data may include temporal / spatial / SNR enhancement layers, other forms of redundant data such as redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.
[0073] The captured video may be taken as a time sequence of multiple source pictures (video pictures). Intra-picture prediction (often simply referred to as intra prediction) exploits spatial correlations in a given picture, while inter-picture prediction exploits (temporal or other) correlations between pictures. In an example, a particular picture being encoded / decoded (which is referred to as the current picture) is divided into blocks. When a block in the current picture is similar to a reference block in a reference picture that was previously encoded in the video and is still buffered, the block in the current picture can be encoded by a vector called a motion vector. The motion vector points to a reference block in a reference picture, and in the case of using multiple reference pictures, the motion vector may have a third dimension that identifies the reference picture.
[0074] In some embodiments, bidirectional prediction techniques can be used for inter-picture prediction. According to bidirectional prediction techniques, two reference pictures are used, for example, a first reference picture and a second reference picture, both preceding the current picture in the video in decoding order (but potentially in the past and future, respectively, in display order). A block in the current picture can be encoded using a first motion vector pointing to a first reference block in the first reference picture and a second motion vector pointing to a second reference block in the second reference picture. The block can be predicted using a combination of the first and second reference blocks.
[0075] In addition, merge mode technology can be used in inter-frame picture prediction to improve coding efficiency.
[0076] According to some examples of the present disclosure, predictions such as inter-picture prediction and intra-picture prediction are performed in units of blocks. For example, according to the HEVC standard, a picture in a video picture sequence is divided into coding tree units (CTUs) for compression, and the CTUs in the picture have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU includes three coding tree blocks (CTBs), each of which is a luminance CTB and two chrominance CTBs. Each CTU can be recursively split into one or more coding units (CUs) using a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or four 32×32 pixel CUs, or sixteen 16×16 pixel CUs. In the example, each CU is analyzed to determine a prediction type for the CU, such as an inter prediction type or an intra prediction type. Depending on temporal and / or spatial predictability, the CU is split into one or more prediction units (PUs). Typically, each PU includes a luma prediction block (PB) and two chroma PBs. In an embodiment, the prediction operation in encoding (encoding / decoding) is performed in units of prediction blocks. Using the luma prediction block as an example of a prediction block, the prediction block includes a matrix of pixel values (e.g., luma values), such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, etc.
[0077] Figure 6 A diagram of a video encoder (603) according to another embodiment of the present disclosure is shown. The video encoder (603) is configured to receive a processed block (e.g., a prediction block) of sample values within a current video picture in a sequence of video pictures and to encode the processed block into an encoded picture that is part of an encoded video sequence. In an example, the video encoder (603) is used instead of Figure 3The video encoder (303) in the example.
[0078] In the HEVC example, the video encoder (603) receives a matrix of sample values for a processing block, such as a prediction block of 8×8 samples. The video encoder (603) uses, for example, rate-distortion optimization to determine whether the processing block is best encoded using intra mode, inter mode, or bi-prediction mode. In the case where the processing block is to be encoded in intra mode, the video encoder (603) may encode the processing block into a coded picture using intra prediction techniques; and in the case where the processing block is to be encoded in inter mode or bi-prediction mode, the video encoder (603) may encode the processing block into a coded picture using inter prediction or bi-prediction techniques, respectively. In some video coding techniques, the merge mode may be an inter-picture prediction submode, in which a motion vector is derived from one or more motion vector predictors without resorting to an encoded motion vector component external to the predictor. In some other video coding techniques, there may be a motion vector component applicable to the subject block. In examples, the video encoder (603) includes other components, such as a mode decision module (not shown) that determines the mode for the processing block.
[0079] exist Figure 6 In the example of , the video encoder (603) includes Figure 6 Shown are an inter-frame encoder (630), an intra-frame encoder (622), a residual calculator (623), a switch (626), a residual encoder (624), a general controller (621), and an entropy encoder (625) coupled together.
[0080] The inter-frame encoder (630) is configured to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., a block in a previous picture and a block in a subsequent picture), generate inter-frame prediction information (e.g., a motion vector, merge mode information, a description of redundant information according to an inter-frame coding technique), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technique. In some examples, the reference picture is a decoded reference picture decoded based on the encoded video information.
[0081] The intra encoder (622) is configured to: receive samples of a current block (e.g., a processing block); in some cases compare the block with an already encoded block in the same picture; generate quantization coefficients after transformation; and in some cases also generate intra prediction information (e.g., intra prediction direction information according to one or more intra coding techniques). In an example, the intra encoder (622) further calculates an intra prediction result (e.g., a predicted block) based on the intra prediction information and a reference block in the same picture.
[0082] The general controller (621) is configured to determine general control data and control other components of the video encoder (603) based on the general control data. In an example, the general controller (621) determines a mode of the block and provides a control signal to the switch (626) based on the mode. For example, when the mode is intra mode, the general controller (621) controls the switch (626) to select the intra mode result for use by the residual calculator (623) and controls the entropy encoder (625) to select intra prediction information and include the intra prediction information in the bitstream; and when the mode is inter mode, the general controller (621) controls the switch (626) to select the inter prediction result for use by the residual calculator (623) and controls the entropy encoder (625) to select inter prediction information and include the inter prediction information in the bitstream.
[0083] The residual calculator (623) is configured to calculate the difference (residual data) between the received block and the prediction result selected from the intra encoder (622) or the inter encoder (630). The residual encoder (624) is configured to operate based on the residual data to encode the residual data to generate transform coefficients. In an example, the residual encoder (624) is configured to convert the residual data from the spatial domain to the frequency domain and generate transform coefficients. The transform coefficients are then quantized to obtain quantized transform coefficients. In various embodiments, the video encoder (603) further includes a residual decoder (628). The residual decoder (628) is configured to perform an inverse transform and generate decoded residual data. The decoded residual data can be used appropriately by the intra encoder (622) and the inter encoder (630). For example, the inter encoder (630) can generate a decoded block based on the decoded residual data and inter prediction information, and the intra encoder (622) can generate a decoded block based on the decoded residual data and intra prediction information. In some examples, the decoded blocks are appropriately processed to generate decoded pictures, and these decoded pictures can be buffered in memory circuitry (not shown) and used as reference pictures.
[0084] The entropy encoder (625) is configured to format a bitstream to include encoded blocks. The entropy encoder (625) is configured to include various information in the bitstream according to a suitable standard, such as the HEVC standard. In an example, the entropy encoder (625) is configured to include general control data, selected prediction information (e.g., intra-frame prediction information or inter-frame prediction information), residual information, and other suitable information in the bitstream. Note that according to the disclosed subject matter, when a block is encoded in inter-frame mode or the merge sub-mode of bi-directional prediction mode, there is no residual information.
[0085] Figure 7A diagram of a video decoder (710) according to another embodiment of the present disclosure is shown. The video decoder (710) is configured to receive an encoded picture as part of an encoded video sequence and decode the encoded picture to generate a reconstructed picture. In an example, the video decoder (710) is used instead of Figure 3 The video decoder (310) in the example.
[0086] exist Figure 7 In this example, the video decoder (710) includes Figure 7 Shown are an entropy decoder (771), an inter-frame decoder (780), a residual decoder (773), a reconstruction module (774), and an intra-frame decoder (772) coupled together.
[0087] The entropy decoder (771) can be configured to reconstruct certain symbols from the encoded picture, which represent syntax elements that constitute the encoded picture. Such symbols may include, for example, the mode in which the block is encoded (e.g., intra mode, inter mode, bidirectional prediction mode, a merged submode of the latter two, or another submode), prediction information (e.g., intra prediction information or inter prediction information) that can identify certain samples or metadata for prediction by the intra decoder (772) or the inter decoder (780), respectively, residual information in the form of, for example, quantized transform coefficients, etc. In an example, when the prediction mode is inter or bidirectional prediction mode, the inter prediction information is provided to the inter decoder (780); and when the prediction type is intra prediction type, the intra prediction information is provided to the intra decoder (772). The residual information can be subjected to inverse quantization and provided to the residual decoder (773).
[0088] The inter-frame decoder (780) is configured to receive the inter-frame prediction information and generate an inter-frame prediction result based on the inter-frame prediction information.
[0089] The intra decoder (772) is configured to receive the intra prediction information and generate a prediction result based on the intra prediction information.
[0090] The residual decoder (773) is configured to perform inverse quantization to extract dequantized transform coefficients and process the dequantized transform coefficients to convert the residual from the frequency domain to the spatial domain. The residual decoder (773) may also require certain control information (to obtain quantizer parameters (QP)), and this information may be provided by the entropy decoder (771) (the data path is not shown because this is only low-level control information).
[0091] The reconstruction module (774) is configured to combine the residual output by the residual decoder (773) with the prediction result (which may be output by the inter-frame prediction module or the intra-frame prediction module) in the spatial domain to form a reconstructed block, which may be part of a reconstructed picture, which in turn may be part of a reconstructed video. Note that other suitable operations such as deblocking operations may be performed to improve visual quality.
[0092] Note that the video encoder (303), video encoder (503), and video encoder (603), as well as the video decoder (310), video decoder (410), and video decoder (710) may be implemented using any suitable technology. In one embodiment, the video encoder (303), video encoder (503), and video encoder (603), as well as the video decoder (310), video decoder (410), and video decoder (710) may be implemented using one or more integrated circuits. In another embodiment, the video encoder (303), video encoder (503), and video encoder (603), as well as the video decoder (310), video decoder (410), and video decoder (710) may be implemented using one or more processors executing software instructions.
[0093] Various aspects of the present disclosure disclose image and video coding techniques, such as bidirectional prediction with context-adaptive weights. For example, a bidirectional prediction method with context-adaptive weights can be used in inter-frame coding.
[0094] The video coding format may include any suitable video coding format, for example, an open video coding format designed for video transmission over the Internet, such as the Alliance for Open Media (AOMedia) Video 1 (AV1) video coding format or a next-generation AOMedia video format that exceeds AV1. Video coding standards may include the High Efficiency Video Coding (HEVC) standard, a next-generation video coding that exceeds HEVC (e.g., Versatile Video Coding (VVC)), etc.
[0095] Generally, a picture is partitioned into blocks, and a block may be a unit for various processes such as encoding, prediction, transform, etc. Various block partitioning techniques may be used.
[0096] Figure 8An example of a partitioning technique used by AOMedia in the video coding format VP9 is shown. For example, a picture (810) is partitioned into a plurality of blocks (820) of size 64×64 (e.g., 64 samples×64 samples). Furthermore, a 4-way partitioning tree may start at the 64×64 level and work its way down to smaller blocks, and the lowest level may be a 4×4 level (e.g., a block size of 4 samples×4 samples). In some examples, additional restrictions may apply to blocks 8×8 and below. Figure 8 In the example of , the 64x64 block (820) can be partitioned into smaller blocks using one of the first pass (821), the second pass (822), the third pass (823), and the fourth pass (824). The partition designated as R (shown in the fourth pass (824)) is called a recursive partition because the same partition tree can be repeated at lower levels until the lowest 4x4 level.
[0097] Figure 9 An example of a segmentation technique used in AV1, which is designed for video transmission over the Internet, is shown. AV1 was developed as a successor to VP9. For example, a picture (910) is segmented into a plurality of blocks (920) of size 128×128 (e.g., 128 samples×128 samples). In addition, a 10-way segmentation structure can be used starting from 128×128 to smaller blocks. Figure 9 In the example, a 128x128 block can be partitioned into smaller blocks using one of ten ways (921) to (930). AV1 not only extends the partitioning tree to a 10-way structure, but also increases the maximum size (called a superblock in VP9 / AV1 parlance) to start at 128x128. The partitioning designated as R (shown in way (929)) is called a recursive partitioning because the same partitioning tree can be repeated at lower levels. The 10-way structure can include 4:1 and 1:4 rectangular partitioning, as shown in (921) and (928). In the example, none of the rectangular partitions can be further subdivided. In addition, AV1 adds more flexibility for using partitioning below the 8x8 level. For example, 2x2 chroma inter prediction is possible for some cases.
[0098] In some examples, the block partitioning structure is called a coding tree. In an example (e.g., HEVC), the coding tree can have a quadtree structure, with each splitting splitting a larger square block into four smaller square blocks. In some examples, the picture is split into coding tree units (CTUs), and the CTUs are then split into smaller blocks using a quadtree structure. According to the quadtree structure, the coding tree unit (CTU) is split into coding units (CUs) to accommodate various local features. A decision can be made at the CU level as to whether to use inter-picture prediction (or inter-frame prediction) (temporal) or intra-picture prediction (or intra-frame prediction) (spatial) to encode a picture area. Each CU can be further split into one, two, or four prediction units (PUs) according to the PU split type. Within a PU, the same prediction process is applied, and relevant information (e.g., prediction information) is sent to the decoder based on the PU.
[0099] After obtaining the residual block by applying the prediction process based on the PU split type, the CU can be partitioned into transform units (TUs) according to another quadtree structure. In the example of HEVC, there are multiple partitioning concepts, including CU, PU, and TU. In some embodiments, a CU or TU can only have a square shape, while a PU can have a square or rectangular shape. In some embodiments, a coding block can be further split into four square sub-blocks, and a transform is performed on each sub-block, i.e., a TU. Each TU can be further recursively split into smaller TUs using a quadtree structure called a residual quad tree (RQT).
[0100] At picture boundaries, in some examples (eg, HEVC), an implicit quadtree split may be employed such that a block remains quadtree split until the size fits within a picture boundary.
[0101] In some examples (e.g., VVC), the block partitioning structure can use a quad tree plus binary tree (QTBT) block partitioning structure. The QTBT structure can remove the concept of multiple partition types (CU, PU, and TU concepts) and support greater flexibility in CU partitioning shapes. In the QTBT block partitioning structure, the CU can have a square or rectangular shape.
[0102] Figure 10A Shown by using Figure 10BThe CTU (1010) is partitioned using the QTBT block partition structure (1020) shown. The CTU (1010) is first partitioned using a quadtree structure. The leaf nodes of the quadtree tree are further partitioned using a binary tree structure or a quadtree structure. In a binary tree partition, there can be two types of partitions, namely, symmetric horizontal partitioning (e.g., marked as "0" in the QTBT block partition structure (1020)) and symmetric vertical partitioning (e.g., marked as "1" in the QTBT block partition structure (1020)). Leaf nodes that are not further split are called CUs, and the CUs can be used for prediction and transform processing without further partitioning. Therefore, CUs, PUs, and TUs have the same block size in the QTBT block partition structure.
[0103] In some examples (e.g., JEM), a CU may include coding blocks (CBs) for different color components. For example, in the case of P slices and B slices in 4:2:0 chroma format, a CU contains one luma CB and two chroma CBs. A CU may include a CB for a single color component. For example, in the case of I slices, a CU contains only one luma CB or only two chroma CBs.
[0104] In some implementations, the following parameters are defined for the QTBT block segmentation scheme:
[0105] –CTU size: The size of the root node of the quadtree, which is the same as the concept in HEVC.
[0106] –MinQTSize: Minimum allowed quadtree leaf node size.
[0107] –MaxBTSize: Maximum allowed binary tree root node size.
[0108] –MaxBTDepth: Maximum allowed binary tree depth.
[0109] –MinBTSize: The minimum allowed binary tree leaf node size.
[0110] In one example of a QTBT block partitioning structure, the CTU size is set to 128×128 luma samples with two corresponding 64×64 chroma sample blocks, MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4×4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate quadtree leaf nodes. Quadtree leaf nodes can have sizes from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). If the leaf quadtree node is 128×128, the leaf quadtree node will not be further split by the binary tree because the size exceeds MaxBTSize (i.e., 64×64). Otherwise, the leaf quadtree node can be further split by the binary tree. Therefore, the quadtree leaf node is also the root node of the binary tree and it has a binary tree depth of 0.
[0111] When the binary tree depth reaches MaxBTDepth (i.e., 4), no further splitting is considered. When the width of the binary tree node is equal to MinBTSize (i.e., 4), no further horizontal splitting is considered. Similarly, when the height of the binary tree node is equal to MinBTSize, no further vertical splitting is considered. In the case where no further splitting is required, the leaf nodes of the binary tree are further processed by prediction and transform processing. In an embodiment, the maximum CTU size is 256×256 luma samples.
[0112] exist Figure 10A and Figure 10B In the figure, solid lines indicate quadtree splits and dashed lines indicate binary tree splits. In each split (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which split type (i.e., horizontal or vertical) is used. For example, 0 indicates horizontal split and 1 indicates vertical split. For quadtree splits, there is no need to indicate the split type because quadtree splits can split the block both horizontally and vertically to produce four sub-blocks of equal size.
[0113] In some embodiments, the QTBT block partitioning scheme supports the flexibility of having separate QTBT block partitioning structures for luma and chroma. For example, for P slices and B slices, the luma blocks and chroma blocks in one CTU share the same QTBT block partitioning structure. However, for I slices, the luma CTBs are partitioned into CUs using the QTBT block partitioning structure, and the chroma blocks are partitioned into chroma CUs using another QTBT block partitioning structure. Therefore, a CU in an I slice consists of coding blocks for the luma component or coding blocks for two chroma components, and a CU in a P slice or B slice consists of coding blocks for all three color components.
[0114] In some examples (e.g., HEVC), inter prediction for small blocks is restricted to reduce memory access for motion compensation. For example, bidirectional prediction is not supported for 4×8 blocks and 8×4 blocks, and inter prediction is not supported for 4×4 blocks.
[0115] In addition, in some examples (e.g., VCC), a multi-type tree (MTT) block partitioning structure is used. In some examples, the MTT block partitioning structure is a more flexible tree structure than the QTBT block partitioning structure. In MTT, in addition to quadtree partitioning and binary tree partitioning, ternary tree (TT) partitioning can also be used. TT can include horizontal center-side ternary tree partitioning and vertical center-side ternary tree partitioning.
[0116] Figure 11A shows an example of vertical center-side ternary tree partitioning, Figure 11B An example of a horizontal center-side ternary tree segmentation is shown. TT segmentation can complement quadtree and binary tree segmentation. For example, ternary tree segmentation can capture objects located in the center of a block, while quadtree and binary tree splits pass through the block center. In the example, the width and height of the ternary tree segmentation are powers of 2, so no additional transform segmentation is required.
[0117] The design of block partitioning, such as a two-level tree, is mainly to reduce complexity. The traversal complexity of the tree can be T D , where T represents the number of split types and D is the depth of the tree.
[0118] Bi-prediction with CU-level weighting (BCW) can be used for inter prediction. In an embodiment, such as in HEVC, the bi-prediction mode refers to an inter prediction mode in which a bi-prediction signal is generated by averaging two prediction signals obtained from two different reference pictures and / or using two different motion vectors. In an embodiment, such as in VVC, the bi-prediction mode is extended beyond averaging (with equal weights for the two prediction signals) to allow a weighted average of the two prediction signals, such as shown in Equation 1.
[0119] P bi-pred =((8-w)*P0+w*P1+4)>>3 (1)
[0120] Referring to Equation 1, the bidirectional prediction signal P is generated by averaging two prediction signals P0 and P1 from two different reference pictures. bi-pred The weight w may be used to indicate the respective weights (8-w) and w of the two prediction signals P0 and P1.
[0121] A set of predefined weights may be used for the weight w. In this example, five weights are allowed in the weighted average bidirectional prediction, and the weight w may be one of -2, 3, 4, 5, and 10 (e.g., w∈{-2,3,4,5,10}). Specifically, when the weight w is 4, equal weights are used in Equation 1, and when the weight is one of -2, 3, 5, and 10, unequal weights are used in Equation 1.
[0122] For each bidirectionally predicted CU, the weight w can be determined in one of two ways: 1) for a non-merged CU, the weight index (e.g., BCW weight index) can be signaled after the motion vector difference (MVD); 2) for a merged CU, the weight index can be inferred (e.g., inherited) from one or more neighboring blocks based on the merge candidate index.
[0123] In an example, BCW mode is applied only to CUs with 256 or more luma samples (e.g., CU width multiplied by CU height is greater than or equal to 256). In an example, for low-latency pictures, all five weights are used (e.g., -2, 3, 4, 5, and 10). In an example, for non-low-latency pictures, only a subset of the five weights is used, for example, three weights are used (e.g., 3, 4, 5 or w∈{3,4,5}).
[0124] At the encoder, a fast search algorithm can be applied to determine the weight index without significantly increasing the encoder complexity. An implementation of the fast search algorithm can be described as follows.
[0125] When combined with the Adaptive Motion Vector Resolution (AMVR) mode, if the current picture is a low-latency picture, unequal weights are conditionally checked only for 1-pixel motion vector precision and 4-pixel motion vector precision (e.g., w is one of -2, 3, 5, and 10 in Equation 1). For example, when the AMVR mode is used and the current picture is a low-latency picture, unequal weights only apply to 1-pixel motion vector precision and 4-pixel motion vector precision, so unequal weights can be checked for 1-pixel motion vector precision and 4-pixel motion vector precision. If another motion vector precision is used (e.g., 1 / 2, 1 / 4, or 1 / 8), equal weights are used (e.g., w=4) and the encoder does not check unequal weights.
[0126] In an example, when the BCW mode is combined with the affine mode, affine motion estimation (ME) may be performed for unequal weights if and only if the affine mode is selected as the current best mode.
[0127] In the example, unequal weights are only conditionally checked when the two reference pictures in bi-directional prediction are identical (P0 and P1 are from the same reference picture).
[0128] In the example, unequal weights are not searched when certain conditions are met, which depend on the picture order count (POC) distance between the current picture and the corresponding reference picture, the encoding quantization parameter (QP), and the temporal level (e.g., the temporal layer of the current picture and the corresponding reference picture).
[0129] The weight index can be encoded using one context coding bit (bin) (also called the first context coding bit), where the context coding bit is followed by additional bits (also called bypass coding bits). The first context coding bit can indicate whether equal weights are used (e.g., w=4). If unequal weights are used, bypass coding can be used to signal the additional bits to indicate which unequal weights are used.
[0130] In some examples, such as AVC, HEVC, and VVC, weighted prediction (WP) is used as a coding tool. WP can be used to efficiently encode video content with fading. Weighting parameters, including weights and offsets used in WP, can be signaled for each reference picture in each of the reference picture lists L0 and L1. The weights and offsets for the corresponding reference pictures can be applied during motion compensation.
[0131] In some examples, according to WP, the inter-frame prediction signal P is replaced with a linear weighted prediction signal P' (with weight w' and offset o), for example according to Equation 2 for unidirectional prediction:
[0132] One-way prediction: P'=w'×P+o Formula 2
[0133] In the example, for bidirectional prediction, the inter-frame prediction signal P0 is used to reference L0, the weight w0 and the offset o0 are used to reference L0, and the inter-frame prediction signal P1 is used to reference L1, the weight w1 and the offset o1 are used to reference L0, then the linear weighted prediction signal P' can be calculated according to Formula 3:
[0134] Bidirectional prediction: P' = (w0 × P0 + o0 + w1 × P1 + o1) / 2 Equation 3
[0135] In some examples, WP and BCW are designed for different types of video content. To avoid interactions between WP and BCW, which can complicate certain decoder designs (e.g., VVC decoder designs), if a CU uses WP, the weight index used in BCW is not signaled, and the weight w can be inferred to be 4 (i.e., equal weights are applied). In this example, if one of WP and BCW is applied to a block, the other is not applied to the block.
[0136] For example, for a merged CU predicted using normal merge mode or inherited affine merge mode, the BCW weight index can be inferred from neighboring blocks based on the merge candidate index. For a CU predicted using constructed affine merge mode, affine motion information can be constructed based on the motion information of up to three blocks. The BCW weight index of a CU using constructed affine merge mode can be set equal to the BCW weight index of the first control point MV.
[0137] In an example, such as in VVC, the Combined Intra-Inter Prediction (CIIP) mode and the BCW mode cannot be jointly applied to a CU. When a CU is encoded in CIIP mode, the BCW weight index of the current CU can be set to a value indicating equal weight (e.g., 2).
[0138] In some embodiments, a technique called local illumination compensation (LIC) can be used for video coding. LIC is based on a linear model of illumination variation, using parameters such as a scale factor denoted by "a" and an offset denoted by "b." LIC can be adaptively enabled or disabled for each inter-mode coded coding unit (CU).
[0139] In an embodiment, when LIC is applied to a CU, a scaling factor “a” and an offset “b” may be derived using a least square error method based on neighboring samples of the current CU and corresponding reference samples.
[0140] Figure 12 A diagram showing neighboring samples of the current CU (1200) and a reference block (1210) of the current CU (1200) is shown. Figure 12 In the example, neighboring samples of the current CU (1200) and the reference block (1210) are subsampled, for example, using 2:1 subsampling. In the example, subsampled (e.g., 2:1 subsampling) neighboring samples of the current CU (1200) and corresponding samples in the reference picture identified by motion information of the current CU (1200) or a sub-CU are used.
[0141] Illumination compensation (IC) parameters (eg, scale factor “a” and offset “b”) may be derived and applied to each prediction direction separately.
[0142] In an example, when the current CU is encoded using merge mode, the LIC flag is copied from the neighboring block in a manner similar to copying motion information in merge mode. In another example, a LIC flag is signaled for the CU to indicate whether LIC is applied.
[0143] In some embodiments, when LIC is enabled for a picture, an additional CU-level rate distortion (RD) check is performed to determine whether to apply LIC to the CU. When LIC is enabled for a CU, the mean-removed sum of absolute differences (MR-SAD) and mean-removed sum of absolute Hadamard-transformed differences (MR-SATD) may be used for integer-pixel based motion search and fractional-pixel based motion search, respectively, instead of the sum of absolute differences (SAD) and the sum of absolute Hadamard-transformed differences (SATD).
[0144] To reduce coding complexity, in an example, such as in JEM, the following coding scheme is applied. When there is no significant illumination change between the current picture and the corresponding reference picture, LIC can be disabled for the entire picture. To identify this situation, the encoder can calculate a histogram of the current picture and each of the current picture's reference pictures. If the difference in the corresponding histogram between the current picture and each of the current picture's reference pictures is less than a threshold (e.g., a predefined threshold), LIC is disabled for the current picture. Otherwise, LIC is enabled for the current picture.
[0145] In some examples, such as in BCW mode, the weights (also referred to as weight values) applied to the two prediction blocks (e.g., w and / or (8-w) in Equation 1) are explicitly signaled or inherited from neighboring blocks (e.g., spatially neighboring blocks and / or temporally neighboring blocks). On the other hand, since the weights (e.g., w and / or (8-w) in Equation 1) reflect the linear relationship between the current block and the prediction block (e.g., the forward prediction block and the backward prediction block), the neighboring reconstructed samples (also referred to as reconstructed samples) of the current block and the prediction block can be associated with similar weights. Therefore, the neighboring reconstructed samples of the current block and the prediction block can be used to determine (e.g., estimate) the weights, for example, to save signaling overhead.
[0146] In the present disclosure, a prediction block may also be referred to as a reference block, and the prediction block (or reference block) of the current block being reconstructed may include a first prediction block (or first reference block) in a first reference picture and a second prediction block (or second reference block) in a second reference picture. The current block is in the current picture. The current picture is different from the first reference picture and the current picture is different from the second reference picture. The first reference picture may be different from or the same as the second reference picture. In some examples, one of the first prediction block and the second prediction block is a forward prediction block, and the other of the first prediction block and the second prediction block is a backward prediction block. In some examples, the first prediction block and the second prediction block are forward prediction blocks. In some examples, the first prediction block and the second prediction block are backward prediction blocks.
[0147] The adjacent reconstructed samples of the current block, the first prediction block of the current block (e.g., forward or backward prediction block), and the second prediction block of the current block (e.g., forward or backward prediction block) can be referred to as the template of the current block (or current template), the template of the first prediction block (or first template), and the template of the second prediction block (or second template), respectively.
[0148] Figure 13 An example of templates of a current block (1300) and prediction blocks (or reference blocks) (1301) to (1302) according to an embodiment of the present disclosure is shown. The template (1323) of the current block (1300) includes adjacent reconstructed samples of the current block (1300), such as adjacent reconstructed samples in the top row (1313) and the left column (1314) of the current block (1300) located above and to the left of the current block (1300), respectively. The template (1321) of the first reference block (1301) and the template (1325) of the second reference block (1302) correspond to the template (1323) of the current block (1300). Specifically, in Figure 13In the example shown, the template (1321) includes adjacent reconstructed samples of the first reference block (1301), such as adjacent reconstructed samples in the top row (1311) and left column (1312) of the first reference block (1301) located above and to the left of the first reference block (1301), respectively. The template (1325) includes adjacent reconstructed samples of the second reference block (1302), such as adjacent reconstructed samples in the top row (1315) and left column (1316) of the second reference block (1302) located above and to the left of the second reference block (1302), respectively. A first motion vector (MV) (MV0) points to the first reference block (1301) in the first reference picture, and a second MV (MV1) points to the second reference block (1302) in the second reference picture. If the first reference picture is a forward reference picture and the first reference block (1301) is a forward prediction block, MV0 can be referred to as a forward MV. If the first reference picture is a backward reference picture and the first reference block (1301) is a backward prediction block, MV0 can be called a backward MV. MV1 can be a forward MV or a backward MV depending on the second prediction block (1302) or the second reference picture, similar to what is described with reference to MV0.
[0149] Figure 13 A template is shown that includes the top row and left column of the current block and the predicted block. A template for a block, such as one of the current block or the predicted block, can include any suitable adjacent reconstructed samples of the block. According to aspects of the present disclosure, a template for a block can include any suitable spatially adjacent reconstructed samples of the block. A template for a block can include an upper left sample located above and to the left of the block, a top row above the block, a left column to the left of the block, and / or adjacent reconstructed samples at other suitable locations relative to the block. A template for a block can include adjacent reconstructed samples that are adjacent to the block and / or adjacent reconstructed samples that are not adjacent to the block.
[0150] According to aspects of the present disclosure, the shapes of the templates (1323), (1321), and (1325) of the current block (1300), the first reference block (1301), and the second reference block (1302) may be the same. The relative positions of the templates (1323), (1321), and (1325) relative to the corresponding current block (1300), the first reference block (1301), and the second reference block (1302) may be the same. The number of adjacent reconstructed samples in each of the templates (1321), (1323), and (1325) may be the same. For example, template (1323) includes a top row (1313) and a left column (1314) adjacent to the current block (1300), template (1321) includes a top row (1311) and a left column (1312) adjacent to the first reference block (1301), and template (1325) includes a top row (1315) and a left column (1316) adjacent to the second reference block (1302).
[0151] When the bi-directional prediction motion compensation mode is applied to predict the current block, as described in Equation 1, the samples in the current block (eg, the sample values are determined by the bi-directional prediction signal P bi-pred denoted) can be predicted based on a weighted average of corresponding samples in a first prediction block (e.g., sample values denoted by a prediction signal P0) and a second prediction block (e.g., sample values denoted by a prediction signal P1). According to aspects of the present disclosure, the weights used in a bidirectional prediction motion compensation mode (e.g., weight w in Equation 1) can be determined based on the current neighboring reconstructed samples (or current template) of the current block, the first neighboring reconstructed samples (or first template) of the first prediction block, and / or the second neighboring reconstructed samples (or second template) of the second prediction block. Referring to Figure 13 , the weights used in the bi-prediction motion compensation mode can be determined based on the current neighboring reconstructed samples of the current block (e.g., template (1323)), the first neighboring reconstructed samples of the first prediction block (e.g., template (1321) of the first reference block (1301)) and / or the second neighboring reconstructed samples of the second prediction block (e.g., template (1325) of the second reference block (1302)).
[0152] In an example, the entire current template of the current block, the entire first template of the first prediction block, and / or the entire second template of the second prediction block are used to determine the weights. In an example, a subset of samples in the current template of the current block, a subset of samples in the first template of the first prediction block, and / or a subset of samples in the second template of the second prediction block are used to determine the weights.
[0153] According to various aspects of the present disclosure, a first weight for a first prediction block (e.g., (8-w) in Equation 1) and a second weight for a second prediction block (e.g., w in Equation 1) are used in a bi-predictive motion compensation mode to predict a current block (e.g., using Equation 1). Generally speaking, when determining the weights used in the bi-predictive motion compensation mode, the first and second weights can be determined based on a relationship between the weight and the first weight and / or a relationship between the weight and the second weight. The first and second weights can be interdependent, for example, the sum of the first and second weights is a constant. Therefore, when the first or second weight is determined, the other weight is also determined based on the relationship between the first and second weights. In this example, the weight used in the bi-predictive motion compensation mode is the first weight. Therefore, when the weight is determined, the second weight is also determined. In this example, the weight used in the bi-predictive motion compensation mode is the second weight. Therefore, when the weight is determined, the first weight is also determined.
[0154] According to aspects of the present disclosure, the weights used in the bi-predictive motion compensation mode (e.g., weight w in Equation 1) may be determined based on the current neighboring reconstructed samples of the current block, the first neighboring reconstructed samples of the first prediction block, and the second neighboring reconstructed samples of the second prediction block.
[0155] Furthermore, the samples in the current block may be reconstructed based on a weighted average of corresponding samples in the first prediction block and the second prediction block using the determined weights.
[0156] The weights (or weighted values) applied to prediction blocks (e.g., forward prediction blocks and / or backward prediction blocks) in a bi-predictive motion compensation mode may depend on (including but not limited to) neighboring reconstructed samples of the current block, the first prediction block, and / or the second prediction block.
[0157] In an embodiment, neighboring reconstructed samples of the current block (or current template) and neighboring reconstructed samples of the prediction block (e.g., forward and / or backward prediction block) (or first template and / or second template) are used to derive an index value associated with each predefined weight (or weighted value) stored, for example, in an encoder and / or decoder.
[0158] In an embodiment, a set of weights (or weight values) may be predefined at the encoder and decoder, and this set of weights is referred to as predefined weights. The set of weights may be sorted based on the current template of the current block, the first template of the first prediction block, and / or the second template of the second prediction block. In an example, the set of weights is sorted based on the current template of the current block, the first template of the first prediction block, and the second template of the second prediction block. An encoder-side sorting index (e.g., an index value) may be associated with each weight based on the sorting, and thus, the encoder-side sorting index may be associated with each of the sorted predefined weights. The weights to be used in the bi-predictive motion compensation mode may be selected based on the sorting. At the encoder, the corresponding sorting index (e.g., an index value) associated with the selected weights may then be signaled in the video bitstream. For example, the predefined weights include five different weights a0, b0, c0, d0, and e0. Based on the current template, the first template, and the second template, the predefined weights may be sorted into sorted predefined weights d0, a0, b0, e0, and c0 associated with sorting indices 0, 1, 2, 3, and 4. The encoder may determine, for example, based on the rank order, that the weight d0 associated with rank order index 0 is to be used for bi-predictive motion compensation mode.The rank order index 0 is then signaled in the video bitstream at the encoder.
[0159] At the decoder, the predefined weights can be sorted similarly to the sorting process in the encoder. Specifically, the predefined weights stored in the decoder can be sorted based on the current template of the current block, the first template of the first prediction block, and / or the second template of the second prediction block. A sorting index (e.g., index value) on the decoder side can be associated with each weight based on the sorting, so that the sorting index on the decoder side can be associated with each of the sorted predefined weights. The encoded index values in the video bitstream can be decoded. The weights associated with the decoded index values can be determined or derived based on the sorting index and the associated sorted predefined weights on the decoder side. The determined weights can then be used in a bidirectional prediction motion compensation mode. For example, the predefined weights include five different weights a0, b0, c0, d0, and e0. Based on the current template, the first template, and the second template, the predefined weights can be sorted into sorted predefined weights d0, a0, b0, e0, and c0 associated with sorting indices 0, 1, 2, 3, and 4. Decoded index value 0 is associated with weight d0. The decoder may determine that weight d0 associated with sort index 0 is to be used for bi-predictive motion compensation mode. Then, at the decoder, the determined weight d0 is used for bi-predictive motion compensation mode. In an example, the first weight and / or the second weight are determined based on the determined weight d0 and are further used to predict the current block.
[0160] Typically, a set of weights for the first prediction block and the second prediction block (e.g., the first weight (8-w) for the first prediction block and the second weight w for the second prediction block used in Equation 1) are interdependent. Therefore, the set of weights can be determined based on the first weight or the second weight. In an embodiment, at both the encoder and the decoder, the first weight and / or the second weight can be selected from the set of predefined weights based on a predefined cost measure. The predefined cost measure can be performed (e.g., calculated) using the current template of the current block, the first template of the first prediction block, and / or the second template of the second prediction block. In an embodiment, the selected weights (e.g., the first weight and / or the second weight) are not signaled in the video bitstream. The selected weights can be used in a bidirectional prediction motion compensation mode. Referring to Equation 1, when the first weight or the second weight is determined or selected based on the predefined cost measure, another weight is also determined based on the relationship between the first weight and the second weight. Therefore, a set of weights for the first prediction block and the second prediction block can be determined, such as the weight (8-w) for the first prediction block and the weight w for the second prediction block.
[0161] In an embodiment, at both the encoder and the decoder, the first weight and / or the second weight may be directly calculated using the current template of the current block, the first template of the first prediction block, and / or the second template of the second prediction block. In an example, the first weight and / or the second weight are directly calculated using the current template of the current block, the first template of the first prediction block, and the second template of the second prediction block.
[0162] In an example, the first weight and / or the second weight are derived using a minimum mean square error based on the current template of the current block, the first template of the first prediction block, and / or the second template of the second prediction block. Specifically, using the vector and To represent the adjacent reconstructed samples in the first template, the second template, and the current template, respectively. To find the optimal weights a and (1-a) applied to the first reference block and the second reference block to generate the prediction block of the current block, the following cost is minimized:
[0163]
[0164] Where N is the total number of samples in each of the first template, the second template, and the current template. Given the solution:
[0165]
[0166] Therefore, the first weight a and the second weight (1-a) can be obtained based on Equation 5.
[0167] In an example, the first weight and / or the second weight are derived using a minimum mean square error based on the current template of the current block, the first template of the first predicted block, and / or the second template of the second predicted block. and To represent the adjacent reconstructed samples in the first template, the second template, and the current template, respectively. To find the optimal weights a and (1-a) applied to the first reference block and the second reference block to generate the prediction block of the current block, the following cost is minimized:
[0168]
[0169] The following solution is given:
[0170]
[0171] in And parameter b is a constant indicating an offset. Therefore, the first weight a and the second weight (1-a) can be obtained based on Equations 6 and 7.
[0172] In an embodiment, if the MV of one of the reference blocks points to a fractional position in the reference picture, another MV (referred to as a template generation MV) with a different MV resolution (or precision), such as an integer MV resolution, may be used to generate adjacent reconstructed samples of the reference block. Figure 13 If a first MV (MV0) of a first reference block (1301) points to a fractional position in a first reference picture, a first template is used to generate an MV, and the first template is used to generate an MV with an MV resolution different from that of the first MV. If a second MV (MV1) of a second reference block (1302) points to a fractional position in a second reference picture, a second template is used to generate an MV, and the second template is used to generate an MV with an MV resolution different from that of the second MV.
[0173] In an embodiment, the template generation MV of the corresponding template specified for deriving the weights used in the bidirectional prediction motion compensation mode may have an MV resolution that is lower than or equal to the MV resolution of the MV pointing from the current block to the corresponding reference block. For example, the first template generation MV of the first template specified may have an MV resolution lower than or equal to the MV resolution of the first MV pointing from the current block to the first prediction block. The second template generation MV of the second template specified may have an MV resolution lower than or equal to the MV resolution of the second MV pointing from the current block to the second prediction block. In an example, the MV resolution of the first MV (or the second MV) is 1 / 8 pixel precision or 1 / 16 pixel precision, and the MV resolution of the first template generation MV associated with the first template (or the second template generation MV associated with the second template) is 1 / 4 pixel precision, 1 / 2 pixel precision, or integer pixel (1-pel) precision.
[0174] In an embodiment, MVs of neighboring samples specified for deriving weights used in bi-predictive motion compensation mode (eg, a first template-generated MV associated with the first template and a second template-generated MV associated with the second template) have integer pixel resolution.
[0175] In an embodiment, the MVs of neighboring samples specified for deriving weights used in a bi-directional prediction motion compensation mode (e.g., a first template-generated MV associated with a first template and a second template-generated MV associated with a second template) may have integer pixel (1 pixel) resolution or half pixel (1 / 2) resolution.
[0176] In an embodiment, the MVs of neighboring samples specified for deriving weights used in a bi-predictive motion compensation mode (e.g., a first template-generated MV associated with a first template and a second template-generated MV associated with a second template) may have integer pixel, half pixel, or quarter pixel resolution.
[0177] In an embodiment, the MVs of neighboring samples specified for deriving weights used in a bi-predictive motion compensation mode (e.g., a first template-generated MV associated with a first template and a second template-generated MV associated with a second template) may be derived by rounding the first MV and / or the second MV to a predefined MV resolution. Examples of the predefined MV resolution may include, but are not limited to, four-pixel MV resolution, two-pixel MV resolution, integer-pixel MV resolution, half-pixel MV resolution, quarter-pixel MV resolution, and 1 / 8-pixel MV resolution.
[0178] According to aspects of the present disclosure, for a current block predicted using a bi-directional prediction motion compensation mode, a set of weights used in the bi-directional prediction motion compensation mode may be: (i) derived using neighboring reconstructed samples of the current block, the first reference block, and / or the second reference block, such as described in the present disclosure; (ii) explicitly signaled, such as used in a BCW mode for blocks not encoded in merge mode, or (iii) inherited from neighboring blocks of the current block, such as used in a BCW mode for blocks encoded in merge mode. The selection among the above three methods (i) to (iii) may be signaled for the current block.
[0179] In the example, the selection between method (i) and method (ii) is signaled for the current block.
[0180] In an example, the selection between method (i) and method (ii) is signaled for a current block that is not encoded by merge mode.
[0181] In the example, the selection between method (i) and method (iii) is signaled for the current block.
[0182] In an example, the selection between methods (i) and (iii) is signaled for a current block encoded by merge mode.
[0183] Figure 14 A flowchart outlining a process (1400) according to an embodiment of the present disclosure is shown. The process (1400) can be used for reconstruction of a block to generate a prediction block for the block being reconstructed. The block can be any suitable block, such as a CB, CU, PB, TB, TU, luma block, chroma block, etc. In various embodiments, the process (1400) is performed by a processing circuit, such as a processing circuit in a terminal device (210), a terminal device (220), a terminal device (230), and a terminal device (240), a processing circuit that performs the functions of a video encoder (303), a processing circuit that performs the functions of a video decoder (310), a processing circuit that performs the functions of a video decoder (410), a processing circuit that performs the functions of a video encoder (503), etc. In some embodiments, the process (1400) is implemented as software instructions, so that when the processing circuit executes the software instructions, the processing circuit performs the process (1400). The process starts at (S1401) and proceeds to (S1410).
[0184] At (S1410), encoded information of a current block may be decoded from an encoded video bitstream. The encoded information may indicate a bidirectional prediction motion compensation mode for the current block. Based on the bidirectional prediction motion compensation mode, samples in the current block may be predicted based on a weighted average of samples in two prediction blocks of the current block. The two prediction blocks may include a first prediction block having a first weight and a second prediction block having a second weight.
[0185] In an example, the current neighboring reconstructed samples of the current block, the first neighboring reconstructed samples of the first prediction block, and the second neighboring reconstructed samples of the second prediction block are spatially neighboring reconstructed samples of the current block, the first prediction block, and the second prediction block, respectively.
[0186] The first prediction block may be in a first reference picture, and the second prediction block may be in a second reference picture. In an example, the second reference picture is different from the first reference picture. In an example, the first reference picture is the same as the second reference picture.
[0187] In an example, an index value in the encoded information is decoded.
[0188] At (S1420), based on the current adjacent reconstructed samples (or current template) of the current block, the first adjacent reconstructed samples (or first template) of the first prediction block, and the second adjacent reconstructed samples (or second template) of the second prediction block, the weights used in the bidirectional prediction motion compensation mode (e.g., the first weight, the second weight, or a parameter that can indicate the first weight and the second weight) can be determined.
[0189] In an embodiment, the weight is one of the predefined weights stored in the decoder.
[0190] In an example, the predefined weights may be sorted based on a current neighboring reconstructed sample of the current block, a first neighboring reconstructed sample of the first prediction block, and a second neighboring reconstructed sample of the second prediction block. Each of the sorted predefined weights may be associated with a unique sorting index. The decoded index value may correspond to one of the sorting indexes. Furthermore, the weight may be determined as the predefined weight associated with the one of the sorting indexes in the sorted predefined weights.
[0191] In an example, one of the predefined weights may be selected as the weight based on a predefined cost measure, wherein the predefined cost measure is performed using current neighboring reconstructed samples of the current block, first neighboring reconstructed samples of the first prediction block, and second neighboring reconstructed samples of the second prediction block.
[0192] In an example, the weights are calculated based on the current neighboring reconstructed samples of the current block, the first neighboring reconstructed samples of the first prediction block, and the second neighboring reconstructed samples of the second prediction block, such as described using Equations 4 to 7.
[0193] At (S1430), the samples in the current block may be reconstructed based on a weighted average of corresponding samples in the first prediction block and the second prediction block using the determined weights.The process (1400) proceeds to (S1499) and terminates.
[0194] Figure 15 A flowchart outlining a process (1500) according to an embodiment of the present disclosure is shown. The process (1500) can be used to encode a block. The block can be any suitable block, such as a CB, CU, PB, TB, TU, luma block, chroma block, etc. In various embodiments, the process (1500) is performed by a processing circuit, such as a processing circuit in the terminal device (210), the terminal device (220), the terminal device (230), and the terminal device (240), a processing circuit that performs the functions of the video encoder (303), a processing circuit that performs the functions of the video encoder (503), etc. In some embodiments, the process (1500) is implemented as software instructions, so that when the processing circuit executes the software instructions, the processing circuit performs the process (1500). The process starts at (S1501) and proceeds to (S1510).
[0195] At (S1510), a bi-prediction motion compensation mode for encoding a current block may be determined by an encoder.
[0196] At (S1520), weights used in the bi-prediction motion compensation mode may be determined based on current neighboring reconstructed samples of the current block, first neighboring reconstructed samples of the first prediction block, and second neighboring reconstructed samples of the second prediction block.
[0197] In an example, the current neighboring reconstructed samples of the current block, the first neighboring reconstructed samples of the first prediction block, and the second neighboring reconstructed samples of the second prediction block are spatially neighboring reconstructed samples of the current block, the first prediction block, and the second prediction block, respectively.
[0198] The first prediction block may be in a first reference picture, and the second prediction block may be in a second reference picture. In an example, the second reference picture is different from the first reference picture. In an example, the first reference picture is the same as the second reference picture.
[0199] In an example, the weights are calculated based on current neighboring reconstructed samples of the current block, first neighboring reconstructed samples of the first prediction block, and second neighboring reconstructed samples of the second prediction block.
[0200] In an embodiment, the weight is one of the predefined weights stored in the encoder.
[0201] In an example, the predefined weights are sorted based on a current neighboring reconstructed sample of the current block, a first neighboring reconstructed sample of the first prediction block, and a second neighboring reconstructed sample of the second prediction block. Each of the sorted predefined weights may be associated with a unique sorting index. The weight may be determined as one of the sorted predefined weights.
[0202] In an example, one of the predefined weights may be selected as the weight based on a predefined cost measure, wherein the predefined cost measure is performed using current neighboring reconstructed samples of the current block, first neighboring reconstructed samples of the first prediction block, and second neighboring reconstructed samples of the second prediction block.
[0203] At (S1530), information of the current block may be encoded in a video bitstream. The encoded information may indicate a bi-directional prediction motion compensation mode of the current block.
[0204] In an example, an index value is encoded in the encoded information, wherein the index value may be one of the sorted indices associated with the weight. The process (1500) proceeds to (S1599) and terminates.
[0205] Process (1400) and / or process (1500) may be adjusted as appropriate. Steps in process (1400) and / or process (1500) may be modified and / or omitted. Additional steps may be added. Any suitable implementation order may be used. In an example, the implementation is extended to include weighted prediction of more than two prediction blocks. For example, a sample in the current block may be predicted based on a weighted average of samples in M prediction blocks of the current block, where M is an integer greater than 2. Each of the M prediction blocks may have a weight. The weights of the M prediction blocks may be determined using any suitable method described in the present disclosure.
[0206] The embodiments of the present disclosure may be used alone or in any combination. In addition, each of the method (or embodiment), encoder, and decoder may be implemented by a processing circuit (e.g., one or more processors or one or more integrated circuits). In one example, one or more processors execute a program stored in a non-transitory computer-readable medium. The embodiments of the present disclosure may be applied to luminance blocks or chrominance blocks.
[0207] The above techniques may be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. For example, Figure 16 A computer system (1600) suitable for implementing certain embodiments of the disclosed subject matter is shown.
[0208] Computer software may be encoded using any suitable machine code or computer language, which may be subjected to mechanisms such as assembly, compilation, and linking to create code comprising instructions that may be executed directly by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., or through interpretation, microcode execution, and the like.
[0209] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, IoT devices, and the like.
[0210] Figure 16 The components shown for the computer system (1600) are exemplary in nature and are not intended to suggest any limitation on the scope of use or functionality of computer software implementing embodiments of the present disclosure. The configuration of components should not be interpreted as having any dependency or requirement relating to any one or combination of components shown in the exemplary embodiment of the computer system (1600).
[0211] The computer system (1600) may include certain human interface input devices. Such human interface input devices may be responsive to input by one or more human users through, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, tapping), visual input (e.g., gestures), or olfactory input (not shown). The human interface devices may also be used to capture certain media that are not necessarily directly related to conscious human input, such as audio (e.g., voice, music, ambient sounds), images (e.g., scanned images, photographic images obtained from a still image camera), and video (e.g., two-dimensional video, three-dimensional video including stereoscopic video).
[0212] The input human-machine interface device may include one or more of the following (only one of each is drawn): keyboard (1601), mouse (1602), touchpad (1603), touch screen (1610), data gloves (not shown), joystick (1605), microphone (1606), scanner (1607), camera (1608).
[0213] The computer system (1600) may also include certain human-computer interface output devices. Such human-computer interface output devices may stimulate one or more senses of a human user through, for example, tactile output, sound, light, and smell / taste. Such human-computer interface output devices may include: tactile output devices (e.g., tactile feedback via a touch screen (1610), a data glove (not shown), or a joystick (1605), although there may also be tactile feedback devices that do not function as input devices); audio output devices (e.g., speakers (1609), headphones (not depicted)); visual output devices (e.g., screens (1610), including CRT screens, LCD screens, plasma screens, OLED screens, each with or without touch screen input capabilities, each with or without tactile feedback capabilities—some of which may be capable of outputting two-dimensional visual output or more than three-dimensional output, such as stereoscopic image output; virtual reality glasses (not depicted); holographic displays and cigarette cans (not depicted)); and printers (not depicted).
[0214] The computer system (1600) may also include human-accessible storage devices and their associated media, such as optical media including CD / DVD ROM / RW (1620) including CD / DVD etc. media (1621), thumb drives (1622), removable hard drives or solid-state drives (1623), traditional magnetic media such as tapes and floppy disks (not depicted), dedicated ROM / ASIC / PLD based devices such as security dongles (not depicted), and the like.
[0215] Those skilled in the art will also understand that the term "computer-readable media" used in connection with the presently disclosed subject matter does not include transmission media, carrier waves, or other transient signals.
[0216] The computer system (1600) may also include an interface (1654) to one or more communication networks (1655). The network may be, for example, a wireless network, a wired network, an optical network. The network may also be a local area network, a wide area network, a metropolitan area network, an in-vehicle and industrial network, a real-time network, a delay-tolerant network, etc. Examples of networks include: local area networks (e.g., Ethernet, wireless LAN), cellular networks including GSM, 3G, 4G, 5G, LTE, etc., television wired connections or wireless wide area digital networks including cable, satellite, and terrestrial broadcast television, vehicle and industrial networks including CAN buses, etc. Some networks typically require an external network interface adapter attached to some common data port or peripheral bus (1649) (e.g., a USB port of the computer system (1600)); other networks are typically integrated into the core of the computer system (1600) by attaching to the system bus as described below (e.g., an Ethernet interface to a PC computer system or a cellular network interface to a smartphone computer system). Using any of these networks, the computer system (1600) can communicate with other entities. Such communications can be one-way receive-only (e.g., broadcast television), one-way send-only (e.g., CANbus to certain CANbus devices), or two-way (e.g., to other computer systems using a local area digital network or a wide area digital network). Certain protocols and protocol stacks can be used on each of the networks and network interfaces as described above.
[0217] The above-mentioned human interface devices, human-accessible storage devices, and network interfaces may be attached to the core (1640) of the computer system (1600).
[0218] The core (1640) may include one or more central processing units (CPUs) (1641), graphics processing units (GPUs) (1642), specialized programmable processing units in the form of field programmable gate areas (FPGAs) (1643), hardware accelerators (1644) for certain tasks, a graphics adapter (1650), and the like. These devices, as well as read-only memory (ROM) (1645), random access memory (1646), and internal mass storage devices (e.g., internal non-user accessible hard drives, SSDs, etc.) may be connected via a system bus (1648). In some computer systems, the system bus (1648) may be accessed in the form of one or more physical plugs to enable expansion with additional CPUs, GPUs, and the like. Peripheral devices may be attached to the core's system bus (1648) directly or via a peripheral bus (1649). In an example, a screen (1610) may be connected to a graphics adapter (1650). Peripheral bus architectures include PCI, USB, etc.
[0219] The CPU (1641), GPU (1642), FPGA (1643), and accelerator (1644) can execute certain instructions, which, when combined, can constitute the computer code mentioned above. The computer code can be stored in ROM (1645) or RAM (1646). Transient data can also be stored in RAM (1646), while permanent data can be stored in, for example, an internal mass storage device (1647). Fast storage and retrieval of any of the storage devices can be achieved by using a cache memory, which can be closely associated with one or more CPUs (1641), GPUs (1642), mass storage devices (1647), ROM (1645), RAM (1646), etc.
[0220] The computer readable medium may have computer code thereon for performing various computer-implemented operations. The medium and computer code may be those specially designed and constructed for the purposes of the present disclosure, or they may be of a type well known and available to those skilled in the computer software arts.
[0221] By way of example and not limitation, a computer system having the architecture (1600), and in particular the core (1640), can provide functionality by executing software contained in one or more tangible computer-readable media through a processor (including a CPU, GPU, FPGA, accelerator, etc.). Such computer-readable media can be media associated with the following storage devices: user-accessible mass storage devices as described above, and certain storage devices of the core (1640) having non-transitory properties, such as an intra-core mass storage device (1647) or ROM (1645). Software that implements various embodiments of the present disclosure can be stored in such devices and executed by the core (1640). Depending on specific needs, the computer-readable medium can include one or more memory devices or chips. The software can cause the core (1640) - and in particular the processor therein (including a CPU, GPU, FPGA, etc.) - to perform specific processing or specific parts of specific processing described herein, including defining data structures stored in RAM (1646) and modifying such data structures according to processing defined by the software. Additionally or alternatively, the computer system may provide functionality provided as a result of hard-wiring logic or otherwise embodied in circuitry (e.g., accelerator (1644)) that may operate in place of or in conjunction with software to perform the specific processing or specific portions of the specific processing described herein. Where appropriate, reference to software may include logic, and vice versa. Where appropriate, reference to computer-readable media may include circuitry (e.g., an integrated circuit (IC)) storing software for execution, circuitry implementing logic for execution, or both. The present disclosure includes any suitable combination of hardware and software.
[0222] Appendix A: Acronyms
[0223] JEM: Joint Exploration Model
[0224] VVC: Versatile Video Coding
[0225] BMS: Benchmark Set
[0226] MV: Motion Vector
[0227] HEVC: High Efficiency Video Coding
[0228] SEI: Supplemental Enhancement Information
[0229] VUI: Video Availability Information
[0230] GOP: Group of Pictures
[0231] TU: Transform Unit
[0232] PU: prediction unit
[0233] CTU: Coding Tree Unit
[0234] CTB: Coding Tree Block
[0235] PB: prediction block
[0236] HRD: Hypothesized Reference Decoder
[0237] SNR: Signal-to-Noise Ratio
[0238] CPU: Central Processing Unit
[0239] GPU: Graphics Processing Unit
[0240] CRT: cathode ray tube
[0241] LCD: Liquid Crystal Display
[0242] OLED: Organic Light-Emitting Diode
[0243] CD: Compact Disc
[0244] DVD: Digital Video Disc
[0245] ROM: Read-Only Memory
[0246] RAM: Random Access Memory
[0247] ASIC: Application-Specific Integrated Circuit
[0248] PLD: Programmable Logic Device
[0249] LAN: Local Area Network
[0250] GSM: Global System for Mobile Communications
[0251] LTE: Long Term Evolution
[0252] CANBus: Controller Area Network Bus
[0253] USB: Universal Serial Bus
[0254] PCI: Peripheral Component Interconnect
[0255] FPGA: Field Programmable Gate Array
[0256] SSD: Solid State Drive
[0257] IC: integrated circuit
[0258] CU: Coding Unit
[0259] Although the present disclosure has described several exemplary embodiments, there are changes, permutations, and various substitute equivalents that fall within the scope of the present disclosure. Therefore, it will be understood that those skilled in the art will be able to devise a variety of systems and methods that, although not explicitly shown or described herein, embody the principles disclosed herein and therefore fall within its spirit and scope.
Claims
1. A method for video decoding in a decoder, characterized in that The method comprises: decoding encoded information of a current block from an encoded video bitstream, the encoded information indicating a bidirectional prediction motion compensation mode of the current block; determining weights used in the bi-predictive motion compensation mode based on current neighboring reconstructed samples of the current block, first neighboring reconstructed samples of the first prediction block, and second neighboring reconstructed samples of the second prediction block; and reconstructing samples in the current block based on a weighted average of corresponding samples in the first prediction block and the second prediction block using the determined weights; The methods for determining weights include: The weight is one of stored predefined weights, and the decoding further comprises decoding an index value in the encoded information and determining a predefined weight associated with the index value; Alternatively, the weight is one of stored predefined weights, and one of the predefined weights is selected as the weight based on a predefined cost measurement, wherein the predefined cost measurement is performed using the current neighboring reconstructed samples of the current block, the first neighboring reconstructed samples of the first prediction block, and the second neighboring reconstructed samples of the second prediction block.
2. The method according to claim 1, wherein Calculate the weights at the decoder, including: A first weight of the first prediction block and / or a second weight of the second prediction block are calculated using a minimum mean square error according to current adjacent reconstructed samples of the current block, first adjacent reconstructed samples of the first prediction block and / or second adjacent reconstructed samples of the second prediction block.
3. The method according to claim 2, wherein: The first weight and the second weight are obtained by minimizing the following costs: ,as well as The first and second weights are obtained as follows: ; Among them, a represents the first weight, vector 、 and Represent the adjacent reconstructed samples of the first template, the second template and the current template respectively, N is the total number of samples of each template in the first template, the second template and the current template, and the second weight is obtained by 1-a.
4. The method according to claim 2, wherein: The first and second weights are obtained by minimizing the following costs: ,as well as, The first and second weights are obtained as follows: ; Among them, a represents the first weight, vector 、 and Represent the adjacent reconstructed samples of the first template, the second template and the current template respectively, N is the total number of samples of each template in the first template, the second template and the current template, , , parameter b is a constant indicating the offset, and the second weight is given by 1-a.
5. The method according to any one of claims 1 to 4, characterized in that The current adjacent reconstructed samples of the current block, the first adjacent reconstructed samples of the first prediction block, and the second adjacent reconstructed samples of the second prediction block are spatially adjacent reconstructed samples of the current block, the first prediction block, and the second prediction block, respectively.
6. The method according to any one of claims 1 to 4, characterized in that The first prediction block is in a first reference picture, and the second prediction block is in a second reference picture different from the first reference picture.
7. A computer device, characterized in that: The computer device comprises: one or more computer-readable non-transitory storage media configured to store computer program code; and One or more computer processors configured to access the computer program code and execute the method according to any one of claims 1 to 6 as instructed by the computer program code.
8. A non-transitory computer-readable storage medium storing a program, characterized in that: The program can be executed by at least one processor to perform the method according to any one of claims 1 to 6.
9. A device for video decoding, characterized in that The device comprises: a processing circuit configured to: decoding encoded information of a current block from an encoded video bitstream, the encoded information indicating a bidirectional prediction motion compensation mode of the current block; determining weights used in the bi-predictive motion compensation mode based on current neighboring reconstructed samples of the current block, first neighboring reconstructed samples of the first prediction block, and second neighboring reconstructed samples of the second prediction block; and reconstructing samples in the current block based on a weighted average of corresponding samples in the first prediction block and the second prediction block using the determined weights; The methods for determining weights include: The weight is one of stored predefined weights, and the decoding further comprises decoding an index value in the encoded information and determining a predefined weight associated with the index value; Alternatively, the weight is one of stored predefined weights, and one of the predefined weights is selected as the weight based on a predefined cost measurement, wherein the predefined cost measurement is performed using the current neighboring reconstructed samples of the current block, the first neighboring reconstructed samples of the first prediction block, and the second neighboring reconstructed samples of the second prediction block.
10. The device according to claim 9, wherein Calculate the weights at the decoder, including: A first weight of the first prediction block and / or a second weight of the second prediction block are calculated using a minimum mean square error according to current adjacent reconstructed samples of the current block, first adjacent reconstructed samples of the first prediction block and / or second adjacent reconstructed samples of the second prediction block.
11. The device according to claim 10, wherein The first weight and the second weight are obtained by minimizing the following costs: ,as well as The first and second weights are obtained as follows: ; Among them, a represents the first weight, vector 、 and Represent the adjacent reconstructed samples of the first template, the second template and the current template respectively, N is the total number of samples of each template in the first template, the second template and the current template, and the second weight is obtained by 1-a.
12. The device according to claim 10, wherein The first and second weights are obtained by minimizing the following costs: ,as well as, The first and second weights are obtained as follows: ; Among them, a represents the first weight, vector 、 and Represent the adjacent reconstructed samples of the first template, the second template and the current template respectively, N is the total number of samples of each template in the first template, the second template and the current template, , , parameter b is a constant indicating the offset, and the second weight is given by 1-a.
13. The device according to any one of claims 9 to 12, characterized in that The current adjacent reconstructed samples of the current block, the first adjacent reconstructed samples of the first prediction block, and the second adjacent reconstructed samples of the second prediction block are spatially adjacent reconstructed samples of the current block, the first prediction block, and the second prediction block, respectively.
14. The device according to any one of claims 9 to 12, characterized in that The first prediction block is in a first reference picture, and the second prediction block is in a second reference picture different from the first reference picture.
Citation Information
Patent Citations
Systems and methods of performing improved local illumination compensation
US20180098086A1