Encoder, Decoder, and Corresponding Methods for Inter Prediction
Patent Information
- Application Number
- JP2023031523
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-09-24
- Filing Date
- 2023-03-02
- Publication Date
- 2025-02-26
- Estimated Expiration
- 2039-11-22
Smart Images

Figure 0007635503000022 
Figure 0007635503000023 
Figure 0007635503000024
Abstract
Description
[Technical field]
[0001] This invention claims priority to U.S. Provisional Patent Application No. 62 / 770,826, filed November 22, 2018, U.S. Provisional Patent Application No. 62 / 787,678, filed January 2, 2019, U.S. Provisional Patent Application No. 62 / 816,897, filed March 11, 2019, and U.S. Provisional Patent Application No. 62 / 905,367, filed September 24, 2019, the contents of which are incorporated by reference in their entireties herein. TECHNICAL FIELD Embodiments of the present application relate generally to the field of image processing, and more specifically, to inter-prediction. [Background technology]
[0002] Video coding (video encoding and decoding) is used in a wide range of digital video applications, e.g. in broadcast digital TV, video transmission over the Internet and mobile networks, or in real-time, interactive applications such as video chat, video conferencing, DVDs and Blu-ray Discs, video content acquisition and editing systems, and camcorders in security applications.
[0003] The amount of video data required to render even a relatively short video can be substantial, which can result in difficulties when the data is to be streamed or otherwise communicated over a communication network with limited bandwidth capacity. Thus, video data is typically compressed before being communicated over modern telecommunication networks. The size of the video can also be an issue when the video is stored on a storage device, since memory resources may be limited. Video compression devices often use software and / or hardware at the source to code the video data before transmission or storage, thereby reducing the amount of data required to represent a digital video image. The compressed data is then received at the destination by a video decompression device, which decodes the video data. In view of limited network resources and an ever-increasing demand for high video quality, improved compression and decompression techniques are desired that improve compression ratios with little or no sacrifice in image quality. Summary of the Invention
[0004] Embodiments of the present application provide apparatus and methods for encoding and decoding as set forth in the independent claims.
[0005] In a first aspect of the present application, a prediction method for an image block, where a current block includes a first prediction sub-block and a second prediction sub-block, includes a step of parsing a first index from a bitstream, where the first index is used to obtain prediction information of the first prediction sub-block, a step of parsing a second index from the bitstream, a step of comparing the first index with the second index, a step of adjusting the second index if the second index is greater than or equal to the first index, and a step of obtaining prediction information of the second prediction sub-block according to the adjusted second index.
[0006] In a possible implementation, adjusting the second index includes incrementing the second index by m, where m is a positive integer. In a possible implementation, m is 1.
[0007] In a possible implementation, before analyzing the first index from the bitstream, the prediction method further comprises: analyzing at least one indicator to determine a prediction mode of the current block, the prediction mode being a triangular prediction mode or a geometric prediction mode. The prediction mode may be another sub-block based prediction mode, including a rectangular or non-rectangular (trapezoidal) mode. And the triangular prediction mode and the geometric prediction mode may be combined as a single prediction mode, which may also be involved in the possible implementation.
[0008] In a possible implementation, the prediction method further comprises the step of obtaining a candidate list for the current block.
[0009] In a possible implementation, the prediction information of the first prediction sub-block is obtained from the candidate list according to the first index.
[0010] In a possible implementation, the prediction information of the second prediction sub-block is obtained from the candidate list according to the adjusted second index. In a possible implementation, the candidate list is a merge mode candidate list.
[0011] In a possible implementation, the prediction method further includes a step of analyzing the first number to determine a maximum allowable candidate index in the candidate list, and a step of obtaining a maximum index based on the maximum allowable candidate index, wherein the first index is not greater than the maximum index.
[0012] In a possible implementation, obtaining the maximum index based on the maximum allowed candidate index includes obtaining the maximum index by a calculation between the maximum allowed candidate index and a predetermined number.
[0013] In a possible implementation, the step of obtaining a maximum index based on a maximum allowable candidate index includes a step of analyzing the second number to derive a difference between the maximum allowable candidate index and the maximum index, and a step of obtaining the maximum index by calculating between the maximum allowable candidate index and the difference.
[0014] In a possible implementation, the prediction method further comprises a step of analyzing the third number to determine a maximum index.
[0015] In a possible implementation, the maximum allowed candidate index is greater than or equal to the maximum index.
[0016] In a possible implementation, after obtaining the prediction information of the second prediction sub-block according to the adjusted second index, the prediction method further includes a step of obtaining a prediction value of the current block based on the prediction information of the first prediction sub-block and the prediction information of the second prediction sub-block.
[0017] In a possible implementation, the first index or the second index is binarized according to a truncated unary code.
[0018] In a possible implementation, the first bin of the binarized first index or the second index is coded using the normal coding mode of CABAC.
[0019] In a possible implementation, the non-first bins of the binarized first index or second index are coded using the bypass coding mode of CABAC.
[0020] In a possible implementation, the prediction method further comprises a step of parsing a direction indicator from the bitstream, the direction indicator being used to indicate the split direction of the current block.
[0021] In a second aspect of the present application, a method for inter-prediction of a block of an image comprises the steps of obtaining a prediction indicator, determining whether a prediction indicator indicating sub-block prediction is applied to the block, obtaining two different indicators when the prediction indicator indicates that sub-block prediction is applied to the block, the two different indicators respectively indicating two different entries in a motion information candidate list for two sub-blocks in the block, and performing inter-prediction for the block based on the two different indicators.
[0022] In a possible implementation, the step of obtaining two different indicators further includes the steps of obtaining two initial indicators including an initial first indicator and an initial second indicator, comparing the initial second indicator with the initial first indicator, and when the initial second indicator is greater than or equal to the initial first indicator, adjusting the initial second indicator to obtain an updated second indicator, where the updated second indicator is different from the initial first indicator, and determining the initial first indicator and the updated second indicator as two different indicators.
[0023] In a possible implementation, the step of adjusting the initial second indicator to obtain an updated second indicator further includes the step of incrementing the initial second indicator by m, where m is a predefined number and is preferably set to 1.
[0024] In a possible implementation, the method further includes a step of setting a maximum value of the initial first indicator to M and a step of setting a maximum value of the initial second indicator to Mm, where M is not greater than N and N is the size of the motion information candidate list.
[0025] In a possible implementation, N is a positive integer determined based on indicator signaling in the received bitstream.
[0026] In a possible implementation, the method further comprises the steps of: comparing the size of the block with a specified threshold, and if the size of the block is not greater than the specified threshold, setting a maximum value of the initial first indicator to M and setting a maximum value of the initial second indicator to Mm, where M is not greater than N, and N is the size of the motion information candidate list; and if the size of the block is greater than the specified threshold, setting a maximum value of the initial first indicator to P and setting a maximum value of the initial second indicator to Pm, where P is greater than M but not greater than N, and N is the size of the motion information candidate list. In a possible implementation, M and P are predefined positive integers.
[0027] In a possible implementation, if P is determined to be greater than N, P is updated to be equal to N, or if M is determined to be greater than N, M is updated to be equal to N.
[0028] In a possible implementation, the method further includes a step of obtaining a single indicator when the prediction indicator indicates that sub-block prediction is not applied to the block, the single indicator indicating an entry in a merge candidate list for the block, and a step of performing inter prediction for the block based on the single indicator.
[0029] In a possible implementation, the method further comprises the step of setting a maximum value of the initial first indicator to M, where N is a size of a merge candidate list that is not identical to the motion information candidate list.
[0030] In a possible implementation, the method further comprises determining a split direction indicator, the split direction indicator indicating a split direction for the block.
[0031] In a possible implementation, the step of obtaining two different indicators further includes a step of adjusting the initial second indicator to obtain an updated second indicator when the split direction indicator indicates a first split direction, where the updated second indicator is different from the initial first indicator, and a step of determining the initial first indicator and the updated second indicator as two different indicators, or a step of adjusting the initial first indicator to obtain an updated first indicator when the split direction indicator indicates a second split direction, where the updated first indicator is different from the initial second indicator, and a step of determining the updated first indicator and the initial second indicator as two different indicators.
[0032] In a possible implementation, the method further includes a step of selecting motion information from the motion information candidate list based on two different indicators, and a step of performing sub-block prediction for the current block based on the selected motion information.
[0033] In a possible implementation, the method further includes a step of selecting first motion information and second motion information from the motion information candidate list according to two different indicators, a step of performing sub-block prediction for the first sub-block based on the first motion information, and a step of performing sub-block prediction for the second sub-block based on the second motion information.
[0034] In a possible implementation, the first sub-block is assigned whose geometric center is closest to the left boundary of the current block.
[0035] In a possible implementation, the method further comprises a step of binarizing the two different indicators according to the truncated unary code.
[0036] In a possible implementation, the method further comprises coding a first bin of the indicator of the two different indicators using a coding mode of Context-Adaptive Binary Arithmetic Coding (CABAC) and coding a other bin of the indicator of the two different indicators using a bypass mode of CABAC.
[0037] In a third aspect of the present application, a decoding method for a block, where the current block includes a first subunit and a second subunit, comprises a step of analyzing a first indicator, where the first indicator is used to determine a partitioning pattern of the current block, a step of analyzing a second indicator and a third indicator, a step of determining prediction information of the first subunit based on a value of the second indicator, a step of determining a value of the third indicator, where if the value of the third indicator is greater than or equal to the second indicator, the value of the third indicator is increased by a target value, and a step of determining prediction information of the second subunit based on the determined value of the third indicator.
[0038] In a possible implementation, the maximum allowable value of the second indicator is M, and the maximum allowable value of the third indicator is Mm, where M is a positive integer and m is a preset positive integer.
[0039] In a possible implementation, the number of entries in the prediction information candidate list is N. In a possible implementation, M is less than or equal to N. In a possible implementation, M is greater than or equal to N.
[0040] In a possible implementation further including parsing the fourth indicator, the fourth indicator is used to indicate the value of N. In a possible implementation, N is a predetermined value.
[0041] In a possible implementation further including parsing the fifth indicator, the fifth indicator is used to indicate a value of M. In a possible implementation, the value of M is determined by the value of N.
[0042] In a fourth aspect of the present application, an apparatus for inter prediction, in which a current block includes a first prediction sub-block and a second prediction sub-block, comprises: an analysis module configured to analyze a first index from a bitstream and analyze a second index from the bitstream, where the first index is used to obtain prediction information of the first prediction sub-block; a location identification module configured to compare the first index with the second index and adjust the second index if the second index is greater than or equal to the first index; and an acquisition module configured to obtain prediction information of the second prediction sub-block according to the adjusted second index.
[0043] In a possible implementation, the location module is configured to increment the second index by m, where m is a positive integer. In a possible implementation, m is 1.
[0044] In a possible implementation, before parsing the first index from the bitstream, the parsing module is further configured to analyze at least one indicator to determine a prediction mode of the current block, the prediction mode being a triangular prediction mode or a geometric prediction mode. The prediction mode may be another sub-block based prediction mode, including a rectangular or non-rectangular (trapezoidal) mode. And the triangular prediction mode and the geometric prediction mode may be combined as a single prediction mode, which may also be involved in the possible implementation.
[0045] In a possible implementation, the location module is further configured to obtain a candidate list for the current block.
[0046] In a possible implementation, the prediction information of the first prediction sub-block is obtained from the candidate list according to the first index.
[0047] In a possible implementation, the prediction information of the second prediction sub-block is obtained from the candidate list according to the adjusted second index. In a possible implementation, the candidate list is a merge mode candidate list.
[0048] In a possible implementation, the analysis module is configured to analyze the first number to determine a maximum allowable candidate index in the candidate list and obtain a maximum index based on the maximum allowable candidate index, where the first index is not greater than the maximum index.
[0049] In a possible implementation, the analysis module is configured to obtain the maximum index by a calculation between the maximum allowed candidate index and a predetermined number.
[0050] In a possible implementation, the analysis module is configured to analyze the second number to derive a difference between a maximum allowed candidate index and a maximum index, and to obtain the maximum index by a calculation between the maximum allowed candidate index and the difference.
[0051] In a possible implementation, the parsing module is configured to parse the third number to determine the maximum index.
[0052] In a possible implementation, the maximum allowed candidate index is greater than or equal to the maximum index.
[0053] In a possible implementation, after obtaining the prediction information of the second prediction sub-block according to the adjusted second index, the acquisition module is further configured to obtain a prediction value of the current block based on the prediction information of the first prediction sub-block and the prediction information of the second prediction sub-block.
[0054] In a possible implementation, the first index or the second index is binarized according to a truncated unary code.
[0055] In a possible implementation, the first bin of the binarized first index or the second index is coded using the normal coding mode of CABAC.
[0056] In a possible implementation, the non-first bins of the binarized first index or second index are coded using the bypass coding mode of CABAC.
[0057] In a possible implementation, the parsing module is configured to parse a directional indicator from the bitstream, which is used to indicate the split direction of the current block.
[0058] In a fifth aspect of the present application, a computer program product comprises program code for performing a method according to any one of the first to fourth aspects when the computer program product is run on a computer or processor.
[0059] In a sixth aspect of the present application, a decoder comprises one or more processors and a non-transitory computer readable storage medium coupled to the processors and storing a program executed by the processor, the program, when executed by the processor, configuring the decoder to perform a method according to any one of the first to fourth aspects.
[0060] In a seventh aspect of the present application, an encoder comprises one or more processors and a non-transitory computer readable storage medium coupled to the processors and storing a program executed by the processor, the program, when executed by the processor, configuring the encoder to perform a method according to any one of the first to fourth aspects.
[0061] In an eighth aspect of the present application, a non-transitory computer readable medium carries program code which, when executed by a computing device, causes the computing device to perform the method of any one of the first to fourth aspects.
[0062] These and other objects are achieved by the subject matter of the independent claims. Further implementations become evident from the dependent claims, the description and the figures.
[0063] Particular embodiments are outlined in the accompanying independent claims, with further embodiments in the dependent claims.
[0064] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims.
[0065] In this application, it should be noted that in the case of triangular prediction mode, since the whole block is compared with the prediction mode having unified prediction information, it is redundant when two prediction sub-blocks in the block have the same prediction information. This application designs a prediction index coding method to avoid the redundant case. Bits for signaling prediction index are saved, and coding efficiency is improved. And the maximum number of candidate prediction information for triangular prediction mode is derived based on the maximum number of candidate prediction information for merge mode. Coding bits are also saved, and the comparison with the maximum number of candidate prediction information for triangular prediction mode is signaled separately. [Brief description of the drawings]
[0066] The present invention will be described in more detail in the following embodiments with reference to the accompanying figures and drawings. [Figure 1A] 1 is a block diagram illustrating an example of a video coding system configured to implement embodiments of the present invention. [Figure 1B] 2 is a block diagram illustrating another example of a video coding system configured to implement embodiments of the present invention. [Diagram 2] FIG. 2 is a block diagram illustrating an example of a video encoder configured to implement embodiments of the present invention. [Diagram 3]2 is a block diagram illustrating an example of the structure of a video decoder configured to implement embodiments of the present invention. [Figure 4] 1 is a block diagram showing an example of an encoding device or a decoding device. [Diagram 5] FIG. 2 is a block diagram showing another example of an encoding device or a decoding device. [Figure 6] FIG. 13 is a diagram illustrating an example of the positions of spatial merge candidates. [Figure 7] FIG. 13 illustrates examples of candidate pairs considered for redundancy check of spatial merge candidates. [Figure 8] FIG. 13 illustrates an example of motion vector scaling for temporal merge candidates. [Figure 9] FIG. 13 shows example positions for temporal candidates. [Figure 10A] 1 is an illustration of a division of a block into two triangular prediction units. [Figure 10B] 13 is another illustration of a division of a block into two triangular prediction units. [Figure 11] 13 is an example of another sub-block partitioning scheme. [Figure 12] 13 is an illustration of derivation of a unidirectional predictive motion vector from a merge candidate list. [Figure 13] 13 is an example of a block to which a blend filter is applied. [Figure 14] FIG. 2 is a schematic block diagram showing the process of CABAC. [Figure 15] FIG. 1 is a block diagram illustrating an example of a prediction method. [Figure 16] FIG. 13 is a block diagram showing another example of a prediction method. [Figure 17] FIG. 2 is a block diagram illustrating an example of a prediction device configured to implement embodiments of the present application. [Figure 18] 1 is a block diagram showing an example of an encoding device or a decoding device. [Figure 19] FIG. 31 is a block diagram showing an example of the structure of a content supply system 3100 that realizes a content distribution service. [Figure 20] 1 is a block diagram showing the structure of an example terminal device.In the following, unless expressly specified otherwise, identical reference signs refer to identical or at least functionally equivalent features. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0067] In the following description, reference is made to the accompanying drawings, which form a part of this disclosure and which show by way of illustration specific aspects of embodiments of the invention or specific aspects in which embodiments of the invention may be used. It is understood that the embodiments of the invention may be used in other ways and may include structural or logical changes not shown in the drawings. Therefore, the following detailed description is not to be taken in a limiting sense, and the scope of the present invention is defined by the appended claims.
[0068] For example, it is understood that disclosure related to a described method may also be applied to a corresponding device or system configured to perform the method, and vice versa. For example, when one or more of the steps of a particular method are described, the corresponding device may include one or more units, e.g., functional units, to perform one or more of the described method steps (e.g., one unit performing the one or more steps, or multiple units performing one or more of the steps, respectively), even if such one or more units are not explicitly described or shown in the drawings. On the other hand, for example, when a particular apparatus is described based on one or more units, e.g., functional units, the corresponding method may include one or more steps (e.g., one step performing the function of one or more units, or multiple steps performing the function of one or more of the units, respectively), to perform the function of the one or more units. Furthermore, it is understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless otherwise specifically noted.
[0069] Video coding typically refers to the processing of a series of images forming a video or a video sequence. Instead of the term "image", the terms "frame" or "image" may be used as synonyms in the field of video coding. Video coding (or coding in general) includes two parts: video encoding and video decoding. Video encoding is performed on the source side and typically involves processing (e.g., by compression) the original video image so as to reduce the amount of data required to represent the video image (for more efficient storage and / or transmission). Video decoding is performed on the destination side and typically involves the reverse processing compared to the encoder to reconstruct the video image. The embodiments referring to "coding" of a video image (or images in general) shall be understood to relate to "encoding" or "decoding" of the video image or the respective video sequence. The combination of the encoding and decoding parts is also referred to as a codec (coding and decoding).
[0070] In the case of lossless video coding, the original video image can be reconstructed, i.e. the reconstructed video image is of the same quality as the original video image (assuming there is no transmission or other data loss during storage or transmission). In the case of lossy video coding, further compression, e.g. by quantization, is performed to reduce the amount of data representing the video image, which cannot be completely reconstructed at the decoder, i.e. the quality of the reconstructed video image is reduced or degraded compared to the quality of the original video image.
[0071] Some video coding standards belong to the group of "lossy hybrid video codecs" (i.e., they combine spatial and temporal prediction in the sample domain with 2D transform coding to apply quantization in the transform domain). Each image of a video sequence is typically partitioned into a set of non-overlapping blocks, and coding is typically performed at the block level. In other words, at the encoder, the video is typically processed, i.e., encoded, at the block (video block) level, for example, by generating a predictive block using spatial (intra-picture) prediction and / or temporal (inter-picture) prediction, subtracting the predictive block from a current block (the block currently being / to be processed) to obtain a residual block, transforming the residual block and quantizing the residual block in the transform domain to reduce (compress) the amount of data to be transmitted, while at the decoder, inverse processing is applied to the encoded or compressed block compared to the encoder in order to reconstruct the current block for representation. Furthermore, the encoder repeats the decoder processing loop, resulting in both generating identical predictions (e.g., intra- and inter-predictions) and / or reconstructions for processing, i.e., coding, of subsequent blocks.
[0072] Hereinafter, embodiments of a video coding system 10, a video encoder 20, and a video decoder 30 will be described with reference to FIGS. 1A to 3. FIG.
[0073] 1A is a schematic block diagram illustrating an example coding system 10 that may use techniques of the present application, such as video coding system 10 (or coding system 10 for short). A video encoder 20 (or encoder 20 for short) and a video decoder 30 (or decoder 30 for short) of video coding system 10 represent examples of devices that may be configured to perform techniques in accordance with various examples described herein.
[0074] As shown in FIG. 1A, coding system 10 includes a source device 12 configured to provide encoded image data 21 to a destination device 14, for example, for decoding the encoded image data 13.
[0075] The source device 12 comprises an encoder 20 and may additionally, i.e. optionally, comprise an image source 16 , a pre-processor (or pre-processing unit) 18 , for example an image pre-processor 18 , and a communication interface or unit 22 .
[0076] Image source 16 may include or be any type of image capture device, e.g., a camera that captures real-world images, and / or any type of image generation device, e.g., a computer graphics processor that generates computer-animated images, or any type of other device that obtains and / or provides real-world images, computer-generated images (e.g., screen content, virtual reality (VR) images), and / or any combination thereof (e.g., augmented reality (AR) images). Image source may be any type of memory or storage that stores any of the images described above.
[0077] To distinguish from the pre-processor 18 and the processing performed by the pre-processing unit 18 , the image or image data 17 may also be referred to as raw image or raw image data 17 .
[0078] The pre-processor 18 is configured to receive the (raw) image data 17 and perform pre-processing on the image data 17 to obtain a pre-processed image 19 or pre-processed image data 19. The pre-processing performed by the pre-processor 18 may include, for example, cropping, color format conversion (e.g., RGB to YCbCr), color correction, or noise removal. It may be understood that the pre-processing unit 18 may be an optional component.
[0079] Video encoder 20 is configured to receive pre-processed image data 19 and provide encoded image data 21 (further details are described below, eg, with reference to FIG. 2).
[0080] The communications interface 22 of the source device 12 may be configured to receive the encoded image data 21 via the communications channel 13 and to transmit the encoded image data 21 (or any further processed version thereof) to another device, such as the destination device 14 or any other device, for storage or direct reconstruction.
[0081] The destination device 14 comprises a decoder 30 (eg, a video decoder 30), and may additionally, i.e. optionally, comprise a communications interface or unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.
[0082] The communications interface 28 of the destination device 14 is configured to receive the encoded image data 21 (or any further processed version thereof), e.g. directly from the source device 12 or from any other source, e.g. a storage device, e.g. an encoded image data storage device, and to provide the encoded image data 21 to a decoder 30.
[0083] The communication interface 22 and the communication interface 28 may be configured to transmit or receive the encoded image data 21 or the encoded data 13 between the source device 12 and the destination device 14 via a direct communication link, e.g., a direct wired or wireless connection, or via any type of network, e.g., a wired or wireless network or any combination thereof, or any type of private and public network or any combination thereof.
[0084] The communications interface 22 may be configured, for example, to package the encoded image data 21 into a suitable format, for example into packets, and / or to process the encoded image data using any type of transmission encoding or processing for transmission over a communications link or network.
[0085] Communications interface 28, which is a counterpart of communications interface 22, may be configured, for example, to receive the transmitted data and process the transmitted data using any type of corresponding transmission decoding or processing and / or depackaging to obtain encoded image data 21.
[0086] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, as indicated by the arrow of communication channel 13 pointing from source device 12 to destination device 14 in FIG. 1A, or as bidirectional communication interfaces, e.g., configured to send and receive messages, e.g., set up connections, and confirm and exchange communications links and / or any other information related to data transmission, e.g., encoded image data transmission.
[0087] The decoder 30 is configured to receive encoded image data 21 and provide decoded image data 31 or a decoded image 31 (further details are described below, e.g. with reference to Figure 3 or Figure 5).
[0088] The post-processor 32 of the destination device 14 is configured to post-process the decoded image data 31 (also called reconstructed image data), e.g. the decoded image 31, to obtain post-processed image data 33, e.g. the post-processed image 33. The post-processing performed by the post-processing unit 32 may include, e.g., color format conversion (e.g., from YCbCr to RGB), color correction, cropping or resampling, or any other processing, e.g., for the purpose of preparing the decoded image data 31 for display by, e.g., a display device 34.
[0089] A display device 34 of the destination device 14 is configured to receive the post-processed image data 33 for displaying the image, for example to a user or viewer. The display device 34 may be or include any type of display for presenting the reconstructed image, for example, an integrated or external display or monitor. The display may include, for example, a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any type of other display.
[0090] 1A illustrates source device 12 and destination device 14 as separate devices, an embodiment of the devices may include both or both of their functionality, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such an embodiment, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software or by separate hardware and / or software or any combination thereof.
[0091] As will be apparent to those skilled in the art based on this description, the presence and (exact) division of functions of different units or functions within source device 12 and / or destination device 14, as shown in FIG. 1A, may vary depending on the actual device and application.
[0092] The encoder 20 (e.g., video encoder 20) or the decoder 30 (e.g., video decoder 30) or both the encoder 20 and the decoder 30 may be implemented via processing circuitry as shown in FIG. 1B, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, hardware, dedicated to video coding, or any combination thereof. The encoder 20 may be implemented via processing circuitry 46 to embody various modules described in connection with the encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. The decoder 30 may be implemented via processing circuitry 46 to embody various modules described in connection with the decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. The processing circuitry may be configured to perform various operations as described later. As shown in FIG. 5, if the technology is implemented partially in software, the device may store instructions for the software in a suitable non-transitory computer-readable storage medium and execute the instructions using one or more processors in hardware to realize the technology of the present disclosure. Either video encoder 20 and video decoder 30 may be integrated as part of a combined encoder / decoder (codec) within a single device, for example, as shown in FIG. 1B.
[0093] Source device 12 and destination device 14 may comprise any of a wide range of devices, including any type of handheld or stationary device, such as a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video gaming console, a video streaming device (such as a content service server or content delivery server), a broadcast receiver device, a broadcast transmitter device, etc., and may use no operating system or any type of operating system. In some cases, source device 12 and destination device 14 may be capable of wireless communication. Thus, source device 12 and destination device 14 may be wireless communication devices.
[0094] In some cases, the video coding system 10 shown in FIG. 1A is merely an example, and the techniques of the present application may be applied to video coding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between an encoding device and a decoding device. In other examples, data may be retrieved from a local memory, streamed over a network, etc. A video encoding device may encode and store data in memory, and / or a video decoding device may decode and retrieve data from memory. In some examples, encoding and decoding are performed by devices that do not communicate with each other, but simply encode data in memory and / or retrieve data from memory and decode it.
[0095] For ease of explanation, embodiments of the present invention are described herein with reference to reference software for High Efficiency Video Coding (HEVC) or Versatile Video Coding (VVC), the next-generation video coding standard developed by the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG) Joint Working Group on Video Coding (JCT-VC). Those skilled in the art will appreciate that embodiments of the present invention are not limited to HEVC or VVC.
[0096] [Encoder and encoding method] FIG. 2 shows a schematic block diagram of an example video encoder 20 configured to implement the techniques of the present application. In the example of FIG. 2, the video encoder 20 includes an input 201 (or an input interface 201), a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoded picture buffer (DPB) 230, a mode selection unit 260, an entropy encoding unit 270, and an output 272 (or an output interface 272). The mode selection unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a partitioning unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 shown in FIG. 2 may also be referred to as a hybrid video encoder, or a video encoder with a hybrid video codec.
[0097] The residual calculation unit 204, the transform processing unit 206, the quantization unit 208, and the mode selection unit 260 may be referred to as forming a forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may be referred to as forming a backward signal path of the video encoder 20. The backward signal path of the video encoder 20 corresponds to the signal path of the decoder (see the video decoder 30 of FIG. 3). The inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may also be referred to as forming a "built-in decoder" of the video encoder 20.
[0098] [Images and Image Segmentation (Images and Blocks)] The encoder 20 may be configured to receive, for example, via an input 201, an image 17 (or image data 17), for example an image of a sequence of images forming a video or a video sequence. The received image or image data may be a preprocessed image 19 (or preprocessed image data 19). For the sake of brevity, reference is made in the following description to the image 17. The image 17 may also be referred to as a current image or a picture to be coded (particularly in video coding, to distinguish the current image from other images, for example previously encoded and / or decoded images of the same video sequence, i.e. a video sequence which also includes the current image).
[0099] A (digital) image is or may be considered as a two-dimensional array or matrix of samples with intensity values. The samples in the array may also be referred to as pixels (short for picture element) or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or image defines the size and / or resolution of the image. To represent color, typically three color components are used, i.e. an image may be represented by or contain three sample arrays. In an RBG format or color space, an image contains corresponding red, green, and blue sample arrays. However, in video coding, each pixel is typically represented in a luminance and chrominance format or color space, e.g. YCbCr, which includes a luminance component denoted Y (sometimes L is used instead) and two chrominance components denoted Cb and Cr. The luminance (or luma for short) component Y represents the brightness or intensity of the gray level (e.g. as in a grayscale image), and the two chrominance (or chroma for short) components Cb and Cr represent the chromaticity or color information components. Thus, an image in YCbCr format includes a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr). An image in RGB format may be converted or transformed into YCbCr format or vice versa, a process also known as color conversion or transformation. If the image is monochrome, the image may only include a luminance sample array. Thus, an image may be, for example, an array of luma samples in monochrome format, or an array of luma samples and two corresponding arrays of chroma samples in 4:2:0, 4:2:2, and 4:4:4 color formats.
[0100] An embodiment of the video encoder 20 may comprise an image partitioning unit (not shown in FIG. 2 ) configured to partition an image 17 into multiple (typically non-overlapping) image blocks 203. These blocks may also be referred to as root blocks, macroblocks (H.264 / AVC) or coding tree blocks (CTBs) or coding tree units (CTUs) (H.265 / HEVC and VVC). The image partitioning unit may be configured to partition each image into corresponding blocks using the same block size for all images of a video sequence and the corresponding grid that defines the block size, or to vary the block size among images or subsets or groups of images.
[0101] In a further embodiment, the video encoder may be configured to directly receive blocks 203 of image 17, e.g., one, some or all of the blocks forming image 17. Image block 203 may also be referred to as a current image block or an image block to be coded.
[0102] Here as well as in the image 17, the image block 203 is or can be considered as a two-dimensional array or matrix of samples with intensity values (sample values), although with smaller dimensions than the image 17. In other words, the block 203 may comprise, for example, one sample array (for example a luma array in case of a monochrome image 17, or a luma or chroma array in case of a color image), or three sample arrays (for example a luma and two chroma arrays in case of a color image 17), or any other number and / or type of arrays depending on the color format applied. The number of samples in the horizontal and vertical directions (or axes) of the block 203 defines the size of the block 203. The block may thus be, for example, an M×N (M columns×N rows) array of samples, or an M×N array of transformation coefficients.
[0103] The embodiment of video encoder 20 shown in FIG. 2 may be configured to encode image 17 block-by-block, eg, encoding and prediction is performed for each block 203 .
[0104] The embodiment of video encoder 20 shown in FIG. 2 may further be configured to partition and / or encode an image by using slices (also referred to as video slices), where an image may be partitioned or encoded using one or more slices (typically non-overlapping), each of which may include one or more blocks (e.g., CTUs) or one or more groups of blocks (e.g., tiles in H.265 / HEVC and VVC) or bricks (VVC).
[0105] The embodiment of video encoder 20 shown in FIG. 2 may further be configured to partition and / or encode an image by using slice / tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where an image may be partitioned or encoded using one or more slice / tile groups (typically non-overlapping), where each slice / tile group may include, for example, one or more blocks (e.g., CTUs) or one or more tiles, where each tile may, for example, be rectangular in shape and include one or more blocks (e.g., CTUs), e.g., full or partial blocks.
[0106] [Residual calculation] The residual calculation unit 204 may be configured to calculate the residual block 205 (also referred to as residual 205) based on the image block 203 and the prediction block 265 (further details regarding the prediction block 265 are provided later), for example, by subtracting sample values of the prediction block 265 from sample values of the image block 203 on a sample-by-sample (pixel-by-pixel) basis to obtain the residual block 205 in the sample domain.
[0107] [conversion] The transform processing unit 206 may be configured to apply a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients 207 in a transform domain. The transform coefficients 207 may also be referred to as transform residual coefficients and represent the residual block 205 in the transform domain.
[0108] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as the transform specified in H.265 / HEVC. Compared to an orthogonal DCT transform, such an integer approximation is typically scaled by a certain factor. To preserve the norm of the residual block processed by the forward transform and the inverse transform, an additional scaling factor is applied as part of the transform process. The scaling factor is typically selected based on certain constraints, such as a scaling factor that is a power of two with respect to shift operations, a bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, etc. For example, a certain scaling factor may be specified for the inverse transform, e.g., by the inverse transform processing unit 212 (and a corresponding inverse transform, e.g., by the inverse transform processing unit 312 in the video decoder 30), and a corresponding scaling factor for the forward transform, e.g., by the transform processing unit 206 in the encoder 20, may be specified accordingly.
[0109] An embodiment of video encoder 20 (respectively transform processing unit 206) may be configured to encode or compress and then output transform parameters, e.g., one or more types of transform, e.g., directly or via entropy encoding unit 270, such that, for example, video decoder 30 may receive and use the transform parameters for decoding.
[0110] [Quantization] The quantization unit 208 may be configured to quantize the transform coefficients 207, for example by applying scalar quantization or vector quantization, to obtain quantized coefficients 209. The quantized coefficients 209 may also be referred to as quantized transform coefficients 209 or quantized residual coefficients 209.
[0111] The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be rounded to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be changed by adjusting a quantization parameter (QP). For example, in the case of scalar quantization, different scaling may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. The applicable quantization step sizes may be indicated by a quantization parameter (QP). The quantization parameter may be, for example, an index into a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to fine quantization (small quantization step size) and a large quantization parameter may correspond to coarse quantization (large quantization step size), or vice versa. Quantization may include division by a quantization step size, and corresponding and / or inverse dequantization, e.g., by the inverse quantization unit 210, may include multiplication by the quantization step size. An embodiment according to some standards, e.g., HEVC, may be configured to use a quantization parameter to determine the quantization step size. In general, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of an equation that includes a division. To restore the norm of the residual block, an additional scaling factor may be introduced in the quantization and dequantization, which may change due to the scaling used in the fixed-point approximation of the quantization step size and quantization parameter equations. In an example implementation, the scaling of the inverse transform and dequantization may be combined. Alternatively, customized quantization tables may be used and signaled, e.g., in the bitstream, from the encoder to the decoder. Quantization is a lossy operation, and the loss increases with increasing quantization step size.
[0112] An embodiment of video encoder 20 (respectively quantization unit 208) may be configured to encode and then output a quantization parameter (QP), e.g., directly or via entropy encoding unit 270, such that, for example, video decoder 30 may receive and apply the quantization parameter for decoding.
[0113] [Dequantization] Inverse quantization unit 210 is configured to apply the inverse quantization of quantization unit 208 to the quantized coefficients, e.g., by applying the inverse of the quantization scheme applied by quantization unit 208 based on or using the same quantization step size as quantization unit 208, to obtain dequantized coefficients 211. The dequantized coefficients 211 may also be referred to as dequantized residual coefficients 211 and correspond to the transform coefficients 207, although they are typically not identical to the transform coefficients due to losses due to quantization.
[0114] [Inverse Transformation] The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST) or other inverse transform, to obtain a reconstructed residual block 213 (or corresponding dequantized coefficients 213) in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 213.
[0115] [Rebuild] The reconstruction unit 214 (e.g., an adder or summator 214) is configured to add the transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265, for example, by adding, sample by sample, sample values of the reconstructed residual block 213 and sample values of the prediction block 265 to obtain a reconstructed block 215 in the sample domain.
[0116] [filtering] The loop filter unit 220 (or "loop filter" 220 for short) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or in general, to filter the reconstructed samples to obtain filtered sample values. The loop filter unit is configured to, for example, smooth pixel transitions or otherwise improve video quality. The loop filter unit 220 may include one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, for example, an adaptive loop filter (ALF), a noise suppression filter (NSF), or any combination thereof. In an example, the loop filter unit 220 may include a deblocking filter, an SAO filter, and an ALF filter. The order of filtering operations may be a deblocking filter, an SAO, and an ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., adaptive in-loop reshaper) is added. This process is performed before deblocking. In another example, deblocking filtering may also be applied to interior sub-block edges, such as affine sub-block edges, ATMVP sub-block edges, sub-block transform (SBT) edges, and intra-sub-partition (ISP) edges. Although loop filter unit 220 is illustrated in FIG. 2 as being within the loop filter, in other configurations, loop filter unit 220 may be implemented as a post-loop filter. Filtered block 221 may also be referred to as filtered reconstruction block 221.
[0117] An embodiment of video encoder 20 (respectively loop filter unit 220) may be configured to encode and then output loop filter parameters (such as SAO filter parameters or ALF filter parameters or LMCS parameters), e.g., directly or via entropy encoding unit 270, so that, for example, decoder 30 may receive and apply the same loop filter parameters or the respective loop filters for decoding.
[0118] [Decoded image buffer] The decoded picture buffer (DPB) 230 may be a memory that stores reference pictures, or generally reference image data, for encoding video data by the video encoder 20. The DPB 230 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous dynamic random access memory (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The decoded picture buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The decoded picture buffer 230 may be further configured to store other previously filtered blocks, e.g., previously reconstructed and filtered blocks 221, of the same current picture or a different picture, e.g., a previously reconstructed picture, to provide, e.g., a previously reconstructed, i.e., decoded, complete picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples), e.g., for inter prediction. The decoded picture buffer (DPB) 230 may be configured to store, for example, one or more unfiltered reconstruction blocks 215 if the reconstruction blocks 215 have not been filtered by the loop filter unit 220, or in general, unfiltered reconstructed samples, or any other further processed version of the reconstructed blocks or samples.
[0119] Mode Selection (Segmentation and Prediction) The mode selection unit 260 comprises a partitioning unit 262, an inter prediction unit 244 and an intra prediction unit 254, and is configured to receive or obtain original image data, e.g., original block 203 (current block 203 of current image 17), and reconstructed image data, e.g., filtered and / or unfiltered reconstructed samples or blocks of the same (current) image and / or from one or more previous decoded images, e.g., from a decoded image buffer 230 or other buffer (e.g., a line buffer, not shown). The reconstructed image data is used as reference image data for prediction, e.g., inter prediction or intra prediction, to obtain a prediction block 265 or a predictor 265.
[0120] The mode selection unit 260 may be configured to determine or select a partitioning and prediction mode (e.g., intra or inter prediction mode) for a current block prediction mode (not including partitioning) and generate a corresponding prediction block 265, which is used for calculation of the residual block 205 and for reconstruction of the reconstruction block 215.
[0121] An embodiment of the mode selection unit 260 may be configured to select a partitioning and prediction mode (e.g., from those supported by or available to the mode selection unit 260) that provides the best match, or in other words, the smallest residual (smallest residual means better compression rate for transmission or storage), or the smallest signaling overhead (smallest signaling overhead means better compression rate for transmission or storage), or a consideration or balance of both. The mode selection unit 260 may be configured to determine the partitioning and prediction mode based on rate-distortion optimization (RDO), i.e., to select the prediction mode that provides the smallest rate-distortion. Terms such as "best", "minimum", "optimum", etc. in this context do not necessarily refer to the overall "best", "minimum", "optimum", etc., but may refer to the achievement of a termination or selection criterion, such as a value exceeding or falling below a threshold or other constraint, potentially leading to a "less than optimal selection" but reducing complexity and processing time.
[0122] In other words, the partitioning unit 262 may be configured to partition images from a video sequence into a series of coding tree units (CTUs), which may be further partitioned into smaller block partitions or sub-blocks (which also form blocks), e.g., using quadtree partitioning (QT), binary tree partitioning (BT), or ternary tree partitioning (TT), or any combination thereof, and may be configured to perform prediction for each of the block partitions or sub-blocks, e.g., where mode selection includes selecting a tree structure of the partitioned block 203, and a prediction mode is applied to each of the block partitions or sub-blocks.
[0123] The partitioning (eg, by partitioning unit 260) and prediction processes (by inter prediction unit 244 and intra prediction unit 254) performed by example video encoder 20 are described in more detail below.
[0124] [Differentiation] The partitioning unit 262 may be configured to partition an image from a video sequence into a series of coding tree units (CTUs), and the partitioning unit 262 may partition (or split) the coding tree units (CTUs) 203 into smaller partitions, e.g., smaller blocks of square or rectangular size. For an image with three sample arrays, a CTU consists of an N×N block of luma samples along with two corresponding blocks of chroma samples. The maximum allowed size of a luma block in a CTU is specified as 128×128 in the developing Versatile Video Coding (VVC) standard, but may be specified as a value other than 128×128, e.g., 256×256 in the future. The CTUs of an image may be clustered / grouped as slice / tile groups, tiles, or bricks. A tile covers a rectangular area of an image, and a tile may be divided into one or more bricks. A brick consists of many CTU rows in a tile. A tile that is not partitioned into multiple bricks may be referred to as a brick. However, a brick is a true subset of a tile and is not referred to as a tile. There are two modes of tile groups supported in VVC: raster scan slice / tile group mode and rectangular slice mode. In raster scan tile group mode, a slice / tile group contains a series of tiles in a tile raster scan of an image. In rectangular slice mode, a slice contains many bricks of an image that together form a rectangular region of an image. The bricks within a rectangular slice are in the order of the brick raster scan of the slice. These smaller blocks (which may also be referred to as sub-blocks) may be further partitioned into even smaller partitions.This is also referred to as tree partitioning or hierarchical tree partitioning, where a root block, for example at root tree level 0 (hierarchical level 0, depth 0), may be recursively partitioned, for example, into two or more blocks of nodes at the next lower tree level, for example tree level 1 (hierarchical level 1, depth 1), which may be partitioned again into two or more blocks at the next lower level, for example tree level 2 (hierarchical level 2, depth 2), and so on, until the partitioning is terminated, for example, because a termination criterion is reached, for example, because a maximum tree depth or a minimum block size is reached. Blocks that are not further partitioned are also referred to as leaf blocks or leaf nodes of the tree. A tree using a partitioning into two partitions is referred to as a binary tree (BT), a tree using a partitioning into three partitions is referred to as a ternary tree (TT), and a tree using a partitioning into four partitions is referred to as a quad tree (QT).
[0125] For example, a coding tree unit (CTU) may be or include a CTB of luma samples of an image having three sample arrays, two corresponding CTBs of chroma samples, or a CTB of samples of a monochrome image or an image coded with three separate color planes and syntax structures used to code the samples. Correspondingly, a coding tree block (CTB) may be an N×N block of samples for some value of N such that the division of components into CTBs is a partitioning. A coding unit (CU) may be or include a coding block of luma samples, two corresponding coding blocks of chroma samples of an image having three sample arrays, or a coding block of samples of a monochrome image or an image coded with three separate color planes and syntax structures used to code the samples. Correspondingly, a coding block (CB) may be an M×N block of samples for some value of M and N such that the division of CTBs into coding blocks is a partitioning.
[0126] For example, in an embodiment according to HEVC, a coding tree unit (CTU) may be divided into CUs by using a quadtree structure represented as a coding tree. The decision of whether to code an image area using inter-image (temporal) prediction or intra-image (spatial) prediction is made at the leaf CU level. Each leaf CU can be further divided into one, two, or four PUs according to the partition type of the PU. Inside one PU, the same prediction process is applied, and related information is sent to the decoder on a PU basis. After obtaining the residual block by applying the prediction process based on the partition type of the PU, the leaf CU can be partitioned into transform units (TUs) according to another quadtree structure similar to the coding tree of the CU.
[0127] In an embodiment, for example, according to the latest video coding standard currently under development, called Versatile Video Coding (VVC), a combined quadtree nested multi-type tree, for example, using 2- and 3-part segmentation structures used to partition a coding tree unit. In the coding tree structure in a coding tree unit, a CU can have either a square or rectangular shape. For example, a coding tree unit (CTU) is first partitioned by a quadtree. Then, the quadtree leaf node can be further partitioned by a multi-type tree structure. There are four partition types in the multi-type tree structure, namely, vertical 2-part (SPLIT_BT_VER), horizontal 2-part (SPLIT_BT_HOR), vertical 3-part (SPLIT_TT_VER) and horizontal 3-part (SPLIT_TT_HOR). The multi-type tree leaf node is called a coding unit (CU), and this segmentation is used for prediction and transformation processing without any further partitioning, as long as the CU is not too large for the maximum transform length. This means that in most cases, CU, PU, and TU have the same block size in the quadtree with nested multi-type tree coding block structure. An exception occurs when the maximum supported transform length is smaller than the width or height of the color component of the CU. VVC develops its own signaling mechanism of partition division information in the quadtree with nested multi-type tree coding tree structure. In the signaling mechanism, the coding tree unit (CTU) is treated as the root of the quadtree and is first partitioned by the quadtree structure. Then, each quadtree leaf node (when it is large enough to allow it) is further partitioned by the multi-type tree structure.In the multi-type tree structure, a first flag (mtt_split_cu_flag) is signaled to indicate whether a node is further partitioned, a second flag (mtt_split_cu_vertical_flag) is signaled to indicate the split direction when the node is further partitioned, and then a third flag (mtt_split_cu_binary_flag) is signaled to indicate whether the split is bipartite or tripartite. Based on the values of mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, the multi-type tree slitting mode (MttSplitMode) of the CU may be derived by the decoder based on a predefined rule or table. In a particular design, for example, a 64×64 luma block and 32×32 chroma pipeline design in a VVC hardware decoder, it should be noted that TT splitting is prohibited when either the width or height of the luma coding block is greater than 64, as shown in FIG. 6. TT partitioning is also prohibited when either the width or height of a chroma coding block is greater than 32. The pipeline design partitions an image into Virtual Pipeline Data Units (VPDUs), which are defined as non-overlapping units in an image. In a hardware decoder, consecutive VPDUs are processed simultaneously by multiple pipeline stages. It is important to keep the VPDU size small, since the VPDU size is roughly proportional to the buffer size in most pipeline stages. In most hardware decoders, the VPDU size may be set to the maximum transform block (TB) size. However, in VVC, ternary tree (TT) and binary tree (BT) partitioning may lead to an increase in the VPDU size.
[0128] In addition, it should be noted that if any portion of a tree node block exceeds the bottom or right image boundary, the tree node block is forced to be split until all samples of all coding CUs are located within the image boundary.
[0129] As an example, an intra sub-partition (ISP) tool may divide a luma intra prediction block vertically or horizontally into two or four sub-partitions, depending on the block size.
[0130] In one example, mode selection unit 260 of video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.
[0131] As described above, video encoder 20 is configured to determine or select a best or optimal prediction mode from a (e.g., predetermined) set of prediction modes, which may include, for example, intra-prediction modes and / or inter-prediction modes.
[0132] [Intra prediction] The set of intra prediction modes may include 35 different intra prediction modes, such as non-directional modes such as DC (or mean) mode and planar mode, or directional modes, such as defined in HEVC, or 67 different intra prediction modes, such as non-directional modes such as DC (or mean) mode and planar mode, or directional modes, such as defined in VVC. As an example, some conventional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes for non-square blocks, such as defined in VVC. As another example, to avoid splitting operations for DC prediction, only the long side is used to calculate the average for non-square blocks. And the result of intra prediction of planar mode may be further modified by position-dependent intra prediction combining (PDPC) method.
[0133] The intra prediction unit 254 is configured to generate an intra prediction block 265 according to an intra prediction mode from a set of intra prediction modes using reconstructed samples of neighboring blocks of the same current image.
[0134] The intra prediction unit 254 (or generally, the mode selection unit 260) is further configured to output intra prediction parameters (or generally, information indicating the selected intra prediction mode for the block) to the entropy encoding unit 270 in the form of a syntax element 266 to be included in the encoded image data 21, so that, for example, the video decoder 30 may receive and use the prediction parameters for decoding.
[0135] [Inter prediction] The set of inter prediction modes (or possible inter prediction modes) depends on the available reference images (i.e., previous, at least partially decoded images, e.g., stored in DBP230) and other inter prediction parameters, such as whether the entire reference image or only a portion of the reference image, e.g., a search window area around the area of the current block, was used to search for the best matching reference block, and / or whether pixel interpolation, e.g., half / semi-pel and / or quarter-pel and / or 1 / 16-pel interpolation, was applied.
[0136] In addition to the above prediction modes, skip mode, direct mode and / or other inter prediction modes may be applied.
[0137] For example, in enhanced merge prediction, the merge candidate list of such a mode is constructed by including the following five kinds of candidates in order: spatial MVP from spatially neighboring CUs, temporal MVP from co-located CUs, history-based MVP from FIFO table, pair-wise average MVP, and zero MV. Then, decoder-side motion vector refinement (DMVR) based on bilateral matching may be applied to increase the accuracy of MV in merge mode. Merge mode with MVD derived from merge mode with motion vector difference (MMVD). The MMVD flag is signaled immediately after sending the skip flag and merge flag, and specifies whether the MMVD mode is used for the CU. Then, a CU-level adaptive motion vector resolution (AMVR) scheme may be applied. The AMVR allows the MVD of a CU to be coded with different accuracy. Depending on the prediction mode of the current CU, the MVD of the current CU may be adaptively selected. When the CU is coded in the merge mode, a combined inter / intra prediction (CIIP) mode may be applied to the current CU. Weighted averaging of inter / intra prediction signals is performed to obtain CIIP prediction. Affine motion compensation prediction, the affine motion field of a block is described by motion information of two control points (4 parameters) or three control point motion vectors (6 parameters). Subblock-based temporal motion vector prediction (SbTMVP), similar to temporal motion vector prediction (TMVP) in HEVC, but predicting motion vectors of sub-CUs in the current CU. Bidirectional optical flow (BDOF), previously referred to as BIO, is a simpler version that requires much less computation, especially in terms of the number of multiplications and the size of the multipliers. In such modes, in triangular partition mode, the CU is divided equally into two triangular shaped partitions using either diagonal or anti-diagonal partitions. Also, bi-prediction mode is extended beyond simple averaging to allow weighted averaging of two prediction signals.
[0138] The inter prediction unit 244 may comprise a motion estimation (ME) unit and a motion compensation (MC) unit (both not shown in FIG. 2). The motion estimation unit may be configured to receive or obtain the image block 203 (the current image block 203 of the current image 17) and the decoded image 231, or at least one or more previous reconstructed blocks, e.g. reconstructed blocks of one or more other / different previous decoded images 231, for motion estimation. For example, a video sequence may include the current image and the previous decoded image 231, or in other words, the current image and the previous decoded image 231 may be part of or form a series of images forming a video sequence.
[0139] The encoder 20 may be configured to, for example, select a reference block from multiple reference blocks of the same or different images of multiple other images, and provide the reference image (or reference image index) and / or an offset (spatial offset) between the position (x, y coordinates) of the reference block and the position of the current block as an inter prediction parameter to the motion estimation unit. This offset is also called a motion vector (MV).
[0140] The motion compensation unit is configured to obtain, e.g., receive, inter prediction parameters, and perform inter prediction based on or using the inter prediction parameters to obtain an inter prediction block 265. The motion compensation performed by the motion compensation unit may involve fetching or generating a prediction block based on a motion / block vector determined by motion estimation, possibly performing interpolation up to sub-pixel accuracy. Interpolation filtering may generate additional pixel samples from known pixel samples, thus potentially increasing the number of candidate prediction blocks that can be used to code the image block. Upon receiving a motion vector for the PU of the current image block, the motion compensation unit may locate the prediction block to which the motion vector points in one of the reference image lists.
[0141] The motion compensation unit may generate syntax elements associated with blocks and video slices for use by video decoder 30 in decoding image blocks of the video slices. In addition to, or in the alternative to, slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be generated or used.
[0142] [Entropy coding] The entropy encoding unit 270 is configured to, for example, apply an entropy encoding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context-adaptive VLC scheme (CAVLC), an arithmetic coding scheme, binarization, context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy encoding method or technique), or bypass (no compression), to the quantization coefficients 209, the inter-prediction parameters, the intra-prediction parameters, the loop filter parameters, and / or other syntax elements to obtain encoded image data 21 that can be output via output 272, for example in the form of an encoded bitstream 21, so that, for example, the video decoder 30 may receive and use the parameters for decoding. The encoded bitstream 21 may be transmitted to the video decoder 30 or stored in a memory for later transmission or retrieval by the video decoder 30.
[0143] Other structural variations of the video encoder 20 may be used to encode the video stream. For example, a non-transform-based encoder 20 may quantize the residual signal directly without using the transform processing unit 206 for a particular block or frame. In another implementation, the encoder 20 may have the quantization unit 208 and the inverse quantization unit 210 combined into a single unit.
[0144] [Decoder and Decoding Method] 3 illustrates an example of a video decoder 30 configured to implement the techniques of the present application. The video decoder 30 is configured to receive encoded image data 21 (e.g., encoded bitstream 21), e.g., encoded by encoder 20, to obtain a decoded image 331. The encoded image data or bitstream includes information for decoding the encoded image data, e.g., data representing image blocks and associated syntax elements of encoded video slices (and / or tile groups or tiles).
[0145] 3, the decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., summer 314), a loop filter 320, a mode application unit 360, a decoded picture buffer (DBP) 330, an inter prediction unit 344, and an intra prediction unit 354. The inter prediction unit 344 may be or include a motion compensation unit. The video decoder 30 may, in some examples, perform a generally inverse decoding path relative to the encoding path described with respect to the video encoder 100 of FIG. 2.
[0146] As described with respect to the encoder 20, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 344, and the intra prediction unit 354 are also referred to as forming a “built-in decoder” of the video encoder 20. Thus, the inverse quantization unit 310 may be functionally identical to the inverse quantization unit 110, the inverse transform processing unit 312 may be functionally identical to the inverse transform processing unit 212, the reconstruction unit 314 may be functionally identical to the reconstruction unit 214, the loop filter 320 may be functionally identical to the loop filter 220, and the decoded picture buffer 330 may be functionally identical to the decoded picture buffer 230. Thus, the descriptions provided for the respective units and functions of the video encoder 20 apply correspondingly to the respective units and functions of the video decoder 30.
[0147] [Entropy Decoding] The entropy decoding unit 304 is configured to parse the bitstream 21 (or the encoded image data 21 in general) and, e.g., perform entropy decoding on the encoded image data 21 to obtain, e.g., quantization coefficients 309 and / or decoded coding parameters (not shown in FIG. 3), e.g., any or all of inter prediction parameters (e.g., reference image index and motion vectors), intra prediction parameters (e.g., intra prediction modes or indices), transform parameters, quantization parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 may be configured to apply a decoding algorithm or scheme corresponding to the encoding schemes described with respect to the entropy encoding unit 270 of the encoder 20. The entropy decoding unit 304 may be further configured to provide the inter prediction parameters, intra prediction parameters, and / or other syntax elements to the mode application unit 360 and other parameters to other units of the decoder 30. The video decoder 30 may receive the syntax elements at a video slice level and / or at a video block level. In addition to or in the alternative to slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be received and / or used.
[0148] [Dequantization] Inverse quantization unit 310 may be configured to receive (e.g., by parsing and / or decoding, e.g., by entropy decoding unit 304) a quantization parameter (QP) (or information related to inverse quantization in general) and quantized coefficients from encoded image data 21, and to apply inverse quantization to the decoded quantized coefficients 309 based on the quantization parameter to obtain dequantized coefficients 311, which may also be referred to as transform coefficients 311. The inverse quantization process may involve use of a quantization parameter determined by video encoder 20 for each video block within a video slice (or tile or tile group) to determine the degree of quantization, and thus the degree of inverse quantization to be applied.
[0149] [Inverse Transformation] The inverse transform processing unit 312 may be configured to receive the dequantized coefficients 311, also referred to as transform coefficients 311, and apply a transform to the dequantized coefficients 311 to obtain the reconstructed residual block 213 in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 313. The transform may be an inverse transform, e.g., an inverse DCT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may be further configured to receive transform parameters or corresponding information from the encoded image data 21 (e.g., by parsing and / or decoding, e.g., by the entropy decoding unit 304) and determine a transform to be applied to the dequantized coefficients 311.
[0150] [Rebuild] The reconstruction unit 314 (e.g., an adder or summator 314) may be configured to add the reconstructed residual block 313 to the prediction block 365, for example by adding sample values of the reconstructed residual block 313 and sample values of the prediction block 365, to obtain a reconstructed block 315 in the sample domain.
[0151] [filtering] The loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter the reconstruction block 315 to obtain a filtered block 321, for example, to smooth pixel transitions or otherwise improve video quality. The loop filter unit 320 may include one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, for example, an adaptive loop filter (ALF), a noise suppression filter (NSF), or any combination thereof. In an example, the loop filter unit 220 may include a deblocking filter, an SAO filter, and an ALF filter. The order of filtering operations may be a deblocking filter, an SAO, and an ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., adaptive in-loop reshaper) is added. This process is performed before deblocking. In another example, deblocking filtering may also be applied to interior sub-block edges, e.g., affine sub-block edges, ATMVP sub-block edges, sub-block transform (SBT) edges, and intra-sub-partition (ISP) edges. Although loop filter unit 320 is illustrated in FIG. 3 as being within the loop filter, in other configurations, loop filter unit 320 may be implemented as a post-loop filter.
[0152] [Decoded image buffer] The decoded video block 321 of the image is then stored in a decoded image buffer 330, which stores the decoded image 331 as a reference image for subsequent motion compensation of other images and / or for output display, respectively.
[0153] The decoder 30 is arranged to output the decoded image 311, for example via an output 312, for presentation or viewing to a user.
[0154] [prediction] The inter prediction unit 344 may be identical to the inter prediction unit 244 (in particular the motion compensation unit), and the intra prediction unit 354 may be functionally identical to the inter prediction unit 254, performing the partitioning or partitioning decision and prediction based on the partitioning and / or prediction parameters or respective information received (e.g. by parsing and / or decoding, e.g. by the entropy decoding unit 304) from the encoded image data 21. The mode application unit 360 may be configured to perform prediction (intra or inter prediction) for each block based on the reconstructed image, block, or respective samples (filtered or unfiltered) to obtain a prediction block 365.
[0155] If the video slice is coded as an intra-coded (I) slice, the intra prediction unit 354 of the mode application unit 360 is configured to generate a prediction block 365 for an image block of the current video slice based on the signaled intra prediction mode and data from a previously decoded block of the current image. If the video image is coded as an inter-coded (i.e., B or P) slice, the inter prediction unit 344 (e.g., a motion compensation unit) of the mode application unit 360 is configured to generate a prediction block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from the entropy decoding unit 304. In inter prediction, the prediction block may be generated from one of a number of reference images included in one of a number of reference image lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, based on the reference images stored in the DPB 330 using a default construction technique. The same or similar may apply to or with embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices). For example, video may be coded using I, P, or B tile groups and / or tiles.
[0156] Mode application unit 360 is configured to determine prediction information for video blocks of a current video slice by analyzing motion vectors or related information and other syntax elements, and uses the prediction information to generate predictive blocks for the current video block being decoded. For example, mode application unit 360 uses some of the received syntax elements to determine a prediction mode (e.g., intra or inter prediction) used to code the video blocks of the video slice, an inter prediction slice type (e.g., B slice, P slice, or GPB slice), construction information regarding one or more of the reference image lists for the slice, a motion vector for each inter encoded video block of the slice, an inter prediction status for each inter coded video block of the slice, and other information for decoding video blocks in the current video slice. The same or similar may apply for or with embodiments that additionally or alternatively use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in slices (e.g., video slices). For example, video may be coded using I, P, or B tile groups and / or tiles.
[0157] The embodiment of video decoder 30 shown in FIG. 3 may be configured to partition and / or decode an image by using slices (also referred to as video slices), where an image may be partitioned or decoded using one or more slices (typically non-overlapping), each of which may include one or more blocks (e.g., CTUs) or one or more groups of blocks (e.g., tiles in H.265 / HEVC and VVC) or bricks (VVC).
[0158] The embodiment of video decoder 30 shown in FIG. 3 may be configured to partition and / or decode an image by using slice / tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where an image may be partitioned or decoded using one or more slice / tile groups (typically non-overlapping), where each slice / tile group may include, for example, one or more blocks (e.g., CTUs) or one or more tiles, where each tile may, for example, be rectangular in shape and include one or more blocks (e.g., CTUs), e.g., full or partial blocks.
[0159] Other variations of the video decoder 30 may be used to decode the encoded image data 21. For example, the decoder 30 may generate an output video stream without using a loop filtering unit 320. For example, a non-transform-based decoder 30 may directly inverse quantize the residual signal without using an inverse transform processing unit 312 for a particular block or frame. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.
[0160] It should be understood that in the encoder 20 and the decoder 30, the processing result of the current stage may be further processed and then output to the next stage. For example, after the interpolation filtering, the motion vector derivation or the loop filtering, further operations such as clipping or shifting may be performed on the processing result of the interpolation filtering, the motion vector derivation or the loop filtering.
[0161] It should be noted that further operations may be applied to the derived motion vector of the current block (including but not limited to control point motion vector in affine mode, sub-block motion vector in affine, planar, ATMVP mode, temporal motion vector, etc.). For example, the value of the motion vector is restricted to a predefined range according to its representation bit. If the representation bit of the motion vector is bitDepth, its range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means exponentiation. For example, if bitDepth is set equal to 16, its range is -32768 to 32767, and if bitDepth is set equal to 18, its range is -131072 to 131071. For example, the value of the derived motion vector (e.g., MV of four 4x4 sub-blocks in one 8x8 block) is restricted such that the maximum difference between the integer parts of the four 4x4 sub-block MVs is less than or equal to N pixels, such as less than or equal to 1 pixel. Below, we provide two methods for constraining motion vectors according to BitDepth.
[0162] 4 is a schematic diagram of a video coding device 400 according to an embodiment of the present disclosure. The video coding device 400 is suitable for implementing the disclosed embodiments described herein. In one embodiment, the video coding device 400 may be a decoder, such as the video decoder 30 of FIG. 1A, or an encoder, such as the video encoder 20 of FIG. 1A.
[0163] Video coding device 400 comprises an ingress port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing the data, a transmitter unit (Tx) 440 and an egress port 450 (or output port 450) for transmitting the data, and a memory 460 for storing the data. Video coding device 400 may comprise optical / electrical (OE) and electrical / optical (EO) components coupled to the ingress port 410, the receiver unit 420, the transmitter unit 440, and the egress port 450 for the entry and exit of optical or electrical signals.
[0164] The processor 430 is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), FPGA, ASIC, and DSP. The processor 430 communicates with the ingress port 410, the receiver unit 420, the transmitter unit 440, the egress port 450, and the memory 460. The processor 430 comprises a coding module 470. The coding module 470 implements the disclosed embodiments described above. For example, the coding module 470 implements, processes, prepares, or provides various coding operations. Thus, the inclusion of the coding module 470 provides a significant improvement in the functionality of the video coding device 400, resulting in the transformation of the video coding device 400 into different states. Alternatively, the coding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0165] Memory 460 may comprise one or more disks, tape drives, and solid state drives, may be used as an overflow data storage device, may store programs when such programs are selected for execution, and may store instructions and data read during the execution of the programs. Memory 460 may be, for example, volatile and / or non-volatile, and may be read only memory (ROM), random access memory (RAM), ternary content addressable memory (TCAM), and / or static random access memory (SRAM).
[0166] FIG. 5 is a schematic block diagram of an apparatus 500 that may be used as either or both of the source device 12 and the destination device 14 according to FIG. 1A in accordance with an exemplary embodiment.
[0167] The processor 502 in the apparatus 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of device, or multiple devices, now existing or later developed, capable of manipulating or processing information. Although implementations of the disclosure may be implemented with a single processor as shown, such as the processor 502, benefits of speed and efficiency may be realized using more than one processor.
[0168] The memory 504 in the apparatus 500 may be a read-only memory (ROM) device or a random access memory (RAM) device in one implementation. Any other suitable type of storage device may be used as the memory 504. The memory 504 may comprise code and data 506 accessed by the processor 502 using a bus 512. The memory 504 may further comprise an operating system 508 and application programs 510, which include at least one program that enables the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1-N, which further include a video coding application that performs the methods described herein.
[0169] The apparatus 500 may also include one or more output devices, such as a display 518. The display 518, in one example, may be a touch-sensitive display that combines a display with a touch-sensitive element operable to detect touch input. The display 518 may be coupled to the processor 502 via the bus 512.
[0170] Although shown herein as a single bus, bus 512 of device 500 may be comprised of multiple buses. Additionally, secondary storage 514 may be directly coupled to other components of device 500 or may be accessible over a network and may include a single integrated unit such as a memory card or multiple units such as multiple memory cards. Thus, device 500 may be implemented in a wide variety of configurations.
[0171] Some techniques that may be implemented in the current solution of this application are introduced below.
[0172] [Merge candidate list] The process of building a merge motion candidate list is introduced by the ITU-T H.265 standard. In another embodiment, the merge motion candidate list is used by the enhanced merge prediction of versatile video coding (VVC).
[0173] The block merge operation is a special mode (also called "merge mode") for motion data coding. The block merge operation allows the current block to use the same motion information of the neighboring blocks. The motion information includes the motion data, which includes information about whether one or two reference image lists are used, as well as the reference index and motion vector for each reference image list. The block merge operation is particularly useful when two neighboring blocks correspond to the same non-deformable object in an image frame. In this case, the two blocks may be predicted using the same motion vector and the same reference image, and therefore the entire motion information is the same for both blocks.
[0174] In the implementation, after checking whether the neighboring blocks are available and contain motion information, an additional redundancy check is performed before taking all the motion data of the neighboring blocks as motion information candidates.
[0175] In implementation, a merge candidate list is constructed by including, in order, the following five types of candidates: 1) Spatial MVP from spatially neighboring CUs 2) Temporal MVP from co-located CU 3) History-based MVP from a FIFO table 4) Pairwise average MVP 5) Zero MV
[0176] The size of the merge list is signaled in the slice header, and the maximum allowed size of the merge list is, for example, 6. For each CU code in the merge mode, the index of the best merge candidate is encoded. A generation process for each category of merge candidates is provided.
[0177] [Spatial candidate derivation] In the implementation, up to four merge candidates are selected from the candidates located at the positions shown in FIG. 6. The order of derivation is B1, A1, B0, A0 and B2. Position B2 is considered only when any CU at positions A0, B0, B1, A1 is unavailable (e.g., because it belongs to another slice or tile) or is intra-coded. After the candidate at position B1 is added, the addition of the remaining candidates undergoes a redundancy check. This can ensure that candidates with identical motion information are removed from the list, thereby improving coding efficiency. To reduce computational complexity, not all possible candidate pairs are considered in the above redundancy check. Instead, only pairs connected by arrows in FIG. 7 are considered, and a candidate is only added to the list if the corresponding candidate used for the redundancy check does not have identical motion information.
[0178] During implementation, the order, position and number of spatial neighborhoods considered as changeable in the above examples may not be considered as limitations.
[0179] [Time candidate derivation] In the implementation, only one candidate is added to the list. In particular, in the derivation of this temporal merge candidate, a scaled motion vector is derived based on the co-located CU belonging to the co-located reference image. The reference image list used for the derivation of the co-located CU is explicitly signaled in the slice header. The scaled motion vector for the temporal merge candidate is obtained as shown by the dotted line in FIG. 8 and is scaled from the motion vector of the co-located CU using POC distances tb and td, where tb is defined as the POC difference between the reference image of the current image and the current image, and td is defined as the POC difference between the reference image of the co-located image and the co-located image. The reference image index of the temporal merge candidate is set equal to zero.
[0180] The location of the temporal candidate is selected between candidates C0 and C1, as shown in Figure 9. If the CU at location C0 is unavailable, intra-coded, or outside the current row of the CTU, location C1 is used. Otherwise, location C0 is used in the derivation of the temporal merge candidate.
[0181] [History-based merge candidate derivation] History-based MVP (HMVP) merge candidates are added to the merge list after spatial MVP and TMVP. In the implementation, the motion information of the previously coded block is stored in a table and used as the MVP for the current CU. The table with multiple HMVP candidates is maintained during the encoding / decoding process. The table is reset (emptied) when a new CTU row is encountered. Whenever there is a non-subblock inter-coded CU, the associated motion information is added as a new HMVP candidate to the last entry of the table.
[0182] The HMVP table size S is set to 5, which indicates that, for example, up to 5 history-based MVP (HMVP) candidates can be added to the table. When inserting a new motion candidate into the table, a bounded first-in-first-out (FIFO) rule is utilized, and a redundancy check is first applied to find if there is an identical HMVP in the table. If found, the identical HMVP is removed from the table and all subsequent HMVP candidates are moved forward.
[0183] HMVP candidates can be used in the merge candidate list construction process. The most recent few HMVP candidates in the table are checked in order and inserted into the candidate list after the TMVP candidate. Redundancy checks are applied from the HMVP candidates to the spatial or temporal merge candidates.
[0184] Different simplifications may be introduced to reduce the number of redundancy check operations. In general, the process of building a merge candidate list from HMVP is terminated when the total number of available merge candidates reaches the maximum allowed merge candidates minus 1.
[0185] [Pairwise average merging candidate derivation] The pairwise average candidate is generated by averaging a predefined pair of candidates in an existing merge candidate list, where the predefined pair is defined as (0,1), e.g., the number indicates the merge index into the merge candidate list. The averaged motion vector is calculated separately for each reference list. If both motion vectors are available in one list, these two motion vectors are averaged even when they point to different reference images. If only one motion vector is available, use it directly. If no motion vector is available, keep this list invalid.
[0186] A list of motion information candidates is output during the merge candidate list building process. The term "motion information" refers to the collected information required to perform the inter prediction process. Motion information typically refers to the following information: 1) Whether the block is uni- or bi-predictive (prediction direction) 2) Motion vector (two motion vectors if the block is bi-predictive) 3) Reference image index used in prediction (if the block applies bi-prediction, there are two indexes, each index corresponding to one reference image list, the first reference image list (L0) or the second reference image list (L1)).
[0187] In some possible implementations, the motion information may also refer to a switchable interpolation filter index that is used to indicate a particular interpolation filter for motion compensation of an inter prediction unit.
[0188] In this application, motion information may be one or more of the above items, or any other information necessary to perform the inter-prediction process described in various embodiments.
[0189] The reference image index is used to indicate an entry in a reference image list used in the prediction process of the coding block. For example, the first motion vector may point to the first image in L0, and the second motion vector may point to the first image in L1. Two reference image lists may be maintained, where the image pointed to by the first motion vector is selected from L0, and the image pointed to by the second motion vector is selected from L1.
[0190] Each of the reference picture lists L0 and L1 may include one or more reference pictures, each of which is identified by a picture order count (POC). The association of each reference index with a POC value may be signaled in the bitstream. As an example, the L0 and L1 reference picture lists may include the following reference pictures: [Table 1]
[0191] In the above example, the first entry in the reference picture list L1 (indicated by reference index 0) is a reference picture having a POC value of 13.
[0192] POC is a variable associated with each picture that uniquely identifies the associated picture among all pictures in a coded video sequence (CVS) and indicates the position of the associated picture in output order when the associated picture is output from the decoded picture buffer relative to the output order positions of other pictures in the same CVS that are output from the decoded picture buffer.
[0193] [Triangle Prediction Mode] When triangular prediction mode (TPM) is used, the CU is divided equally into two triangular shape partitions using either diagonal or anti-diagonal partitions as shown in FIG. 10A or FIG. 10B. Note that either FIG. 10A or FIG. 10B is an example. The location of PU1 and PU2 is not limited in this application. Each triangular partition in a CU is inter-predicted using its own motion. Only uni-prediction is allowed for each partition. That is, each partition has one motion vector and one reference index. The uni-prediction motion constraint is applied to ensure that only two motion compensation predictions are needed for each CU, just like traditional bi-prediction. The uni-prediction motion for each partition is directly derived from the merge candidate list constructed for the enhanced merge prediction described above.
[0194] If the triangular partition mode is used for the current CU, a flag indicating the direction of the triangular partition (diagonal or anti-diagonal) and two merge indices (one for each partition) are further signaled. After predicting each of the triangular partitions, the sample values along the diagonal or anti-diagonal edges are adjusted using a blending process with adaptive weights. This is the prediction signal for the complete CU, and the transformation and quantization process is applied to the complete CU as in other prediction modes. Finally, the motion field of the CU predicted using the triangular partition mode is stored in a 4x4 unit.
[0195] TPM is a special case of subblock partitioning, where a block is divided into two blocks. In the above example, two block partitioning directions are shown (45 degree and 135 degree partitions). However, it should be noted that other partitioning angles and partitioning ratios are also possible, as illustrated in FIG. 11. As an example, the subblocks may be rectangular (e.g., the center and right figures of FIG. 11) or non-rectangular (trapezoid, e.g., the left figure of FIG. 11) depending on the partitioning angle. In some examples, the current block is composed of two prediction units, and the two prediction units are divided by a virtual partition line. In this case, it is said that the current block is predicted by a geometric prediction mode. And as an example, the virtual partition line may be a straight line that is the boundary between the first subblock and the second subblock. More specifically, the procedure of prediction using TPM includes the following.
[0196] [Constructing a list of one-sided prediction candidates] As illustrated in Figure 12, given a merge candidate index, a uni-predictive motion vector is derived from the merge candidate list constructed for extended merge prediction. For a candidate in the list, its LX motion vector (X is equal to the parity of the merge candidate index value) is used as the uni-predictive motion vector for the triangular partition mode. These motion vectors are denoted by "x" in Figure 12. If there is no corresponding LX motion vector, the L(1-X) motion vector of the same candidate in the extended merge prediction candidate list is used as the uni-predictive motion vector for the triangular partition mode.
[0197] It should be noted that in a possible implementation, the unidirectional prediction motion vector can be derived directly from the merge candidate list used in the normal Merge Mode, without explicitly constructing a special separate unidirectional prediction candidate list.
[0198] Blend Along Triangulated Edges After predicting each triangle partition using its own motion, blending is applied to the two prediction signals, and samples around diagonal or anti-diagonal edges are derived. As shown in FIG. 13, the following weights, i.e., {7 / 8, 6 / 8, 5 / 8, 4 / 8, 3 / 8, 2 / 8, 1 / 8} for luma and {6 / 8, 4 / 8, 2 / 8} for chroma, are used in the blending process.
[0199] Compared to the normal prediction mode, different sub-block motion information needs to be signaled for the block. Therefore, in the sub-block prediction mode, the overhead of side information used to represent motion information is higher. In order to improve the efficiency of coding the side information for the sub-block prediction mode, various embodiments are introduced in the present application.
[0200] Embodiment 1 When it is determined that sub-block prediction is applied to a block: 1. An initial first index is included in the bitstream (on the encoder side) that can have a maximum value M (M is an integer, M ≤ N, and N is the number of candidates in the motion information candidate list). 2. An initial second index is included in the bitstream (on the encoder side) that can have a maximum value M - m (m is an integer, m < M, and m is a predefined value). 3. If the value of the initial second index is greater than or equal to the value of the initial first index, the value of the initial second index is incremented by a predefined number, and an updated second index is obtained (for example, the predefined number can be 1). 4. The first sub-block portion of the block is predicted by applying the motion candidate information determined based on the initial first index. 5. The second sub-block portion of the block is predicted by applying the motion candidate information determined based on the updated second index.
[0201] In a possible implementation, the initial first index and the initial second index may be included in the bitstream by the encoder and may be parsed by the decoder.
[0202] In a possible implementation, the operation of incrementing the initial second index by m is performed on both the encoder side and the decoder side, and this operation aims to maintain consistency between the encoder side and the decoder side.
[0203] In a possible implementation, the initial first index and the updated second index are used to select an entry in a motion information candidate list (based on the initial first index and the updated second index as an entry, a corresponding motion information candidate may be selected), and the selected motion information candidate is used for the first sub-block portion (e.g., PU1 in FIG. 10A or FIG. 10B) and the second sub-block portion (e.g., PU2 in FIG. 10A or FIG. 10B) of the block to perform prediction.
[0204] In a possible implementation, the motion information candidate list may be composed of only uni-predictive motion information candidates. It should be noted that a merge candidate list (such as the merge candidate list of ITU-T H.265) may be composed of uni-predictive and bi-predictive motion information candidates. Therefore, the motion information candidate list used in the embodiment may be different from the merge candidate list of ITU-T H.265.
[0205] The motion information candidate list may not be the same as the merge candidate list. Because the merge candidate list may include bi-predictive candidates that are prohibited from being used when a block is determined to apply sub-block (e.g., triangular) prediction. In this case, each sub-block needs to apply uni-predictive motion information, and therefore the initial first index and the updated second index point to an entry in the motion information candidate list that includes only uni-predictive candidates. The motion information candidate list may be constructed by using the same spatial and temporal neighboring blocks used in constructing the merge candidate list. In another example, the motion information candidate list may be constructed based on the merge candidate list by converting the bi-predictive candidates in the merge candidate list to uni-predictive candidates.
[0206] Note that the initial first and initial second indices do not have to follow any particular order in the bitstream structure.
[0207] It should be noted that the comparison operation between the initial first index and the initial second index is performed in both the encoder and the decoder. In the case of the encoder side, the indicator (e.g., the initial first index and the initial second index) is included in the bitstream. In the case of the decoder side, the indicator (e.g., the initial first index and the initial second index) is parsed from the bitstream.
[0208] If the value of the initial second index is equal to or greater than the value of the initial first index, the value of the initial second index is incremented by a predefined number (e.g., 1). Generally, when the same motion information candidate list (consisting of motion information candidates) is used and the two indexes point to the same motion information in the motion information candidate list, this corresponds to having a single motion information for the entire block. Therefore, in order to prevent obtaining the same index, the initial second index is incremented by 1. If the initial second index is not incremented, the first and second indexes may point to the same motion candidate in the motion information candidate list (because the same list is used to select the motion information of both subblock parts). In this case, each subblock part applies the same motion information for prediction. This means that there is no point in splitting the block into two subblocks. If the value of the initial second index is equal to or greater than the initial first index, redundant representation by incrementing the initial second index is avoided. It should be noted that the motion information candidate list therefore includes at least two sets of motion information. The present invention eliminates redundant motion information representation of sub-blocks, resulting in improved compression efficiency.
[0209] It should be noted that the initial second index may be incremented by a predefined number (eg, 1, 2, 3, etc.) even if the result of the increment operation does not exceed the number of candidates in the motion information candidate list.
[0210] In a specific implementation of the first embodiment, it is assumed that the motion information candidate list includes a motion information candidate having six entries, and further assume that the first motion candidate in the motion information candidate list is applied to a first sub-block portion of the block for prediction, and the fifth motion candidate in the motion information candidate list is applied to a second sub-block portion of the block for prediction.
[0211] Encoder side: 1. A value of 0 is included (or signaled) in the bitstream to indicate the initial first index value. (Index value 0 corresponds to the first entry in the motion information candidate list, value 1 corresponds to the second entry, and so on.) 2. A value of 3 is included (or signaled) in the bitstream to indicate the initial second index value. 3. The updated second index value is calculated by incrementing the initial second index value, for example by 1, thus obtaining the value 4. 4. An initial first index is determined to point to the first motion candidate in the motion information candidate list, which is applied to predict the first sub-block portion of the block. 5. An updated second index is determined to point to the fifth motion candidate in the motion information candidate list, which is applied to predict the second subblock portion of the block.
[0212] Decoder side: 1. A value of 0 is parsed from the bitstream to indicate the initial first index value. 2. The value 3 is parsed from the bitstream to indicate the initial second index value. 3. The updated value of the second index is calculated by incrementing its value by, say, 1 (because 3 is greater than 0), thus obtaining the value 4. 4. An initial first index is determined to point to the first motion candidate in the motion information candidate list, which is applied to predict the first sub-block portion of the block. 5. An updated second index is determined to point to the fifth motion candidate in the motion information candidate list, which is applied to predict the second subblock portion of the block.
[0213] From this implementation, on the encoder side, the initial second index is also updated by incrementing it by 1, and this operation aims to maintain consistency with the similar operation on the decoder side.
[0214] It is understood that even if the result of the increment operation does not exceed the number of candidates in the motion information candidate list, the increment number may be a predefined number, for example, 1, 2, 3, etc.
[0215] In another specific implementation of the first embodiment, it is assumed that the motion information candidate list includes the following three entries: (1) First motion information candidate (first candidate) (2) Second motion information candidate (second candidate) (3) Third motion information candidate (third candidate) The values of the first and second indexes are as follows: [Table 2]
[0216] From the above table, the maximum value of the first index is 3, and the maximum value of the second index is 2. From the table, if the initial second index is greater than the initial first index, the initial second index is still incremented by 1. This is to maintain a uniform operation (e.g., increment by 1) for scenarios when the initial second index is greater than or equal to the initial first index. Take the first to third rows in the above table as an example, for the first and third rows, the initial first index and the initial second index are equal, and to make them different, the initial second index is incremented by 1. For the second row, the initial second index is greater than the initial first index, and this is an exception, if no increment operation is performed, to improve the complexity. For simplicity, when it is determined that the initial second index is greater than the initial first index, the initial second index is still incremented by 1.
[0217] Embodiment 2 When it is determined to apply sub-block prediction to a block: 1. An indicator indicating a division direction is included in the bit stream. 2. An initial first index is included in the bit stream that may have a maximum value M (M is an integer, M ≤ N, and N is the number of candidates in the motion information candidate list). 3. An initial second index is included in the bit stream that may have a maximum value M - m (m is an integer, m < M, and m is a predefined value). 4. When the value of the initial second index is greater than or equal to the value of the initial first index, the value of the initial second index is incremented by a predefined number, and an updated second index is obtained (for example, the predefined number may be 1). 5. The first sub-block portion of the block is predicted by applying motion candidate information determined based on the initial first index. 6. The second sub-block portion of the block is predicted by applying motion candidate information determined based on the updated second index.
[0218] Note that the division direction indication, the initial first index, and the initial second index do not need to follow a specific order in the bit stream structure.
[0219] In a realizable implementation, there may be two division directions that may be as follows. (1) Divide from the upper left corner to the lower right corner of the block (see the left figure in Fig. 10A or Fig. 10B) (2) Divide from the upper right corner to the lower left corner of the block (see the right figure in Fig. 10A or Fig. 10B)
[0220] In a realizable implementation, there may be four division directions that may be as follows. (1) Divide from the upper left corner to the lower right corner of the block (2) Divide from the upper right corner to the lower left corner of the block (3) Divide from the upper central point to the lower central point of the block (4) Divide from the left central point to the right central point of the block
[0221] Embodiment 3 When it is determined to apply sub-block prediction to a block: 1. An indicator indicating the division direction is included in the bit stream. 2. When the indicator indicates a specific division direction (for example, divide from the upper left corner to the lower right corner of the block. See the left figure in Fig. 10A or Fig. 10B) 2.1 The initial first index is included in the bit stream that can have a maximum value M (M is an integer, M ≤ N, and N is the number of candidates in the motion information candidate list). 2.2 The initial second index is included in the bit stream that can have a maximum value M - m (m is an integer, m < M, and m is a predefined value). 2.3. When the value of the initial second index is greater than or equal to the value of the initial first index, the value of the initial second index is incremented by a predefined number, and an updated second index is obtained (for example, the predefined number can be 1). 3. Otherwise (when the indicator indicates a different division direction, for example, the division from the upper right corner to the lower left corner of the block (see the right figure in Fig. 10A or Fig. 10B)) 3.1 The initial first index is included in the bit stream that can have a maximum value M - m (m is an integer, m < M, and m is a predefined value). 3.2. The initial second index is included in the bit stream that can have a maximum value M (M is an integer, M ≤ N, and N is the number of candidates in the motion information candidate list). 3.3. When the value of the initial second index is greater than or equal to the value of the initial first index, the value of the initial second index is incremented by a predefined number, and an updated second index is obtained (for example, the predefined number can be 1). 4. The first sub-block part of the block is predicted by applying the motion information candidate determined based on the first index. 5. The second sub-block part of the block is predicted by applying the motion information candidate determined based on the second index.
[0222] In a feasible implementation, there may be two splitting directions as follows. (1) Split from the upper left corner to the lower right corner of the block (2) Split from the upper right corner to the lower left corner of the block
[0223] In a feasible implementation, there may be four splitting directions as follows. (1) Split from the upper left corner to the lower right corner of the block (2) Split from the upper right corner to the lower left corner of the block (3) Split from the upper central point to the lower central point of the block (4) Split from the left central point to the right central point of the block
[0224] Embodiment 4 When it is determined to apply sub-block prediction to the block 1. An indicator indicating the splitting direction is included in the bit stream. 2. The initial first index is included in a bit stream that can have a maximum value M (M is an integer, M ≤ N, and N is the number of candidates in the motion information candidate list). 3. The initial second index is included in a bit stream that can have a maximum value M - m (m is an integer, m < M, and m is a predefined value). 4. If the value of the initial second index is greater than or equal to the value of the initial first index, the value of the initial second index is incremented by a predefined number, and an updated second index is obtained (for example, the predefined number can be 1). 5. The first sub-block part of the block is predicted by applying the motion candidate information determined based on the initial first index. 6. A second subblock portion of the block is predicted by application of motion candidate information determined based on the updated second index.
[0225] When the first sub-block portion is assigned to a portion whose geometric center is close to the left boundary of the block, taking FIG. 10A or FIG. 10B as an example, PU1 denotes the first sub-block portion, and PU2 denotes the second sub-block portion.
[0226] In embodiment 4, the index corresponding to the subblock portion with the geometric center close to the left boundary of the block is included in the bitstream first. The construction of the motion information candidate list typically considers the motion information of the neighboring blocks in the following order: the motion information of the left block, the motion information of the top block, the motion information of the top right block, .... The top spatial neighborhood order is taken from HEVC as an example. Since the motion information of the left neighborhood is considered first, the index indicating the motion information of the left neighborhood typically has fewer bits. Since the subblock portion close (in a geometric sense) to the left neighborhood is coded first, and the second index cannot point to the same motion information (i.e., the same entry in the merge list), the total number of bits representing the first index and the second index is typically low. In another possible implementation, the index corresponding to the subblock portion with the geometric center close to the top boundary of the block is included in the bitstream first. The order is not limited by this application.
[0227] In a particular embodiment, it is assumed that the motion information candidate list has a size of three and includes the following motion information candidates: motion information of the left adjacent block (first entry), motion information of the above adjacent block (second entry), and motion information of the collocated block (third entry, temporal adjacent block).
[0228] Further, assume that the division direction and the first sub-block (PU1) and the second sub-block (PU2) are given as the left diagram in Fig. 10A or Fig. 10B. Generally, due to spatial proximity, PU1 is more likely to be predicted based on the first entry in the motion information candidate list (corresponding to the motion information of the left adjacent block), and PU2 is more likely to be predicted based on the second entry in the motion information candidate list (corresponding to the motion information of the upper adjacent block).
[0229] According to the present invention, a value of 0 is included in the bitstream (parsed in the decoder) to represent the first index, and a value of 0 is included in the bitstream (parsed in the decoder) to represent the second index (the smallest value that the index can take), and since the second index is equal to the first index, the second index is incremented by 1 before selecting a motion candidate from the motion information candidate list. In one case, the first and second indexes have the smallest possible values according to the present invention, and a minimum number of total bits are required to represent the first and second indexes in the bitstream.
[0230] It should be noted that the split direction indication, the first index and the second index do not need to follow a particular order in the bitstream structure.In a specific implementation, the sub-block prediction mode is a triangular prediction mode.
[0231] The first index (e.g., an initial first index) and the second index (e.g., an updated second index) are used to select motion information to be applied to the first sub-block and the second sub-block. The motion information is selected from the same motion information candidate list. To avoid selecting the same motion information for both sub-block portions (which is equivalent to having no sub-block partition), the second index is incremented by a predefined number (e.g., 1) if it is greater than or equal to the first index.
[0232] Embodiments 1 to 4 provide different efficient ways of signaling motion information for each sub-block of a block to which sub-block prediction is applied.
[0233] EMBODIMENT 5 The maximum value of the first index and the second index (represented as M in the first to fourth embodiments) is less than or equal to the size N of the motion information candidate list.
[0234] Note that the maximum values of the first and second indexes also describe the number of entries in the motion information candidate list. For example, if the maximum value of the first index is 6 (assuming that the count starts from 1 and the index can take values 1, 2, 3, 4, 5, 6), the size of the motion information candidate list is 6.
[0235] The merge candidate list may be constructed according to the methods in ITU-T H.265 or VVC, see the above examples and disclosures on the merge list construction process in HEVC and VVC.
[0236] The maximum value of the first index and the second index (given as M, which is equal to the size of the motion information candidate list) is less than or equal to the size N of the merge candidate list. Note that if a block is determined not to apply a sub-block prediction mode, the block may be predicted based on one of the entries in the merge candidate list. However, if the block is predicted using a sub-block prediction mode, the entries of the motion information candidate list are used to predict the block.
[0237] For example, when the prediction indicator parsed from the bitstream indicates that sub-block prediction is applied to the block, two different indicators are obtained, which respectively indicate two different entries in a motion information candidate list for two sub-blocks in the block, and inter prediction is performed on the block based on the two different indicators. When the prediction indicator parsed from the bitstream indicates that sub-block prediction is not applied to the block, a single indicator is obtained, which indicates an entry in a merge candidate list (which may be constructed according to methods in ITU-T H.265 and VVC, for example) for the block, and inter prediction (e.g., non-sub-block prediction) is performed on the block based on the single indicator.
[0238] If M is less than or equal to N, then the maximum value of the first index is set equal to M, where N is the size of the merge candidate list (the number of candidates). Otherwise (if N is less than M), then the maximum value of the first merge index is set equal to N.
[0239] In a possible implementation, N may be derived from an indicator included in the bitstream, and M may be a predefined number.
[0240] As an example, the value M (describing the maximum value of the first index) may be 5 and is pre-defined. Then, the value of N (size of the merge candidate list) may be signaled in a sequence parameter set (SPS). If the value of N is signaled as 6, then the maximum value of the first index is equal to 5 (4 if counting starts from 0) since N is greater than M. In another scenario, if N is signaled as 3 in the SPS, then the maximum value of the first index is equal to 3 (2 if counting starts from 0).
[0241] It should be noted that N is the size of the merge candidate list, which may be constructed according to the methods in ITU-T H.265 and VVC. The first index and the second index used in the embodiment refer to a different list, i.e., a motion information candidate list consisting of only uni-prediction candidates. The motion information candidate list may not be the same as the merge candidate list. Because the merge candidate list may include bi-prediction candidates that are prohibited from being used when a block is determined to apply sub-block (or triangular) prediction. In this case, each sub-block needs to apply uni-prediction motion information, and therefore the first index and the second index refer to an entry in the motion information candidate list that includes only uni-prediction candidates. The motion information candidate list may be constructed by using the same spatial and temporal neighboring blocks used in constructing the merge candidate list. Alternatively, the motion information candidate list may be constructed based on the entries of the merge candidate list. In a possible implementation, the motion information candidate list may not be explicitly constructed. For example, uni-prediction candidates can be directly derived from the merge candidate list.
[0242] For block-based prediction, only one set of motion information is signaled (in the form of a merge index in one implementation). For sub-block prediction, two sets of motion information are needed (increasing the signaling overhead), so the value of the index is expected to be no larger than the maximum value of the merge index (which is equal to the size of the merge candidate list).
[0243] Since the motion information candidate list is expected to be constructed based on the candidates used to construct the merge candidate list or based on the entries of the merge candidate list, the motion information candidate list does not have a size larger than the size of the merge candidate list.
[0244] Therefore, the size of the motion information candidate list (and therefore the maximum value of the first and second indexes) is set to be equal to or smaller than the merge candidate list.
[0245] In another possible implementation, N may be derived from an indicator included in the bitstream, and M may be derived from an indicator included in the bitstream, where the indicator used to derive the value of M cannot indicate a value of M greater than N.
[0246] In HEVC, the size of the motion information candidate list is N, which may be modified based on syntax elements included in the bitstream. The value of N may be a positive integer (typically between 2 and 5) and is signaled in the SPS. The size of the merge list is fixed for the entire video sequence.
[0247] The maximum value of the first index and the second index cannot be larger than the size of the motion information candidate list. The first index and the second index are used to select motion information from a different list (a motion information candidate list that is not identical to the merge candidate list), but the motion information candidate list may typically be constructed using the same spatial and temporal neighboring blocks (but applying different construction rules than the motion information candidate list).
[0248] In a specific implementation, the motion information candidate list may be constructed by converting the bi-prediction candidates in the merge candidate list into uni-prediction candidates. Therefore, by setting the maximum values of the first and second indexes to be less than the size of the merge candidate list, it is ensured that the motion information candidate list constructed based on the merge candidate list may be used to select the motion information of each sub-block of the current block.
[0249] EMBODIMENT 6 The first and second indices are binarized (converted from decimal to binary representation) using a truncated unary binary code based on the maximum value of the index. The maximum value of the index is used in the process of mapping the decimal value of the index to a binary representation. The value codeword assignment for the truncated unary binary code (truncated unary code with a maximum decimal value of 4) is given below: [Table 3] In the above table, each decimal value requires one more bit in binary representation compared to the previous decimal value (which is one less in decimal), except for the last decimal value, which corresponds to the highest index value, which in this case (the index value is the highest, 4), is represented in binary by the same amount of bits as the previous decimal value (3).
[0250] If the first index has a maximum value of 4 (=M) and the second index has a maximum value of 3 (=M-1), the following binary representation applies: [Table 4]
[0251] EMBODIMENT 7 The first bin of the first index is coded using the normal coding mode of context-based adaptive binary arithmetic coding (CABAC) (with probability estimates that are updated after coding of every occurrence of the first index), and the other bins are coded using the bypass mode of CABAC (with equal probabilities that are not updated). The normal coding mode of CABAC is indicated by the "normal arithmetic encoder" branch in Figure 14. The bypass mode is indicated by the "bypass arithmetic encoder" branch in Figure 14.
[0252] As an example, the first bin of the second index is coded using the normal coding mode of CABAC (with a probability estimate that is updated after coding of every occurrence of the second index), and the other bins are coded using the bypass mode of CABAC (with equal probability that is not updated). In this case, the first index is included in the bitstream by CABAC (or parsed out of the bitstream by the decoder), and the first bin of the binarized first index is coded by CABAC using a first probability estimation model that uses the normal coding mode of CABAC. The remaining bins of the binarized first index are coded using the bypass mode of CABAC. The second index is included in the bitstream by CABAC (or parsed out of the bitstream by the decoder), and the first bin of the binarized second index is coded by CABAC using a second probability estimation model that uses the normal coding mode of CABAC. The remaining bins of the binarized second index are coded using the bypass mode of CABAC.
[0253] As another example, the first bin of the first index and the first bin of the second index are coded using the normal coding mode of CABAC, and the same probability estimation model is used. The probability estimation model is updated after coding the first index and after coding the second index. In this case, the first index is included in the bitstream by CABAC (or parsed by the decoder from the bitstream), and the first bin of the binarized first index is coded by CABAC using the first probability estimation model using the normal coding mode of CABAC. The remaining bins of the binarized first index are coded using the bypass mode of CABAC. The second index is included in the bitstream by CABAC (or parsed by the decoder from the bitstream), and the first bin of the binarized second index is coded by CABAC using the first probability estimation model using the normal coding mode of CABAC. The remaining bins of the binarized second index are coded using the bypass mode of CABAC.
[0254] The probability estimation model describes the probability that a bin has a value of "1" instead of "0". The probability estimation model is updated to fit the statistics. For example, if the probability of observing a "1" is 0.8 (meaning a "0" is 0.2), then a bin with a value of "1" will be coded by CABAC using fewer actual bits than a "0".
[0255] The first bin is the first symbol in the binary representation, an example is shown in the table below. [Table 5]
[0256] EMBODIMENT 8 When it is decided to apply sub-block prediction to a block 1. An indicator showing the split direction is included in the bitstream. 2. When the size of the block is less than or equal to the specified threshold value 2.1 The initial first index is included in a bit stream that can have a maximum value M (M is a positive integer, M ≤ N, and N is the number of candidates in the merge candidate list). 2.2 The initial second index is included in a bit stream that can have a maximum value M - m (m is a positive integer, m < M, and m is a predefined value). 3. Otherwise (when the size of the block is greater than the specified threshold value) 3.1 The first index is included in a bit stream that can have a maximum value P (P is a positive integer, M < P ≤ N, and N is the number of candidates in the motion information candidate list). 3.2 The second index is included in a bit stream that can have a maximum value P - m (m is a positive integer, m < P, and m is a predefined value). 4. When the value of the initial second index is greater than or equal to the value of the initial first index, the value of the initial second index is incremented by a predefined number, and the updated second index is obtained (for example, the predefined number can be 1). 5. The first sub-block portion of the block is predicted by applying the motion information candidate determined based on the initial first index. 6. The second sub-block portion of the block is predicted by applying the motion information candidate determined based on the updated second index.
[0257] P and M are positive integer values, and M < P ≤ N. The initial first index and the initial second index may be binarized as follows. When the size of the block is less than or equal to the specified threshold value: (1) Based on the maximum value M, by applying truncated binary coding, the first index is converted from a decimal number to a binary representation. (2) Based on the maximum value M - 1, by applying truncated binary coding, the second index is converted from a decimal number to a binary representation. If the size of the block is greater than the specified threshold: (1) Based on the maximum value P, the first index is converted from a decimal to a binary representation by applying a truncated binary coding. (2) Based on the maximum value P-1, the second index is converted from a decimal to a binary representation by applying truncated binary coding.
[0258] The threshold may be a positive integer signaled in the bitstream or may be a predefined number.
[0259] To determine if a block is greater than the threshold, the product of the width and height of the block may be compared to the threshold (width x height > threshold). In another example, both the width and height may be compared to the threshold, and if both are greater than the threshold (width > threshold AND height > threshold), the block may be considered greater than the threshold. In another example, if either the width or height is greater than the threshold (width > threshold OR height > threshold), the block may be considered greater than the threshold.
[0260] It should be noted that the split direction indication, the first index and the second index do not have to follow any particular order in the bitstream structure.
[0261] In a possible implementation, there may be two split directions, which may be as follows: (1) Divide the block from the top left corner to the bottom right corner (2) Divide the block from the top right corner to the bottom left corner
[0262] In another possible implementation, there may be four split directions, which may be as follows: (1) Divide the block from the top left corner to the bottom right corner (2) Divide the block from the top right corner to the bottom left corner (3) Divide the block from the upper center point to the lower center point (4) Divide the block from the center left point to the center right point
[0263] Note that in a possible implementation, the split direction indication is not included in (or parsed from) the bitstream.
[0264] EMBODIMENT 9 When it is decided to apply sub-block prediction to a block 1. An initial first index is included in the bitstream that may have a maximum value M, where M is an integer, M≦N, and N is the number of candidates in the motion information candidate list. 2. An initial second index is included in the bitstream which may have a maximum value M. 3. If the value of the initial second index is greater than or equal to the value of the first index, the value of the initial second index is incremented by a predefined number to obtain an updated second index (for example, the predefined number can be 1). 4. The first subblock portion of the block is predicted by application of motion candidate information determined based on the initial first index. 5. A second subblock portion of the block is predicted by application of motion candidate information determined based on the updated second index.
[0265] If M is less than or equal to N-1, the maximum values of the initial first index and second index are set equal to M, where N is the size of the motion information candidate list (the number of motion candidates). Otherwise, the maximum values of the first index and second index are set equal to N-1.
[0266] It should be noted that N is the size of the merge candidate list, which may be constructed according to the methods in ITU-T H.265 and VVC. The first index and the second index used in the embodiment refer to different motion information candidate lists that are composed of only uni-prediction candidates. The motion information candidate list is not the same as the merge candidate list, because the merge candidate list may include bi-prediction candidates that are prohibited from being used when a block is determined to apply sub-block (or triangular) prediction. In this case, each sub-block needs to apply uni-prediction motion information, and therefore the first index and the second index refer to entries in the motion information candidate list that include only uni-prediction candidates. The motion information candidate list may be constructed by using the same spatial and temporal neighboring blocks used in constructing the merge candidate list. In another example, the motion information candidate list may be constructed based on the merge candidate list by converting the bi-prediction candidates in the merge candidate list to uni-prediction candidates.
[0267] In a possible implementation, N may be derived from an indicator included in the bitstream, and M may be a predefined number.
[0268] In another possible implementation, N may be derived from an indicator included in the bitstream, and M may be derived from an indicator included in the bitstream, where the indicator used to derive the value of M cannot indicate a value of M greater than N-1.
[0269] In a specific example, it is assumed that the motion information candidate list includes three entries, which are the first motion information candidate (first candidate), the second motion information candidate (second candidate) and the third motion information candidate (third candidate). The values of the first and second indexes are shown in the table below as an example. [Table 6]
[0270] It should be noted that the third motion information candidate cannot be selected to be applied in the first subblock of the block. The advantage is that the maximum values of the first index and the second index included in the bitstream are identical (1 in the above example). Therefore, the same binarization scheme (truncated binary coding based on the maximum value of 1) may be applied to binarize both the first index and the second index.
[0271] The maximum values of the first and second indexes are set to be identical. This feature has the additional benefit of using the same binarization scheme for both the first and second merge indexes when truncated binary coding is used.
[0272] EMBODIMENT 10 When it is decided to apply sub-block prediction to a block 1. An initial first index is included in the bitstream that may have a maximum value M, where M is an integer, M≦N, and N is the number of candidates in the motion information candidate list. 2. An initial second index is included in the bitstream which may have a maximum value M. 3. The first subblock portion of the block is predicted by application of motion candidate information determined based on the initial first index. 4. A second subblock portion of the block is predicted by application of motion candidate information determined based on the initial second index.
[0273] In a possible implementation, the first index and the second index are used to select an entry in a motion information candidate list (the same list is used to select motion information by the first index and the second index), and the selected motion information candidate is applied to the first sub-block and the second sub-block of the block to predict the block. In a possible implementation, the motion information candidate list may be composed of only uni-predictive motion information candidates. It should be noted that a merge candidate list (such as the merge candidate list of ITU-T H.265) may be composed of uni-predictive and bi-predictive motion information candidates. Therefore, the motion information candidate list used in the embodiment may be different from the merge candidate list of ITU-T H.265.
[0274] The motion information candidate list is not the same as the merge candidate list. Because the merge candidate list may include bi-predictive candidates that are prohibited from being used when a block is determined to apply sub-block (or triangular) prediction. In this case, each sub-block needs to apply uni-predictive motion information, and therefore the first index and the second index point to an entry in the motion information candidate list that includes only uni-predictive candidates. The motion information candidate list may be constructed by using the same spatial and temporal neighboring blocks used in constructing the merge candidate list. In another example, the motion information candidate list may be constructed based on the merge candidate list by converting the bi-predictive candidates in the merge candidate list to uni-predictive candidates.
[0275] Note that the first and second indices do not have to follow any particular order in the bitstream structure.
[0276] Note that identical operations are performed in the encoder and decoder, except for the inclusion of the indicator (index) in the bitstream: in the decoder, the indicator is parsed out of the bitstream, and the indicator is included in the bitstream by the encoder.
[0277] In a specific example, assume a motion information candidate list including a motion information candidate having six entries, and further assume that a first motion candidate in the motion information candidate list is applied to a first sub-block for prediction, and a fifth motion candidate in the motion information candidate list is applied to a second sub-block for prediction.
[0278] Encoder side: 1. A value of 0 is included in the bitstream to indicate the first index value. (Index value 0 corresponds to the first entry in the motion information candidate list, value 1 corresponds to the second entry, and so on.) 2. The value 3 is included in the bitstream to indicate the value of the second index. 3. A first index is determined to point to a first motion candidate in the motion information candidate list, which is applied to predict a first sub-portion of the block. 4. A second index is determined to point to a fourth motion candidate in the motion information candidate list, which is applied to predict a second sub-portion of the block.
[0279] Decoder side: 1. A value of 0 is parsed from the bitstream to indicate the value of the first index. 2. The value 3 is parsed from the bitstream to indicate the value of the second index. 3. A first index is determined to point to a first motion candidate in the motion information candidate list, which is applied to predict a first sub-portion of the block. 4. A second index is determined to point to a fourth motion candidate in the motion information candidate list, which is applied to predict a second sub-portion of the block.
[0280] In another specific example, assume that the motion information candidate list includes three entries, which are a first motion information candidate (first candidate), a second motion information candidate (second candidate) and a third motion information candidate (third candidate). The values of the first and second indexes are as follows: [Table 7]
[0281] EMBODIMENT 11 When it is decided to apply sub-block prediction to a block 1. An indicator indicating a segmentation direction is included in the bitstream. 2. An initial first index is included in a bitstream that may have a maximum value M (M is an integer, M ≤ N, and N is the number of candidates in the motion information candidate list). 3. An initial second index is included in a bitstream that may have a maximum value M - m (m is an integer, m < M, and m is a predefined value). 4. If the value of the initial second index is greater than or equal to the value of the first index, the value of the initial second index is incremented by a predefined number to obtain an updated second index (for example, the predefined number may be 1). 5. The first sub-block portion of the block is predicted by applying motion candidate information determined based on the initial first index. 6. The second sub-block portion of the block is predicted by applying motion candidate information determined based on the updated second index.
[0282] Note that N is the size of the merge candidate list that can be constructed according to the methods in ITU-T H.265 and VVC. The first index and the second index used in the embodiments refer to different motion information candidate lists composed of only single prediction candidates. The motion information candidate list is not the same as the merge candidate list. This is because the merge candidate list may include bi-prediction candidates that are prohibited from being used when a block is determined for applying sub-block (or triangle) prediction. In this case, each sub-block needs to apply single prediction motion information, and thus the first index and the second index refer to entries in a motion information candidate list that includes only single prediction candidates. The motion information candidate list may be constructed by using the same spatial and temporal neighboring blocks used in the construction of the merge candidate list. In another example, the motion information candidate list may be constructed based on the merge candidate list by converting the bi-prediction candidates in the merge candidate list into single prediction candidates. The maximum value of the initial first index is set to be equal to M.
[0283] In a possible implementation, N may be derived from an indicator included in the bitstream, and M may be a predefined number.
[0284] In another possible implementation, N may be derived from an indicator included in the bitstream, and M may be derived from an indicator included in the bitstream, where the indicator used to derive the value of M cannot indicate a value of M greater than N-1.
[0285] In another possible implementation, N may be derived from an indicator included in the bitstream, and M may be derived from N. For example, M may be derived from N as follows:
[0286] If N is equal to 1, then M is equal to 0 (sub-block prediction is not used and syntax elements corresponding to sub-block prediction are not signaled). If N≧2, then M is equal to N. For example, M may be derived from N according to the following table: [Table 8]
[0287] In another possible implementation, N may be derived from an indicator included in the bitstream, and M may be derived from N. For example, M may be derived from N as follows:
[0288] If N is equal to 1, then M is equal to 0 (sub-block prediction is not used and syntax elements corresponding to sub-block prediction are not signaled).
[0289] If N≧2 and N≦K, then M is equal to N, and K is an integer with a predefined value (e.g., K may be equal to 5). If N>K, then M is equal to K. For example, M may be derived from N according to the following table (K is equal to 5):
Table 9
[0290] Embodiment 12 When it is determined to apply sub-block prediction to a block 1. An indicator indicating a division direction is included in the bit stream. 2. An initial first index is included in the bit stream that may have a maximum value M (M is an integer).
[0291] 3. An initial second index is included in the bit stream that may have a maximum value M - m (m is an integer, m < M, and m is a predefined value).
[0292] 4. If the value of the initial second index is greater than or equal to the value of the first index, the value of the initial second index is incremented by a predefined number, and an updated second index is obtained (for example, the predefined number may be 1).
[0293] 5. The first sub-block portion of the block is predicted by applying motion candidate information determined based on the initial first index.
[0294] 6. The second sub-block portion of the block is predicted by applying motion candidate information determined based on the updated second index.
[0295] The first index and the second index used in the embodiment refer to different motion information candidate lists that are composed of only uni-prediction candidates. The motion information candidate list is not the same as the merge candidate list. Because the merge candidate list may include bi-prediction candidates that are prohibited from being used when a block is determined to apply sub-block (or triangular) prediction. In this case, each sub-block needs to apply uni-prediction motion information, and therefore the first index and the second index refer to entries in the motion information candidate list that contain only uni-prediction candidates. The motion information candidate list may be constructed by using the same spatial and temporal neighboring blocks used in constructing the merge candidate list. In another example, the motion information candidate list may be constructed based on the merge candidate list by converting the bi-prediction candidates in the merge candidate list to uni-prediction candidates. The maximum value of the initial first index is M.
[0296] In a possible implementation, M may be derived from an indicator included in the bitstream.
[0297] M may depend on an integer value N, which is the size of the merge candidate list, which may be constructed according to methods in ITU-T H.265 and VVC.
[0298] In another possible implementation, N may be derived from an indicator included in the bitstream, and M may be a predefined number.
[0299] In another possible implementation, N may be derived from an indicator included in the bitstream, and M may be derived from N. For example, M may be derived from N as follows:
[0300] If N is equal to 1, then M is equal to 2 (in some examples, a sub-block mode may require an initial first index not equal to an updated second index). If N≧2, then M is equal to N. For example, M may be derived from N according to the following table: [Table 10]
[0301] In another possible implementation, N may be derived from an indicator included in the bitstream, and M may be derived from N. For example, M may be derived from N as follows:
[0302] If N is equal to 1, then M is equal to 2 (in some examples, the sub-block mode may require the initial first index to not be equal to the updated second index).
[0303] If N≧2 and N≦K, then M is equal to N, and K is an integer with a predefined value (e.g., K may be equal to 5). If N>K, then M is equal to K. For example, M may be derived from N according to the following table (K is equal to 5): [Table 11]
[0304] Note that the value of N (the size of the merge candidate list) may be less than the value of M (the maximum value of the initial first index).
[0305] 15 illustrates the inter prediction method of the present application. The inter prediction method is performed on sub-block based image blocks using a prediction method, such as triangular prediction mode.
[0306] In the triangular prediction mode, the current block includes a first prediction sub-block and a second prediction sub-block, such as PU1 and PU2 in FIG. 10A or FIG. 10B. It should be noted that the present application may also be implemented based on different sub-block-based prediction methods, such as the prediction modes shown in FIG. 11.
[0307] S1501: At least one indicator is analyzed to determine a prediction mode of a current block. Generally, inter prediction includes several inter prediction modes. The target inter prediction mode is selected at the encoder side using different criteria, for example, the RDO procedure, and is encoded in the bitstream as one or more indicators. The decoder side analyzes the bitstream to obtain the value of one or more indicators, and determines the target inter prediction mode according to the value of the one or more indicators. In a possible implementation, the indicator may be a prediction mode index. In another possible implementation, several indicators are combined to determine the prediction mode. If the determined prediction mode of the current block is a triangular prediction mode, the method continues.
[0308] S1502: A candidate list for the current block is obtained. The candidate list is obtained from the merge mode candidate list. As an example, the construction of the merge mode candidate list and the construction of the single prediction candidate list for the triangular prediction of the current block may refer to the above chapter. It should be noted that the candidate list for the triangular prediction is derived from the merge mode candidate list. In a possible implementation, the candidate list may not be an independent list. The candidates in the candidate list may be represented by an indicator pointing to the candidates in the merge mode candidate list. It should be noted that the step S1502 may be implemented after analyzing the prediction information index of the first prediction sub-block and / or the second prediction sub-block, which is not limited in this application.
[0309] S1503: The first index is parsed from the bitstream. The first index is used to obtain prediction information of the first predicted sub-block. For example, a syntax element representing the first index is parsed from the bitstream, an item is located in the candidate list according to the first index, and the item is obtained as the prediction information of the first predicted sub-block.
[0310] S1504: Parse a second index from the bitstream. The second index is used to obtain prediction information of a second predictive subblock. As an example, parse another syntax element representing the second index from the bitstream.
[0311] S1505: The first index is compared with the second index.
[0312] S1506A: If the second index is less than the first index, locate an item in the candidate list according to the second index, and obtain the item as prediction information of the second prediction sub-block.
[0313] S1506B: If the second index is greater than or equal to the first index, adjust the second index, and then obtain prediction information of the second prediction sub-block according to the adjusted second index.
[0314] Similar to step S1506A, obtaining prediction information of the second predictive sub-block according to the adjusted second index includes locating an item in the candidate list according to the adjusted second index and obtaining the item as prediction information of the second predictive sub-block.
[0315] In a possible implementation, adjusting the second index may be incrementing the second index by m, where m is a positive integer. In a possible implementation, m may be 1.
[0316] In another possible implementation, adjusting the second index may be another calculation based on the parsed value of the second index, and the adjusted value of the second index is different from the parsed value.
[0317] In a specific implementation, steps S1505, S1506A, and S1506B may be described as follows: For the first and second predicted sub-blocks, respectively, the (adjusted) first and second indexes, idxm and idxn, are calculated using the parsed value of the first index (merge_triangle_idx0) and the parsed value of the second index (merge_triangle_idx1) as follows: idxm=merge_triangle_idx0 idxn=merge_triangle_idx1+(merge_triangle_idx1>=idxm)?1:0 It is assumed that it is derived as follows.
[0318] Note that in another implementation, idxn may also be derived as merge_triangle_idx1+(merge_triangle_idx1>idxm)?1:0. Similarly, if the second index is equal to the first index, the action in S1506A or S1506B may alternatively be performed according to various embodiments, not limited in this application.
[0319] In a possible implementation in which the first index is binarized according to a truncated unary code, the second index is binarized according to a truncated unary code.
[0320] In a possible implementation in which the first bin of the binarized first index is coded using the normal coding mode of CABAC, the first bin of the binarized second index is coded using the normal coding mode of CABAC.
[0321] In a possible implementation in which the non-first bin of the binarized first index is coded using the bypass coding mode of CABAC, the non-first bin of the binarized second index is coded using the bypass coding mode of CABAC, where the non-first bin means any other bin of the binarized first index (or the binarized second index) except the first bin.
[0322] S1507: Obtain a predicted value of the current block based on the prediction information of the first predicted sub-block and the prediction information of the second predicted sub-block.
[0323] After obtaining the prediction information of the first prediction sub-block and the prediction information of the second prediction sub-block, the prediction value of the current block may be obtained based on the construction method of the triangle prediction method as described in the above chapter.
[0324] In a possible implementation, the prediction method further comprises analyzing a direction indicator from the bitstream, and the direction indicator is used to indicate the split direction of the current block. For example, when the direction indicator is 0, PU1 and PU2 are split according to the split direction shown as the left diagram of Figure 10A or Figure 10B, and when the direction indicator is 1, PU1 and PU2 are split according to the split direction shown as the right diagram of Figure 10A or Figure 10B.
[0325] Please note that in a possible implementation, the directional indicator is parsed from the bitstream before parsing the first index from the bitstream, and in another possible implementation, the directional indicator is parsed from the bitstream after deriving the adjusted second index. The order of implementation is not limited to this application. This means that the directional indicator may be held in different positions depending on the bitstream.
[0326] Figure 16 shows another inter-prediction method of the present application. It should be noted that the codeword design of the first index and / or the second index is based on the maximum allowable value of the first index and / or the second index. The decoder side cannot analyze the first index and / or the second index normally without obtaining the maximum allowable value of the first index and / or the second index.
[0327] In a possible implementation, the maximum allowable value of the first index and / or the second index is obtained by both the encoder side and the decoder side according to a preset protocol, for example, a preset value in a standard, in which case no indicator is signaled to indicate the maximum allowable value.
[0328] In another possible implementation, one or more indicators to represent the maximum allowed value are signaled in the bitstream, so that the decoder side can obtain the same value as the encoder side by parsing the bitstream.
[0329] As an example, note that the first prediction sub-block and the second prediction sub-block share the same candidate list, and the maximum allowed value of the first index and / or the second index may be considered as the length of the candidate list.
[0330] It should be noted that the length of the candidate list may be encoded in the bitstream as a high level syntax, e.g., included in a sequence parameter set, a picture parameter set, a picture header, or a slice header, etc. In this case, the length of the candidate list may be determined before stage S1501.
[0331] The length of the candidate list may also be encoded at the block or PU level. In this case, the length of the candidate list may be determined between steps S1502 and S1501. The length of the candidate list is determined as follows:
[0332] S1508: Parse the first number to determine a first length of the candidate list: In a possible implementation, the first number is parsed directly from the bitstream.
[0333] In another possible implementation, some syntaxes are parsed from the bitstream, and the parsed syntaxes are combined to determine the first number.
[0334] As an example, the first length is the maximum number of candidate prediction information for a merge mode in the candidate list.
[0335] As described in the above chapter, the candidate list of the triangular prediction mode is derived from the candidate list of the merge mode. The merge mode index may also be used as the first index and / or the second index. In this case, the candidate list of the triangular prediction mode may be considered as a part of the candidate list of the merge mode. For example, as shown in FIG. 12, each candidate in the candidate list of the triangular prediction mode corresponds to one-way prediction motion information in the candidate list of the merge mode. And the maximum number of candidate prediction information of the merge mode and the triangular prediction mode may be different.
[0336] S1509: Derive a second length of the candidate list based on the first number.
[0337] The second length is the maximum number of candidate prediction information of the subblock-based prediction mode in the candidate list. The subblock-based prediction mode is a triangular prediction mode or a geometric prediction mode. The prediction mode can be other subblock based prediction modes including rectangular or non-rectangular (trapezoidal) modes. And the triangular prediction mode and the geometric prediction mode can be combined as a single prediction mode. This can also be involved in a feasible implementation.
[0338] Since the candidate list for the triangular prediction mode is derived from the candidate list for the merge mode, the first length is greater than or equal to the second length.
[0339] In a possible implementation, the second length may be obtained by subtracting a preset delta value from the first number.
[0340] In another possible implementation, the second length may be obtained by subtracting a delta value from the first number, the delta value being parsed from the bitstream.
[0341] As shown in Figure 12, it should be noted that a uni-prediction candidate list is constructed for a triangular prediction mode, and a bi-prediction candidate list is constructed for a merge mode. In this application, each motion information in the uni-prediction candidate list indicated by an index is a candidate for TPM. Each motion information set (the motion information of List0 and the motion information of List1) in the bi-prediction candidate list indicated by an index is a candidate for merge mode. The embodiment may also be described as follows.
[0342] It is assumed that the candidate list is a merge mode candidate list, and therefore the merge mode index is used to indicate the candidates in the candidate list.
[0343] S1508': The first number is analyzed to determine the maximum allowable candidate index in the candidate list.
[0344] The maximum allowed candidate index may be the maximum index for the merge mode, in other words, it is the maximum allowed value of the merge mode index.
[0345] S1509': Obtain a maximum value index based on the maximum allowable candidate index. The maximum index is used to indicate the upper limit for the first index and the second index (the same indexes as those described in the embodiment of FIG. 15).
[0346] Please note that according to the present application, if the first index and the second index are the same, it is redundant for sub-block-based prediction mode. Therefore, if the first index has a maximum limit MAX, when the second index is parsed from the bitstream, the second index has a maximum limit MAX-m. m is a positive integer, for example, m can be 1 in this embodiment. And please also note that the adjusted second index in this embodiment can be the same as the maximum limit.
[0347] In a possible implementation, the maximum index is obtained by a calculation between the maximum allowed candidate index and a predetermined number. For example, the maximum index is equal to the maximum allowed candidate index minus the predetermined number. In another example, the maximum index is equal to the predetermined number minus the maximum allowed candidate index plus an offset value.
[0348] In another possible implementation, the second number is analyzed to derive the difference between the maximum allowed candidate index and the maximum index, and the maximum index is obtained by calculation between the maximum allowed candidate index and the difference. For example, the maximum index is equal to the maximum allowed candidate index minus the difference. In another example, the maximum index is equal to the difference minus the maximum allowed candidate index plus an offset value.
[0349] In another embodiment, the maximum index and the maximum allowed candidate index are signaled separately. For example, the third number is analyzed to determine the maximum index, similar to S1508 or S1508'.
[0350] And, regardless of whether the maximum index and the maximum allowed candidate index are signaled separately or dependently, in a possible implementation, the maximum allowed candidate index, which is the maximum index in the merge mode, is greater than or equal to the maximum index.
[0351] In a specific implementation, max_num_merge_cand_minus_max_num_triangle_cand specifies the maximum number of triangle merge mode candidates supported in a slice (or in an image, according to various embodiments) subtracted from MaxNumMergeCand. six_minus_max_num_merge_cand specifies the maximum number of merge motion vector prediction (MVP) candidates supported in a slice subtracted from six. The maximum number of merge MVP candidates, MaxNumMergeCand, is derived as MaxNumMergeCand=6-six_minus_max_num_merge_cand. The maximum number of triangle merge mode candidates, MaxNumTriangleMergeCand, is derived as MaxNumTriangleMergeCand=max_num_merge_cand_minus_max_num_triangle_cand.
[0352] The value of max_num_merge_cand_minus_max_num_triangle_cand can be parsed since max_num_merge_cand_minus_max_num_triangle_cand may be held (present) by the bitstream. Note that the value of MaxNumTriangleMergeCand shall be in the range of 2 to MaxNumMergeCand.
[0353] Based on different conditions, max_num_merge_cand_minus_max_num_triangle_cand may not be preserved (not present) by the bitstream. In this case, when sps_triangle_enabled_flag is equal to 0 or MaxNumMergeCand is less than 2, MaxNumTriangleMergeCand is set equal to 0, which means that triangle merge mode is not allowed for the current slice (or, according to various embodiments, the current image). When sps_triangle_enabled_flag is equal to 1 and MaxNumMergeCand is 2 or greater, max_num_merge_cand_minus_max_num_triangle_cand is inferred to be equal to pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1-1. where sps_triangle_enabled_flag is a syntax element included in a sequence parameter set indicating whether TPM is allowed, and pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 is a syntax element included in a picture parameter set. pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 equal to 0 specifies that max_num_merge_cand_minus_max_num_triangle_cand is present in the slice header of a slice (or picture header of a picture, according to various embodiments) that references a picture parameter set. pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 greater than 0 specifies that max_num_merge_cand_minus_max_num_triangle_cand is not present in the slice header of a slice (or picture header of a picture, according to various embodiments) that references a picture parameter set.The value of pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 shall be in the range of 0 to MaxNumMergeCand-1.
[0354] Alternatively, the first length and the second length may be signaled separately, which means that step S1509 may consist in analysing the second number to determine the second length of the candidate list.
[0355] Similarly, in one possible implementation, the second number is parsed directly from the bitstream, and in another possible implementation, some syntax is parsed from the bitstream and the parsed syntax is combined to determine the second number.
[0356] It should be noted that any information parsed from the bitstream that directly or indirectly indicates the first length and / or the second length (e.g., a difference value between the two lengths) can be carried by the bitstream in a sequence parameter set, a picture parameter set, a picture header, or a slice header, etc. Figure 17 illustrates an inter prediction device 1700 of the present application.
[0357] The apparatus 1700, in which a current block includes a first predictive sub-block and a second predictive sub-block, comprises an analysis module 1701 configured to analyze a first index from a bitstream, where the first index is used to obtain predictive information of the first predictive sub-block, and to analyze a second index from the bitstream, a location determination module 1702 configured to compare the first index with the second index and adjust the second index if the second index is greater than or equal to the first index, and an acquisition module 1703 configured to obtain predictive information of the second predictive sub-block according to the adjusted second index.
[0358] In a possible implementation, the location determination module 1702 is configured to increment the second index by m, where m is a positive integer. In a possible implementation, m is 1.
[0359] In a possible implementation, before parsing the first index from the bitstream, the parsing module 1701 is further configured to analyze at least one indicator to determine a prediction mode of the current block, where the prediction mode is a triangular prediction mode or a geometric prediction mode. The prediction mode may be another sub-block based prediction mode, including a rectangular or non-rectangular (trapezoidal) mode. And the triangular prediction mode and the geometric prediction mode may be combined as a single prediction mode, which may also be involved in the possible implementation.
[0360] In a possible implementation, the location module 1702 is further configured to obtain a candidate list for the current block.
[0361] In a possible implementation, the prediction information of the first prediction sub-block is obtained from the candidate list according to the first index.
[0362] In a possible implementation, the prediction information of the second prediction sub-block is obtained from the candidate list according to the adjusted second index. In a possible implementation, the candidate list is a merge mode candidate list.
[0363] In a possible implementation, the analysis module 1701 is configured to analyze the first number to determine a maximum allowable candidate index in the candidate list, and to obtain a maximum index based on the maximum allowable candidate index, where the first index is not greater than the maximum index.
[0364] In a possible implementation, the analysis module 1701 is configured to obtain the maximum index by a calculation between the maximum allowed candidate index and a predetermined number.
[0365] In a possible implementation, the analysis module 1701 is configured to analyze the second number to derive a difference between the maximum allowed candidate index and a maximum index, and obtain the maximum index by calculation between the maximum allowed candidate index and the difference.
[0366] In a possible implementation, the parsing module 1701 is configured to parse the third number to determine the maximum index.
[0367] In a possible implementation, the maximum allowed candidate index is greater than or equal to the maximum index.
[0368] In a possible implementation, after obtaining the prediction information of the second prediction subblock according to the adjusted second index, the acquisition module 1703 is further configured to obtain a prediction value of the current block based on the prediction information of the first prediction subblock and the prediction information of the second prediction subblock.
[0369] In a possible implementation, the first index or the second index is binarized according to a truncated unary code.
[0370] In a possible implementation, the first bin of the binarized first index or the second index is coded using the normal coding mode of CABAC.
[0371] In a possible implementation, the non-first bins of the binarized first index or second index are coded using the bypass coding mode of CABAC.
[0372] In a possible implementation, the parsing module 1701 is configured to parse a direction indicator from the bitstream, which is used to indicate the division direction of the current block.
[0373] 18 shows an inter-prediction device 1800 of the present application, which may be a decoder or an encoder. The device 1800 includes one or more processors 1801 and a non-transitory computer-readable storage medium 1802 coupled to the processors and storing a program for execution by the processors, which, when executed by the processors, configures the decoder to perform the method in FIG. 15 or FIG. 16.
[0374] In another embodiment, a computer program product comprises program code for performing the method in FIG. 15 or FIG. 16 when executed on a computer or processor.
[0375] In another embodiment, a non-transitory computer readable medium carries program code that, when executed by a computing device, causes the computing device to perform the method in FIG. 15 or FIG.
[0376] The following is a description of the application of the encoding and decoding methods as shown in the above embodiments and the systems using them.
[0377] 19 is a block diagram showing a content supply system 3100 for implementing a content distribution service. The content supply system 3100 includes a capture device 3102, a terminal device 3106, and optionally a display 3126. The capture device 3102 communicates with the terminal device 3106 via a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any type of combination thereof.
[0378] The capture device 3102 may generate data and encode the data by the encoding method as shown in the above embodiment. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown in the figure), which encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone or pad, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, as described above, the capture device 3102 may include the source device 12. If the data includes video, the video encoder 20 included in the capture device 3102 may actually perform the video encoding process. If the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually perform the audio encoding process. For some practical scenarios, the capture device 3102 delivers the encoded video and audio data by multiplexing them together. For other practical scenarios, for example in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed, and the capture device 3102 delivers the encoded audio data and the encoded video data to the terminal device 3106 separately.
[0379] In the content supply system 3100, the terminal device 310 receives and plays the encoded data. The terminal device 3106 may be a device having a data receiving and restoring function, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination thereof, capable of decoding the encoded data described above. For example, as described above, the terminal device 3106 may include a destination device 14. If the encoded data includes video, the video decoder 30 included in the terminal device prioritizes performing video decoding. If the encoded data includes audio, the audio decoder included in the terminal device prioritizes performing audio decoding processing.
[0380] For terminal devices with a display, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122 or an in-vehicle device 3124, the terminal device can input the decoded data to its display. For terminal devices without a display, such as a STB 3116, a video conferencing system 3118 or a video surveillance system 3120, an external display 3126 is contacted internally to receive and show the decoded data.
[0381] When each device in this system performs encoding or decoding, the image encoding device or image decoding device as shown in the above embodiments may be used.
[0382] 20 is a diagram illustrating an example structure of a terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, the protocol processing unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), HyperText Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real Time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof.
[0383] After the protocol processing unit 3202 processes the stream, a stream file is generated. The file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As mentioned above, for some practical scenarios, for example, in a video conference system, the encoded audio data and the encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204.
[0384] Through the demultiplexing process, a video elementary stream (ES), an audio ES, and optionally subtitles are generated. As described in the above embodiment, the video decoder 3206 including the video decoder 30 decodes the video ES to generate video frames by the decoding method as shown in the above embodiment, and inputs this data to the synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio frames, and inputs this data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in FIG. 20) before inputting them to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in FIG. 20) before inputting them to the synchronization unit 3212.
[0385] The synchronization unit 3212 synchronizes the video and audio frames to provide the video / audio to the video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information, which may be coded in a syntax with timestamps for the presentation of the coded audio and visual data and for the delivery of the data stream itself.
[0386] If the stream contains subtitles, the subtitle decoder 3210 decodes the subtitles, synchronizes it with the video and audio frames, and provides the video / audio / subtitles to the video / audio / subtitle display 3216.
[0387] The present invention is not limited to the above system, and either the image encoding device or the image decoding device in the above-mentioned embodiments may be incorporated into other systems, for example, in-vehicle systems.
[0388] [Mathematical Operators] The mathematical operators used in this application are similar to those used in the C programming language. However, the results of integer division and arithmetic shift operations are more precisely defined, and additional operations such as exponentiation and real-valued division are defined. The numbering and counting scheme generally starts at zero, e.g., "first" is equivalent to number 0, "second" is equivalent to number 1, and so on.
[0389] [Arithmetic operators] [Table 12]
[0390] [Logical Operators] The following logical operators are defined as follows: x&&y The Boolean logic "and" of x and y x||y The Boolean logic "or" of x and y ! Boolean logic "not" x?y:zIf x is true or not equal to 0, then evaluate the value of y, else evaluate the value of z.
[0391] [Relational Operator] The following relational operators are defined as follows: > Greater than >= Greater than or equal to < Less than <= Less than or equal = = equal to != not equal
[0392] When a relational operator is applied to a syntax element or variable that has been assigned the value "na" (not applicable), the value "na" is treated as the distinct value of that syntax element or variable. The value "na" is considered unequal to any other value.
[0393] [Bitwise Operators] The following bitwise operators are defined as follows: & Bitwise "and". When performing an operation on an integer term, the operation is performed on the two's complement representation of the integer value. When performing an operation on a binary term that contains fewer bits than another term, the shorter term is extended by adding higher-order bits equal to 0. | Bitwise "or". When performing an operation on an integer term, the operation is performed on the two's complement representation of the integer value. When performing an operation on a binary term that contains fewer bits than another term, the shorter term is extended by adding higher-order bits equal to 0. ^ Bitwise "exclusive or". When performing an operation on an integer term, the operation is performed on the two's complement representation of the integer value. When performing an operation on a binary term that contains fewer bits than another term, the shorter term is extended by adding higher-order bits equal to 0. x>>y Arithmetic right shift of the two's complement integer representation of x by the number of bits in y. This function is defined only for non-negative integer values of y. The bit shifted into the most significant bit (MSB) as a result of the right shift has the same value as the MSB of x before the shift operation. x<<y Arithmetic left shift of the two's complement integer representation of x by the number of bits in y. This function is defined only for non-negative integer values of y. The bit shifted into the least significant bit (LSB) as a result of the left shift has a value equal to 0.
[0394] [Assignment operator] The following arithmetic operators are defined as follows. = Assignment operator ++ Increment, i.e., x++ is equivalent to x=x+1, and when used in an array index, it evaluates the value of the variable before the increment operation. ―― Decrement, i.e., x―― is equivalent to x=x-1, and when used in an array index, it evaluates the value of the variable before the decrement operation. += Increment by the specified amount, i.e., x+=3 is equivalent to x=x+3. x+=(-3) is equivalent to x=x+(-3). -= Decrement by the specified amount, i.e. x-=3 is equivalent to x=x-3. x-=(-3) is equivalent to x=x-(-3).
[0395] [Range notation] The following notation is used to specify ranges of values: x=y..zx takes integer values starting from y up to z (inclusive), where x, y, and z are integers and z is greater than y.
[0396] [Mathematical Functions] The following mathematical functions are defined:
number
[0397]
number
number
number
number
number
number
number
[0398] [Order of operation precedence] When the order of precedence in a mathematical expression is not explicitly indicated by the use of parentheses, the following rules apply: Operations with higher priority are evaluated before any operations with lower priority. Operations of equal precedence are evaluated in left-to-right order.
[0399] The table below specifies the priority of operations from highest to lowest, with a higher position in the table indicating a higher priority.
[0400] For operators that are also used in the C programming language, the order of precedence used in this specification is the same as that used in the C programming language. Table: Operation precedence from highest (top of table) to lowest (bottom of table) [Table 13]
[0401] [Textual explanation of logical operations] In the text, statements of logical operations are written mathematically in the following form: if(condition 0) Statement 0 else if(condition 1) Statement 1 ... else / *Describe the remaining condition information* / Statement n It may be written in the following way: ...is / applies to... - if condition 0, statement 0 - Otherwise,if condition1,statement1 - ... -Otherwise (description of remaining condition information), statement n
[0402] Each "if...Otherwise,if...Otherwise" statement in the text is introduced with "...as" or "...which applies" immediately followed by "if...". The last condition of an "if...Otherwise,if...Otherwise" is always "Otherwise,...". Interleaved "if...Otherwise,if...Otherwise" statements may be identified by matching the "...as" or "...which applies" with the final "Otherwise,...".
[0403] In the text, statements of logical operations are written mathematically in the following form: if(condition0a&&condition0b) Statement 0 else if(condition 1a||condition 1b) Statement 1 ... else Statement n It may be written in the following way: ...is / applies to... -Statement 0 if all of the following conditions are true: -Condition 0a -condition 0b Otherwise, if one or more of the following conditions are true, statement 1: -Condition 1a -Condition 1b -... Otherwise, statement n
[0404] In the text, statements of logical operations are written mathematically in the following form: if(condition 0) Statement 0 if(condition1) Statement 1 It can be written in the following way. If condition 0, then statement 0 If condition 1 is true, then statement 1
[0405] The embodiments of, for example, the encoder 20 and the decoder 30, and the functions described herein with reference to, for example, the encoder 20 and the decoder 30, may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on a computer-readable medium or transmitted over a communication medium as one or more instructions or code and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium, such as a data storage medium, or a communication medium including any medium that facilitates transfer of a computer program from one place to another, for example according to a communication protocol. Thus, a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium, such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to obtain instructions, code, and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0406] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is referred to as a computer-readable medium, as appropriate. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead refer to non-transitory, tangible storage media. Disk and disc as used herein include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where typically a disk is one that reproduces data magnetically and a disc is one that reproduces data optically by a laser. Combinations of the above should also be included within the scope of computer-readable media.
[0407] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures, or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Also, the techniques may be implemented entirely in one or more circuit or logic elements.
[0408] The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs) or sets of ICs (e.g., chipsets). Although various components, modules, or units are described in this disclosure to highlight functional aspects of devices configured to perform the disclosed techniques, realization by different hardware units is not necessarily required. Rather, the various units may be combined into a codec hardware unit, as described above, in conjunction with suitable software and / or firmware, or may be provided by a collection of interoperable hardware units including one or more processors, as described above. [Item 1] 1. A prediction method for an image block, wherein a current block includes a first prediction sub-block and a second prediction sub-block, comprising: parsing a first index from a bitstream, the first index being used to obtain prediction information of the first predicted sub-block; parsing a second index from the bitstream; comparing the first index to the second index; adjusting the second index if the second index is greater than or equal to the first index; obtaining prediction information of the second prediction sub-block according to the adjusted second index; A prediction method comprising: [Item 2] The step of adjusting the second index includes: incrementing the second index by m, where m is a positive integer; 2. The prediction method according to item 1, comprising: [Item 3] 3. The prediction method according to item 2, wherein m is 1. [Item 4] Before parsing the first index from the bitstream, the prediction method further comprises: analyzing at least one indicator to determine a prediction mode for the current block, the prediction mode being a triangular prediction mode or a geometric prediction mode; The prediction method according to any one of items 1 to 3, comprising: [Item 5] The prediction method further comprises: obtaining a candidate list for the current block The prediction method according to any one of items 1 to 4, comprising: [Item 6] 6. The prediction method according to item 5, wherein the prediction information of the first prediction subblock is obtained from the candidate list according to the first index. [Item 7] 7. The prediction method according to item 5 or 6, wherein the prediction information of the second prediction sub-block is obtained from the candidate list according to the adjusted second index. [Item 8] 8. The prediction method according to any one of items 5 to 7, wherein the candidate list is a merge mode candidate list. [Item 9] The prediction method further comprises: analyzing the first number to determine a maximum allowable candidate index in said candidate list; obtaining a maximum index based on the maximum allowed candidate index, wherein the first index is not greater than the maximum index; The prediction method according to Item 8, comprising: [Item 10] The step of obtaining the maximum index based on the maximum allowed candidate index comprises: obtaining the maximum index by a calculation between the maximum allowable candidate index and a predetermined number; 10. The prediction method according to item 9, comprising: [Item 11] The step of obtaining the maximum index based on the maximum allowed candidate index comprises: analyzing the second number to derive a difference between the maximum allowable candidate index and the maximum index; obtaining the maximum index by a calculation between the maximum allowable candidate index and the difference; 10. The prediction method according to Item 9, comprising: [Item 12] The prediction method further comprises: analyzing the third number to determine a maximum index 9. The prediction method according to any one of items 1 to 8, comprising: [Item 13] 13. The method of any one of items 1 to 12, wherein the maximum allowed candidate index is greater than or equal to the maximum index. [Item 14] After obtaining the prediction information of the second prediction sub-block according to the adjusted second index, the prediction method further includes: obtaining a predicted value of the current block based on the prediction information of the first predicted sub-block and the prediction information of the second predicted sub-block; 14. The prediction method according to any one of items 1 to 13, comprising: [Item 15] 15. The prediction method according to any one of items 1 to 14, wherein the first index or the second index is binarized according to a truncated unary code. [Item 16] Item 16. The prediction method according to item 15, wherein the first bin of the binarized first index or the second index is coded using a normal coding mode of CABAC. [Item 17] Item 17. The prediction method according to item 15 or 16, wherein the non-first bins of the binarized first index or the second index are coded using a bypass coding mode of CABAC. [Item 18] 18. The prediction method of any one of claims 1 to 17, further comprising a step of parsing a direction indicator from the bitstream, the direction indicator being used to indicate a split direction of the current block. [Item 19] 1. An apparatus for inter prediction, wherein a current block includes a first prediction sub-block and a second prediction sub-block, comprising: Parsing a first index from a bitstream, the first index being used to obtain prediction information of the first predictive sub-block; and Parsing the second index from the bitstream; an analysis module configured to: Comparing said first index to said second index; Adjusting the second index if the second index is greater than or equal to the first index a location determination module configured to: an obtaining module configured to obtain prediction information of the second prediction sub-block according to the adjusted second index; An apparatus comprising: [Item 20] 20. The apparatus of claim 19, wherein the location module is configured to increment the second index by m, where m is a positive integer. [Item 21] 21. The apparatus according to item 20, wherein m is 1. [Item 22] Prior to parsing the first index from the bitstream, the parsing module may further comprise: 22. The apparatus of any one of claims 19 to 21, configured to analyze at least one indicator to determine a prediction mode for the current block, the prediction mode being a triangular prediction mode or a geometric prediction mode. [Item 23] 23. The apparatus of any one of claims 19 to 22, wherein the location module is further configured to obtain a candidate list for the current block. [Item 24] 24. The apparatus of claim 23, wherein the prediction information of the first prediction subblock is obtained from the candidate list according to the first index. [Item 25] 25. The apparatus of claim 23 or 24, wherein the prediction information of the second prediction sub-block is obtained from the candidate list according to the adjusted second index. [Item 26] 26. The apparatus of any one of items 23 to 25, wherein the candidate list is a merge mode candidate list. [Item 27] The analysis module is analyzing the first number to determine a maximum allowable candidate index in said candidate list; Get the maximum index based on the maximum allowable candidate index above wherein the first index is not greater than the maximum index. 27. The apparatus according to item 26. [Item 28] 28. The apparatus of claim 27, wherein the analysis module is configured to obtain the maximum index by a calculation between the maximum allowable candidate index and a predetermined number. [Item 29] The analysis module is analyzing the second number to derive a difference between the maximum allowable candidate index and the maximum index; Obtain the maximum index by calculating between the maximum allowable candidate index and the difference. 28. The apparatus according to item 27, configured to: [Item 30] 28. The apparatus of any one of claims 19 to 27, wherein the analysis module is configured to analyze the third number to determine a maximum index. [Item 31] 31. The apparatus of any one of items 19 to 30, wherein the maximum allowable candidate index is greater than or equal to the maximum index. [Item 32] After obtaining the prediction information of the second prediction sub-block according to the adjusted second index, the obtaining module further comprises: 32. The apparatus of claim 19, configured to obtain a predicted value of the current block based on the prediction information of the first prediction sub-block and the prediction information of the second prediction sub-block. [Item 33] 33. The apparatus of any one of claims 19 to 32, wherein the first index or the second index is binarized according to a truncated unary code. [Item 34] Item 34. The apparatus of item 33, wherein the first bin of the binarized first index or the second index is coded using a normal coding mode of CABAC. [Item 35] Item 35. The apparatus of item 33 or 34, wherein a non-first bin of the binarized first index or the second index is coded using a bypass coding mode of CABAC. [Item 36] 36. The apparatus of claim 19, wherein the parsing module is configured to parse a direction indicator from the bitstream, the direction indicator being used to indicate a division direction of the current block. [Item 37] 19. A program for causing a computer to execute the prediction method according to any one of items 1 to 18. [Item 38] one or more processors; a non-transitory computer-readable storage medium coupled to the one or more processors and storing a program for execution by the one or more processors; 19. A decoder comprising: a program, when executed by the one or more processors, that configures the decoder to perform the prediction method according to any one of claims 1 to 18. decoder. [Item 39] one or more processors; a non-transitory computer-readable storage medium coupled to the one or more processors and storing a program for execution by the one or more processors; 19. An encoder comprising: a program, when executed by the one or more processors, that configures the encoder to perform the prediction method according to any one of claims 1 to 18. Encoder. [Item 40] A non-transitory computer readable medium carrying program code which, when executed by a computing device, causes said computing device to perform the prediction method according to any one of items 1 to 18.
Claims
1. 1. A method of encoding an image block, wherein a current block includes a first predicted sub-block and a second predicted sub-block, comprising: encoding a first index into a bitstream, the value of the first index being used to select a first entry for the first predictive sub-block in a motion information candidate list; encoding a second index having a first value into the bitstream; when the first value of the second index is greater than or equal to the value of the first index, a second value of the second index is used to select a second entry for the second predictive sub-block in the motion information candidate list. The encoding method.
2. the second value of the second index is equal to the first value of the second index plus one; The encoding method of claim 1 .
3. when the first value of the second index is smaller than the value of the first index, the first value of the second index is used to select the second entry for the second predictive sub-block in the motion information candidate list.
3. The encoding method according to claim 1 or 2.
4. The encoding method according to claim 1 , wherein the first index or the second index is binarized according to a truncated unary code.
5. The encoding method of claim 4 , wherein the binarized first index or the first bin of the second index is coded using a normal coding mode of CABAC.
6. The encoding method of claim 4 or 5, wherein non-first bins of the binarized first index or the binarized second index are coded using a bypass coding mode of CABAC.
7. The encoding method further comprises: encoding at least one indicator into the bitstream, the at least one indicator being used to determine a prediction mode of the current block, the prediction mode being a triangular prediction mode or a geometric prediction mode; The method of claim 1 , further comprising:
8. The encoding method further comprises: obtaining the motion information candidate list for the current block; The method of claim 1 , further comprising:
9. The encoding method according to claim 1 , wherein the prediction information of the first prediction sub-block is obtained based on a first motion information candidate, indicated by the value of the first index in the motion information candidate list.
10. The encoding method according to claim 1 , wherein the prediction information of the second prediction sub-block is obtained based on a second motion information candidate indicated by the second value of the second index in the motion information candidate list.
11. The encoding method according to claim 1 , wherein the motion information candidate list is a merge mode candidate list.
12. The encoding method further comprises: obtaining a predicted value of the current block based on prediction information of the first predicted sub-block and prediction information of the second predicted sub-block; The method of encoding according to claim 1 , comprising:
13. A program for causing a computer to execute the encoding method according to any one of claims 1 to 12.
14. one or more processors; a non-transitory computer-readable storage medium coupled to the one or more processors and storing a program for execution by the one or more processors; wherein the program, when executed by the one or more processors, configures the encoding device to perform the encoding method according to any one of claims 1 to 12. Encoding device.
15. A non-transitory computer readable storage medium storing program code which, when executed by a computing device, causes the computing device to perform the encoding method of any one of claims 1 to 12.
16. reading a bitstream including data representing a current block including a first predicted sub-block and a second predicted sub-block, a first index, and a second index having a first value; Obtaining the first index and the second index; comparing the value of the first index with the first value of the second index; when the first value of the second index is equal to or greater than the value of the first index, adjust the first value to be greater than the first value to obtain a second value of the second index, select a first entry for the first predicted sub-block in a motion information candidate list based on the value of the first index, and select a second entry for the second predicted sub-block in the motion information candidate list based on the second value of the second index; when the first value of the second index is less than the value of the first index, selecting a first entry for the first predictive sub-block in the motion information candidate list based on the value of the first index, and selecting a second entry for the second predictive sub-block in the motion information candidate list based on the first value of the second index; performing a prediction for the first prediction sub-block based on the first entry, and performing a prediction for the second prediction sub-block based on the second entry; device.
17. selecting a first entry for the first predictive sub-block in the motion information candidate list based on the value of the first index when the first value of the second index is less than the value of the first index, and selecting a second entry for the second predictive sub-block in the motion information candidate list based on the first value of the second index.
17. The device of claim 16.