Encoding device, decoding device, and bit stream generating device
The encoding device optimizes image block partitioning based on size parameters and thresholds to address inefficiencies in existing technologies, reducing processing complexity and improving encoding efficiency by minimizing non-rectangular partition operations.
Patent Information
- Application Number
- JP2025167047
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-01-30
- Filing Date
- 2025-10-03
- Publication Date
- 2026-01-14
AI Technical Summary
Existing image encoding technologies, such as H.265/HEVC, face inefficiencies in processing image blocks, leading to increased processing amounts due to complex prediction processes, especially when non-rectangular partitions are involved.
An encoding device that determines whether to divide image blocks into rectangular or non-rectangular partitions based on size parameters and thresholds, optimizing the partitioning process to reduce processing complexity and improve efficiency.
The solution allows for efficient processing of image blocks by minimizing unnecessary partitioning operations, reducing the amount of coding and processing required, thereby enhancing overall encoding efficiency.
Smart Images

Figure 2026004493000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an encoding device that encodes an image block. [Background technology]
[0002] BACKGROUND ART Conventionally, H.265, also known as HEVC (High Efficiency Video Coding), exists as a standard for encoding moving images (Non-Patent Document 1). [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] H.265(ISO / IEC 23008-2 HEVC) / HEVC(High Efficiency Video Coding) Summary of the Invention [Problem to be solved by the invention]
[0004] However, if image blocks included in a moving image are not processed efficiently, the amount of processing will increase.
[0005] Therefore, the present disclosure provides an encoding device and the like that can process image blocks efficiently. [Means for solving the problem]
[0006] An encoding device according to one aspect of the present disclosure includes a circuit and a memory, wherein the circuit uses the memory to determine, based on information regarding inter prediction, to perform a first inter prediction process or a second inter prediction process, wherein the first inter prediction process includes BIO (Bi-directional Optical Flow), and the second inter prediction process includes motion compensation processing. If the BIO is not included and it is determined that the BIO is to be performed, the circuit obtains a plurality of first predicted images for an image block, obtains gradient images for the plurality of first predicted images, and generates a predicted image for the image block using the plurality of first predicted images and the gradient images. If it is determined that the motion compensation processing is to be performed, the circuit defines a plurality of partitions in the image block, obtains a second predicted image for each of the plurality of partitions using a motion vector, and generates a predicted image for the image block using the plurality of second predicted images, and the motion vector is selected from a motion vector candidate list for the image block.
[0007] These comprehensive or specific aspects may be realized as a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, or may be realized as any combination of a system, an apparatus, a method, an integrated circuit, a computer program, and a recording medium. [Effects of the Invention]
[0008] An encoding device according to an aspect of the present disclosure can process image blocks efficiently. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram showing a functional configuration of a coding device according to the first embodiment. [Figure 2] FIG. 2 is a diagram showing an example of block division according to the first embodiment. [Figure 3] FIG. 3 is a table showing the transformation basis functions corresponding to each transformation type. [Figure 4A] FIG. 4A is a diagram showing an example of the shape of a filter used in ALF. [Figure 4B] FIG. 4B is a diagram showing another example of the shape of the filter used in ALF. [Figure 4C] FIG. 4C is a diagram showing another example of the shape of the filter used in ALF. [Figure 5A] FIG. 5A is a diagram showing 67 intra prediction modes in intra prediction. [Figure 5B] FIG. 5B is a flowchart for explaining an outline of the predicted image correction process using the OBMC process. [Figure 5C] FIG. 5C is a conceptual diagram for explaining an outline of the predicted image correction process using the OBMC process. [Figure 5D] FIG. 5D is a diagram showing an example of FRUC. [Figure 6] FIG. 6 is a diagram for explaining pattern matching (bilateral matching) between two blocks along a motion trajectory. [Figure 7] FIG. 7 is a diagram for explaining pattern matching (template matching) between a template in a current picture and a block in a reference picture. [Figure 8] FIG. 8 is a diagram for explaining a model assuming uniform linear motion. [Figure 9A] FIG. 9A is a diagram for explaining derivation of a motion vector for each sub-block based on motion vectors of a plurality of adjacent blocks. [Figure 9B] FIG. 9B is a diagram for explaining an outline of the motion vector derivation process in the merge mode. [Figure 9C] FIG. 9C is a conceptual diagram for explaining an outline of the DMVR process. [Figure 9D] FIG. 9D is a diagram for explaining an outline of a predicted image generation method using luminance correction processing by LIC processing. [Figure 10] FIG. 10 is a block diagram showing a functional configuration of a decoding device according to the first embodiment. [Figure 11] FIG. 11 is a flowchart showing the encoding process and the decoding process of an image block according to the first mode of the first embodiment. [Figure 12A] FIG. 12A is a schematic diagram showing four divisions according to the first embodiment. [Figure 12B] FIG. 12B is a schematic diagram showing a first example of division into two parts according to the first embodiment. [Figure 12C] FIG. 12C is a schematic diagram showing a second example of division into two parts according to the first embodiment. [Figure 12D] FIG. 12D is a schematic diagram showing a first example of division into three parts according to the first embodiment. [Figure 12E] FIG. 12E is a schematic diagram showing a second example of division into three parts according to the first embodiment. [Figure 12F] FIG. 12F is a schematic diagram showing a first example of diagonal division according to the first embodiment. [Figure 12G] FIG. 12G is a schematic diagram showing a second example of diagonal division according to the first embodiment. [Figure 12H] FIG. 12H is a schematic diagram showing a third example of diagonal division according to the first embodiment. [Figure 12I] FIG. 12I is a schematic diagram showing a first example of a combination of a plurality of divisions according to the first embodiment. [Figure 12J] FIG. 12J is a schematic diagram showing a second example of a combination of a plurality of divisions according to the first embodiment. [Figure 13A] FIG. 13A is a schematic diagram showing triangular partitions according to the first embodiment. [Figure 13B] FIG. 13B is a schematic diagram showing an L-shaped partition according to the first embodiment. [Figure 13C] FIG. 13C is a schematic diagram showing a pentagonal partition according to the first embodiment. [Figure 13D] FIG. 13D is a schematic diagram showing a hexagonal partition according to the first embodiment. [Figure 13E] FIG. 13E is a schematic diagram showing a polygonal partition according to the first embodiment. [Figure 14] FIG. 14 is a flowchart showing the ATMVP process according to the first embodiment. [Figure 15] FIG. 15 is a conceptual diagram showing the process of determining a corresponding block in ATMVP processing. [Figure 16] FIG. 16 is a conceptual diagram showing the process of deriving a motion vector for a sub-block in the ATMVP process. [Figure 17] FIG. 17 is a flowchart showing the STMVP process according to the first embodiment. [Figure 18] FIG. 18 is a flowchart showing the DMVR process according to the first embodiment. [Figure 19] FIG. 19 is a flowchart showing a first example of the encoding process and the decoding process of the flag according to the first embodiment. [Figure 20] FIG. 20 is a flowchart showing a second example of the encoding process and decoding process of the flag according to the first embodiment. [Figure 21] FIG. 21 is a flowchart showing the encoding process and the decoding process of an image block according to the second aspect of the first embodiment. [Figure 22] FIG. 22 is a flowchart showing the encoding process and the decoding process of an image block according to the third aspect of the first embodiment. [Figure 23] FIG. 23 is a flowchart showing the encoding process and the decoding process of an image block according to the fourth aspect of the first embodiment. [Figure 24] FIG. 24 is a block diagram showing an example of implementation of the encoding device according to the first embodiment. [Figure 25] FIG. 25 is a flowchart showing a first operation example of the encoding device according to the first embodiment. [Figure 26] FIG. 26 is a flowchart showing a second operation example of the encoding device according to the first embodiment. [Figure 27] FIG. 27 is a flowchart showing a third operation example of the encoding device according to the first embodiment. [Figure 28]FIG. 28 is a block diagram showing an example of implementation of the decoding device according to the first embodiment. [Figure 29] FIG. 29 is a flowchart showing a first operation example of the decoding device according to the first embodiment. [Figure 30] FIG. 30 is a flowchart showing a second operation example of the decoding device according to the first embodiment. [Figure 31] FIG. 31 is a flowchart showing a third operation example of the decoding device according to the first embodiment. [Figure 32] FIG. 32 is a diagram showing the overall configuration of a content supply system that realizes a content distribution service. [Figure 33] FIG. 33 is a diagram showing an example of a coding structure for scalable coding. [Figure 34] FIG. 34 is a diagram showing an example of a coding structure for scalable coding. [Figure 35] FIG. 35 is a diagram showing an example of a display screen of a web page. [Figure 36] FIG. 36 is a diagram showing an example of a display screen of a web page. [Figure 37] FIG. 37 is a diagram illustrating an example of a smartphone. [Figure 38] FIG. 38 is a block diagram showing an example of the configuration of a smartphone. DETAILED DESCRIPTION OF THE INVENTION
[0010] (Findings that formed the basis of this disclosure) For example, when encoding an image block included in a video, the encoding device divides the image block into multiple partitions and performs a prediction process on each partition. The encoding device may also perform inter-prediction on the partitions. The encoding device then encodes the image block using the results of the prediction process. Specifically, the encoding device encodes the difference obtained by subtracting the predicted image obtained by the prediction process from the image block. This reduces the amount of code.
[0011] When decoding an image block included in a video, a decoding device also divides the image block into multiple partitions and performs a prediction process on each partition. The decoding device may perform inter-prediction on the partitions. The decoding device then decodes the image block using the results of the prediction process. Specifically, the decoding device decodes the coded difference and reconstructs the image block by adding the coded difference to the predicted image obtained by the prediction process. In this way, the image block is decoded.
[0012] In the above-mentioned image block division, it has been considered to divide the image block into a plurality of partitions, including non-rectangular partitions. However, when the image block is divided into a plurality of partitions, including non-rectangular partitions, the prediction process becomes complicated and the amount of processing increases.
[0013] Therefore, for example, an encoding device according to one aspect of the present disclosure includes a circuit and a memory, and the circuit uses the memory to perform a step of encoding an image block. In the step of encoding the image block, the circuit acquires one or more size parameters related to the size of the image block, determines whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship, and if it is determined that the one or more size parameters and the one or more thresholds satisfy the predetermined relationship, encodes a partitioning parameter indicating whether the image block is to be divided into a plurality of partitions, including non-rectangular partitions, and if the partitioning parameter indicates that the image block is to be divided into the plurality of partitions, divides the image block into the plurality of partitions and encodes them.
[0014] This allows the encoding device to switch between dividing the image block into multiple partitions, including non-rectangular partitions, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship, thereby enabling the encoding device to process the image block efficiently.
[0015] Also, for example, if it is determined that the one or more size parameters and the one or more thresholds do not satisfy the predetermined relationship, the circuit encodes the image block without encoding the division parameters.
[0016] This allows a reduction in the amount of coding, and also allows the encoding device to reduce the amount of processing required for encoding the division parameters.
[0017] Also, for example, if it is determined that the one or more size parameters and the one or more thresholds do not satisfy the predetermined relationship, the circuit encodes the image block without dividing it or by dividing it into multiple rectangular partitions.
[0018] This allows the encoding device to suppress division of an image block into multiple partitions, including non-rectangular partitions.
[0019] Also, for example, when the division parameters indicate that the image block is not to be divided into the plurality of partitions, the circuit encodes the image block without dividing it or by dividing it into a plurality of rectangular partitions.
[0020] This allows the encoding device to suppress division of an image block into multiple partitions, including non-rectangular partitions.
[0021] Also, for example, the one or more thresholds are a single threshold, and the predetermined relationship is that each of the one or more size parameters is greater than or equal to the single threshold, or that at least one of the one or more size parameters is greater than or equal to the single threshold.
[0022] This allows the encoding device to switch between dividing an image block into multiple partitions, including non-rectangular partitions, when one or more size parameters are equal to or greater than one threshold.
[0023] Also, for example, the one or more thresholds are a first threshold and a second threshold, the first threshold is less than or equal to the second threshold, and the specified relationship is that each of the one or more size parameters is greater than or equal to the first threshold and less than or equal to the second threshold, or at least one of the one or more size parameters is greater than or equal to the first threshold and less than or equal to the second threshold.
[0024] This allows the encoding device to switch between dividing an image block into a plurality of partitions, including non-rectangular partitions, when one or more size parameters are equal to or greater than the first threshold and equal to or less than the second threshold.
[0025] Also, for example, the non-rectangular partition is a triangular partition.
[0026] This allows the encoding device to switch whether or not to divide an image block into multiple partitions, including triangular partitions, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship.
[0027] Also, for example, the one or more size parameters include at least one of the ratio of the width of the image block to the height of the image block, the ratio of the height of the image block to the width of the image block, the width of the image block, and the height of the image block.
[0028] This allows the encoding device to use at least one of the ratio of width to height of the image block, the ratio of height to width of the image block, the width of the image block, and the height of the image block as a size parameter.
[0029] Also, for example, each of the one or more thresholds is greater than or equal to zero.
[0030] This allows the encoding device to switch whether or not to divide an image block into multiple partitions, including non-rectangular partitions, when one or more size parameters and one or more thresholds, each of which is greater than or equal to zero, satisfy a predetermined relationship.
[0031] Also, for example, the one or more thresholds indicate a limit range of the ratio of the width of the image block to the height of the image block for dividing the image block into the plurality of partitions.
[0032] This allows the encoding device to switch whether or not to divide an image block into multiple partitions, including non-rectangular partitions, when one or more size parameters and one or more thresholds indicating a limit range for the ratio of width to height satisfy a predetermined relationship.
[0033] Also, for example, a decoding device according to one aspect of the present disclosure includes a circuit and a memory, and the circuit uses the memory to perform a step of decoding an image block. In the step of decoding the image block, the circuit obtains one or more size parameters related to the size of the image block, determines whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship, and if it is determined that the one or more size parameters and the one or more thresholds satisfy the predetermined relationship, decodes a partitioning parameter indicating whether the image block is to be divided into a plurality of partitions, including non-rectangular partitions, and if the partitioning parameter indicates that the image block is to be divided into the plurality of partitions, divides the image block into the plurality of partitions and decodes the image block.
[0034] This allows the decoding device to switch whether to divide the image block into multiple partitions, including non-rectangular partitions, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship, thereby enabling the decoding device to process the image block efficiently.
[0035] Also, for example, if it is determined that the one or more size parameters and the one or more thresholds do not satisfy the predetermined relationship, the circuit decodes the image block without decoding the division parameters.
[0036] This allows a reduction in the amount of coding, and also allows the decoding device to reduce the amount of processing required for decoding the division parameters.
[0037] Also, for example, if it is determined that the one or more size parameters and the one or more thresholds do not satisfy the predetermined relationship, the circuit decodes the image block without dividing it or by dividing it into multiple rectangular partitions.
[0038] This allows the decoding device to suppress division of an image block into multiple partitions, including non-rectangular partitions.
[0039] Also, for example, when the division parameters indicate that the image block is not to be divided into the plurality of partitions, the circuit decodes the image block without dividing it or by dividing it into a plurality of rectangular partitions.
[0040] This allows the decoding device to suppress division of an image block into multiple partitions, including non-rectangular partitions.
[0041] Also, for example, the one or more thresholds are a single threshold, and the predetermined relationship is that each of the one or more size parameters is greater than or equal to the single threshold, or that at least one of the one or more size parameters is greater than or equal to the single threshold.
[0042] This allows the decoding device to switch whether or not to divide an image block into multiple partitions, including non-rectangular partitions, when one or more size parameters are equal to or greater than one threshold.
[0043] Also, for example, the one or more thresholds are a first threshold and a second threshold, the first threshold is less than or equal to the second threshold, and the specified relationship is that each of the one or more size parameters is greater than or equal to the first threshold and less than or equal to the second threshold, or at least one of the one or more size parameters is greater than or equal to the first threshold and less than or equal to the second threshold.
[0044] This allows the decoding device to switch between dividing an image block into a plurality of partitions, including non-rectangular partitions, when one or more size parameters are equal to or greater than the first threshold and equal to or less than the second threshold.
[0045] Also, for example, the non-rectangular partition is a triangular partition.
[0046] This allows the decoding device to switch whether or not to divide the image block into multiple partitions, including triangular partitions, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship.
[0047] Also, for example, the one or more size parameters include at least one of the ratio of the width of the image block to the height of the image block, the ratio of the height of the image block to the width of the image block, the width of the image block, and the height of the image block.
[0048] This allows the decoding device to use at least one of the ratio of width to height of the image block, the ratio of height to width of the image block, the width of the image block, and the height of the image block as a size parameter.
[0049] Also, for example, each of the one or more thresholds is greater than or equal to zero.
[0050] This allows the decoding device to switch whether or not to divide an image block into multiple partitions, including non-rectangular partitions, when one or more size parameters and one or more thresholds, each of which is greater than or equal to zero, satisfy a predetermined relationship.
[0051] Also, for example, the one or more thresholds indicate a limit range of the ratio of the width of the image block to the height of the image block for dividing the image block into the plurality of partitions.
[0052] This allows the decoding device to switch whether or not to divide an image block into multiple partitions, including non-rectangular partitions, when one or more size parameters and one or more thresholds indicating a limit range for the ratio of width to height satisfy a predetermined relationship.
[0053] Also, for example, an encoding method according to one aspect of the present disclosure includes a step of encoding an image block, in which the step of encoding the image block includes obtaining one or more size parameters related to the size of the image block, determining whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship, and if it is determined that the one or more size parameters and the one or more thresholds satisfy the predetermined relationship, encoding a partitioning parameter indicating whether the image block is to be divided into a plurality of partitions including non-rectangular partitions, and if the partitioning parameter indicates that the image block is to be divided into the plurality of partitions, dividing the image block into the plurality of partitions and encoding them.
[0054] This allows switching whether to divide the image block into multiple partitions, including non-rectangular partitions, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship, thereby enabling efficient processing of the image block.
[0055] Also, for example, a decoding method according to one aspect of the present disclosure includes a step of decoding an image block, and in the step of decoding the image block, the circuit obtains one or more size parameters related to the size of the image block, determines whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship, and if it is determined that the one or more size parameters and the one or more thresholds satisfy the predetermined relationship, decodes a partitioning parameter indicating whether the image block is to be divided into a plurality of partitions, including non-rectangular partitions, and if the partitioning parameter indicates that the image block is to be divided into the plurality of partitions, divides the image block into the plurality of partitions and decodes the image block.
[0056] This allows switching whether to divide the image block into multiple partitions, including non-rectangular partitions, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship, thereby enabling efficient processing of the image block.
[0057] Also, for example, an encoding device according to one aspect of the present disclosure includes a circuit and a memory, and the circuit uses the memory to perform the steps of dividing an image block into a plurality of partitions, obtaining a predicted image for a partition included in the plurality of partitions, and encoding the image block using the predicted image. In the step of obtaining the predicted image, the circuit determines whether the partition is a non-rectangular partition, and if it is determined that the partition is not a non-rectangular partition, obtains a first predicted image for the partition using a first motion vector for the partition, obtains a second motion vector for the partition using the first predicted image, and obtains the second predicted image for the partition using the second motion vector as the predicted image. If it is determined that the partition is a non-rectangular partition, obtains the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0058] This allows the encoding device to avoid two-stage operations for non-rectangular partitions, thereby preventing an increase in the amount of processing, and thus allows the encoding device to process image blocks efficiently.
[0059] Also, for example, the circuitry determines that the partition is a non-rectangular partition if the partition is a triangular partition.
[0060] This allows the encoding device to suppress an increase in the amount of processing required for triangular partitions.
[0061] Also, for example, the predicted image obtained when it is determined that the partition is not a non-rectangular partition is the same as the portion of the predicted image obtained for the image block in a specified prediction mode without dividing the image block into the multiple partitions that corresponds to the partition.
[0062] This allows the encoding device to obtain a predicted image for the rectangular partition in the same way as when obtaining a predicted image for an image block without dividing the image block into multiple partitions, thereby simplifying the processing of the encoding device.
[0063] Also, for example, the circuit obtains the second motion vector by performing a motion search using the first predicted image.
[0064] This allows the encoding device to obtain an appropriate second motion vector using the first predicted image, and to obtain an appropriate second predicted image using the appropriate second motion vector.
[0065] Also, for example, a decoding device according to one aspect of the present disclosure includes a circuit and a memory, and the circuit uses the memory to perform the following steps: dividing an image block into a plurality of partitions; obtaining a predicted image for a partition included in the plurality of partitions; and decoding the image block using the predicted image; in the step of obtaining the predicted image, the circuit determines whether the partition is a non-rectangular partition; if it is determined that the partition is not a non-rectangular partition, it obtains a first predicted image for the partition using a first motion vector for the partition, obtains a second motion vector for the partition using the first predicted image, and obtains the second predicted image for the partition using the second motion vector as the predicted image; and if it is determined that the partition is a non-rectangular partition, it obtains the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0066] This allows the decoding device to avoid two-stage operations for non-rectangular partitions, thereby preventing an increase in the amount of processing, and therefore allows the decoding device to process image blocks efficiently.
[0067] Also, for example, the circuitry determines that the partition is a non-rectangular partition if the partition is a triangular partition.
[0068] This allows the decoding device to suppress an increase in the amount of processing for triangular partitions.
[0069] Also, for example, the predicted image obtained when it is determined that the partition is not a non-rectangular partition is the same as the portion of the predicted image obtained for the image block in a specified prediction mode without dividing the image block into the multiple partitions that corresponds to the partition.
[0070] This allows the decoding device to obtain a predicted image for the rectangular partition in the same way as when obtaining a predicted image for an image block without dividing the image block into multiple partitions, thereby simplifying the processing of the decoding device.
[0071] Also, for example, the circuit obtains the second motion vector by performing a motion search using the first predicted image.
[0072] This allows the decoding device to obtain an appropriate second motion vector using the first predicted image, and to obtain an appropriate second predicted image using the appropriate second motion vector.
[0073] Also, for example, an encoding method according to one aspect of the present disclosure includes the steps of dividing an image block into a plurality of partitions, obtaining a predicted image for a partition included in the plurality of partitions, and encoding the image block using the predicted image, wherein the step of obtaining the predicted image includes determining whether the partition is a non-rectangular partition, and if it is determined that the partition is not a non-rectangular partition, obtaining a first predicted image for the partition using a first motion vector for the partition, obtaining a second motion vector for the partition using the first predicted image, and obtaining the second predicted image for the partition using the second motion vector as the predicted image, and if it is determined that the partition is a non-rectangular partition, obtaining the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0074] This makes it possible to reduce the number of two steps of operations for non-rectangular partitions, and to suppress an increase in the amount of processing, thereby enabling efficient processing of image blocks.
[0075] Also, for example, a decoding method according to one aspect of the present disclosure includes the steps of dividing an image block into a plurality of partitions, obtaining a predicted image for a partition included in the plurality of partitions, and decoding the image block using the predicted image, wherein the step of obtaining the predicted image includes determining whether the partition is a non-rectangular partition, and if it is determined that the partition is not a non-rectangular partition, obtaining a first predicted image for the partition using a first motion vector for the partition, obtaining a second motion vector for the partition using the first predicted image, and obtaining the second predicted image for the partition using the second motion vector as the predicted image, and if it is determined that the partition is a non-rectangular partition, obtaining the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0076] This makes it possible to reduce the number of two steps of operations for non-rectangular partitions, and to suppress an increase in the amount of processing, thereby enabling efficient processing of image blocks.
[0077] Also, for example, an encoding device according to one aspect of the present disclosure includes a circuit and a memory, and the circuit uses the memory to perform the following steps: dividing an image block into a plurality of partitions; obtaining a predicted image for a partition included in the plurality of partitions; and encoding the image block using the predicted image; in the step of obtaining the predicted image, the circuit determines whether the partition is a non-rectangular partition; if it is determined that the partition is not a non-rectangular partition, obtains a first predicted image for the partition, obtains a gradient image for the first predicted image, and obtains a second predicted image as the predicted image using the first predicted image and the gradient image; and if it is determined that the partition is a non-rectangular partition, obtains the first predicted image as the predicted image without using the gradient image.
[0078] This allows the encoding device to suppress the use of gradient images for non-rectangular partitions, thereby suppressing an increase in the amount of processing, and therefore allows the encoding device to process image blocks efficiently.
[0079] Also, for example, the circuitry determines that the partition is a non-rectangular partition if the partition is a triangular partition.
[0080] This allows the encoding device to suppress an increase in the amount of processing required for triangular partitions.
[0081] Also, for example, the predicted image obtained when it is determined that the partition is not a non-rectangular partition is the same as the portion of the predicted image obtained for the image block in a specified prediction mode without dividing the image block into the multiple partitions that corresponds to the partition.
[0082] This allows the encoding device to obtain a predicted image for the rectangular partition in the same way as when obtaining a predicted image for an image block without dividing the image block into multiple partitions, thereby simplifying the processing of the encoding device.
[0083] Also, for example, the circuit obtains the gradient image by applying a filter that extracts a difference value between pixels to the first predicted image.
[0084] This allows the encoding device to obtain an appropriate gradient image for the first predicted image, and to obtain an appropriate second predicted image using the appropriate gradient image.
[0085] Also, for example, a decoding device according to one aspect of the present disclosure includes a circuit and a memory, and the circuit uses the memory to perform the following steps: dividing an image block into a plurality of partitions; obtaining a predicted image for a partition included in the plurality of partitions; and decoding the image block using the predicted image; in the step of obtaining the predicted image, the circuit determines whether the partition is a non-rectangular partition; if it is determined that the partition is not a non-rectangular partition, obtains a first predicted image for the partition, obtains a gradient image for the first predicted image, and obtains a second predicted image as the predicted image using the first predicted image and the gradient image; and if it is determined that the partition is a non-rectangular partition, obtains the first predicted image as the predicted image without using the gradient image.
[0086] This allows the decoding device to suppress the use of gradient images for non-rectangular partitions, thereby suppressing an increase in the amount of processing, and therefore allows the decoding device to process image blocks efficiently.
[0087] Also, for example, the circuitry determines that the partition is a non-rectangular partition if the partition is a triangular partition.
[0088] This allows the decoding device to suppress an increase in the amount of processing for triangular partitions.
[0089] Also, for example, the predicted image obtained when it is determined that the partition is not a non-rectangular partition is the same as the portion of the predicted image obtained for the image block in a specified prediction mode without dividing the image block into the multiple partitions that corresponds to the partition.
[0090] This allows the decoding device to obtain a predicted image for the rectangular partition in the same way as when obtaining a predicted image for an image block without dividing the image block into multiple partitions, thereby simplifying the processing of the decoding device.
[0091] Also, for example, the circuit obtains the gradient image by applying a filter that extracts a difference value between pixels to the first predicted image.
[0092] This allows the decoding device to obtain an appropriate gradient image for the first predicted image, and to obtain an appropriate second predicted image using the appropriate gradient image.
[0093] Also, for example, an encoding method according to one aspect of the present disclosure includes the steps of: dividing an image block into a plurality of partitions; obtaining a predicted image for a partition included in the plurality of partitions; and encoding the image block using the predicted image; in the step of obtaining the predicted image, determining whether the partition is a non-rectangular partition; if it is determined that the partition is not a non-rectangular partition, obtaining a first predicted image for the partition, obtaining a gradient image for the first predicted image, and obtaining a second predicted image as the predicted image using the first predicted image and the gradient image; if it is determined that the partition is a non-rectangular partition, obtaining the first predicted image as the predicted image without using the gradient image.
[0094] This makes it possible to suppress an increase in the amount of processing for non-rectangular partitions, thereby enabling efficient processing of image blocks.
[0095] Also, for example, a decoding method according to one aspect of the present disclosure includes the steps of: dividing an image block into a plurality of partitions; obtaining a predicted image for a partition included in the plurality of partitions; and decoding the image block using the predicted image; in the step of obtaining the predicted image, determining whether the partition is a non-rectangular partition; if it is determined that the partition is not a non-rectangular partition, obtaining a first predicted image for the partition, obtaining a gradient image for the first predicted image, and obtaining a second predicted image as the predicted image using the first predicted image and the gradient image; if it is determined that the partition is a non-rectangular partition, obtaining the first predicted image as the predicted image without using the gradient image.
[0096] This makes it possible to suppress an increase in the amount of processing for non-rectangular partitions, thereby enabling efficient processing of image blocks.
[0097] Furthermore, for example, an encoding device according to an aspect of the present disclosure includes a circuit and a memory, and the circuit performs the following steps using the memory: dividing an image block into a plurality of partitions; generating a motion vector candidate list for a partition included in the plurality of partitions; obtaining a motion vector for the partition from the motion vector candidate list; performing inter prediction processing for the partition using the motion vector for the partition; and encoding the image block using a result of the inter prediction processing. In the step of generating the motion vector candidate list, the circuit determines whether the partition is a non-rectangular partition, and if the partition is a non-rectangular partition, If it is determined that the partition is not a rectangular partition, the motion vector candidate list is generated using at least one of a plurality of motion vectors for a plurality of spatially adjacent partitions that are spatially adjacent to the partition, a plurality of motion vectors for a plurality of temporally adjacent partitions that are temporally adjacent to the partition, and a plurality of motion vectors for a plurality of subpartitions included in the partition; and if it is determined that the partition is a non-rectangular partition, the motion vector candidate list is generated using at least one of a plurality of motion vectors for the plurality of spatially adjacent partitions and a plurality of motion vectors for the plurality of temporally adjacent partitions without using a plurality of motion vectors for the plurality of subpartitions.
[0098] This allows the encoding device to avoid using multiple motion vectors for multiple sub-partitions for non-rectangular partitions, thereby preventing an increase in the amount of processing, and thus allowing the encoding device to process image blocks efficiently.
[0099] Also, for example, the circuitry determines that the partition is a non-rectangular partition if the partition is a triangular partition.
[0100] This allows the encoding device to suppress an increase in the amount of processing required for triangular partitions.
[0101] Also, for example, the plurality of motion vectors for the plurality of subpartitions include motion vectors predicted from motion vectors for regions spatially or temporally adjacent to each of the plurality of subpartitions.
[0102] This allows the encoding device to use a motion vector predicted from a motion vector for an area adjacent to the subpartition as the motion vector for the subpartition.
[0103] Also, for example, the motion vector candidate list generated when it is determined that the partition is not a non-rectangular partition is the same as the motion vector candidate list generated for the image block in a predetermined prediction mode.
[0104] This allows the encoding device to generate a motion vector candidate list for a rectangular partition in the same way as generating a motion vector candidate list for an image block, thereby simplifying the processing of the encoding device.
[0105] Also, for example, each of the plurality of temporally adjacent partitions is a co-located partition that corresponds to the position of the partition in a picture different from the picture containing the partition.
[0106] This allows the encoding device to use the motion vector for the co-located partition as the motion vector for the temporally adjacent partition.
[0107] Furthermore, for example, a decoding device according to an aspect of the present disclosure includes a circuit and a memory, and the circuit performs the following steps using the memory: dividing an image block into a plurality of partitions; generating a motion vector candidate list for a partition included in the plurality of partitions; obtaining a motion vector for the partition from the motion vector candidate list; performing inter prediction processing for the partition using the motion vector for the partition; and decoding the image block using a result of the inter prediction processing. In the step of generating the motion vector candidate list, the circuit determines whether the partition is a non-rectangular partition, and if the partition is not a non-rectangular partition, When it is determined that the partition is a non-rectangular partition, the motion vector candidate list is generated using at least one of a plurality of motion vectors for a plurality of spatially adjacent partitions that are spatially adjacent to the partition, a plurality of motion vectors for a plurality of temporally adjacent partitions that are temporally adjacent to the partition, and a plurality of motion vectors for a plurality of sub-partitions included in the partition; and when it is determined that the partition is a non-rectangular partition, the motion vector candidate list is generated using at least one of a plurality of motion vectors for the plurality of spatially adjacent partitions and a plurality of motion vectors for the plurality of temporally adjacent partitions without using a plurality of motion vectors for the plurality of sub-partitions.
[0108] This allows the decoding device to avoid using multiple motion vectors for multiple sub-partitions for non-rectangular partitions, thereby preventing an increase in the amount of processing, and therefore allows the decoding device to process image blocks efficiently.
[0109] Also, for example, the circuitry determines that the partition is a non-rectangular partition if the partition is a triangular partition.
[0110] This allows the decoding device to suppress an increase in the amount of processing for triangular partitions.
[0111] Also, for example, the plurality of motion vectors for the plurality of subpartitions include motion vectors predicted from motion vectors for regions spatially or temporally adjacent to each of the plurality of subpartitions.
[0112] This allows the decoding device to use a motion vector predicted as the motion vector for the subpartition from a motion vector for an area adjacent to the subpartition.
[0113] Also, for example, the motion vector candidate list generated when it is determined that the partition is not a non-rectangular partition is the same as the motion vector candidate list generated for the image block in a predetermined prediction mode.
[0114] This allows the decoding device to generate a motion vector candidate list for a rectangular partition in the same way as generating a motion vector candidate list for an image block, thereby simplifying the processing of the decoding device.
[0115] Also, for example, each of the plurality of temporally adjacent partitions is a co-located partition that corresponds to the position of the partition in a picture different from the picture containing the partition.
[0116] This allows the decoding device to use the motion vector for the co-located partition as the motion vector for the temporally adjacent partition.
[0117] Furthermore, for example, an encoding method according to one aspect of the present disclosure includes the steps of: dividing an image block into a plurality of partitions; generating a motion vector candidate list for a partition included in the plurality of partitions; obtaining a motion vector for the partition from the motion vector candidate list; performing inter-prediction processing for the partition using the motion vector for the partition; and encoding the image block using a result of the inter-prediction processing. In the step of generating the motion vector candidate list, it is determined whether the partition is a non-rectangular partition. If it is determined that the partition is not a non-rectangular partition, the motion vector candidate list is generated using at least one motion vector selected from the group consisting of a plurality of motion vectors for a plurality of spatially adjacent partitions that are spatially adjacent to the partition, a plurality of motion vectors for a plurality of temporally adjacent partitions that are temporally adjacent to the partition, and a plurality of motion vectors for a plurality of sub-partitions included in the partition. If it is determined that the partition is a non-rectangular partition, the motion vector candidate list is generated using at least one motion vector selected from the group consisting of a plurality of motion vectors for the plurality of spatially adjacent partitions and a plurality of motion vectors for the plurality of temporally adjacent partitions, without using the plurality of motion vectors for the plurality of sub-partitions.
[0118] This makes it possible to suppress the use of multiple motion vectors for multiple sub-partitions for non-rectangular partitions, thereby suppressing an increase in the amount of processing, and thus enabling efficient processing of image blocks.
[0119] Furthermore, for example, an encoding method according to one aspect of the present disclosure includes the steps of: dividing an image block into a plurality of partitions; generating a motion vector candidate list for a partition included in the plurality of partitions; obtaining a motion vector for the partition from the motion vector candidate list; performing inter-prediction processing for the partition using the motion vector for the partition; and decoding the image block using a result of the inter-prediction processing. In the step of generating the motion vector candidate list, it is determined whether the partition is a non-rectangular partition. If it is determined that the partition is not a non-rectangular partition, the motion vector candidate list is generated using at least one motion vector selected from the group consisting of a plurality of motion vectors for a plurality of spatially adjacent partitions that are spatially adjacent to the partition, a plurality of motion vectors for a plurality of temporally adjacent partitions that are temporally adjacent to the partition, and a plurality of motion vectors for a plurality of sub-partitions included in the partition. If it is determined that the partition is a non-rectangular partition, the motion vector candidate list is generated using at least one motion vector selected from the group consisting of a plurality of motion vectors for the plurality of spatially adjacent partitions and a plurality of motion vectors for the plurality of temporally adjacent partitions, without using the plurality of motion vectors for the plurality of sub-partitions.
[0120] This makes it possible to suppress the use of multiple motion vectors for multiple sub-partitions for non-rectangular partitions, thereby suppressing an increase in the amount of processing, and thus enabling efficient processing of image blocks.
[0121] Also, for example, an encoding device according to one aspect of the present disclosure includes a division unit, an intra prediction unit, an inter prediction unit, a transform unit, a quantization unit, an entropy encoding unit, and a loop filter unit. The division unit divides a picture into a plurality of image blocks. The intra prediction unit performs intra prediction on image blocks included in the plurality of image blocks. The inter prediction unit performs inter prediction on the image blocks. The transform unit generates transform coefficients by transforming a prediction error between a predicted image obtained by the intra prediction or the inter prediction and an original image. The quantization unit quantizes the transform coefficients to generate quantized coefficients. The entropy encoding unit encodes the quantized coefficients to generate an encoded bitstream. The loop filter unit applies a filter to a reconstructed image generated using the predicted image.
[0122] Also, for example, the entropy coding unit performs a step of encoding the image block, and in the step of encoding the image block, it acquires one or more size parameters related to the size of the image block, determines whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship, and if it is determined that the one or more size parameters and the one or more thresholds satisfy the predetermined relationship, encodes a partitioning parameter indicating whether the image block is to be divided into a plurality of partitions, including non-rectangular partitions, and if the partitioning parameter indicates that the image block is to be divided into the plurality of partitions, divides the image block into the plurality of partitions and encodes them.
[0123] Also, for example, the inter prediction unit performs the steps of dividing the image block into a plurality of partitions and obtaining a predicted image for a partition included in the plurality of partitions, and in the step of obtaining the predicted image, determines whether the partition is a non-rectangular partition, and if it is determined that the partition is not a non-rectangular partition, obtains a first predicted image for the partition using a first motion vector for the partition, obtains a second motion vector for the partition using the first predicted image, and obtains the second predicted image for the partition using the second motion vector as the predicted image, and if it is determined that the partition is a non-rectangular partition, obtains the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0124] Also, for example, the inter prediction unit performs the steps of dividing the image block into a plurality of partitions and obtaining a predicted image for a partition included in the plurality of partitions, and in the step of obtaining the predicted image, determines whether the partition is a non-rectangular partition, and if it is determined that the partition is not a non-rectangular partition, obtains a first predicted image for the partition, obtains a gradient image for the first predicted image, and obtains a second predicted image as the predicted image using the first predicted image and the gradient image, and if it is determined that the partition is a non-rectangular partition, obtains the first predicted image as the predicted image without using the gradient image.
[0125] Further, for example, the inter prediction unit performs the steps of dividing the image block into a plurality of partitions, generating a motion vector candidate list for a partition included in the plurality of partitions, obtaining a motion vector for the partition from the motion vector candidate list, and performing inter prediction processing for the partition using the motion vector for the partition. In the step of generating the motion vector candidate list, the unit determines whether the partition is a non-rectangular partition. If it is determined that the partition is not a non-rectangular partition, the unit generates the motion vector candidate list using at least one motion vector from among a plurality of motion vectors for a plurality of spatially adjacent partitions that are spatially adjacent to the partition, a plurality of motion vectors for a plurality of temporally adjacent partitions that are temporally adjacent to the partition, and a plurality of motion vectors for a plurality of sub-partitions included in the partition. If it is determined that the partition is a non-rectangular partition, the unit generates the motion vector candidate list using at least one motion vector from among a plurality of motion vectors for the plurality of spatially adjacent partitions and a plurality of motion vectors for the plurality of temporally adjacent partitions, without using a plurality of motion vectors for the plurality of sub-partitions.
[0126] Also, for example, a decoding device according to one aspect of the present disclosure includes an entropy decoding unit, an inverse quantization unit, an inverse transform unit, an intra prediction unit, an inter prediction unit, and a loop filter unit. The entropy decoding unit decodes quantized coefficients of partitions in a picture from an encoded bitstream. The inverse quantization unit inversely quantizes the quantized coefficients to obtain transform coefficients. The inverse transform unit inversely transforms the transform coefficients to obtain prediction errors. The intra prediction unit performs intra prediction on the partitions. The inter prediction unit performs inter prediction on the partitions. The loop filter unit applies a filter to a reconstructed image generated using a predicted image obtained by the intra prediction or the inter prediction and the prediction error.
[0127] Also, for example, the entropy decoding unit performs a step of decoding the image block, and in the step of decoding the image block, it obtains one or more size parameters related to the size of the image block, determines whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship, and if it is determined that the one or more size parameters and the one or more thresholds satisfy the predetermined relationship, decodes a partitioning parameter indicating whether the image block will be divided into a plurality of partitions including non-rectangular partitions, and if the partitioning parameter indicates that the image block will be divided into the plurality of partitions, divides the image block into the plurality of partitions and decodes it.
[0128] Also, for example, the inter prediction unit performs the steps of dividing the image block into a plurality of partitions and obtaining a predicted image for a partition included in the plurality of partitions, and in the step of obtaining the predicted image, determines whether the partition is a non-rectangular partition, and if it is determined that the partition is not a non-rectangular partition, obtains a first predicted image for the partition using a first motion vector for the partition, obtains a second motion vector for the partition using the first predicted image, and obtains the second predicted image for the partition using the second motion vector as the predicted image, and if it is determined that the partition is a non-rectangular partition, obtains the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0129] Also, for example, the inter prediction unit performs the steps of dividing the image block into a plurality of partitions and obtaining a predicted image for a partition included in the plurality of partitions, and in the step of obtaining the predicted image, determines whether the partition is a non-rectangular partition, and if it is determined that the partition is not a non-rectangular partition, obtains a first predicted image for the partition, obtains a gradient image for the first predicted image, and obtains a second predicted image as the predicted image using the first predicted image and the gradient image, and if it is determined that the partition is a non-rectangular partition, obtains the first predicted image as the predicted image without using the gradient image.
[0130] Further, for example, the inter prediction unit performs the steps of dividing the image block into a plurality of partitions, generating a motion vector candidate list for a partition included in the plurality of partitions, obtaining a motion vector for the partition from the motion vector candidate list, and performing inter prediction processing for the partition using the motion vector for the partition. In the step of generating the motion vector candidate list, the unit determines whether the partition is a non-rectangular partition. If it is determined that the partition is not a non-rectangular partition, the unit generates the motion vector candidate list using at least one motion vector from among a plurality of motion vectors for a plurality of spatially adjacent partitions that are spatially adjacent to the partition, a plurality of motion vectors for a plurality of temporally adjacent partitions that are temporally adjacent to the partition, and a plurality of motion vectors for a plurality of sub-partitions included in the partition. If it is determined that the partition is a non-rectangular partition, the unit generates the motion vector candidate list using at least one motion vector from among a plurality of motion vectors for the plurality of spatially adjacent partitions and a plurality of motion vectors for the plurality of temporally adjacent partitions, without using a plurality of motion vectors for the plurality of sub-partitions.
[0131] Furthermore, these comprehensive or specific aspects may be realized as a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, or may be realized as any combination of a system, an apparatus, a method, an integrated circuit, a computer program, and a recording medium.
[0132] Hereinafter, the embodiments will be specifically described with reference to the drawings.
[0133] The embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, component placement and connection configurations, steps, and step order shown in the following embodiments are merely examples and are not intended to limit the scope of the claims. Furthermore, among the components in the following embodiments, components that are not described in the independent claims that represent the highest concepts are described as optional components.
[0134] (Embodiment 1) First, an overview of the first embodiment will be described as an example of an encoding device and a decoding device to which the processes and / or configurations described in each aspect of the present disclosure can be applied. However, the first embodiment is merely an example of an encoding device and a decoding device to which the processes and / or configurations described in each aspect of the present disclosure can be applied, and the processes and / or configurations described in each aspect of the present disclosure can also be implemented in encoding devices and decoding devices different from the first embodiment.
[0135] When applying the processing and / or configurations described in each aspect of the present disclosure to the first embodiment, for example, any of the following may be performed.
[0136] (1) For the encoding device or decoding device of the first embodiment, among the multiple components constituting the encoding device or decoding device, components corresponding to the components described in each aspect of the present disclosure are replaced with the components described in each aspect of the present disclosure. (2) Any modification, such as addition, replacement, or deletion, of the functions or processes performed by some of the components constituting the encoding device or decoding device of the first embodiment may be made to the encoding device or decoding device, and then components corresponding to the components described in each aspect of the present disclosure may be replaced with the components described in each aspect of the present disclosure. (3) The method implemented by the encoding device or decoding device of the first embodiment may be modified by adding a process and / or replacing or deleting some of the processes included in the method, and then replacing the process described in each aspect of the present disclosure with the process described in each aspect of the present disclosure. (4) Some of the components constituting the encoding device or decoding device of the first embodiment may be implemented in combination with components described in each aspect of the present disclosure, components having some of the functions of the components described in each aspect of the present disclosure, or components performing some of the processing performed by the components described in each aspect of the present disclosure. (5) A component having some of the functions of some of the components constituting the encoding device or decoding device of the first embodiment, or a component that performs some of the processing performed by some of the components constituting the encoding device or decoding device of the first embodiment, is implemented in combination with a component described in each aspect of the present disclosure, a component having some of the functions of the components described in each aspect of the present disclosure, or a component that performs some of the processing performed by the components described in each aspect of the present disclosure. (6) In the method implemented by the encoding device or decoding device of the first embodiment, among the multiple processes included in the method, processes corresponding to the processes described in each aspect of the present disclosure are replaced with the processes described in each aspect of the present disclosure. (7) Some of the processes included in the method implemented by the encoding device or decoding device of the first embodiment may be implemented in combination with the processes described in each aspect of the present disclosure.
[0137] It should be noted that the manner of implementing the processes and / or configurations described in each aspect of the present disclosure is not limited to the above examples. For example, they may be implemented in a device used for a purpose different from the video / image encoding device or video / image decoding device disclosed in Embodiment 1, or the processes and / or configurations described in each aspect may be implemented independently. Furthermore, the processes and / or configurations described in different aspects may be implemented in combination.
[0138] [Outline of the encoding device] First, an overview of a coding device according to Embodiment 1 will be described. Fig. 1 is a block diagram showing a functional configuration of a coding device 100 according to Embodiment 1. The coding device 100 is a video / image coding device that codes a video / image on a block-by-block basis.
[0139] As shown in FIG. 1, the encoding device 100 is a device that encodes an image on a block-by-block basis, and includes a division unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128.
[0140] The encoding device 100 is realized by, for example, a general-purpose processor and memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the division unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation unit 114, the addition unit 116, the loop filter unit 120, the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128. Alternatively, the encoding device 100 may be realized as one or more dedicated electronic circuits corresponding to the division unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation unit 114, the addition unit 116, the loop filter unit 120, the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.
[0141] Each component included in the encoding device 100 will be described below.
[0142] [Divided part] The division unit 102 divides each picture included in the input video into a plurality of blocks and outputs each block to the subtraction unit 104. For example, the division unit 102 first divides a picture into blocks of a fixed size (e.g., 128x128). These fixed-size blocks are sometimes called coding tree units (CTUs). The division unit 102 then divides each of the fixed-size blocks into blocks of a variable size (e.g., 64x64 or less) based on recursive quadtree and / or binary tree block division. These variable-size blocks are sometimes called coding units (CUs), prediction units (PUs), or transform units (TUs). Note that in this embodiment, there is no need to distinguish between CUs, PUs, and TUs, and some or all of the blocks in a picture may serve as the processing units of CUs, PUs, and TUs.
[0143] Fig. 2 is a diagram showing an example of block division according to embodiment 1. In Fig. 2, solid lines represent block boundaries based on quadtree block division, and dashed lines represent block boundaries based on binary tree block division.
[0144] Here, the block 10 is a square block of 128x128 pixels (128x128 block). This 128x128 block 10 is first divided into four square 64x64 blocks (quadtree block division).
[0145] The top-left 64x64 block is further divided vertically into two rectangular 32x64 blocks, and the left 32x64 block is further divided vertically into two rectangular 16x64 blocks (binary tree block division). As a result, the top-left 64x64 block is divided into two 16x64 blocks 11 and 12 and a 32x64 block 13.
[0146] The top right 64x64 block is divided horizontally into two rectangular 64x32 blocks 14 and 15 (binary tree block division).
[0147] The lower-left 64x64 block is divided into four square 32x32 blocks (quadtree block decomposition). Of the four 32x32 blocks, the upper-left and lower-right blocks are further divided. The upper-left 32x32 block is divided vertically into two rectangular 16x32 blocks, and the right 16x32 block is further divided horizontally into two 16x16 blocks (binary tree block decomposition). The lower-right 32x32 block is divided horizontally into two 32x16 blocks (binary tree block decomposition). As a result, the lower-left 64x64 block is divided into 16x32 block 16, two 16x16 blocks 17 and 18, two 32x32 blocks 19 and 20, and two 32x16 blocks 21 and 22.
[0148] The bottom right 64x64 block 23 is not split.
[0149] 2, block 10 is divided into 13 variable-sized blocks 11 to 23 based on recursive quad-tree and binary tree block division. This type of division is sometimes called QTBT (quad-tree plus binary tree) division.
[0150] In Fig. 2, one block is divided into four or two blocks (quadtree or binary tree block division), but the division is not limited to this. For example, one block may be divided into three blocks (ternary tree block division). Division including such ternary tree block division is sometimes called MBT (multi type tree) division.
[0151] [Subtraction section] The subtraction unit 104 subtracts a prediction signal (prediction sample) from an original signal (original sample) for each block divided by the division unit 102. That is, the subtraction unit 104 calculates a prediction error (also referred to as a residual) of a block to be coded (hereinafter referred to as a current block). Then, the subtraction unit 104 outputs the calculated prediction error to the conversion unit 106.
[0152] The original signal is an input signal to the encoding device 100, and is a signal representing an image of each picture constituting a moving image (for example, a luminance (luma) signal and two color difference (chroma) signals). Hereinafter, the signal representing an image may also be referred to as a sample.
[0153] [Conversion section] The transform unit 106 transforms the spatial domain prediction errors into frequency domain transform coefficients and outputs the transform coefficients to the quantization unit 108. Specifically, the transform unit 106 performs, for example, a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the spatial domain prediction errors.
[0154] The transform unit 106 may adaptively select a transform type from among a plurality of transform types and transform the prediction errors into transform coefficients using a transform basis function corresponding to the selected transform type. Such a transform is sometimes called an explicit multiple core transform (EMT) or an adaptive multiple transform (AMT).
[0155] The multiple transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Fig. 3 is a table showing transform basis functions corresponding to each transform type. In Fig. 3, N represents the number of input pixels. Selection of a transform type from among these multiple transform types may depend, for example, on the type of prediction (intra prediction or inter prediction) or the intra prediction mode.
[0156] Information indicating whether EMT or AMT is applied (e.g., referred to as an AMT flag) and information indicating the selected transformation type are signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0157] Furthermore, the transform unit 106 may retransform the transform coefficients (transform results). Such retransformation may be referred to as an adaptive secondary transform (AST) or a non-separable secondary transform (NSST). For example, the transform unit 106 performs retransformation for each sub-block (e.g., 4x4 sub-block) included in a block of transform coefficients corresponding to intra-prediction errors. Information indicating whether or not to apply NSST and information regarding the transform matrix used for NSST are signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., the sequence level, picture level, slice level, tile level, or CTU level).
[0158] Here, a separable transformation is a method in which the transformation is performed multiple times by separating the input into directions equal to the number of dimensions, and a non-separable transformation is a method in which, when the input is multidimensional, two or more dimensions are treated as one dimension and the transformation is performed all at once.
[0159] For example, one example of a non-separable transformation is when the input is a 4x4 block, it is treated as a single array with 16 elements, and the transformation process is performed on that array using a 16x16 transformation matrix.
[0160] Similarly, a non-separable transformation is one that treats a 4x4 input block as a single array with 16 elements and then performs multiple Givens rotations on that array (Hypercube Givens Transform).
[0161] [Quantization section] The quantization unit 108 quantizes the transform coefficients output from the transform unit 106. Specifically, the quantization unit 108 scans the transform coefficients of the current block in a predetermined scanning order and quantizes the transform coefficients based on quantization parameters (QP) corresponding to the scanned transform coefficients. The quantization unit 108 then outputs the quantized transform coefficients of the current block (hereinafter referred to as quantized coefficients) to the entropy coding unit 110 and the inverse quantization unit 112.
[0162] The predetermined order is an order for quantizing / dequantizing the transform coefficients. For example, the predetermined scanning order is defined as an ascending order (low frequency to high frequency) or a descending order (high frequency to low frequency).
[0163] The quantization parameter is a parameter that defines the quantization step (quantization width). For example, as the value of the quantization parameter increases, the quantization step also increases. In other words, as the value of the quantization parameter increases, the quantization error also increases.
[0164] [Entropy coding section] The entropy coding unit 110 generates a coded signal (coded bit stream) by variable-length coding the quantized coefficients input from the quantization unit 108. Specifically, the entropy coding unit 110, for example, binarizes the quantized coefficients and arithmetically codes the binary signal.
[0165] [Dequantization section] The inverse quantization unit 112 inverse quantizes the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inverse quantizes the quantized coefficients of the current block in a predetermined scanning order. The inverse quantization unit 112 then outputs the inverse quantized transform coefficients of the current block to the inverse transform unit 114.
[0166] [Inverse conversion section] The inverse transform unit 114 restores the prediction error by inverse transforming the transform coefficients that are input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error of the current block by performing an inverse transform on the transform coefficients that corresponds to the transform performed by the transform unit 106. Then, the inverse transform unit 114 outputs the restored prediction error to the adder unit 116.
[0167] Note that the restored prediction error does not match the prediction error calculated by the subtraction unit 104 because information has been lost due to quantization. In other words, the restored prediction error includes a quantization error.
[0168] [Addition section] The adder 116 reconstructs the current block by adding the prediction error input from the inverse transformer 114 and the prediction sample input from the prediction control unit 128. The adder 116 then outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block is sometimes called a local decoded block.
[0169] [Block Memory] The block memory 118 is a storage unit for storing blocks that are referenced in intra prediction and are in a picture to be coded (hereinafter referred to as a current picture). Specifically, the block memory 118 stores the reconstructed blocks output from the adder 116.
[0170] [Loop filter section] The loop filter unit 120 applies a loop filter to the block reconstructed by the adder 116 and outputs the filtered reconstructed block to the frame memory 122. The loop filter is a filter (in-loop filter) used in the encoding loop, and includes, for example, a deblocking filter (DF), a sample adaptive offset (SAO), and an adaptive loop filter (ALF).
[0171] ALF applies a least squares error filter to remove coding artifacts, for example, for each 2x2 sub-block in the current block, one filter selected from multiple filters based on local gradient direction and activity.
[0172] Specifically, first, sub-blocks (e.g., 2x2 sub-blocks) are classified into a plurality of classes (e.g., 15 or 25 classes). The sub-blocks are classified based on the gradient direction and activity. For example, a classification value C (e.g., C=5D+A) is calculated using a gradient direction value D (e.g., 0 to 2 or 0 to 4) and a gradient activity value A (e.g., 0 to 4). Then, based on the classification value C, the sub-blocks are classified into a plurality of classes (e.g., 15 or 25 classes).
[0173] The gradient direction value D is derived by, for example, comparing gradients in multiple directions (e.g., horizontal, vertical, and two diagonal directions), and the gradient activity value A is derived by, for example, adding gradients in multiple directions and quantizing the sum.
[0174] Based on the result of such classification, a filter for the sub-block is determined from among a plurality of filters.
[0175] The filter shape used in ALF is, for example, a circularly symmetric shape. FIGS. 4A to 4C are diagrams showing several examples of filter shapes used in ALF. FIG. 4A shows a 5x5 diamond-shaped filter, FIG. 4B shows a 7x7 diamond-shaped filter, and FIG. 4C shows a 9x9 diamond-shaped filter. Information indicating the filter shape is signaled at the picture level. Note that signaling of the information indicating the filter shape does not need to be limited to the picture level, and may be at other levels (e.g., sequence level, slice level, tile level, CTU level, or CU level).
[0176] Whether ALF is turned on or off is determined, for example, at the picture level or the CU level. For example, whether ALF is applied to luminance is determined at the CU level, and whether ALF is applied to chrominance is determined at the picture level. Information indicating whether ALF is turned on or off is signaled at the picture level or the CU level. Note that signaling of information indicating whether ALF is turned on or off does not need to be limited to the picture level or the CU level, and may be at another level (for example, the sequence level, the slice level, the tile level, or the CTU level).
[0177] The coefficient sets of multiple selectable filters (e.g., up to 15 or 25 filters) are signaled at the picture level. Note that the signaling of the coefficient sets does not need to be limited to the picture level, but may also be at other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or sub-block level).
[0178] [Frame memory] The frame memory 122 is a storage unit for storing reference pictures used in inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120.
[0179] [Intra prediction section] The intra prediction unit 124 generates a prediction signal (intra prediction signal) by performing intra prediction (also referred to as intra-picture prediction) of the current block with reference to blocks in the current picture stored in the block memory 118. Specifically, the intra prediction unit 124 generates the intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 128.
[0180] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predefined intra prediction modes. The plurality of intra prediction modes includes one or more non-directional prediction modes and a plurality of directional prediction modes.
[0181] The one or more non-directional prediction modes include, for example, a planar prediction mode and a DC prediction mode defined in the H.265 / High-Efficiency Video Coding (HEVC) standard (Non-Patent Document 1).
[0182] The multiple directional prediction modes include, for example, the 33 prediction modes defined in the H.265 / HEVC standard. Note that the multiple directional prediction modes may also include 32 prediction modes in addition to the 33 directions (65 directional prediction modes in total). Fig. 5A is a diagram showing 67 intra prediction modes (2 non-directional prediction modes and 65 directional prediction modes) in intra prediction. Solid arrows represent the 33 directions defined in the H.265 / HEVC standard, and dashed arrows represent the additional 32 directions.
[0183] Note that a luminance block may be referenced in intra prediction of a chrominance block. That is, the chrominance component of the current block may be predicted based on the luminance component of the current block. This type of intra prediction is sometimes called CCLM (cross-component linear model) prediction. An intra prediction mode of a chrominance block that references such a luminance block (e.g., called a CCLM mode) may be added as one of the intra prediction modes for the chrominance block.
[0184] The intra prediction unit 124 may correct pixel values after intra prediction based on gradients of reference pixels in the horizontal / vertical directions. Intra prediction involving such correction is sometimes called PDPC (position dependent intra prediction combination). Information indicating whether PDPC is applied (e.g., called a PDPC flag) is signaled, for example, at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0185] [Inter prediction section] The inter prediction unit 126 generates a prediction signal (inter prediction signal) by performing inter prediction (also referred to as inter prediction) on the current block with reference to a reference picture stored in the frame memory 122 that is different from the current picture. The inter prediction is performed in units of the current block or sub-blocks (e.g., 4x4 blocks) within the current block. For example, the inter prediction unit 126 performs motion estimation on the current block or sub-block within the reference picture. The inter prediction unit 126 then generates an inter prediction signal for the current block or sub-block by performing motion compensation using motion information (e.g., a motion vector) obtained by the motion estimation. The inter prediction unit 126 then outputs the generated inter prediction signal to the prediction control unit 128.
[0186] The motion information used for motion compensation is signaled. For the signaling of the motion vector, a motion vector predictor may be used, i.e., the difference between the motion vector and the motion vector predictor may be signaled.
[0187] Note that an inter-prediction signal may be generated using not only the motion information of the current block obtained by motion estimation, but also the motion information of adjacent blocks. Specifically, an inter-prediction signal may be generated for each sub-block in the current block by weighting and adding a prediction signal based on the motion information obtained by motion estimation and a prediction signal based on the motion information of adjacent blocks. Such inter-prediction (motion compensation) may be called OBMC (overlapped block motion compensation).
[0188] In such an OBMC mode, information indicating the size of a sub-block for OBMC (e.g., called an OBMC block size) is signaled at the sequence level. Also, information indicating whether the OBMC mode is applied (e.g., called an OBMC flag) is signaled at the CU level. Note that the signaling level of this information is not limited to the sequence level and the CU level, and may be other levels (e.g., the picture level, slice level, tile level, CTU level, or sub-block level).
[0189] The OBMC mode will now be described in more detail. Figures 5B and 5C are a flowchart and a conceptual diagram for explaining an outline of the predictive image correction process using the OBMC process.
[0190] First, a predicted image (Pred) is obtained by normal motion compensation using a motion vector (MV) assigned to the block to be coded.
[0191] Next, the motion vector (MV_L) of the coded left adjacent block is applied to the block to be coded to obtain a predicted image (Pred_L), and the predicted image is weighted and superimposed with Pred_L to perform the first correction of the predicted image.
[0192] Similarly, the motion vector (MV_U) of the already coded upper adjacent block is applied to the block to be coded to obtain a predicted image (Pred_U), and the predicted image that has been corrected the first time is weighted and overlaid with Pred_U to perform a second correction of the predicted image, which is then used as the final predicted image.
[0193] Although a two-stage correction method using the left adjacent block and the upper adjacent block has been described here, it is also possible to configure a method in which correction is performed more than two times using the right adjacent block or the lower adjacent block.
[0194] The area to be superimposed does not have to be the pixel area of the entire block, but may be only a part of the area near the block boundary.
[0195] Although the process of correcting a predicted image from one reference picture has been described here, the process is similar when correcting a predicted image from multiple reference pictures. After obtaining corrected predicted images from each reference picture, the obtained predicted images are further superimposed to form the final predicted image.
[0196] The target block to be processed may be a prediction block unit or a sub-block unit obtained by further dividing the prediction block.
[0197] As a method for determining whether to apply OBMC processing, for example, there is a method using obmc_flag, which is a signal indicating whether to apply OBMC processing. As a specific example, an encoding device determines whether a block to be encoded belongs to an area with complex motion, and if it belongs to an area with complex motion, sets the value of obmc_flag to 1 and performs encoding by applying OBMC processing, and if it does not belong to an area with complex motion, sets the value of obmc_flag to 0 and performs encoding without applying OBMC processing. On the other hand, a decoding device decodes obmc_flag described in a stream, and switches whether to apply OBMC processing depending on the value, and performs decoding.
[0198] Alternatively, the motion information may be derived on the decoding device side without being signaled. For example, a merge mode defined in the H.265 / HEVC standard may be used. Alternatively, the motion information may be derived by performing motion estimation on the decoding device side. In this case, the motion estimation is performed without using pixel values of the current block.
[0199] Here, a mode in which motion estimation is performed on the decoding device side will be described. This mode in which motion estimation is performed on the decoding device side is sometimes called a pattern matched motion vector derivation (PMMVD) mode or a frame rate up-conversion (FRUC) mode.
[0200] An example of the FRUC process is shown in Figure 5D. First, a list of multiple candidates (which may be the same as the merge list) each having a predicted motion vector is generated by referring to the motion vectors of coded blocks spatially or temporally adjacent to the current block. Next, a best candidate MV is selected from the multiple candidate MVs registered in the candidate list. For example, an evaluation value of each candidate included in the candidate list is calculated, and one candidate is selected based on the evaluation value.
[0201] Then, a motion vector for the current block is derived based on the motion vector of the selected candidate. Specifically, for example, the motion vector of the selected candidate (best candidate MV) is derived as the motion vector for the current block as is. Also, for example, the motion vector for the current block may be derived by performing pattern matching in a peripheral area of a position in a reference picture corresponding to the motion vector of the selected candidate. That is, a search is performed in a similar manner in a peripheral area of the best candidate MV, and if an MV with a better evaluation value is found, the best candidate MV may be updated to the MV and used as the final MV for the current block. Note that a configuration may be adopted in which this process is not performed.
[0202] The same processing may be performed when processing is performed in units of sub-blocks.
[0203] The evaluation value is calculated by finding the difference between the reconstructed image and a predetermined area by pattern matching between the area in the reference picture corresponding to the motion vector. The evaluation value may be calculated using other information in addition to the difference.
[0204] As the pattern matching, first pattern matching or second pattern matching is used. The first pattern matching and second pattern matching are sometimes called bilateral matching and template matching, respectively.
[0205] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures that are along the motion trajectory of the current block. Therefore, in the first pattern matching, an area in another reference picture that is along the motion trajectory of the current block is used as a predetermined area for calculating the evaluation value of the candidate.
[0206] FIG. 6 is a diagram illustrating an example of pattern matching (bilateral matching) between two blocks along a motion trajectory. As shown in FIG. 6, in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the most closely matched pair of two blocks along the motion trajectory of a current block (Cur block) in two different reference pictures (Ref0, Ref1). Specifically, for the current block, a difference is derived between a reconstructed image at a specified position in a first coded reference picture (Ref0) specified by a candidate MV and a reconstructed image at a specified position in a second coded reference picture (Ref1) specified by a symmetric MV obtained by scaling the candidate MV by the display time interval, and an evaluation value is calculated using the obtained difference value. The candidate MV with the best evaluation value among multiple candidate MVs may be selected as the final MV.
[0207] Under the assumption of continuous motion trajectories, motion vectors (MV0, MV1) pointing to two reference blocks are proportional to the temporal distances (TD0, TD1) between a current picture (CurPic) and two reference pictures (Ref0, Ref1). For example, if the current picture is located between two reference pictures temporally and the temporal distances from the current picture to the two reference pictures are equal, the first pattern matching derives bidirectional motion vectors that are mirror-symmetric.
[0208] In the second pattern matching, pattern matching is performed between a template in the current picture (a block adjacent to the current block in the current picture (e.g., an upper and / or left adjacent block)) and a block in the reference picture. Therefore, in the second pattern matching, the block adjacent to the current block in the current picture is used as a predetermined area for calculating the evaluation value of the candidate.
[0209] 7 is a diagram illustrating an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. As shown in FIG. 7, in the second pattern matching, a motion vector of a current block is derived by searching a reference picture (Ref0) for a block that best matches a block adjacent to a current block (Cur block) in the current picture (Cur Pic). Specifically, a difference is derived between a reconstructed image of both or either of the coded areas adjacent to the left and / or above the current block and a reconstructed image at the same position in the coded reference picture (Ref0) specified by a candidate MV, an evaluation value is calculated using the obtained difference value, and the candidate MV with the best evaluation value among the multiple candidate MVs is selected as the best candidate MV.
[0210] Information indicating whether such a FRUC mode is applied (e.g., called an FRUC flag) is signaled at the CU level. Furthermore, when the FRUC mode is applied (e.g., when the FRUC flag is true), information indicating a pattern matching method (first pattern matching or second pattern matching) (e.g., called an FRUC mode flag) is signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., the sequence level, the picture level, the slice level, the tile level, the CTU level, or the sub-block level).
[0211] Here, we will explain a mode in which motion vectors are derived based on a model that assumes uniform linear motion. This mode is sometimes called BIO (bi-directional optical flow) mode.
[0212] FIG. 8 is a diagram for explaining a model assuming uniform linear motion. In FIG. 8, (v x ,v y) denotes a velocity vector, and τ0 and τ1 denote the temporal distance between the current picture (Cur Pic) and two reference pictures (Ref0 and Ref1), respectively. (MVx0,MVy0) denotes a motion vector corresponding to reference picture Ref0, and (MVx1,MVy1) denotes a motion vector corresponding to reference picture Ref1.
[0213] At this time, the velocity vector (v x ,v y ), (MVx0,MVy0) and (MVx1,MVy1) are respectively (v x τ0,v y τ0) and (-v x τ1,-v y τ1), and the following optical flow equation (1) holds:
[0214]
number
[0215] where I (k) denotes the luminance value of reference image k (k=0,1) after motion compensation. This optical flow equation indicates that the sum of (i) the time derivative of the luminance value, (ii) the product of the horizontal velocity and the horizontal component of the spatial gradient of the reference image, and (iii) the product of the vertical velocity and the vertical component of the spatial gradient of the reference image is equal to zero. Based on a combination of this optical flow equation and Hermite interpolation, block-wise motion vectors obtained from a merge list or the like are corrected pixel by pixel.
[0216] Note that the decoding device may derive motion vectors using a method other than that based on a model assuming constant-velocity linear motion. For example, a motion vector may be derived for each sub-block based on the motion vectors of multiple adjacent blocks.
[0217] Here, a mode in which a motion vector is derived for each sub-block based on the motion vectors of multiple neighboring blocks will be described. This mode is sometimes called an affine motion compensation prediction mode.
[0218] FIG. 9A is a diagram for explaining the derivation of motion vectors for each sub-block based on the motion vectors of multiple adjacent blocks. In FIG. 9A, the current block includes 16 4x4 sub-blocks. Here, the motion vector v0 of the upper left corner control point of the current block is derived based on the motion vectors of the adjacent blocks, and the motion vector v1 of the upper right corner control point of the current block is derived based on the motion vectors of the adjacent sub-blocks. Then, using the two motion vectors v0 and v1, the motion vector (v x ,v y ) is derived.
[0219]
number
[0220] Here, x and y respectively indicate the horizontal and vertical positions of the sub-block, and w indicates a predetermined weighting coefficient.
[0221] Such an affine motion compensation prediction mode may include several modes in which the methods of deriving the motion vectors of the upper-left and upper-right corner control points are different. Information indicating such an affine motion compensation prediction mode (e.g., called an affine flag) is signaled at the CU level. Note that the signaling of the information indicating this affine motion compensation prediction mode does not need to be limited to the CU level, and may be at other levels (e.g., the sequence level, the picture level, the slice level, the tile level, the CTU level, or the sub-block level).
[0222] [Predictive control unit] The prediction control unit 128 selects either the intra-prediction signal or the inter-prediction signal, and outputs the selected signal to the subtraction unit 104 and the addition unit 116 as a prediction signal.
[0223] Here, an example of deriving a motion vector for a picture to be coded in merge mode will be described. Fig. 9B is a diagram for explaining an overview of the motion vector derivation process in merge mode.
[0224] First, a prediction MV list is generated in which prediction MV candidates are registered. The prediction MV candidates include spatially adjacent prediction MVs, which are MVs held by multiple coded blocks spatially located around the block to be coded, temporally adjacent prediction MVs, which are MVs held by blocks in the vicinity of the block to be coded projected onto the coded reference picture, joint prediction MVs, which are MVs generated by combining the MV values of the spatially adjacent prediction MVs and the temporally adjacent prediction MVs, and zero prediction MVs, which are MVs with a value of zero.
[0225] Next, one prediction MV is selected from the plurality of prediction MVs registered in the prediction MV list, and is determined as the MV for the block to be coded.
[0226] Furthermore, the variable length coding unit encodes the stream by describing merge_idx, which is a signal indicating which predicted MV has been selected.
[0227] Note that the predicted MVs registered in the predicted MV list described in Figure 9B are just an example, and the number may be different from the number shown in the figure, the configuration may not include some of the types of predicted MVs shown in the figure, or the configuration may include predicted MVs other than the types of predicted MVs shown in the figure.
[0228] The final MV may be determined by performing the DMVR process, which will be described later, using the MV of the block to be coded derived in the merge mode.
[0229] Here, an example of determining the MV using the DMVR process will be described.
[0230] FIG. 9C is a conceptual diagram for explaining an outline of the DMVR process.
[0231] First, the optimal MVP set for the block to be processed is set as a candidate MV, and reference pixels are obtained from the first reference picture, which is a processed picture in the L0 direction, and the second reference picture, which is a processed picture in the L1 direction, according to the candidate MV, and a template is generated by averaging each reference pixel.
[0232] Next, the template is used to search the surrounding areas of the candidate MVs in the first and second reference pictures, and the MV with the smallest cost is determined as the final MV. The cost value is calculated using the difference between each pixel value of the template and each pixel value of the search area, the MV value, etc.
[0233] The outline of the processing described here is basically the same for the encoding device and the decoding device.
[0234] Note that other processing may be used instead of the processing described here, as long as it is processing that can search the vicinity of the candidate MV and derive the final MV.
[0235] Here, a mode for generating a predicted image using LIC processing will be described.
[0236] FIG. 9D is a diagram for explaining an outline of a predicted image generation method using luminance correction processing by LIC processing.
[0237] First, an MV for obtaining a reference image corresponding to a block to be coded is derived from a reference picture that is a coded picture.
[0238] Next, for the block to be coded, the luminance pixel values of the coded surrounding reference areas adjacent to the left and above and the luminance pixel values at the equivalent positions in the reference picture specified by the MV are used to extract information indicating how the luminance values have changed between the reference picture and the picture to be coded, and a luminance correction parameter is calculated.
[0239] A predicted image for the block to be coded is generated by performing luminance correction processing on a reference image in a reference picture specified by the MV using the luminance correction parameters.
[0240] The shape of the peripheral reference region in FIG. 9D is an example, and other shapes may be used.
[0241] Although the process of generating a predicted image from one reference picture has been described here, the process is similar when generating a predicted image from multiple reference pictures, and a luminance correction process is performed in a similar manner on the reference images obtained from each reference picture before generating a predicted image.
[0242] As a method for determining whether to apply LIC processing, for example, there is a method using lic_flag, which is a signal indicating whether to apply LIC processing. As a specific example, an encoding device determines whether the encoding target block belongs to an area where a luminance change occurs, and if it belongs to an area where a luminance change occurs, sets the value of lic_flag to 1 and performs encoding by applying LIC processing, and if it does not belong to an area where a luminance change occurs, sets the value of lic_flag to 0 and performs encoding without applying LIC processing. On the other hand, a decoding device decodes lic_flag described in the stream, and switches whether to apply LIC processing depending on the value, and performs decoding.
[0243] As another method for determining whether to apply LIC processing, for example, there is also a method for determining whether LIC processing has been applied to surrounding blocks.As a specific example, when the block to be coded is in merge mode, it is determined whether the surrounding coded blocks selected when deriving MV in merge mode processing have been coded using LIC processing, and depending on the result, whether to apply LIC processing is switched and coded.In addition, in this example, the process in decoding is exactly the same.
[0244] [Overview of the decoding device] Next, an overview will be given of a decoding device capable of decoding the coded signal (coded bitstream) output from the above coding device 100. Fig. 10 is a block diagram showing the functional configuration of a decoding device 200 according to Embodiment 1. The decoding device 200 is a video / image decoding device that decodes video / images on a block-by-block basis.
[0245] As shown in FIG. 10, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220.
[0246] The decoding device 200 is realized by, for example, a general-purpose processor and memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. Alternatively, the decoding device 200 may be realized as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0247] Each component included in the decoding device 200 will be described below.
[0248] [Entropy Decoding] The entropy decoding unit 202 entropy-decodes the coded bitstream. Specifically, the entropy decoding unit 202 arithmetically decodes the coded bitstream into a binary signal. The entropy decoding unit 202 then debinarizes the binary signal. As a result, the entropy decoding unit 202 outputs quantized coefficients to the inverse quantization unit 204 on a block-by-block basis.
[0249] [Dequantization section] The inverse quantization unit 204 inverse quantizes the quantized coefficients of a block to be decoded (hereinafter referred to as a current block) that is input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inverse quantizes each quantized coefficient of the current block based on a quantization parameter corresponding to the quantized coefficient. The inverse quantization unit 204 then outputs the inverse quantized coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.
[0250] [Inverse conversion section] The inverse transform unit 206 restores the prediction error by inverse transforming the transform coefficients input from the inverse quantization unit 204 .
[0251] For example, if the information interpreted from the encoded bitstream indicates that EMT or AMT is to be applied (e.g., the AMT flag is true), the inverse transform unit 206 inverse transforms the transform coefficients of the current block based on the interpreted information indicating the transform type.
[0252] Also, for example, if the information decoded from the coded bitstream indicates that NSST is to be applied, then inverse transform unit 206 applies an inverse re-transform to the transform coefficients.
[0253] [Addition section] The adder 208 reconstructs the current block by adding the prediction error input from the inverse transformer 206 and the prediction sample input from the prediction control unit 220. The adder 208 then outputs the reconstructed block to the block memory 210 and the loop filter unit 212.
[0254] [Block Memory] The block memory 210 is a storage unit for storing blocks that are referenced in intra prediction and are in a picture to be decoded (hereinafter referred to as a current picture). Specifically, the block memory 210 stores the reconstructed blocks output from the adder 208.
[0255] [Loop filter section] The loop filter unit 212 applies a loop filter to the block reconstructed by the adder unit 208, and outputs the filtered reconstructed block to a frame memory 214, a display device, or the like.
[0256] If the information indicating ALF on / off read from the encoded bitstream indicates that ALF is on, one filter is selected from multiple filters based on the local gradient direction and activity, and the selected filter is applied to the reconstructed block.
[0257] [Frame memory] The frame memory 214 is a storage unit for storing reference pictures used in inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 214 stores the reconstructed blocks filtered by the loop filter unit 212.
[0258] [Intra prediction section] The intra prediction unit 216 generates a prediction signal (intra prediction signal) by performing intra prediction based on the intra prediction mode interpreted from the encoded bitstream, by referring to blocks in the current picture stored in the block memory 210. Specifically, the intra prediction unit 216 generates the intra prediction signal by performing intra prediction by referring to samples (e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 220.
[0259] Note that when an intra prediction mode that references a luminance block in intra prediction of a chrominance block is selected, the intra prediction unit 216 may predict the chrominance component of the current block based on the luminance component of the current block.
[0260] Furthermore, when information interpreted from the coded bitstream indicates the application of PDPC, the intra prediction unit 216 corrects pixel values after intra prediction based on the gradients of reference pixels in the horizontal and vertical directions.
[0261] [Inter prediction section] The inter prediction unit 218 predicts the current block by referring to a reference picture stored in the frame memory 214. The prediction is performed in units of the current block or sub-blocks (e.g., 4x4 blocks) within the current block. For example, the inter prediction unit 218 generates an inter prediction signal for the current block or sub-block by performing motion compensation using motion information (e.g., motion vectors) interpreted from the coded bitstream, and outputs the inter prediction signal to the prediction control unit 220.
[0262] In addition, if the information interpreted from the encoded bitstream indicates that the OBMC mode is to be applied, the inter prediction unit 218 generates an inter prediction signal using not only the motion information of the current block obtained by motion search, but also the motion information of adjacent blocks.
[0263] Furthermore, if the information interpreted from the coded bitstream indicates that the FRUC mode is to be applied, the inter prediction unit 218 derives motion information by performing motion search according to the pattern matching method (bilateral matching or template matching) interpreted from the coded bitstream. Then, the inter prediction unit 218 performs motion compensation using the derived motion information.
[0264] Furthermore, when the BIO mode is applied, the inter prediction unit 218 derives a motion vector based on a model assuming constant-velocity linear motion. Furthermore, when information interpreted from the coded bitstream indicates that the affine motion compensation prediction mode is to be applied, the inter prediction unit 218 derives a motion vector for each sub-block based on the motion vectors of multiple adjacent blocks.
[0265] [Predictive control unit] The prediction control unit 220 selects either the intra-prediction signal or the inter-prediction signal, and outputs the selected signal to the addition unit 208 as a prediction signal.
[0266] [First mode of encoding and decoding] 11 shows an encoding method and an encoding process performed by the encoding device 100 according to the first aspect. Note that the decoding method and the decoding process performed by the decoding device 200 are basically the same as the encoding method and the encoding process performed by the encoding device 100. In the following description, "encoding" in the encoding method and the encoding process may be replaced with "decoding" in the decoding method and the decoding process.
[0267] First, the encoding device 100 divides an image block into a plurality of partitions (S101).
[0268] The division may be four-way, two-way, three-way, or diagonal division as shown in Figure 12A, Figure 12B, Figure 12C, Figure 12D, Figure 12E, Figure 12F, Figure 12G, Figure 12H, Figure 12I, or Figure 12J. The division is not limited to any of these divisions, and these divisions may be freely combined.
[0269] The partition may also be a partition as shown in Figure 13A, Figure 13B, Figure 13C, Figure 13D or Figure 13E. Specifically, the partition may be a rectangular partition, a non-rectangular partition, a triangular partition, an L-shaped partition, a pentagonal partition, a hexagonal partition or a polygonal partition.
[0270] Next, encoding apparatus 100 creates a motion vector candidate list for a partition included in the plurality of partitions (S102). The motion vector candidate list may include at least one of a plurality of motion vectors for a plurality of spatially adjacent partitions, a plurality of motion vectors for a plurality of temporally adjacent partitions, and a plurality of motion vectors for a plurality of sub-partitions.
[0271] A spatially adjacent partition is a partition that is spatially adjacent to a partition, and may be a partition that is located above, to the left, to the right, below, above left, above right, below left, or below right of the partition.
[0272] A temporally adjacent partition is a partition that is temporally adjacent to a partition. A temporally adjacent partition may be a co-located partition that corresponds to the location of the partition in the partition's reference picture. This reference picture may be a picture different from the current picture containing the partition, and may be a picture immediately before or after the current picture. For example, the spatial location of the co-located partition is the same as the location of the partition in the current picture. Alternatively, the spatial location of the temporally adjacent partition in the reference picture may be different from the spatial location of the partition in the current picture.
[0273] The motion vectors for the subpartitions include motion vectors predicted from motion vectors for subpartitions spatially or temporally adjacent to each subpartition, and are obtained by a sub-CU-based motion vector prediction process, which may be advanced temporal motion vector prediction (ATMVP) or spatio-temporal motion vector prediction (STMVP).
[0274] 14 shows an example of ATMVP processing. First, encoding device 100 divides an image block into a plurality of M×N sub-blocks (S201). Basically, M and N are smaller than the width and height of the image block, respectively. M may or may not be equal to N. For example, M and N correspond to the number of pixels in the horizontal direction and the number of pixels in the vertical direction of the image block, respectively.
[0275] Specifically, M may be 4. Also, M may be 1 / 8 the width of the image block, or 1 / K (K is a positive integer) of the width of the image block. Similarly, N may be 4. Also, N may be 1 / 8 the height of the image block, or 1 / K (K is a positive integer) of the height of the image block.
[0276] The encoding device 100 determines a corresponding block for the image block (S202). The corresponding block is indicated by a motion vector derived from a spatially neighboring block of the image block, as shown in Fig. 15. Then, the encoding device 100 derives a motion vector for each MxN sub-block from the motion information of the corresponding block, as shown in Fig. 16 (S203).
[0277] 17 shows an example of STMVP processing. First, encoding device 100 divides an image block into a plurality of M×N sub-blocks (S301). Basically, M and N are smaller than the width and height of the image block, respectively. M may or may not be equal to N. For example, M and N correspond to the number of pixels in the horizontal direction and the number of pixels in the vertical direction of the image block, respectively.
[0278] Specifically, M may be 4. Also, M may be 1 / 8 the width of the image block, or 1 / K (K is a positive integer) of the width of the image block. Similarly, N may be 4. Also, N may be 1 / 8 the height of the image block, or 1 / K (K is a positive integer) of the height of the image block.
[0279] The encoding device 100 obtains three motion vectors for each M×N subblock (S302). Two of the three motion vectors are obtained from spatially adjacent blocks of the M×N subblock, and one of the three motion vectors is obtained from a temporally adjacent block of the M×N subblock. The encoding device 100 derives a motion vector for each M×N subblock by averaging these three motion vectors (S303).
[0280] For example, the motion vector candidate list for a partition is the same as the motion vector candidate list created for an image block in a given prediction mode, such as merge mode or inter prediction mode.
[0281] The encoding device 100 also determines whether the partition is a triangular partition (S103). If the partition is not a triangular partition (No in S103), the encoding device 100 performs the first method (S104). If the partition is a triangular partition (Yes in S103), the encoding device 100 performs the second method (S105).
[0282] In the first method, the encoding device 100 performs a first inter prediction process on a partition using a first motion vector in the motion vector candidate list (S104). For example, the first inter prediction process includes a motion compensation process, a decoding-side motion vector refinement process (DMVR), and a bidirectional optical flow process (BIO).
[0283] When DMVR processing is performed, the encoding device 100 obtains a predicted image for the partition using a motion vector for the partition. Then, the encoding device 100 obtains a new motion vector for the partition by, for example, performing motion search using the predicted image for the partition. Then, the encoding device 100 obtains a new predicted image for the partition using the new motion vector for the partition as a final predicted image for the partition.
[0284] When DMVR processing is not performed, the encoding apparatus 100 obtains a final predicted image for the partition using a normal motion vector for the partition, rather than using a new motion vector for the partition. For example, the normal motion vector may be a motion vector selected from the motion vector candidate list.
[0285] 18 shows an example of DMVR processing. The encoding device 100 determines whether an image block has two motion vectors, a first motion vector and a second motion vector (S401). For example, if the image block does not have two motion vectors, a first motion vector and a second motion vector, the encoding device 100 derives a predictive block using one motion vector and encodes the image block using the derived predictive block.
[0286] On the other hand, when the image block has two motion vectors, a first motion vector and a second motion vector, the encoding apparatus 100 derives a first prediction block and a second prediction block using the first motion vector and the second motion vector.
[0287] For example, if the first motion vector points to a first reference picture and the second motion vector points to a second reference picture, the encoding apparatus 100 predicts a first prediction block using the first motion vector and the first reference picture, and predicts a second prediction block using the second motion vector and the second reference picture (S402).
[0288] Next, the encoding device 100 performs weighting processing on the first predicted block and the second predicted block to derive a template block as a result of the weighting processing (S403). Here, the weighting processing is weighted averaging, weighted addition, or the like.
[0289] Next, the encoding device 100 derives a third motion vector by performing a motion search process using the template block and the first reference picture. Similarly, the encoding device 100 derives a fourth motion vector by performing a motion search process using the template block and the second reference picture (S404). Here, the motion search process is a process of searching for a motion vector by searching for a similar block using block matching or the like.
[0290] Next, the encoding apparatus 100 predicts a third prediction block using the third motion vector and the first reference picture. Similarly, the encoding apparatus 100 predicts a fourth prediction block using the fourth motion vector and the second reference picture (S405).
[0291] Next, the encoding device 100 performs weighting processing on the third predicted block and the fourth predicted block (S406).
[0292] As described above, the DMVR process is performed. Then, for example, the encoding device 100 encodes the image block using the result of the weighting process (S407).
[0293] The DMVR process is not limited to the above process, and may be any process that determines a final motion vector by motion search based on the determined motion vector and a coded reference picture. For example, the final motion vector may be searched for by cost evaluation using the difference value between the first predicted block and the second predicted block without creating a template block.
[0294] Furthermore, as described above, when the partition is a triangular partition, the encoding device 100 performs a second method (S105). In the second method, the encoding device 100 performs a second inter prediction process on the partition using a second motion vector in the motion vector candidate list.
[0295] For example, the second motion vector may be different from the motion vector for the sub-partition. That is, the second motion vector may be different from the motion vector derived in the sub-CU-based motion vector prediction process. Furthermore, the second inter prediction process may include motion compensation processing but not DMVR processing. The second inter prediction process may include motion compensation processing and BIO processing but may not include DMVR processing.
[0296] Finally, the encoding device 100 encodes the image block using the result of the inter prediction process on the partition (S106). For example, the encoding device 100 performs the inter prediction process to obtain a predicted image as a result of the inter prediction process. Then, the encoding device 100 encodes the image block using the predicted image.
[0297] The encoding device 100 may perform the above-described processes (S102 to S105) for each of the plurality of partitions, and may encode the image block using the plurality of results of the inter prediction process for the plurality of partitions.
[0298] The encoding device 100 may encode a flag indicating whether the image block is divided into multiple partitions, including triangular partitions. This flag may also be expressed as a partitioning parameter. For example, the flag indicates that the image block is divided into multiple partitions, including triangular partitions, when it is 1, and indicates that the image block is not divided into multiple partitions, including triangular partitions, when it is 0.
[0299] The flag may be a triangle flag indicating whether or not a triangle mode is in which an image block is divided into a plurality of partitions including triangular partitions, a motion vector is derived for each partition, and motion compensation is performed for each partition.
[0300] For example, in triangle mode, an image block is divided into multiple triangular partitions, a candidate motion vector list is generated for each triangular partition, and motion compensation processing for each triangular partition is performed using a motion vector predicted from the candidate motion vector list. Then, prediction processing for the image block is performed by combining multiple predicted images of the multiple triangular partitions, and the image block is then coded based on the result of the prediction processing.
[0301] The flag may be coded with the same flag as flags related to other prediction modes. For example, a first value of the flag may indicate that the image block is coded in merge mode, and a second value different from the first value may indicate that the image block is coded in triangle mode. The flag may also indicate how the image block is divided.
[0302] If the flag indicates that the image block is to be divided into a plurality of partitions including triangular partitions, the encoding device 100 divides the image block into a plurality of partitions including triangular partitions and encodes the divided image block.
[0303] On the other hand, if the flag indicates that the image block is not divided into multiple partitions, including triangular partitions, the encoding device 100 encodes the image block without dividing it into multiple partitions, including triangular partitions. In this case, the encoding device 100 may encode the image block without dividing it, or may encode the image block by dividing it into multiple rectangular partitions.
[0304] 19, the encoding device 100 may encode the flag based on the determination result. In this example, the encoding device 100 first acquires parameters of the image block (S501). The parameters of the image block may be at least one of the width of the image block, the height of the image block, and the ratio of the width to the height of the image block. This parameter may also be expressed as a size parameter.
[0305] Next, the encoding device 100 determines whether the parameter is equal to or greater than the first threshold and equal to or less than the second threshold (S502). If the parameter is equal to or greater than the first threshold and equal to or less than the second threshold (Yes in S502), the encoding device 100 encodes the image block with a flag (S503). The first threshold is equal to or less than the second threshold. Furthermore, the first threshold and the second threshold are basically equal to or greater than 0.
[0306] If the parameter is not greater than or equal to the first threshold and less than or equal to the second threshold (No in S503), that is, if the parameter is smaller than the first threshold or greater than the second threshold, the encoding device 100 encodes the image block without a flag (S504). Alternatively, if the parameter is not greater than or equal to the first threshold and less than or equal to the second threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into multiple partitions, including triangular partitions.
[0307] The first threshold may be the reciprocal of the second threshold. The first threshold may also be a positive integer or a positive fraction. Similarly, the second threshold may also be a positive integer or a positive fraction.
[0308] For example, the parameter is the ratio of the width to the height of the image block. The first threshold is the reciprocal of the second threshold. If the ratio of the width to the height of the image block is equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0309] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The first threshold and the second threshold are each a positive integer. If both the width and height of the image block are equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0310] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The first threshold and the second threshold are each a positive integer. If at least one of the width and height of the image block is equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0311] Furthermore, for example, two parameters, a first parameter and a second parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the ratio of the width to the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0312] If the first parameter is greater than or equal to the first threshold and less than or equal to the second threshold, and the second parameter is greater than or equal to the third threshold and less than or equal to the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0313] Also, for example, two parameters, a first parameter and a second parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is equal to or less than the fourth threshold.
[0314] If the first parameter is greater than or equal to the first threshold and less than or equal to the second threshold, and the second parameter is greater than or equal to the third threshold and less than or equal to the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0315] Also, for example, three parameters, a first parameter, a second parameter, and a third parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, the second parameter is the height of the image block, and the third parameter is the ratio of the width to the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0316] If both the first parameter and the second parameter are equal to or greater than the first threshold and equal to or less than the second threshold, and the third parameter is equal to or greater than the third threshold and equal to or less than the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0317] 20, the encoding device 100 may encode the flag based on the determination result. In this example, the encoding device 100 first acquires parameters of the image block (S601). The parameters of the image block may be at least one of the width of the image block, the height of the image block, and the ratio of the width to the height of the image block. This parameter may also be expressed as a size parameter.
[0318] Next, the encoding device 100 determines whether the parameter is equal to or greater than a threshold (S602). If the parameter is equal to or greater than the threshold (Yes in S602), the encoding device 100 codes the image block with a flag attached (S603). Basically, the threshold is equal to or greater than 0.
[0319] If the parameter is not greater than or equal to the threshold (No in S602), that is, if the parameter is less than the threshold, the encoding device 100 encodes the image block without a flag (S604). Alternatively, if the parameter is not greater than or equal to the threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into multiple partitions, including triangular partitions.
[0320] For example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The threshold is a positive integer. If both the width and height of the image block are equal to or greater than the threshold, the encoding device 100 encodes the image block with a flag (S603). Otherwise, the encoding device 100 encodes the image block without a flag (S604).
[0321] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The threshold is a positive integer. If at least one of the width and height of the image block is equal to or greater than the threshold, the encoding device 100 encodes the image block with a flag (S603). Otherwise, the encoding device 100 encodes the image block without a flag (S604).
[0322] Also, for example, the parameter is the width of the image block. The threshold is a positive integer. If the width of the image block is equal to or greater than the threshold, the encoding device 100 codes the image block with a flag (S603). If not, the encoding device 100 codes the image block without a flag (S604).
[0323] When encoding an image block without a flag, the encoding device 100 may encode the image block without dividing it, or may divide it into a plurality of rectangular partitions and encode it.
[0324] In this manner, the inter-prediction process for triangle partitions is simplified, thus reducing the complexity in software and hardware.
[0325] [Second mode of encoding and decoding] 21 shows an encoding method and an encoding process performed by the encoding device 100 according to the second aspect. Note that the decoding method and the decoding process performed by the decoding device 200 are basically the same as the encoding method and the encoding process performed by the encoding device 100. In the following description, "encoding" in the encoding method and the encoding process may be replaced with "decoding" in the decoding method and the decoding process.
[0326] First, the encoding device 100 divides an image block into a plurality of partitions (S701).
[0327] The division may be four-way, two-way, three-way, or diagonal division as shown in Figure 12A, Figure 12B, Figure 12C, Figure 12D, Figure 12E, Figure 12F, Figure 12G, Figure 12H, Figure 12I, or Figure 12J. The division is not limited to any of these divisions, and these divisions may be freely combined.
[0328] The partition may also be a partition as shown in Figure 13A, Figure 13B, Figure 13C, Figure 13D or Figure 13E. Specifically, the partition may be a rectangular partition, a non-rectangular partition, a triangular partition, an L-shaped partition, a pentagonal partition, a hexagonal partition or a polygonal partition.
[0329] Next, encoding apparatus 100 creates a motion vector candidate list for a partition included in the plurality of partitions (S702). The motion vector candidate list may include at least one of a plurality of motion vectors for a plurality of spatially adjacent partitions, a plurality of motion vectors for a plurality of temporally adjacent partitions, and a plurality of motion vectors for a plurality of sub-partitions.
[0330] A spatially adjacent partition is a partition that is spatially adjacent to a partition, and may be a partition that is located above, to the left, to the right, below, above left, above right, below left, or below right of the partition.
[0331] A temporally adjacent partition is a partition that is temporally adjacent to a partition. A temporally adjacent partition may be a co-located partition that corresponds to the location of the partition in the partition's reference picture. This reference picture may be a different picture from the current picture containing the partition, and may be a picture immediately before or after the current picture. For example, the spatial location of the co-located partition is the same as the location of the partition in the current picture.
[0332] The motion vectors for the subpartitions include motion vectors predicted from motion vectors for subpartitions spatially or temporally adjacent to each subpartition, and are obtained by a sub-CU-based motion vector prediction process, which may be ATMVP or STMVP.
[0333] For example, the motion vector candidate list for a partition is the same as the motion vector candidate list created for an image block in a given prediction mode, such as merge mode or inter prediction mode.
[0334] The encoding device 100 also determines whether the partition is a triangular partition (S703). If the partition is not a triangular partition (No in S703), the encoding device 100 performs the first method (S704 and S705). If the partition is a triangular partition (Yes in S703), the encoding device 100 performs the second method (S706 and S707).
[0335] In the first method, the encoding device 100 selects a first motion vector for a partition from the motion vector candidate list (S704). Then, the encoding device 100 performs a first inter prediction process on the partition using the first motion vector (S705). The first inter prediction process includes a motion compensation process.
[0336] For example, the first inter prediction process may include an OBMC process, or the first inter prediction process may include a DMVR process, a BIO process, and an OBMC process.
[0337] In the second method, the encoding device 100 selects a second motion vector for the partition from the motion vector candidate list that is not based on a subpartition (S706). For example, the second motion vector that is not based on a subpartition is a motion vector that is not derived from a sub-CU-based motion vector prediction process. Then, the encoding device 100 performs a second inter prediction process for the partition using the second motion vector (S707). The second inter prediction process includes a motion compensation process.
[0338] For example, the second inter prediction process may be the same as the first inter prediction process. Alternatively, the second inter prediction process may include BIO processing but not DMVR processing.
[0339] Finally, the encoding device 100 encodes the image block using the result of the inter prediction process on the partition (S708). For example, the encoding device 100 performs the inter prediction process to obtain a predicted image as a result of the inter prediction process. Then, the encoding device 100 encodes the image block using the predicted image.
[0340] The encoding device 100 may perform the above-described processes (S702 to S707) for each of the plurality of partitions, and may encode the image block using the plurality of results of the inter prediction processes for the plurality of partitions.
[0341] The encoding device 100 may encode a flag indicating whether the image block is divided into multiple partitions, including triangular partitions. This flag may also be expressed as a partitioning parameter. For example, the flag indicates that the image block is divided into multiple partitions, including triangular partitions, when it is 1, and indicates that the image block is not divided into multiple partitions, including triangular partitions, when it is 0.
[0342] If the flag indicates that the image block is to be divided into a plurality of partitions including triangular partitions, the encoding device 100 divides the image block into a plurality of partitions including triangular partitions and encodes the divided image block.
[0343] On the other hand, if the flag indicates that the image block is not divided into multiple partitions, including triangular partitions, the encoding device 100 encodes the image block without dividing it into multiple partitions, including triangular partitions. In this case, the encoding device 100 may encode the image block without dividing it, or may encode the image block by dividing it into multiple rectangular partitions.
[0344] 19, the encoding device 100 may encode the flag based on the determination result. In this example, the encoding device 100 first acquires parameters of the image block (S501). The parameters of the image block may be at least one of the width of the image block, the height of the image block, and the ratio of the width to the height of the image block. This parameter may also be expressed as a size parameter.
[0345] Next, the encoding device 100 determines whether the parameter is equal to or greater than the first threshold and equal to or less than the second threshold (S502). If the parameter is equal to or greater than the first threshold and equal to or less than the second threshold (Yes in S502), the encoding device 100 encodes the image block with a flag (S503). The first threshold is equal to or less than the second threshold. Furthermore, the first threshold and the second threshold are basically equal to or greater than 0.
[0346] If the parameter is not greater than or equal to the first threshold and less than or equal to the second threshold (No in S503), that is, if the parameter is smaller than the first threshold or greater than the second threshold, the encoding device 100 encodes the image block without a flag (S504). Alternatively, if the parameter is not greater than or equal to the first threshold and less than or equal to the second threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into multiple partitions, including triangular partitions.
[0347] The first threshold may be the reciprocal of the second threshold. The first threshold may also be a positive integer or a positive fraction. Similarly, the second threshold may also be a positive integer or a positive fraction.
[0348] For example, the parameter is the ratio of the width to the height of the image block. The first threshold is the reciprocal of the second threshold. If the ratio of the width to the height of the image block is equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0349] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The first threshold and the second threshold are each a positive integer. If both the width and height of the image block are equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0350] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The first threshold and the second threshold are each a positive integer. If at least one of the width and height of the image block is equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0351] Furthermore, for example, two parameters, a first parameter and a second parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the ratio of the width to the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0352] If the first parameter is greater than or equal to the first threshold and less than or equal to the second threshold, and the second parameter is greater than or equal to the third threshold and less than or equal to the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0353] Also, for example, two parameters, a first parameter and a second parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is equal to or less than the fourth threshold.
[0354] If the first parameter is greater than or equal to the first threshold and less than or equal to the second threshold, and the second parameter is greater than or equal to the third threshold and less than or equal to the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0355] Also, for example, three parameters, a first parameter, a second parameter, and a third parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, the second parameter is the height of the image block, and the third parameter is the ratio of the width to the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0356] If both the first parameter and the second parameter are equal to or greater than the first threshold and equal to or less than the second threshold, and the third parameter is equal to or greater than the third threshold and equal to or less than the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0357] 20, the encoding device 100 may encode the flag based on the determination result. In this example, the encoding device 100 first acquires parameters of the image block (S601). The parameters of the image block may be at least one of the width of the image block, the height of the image block, and the ratio of the width to the height of the image block. This parameter may also be expressed as a size parameter.
[0358] Next, the encoding device 100 determines whether the parameter is equal to or greater than a threshold (S602). If the parameter is equal to or greater than the threshold (Yes in S602), the encoding device 100 codes the image block with a flag attached (S603). Basically, the threshold is equal to or greater than 0.
[0359] If the parameter is not greater than or equal to the threshold (No in S602), that is, if the parameter is less than the threshold, the encoding device 100 encodes the image block without a flag (S604). Alternatively, if the parameter is not greater than or equal to the threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into multiple partitions, including triangular partitions.
[0360] For example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The threshold is a positive integer. If both the width and height of the image block are equal to or greater than the threshold, the encoding device 100 encodes the image block with a flag (S603). Otherwise, the encoding device 100 encodes the image block without a flag (S604).
[0361] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The threshold is a positive integer. If at least one of the width and height of the image block is equal to or greater than the threshold, the encoding device 100 encodes the image block with a flag (S603). Otherwise, the encoding device 100 encodes the image block without a flag (S604).
[0362] Also, for example, the parameter is the width of the image block. The threshold is a positive integer. If the width of the image block is equal to or greater than the threshold, the encoding device 100 codes the image block with a flag (S603). If not, the encoding device 100 codes the image block without a flag (S604).
[0363] When encoding an image block without a flag, the encoding device 100 may encode the image block without dividing it, or may divide it into a plurality of rectangular partitions and encode it.
[0364] In this embodiment, the motion vector prediction process for the triangular partitions is simplified and the amount of calculation is reduced.
[0365] Note that the encoding device 100 may generate a motion vector candidate list after determining whether the partition is a triangular partition. For example, if the partition is not a triangular partition, the encoding device 100 may generate a motion vector candidate list that includes motion vectors based on subpartitions. If the partition is a triangular partition, the encoding device 100 may generate a motion vector candidate list that does not include motion vectors based on subpartitions.
[0366] In this way, when the partition is not a triangular partition, the encoding device 100 can select a first motion vector from a motion vector candidate list that includes a motion vector based on a subpartition, and when the partition is a triangular partition, the encoding device 100 can select a second motion vector that is not based on a subpartition from a motion vector candidate list that does not include a motion vector based on a subpartition.
[0367] [Third aspect of encoding and decoding] 22 shows an encoding method and an encoding process performed by the encoding device 100 according to the third aspect. Note that the decoding method and the decoding process performed by the decoding device 200 are basically the same as the encoding method and the encoding process performed by the encoding device 100. In the following description, "encoding" in the encoding method and the encoding process may be replaced with "decoding" in the decoding method and the decoding process.
[0368] First, the encoding device 100 divides an image block into a plurality of partitions (S801).
[0369] The division may be four-way, two-way, three-way, or diagonal division as shown in Figure 12A, Figure 12B, Figure 12C, Figure 12D, Figure 12E, Figure 12F, Figure 12G, Figure 12H, Figure 12I, or Figure 12J. The division is not limited to any of these divisions, and these divisions may be freely combined.
[0370] The partition may also be a partition as shown in Figure 13A, Figure 13B, Figure 13C, Figure 13D or Figure 13E. Specifically, the partition may be a rectangular partition, a non-rectangular partition, a triangular partition, an L-shaped partition, a pentagonal partition, a hexagonal partition or a polygonal partition.
[0371] Next, encoding apparatus 100 creates a motion vector candidate list for a partition included in the plurality of partitions (S802). The motion vector candidate list may include at least one of a plurality of motion vectors for a plurality of spatially adjacent partitions, a plurality of motion vectors for a plurality of temporally adjacent partitions, and a plurality of motion vectors for a plurality of sub-partitions.
[0372] A spatially adjacent partition is a partition that is spatially adjacent to a partition, and may be a partition that is located above, to the left, to the right, below, above left, above right, below left, or below right of the partition.
[0373] A temporally adjacent partition is a partition that is temporally adjacent to a partition. A temporally adjacent partition may be a co-located partition that corresponds to the location of the partition in the partition's reference picture. This reference picture may be a different picture from the current picture containing the partition, and may be a picture immediately before or after the current picture. For example, the spatial location of the co-located partition is the same as the location of the partition in the current picture.
[0374] The motion vectors for the subpartitions include motion vectors predicted from motion vectors for subpartitions spatially or temporally adjacent to each subpartition, and are obtained by a sub-CU-based motion vector prediction process, which may be ATMVP or STMVP.
[0375] For example, the motion vector candidate list for a partition is the same as the motion vector candidate list created for an image block in a given prediction mode, such as merge mode or inter prediction mode.
[0376] The encoding device 100 also determines whether the partition is a triangular partition (S803). If the partition is not a triangular partition (No in S803), the encoding device 100 performs the first method (S804). If the partition is a triangular partition (Yes in S803), the encoding device 100 performs the second method (S805).
[0377] In the first method, the encoding device 100 performs a first inter prediction process on a partition using a motion vector in the motion vector candidate list (S804). For example, the first inter prediction process includes a motion compensation process and a DMVR process. The first inter prediction process may or may not include a BIO process.
[0378] For example, the predicted image obtained for a partition by the first method is the same as the portion of the predicted image obtained for the image block corresponding to the partition without dividing the image block in a predetermined prediction mode such as merge mode or inter prediction mode.
[0379] In the second method, the encoding device 100 performs a second inter prediction process on the partition using a motion vector in the motion vector candidate list (S805). For example, the second inter prediction process includes a motion compensation process but does not include a DMVR process. The second inter prediction process may or may not include a BIO process.
[0380] Finally, the encoding device 100 encodes the image block using the result of the inter prediction process on the partition (S806). For example, the encoding device 100 performs the inter prediction process to obtain a predicted image as a result of the inter prediction process. Then, the encoding device 100 encodes the image block using the predicted image.
[0381] The encoding device 100 may perform the above-described processes (S802 to S805) for each of the plurality of partitions, and may encode the image block using the plurality of results of the inter prediction processes for the plurality of partitions.
[0382] The encoding device 100 may encode a flag indicating whether the image block is divided into multiple partitions, including triangular partitions. This flag may also be expressed as a partitioning parameter. For example, the flag indicates that the image block is divided into multiple partitions, including triangular partitions, when it is 1, and indicates that the image block is not divided into multiple partitions, including triangular partitions, when it is 0.
[0383] If the flag indicates that the image block is to be divided into a plurality of partitions including triangular partitions, the encoding device 100 divides the image block into a plurality of partitions including triangular partitions and encodes the divided image block.
[0384] On the other hand, if the flag indicates that the image block is not divided into multiple partitions, including triangular partitions, the encoding device 100 encodes the image block without dividing it into multiple partitions, including triangular partitions. In this case, the encoding device 100 may encode the image block without dividing it, or may encode the image block by dividing it into multiple rectangular partitions.
[0385] 19, the encoding device 100 may encode the flag based on the determination result. In this example, the encoding device 100 first acquires parameters of the image block (S501). The parameters of the image block may be at least one of the width of the image block, the height of the image block, and the ratio of the width to the height of the image block. This parameter may also be expressed as a size parameter.
[0386] Next, the encoding device 100 determines whether the parameter is equal to or greater than the first threshold and equal to or less than the second threshold (S502). If the parameter is equal to or greater than the first threshold and equal to or less than the second threshold (Yes in S502), the encoding device 100 encodes the image block with a flag (S503). The first threshold is equal to or less than the second threshold. Furthermore, the first threshold and the second threshold are basically equal to or greater than 0.
[0387] If the parameter is not greater than or equal to the first threshold and less than or equal to the second threshold (No in S503), that is, if the parameter is smaller than the first threshold or greater than the second threshold, the encoding device 100 encodes the image block without a flag (S504). Alternatively, if the parameter is not greater than or equal to the first threshold and less than or equal to the second threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into multiple partitions, including triangular partitions.
[0388] The first threshold may be the reciprocal of the second threshold. The first threshold may also be a positive integer or a positive fraction. Similarly, the second threshold may also be a positive integer or a positive fraction.
[0389] For example, the parameter is the ratio of the width to the height of the image block. The first threshold is the reciprocal of the second threshold. If the ratio of the width to the height of the image block is equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0390] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The first threshold and the second threshold are each a positive integer. If both the width and height of the image block are equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0391] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The first threshold and the second threshold are each a positive integer. If at least one of the width and height of the image block is equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0392] Also, for example, two parameters, a first parameter and a second parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the ratio of the width to the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0393] If the first parameter is greater than or equal to the first threshold and less than or equal to the second threshold, and the second parameter is greater than or equal to the third threshold and less than or equal to the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0394] Also, for example, two parameters, a first parameter and a second parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is equal to or less than the fourth threshold.
[0395] If the first parameter is greater than or equal to the first threshold and less than or equal to the second threshold, and the second parameter is greater than or equal to the third threshold and less than or equal to the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0396] Also, for example, three parameters, a first parameter, a second parameter, and a third parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, the second parameter is the height of the image block, and the third parameter is the ratio of the width to the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0397] If both the first parameter and the second parameter are equal to or greater than the first threshold and equal to or less than the second threshold, and the third parameter is equal to or greater than the third threshold and equal to or less than the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0398] 20, the encoding device 100 may encode the flag based on the determination result. In this example, the encoding device 100 first acquires parameters of the image block (S601). The parameters of the image block may be at least one of the width of the image block, the height of the image block, and the ratio of the width to the height of the image block. This parameter may also be expressed as a size parameter.
[0399] Next, the encoding device 100 determines whether the parameter is equal to or greater than a threshold (S602). If the parameter is equal to or greater than the threshold (Yes in S602), the encoding device 100 codes the image block with a flag attached (S603). Basically, the threshold is equal to or greater than 0.
[0400] If the parameter is not greater than or equal to the threshold (No in S602), that is, if the parameter is less than the threshold, the encoding device 100 encodes the image block without a flag (S604). Alternatively, if the parameter is not greater than or equal to the threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into multiple partitions, including triangular partitions.
[0401] For example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The threshold is a positive integer. If both the width and height of the image block are equal to or greater than the threshold, the encoding device 100 encodes the image block with a flag (S603). Otherwise, the encoding device 100 encodes the image block without a flag (S604).
[0402] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The threshold is a positive integer. If at least one of the width and height of the image block is equal to or greater than the threshold, the encoding device 100 encodes the image block with a flag (S603). Otherwise, the encoding device 100 encodes the image block without a flag (S604).
[0403] Also, for example, the parameter is the width of the image block. The threshold is a positive integer. If the width of the image block is equal to or greater than the threshold, the encoding device 100 codes the image block with a flag (S603). If not, the encoding device 100 codes the image block without a flag (S604).
[0404] When encoding an image block without a flag, the encoding device 100 may encode the image block without dividing it, or may divide it into a plurality of rectangular partitions and encode it.
[0405] In this aspect, the decoding-side motion vector refinement process for the triangular partitions is eliminated, and the inter-prediction process for the triangular partitions is simplified, thus reducing the complexity in software and hardware.
[0406] [Fourth aspect of encoding and decoding] 23 shows an encoding method and encoding process performed by the encoding device 100 according to the fourth aspect. Note that the decoding method and decoding process performed by the decoding device 200 are basically the same as the encoding method and encoding process performed by the encoding device 100. In the following description, "encoding" in the encoding method and encoding process may be replaced with "decoding" in the decoding method and decoding process.
[0407] First, the encoding device 100 divides an image block into a plurality of partitions (S901).
[0408] The division may be four-way, two-way, three-way, or diagonal division as shown in Figure 12A, Figure 12B, Figure 12C, Figure 12D, Figure 12E, Figure 12F, Figure 12G, Figure 12H, Figure 12I, or Figure 12J. The division is not limited to any of these divisions, and these divisions may be freely combined.
[0409] The partition may also be a partition as shown in Figure 13A, Figure 13B, Figure 13C, Figure 13D or Figure 13E. Specifically, the partition may be a rectangular partition, a non-rectangular partition, a triangular partition, an L-shaped partition, a pentagonal partition, a hexagonal partition or a polygonal partition.
[0410] Next, encoding apparatus 100 creates a motion vector candidate list for a partition included in the plurality of partitions (S902). The motion vector candidate list may include at least one of a plurality of motion vectors for a plurality of spatially adjacent partitions, a plurality of motion vectors for a plurality of temporally adjacent partitions, and a plurality of motion vectors for a plurality of sub-partitions.
[0411] A spatially adjacent partition is a partition that is spatially adjacent to a partition, and may be a partition that is located above, to the left, to the right, below, above left, above right, below left, or below right of the partition.
[0412] A temporally adjacent partition is a partition that is temporally adjacent to a partition. A temporally adjacent partition may be a co-located partition that corresponds to the location of the partition in the partition's reference picture. This reference picture may be a different picture from the current picture containing the partition, and may be a picture immediately before or after the current picture. For example, the spatial location of the co-located partition is the same as the location of the partition in the current picture.
[0413] The motion vectors for the subpartitions include motion vectors predicted from motion vectors for subpartitions spatially or temporally adjacent to each subpartition, and are obtained by a sub-CU-based motion vector prediction process, which may be ATMVP or STMVP.
[0414] For example, the motion vector candidate list for a partition is the same as the motion vector candidate list created for an image block in a given prediction mode, such as merge mode or inter prediction mode.
[0415] The encoding device 100 also determines whether the partition is a triangular partition (S903). If the partition is not a triangular partition (No in S903), the encoding device 100 performs the first method (S904). If the partition is a triangular partition (Yes in S903), the encoding device 100 performs the second method (S905).
[0416] In the first method, the encoding device 100 performs a first inter prediction process on a partition using a motion vector in the motion vector candidate list (S904). For example, the first inter prediction process includes a motion compensation process and a BIO process. The first inter prediction process may or may not include a DMVR process.
[0417] For example, the predicted image obtained for a partition by the first method is the same as the portion of the predicted image obtained for the image block corresponding to the partition without dividing the image block in a predetermined prediction mode such as merge mode or inter prediction mode.
[0418] In the second method, the encoding device 100 performs a second inter prediction process on the partition using a motion vector in the motion vector candidate list (S905). For example, the second inter prediction process includes a motion compensation process but does not include a BIO process. The second inter prediction process may or may not include a DMVR process.
[0419] Finally, the encoding device 100 encodes the image block using the result of the inter prediction process on the partition (S906). For example, the encoding device 100 performs the inter prediction process to obtain a predicted image as a result of the inter prediction process. Then, the encoding device 100 encodes the image block using the predicted image.
[0420] The encoding device 100 may perform the above-described processes (S902 to S905) for each of the plurality of partitions, and may encode the image block using the plurality of results of the inter prediction processes for the plurality of partitions.
[0421] The encoding device 100 may encode a flag indicating whether the image block is divided into multiple partitions, including triangular partitions. This flag may also be expressed as a partitioning parameter. For example, the flag indicates that the image block is divided into multiple partitions, including triangular partitions, when it is 1, and indicates that the image block is not divided into multiple partitions, including triangular partitions, when it is 0.
[0422] If the flag indicates that the image block is to be divided into a plurality of partitions including triangular partitions, the encoding device 100 divides the image block into a plurality of partitions including triangular partitions and encodes the divided image block.
[0423] On the other hand, if the flag indicates that the image block is not divided into multiple partitions, including triangular partitions, the encoding device 100 encodes the image block without dividing it into multiple partitions, including triangular partitions. In this case, the encoding device 100 may encode the image block without dividing it, or may encode the image block by dividing it into multiple rectangular partitions.
[0424] 19, the encoding device 100 may encode the flag based on the determination result. In this example, the encoding device 100 first acquires parameters of the image block (S501). The parameters of the image block may be at least one of the width of the image block, the height of the image block, and the ratio of the width to the height of the image block. This parameter may also be expressed as a size parameter.
[0425] Next, the encoding device 100 determines whether the parameter is equal to or greater than the first threshold and equal to or less than the second threshold (S502). If the parameter is equal to or greater than the first threshold and equal to or less than the second threshold (Yes in S502), the encoding device 100 encodes the image block with a flag (S503). The first threshold is equal to or less than the second threshold. Furthermore, the first threshold and the second threshold are basically equal to or greater than 0.
[0426] If the parameter is not greater than or equal to the first threshold and less than or equal to the second threshold (No in S503), that is, if the parameter is smaller than the first threshold or greater than the second threshold, the encoding device 100 encodes the image block without a flag (S504). Alternatively, if the parameter is not greater than or equal to the first threshold and less than or equal to the second threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into multiple partitions, including triangular partitions.
[0427] The first threshold may be the reciprocal of the second threshold. The first threshold may also be a positive integer or a positive fraction. Similarly, the second threshold may also be a positive integer or a positive fraction.
[0428] For example, the parameter is the ratio of the width to the height of the image block. The first threshold is the reciprocal of the second threshold. If the ratio of the width to the height of the image block is equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0429] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The first threshold and the second threshold are each a positive integer. If both the width and height of the image block are equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0430] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The first threshold and the second threshold are each a positive integer. If at least one of the width and height of the image block is equal to or greater than the first threshold and equal to or less than the second threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0431] Also, for example, two parameters, a first parameter and a second parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the ratio of the width to the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0432] If the first parameter is greater than or equal to the first threshold and less than or equal to the second threshold, and the second parameter is greater than or equal to the third threshold and less than or equal to the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0433] Also, for example, two parameters, a first parameter and a second parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is equal to or less than the fourth threshold.
[0434] If the first parameter is greater than or equal to the first threshold and less than or equal to the second threshold, and the second parameter is greater than or equal to the third threshold and less than or equal to the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0435] Also, for example, three parameters, a first parameter, a second parameter, and a third parameter, and four thresholds, a first threshold, a second threshold, a third threshold, and a fourth threshold, are used. The first parameter is the width of the image block, the second parameter is the height of the image block, and the third parameter is the ratio of the width to the height of the image block. Each of the four thresholds is a positive integer. The first threshold is equal to or less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0436] If both the first parameter and the second parameter are equal to or greater than the first threshold and equal to or less than the second threshold, and the third parameter is equal to or greater than the third threshold and equal to or less than the fourth threshold, the encoding device 100 encodes the image block with a flag (S503). Otherwise, the encoding device 100 encodes the image block without a flag (S504).
[0437] 20, the encoding device 100 may encode the flag based on the determination result. In this example, the encoding device 100 first acquires parameters of the image block (S601). The parameters of the image block may be at least one of the width of the image block, the height of the image block, and the ratio of the width to the height of the image block. This parameter may also be expressed as a size parameter.
[0438] Next, the encoding device 100 determines whether the parameter is equal to or greater than a threshold (S602). If the parameter is equal to or greater than the threshold (Yes in S602), the encoding device 100 codes the image block with a flag attached (S603). Basically, the threshold is equal to or greater than 0.
[0439] If the parameter is not greater than or equal to the threshold (No in S602), that is, if the parameter is less than the threshold, the encoding device 100 encodes the image block without a flag (S604). Alternatively, if the parameter is not greater than or equal to the threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into multiple partitions, including triangular partitions.
[0440] For example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The threshold is a positive integer. If both the width and height of the image block are equal to or greater than the threshold, the encoding device 100 encodes the image block with a flag (S603). Otherwise, the encoding device 100 encodes the image block without a flag (S604).
[0441] Also, for example, two parameters, a first parameter and a second parameter, are used. The first parameter is the width of the image block, and the second parameter is the height of the image block. The threshold is a positive integer. If at least one of the width and height of the image block is equal to or greater than the threshold, the encoding device 100 encodes the image block with a flag (S603). Otherwise, the encoding device 100 encodes the image block without a flag (S604).
[0442] Also, for example, the parameter is the width of the image block. The threshold is a positive integer. If the width of the image block is equal to or greater than the threshold, the encoding device 100 codes the image block with a flag (S603). If not, the encoding device 100 codes the image block without a flag (S604).
[0443] When encoding an image block without a flag, the encoding device 100 may encode the image block without dividing it, or may divide it into a plurality of rectangular partitions and encode it.
[0444] In this aspect, the bidirectional optical flow processing for the triangle partitions is removed, and the inter-prediction processing for the triangle partitions is simplified, thus reducing the complexity in software and hardware.
[0445] [Encoding and decoding variations] The triangular partitions in the above description may be replaced with non-rectangular partitions, and the process may be switched depending on whether the partition is a non-rectangular partition or not. In addition, if the partition is a triangular partition, the partition may be determined to be a non-rectangular partition.
[0446] The non-rectangular partitions may be L-shaped partitions, pentagonal partitions, hexagonal partitions, or polygonal partitions as shown in Figures 13A, 13B, 13C, 13D, or 13E. An image block may be divided into multiple partitions including at least one of non-rectangular partitions and rectangular partitions.
[0447] In addition, the non-rectangular partition in the above description means a partition that is not a rectangular partition. The non-rectangular partition is not limited to any of the multiple partitions shown in Figures 13A, 13B, 13C, 13D, and 13E. These multiple partitions may be freely combined.
[0448] Furthermore, the partitions in the above description may be replaced with prediction units. Furthermore, the partitions may be replaced with sub-prediction units. Furthermore, the image blocks in the above description may be replaced with coding units. Furthermore, the image blocks may be replaced with coding tree units.
[0449] The ratio of the image block size may be a ratio of width to height or a ratio of height to width, and one or more thresholds compared with the parameter of the image block size may indicate a limit range of the ratio of the image block width to the image block height for dividing the image block into multiple partitions, including non-rectangular partitions.
[0450] Furthermore, when BIO processing is performed, the encoding device 100 obtains a gradient image for the predicted image and obtains a final predicted image using the predicted image and the gradient image. The encoding device 100 may obtain the gradient image by applying a filter that extracts a difference value between pixels to the predicted image. When BIO processing is not performed, the encoding device 100 obtains a predicted image obtained without using a gradient image as the final predicted image.
[0451] Furthermore, the first, second, third and fourth aspects in the above description can be combined in any manner.
[0452] [Implementation example] 24 is a block diagram showing an example implementation of the encoding device 100. The encoding device 100 includes a circuit 160 and a memory 162. For example, several components of the encoding device 100 shown in FIG. 1 are implemented by the circuit 160 and memory 162 shown in FIG.
[0453] The circuit 160 is an electronic circuit that can access the memory 162 and performs information processing. For example, the circuit 160 is a dedicated or general-purpose electronic circuit that encodes moving images using the memory 162. The circuit 160 may be a processor such as a CPU. Alternatively, the circuit 160 may be a collection of multiple electronic circuits.
[0454] Also, for example, circuit 160 may function as multiple components of encoding device 100 shown in Fig. 1, excluding the components for storing information. That is, circuit 160 may perform the operations described above as the operations of these components.
[0455] The memory 162 is a dedicated or general-purpose memory that stores information for encoding video by the circuit 160. The memory 162 may be an electronic circuit, connected to the circuit 160, or included in the circuit 160.
[0456] Furthermore, memory 162 may be a collection of multiple electronic circuits or may be composed of multiple sub-memories. Furthermore, memory 162 may be a magnetic disk, an optical disk, or the like, and may be expressed as a storage or a recording medium, etc. Furthermore, memory 162 may be a non-volatile memory or a volatile memory.
[0457] For example, the memory 162 may serve as a component for storing information among the multiple components of the encoding device 100 shown in Fig. 1. Specifically, the memory 162 may serve as the block memory 118 and the frame memory 122 shown in Fig. 1.
[0458] The memory 162 may store a video to be encoded, or a bit string corresponding to the encoded video, and may also store a program for the circuit 160 to encode the video.
[0459] Note that not all of the components shown in Fig. 1 need to be implemented in the encoding device 100, and not all of the processes described above need to be performed. Some of the components shown in Fig. 1 may be included in other devices, and some of the processes described above may be performed by other devices. Image blocks can be processed efficiently by implementing some of the components shown in Fig. 1 and performing some of the processes described above in the encoding device 100.
[0460] Fig. 25 is a flowchart showing a first operation example of the encoding device 100 shown in Fig. 24. For example, the circuit 160 in the encoding device 100 performs the operation shown in Fig. 25 using the memory 162. Specifically, the circuit 160 encodes an image block (S1111).
[0461] For example, when encoding an image block, the circuit 160 obtains one or more size parameters related to the size of the image block, and then determines whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship.
[0462] If it is determined that the one or more size parameters and the one or more thresholds satisfy a predetermined relationship, the circuit 160 encodes a partitioning parameter indicating whether the image block is to be divided into multiple partitions, including non-rectangular partitions, and if the partitioning parameter indicates that the image block is to be divided into multiple partitions, the circuit 160 divides the image block into the multiple partitions and encodes them.
[0463] In this way, the encoding device 100 can switch between dividing the image block into multiple partitions, including non-rectangular partitions, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship, thereby enabling the encoding device 100 to process the image block efficiently.
[0464] Furthermore, for example, when it is determined that one or more size parameters and one or more thresholds do not satisfy a predetermined relationship, the circuit 160 encodes the image block without encoding the division parameters. This makes it possible to reduce the amount of coding. Furthermore, the encoding device 100 can reduce the amount of processing required for encoding the division parameters.
[0465] Furthermore, for example, when it is determined that one or more size parameters and one or more thresholds do not satisfy a predetermined relationship, the circuit 160 encodes the image block without dividing it or by dividing it into multiple rectangular partitions, thereby enabling the encoding device 100 to suppress dividing the image block into multiple partitions, including non-rectangular partitions.
[0466] Furthermore, for example, when the partitioning parameters indicate that the image block is not to be divided into multiple partitions, the circuit 160 encodes the image block without dividing it or by dividing it into multiple rectangular partitions, thereby enabling the encoding device 100 to suppress dividing the image block into multiple partitions, including non-rectangular partitions.
[0467] Furthermore, for example, the one or more thresholds are a single threshold. The predetermined relationship is that each of the one or more size parameters is equal to or greater than the single threshold, or that at least one of the one or more size parameters is equal to or greater than the single threshold. This allows encoding device 100 to switch whether or not to divide an image block into multiple partitions, including non-rectangular partitions, when the one or more size parameters are equal to or greater than the single threshold.
[0468] Furthermore, for example, the one or more thresholds are a first threshold and a second threshold, and the first threshold is equal to or less than the second threshold. The predetermined relationship is that each of the one or more size parameters is equal to or greater than the first threshold and equal to or less than the second threshold, or at least one of the one or more size parameters is equal to or greater than the first threshold and equal to or less than the second threshold. In this way, when the one or more size parameters are equal to or greater than the first threshold and equal to or less than the second threshold, encoding device 100 can switch whether or not to divide the image block into multiple partitions, including non-rectangular partitions.
[0469] Furthermore, for example, the non-rectangular partitions are triangular partitions. This allows the encoding device 100 to switch whether to divide the image block into multiple partitions including triangular partitions when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship.
[0470] Furthermore, for example, the one or more size parameters include at least one of a ratio of the width of the image block to the height of the image block, a ratio of the height of the image block to the width of the image block, the width of the image block, and the height of the image block. This allows the encoding device 100 to use at least one of the ratio of the width of the image block to the height of the image block, the ratio of the height of the image block to the width of the image block, the width of the image block, and the height of the image block as a size parameter.
[0471] Also, for example, each of the one or more thresholds is equal to or greater than 0. In this way, when one or more size parameters and one or more thresholds that are equal to or greater than 0 satisfy a predetermined relationship, encoding device 100 can switch whether or not to divide an image block into a plurality of partitions, including non-rectangular partitions.
[0472] Furthermore, for example, the one or more thresholds indicate a limit range of the ratio of the width of the image block to the height of the image block for dividing the image block into a plurality of partitions. As a result, when the one or more size parameters and the one or more thresholds indicating the limit range of the ratio of the width to the height satisfy a predetermined relationship, the encoding device 100 can switch whether or not to divide the image block into a plurality of partitions, including non-rectangular partitions.
[0473] Fig. 26 is a flowchart showing a second operation example of the encoding device 100 shown in Fig. 24. For example, the circuit 160 in the encoding device 100 performs the operation shown in Fig. 26 using the memory 162. Specifically, the circuit 160 divides an image block into a plurality of partitions (S1121). Then, the circuit 160 obtains a predicted image for a partition included in the plurality of partitions (S1122). Then, the circuit 160 encodes the image block using the predicted image (S1123).
[0474] For example, when obtaining a predicted image, the circuit 160 determines whether the partition is a non-rectangular partition.
[0475] Here, if it is determined that the partition is not a non-rectangular partition, the circuit 160 obtains a first predicted image for the partition using a first motion vector for the partition, and then obtains a second motion vector for the partition using the first predicted image, and obtains a second predicted image for the partition using the second motion vector as a predicted image.
[0476] On the other hand, if the circuit 160 determines that the partition is a non-rectangular partition, it obtains the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0477] This allows the encoding device 100 to avoid two-stage operations for non-rectangular partitions, thereby preventing an increase in the amount of processing. Therefore, the encoding device 100 can process image blocks efficiently.
[0478] Furthermore, for example, if the partition is a triangular partition, the circuit 160 determines that the partition is a non-rectangular partition. This allows the encoding device 100 to suppress an increase in the amount of processing for triangular partitions.
[0479] Furthermore, for example, when it is determined that a partition is not a non-rectangular partition, the predicted image obtained is the same as the portion of the predicted image obtained for the image block in a predetermined prediction mode that corresponds to the partition. Here, the predicted image obtained for the image block in the predetermined prediction mode is a predicted image obtained for the image block without dividing the image block into multiple partitions.
[0480] This allows the encoding device 100 to obtain a predicted image for a rectangular partition in the same way as when obtaining a predicted image for an image block without dividing the image block into multiple partitions. Therefore, the encoding device 100 can simplify the processing.
[0481] Furthermore, for example, the circuit 160 obtains the second motion vector by performing motion search using the first predicted image, which allows the encoding device 100 to obtain an appropriate second motion vector using the first predicted image, and to obtain an appropriate second predicted image using the appropriate second motion vector.
[0482] Also, for example, when obtaining a predicted image, the circuit 160 determines whether the partition is a non-rectangular partition.
[0483] Here, when the circuit 160 determines that the partition is not a non-rectangular partition, it obtains a first predicted image for the partition, obtains a gradient image for the first predicted image, and obtains a second predicted image as a predicted image using the first predicted image and the gradient image. On the other hand, when the circuit 160 determines that the partition is a non-rectangular partition, it obtains the first predicted image as a predicted image without using the gradient image.
[0484] This allows the encoding device 100 to suppress the use of gradient images for non-rectangular partitions, thereby suppressing an increase in the amount of processing, and therefore allows the encoding device 100 to process image blocks efficiently.
[0485] Furthermore, for example, if the partition is a triangular partition, the circuit 160 determines that the partition is a non-rectangular partition. This allows the encoding device 100 to suppress an increase in the amount of processing for triangular partitions.
[0486] Furthermore, for example, when it is determined that a partition is not a non-rectangular partition, the predicted image obtained is the same as the portion of the predicted image obtained for the image block in a predetermined prediction mode that corresponds to the partition. The predicted image obtained for the image block in a predetermined prediction mode is a predicted image obtained for the image block without dividing the image block into multiple partitions.
[0487] This allows the encoding device 100 to obtain a predicted image for a rectangular partition in the same way as when obtaining a predicted image for an image block without dividing the image block into multiple partitions. Therefore, the encoding device 100 can simplify the processing.
[0488] Furthermore, for example, the circuit 160 obtains a gradient image by applying a filter that extracts a difference value between pixels to the first predicted image, which allows the encoding device 100 to obtain an appropriate gradient image for the first predicted image and obtain an appropriate second predicted image using the appropriate gradient image.
[0489] Fig. 27 is a flowchart showing a third operation example of the encoding device 100 shown in Fig. 24. For example, the circuit 160 in the encoding device 100 performs the operation shown in Fig. 27 using the memory 162.
[0490] Specifically, the circuit 160 divides an image block into a plurality of partitions (S1131), and then generates a motion vector candidate list for each partition included in the plurality of partitions (S1132).
[0491] Then, the circuit 160 obtains a motion vector for the partition from the motion vector candidate list (S1133). Then, the circuit 160 performs inter prediction processing for the partition using the motion vector for the partition (S1134). Then, the circuit 160 encodes the image block using the result of the inter prediction processing (S1135).
[0492] Also, for example, when generating the motion vector candidate list, circuit 160 determines whether the partition is a non-rectangular partition.
[0493] If the partition is determined to be not a non-rectangular partition, the circuit 160 generates a motion vector candidate list using at least one of a plurality of motion vectors for a plurality of spatially adjacent partitions, a plurality of motion vectors for a plurality of temporally adjacent partitions, and a plurality of motion vectors for a plurality of sub-partitions.
[0494] If the partition is determined to be a non-rectangular partition, circuit 160 also generates a motion vector candidate list, but instead of using multiple motion vectors for multiple sub-partitions, at least one of multiple motion vectors for multiple spatially adjacent partitions and multiple motion vectors for multiple temporally adjacent partitions is used.
[0495] Here, the plurality of spatially adjacent partitions are spatially adjacent to the partition, the plurality of temporally adjacent partitions are temporally adjacent to the partition, and the plurality of subpartitions are included in the partition.
[0496] This allows the encoding device 100 to suppress the use of multiple motion vectors for multiple sub-partitions for non-rectangular partitions, thereby suppressing an increase in the amount of processing, and thus allows the encoding device 100 to process image blocks efficiently.
[0497] Furthermore, for example, if the partition is a triangular partition, the circuit 160 determines that the partition is a non-rectangular partition. This allows the encoding device 100 to suppress an increase in the amount of processing for triangular partitions.
[0498] Furthermore, for example, the motion vectors for the subpartitions include motion vectors predicted from motion vectors for areas spatially or temporally adjacent to each of the subpartitions, allowing encoding device 100 to use motion vectors predicted as motion vectors for the subpartitions from motion vectors for areas adjacent to the subpartitions.
[0499] Furthermore, for example, when it is determined that a partition is not a non-rectangular partition, the motion vector candidate list generated is the same as the motion vector candidate list generated for an image block in a predetermined prediction mode.Therefore, the encoding device 100 can generate a motion vector candidate list for a rectangular partition in the same way as when generating a motion vector candidate list for an image block.Therefore, the encoding device 100 can simplify processing.
[0500] Also, for example, each of the multiple temporally adjacent partitions is a co-located partition corresponding to the position of a partition in a picture different from the picture containing the partition, thereby enabling the encoding device 100 to use a motion vector for the co-located partition as a motion vector for the temporally adjacent partition.
[0501] 28 is a block diagram showing an implementation example of the decoding device 200. The decoding device 200 includes a circuit 260 and a memory 262. For example, several components of the decoding device 200 shown in FIG. 10 are implemented by the circuit 260 and memory 262 shown in FIG.
[0502] The circuit 260 is an electronic circuit that can access the memory 262 and performs information processing. For example, the circuit 260 is a dedicated or general-purpose electronic circuit that decodes video using the memory 262. The circuit 260 may be a processor such as a CPU. Alternatively, the circuit 260 may be a collection of multiple electronic circuits.
[0503] Also, for example, the circuit 260 may function as multiple components of the decoding device 200 shown in Fig. 10 , excluding the components for storing information. That is, the circuit 260 may perform the operations described above as the operations of these components.
[0504] The memory 262 is a dedicated or general-purpose memory that stores information for decoding video by the circuit 260. The memory 262 may be an electronic circuit, connected to the circuit 260, or included in the circuit 260.
[0505] Furthermore, the memory 262 may be a collection of multiple electronic circuits, or may be composed of multiple sub-memories. Furthermore, the memory 262 may be a magnetic disk, an optical disk, or the like, and may be expressed as a storage or a recording medium, etc. Furthermore, the memory 262 may be a non-volatile memory or a volatile memory.
[0506] For example, the memory 262 may serve as a component for storing information among the multiple components of the decoding device 200 shown in Fig. 10. Specifically, the memory 262 may serve as the block memory 210 and the frame memory 214 shown in Fig. 10.
[0507] The memory 262 may store a bit string corresponding to an encoded video, or may store a decoded video, or may store a program for the circuit 260 to decode the video.
[0508] Note that decoding device 200 does not necessarily have to implement all of the components shown in Fig. 10 or perform all of the above-described processes. Some of the components shown in Fig. 10 may be included in another device, and some of the above-described processes may be executed by another device. Image blocks can be processed efficiently by implementing some of the components shown in Fig. 10 and performing some of the above-described processes in decoding device 200.
[0509] Fig. 29 is a flowchart showing a first operation example of the decoding device 200 shown in Fig. 28. For example, the circuit 260 in the decoding device 200 performs the operation shown in Fig. 29 using the memory 262. Specifically, the circuit 260 decodes an image block (S1211).
[0510] For example, when decoding an image block, the circuit 260 obtains one or more size parameters related to the size of the image block, and then determines whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship.
[0511] If it is determined that the one or more size parameters and the one or more thresholds satisfy a predetermined relationship, the circuit 260 decodes a partition parameter indicating whether the image block is to be partitioned into multiple partitions, including non-rectangular partitions, and if the partition parameter indicates that the image block is to be partitioned into multiple partitions, the circuit 260 divides the image block into the multiple partitions and decodes the partitions.
[0512] In this way, the decoding device 200 can switch whether to divide the image block into multiple partitions, including non-rectangular partitions, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship, thereby enabling the decoding device 200 to process the image block efficiently.
[0513] Furthermore, for example, when it is determined that one or more size parameters and one or more thresholds do not satisfy a predetermined relationship, the circuit 260 decodes the image block without decoding the division parameters. This makes it possible to reduce the amount of coding. Furthermore, the decoding device 200 can reduce the amount of processing required for decoding the division parameters.
[0514] Furthermore, for example, when it is determined that one or more size parameters and one or more thresholds do not satisfy a predetermined relationship, the circuit 260 decodes the image block without dividing it or by dividing it into multiple rectangular partitions. This allows the decoding device 200 to suppress dividing the image block into multiple partitions, including non-rectangular partitions.
[0515] Furthermore, for example, when the division parameters indicate that the image block is not to be divided into multiple partitions, the circuit 260 decodes the image block without dividing it or by dividing it into multiple rectangular partitions, which allows the decoding device 200 to suppress dividing the image block into multiple partitions including non-rectangular partitions.
[0516] Also, for example, the one or more thresholds are one threshold. And the predetermined relationship is that each of the one or more size parameters is equal to or greater than the one threshold, or at least one of the one or more size parameters is equal to or greater than the one threshold. In this way, when the one or more size parameters are equal to or greater than the one threshold, the decoding device 200 can switch whether or not to divide the image block into a plurality of partitions including non-rectangular partitions.
[0517] Furthermore, for example, the one or more thresholds are a first threshold and a second threshold, and the first threshold is equal to or less than the second threshold. The predetermined relationship is that each of the one or more size parameters is equal to or greater than the first threshold and equal to or less than the second threshold, or at least one of the one or more size parameters is equal to or greater than the first threshold and equal to or less than the second threshold. This allows decoding device 200 to switch whether or not to divide the image block into multiple partitions, including non-rectangular partitions, when the one or more size parameters are equal to or greater than the first threshold and equal to or less than the second threshold.
[0518] Furthermore, for example, the non-rectangular partition is a triangular partition. This allows the decoding device 200 to switch whether to divide the image block into multiple partitions, including triangular partitions, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship.
[0519] Furthermore, for example, the one or more size parameters include at least one of a ratio of the width of the image block to the height of the image block, a ratio of the height of the image block to the width of the image block, the width of the image block, and the height of the image block. This allows the decoding device 200 to use at least one of the ratio of the width of the image block to the height of the image block, the ratio of the height of the image block to the width of the image block, the width of the image block, and the height of the image block as a size parameter.
[0520] Also, for example, each of the one or more thresholds is equal to or greater than 0. In this way, when one or more size parameters and one or more thresholds that are equal to or greater than 0 satisfy a predetermined relationship, the decoding device 200 can switch whether or not to divide the image block into a plurality of partitions including non-rectangular partitions.
[0521] Furthermore, for example, the one or more thresholds indicate a limit range of the ratio of the width of the image block to the height of the image block for dividing the image block into a plurality of partitions. As a result, when the one or more size parameters and the one or more thresholds indicating the limit range of the ratio of the width to the height satisfy a predetermined relationship, the decoding device 200 can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions.
[0522] Fig. 30 is a flowchart showing a second operation example of the decoding device 200 shown in Fig. 28. For example, the circuit 260 in the decoding device 200 performs the operation shown in Fig. 30 using the memory 262. For example, the circuit 260 divides an image block into a plurality of partitions (S1221). Then, the circuit 260 obtains a predicted image for a partition included in the plurality of partitions (S1222). Then, the circuit 260 decodes the image block using the predicted image (S1223).
[0523] Also, for example, when obtaining a predicted image, the circuit 260 determines whether the partition is a non-rectangular partition.
[0524] Here, if it is determined that the partition is not a non-rectangular partition, the circuit 260 obtains a first predicted image for the partition using a first motion vector for the partition, and then obtains a second motion vector for the partition using the first predicted image, and obtains a second predicted image for the partition using the second motion vector as a predicted image.
[0525] On the other hand, if the circuit 260 determines that the partition is a non-rectangular partition, it obtains the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0526] This allows the decoding device 200 to avoid two-stage operations for non-rectangular partitions, thereby preventing an increase in the amount of processing. Therefore, the decoding device 200 can process image blocks efficiently.
[0527] Furthermore, for example, if the partition is a triangular partition, the circuit 260 determines that the partition is a non-rectangular partition. This allows the decoding device 200 to suppress an increase in the amount of processing for triangular partitions.
[0528] Furthermore, for example, when it is determined that a partition is not a non-rectangular partition, the predicted image obtained is the same as the portion of the predicted image obtained for the image block in a predetermined prediction mode that corresponds to the partition. The predicted image obtained for the image block in a predetermined prediction mode is a predicted image obtained for the image block without dividing the image block into multiple partitions.
[0529] This allows the decoding device 200 to obtain a predicted image for a rectangular partition in the same way as when obtaining a predicted image for an image block without dividing the image block into multiple partitions. Therefore, the decoding device 200 can simplify the processing.
[0530] Furthermore, for example, the circuit 260 obtains the second motion vector by performing motion search using the first predicted image, which allows the decoding device 200 to obtain an appropriate second motion vector using the first predicted image, and to obtain an appropriate second predicted image using the appropriate second motion vector.
[0531] Also, for example, when obtaining a predicted image, the circuit 260 determines whether the partition is a non-rectangular partition.
[0532] Here, if it is determined that the partition is not a non-rectangular partition, a first predicted image for the partition is obtained, a gradient image for the first predicted image is obtained, and a second predicted image is obtained as a predicted image using the first predicted image and the gradient image. On the other hand, if it is determined that the partition is a non-rectangular partition, the first predicted image is obtained as a predicted image without using the gradient image.
[0533] This allows the decoding device 200 to suppress the use of gradient images for non-rectangular partitions, thereby suppressing an increase in the amount of processing. Therefore, the decoding device 200 can process image blocks efficiently.
[0534] Furthermore, for example, if the partition is a triangular partition, the circuit 260 determines that the partition is a non-rectangular partition. This allows the decoding device 200 to suppress an increase in the amount of processing for triangular partitions.
[0535] Furthermore, for example, when it is determined that a partition is not a non-rectangular partition, the predicted image obtained is the same as the portion of the predicted image obtained for the image block in a predetermined prediction mode that corresponds to the partition. Here, the predicted image obtained for the image block in the predetermined prediction mode is a predicted image obtained for the image block without dividing the image block into multiple partitions.
[0536] This allows the decoding device 200 to obtain a predicted image for a rectangular partition in the same way as when obtaining a predicted image for an image block without dividing the image block into multiple partitions. Therefore, the decoding device 200 can simplify the processing.
[0537] Furthermore, for example, the circuit 260 obtains a gradient image by applying a filter that extracts a difference value between pixels to the first predicted image, which allows the decoding device 200 to obtain an appropriate gradient image for the first predicted image and obtain an appropriate second predicted image using the appropriate gradient image.
[0538] Fig. 31 is a flowchart showing a third operation example of the decoding device 200 shown in Fig. 28. For example, the circuit 260 in the decoding device 200 performs the operation shown in Fig. 31 using the memory 262.
[0539] Specifically, the circuit 260 divides an image block into a plurality of partitions (S1231), and then generates a motion vector candidate list for each of the partitions (S1232).
[0540] Then, the circuit 260 obtains a motion vector for the partition from the motion vector candidate list (S1233). Then, the circuit 260 performs inter prediction processing on the partition using the motion vector for the partition (S1134). Then, the circuit 260 decodes the image block using the result of the inter prediction processing (S1135).
[0541] Also, for example, when generating the motion vector candidate list, circuit 260 determines whether the partition is a non-rectangular partition.
[0542] If the partition is determined to be not a non-rectangular partition, the circuit 260 generates a motion vector candidate list using at least one of a plurality of motion vectors for a plurality of spatially adjacent partitions, a plurality of motion vectors for a plurality of temporally adjacent partitions, and a plurality of motion vectors for a plurality of sub-partitions.
[0543] If the partition is determined to be a non-rectangular partition, the circuit 260 also generates a motion vector candidate list, but instead of using multiple motion vectors for multiple sub-partitions, at least one of multiple motion vectors for multiple spatially adjacent partitions and multiple motion vectors for multiple temporally adjacent partitions is used.
[0544] Here, the plurality of spatially adjacent partitions are spatially adjacent to the partition, the plurality of temporally adjacent partitions are temporally adjacent to the partition, and the plurality of subpartitions are included in the partition.
[0545] This allows the decoding device 200 to suppress the use of multiple motion vectors for multiple sub-partitions for non-rectangular partitions, thereby suppressing an increase in the amount of processing. Therefore, the decoding device 200 can process image blocks efficiently.
[0546] Furthermore, for example, if the partition is a triangular partition, the circuit 260 determines that the partition is a non-rectangular partition. This allows the decoding device 200 to suppress an increase in the amount of processing for triangular partitions.
[0547] Furthermore, for example, the motion vectors for the subpartitions include motion vectors predicted from motion vectors for areas spatially or temporally adjacent to each of the subpartitions, allowing decoding device 200 to use motion vectors predicted as motion vectors for the subpartitions from motion vectors for areas adjacent to the subpartitions.
[0548] Furthermore, for example, when it is determined that a partition is not a non-rectangular partition, the motion vector candidate list generated is the same as the motion vector candidate list generated for an image block in a predetermined prediction mode.Therefore, the decoding device 200 can generate a motion vector candidate list for a rectangular partition in the same way as when generating a motion vector candidate list for an image block.Therefore, the decoding device 200 can simplify processing.
[0549] Also, for example, each of the multiple temporally adjacent partitions is a co-located partition corresponding to the position of a partition in a picture different from the picture containing the partition. This allows decoding device 200 to use a motion vector for the co-located partition as a motion vector for the temporally adjacent partition.
[0550] [supplement] The encoding device 100 and the decoding device 200 in this embodiment may be used as an image encoding device and an image decoding device, respectively, or as a video encoding device and a video decoding device.
[0551] Alternatively, each of the encoding device 100 and the decoding device 200 may be used as a prediction device or an inter-prediction device. That is, the encoding device 100 and the decoding device 200 may correspond only to the inter-prediction unit 126 and the inter-prediction unit 218, respectively. Other components, such as the entropy encoding unit 110 or the entropy decoding unit 202, may be included in other devices.
[0552] Furthermore, at least a part of this embodiment may be used as an encoding method, a decoding method, a prediction method, or any other method.
[0553] In addition, in this embodiment, each component may be configured with dedicated hardware, or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or processor reading and executing a software program recorded on a recording medium such as a hard disk or semiconductor memory.
[0554] Specifically, each of the encoding device 100 and the decoding device 200 may include a processing circuitry and a storage device electrically connected to and accessible from the processing circuitry. For example, the processing circuitry corresponds to the circuit 160 or 260, and the storage device corresponds to the memory 162 or 262.
[0555] The processing circuit includes at least one of dedicated hardware and a program execution unit, and executes processing using a storage device. If the processing circuit includes a program execution unit, the storage device stores the software program executed by the program execution unit.
[0556] Here, the software for realizing the encoding device 100 or the decoding device 200 according to the present embodiment is the following program.
[0557] That is, this program causes a computer to execute an encoding method that includes a step of encoding an image block, in which the step of encoding the image block includes obtaining one or more size parameters related to the size of the image block, determining whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship, encoding a partitioning parameter indicating whether the image block is to be divided into a plurality of partitions, including non-rectangular partitions, if it is determined that the one or more size parameters and the one or more thresholds satisfy the predetermined relationship, and dividing the image block into the plurality of partitions and encoding them if the partitioning parameter indicates that the image block is to be divided into the plurality of partitions.
[0558] Alternatively, this program causes a computer to execute a decoding method that includes a step of decoding an image block, in which the step of decoding the image block includes obtaining one or more size parameters related to the size of the image block, determining whether the one or more size parameters and one or more thresholds satisfy a predetermined relationship, and if it is determined that the one or more size parameters and the one or more thresholds satisfy the predetermined relationship, decoding a partition parameter indicating whether the image block is to be divided into a plurality of partitions including non-rectangular partitions, and if the partition parameter indicates that the image block is to be divided into the plurality of partitions, dividing the image block into the plurality of partitions and decoding the partitions.
[0559] Alternatively, this program causes a computer to execute an encoding method including the steps of dividing an image block into a plurality of partitions, obtaining a predicted image for a partition included in the plurality of partitions, and encoding the image block using the predicted image, wherein in the step of obtaining the predicted image, it is determined whether the partition is a non-rectangular partition, and if it is determined that the partition is not a non-rectangular partition, it obtains a first predicted image for the partition using a first motion vector for the partition, obtains a second motion vector for the partition using the first predicted image, and obtains the second predicted image for the partition using the second motion vector as the predicted image, and if it is determined that the partition is a non-rectangular partition, it obtains the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0560] Alternatively, this program causes a computer to execute a decoding method including the steps of dividing an image block into a plurality of partitions, obtaining a predicted image for a partition included in the plurality of partitions, and decoding the image block using the predicted image, wherein in the step of obtaining the predicted image, it is determined whether the partition is a non-rectangular partition, and if it is determined that the partition is not a non-rectangular partition, it obtains a first predicted image for the partition using a first motion vector for the partition, obtains a second motion vector for the partition using the first predicted image, and obtains the second predicted image for the partition using the second motion vector as the predicted image, and if it is determined that the partition is a non-rectangular partition, it obtains the first predicted image as the predicted image using the first motion vector without using the second motion vector.
[0561] Alternatively, this program causes a computer to execute an encoding method including the steps of: dividing an image block into a plurality of partitions; obtaining a predicted image for a partition included in the plurality of partitions; and encoding the image block using the predicted image, wherein in the step of obtaining the predicted image, it is determined whether the partition is a non-rectangular partition; if it is determined that the partition is not a non-rectangular partition, a first predicted image for the partition is obtained; a gradient image for the first predicted image; and a second predicted image is obtained as the predicted image using the first predicted image and the gradient image; and if it is determined that the partition is a non-rectangular partition, the first predicted image is obtained as the predicted image without using the gradient image.
[0562] Alternatively, this program causes a computer to execute a decoding method including the steps of: dividing an image block into a plurality of partitions; obtaining a predicted image for a partition included in the plurality of partitions; and decoding the image block using the predicted image, wherein in the step of obtaining the predicted image, it is determined whether the partition is a non-rectangular partition; if it is determined that the partition is not a non-rectangular partition, it obtains a first predicted image for the partition, obtains a gradient image for the first predicted image, and obtains a second predicted image using the first predicted image and the gradient image as the predicted image; and if it is determined that the partition is a non-rectangular partition, it obtains the first predicted image as the predicted image without using the gradient image.
[0563] Alternatively, this program causes a computer to execute an encoding method including the steps of: dividing an image block into a plurality of partitions; generating a motion vector candidate list for a partition included in the plurality of partitions; obtaining a motion vector for the partition from the motion vector candidate list; performing inter-prediction processing for the partition using the motion vector for the partition; and encoding the image block using a result of the inter-prediction processing, wherein the step of generating the motion vector candidate list includes determining whether the partition is a non-rectangular partition; and if it is determined that the partition is not a non-rectangular partition, generating the motion vector candidate list using at least one motion vector from among a plurality of motion vectors for a plurality of spatially adjacent partitions that are spatially adjacent to the partition, a plurality of motion vectors for a plurality of temporally adjacent partitions that are temporally adjacent to the partition, and a plurality of motion vectors for a plurality of sub-partitions included in the partition; and if it is determined that the partition is a non-rectangular partition, generating the motion vector candidate list using at least one motion vector from among a plurality of motion vectors for the plurality of spatially adjacent partitions and a plurality of motion vectors for the plurality of temporally adjacent partitions, without using a plurality of motion vectors for the plurality of sub-partitions.
[0564] Alternatively, this program causes a computer to execute a decoding method including the steps of: dividing an image block into a plurality of partitions; generating a motion vector candidate list for a partition included in the plurality of partitions; obtaining a motion vector for the partition from the motion vector candidate list; performing inter-prediction processing for the partition using the motion vector for the partition; and decoding the image block using a result of the inter-prediction processing, wherein the step of generating the motion vector candidate list includes determining whether the partition is a non-rectangular partition; and if it is determined that the partition is not a non-rectangular partition, generating the motion vector candidate list using at least one motion vector from among a plurality of motion vectors for a plurality of spatially adjacent partitions that are spatially adjacent to the partition, a plurality of motion vectors for a plurality of temporally adjacent partitions that are temporally adjacent to the partition, and a plurality of motion vectors for a plurality of sub-partitions included in the partition; and if it is determined that the partition is a non-rectangular partition, generating the motion vector candidate list using at least one motion vector from among a plurality of motion vectors for the plurality of spatially adjacent partitions and a plurality of motion vectors for the plurality of temporally adjacent partitions, without using a plurality of motion vectors for the plurality of sub-partitions.
[0565] Furthermore, each component may be a circuit, as described above. These circuits may form a single circuit as a whole, or may each be a separate circuit. Furthermore, each component may be realized by a general-purpose processor or a dedicated processor.
[0566] Furthermore, a process performed by a specific component may be performed by another component. The order in which the processes are performed may be changed, or multiple processes may be performed in parallel. Furthermore, the encoding / decoding device may include the encoding device 100 and the decoding device 200.
[0567] Furthermore, ordinal numbers such as first and second used in the description may be changed as appropriate. Furthermore, new ordinal numbers may be assigned to components or removed.
[0568] Although aspects of the encoding device 100 and the decoding device 200 have been described above based on the embodiments, the aspects of the encoding device 100 and the decoding device 200 are not limited to these embodiments. As long as they do not deviate from the spirit of this disclosure, various modifications conceivable by those skilled in the art to the present embodiments and configurations constructed by combining components of different embodiments may also be included within the scope of the aspects of the encoding device 100 and the decoding device 200.
[0569] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the device configurations, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0570] (Embodiment 2) In each of the above embodiments, each of the functional blocks can typically be realized by an MPU, memory, etc. Furthermore, the processing by each of the functional blocks is typically realized by a program execution unit such as a processor reading and executing software (programs) recorded on a recording medium such as a ROM. The software may be distributed by downloading, etc., or may be recorded on a recording medium such as a semiconductor memory and distributed. Of course, each functional block can also be realized by hardware (dedicated circuits).
[0571] Furthermore, the processing described in each embodiment may be realized by centralized processing using a single device (system), or may be realized by distributed processing using multiple devices. The processor that executes the program may be a single processor or multiple processors. That is, centralized processing or distributed processing may be performed.
[0572] The aspects of the present disclosure are not limited to the above examples, and various modifications are possible, and these modifications are also included within the scope of the aspects of the present disclosure.
[0573] Furthermore, here, we will explain application examples of the video coding method (image coding method) or video decoding method (image decoding method) shown in each of the above embodiments and a system using the same. The system is characterized by having an image coding device using the image coding method, an image decoding device using the image decoding method, and an image coding / decoding device that includes both. Other components of the system can be appropriately changed depending on the situation.
[0574] [Usage example] 32 is a diagram showing the overall configuration of a content supply system ex100 that provides a content distribution service. The area where communication services are provided is divided into cells of a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.
[0575] In this content supply system ex100, devices such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 are connected to the Internet ex101 via an Internet service provider ex102 or a communication network ex104 and base stations ex106 to ex110. The content supply system ex100 may be configured to connect a combination of any of the above elements. The devices may be connected to each other directly or indirectly via a telephone network or short-range wireless communication, without using the base stations ex106 to ex110, which are fixed wireless stations. Furthermore, a streaming server ex103 is connected to devices such as the computer ex111, the game console ex112, the camera ex113, the home appliance ex114, and the smartphone ex115 via the Internet ex101, etc. Furthermore, the streaming server ex103 is connected to a terminal in a hotspot on an airplane ex117, etc., via a satellite ex116.
[0576] Note that wireless access points, hotspots, etc. may be used instead of the base stations ex106 to ex110. Furthermore, the streaming server ex103 may be directly connected to the communication network ex104 without going through the Internet ex101 or the Internet service provider ex102, or may be directly connected to an airplane ex117 without going through a satellite ex116.
[0577] The camera ex113 is a device capable of taking still images and videos, such as a digital camera. The smartphone ex115 is a smartphone, mobile phone, or PHS (Personal Handyphone System) that is compatible with mobile communication systems generally known as 2G, 3G, 3.9G, 4G, and 5G.
[0578] The home appliance ex118 is a refrigerator or an appliance included in a home fuel cell cogeneration system.
[0579] In the content supply system ex100, a terminal having a photographing function is connected to a streaming server ex103 via a base station ex106 or the like, thereby enabling live streaming and the like. In live streaming, a terminal (such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal on an airplane ex117) performs the encoding process described in each of the above embodiments on still images or video content captured by a user using the terminal, multiplexes the video data obtained by encoding with audio data obtained by encoding audio corresponding to the video, and transmits the obtained data to the streaming server ex103. That is, each terminal functions as an image encoding device according to one aspect of the present disclosure.
[0580] Meanwhile, the streaming server ex103 streams the transmitted content data to the requesting client. The client is a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, a terminal on an airplane ex117, or the like, which is capable of decoding the encoded data. Each device that receives the distributed data decodes and plays back the received data. That is, each device functions as an image decoding device according to one aspect of the present disclosure.
[0581] [Distributed processing] The streaming server ex103 may also be multiple servers or multiple computers that process, record, and distribute data in a distributed manner. For example, the streaming server ex103 may be implemented as a CDN (Content Delivery Network), where content distribution is achieved through a network connecting numerous edge servers distributed around the world. In a CDN, a physically nearby edge server is dynamically assigned depending on the client. Content is then cached and distributed to that edge server, thereby reducing delays. Furthermore, if an error occurs or communication conditions change due to increased traffic, processing can be distributed among multiple edge servers, the distribution entity can be switched to another edge server, or distribution can be continued by bypassing the affected network portion, thereby achieving high-speed and stable distribution.
[0582] In addition to the distributed processing of the distribution itself, the encoding of captured data can be performed on each device, on the server side, or shared among devices. For example, encoding generally involves two processing loops. The first loop detects the image complexity or code size for each frame or scene. The second loop maintains image quality while improving encoding efficiency. For example, a device can perform the first encoding process, and the server that receives the content can perform the second encoding process, thereby improving content quality and efficiency while reducing the processing load on each device. In this case, if there is a request for near-real-time reception and decoding, the data encoded by a device can be received and played back on another device, enabling more flexible real-time distribution.
[0583] As another example, the camera ex113 or the like extracts features from an image, compresses the data related to the features as metadata, and transmits the data to the server. The server performs compression according to the meaning of the image, for example, by determining the importance of an object from the features and switching the quantization precision accordingly. The feature data is particularly effective in improving the accuracy and efficiency of motion vector prediction when the server recompresses the image. Alternatively, the terminal may perform simple encoding such as VLC (variable length coding), and the server may perform encoding with a heavy processing load such as CABAC (context-adaptive binary arithmetic coding).
[0584] As another example, in a stadium, shopping mall, factory, etc., there may be multiple pieces of video data that have been shot by multiple terminals of almost the same scene. In this case, using the multiple terminals that shot the video and, as necessary, other terminals and servers that did not shoot the video, encoding processes are assigned to each of them, for example, in units of GOPs (Group of Pictures), pictures, or tiles obtained by dividing a picture, for distributed processing. This reduces delays and achieves better real-time performance.
[0585] Furthermore, since multiple pieces of video data are of nearly the same scene, the server may manage and / or instruct the video data shot by each terminal to be mutually referenced. Alternatively, the server may receive encoded data from each terminal and change the reference relationships between multiple pieces of data, or correct or replace the pictures themselves and re-encode them. This allows for the generation of streams with improved quality and efficiency for each piece of data.
[0586] The server may also perform transcoding to change the encoding format of the video data before distributing it. For example, the server may convert MPEG-based encoding to VP-based encoding, or convert H.264 to H.265.
[0587] In this way, the encoding process can be performed by a terminal or one or more servers. Therefore, although the following uses terms such as "server" or "terminal" to refer to the entity performing the process, some or all of the processing performed by the server may be performed by the terminal, and some or all of the processing performed by the terminal may be performed by the server. The same applies to the decoding process.
[0588] [3D, multi-angle] In recent years, there has been an increasing trend to integrate and use images or videos of different scenes or the same scene taken from different angles by multiple devices such as cameras ex113 and / or smartphones ex115 that are nearly synchronized with each other. The videos taken by each device are integrated based on the relative positional relationship between the devices obtained separately, or on areas where feature points included in the videos match.
[0589] The server may not only encode 2D video, but also encode still images automatically or at a time specified by the user based on scene analysis of the video and transmit them to the receiving terminal. Furthermore, if the server can acquire the relative positional relationship between the capturing terminals, it can generate a 3D shape of the scene based on not only the 2D video but also images of the same scene captured from different angles. The server may also separately encode 3D data generated by point clouds, or may select or reconstruct images to be transmitted to the receiving terminal from images captured by multiple terminals based on the results of recognizing or tracking people or objects using the 3D data.
[0590] In this way, users can enjoy scenes by selecting any video corresponding to each camera device, or can enjoy content in which video from any viewpoint is extracted from 3D data reconstructed using multiple images or videos. Furthermore, like the video, sound may also be collected from multiple different angles, and the server may multiplex and transmit sound from a specific angle or space in accordance with the video.
[0591] In recent years, content that associates the real world with a virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become popular. In the case of VR images, the server creates viewpoint images for the right eye and left eye, and may perform encoding that allows reference between the viewpoint images using Multi-View Coding (MVC) or the like, or may encode them as separate streams without mutual reference. When decoding the separate streams, it is preferable to play them in synchronization with each other so that a virtual three-dimensional space is reproduced according to the user's viewpoint.
[0592] In the case of AR images, the server superimposes virtual object information in virtual space onto camera information in real space based on the 3D position or the user's viewpoint movement. The decoding device may acquire or store virtual object information and 3D data, generate a 2D image according to the user's viewpoint movement, and smoothly connect the images to create superimposed data. Alternatively, the decoding device may send the user's viewpoint movement to the server in addition to a request for virtual object information, and the server may create superimposed data based on the viewpoint movement received from the 3D data stored on the server, encode the superimposed data, and distribute it to the decoding device. Note that the superimposed data may also have an α value indicating transparency in addition to RGB, and the server may set the α value of parts other than the object created from the 3D data to 0, etc., to encode the parts in a transparent state. Alternatively, the server may generate data by setting a predetermined RGB value as the background, like a chromakey, and using the background color for parts other than the object.
[0593] Similarly, the decoding of distributed data may be performed by each client terminal, by the server, or by multiple terminals. For example, one terminal may first send a reception request to the server, and then other terminals may receive and decode content according to the request, after which the decoded signal is transmitted to a device with a display. By distributing the processing and selecting appropriate content regardless of the capabilities of the communication terminals themselves, high-quality data can be reproduced. As another example, large-sized image data may be received on a TV or other device, and only a portion of the picture, such as a tile into which the picture is divided, may be decoded and displayed on the viewer's personal device. This allows the viewer to share the overall picture while checking their own area of responsibility or an area of interest in more detail.
[0594] In the future, it is expected that content will be seamlessly received by switching the appropriate data for the current connection using delivery system standards such as MPEG-DASH in situations where multiple short-, medium-, or long-distance wireless communications are available, both indoors and outdoors. This will allow users to freely select and switch between decoding and display devices, such as their own devices, indoors and outdoors, in real time. Decoding can also be performed by switching between decoding and display devices based on user location information. This will enable users to display map information on the wall or ground of a neighboring building with an embedded display device while traveling to their destination. It is also possible to switch the bit rate of received data based on the accessibility of the encoded data on the network, such as if the encoded data is cached on a server that can be quickly accessed from the receiving device or copied to an edge server in a content delivery service.
[0595] [Scalable Coding] Regarding content switching, we will explain it using a scalable stream, shown in Figure 33, compressed and encoded using the video encoding method described in each of the above embodiments. The server may have multiple streams with the same content but different qualities as individual streams, or it may be configured to switch content by taking advantage of the characteristics of a temporally / spatially scalable stream, which is achieved by encoding the stream in layers as shown. In other words, the decoding side determines which layer to decode based on internal factors such as performance and external factors such as communication bandwidth, allowing the decoding side to freely switch between low-resolution and high-resolution content. For example, if a user wants to continue watching a video they were watching on their smartphone ex115 while on the go on a device such as an Internet TV after returning home, the device can simply decode the same stream up to different layers, thereby reducing the burden on the server.
[0596] Furthermore, in addition to the above-described scalability configuration in which pictures are coded for each layer and an enhancement layer exists above a base layer, the enhancement layer may include meta-information based on image statistics, etc., and the decoding side may generate high-quality content by super-resolving pictures in the base layer based on the meta-information. Super-resolution may mean either improving the signal-to-noise ratio at the same resolution or increasing the resolution. The meta-information may include information for specifying linear or nonlinear filter coefficients used in the super-resolution process, or information for specifying parameter values in the filter process, machine learning, or least-squares calculation used in the super-resolution process.
[0597] Alternatively, a picture may be divided into tiles or the like according to the meaning of objects in the image, and the decoding side may select tiles to decode and decode only a portion of the area. Furthermore, by storing the object's attributes (such as a person, a car, or a ball) and its position in the video (such as a coordinate position in the same image) as meta information, the decoding side can identify the position of a desired object based on the meta information and determine the tile containing the object. For example, as shown in FIG. 34, the meta information is stored using a data storage structure different from that of pixel data, such as an SEI message in HEVC. This meta information indicates, for example, the position, size, or color of the main object.
[0598] Furthermore, meta information may be stored in units consisting of multiple pictures, such as streams, sequences, or random access units, which allows the decoding side to obtain the time when a specific person appears in the video, and by combining this with information in units of pictures, it is possible to identify the picture in which the object exists and the position of the object within the picture.
[0599] [Webpage optimization] FIG. 35 is a diagram showing an example of a web page display screen on a computer ex111 or the like. FIG. 36 is a diagram showing an example of a web page display screen on a smartphone ex115 or the like. As shown in FIGS. 35 and 36, a web page may include multiple link images that are links to image content, and the appearance of the web page may differ depending on the device used to view the page. When multiple link images are visible on the screen, the display device (decoding device) may display a still image or I-picture contained in each content as a link image, display a video such as a GIF animation using multiple still images or I-pictures, or receive only the base layer and decode and display the video until the user explicitly selects a link image, or until the link image approaches the center of the screen or until the entire link image is within the screen.
[0600] When a link image is selected by a user, the display device decodes the base layer with the highest priority. If the HTML constituting the web page contains information indicating that the content is scalable, the display device may decode up to the enhancement layer. To ensure real-time performance, before a selection is made or when the communication bandwidth is very limited, the display device decodes and displays only forward-referenced pictures (I-pictures, P-pictures, and forward-reference-only B-pictures), thereby reducing the delay between the decoding time of the first picture and the display time (the delay from the start of content decoding to the start of display). Alternatively, the display device may intentionally ignore the picture reference relationships and roughly decode all B-pictures and P-pictures using forward reference, and then perform normal decoding as the number of received pictures increases over time.
[0601] [Autonomous driving] Furthermore, when transmitting and receiving still image or video data such as 2D or 3D map information for automatic driving or driving assistance of a vehicle, the receiving terminal may receive weather or construction information as meta information in addition to image data belonging to one or more layers, and may associate and decode these. Note that the meta information may belong to a layer, or may simply be multiplexed with the image data.
[0602] In this case, since a vehicle, drone, airplane, etc. including a receiving terminal moves, the receiving terminal can realize seamless reception and decoding while switching between base stations ex106 to ex110 by transmitting the location information of the receiving terminal at the time of a reception request. Also, the receiving terminal can dynamically switch how much meta information to receive or how much to update map information depending on the user's selection, user situation, or communication bandwidth status.
[0603] In this way, in the content supply system ex100, the client can receive, decode, and play back the encoded information sent by the user in real time.
[0604] [Distribution of personal content] Furthermore, the content supply system ex100 allows not only high-quality, long-duration content from video distribution companies, but also unicast or multicast distribution of low-quality, short-duration content from individuals. It is expected that such personal content will continue to increase in the future. To improve the quality of personal content, the server may perform editing before encoding. This can be achieved, for example, with the following configuration.
[0605] During shooting, either in real time or after accumulating the footage, the server performs recognition processing such as detecting shooting errors, scene search, semantic analysis, and object detection from the original image or encoded data. Based on the recognition results, the server manually or automatically corrects out-of-focus or camera shake, deletes less important scenes (e.g., scenes with lower brightness or out-of-focus compared to other pictures), emphasizes object edges, changes color, and performs other editing. The server then encodes the edited data based on the editing results. It is also known that viewing rates decrease if the shooting time is too long. Therefore, the server may automatically clip not only less important scenes as described above but also scenes with little movement, based on the image processing results, so that the content falls within a specific time range depending on the shooting time. Alternatively, the server may generate and encode a digest based on the results of the semantic analysis of the scene.
[0606] In some cases, personal content may contain content that infringes copyright, moral rights, or portrait rights, or may cause the scope of sharing to exceed the intended scope, resulting in inconvenience to individuals. Therefore, for example, the server may intentionally defocus images of people's faces on the periphery of the screen or the interior of a house before encoding. The server may also recognize whether the image to be encoded contains the face of a person other than a pre-registered person, and if so, perform processing such as blurring the face. Alternatively, as pre- or post-processing before encoding, the user may specify a person or background area they wish to modify in the image for copyright or other reasons, and the server may replace the specified area with another image or blur the focus. For a person, the server may track the person in the video and replace the image of the face.
[0607] Furthermore, because viewing personal content with small data volumes requires real-time performance, the decoding device first receives the base layer as a top priority, and then decodes and plays it back, depending on the bandwidth. The decoding device may also receive an enhancement layer during this time, and if the content is played back more than twice, such as when playback is looped, it may play back high-quality video, including the enhancement layer. A stream that has undergone scalable encoding in this way can provide an experience in which the video appears rough when not selected or when viewing begins, but gradually becomes smoother and the image quality improves. In addition to scalable encoding, a similar experience can also be provided by configuring a single stream consisting of a rough stream played the first time and a second stream that is encoded with reference to the first video.
[0608] [Other use cases] Furthermore, these encoding or decoding processes are generally performed by the LSIex500 possessed by each terminal. The LSIex500 may be a single chip or may be configured with multiple chips. It is also possible to incorporate video encoding or decoding software into some kind of recording medium (such as a CD-ROM, flexible disk, or hard disk) that can be read by the computer ex111, and perform the encoding or decoding process using that software. Furthermore, if the smartphone ex115 is equipped with a camera, video data captured by the camera may be transmitted. This video data is data that has been encoded by the LSIex500 possessed by the smartphone ex115.
[0609] The LSIex500 may be configured to download and activate application software. In this case, the terminal first determines whether it supports the content encoding method or has the capability to execute a specific service. If the terminal does not support the content encoding method or does not have the capability to execute a specific service, the terminal downloads the codec or application software and then acquires and plays the content.
[0610] Furthermore, at least one of the video encoding device (image encoding device) or video decoding device (image decoding device) of each of the above embodiments can be incorporated into a digital broadcasting system, not limited to the content supply system ex100 via the Internet ex101. Since multiplexed data in which video and audio are multiplexed is transmitted and received over broadcast radio waves using a satellite or the like, the content supply system ex100 is more suited to multicast than the content supply system ex100, which is more suited to unicast, but similar applications are possible with regard to encoding and decoding processes.
[0611] [Hardware configuration] FIG. 37 is a diagram illustrating a smartphone ex115. FIG. 38 is a diagram illustrating an example configuration of the smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves to and from the base station ex110, a camera unit ex465 capable of capturing video and still images, and a display unit ex458 for displaying video captured by the camera unit ex465 and decoded data of the video and other images received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466 such as a touch panel, an audio output unit ex457 such as a speaker for outputting voice or sound, an audio input unit ex456 such as a microphone for inputting voice, a memory unit ex467 capable of storing encoded data or decoded data such as captured video or still images, recorded voice, received video or still images, and email, and a slot unit ex464 that serves as an interface with a SIM ex468 for identifying users and authenticating access to various data, including networks. In addition, an external memory may be used instead of the memory unit ex467.
[0612] In addition, a main control unit ex460 that comprehensively controls the display unit ex458 and operation unit ex466, etc., is connected to a power supply circuit unit ex461, an operation input control unit ex462, a video signal processing unit ex455, a camera interface unit ex463, a display control unit ex459, a modulation / demodulation unit ex452, a multiplexing / separation unit ex453, an audio signal processing unit ex454, a slot unit ex464, and a memory unit ex467 via a bus ex470.
[0613] When the power key is turned on by a user, the power supply circuit unit ex461 supplies power from the battery pack to each unit, thereby starting up the smartphone ex115 into an operational state.
[0614] The smartphone ex115 processes calls, data communications, and other communications under the control of a main control unit ex460, which includes a CPU, ROM, RAM, and the like. During calls, the audio signal collected by the audio input unit ex456 is converted into a digital audio signal by the audio signal processing unit ex454, which then undergoes spectrum spread processing by the modulation / demodulation unit ex452, digital-to-analog conversion processing and frequency conversion processing by the transmission / reception unit ex451, and then transmitted via the antenna ex450. The received data is amplified, frequency-converted, and analog-to-digital converted, then subjected to spectrum despreading processing by the modulation / demodulation unit ex452, and converted into an analog audio signal by the audio signal processing unit ex454, which then outputs the amplified data from the audio output unit ex457. During data communications mode, text, still images, or video data is sent to the main control unit ex460 via the operation input control unit ex462 by operating the operation unit ex466, etc., of the main unit, and similar transmission and reception processing is performed. When transmitting video, still images, or video and audio in the data communication mode, the video signal processing unit ex455 compression-encodes the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 using the video encoding method described in each of the above embodiments, and sends the encoded video data to the multiplexing / demultiplexing unit ex453. The audio signal processing unit ex454 also encodes the audio signal picked up by the audio input unit ex456 while the camera unit ex465 is capturing video, still images, etc., and sends the encoded audio data to the multiplexing / demultiplexing unit ex453. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and encoded audio data using a predetermined method, and modulates and converts the data in the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451 before transmitting the data via the antenna ex450.
[0615] When receiving video attached to an email or chat, or video linked to a web page, etc., the multiplexed data received via the antenna ex450 is decoded by the multiplexing / separation unit ex453, which separates the multiplexed data into a video data bitstream and an audio data bitstream. The multiplexing / separation unit ex453 then supplies the encoded video data to the video signal processing unit ex455 via the synchronization bus ex470, and supplies the encoded audio data to the audio signal processing unit ex454. The video signal processing unit ex455 decodes the video signal using a video decoding method corresponding to the video encoding method described in each of the above embodiments, and displays the video or still image included in the linked video file on the display unit ex458 via the display control unit ex459. The audio signal processing unit ex454 decodes the audio signal, and the audio is output from the audio output unit ex457. Note that with the widespread use of real-time streaming, audio playback may be socially inappropriate depending on the user's circumstances. Therefore, a configuration that initially plays only the video data without playing the audio signal is desirable. The audio may be played in synchronization only when the user performs an operation such as clicking on the video data.
[0616] Although the smartphone ex115 has been used as an example, three types of implementation are possible for the terminal: a transmitting / receiving terminal having both an encoder and a decoder, a transmitting terminal having only an encoder, and a receiving terminal having only a decoder. Furthermore, in the digital broadcasting system, multiplexed data in which audio data and the like are multiplexed onto video data is received or transmitted, but the multiplexed data may also include text data related to the video in addition to audio data, or the video data itself may be received or transmitted instead of the multiplexed data.
[0617] While the main control unit ex460, which includes a CPU, controls the encoding and decoding processes, devices often also include a GPU. Therefore, a configuration is possible in which a memory shared by the CPU and GPU, or a memory with addresses managed for common use, is used to take advantage of the GPU's performance and process a large area at once. This shortens encoding time, ensures real-time performance, and achieves low latency. It is particularly efficient to perform motion estimation, deblocking filtering, SAO (Sample Adaptive Offset), and transformation and quantization processes at a picture level or other unit in the GPU rather than the CPU. [Industrial Applicability]
[0618] The present disclosure is applicable to, for example, television receivers, digital video recorders, car navigation systems, mobile phones, digital cameras, digital video cameras, video conference systems, electronic mirrors, and the like. [Explanation of symbols]
[0619] 100 Encoding device 102 Division 104 Subtraction section 106 Conversion unit 108 Quantization section 110 Entropy coding unit 112, 204 Inverse quantization section 114, 206 Inverse conversion unit 116, 208 Addition section 118, 210 block memory 120, 212 Loop filter section 122, 214 frame memory 124, 216 Intra prediction section 126, 218 Inter prediction section 128, 220 Predictive control section 160, 260 circuits 162, 262 memory 200 Decryption Device 202 Entropy Decoding Unit
Claims
1. The circuit and a memory; The circuit determines, using the memory, to perform a first inter prediction process or a second inter prediction process based on information related to inter prediction; the first inter prediction process includes BIO (Bi-directional Optical Flow), the second inter prediction process includes a motion compensation process and does not include the BIO process; If it is determined that the BIO is to be executed, the circuit obtaining a plurality of first predicted images for the image block; obtaining gradient images for the plurality of first predicted images; generating a predicted image of the image block using the plurality of first predicted images and the gradient image; When it is determined that the motion compensation process is to be performed, the circuit defining a plurality of partitions in the image block; obtaining a second predicted image for each of the plurality of partitions using a motion vector; generating a predicted image of the image block using a plurality of the second predicted images; the motion vector is selected from a list of motion vector candidates for the image block. Encoding device.
2. The circuit and a memory; The circuit determines, using the memory, to perform a first inter prediction process or a second inter prediction process based on information related to inter prediction; the first inter prediction process includes BIO (Bi-directional Optical Flow), the second inter prediction process includes a motion compensation process and does not include the BIO process; If it is determined that the BIO is to be executed, the circuit obtaining a plurality of first predicted images for the image block; obtaining gradient images for the plurality of first predicted images; generating a predicted image of the image block using the plurality of first predicted images and the gradient image; When it is determined that the motion compensation process is to be performed, the circuit defining a plurality of partitions within the image block; obtaining a second predicted image for each of the plurality of partitions using a motion vector; generating a predicted image of the image block using a plurality of the second predicted images; the motion vector is selected from a list of motion vector candidates for the image block. Decryption device.
3. A bitstream generating device for generating a bitstream, comprising: The circuit and a memory connected to the circuit; The circuit, in operation, generating information related to inter prediction for causing a decoding device to encode a target block according to a prediction process; including information about the inter prediction in a bitstream; determining, based on the information related to the inter prediction, to perform a first inter prediction process or a second inter prediction process; the first inter prediction process includes BIO (Bi-directional Optical Flow), the second inter prediction process includes a motion compensation process and does not include the BIO process; If it is determined that the BIO is to be executed, the circuit obtaining a plurality of first predicted images for the image block; obtaining gradient images for the plurality of first predicted images; generating a predicted image of the image block using the plurality of first predicted images and the gradient image; When it is determined that the motion compensation process is to be performed, the circuit defining a plurality of partitions within the image block; obtaining a second predicted image for each of the plurality of partitions using a motion vector; generating a predicted image of the image block using a plurality of the second predicted images; the motion vector is selected from a list of motion vector candidates for the image block. Bitstream generator.