Encoding device, decoding device, and non-transitory computer readable medium
By selecting the appropriate encoding mode and segmentation method in the moving image processing, the problem of insufficient processing of moving image blocks is solved, and efficient encoding and decoding of image blocks is realized.
Patent Information
- Application Number
- CN202411298980.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2018-01-30
- Filing Date
- 2019-01-30
- Publication Date
- 2024-12-27
AI Technical Summary
The image blocks contained in moving images are not efficient enough to increase processing volume.
By adopting an encoding device and a decoding device, the encoding mode is selected from the decoding side motion vector refinement encoding mode and the partition encoding mode in action, a predicted image is generated, and the segmentation mode of the image block is switched under appropriate circumstances to reduce the processing amount.
Efficient processing of image blocks is achieved, code amount and processing amount are reduced, non-rectangular partition generation is suppressed, and image encoding and decoding efficiency is improved.
Smart Images

Figure CN119211543A_ABST
Abstract
Description
[0001] This application is a division of an invention patent application with an application date of January 30, 2019, application number 201980010430.2, and invention name “Encoding device, decoding device, encoding method and decoding method”. Technical Field
[0002] The present invention relates to an encoding device for encoding an image block, etc. Background Art
[0003] Conventionally, there is a standard for encoding moving images, called HEVC (High Efficiency Video Coding) H.265 (Non-Patent Document 1).
[0004] Prior art literature
[0005] Non-patent literature
[0006] Non-patent document 1: H.265 (ISO / IEC 23008-2HEVC) / HEVC (High Efficiency Video Coding) Summary of the invention
[0007] Problems to be solved by the invention
[0008] However, if image blocks included in a moving image are not processed efficiently, an increase in the amount of processing will occur.
[0009] Therefore, the present invention provides an encoding device and the like that can efficiently process image blocks.
[0010] Means for solving problems
[0011] A coding device according to a technical solution of the present invention comprises a circuit and a memory, wherein the circuit uses the memory and, in operation, selects a coding mode from candidates including a decoding side motion vector refinement (DMVR) coding mode and a partition coding mode. When the DMVR coding mode is selected, the circuit obtains a first motion vector of a first image block, derives a second motion vector from the first motion vector using a motion search, and generates a predicted image of the first image block using the second motion vector. When the partition coding mode is selected, the circuit determines a plurality of partitions in the second image block, obtains a third motion vector of each partition, generates a predicted image of the second image block using the third motion vector, and does not derive a fourth motion vector from the third motion vector using a motion search, and generates a flag indicating the partition coding mode.
[0012] In addition, these inclusive or specific technical solutions can also be implemented by systems, devices, methods, integrated circuits, computer programs, or non-temporary recording media such as computer-readable CD-ROMs, or by any combination of systems, devices, methods, integrated circuits, computer programs, and recording media.
[0013] Effects of the Invention
[0014] An encoding device and the like according to one technical solution of the present invention can efficiently process image blocks. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a block diagram showing the functional structure of the encoding device related to embodiment 1.
[0016] Figure 2 This is a diagram showing an example of block division according to the first embodiment.
[0017] Figure 3 This is a table showing the transformation basis functions corresponding to each transformation type.
[0018] Figure 4A This is a diagram showing an example of the shape of a filter used in ALF.
[0019] Figure 4B FIG. 1 is a diagram showing another example of the shape of the filter used in ALF.
[0020] Figure 4C FIG. 1 is a diagram showing another example of the shape of the filter used in ALF.
[0021] Figure 5A This is a diagram showing 67 intra prediction modes of intra prediction.
[0022] Figure 5B This is a flowchart for explaining the outline of the predicted image correction process based on the OBMC process.
[0023] Figure 5C This is a conceptual diagram for explaining the outline of the predicted image correction process based on the OBMC process.
[0024] Figure 5D This is a diagram showing an example of FRUC.
[0025] Figure 6 This is a diagram for explaining pattern matching (bidirectional matching) between two blocks along a motion trajectory.
[0026] Figure 7 This is a diagram used to explain pattern matching (template matching) between a template in a current picture and a block in a reference picture.
[0027] Figure 8This is a diagram for explaining a model assuming uniform linear motion.
[0028] Fig. 9A This is a diagram for explaining derivation of a motion vector in sub-block units based on motion vectors of a plurality of adjacent blocks.
[0029] Fig. 9B This is a diagram for explaining the outline of motion vector derivation processing based on the merge mode.
[0030] Fig. 9C This is a conceptual diagram used to explain the outline of DMVR processing.
[0031] Fig.9D This is a diagram for explaining an overview of a method for generating a predicted image using a brightness correction process based on an LIC process.
[0032] Fig.10 This is a block diagram showing the functional structure of a decoding device according to Embodiment 1.
[0033] Fig.11 This is a flowchart showing the encoding process and the decoding process of the image block in the first method of implementation mode 1.
[0034] Fig. 12A This is a schematic diagram showing the four-division in Implementation Example 1.
[0035] Fig. 12B This is a schematic diagram showing a first example of two-division in the first embodiment.
[0036] Fig. 12C This is a schematic diagram showing a second example of two-division in the first embodiment.
[0037] Fig.12D This is a schematic diagram showing a first example of three-division in the first embodiment.
[0038] Fig.12E This is a schematic diagram showing a second example of the three-division in the first embodiment.
[0039] Fig.12F This is a schematic diagram showing a first example of oblique division in the first embodiment.
[0040] Figure 12G This is a schematic diagram showing a second example of the oblique division in the first embodiment.
[0041] Fig.12H This is a schematic diagram showing a third example of oblique division in the first embodiment.
[0042] Fig.12I This is a schematic diagram showing a first example of a combination of a plurality of divisions in the first embodiment.
[0043] Fig.12J This is a schematic diagram showing a second example of a combination of a plurality of divisions in the first embodiment.
[0044] Fig.13A This is a schematic diagram showing the triangular partitioning in Implementation Example 1.
[0045] Fig. 13B It is a schematic diagram showing the L-shaped partition in the first embodiment.
[0046] Fig. 13C It is a schematic diagram showing the pentagonal partition in Implementation Example 1.
[0047] Fig.13D This is a schematic diagram showing the hexagonal partitioning in Implementation Example 1.
[0048] Fig.13E This is a schematic diagram showing polygonal partitions in Implementation Example 1.
[0049] Fig.14 This is a flowchart showing the ATMVP processing in Implementation Example 1.
[0050] Fig.15 This is a conceptual diagram showing the corresponding block determination process in the ATMVP process.
[0051] Fig.16 This is a conceptual diagram showing the process of deriving a motion vector for a sub-block in the ATMVP process.
[0052] Fig.17 This is a flowchart showing the STMVP process in the first embodiment.
[0053] Fig.18 This is a flowchart showing the DMVR processing in the first embodiment.
[0054] Fig.19 This is a flowchart showing a first example of the encoding process and the decoding process of the flag in the first embodiment.
[0055] Fig. 20 This is a flowchart showing a second example of the encoding process and the decoding process of the flag in the first embodiment.
[0056] Fig.21 This is a flowchart showing the encoding process and the decoding process of the image block in the second mode of implementation mode 1.
[0057] Fig. 22 This is a flowchart showing the encoding process and decoding process of an image block in the third mode of implementation mode 1.
[0058] Fig.23This is a flowchart showing the encoding process and decoding process of the image block in the fourth mode of implementation mode 1.
[0059] Fig.24 This is a block diagram showing an example of installing the encoding device according to the first embodiment.
[0060] Fig.25 This is a flowchart showing a first operation example of the encoding device according to the first embodiment.
[0061] Fig.26 This is a flowchart showing a second operation example of the encoding device related to implementation mode 1.
[0062] Fig. 27 This is a flowchart showing the third operation example of the encoding device related to implementation mode 1.
[0063] Fig.28 This is a block diagram showing an implementation example of a decoding device related to embodiment 1.
[0064] Fig.29 This is a flowchart showing a first operation example of the decoding device according to the first embodiment.
[0065] Fig.30 This is a flowchart showing a second operation example of the decoding device according to the first embodiment.
[0066] Fig.31 This is a flowchart showing the third operation example of the decoding device related to embodiment 1.
[0067] Fig.32 It is an overall structural diagram of the content supply system that realizes content distribution services.
[0068] Fig.33 This is a diagram showing an example of a coding structure in the case of scalable coding.
[0069] Fig.34 This is a diagram showing an example of a coding structure in the case of scalable coding.
[0070] Fig.35 This is a diagram showing an example of a display screen of a web page.
[0071] Fig.36 This is a diagram showing an example of a display screen of a web page.
[0072] Fig.37 The diagram shows an example of a smart phone.
[0073] Fig.38 This is a block diagram showing a structural example of a smart phone. DETAILED DESCRIPTION
[0074] (Foundation that forms the basis of the present invention)
[0075] For example, when encoding an image block included in a moving image, the encoding device divides the image block into a plurality of partitions and performs prediction processing on each partition. The encoding device may also perform inter-frame prediction on the partition. Then, the encoding device uses the result of the prediction processing to encode the image block. Specifically, the encoding device encodes the difference of the predicted image obtained by the prediction processing from the image block. Thus, the amount of code is reduced.
[0076] When decoding an image block included in a moving image, the decoding device divides the image block into a plurality of partitions and performs prediction processing on each partition. The decoding device may also perform inter-frame prediction on the partition. Then, the decoding device decodes the image block using the result of the prediction processing. Specifically, the decoding device decodes the encoded difference, applies the predicted image obtained by the prediction processing to the encoded difference, and thereby restores the image block. Thus, the image block is decoded.
[0077] In the above-mentioned image block segmentation, it is studied to segment the image block into a plurality of partitions including non-rectangular partitions. However, when the image block is segmented into a plurality of partitions including non-rectangular partitions, the prediction process becomes complicated and the processing amount increases.
[0078] Therefore, for example, an encoding device according to a technical solution of the present invention includes a circuit and a memory, wherein the circuit uses the memory to perform a step of encoding an image block, and in the step of encoding 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 threshold values satisfy a prescribed relationship, and when it is determined that the one or more size parameters and the one or more threshold values satisfy the prescribed relationship, encodes a segmentation parameter indicating whether the image block is divided into a plurality of partitions including non-rectangular partitions, and when the segmentation parameter indicates that the image block is divided into the plurality of partitions, the image block is divided into the plurality of partitions for encoding.
[0079] Thus, the encoding device can switch whether to divide the image block into a plurality of 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. Therefore, the encoding device can efficiently process the image block.
[0080] Furthermore, for example, when the circuit determines that the one or more size parameters and the one or more threshold values do not satisfy the predetermined relationship, the circuit encodes the image block without encoding the division parameter.
[0081] This can reduce the amount of code. In addition, the encoding device can reduce the amount of processing for encoding the segmentation parameters.
[0082] In addition, for example, when the circuit determines that the one or more size parameters and the one or more thresholds do not satisfy the predetermined relationship, the circuit does not divide the image block or divides the image block into a plurality of rectangular partitions for encoding.
[0083] This allows the encoding device to suppress the division of an image block into a plurality of partitions including non-rectangular partitions.
[0084] In addition, for example, when the segmentation parameter indicates that the image block is not segmented into the plurality of partitions, the circuit does not segment the image block or segments the image block into a plurality of rectangular partitions for encoding.
[0085] This allows the encoding device to suppress the division of an image block into a plurality of partitions including non-rectangular partitions.
[0086] In addition, for example, the above-mentioned one or more thresholds are one threshold, and the above-mentioned prescribed relationship is that the above-mentioned one or more size parameters are respectively above the above-mentioned one threshold, or at least one of the above-mentioned one or more size parameters is above the above-mentioned one threshold.
[0087] Thus, when one or more size parameters are equal to or greater than a threshold value, the encoding device can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions.
[0088] In addition, for example, the above-mentioned one or more thresholds are the first threshold and the second threshold, the above-mentioned first threshold is below the above-mentioned second threshold, and the above-mentioned prescribed relationship is that the above-mentioned one or more size parameters are respectively above the above-mentioned first threshold and below the above-mentioned second threshold, or at least one of the above-mentioned one or more size parameters is above the above-mentioned first threshold and below the above-mentioned second threshold.
[0089] Thus, when one or more size parameters are greater than or equal to the first threshold and less than or equal to the second threshold, the encoding device can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions.
[0090] In addition, for example, the above-mentioned non-rectangular partition is a triangular partition.
[0091] Thus, when one or more size parameters related to the size of the image block and one or more threshold values satisfy a predetermined relationship, the encoding device can switch whether to divide the image block into a plurality of partitions including the triangular partition.
[0092] In addition, for example, the above-mentioned one or more size parameters include at least one of the ratio of the width of the above-mentioned image block to the height of the above-mentioned image block, the ratio of the height of the above-mentioned image block to the width of the above-mentioned image block, the width of the above-mentioned image block and the height of the above-mentioned image block.
[0093] Thus, the encoding device can use at least one of the ratio of the width to the height of the image block, the ratio of the height to the width of the image block, the width of the image block, and the height of the image block as the size parameter.
[0094] In addition, for example, the one or more threshold values described above are each equal to or greater than zero.
[0095] Thus, when one or more size parameters and one or more threshold values each equal to or greater than zero satisfy a predetermined relationship, the encoding device can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions.
[0096] Furthermore, for example, the one or more threshold values indicate a restriction range of a 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.
[0097] Thus, the encoding device can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions when one or more size parameters and one or more thresholds indicating a limit range of a ratio of width to height satisfy a predetermined relationship.
[0098] In addition, for example, a decoding device according to a technical solution of the present invention includes a circuit and a memory, wherein the circuit uses the memory to perform 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 threshold values satisfy a prescribed relationship, and when it is determined that the one or more size parameters and the one or more threshold values satisfy the prescribed relationship, decodes a segmentation parameter indicating whether the image block is divided into a plurality of partitions including non-rectangular partitions, and when the segmentation parameter indicates that the image block is divided into the plurality of partitions, divides the image block into the plurality of partitions for decoding.
[0099] Thus, the decoding device can switch whether to divide the image block into a plurality of 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. Therefore, the decoding device can efficiently process the image block.
[0100] Furthermore, for example, when the circuit determines that the one or more size parameters and the one or more threshold values do not satisfy the predetermined relationship, the circuit decodes the image block without decoding the division parameter.
[0101] This can reduce the amount of code. In addition, the decoding device can reduce the amount of processing for decoding the partition parameters.
[0102] In addition, for example, when the circuit determines that the one or more size parameters and the one or more thresholds do not satisfy the predetermined relationship, the circuit does not divide the image block or divides the image block into a plurality of rectangular partitions for decoding.
[0103] This allows the decoding device to suppress the division of an image block into a plurality of partitions including non-rectangular partitions.
[0104] In addition, for example, when the segmentation parameter indicates that the image block is not segmented into the plurality of partitions, the circuit does not segment the image block or segments the image block into a plurality of rectangular partitions for decoding.
[0105] This allows the decoding device to suppress the division of an image block into a plurality of partitions including non-rectangular partitions.
[0106] In addition, for example, the above-mentioned one or more thresholds are one threshold, and the above-mentioned prescribed relationship is that the above-mentioned one or more size parameters are respectively above the above-mentioned one threshold, or at least one of the above-mentioned one or more size parameters is above the above-mentioned one threshold.
[0107] Thus, when one or more size parameters are equal to or greater than a threshold value, the decoding device can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions.
[0108] In addition, for example, the above-mentioned one or more thresholds are the first threshold and the second threshold, the above-mentioned first threshold is below the above-mentioned second threshold, and the above-mentioned prescribed relationship is that the above-mentioned one or more size parameters are respectively above the above-mentioned first threshold and below the above-mentioned second threshold, or at least one of the above-mentioned one or more size parameters is above the above-mentioned first threshold and below the above-mentioned second threshold.
[0109] Thus, when one or more size parameters are greater than or equal to the first threshold and less than or equal to the second threshold, the decoding device can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions.
[0110] In addition, for example, the above-mentioned non-rectangular partition is a triangular partition.
[0111] Thus, when one or more size parameters related to the size of the image block and one or more threshold values satisfy a predetermined relationship, the decoding device can switch whether to divide the image block into a plurality of partitions including the triangular partition.
[0112] In addition, for example, the above-mentioned one or more size parameters include at least one of the ratio of the width of the above-mentioned image block to the height of the above-mentioned image block, the ratio of the height of the above-mentioned image block to the width of the above-mentioned image block, the width of the above-mentioned image block and the height of the above-mentioned image block.
[0113] Thus, the decoding device can use at least one of the ratio of the width to the height of the image block, the ratio of the height to the width of the image block, the width of the image block, and the height of the image block as the size parameter.
[0114] In addition, for example, the one or more threshold values described above are each equal to or greater than zero.
[0115] Thus, when one or more size parameters and one or more threshold values each equal to or greater than zero satisfy a predetermined relationship, the decoding device can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions.
[0116] Furthermore, for example, the one or more threshold values indicate a restriction range of a 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.
[0117] Thus, the decoding device can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions when one or more size parameters and one or more thresholds indicating a limit range of a ratio of width to height satisfy a predetermined relationship.
[0118] In addition, for example, a coding method according to a technical solution of the present invention includes a step of encoding an image block. In the step of encoding the image block, one or more size parameters related to the size of the image block are obtained, and it is determined whether the one or more size parameters and one or more threshold values satisfy a prescribed relationship. If it is determined that the one or more size parameters and the one or more threshold values satisfy the prescribed relationship, a segmentation parameter indicating whether the image block is divided into a plurality of partitions including non-rectangular partitions is encoded. If the segmentation parameter indicates that the image block is divided into the plurality of partitions, the image block is divided into the plurality of partitions and encoded.
[0119] Thus, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship, it is possible to switch whether to divide the image block into a plurality of partitions including non-rectangular partitions. Therefore, the image block can be processed efficiently.
[0120] In addition, for example, a decoding method according to a technical solution of the present invention includes 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 threshold values satisfy a prescribed relationship, and when it is determined that the one or more size parameters and the one or more threshold values satisfy the prescribed relationship, decodes a segmentation parameter indicating whether the image block is segmented into a plurality of partitions including non-rectangular partitions, and when the segmentation parameter indicates that the image block is segmented into the plurality of partitions, segments the image block into the plurality of partitions for decoding.
[0121] Thus, when one or more size parameters related to the size of the image block and one or more thresholds satisfy a predetermined relationship, it is possible to switch whether to divide the image block into a plurality of partitions including non-rectangular partitions. Therefore, the image block can be processed efficiently.
[0122] In addition, for example, an encoding device according to a technical solution of the present invention includes a circuit and a memory, wherein the circuit uses the memory to perform: a step of dividing an image block into a plurality of partitions; a step of obtaining a prediction image for a partition included in the plurality of partitions; and a step of encoding the image block using the prediction image, wherein in the step of obtaining the prediction image, the circuit determines whether the partition is a non-rectangular partition, and when it is determined that the partition is not a non-rectangular partition, the circuit uses a first motion vector for the partition to obtain a first prediction image for the partition, uses the first prediction image to obtain a second motion vector for the partition, and uses the second motion vector to obtain a second prediction image for the partition as the prediction image, and when it is determined that the partition is a non-rectangular partition, the circuit uses the first motion vector instead of the second motion vector to obtain the first prediction image as the prediction image.
[0123] Thus, the encoding device can suppress the operation of two stages for non-rectangular partitions, and can suppress the increase in the amount of processing. Therefore, the encoding device can process image blocks efficiently.
[0124] Also, for example, when the partition is a triangular partition, the circuit determines that the partition is a non-rectangular partition.
[0125] This allows the encoding device to suppress an increase in the amount of processing required for triangle partitioning.
[0126] In addition, for example, the predicted image obtained when it is determined that the partition is not a non-rectangular partition is the same as the part corresponding to the partition in the predicted image obtained for the image block in a prescribed prediction mode without dividing the image block into the plurality of partitions.
[0127] Thus, the encoding device can obtain a prediction image for a rectangular partition, similar to the case where a prediction image is obtained for an image block without dividing the image block into a plurality of partitions. Therefore, the encoding device can simplify processing.
[0128] Furthermore, for example, the circuit performs motion estimation using the first predicted image to obtain the second motion vector.
[0129] Thus, the encoding device can obtain an appropriate second motion vector using the first predicted image, and can obtain an appropriate second predicted image using the appropriate second motion vector.
[0130] In addition, for example, a decoding device according to a technical solution of the present invention includes a circuit and a memory, wherein the circuit uses the memory to perform: a step of dividing an image block into a plurality of partitions; a step of obtaining a prediction image for a partition included in the plurality of partitions; and a step of decoding the image block using the prediction image, wherein in the step of obtaining the prediction image, the circuit determines whether the partition is a non-rectangular partition, and when it is determined that the partition is not a non-rectangular partition, the circuit obtains a first prediction image for the partition using a first motion vector for the partition, obtains a second motion vector for the partition using the first prediction image, and obtains a second prediction image for the partition using the second motion vector as the prediction image, and when it is determined that the partition is a non-rectangular partition, the circuit obtains the first prediction image as the prediction image without using the second motion vector.
[0131] As a result, the decoding device can suppress two-stage operations for non-rectangular partitions, and can suppress an increase in the amount of processing. Therefore, the decoding device can efficiently process image blocks.
[0132] Also, for example, when the partition is a triangular partition, the circuit determines that the partition is a non-rectangular partition.
[0133] This allows the decoding device to suppress an increase in the amount of processing required to partition the triangle.
[0134] In addition, for example, the predicted image obtained when it is determined that the partition is not a non-rectangular partition is the same as the part corresponding to the partition in the predicted image obtained for the image block in a prescribed prediction mode without dividing the image block into the plurality of partitions.
[0135] Thus, the decoding device can obtain a prediction image for a rectangular partition, similar to the case where a prediction image is obtained for an image block without dividing the image block into a plurality of partitions. Therefore, the decoding device can simplify processing.
[0136] Furthermore, for example, the circuit performs motion estimation using the first predicted image to obtain the second motion vector.
[0137] Thus, the decoding device can obtain an appropriate second motion vector using the first predicted image, and can obtain an appropriate second predicted image using the appropriate second motion vector.
[0138] In addition, for example, a coding method according to a technical solution of the present invention includes: a step of dividing an image block into a plurality of partitions; a step of obtaining a predicted image for a partition included in the plurality of partitions; and a step of 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 when it is determined that the partition is not a non-rectangular partition, a first predicted image for the partition is obtained using a first motion vector for the partition, a second motion vector for the partition is obtained using the first predicted image, and a second predicted image for the partition is obtained using the second motion vector as the predicted image, and when it is determined that the partition is a non-rectangular partition, the first predicted image is obtained as the predicted image using the first motion vector instead of the second motion vector.
[0139] This makes it possible to suppress the operation of two stages for non-rectangular partitions, and suppress the increase in the amount of processing. Therefore, the image block can be processed efficiently.
[0140] In addition, for example, a decoding method related to a technical solution of the present invention includes: a step of dividing an image block into multiple partitions; a step of obtaining a predicted image for a partition included in the multiple partitions; and a step of 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 when it is determined that the partition is not a non-rectangular partition, a first predicted image for the partition is obtained using a first motion vector for the partition, a second motion vector for the partition is obtained using the first predicted image, and a second predicted image for the partition is obtained using the second motion vector as the predicted image, and when it is determined that the partition is a non-rectangular partition, the first predicted image is obtained as the predicted image without using the second motion vector.
[0141] This makes it possible to suppress the operation of two stages for non-rectangular partitions, and suppress the increase in the amount of processing. Therefore, the image block can be processed efficiently.
[0142] In addition, for example, an encoding device according to a technical solution of the present invention includes a circuit and a memory, wherein the circuit uses the memory to perform: a step of dividing an image block into a plurality of partitions; a step of obtaining a prediction image for a partition included in the plurality of partitions; and a step of encoding the image block using the prediction image, wherein in the step of obtaining the prediction image, the circuit determines whether the partition is a non-rectangular partition, and when it is determined that the partition is not a non-rectangular partition, obtains a first prediction image for the partition, obtains a gradient image for the first prediction image, obtains a second prediction image as the prediction image using the first prediction image and the gradient image, and when it is determined that the partition is a non-rectangular partition, obtains the first prediction image as the prediction image without using the gradient image.
[0143] Thus, the encoding device can suppress the use of gradient images for non-rectangular partitions, and can suppress an increase in the amount of processing. Therefore, the encoding device can efficiently process image blocks.
[0144] Also, for example, when the partition is a triangular partition, the circuit determines that the partition is a non-rectangular partition.
[0145] This allows the encoding device to suppress an increase in the amount of processing required for triangle partitioning.
[0146] In addition, for example, the predicted image obtained when it is determined that the partition is not a non-rectangular partition is the same as the part corresponding to the partition in the predicted image obtained for the image block in a prescribed prediction mode without dividing the image block into the plurality of partitions.
[0147] Thus, the encoding device can obtain a prediction image for a rectangular partition, similar to the case where a prediction image is obtained for an image block without dividing the image block into a plurality of partitions. Therefore, the encoding device can simplify processing.
[0148] Furthermore, for example, the circuit obtains the gradient image by applying a filter for extracting a difference value between pixels to the first predicted image.
[0149] Thus, the encoding device can obtain an appropriate gradient image for the first predicted image, and can obtain an appropriate second predicted image using the appropriate gradient image.
[0150] In addition, for example, a decoding device according to a technical solution of the present invention includes a circuit and a memory, wherein the circuit uses the memory to perform: a step of dividing an image block into a plurality of partitions; a step of obtaining a prediction image for a partition included in the plurality of partitions; and a step of decoding the image block using the prediction image, wherein in the step of obtaining the prediction image, the circuit determines whether the partition is a non-rectangular partition, and when it is determined that the partition is not a non-rectangular partition, obtains a first prediction image for the partition, obtains a gradient image for the first prediction image, obtains a second prediction image as the prediction image using the first prediction image and the gradient image, and when it is determined that the partition is a non-rectangular partition, obtains the first prediction image as the prediction image without using the gradient image.
[0151] Thus, the decoding device can suppress the use of gradient images for non-rectangular partitions, and can suppress an increase in the amount of processing. Therefore, the decoding device can efficiently process image blocks.
[0152] Also, for example, when the partition is a triangular partition, the circuit determines that the partition is a non-rectangular partition.
[0153] This allows the decoding device to suppress an increase in the amount of processing required to partition the triangle.
[0154] In addition, for example, the predicted image obtained when it is determined that the partition is not a non-rectangular partition is the same as the part corresponding to the partition in the predicted image obtained for the image block in a prescribed prediction mode without dividing the image block into the plurality of partitions.
[0155] Thus, the decoding device can obtain a prediction image for a rectangular partition, similar to the case where a prediction image is obtained for an image block without dividing the image block into a plurality of partitions. Therefore, the decoding device can simplify processing.
[0156] Furthermore, for example, the circuit obtains the gradient image by applying a filter for extracting a difference value between pixels to the first predicted image.
[0157] Thus, the decoding device can obtain an appropriate gradient image for the first predicted image, and can obtain an appropriate second predicted image using the appropriate gradient image.
[0158] In addition, for example, a coding method according to a technical solution of the present invention includes: a step of dividing an image block into a plurality of partitions; a step of obtaining a prediction image for a partition included in the plurality of partitions; and a step of encoding the image block using the prediction image, wherein in the step of obtaining the prediction image, it is determined whether the partition is a non-rectangular partition, and when it is determined that the partition is not a non-rectangular partition, a first prediction image for the partition is obtained, a gradient image for the first prediction image is obtained, a second prediction image is obtained as the prediction image using the first prediction image and the gradient image, and when it is determined that the partition is a non-rectangular partition, the gradient image is not used and the first prediction image is obtained as the prediction image.
[0159] As a result, for non-rectangular partitions, the increase in the amount of processing can be suppressed. Therefore, the image block can be processed efficiently.
[0160] In addition, for example, a decoding method according to a technical solution of the present invention includes: a step of dividing an image block into a plurality of partitions; a step of obtaining a prediction image for a partition included in the plurality of partitions; and a step of decoding the image block using the prediction image, wherein in the step of obtaining the prediction image, it is determined whether the partition is a non-rectangular partition, and when it is determined that the partition is not a non-rectangular partition, a first prediction image for the partition is obtained, a gradient image for the first prediction image is obtained, a second prediction image is obtained as the prediction image using the first prediction image and the gradient image, and when it is determined that the partition is a non-rectangular partition, the gradient image is not used and the first prediction image is obtained as the prediction image.
[0161] As a result, for non-rectangular partitions, the increase in the amount of processing can be suppressed. Therefore, the image block can be processed efficiently.
[0162] In addition, for example, a coding device according to a technical solution of the present invention comprises a circuit and a memory, wherein the circuit uses the memory to perform: a step of dividing an image block into a plurality of partitions; a step of generating a motion vector candidate list for a partition included in the plurality of partitions; a step of obtaining a motion vector for the partition from the motion vector candidate list; a step of performing an inter-frame prediction process on the partition using the motion vector for the partition; and a step of encoding the image block using the result of the inter-frame prediction process, wherein the circuit determines whether the partition is a non-rectangular partition in the step of generating the motion vector candidate list, and if the partition is determined to be a non-rectangular partition, the circuit determines whether the partition is a non-rectangular partition. In the case where the partition is not a non-rectangular partition, the motion vector candidate list is generated using multiple motion vectors for multiple spatially adjacent partitions spatially adjacent to the above partition, multiple motion vectors for multiple temporally adjacent partitions temporally adjacent to the above partition, and at least one motion vector among multiple motion vectors for multiple sub-partitions included in the above partition. In the case where the partition is determined to be a non-rectangular partition, the motion vector candidate list is generated using multiple motion vectors for the multiple spatially adjacent partitions and at least one motion vector among multiple motion vectors for the multiple temporally adjacent partitions without using the multiple motion vectors for the multiple sub-partitions.
[0163] Thus, the encoding device can suppress the use of multiple motion vectors for multiple sub-partitions for non-rectangular partitions, and can suppress an increase in the amount of processing. Therefore, the encoding device can efficiently process image blocks.
[0164] Also, for example, when the partition is a triangular partition, the circuit determines that the partition is a non-rectangular partition.
[0165] This allows the encoding device to suppress an increase in the amount of processing required for triangle partitioning.
[0166] In addition, for example, the plurality of motion vectors for the plurality of sub-partitions include motion vectors predicted from motion vectors for regions respectively adjacent to the plurality of sub-partitions in space or time.
[0167] Thus, the encoding device can use a motion vector predicted as a motion vector for a sub-partition from a motion vector for a region adjacent to the sub-partition.
[0168] In addition, 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.
[0169] Thus, the encoding device can generate a motion vector candidate list for a rectangular partition, similar to the case of generating a motion vector candidate list for an image block. Therefore, the encoding device can simplify the processing.
[0170] In addition, for example, each of the plurality of temporally adjacent partitions is a co-located partition corresponding to a position of the partition in a picture different from a picture including the partition.
[0171] Thus, the encoding apparatus can use the motion vector for the co-located partition as the motion vector for the temporally adjacent partition.
[0172] In addition, for example, a decoding device according to a technical solution of the present invention comprises a circuit and a memory, wherein the circuit uses the memory to perform: a step of dividing an image block into a plurality of partitions; a step of generating a motion vector candidate list for a partition included in the plurality of partitions; a step of obtaining a motion vector for the partition from the motion vector candidate list; a step of performing an inter-frame prediction process on the partition using the motion vector for the partition; and a step of decoding the image block using the result of the inter-frame prediction process, wherein the circuit determines whether the partition is a non-rectangular partition in the step of generating the motion vector candidate list, and if the partition is determined to be a non-rectangular partition, the circuit determines whether the partition is a non-rectangular partition. In the case where the partition is not a non-rectangular partition, the motion vector candidate list is generated using multiple motion vectors for multiple spatially adjacent partitions spatially adjacent to the above partition, multiple motion vectors for multiple temporally adjacent partitions temporally adjacent to the above partition, and at least one motion vector among multiple motion vectors for multiple sub-partitions included in the above partition. In the case where the partition is determined to be a non-rectangular partition, the motion vector candidate list is generated using multiple motion vectors for the multiple spatially adjacent partitions and at least one motion vector among multiple motion vectors for the multiple temporally adjacent partitions without using the multiple motion vectors for the multiple sub-partitions.
[0173] Thus, the decoding device can suppress the use of multiple motion vectors for multiple sub-partitions for a non-rectangular partition, and can suppress an increase in the amount of processing. Therefore, the decoding device can efficiently process an image block.
[0174] Also, for example, when the partition is a triangular partition, the circuit determines that the partition is a non-rectangular partition.
[0175] This allows the decoding device to suppress an increase in the amount of processing required to partition the triangle.
[0176] In addition, for example, the plurality of motion vectors for the plurality of sub-partitions include motion vectors predicted from motion vectors for regions respectively adjacent to the plurality of sub-partitions in space or time.
[0177] Thus, the decoding apparatus can use a motion vector predicted as a motion vector for a sub-partition from a motion vector for a region adjacent to the sub-partition.
[0178] In addition, 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.
[0179] Thus, the decoding device can generate a motion vector candidate list for a rectangular partition, similar to the case of generating a motion vector candidate list for an image block. Therefore, the decoding device can simplify the process.
[0180] In addition, for example, each of the plurality of temporally adjacent partitions is a co-located partition corresponding to a position of the partition in a picture different from a picture including the partition.
[0181] This allows the decoding apparatus to use a motion vector for a co-located partition as a motion vector for a temporally adjacent partition.
[0182] In addition, for example, a coding method related to a technical solution of the present invention includes: a step of dividing an image block into multiple partitions; a step of generating a motion vector candidate list for a partition included in the multiple partitions; a step of obtaining a motion vector for the partition from the motion vector candidate list; a step of performing inter-frame prediction processing on the partition using the motion vector for the partition; and a step of encoding the image block using the result of the inter-frame prediction processing. In the step of generating the motion vector candidate list, it is determined whether the partition is a non-rectangular partition. When it is determined that the partition is not a non-rectangular partition, the motion vector candidate list is generated using multiple motion vectors for multiple spatially adjacent partitions that are spatially adjacent to the partition, multiple motion vectors for multiple temporally adjacent partitions that are temporally adjacent to the partition, and at least one motion vector of multiple motion vectors for multiple sub-partitions included in the partition. When it is determined that the partition is a non-rectangular partition, the motion vector candidate list is generated using multiple motion vectors for the multiple spatially adjacent partitions and at least one motion vector of multiple motion vectors for the multiple temporally adjacent partitions without using the multiple motion vectors for the multiple sub-partitions.
[0183] This can suppress the use of multiple motion vectors for multiple sub-partitions for a non-rectangular partition, and can suppress an increase in the amount of processing. Therefore, the image block can be processed efficiently.
[0184] In addition, for example, a coding method related to a technical solution of the present invention includes: a step of dividing an image block into multiple partitions; a step of generating a motion vector candidate list for a partition included in the multiple partitions; a step of obtaining a motion vector for the partition from the motion vector candidate list; a step of performing inter-frame prediction processing on the partition using the motion vector for the partition; and a step of decoding the image block using the result of the inter-frame prediction processing. In the step of generating the motion vector candidate list, it is determined whether the partition is a non-rectangular partition. When it is determined that the partition is not a non-rectangular partition, the motion vector candidate list is generated using multiple motion vectors for multiple spatially adjacent partitions that are spatially adjacent to the partition, multiple motion vectors for multiple temporally adjacent partitions that are temporally adjacent to the partition, and at least one motion vector of multiple motion vectors for multiple sub-partitions included in the partition. When it is determined that the partition is a non-rectangular partition, the multiple motion vectors for the multiple sub-partitions are not used, and the motion vector candidate list is generated using multiple motion vectors for the multiple spatially adjacent partitions and at least one motion vector of multiple motion vectors for the multiple temporally adjacent partitions.
[0185] This can suppress the use of multiple motion vectors for multiple sub-partitions for a non-rectangular partition, and can suppress an increase in the amount of processing. Therefore, the image block can be processed efficiently.
[0186] In addition, for example, an encoding device according to a technical solution of the present invention includes a segmentation unit, an intra-frame prediction unit, an inter-frame prediction unit, a transformation unit, a quantization unit, an entropy coding unit, and a loop filter unit. The segmentation unit divides a picture into a plurality of image blocks. The intra-frame prediction unit performs intra-frame prediction on an image block included in the plurality of image blocks. The inter-frame prediction unit performs inter-frame prediction on the image block. The transformation unit transforms a prediction error between a predicted image obtained by the intra-frame prediction or the inter-frame prediction and an original image and generates a transformation coefficient. The quantization unit quantizes the transformation coefficient and generates a quantized coefficient. The entropy coding unit encodes the quantized coefficient and generates a coded bit stream. The loop filter unit applies a filter to a reconstructed image generated using the predicted image.
[0187] In addition, for example, the entropy coding unit performs a step of encoding the image block, obtains one or more size parameters related to the size of the image block in the step of encoding the image block, determines whether the one or more size parameters and one or more thresholds satisfy a prescribed relationship, and when it is determined that the one or more size parameters and the one or more thresholds satisfy the prescribed relationship, encodes a segmentation parameter indicating whether the image block is divided into a plurality of partitions including non-rectangular partitions, and when the segmentation parameter indicates that the image block is divided into the plurality of partitions, encodes the image block divided into the plurality of partitions.
[0188] In addition, for example, the inter-frame 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. 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 using a first motion vector for the partition, a second motion vector for the partition is obtained using the first predicted image, and a second predicted image for the partition is obtained as the predicted image using the second motion vector. If it is determined that the partition is a non-rectangular partition, the first predicted image is obtained as the predicted image using the first motion vector instead of the second motion vector.
[0189] In addition, for example, the inter-frame prediction unit performs the steps of dividing the image block into a plurality of partitions and obtaining a prediction image for a partition included in the plurality of partitions. In the step of obtaining the prediction 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 prediction image for the partition is obtained, a gradient image for the first prediction image is obtained, and a second prediction image is obtained as the prediction image using the first prediction image and the gradient image. If it is determined that the partition is a non-rectangular partition, the gradient image is not used and the first prediction image is obtained as the prediction image.
[0190] In addition, for example, the inter-frame prediction unit performs: a step of dividing the image block into a plurality of partitions; a step of generating a motion vector candidate list for a partition included in the plurality of partitions; a step of obtaining a motion vector for the partition from the motion vector candidate list; a step of performing inter-frame prediction processing on the partition using the motion vector for the partition. 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 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 at least one of 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 plurality of motion vectors for the plurality of sub-partitions are not used, and the motion vector candidate list is generated using a plurality of motion vectors for the plurality of spatially adjacent partitions and at least one of a plurality of motion vectors for the plurality of temporally adjacent partitions.
[0191] In addition, for example, a decoding device according to a technical solution of the present invention includes an entropy decoding unit, an inverse quantization unit, an inverse transformation unit, an intra-frame prediction unit, an inter-frame prediction unit, and a loop filter unit. The entropy decoding unit decodes quantization coefficients of partitions in a picture from a coded bit stream. The inverse quantization unit inversely quantizes the quantization coefficients and obtains transformation coefficients. The inverse transformation unit inversely transforms the transformation coefficients and obtains prediction errors. The intra-frame prediction unit performs intra-frame prediction on the partition. The inter-frame prediction unit performs inter-frame prediction on the partition. The loop filter unit applies a filter to a reconstructed image generated using a predicted image and the prediction error, and the predicted image is obtained by the intra-frame prediction or the inter-frame prediction.
[0192] In addition, for example, the entropy decoding unit performs a step of decoding the image block. In the step of decoding the image block, one or more size parameters related to the size of the image block are obtained, and it is determined whether the one or more size parameters and the one or more thresholds satisfy a prescribed relationship. When it is determined that the one or more size parameters and the one or more thresholds satisfy the prescribed relationship, a segmentation parameter indicating whether the image block is divided into a plurality of partitions including non-rectangular partitions is decoded. When the segmentation parameter indicates that the image block is divided into the plurality of partitions, the image block is divided into the plurality of partitions for decoding.
[0193] In addition, for example, the inter-frame 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. 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 using a first motion vector for the partition, a second motion vector for the partition is obtained using the first predicted image, and a second predicted image for the partition is obtained as the predicted image using the second motion vector. If it is determined that the partition is a non-rectangular partition, the first predicted image is obtained as the predicted image using the first motion vector instead of the second motion vector.
[0194] In addition, for example, the inter-frame prediction unit performs the steps of dividing the image block into a plurality of partitions and obtaining a prediction image for a partition included in the plurality of partitions. In the step of obtaining the prediction 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 prediction image for the partition is obtained, a gradient image for the first prediction image is obtained, and a second prediction image is obtained as the prediction image using the first prediction image and the gradient image. If it is determined that the partition is a non-rectangular partition, the gradient image is not used and the first prediction image is obtained as the prediction image.
[0195] In addition, for example, the inter-frame prediction unit performs: a step of dividing the image block into a plurality of partitions; a step of generating a motion vector candidate list for a partition included in the plurality of partitions; a step of obtaining a motion vector for the partition from the motion vector candidate list; a step of performing inter-frame prediction processing on the partition using the motion vector for the partition. 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 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 at least one of 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 plurality of motion vectors for the plurality of sub-partitions are not used, and the motion vector candidate list is generated using a plurality of motion vectors for the plurality of spatially adjacent partitions and at least one of a plurality of motion vectors for the plurality of temporally adjacent partitions.
[0196] Moreover, these inclusive or specific technical solutions may also be implemented by systems, devices, methods, integrated circuits, computer programs, or computer-readable recording media such as CD-ROMs, or by any combination of systems, devices, methods, integrated circuits, computer programs, and recording media.
[0197] Hereinafter, embodiments will be described in detail with reference to the drawings.
[0198] In addition, the embodiments described below are all inclusive or specific examples. The numerical values, shapes, materials, components, configurations and connection forms of components, steps, and the order of steps shown in the following embodiments are examples and are not intended to limit the claims. In addition, among the components of the following embodiments, components that are not described in the independent claims representing the highest concept are described as arbitrary components.
[0199] (Implementation Method 1)
[0200] First, the outline of Embodiment 1 is described as an example of an encoding device and a decoding device to which the processing and / or configuration described in each embodiment of the present invention described later can be applied. However, Embodiment 1 is merely an example of an encoding device and a decoding device to which the processing and / or configuration described in each embodiment of the present invention can be applied, and the processing and / or configuration described in each embodiment of the present invention can also be implemented in an encoding device and a decoding device different from Embodiment 1.
[0201] When the processing and / or configuration described in each aspect of the present invention is applied to Embodiment 1, for example, any of the following may be performed.
[0202] (1) In the encoding device or decoding device of Embodiment 1, components corresponding to the components described in each aspect of the present invention among a plurality of components constituting the encoding device or decoding device are replaced with the components described in each aspect of the present invention;
[0203] (2) In the encoding device or decoding device of Embodiment 1, after making any changes such as addition, replacement, deletion, etc. to the functions or the processes to be performed on some of the multiple components constituting the encoding device or decoding device, the components corresponding to the components described in each aspect of the present invention are replaced with the components described in each aspect of the present invention;
[0204] (3) With respect to the method implemented by the encoding device or decoding device of Embodiment 1, after adding a process and / or replacing or deleting a part of the multiple processes included in the method, the process corresponding to the process described in each aspect of the present invention is replaced with the process described in each aspect of the present invention;
[0205] (4) implementing the method by combining some of the plurality of components constituting the encoding device or decoding device of Embodiment 1 with the components described in the various aspects of the present invention, components having some of the functions possessed by the components described in the various aspects of the present invention, or components implementing some of the processing implemented by the components described in the various aspects of the present invention;
[0206] (5) A component having a part of the functions possessed by some of the multiple components constituting the encoding device or decoding device of Embodiment 1, or a component implementing a part of the processing implemented by some of the multiple components constituting the encoding device or decoding device of Embodiment 1, is implemented in combination with a component described in each aspect of the present invention, a component having a part of the functions possessed by the component described in each aspect of the present invention, or a component implementing a part of the processing implemented by the component described in each aspect of the present invention;
[0207] (6) In a method implemented by the encoding device or decoding device of Embodiment 1, among a plurality of processes included in the method, a process corresponding to the process described in each aspect of the present invention is replaced with the process described in each aspect of the present invention;
[0208] (7) Some of the multiple processes included in the method implemented by the encoding device or decoding device of Embodiment 1 are combined with the processes described in each aspect of the present invention and implemented.
[0209] In addition, the implementation method of the processing and / or structure described in each embodiment of the present invention is not limited to the above-mentioned example. For example, it can also be implemented in a device used for a purpose different from the moving image / image encoding device or moving image / image decoding device disclosed in Embodiment 1, and the processing and / or structure described in each embodiment can be implemented separately. In addition, the processing and / or structure described in different embodiments can also be combined and implemented.
[0210] [Overview of Encoding Device]
[0211] First, an overview of the encoding device according to Embodiment 1 will be described. Figure 11 is a block diagram showing a functional structure of a coding device 100 according to Embodiment 1. The coding device 100 is a moving picture / image coding device that encodes a moving picture / image in units of blocks.
[0212] like Figure 1 As shown, the encoding device 100 is a device that encodes an image in block units, and includes a segmentation unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy coding 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-frame prediction unit 124, an inter-frame prediction unit 126 and a prediction control unit 128.
[0213] The encoding device 100 is implemented by, for example, a general-purpose processor and a memory. In this case, when the software program stored in the memory is executed by the processor, the processor functions as the segmentation 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-frame prediction unit 124, the inter-frame prediction unit 126, and the prediction control unit 128. In addition, the encoding device 100 may be implemented as one or more dedicated electronic circuits corresponding to the segmentation 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-frame prediction unit 124, the inter-frame prediction unit 126, and the prediction control unit 128.
[0214] Hereinafter, each component included in the encoding device 100 will be described.
[0215] [Division]
[0216] The segmentation unit 102 segments each picture included in the input motion image into a plurality of blocks, and outputs each block to the subtraction unit 104. For example, the segmentation unit 102 first segments the picture into blocks of a fixed size (e.g., 128×128). The fixed-size blocks are sometimes called coding tree units (CTUs). Furthermore, the segmentation unit 102 segments each fixed-size block into blocks of a variable size (e.g., less than 64×64) based on recursive quadtree and / or binary tree block segmentation. The variable-size blocks are sometimes called coding units (CUs), prediction units (PUs), or transform units (TUs). In addition, in the present embodiment, there is no need to distinguish between CUs, PUs, and TUs, and a part or all of the blocks in the picture may be used as processing units of CUs, PUs, or TUs.
[0217] Figure 2 FIG. 1 is a diagram showing an example of block division in Implementation 1. Figure 2 In FIG, the solid line represents the block boundary based on the quadtree block partition, and the dotted line represents the block boundary based on the binary tree block partition.
[0218] Here, the block 10 is a square block of 128×128 pixels (128×128 block). The 128×128 block 10 is first divided into four square 64×64 blocks (quadtree block division).
[0219] The upper left 64×64 block is further divided vertically into two rectangular 32×64 blocks, and the left 32×64 block is further divided vertically into two rectangular 16×64 blocks (binary tree block division). As a result, the upper left 64×64 block is divided into two 16×64 blocks 11, 12 and a 32×64 block 13.
[0220] The upper right 64×64 block is horizontally partitioned into two rectangular 64×32 blocks 14 and 15 (binary tree block partitioning).
[0221] The 64×64 block at the bottom left is divided into four square 32×32 blocks (quadtree block division). The upper left block and the lower right block of the four 32×32 blocks are further divided. The upper left 32×32 block is vertically divided into two rectangular 16×32 blocks, and the 16×32 block on the right is further horizontally divided into two 16×16 blocks (binary tree block division). The lower right 32×32 block is horizontally divided into two 32×16 blocks (binary tree block division). As a result, the lower left 64×64 block is divided into a 16×32 block 16, two 16×16 blocks 17, 18, two 32×32 blocks 19, 20, and two 32×16 blocks 21, 22.
[0222] The lower right 64×64 block 23 is not split.
[0223] As above, in Figure 2 In FIG. 1 , block 10 is divided into 13 blocks 11 to 23 of variable size based on recursive quad-tree and binary tree block division. This type of division is sometimes called QTBT (quad-tree plus binary tree) division.
[0224] In addition, Figure 2 In the example, 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 can also be divided into three blocks (ternary tree division). The division including such ternary tree division is called MBT (multi type tree) division.
[0225] [Subtraction Department]
[0226] The subtracting unit 104 subtracts the prediction signal (prediction sample) from the original signal (original sample) in units of blocks divided by the dividing unit 102. That is, the subtracting unit 104 calculates the prediction error (also referred to as residual) of the encoding target block (hereinafter referred to as the current block). Then, the subtracting unit 104 outputs the calculated prediction error to the transforming unit 106.
[0227] The original signal is an input signal of 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.
[0228] [Conversion Department]
[0229] The transform unit 106 transforms the prediction error in the spatial domain into transform coefficients in the frequency domain, and outputs the transform coefficients to the quantization unit 108. Specifically, the transform unit 106 performs a preset discrete cosine transform (DCT) or discrete sine transform (DST) on the prediction error in the spatial domain, for example.
[0230] In addition, the transform unit 106 may adaptively select a transform type from a plurality of transform types, and transform the prediction error into a transform coefficient using a transform basis function corresponding to the selected transform type. Such a transform is sometimes called EMT (explicit multiple core transform) or AMT (adaptive multiple transform).
[0231] The plurality of transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Figure 3 is a table showing the transformation basis functions corresponding to each transformation type. Figure 3 In , N represents the number of input pixels. The selection of a transform type from among these multiple transform types may depend on the type of prediction (intra-frame prediction and inter-frame prediction) or the intra-frame prediction mode, for example.
[0232] Information indicating whether such EMT or AMT is applied (e.g., called an AMT flag) and information indicating the selected transform type are signaled at the CU level. In addition, the signaling of such information does not need to be limited to the CU level, but can also be other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0233] In addition, the transformation unit 106 may also re-transform the transformation coefficients (transformation results). Such re-transformation is sometimes called AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the transformation unit 106 re-transforms each sub-block (for example, 4×4 sub-blocks) contained in the block of transformation coefficients corresponding to the intra-frame prediction error. Information indicating whether NSST is applied and information related to the transformation matrix used in NSST are signaled at the CU level. In addition, the signaling of this information does not need to be limited to the CU level, but can also be other levels (for example, sequence level, picture level, slice level, tile level or CTU level).
[0234] Here, separable transformation refers to a method of performing multiple transformations in each direction according to the number of dimensions of the input, and non-separable transformation refers to a method of treating two or more dimensions as one dimension and performing transformations together when the input is multi-dimensional.
[0235] For example, as an example of non-separable transformation, when a 4×4 block is input, it is considered as an array having 16 elements, and the array is transformed using a 16×16 transformation matrix.
[0236] Similarly, a method (Hypercube Givens Transform) of treating a 4×4 input block as an array of 16 elements and performing a plurality of Givens rotations on the array is also an example of a Non-Separable transformation.
[0237] [Quantitative Department]
[0238] 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 the quantization parameters (QP) corresponding to the scanned transform coefficients. The quantization unit 108 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.
[0239] The predetermined order is the order for quantization / inverse quantization of transform coefficients. For example, the predetermined scanning order is defined in ascending order (order from low frequency to high frequency) or descending order (order from high frequency to low frequency) of frequency.
[0240] The quantization parameter refers to a parameter that defines the quantization step size (quantization width). For example, if the value of the quantization parameter increases, the quantization step size also increases. That is, if the value of the quantization parameter increases, the quantization error increases.
[0241] [Entropy coding unit]
[0242] The entropy coding unit 110 generates a coded signal (coded bit stream) by performing variable length coding on the quantized coefficients that are input from the quantization unit 108. Specifically, the entropy coding unit 110 binarizes the quantized coefficients and performs arithmetic coding on the binary signal, for example.
[0243] [Inverse Quantization Unit]
[0244] The inverse quantization unit 112 inversely quantizes the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inversely quantizes the quantized coefficients of the current block in a predetermined scanning order. The inverse quantization unit 112 outputs the inversely quantized transform coefficients of the current block to the inverse transform unit 114.
[0245] [Inverse transformation unit]
[0246] The inverse transform unit 114 restores the prediction error by performing an inverse transform on the transform coefficients 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 corresponding to the transform performed by the transform unit 106. The inverse transform unit 114 outputs the restored prediction error to the addition unit 116.
[0247] In addition, since the restored prediction error loses information due to quantization, it does not match the prediction error calculated by the subtraction unit 104. In other words, the restored prediction error includes a quantization error.
[0248] [Addition Department]
[0249] The adder 116 reconstructs the current block by adding the prediction error input from the inverse transform unit 114 and the prediction sample input from the prediction control unit 128. Then, the adder 116 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.
[0250] [Block Memory]
[0251] The block memory 118 is a storage unit for storing blocks in a picture to be coded (hereinafter referred to as a current picture) to be referred to in intra prediction. Specifically, the block memory 118 stores the reconstructed blocks output from the adding unit 116 .
[0252] [Loop filter section]
[0253] The loop filter unit 120 performs loop filtering on the block reconstructed by the adder unit 116, and outputs the filtered reconstructed block to the frame memory 122. Loop filtering refers to filtering used within a coding loop (in-loop filtering), such as deblocking filtering (DF), sample adaptive offset (SAO), and adaptive loop filtering (ALF).
[0254] In ALF, a least square error filter is used to remove coding distortion. For example, for each 2×2 sub-block in the current block, one filter is selected from a plurality of filters based on the direction and activity of the local gradient.
[0255] Specifically, first, the sub-blocks (e.g., 2×2 sub-blocks) are classified into multiple classes (e.g., 15 or 25 classes). The classification of the sub-blocks is performed based on the direction and activity of the gradient. For example, using the direction value D of the gradient (e.g., 0 to 2 or 0 to 4) and the activity value A of the gradient (e.g., 0 to 4), the classification value C (e.g., C=5D+A) is calculated. And, based on the classification value C, the sub-blocks are classified into multiple classes (e.g., 15 or 25 classes).
[0256] The gradient direction value D is derived, for example, by comparing gradients in multiple directions (eg, horizontal, vertical, and two diagonal directions). In addition, the gradient activity value A is derived, for example, by adding the gradients in multiple directions and quantizing the added result.
[0257] Based on the result of such classification, a filter to be used for a sub-block is determined from among a plurality of filters.
[0258] As the shape of the filter used in the ALF, for example, a circularly symmetric shape is used. Figure 4A to Figure 4C The diagrams show a plurality of examples of filter shapes used in ALF. Figure 4A represents a 5×5 diamond-shaped filter, Figure 4B represents a 7×7 diamond shape filter, Figure 4C Indicates a 9×9 diamond filter. The information indicating the shape of the filter is signaled at the picture level. In addition, the signaling of the information indicating the shape of the filter does not need to be limited to the picture level, but can also be other levels (for example, sequence level, slice level, tile level, CTU level or CU level).
[0259] The on / off of ALF is determined, for example, at the picture level or the CU level. For example, regarding brightness, whether to use ALF is determined at the CU level, and regarding color difference, whether to use ALF is determined at the picture level. Information indicating whether ALF is on / off is signaled at the picture level or the CU level. In addition, the signaling of information indicating whether ALF is on / off does not need to be limited to the picture level or the CU level, and can also be other levels (for example, the sequence level, the slice level, the tile level, or the CTU level).
[0260] The coefficient sets of the selectable multiple filters (e.g., filters up to 15 or 25) are signaled at the picture level. In addition, the signaling of the coefficient set does not need to be limited to the picture level, and can also be other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or sub-block level).
[0261] [Frame Memory]
[0262] The frame memory 122 is a storage unit for storing reference pictures used in inter-frame prediction, and is sometimes referred to as a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120 .
[0263] [Intra-frame prediction unit]
[0264] The intra prediction unit 124 performs intra prediction (also referred to as intra-screen prediction) of the current block with reference to the block in the current picture stored in the block memory 118, thereby generating a prediction signal (intra prediction signal). Specifically, the intra prediction unit 124 generates the intra prediction signal by performing intra prediction with reference to samples (e.g., brightness values and color difference values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 128.
[0265] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predetermined intra prediction modes. The plurality of intra prediction modes include one or more non-directional prediction modes and a plurality of directional prediction modes.
[0266] 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 / HEVC (High-Efficiency Video Coding) standard (Non-Patent Document 1).
[0267] The plurality of directional prediction modes include, for example, 33 directional prediction modes defined by the H.265 / HEVC standard. In addition, the plurality of directional prediction modes may include 32 directional prediction modes in addition to the 33 directional prediction modes (a total of 65 directional prediction modes). Figure 5A This is a diagram showing 67 intra prediction modes (2 non-directional prediction modes and 65 directional prediction modes) in intra prediction. Solid arrows indicate 33 directions specified by the H.265 / HEVC standard, and dotted arrows indicate 32 additional directions.
[0268] In addition, in the intra-frame prediction of the chrominance block, the luminance block can also be referenced. That is, the chrominance component of the current block can also be predicted based on the luminance component of the current block. Such intra-frame prediction is called CCLM (cross-component linear model) prediction. Such an intra-frame prediction mode of the chrominance block with reference to the luminance block (for example, called CCLM mode) can also be added as one of the intra-frame prediction modes of the chrominance block.
[0269] The intra prediction unit 124 may also modify the pixel value after intra prediction based on the gradient of the reference pixel in the horizontal / vertical direction. Intra prediction accompanied by such modification is called PDPC (position dependent intraprediction combination). Information indicating whether PDPC is adopted (e.g., called PDPC flag) is signaled, for example, at the CU level. In addition, the signaling of this information does not need to be limited to the CU level, but may also be other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0270] [Inter-frame prediction unit]
[0271] The inter-frame prediction unit 126 performs inter-frame prediction (also called inter-screen prediction) of the current block with reference to a reference picture different from the current picture stored in the frame memory 122, thereby generating a prediction signal (inter-frame prediction signal). Inter-frame prediction is performed in units of the current block or sub-blocks (e.g., 4×4 blocks) within the current block. For example, the inter-frame prediction unit 126 performs motion estimation in the reference picture for the current block or sub-block. Furthermore, the inter-frame prediction unit 126 performs motion compensation using motion information (e.g., motion vector) obtained by motion estimation, thereby generating an inter-frame prediction signal for the current block or sub-block. Furthermore, the inter-frame prediction unit 126 outputs the generated inter-frame prediction signal to the prediction control unit 128.
[0272] The motion information used in motion compensation is signaled. A predicted motion vector (motion vector predictor) may be used to signalize the motion vector. That is, the difference between the motion vector and the predicted motion vector may be signaled.
[0273] In addition, it is also possible to generate an inter-frame prediction signal using not only the motion information of the current block obtained by motion estimation but also the motion information of the adjacent blocks. Specifically, a prediction signal based on the motion information obtained by motion estimation and a prediction signal based on the motion information of the adjacent blocks may be weighted and added to generate an inter-frame prediction signal in units of sub-blocks within the current block. Such inter-frame prediction (motion compensation) is sometimes called OBMC (overlapped block motion compensation).
[0274] In such an OBMC mode, information indicating the size of a sub-block used for OBMC (e.g., OBMC block size) is signaled at the sequence level. In addition, information indicating whether the OBMC mode is adopted (e.g., OBMC flag) is signaled at the CU level. In addition, the signaling level of this information does not need to be limited to the sequence level and the CU level, and may be other levels (e.g., picture level, slice level, tile level, CTU level, or sub-block level).
[0275] The OBMC mode will be described in more detail. Figure 5B and Figure 5C It is a flowchart and a conceptual diagram for explaining the outline of the predicted image correction processing based on the OBMC processing.
[0276] First, a predicted image (Pred) obtained by normal motion compensation is acquired using a motion vector (MV) assigned to a coding target block.
[0277] Next, a prediction image (Pred_L) is obtained by using the motion vector (MV_L) of the already encoded left adjacent block for the encoding target block, and the prediction image and Pred_L are weighted and superimposed to perform the first correction of the prediction image.
[0278] Similarly, the motion vector (MV_U) of the encoded upper adjacent block is used to obtain the predicted image (Pred_U) for the encoding object block, and the predicted image after the first correction mentioned above and Pred_U are weighted and superimposed to perform the second correction on the predicted image, which is used as the final predicted image.
[0279] In addition, the method of performing two-stage correction using the left neighboring block and the upper neighboring block has been described here, but the method may be configured to perform correction more times than two stages using the right neighboring block and the lower neighboring block.
[0280] Furthermore, the area to be superimposed may not be the pixel area of the entire block, but may be only a partial area near the block boundary.
[0281] In addition, the predicted image correction process based on one reference picture is explained here, but the same is true when the predicted image is corrected based on multiple reference pictures. After obtaining the corrected predicted images based on each reference picture, the obtained predicted images are further superimposed to serve as the final predicted image.
[0282] Furthermore, the processing target block may be a prediction block unit or a sub-block unit obtained by further dividing the prediction block.
[0283] As a method for determining whether to use the OBMC process, there is a method using, for example, obmc_flag, a signal indicating whether the OBMC process is used. As a specific example, in the encoding device, it is determined whether the encoding target block belongs to a complex motion region. If it belongs to a complex motion region, the obmc_flag is set to a value of 1 and the OBMC process is used for encoding. If it does not belong to a complex motion region, the obmc_flag is set to a value of 0 and the OBMC process is not used for encoding. On the other hand, in the decoding device, the obmc_flag described in the stream is decoded, and whether the OBMC process is used is switched according to the value thereof, thereby performing decoding.
[0284] In addition, the motion information may be derived on the decoding device side without being signaled. For example, a merge mode specified by the H.265 / HEVC specification may be used. In addition, the motion information may be derived, for example, by performing motion estimation on the decoding device side. In this case, motion estimation is performed without using the pixel values of the current block.
[0285] Here, a mode for performing motion estimation on the decoding device side is described. The mode for performing motion estimation on the decoding device side is called PMMVD (pattern matched motion vector derivation) mode or FRUC (frame rate up-conversion) mode.
[0286] exist Figure 5D An example of FRUC processing is shown in FIG. First, a list of multiple candidates each having a predicted motion vector is generated (which can also be shared with a merge list) with reference to the motion vectors of the coded blocks that are spatially or temporally adjacent to the current block. Next, the best candidate MV is selected from the multiple candidate MVs registered in the candidate list. For example, the evaluation value of each candidate included in the candidate list is calculated, and one candidate is selected based on the evaluation value.
[0287] And, based on the motion vector of the selected candidate, the motion vector for the current block is derived. Specifically, for example, the motion vector of the selected candidate (best candidate MV) is derived as the motion vector for the current block. In addition, for example, the motion vector for the current block can be derived by performing pattern matching in the surrounding area of the position in the reference picture corresponding to the selected candidate motion vector. That is, the surrounding area of the best candidate MV can also be searched by the same method, and when there is an MV with a better evaluation value, the best candidate MV is updated to the above MV, and it is used as the final MV of the current block. In addition, a structure that does not implement this process can also be made.
[0288] Completely the same processing can be performed even when processing is performed in sub-block units.
[0289] The evaluation value is calculated by obtaining a difference value of the reconstructed image through pattern matching between a region in the reference picture corresponding to the motion vector and a predetermined region. In addition to the difference value, other information may be used to calculate the evaluation value.
[0290] As pattern matching, the first pattern matching or the second pattern matching is used. The first pattern matching and the second pattern matching are sometimes called bidirectional matching and template matching, respectively.
[0291] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures along the motion trajectory of the current block. Therefore, in the first pattern matching, as the prescribed area for calculating the candidate evaluation value, an area in another reference picture along the motion trajectory of the current block is used.
[0292] Figure 6 is a diagram for explaining an example of pattern matching (bidirectional matching) between two blocks along a motion trajectory. Figure 6 As shown, in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the best matching pair among the pairs of two blocks in two different reference pictures (Ref0, Ref1) along the motion trajectory of the current block (Cur block). Specifically, for the current block, the difference between the reconstructed image at a specified position in the first coded reference picture (Ref0) specified by the candidate MV and the reconstructed image at a specified position in the second coded reference picture (Ref1) specified by the symmetric MV obtained by scaling the candidate MV with the display time interval is derived, and the evaluation value is calculated using the obtained difference value. The candidate MV with the best evaluation value can be selected as the final MV from among multiple candidate MVs.
[0293] Under the assumption of a continuous motion trajectory, the motion vectors (MV0, MV1) indicating the two reference blocks are proportional to the temporal distance (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, when the current picture is temporally located between the two reference pictures and the temporal distances from the current picture to the two reference pictures are equal, in the first pattern matching, mirror-symmetric bidirectional motion vectors are derived.
[0294] 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, a block adjacent to the current block in the current picture is used as the prescribed area for calculating the candidate evaluation value described above.
[0295] Figure 7 is a diagram for explaining an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. Figure 7 As shown, in the second pattern matching, the motion vector of the current block is derived by searching the reference picture (Ref0) for the block that best matches the block adjacent to the current block (Cur block) in the current picture (Cur Pic). Specifically, for the current block, the difference between the reconstructed image of the coded area of both or one of the left adjacent and upper adjacent areas and the reconstructed image at the same position in the coded reference picture (Ref0) specified by the candidate MV is derived, and the evaluation value is calculated using the obtained difference value, and the candidate MV with the best evaluation value is selected as the best candidate MV among multiple candidate MVs.
[0296] Such information indicating whether the FRUC mode is adopted (for example, called a FRUC flag) is signaled at the CU level. In addition, when the FRUC mode is adopted (for example, when the FRUC flag is true), information indicating the pattern matching method (first pattern matching or second pattern matching) (for example, called a FRUC mode flag) is signaled at the CU level. In addition, the signaling of this information does not need to be limited to the CU level, and can also be other levels (for example, sequence level, picture level, slice level, tile level, CTU level or sub-block level).
[0297] Here, a mode for deriving a motion vector based on a model assuming uniform linear motion is described. This mode is sometimes called BIO (bi-directional optical flow).
[0298] Figure 8 This is a diagram used to illustrate a model that assumes uniform linear motion. Figure 8 In (v x , v y ) represents the velocity vector, τ0 and τ1 represent the temporal distance between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1), respectively. (MVx0, MVy0) represents the motion vector corresponding to the reference picture Ref0, and (MVx1, MVy1) represents the motion vector corresponding to the reference picture Ref1.
[0299] At this time, the velocity vector (v x , v y ) is assumed to be a uniform linear motion, (MVx0, MVy0) and (MVx1, MVy1) are expressed as (vxτ0, vyτ0) and (-vxτ1, -vyτ1) respectively, and the following optical flow equation (1) holds.
[0300] [Formula 1]
[0301]
[0302] Here, I (k) Represents the brightness value of the reference image k (k = 0, 1) after motion compensation. The optical flow equation indicates that the sum of (i) the temporal differential of the brightness 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 the combination of the optical flow equation and Hermite interpolation, the motion vector of the block unit obtained from the merge list, etc. is corrected in pixel units.
[0303] In addition, the motion vector may be derived on the decoding device side by a method different from the derivation of the motion vector based on the model assuming uniform linear motion. For example, the motion vector may be derived in sub-block units based on the motion vectors of a plurality of adjacent blocks.
[0304] Here, a mode for deriving a motion vector in sub-block units based on motion vectors of a plurality of adjacent blocks will be described. This mode is sometimes called an affine motion compensation prediction mode.
[0305] Fig. 9A FIG. 1 is a diagram for explaining the derivation of a motion vector for a sub-block based on motion vectors of a plurality of adjacent blocks. Fig. 9AIn the example, the current block includes 16 4×4 sub-blocks. Here, based on the motion vectors of the adjacent blocks, the motion vector v0 of the upper left corner control point of the current block is derived, and based on the motion vectors of the adjacent sub-blocks, the motion vector v1 of the upper right corner control point of the current block is derived. Furthermore, using the two motion vectors v0 and v1, the motion vectors (v x , v y ).
[0306] [Formula 2]
[0307]
[0308] Here, x and y represent the horizontal position and vertical position of the sub-block, respectively, and w represents a preset weight coefficient.
[0309] In such an affine motion compensation prediction mode, several modes in which the motion vectors of the upper left and upper right control points are derived in different ways may be included. Information indicating such an affine motion compensation prediction mode (e.g., called an affine flag) is signaled at the CU level. In addition, the signaling of the information indicating the affine motion compensation prediction mode does not need to be limited to the CU level, but may be other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).
[0310] [Prediction Control Department]
[0311] The prediction control unit 128 selects one of the intra prediction signal and the inter prediction signal, and outputs the selected signal to the subtraction unit 104 and the addition unit 116 as a prediction signal.
[0312] Here, an example of deriving a motion vector of a picture to be encoded by using the merge mode is described. Fig. 9B This is a diagram for explaining the outline of motion vector derivation processing based on the merge mode.
[0313] First, a prediction MV list is generated in which candidates for prediction MVs are registered. Candidates for prediction MVs include MVs of multiple coded blocks located spatially around the target block, that is, spatial neighbor prediction MVs; MVs of blocks near the position of the target block in the coded reference picture, that is, temporal neighbor prediction MVs; MVs generated by combining the MV values of the spatial neighbor prediction MV and the temporal neighbor prediction MV, that is, combined prediction MVs; and MVs with a value of zero, that is, zero prediction MVs.
[0314] Next, one predicted MV is selected from among a plurality of predicted MVs registered in the predicted MV list, thereby determining the MV of the encoding target block.
[0315] Furthermore, in the variable length coding unit, merge_idx, which is a signal indicating which predicted MV is selected, is described in the stream and encoded.
[0316] In addition, Fig. 9B The predicted MVs registered in the predicted MV list described in the figure are just examples, and may be a number different from that in the figure, or a structure that does not include some types of predicted MVs in the figure, or a structure that adds predicted MVs other than the types of predicted MVs in the figure.
[0317] In addition, the MV of the encoding target block derived by the merge mode may be used to perform the DMVR process described later, thereby determining the final MV.
[0318] Here, an example of determining MV using DMVR processing is described.
[0319] Fig. 9C This is a conceptual diagram used to explain the outline of DMVR processing.
[0320] First, the optimal MVP set for the processing object block is used as the candidate MV. According to the above candidate MV, reference pixels are obtained from the first reference picture which is the processed picture in the L0 direction and the second reference picture which is the processed picture in the L1 direction, and a template is generated by taking the average of each reference pixel.
[0321] Next, the template is used to search the surrounding areas of the candidate MVs of the first reference image and the second reference image, and the MV with the minimum cost is determined as the final MV. In addition, the cost value is calculated using the difference between the pixel values of the template and the pixel values of the search area and the MV value.
[0322] Note that the outline of the processing described here is basically common to the encoding device and the decoding device.
[0323] Furthermore, even if it is not the process described here, other processes may be used as long as they can search the vicinity of the candidate MVs and derive the final MV.
[0324] Here, a mode for generating a predicted image using the LIC process is described.
[0325] Fig.9D This is a diagram for explaining an overview of a method for generating a predicted image using a brightness correction process based on an LIC process.
[0326] First, an MV for acquiring a reference image corresponding to a coding target block from a reference picture that is an already coded picture is derived.
[0327] Next, for the encoding target block, the brightness pixel values of the encoded surrounding reference areas adjacent to the left and above and the brightness pixel values at the same position in the reference picture specified by MV are used to extract information indicating how the brightness values in the reference picture and the encoding target picture change, and calculate the brightness correction parameters.
[0328] By performing brightness correction processing on the reference image in the reference picture specified by the MV using the brightness correction parameters, a predicted image for the encoding target block is generated.
[0329] in addition, Fig.9D The shape of the peripheral reference area described above is just an example, and shapes other than this may also be used.
[0330] In addition, the process of generating a predicted image based on one reference picture is described here, but the same is true when generating a predicted image based on multiple reference pictures. The predicted image is generated after brightness correction processing is performed on the reference images obtained from the respective reference pictures in the same way.
[0331] As a method for determining whether to use the LIC process, for example, there is a method using lic_flag, which is a signal indicating whether the LIC process is used. As a specific example, in the encoding device, it is determined whether the encoding target block belongs to an area where the brightness change occurs. If it belongs to an area where the brightness change occurs, the value 1 is set as lic_flag, and the encoding is performed using the LIC process. If it does not belong to an area where the brightness change occurs, the value 0 is set as lic_flag, and the encoding is performed without using the LIC process. On the other hand, in the decoding device, by decoding the lic_flag described in the stream, whether to use the LIC process is switched according to the value thereof, and decoding is performed.
[0332] As another method for determining whether to use the LIC process, there is a method of determining whether the LIC process is used in the surrounding blocks. As a specific example, when the encoding target block is in the merge mode, it is determined whether the surrounding coded blocks selected when deriving the MV in the merge mode process are coded using the LIC process, and based on the result, it is switched whether to use the LIC process for coding. In addition, in the case of this example, the processing in decoding is completely the same.
[0333] [Overview of Decoding Device]
[0334] Next, an overview of a decoding device that can decode the coded signal (coded bit stream) output from the coding device 100 will be described. Fig.102 is a block diagram showing a functional structure of a decoding device 200 according to Embodiment 1. The decoding device 200 is a moving picture / image decoding device that decodes a moving picture / image in units of blocks.
[0335] like Fig.10 As shown, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra-frame prediction unit 216, an inter-frame prediction unit 218 and a prediction control unit 220.
[0336] The decoding device 200 is implemented by, for example, a general-purpose processor and a memory. In this case, when the processor executes a software program stored in the memory, the processor functions as an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a loop filter unit 212, an intra-frame prediction unit 216, an inter-frame prediction unit 218, and a prediction control unit 220. In addition, the decoding device 200 may be implemented as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transformation unit 206, the addition unit 208, the loop filter unit 212, the intra-frame prediction unit 216, the inter-frame prediction unit 218, and the prediction control unit 220.
[0337] Hereinafter, each component included in the decoding device 200 will be described.
[0338] [Entropy decoding unit]
[0339] The entropy decoding unit 202 performs entropy decoding on the coded bit stream. Specifically, the entropy decoding unit 202 arithmetically decodes the coded bit stream into a binary signal, for example. Next, the entropy decoding unit 202 debinarizes the binary signal. Thus, the entropy decoding unit 202 outputs the quantized coefficients to the inverse quantization unit 204 in units of blocks.
[0340] [Inverse Quantization Unit]
[0341] The inverse quantization unit 204 inversely quantizes the quantized coefficients of the decoding target block (hereinafter referred to as the current block) as the input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inversely quantizes the quantized coefficients of the current block based on the quantization parameters corresponding to the quantized coefficients. In addition, the inverse quantization unit 204 outputs the inversely quantized quantized coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.
[0342] [Inverse transformation unit]
[0343] The inverse transform unit 206 restores the prediction error by performing inverse transform on the transform coefficients which are input from the inverse quantization unit 204 .
[0344] For example, when the information read from the encoded bit stream indicates that EMT or AMT is adopted (for example, the AMT flag is true), the inverse transform unit 206 performs an inverse transform on the transform coefficients of the current block based on the read information indicating the transform type.
[0345] Furthermore, for example, when the information read out from the encoded bit stream indicates that NSST is adopted, the inverse transform unit 206 applies an inverse re-transform to the transform coefficients.
[0346] [Addition Department]
[0347] The adding unit 208 reconstructs the current block by adding the prediction error input from the inverse transform unit 206 and the prediction sample input from the prediction control unit 220 . The adding unit 208 outputs the reconstructed block to the block memory 210 and the loop filter unit 212 .
[0348] [Block Memory]
[0349] The block memory 210 is a storage unit for storing blocks in a decoding target picture (hereinafter referred to as a current picture) to be referenced in intra prediction. Specifically, the block memory 210 stores the reconstructed blocks output from the adding unit 208 .
[0350] [Loop filter section]
[0351] The loop filter unit 212 performs loop filtering on the block reconstructed by the adder unit 208 , and outputs the reconstructed block after filtering to the frame memory 214 , a display device, and the like.
[0352] When the information indicating the on / off of ALF read from the coded bit stream indicates that ALF is on, one filter is selected from a plurality of filters based on the direction and activity of the local gradient, and the selected filter is applied to the reconstructed block.
[0353] [Frame Memory]
[0354] The frame memory 214 is a storage unit for storing reference pictures used in inter-frame prediction, and is sometimes referred to as a frame buffer. Specifically, the frame memory 214 stores the reconstructed blocks filtered by the loop filter unit 212 .
[0355] [Intra-frame prediction unit]
[0356] The intra prediction unit 216 performs intra prediction based on the intra prediction mode read from the coded bit stream, and refers to the block in the current picture stored in the block memory 210, thereby generating a prediction signal (intra prediction signal). Specifically, the intra prediction unit 216 performs intra prediction by referring to samples (e.g., luminance values, color difference values) of blocks adjacent to the current block, thereby generating an intra prediction signal, and outputs the intra prediction signal to the prediction control unit 220.
[0357] Furthermore, when an intra prediction mode that refers to a luminance block is selected in intra prediction of a chrominance block, the intra prediction unit 216 may predict the chrominance component of the current block based on the luminance component of the current block.
[0358] Furthermore, when the information read from the coded bit stream indicates the adoption of PDPC, the intra prediction unit 216 corrects the pixel value after intra prediction based on the gradient of the reference pixel in the horizontal and vertical directions.
[0359] [Inter-frame prediction unit]
[0360] The inter-frame prediction unit 218 predicts the current block with reference to the reference picture stored in the frame memory 214. The prediction is performed in units of the current block or a sub-block (e.g., a 4×4 block) in the current block. For example, the inter-frame prediction unit 218 performs motion compensation using motion information (e.g., a motion vector) read from the coded bit stream, thereby generating an inter-frame prediction signal of the current block or sub-block, and outputs the inter-frame prediction signal to the prediction control unit 220.
[0361] When the information decoded from the encoded bit stream indicates that the OBMC mode is adopted, the inter prediction unit 218 generates an inter prediction signal using not only the motion information of the current block obtained by motion estimation but also the motion information of the neighboring blocks.
[0362] Furthermore, when the information read from the coded bit stream indicates that the FRUC mode is adopted, the inter-frame prediction unit 218 performs motion estimation according to the pattern matching method (bidirectional matching or template matching) read from the coded stream, thereby deriving motion information. Furthermore, the inter-frame prediction unit 218 performs motion compensation using the derived motion information.
[0363] In addition, when the BIO mode is adopted, the inter-frame prediction unit 218 derives the motion vector based on the model assuming uniform linear motion. In addition, when the information read from the encoded bit stream indicates that the affine motion compensation prediction mode is adopted, the inter-frame prediction unit 218 derives the motion vector in sub-block units based on the motion vectors of multiple adjacent blocks.
[0364] [Prediction Control Department]
[0365] The prediction control unit 220 selects one of the intra prediction signal and the inter prediction signal, and outputs the selected signal to the adding unit 208 as a prediction signal.
[0366] [First method of encoding and decoding]
[0367] Fig.11 1 and 2 represent the encoding method and encoding process performed by the encoding device 100 according to the first embodiment. In addition, 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 can be replaced by "decoding" in the decoding method and decoding process.
[0368] First, the encoding apparatus 100 divides an image block into a plurality of partitions ( S101 ).
[0369] The segmentation can be as follows Fig. 12A , Fig. 12B , Fig. 12C , Fig.12D , Fig.12E , Fig.12F , Figure 12G , Fig.12H , Fig.12I or Fig.12J The division is not limited to any of these divisions, and these divisions can be freely combined.
[0370] Alternatively, the partitions can be Fig.13A , Fig. 13B , Fig. 13C , Fig.13D or Fig.13E Partitions shown. Specifically, the partitions may be rectangular partitions, non-rectangular partitions, triangular partitions, L-shaped partitions, pentagonal partitions, hexagonal partitions or polygonal partitions.
[0371] Next, the encoding device 100 creates a motion vector candidate list for a partition included in the plurality of partitions (S102). The motion vector candidate list may also 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. A spatially adjacent partition may be a partition located above, to the left, to the right, below, to the upper left, to the upper right, to the lower left, or to the lower 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 position of the partition in a reference picture of the partition. The reference picture is a picture different from the current picture containing the partition, or may be a picture immediately before or after the current picture. For example, the spatial position of the co-located partition is the same as the position of the partition in the current picture. Alternatively, the spatial position of the temporally adjacent partition in the reference picture may be different from the spatial position of the partition in the current picture.
[0374] The multiple motion vectors for the multiple sub-partitions include motion vectors predicted based on motion vectors for sub-partitions that are spatially or temporally adjacent to each sub-partition, and are obtained through a sub-CU basic motion vector prediction process. The sub-CU basic motion vector prediction process may be an advanced temporal motion vector prediction (ATMVP) or a spatiotemporal motion vector prediction (STMVP).
[0375] Fig.14 An example of ATMVP processing is shown. First, the encoding device 100 divides the image block into a plurality of M×N sub-blocks (S201). Basically, M and N are respectively smaller than the width and height of the image block. M may be equal to N or may not be equal to N. For example, M and N correspond to the number of pixels in the horizontal direction of the image block and the number of pixels in the vertical direction of the image block, respectively.
[0376] Specifically, M may be 4. In addition, M may be 1 / 8 of the width of the image block, or 1 / K of the width of the image block (K is a positive integer). Similarly, N may be 4. In addition, N may be 1 / 8 of the height of the image block, or 1 / K of the height of the image block (K is a positive integer).
[0377] The encoding device 100 determines a corresponding block for the image block (S202). Fig.15 As shown, the corresponding blocks are indicated by motion vectors derived from the spatial neighboring blocks of the image block. Then, as Fig.16 As shown, the encoding apparatus 100 derives a motion vector of each M×N sub-block according to the motion information of the corresponding block ( S203 ).
[0378] Fig.17 An example of STMVP processing is shown. First, the encoding device 100 divides the image block into a plurality of M×N sub-blocks (S301). Basically, M and N are respectively smaller than the width and height of the image block. M may be equal to N or may not be equal to N. For example, M and N correspond to the number of pixels in the horizontal direction of the image block and the number of pixels in the vertical direction of the image block, respectively.
[0379] Specifically, M may be 4. In addition, M may be 1 / 8 of the width of the image block, or 1 / K of the width of the image block (K is a positive integer). Similarly, N may be 4. In addition, N may be 1 / 8 of the height of the image block, or 1 / K of the height of the image block (K is a positive integer).
[0380] The coding device 100 obtains three motion vectors for each M×N sub-block (S302). Two of the three motion vectors are obtained from the spatial neighboring blocks of the M×N sub-block, and one of the three motion vectors is obtained from the temporal neighboring blocks of the M×N sub-block. The coding device 100 derives a motion vector obtained by averaging the three motion vectors for each M×N sub-block (S303).
[0381] 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 predetermined prediction mode such as merge mode or inter prediction mode.
[0382] In addition, the encoding device 100 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).
[0383] In the first method, the encoding device 100 performs a first inter-frame prediction process on the partition using the first motion vector in the motion vector candidate list (S104). For example, the first inter-frame prediction process includes motion compensation, decoding-side motion vector refinement (DMVR), and bidirectional optical flow (BIO).
[0384] When performing DMVR processing, the encoding device 100 uses the motion vector for the partition to obtain a predicted image for the partition. Then, the encoding device 100 uses the predicted image for the partition to perform, for example, motion estimation, thereby obtaining a new motion vector for the partition. Then, the encoding device 100 uses the new motion vector for the partition to obtain a new predicted image for the partition as a final predicted image for the partition.
[0385] When the DMVR process is not performed, the encoding apparatus 100 does not use a new motion vector for the partition, but uses a normal motion vector for the partition to obtain a final prediction image for the partition. For example, the normal motion vector may be a motion vector selected from a motion vector candidate list.
[0386] Fig.18An example of DMVR processing is shown. The encoding device 100 determines whether the image block has two motion vectors, namely, the first motion vector and the second motion vector (S401). For example, when the image block does not have two motion vectors, namely, the first motion vector and the second motion vector, the encoding device 100 derives a prediction block using one motion vector, and encodes the image block using the derived prediction block.
[0387] On the other hand, when the image block has two motion vectors, namely the first motion vector and the second motion vector, the encoding device 100 derives the first prediction block and the second prediction block using the first motion vector and the second motion vector.
[0388] For example, the first motion vector indicates the first reference picture, and the second motion vector indicates the second reference picture. In this case, the encoding device 100 predicts the first prediction block using the first motion vector and the first reference picture, and predicts the second prediction block using the second motion vector and the second reference picture (S402).
[0389] Next, the encoding device 100 performs weighted processing on the first prediction block and the second prediction block to derive a template block as a result of the weighted processing (S403). Here, the weighted processing is weighted averaging or weighted addition.
[0390] Next, the encoding device 100 derives a third motion vector by performing motion estimation processing using the template block and the first reference picture. Similarly, the encoding device 100 derives a fourth motion vector by performing motion estimation processing using the template block and the second reference picture (S404). Here, the motion estimation processing is a process of searching for a motion vector by searching for a similar block using block matching or the like.
[0391] Next, the encoding device 100 predicts the third prediction block using the third motion vector and the first reference picture. Similarly, the encoding device 100 predicts the fourth prediction block using the fourth motion vector and the second reference picture (S405).
[0392] Next, the encoding apparatus 100 performs weighting processing on the third prediction block and the fourth prediction block ( S406 ).
[0393] As described above, the DMVR process is performed. Then, for example, the encoding apparatus 100 encodes the image block using the result of the weighting process (S407).
[0394] The DMVR process is not limited to the above process, and may be a process of determining the final motion vector by motion estimation based on the determined motion vector and the coded reference picture. For example, the final motion vector may be searched by performing cost evaluation using the difference value between the first prediction block and the second prediction block without creating a template block.
[0395] Furthermore, as described above, when the partition is a triangular partition, the encoding device 100 performs the second method ( S105 ). In the second method, the encoding device 100 performs the second inter-frame prediction process on the partition using the second motion vector in the motion vector candidate list.
[0396] For example, the second motion vector is different from the motion vector for the sub-partition. That is, the second motion vector is different from the motion vector derived in the sub-CU basic motion vector prediction process. In addition, the second inter-frame prediction process includes motion compensation processing but does not include DMVR processing. The second inter-frame prediction process may also include motion compensation processing and BIO processing but does not include DMVR processing.
[0397] Finally, the encoding device 100 encodes the image block using the result of the inter-frame prediction process for the partition (S106). For example, the encoding device 100 obtains a predicted image as the result of the inter-frame prediction process by performing the inter-frame prediction process. Then, the encoding device 100 encodes the image block using the predicted image.
[0398] Alternatively, the encoding device 100 may perform the above-described processing ( S102 to S105 ) on each of the plurality of partitions, and the encoding device 100 may encode the image block using a plurality of results of the inter-frame prediction processing on the plurality of partitions.
[0399] The encoding device 100 may also encode a flag indicating whether the image block is segmented into multiple partitions including triangular partitions. The flag may also be expressed as a segmentation parameter. For example, when the flag is 1, it indicates that the image block is segmented into multiple partitions including triangular partitions, and when the flag is 0, it indicates that the image block is not segmented into multiple partitions including triangular partitions.
[0400] The flag may be a triangle flag indicating whether the triangle mode is used. The triangle mode divides the image block into a plurality of partitions including triangle partitions, derives a motion vector for each partition, and performs motion compensation for each partition.
[0401] For example, in the triangle mode, the image block is divided into a plurality of triangle partitions. Then, a candidate motion vector list for each triangle partition is generated. Then, motion compensation processing of each triangle partition is performed using a motion vector predicted according to the candidate motion vector list. Then, prediction processing of the image block is performed by synthesizing a plurality of predicted images of the plurality of triangle partitions. Then, the image block is encoded based on the result of the prediction processing.
[0402] In addition, the above-mentioned flag may be encoded as the same flag as flags related to other prediction modes. For example, the flag may be encoded in a merge mode when it is the first value, and the flag may be encoded in a triangle mode when it is the second value different from the first value. In addition, the flag may be a flag indicating the method by which the image block is segmented.
[0403] Furthermore, when the flag indicates that the image block is divided into a plurality of partitions including a triangular partition, the encoding device 100 divides the image block into a plurality of partitions including the triangular partition and performs encoding.
[0404] On the other hand, when the flag indicates that the image block is not divided into a plurality of partitions including a triangular partition, the encoding device 100 does not divide the image block into a plurality of partitions including a triangular partition for encoding. In this case, the encoding device 100 may encode without dividing the image block, or may divide the image block into a plurality of rectangular partitions for encoding.
[0405] In addition, if Fig.19 As shown, the encoding device 100 can encode the above-mentioned flag based on the determination result. In this example, first, the encoding device 100 obtains the parameter of the image block (S501). The parameter of the image block can 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. The parameter can also be expressed as a size parameter.
[0406] Next, the encoding device 100 determines whether the parameter is greater than the first threshold and less than the second threshold (S502). When the parameter is greater than the first threshold and less than the second threshold ("Yes" in S502), the encoding device 100 encodes the image block with a flag (S503). The first threshold is less than the second threshold. In addition, basically, the first threshold and the second threshold are greater than 0.
[0407] When the parameter is not greater than the first threshold and less than the second threshold (No in S503), that is, when the parameter is less than the first threshold or greater than the second threshold, the encoding device 100 encodes the image block without a flag (S504). Alternatively, when the parameter is not greater than the first threshold and less than the second threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into a plurality of partitions including triangular partitions.
[0408] The first threshold value may be the reciprocal of the second threshold value. In addition, the first threshold value may be a positive integer or a positive fraction. Similarly, the second threshold value may also be a positive integer or a positive fraction.
[0409] For example, the parameter is the ratio of the width of the image block to the height. The first threshold is the reciprocal of the second threshold. Then, when the ratio of the width of the image block to the height is greater than the first threshold and 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).
[0410] In addition, for example, two parameters, namely the first parameter and the 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 positive integers, respectively. Then, when both the width and the height of the image block are above the first threshold and below the second threshold, the encoding device 100 encodes the image block with a mark (S503). Otherwise, the encoding device 100 encodes the image block without a mark (S504).
[0411] In addition, for example, two parameters, namely the first parameter and the 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 positive integers, respectively. Then, when at least one of the width and height of the image block is above the first threshold and below the second threshold, the encoding device 100 encodes the image block with a mark (S503). Otherwise, the encoding device 100 encodes the image block without a mark (S504).
[0412] In addition, for example, two parameters, namely the first parameter and the second parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold, and the fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the ratio of the width of the image block to the height. In addition, the four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0413] Then, when the first parameter is greater than the first threshold and less than the second threshold, and the second parameter is greater than the third threshold and 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).
[0414] In addition, for example, two parameters, namely the first parameter and the second parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold, and the 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. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is less than the fourth threshold.
[0415] Then, when the first parameter is greater than the first threshold and less than the second threshold, and the second parameter is greater than the third threshold and 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).
[0416] In addition, for example, three parameters, namely the first parameter, the second parameter and the third parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold and the 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 of the image block to the height. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0417] Then, when both the first parameter and the second parameter are above the first threshold and below the second threshold, and the third parameter is above the third threshold and below 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).
[0418] In addition, if Fig. 20 As shown, the encoding device 100 can encode the above-mentioned flag based on the determination result. In this example, first, the encoding device 100 obtains the parameter of the image block (S601). The parameter of the image block can be at least one of the width of the image block, the height of the image block, and the ratio of the width of the image block to the height. The parameter can also be expressed as a size parameter.
[0419] Next, the encoding device 100 determines whether the parameter is greater than or equal to a threshold value (S602). If the parameter is greater than or equal to the threshold value (Yes in S602), the encoding device 100 encodes the image block with a flag (S603). Basically, the threshold value is greater than or equal to 0.
[0420] When the parameter is not above the threshold value ("No" in S602), that is, when the parameter is less than the threshold value, the encoding device 100 encodes the image block without a flag (S604). Alternatively, when the parameter is not above the threshold value, the encoding device 100 encodes the image block with a flag indicating that the image block is not divided into a plurality of partitions including a triangular partition.
[0421] For example, two parameters, namely the first parameter and the 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. Then, when both the width and the height of the image block are above 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).
[0422] In addition, for example, two parameters, namely the first parameter and the 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. Then, when at least one of the width and height of the image block is 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).
[0423] In addition, for example, the parameter is the width of the image block. The threshold is a positive integer. Then, when the width of the image block is 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).
[0424] When encoding an image block without a flag, the encoding device 100 may encode the image block without dividing the image block, or may divide the image block into a plurality of rectangular partitions for encoding.
[0425] In this method, the inter-frame prediction process for the triangle partition is simplified, thereby reducing the complexity of software and hardware.
[0426] [Second method of encoding and decoding]
[0427] Fig.21 denoting the encoding method and encoding process performed by the encoding device 100 according to the second embodiment. In addition, 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 can be replaced by "decoding" in the decoding method and decoding process.
[0428] First, the encoding apparatus 100 divides an image block into a plurality of partitions ( S701 ).
[0429] The segmentation can be as follows Fig. 12A , Fig. 12B , Fig. 12C , Fig.12D , Fig.12E , Fig.12F , Figure 12G , Fig.12H , Fig.12I or Fig.12J The division is not limited to any of these divisions, and these divisions can be freely combined.
[0430] Alternatively, the partitions can be Fig.13A , Fig. 13B , Fig. 13C , Fig.13D or Fig.13E Partitions shown. Specifically, the partitions may be rectangular partitions, non-rectangular partitions, triangular partitions, L-shaped partitions, pentagonal partitions, hexagonal partitions or polygonal partitions.
[0431] Next, the encoding device 100 creates a motion vector candidate list for a partition included in the plurality of partitions (S702). The motion vector candidate list may also 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.
[0432] A spatially adjacent partition is a partition that is spatially adjacent to a partition. A spatially adjacent partition may be a partition located above, to the left, to the right, below, to the upper left, to the upper right, to the lower left, or to the lower right of the partition.
[0433] 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 a reference picture of the partition. The reference picture is a different picture than the current picture containing the partition, or 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.
[0434] The multiple motion vectors for the multiple sub-partitions include motion vectors predicted based on motion vectors for sub-partitions that are spatially or temporally adjacent to each sub-partition, and are obtained through a sub-CU basic motion vector prediction process. The sub-CU basic motion vector prediction process may be ATMVP or STMVP.
[0435] 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 predetermined prediction mode such as merge mode or inter prediction mode.
[0436] In addition, the encoding device 100 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).
[0437] In the first method, the encoding device 100 selects a first motion vector for the partition from the motion vector candidate list (S704). Then, the encoding device 100 performs a first inter-frame prediction process on the partition using the first motion vector (S705). The first inter-frame prediction process includes a motion compensation process.
[0438] For example, the first inter-frame prediction process may include an OBMC process. Alternatively, the first inter-frame prediction process may also include a DMVR process, a BIO process, and an OBMC process.
[0439] In the second method, the encoding device 100 selects a second motion vector not based on the sub-partition for the partition from the motion vector candidate list (S706). For example, the second motion vector not based on the sub-partition is a motion vector not derived from the sub-CU basic motion vector prediction process. Then, the encoding device 100 performs a second inter-frame prediction process on the partition using the second motion vector (S707). The second inter-frame prediction process includes a motion compensation process.
[0440] For example, the second inter-frame prediction process is the same as the first inter-frame prediction process. Alternatively, the second inter-frame prediction process may include the BIO process but not the DMVR process.
[0441] Finally, the encoding device 100 encodes the image block using the result of the inter-frame prediction process for the partition (S708). For example, the encoding device 100 obtains a predicted image as the result of the inter-frame prediction process by performing the inter-frame prediction process. Then, the encoding device 100 encodes the image block using the predicted image.
[0442] Alternatively, the encoding device 100 performs the above-described processing ( S702 to S707 ) on each of the plurality of partitions, and the encoding device 100 encodes the image block using a plurality of results of the inter-frame prediction processing on the plurality of partitions.
[0443] The encoding device 100 may also encode a flag indicating whether the image block is segmented into multiple partitions including triangular partitions. The flag may also be expressed as a segmentation parameter. For example, when the flag is 1, it indicates that the image block is segmented into multiple partitions including triangular partitions, and when the flag is 0, it indicates that the image block is not segmented into multiple partitions including triangular partitions.
[0444] Furthermore, when the flag indicates that the image block is divided into a plurality of partitions including a triangular partition, the encoding device 100 divides the image block into a plurality of partitions including the triangular partition and performs encoding.
[0445] On the other hand, when the flag indicates that the image block is not divided into a plurality of partitions including a triangular partition, the encoding device 100 does not divide the image block into a plurality of partitions including a triangular partition for encoding. In this case, the encoding device 100 may encode without dividing the image block, or may divide the image block into a plurality of rectangular partitions for encoding.
[0446] In addition, if Fig.19As shown, the encoding device 100 can encode the above-mentioned flag based on the determination result. In this example, first, the encoding device 100 obtains the parameter of the image block (S501). The parameter of the image block can 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. The parameter can also be expressed as a size parameter.
[0447] Next, the encoding device 100 determines whether the parameter is greater than the first threshold and less than the second threshold (S502). When the parameter is greater than the first threshold and less than the second threshold ("Yes" in S502), the encoding device 100 encodes the image block with a flag (S503). The first threshold is less than the second threshold. In addition, basically, the first threshold and the second threshold are greater than 0.
[0448] When the parameter is not greater than the first threshold and less than the second threshold (No in S503), that is, when the parameter is less than the first threshold or greater than the second threshold, the encoding device 100 encodes the image block without a flag (S504). Alternatively, when the parameter is not greater than the first threshold and less than the second threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into a plurality of partitions including triangular partitions.
[0449] The first threshold value may be the reciprocal of the second threshold value. In addition, the first threshold value may be a positive integer or a positive fraction. Similarly, the second threshold value may also be a positive integer or a positive fraction.
[0450] For example, the parameter is the ratio of the width of the image block to the height. The first threshold is the reciprocal of the second threshold. Then, when the ratio of the width of the image block to the height is greater than the first threshold and 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).
[0451] In addition, for example, two parameters, namely the first parameter and the 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 positive integers, respectively. Then, when both the width and the height of the image block are above the first threshold and below the second threshold, the encoding device 100 encodes the image block with a mark (S503). Otherwise, the encoding device 100 encodes the image block without a mark (S504).
[0452] In addition, for example, two parameters, namely the first parameter and the 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 positive integers, respectively. Then, when at least one of the width and height of the image block is above the first threshold and below the second threshold, the encoding device 100 encodes the image block with a mark (S503). Otherwise, the encoding device 100 encodes the image block without a mark (S504).
[0453] In addition, for example, two parameters, namely the first parameter and the second parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold, and the fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the ratio of the width of the image block to the height. In addition, the four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0454] Then, when the first parameter is greater than the first threshold and less than the second threshold, and the second parameter is greater than the third threshold and 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).
[0455] In addition, for example, two parameters, namely the first parameter and the second parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold, and the 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. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is less than the fourth threshold.
[0456] Then, when the first parameter is greater than the first threshold and less than the second threshold, and the second parameter is greater than the third threshold and 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).
[0457] In addition, for example, three parameters, namely the first parameter, the second parameter and the third parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold and the 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 of the image block to the height. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0458] Then, when both the first parameter and the second parameter are above the first threshold and below the second threshold, and the third parameter is above the third threshold and below 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).
[0459] In addition, if Fig. 20 As shown, the encoding device 100 can encode the above-mentioned flag based on the determination result. In this example, first, the encoding device 100 obtains the parameter of the image block (S601). The parameter of the image block can be at least one of the width of the image block, the height of the image block, and the ratio of the width of the image block to the height. The parameter can also be expressed as a size parameter.
[0460] Next, the encoding device 100 determines whether the parameter is greater than or equal to a threshold value (S602). If the parameter is greater than or equal to the threshold value (Yes in S602), the encoding device 100 encodes the image block with a flag (S603). Basically, the threshold value is greater than or equal to 0.
[0461] When the parameter is not above the threshold value ("No" in S602), that is, when the parameter is less than the threshold value, the encoding device 100 encodes the image block without a flag (S604). Alternatively, when the parameter is not above the threshold value, the encoding device 100 encodes the image block with a flag indicating that the image block is not divided into a plurality of partitions including a triangular partition.
[0462] For example, two parameters, namely the first parameter and the 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. Then, when both the width and the height of the image block are above 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).
[0463] In addition, for example, two parameters, namely the first parameter and the 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. Then, when at least one of the width and height of the image block is 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).
[0464] In addition, for example, the parameter is the width of the image block. The threshold is a positive integer. Then, when the width of the image block is 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).
[0465] When encoding an image block without a flag, the encoding device 100 may encode the image block without dividing the image block, or may divide the image block into a plurality of rectangular partitions for encoding.
[0466] In this method, the motion vector prediction process of the triangle partition is simplified and the amount of calculation is reduced.
[0467] In addition, the encoding device 100 may generate a motion vector candidate list after determining whether the partition is a triangular partition. For example, the encoding device 100 may generate a motion vector candidate list including a motion vector based on a sub-partition when the partition is not a triangular partition. Furthermore, the encoding device 100 may generate a motion vector candidate list not including a motion vector based on a sub-partition when the partition is a triangular partition.
[0468] Thus, the encoding device 100 can select the first motion vector from the motion vector candidate list including the motion vector based on the sub-partition when the partition is not a triangular partition. In addition, the encoding device 100 can select the second motion vector not based on the sub-partition from the motion vector candidate list not including the motion vector based on the sub-partition when the partition is a triangular partition.
[0469] [Third method of encoding and decoding]
[0470] Fig. 22 denoting the encoding method and encoding process performed by the encoding device 100 according to the third embodiment. In addition, 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 can be replaced by "decoding" in the decoding method and decoding process.
[0471] First, the encoding apparatus 100 divides an image block into a plurality of partitions ( S801 ).
[0472] The segmentation can be as follows Fig. 12A , Fig. 12B , Fig. 12C , Fig.12D , Fig.12E , Fig.12F , Figure 12G , Fig.12H , Fig.12I or Fig.12J The division is not limited to any of these divisions, and these divisions can be freely combined.
[0473] Alternatively, the partitions can be Fig.13A , Fig. 13B , Fig. 13C , Fig.13D or Fig.13E Partitions shown. Specifically, the partitions may be rectangular partitions, non-rectangular partitions, triangular partitions, L-shaped partitions, pentagonal partitions, hexagonal partitions or polygonal partitions.
[0474] Next, the encoding device 100 creates a motion vector candidate list for a partition included in the plurality of partitions (S802). The motion vector candidate list may also 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.
[0475] A spatially adjacent partition is a partition that is spatially adjacent to a partition. A spatially adjacent partition may be a partition located above, to the left, to the right, below, to the upper left, to the upper right, to the lower left, or to the lower right of the partition.
[0476] 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 a reference picture of the partition. The reference picture is a different picture than the current picture containing the partition, or 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.
[0477] The multiple motion vectors for the multiple sub-partitions include motion vectors predicted based on motion vectors for sub-partitions that are spatially or temporally adjacent to each sub-partition, and are obtained through a sub-CU basic motion vector prediction process. The sub-CU basic motion vector prediction process can be either ATMVP or STMVP.
[0478] 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 predetermined prediction mode such as merge mode or inter prediction mode.
[0479] In addition, the encoding device 100 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).
[0480] In the first method, the encoding device 100 performs a first inter-frame prediction process on the partition using a motion vector in the motion vector candidate list (S804). For example, the first inter-frame prediction process includes a motion compensation process and a DMVR process. The first inter-frame prediction process may include a BIO process or may not include a BIO process.
[0481] For example, the predicted image obtained for the partition by the first method is the same as the part corresponding to the partition among the predicted images obtained for the image block without dividing the image block according to a predetermined prediction mode such as the merge mode or the inter-frame prediction mode.
[0482] In the second method, the encoding device 100 performs a second inter-frame prediction process on the partition using the motion vector in the motion vector candidate list (S805). For example, the second inter-frame prediction process includes motion compensation processing but does not include DMVR processing. The second inter-frame prediction process may include BIO processing or may not include BIO processing.
[0483] Finally, the encoding device 100 encodes the image block using the result of the inter-frame prediction process for the partition (S806). For example, the encoding device 100 obtains a predicted image as the result of the inter-frame prediction process by performing the inter-frame prediction process. Then, the encoding device 100 encodes the image block using the predicted image.
[0484] Alternatively, the encoding device 100 may perform the above-described processing ( S802 to S805 ) on each of the plurality of partitions, and the encoding device 100 may encode the image block using a plurality of results of the inter-frame prediction processing on the plurality of partitions.
[0485] The encoding device 100 may also encode a flag indicating whether the image block is segmented into multiple partitions including triangular partitions. The flag may also be expressed as a segmentation parameter. For example, when the flag is 1, it indicates that the image block is segmented into multiple partitions including triangular partitions, and when the flag is 0, it indicates that the image block is not segmented into multiple partitions including triangular partitions.
[0486] Furthermore, when the flag indicates that the image block is divided into a plurality of partitions including a triangular partition, the encoding device 100 divides the image block into a plurality of partitions including the triangular partition and performs encoding.
[0487] On the other hand, when the flag indicates that the image block is not divided into a plurality of partitions including a triangular partition, the encoding device 100 does not divide the image block into a plurality of partitions including a triangular partition for encoding. In this case, the encoding device 100 may encode without dividing the image block, or may divide the image block into a plurality of rectangular partitions for encoding.
[0488] In addition, if Fig.19 As shown, the encoding device 100 can encode the above-mentioned flag based on the determination result. In this example, first, the encoding device 100 obtains the parameter of the image block (S501). The parameter of the image block can 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. The parameter can also be expressed as a size parameter.
[0489] Next, the encoding device 100 determines whether the parameter is greater than the first threshold and less than the second threshold (S502). When the parameter is greater than the first threshold and less than the second threshold ("Yes" in S502), the encoding device 100 encodes the image block with a flag (S503). The first threshold is less than the second threshold. In addition, basically, the first threshold and the second threshold are greater than 0.
[0490] When the parameter is not greater than the first threshold and less than the second threshold (No in S503), that is, when the parameter is less than the first threshold or greater than the second threshold, the encoding device 100 encodes the image block without a flag (S504). Alternatively, when the parameter is not greater than the first threshold and less than the second threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into a plurality of partitions including triangular partitions.
[0491] The first threshold value may be the reciprocal of the second threshold value. In addition, the first threshold value may be a positive integer or a positive fraction. Similarly, the second threshold value may also be a positive integer or a positive fraction.
[0492] For example, the parameter is the ratio of the width of the image block to the height. The first threshold is the reciprocal of the second threshold. Then, when the ratio of the width of the image block to the height is greater than the first threshold and 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).
[0493] In addition, for example, two parameters, namely the first parameter and the 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 positive integers, respectively. Then, when both the width and the height of the image block are above the first threshold and below the second threshold, the encoding device 100 encodes the image block with a mark (S503). Otherwise, the encoding device 100 encodes the image block without a mark (S504).
[0494] In addition, for example, two parameters, namely the first parameter and the 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 positive integers, respectively. Then, when at least one of the width and height of the image block is above the first threshold and below the second threshold, the encoding device 100 encodes the image block with a mark (S503). Otherwise, the encoding device 100 encodes the image block without a mark (S504).
[0495] In addition, for example, two parameters, namely the first parameter and the second parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold, and the fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the ratio of the width of the image block to the height. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0496] Then, when the first parameter is greater than the first threshold and less than the second threshold, and the second parameter is greater than the third threshold and 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).
[0497] In addition, for example, two parameters, namely the first parameter and the second parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold, and the 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. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is less than the fourth threshold.
[0498] Then, when the first parameter is greater than the first threshold and less than the second threshold, and the second parameter is greater than the third threshold and 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).
[0499] In addition, for example, three parameters, namely the first parameter, the second parameter and the third parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold and the 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 of the image block to the height. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0500] Then, when both the first parameter and the second parameter are above the first threshold and below the second threshold, and the third parameter is above the third threshold and below 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).
[0501] In addition, if Fig. 20 As shown, the encoding device 100 can encode the above-mentioned flag based on the determination result. In this example, first, the encoding device 100 obtains the parameter of the image block (S601). The parameter of the image block can be at least one of the width of the image block, the height of the image block, and the ratio of the width of the image block to the height. The parameter can also be expressed as a size parameter.
[0502] Next, the encoding device 100 determines whether the parameter is greater than or equal to a threshold value (S602). If the parameter is greater than or equal to the threshold value (Yes in S602), the encoding device 100 encodes the image block with a flag (S603). Basically, the threshold value is greater than or equal to 0.
[0503] When the parameter is not above the threshold value ("No" in S602), that is, when the parameter is less than the threshold value, the encoding device 100 encodes the image block without a flag (S604). Alternatively, when the parameter is not above the threshold value, the encoding device 100 encodes the image block with a flag indicating that the image block is not divided into a plurality of partitions including a triangular partition.
[0504] For example, two parameters, namely the first parameter and the 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. Then, when both the width and the height of the image block are above 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).
[0505] In addition, for example, two parameters, namely the first parameter and the 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. Then, when at least one of the width and height of the image block is 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).
[0506] In addition, for example, the parameter is the width of the image block. The threshold is a positive integer. Then, when the width of the image block is 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).
[0507] When encoding an image block without a flag, the encoding device 100 may encode the image block without dividing the image block, or may divide the image block into a plurality of rectangular partitions for encoding.
[0508] In this method, the decoding-side motion vector refinement process for the triangle partition is removed, and the inter-frame prediction process for the triangle partition is simplified, thereby reducing the complexity of software and hardware.
[0509] [The fourth method of encoding and decoding]
[0510] Fig.23] represents the encoding method and encoding process performed by the encoding device 100 according to the fourth embodiment. In addition, 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 can be replaced by "decoding" in the decoding method and decoding process.
[0511] First, the encoding apparatus 100 divides an image block into a plurality of partitions ( S901 ).
[0512] The segmentation can be as follows Fig. 12A , Fig. 12B , Fig. 12C , Fig.12D , Fig.12E , Fig.12F , Figure 12G , Fig.12H , Fig.12I or Fig.12J The division is not limited to any of these divisions, and these divisions can be freely combined.
[0513] Alternatively, the partitions can be Fig.13A , Fig. 13B , Fig. 13C , Fig.13D or Fig.13E Partitions shown. Specifically, the partitions may be rectangular partitions, non-rectangular partitions, triangular partitions, L-shaped partitions, pentagonal partitions, hexagonal partitions or polygonal partitions.
[0514] Next, the encoding device 100 creates a motion vector candidate list for a partition included in the plurality of partitions (S902). The motion vector candidate list may also 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.
[0515] A spatially adjacent partition is a partition that is spatially adjacent to a partition. A spatially adjacent partition may be a partition located above, to the left, to the right, below, to the upper left, to the upper right, to the lower left, or to the lower right of the partition.
[0516] 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 a reference picture of the partition. The reference picture is a different picture than the current picture containing the partition, or 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.
[0517] The multiple motion vectors for the multiple sub-partitions include motion vectors predicted based on motion vectors for sub-partitions that are spatially or temporally adjacent to each sub-partition, and are obtained through a sub-CU basic motion vector prediction process. The sub-CU basic motion vector prediction process can be either ATMVP or STMVP.
[0518] 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 predetermined prediction mode such as merge mode or inter prediction mode.
[0519] In addition, the encoding device 100 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).
[0520] In the first method, the encoding device 100 performs a first inter-frame prediction process on the partition using a motion vector in the motion vector candidate list (S904). For example, the first inter-frame prediction process includes a motion compensation process and a BIO process. The first inter-frame prediction process may include a DMVR process or may not include a DMVR process.
[0521] For example, the predicted image obtained for the partition by the first method is the same as the part corresponding to the partition among the predicted images obtained for the image block without dividing the image block according to a predetermined prediction mode such as the merge mode or the inter-frame prediction mode.
[0522] In the second method, the encoding device 100 performs a second inter-frame prediction process on the partition using the motion vector in the motion vector candidate list (S905). For example, the second inter-frame prediction process includes motion compensation processing but does not include BIO processing. The second inter-frame prediction process may include DMVR processing or may not include DMVR processing.
[0523] Finally, the encoding device 100 encodes the image block using the result of the inter-frame prediction process for the partition (S906). For example, the encoding device 100 obtains a predicted image as the result of the inter-frame prediction process by performing the inter-frame prediction process. Then, the encoding device 100 encodes the image block using the predicted image.
[0524] Alternatively, the encoding device 100 performs the above-described processing ( S902 to S905 ) on each of the plurality of partitions. The encoding device 100 encodes the image block using a plurality of results of the inter-frame prediction processing on the plurality of partitions.
[0525] The encoding device 100 may also encode a flag indicating whether the image block is segmented into multiple partitions including triangular partitions. The flag may also be expressed as a segmentation parameter. For example, when the flag is 1, it indicates that the image block is segmented into multiple partitions including triangular partitions, and when the flag is 0, it indicates that the image block is not segmented into multiple partitions including triangular partitions.
[0526] Furthermore, when the flag indicates that the image block is divided into a plurality of partitions including a triangular partition, the encoding device 100 divides the image block into a plurality of partitions including the triangular partition and performs encoding.
[0527] On the other hand, when the flag indicates that the image block is not divided into a plurality of partitions including a triangular partition, the encoding device 100 does not divide the image block into a plurality of partitions including a triangular partition for encoding. In this case, the encoding device 100 may encode without dividing the image block, or may divide the image block into a plurality of rectangular partitions for encoding.
[0528] In addition, if Fig.19 As shown, the encoding device 100 can encode the above-mentioned flag based on the determination result. In this example, first, the encoding device 100 obtains the parameter of the image block (S501). The parameter of the image block can 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. The parameter can also be expressed as a size parameter.
[0529] Next, the encoding device 100 determines whether the parameter is greater than the first threshold and less than the second threshold (S502). When the parameter is greater than the first threshold and less than the second threshold ("Yes" in S502), the encoding device 100 encodes the image block with a flag (S503). The first threshold is less than the second threshold. In addition, basically, the first threshold and the second threshold are greater than 0.
[0530] When the parameter is not greater than the first threshold and less than the second threshold (No in S503), that is, when the parameter is less than the first threshold or greater than the second threshold, the encoding device 100 encodes the image block without a flag (S504). Alternatively, when the parameter is not greater than the first threshold and less than the second threshold, the encoding device 100 may encode the image block with a flag indicating that the image block is not divided into a plurality of partitions including triangular partitions.
[0531] The first threshold value may be the reciprocal of the second threshold value. In addition, the first threshold value may be a positive integer or a positive fraction. Similarly, the second threshold value may also be a positive integer or a positive fraction.
[0532] For example, the parameter is the ratio of the width of the image block to the height. The first threshold is the reciprocal of the second threshold. Then, when the ratio of the width of the image block to the height is greater than the first threshold and 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).
[0533] In addition, for example, two parameters, namely the first parameter and the 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 positive integers, respectively. Then, when both the width and the height of the image block are above the first threshold and below the second threshold, the encoding device 100 encodes the image block with a mark (S503). Otherwise, the encoding device 100 encodes the image block without a mark (S504).
[0534] In addition, for example, two parameters, namely the first parameter and the 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 positive integers, respectively. Then, when at least one of the width and height of the image block is above the first threshold and below the second threshold, the encoding device 100 encodes the image block with a mark (S503). Otherwise, the encoding device 100 encodes the image block without a mark (S504).
[0535] In addition, for example, two parameters, namely the first parameter and the second parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold, and the fourth threshold, are used. The first parameter is the width of the image block, and the second parameter is the ratio of the width of the image block to the height. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0536] Then, when the first parameter is greater than the first threshold and less than the second threshold, and the second parameter is greater than the third threshold and 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).
[0537] In addition, for example, two parameters, namely the first parameter and the second parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold, and the 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. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is less than the fourth threshold.
[0538] Then, when the first parameter is greater than the first threshold and less than the second threshold, and the second parameter is greater than the third threshold and 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).
[0539] In addition, for example, three parameters, namely the first parameter, the second parameter and the third parameter, and four thresholds, namely the first threshold, the second threshold, the third threshold and the 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 of the image block to the height. The four thresholds are positive integers. The first threshold is less than the second threshold. The third threshold is the reciprocal of the fourth threshold.
[0540] Then, when both the first parameter and the second parameter are above the first threshold and below the second threshold, and the third parameter is above the third threshold and below 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).
[0541] In addition, if Fig. 20 As shown, the encoding device 100 can encode the above-mentioned flag based on the determination result. In this example, first, the encoding device 100 obtains the parameter of the image block (S601). The parameter of the image block can be at least one of the width of the image block, the height of the image block, and the ratio of the width of the image block to the height. The parameter can also be expressed as a size parameter.
[0542] Next, the encoding device 100 determines whether the parameter is greater than or equal to a threshold value (S602). If the parameter is greater than or equal to the threshold value (Yes in S602), the encoding device 100 encodes the image block with a flag (S603). Basically, the threshold value is greater than or equal to 0.
[0543] When the parameter is not above the threshold value ("No" in S602), that is, when the parameter is less than the threshold value, the encoding device 100 encodes the image block without a flag (S604). Alternatively, when the parameter is not above the threshold value, the encoding device 100 encodes the image block with a flag indicating that the image block is not divided into a plurality of partitions including a triangular partition.
[0544] For example, two parameters, namely the first parameter and the 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. Then, when both the width and the height of the image block are above 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).
[0545] In addition, for example, two parameters, namely the first parameter and the 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. Then, when at least one of the width and height of the image block is 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).
[0546] In addition, for example, the parameter is the width of the image block. The threshold is a positive integer. Then, when the width of the image block is 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).
[0547] When encoding an image block without a flag, the encoding device 100 may encode the image block without dividing the image block, or may divide the image block into a plurality of rectangular partitions for encoding.
[0548] In this method, the bidirectional optical flow processing for the triangle partition is removed, and the inter-frame prediction processing for the triangle partition is simplified, thereby reducing the complexity of software and hardware.
[0549] [Decoding and encoding variants]
[0550] The triangular partition in the above description may be replaced by a non-rectangular partition. Furthermore, the processing may be switched according to whether the partition is a non-rectangular partition. In addition, at this time, if the partition is a triangular partition, it may be determined that the partition is a non-rectangular partition.
[0551] Non-rectangular partitions can also be Fig.13A , Fig. 13B , Fig. 13C , Fig.13D or Fig.13E The L-shaped partition, pentagonal partition, hexagonal partition or polygonal partition shown. The image block can be divided into a plurality of partitions including at least one of non-rectangular partitions and rectangular partitions.
[0552] In addition, the non-rectangular partition in the above description refers to a partition that is not a rectangular partition. Fig.13A , Fig. 13B , Fig. 13C , Fig.13D as well as Fig.13E Any of the multiple partitions described. These multiple partitions can also be freely combined.
[0553] In addition, the partitions in the above description may be replaced by prediction units. In addition, the partitions may be replaced by sub-prediction units. In addition, the image blocks in the above description may be replaced by coding units. In addition, the image blocks may be replaced by coding tree units.
[0554] In addition, the ratio of the size of the image block may be a ratio of the width to the height, or a ratio of the height to the width. In addition, one or more thresholds compared with the parameter of the size of the image block may also represent 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 including non-rectangular partitions.
[0555] In addition, when the BIO process 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 also obtain the gradient image by applying a filter that extracts a difference value between pixels to the predicted image. When the BIO process is not performed, the encoding device 100 obtains the predicted image obtained without using the gradient image as the final predicted image.
[0556] In addition, the first aspect, the second aspect, the third aspect, and the fourth aspect in the above description can be arbitrarily combined.
[0557] [Installation example]
[0558] Fig.24 1 is a block diagram showing an implementation example of the coding device 100. The coding device 100 includes a circuit 160 and a memory 162. For example, Figure 1 The multiple components of the encoding device 100 shown are Fig.24 Circuitry 160 and memory 162 are shown installed.
[0559] The circuit 160 is an electronic circuit that can access the memory 162 and perform information processing. For example, the circuit 160 is a dedicated or general-purpose electronic circuit that encodes a moving image using the memory 162. The circuit 160 may also be a processor such as a CPU. In addition, the circuit 160 may also be a collection of multiple electronic circuits.
[0560] In addition, for example, circuit 160 may also function Figure 1 The functions of the plurality of components other than the components for storing information among the plurality of components of the coding device 100 shown in the figure. That is, the circuit 160 may also perform the above-mentioned operations as the operations of these components.
[0561] The memory 162 is a dedicated or general-purpose memory that stores information used by the circuit 160 to encode moving images. The memory 162 may be an electronic circuit, and may be connected to the circuit 160 or included in the circuit 160.
[0562] In addition, the memory 162 may be a collection of multiple electronic circuits, or may be composed of multiple sub-memories. In addition, the memory 162 may be a magnetic disk or an optical disk, or may be a storage or a recording medium. In addition, the memory 162 may be a non-volatile memory or a volatile memory.
[0563] For example, memory 162 may also function as Figure 1 The memory 162 may also serve as a component for storing information among the multiple components of the encoding device 100 shown in FIG. Figure 1 The functions of the block memory 118 and the frame memory 122 are shown.
[0564] In addition, the memory 162 may store the encoded moving image or a bit string corresponding to the encoded moving image. In addition, the memory 162 may store a program for the circuit 160 to encode the moving image.
[0565] In addition, in the encoding device 100, it is not necessary to install Figure 1 All of the plurality of components shown may not perform all of the plurality of processes described above. Figure 1 Part of the multiple components shown may be included in other devices, or part of the multiple processes described above may be performed by other devices. Figure 1 By using some of the multiple components shown in the figure and performing some of the multiple processes described above, it is possible to efficiently process the image block.
[0566] Fig.25 Yes means Fig.24 For example, the circuit 160 in the encoding device 100 uses the memory 162 to perform Fig.25 Specifically, the circuit 160 encodes the image block (S1111).
[0567] 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.
[0568] Then, when it is determined that one or more size parameters and one or more thresholds satisfy a predetermined relationship, the circuit 160 encodes a segmentation parameter indicating whether the image block is segmented into a plurality of partitions including a non-rectangular partition. Furthermore, when the segmentation parameter indicates that the image block is segmented into a plurality of partitions, the circuit 160 segments the image block into a plurality of partitions for encoding.
[0569] Thus, the encoding device 100 can switch whether to divide the image block into a plurality of 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. Therefore, the encoding device 100 can efficiently process the image block.
[0570] In addition, for example, when the circuit 160 determines that one or more size parameters and one or more thresholds do not satisfy a predetermined relationship, the image block is encoded without encoding the segmentation parameter. Thus, the amount of code can be reduced. In addition, the encoding device 100 can reduce the amount of processing for encoding the segmentation parameter.
[0571] In addition, for example, when the circuit 160 determines that one or more size parameters do not satisfy a predetermined relationship with one or more threshold values, the circuit 160 does not divide the image block or divides the image block into a plurality of rectangular partitions for encoding. Thus, the encoding device 100 can suppress dividing the image block into a plurality of partitions including non-rectangular partitions.
[0572] In addition, for example, when the segmentation parameter indicates that the image block is not segmented into multiple partitions, the circuit 160 does not segment the image block or segments the image block into multiple rectangular partitions for encoding. Thus, the encoding device 100 can suppress segmenting the image block into multiple partitions including non-rectangular partitions.
[0573] In addition, for example, one or more thresholds are one threshold. Moreover, the prescribed relationship is that one or more size parameters are respectively one or more thresholds or at least one of the one or more size parameters is one or more thresholds. Thus, the encoding device 100 can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions when one or more size parameters are one or more thresholds.
[0574] In addition, for example, one or more thresholds are a first threshold and a second threshold, and the first threshold is less than the second threshold. Moreover, the prescribed relationship is that one or more size parameters are respectively greater than the first threshold and less than the second threshold, or at least one of the one or more size parameters is greater than the first threshold and less than the second threshold. Thus, the encoding device 100 can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions when one or more size parameters are greater than the first threshold and less than the second threshold.
[0575] In addition, for example, the non-rectangular partition is a triangular partition. Thus, the encoding device 100 can switch whether to divide the image block into a plurality of partitions including the triangular partition when one or more size parameters and one or more thresholds related to the size of the image block satisfy a predetermined relationship.
[0576] In addition, for example, the one or more size parameters include at least one of a ratio of a width of an image block to a height of the image block, a ratio of a height of an image block to a width of the image block, a width of the image block, and a height of the image block. Thus, the encoding device 100 can use at least one of a ratio of a width of an image block to a height, a ratio of a height of an image block to a width, a width of an image block, and a height of an image block as a size parameter.
[0577] In addition, for example, one or more thresholds are each greater than 0. Thus, when one or more size parameters and one or more thresholds each greater than 0 satisfy a predetermined relationship, the encoding device 100 can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions.
[0578] In addition, for example, one or more thresholds represent 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. Thus, the encoding device 100 can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions when one or more size parameters and one or more thresholds representing a limit range of the ratio of the width to the height satisfy a predetermined relationship.
[0579] Fig.26 Yes means Fig.24 For example, the circuit 160 in the encoding device 100 uses the memory 162 to perform Fig.26 Specifically, the circuit 160 divides the 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).
[0580] For example, when obtaining the predicted image, the circuit 160 determines whether the partition is a non-rectangular partition.
[0581] Here, when the circuit 160 determines that the partition is not a non-rectangular partition, it uses the first motion vector for the partition to obtain a first predicted image for the partition. Then, the circuit 160 uses the first predicted image to obtain a second motion vector for the partition, and uses the second motion vector to obtain a second predicted image for the partition as a predicted image.
[0582] On the other hand, when 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 instead of the second motion vector.
[0583] Thus, the encoding device 100 can suppress the operation of two stages for non-rectangular partitions, and can suppress the increase in the amount of processing. Therefore, the encoding device 100 can process image blocks efficiently.
[0584] Furthermore, for example, when the partition is a triangular partition, the circuit 160 determines that the partition is a non-rectangular partition. Thus, the encoding device 100 can suppress an increase in the amount of processing for the triangular partition.
[0585] Furthermore, for example, when it is determined that the partition is not a non-rectangular partition, the predicted image obtained is the same as the portion corresponding to the partition among the predicted images obtained for the image block in the prescribed prediction mode. Here, the predicted image obtained for the image block in the prescribed prediction mode is a predicted image obtained for the image block without dividing the image block into a plurality of partitions.
[0586] Thus, the encoding device 100 can obtain a prediction image for a rectangular partition, similar to the case where a prediction image is obtained for an image block without dividing the image block into a plurality of partitions. Therefore, the encoding device 100 can simplify the processing.
[0587] Furthermore, for example, the circuit 160 acquires the second motion vector by performing motion estimation using the first predicted image. Thus, the encoding device 100 can acquire an appropriate second motion vector using the first predicted image, and can acquire an appropriate second predicted image using the appropriate second motion vector.
[0588] Furthermore, for example, when obtaining a predicted image, the circuit 160 determines whether the partition is a non-rectangular partition.
[0589] Here, when the circuit 160 determines that the partition is not a non-rectangular partition, it obtains a first prediction image for the partition, obtains a gradient image for the first prediction image, and obtains a second prediction image as a prediction image using the first prediction 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 prediction image as a prediction image without using the gradient image.
[0590] Thus, the encoding device 100 can suppress the use of gradient images for non-rectangular partitions, and can suppress an increase in the amount of processing. Therefore, the encoding device 100 can efficiently process image blocks.
[0591] Furthermore, for example, when the partition is a triangular partition, the circuit 160 determines that the partition is a non-rectangular partition. Thus, the encoding device 100 can suppress an increase in the amount of processing for the triangular partition.
[0592] Furthermore, for example, when it is determined that the partition is not a non-rectangular partition, the predicted image obtained is the same as the portion corresponding to the partition among the predicted images obtained for the image block in the prescribed prediction mode. The predicted image obtained for the image block in the prescribed prediction mode is a predicted image obtained for the image block without dividing the image block into a plurality of partitions.
[0593] Thus, the encoding device 100 can obtain a prediction image for a rectangular partition, similar to the case where a prediction image is obtained for an image block without dividing the image block into a plurality of partitions. Therefore, the encoding device 100 can simplify the processing.
[0594] In addition, for example, the circuit 160 obtains a gradient image by applying a filter that extracts difference values between pixels to the first predicted image. Thus, the encoding device 100 can obtain an appropriate gradient image for the first predicted image and can obtain an appropriate second predicted image using the appropriate gradient image.
[0595] Fig. 27 Yes means Fig.24 For example, the circuit 160 in the encoding device 100 uses the memory 162 to perform Fig. 27 Action shown.
[0596] Specifically, the circuit 160 divides the image block into a plurality of partitions ( S1131 ) and then generates a motion vector candidate list for a partition included in the plurality of partitions ( S1132 ).
[0597] Then, the circuit 160 obtains the motion vector for the partition from the motion vector candidate list (S1133). Then, the circuit 160 uses the motion vector for the partition to perform inter-frame prediction processing for the partition (S1134). Then, the circuit 160 uses the result of the inter-frame prediction processing to encode the image block (S1135).
[0598] Furthermore, for example, when generating a motion vector candidate list, the circuit 160 determines whether the partition is a non-rectangular partition.
[0599] If it is determined that the partition is not a non-rectangular partition, the circuit 160 generates a motion vector candidate list using at least one of the motion vectors for multiple spatially adjacent partitions, multiple motion vectors for multiple temporally adjacent partitions, and multiple motion vectors for multiple sub-partitions.
[0600] When the partition is determined to be a non-rectangular partition, the circuit 160 also generates a motion vector candidate list. However, in this case, instead of using multiple motion vectors for multiple sub-partitions, at least one motion vector from multiple motion vectors for multiple spatially adjacent partitions and multiple motion vectors for multiple temporally adjacent partitions is used.
[0601] Here, a plurality of spatially adjacent partitions are spatially adjacent to a partition. A plurality of temporally adjacent partitions are temporally adjacent to a partition. A plurality of sub-partitions are included in a partition.
[0602] Thus, the encoding device 100 can suppress the use of multiple motion vectors for multiple sub-partitions for non-rectangular partitions, and can suppress an increase in the amount of processing. Therefore, the encoding device 100 can efficiently process image blocks.
[0603] Furthermore, for example, when the partition is a triangular partition, the circuit 160 determines that the partition is a non-rectangular partition. Thus, the encoding device 100 can suppress an increase in the amount of processing for the triangular partition.
[0604] In addition, for example, the plurality of motion vectors for the plurality of sub-partitions include motion vectors predicted from motion vectors for regions that are spatially or temporally adjacent to the plurality of sub-partitions, respectively. Thus, the encoding apparatus 100 can use a motion vector predicted as a motion vector for the sub-partition from a motion vector for a region adjacent to the sub-partition.
[0605] In addition, for example, when it is determined that the partition is not a non-rectangular partition, the motion vector candidate list generated is the same as the motion vector candidate list generated for the image block in the prescribed prediction mode. Thus, the encoding device 100 can generate a motion vector candidate list for the rectangular partition, as in the case of generating a motion vector candidate list for the image block. Therefore, the encoding device 100 can simplify the processing.
[0606] In addition, for example, a plurality of temporally adjacent partitions are co-located partitions corresponding to the positions of the partitions in a picture different from the picture containing the partitions. Thus, the encoding apparatus 100 can use the motion vector for the co-located partition as the motion vector for the temporally adjacent partition.
[0607] Fig.28 2 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, Fig.10 The multiple components of the decoding device 200 shown are Fig.28 Circuitry 260 and memory 262 are shown installed.
[0608] The circuit 260 is an electronic circuit that can access the memory 262 and perform information processing. For example, the circuit 260 is a dedicated or general-purpose electronic circuit that decodes a moving image using the memory 262. The circuit 260 may also be a processor such as a CPU. In addition, the circuit 260 may also be a collection of multiple electronic circuits.
[0609] In addition, for example, circuit 260 may also function Fig.10 The functions of the plurality of components other than the components for storing information among the plurality of components of the decoding device 200 shown in the figure. That is, the circuit 260 may also perform the above-mentioned operations as the operations of these components.
[0610] The memory 262 is a dedicated or general-purpose memory that stores information used by the circuit 260 to decode moving images. The memory 262 may be an electronic circuit, and may be connected to the circuit 260 or included in the circuit 260.
[0611] In addition, the memory 262 may be a collection of multiple electronic circuits, or may be composed of multiple sub-memories. In addition, the memory 262 may be a magnetic disk or an optical disk, or may be a storage or a recording medium. In addition, the memory 262 may be a non-volatile memory or a volatile memory.
[0612] For example, memory 262 may also function as Fig.10 The memory 262 may also serve as a component for storing information among the multiple components of the decoding device 200 shown in FIG. Fig.10 The functions of the block memory 210 and the frame memory 214 are shown.
[0613] The memory 262 may store a bit string corresponding to an encoded moving image or a decoded moving image. The memory 262 may also store a program for the circuit 260 to decode the moving image.
[0614] In addition, in the decoding device 200, it is not necessary to install Fig.10 All of the plurality of components shown may not perform all of the plurality of processes described above. Fig.10 Part of the multiple components shown may be included in other devices, or part of the multiple processes described above may be performed by other devices. Fig.10 By using some of the multiple components shown in the figure and performing some of the multiple processes described above, it is possible to efficiently process the image block.
[0615] Fig.29 Yes means Fig.28For example, the circuit 260 in the decoding device 200 uses the memory 262 to perform Fig.29 Specifically, the circuit 260 decodes the image block (S1211).
[0616] 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.
[0617] Then, when it is determined that one or more size parameters and one or more thresholds satisfy a predetermined relationship, the circuit 260 decodes a segmentation parameter indicating whether the image block is segmented into a plurality of partitions including a non-rectangular partition. Furthermore, when the segmentation parameter indicates that the image block is segmented into a plurality of partitions, the image block is segmented into a plurality of partitions for decoding.
[0618] Thus, the decoding device 200 can switch whether to divide the image block into a plurality of 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. Therefore, the decoding device 200 can efficiently process the image block.
[0619] In addition, for example, when the circuit 260 determines that one or more size parameters and one or more thresholds do not satisfy a predetermined relationship, the circuit 260 does not decode the segmentation parameter and decodes the image block. This can reduce the amount of code. In addition, the decoding device 200 can reduce the amount of processing for decoding the segmentation parameter.
[0620] In addition, for example, when the circuit 260 determines that one or more size parameters and one or more thresholds do not satisfy a predetermined relationship, the circuit 260 does not divide the image block or divides the image block into a plurality of rectangular partitions for decoding. Thus, the decoding device 200 can suppress dividing the image block into a plurality of partitions including non-rectangular partitions.
[0621] In addition, for example, when the segmentation parameter indicates that the image block is not segmented into multiple partitions, the circuit 260 does not segment the image block or segments the image block into multiple rectangular partitions for decoding. Thus, the decoding device 200 can suppress segmenting the image block into multiple partitions including non-rectangular partitions.
[0622] In addition, for example, one or more thresholds are one threshold. Furthermore, the prescribed relationship is that one or more size parameters are respectively one or more thresholds or at least one of the one or more size parameters is one or more thresholds. Thus, the decoding device 200 can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions when one or more size parameters are one or more thresholds.
[0623] In addition, for example, the one or more thresholds are the first threshold and the second threshold, and the first threshold is less than the second threshold. Furthermore, the prescribed relationship is that the one or more size parameters are respectively greater than the first threshold and less than the second threshold, or at least one of the one or more size parameters is greater than the first threshold and less than the second threshold. Thus, the decoding device 200 can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions when the one or more size parameters are greater than the first threshold and less than the second threshold.
[0624] In addition, for example, the non-rectangular partition is a triangular partition. Thus, the decoding apparatus 200 can switch whether to divide the image block into a plurality of partitions including the triangular partition when one or more size parameters and one or more thresholds related to the size of the image block satisfy a predetermined relationship.
[0625] In addition, for example, the one or more size parameters include at least one of a ratio of a width of an image block to a height of the image block, a ratio of a height of an image block to a width of the image block, a width of the image block, and a height of the image block. Thus, the decoding apparatus 200 can use at least one of a ratio of a width of an image block to a height, a ratio of a height of an image block to a width, a width of an image block, and a height of an image block as a size parameter.
[0626] For example, one or more thresholds are each greater than 0. Thus, when one or more size parameters and one or more thresholds each greater than 0 satisfy a predetermined relationship, the decoding apparatus 200 can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions.
[0627] In addition, for example, one or more thresholds represent 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. Thus, the decoding device 200 can switch whether to divide the image block into a plurality of partitions including non-rectangular partitions when one or more size parameters and one or more thresholds representing the limit range of the ratio of the width to the height satisfy a predetermined relationship.
[0628] Fig.30 Yes means Fig.28 For example, the circuit 260 in the decoding device 200 uses the memory 262 to perform Fig.30 For example, the circuit 260 divides the 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).
[0629] In addition, for example, when obtaining the predicted image, the circuit 260 determines whether the partition is a non-rectangular partition.
[0630] Here, when the circuit 260 determines that the partition is not a non-rectangular partition, it uses the first motion vector for the partition to obtain a first predicted image for the partition. Then, the circuit 260 uses the first predicted image to obtain a second motion vector for the partition, and uses the second motion vector to obtain a second predicted image for the partition as a predicted image.
[0631] On the other hand, when 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 instead of the second motion vector.
[0632] Thus, the decoding apparatus 200 can suppress the operation of two stages for the non-rectangular partition, and can suppress the increase in the amount of processing. Therefore, the decoding apparatus 200 can process the image block efficiently.
[0633] Furthermore, for example, when the partition is a triangular partition, the circuit 260 determines that the partition is a non-rectangular partition. Thus, the decoding apparatus 200 can suppress an increase in the amount of processing for the triangular partition.
[0634] Furthermore, for example, when it is determined that the partition is not a non-rectangular partition, the predicted image obtained is the same as the portion corresponding to the partition among the predicted images obtained for the image block in the prescribed prediction mode. The predicted image obtained for the image block in the prescribed prediction mode is a predicted image obtained for the image block without dividing the image block into a plurality of partitions.
[0635] Thus, the decoding apparatus 200 can obtain a prediction image for a rectangular partition, similar to the case where a prediction image is obtained for an image block without dividing the image block into a plurality of partitions. Therefore, the decoding apparatus 200 can simplify the processing.
[0636] Furthermore, for example, the circuit 260 acquires the second motion vector by performing motion estimation using the first predicted image. Thus, the decoding apparatus 200 can acquire an appropriate second motion vector using the first predicted image, and can acquire an appropriate second predicted image using the appropriate second motion vector.
[0637] In addition, for example, when obtaining a predicted image, the circuit 260 determines whether the partition is a non-rectangular partition.
[0638] Here, when it is determined that the partition is not a non-rectangular partition, a first prediction image for the partition is obtained, a gradient image for the first prediction image is obtained, and a second prediction image is obtained as a prediction image using the first prediction image and the gradient image. On the other hand, when it is determined that the partition is a non-rectangular partition, the first prediction image is obtained as a prediction image without using the gradient image.
[0639] Thus, the decoding apparatus 200 can suppress the use of gradient images for non-rectangular partitions, and can suppress an increase in the amount of processing. Therefore, the decoding apparatus 200 can efficiently process image blocks.
[0640] Furthermore, for example, when the partition is a triangular partition, the circuit 260 determines that the partition is a non-rectangular partition. Thus, the decoding apparatus 200 can suppress an increase in the amount of processing for the triangular partition.
[0641] Furthermore, for example, when it is determined that the partition is not a non-rectangular partition, the predicted image obtained is the same as the portion corresponding to the partition among the predicted images obtained for the image block in the prescribed prediction mode. Here, the predicted image obtained for the image block in the prescribed prediction mode is a predicted image obtained for the image block without dividing the image block into a plurality of partitions.
[0642] Thus, the decoding apparatus 200 can obtain a prediction image for a rectangular partition, similar to the case where a prediction image is obtained for an image block without dividing the image block into a plurality of partitions. Therefore, the decoding apparatus 200 can simplify the processing.
[0643] In addition, for example, the circuit 260 obtains a gradient image by applying a filter that extracts difference values between pixels to the first predicted image. Thus, the decoding device 200 can obtain an appropriate gradient image for the first predicted image and can obtain an appropriate second predicted image using the appropriate gradient image.
[0644] Fig.31 Yes means Fig.28 For example, the circuit 260 in the decoding device 200 uses the memory 262 to perform Fig.31 Action shown.
[0645] Specifically, the circuit 260 divides the image block into a plurality of partitions (S1231) and then generates a motion vector candidate list for a partition included in the plurality of partitions (S1232).
[0646] Then, the circuit 260 obtains the motion vector for the partition from the motion vector candidate list (S1233). Then, the circuit 260 uses the motion vector for the partition to perform inter-frame prediction processing for the partition (S1134). Then, the circuit 260 uses the result of the inter-frame prediction processing to decode the image block (S1135).
[0647] Furthermore, for example, when generating the motion vector candidate list, the circuit 260 determines whether the partition is a non-rectangular partition.
[0648] If it is determined that the partition is not a non-rectangular partition, the circuit 260 generates a motion vector candidate list using at least one of the motion vectors for multiple spatially adjacent partitions, multiple motion vectors for multiple temporally adjacent partitions, and multiple motion vectors for multiple sub-partitions.
[0649] When the partition is determined to be a non-rectangular partition, the circuit 260 also generates a motion vector candidate list. However, in this case, instead of using multiple motion vectors for multiple sub-partitions, at least one motion vector from multiple motion vectors for multiple spatially adjacent partitions and multiple motion vectors for multiple temporally adjacent partitions is used.
[0650] Here, a plurality of spatially adjacent partitions are spatially adjacent to a partition. A plurality of temporally adjacent partitions are temporally adjacent to a partition. A plurality of sub-partitions are included in a partition.
[0651] Thus, the decoding apparatus 200 can suppress the use of multiple motion vectors for multiple sub-partitions for a non-rectangular partition, and can suppress an increase in the amount of processing. Therefore, the decoding apparatus 200 can efficiently process an image block.
[0652] Furthermore, for example, when the partition is a triangular partition, the circuit 260 determines that the partition is a non-rectangular partition. Thus, the decoding apparatus 200 can suppress an increase in the amount of processing for the triangular partition.
[0653] In addition, for example, the plurality of motion vectors for the plurality of sub-partitions include motion vectors predicted from motion vectors for regions that are spatially or temporally adjacent to the plurality of sub-partitions, respectively. Thus, the decoding apparatus 200 can use a motion vector predicted as a motion vector for the sub-partition from a motion vector for a region adjacent to the sub-partition.
[0654] In addition, for example, when it is determined that the partition is not a non-rectangular partition, the motion vector candidate list generated is the same as the motion vector candidate list generated for the image block in the prescribed prediction mode. Thus, the decoding device 200 can generate a motion vector candidate list for the rectangular partition, as in the case of generating a motion vector candidate list for the image block. Therefore, the decoding device 200 can simplify the processing.
[0655] In addition, for example, the plurality of temporally adjacent partitions are co-located partitions corresponding to the positions of the partitions in pictures different from the pictures including the partitions. Thus, the decoding apparatus 200 can use the motion vector for the co-located partition as the motion vector for the temporally adjacent partition.
[0656] [Replenish]
[0657] Furthermore, the encoding device 100 and the decoding device 200 in this embodiment can be used as an image encoding device and an image decoding device, respectively, or can be used as a moving image encoding device and a moving image decoding device, respectively.
[0658] Alternatively, the encoding device 100 and the decoding device 200 can be used as a prediction device or an inter-frame prediction device, respectively. That is, the encoding device 100 and the decoding device 200 can correspond only to the inter-frame prediction unit 126 and the inter-frame prediction unit 218, respectively. In addition, other components such as the entropy encoding unit 110 or the entropy decoding unit 202 can also be included in other devices.
[0659] In addition, at least a part of the present embodiment can be used as an encoding method, can be used as a decoding method, can be used as a prediction method, and can be used as other methods.
[0660] In addition, in the present embodiment, each component is composed of dedicated hardware, but can also be implemented by executing a software program suitable for each component. Each component can be implemented by a program execution unit such as a CPU or a processor reading and executing a software program recorded in a recording medium such as a hard disk or a semiconductor memory.
[0661] Specifically, one of the encoding device 100 and the decoding device 200 may include a processing circuit and a storage device electrically connected to the processing circuit and accessible from the processing circuit. For example, the processing circuit corresponds to the circuit 160 or 260, and the storage device corresponds to the memory 162 or 262.
[0662] The processing circuit includes at least one of dedicated hardware and a program execution unit, and uses the storage device to execute the processing. In addition, when the processing circuit includes the program execution unit, the storage device stores a software program executed by the program execution unit.
[0663] Here, the software that realizes the encoding device 100 or the decoding device 200 according to this embodiment is the following program.
[0664] That is, the program causes a computer to execute a coding method, which includes the step of coding an image block. In the step of coding the image block, one or more size parameters related to the size of the image block are obtained, and it is determined whether the one or more size parameters and one or more threshold values satisfy a prescribed relationship. If it is determined that the one or more size parameters and the one or more threshold values satisfy the prescribed relationship, a segmentation parameter indicating whether the image block is divided into a plurality of partitions including non-rectangular partitions is encoded. If the segmentation parameter indicates that the image block is divided into the plurality of partitions, the image block is divided into the plurality of partitions for coding.
[0665] Alternatively, the program causes a computer to execute a decoding method, which includes the step of decoding an image block. In the step of decoding the above-mentioned image block, one or more size parameters related to the size of the above-mentioned image block are obtained, and it is determined whether the above-mentioned one or more size parameters and one or more thresholds satisfy a prescribed relationship. When it is determined that the above-mentioned one or more size parameters and the above-mentioned one or more thresholds satisfy the above-mentioned prescribed relationship, a segmentation parameter indicating whether the above-mentioned image block is divided into multiple partitions including non-rectangular partitions is decoded; when the above-mentioned segmentation parameter indicates that the above-mentioned image block is divided into the above-mentioned multiple partitions, the above-mentioned image block is divided into the above-mentioned multiple partitions for decoding.
[0666] Alternatively, the program causes a computer to execute a coding method, which includes: a step of dividing an image block into multiple partitions; a step of obtaining a predicted image for a partition included in the multiple partitions; and a step of 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 when it is determined that the partition is not a non-rectangular partition, a first predicted image for the partition is obtained using a first motion vector for the partition, a second motion vector for the partition is obtained using the first predicted image, and a second predicted image for the partition is obtained using the second motion vector as the predicted image, and when it is determined that the partition is a non-rectangular partition, the first predicted image is obtained as the predicted image using the first motion vector instead of the second motion vector.
[0667] Alternatively, the program causes a computer to execute a decoding method, which includes: a step of dividing an image block into multiple partitions; a step of obtaining a predicted image for a partition included in the multiple partitions; and a step of 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 when it is determined that the partition is not a non-rectangular partition, a first predicted image for the partition is obtained using a first motion vector for the partition, a second motion vector for the partition is obtained using the first predicted image, and a second predicted image for the partition is obtained using the second motion vector as the predicted image, and when it is determined that the partition is a non-rectangular partition, the first predicted image is obtained as the predicted image using the first motion vector instead of the second motion vector.
[0668] Alternatively, the program causes a computer to execute a coding method, which includes: a step of dividing an image block into a plurality of partitions; a step of obtaining a predicted image for a partition included in the plurality of partitions; and a step of 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 when 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, a second predicted image is obtained as the predicted image using the first predicted image and the gradient image, and when it is determined that the partition is a non-rectangular partition, the gradient image is not used and the first predicted image is obtained as the predicted image.
[0669] Alternatively, the program causes a computer to execute a decoding method, which includes: a step of dividing an image block into a plurality of partitions; a step of obtaining a predicted image for a partition included in the plurality of partitions; and a step of 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 when 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, a second predicted image is obtained as the predicted image using the first predicted image and the gradient image, and when 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.
[0670] Alternatively, the program causes a computer to execute a coding method, which includes: a step of dividing an image block into a plurality of partitions; a step of generating a motion vector candidate list for a partition included in the plurality of partitions; a step of obtaining a motion vector for the partition from the motion vector candidate list; a step of performing an inter-frame prediction process on the partition using the motion vector for the partition; and a step of encoding the image block using the result of the inter-frame prediction process. 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 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 at least one of 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 a plurality of motion vectors for a plurality of spatially adjacent partitions and at least one of a plurality of motion vectors for a plurality of temporally adjacent partitions without using the plurality of motion vectors for the plurality of sub-partitions.
[0671] Alternatively, the program causes a computer to execute a decoding method, which includes: a step of dividing an image block into multiple partitions; a step of generating a motion vector candidate list for a partition included in the multiple partitions; a step of obtaining a motion vector for the partition from the motion vector candidate list; a step of performing inter-frame prediction processing on the partition using the motion vector for the partition; and a step of decoding the image block using the result of the inter-frame 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 multiple motion vectors for multiple spatially adjacent partitions that are spatially adjacent to the partition, multiple motion vectors for multiple temporally adjacent partitions that are temporally adjacent to the partition, and at least one motion vector for multiple 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 multiple motion vectors for the multiple spatially adjacent partitions and at least one motion vector for multiple motion vectors for the multiple temporally adjacent partitions without using the multiple motion vectors for the multiple sub-partitions.
[0672] In addition, as described above, each component may also be a circuit. These circuits may constitute one circuit as a whole, or they may be different circuits. In addition, each component may be implemented by a general-purpose processor or a dedicated processor.
[0673] In addition, the processing performed by a specific component may be performed by other components. In addition, the order of performing the processing may be changed, and a plurality of processing may be performed simultaneously. In addition, the encoding and decoding device may include the encoding device 100 and the decoding device 200.
[0674] In addition, the numbers 1 and 2, etc. used in the description may be replaced as appropriate. In addition, new numbers may be assigned to components, etc., or they may be removed.
[0675] The above describes the forms of the encoding device 100 and the decoding device 200 based on the embodiment, but the forms of the encoding device 100 and the decoding device 200 are not limited to the embodiment. As long as it does not depart from the gist of the present invention, various modified forms that can be thought of by those skilled in the art are implemented on the present embodiment, and forms constructed by combining constituent elements in different embodiments can also be included in the scope of the forms of the encoding device 100 and the decoding device 200.
[0676] This embodiment may be implemented in combination with at least a portion of other embodiments of the present invention. In addition, a portion of the processing described in the flowchart of this embodiment, a portion of the device structure, a portion of the syntax, etc. may be implemented in combination with other embodiments.
[0677] (Implementation Method 2)
[0678] In each of the above embodiments, each functional block can usually be implemented by an MPU and a memory. In addition, the processing of each functional block is usually implemented by a program execution unit such as a processor reading and executing the software (program) recorded in a recording medium such as a ROM. The software can be distributed by downloading, etc., or recorded in a recording medium such as a semiconductor memory for distribution. In addition, of course, each functional block can also be implemented by hardware (dedicated circuit).
[0679] In addition, the processing described in each embodiment can be implemented by centralized processing using a single device (system), or can be implemented by decentralized processing using multiple devices. In addition, the processor that executes the above program can be single or multiple. That is, centralized processing can be performed or decentralized processing can be performed.
[0680] The aspects of the present invention are not limited to the above-described embodiments, and various modifications can be made, which are also included in the scope of the aspects of the present invention.
[0681] Furthermore, an application example of the moving picture encoding method (image encoding method) or the moving picture decoding method (image decoding method) shown in each of the above embodiments and a system using the same are described here. The system is characterized by having an image encoding device using the image encoding method, an image decoding device using the image decoding method, and an image encoding and decoding device having both. Other structures in the system can be appropriately changed according to the situation.
[0682] [Example of use]
[0683] Fig.32 1 is a diagram showing the overall configuration of a content providing system ex100 for realizing content distribution services. A communication service providing area is divided into cells of desired sizes, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.
[0684] In the content supply system ex100, devices such as a computer ex111, a game machine 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 combine some of the above elements. Instead of the base stations ex106 to ex110, which are fixed wireless stations, the devices may be directly or indirectly connected to each other via a telephone network or short-range wireless. In addition, the streaming media server ex103 is connected to the devices such as the computer ex111, the game machine ex112, the camera ex113, the home appliance ex114, and the smartphone ex115 via the Internet ex101. In addition, the streaming media server ex103 is connected to a terminal in a hot spot in an airplane ex117 via a satellite ex116.
[0685] Alternatively, wireless access points or hotspots 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 directly connected to the aircraft ex117 without going through the satellite ex116.
[0686] The camera ex113 is a device such as a digital camera capable of taking still images and moving images. The smartphone ex115 is a smartphone, a mobile phone, or a PHS (Personal Handyphone System) that supports mobile communication systems generally referred to as 2G, 3G, 3.9G, 4G, and 5G in the future.
[0687] The household appliance ex118 is a refrigerator or a device included in a household fuel cell cogeneration system.
[0688] In the content supply system ex100, a terminal having a camera function is connected to the streaming server ex103 via the base station ex106, etc., so that on-site distribution can be performed. In on-site distribution, a terminal (such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, a smartphone ex115, and a terminal in an airplane ex117) performs the encoding process described in the above embodiments on still images or moving image contents captured by a user using the terminal, multiplexes the image data obtained by the encoding and the sound data obtained by encoding the sound corresponding to the image, 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 invention.
[0689] On the other hand, the streaming server ex103 streams the content data sent by the client that requested it. The client is a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal in an airplane ex117 that can decode the coded data. Each device that receives the distributed data decodes the received data and reproduces it. That is, each device functions as an image decoding device according to one aspect of the present invention.
[0690] [Distributed processing]
[0691] In addition, the streaming media server ex103 can also be a plurality of servers or a plurality of computers, which distributes data by distributing processing or recording. For example, the streaming media server ex103 can also be implemented by CDN (Contents Delivery Network), which implements content distribution by connecting many edge servers scattered in the world to the network between the edge servers. In CDN, physically closer edge servers are dynamically allocated according to the client. And, by caching and distributing content to the edge server, delay can be reduced. In addition, in the case of a certain error or the communication state changes due to an increase in the amount of communication, it is possible to distribute the processing with multiple edge servers, or switch the distribution subject to other edge servers, or bypass the part of the network where the failure occurs and continue to distribute, so that high-speed and stable distribution can be achieved.
[0692] In addition, the encoding process of the captured data can be performed by each terminal, on the server side, or shared by each other, without being limited to the distributed processing of the distribution itself. As an example, two processing cycles are usually performed in the encoding process. In the first cycle, the complexity or code amount of the image of the frame or scene unit is detected. In addition, in the second cycle, processing is performed to maintain the image quality and improve the encoding efficiency. For example, by performing the first encoding process by the terminal and the second encoding process by the server side that receives the content, the quality and efficiency of the content can be improved while reducing the processing load in each terminal. In this case, if there is a request for receiving and decoding almost in real time, the data completed by the first encoding by the terminal can also be received and reproduced by other terminals, so more flexible real-time distribution can also be performed.
[0693] As another example, the camera ex113 or the like extracts feature quantities from an image, compresses data on the feature quantities as metadata, and transmits the data to the server. The server determines the importance of an object based on the feature quantities, switches the quantization accuracy, and performs compression corresponding to the meaning of the image. Feature quantity data is particularly effective in improving the accuracy and efficiency of motion vector prediction during re-compression in the server. Alternatively, the terminal may perform simple encoding such as VLC (variable length coding) and the server may perform encoding with a large processing load such as CABAC (context adaptive binary arithmetic coding).
[0694] As another example, in a stadium, shopping mall, or factory, there are multiple video data obtained by shooting roughly the same scene by multiple terminals. In this case, multiple terminals that have shot, and other terminals and servers that have not shot as needed, are used to distribute the encoding processing, such as GOP (Group of Picture) units, picture units, or tile units obtained by dividing pictures, so as to perform distributed processing. This can reduce delays and better achieve real-time performance.
[0695] In addition, since the plurality of image data are substantially the same scene, the server may also manage and / or instruct the image data captured by each terminal to refer to each other. Alternatively, the server may receive the encoded data from each terminal and change the reference relationship between the plurality of data, or modify or replace the image itself and re-encode it. Thus, a stream with improved quality and efficiency of each data may be generated.
[0696] In addition, the server may perform transcoding to change the encoding method of the video data and distribute the video data. For example, the server may convert the encoding method of the MPEG type to the VP type, or convert H.264 to H.265.
[0697] Thus, the encoding process can be performed by a terminal or one or more servers. Therefore, the following uses "server" or "terminal" as the subject of the process, but part or all of the process performed by the server can also be performed by the terminal, and part or all of the process performed by the terminal can also be performed by the server. In addition, the same is true for the decoding process.
[0698] [3D, multi-angle]
[0699] In recent years, there has been an increasing number of cases where images or videos taken by terminals such as multiple cameras ex113 and / or smartphones ex115 that are substantially synchronized with each other, such as different scenes or the same scene taken from different angles, are combined and used. The images taken by each terminal are combined based on the relative positional relationship between the terminals obtained separately or the areas where the feature points contained in the images are consistent.
[0700] The server can not only encode two-dimensional moving images, but also encode still images automatically or at a user-specified time based on scene analysis of moving images and send them to the receiving terminal. When the server is able to obtain the relative position relationship between the shooting terminals, it can generate not only two-dimensional moving images but also three-dimensional shapes of the scene based on images of the same scene shot from different angles. In addition, the server can also encode three-dimensional data generated by point clouds, etc., and can also select or reconstruct images from images shot by multiple terminals based on the results of identifying or tracking people or targets using three-dimensional data to generate images sent to the receiving terminal.
[0701] In this way, users can arbitrarily select each image corresponding to each shooting terminal to enjoy the scene, and can also enjoy the content of the image cut out of any viewpoint from the three-dimensional data reconstructed using multiple images or images. Furthermore, like the image, the sound can also be collected from multiple different angles, and the server can match the image and multiplex and send the sound from a specific angle or space with the image.
[0702] In addition, in recent years, content that establishes correspondence between the real world and the virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become popular. In the case of VR images, the server produces viewpoint images for the right eye and the left eye respectively, and can be encoded to allow reference between viewpoint images through Multi-View Coding (MVC) or the like, or encoded as different streams without reference to each other. When decoding different streams, they can be reproduced synchronously with each other according to the user's viewpoint to reproduce a virtual three-dimensional space.
[0703] In the case of AR images, the server may overlap the virtual object information in the virtual space with the camera information in the real space based on the three-dimensional position or the movement of the user's viewpoint. The decoding device obtains or maintains the virtual object information and three-dimensional data, generates a two-dimensional image according to the movement of the user's viewpoint, and produces overlapping data by smoothly connecting them. Alternatively, the decoding device may send the movement of the user's viewpoint to the server in addition to the entrustment of the virtual object information, and the server may produce overlapping data matching the received movement of the viewpoint based on the three-dimensional data maintained in the server, encode the overlapping data and distribute it to the decoding device. In addition, the overlapping data has an alpha value indicating the transmittance other than RGB, and the server sets the alpha value of the part other than the target produced according to the three-dimensional data to 0, etc., and encodes the part in a transparent state. Alternatively, the server may also set the RGB value of a specified value as the background like a chroma key, and generate data that sets the part other than the target as the background color.
[0704] Similarly, the decoding process of the distributed data can be performed by each terminal as a client, or it can be performed on the server side, or it can be shared and performed. As an example, a terminal may first send a receiving request to the server, and other terminals may receive the content corresponding to the request and perform decoding processing, and send the decoded signal to a device with a display. By distributing the processing regardless of the performance of the communicative terminal itself and selecting appropriate content, data with better image quality can be reproduced. In addition, as another example, large-size image data can also be received by a TV, etc., and a portion of the image such as tiles after being divided can be decoded and displayed by the personal terminal of the viewer. In this way, while making the overall image shared, it is possible to confirm one's own area of responsibility or the area that wants to be confirmed in more detail at hand.
[0705] In addition, it is expected that in the future, when multiple short-range, medium-range or long-range wireless communications can be used both indoors and outdoors, the distribution system standards such as MPEG-DASH can be used to seamlessly receive content while switching appropriate data for the communication being connected. As a result, users can not only use their own terminals, but also freely select decoding devices or display devices such as displays set up indoors and outdoors to switch in real time. In addition, it is possible to switch the decoding terminal and the display terminal for decoding based on their own location information. As a result, it is also possible to move while displaying map information on a part of the wall or ground of a building next to a displayable device embedded in the destination. In addition, it is also possible to switch the bit rate of the received data based on the ease of access to the encoded data on the network, such as caching the encoded data in a server that can be accessed from the receiving terminal in a short time, or copying the encoded data in the edge server of the content distribution service.
[0706] [Scalable Coding]
[0707] To switch content, use Fig.33 1. The scalable stream compressed and coded using the moving picture coding method described in the above embodiments is described as shown. For the server, a plurality of streams having the same content but different qualities may be provided as a single stream, or a structure in which the content is switched by utilizing the characteristics of a temporally / spatially scalable stream coded in layers as shown in the figure. That is, the decoding side determines which layer to decode based on internal factors such as performance and external factors such as the state of the communication band, so that the decoding side can freely switch between low-resolution content and high-resolution content for decoding. For example, if the subsequent video viewed on the smartphone ex115 while on the move is to be viewed on a device such as an Internet TV after returning home, the device can simply decode the same stream into different layers, thereby reducing the burden on the server side.
[0708] Furthermore, in addition to the hierarchical structure in which the picture is encoded for each layer and the enhancement layer exists above the base layer as described above, the enhancement layer may include meta-information such as statistical information based on the image, and the decoding side may generate high-definition content by super-resolving the picture of the base layer based on the meta-information. Super-resolution may be either an increase in the SN ratio or an increase in resolution at the same resolution. The meta-information includes information for determining linear or nonlinear filter coefficients used in super-resolution processing, or information for determining parameter values in filter processing, machine learning, or least squares calculation used in super-resolution processing.
[0709] Alternatively, the image may be divided into tiles according to the meaning of the object in the image, and the decoding side may decode only a part of the area by selecting the tile to be decoded. In addition, by storing the attributes of the object (people, cars, balls, etc.) and the position in the image (coordinate position in the same image, etc.) as meta-information, the decoding side can determine the position of the desired object based on the meta-information and determine the tile that includes the object. For example, Fig.34 As shown, the meta information is stored using a data storage structure different from pixel data, such as SEI messages in HEVC. The meta information indicates, for example, the position, size, or color of the main object.
[0710] In addition, the meta information may be stored in units consisting of multiple pictures, such as streams, sequences, or random access units. Thus, the decoding side can obtain the time when a specific person appears in the image, and by matching the information of the picture unit, it can determine the picture where the target exists and the position of the target in the picture.
[0711] [Web page optimization]
[0712] Fig.35 This is a diagram showing an example of a display screen of a web page on the computer ex111 or the like. Fig.36 1 is a diagram showing an example of a display screen of a web page on a smartphone ex115 or the like. Fig.35 and Fig.36 As shown, there are cases where a web page includes a plurality of link images that are links to image contents, and the way in which they are visible differs depending on the device being browsed. When a plurality of link images are visible on the screen, before a user explicitly selects a link image, or before a link image approaches the center of the screen, or before the entire link image enters the screen, the display device (decoding device) displays a still image or I picture of each content as a link image, or displays an image such as a GIF animation using a plurality of still images or I pictures, or receives only a base layer, decodes the image, and displays it.
[0713] When a linked image is selected by the user, the display device decodes the base layer with the highest priority. In addition, if there is information indicating that the content is scalable in the HTML constituting the web page, the display device can also decode to the enhancement layer. In addition, in order to ensure real-time performance, before selection or when the communication band is very tight, the display device can reduce the delay between the decoding time and the display time of the head picture (the delay from the start of decoding of the content to the start of display) by decoding and displaying only the pictures that are referenced in the front (I pictures, P pictures, B pictures that are only referenced in the front). In addition, the display device can also forcibly ignore the reference relationship of the pictures and set all B pictures and P pictures as forward references and roughly decode them, and perform normal decoding as the number of pictures received increases over time.
[0714] [Automatic driving]
[0715] Furthermore, when still images or video data such as two-dimensional or three-dimensional map information are transmitted and received for the purpose of 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 decode them by establishing a correspondence between them. Furthermore, the meta-information may belong to a layer or may be multiplexed with image data alone.
[0716] In this case, since the car, drone or airplane including the receiving terminal is moving, the receiving terminal can switch base stations ex106 to ex110 to perform seamless reception and decoding by transmitting the location information of the receiving terminal when receiving a request. In addition, the receiving terminal can dynamically switch the degree to which meta-information is received or the degree to which map information is updated according to the user's selection, the user's condition or the state of the communication band.
[0717] As described above, in the content providing system ex100, the client can receive, decode, and reproduce the encoded information sent by the user in real time.
[0718] [Distribution of Personal Content]
[0719] Furthermore, in the content supply system ex100, not only high-quality, long-duration contents provided by video distributors but also low-quality, short-duration contents provided by individuals can be unicasted or multicasted. It is expected that such personal contents will increase in the future. In order to make personal contents better, the server may perform encoding after editing. This can be achieved, for example, by the following structure.
[0720] After taking pictures in real time or accumulating them, the server performs recognition processing such as shooting errors, scene search, meaning analysis and target detection based on the original image or encoded data. In addition, based on the recognition results, the server manually or automatically corrects focus deviation or hand shaking, deletes scenes of low importance such as scenes with lower brightness than other pictures or scenes that are not in focus, or emphasizes the edges of the target, or changes the color tone. The server encodes the edited data based on the editing results. In addition, it is known that if the shooting time is too long, the viewing rate will decrease. The server can also automatically limit not only the scenes of low importance as mentioned above, but also the scenes with less movement based on the image processing results according to the shooting time, so as to become content within a specific time range. Alternatively, the server can also generate a summary based on the results of the scene's meaning analysis and encode it.
[0721] In addition, personal content may be written with content that infringes copyright, author's personality rights or portrait rights in its original state, or the scope of sharing may exceed the desired scope, which is inconvenient for individuals. Therefore, for example, the server may forcibly change the faces of people in the peripheral part of the screen or the home to an out-of-focus image for encoding. In addition, the server may also identify whether the face of a person different from the pre-registered person is captured in the encoded object image, and if so, apply mosaic or other processing to the face part. Alternatively, as a pre-processing or post-processing of the encoding, from the perspective of copyright, etc., the user may specify the person or background area that he wants to process the image, and the server may replace the specified area with another image or blur the focus. If it is a person, the image of the face part can be replaced while tracking the person in the moving image.
[0722] In addition, the viewing and listening of personal content with a small amount of data has a strong real-time requirement, so although it also depends on the bandwidth, the decoding device first receives, decodes and reproduces the basic layer with the highest priority. The decoding device can also receive the enhancement layer during this period, and when the reproduction is reproduced more than twice, such as in the case of looping, the enhancement layer is also included to reproduce the high-definition image. In this way, if the stream is scalable encoded, it is possible to provide an experience in which the stream gradually becomes smoother and the image becomes better although the moving image is relatively rough when it is not selected or at the beginning of viewing. In addition to scalable encoding, the same experience can be provided when the rougher stream reproduced for the first time and the second stream encoded with reference to the moving image of the first time are composed of one stream.
[0723] [Other usage examples]
[0724] In addition, these encoding or decoding processes are usually processed in the LSIex500 included in each terminal. The LSIex500 can be a single chip or a structure composed of multiple chips. In addition, the software for encoding or decoding of moving images can be loaded into a recording medium (CD-ROM, floppy disk, hard disk, etc.) that can be read by the computer ex111, etc., and the encoding process and decoding process can be performed using the software. Furthermore, when the smart phone ex115 has a camera, the moving image data obtained by the camera can be sent. In this case, the moving image data is the data that has been encoded by the LSIex500 included in the smart phone ex115.
[0725] In addition, LSIex500 may also be a structure that downloads and activates application software. In this case, the terminal first determines whether the terminal corresponds to the encoding method of the content or has the ability to execute a specific service. If the terminal does not correspond to the encoding method of the content or does not have the ability to execute a specific service, the terminal downloads the codec or application software, and then obtains and reproduces the content.
[0726] Furthermore, the content supply system ex100 is not limited to the content supply system ex100 via the Internet ex101, and at least one of the video encoding device (video encoding device) or video decoding device (video decoding device) in each of the above-mentioned embodiments can be incorporated into a digital broadcasting system. Since multiplexed data in which video and audio are multiplexed is transmitted and received by using broadcasting radio waves such as satellites, the content supply system ex100 is different from the structure that is easy for unicast in that it is suitable for multicast, but the same application can be made to the encoding process and the decoding process.
[0727] [Hardware structure]
[0728] Fig.37 is a diagram showing a smartphone ex115. Fig.38 1 is a diagram showing a configuration example of a smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves with the base station ex110, a camera unit ex465 capable of shooting video and still images, and a display unit ex458 for displaying decoded data such as the video shot by the camera unit ex465 and the video received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466 such as a touch panel, a sound output unit ex457 such as a speaker for outputting sound or audio, a sound input unit ex456 such as a microphone for inputting sound, a memory unit ex467 capable of storing coded data or decoded data such as shot video or still images, recorded sound, received video or still images, and mails, and a slot unit ex464 as an interface unit with a SIM ex468 for identifying a user and authenticating access to various data such as a network. In addition, an external memory may be used instead of the memory unit ex467.
[0729] In addition, the main control unit ex460 that performs integrated control of the display unit ex458 and the operation unit ex466 is connected to the power circuit unit ex461, the operation input control unit ex462, the image signal processing unit ex455, the camera interface unit ex463, the display control unit ex459, the modulation / demodulation unit ex452, the multiplexing / separation unit ex453, the sound signal processing unit ex454, the slot unit ex464 and the memory unit ex467 via a bus ex470.
[0730] When the power key is turned on by a user's operation, the power circuit unit ex461 supplies power from the battery pack to each unit, thereby activating the smartphone ex115 to be able to operate.
[0731] The smartphone ex115 performs processes such as calls and data communications under the control of a main control unit ex460 including a CPU, ROM, and RAM. During a call, the voice signal collected by the voice input unit ex456 is converted into a digital voice signal by the voice signal processing unit ex454, which is then subjected to spectrum diffusion processing by the modulation / demodulation unit ex452. The transmitting / receiving unit ex451 performs digital-to-analog conversion processing and frequency conversion processing, and then transmits the signal via the antenna ex450. In addition, the received data is amplified, subjected to frequency conversion processing and analog-to-digital conversion processing, subjected to spectrum inverse diffusion processing by the modulation / demodulation unit ex452, and converted into an analog voice signal by the voice signal processing unit ex454, which is then output from the voice output unit ex457. During data communications, text, still image, or video data is sent to the main control unit ex460 via the operation input control unit ex462 by operating the operation unit ex466 of the main unit, and similar transmission and reception processing is performed. In the data communication mode, when transmitting video, still images, or video and audio, the video signal processing unit ex455 compresses and encodes the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 using the moving image encoding method described in the above embodiments, and sends the encoded video data to the multiplexing / demultiplexing unit ex453. In addition, the audio signal processing unit ex454 encodes the audio signal collected by the audio input unit ex456 during the process of taking a video or still image by the camera unit ex465, and sends the encoded audio data to the multiplexing / demultiplexing unit ex453. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and the encoded audio data in a predetermined manner, and performs modulation and conversion processing on the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451, and transmits the data via the antenna ex450.
[0732] When receiving an image attached to an e-mail or a chat tool, or an image linked to a web page, etc., in order to decode the multiplexed data received via the antenna ex450, the multiplexing / demultiplexing unit ex453 separates the multiplexed data into a bit stream of image data and a bit stream of audio data, and supplies the encoded image data to the image signal processing unit ex455 via the synchronous bus ex470, and supplies the encoded audio data to the audio signal processing unit ex454. The image signal processing unit ex455 decodes the image signal by a moving image decoding method corresponding to the moving image encoding method shown in the above-mentioned embodiments, and displays the image or still image included in the linked moving image file on the display unit ex458 via the display control unit ex459. In addition, the audio signal processing unit ex454 decodes the audio signal and outputs the audio from the audio output unit ex457. In addition, since real-time streaming media is becoming more and more popular, the reproduction of audio may be socially inappropriate depending on the user's situation. Therefore, as an initial value, it is preferable to have a structure in which only the image data is reproduced without reproducing the audio signal. The sound may be reproduced synchronously only when the user performs an operation such as clicking on the video data.
[0733] In the description here, the smartphone ex115 is used as an example. However, as a terminal, three types of installation forms are conceivable, namely, a transmitting 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, it is assumed that multiplexed data in which audio data and the like are multiplexed in video data is received and transmitted. However, in addition to audio data, character data related to the video may be multiplexed in the multiplexed data, and video data itself may be received or transmitted instead of the multiplexed data.
[0734] In addition, although the main control unit ex460 including a CPU is assumed to control the encoding or decoding process, the terminal is often equipped with a GPU. Therefore, a structure can also be made to use the performance of the GPU to process a larger area together through a memory shared by the CPU and GPU, or a memory that manages addresses in a way that can be used together. In this way, the encoding time can be shortened, real-time performance can be ensured, and low latency can be achieved. In particular, it is more effective if motion estimation, deblocking filtering, SAO (Sample Adaptive Offset) and transformation / quantization processing are performed together in units such as pictures by the GPU instead of the CPU.
[0735] Industrial Applicability
[0736] The present invention can be utilized in, for example, a television receiver, a digital video recorder, a car navigation system, a mobile phone, a digital camera, a digital video camera, a video conference system, or an electronic mirror.
[0737] Description of symbols
[0738] 100 Encoding device
[0739] 102 Division
[0740] 104 Subtraction Department
[0741] 106 Transformation Department
[0742] 108 Quantitative Department
[0743] 110 Entropy Coding Unit
[0744] 112, 204 Inverse Quantization Unit
[0745] 114, 206 Inverse transformation unit
[0746] 116, 208 Addition Department
[0747] 118, 210 memory blocks
[0748] 120, 212 loop filter unit
[0749] 122, 214 frame memory
[0750] 124, 216 Intra-frame prediction unit
[0751] 126, 218 Inter-frame prediction unit
[0752] 128, 220 Prediction and Control Department
[0753] 160, 260 circuits
[0754] 162, 262 memory
[0755] 200 decoding device
[0756] 202 Entropy Decoding Unit
Claims
1. An encoding device comprising: Circuits; and Memory, where The circuit uses the memory and, in operation, selects a coding mode from a plurality of candidates including a DMVR coding mode and a partition coding mode, wherein the DMVR is a decoding side motion vector refinement mode, When the above DMVR coding mode is selected, the above circuit, Get the first motion vector of the first image block, Using motion search, a second motion vector is derived from the first motion vector. generating a predicted image of the first image block using the second motion vector, and When the above partition coding mode is selected, the above circuit, Determine a plurality of partitions in the second image block, Get the third motion vector of each partition, generating a predicted image of the second image block using the third motion vector without deriving a fourth motion vector from the third motion vector using a motion search, Generate a flag representing the above partition encoding mode.
2. A decoding device comprising: Circuits; and Memory, where The circuit uses the memory and in operation determines a decoding mode to be performed from a plurality of candidates including a DMVR decoding mode and a partitioned decoding mode based on information related to the decoding mode, wherein the DMVR is a decoding side motion vector refinement, and the information includes a flag, When it is decided to perform the above DMVR decoding mode, the above circuit, Get the first motion vector of the first image block, Using motion search, a second motion vector is derived from the first motion vector. generating a predicted image of the first image block using the second motion vector, and When it is determined to perform the above partition decoding mode, the above circuit, Determine a plurality of partitions in the second image block, Get the third motion vector of each partition, A predicted image of the second image block is generated using the third motion vector, without deriving a fourth motion vector from the third motion vector using a motion search.
3. A non-transitory computer-readable medium storing a bitstream, The bitstream includes information and an image block, the information indicates a coding mode selected from a plurality of candidates including a DMVR coding mode and a partition coding mode, the DMVR is a decoding side motion vector refinement, the information includes a flag, wherein, In the case where the above information indicates that the above DMVR encoding mode is selected, Get the first motion vector, Using motion search, a second motion vector is derived from the first motion vector. generating a predicted image of the image block using the second motion vector, In the case where the above information indicates that the above partition coding mode is selected, Determine multiple partitions in the above image block, Obtain the third motion vector of each of the plurality of partitions, A predicted image of the image block is generated using the third motion vector, and a fourth motion vector is derived from the third motion vector without using a motion search.