Methods and devices for video encoding and decoding
By using the triangular prediction mode and merge mode in video decoding, the encoding block is reconstructed using split direction and index syntax elements, the problem of inefficient video decoding in the prior art is solved, and more efficient resource utilization and storage optimization are achieved .
Patent Information
- Application Number
- CN202411243112.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-05-29
- Filing Date
- 2019-12-04
- Publication Date
- 2025-01-03
Smart Images

Figure CN119254975A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is a divisional of Chinese patent application No. 201980063144.2 filed on December 4, 2019. The entire disclosure of the prior application is incorporated herein by reference in its entirety. Technical Field
[0003] The present disclosure relates to the field of video processing technology, and in particular to a video encoding and decoding technology. Background Art
[0004] The background description provided herein is intended to generally present the context of the present disclosure. To the extent the work described in this background section is by the inventors currently named and aspects of the description that may not otherwise be qualified as prior art at the time of filing are neither explicitly nor implicitly admitted as prior art against the present disclosure.
[0005] Video encoding and decoding can be performed using inter-picture prediction with motion compensation. Uncompressed digital video may include a series of pictures, each with spatial dimensions of, for example, 1 (920) × 1080 luma samples and associated chroma samples. The series of pictures may have a fixed or variable frame rate (also informally referred to as frame rate) of, for example, 60 pictures per second or 60 Hertz (Hz). Uncompressed video has significant bit rate requirements. For example, 1080p60 4:2:0 video (1 (920) × 1080 luma sample resolution at 60 Hz frame rate) with 8 bits per sample requires a bandwidth of nearly 1.5 Gbit / s. One hour of such video requires more than 600 GBytes of storage space.
[0006] One purpose of video encoding and decoding can be to reduce the redundancy of the input video signal through compression. Compression can help reduce the above-mentioned bandwidth or storage space requirements, in some cases by two orders of magnitude or more. Both lossless compression and lossy compression and their combinations can be used. Lossless compression refers to a technique that can reconstruct an exact copy of the original signal from the compressed original signal. When using lossy compression, the reconstructed signal may be different from the original signal, but the distortion between the original signal and the reconstructed signal is small enough to make the reconstructed signal usable for the intended application. In the case of video, lossy compression is widely used. The amount of distortion 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 may be a lossy compression technique and may involve a technique in which a block of sample data from a previously reconstructed frame or portion thereof (reference frame) is used to predict a newly reconstructed frame or picture portion after being spatially shifted in a direction indicated by a motion vector (hereinafter MV). In some cases, the reference frame may be the same as the frame currently being reconstructed. The MV may have two dimensions, X and Y, or three dimensions, the third dimension being an indication of the reference frame in use (the third dimension may indirectly be a temporal dimension).
[0008] In some video compression techniques, an MV applicable to a particular region of sample data can be predicted based on other MVs, for example, the MV is predicted from other MVs related to another region of sample data and preceding the MV in decoding order, the other region of sample data being spatially adjacent to the region being reconstructed. Doing so can significantly reduce the amount of data required to encode the MV, thereby eliminating redundancy and increasing compression. MV prediction can work effectively, for example, because when encoding an input video signal obtained from a camera (called natural video), there is a statistical probability that a larger region than the region to which a single MV applies moves in a similar direction, and therefore, in some cases similar motion vectors derived from MVs of neighboring regions can be used for prediction. This makes the MV found for a given region similar or identical to the MV predicted from the surrounding MVs, and after entropy coding, it can be represented with fewer bits than the number of bits used when the MV is encoded directly. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., an MV) obtained from the original signal (i.e., a sample stream). In other cases, MV prediction itself can be lossy, for example, due to rounding errors when calculating predictors from 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, described here is a technique referred to below as "spatial merging".
[0010] Reference Figure 1, the current block (101) includes samples that have been discovered by the encoder during the motion search process so that it can be predicted from a previous block of the same size that has been spatially shifted. Instead of encoding the MV directly, the MV can be derived directly from metadata associated with one or more reference frames. For example, from the most recent (in decoding order) reference frame, the MV associated with any of the five surrounding samples is used, and these five surrounding samples are represented by A0, A1 and B0, B1, B2 (corresponding to 102 to 106 respectively). In H.265, MV prediction can use a predictor from the same reference frame that the neighboring block is also using.
[0011] In the related art, how to decode the compressed video has become a problem that needs to be solved urgently. Summary of the invention
[0012] Aspects of the present disclosure provide methods, apparatus, computer-readable storage media, and computer program products for video encoding / decoding.
[0013] In some examples, a video decoding apparatus includes a processing circuit. The processing circuit may be configured to: receive a split direction syntax element, a first index syntax element, and a second index syntax element associated with a coding block of a picture. The coding block may be encoded in a triangle prediction mode. The coding block may be divided into a first triangle prediction unit and a second triangle prediction unit according to a split direction indicated by the split direction syntax element. The first index syntax element may indicate a first merge index to a merge candidate list constructed for the first triangle prediction unit and the second triangle prediction unit, and the second index syntax element may indicate a second merge index to the merge candidate list. The split direction, the first merge index, and the second merge index may be determined based on the split direction syntax element, the first index syntax element, and the second index syntax element. The coding block may be reconstructed according to the split direction, the first merge index, and the second merge index.
[0014] In some examples, a video decoding apparatus includes:
[0015] a communication unit, configured to receive a split direction syntax element, a first index syntax element, and a second index syntax element associated with a coding block of a picture, the coding block being encoded in a triangle prediction mode, and the coding block being divided into a first triangle prediction unit and a second triangle prediction unit according to a split direction indicated by the split direction syntax element, the first index syntax element indicating a first merge index to a merge candidate list, the second index syntax element indicating a second merge index to the merge candidate list, the merge candidate list being constructed for the first triangle prediction unit and the second triangle prediction unit;
[0016] a determining unit, configured to determine the split direction, the first merge index, and the second merge index based on the split direction syntax element, the first index syntax element, and the second index syntax element;
[0017] A reconstruction unit is used to reconstruct the coding block according to the split direction, the first merging index and the second merging index.
[0018] In some examples, the video decoding apparatus is used to perform a method for video decoding, for example, a method for performing video decoding in a decoder. The method specifically includes the following steps:
[0019] Receiving a split direction syntax element, a first index syntax element, and a second index syntax element associated with a coding block of a picture, the coding block being encoded in a triangle prediction mode, and the coding block being divided into a first triangle prediction unit and a second triangle prediction unit according to a split direction indicated by the split direction syntax element, the first index syntax element indicating a first merge index to a merge candidate list, the second index syntax element indicating a second merge index to the merge candidate list, the merge candidate list being constructed for the first triangle prediction unit and the second triangle prediction unit;
[0020] Determine the split direction, the first merge index, and the second merge index based on the split direction syntax element, the first index syntax element, and the second index syntax element; and
[0021] The coding block is reconstructed according to the split direction, the first merge index and the second merge index.
[0022] Aspects of the present disclosure also provide a non-transitory computer-readable medium storing instructions that, when executed by a computer for video decoding, cause the computer to perform a method for video decoding.
[0023] Aspects of the present disclosure also provide a computer program product. The computer program product includes instructions. When the instructions are executed by a computer, the computer can perform a method for video decoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Additional features, properties, and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings, in which:
[0025] Figure 1 is a schematic diagram of the current block and its surrounding spatial merging candidates in one example.
[0026] Figure 2 is a schematic diagram of a simplified block diagram of a communication system according to an embodiment.
[0027] Figure 3 is a schematic diagram of a simplified block diagram of a communication system according to an embodiment.
[0028] Figure 4 is a schematic diagram of a simplified block diagram of a decoder according to an embodiment.
[0029] Figure 5 is a schematic diagram of a simplified block diagram of an encoder according to an embodiment.
[0030] Figure 6 A block diagram of an encoder according to another embodiment is shown.
[0031] Figure 7 A block diagram of a decoder according to another embodiment is shown.
[0032] Figure 8 An example of candidate positions for constructing a merge candidate list according to an embodiment is shown.
[0033] Fig. 9 An example of dividing a coding unit into two triangular prediction units according to an embodiment is shown.
[0034] Fig.10 Examples of spatially neighboring blocks and temporally neighboring blocks used to construct a merge candidate list according to an embodiment are shown.
[0035] Fig.11 An example of a lookup table for deriving split direction and partition motion information based on a triangle partition index according to an embodiment is shown.
[0036] Fig.12 An example of a coding unit applying a set of weighting factors in an adaptive hybrid process according to an embodiment is shown.
[0037] Fig.13 An example of motion vector storage in triangle prediction mode according to an embodiment is shown.
[0038] FIG. 14A to FIG. 14D An example of deriving a bi-prediction motion vector based on motion vectors of two triangle prediction units according to an embodiment is shown.
[0039] Fig.15 An example of triangle prediction processing is shown in accordance with some embodiments.
[0040] Fig.16 is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION
[0041] I. Video Coding Encoders and Decoders
[0042] 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 via the network (250). Figure 2 In the example of , a first pair of terminal devices (210) and (220) perform unidirectional transmission of data. 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 a 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 restore the video picture, and display the video picture based on the restored video data. Unidirectional data transmission may be common in media service applications and the like.
[0043] 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 the bidirectional transmission of data, 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 terminal device (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 terminal device (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.
[0044] exist Figure 2In the example of , terminal devices (210), (220), (230) and (240) can be shown as servers, personal computers and smart phones, but the principles of the present disclosure may not be limited to this. Implementations of the present disclosure are applicable to applications of 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) communication networks and / or wireless communication networks. Communication network (250) can exchange data in circuit switching channels and / or packet switching channels. Representative networks include telecommunication networks, local area networks, wide area networks and / or the Internet. For the purposes of this discussion, unless otherwise specified below, the architecture and topology of network (250) may be unimportant to the operation of the present disclosure.
[0045] Figure 3 The placement of a video encoder and a video decoder in a streaming environment is shown as an example of an application for the disclosed subject matter. The disclosed subject matter can be equally applicable to other video-enabled applications, including, for example, video conferencing, digital television, storage of compressed video on digital media including compact discs (CDs), digital versatile discs (DVDs), memory sticks, etc.
[0046] 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) is depicted as a thick line to emphasize the high amount of data when compared to the encoded video data (304) (or encoded video bitstream), which may be processed by an electronic device (320) coupled to the video source (301) and including a video encoder (303). The video encoder (303) may include hardware, software, or a combination thereof to implement or embody aspects of the disclosed subject matter as described in more detail below. The encoded video data (304) (or encoded video bitstream (304)) is depicted as a thin line to emphasize the lower data volume when compared to the video picture stream (302), which can be stored on the streaming server (305) for future use. One or more streaming client subsystems - e.g. Figure 3The 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 input copy (307) of the encoded video data and creates an output stream (311) of video pictures that can be presented on a display (312) (e.g., a display screen) or another presentation 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 these standards include the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) high efficiency video coding (H.265) recommendation. In the example, the video coding standard under development is informally referred to as a new generation of video coding (VVC). The disclosed subject matter may be used in the context of VVC.
[0047] It should be noted that the electronic devices (320) and (330) may include other components (not shown). For example, the electronic device (320) may include a video decoder (not shown), and the electronic device (330) may also include a video encoder (not shown).
[0048] 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 A video decoder (310) in an example of FIG.
[0049] The receiver (431) can receive one or more encoded video sequences to be decoded by the video decoder (410); in the same embodiment or another embodiment, one encoded video sequence is received at a time, wherein the decoding of each encoded video sequence is independent of the other encoded video sequences. The encoded video sequence 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 and other data, such as encoded audio data and / or auxiliary data streams, which can be forwarded to their corresponding consuming entities (not depicted). The receiver (431) can separate the encoded video sequence 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) may be external to the video decoder (410) (not depicted). In still other applications, there may be a buffer memory (not depicted) external to the video decoder (410) to, for example, prevent network jitter, and there may be additional buffer memory (415) internal to the video decoder (410) to, for example, handle playout timing. When the receiver (431) is receiving data from a store / forward device with sufficient bandwidth and controllability or from an isochronous network, the buffer memory (415) may not be needed, or the buffer memory (415) may be small. For use over a best effort packet network such as the Internet, the buffer memory (415) may be needed, the buffer memory (415) may be relatively large and may advantageously have an adaptive size, and may be implemented at least in part in an operating system or similar element (not depicted) external to the video decoder (410).
[0050] 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 potential information for controlling a presentation device such as a presentation device (412) (e.g., a display screen), which is not part of the electronic device (430) but can be coupled to the electronic device (430), such as Figure 4. The control information for the rendering device may be in the form of supplemental enhancement information (SEI) or video usability information guide (VUI) parameter set fragments (not depicted). The parser (420) may parse / entropy decode the received encoded video sequence. The encoded video sequence may be decoded according to a video coding technique or 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 encoded video sequence based on at least one parameter corresponding to the group. The subgroup may include a group of pictures (GOP), a picture, a tile, a slice, a macroblock, a coding unit (CU), a block, a transform unit (TU), a 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.
[0051] The parser (420) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (415) to create symbols (421).
[0052] The reconstruction of the symbol (421) may involve a plurality of different units depending on the type of the coded video picture or a portion thereof (e.g., inter-coded frames and intra-coded frames, inter-blocks and intra-blocks) and other factors. Which units are involved and how they are involved may be controlled by subgroup control information parsed from the coded video sequence by the parser (420). For the sake of brevity, such subgroup control information flow between the parser (420) and the following plurality of units is not described.
[0053] In addition to the functional blocks already mentioned, the video decoder (410) can be conceptually subdivided into a number of functional units as described below. In actual 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.
[0054] The first unit is a scaler / inverse transform unit (451). The scaler / inverse transform unit (451) receives quantized transform coefficients as symbols (421) and control information from the parser (420), including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The scaler / inverse transform unit (451) can output blocks including sample values, which can be input to the aggregator (455).
[0055] In some cases, the output samples of the scaler / inverse transform (451) may belong to an intra-coded block; that is, this block does not use predictive information from a previously reconstructed frame, but may use predictive information from a previously reconstructed portion of the current frame. Such predictive information may be provided by an intra-coded frame prediction unit (452). In some cases, the intra-coded frame prediction unit (452) generates a block of the same size and shape as the block being reconstructed using surrounding reconstructed information extracted from a current frame buffer (458). For example, the current frame buffer (458) buffers a partially reconstructed current frame and / or a fully reconstructed current frame. In some cases, the aggregator (455) adds the prediction information already generated by the intra-frame prediction unit (452) to the output sample information provided by the scaler / inverse transform unit (451) on a per-sample basis.
[0056] In other cases, the output samples of the scaler / inverse transform unit (451) may belong to an inter-coded block and a potential motion compensated block. In such a case, the motion compensated prediction unit (453) may access the reference frame memory (457) to extract samples for prediction. After the extracted samples are motion compensated according to the symbols (421) belonging to the block, these samples may be added to the output of the scaler / inverse transform unit (451) (in this case referred to as residual samples or residual signals) by the aggregator (455) to generate output sample information. The address within the reference frame memory (457) from which the motion compensated prediction unit (453) extracts the predicted samples may be controlled by a motion vector, which is provided to the motion compensated prediction unit (453) in the form of a symbol (421), which may have, for example, X, Y and reference frame components. Motion compensation may also include interpolation of sample values extracted from the reference frame memory (457) when sub-sample accurate motion vectors are in use, motion vector prediction mechanisms, etc.
[0057] 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 filter 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 the video compression techniques may also be responsive to meta-information obtained during decoding of a coded frame or a previous (in decoding order) portion of the coded video sequence, and to previously reconstructed and loop filtered sample values.
[0058] The output of the loop filter unit (456) may be a sample stream that may be output to a rendering device (412) and may be stored in a reference frame memory (457) for future use in inter-picture prediction.
[0059] Once fully reconstructed, certain coded frames may be used as reference frames for future prediction. For example, once a coded frame corresponding to a current frame is fully reconstructed, and the coded frame has been identified as a reference frame (e.g., by the parser (420)), the current frame buffer (458) may become part of the reference frame memory (457), and a new current frame buffer may be reallocated before beginning reconstruction of a subsequent coded frame.
[0060] The video decoder (410) may perform decoding operations according to a predetermined video compression technology in a standard such as ITU-T H.265 Recommendation. The encoded video sequence may conform to the syntax specified by the video compression technology or standard being 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 level of the video compression technology or standard. In some cases, the maximum picture size, maximum frame rate, maximum reconstruction sample rate (measured in, for example, megasamples per second), maximum reference frame size, etc. are limited by the level. In some cases, the limits set by the level may be further limited by the hypothetical reference decoder (HRD) specification and metadata of the HRD buffer management signaled in the encoded video sequence.
[0061] In an embodiment, a receiver (431) may receive additional (redundant) data and the encoded video. The additional data may be included as part of the encoded video sequence. The additional data may be used by the video decoder (410) 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, etc.
[0062] 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.
[0063] The video encoder (503) can be used to obtain the video source (501) (not Figure 5 In an example, the video source (501) is a part of the electronic device (520) to receive the video samples, and the video source (501) can capture the video images to be encoded by the video encoder (503). In another example, the video source (501) is a part of the electronic device (520).
[0064] The video source (501) may provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (503), which may have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 Y CrCB, RGB, ...), and any suitable sampling structure (e.g., YCrCb 4:2:0, Y CrCb 4:4:4). In a media service system, the video source (501) may be a storage device storing previously prepared videos. In a video conferencing system, the video source 501 may be a camera device that captures local image information as a video sequence. The video data may be provided as a plurality of separate frames that are given motion when viewed in sequence. The picture itself may be organized as a spatial pixel array, wherein each pixel may include one or more samples depending on the sampling structure, color space, etc. in use. The relationship between pixels and samples may be easily understood by those skilled in the art. The following description focuses on samples.
[0065] According to an embodiment, the video encoder (503) can encode and compress frames of the source video sequence into an encoded video sequence (543) in real time or according to any other time constraints required by the application. Implementing the appropriate encoding speed is a function of the controller (550). In some embodiments, the controller (550) controls other functional units as described below and is functionally coupled to the other functional units. For the sake of brevity, the coupling is not depicted. The parameters set by the controller (550) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization technology, etc.), picture size, picture group (GOP) layout, maximum motion vector search range, etc. The controller (550) can be configured to have other suitable functions that belong to the video encoder (503) optimized for certain system designs.
[0066] In some embodiments, the video encoder (503) is configured to operate in an encoding loop. As an oversimplified description, in an example, the encoding 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 frame) and a (local) decoder (533) embedded in the video encoder (503). The decoder (533) reconstructs the symbols for use in creating sample data in a manner similar to how a (remote) decoder would create sample data (because in the video compression techniques considered in the disclosed subject matter, any compression between the symbols and the encoded video bitstream is lossless). The reconstructed sample stream (sample data) is input to a reference frame memory (534). Since the decoding of the symbol stream produces bit-accurate results that are independent of the decoder location (local or remote), the contents of the reference frame memory (534) are also bit-accurate between the local encoder and the remote encoder. In other words, the predicted portion of the encoder "sees" as reference frame samples exactly the same sample values as the decoder will "see" when using prediction during decoding. This basic principle of reference frame synchronization (and the drift that occurs when synchronization cannot be maintained, for example due to channel errors) is also used in some related fields.
[0067] The operation of the "local" decoder (533) can be combined with the above Figure 4 The operation of a "remote" decoder such as the video decoder (410) described in detail is the same. However, reference is also briefly made to Figure 4 , when symbols are available and the entropy encoder (545) and the parser (420) can losslessly encode / decode 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).
[0068] At this point it can be observed that any decoder techniques other than parsing / entropy decoding present in the decoder must also be present in the corresponding encoder in substantially the same functional form. Thus, the disclosed subject matter focuses on decoder operation. Since encoder techniques are inverse to the decoder techniques described comprehensively, the description of encoder techniques can be simplified. A more detailed description is only required in certain areas and will be provided below.
[0069] During operation, in some examples, the source encoder (530) may perform motion compensated predictive encoding that predictively encodes an input picture with reference to one or more previously encoded frames in a video sequence designated as "reference frames." In this manner, the encoding engine (532) encodes the differences between pixel blocks of the input picture and pixel blocks of a reference frame that may be selected as a prediction reference for the input picture.
[0070] The local video decoder (533) can decode the encoded video data of the frame that can be designated as the reference frame based on the symbol created by the source encoder (530). The operation of the encoding engine (532) can advantageously be lossy processing. When the encoded video data can be decoded at the video decoder ( Figure 5 When the video encoder (503) is 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 may be performed on the reference frame by the video decoder and may cause the reconstructed reference frame to be stored in the reference frame buffer (534). In this way, the video encoder (503) may locally store a copy of the reconstructed reference frame that has common content (absent transmission errors) with the reconstructed reference frame to be obtained by the remote video decoder.
[0071] The predictor (535) may perform a prediction search for the encoding engine (532). That is, for a new picture to be encoded, the predictor (535) may search the reference frame memory (534) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference frame motion vectors, block shapes, etc., that may be used as appropriate prediction references for the new picture. The predictor (535) may operate on a pixel block by pixel block basis to find an appropriate prediction reference. In some cases, as determined by the search results obtained by the predictor (535), the input picture may have prediction references extracted from multiple reference frames stored in the reference frame memory (534).
[0072] The controller (550) can manage encoding operations of the source encoder (530), including, for example, setting parameters and subgroup parameters for encoding video data.
[0073] The outputs of all the above-mentioned functional units may be subjected to entropy coding 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 the symbols according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc.
[0074] The transmitter (540) can buffer the encoded video sequence created by the entropy encoder (545) in preparation for transmission via the 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 auxiliary data streams (source not shown).
[0075] The controller (550) can manage the operation of the video encoder (503). During encoding, the controller (550) can specify a specific encoded frame type for each encoded frame, which may affect the encoding techniques that can be applied to the corresponding frame. For example, a picture can generally be assigned to one of the following picture types.
[0076] An intra-coded frame (I-frame) may be a frame that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow different types of intra-coded frames, including, for example, instantaneous decoder refresh ("IDR") frames. Those skilled in the art are aware of these variations of I-frames and their corresponding applications and features.
[0077] An inter-prediction coded frame (P-frame) may be a frame that may 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.
[0078] Bidirectionally predictive coded frames (B frames) can be frames that can be encoded and decoded using intra-frame prediction or inter-frame prediction, which uses up to two motion vectors and reference indices to predict the sample values of each block. Similarly, multi-predictive coded frames can use more than two reference frames and associated metadata for reconstruction of a single block.
[0079] The 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. The blocks may be predictively coded with reference to other (already coded) blocks, which are determined by the coding allocation applied to the corresponding frame of the block. For example, blocks of an I-frame may be non-predictively coded, or the blocks may be predictively coded (spatial prediction or intra-prediction) with reference to already coded blocks of the same picture. Blocks of a P-frame may be predictively coded with reference to a previously coded reference frame via spatial prediction or via temporal prediction. Blocks of a B-frame may be predictively coded with reference to one or two previously coded reference frames via spatial prediction or via temporal prediction.
[0080] The video encoder (503) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T H.265 Recommendation. In the 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 encoding technique or standard used.
[0081] In an embodiment, the transmitter (540) may transmit the additional data along with 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.
[0082] Video may be captured as multiple source frames (video frames) in a temporal sequence. Intra-coded frame prediction (often simply referred to as intra-frame prediction) exploits spatial correlations in a given frame, while inter-frame frame prediction exploits (temporal or other) correlations between frames. In an example, a particular frame being encoded / decoded, referred to as a current frame, is divided into blocks. When a block in the current frame is similar to a reference block in a reference frame that was previously encoded in the video and is still buffered, the block in the current frame may be encoded by a vector referred to as a motion vector. The motion vector points to a reference block in a reference frame, and in the case where multiple reference frames are in use, the motion vector may have a third dimension that identifies the reference frame.
[0083] In some embodiments, a bi-prediction technique may be used in inter-frame prediction. According to the bi-prediction technique, two reference frames are used, such as a first reference frame and a second reference frame that are both before the current frame in the video in decoding order (but may be in the past and in the future, respectively, in display order). A block in the current frame may be encoded by a first motion vector pointing to a first reference block in the first reference frame and a second motion vector pointing to a second reference block in the second reference frame. A block may be predicted by a combination of the first reference block and the second reference block.
[0084] In addition, merge mode technology can be used in inter-frame prediction to improve coding efficiency.
[0085] According to some embodiments of the present disclosure, predictions such as inter-frame prediction and intra-frame coding frame prediction are performed in units of blocks. For example, according to the HEVC standard, frames in a video picture sequence are 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), i.e., a luminance CTB and two chrominance CTBs. Each CTU can be recursively split into one or more coding units (CUs) with a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or 4 32×32 pixel CUs, or 16 16×16 pixel CUs. In the example, each CU is analyzed to determine the prediction type for the CU, such as an inter-frame prediction type or an intra-frame prediction type. Depending on temporal and / or spatial predictability, a 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 a 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.
[0086] 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 predicted block) of sample values within a current video picture in a sequence of video pictures, and 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 3 A video encoder (303) in an example.
[0087] In the HEVC example, a 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 to best encode the processing block using intra mode, inter mode, or bi-prediction mode. When the processing block is to be encoded in intra mode, the video encoder (603) may use intra prediction techniques to encode the processing block into an encoded frame; and when the processing block is to be encoded in inter mode or bi-prediction mode, the video encoder (603) may use inter prediction or bi-prediction techniques to encode the processing block into an encoded frame, respectively. In some video coding techniques, the merge mode may be an inter-picture prediction sub-mode that derives a motion vector from one or more motion vector predictors without the aid of 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 the example, the video encoder (603) includes other components, such as a mode decision module (not shown) for determining the mode of the processing block.
[0088] exist Figure 6 In this example, the video encoder (603) includes Figure 6 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) are shown coupled together.
[0089] The inter-frame encoder (630) is configured to: receive a sample of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference frame (e.g., blocks in a previous picture and a subsequent picture), generate inter-frame prediction information (e.g., motion vector, merge mode information, redundant information description 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 frame is a decoded reference frame that is decoded based on the encoded video information.
[0090] The intra-frame encoder (622) is configured to: receive samples of a current block (e.g., a processing block), compare the block with an encoded block in the same frame in some cases; generate quantization coefficients after transformation; and in some cases also generate intra-frame prediction information (e.g., intra-frame prediction direction information according to one or more intra-frame coding techniques). In the example, the intra-frame encoder (622) also calculates an intra-frame prediction result (e.g., a predicted block) based on the intra-frame prediction information and a reference block in the same frame.
[0091] 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 the mode of the block and provides a control signal to the switch (626) based on the mode. For example, when the mode is intra-frame mode, the general controller (621) controls the switch (626) to select the intra-frame mode result for use by the residual calculator (623), and the general controller (621) controls the entropy encoder (625) to select intra-frame prediction information and include the intra-frame prediction information in the bitstream; and when the mode is inter-frame mode, the general controller (621) controls the switch (626) to select the inter-frame prediction result for use by the residual calculator (623), and the general controller (621) controls the entropy encoder (625) to select the inter-frame prediction information and include the inter-frame prediction information in the bitstream.
[0092] 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 a transform coefficient. In an example, the residual encoder (624) is configured to convert the residual data from the spatial domain to the frequency domain and generate a transform coefficient. The transform coefficient is then subjected to quantization to obtain a quantized transform coefficient. In various embodiments, the video encoder (603) also 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 appropriately used 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 the inter prediction information, and the intra encoder (622) can generate a decoded block based on the decoded residual data and the intra prediction information. In some examples, the decoded blocks are appropriately processed to generate a decoded frame, and the decoded frame may be buffered in a memory circuit (not shown) and used as a reference frame.
[0093] The entropy encoder (625) is configured to format the bitstream to include the encoded blocks. The entropy encoder (625) is configured to include various information 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 in accordance with the disclosed subject matter, when the block is encoded in inter-frame mode or the merge sub-mode of the bi-prediction mode, there is no residual information.
[0094] 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 frame as part of an encoded video sequence and decode the encoded frame to generate a reconstructed frame. In an example, the video decoder (710) is used instead of Figure 3 A video decoder (310) in an example of FIG.
[0095] exist Figure 7 In this example, the video decoder (710) includes Figure 7 An entropy decoder (771), an inter-frame decoder (780), a residual decoder (773), a reconstruction module (774) and an intra-frame decoder (772) are shown coupled together.
[0096] The entropy decoder (771) may be configured to reconstruct certain symbols from the encoded frame, which represent syntax elements constituting the encoded frame. Such symbols may include, for example, a mode in which a block is encoded (e.g., intra mode, inter mode, bi-prediction mode, a merged sub-mode of the latter two, or another sub-mode); prediction information (e.g., intra prediction information or inter prediction information) of certain samples or metadata used for prediction by an intra decoder (772) or an inter decoder (780), respectively; residual information in the form of, for example, quantized transform coefficients, etc. In an example, when the prediction mode is an inter prediction mode or a bi-prediction mode, the inter prediction information is provided to the inter decoder (780); and when the prediction type is an intra prediction type, the intra prediction information is provided to the intra decoder (772). The residual information may be subjected to inverse quantization and provided to the residual decoder (773).
[0097] The inter-frame decoder (780) is configured to: receive inter-frame prediction information; and generate an inter-frame prediction result based on the inter-frame prediction information.
[0098] The intra decoder (772) is configured to: receive intra prediction information; and generate a prediction result based on the intra prediction information.
[0099] 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 include quantizer parameters (QP)), and this information may be provided by the entropy decoder (771) (since this may only be low-volume control information, the data path is not described).
[0100] The reconstruction module (774) is configured to combine the residual output by the residual decoder (773) and the prediction result (output by the inter-frame prediction module or the intra-frame prediction module as appropriate) in the spatial domain to form a reconstructed block, which can be part of a reconstructed picture, which can be part of a reconstructed video. Note that other suitable operations such as deblocking operations can be performed to improve visual quality.
[0101] Note that the video encoders (303), (503) and (603) and the video decoders (310), (410) and (710) may be implemented using any suitable technology. In an embodiment, the video encoders (303), (503) and (603) and the video decoders (310), (410) and (710) may be implemented using one or more integrated circuits. In another embodiment, the video encoders (303), (503) and (603) and the video decoders (310), (410) and (710) may be implemented using one or more processors that execute software instructions.
[0102] II. Triangle Prediction
[0103] 1. Encoding in merge mode
[0104] The picture can be partitioned into blocks, for example, using a tree-structured partitioning scheme. The resulting blocks can then be processed using different processing modes such as intra-frame prediction mode, inter-frame prediction mode (e.g., merge mode, skip mode, advanced motion vector prediction (AVMP) mode), etc. When the currently processed block, referred to as the current block, is processed using the merge mode, a neighboring block can be selected from the spatial or temporal neighborhood of the current block. The current block can be merged with the selected neighboring block by sharing the same set of motion data (or motion information) with the selected neighboring block. This merge mode operation can be performed on a set of neighboring blocks so that regions of the neighboring blocks can be merged together and share the same set of motion data. During transmission from the encoder to the decoder, an index indicating the motion data of the selected neighboring block can be transmitted for the current block instead of transmitting the entire set of motion data. In this way, the amount of data (bits) used to transmit motion information can be reduced, and coding efficiency can be improved.
[0105] In the above example, a neighboring block providing motion data can be selected from a set of candidate positions. The candidate positions can be predefined relative to the current block. For example, the candidate positions can include spatial candidate positions and temporal candidate positions. Each spatial candidate position is associated with a spatial neighboring block adjacent to the current block. Each temporal candidate position is associated with a temporal neighboring block located in another encoded frame (e.g., a previously encoded frame). The neighboring blocks overlapping with the candidate positions (referred to as candidate blocks) are a subset of the spatial or temporal neighboring blocks of the current block. In this way, the candidate blocks can be evaluated to select a block to be merged instead of a whole set of neighboring blocks.
[0106] Figure 8 An example of a candidate position is shown. From those candidate positions, a set of merge candidates can be selected to construct a merge candidate list. For example, in the HEVC standard, Figure 8 The candidate positions defined in . As shown, the current block (810) will be processed using merge mode. For merge mode processing, a set of candidate positions {A1, B1, B0, A0, B2, C0, C1} are defined. Specifically, the candidate positions {A1, B1, B0, A0, B2} are spatial candidate positions, which represent the positions of candidate blocks in the same picture as the current block (810). In contrast, the candidate positions {C0, C1} are temporal candidate positions, which represent the positions of candidate blocks in another encoded frame and adjacent to or overlapping with the co-located block of the current block (810). As shown, candidate position C1 can be located near the center of the current block (810) (e.g., adjacent to it).
[0107] In different examples, the candidate position can be represented by multiple samples or a block of samples. Figure 8 In , each candidate position is represented by a sample block having a size of, for example, 4×4 samples. The size of such a sample block corresponding to the candidate position may be equal to or smaller than the minimum allowed size of a PB (e.g., 4×4 samples) defined for the tree-based partitioning scheme used to generate the current block (810). In this configuration, the block corresponding to the candidate position may always be covered within a single neighboring PB. In an alternative example, a sample position (e.g., the lower right sample within block A1 or the upper right sample within block A0) may be used to represent the candidate position. Such samples are referred to as representative samples, and such positions are referred to as representative positions.
[0108] In one example, based on Figure 8A merge mode process may be performed to select a merge candidate from the candidate positions {A1, B1, B0, A0, B2, C0, C1} to construct a candidate list. The candidate list may have a predefined maximum number Cm of merge candidates. Each merge candidate in the candidate list may include a set of motion data that may be used for motion compensated prediction.
[0109] The merge candidates may be listed in a candidate list according to a specific order. For example, depending on how the merge candidates are derived, different merge candidates may have different probabilities of being selected. Merge candidates with higher probabilities of being selected are located in front of merge candidates with lower probabilities of being selected. Based on such an order, each merge candidate is associated with an index, which is called a merge index. In one embodiment, a merge candidate with a higher probability of being selected will have a smaller index value, so that fewer bits are required to encode the corresponding index.
[0110] In one example, the merge candidate motion data may include: horizontal motion vector displacement values and vertical motion vector displacement values of one or two motion vectors; one or two reference frame indices associated with one or two motion vectors; and an identifier of a reference frame list optionally associated with each index.
[0111] In the example, according to a predefined order, a first number of merge candidates Ca is derived from the spatial candidate positions according to the order {A1, B1, B0, A0, B2}, and a second number of merge candidates is derived from the temporal candidate positions according to the order {C0, C1}, Cb=Cm-Ca. The numerical symbols A1, B1, B0, A0, B2, C0, C1 used to represent the candidate positions can also be used to refer to the merge candidates. For example, the merge candidate obtained from the candidate position A1 is called the merge candidate A1.
[0112] In some cases, a merge candidate at a candidate position may not be available. For example, the candidate block at the candidate position may be intra-predicted; outside the slice or tile that includes the current block (810); or not in the same coding tree block (CTB) row as the current block (810). In some cases, the merge candidate at the candidate position may be redundant. For example, a neighboring block of the current block (810) may overlap with two candidate positions. Redundant merge candidates can be removed from the candidate list, for example, by performing a pruning process to remove redundant merge candidates. When the total number of available merge candidates in the candidate list (where redundant candidates are removed) is less than the maximum number Cm of merge candidates, additional merge candidates can be generated (for example, according to a preconfigured rule) to fill the candidate list so that the candidate list can be maintained to have a fixed length. For example, additional merge candidates may include combined bidirectional prediction candidates and zero motion vector candidates.
[0113] After building the candidate list, at the encoder, an evaluation process may be performed to select a merge candidate from the candidate list. For example, a rate-distortion (RD) performance corresponding to each merge candidate may be calculated, and a merge candidate with the best RD performance may be selected. Thus, a merge index associated with the selected merge candidate may be determined for the current block (810) and signaled to the decoder.
[0114] At the decoder, a merge index for the current block (810) may be received. A similar candidate list construction process as described above may be performed to generate a candidate list that is identical to the candidate list generated at the encoder side. After the candidate list is constructed, in some examples, a merge candidate may be selected from the candidate list based on the received merge index without performing any other evaluation. The motion data of the selected merge candidate may be used for subsequent motion compensated prediction of the current block (810).
[0115] A skip mode is also introduced in some examples. For example, in skip mode, the current block can be predicted using the merge mode as described above to determine a set of motion data, but no residual is generated and the transform coefficients are not sent. A skip flag can be associated with the current block. The skip flag and the merge index indicating the relevant motion information of the current block can be signaled to the video decoder. For example, at the beginning of a CU in an inter-picture predicted slice, a skip flag can be signaled, which implies the following: the CU contains only one PU (2N×2N); the merge mode is used to derive motion data; there is no residual data in the bitstream. On the decoder side, based on the skip flag, the prediction block can be determined based on the merge index to decode the corresponding current block without adding residual information. Therefore, various methods for video encoding using the merge mode disclosed herein can be utilized in conjunction with the skip mode.
[0116] 2. Triangle prediction mode
[0117] In some embodiments, triangle prediction mode may be employed for inter prediction. In an embodiment, triangle prediction mode is applied to CUs that are 8×8 samples or larger in size and encoded in skip or merge mode. In an embodiment, for CUs that meet these conditions (size is 8×8 samples or larger and encoded in skip or merge mode), a CU-level flag is signaled to indicate whether triangle prediction mode is applied.
[0118] When using triangle prediction mode, in some embodiments, such as Fig. 9 As shown, the CU is evenly split into two triangular partitions using diagonal splitting or anti-diagonal splitting. Fig. 9 , the first CU (910) is split from the upper left corner to the lower right corner, thereby generating two triangle prediction units PU1 and PU2. The second CU (920) is split from the upper right corner to the lower left corner, thereby generating two triangle prediction units PU1 and PU2. Each triangle prediction unit PU1 or PU2 in CU (910) or (920) is inter-predicted using its own motion information. In some embodiments, only single prediction is allowed for each triangle prediction unit. Therefore, each triangle prediction unit has a motion vector and a reference frame index. A single prediction motion constraint can be applied to ensure that: similar to the conventional bidirectional prediction method, no more than two motion compensated predictions are performed for each CU. In this way, processing complexity can be reduced. The single prediction motion information for each triangle prediction unit can be derived from the single prediction merge candidate list. In some other embodiments, bidirectional prediction is allowed for each triangle prediction unit. Therefore, bidirectional prediction motion information for each triangle prediction unit can be derived from the bidirectional prediction merge candidate list.
[0119] In some embodiments, when the CU-level flag indicates that the current CU is encoded using a triangle partition mode, an index called a triangle partition index is additionally signaled. For example, the value of the triangle partition index may be in the range of [0, 39]. Using the triangle partition index, the direction (diagonal or anti-diagonal) of the triangle partition and the motion information for each partition (e.g., a merge index to the corresponding single prediction candidate list) can be obtained by a lookup table on the decoder side. After predicting each triangle prediction unit based on the obtained motion information, in an embodiment, a blending process is performed using adaptive weighting to adjust the sample values along the diagonal or anti-diagonal edges of the current CU. As a result of the blending process, a prediction signal for the entire CU may be obtained. Subsequently, a transform and quantization process may be applied to the entire CU in a manner similar to other prediction modes. Ultimately, for example, a motion field for a CU predicted using a triangle partition mode may be created by storing the motion information in a set of 4×4 units partitioned from the CU. The motion field may be used, for example, in a subsequent motion vector prediction process to construct a merge candidate list.
[0120] 3. Single prediction candidate list construction
[0121] In some embodiments, a merge candidate list of two triangle prediction units for predicting a coding block processed using a triangle prediction mode may be constructed based on a set of spatial neighboring blocks and temporal neighboring blocks of the coding block. In one embodiment, the merge candidate list is a single prediction candidate list. In an embodiment, the single prediction candidate list includes five single prediction motion vector candidates. For example, from a list including five spatial neighboring blocks (in Fig.10 5) and two time-coordinated blocks (in Fig.10 Five single prediction motion vector candidates are derived from seven neighboring blocks (marked with numbers 6 to 7 in FIG. 1 ).
[0122] In the example, the motion vectors of seven neighboring blocks are collected and put into the uni-prediction candidate list in the following order: first, the motion vectors of the uni-predicted neighboring blocks; then, for the bi-predicted neighboring blocks, the L0 motion vector (i.e., the L0 motion vector part of the bi-predicted MV), the L1 motion vector (i.e., the L1 motion vector part of the bi-predicted MV), and the average motion vector of the L0 motion vector and the L1 motion vector of the bi-predicted MV. In the example, if the number of candidates is less than five, a zero motion vector is added to the end of the list. In some other embodiments, the merged candidate list may include the motion vectors from the neighboring blocks with the same Fig.10 Less than 5 or more than 5 uni-prediction or bi-prediction merging candidates selected from the same or different candidate positions shown.
[0123] 4. Find Tables and Table Indexes
[0124] In an embodiment, a CU is encoded using a triangle partitioning mode using a merge candidate list including five candidates. Therefore, when 5 merge candidates are used for each triangle PU, there are 40 possible ways to predict the CU. In other words, there may be 40 different combinations of split directions and merge indexes: 2 (possible split directions) × (5 (possible merge indexes for the first triangle prediction unit) × 5 (possible merge indexes for the second triangle prediction unit) - 5 (the number of possibilities when a pair of first prediction units and second prediction units share the same merge index)). For example, when the same merge index is determined for two triangle prediction units, the conventional merge mode described in Section II.1 may be used instead of the triangle prediction mode to process the CU.
[0125] Therefore, in an embodiment, a triangle partition index in the range of [0, 39] may be used based on a lookup table to indicate which of the 40 combinations to use. Fig.11 An exemplary lookup table (1100) is shown for deriving a split direction and a merge index based on a triangle partition index. As shown in the lookup table (1100), a first row (1101) includes triangle partition indices ranging from 0 to 39; a second row (1102) includes possible split directions represented by 0 or 1; a third row (1103) includes possible first merge indices corresponding to a first triangle prediction unit and ranging from 0 to 4; and a fourth row 1104 includes possible second merge indices corresponding to a second triangle prediction unit and ranging from 0 to 4.
[0126] For example, when a triangle partition index having a value of 1 is received at the decoder, based on the column (1120) of the lookup table (1100), it can be determined that the split direction is the partition direction represented by the value of 1, and the first merge index and the second merge index are respectively 0 and 1. Since the triangle partition index is associated with the lookup table, the triangle partition index is also referred to as a table index in the present disclosure.
[0127] 5. Adaptive blending along the edges of triangle partitions
[0128] In an embodiment, after predicting each triangle prediction unit using the corresponding motion information, a blending process is applied to the two prediction signals of the two triangle prediction units to derive samples around diagonal or anti-diagonal edges. The blending process adaptively selects between two sets of weighting factors depending on the motion vector difference between the two triangle prediction units. In an embodiment, the two sets of weighting factors are as follows:
[0129] (1) a first weighting factor set: {7 / 8, 6 / 8, 4 / 8, 2 / 8, 1 / 8} for samples of the luma component and {7 / 8, 4 / 8, 1 / 8} for samples of the chroma components; and
[0130] (2) Second weighting factor group: {7 / 8, 6 / 8, 5 / 8, 4 / 8, 3 / 8, 2 / 8, 1 / 8} for samples of luma components and {6 / 8, 4 / 8, 2 / 8} for samples of chroma components.
[0131] The second weighting factor set has more luma weighting factors and blends more luma samples along partition edges.
[0132] In an embodiment, the following conditions are used to select one of the two weighting factor groups. When the reference frames of the two triangle partitions are different from each other, or when the motion vector difference between the two triangle partitions is greater than a threshold (e.g., 16 luma samples), the second weighting factor group is selected. Otherwise, the first weighting factor group is selected.
[0133] Fig.12 An example of a CU to which a first set of weighting factors is applied is shown. As shown, a first coding block (1201) includes luma samples and a second coding block (1202) includes chroma samples. A group of pixels along a diagonal edge in coding block (1201) or (1202) are labeled with numbers 1, 2, 4, 6, and 7, corresponding to weighting factors 7 / 8, 6 / 8, 4 / 8, 2 / 8, and 1 / 8, respectively. For example, for a pixel labeled with number 2, the sample value of the pixel after the blending operation can be obtained according to:
[0134] The mixed sample value = 2 / 8×P1+6 / 8×P2,
[0135] Wherein, P1 and P2 represent sample values at corresponding pixels but belonging to the prediction of the first triangle prediction unit and the prediction of the second triangle prediction unit respectively.
[0136] 6. Storage of motion vectors in the motion field
[0137] Fig.13An example is shown of how motion vectors of two triangle prediction units in a CU encoded using a triangle prediction mode are combined and stored to form a motion field useful for subsequent motion vector prediction. As shown, the first coding block (1301) is partitioned into two triangle prediction units along a first diagonal edge (1303) from the upper left corner to the lower right corner, and the second coding block (1302) is partitioned into two triangle prediction units along a second diagonal edge (1304) from the upper right corner to the lower left corner. The first motion vector corresponding to the first triangle prediction unit of the coding block (1301) or (1302) is represented as Mv1, and the second motion vector corresponding to the second triangle prediction unit of the coding block (1301) or (1302) is represented as Mv2. Taking the coding block (1301) as an example, at the decoder side, two merge indexes corresponding to the first triangle prediction unit and the second triangle prediction unit in the coding block (1301) can be determined based on the received syntax information. After constructing a merge candidate list for a coding block (1301), Mv1 and Mv2 may be determined according to two merge indexes.
[0138] In an embodiment, the coding block (1301) is divided into a plurality of squares having a size of 4×4 samples. Corresponding to each 4×4 square, a single prediction motion vector (e.g., Mv1 or Mv2) or two motion vectors (forming bidirectional prediction motion information) are stored according to the position of the 4×4 square in the corresponding coding block (1301). Fig.13 As shown in the example, a single prediction motion vector Mv1 or Mv2 is stored in each 4×4 square that does not overlap with the diagonal edge (1303) of the partitioned coding block (1301). In contrast, two motion vectors are stored in each 4×4 square that overlaps with the diagonal edge (1303) of the partitioned corresponding coding block (1301). For the coding block (1302), the motion vectors can be organized and stored in a similar manner to the coding block (1301).
[0139] In an embodiment, a pair of bi-directional prediction motion vectors stored in a 4×4 square overlapping the corresponding diagonal edge may be derived from Mv1 and Mv2 according to the following rule:
[0140] (1) In the case where Mv1 and Mv2 are motion vectors oriented in different directions (eg, associated with different reference frame lists L0 or L1), Mv1 and Mv2 are combined to form a pair of bidirectional prediction motion vectors.
[0141] (2) In the case where both Mv1 and Mv2 face the same direction (e.g., are associated with the same reference frame list L0 (or L1)):
[0142] (2.a) When the reference frame of Mv2 is the same as the frame in the reference frame list L1 (or L0), Mv2 is changed to be associated with the reference frame in the reference frame list L1 (or L0). Mv1 and Mv2 with the modified associated reference frame list are combined to form a pair of bidirectional prediction motion vectors.
[0143] (2.b) When the reference frame of Mv1 is the same as the frame in the reference frame list L1 (or L0), Mv1 is changed to be associated with the reference frame in the reference frame list L1 (L0). Mv2 and Mv1 with the modified associated reference frame list are combined to form a pair of bidirectional prediction motion vectors.
[0144] (2.c) Otherwise, only Mv1 is stored for the corresponding 4×4 square.
[0145] FIG. 14A to FIG. 14D An example of the derivation of a pair of bidirectionally predicted motion vectors according to an exemplary set of rules is shown. FIG. 14A to FIG. 14D Two reference frame lists are used in the present invention: the first reference frame list L0 includes reference frames with picture order count (POC) numbers POC 0 and POC 8 and reference frame indices (refIdx) of 0 and 1, respectively. The second reference frame list L1 includes reference frames with POC numbers POC 8 and POC 16 and reference frame indices of 0 and 1, respectively.
[0146] Fig.14A Corresponding to rule (1). Fig.14A As shown, Mv1 is associated with POC 0 in L0 and therefore has a reference frame index refIdx = 0, while Mv2 is associated with POC 8 in L1 and therefore has a reference frame index refIdx = 0. Since Mv1 and Mv2 are associated with different reference frame lists, Mv1 and Mv2 are used together as a pair of bidirectional motion vectors.
[0147] Fig. 14B Corresponding to rule (2.a). As shown, Mv1 and Mv2 are associated with the same reference frame list L0. Mv2 points to POC8 which is also a member of L1. Therefore, Mv2 is modified to be associated with POC8 in L1, and the value of the corresponding reference index is changed from 1 to 0.
[0148] Fig. 14C and Fig.14D Corresponding to rules (2b) and (2c).
[0149] 7. Syntax Elements for Signaling Triangle Prediction Parameters
[0150] In some embodiments, the triangle prediction unit mode is applied to a CU in skip or merge mode. The block size of a CU cannot be less than 8×8. For a CU encoded in skip or merge mode, a CU-level flag is signaled to indicate whether the triangle prediction unit mode is applied for the current CU. In an embodiment, when the triangle prediction unit mode is applied to a CU, a table index is signaled, which indicates the direction for splitting the CU into two triangle prediction units and the motion vectors (or corresponding merge indexes) of the two triangle prediction units. The table index ranges from 0 to 39. A lookup table is used to derive the split direction and motion vector from the table index.
[0151] III. Signaling and deriving triangle prediction parameters
[0152] 1. Signaling triangle prediction parameters
[0153] As described above, when a triangle prediction mode is applied to a coding block, three parameters are generated: a split direction, a first merge index corresponding to a first triangle prediction unit, and a second merge index corresponding to a second triangle prediction unit. As described, in some examples, the three triangle prediction parameters are signaled from the encoder side to the decoder side by signaling a table index. Based on a lookup table (e.g., Fig.11 The lookup table (1100) in the example can be used to derive three triangle prediction parameters using the table index received at the decoder side. However, additional storage space is required to store the lookup table at the decoder, which may become a burden in some implementations of the decoder. For example, the additional memory may lead to an increase in the cost and power consumption of the decoder.
[0154] The present disclosure provides a solution for solving the above problems. Specifically, instead of signaling a table index and relying on a lookup table to interpret the table index, three syntax elements are signaled from the encoder side to the decoder side. Three triangle prediction parameters (split direction and two merge indexes) can be derived or determined on the decoder side based on the three syntax elements without using a lookup table. In an embodiment, the three syntax elements can be signaled in any order for the corresponding coding block.
[0155] In an embodiment, the three syntax elements include a split direction syntax element, a first index syntax element, and a second index syntax element. The split direction syntax element may be used to determine a split direction parameter. The first index syntax element and the second index syntax element may be used together to determine a parameter of a first merge index and a parameter of a second merge index. In an embodiment, an index (as opposed to a table index, referred to as a triangle prediction index) may first be derived based on the first index syntax element and the second index syntax element and the split direction syntax element. Three triangle prediction parameters may then be determined based on the triangle prediction index.
[0156] There are multiple ways to configure or encode the three syntax elements to signal the information of the three triangle prediction parameters. For the split direction syntax element, in an embodiment, the split direction syntax element takes a value of 0 or 1 to indicate whether the split direction is from the upper left corner to the lower right corner or from the upper right corner to the lower left corner.
[0157] For the first index syntax element and the second index syntax element, in an embodiment, the first index syntax element is configured to have the value of the parameter of the first merge index, and the second index syntax element is configured to: have the value of the second merge index when the second merge index is less than the first merge index; and have the value of the second merge index minus one when the second merge index is greater than the first merge index (as described above, the second merge index and the first merge index should take different values, so the second merge index and the first merge index will not be equal to each other).
[0158] As an example, in an embodiment, the merge candidate list has a length of 5 merge candidates. Therefore, the first index syntax element takes a value of 0, 1, 2, 3, or 4, and the second index syntax element takes a value of 0, 1, 2, or 3. For example, in the case where the value of the first merge index parameter is 2 and the value of the second merge index parameter is 4 to signal the first merge index and the second merge index, the values of the first index syntax element and the second index syntax element will be 2 and 3, respectively.
[0159] In an embodiment, the coding block is located at a position with coordinates (xCb, yCb) relative to a reference point in the current frame, where xCb and yCb represent the horizontal coordinate and vertical coordinate of the current coding block, respectively. In some embodiments, xCb and yCb are aligned with the horizontal coordinate and the vertical coordinate at a granularity of 4×4. Therefore, the split direction syntax element is represented as split_dir[xCb][yCb]. The first index syntax element is represented as merge_triangle_idx0[xCb][yCb]. The second syntax element is represented as merge_triangle_idx1[xCb][yCb].
[0160] The three syntax elements may be signaled in any order in the bitstream. For example, the three syntax elements may be signaled in one of the following orders: 1. split_dir, merge_triangle_idx0, merge_triangle_idx1; 2. split_dir, merge_triangle_idx1, merge_triangle_idx0; 3. merge_triangle_idx0, split_dir, merge_triangle_idx1; 4. merge_triangle_idx1
[0161] idx0, merge_triangle_idx1, split_dir; 5. merge_triangle_idx1, split_dir, merge_triangle_idx0; 6. merge_triangle_idx1, merge_triangle_idx0, split_dir.
[0162] 2. Export triangle prediction parameters
[0163] 2.1 Deriving triangle prediction parameters based on syntax elements
[0164] In an embodiment, three triangle prediction parameters are derived based on three syntax elements received at the decoder side. For example, the split direction parameter may be determined based on the value of the split direction syntax element. The first merge index parameter may be determined to have the value of the second index syntax element when the second index syntax element has a value less than the first index syntax element. In contrast, the second merge index parameter may be determined to have the value of the second index syntax element plus 1 when the second index syntax element has a value greater than or equal to the first index syntax element.
[0165] An example of pseudo code implementing the above export process is shown below:
[0166] m=merge_triangle_idx0[xCb][yCb];
[0167] n=merge_triangle_idx1[xCb][yCb];
[0168] n=n+(n>=m?1:0),
[0169] Wherein, m and n represent parameters of the first merge index and parameters of the second merge index, respectively, and merge_triangle_idx0[xCb][yCb] and merge_triangle_idx1[xCb][yCb] represent the first index syntax element and the second index syntax element, respectively.
[0170] 2.2 Deriving triangle prediction parameters based on triangle prediction indices derived from syntax elements
[0171] In an embodiment, a triangle prediction index is first derived based on the three syntax elements received at the decoder side. Three triangle prediction parameters are then determined based on the triangle prediction index. For example, the values of the three syntax elements in binary bits may be combined into a bit string forming the triangle prediction index. Thereafter, the bits of the corresponding syntax elements may be extracted from the bit string and used to determine the three triangle prediction parameters.
[0172] In an embodiment, the triangle prediction index is obtained as a linear function of three syntax elements according to the following equation:
[0173] mergeTriangleIdx[xCb][yCb]=a*merge_triangle_idx0[xCb][yCb]+b*merge_triangle_idx1[xCb][yCb]+c*split_dir[xCb][yCb],
[0174] Where mergeTriangleIdx[xCb][yCb] represents the triangle prediction index, a, b, and c are integer constants, and merge_triangle_idx0[xCb][yCb], merge_triangle_idx1[xCb]
[0175] [yCb] and split_dir[xCb][yCb] represent three signaled syntax elements, namely the first index syntax element, the second index syntax element and the split direction syntax element, respectively.
[0176] As an example, in the above example where the merge candidate list includes 5 merge candidates, the constants may take the following values: a = 8, b = 2, and c = 1. In this case, the above linear function is equal to shifting the value of the first index syntax element left by 3 bits, shifting the value of the second index syntax element left by 2 bits, and then combining the bits of the three syntax elements into a bit string by an addition operation.
[0177] In other examples, the length of the merge candidate list may be different from the length 5. Therefore, the first merge index parameter and the second merge index parameter may have values in a range different from [0, 4]. The corresponding first index syntax element and the second index syntax element may also have values in different ranges. The constants a, b, and c may take different values accordingly to correctly combine the three syntax elements into a bit string. In addition, the order of the three syntax elements may be arranged in a manner different from the above example.
[0178] After the triangle prediction index is determined as described above, three triangle prediction parameters may be determined based on the determined triangle prediction index. In one embodiment, corresponding to the above example of a=8, b=2, c=1, the split direction may be determined as follows:
[0179] triangleDir=mergeTriangleIdx[xCb][yCb]&1,
[0180] Among them, triangleDir represents the split direction parameter, and the last bit of the triangle prediction index is extracted through a binary AND operation (&) as the value of the split direction parameter.
[0181] In an embodiment, corresponding to the above example of a=8, b=2 and c=1, the first merge index and the second merge index may be determined according to the following pseudo code:
[0182] m = mergeTriangleIdx[xCb][yCb]>>3; / / Except the last three digits
[0183] n=(mergeTriangleIdx[xCb][yCb]>>1)&3; / / Extract the second to last digit and the third to last digit
[0184] n=n+(n>=m?1∶0).
[0185] As shown, the bits except the last three bits in the triangle prediction index are used as the first merge index parameter. If the value of the second-to-last bit and the third-to-last bit is less than the first merge index value, the second-to-last bit and the third-to-last bit in the triangle prediction index are used as the second merge index parameter. Otherwise, the value of the second-to-last bit and the third-to-last bit plus 1 is used as the second merge index parameter.
[0186] 2.3 Adaptive Configuration of Syntax Elements
[0187] In some embodiments, the first index syntax element and the second index syntax element may be configured to represent different meanings depending on the split direction of the coding unit. Or, in other words, the first index syntax element and the second index syntax element may be encoded in different ways depending on which split direction is used to split the coding unit. For example, the probability distribution of the values of the two merged indexes may be different corresponding to different split directions, which is due to the characteristics of the current frame or the local features in the current frame. Therefore, the two index syntax elements may be adaptively encoded according to the corresponding split direction to save bits used for encoding the index syntax elements.
[0188] For example, Fig. 9 As shown in the example, in coding blocks (910) and (920), two triangle prediction units PU1 and PU2 are defined to correspond to corresponding split directions. When a first split direction from upper left to lower right is used as in coding block (910), a first index syntax element may be used to carry a merge index corresponding to PU1, while a second index syntax element may be used to carry merge index information corresponding to PU2. In contrast, when a second split direction from upper right to lower left is used as in coding block (920), a first index syntax element may be used to carry a merge index corresponding to PU2, while a second index syntax element may be used to carry merge index information corresponding to PU1.
[0189] Corresponding to the adaptive encoding of the index syntax element at the encoder side, a suitable decoding operation can be performed at the decoder side. A first example of a pseudo code for implementing adaptive decoding of the index syntax element is shown below:
[0190] if (triangleDir == 0)
[0191] {
[0192] m=merge_triangle_idx0[xCb][yCb];
[0193] n=merge_triangle_idx1[xCb][yCb];
[0194] n=n+(n>=m?1∶0);
[0195] }
[0196] otherwise
[0197] {
[0198] n=merge_triangle_idx0[xCb][yCb];
[0199] m=merge_triangle_idx1[xCb][yCb];
[0200] m=m+(m>=n?1∶0);
[0201] }
[0202] A second example of pseudo code for implementing adaptive decoding of index syntax elements is shown below, where triangle prediction indices are used:
[0203] if (triangleDir == 0)
[0204] {
[0205] m=mergeTriangleIdx[xCb][yCb]>>3;
[0206] n=(mergeTriangleIdx[xCb][yCb]>>1)&3;
[0207] n=n+(n>=m?1∶0);
[0208] }
[0209] otherwise
[0210] {
[0211] n=mergeTriangleIdx[xCb][yCb]>>3;
[0212] m=(mergeTriangleIdx[xCb][yCb]>>1)&3;
[0213] m=m+(m>=n?1∶0);
[0214] }
[0215] In the above first and second examples of pseudocode, in different implementations, the split direction (expressed as triangleDir) may be determined directly according to the split direction syntax element or may be determined according to the triangle prediction index.
[0216] 3. Entropy Coding of Three Syntax Elements
[0217] 3.1 Binarization of three grammatical elements
[0218] In various embodiments, the three syntax elements (split direction syntax element, first index syntax element, and second index syntax element) used to signal three triangle prediction parameters (split direction and first merge index and second merge index) may be encoded using different binarization methods.
[0219] In one embodiment, the first index syntax element is encoded using truncated unary coding. In another embodiment, the first index syntax element is encoded using truncated binary coding. In one example, the maximum valid value of the first index syntax element is equal to 4. In another embodiment, a combination of prefix and fixed length binarization is used to encode the first index syntax element. In one example, the prefix binary is first signaled to indicate whether the first index syntax element is 0. When the first index syntax element is not zero, an additional binary value (bin) will be encoded using a fixed length to indicate the actual value of the first index syntax element. Table 1 shows examples of truncated unary coding, truncated binary coding, and prefix and fixed length coding with a maximum valid value equal to 4.
[0220] Table 1
[0221] symbol Truncated unary encoding Truncated binary encoding Prefix + fixed length encoding 0 0 00 0 1 10 01 100 2 110 10 101 3 1110 110 110 4 1111 111 111
[0222] In one embodiment, the second index syntax element is encoded using truncated unary coding. In another embodiment, the second index syntax element is encoded using binary coding (i.e., a fixed length coding with 2 bits). Examples of truncated unary coding and binary coding with a maximum valid value equal to 3 are shown in Table 2.
[0223] Table 2
[0224]
[0225]
[0226] 3.2 Context-based Encoding
[0227] In some embodiments, certain restrictions are applied to the probability model used in the entropy coding of the three syntax elements to signal the three triangular prediction parameters.
[0228] In one embodiment, for the three syntax elements of the coding block processed using the triangular prediction mode, the binary values encoded using no more than N contexts in total are restricted. For example, N is an integer of 0, 1, 2, 3, etc. In one embodiment, when N is equal to 0, all binary values of the three syntax elements can be encoded with the same probability.
[0229] In one embodiment, when N is equal to 1, there is only one context-coded binary value in the group of three syntax elements. In one example, one binary value in the split direction syntax element is context-coded, and the remaining binary values in the split direction syntax element and all binary values in the first index syntax element and the second index syntax element are coded with the same probability. In another example, one binary value in the second index syntax element is context-coded, and the remaining binary values in the second index syntax element and all binary values in the split direction element and the first index syntax element are coded with the same probability.
[0230] In one embodiment, there are two context-coded binary values in the group of three syntax elements when N is equal to 2. In one example, one binary value in the first indexed syntax element and another binary value in the second indexed syntax element are context-coded, and the remaining binary values of the three syntax elements are all coded with the same probability.
[0231] In one embodiment, when applying a context model for a syntax element, only the first binary value of the syntax element is applied to the context model. The remaining binary values of the syntax element are encoded with the same probability.
[0232] 4. Example triangle prediction processing
[0233] Fig.15 A flow chart outlining a process (1500) according to an embodiment of the present disclosure is shown. The process (1500) may be used for reconstruction of a block encoded in a triangular prediction mode to generate a prediction block for the block under reconstruction. In various embodiments, the process (1500) is performed by a processing circuit, such as a processing circuit in a terminal device (210), (220), (230), and (240), 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 an entropy decoder (771), an inter-frame decoder (780), etc. In some embodiments, the process (1500) is implemented by software instructions, so when the processing circuit executes the software instructions, the processing circuit performs the process (1500). The process starts at (S1501) and proceeds to (S1510).
[0234] At (S1510), three syntax elements (a split direction syntax element, a first index syntax element, and a second index syntax element) are received at a video decoder in a video bitstream. The three syntax elements carry information of three triangle prediction parameters (a split direction parameter, a first merge index parameter, and a second merge index parameter) of a coding block encoded using a triangle prediction mode. For example, a coding unit is divided into a first triangle prediction unit and a second triangle prediction unit according to a split direction indicated by the split direction syntax element. The first triangle prediction unit and the second triangle prediction unit may be associated with a first merge index and a second merge index, respectively, and the first merge index and the second merge index are associated with a merge candidate list constructed for the coding block.
[0235] At (S1520), three triangle prediction parameters (splitting direction, first merge index, and second merge index) may be determined according to the three syntax elements received at (S1510). For example, the various techniques described in Section III.2 may be used to derive the three triangle prediction parameters.
[0236] At (S1530), the coding block can be reconstructed according to the split direction, the first merge index, and the second merge index determined in (S1520). For example, a merge candidate list can be constructed for the coding block. Based on the merge candidate list and the first merge index to the merge candidate list, the first single prediction motion vector and the first reference frame index associated with the first single prediction motion vector can be determined. Similarly, based on the merge candidate list and the second merge index to the merge candidate list, the second single prediction motion vector and the second reference frame index associated with the second single prediction motion vector can be determined. Subsequently, the first prediction corresponding to the first triangular prediction unit can be determined according to the first single prediction motion vector and the first reference frame index associated with the first single prediction motion vector. Similarly, the second prediction corresponding to the second triangular prediction unit can be determined according to the second single prediction motion vector and the second reference frame index associated with the second single prediction motion vector. Thereafter, adaptive weighted processing can be applied to samples along the diagonal edge between the first triangular prediction unit and the second triangular prediction unit based on the first prediction and the second prediction to derive the final prediction of the coding block. The process (1500) may proceed to (S1599) and terminate at S1599.
[0237] The embodiment of the present disclosure further provides a video decoding device, the device comprising a processing circuit, the processing circuit being configured to:
[0238] Receiving a split direction syntax element, a first index syntax element, and a second index syntax element associated with a coding block of a picture, the coding block being encoded in a triangle prediction mode, and the coding block being divided into a first triangle prediction unit and a second triangle prediction unit according to a split direction indicated by the split direction syntax element, the first index syntax element indicating a first merge index to a merge candidate list, the second index syntax element indicating a second merge index to the merge candidate list, the merge candidate list being constructed for the first triangle prediction unit and the second triangle prediction unit;
[0239] Determine the split direction, the first merge index, and the second merge index based on the split direction syntax element, the first index syntax element, and the second index syntax element; and
[0240] The coding block is reconstructed according to the split direction, the first merge index and the second merge index.
[0241] The device provided in the embodiment of the present disclosure can be used to execute the above method. The device can be a software device, which runs in a computer device to implement the corresponding method. The device specifically includes the following units:
[0242] a communication unit, configured to receive a split direction syntax element, a first index syntax element, and a second index syntax element associated with a coding block of a picture, the coding block being encoded in a triangle prediction mode, and the coding block being divided into a first triangle prediction unit and a second triangle prediction unit according to a split direction indicated by the split direction syntax element, the first index syntax element indicating a first merge index to a merge candidate list, the second index syntax element indicating a second merge index to the merge candidate list, the merge candidate list being constructed for the first triangle prediction unit and the second triangle prediction unit;
[0243] a determining unit, configured to determine the split direction, the first merge index, and the second merge index based on the split direction syntax element, the first index syntax element, and the second index syntax element;
[0244] A reconstruction unit is used to reconstruct the coding block according to the split direction, the first merging index and the second merging index.
[0245] IV. Computer System
[0246] 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, Fig.16 A computer system (1600) suitable for implementing certain embodiments of the disclosed subject matter is shown.
[0247] Computer software may be encoded using any suitable machine code or computer language that may be assembled, compiled, linked, or the like to create code comprising instructions that may be executed directly by one or more computer central processing units (CPU), graphics processing units (GPU), etc., or through interpretation, microcode execution, or the like.
[0248] 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, Internet of Things devices, and the like.
[0249] Fig.16 The components for the computer system (1600) shown in the example 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. Nor should the configuration of components 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).
[0250] The computer system (1600) may include certain human-machine interface input devices. Such human-machine interface input devices may respond 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, clapping), visual input (e.g., gestures), olfactory input (not described). Human-machine interface devices may also be used to capture certain media that are not necessarily directly related to human conscious input, such as audio (e.g., voice, music, ambient sounds), images (e.g., scanned images, photographic images obtained from a still image camera), and videos (e.g., two-dimensional video, three-dimensional video including stereoscopic video).
[0251] Input human-machine interface devices may include one or more of the following (only one of each is depicted): keyboard (1601), mouse (1602), touchpad (1603), touch screen (1610), data gloves (not shown), joystick (1605), microphone (1606), scanner (1607), camera (1608).
[0252] The computer system (1600) may also include certain human interface output devices. Such human 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-machine 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), but there may also be tactile feedback devices that do not serve as input devices), audio output devices (e.g., speakers (1609), headphones (not shown)), visual output devices (e.g., screens (1610) including cathode ray tube (CRT) screens, liquid crystal display (LCD) screens, plasma screens, organic light-emitting diode (OLED) screens, each with or without touch screen input capabilities, each with or without tactile feedback capabilities - some of which may be able to output two-dimensional visual output or more than three-dimensional output via means such as stereoscopic image output, virtual reality glasses (not depicted), holographic displays, and cigarette cans (not depicted)), and printers (not depicted).
[0253] The computer system (1600) may also include human-accessible storage devices and their associated media, such as optical media including CD / DVD read only memory (ROM) / read write (RW) memory (1620) with CD / DVD and other media (1621), thumb drives (1622), removable hard drives or solid-state drives (1623), legacy magnetic media such as tapes and floppy disks (not depicted), dedicated ROM / application specific integrated circuit (ASIC) / programmable logic device (PLD) based devices such as security dongles (not depicted), etc.
[0254] Those skilled in the art will also appreciate 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.
[0255] The computer system (1600) may also include an interface to one or more communication networks. The network may be, for example, wireless, wired, optical. The network may also be local, wide, urban, vehicle-mounted and industrial, real-time, delay-tolerant, etc. Examples of networks include: local area networks such as Ethernet, wireless local area networks (LANs), cellular networks including global system for mobile communications (GSM), the third generation (3G), the fourth generation (4G), the fifth generation (5G), long term evolution (LTE), etc., television wired or wireless wide area digital networks including cable television, satellite television and terrestrial broadcast television, vehicle networks including controller area network (CAN) buses and industrial networks, etc. Some networks typically require an external network interface adapter attached to some universal data port or peripheral bus (1649) (such as, for example, a universal serial bus (USB) port of the computer system (1600); others 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., a CAN bus to some CAN bus devices), or two-way (e.g., using a local area digital network or a wide area digital network to other computer systems). Certain protocols and protocol stacks can be used on each of these networks and network interfaces as described above.
[0256] The above-mentioned human-machine interface device, human-accessible storage device, and network interface may be attached to the core ( 1640 ) of the computer system ( 1600 ).
[0257] The core (1640) may include one or more central processing units (CPUs) (1641), graphics processing units (GPUs) (1642), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1643), hardware accelerators for certain tasks (1644), etc. These devices, along with read-only memory (ROM) (1645), random access memory (1646), internal mass storage devices (e.g., internal non-user accessible hard disk drives, solid state drives (SSDs), etc.) (1647), 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 by additional CPUs, GPUs, etc. Peripheral devices may be attached to the core's system bus (1648) directly or via a peripheral bus (1649). The architecture of the peripheral bus includes peripheral component interconnect (PCI), USB, etc.
[0258] The CPU (1641), GPU (1642), FPGA (1643) and accelerator (1644) can execute certain instructions, which in combination can constitute the computer code mentioned above. The computer code can be stored in ROM (1645) or RAM (1646). Transition 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 memory 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), ROMs (1645), RAMs (1646), etc.
[0259] 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 the medium and computer code may be of a type well known and available to those skilled in the art of computer software.
[0260] As an example and by way of non-limiting means, a computer system (1600) having an architecture, and in particular a core (1640) can provide functionality due to a processor (including a CPU, GPU, FPGA, accelerator, etc.) executing software embodied in one or more tangible computer-readable media. Such a computer-readable medium can be a medium associated with a user-accessible mass storage device as described above, as well as certain storage devices of the core (1640) having a non-transient nature, for example, a core internal mass storage device (1647) or a ROM (1645). Software implementing various embodiments of the present disclosure can be stored in such a device and executed by the core (1640). Depending on specific needs, the computer-readable medium may 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 a specific process or a specific part of a specific process described herein, including defining a data structure stored in the RAM (1646) and modifying such a data structure according to a process defined by the software. Additionally or alternatively, a computer system may provide functionality due to logic hardwired or otherwise embodied in circuitry (e.g., accelerator (1644)) that may operate in place of or in conjunction with software to perform a particular process or a particular portion of a particular process described herein. Where appropriate, references to software may include logic, and conversely, references to logic may include software. Where appropriate, references to computer-readable media may include circuitry (e.g., an integrated circuit (IC)) storing software for execution, circuitry embodying logic for execution, or both. The present disclosure includes any suitable combination of hardware and software.
[0261] Appendix A: Abbreviations
[0262] JEM: Joint Exploration Model
[0263] VVC: Versatile Video Coding
[0264] BMS: Benchmark Setting
[0265] MV: Motion Vector
[0266] HEVC: High Efficiency Video Coding
[0267] SEI: Supplementary Enhancement Information
[0268] VUI: Video Availability Information
[0269] GOP: Group of Pictures
[0270] TU: Transform Unit
[0271] PU: prediction unit
[0272] CTU: Coding Tree Unit
[0273] CTB: Coding Tree Block
[0274] PB: prediction block
[0275] HRD: Hypothesized Reference Decoder
[0276] SNR: Signal to Noise Ratio
[0277] CPU: Central Processing Unit
[0278] GPU: Graphics Processing Unit
[0279] CRT: cathode ray tube
[0280] LCD: Liquid Crystal Display
[0281] OLED: Organic Light Emitting Diode
[0282] CD: compact disc
[0283] DVD: Digital Video Disc
[0284] ROM: Read Only Memory
[0285] RAM: Random Access Memory
[0286] ASIC: Application-Specific Integrated Circuit
[0287] PLD: Programmable Logic Device
[0288] LAN: Local Area Network
[0289] GSM: Global System for Mobile Communications
[0290] LTE: Long Term Evolution
[0291] CANBus: Controller Area Network Bus
[0292] USB: Universal Serial Bus
[0293] PCI: Peripheral Component Interconnect
[0294] FPGA: Field Programmable Gate Array
[0295] SSD: Solid State Drive
[0296] IC: Integrated Circuit
[0297] CU: Coding Unit
[0298] Although the present disclosure has described several exemplary embodiments, there are changes, permutations, and various alternative equivalents that fall within the scope of the present disclosure. Therefore, it should be understood that those skilled in the art will be able to design many systems and methods that, although not explicitly shown or described herein, embody the principles of the present disclosure and are therefore within the spirit and scope of the present disclosure.
Claims
1. A method for video decoding, characterized in that: include: Receiving and decoding a split direction syntax element, a first index syntax element, and a second index syntax element associated with a coding block of a picture, wherein the coding block is encoded in a triangular prediction mode and the coding block is divided into a first prediction unit and a second prediction unit according to the split direction, wherein the first index syntax element is encoded as one or more first binary values, and the second index syntax element is encoded as one or more second binary values; deriving a triangle prediction index of the coding block based on a first value indicated by the first index syntax element, a second value indicated by the first index syntax element, and a third value indicated by the split direction syntax element, wherein the split direction syntax element, the first index syntax element, and the second index syntax element are transmitted sequentially in a bitstream in a forward-to-backward order; Processing the triangle prediction index to determine the splitting direction; Processing the triangle prediction index to determine a first merge index, wherein the first merge index is used to identify first motion information in a merge candidate list constructed for the coding block; and The triangle prediction index is processed to determine a second merge index, wherein the second merge index is used to identify second motion information in a merge candidate list constructed for the coding block.
2. The method according to claim 1, characterized in that Also includes: determining a first prediction sample of the first prediction unit according to the first motion information; determining a second prediction sample of the second prediction unit according to the second motion information; as well as The coding block is reconstructed according to the first prediction sample of the first prediction unit and the second prediction sample of the second prediction unit.
3. The method according to claim 1, characterized in that The first binary value of the one or more first binary values is obtained according to context encoding.
4. The method according to claim 1, characterized in that A first binary value among the one or more second binary values is obtained according to context encoding.
5. The method according to claim 1, characterized in that The split direction syntax element indicates that the third value is 0 or 1.
6. The method according to claim 1, characterized in that Determining the splitting direction includes: When the split direction syntax element indicates that the third value is 0, determining that the split direction points from the upper left corner to the lower right corner; and When the split direction syntax element indicates that the third value is 1, it is determined that the split direction points from the upper right corner to the lower left corner.
7. The method according to claim 1, characterized in that The first index syntax element indicates that the first value is 0, 1, 2, 3 or 4; and The second index syntax element indicates that the second value is 0, 1, 2 or 3.
8. The method according to claim 1, characterized in that: The first index syntax element indicates that the first value is m, and the second index syntax element indicates that the second value is n; Determining the first merge index includes: setting the first merge index to m; Determining the second merge index includes: when n is less than m, setting the second merge index to n; and when n is greater than or equal to m, setting the second merge index to n+1.
9. The method according to claim 1, characterized in that: The split direction syntax element, the first index syntax element and the second index syntax element are encoded according to different binarization methods.
10. The method according to claim 1, characterized in that The first index syntax element is encoded according to a binarization method selected from truncated unary coding, truncated binary coding, and prefix and fixed length coding.
11. The method according to claim 1, characterized in that: The second index syntax element is encoded according to a binarization method selected from truncated unary coding and truncated binary coding.
12. The method according to claim 1, characterized in that The step of deriving the triangle prediction index is based on the formula: The triangle prediction index=a*the first value indicated by the first index syntax element+b*the second value indicated by the second index syntax element+c*the third value indicated by the split direction syntax element, Where a, b, and c are all integers.
13. A method for video encoding, characterized in that include: Determine a split direction, a first merge index, and a second merge index associated with a coding block of a picture, wherein the coding block is divided into a first prediction unit and a second prediction unit according to the split direction, the first merge index is used to identify first motion information in a merge candidate list constructed for the coding block, and the second merge index is used to identify second motion information in a merge candidate list constructed for the coding block; Determine a first index syntax element, a second index syntax element, and a split direction syntax element based on the split direction, the first merge index, and the second merge index, wherein the first index syntax element is encoded as one or more first binary values, the second index syntax element is encoded as one or more second binary values, a first value indicated by the first index syntax element, a second value indicated by the first index syntax element, and a third value indicated by the split direction syntax element are used to derive a triangle prediction index of the coding block, and the triangle prediction index is used to be processed to obtain the split direction, the first merge index, and the second merge index; The coding block is encoded in a triangle prediction mode to generate a bitstream associated with the coding block, wherein the split direction syntax element, the first index syntax element and the second index syntax element are transmitted sequentially in the bitstream in a front-to-back order.
14. A device for video decoding, characterized in that: include: A decoding module, configured to receive and decode a split direction syntax element, a first index syntax element, and a second index syntax element associated with a coding block of a picture, wherein the coding block is encoded in a triangular prediction mode and the coding block is divided into a first prediction unit and a second prediction unit according to the split direction, wherein the first index syntax element is encoded as one or more first binary values, and the second index syntax element is encoded as one or more second binary values; a derivation module, configured to derive a triangle prediction index of the coding block based on a first value indicated by the first index syntax element, a second value indicated by the first index syntax element, and a third value indicated by the split direction syntax element, wherein the split direction syntax element, the first index syntax element, and the second index syntax element are sequentially transmitted in a bitstream in a forward-to-backward order; A processing module is used to process the triangle prediction index to determine the split direction, process the triangle prediction index to determine a first merge index, and process the triangle prediction index to determine a second merge index, wherein the first merge index is used to identify the first motion information in the merge candidate list constructed for the coding block, and the second merge index is used to identify the second motion information in the merge candidate list constructed for the coding block.
15. A device for video encoding, characterized in that: include: A first determination module, configured to determine a split direction, a first merge index, and a second merge index associated with a coding block of a picture, wherein the coding block is divided into a first prediction unit and a second prediction unit according to the split direction, the first merge index is used to identify first motion information in a merge candidate list constructed for the coding block, and the second merge index is used to identify second motion information in the merge candidate list constructed for the coding block; A first encoding module, configured to determine a first index syntax element, a second index syntax element, and a split direction syntax element based on the split direction, the first merge index, and the second merge index, wherein the first index syntax element is encoded as one or more first binary values, the second index syntax element is encoded as one or more second binary values, a first value indicated by the first index syntax element, a second value indicated by the first index syntax element, and a third value indicated by the split direction syntax element are used to derive a triangle prediction index of the coding block, and the triangle prediction index is used to be processed to obtain the split direction, the first merge index, and the second merge index; A second encoding module is used to encode the coding block in a triangle prediction mode to generate a bit stream associated with the coding block, wherein the split direction syntax element, the first index syntax element and the second index syntax element are transmitted sequentially in the bit stream in a front-to-back order.
16. A computer-readable storage medium, characterized in that: The method comprises a computer program, wherein the computer program is executed by a processor to implement the method according to any one of claims 1 to 13.
17. A computer-readable storage medium, characterized in that: A computer-readable code stream is stored, wherein the code stream is generated by the method of claim 13.
18. A method for processing a video bitstream, characterized in that: The video bit stream is generated according to the encoding method according to claim 13, or is decoded based on the decoding method according to any one of claims 1 to 12.
